├── .eslintignore
├── .forceignore
├── .github
└── workflows
│ ├── pr.format-all.yml
│ └── pr.lint-lwc.yml
├── .gitignore
├── .prettierignore
├── .prettierrc
├── LICENSE
├── README.md
├── config
└── project-scratch-def.json
├── package-lock.json
├── package.json
├── sfdx-project.json
├── utils-core
└── main
│ └── default
│ ├── aura
│ ├── DialogService
│ │ ├── DialogService.cmp
│ │ ├── DialogService.cmp-meta.xml
│ │ ├── DialogServiceController.js
│ │ └── DialogServiceHelper.js
│ ├── EventFooter
│ │ ├── EventFooter.cmp
│ │ ├── EventFooter.cmp-meta.xml
│ │ ├── EventFooter.css
│ │ └── EventFooterController.js
│ ├── EventPublisher_LFA
│ │ ├── EventPublisher_LFA.cmp
│ │ ├── EventPublisher_LFA.cmp-meta.xml
│ │ ├── EventPublisher_LFA.design
│ │ └── EventPublisher_LFAController.js
│ ├── FlowWrapper
│ │ ├── FlowWrapper.cmp
│ │ ├── FlowWrapper.cmp-meta.xml
│ │ ├── FlowWrapperController.js
│ │ └── FlowWrapperHelper.js
│ ├── MessageServiceHandler
│ │ ├── MessageServiceHandler.cmp
│ │ ├── MessageServiceHandler.cmp-meta.xml
│ │ ├── MessageServiceHandler.css
│ │ ├── MessageServiceHandler.design
│ │ ├── MessageServiceHandlerController.js
│ │ └── MessageServiceHandlerHelper.js
│ ├── ModalFooter
│ │ ├── ModalFooter.cmp
│ │ ├── ModalFooter.cmp-meta.xml
│ │ └── ModalFooterController.js
│ └── WorkspaceService
│ │ ├── WorkspaceService.cmp
│ │ ├── WorkspaceService.cmp-meta.xml
│ │ ├── WorkspaceService.css
│ │ ├── WorkspaceServiceController.js
│ │ └── WorkspaceServiceHelper.js
│ ├── classes
│ ├── CalculateFormulas.cls
│ ├── CalculateFormulas.cls-meta.xml
│ ├── CalculateFormulasTests.cls
│ ├── CalculateFormulasTests.cls-meta.xml
│ ├── DataTableService.cls
│ ├── DataTableService.cls-meta.xml
│ ├── DataTableServiceTests.cls
│ ├── DataTableServiceTests.cls-meta.xml
│ ├── LookupAuraService.cls
│ ├── LookupAuraService.cls-meta.xml
│ ├── LookupAuraServiceTests.cls
│ └── LookupAuraServiceTests.cls-meta.xml
│ ├── customMetadata
│ ├── Datatable_Config.Default_Lookup_Config.md-meta.xml
│ ├── Datatable_Lookup_Config.Case.md-meta.xml
│ └── Datatable_Lookup_Config.Default_for_All_Objects.md-meta.xml
│ ├── layouts
│ ├── Datatable_Action_Config__mdt-Datatable Action Config Layout.layout-meta.xml
│ ├── Datatable_Column_Config__mdt-Datatable Column Config Layout.layout-meta.xml
│ ├── Datatable_Config__mdt-Datatable Config Layout.layout-meta.xml
│ └── Datatable_Lookup_Config__mdt-Datatable Lookup Config Layout.layout-meta.xml
│ ├── lwc
│ ├── .eslintrc.json
│ ├── baseDatatable
│ │ ├── baseDatatable.html
│ │ ├── baseDatatable.js
│ │ └── baseDatatable.js-meta.xml
│ ├── baseDatatableDeleteRowForm
│ │ ├── baseDatatableDeleteRowForm.html
│ │ ├── baseDatatableDeleteRowForm.js
│ │ └── baseDatatableDeleteRowForm.js-meta.xml
│ ├── baseDatatableEditRowForm
│ │ ├── baseDatatableEditRowForm.html
│ │ ├── baseDatatableEditRowForm.js
│ │ └── baseDatatableEditRowForm.js-meta.xml
│ ├── baseDatatableEditableCell
│ │ ├── baseDatatableEditableCell.css
│ │ ├── baseDatatableEditableCell.html
│ │ ├── baseDatatableEditableCell.js
│ │ └── baseDatatableEditableCell.js-meta.xml
│ ├── baseDatatableExtension
│ │ ├── baseDatatableExtension.js
│ │ ├── baseDatatableExtension.js-meta.xml
│ │ ├── customFormula.html
│ │ ├── customLookup.html
│ │ ├── customName.html
│ │ └── customPicklist.html
│ ├── baseDatatableFormulaCell
│ │ ├── baseDatatableFormulaCell.html
│ │ ├── baseDatatableFormulaCell.js
│ │ └── baseDatatableFormulaCell.js-meta.xml
│ ├── baseDatatableLookupCell
│ │ ├── baseDatatableLookupCell.html
│ │ ├── baseDatatableLookupCell.js
│ │ └── baseDatatableLookupCell.js-meta.xml
│ ├── baseDatatableNameCell
│ │ ├── baseDatatableNameCell.html
│ │ ├── baseDatatableNameCell.js
│ │ └── baseDatatableNameCell.js-meta.xml
│ ├── baseDatatablePicklistCell
│ │ ├── baseDatatablePicklistCell.html
│ │ ├── baseDatatablePicklistCell.js
│ │ └── baseDatatablePicklistCell.js-meta.xml
│ ├── baseListbox
│ │ ├── baseListbox.html
│ │ ├── baseListbox.js
│ │ └── baseListbox.js-meta.xml
│ ├── baseListboxItem
│ │ ├── baseListboxItem.html
│ │ ├── baseListboxItem.js
│ │ └── baseListboxItem.js-meta.xml
│ ├── baseLookup
│ │ ├── baseLookup.html
│ │ ├── baseLookup.js
│ │ └── baseLookup.js-meta.xml
│ ├── basePicklist
│ │ ├── basePicklist.html
│ │ ├── basePicklist.js
│ │ └── basePicklist.js-meta.xml
│ ├── baseUtils
│ │ ├── baseUtils.js
│ │ └── baseUtils.js-meta.xml
│ ├── collectionDatatable
│ │ ├── collectionDatatable.html
│ │ ├── collectionDatatable.js
│ │ └── collectionDatatable.js-meta.xml
│ ├── csvDatatable
│ │ ├── csvDatatable.html
│ │ ├── csvDatatable.js
│ │ └── csvDatatable.js-meta.xml
│ ├── dialogAutoCloser
│ │ ├── dialogAutoCloser.html
│ │ ├── dialogAutoCloser.js
│ │ └── dialogAutoCloser.js-meta.xml
│ ├── empApi
│ │ ├── empApi.css
│ │ ├── empApi.js
│ │ └── empApi.js-meta.xml
│ ├── eventPublisher
│ │ ├── eventPublisher.html
│ │ ├── eventPublisher.js
│ │ └── eventPublisher.js-meta.xml
│ ├── fuseBasic
│ │ ├── fuseBasic.js
│ │ └── fuseBasic.js-meta.xml
│ ├── luxon
│ │ ├── luxon.js
│ │ └── luxon.js-meta.xml
│ ├── messageService
│ │ ├── messageService.js
│ │ └── messageService.js-meta.xml
│ ├── singleton
│ │ ├── singleton.js
│ │ └── singleton.js-meta.xml
│ ├── soqlDatatable
│ │ ├── soqlDatatable.html
│ │ ├── soqlDatatable.js
│ │ └── soqlDatatable.js-meta.xml
│ ├── tableService
│ │ ├── tableService.js
│ │ └── tableService.js-meta.xml
│ └── tableServiceUtils
│ │ ├── tableServiceUtils.js
│ │ └── tableServiceUtils.js-meta.xml
│ ├── messageChannels
│ └── OpenChannel.messageChannel-meta.xml
│ ├── objects
│ ├── Datatable_Action_Config__mdt
│ │ ├── Datatable_Action_Config__mdt.object-meta.xml
│ │ ├── fields
│ │ │ ├── Button_Label__c.field-meta.xml
│ │ │ ├── Datatable_Config__c.field-meta.xml
│ │ │ ├── Dialog_Size__c.field-meta.xml
│ │ │ ├── Flow_API_Name__c.field-meta.xml
│ │ │ ├── LWC_Name__c.field-meta.xml
│ │ │ ├── Order__c.field-meta.xml
│ │ │ ├── Overflow_Action_Name__c.field-meta.xml
│ │ │ ├── Row_Action_Name__c.field-meta.xml
│ │ │ ├── Table_Action_Name__c.field-meta.xml
│ │ │ └── Type__c.field-meta.xml
│ │ ├── listViews
│ │ │ └── All_Configs.listView-meta.xml
│ │ └── validationRules
│ │ │ ├── Require_api_name_for_custom_flow_action.validationRule-meta.xml
│ │ │ ├── Require_api_name_for_custom_lwc_action.validationRule-meta.xml
│ │ │ ├── Require_api_name_for_table_action_old.validationRule-meta.xml
│ │ │ ├── Require_order_for_overflow_actions.validationRule-meta.xml
│ │ │ ├── Require_order_for_row_actions.validationRule-meta.xml
│ │ │ ├── Require_order_for_table_actions.validationRule-meta.xml
│ │ │ ├── Require_overflow_action_name.validationRule-meta.xml
│ │ │ ├── Require_row_action_name.validationRule-meta.xml
│ │ │ └── Require_table_action_name.validationRule-meta.xml
│ ├── Datatable_Column_Config__mdt
│ │ ├── Datatable_Column_Config__mdt.object-meta.xml
│ │ ├── fields
│ │ │ ├── Column_Field_Name__c.field-meta.xml
│ │ │ ├── Column_Properties_JSON__c.field-meta.xml
│ │ │ └── Datatable_Config__c.field-meta.xml
│ │ └── listViews
│ │ │ └── All_Configs.listView-meta.xml
│ ├── Datatable_Config__mdt
│ │ ├── Datatable_Config__mdt.object-meta.xml
│ │ ├── fields
│ │ │ ├── Has_Actions_Config__c.field-meta.xml
│ │ │ ├── Has_Columns_Config__c.field-meta.xml
│ │ │ ├── Has_Lookups_Config__c.field-meta.xml
│ │ │ └── Type__c.field-meta.xml
│ │ ├── listViews
│ │ │ └── All_Configs.listView-meta.xml
│ │ └── validationRules
│ │ │ └── Require_exact_actions_or_lookups_text.validationRule-meta.xml
│ └── Datatable_Lookup_Config__mdt
│ │ ├── Datatable_Lookup_Config__mdt.object-meta.xml
│ │ ├── fields
│ │ ├── Datatable_Config__c.field-meta.xml
│ │ ├── Icon_Name__c.field-meta.xml
│ │ ├── Object_API_Name__c.field-meta.xml
│ │ ├── Subtitle_Field__c.field-meta.xml
│ │ └── Title_Field__c.field-meta.xml
│ │ └── listViews
│ │ └── All_Configs.listView-meta.xml
│ └── staticresources
│ ├── papa_parse_5_0_2.js
│ └── papa_parse_5_0_2.resource-meta.xml
└── utils-recipes
└── main
└── default
├── applications
├── LWC_Utils.app-meta.xml
└── LWC_Utils_Console.app-meta.xml
├── aura
├── AccountSelector
│ ├── AccountSelector.cmp
│ ├── AccountSelector.cmp-meta.xml
│ ├── AccountSelectorController.js
│ └── AccountSelectorHelper.js
├── CaseDatatable
│ ├── CaseDatatable.cmp
│ ├── CaseDatatable.cmp-meta.xml
│ ├── CaseDatatableController.js
│ └── CaseDatatableHelper.js
├── ContactAddressForm
│ ├── ContactAddressForm.cmp
│ ├── ContactAddressForm.cmp-meta.xml
│ ├── ContactAddressForm.css
│ ├── ContactAddressFormController.js
│ └── ContactAddressFormHelper.js
├── ContactDatatable
│ ├── ContactDatatable.cmp
│ ├── ContactDatatable.cmp-meta.xml
│ ├── ContactDatatableController.js
│ └── ContactDatatableHelper.js
├── DataService
│ ├── DataService.cmp
│ ├── DataService.cmp-meta.xml
│ ├── DataServiceController.js
│ └── DataServiceHelper.js
└── QuickUpdateService
│ ├── QuickUpdateService.cmp
│ ├── QuickUpdateService.cmp-meta.xml
│ ├── QuickUpdateServiceController.js
│ └── QuickUpdateServiceHelper.js
├── classes
├── DataServiceCtrl.cls
└── DataServiceCtrl.cls-meta.xml
├── customMetadata
├── Datatable_Action_Config.Assign_New_Account_for_Contacts.md-meta.xml
├── Datatable_Action_Config.Check_Opportunities_for_Contacts.md-meta.xml
├── Datatable_Action_Config.Check_Opportunities_for_Contacts_Row.md-meta.xml
├── Datatable_Action_Config.Delete_Contact.md-meta.xml
├── Datatable_Action_Config.Display_Account_Info_In_Loop.md-meta.xml
├── Datatable_Action_Config.Edit_Contact.md-meta.xml
├── Datatable_Action_Config.Remove_Contact_Phone.md-meta.xml
├── Datatable_Config.LWC_Utils_SOQL_Datatable_tab.md-meta.xml
└── Datatable_Lookup_Config.Account.md-meta.xml
├── flexipages
├── Account_Record_Page.flexipage-meta.xml
├── Aggregate_SOQL_Datatable.flexipage-meta.xml
├── Collection_Datatable.flexipage-meta.xml
├── LWC_Utils_Console_Home.flexipage-meta.xml
├── LWC_Utils_Console_UtilityBar.flexipage-meta.xml
├── LWC_Utils_UtilityBar.flexipage-meta.xml
├── SOQL_Datatable.flexipage-meta.xml
├── Sample_App_Aura.flexipage-meta.xml
└── Sample_App_LWC.flexipage-meta.xml
├── flows
├── Collection_Datatable_Manipulate_a_Record_Collection.flow-meta.xml
├── SOQL_Datatable_Flow_Action_Update_Contacts_with_New_Account.flow-meta.xml
├── SOQL_Datatable_Flow_Overflow_Action_Display_Account_Info_Looped.flow-meta.xml
├── SOQL_Datatable_Flow_Row_Action_Remove_Contact_Phone.flow-meta.xml
├── SOQL_Datatable_Show_Selection_in_Collection_Datatable.flow-meta.xml
└── SOQL_Datatable_With_Flow_Inputs_and_Collection_Datatable.flow-meta.xml
├── lwc
├── .eslintrc.json
├── checkOpportunitiesExample
│ ├── checkOpportunitiesExample.html
│ ├── checkOpportunitiesExample.js
│ └── checkOpportunitiesExample.js-meta.xml
├── lwcAccountSelector
│ ├── lwcAccountSelector.html
│ ├── lwcAccountSelector.js
│ └── lwcAccountSelector.js-meta.xml
├── lwcContactAddressForm
│ ├── lwcContactAddressForm.html
│ ├── lwcContactAddressForm.js
│ └── lwcContactAddressForm.js-meta.xml
├── lwcContactDatatable
│ ├── lwcContactDatatable.html
│ ├── lwcContactDatatable.js
│ └── lwcContactDatatable.js-meta.xml
├── recordPagePublisher
│ ├── recordPagePublisher.html
│ ├── recordPagePublisher.js
│ └── recordPagePublisher.js-meta.xml
├── recordPageSubscriber
│ ├── recordPageSubscriber.html
│ ├── recordPageSubscriber.js
│ └── recordPageSubscriber.js-meta.xml
├── soqlDatatableLauncherExample
│ ├── soqlDatatableLauncherExample.html
│ ├── soqlDatatableLauncherExample.js
│ └── soqlDatatableLauncherExample.js-meta.xml
├── soqlDatatableNavigationExample
│ ├── soqlDatatableNavigationExample.html
│ ├── soqlDatatableNavigationExample.js
│ └── soqlDatatableNavigationExample.js-meta.xml
└── workspaceApiExamples
│ ├── workspaceApiExamples.html
│ ├── workspaceApiExamples.js
│ └── workspaceApiExamples.js-meta.xml
├── objects
├── Account
│ └── Account.object-meta.xml
└── Contact
│ └── fields
│ └── Account_Information__c.field-meta.xml
├── profiles
└── Admin.profile-meta.xml
└── tabs
├── Aggregate_SOQL_Datatable.tab-meta.xml
├── Collection_Datatable.tab-meta.xml
├── SOQL_Datatable.tab-meta.xml
├── Sample_App_Aura.tab-meta.xml
└── Sample_App_LWC.tab-meta.xml
/.eslintignore:
--------------------------------------------------------------------------------
1 | **/luxon/**
2 | **/fuseBasic/**
3 | jsconfig.json
--------------------------------------------------------------------------------
/.forceignore:
--------------------------------------------------------------------------------
1 | # List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status
2 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
3 | #
4 |
5 | # Standard metadata
6 | package.xml
7 | **appMenu
8 | **appSwitcher
9 | **objectTranslations
10 | **settings
11 |
12 | # LWC configuration files
13 | **/jsconfig.json
14 | **/.eslintrc.json
15 |
16 | # LWC Jest
17 | **/__tests__/**
--------------------------------------------------------------------------------
/.github/workflows/pr.format-all.yml:
--------------------------------------------------------------------------------
1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3 |
4 | name: PR Gate - Format All
5 |
6 | on:
7 | pull_request:
8 | branches: [master]
9 |
10 | jobs:
11 | pull-request-gate:
12 | runs-on: ubuntu-20.04
13 |
14 | strategy:
15 | matrix:
16 | node-version: [12.x]
17 |
18 | steps:
19 | - name: Checkout
20 | uses: actions/checkout@v2
21 |
22 | - name: Use Node.js ${{ matrix.node-version }}
23 | uses: actions/setup-node@v1
24 | with:
25 | node-version: ${{ matrix.node-version }}
26 |
27 | - name: Install
28 | run: npm install
29 |
30 | - name: Format
31 | run: npm run prettier:validate
32 |
--------------------------------------------------------------------------------
/.github/workflows/pr.lint-lwc.yml:
--------------------------------------------------------------------------------
1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3 |
4 | name: PR Gate - Lint LWC
5 |
6 | on:
7 | pull_request:
8 | branches: [master]
9 |
10 | jobs:
11 | pull-request-gate:
12 | runs-on: ubuntu-20.04
13 |
14 | strategy:
15 | matrix:
16 | node-version: [12.x]
17 |
18 | steps:
19 | - name: Checkout
20 | uses: actions/checkout@v2
21 |
22 | - name: Use Node.js ${{ matrix.node-version }}
23 | uses: actions/setup-node@v1
24 | with:
25 | node-version: ${{ matrix.node-version }}
26 |
27 | - name: Install
28 | run: npm install
29 |
30 | - name: Lint
31 | run: npm run eslint:validate
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # This file is used for Git repositories to specify intentionally untracked files that Git should ignore.
2 | # If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore
3 | # For useful gitignore templates see: https://github.com/github/gitignore
4 |
5 | # Salesforce dev
6 | .sfdx/
7 | .localdevserver/
8 |
9 | # LWC VSCode autocomplete
10 | jsconfig.json
11 |
12 | # LWC Jest coverage reports
13 | coverage/
14 |
15 | # Logs
16 | logs
17 | *.log
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 |
22 | # Dependency directories
23 | node_modules/
24 |
25 | # Eslint cache
26 | .eslintcache
27 |
28 | # MacOS system files
29 | .DS_Store
30 |
31 | # Windows system files
32 | Thumbs.db
33 | ehthumbs.db
34 | [Dd]esktop.ini
35 | $RECYCLE.BIN/
36 |
37 | # VS Code project settings
38 | .vscode/
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | # List files or directories below to ignore them when running prettier
2 | # More information: https://prettier.io/docs/en/ignore.html
3 | #
4 |
5 | **/staticresources/**
6 | .localdevserver
7 | .sfdx
8 | coverage/
9 | .vscode
10 | *.md
11 |
12 | # For meta files, etc
13 | *.xml
14 | *meta.xml
15 | sfdx-project.json
16 |
17 | # For libs
18 | **/luxon/**
19 | **/fuseBasic/**
20 |
21 | # For recipes
22 | utils-recipes/**
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "none",
3 | "singleQuote": true,
4 | "tabWidth": 2,
5 | "printWidth": 120,
6 | "arrowParens": "avoid",
7 | "overrides": [
8 | {
9 | "files": "**/lwc/**/*.html",
10 | "options": { "parser": "lwc" }
11 | },
12 | {
13 | "files": "*.{cmp,page,component}",
14 | "options": { "parser": "html" }
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2019, james@sparkworks.io
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # LWC Utils
2 |
3 | Reusable LWCs to 10x your solution building speed.
4 |
5 | - `messageService`: Lightning Message Service (LMS) simplified component messaging.
6 | - `SOQL Datatable`: Leverage SOQL to power your list views, related lists, and even Screen Flows.
7 | - `Collection Datatable`: Manage Record Collections variables in Screen Flows.
8 | - Design patterns leveraging both Aura and LWC to dynamically create dialogs (modals) for better UX.
9 | - Launch Screen Flows dynamically inside a dialog (modal) from anywhere.
10 |
11 | ## Introduction
12 |
13 | This repo showcases the best defaults for creating rich, interactive, data-dense UIs using the following centerpieces:
14 | - `lightning-datatable` from LWC.
15 | - `lightning:overlayLibrary` from Aura.
16 | - `lightning:flow` from Aura.
17 | - `messageService` which abstracts [Lightning Message Service](https://developer.salesforce.com/docs/component-library/bundle/lightning-message-service) to stitch it all-together.
18 |
19 | Salesforce has invested heavily into `LWC`, `Flow` and `Screen Flow` and has given [Architect Guidance](https://architect.salesforce.com/design/decision-guides/build-forms/) around how to build scalable and flexible solutions now and into the future.
20 |
21 | This repo builds on that guidance and pushes data-dense UI design to the next level with highly reusable, highly configurable components. These components have saved me thousands of developer hours and allowed me to pivot on a dime to meet the changing speed of business.
22 |
23 | I hope they will help you do the same.
24 |
25 | ## Motivation
26 |
27 | The components found in this repo aim to solve these high level problems:
28 |
29 | - Complex component communication can be difficult to design with consistency.
30 | - Datatables are useful but high effort to use.
31 | - Modals / Dialogs are useful but high effort to use.
32 |
33 | More detailed info can be found in the [wiki](https://github.com/tsalb/lwc-utils/wiki/Motivation).
34 |
35 | ## Getting Started
36 |
37 | 1) Take a look at the component [overview](https://github.com/tsalb/lwc-utils/wiki/Component-Library-Overview).
38 |
39 | 2) Install [core](https://github.com/tsalb/lwc-utils/wiki/Installation#core).
40 |
41 | 3) For first time users, install [recipes](https://github.com/tsalb/lwc-utils/wiki/Installation#recipes) in a [scratch org](https://github.com/trailheadapps/lwc-recipes#installing-the-app-using-a-scratch-org).
42 |
43 | 4) Read the [Configuration](https://github.com/tsalb/lwc-utils/wiki/Configuration).
44 |
45 | 5) Skim the [FAQ](https://github.com/tsalb/lwc-utils/wiki/FAQ).
46 |
--------------------------------------------------------------------------------
/config/project-scratch-def.json:
--------------------------------------------------------------------------------
1 | {
2 | "orgName": "lwc-utils",
3 | "edition": "Developer",
4 | "hasSampleData": true,
5 | "features": ["LightningServiceConsole"],
6 | "settings": {
7 | "lightningExperienceSettings": {
8 | "enableS1DesktopEnabled": true,
9 | "enableAuraCDNPref": false
10 | },
11 | "mobileSettings": {
12 | "enableS1EncryptedStoragePref2": false
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lwc-utils",
3 | "version": "1.8.0",
4 | "scripts": {
5 | "eslint:validate": "eslint **/lwc/**/*.js",
6 | "prettier:validate": "prettier --check '**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}'",
7 | "prettier:fix": "prettier --write '**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}'",
8 | "reinstall": "npm ci"
9 | },
10 | "author": "tsalb",
11 | "license": "BSD 3",
12 | "repository": {
13 | "type": "git",
14 | "url": "git+https://github.com/tsalb/lwc-utils"
15 | },
16 | "keywords": [
17 | "lwc",
18 | "lwc-utils",
19 | "salesforce",
20 | "util",
21 | "datatable",
22 | "lightning"
23 | ],
24 | "bugs": {
25 | "url": "https://github.com/tsalb/lwc-utils/issues"
26 | },
27 | "homepage": "https://github.com/tsalb/lwc-utils#readme",
28 | "devDependencies": {
29 | "@lwc/eslint-plugin-lwc": "^1.0.1",
30 | "@prettier/plugin-xml": "^0.13.1",
31 | "@sa11y/jest": "^0.3.1",
32 | "@salesforce/eslint-config-lwc": "^2.0.0",
33 | "@salesforce/eslint-plugin-aura": "^2.0.0",
34 | "@salesforce/eslint-plugin-lightning": "^0.1.1",
35 | "@salesforce/sfdx-lwc-jest": "^0.10.4",
36 | "eslint": "^7.25.0",
37 | "eslint-config-prettier": "^8.3.0",
38 | "eslint-plugin-import": "^2.22.1",
39 | "eslint-plugin-jest": "^23.8.2",
40 | "husky": "^5.2.0",
41 | "jest-canvas-mock": "^2.3.1",
42 | "prettier": "^2.4.1",
43 | "prettier-plugin-apex": "^1.10.0",
44 | "rimraf": "^3.0.2"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/sfdx-project.json:
--------------------------------------------------------------------------------
1 | {
2 | "packageDirectories": [
3 | {
4 | "path": "utils-core",
5 | "default": true,
6 | "package": "LWC Utils",
7 | "versionName": "ver 1.9.0",
8 | "versionNumber": "1.9.0.NEXT",
9 | "postInstallUrl": "https://github.com/tsalb/lwc-utils/releases",
10 | "releaseNotesUrl": "https://github.com/tsalb/lwc-utils/releases"
11 | },
12 | {
13 | "path": "utils-recipes",
14 | "default": false,
15 | "package": "LWC Utils Recipes",
16 | "versionName": "ver 1.9.0",
17 | "versionNumber": "1.9.0.NEXT",
18 | "postInstallUrl": "https://github.com/tsalb/lwc-utils/releases",
19 | "releaseNotesUrl": "https://github.com/tsalb/lwc-utils/releases",
20 | "dependencies": [
21 | {
22 | "package": "LWC Utils",
23 | "versionNumber": "1.9.0.LATEST"
24 | }
25 | ]
26 | }
27 | ],
28 | "namespace": "",
29 | "sfdcLoginUrl": "https://login.salesforce.com",
30 | "sourceApiVersion": "53.0",
31 | "packageAliases": {
32 | "LWC Utils": "0Ho1Q000000blJiSAI",
33 | "LWC Utils Recipes": "0Ho1Q000000blJnSAI",
34 | "LWC Utils@1.8.0-1": "04t1Q000001MRtvQAG",
35 | "LWC Utils@1.9.0-1": "04t1Q000001ACZsQAO",
36 | "LWC Utils Recipes@1.9.0-1": "04t1Q000001ACZxQAO"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/DialogService/DialogService.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/DialogService/DialogService.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | For creating modals and popovers
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/EventFooter/EventFooter.cmp:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/EventFooter/EventFooter.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | A Lightning Component Bundle
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/EventFooter/EventFooter.css:
--------------------------------------------------------------------------------
1 | .THIS {
2 | display: none;
3 | }
4 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/EventFooter/EventFooterController.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | ({
34 | handleCancel: function (component) {
35 | component.find('overlayLib').notifyClose();
36 | component.destroy();
37 | }
38 | });
39 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/EventPublisher_LFA/EventPublisher_LFA.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/EventPublisher_LFA/EventPublisher_LFA.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Send an event via MessageService when this local flow action is used
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/EventPublisher_LFA/EventPublisher_LFA.design:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/EventPublisher_LFA/EventPublisher_LFAController.js:
--------------------------------------------------------------------------------
1 | ({
2 | invoke: function (component, event, helper) {
3 | // allow LWC renderedCallback to run instead
4 | }
5 | });
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/FlowWrapper/FlowWrapper.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/FlowWrapper/FlowWrapper.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Generic Flow launcher. The flow base component is only aura in Summer 19
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/FlowWrapper/FlowWrapperController.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | ({
34 | doInit: function (component, event, helper) {
35 | let flowApiName = component.get('v.flowApiName');
36 | let inputVars = component.get('v.inputVariables');
37 | helper.flow(component).startFlow(flowApiName, inputVars);
38 | },
39 | handleStatusChange: function (component, event, helper) {
40 | let status = event.getParam('status');
41 | let payload = event.getParams();
42 | //console.log(JSON.parse(JSON.stringify(payload)));
43 | if (status === 'FINISHED') {
44 | helper.messageService(component).publish({ key: 'flowfinish' });
45 | }
46 | }
47 | });
48 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/FlowWrapper/FlowWrapperHelper.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | ({
34 | flow: function (component) {
35 | return component.find('flow');
36 | },
37 | messageService: function (component) {
38 | return component.find('messageService');
39 | }
40 | });
41 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/MessageServiceHandler/MessageServiceHandler.cmp:
--------------------------------------------------------------------------------
1 |
5 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/MessageServiceHandler/MessageServiceHandler.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Handles and delegates LMS events via messageService
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/MessageServiceHandler/MessageServiceHandler.css:
--------------------------------------------------------------------------------
1 | .THIS {
2 | display: none;
3 | }
4 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/MessageServiceHandler/MessageServiceHandler.design:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/ModalFooter/ModalFooter.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {! v.actions }
9 |
10 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/ModalFooter/ModalFooter.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Utility component for dynamic modals (overlays)
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/ModalFooter/ModalFooterController.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | ({
34 | handleCancel: function (component) {
35 | component.find('overlayLib').notifyClose();
36 | }
37 | });
38 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/WorkspaceService/WorkspaceService.cmp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/WorkspaceService/WorkspaceService.cmp-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | A Lightning Component Bundle
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/WorkspaceService/WorkspaceService.css:
--------------------------------------------------------------------------------
1 | .THIS {
2 | display: none;
3 | }
4 |
--------------------------------------------------------------------------------
/utils-core/main/default/aura/WorkspaceService/WorkspaceServiceHelper.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2021, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | ({
34 | messageService: function (component) {
35 | return component.find('messageService');
36 | },
37 | singleton: function (component) {
38 | return component.find('singleton');
39 | },
40 | workspaceApi: function (component) {
41 | return component.find('workspaceApi');
42 | }
43 | });
44 |
--------------------------------------------------------------------------------
/utils-core/main/default/classes/CalculateFormulas.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/classes/CalculateFormulasTests.cls:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | @isTest
34 | private class CalculateFormulasTests {
35 | @isTest
36 | static void test_request_should_get_response_but_with_no_hydrated_sobjects() {
37 | List userList = [SELECT Id, Name, Email FROM User LIMIT 1];
38 | List fieldsToRecalc = new List{ 'Email' };
39 | List inputs = new List();
40 |
41 | CalculateFormulas.FlowInput input = new CalculateFormulas.FlowInput();
42 | input.originalCollection = userList;
43 | input.formulaFieldsToCalculate = fieldsToRecalc;
44 | inputs.add(input);
45 |
46 | Test.startTest();
47 | List outputs = CalculateFormulas.calculateFormulasFor(inputs);
48 | Test.stopTest();
49 |
50 | System.assertEquals(1, outputs.size());
51 | List hydratedCollection = outputs[0].hydratedCollection;
52 | // No formula fields on User means Formula.recalculateFormulas() will return nothing
53 | System.assertEquals(0, hydratedCollection.size());
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/utils-core/main/default/classes/CalculateFormulasTests.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/classes/DataTableService.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/classes/DataTableServiceTests.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/classes/LookupAuraService.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/classes/LookupAuraServiceTests.cls-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | Active
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/customMetadata/Datatable_Config.Default_Lookup_Config.md-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 | Has_Actions_Config__c
7 | false
8 |
9 |
10 | Has_Columns_Config__c
11 | false
12 |
13 |
14 | Has_Lookups_Config__c
15 | true
16 |
17 |
18 | Type__c
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/utils-core/main/default/customMetadata/Datatable_Lookup_Config.Case.md-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | false
5 |
6 | Datatable_Config__c
7 | Default_Lookup_Config
8 |
9 |
10 | Icon_Name__c
11 | standard:case
12 |
13 |
14 | Object_API_Name__c
15 | Case
16 |
17 |
18 | Subtitle_Field__c
19 | Subject
20 |
21 |
22 | Title_Field__c
23 | CaseNumber
24 |
25 |
26 |
--------------------------------------------------------------------------------
/utils-core/main/default/customMetadata/Datatable_Lookup_Config.Default_for_All_Objects.md-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 |
6 | Datatable_Config__c
7 | Default_Lookup_Config
8 |
9 |
10 | Icon_Name__c
11 | standard:empty
12 |
13 |
14 | Object_API_Name__c
15 | All
16 |
17 |
18 | Subtitle_Field__c
19 |
20 |
21 |
22 | Title_Field__c
23 | Name
24 |
25 |
26 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["@salesforce/eslint-config-lwc/recommended"]
3 | }
4 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatable/baseDatatable.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableDeleteRowForm/baseDatatableDeleteRowForm.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableDeleteRowForm/baseDatatableDeleteRowForm.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableEditRowForm/baseDatatableEditRowForm.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | import { LightningElement, api } from 'lwc';
34 |
35 | export default class BaseDatatableEditRowForm extends LightningElement {
36 | @api row;
37 | @api objectApiName;
38 | @api uniqueBoundary;
39 | showSpinner = true;
40 |
41 | get messageService() {
42 | return this.template.querySelector('c-message-service');
43 | }
44 |
45 | handleLoad() {
46 | this.showSpinner = false;
47 | }
48 |
49 | handleCancel(event) {
50 | event.preventDefault();
51 | this.messageService.notifyClose();
52 | }
53 |
54 | handleSuccess(event) {
55 | event.preventDefault();
56 | this.messageService.notifySuccess('Successfully Updated');
57 | this._refreshViewAndClose();
58 | }
59 |
60 | _refreshViewAndClose() {
61 | if (this.uniqueBoundary) {
62 | this.messageService.publish({ key: 'refreshsoqldatatable' });
63 | } else {
64 | this.messageService.forceRefreshView();
65 | }
66 | this.messageService.notifyClose();
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableEditRowForm/baseDatatableEditRowForm.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableEditableCell/baseDatatableEditableCell.css:
--------------------------------------------------------------------------------
1 | .cell-dropdown {
2 | margin-top: -0.9rem;
3 | min-width: 18rem;
4 | }
5 | .hover-bg {
6 | background-color: white;
7 | }
8 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableEditableCell/baseDatatableEditableCell.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableExtension/baseDatatableExtension.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableExtension/customFormula.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
46 |
47 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableExtension/customLookup.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
50 |
51 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableExtension/customName.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
49 |
50 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableExtension/customPicklist.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
47 |
48 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableFormulaCell/baseDatatableFormulaCell.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableFormulaCell/baseDatatableFormulaCell.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | import { LightningElement, api } from 'lwc';
34 |
35 | export default class BaseDatatableFormulaCell extends LightningElement {
36 | // LWC specific
37 | @api isHtmlFormula;
38 |
39 | // Defaults for custom data type
40 | @api value; // comes in from datatable as the value of the name field
41 | @api tableBoundary;
42 | @api rowKeyAttribute;
43 | @api rowKeyValue;
44 | @api objectApiName;
45 | @api columnName;
46 | @api fieldApiName;
47 |
48 | // private
49 | _isRendered;
50 |
51 | get container() {
52 | return this.template.querySelector('.container');
53 | }
54 |
55 | renderedCallback() {
56 | if (this._isRendered) {
57 | return;
58 | }
59 | this._isRendered = true;
60 | if (this.isHtmlFormula && this.value) {
61 | // We want to specifically target the inner html here, ignore the linter
62 | // eslint-disable-next-line @lwc/lwc/no-inner-html
63 | this.container.innerHTML = this.value;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableFormulaCell/baseDatatableFormulaCell.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableLookupCell/baseDatatableLookupCell.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableNameCell/baseDatatableNameCell.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableNameCell/baseDatatableNameCell.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | import { LightningElement, api } from 'lwc';
34 |
35 | export default class BaseDatatableNameCell extends LightningElement {
36 | // Properties specific to this cell type
37 | @api
38 | get href() {
39 | if (!this.value) {
40 | return null;
41 | }
42 | if (this._href) {
43 | return this._href;
44 | }
45 | if (this.value.startsWith('/')) {
46 | return this.value;
47 | }
48 | return `/${this.value}`;
49 | }
50 | set href(value) {
51 | this._href = value && value.startsWith('/') ? value : `/${value}`;
52 | }
53 | @api target = '_parent';
54 |
55 | // Required properties for datatable-edit-cell
56 | @api value; // comes in from datatable as the value of the name field
57 | @api tableBoundary;
58 | @api rowKeyAttribute;
59 | @api rowKeyValue;
60 | @api isEditable;
61 | @api objectApiName;
62 | @api columnName;
63 | @api fieldApiName;
64 | @api isCompoundName;
65 | }
66 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatableNameCell/baseDatatableNameCell.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseDatatablePicklistCell/baseDatatablePicklistCell.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseListbox/baseListbox.html:
--------------------------------------------------------------------------------
1 |
32 |
33 |
34 |
35 |
36 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseListbox/baseListbox.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, Justin Lyon
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * 1. Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * 2. Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * 3. Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | *
32 | */
33 | import { LightningElement, api } from 'lwc';
34 |
35 | export default class BaseListbox extends LightningElement {
36 | @api records;
37 | @api title;
38 | @api subtitle;
39 | @api iconName;
40 | @api activeId;
41 |
42 | @api
43 | selectItem(currentId) {
44 | const items = this.template.querySelectorAll('c-base-listbox-item');
45 | items.forEach(item => {
46 | item.selectItem(currentId);
47 | });
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseListbox/baseListbox.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 53.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-core/main/default/lwc/baseListboxItem/baseListboxItem.html:
--------------------------------------------------------------------------------
1 |
32 |
33 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/lwcAccountSelector/lwcAccountSelector.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Account Selector (LWC)
4 | 52.0
5 | true
6 |
7 | lightning__AppPage
8 |
9 |
10 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/lwcContactAddressForm/lwcContactAddressForm.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/lwcContactAddressForm/lwcContactAddressForm.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | import { LightningElement, api } from 'lwc';
34 | import { ShowToastEvent } from 'lightning/platformShowToastEvent';
35 |
36 | export default class LwcContactAddressForm extends LightningElement {
37 | @api boundary;
38 | @api contact;
39 |
40 | handleSuccess() {
41 | const messageService = this.template.querySelector('c-message-service');
42 | this.dispatchEvent(
43 | new ShowToastEvent({
44 | title: null,
45 | message: 'Updated Mailing Address Successfully.',
46 | variant: 'success'
47 | })
48 | );
49 | messageService.publish({ key: 'refreshcontacts' });
50 | messageService.notifyClose();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/lwcContactAddressForm/lwcContactAddressForm.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 52.0
4 | false
5 |
6 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/lwcContactDatatable/lwcContactDatatable.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
41 |
42 |
43 |
44 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/lwcContactDatatable/lwcContactDatatable.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contact Datatable (LWC)
4 | 52.0
5 | true
6 |
7 | lightning__AppPage
8 |
9 |
10 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/recordPagePublisher/recordPagePublisher.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/recordPagePublisher/recordPagePublisher.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, api } from 'lwc';
2 |
3 | export default class RecordPagePublisher extends LightningElement {
4 | @api recordId;
5 |
6 | get messageService() {
7 | return this.template.querySelector('c-message-service');
8 | }
9 |
10 | handleIncrementPub() {
11 | this.messageService.publish({ key: 'incrementfrompub' });
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/recordPagePublisher/recordPagePublisher.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Record Page Publisher
4 | 52.0
5 | true
6 |
7 | lightning__RecordPage
8 |
9 |
10 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/recordPageSubscriber/recordPageSubscriber.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {currentCount}
5 |
6 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/recordPageSubscriber/recordPageSubscriber.js:
--------------------------------------------------------------------------------
1 | import { LightningElement, api } from 'lwc';
2 |
3 | export default class RecordPageSubscriber extends LightningElement {
4 | @api recordId;
5 |
6 | currentCount = 0;
7 |
8 | handleIncrementSub() {
9 | // no event
10 | this.currentCount += 1;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/recordPageSubscriber/recordPageSubscriber.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Record Page Subscriber
4 | 52.0
5 | true
6 |
7 | lightning__RecordPage
8 |
9 |
10 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/soqlDatatableLauncherExample/soqlDatatableLauncherExample.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/soqlDatatableLauncherExample/soqlDatatableLauncherExample.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | import { LightningElement } from 'lwc';
34 | import { convertToSingleLineString } from 'c/baseUtils';
35 |
36 | export default class SoqlDatatableLauncherExample extends LightningElement {
37 | handleOpenDialog() {
38 | const query = convertToSingleLineString`
39 | SELECT Title, Name, Email, Account.Name, Account.Type
40 | FROM Contact
41 | LIMIT 5
42 | `;
43 | const dialogServicePayload = {
44 | method: 'bodyModalLarge',
45 | config: {
46 | auraId: 'soql-datatable-example',
47 | headerLabel: 'Dynamically Created SOQL Datatable',
48 | component: 'c:soqlDatatable',
49 | componentParams: {
50 | isRecordBind: false,
51 | recordId: this.recordId,
52 | queryString: query
53 | }
54 | }
55 | };
56 | this.template.querySelector('c-message-service').dialogService(dialogServicePayload);
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/soqlDatatableLauncherExample/soqlDatatableLauncherExample.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | SOQL Launched by LWC button Example
4 | 52.0
5 | true
6 |
7 | lightning__AppPage
8 |
9 |
10 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/soqlDatatableNavigationExample/soqlDatatableNavigationExample.html:
--------------------------------------------------------------------------------
1 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/soqlDatatableNavigationExample/soqlDatatableNavigationExample.js:
--------------------------------------------------------------------------------
1 | /**
2 | * BSD 3-Clause License
3 | *
4 | * Copyright (c) 2020, james@sparkworks.io
5 | * All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions are met:
9 | *
10 | * - Redistributions of source code must retain the above copyright notice, this
11 | * list of conditions and the following disclaimer.
12 | *
13 | * - Redistributions in binary form must reproduce the above copyright notice,
14 | * this list of conditions and the following disclaimer in the documentation
15 | * and/or other materials provided with the distribution.
16 | *
17 | * - Neither the name of the copyright holder nor the names of its
18 | * contributors may be used to endorse or promote products derived from
19 | * this software without specific prior written permission.
20 | *
21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 | */
32 |
33 | import { LightningElement } from 'lwc';
34 | import { NavigationMixin } from 'lightning/navigation';
35 | import { fetchTableCache } from 'c/tableService';
36 |
37 | export default class SoqlDatatableNavigationExample extends NavigationMixin(LightningElement) {
38 | // private
39 | _accountId;
40 |
41 | async connectedCallback() {
42 | const data = await fetchTableCache({ queryString: 'SELECT Id FROM Account ORDER BY Id ASC LIMIT 1' });
43 | this._accountId = data.tableData[0].Id;
44 | }
45 |
46 | handleNavigation() {
47 | this[NavigationMixin.Navigate]({
48 | type: 'standard__app',
49 | attributes: {
50 | appTarget: 'c__LWC_Utils_Console',
51 | pageRef: {
52 | type: 'standard__recordPage',
53 | attributes: {
54 | recordId: `${this._accountId}`,
55 | actionName: 'view'
56 | }
57 | }
58 | }
59 | });
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/soqlDatatableNavigationExample/soqlDatatableNavigationExample.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Navigate to any Account Record
4 | 52.0
5 | true
6 |
7 | lightning__AppPage
8 |
9 |
10 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/workspaceApiExamples/workspaceApiExamples.html:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
23 |
24 |
25 |
26 |
31 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/lwc/workspaceApiExamples/workspaceApiExamples.js-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Worksapce API Examples
4 | 52.0
5 | true
6 |
7 | lightning__HomePage
8 |
9 |
10 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/objects/Account/Account.object-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | View
5 | Action override created by Lightning App Builder during activation.
6 | Account_Record_Page
7 | Large
8 | false
9 | Flexipage
10 |
11 | SYSTEM
12 |
13 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/objects/Contact/fields/Account_Information__c.field-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Account_Information__c
4 | false
5 | 'Industry: '+ TEXT(Account.Industry) + ' | State: ' + Account.BillingState
6 |
7 | false
8 | false
9 | Text
10 | false
11 |
12 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/profiles/Admin.profile-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | LWC_Utils
5 | true
6 | true
7 |
8 |
9 | LWC_Utils_Console
10 | false
11 | true
12 |
13 |
14 | CalculateFormulas
15 | true
16 |
17 |
18 | CalculateFormulasTests
19 | true
20 |
21 |
22 | DataServiceCtrl
23 | true
24 |
25 |
26 | DataTableService
27 | true
28 |
29 |
30 | DataTableServiceTests
31 | true
32 |
33 |
34 | LookupAuraService
35 | true
36 |
37 |
38 | LookupAuraServiceTests
39 | true
40 |
41 | false
42 |
43 | false
44 | Contact.Account_Information__c
45 | true
46 |
47 |
48 | Datatable_Action_Config__mdt-Datatable Action Config Layout
49 |
50 |
51 | Datatable_Lookup_Config__mdt-Datatable Lookup Config Layout
52 |
53 |
54 | Datatable_Config__mdt-Datatable Config Layout
55 |
56 |
57 | Collection_Datatable
58 | DefaultOn
59 |
60 |
61 | Aggregate_SOQL_Datatable
62 | DefaultOn
63 |
64 |
65 | SOQL_Datatable
66 | DefaultOn
67 |
68 |
69 | Sample_App_Aura
70 | DefaultOn
71 |
72 |
73 | Sample_App_LWC
74 | DefaultOn
75 |
76 | Salesforce
77 |
78 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/tabs/Aggregate_SOQL_Datatable.tab-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Aggregate_SOQL_Datatable
4 |
5 | Custom47: Chess piece
6 |
7 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/tabs/Collection_Datatable.tab-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Created by Lightning App Builder
4 | Collection_Datatable
5 |
6 | Custom72: Helicopter
7 |
8 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/tabs/SOQL_Datatable.tab-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Created by Lightning App Builder
4 | SOQL_Datatable
5 |
6 | Custom57: Building Block
7 |
8 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/tabs/Sample_App_Aura.tab-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Sample_App_Aura
4 |
5 | Custom56: Bottle
6 |
7 |
--------------------------------------------------------------------------------
/utils-recipes/main/default/tabs/Sample_App_LWC.tab-meta.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Sample app in LWC
4 | Sample_App_LWC
5 |
6 | Custom8: Diamond
7 |
8 |
--------------------------------------------------------------------------------