From 12dd8b3ec3ad806473fed45ab1d7549ab9906fe0 Mon Sep 17 00:00:00 2001 From: Andy Haas Date: Fri, 17 Feb 2023 12:39:01 -0600 Subject: [PATCH] new flowRadioButton Group --- .../fsc_flowRadioButtonGroup/.forceignore | 15 ++++++++ .../fsc_flowRadioButtonGroup.test.js | 25 +++++++++++++ .../fsc_flowRadioGroup.html | 37 +++++++++++++++++++ .../fsc_flowRadioGroup/fsc_flowRadioGroup.js | 20 ++++++++++ .../fsc_flowRadioGroup.js-meta.xml | 5 +++ .../sfdx-project.json | 19 ++++++++++ 6 files changed, 121 insertions(+) create mode 100644 flow_screen_components/fsc_flowRadioButtonGroup/.forceignore create mode 100644 flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/__tests__/fsc_flowRadioButtonGroup.test.js create mode 100644 flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.html create mode 100644 flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.js create mode 100644 flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.js-meta.xml create mode 100644 flow_screen_components/fsc_flowRadioButtonGroup/sfdx-project.json diff --git a/flow_screen_components/fsc_flowRadioButtonGroup/.forceignore b/flow_screen_components/fsc_flowRadioButtonGroup/.forceignore new file mode 100644 index 000000000..4c0adf5b7 --- /dev/null +++ b/flow_screen_components/fsc_flowRadioButtonGroup/.forceignore @@ -0,0 +1,15 @@ +# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status +# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm +# + +package.xml + +# LWC configuration files +**/jsconfig.json +**/.eslintrc.json +./.sfdx +./.sf +./config + +# LWC Jest +**/__tests__/** \ No newline at end of file diff --git a/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/__tests__/fsc_flowRadioButtonGroup.test.js b/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/__tests__/fsc_flowRadioButtonGroup.test.js new file mode 100644 index 000000000..a0acbd3dd --- /dev/null +++ b/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/__tests__/fsc_flowRadioButtonGroup.test.js @@ -0,0 +1,25 @@ +import { createElement } from 'lwc'; +import Fsc_flowRadioButtonGroup from 'c/fsc_flowRadioButtonGroup'; + +describe('c-fsc-flow-radio-button-group', () => { + afterEach(() => { + // The jsdom instance is shared across test cases in a single file so reset the DOM + while (document.body.firstChild) { + document.body.removeChild(document.body.firstChild); + } + }); + + it('TODO: test case generated by CLI command, please fill in test logic', () => { + // Arrange + const element = createElement('c-fsc-flow-radio-button-group', { + is: Fsc_flowRadioButtonGroup + }); + + // Act + document.body.appendChild(element); + + // Assert + // const div = element.shadowRoot.querySelector('div'); + expect(1).toBe(1); + }); +}); \ No newline at end of file diff --git a/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.html b/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.html new file mode 100644 index 000000000..27b9a3b63 --- /dev/null +++ b/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.html @@ -0,0 +1,37 @@ + \ No newline at end of file diff --git a/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.js b/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.js new file mode 100644 index 000000000..5d6c5da1a --- /dev/null +++ b/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.js @@ -0,0 +1,20 @@ +import { LightningElement, api } from 'lwc'; + +export default class Fsc_flowRadioGroup extends LightningElement { + @api label; + @api name; + @api options; // [{label: 'Option 1', value: '1'}, {label: 'Option 2', value: '2'}] + @api type; // Radio or Button + @api fieldLevelHelp; + @api disabled; + @api required; + @api value; + + handleValueChange(event) { + this.dispatchEvent(new CustomEvent('valuechange', { + detail: { + newValue: event.target.value + } + })); + } +} \ No newline at end of file diff --git a/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.js-meta.xml b/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.js-meta.xml new file mode 100644 index 000000000..f8c5cb4a3 --- /dev/null +++ b/flow_screen_components/fsc_flowRadioButtonGroup/force-app/main/default/lwc/fsc_flowRadioGroup/fsc_flowRadioGroup.js-meta.xml @@ -0,0 +1,5 @@ + + + 56.0 + false + \ No newline at end of file diff --git a/flow_screen_components/fsc_flowRadioButtonGroup/sfdx-project.json b/flow_screen_components/fsc_flowRadioButtonGroup/sfdx-project.json new file mode 100644 index 000000000..c389bb207 --- /dev/null +++ b/flow_screen_components/fsc_flowRadioButtonGroup/sfdx-project.json @@ -0,0 +1,19 @@ +{ + "packageDirectories": [ + { + "path": "force-app", + "default": true, + "package": "Flow Radio Button Group for CPE", + "versionName": "ver 0.1", + "versionNumber": "0.1.0.NEXT", + "versionDescription": "" + } + ], + "name": "fsc_flowRadioButtonGroup", + "namespace": "", + "sfdcLoginUrl": "https://login.salesforce.com", + "sourceApiVersion": "56.0", + "packageAliases": { + "Flow Radio Button Group for CPE": "0Ho5e000000wkSFCAY" + } +} \ No newline at end of file