├── .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 | 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 | 47 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/baseDatatableExtension/customLookup.html: -------------------------------------------------------------------------------- 1 | 34 | 35 | 51 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/baseDatatableExtension/customName.html: -------------------------------------------------------------------------------- 1 | 34 | 35 | 50 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/baseDatatableExtension/customPicklist.html: -------------------------------------------------------------------------------- 1 | 34 | 35 | 48 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/baseDatatableFormulaCell/baseDatatableFormulaCell.html: -------------------------------------------------------------------------------- 1 | 34 | 35 | 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 | 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 | 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 | 44 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/baseListboxItem/baseListboxItem.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 BaseListboxItem extends LightningElement { 36 | @api record; 37 | @api title; 38 | @api subtitle; 39 | @api iconName; 40 | @api activeId; 41 | 42 | @api 43 | selectItem(currentId) { 44 | if (this.isActive || currentId === this.record.Id) this.clickRecord(); 45 | } 46 | 47 | get label() { 48 | return this.record[this.title]; 49 | } 50 | get subLabel() { 51 | return this.record[this.subtitle]; 52 | } 53 | get isActive() { 54 | return this.activeId === this.record.Id; 55 | } 56 | 57 | get itemClasses() { 58 | const classes = [ 59 | 'slds-media', 60 | 'slds-listbox__option', 61 | 'slds-listbox__option_entity', 62 | 'slds-listbox__option_has-meta' 63 | ]; 64 | 65 | if (this.isActive) { 66 | classes.push('slds-has-focus'); 67 | } 68 | 69 | return classes.join(' '); 70 | } 71 | 72 | clickRecord() { 73 | const payload = { 74 | detail: { 75 | selectedRecordId: this.record.Id 76 | }, 77 | bubbles: true, 78 | composed: true 79 | }; 80 | this.dispatchEvent(new CustomEvent('selected', payload)); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/baseListboxItem/baseListboxItem.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/baseLookup/baseLookup.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/basePicklist/basePicklist.html: -------------------------------------------------------------------------------- 1 | 32 | 44 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/basePicklist/basePicklist.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/baseUtils/baseUtils.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/collectionDatatable/collectionDatatable.html: -------------------------------------------------------------------------------- 1 | 34 | 35 | 63 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/csvDatatable/csvDatatable.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | true 5 | CSV Datatable 6 | Use a CSV to create an editable list view. 7 | 8 | lightning__AppPage 9 | lightning__RecordPage 10 | lightning__HomePage 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/dialogAutoCloser/dialogAutoCloser.html: -------------------------------------------------------------------------------- 1 | 34 | 35 | 45 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/dialogAutoCloser/dialogAutoCloser.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | true 5 | Dialog Auto Close 6 | Auto closes dialog after a specified amount of time 7 | 8 | lightning__FlowScreen 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/empApi/empApi.css: -------------------------------------------------------------------------------- 1 | :host { 2 | display: none; 3 | } 4 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/empApi/empApi.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/eventPublisher/eventPublisher.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/eventPublisher/eventPublisher.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api } from 'lwc'; 2 | 3 | export default class EventPublisher extends LightningElement { 4 | @api uniqueBoundary; 5 | @api eventKey; 6 | @api eventValue; 7 | 8 | get messageService() { 9 | return this.template.querySelector('c-message-service'); 10 | } 11 | 12 | // private 13 | _isRendered; 14 | 15 | renderedCallback() { 16 | if (this._isRendered) { 17 | return; 18 | } 19 | this._isRendered = true; 20 | if (this.eventKey) { 21 | this.messageService.publish({ key: this.eventKey, value: this.eventValue }); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/eventPublisher/eventPublisher.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | true 5 | Event Publisher 6 | Send an event via MessageService when this component loads into a Flow Screen 7 | 8 | lightning__FlowScreen 9 | 10 | 11 | 12 | 19 | 27 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/fuseBasic/fuseBasic.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/luxon/luxon.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/messageService/messageService.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/singleton/singleton.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 | let isCreating = false; 34 | let isMessaging = false; 35 | 36 | export const setIsCreatingModal = value => { 37 | isCreating = value; 38 | }; 39 | 40 | export const getIsCreatingModal = () => isCreating; 41 | 42 | export const setIsMessaging = value => { 43 | isMessaging = value; 44 | }; 45 | 46 | export const getIsMessaging = () => isMessaging; 47 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/singleton/singleton.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/tableService/tableService.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/lwc/tableServiceUtils/tableServiceUtils.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 53.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-core/main/default/messageChannels/OpenChannel.messageChannel-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | OpenChannel 4 | true 5 | This channel is used for generic eventing. 6 | 7 | boundary 8 | Optional boundary which acts like a namespace for events 9 | 10 | 11 | key 12 | Generic key, usually an event name 13 | 14 | 15 | value 16 | Generic value, usually a payload 17 | 18 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/Datatable_Action_Config__mdt.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Table and Row action configurations for Datatable_Config__mdt 4 | 5 | Datatable Action Config 6 | Public 7 | 8 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/Button_Label__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Button_Label__c 4 | false 5 | SubscriberControlled 6 | 7 | 50 8 | true 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/Datatable_Config__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Datatable_Config__c 4 | false 5 | SubscriberControlled 6 | 7 | Datatable_Config__mdt 8 | Datatable Action Config 9 | Datatable_Action_Config 10 | true 11 | MetadataRelationship 12 | false 13 | 14 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/Dialog_Size__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dialog_Size__c 4 | false 5 | SubscriberControlled 6 | 7 | true 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | Normal 15 | true 16 | 17 | 18 | 19 | Large 20 | false 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/Flow_API_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Flow_API_Name__c 4 | false 5 | SubscriberControlled 6 | 7 | 255 8 | false 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/LWC_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | LWC_Name__c 4 | false 5 | SubscriberControlled 6 | Aura format, c:myAwesomeComponent 7 | 8 | 255 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/Order__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Order__c 4 | false 5 | SubscriberControlled 6 | For Table / Overflow actions, determines order at top of table. Table can be 1 or 2. Overflow can be >= 3. 7 | 8 | For Row Actions, determines order which the action shows up per row, in each row's dropdown menu. 9 | 10 | 2 11 | false 12 | 0 13 | Number 14 | false 15 | 16 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/Overflow_Action_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Overflow_Action_Name__c 4 | false 5 | SubscriberControlled 6 | Used when Type = 'Overflow Table Action'. Defines overflow actions for single/multi row actions at the top of the table. 7 | 8 | false 9 | Picklist 10 | 11 | true 12 | 13 | false 14 | 15 | custom_lwc 16 | false 17 | 18 | 19 | 20 | custom_flow 21 | false 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/Row_Action_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Row_Action_Name__c 4 | false 5 | SubscriberControlled 6 | Used when Type = 'Row Action'. Defines the actions for an individual row in the table. 7 | 8 | false 9 | Picklist 10 | 11 | true 12 | 13 | false 14 | 15 | edit_row 16 | false 17 | 18 | 19 | 20 | delete_row 21 | false 22 | 23 | 24 | 25 | custom_flow 26 | false 27 | 28 | 29 | 30 | custom_lwc 31 | false 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/Table_Action_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Table_Action_Name__c 4 | false 5 | SubscriberControlled 6 | Used when Type = 'Table Action'. Defines the actions for single/multi select at the top of the table. 7 | 8 | false 9 | Picklist 10 | 11 | true 12 | 13 | false 14 | 15 | custom_lwc 16 | false 17 | 18 | 19 | 20 | custom_flow 21 | false 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/fields/Type__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Type__c 4 | false 5 | SubscriberControlled 6 | Table actions are single / multi row above the table. 7 | 8 | Overflow actions are single / multi row dropdown actions above the table. 9 | 10 | Row Actions are dropdown actions on the far right for each individual row. 11 | 12 | true 13 | Picklist 14 | 15 | true 16 | 17 | false 18 | 19 | Table Action 20 | false 21 | 22 | 23 | 24 | Table Overflow Action 25 | false 26 | 27 | 28 | 29 | Row Action 30 | false 31 | 32 | 33 | 34 | Flow Table Action - Primary 35 | false 36 | 37 | 38 | 39 | Flow Table Action - Secondary 40 | false 41 | 42 | 43 | 44 | LWC Table Action - Primary 45 | false 46 | 47 | 48 | 49 | LWC Table Action - Secondary 50 | false 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/listViews/All_Configs.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All_Configs 4 | MasterLabel 5 | DeveloperName 6 | Datatable_Config__c 7 | Type__c 8 | Order__c 9 | Table_Action_Name__c 10 | Overflow_Action_Name__c 11 | Row_Action_Name__c 12 | Button_Label__c 13 | Flow_API_Name__c 14 | LWC_Name__c 15 | Dialog_Size__c 16 | Everything 17 | 18 | 19 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/validationRules/Require_api_name_for_custom_flow_action.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_api_name_for_custom_flow_action 4 | true 5 | ( 6 | ISBLANK( Flow_API_Name__c ) && ISPICKVAL( Table_Action_Name__c, 'custom_flow') 7 | ) 8 | || 9 | ( 10 | ISBLANK( Flow_API_Name__c ) && ISPICKVAL( Overflow_Action_Name__c, 'custom_flow') 11 | ) 12 | || 13 | ( 14 | ISBLANK( Flow_API_Name__c ) && ISPICKVAL( Row_Action_Name__c, 'custom_flow') 15 | ) 16 | Flow_API_Name__c 17 | Required for 'custom_flow' actions 18 | 19 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/validationRules/Require_api_name_for_custom_lwc_action.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_api_name_for_custom_lwc_action 4 | true 5 | ( 6 | ISBLANK( LWC_Name__c ) && ISPICKVAL( Table_Action_Name__c, 'custom_lwc') 7 | ) 8 | || 9 | ( 10 | ISBLANK( LWC_Name__c ) && ISPICKVAL( Overflow_Action_Name__c, 'custom_lwc') 11 | ) 12 | || 13 | ( 14 | ISBLANK( LWC_Name__c ) && ISPICKVAL( Row_Action_Name__c, 'custom_lwc') 15 | ) 16 | LWC_Name__c 17 | Required for 'custom_lwc' actions 18 | 19 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/validationRules/Require_api_name_for_table_action_old.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_api_name_for_table_action_old 4 | true 5 | ( 6 | CONTAINS( TEXT( Type__c ), 'Flow Table Action' ) 7 | && 8 | ISBLANK( Flow_API_Name__c ) 9 | ) 10 | || 11 | ( 12 | CONTAINS( TEXT( Type__c ), 'LWC Table Action' ) 13 | && 14 | ISBLANK( LWC_Name__c ) 15 | ) 16 | Type__c 17 | LWC Name or Flow API Name is required for Table Action 18 | 19 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/validationRules/Require_order_for_overflow_actions.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_order_for_overflow_actions 4 | true 5 | CONTAINS(LOWER(TEXT(Type__c)), 'overflow') 6 | && 7 | ( 8 | ISBLANK( Order__c ) 9 | || Order__c < 3 10 | ) 11 | Order__c 12 | Required for Overflow actions. Must be >= 3 13 | 14 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/validationRules/Require_order_for_row_actions.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_order_for_row_actions 4 | true 5 | CONTAINS(LOWER(TEXT(Type__c)), 'row') 6 | && 7 | ISBLANK( Order__c ) 8 | Order__c 9 | Required for Row Actions 10 | 11 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/validationRules/Require_order_for_table_actions.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_order_for_table_actions 4 | true 5 | Validate the new data model for table actions 6 | /* Only apply it to the new datamodel */ 7 | CONTAINS(LOWER(TEXT(Type__c)), 'table') 8 | && 9 | NOT(CONTAINS(LOWER(TEXT(Type__c)), 'primary')) 10 | && 11 | NOT(CONTAINS(LOWER(TEXT(Type__c)), 'secondary')) 12 | && 13 | NOT(CONTAINS(LOWER(TEXT(Type__c)), 'overflow')) 14 | && 15 | 16 | /* For some reason, converting to text works better for this */ 17 | TEXT( Order__c ) != '1' 18 | && 19 | TEXT( Order__c ) != '2' 20 | Order__c 21 | Required for Table actions. Must be 1 or 2 22 | 23 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/validationRules/Require_overflow_action_name.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_overflow_action_name 4 | true 5 | CONTAINS(LOWER(TEXT( Type__c )), 'overflow') 6 | && 7 | ISBLANK(TEXT( Overflow_Action_Name__c )) 8 | Overflow_Action_Name__c 9 | Required for Overflow actions 10 | 11 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/validationRules/Require_row_action_name.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_row_action_name 4 | true 5 | CONTAINS(LOWER(TEXT( Type__c )), 'row') 6 | && 7 | ISBLANK(TEXT( Row_Action_Name__c )) 8 | Row_Action_Name__c 9 | Required for Row actions 10 | 11 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Action_Config__mdt/validationRules/Require_table_action_name.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_table_action_name 4 | true 5 | CONTAINS(LOWER(TEXT( Type__c )), 'table') 6 | && 7 | NOT(CONTAINS(LOWER(TEXT( Type__c )), 'overflow')) 8 | && 9 | ISBLANK(TEXT( Table_Action_Name__c )) 10 | Table_Action_Name__c 11 | Required for Table Actions 12 | 13 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Column_Config__mdt/Datatable_Column_Config__mdt.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Column property fine tuning for Datatable_Config__mdt. This overrides all other column properties set in other ways. 4 | 5 | Datatable Column Config 6 | Public 7 | 8 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Column_Config__mdt/fields/Column_Field_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Column_Field_Name__c 4 | false 5 | SubscriberControlled 6 | This is the fieldName of the column per the lightning-datatable documentation 7 | 8 | 255 9 | true 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Column_Config__mdt/fields/Column_Properties_JSON__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Column_Properties_JSON__c 4 | false 5 | SubscriberControlled 6 | Must be in the following sample format: 7 | 8 | { 9 | "typeAttributes": { 10 | "currencyCode": { 11 | "fieldName": "CurrencyISO__c" 12 | }, 13 | "step": 0.0001 14 | }, 15 | "initialWidth": 100 16 | } 17 | 18 | 131072 19 | LongTextArea 20 | 50 21 | 22 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Column_Config__mdt/fields/Datatable_Config__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Datatable_Config__c 4 | false 5 | SubscriberControlled 6 | 7 | Datatable_Config__mdt 8 | Play Datatable Column Config 9 | Datatable_Column_Config1 10 | true 11 | MetadataRelationship 12 | false 13 | 14 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Column_Config__mdt/listViews/All_Configs.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All_Configs 4 | MasterLabel 5 | DeveloperName 6 | Datatable_Config__c 7 | Column_Field_Name__c 8 | Column_Properties_JSON__c 9 | Everything 10 | 11 | 12 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Config__mdt/Datatable_Config__mdt.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Configuration options for c-base-datatable / c-soql-datatable. 4 | 5 | This defines whether one or more of the following are configured: Actions; Lookups; and/or Columns. 6 | 7 | Datatable Config 8 | Public 9 | 10 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Config__mdt/fields/Has_Actions_Config__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Has_Actions_Config__c 4 | false 5 | Migrate from old Type__c to these checkboxes 6 | false 7 | SubscriberControlled 8 | 9 | Checkbox 10 | 11 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Config__mdt/fields/Has_Columns_Config__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Has_Columns_Config__c 4 | false 5 | Migrate from old Type__c to these checkboxes 6 | false 7 | SubscriberControlled 8 | 9 | Checkbox 10 | 11 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Config__mdt/fields/Has_Lookups_Config__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Has_Lookups_Config__c 4 | false 5 | Migrate from old Type__c to these checkboxes 6 | false 7 | SubscriberControlled 8 | 9 | Checkbox 10 | 11 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Config__mdt/fields/Type__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Type__c 4 | false 5 | SubscriberControlled 6 | Deprecated - please use the "Has XXXX" checkboxes instead 7 | 8 | 255 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Config__mdt/listViews/All_Configs.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All_Configs 4 | MasterLabel 5 | DeveloperName 6 | Has_Actions_Config__c 7 | Has_Lookups_Config__c 8 | Has_Columns_Config__c 9 | Type__c 10 | Everything 11 | 12 | 13 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Config__mdt/validationRules/Require_exact_actions_or_lookups_text.validationRule-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Require_exact_actions_or_lookups_text 4 | false 5 | Deprecated in favor of Has [XXXX] checkboxes 6 | false 7 | Type__c 8 | Deprecated in favor of Has [XXXX] checkboxes 9 | 10 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Lookup_Config__mdt/Datatable_Lookup_Config__mdt.object-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Configures what data shows up while using the customLookup data type inline editing. 4 | 5 | Datatable Lookup Config 6 | Public 7 | 8 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Lookup_Config__mdt/fields/Datatable_Config__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Datatable_Config__c 4 | false 5 | SubscriberControlled 6 | 7 | Datatable_Config__mdt 8 | Datatable Lookup Config 9 | Datatable_Lookup_Config 10 | true 11 | MetadataRelationship 12 | false 13 | 14 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Lookup_Config__mdt/fields/Icon_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Icon_Name__c 4 | 'standard:empty' 5 | Unfortunately, getting the actual object icon is resource intensive. So then, these are configured here instead. 6 | false 7 | SubscriberControlled 8 | The Lightning Design System name of the icon, such as standard:account, custom:custom6 etc. 9 | 10 | 255 11 | false 12 | Text 13 | false 14 | 15 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Lookup_Config__mdt/fields/Object_API_Name__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Object_API_Name__c 4 | false 5 | SubscriberControlled 6 | 7 | 255 8 | true 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Lookup_Config__mdt/fields/Subtitle_Field__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Subtitle_Field__c 4 | false 5 | SubscriberControlled 6 | Provides more context to the Title field, usually a field that gives more detailed information about the record being selected. 7 | 8 | 255 9 | false 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Lookup_Config__mdt/fields/Title_Field__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Title_Field__c 4 | false 5 | SubscriberControlled 6 | Usually the Name field. This is the field that displays as the primary "Title" of each item in the search box. 7 | 8 | 255 9 | true 10 | Text 11 | false 12 | 13 | -------------------------------------------------------------------------------- /utils-core/main/default/objects/Datatable_Lookup_Config__mdt/listViews/All_Configs.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All_Configs 4 | MasterLabel 5 | DeveloperName 6 | Datatable_Config__c 7 | Object_API_Name__c 8 | Title_Field__c 9 | Subtitle_Field__c 10 | Icon_Name__c 11 | Everything 12 | 13 | 14 | -------------------------------------------------------------------------------- /utils-core/main/default/staticresources/papa_parse_5_0_2.resource-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Public 4 | text/javascript 5 | 6 | -------------------------------------------------------------------------------- /utils-recipes/main/default/applications/LWC_Utils.app-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #0070D2 5 | false 6 | 7 | Examples from the repo 8 | Large 9 | false 10 | false 11 | 12 | Standard 13 | Sample_App_Aura 14 | Sample_App_LWC 15 | SOQL_Datatable 16 | Aggregate_SOQL_Datatable 17 | Collection_Datatable 18 | Lightning 19 | LWC_Utils_UtilityBar 20 | 21 | -------------------------------------------------------------------------------- /utils-recipes/main/default/applications/LWC_Utils_Console.app-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tab 5 | LWC_Utils_Console_Home 6 | Large 7 | false 8 | Flexipage 9 | standard-home 10 | 11 | 12 | #0070D2 13 | false 14 | 15 | Examples with console tabs and record flexipages 16 | Large 17 | false 18 | true 19 | 20 | Console 21 | all 22 | standard-home 23 | standard-Account 24 | standard-Contact 25 | Lightning 26 | LWC_Utils_Console_UtilityBar 27 | 28 | 29 | standard-Account 30 | 31 | 32 | AccountId 33 | standard-Contact 34 | 35 | 36 | standard-home 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/AccountSelector/AccountSelector.cmp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Top Accounts with Contacts 12 | 13 | 14 | 15 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/AccountSelector/AccountSelector.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Select from a limited set of Accounts 5 | 6 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/AccountSelector/AccountSelectorController.js: -------------------------------------------------------------------------------- 1 | ({ 2 | doInit: function (component, event, helper) { 3 | helper.service(component).fetchAccountCombobox( 4 | $A.getCallback((error, data) => { 5 | // This returns whatever datatype is specified in the controller 6 | if (!$A.util.isEmpty(data)) { 7 | component.set('v.topAccounts', data.items); 8 | } else { 9 | helper.messageService(component).notifySingleError('No Accounts in org!'); 10 | } 11 | }) 12 | ); 13 | }, 14 | handleAccountOptionSelected: function (component, event, helper) { 15 | const payload = { 16 | key: 'accountselected', 17 | value: event.getParam('value') 18 | }; 19 | helper.messageService(component).publish(payload); 20 | }, 21 | handleClearTableOnly: function (component, event, helper) { 22 | helper.messageService(component).publish({ key: 'cleartable' }); 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/AccountSelector/AccountSelectorHelper.js: -------------------------------------------------------------------------------- 1 | ({ 2 | service: function (component) { 3 | return component.find('service'); 4 | }, 5 | dialogService: function (component) { 6 | return component.find('dialogService'); 7 | }, 8 | messageService: function (component) { 9 | return component.find('messageService'); 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/CaseDatatable/CaseDatatable.cmp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/CaseDatatable/CaseDatatable.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | c:soqlDatatable representation of a Case standard object 5 | 6 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/CaseDatatable/CaseDatatableController.js: -------------------------------------------------------------------------------- 1 | ({ 2 | doInit: function (component, event, helper) { 3 | const contactRecordId = component.get('v.contactRecordId'); 4 | // prettier-ignore 5 | const queryString = 6 | 'SELECT ' + 7 | 'Id, CaseNumber, CreatedDate, ClosedDate, Description, Comments, Status, Subject, Type, Owner.Name ' + 8 | 'FROM Case ' + 9 | 'WHERE ContactId = \''+contactRecordId+'\'' + 10 | 'ORDER BY CaseNumber ASC'; 11 | component.set('v.queryString', queryString); 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/CaseDatatable/CaseDatatableHelper.js: -------------------------------------------------------------------------------- 1 | ({ 2 | tableService: function (component) { 3 | return component.find('tableService'); 4 | }, 5 | dialogService: function (component) { 6 | return component.find('dialogService'); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/ContactAddressForm/ContactAddressForm.cmp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/ContactAddressForm/ContactAddressForm.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Contact or ContactList address updating form 5 | 6 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/ContactAddressForm/ContactAddressForm.css: -------------------------------------------------------------------------------- 1 | .THIS { 2 | } 3 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/ContactAddressForm/ContactAddressFormController.js: -------------------------------------------------------------------------------- 1 | ({ 2 | doInit: function (component, event, helper) { 3 | let contactList = component.get('v.contactList'); 4 | if (contactList.length == 1) { 5 | component.set('v.singleContactListId', contactList[0].Id); 6 | } 7 | component.set('v.initComplete', true); 8 | }, 9 | handleUpdateMultiAddress: function (component, event, helper) { 10 | helper.updateMultiAddress(component); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/ContactAddressForm/ContactAddressFormHelper.js: -------------------------------------------------------------------------------- 1 | ({ 2 | service: function (component) { 3 | return component.find('service'); 4 | }, 5 | messageService: function (component) { 6 | return component.find('messageService'); 7 | }, 8 | updateMultiAddress: function (component) { 9 | let _self = this; 10 | let contactList = component.get('v.contactList'); 11 | let addressObject = component.find('mailing-address').get('v.value'); // contact mailing address is stored in key:value pairs. 12 | _self.service(component).updateMultiContactAddress( 13 | contactList, 14 | addressObject.MailingStreet, 15 | addressObject.MailingCity, 16 | addressObject.MailingState, 17 | addressObject.MailingPostalCode, 18 | addressObject.MailingCountry, 19 | $A.getCallback((error, data) => { 20 | if ($A.util.getBooleanValue(data)) { 21 | const accountId = contactList[0].AccountId; 22 | _self.messageService(component).notifySuccess('Updated Successfully'); 23 | _self.messageService(component).publish({ key: 'contactsupdated', value: accountId }); 24 | _self.messageService(component).notifyClose(); 25 | } else { 26 | if (!$A.util.isEmpty(error) && error[0].hasOwnProperty('message')) { 27 | _self.messageService(component).notifySingleError('Error Updating Contacts', error); 28 | } 29 | } 30 | }) 31 | ); 32 | } 33 | }); 34 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/ContactDatatable/ContactDatatable.cmp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 27 |
28 |
29 |
30 | 31 | 32 | 33 | 34 | 35 |
36 |
37 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/ContactDatatable/ContactDatatable.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Displays a list of Contacts and their Mailing Address info 5 | 6 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/ContactDatatable/ContactDatatableController.js: -------------------------------------------------------------------------------- 1 | ({ 2 | handleRowAction: function (component, event, helper) { 3 | let action = event.getParam('action'); 4 | let row = event.getParam('row'); 5 | switch (action.name) { 6 | case 'clear_address': 7 | helper.clearMailingAddressWithLightningDataService(component, row); 8 | break; 9 | case 'view_cases': 10 | helper.openViewCasesModal(component, row); 11 | break; 12 | } 13 | }, 14 | handleOpenUpdateAddressModal: function (component, event, helper) { 15 | let selectedArr = component.find('searchTable').getSelectedRows(); 16 | if ($A.util.isEmpty(selectedArr)) { 17 | helper.messageService(component).notifyInfo('Please choose at least one Contact.'); 18 | } else { 19 | const dialogServicePayload = { 20 | method: 'modal', 21 | config: { 22 | auraId: 'update-address-modal', 23 | headerLabel: 'Update Address: ' + selectedArr.length + ' Row(s)', 24 | component: 'c:ContactAddressForm', 25 | componentParams: { 26 | contactList: selectedArr 27 | }, 28 | mainActionReference: 'c.handleUpdateMultiAddress', 29 | mainActionLabel: 'Update' 30 | } 31 | }; 32 | helper.messageService(component).dialogService(dialogServicePayload); 33 | } 34 | }, 35 | handleAccountSelected: function (component, event, helper) { 36 | const value = event.getParam('value'); 37 | helper.loadContactTable(component, value); 38 | }, 39 | handleClearTable: function (component, event, helper) { 40 | component.set('v.tableData', null); 41 | } 42 | }); 43 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/DataService/DataService.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 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/DataService/DataService.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Contains methods shared across components, backed by Apex Controller 5 | 6 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/DataService/DataServiceController.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 | handleFetchAccountCombobox: function (component, event, helper) { 35 | let params = event.getParam('arguments'); 36 | let action = component.get('c.getAccountOptions'); 37 | helper.dispatchAction(component, action, params); 38 | }, 39 | handleFetchContactsByAccountId: function (component, event, helper) { 40 | let params = event.getParam('arguments'); 41 | let action = component.get('c.getContactsByAccountId'); 42 | action.setParams({ 43 | accountId: params.accountIdEventArg 44 | }); 45 | helper.dispatchAction(component, action, params); 46 | }, 47 | handleUpdateMultiContactAddress: function (component, event, helper) { 48 | let params = event.getParam('arguments'); 49 | let action = component.get('c.updateMultiContactAddress'); 50 | action.setParams({ 51 | conList: params.contactList, 52 | conStreet: params.contactMailingStreet, 53 | conCity: params.contactMailingCity, 54 | conState: params.contactMailingState, 55 | conZip: params.contactMailingZip, 56 | conCountry: params.contactMailingCountry 57 | }); 58 | helper.dispatchAction(component, action, params); 59 | } 60 | }); 61 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/DataService/DataServiceHelper.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 | dispatchAction: function (component, action, params) { 35 | action.setCallback(this, response => { 36 | if (response.getState() === 'SUCCESS') { 37 | params.callback(null, response.getReturnValue()); 38 | } else { 39 | params.callback(response.getError()); 40 | } 41 | }); 42 | $A.enqueueAction(action); 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/QuickUpdateService/QuickUpdateService.cmp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 35 | 36 | 37 | 38 | 39 | 40 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /utils-recipes/main/default/aura/QuickUpdateService/QuickUpdateService.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Leverages Lightning Data Service to perform quick single-object, single-record DMLs. 5 | 6 | -------------------------------------------------------------------------------- /utils-recipes/main/default/classes/DataServiceCtrl.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /utils-recipes/main/default/customMetadata/Datatable_Action_Config.Assign_New_Account_for_Contacts.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | Button_Label__c 7 | Assign New Account 8 | 9 | 10 | Datatable_Config__c 11 | LWC_Utils_SOQL_Datatable_tab 12 | 13 | 14 | Dialog_Size__c 15 | Normal 16 | 17 | 18 | Flow_API_Name__c 19 | SOQL_Datatable_Flow_Action_Update_Contacts_with_New_Account 20 | 21 | 22 | LWC_Name__c 23 | 24 | 25 | 26 | Order__c 27 | 1.0 28 | 29 | 30 | Overflow_Action_Name__c 31 | 32 | 33 | 34 | Row_Action_Name__c 35 | 36 | 37 | 38 | Table_Action_Name__c 39 | custom_flow 40 | 41 | 42 | Type__c 43 | Table Action 44 | 45 | 46 | -------------------------------------------------------------------------------- /utils-recipes/main/default/customMetadata/Datatable_Action_Config.Check_Opportunities_for_Contacts.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | Button_Label__c 7 | Check Opportunities 8 | 9 | 10 | Datatable_Config__c 11 | LWC_Utils_SOQL_Datatable_tab 12 | 13 | 14 | Dialog_Size__c 15 | Large 16 | 17 | 18 | Flow_API_Name__c 19 | 20 | 21 | 22 | LWC_Name__c 23 | c:checkOpportunitiesExample 24 | 25 | 26 | Order__c 27 | 2.0 28 | 29 | 30 | Overflow_Action_Name__c 31 | 32 | 33 | 34 | Row_Action_Name__c 35 | 36 | 37 | 38 | Table_Action_Name__c 39 | custom_lwc 40 | 41 | 42 | Type__c 43 | Table Action 44 | 45 | 46 | -------------------------------------------------------------------------------- /utils-recipes/main/default/customMetadata/Datatable_Action_Config.Check_Opportunities_for_Contacts_Row.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | Button_Label__c 7 | Check Opportunities 8 | 9 | 10 | Datatable_Config__c 11 | LWC_Utils_SOQL_Datatable_tab 12 | 13 | 14 | Dialog_Size__c 15 | Large 16 | 17 | 18 | Flow_API_Name__c 19 | 20 | 21 | 22 | LWC_Name__c 23 | c:checkOpportunitiesExample 24 | 25 | 26 | Order__c 27 | 3.0 28 | 29 | 30 | Row_Action_Name__c 31 | custom_lwc 32 | 33 | 34 | Type__c 35 | Row Action 36 | 37 | 38 | -------------------------------------------------------------------------------- /utils-recipes/main/default/customMetadata/Datatable_Action_Config.Delete_Contact.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | Button_Label__c 7 | Delete 8 | 9 | 10 | Datatable_Config__c 11 | LWC_Utils_SOQL_Datatable_tab 12 | 13 | 14 | Dialog_Size__c 15 | Normal 16 | 17 | 18 | Flow_API_Name__c 19 | 20 | 21 | 22 | LWC_Name__c 23 | 24 | 25 | 26 | Order__c 27 | 4.0 28 | 29 | 30 | Row_Action_Name__c 31 | delete_row 32 | 33 | 34 | Type__c 35 | Row Action 36 | 37 | 38 | -------------------------------------------------------------------------------- /utils-recipes/main/default/customMetadata/Datatable_Action_Config.Display_Account_Info_In_Loop.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | Button_Label__c 7 | Display Account Info 8 | 9 | 10 | Datatable_Config__c 11 | LWC_Utils_SOQL_Datatable_tab 12 | 13 | 14 | Dialog_Size__c 15 | Normal 16 | 17 | 18 | Flow_API_Name__c 19 | SOQL_Datatable_Flow_Overflow_Action_Display_Account_Info_Looped 20 | 21 | 22 | LWC_Name__c 23 | 24 | 25 | 26 | Order__c 27 | 3.0 28 | 29 | 30 | Overflow_Action_Name__c 31 | custom_flow 32 | 33 | 34 | Row_Action_Name__c 35 | 36 | 37 | 38 | Table_Action_Name__c 39 | 40 | 41 | 42 | Type__c 43 | Table Overflow Action 44 | 45 | 46 | -------------------------------------------------------------------------------- /utils-recipes/main/default/customMetadata/Datatable_Action_Config.Edit_Contact.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | false 7 | 8 | Button_Label__c 9 | Edit 10 | 11 | 12 | Datatable_Config__c 13 | LWC_Utils_SOQL_Datatable_tab 14 | 15 | 16 | Flow_API_Name__c 17 | 18 | 19 | 20 | Dialog_Size__c 21 | Normal 22 | 23 | 24 | Order__c 25 | 1.0 26 | 27 | 28 | Row_Action_Name__c 29 | edit_row 30 | 31 | 32 | Type__c 33 | Row Action 34 | 35 | 36 | -------------------------------------------------------------------------------- /utils-recipes/main/default/customMetadata/Datatable_Action_Config.Remove_Contact_Phone.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | false 7 | 8 | Button_Label__c 9 | Remove Phone 10 | 11 | 12 | Datatable_Config__c 13 | LWC_Utils_SOQL_Datatable_tab 14 | 15 | 16 | Flow_API_Name__c 17 | SOQL_Datatable_Flow_Row_Action_Remove_Contact_Phone 18 | 19 | 20 | Dialog_Size__c 21 | Normal 22 | 23 | 24 | Order__c 25 | 2.0 26 | 27 | 28 | Row_Action_Name__c 29 | custom_flow 30 | 31 | 32 | Type__c 33 | Row Action 34 | 35 | 36 | -------------------------------------------------------------------------------- /utils-recipes/main/default/customMetadata/Datatable_Config.LWC_Utils_SOQL_Datatable_tab.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | Type__c 7 | Actions; Lookups 8 | 9 | 10 | -------------------------------------------------------------------------------- /utils-recipes/main/default/customMetadata/Datatable_Lookup_Config.Account.md-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | 6 | Datatable_Config__c 7 | LWC_Utils_SOQL_Datatable_tab 8 | 9 | 10 | Icon_Name__c 11 | standard:account 12 | 13 | 14 | Object_API_Name__c 15 | Account 16 | 17 | 18 | Subtitle_Field__c 19 | Type 20 | 21 | 22 | Title_Field__c 23 | Name 24 | 25 | 26 | -------------------------------------------------------------------------------- /utils-recipes/main/default/flexipages/LWC_Utils_Console_Home.flexipage-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | decorate 8 | true 9 | 10 | 11 | richTextValue 12 | <p style="text-align: center;">Message Service Handler is placed here on the Home Page.</p><p style="text-align: center;"><br></p><p style="text-align: center;">It is also placed on each Record Flexipage that is opened by the tab controls here.</p> 13 | 14 | flexipage:richText 15 | 16 | 17 | 18 | 19 | 20 | customBoundary 21 | workspace_api_example 22 | 23 | MessageServiceHandler 24 | 25 | 26 | 27 | 28 | workspaceApiExamples 29 | 30 | 31 | main 32 | Region 33 | 34 | LWC Utils Console Home 35 | 38 | HomePage 39 | 40 | -------------------------------------------------------------------------------- /utils-recipes/main/default/flexipages/LWC_Utils_Console_UtilityBar.flexipage-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | utilityItems 5 | Region 6 | 7 | 8 | backgroundComponents 9 | Background 10 | 11 | LWC Utils Console UtilityBar 12 | 15 | UtilityBar 16 | 17 | -------------------------------------------------------------------------------- /utils-recipes/main/default/flexipages/LWC_Utils_UtilityBar.flexipage-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | eager 8 | decorator 9 | true 10 | 11 | 12 | height 13 | decorator 14 | 1 15 | 16 | 17 | icon 18 | decorator 19 | 20 | 21 | label 22 | decorator 23 | 24 | 25 | 26 | scrollable 27 | decorator 28 | true 29 | 30 | 31 | width 32 | decorator 33 | 1 34 | 35 | MessageServiceHandler 36 | 37 | 38 | utilityItems 39 | Region 40 | 41 | 42 | backgroundComponents 43 | Background 44 | 45 | LWC Utils UtilityBar 46 | 49 | UtilityBar 50 | 51 | -------------------------------------------------------------------------------- /utils-recipes/main/default/flexipages/Sample_App_Aura.flexipage-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | AccountSelector 7 | 8 | 9 | 10 | 11 | ContactDatatable 12 | 13 | 14 | region1 15 | Region 16 | 17 | 18 | region2 19 | Region 20 | 21 | 22 | region3 23 | Region 24 | 25 | Sample App (Aura) 26 | 29 | AppPage 30 | 31 | -------------------------------------------------------------------------------- /utils-recipes/main/default/flexipages/Sample_App_LWC.flexipage-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | lwcAccountSelector 7 | 8 | 9 | 10 | 11 | lwcContactDatatable 12 | 13 | 14 | main 15 | Region 16 | 17 | Sample App (LWC) 18 | 21 | AppPage 22 | 23 | -------------------------------------------------------------------------------- /utils-recipes/main/default/lwc/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@salesforce/eslint-config-lwc/recommended" 3 | } 4 | -------------------------------------------------------------------------------- /utils-recipes/main/default/lwc/checkOpportunitiesExample/checkOpportunitiesExample.html: -------------------------------------------------------------------------------- 1 | 34 | 35 | 47 | -------------------------------------------------------------------------------- /utils-recipes/main/default/lwc/checkOpportunitiesExample/checkOpportunitiesExample.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /utils-recipes/main/default/lwc/lwcAccountSelector/lwcAccountSelector.html: -------------------------------------------------------------------------------- 1 | 34 | 35 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | --------------------------------------------------------------------------------