@pega/custom-dx-components 0.23.19 → 0.23.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +35 -35
- package/src/constants.js +14 -3
- package/src/tasks/authenticate/helper.js +44 -32
- package/src/tasks/authenticate/index.js +4 -1
- package/src/tasks/build-all/index.js +1 -1
- package/src/tasks/{build → build-comp}/index.js +1 -1
- package/src/tasks/create/index.js +20 -7
- package/src/tasks/create/templates/Constellation/Field/Boolean/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/{boolean-format.js.mustache → boolean-format.ts.mustache} +2 -1
- package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/{index.jsx.mustache → index.tsx.mustache} +35 -9
- package/src/tasks/create/templates/Constellation/Field/Boolean/{mock.stories.js.mustache → mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/{DateTime/styles.js.mustache → Boolean/styles.ts.mustache} +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Date/{index.jsx.mustache → index.tsx.mustache} +82 -37
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/mock.stories.js → src/tasks/create/templates/Constellation/Field/Date/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/{Boolean/styles.js.mustache → Date/styles.ts.mustache} +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/{index.jsx.mustache → index.tsx.mustache} +64 -21
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/mock.stories.js → src/tasks/create/templates/Constellation/Field/DateTime/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/{Decimal-Currency/styles.js.mustache → DateTime/styles.ts.mustache} +1 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.ts +10 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/{index.jsx.mustache → index.tsx.mustache} +38 -8
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/mock.stories.js → src/tasks/create/templates/Constellation/Field/Decimal/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/{index.jsx.mustache → index.tsx.mustache} +50 -13
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.stories.js → src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/{Date/styles.js.mustache → Decimal-Currency/styles.ts.mustache} +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/{index.jsx.mustache → index.tsx.mustache} +37 -7
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/{mock.stories.js.mustache → mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/{index.jsx.mustache → index.tsx.mustache} +52 -10
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/mock.stories.js → src/tasks/create/templates/Constellation/Field/Integer/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/{index.jsx.mustache → index.tsx.mustache} +54 -14
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.stories.js → src/tasks/create/templates/Constellation/Field/Picklist/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.ts +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/PConnProps.d.ts +46 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/component-constants.js +5 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +115 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache +161 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.jsx.mustache +90 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache +310 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/format-constants.js.mustache +41 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +1238 -0
- package/src/tasks/create/templates/Constellation/Field/{Picklist/mock.stories.js.mustache → Picklist-Autocomplete/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.js.mustache +88 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.js.mustache +20 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.js.mustache +657 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.jsx.mustache +161 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +218 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/PConnProps.d.ts +46 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +113 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.jsx.mustache +85 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +243 -0
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.stories.js → src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.jsx.mustache +161 -0
- package/src/tasks/create/templates/Constellation/Field/Text/PConnProps.d.ts +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Text/{index.jsx.mustache → index.tsx.mustache} +17 -5
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/mock.stories.js → src/tasks/create/templates/Constellation/Field/Text/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Text/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/PConnProps.d.ts +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/{index.jsx.mustache → index.tsx.mustache} +30 -11
- package/src/tasks/create/templates/Constellation/Field/Text-Email/{mock.stories.js.mustache → mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.tsx +30 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/{index.jsx.mustache → index.tsx.mustache} +54 -30
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/mock.stories.js → src/tasks/create/templates/Constellation/Field/Text-Input/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/{index.jsx.mustache → index.tsx.mustache} +30 -12
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/mock.stories.js → src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/{index.jsx.mustache → index.tsx.mustache} +37 -15
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/{mock.stories.js.mustache → mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.ts.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/{index.jsx.mustache → index.tsx.mustache} +39 -10
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/mock.stories.js → src/tasks/create/templates/Constellation/Field/Text-URL/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +2 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/{TimeofDay → TimeOfDay}/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/{TimeofDay/index.jsx.mustache → TimeOfDay/index.tsx.mustache} +46 -15
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/mock.stories.js → src/tasks/create/templates/Constellation/Field/TimeOfDay/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/suggestions-handler.ts.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/{TimeofDay → TimeOfDay}/time-of-day.js.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Template/{DETAILS-region/StatusWork.jsx.mustache → DETAILS/StatusWork.tsx.mustache} +2 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +9 -7
- package/src/tasks/create/templates/Constellation/Template/{DETAILS-region/index.jsx.mustache → DETAILS/index.tsx.mustache} +22 -4
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/mock.stories.js → src/tasks/create/templates/Constellation/Template/DETAILS/mock.js.mustache} +3 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/{Field/Text-Input/StatusWork.jsx → Template/DETAILS-region/StatusWork.tsx.mustache} +2 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +4 -3
- package/src/tasks/create/templates/Constellation/Template/{DETAILS/index.jsx.mustache → DETAILS-region/index.tsx.mustache} +21 -4
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/{mock.stories.js.mustache → mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +0 -4
- package/src/tasks/create/templates/Constellation/Template/FORM/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +17 -12
- package/src/tasks/create/templates/Constellation/Template/FORM/{index.jsx.mustache → index.tsx.mustache} +11 -6
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/mock.stories.js → src/tasks/create/templates/Constellation/Template/FORM/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +8 -7
- package/src/tasks/create/templates/Constellation/Template/FORM-region/{index.jsx.mustache → index.tsx.mustache} +14 -2
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/mock.stories.js → src/tasks/create/templates/Constellation/Template/FORM-region/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/{GetNextWork.jsx.mustache → GetNextWork.tsx.mustache} +13 -5
- package/src/tasks/create/templates/Constellation/Template/PAGE/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Template/PAGE/{index.jsx.mustache → index.tsx.mustache} +18 -5
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/mock.stories.js → src/tasks/create/templates/Constellation/Template/PAGE/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +1 -3
- package/src/tasks/create/templates/Constellation/Widget/CASE/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Widget/CASE/{index.jsx.mustache → index.tsx.mustache} +19 -9
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/mock.stories.js → src/tasks/create/templates/Constellation/Widget/CASE/mock.js.mustache} +1 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE/{index.jsx.mustache → index.tsx.mustache} +14 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE/{mock.stories.js.mustache → mock.js.mustache} +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{Avatar.jsx.mustache → Avatar.tsx.mustache} +21 -9
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{Operator.jsx.mustache → Operator.tsx.mustache} +30 -8
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +4 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/{index.jsx.mustache → index.tsx.mustache} +25 -3
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/mock.stories.js → src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.ts.mustache +15 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.jsx.mustache +5 -2
- package/src/tasks/create/templates/Launchpad/Widget/CASE/index.jsx.mustache +0 -1
- package/src/tasks/create/templates/Launchpad/Widget/CASE/{mock.stories.js.mustache → mock.js.mustache} +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.js.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.jsx.mustache +2 -3
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.jsx.mustache +1 -1
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.jsx.mustache +4 -2
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.jsx.mustache +1 -1
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/mock.stories.js → src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/mock.js.mustache} +2 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.js.mustache +1 -0
- package/src/tasks/create-all/index.js +9 -1
- package/src/tasks/index.js +1 -1
- package/src/tasks/init/helper.js +0 -1
- package/src/tasks/init/index.js +31 -16
- package/src/tasks/init/template/.eslintrc.json +15 -10
- package/src/tasks/init/template/.storybook/main.js +12 -0
- package/src/tasks/init/template/.storybook/preview.js +14 -0
- package/src/tasks/init/template/package.json.mustache +36 -35
- package/src/tasks/publish/helper.js +34 -14
- package/src/tasks/publish/index.js +1 -1
- package/src/tasks/publish-all/helper.js +42 -16
- package/src/tasks/publish-all/index.js +1 -1
- package/src/tasks/revert-webpack/index.js +5 -7
- package/src/tasks/upgrade/index.js +1 -1
- package/src/util.js +68 -44
- package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.jsx +18 -9
- package/tests/assets/components/create/Pega_DXIL_MyTestText/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/component-constants.js +5 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/config.json +115 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/date.js +161 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/demo.stories.jsx +91 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/embed-utils.js +310 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/format-constants.js +41 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/index.jsx +1042 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/mock.js +69 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/picklist-utils.js +88 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-constants.js +20 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-utils.js +657 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/styles.js +15 -0
- package/{src/tasks/create/templates/Constellation/Field/Decimal-Currency → tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete}/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/utils.js +182 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/boolean-format.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.jsx +9 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.jsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.jsx +24 -11
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.jsx +0 -1
- package/{src/tasks/create/templates/Constellation/Widget/CASE/mock.stories.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/mock.js} +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.jsx +25 -11
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.jsx +2 -1
- package/{src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.stories.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.jsx +22 -8
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.jsx +1 -2
- package/{src/tasks/create/templates/Constellation/Field/Date/mock.stories.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-time.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.jsx +22 -8
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.jsx +1 -2
- package/{src/tasks/create/templates/Constellation/Field/DateTime/mock.stories.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.jsx +22 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.jsx +1 -1
- package/{src/tasks/create/templates/Constellation/Field/Decimal/mock.stories.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.jsx +4 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/{mock.stories.js → mock.js} +3 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/utils.js +2 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.jsx +1 -1
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyEmail/mock.stories.js → Constellation/Pega_DXIL_MyEmail/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.jsx +17 -20
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.jsx +22 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.jsx +2 -2
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyInteger/mock.stories.js → Constellation/Pega_DXIL_MyInteger/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.jsx +1 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.jsx +22 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.jsx +3 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/utils.js +1 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +2 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.jsx +2 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +24 -11
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.jsx +2 -0
- package/{src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/mock.stories.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.jsx +6 -6
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyPageWidget/mock.stories.js → Constellation/Pega_DXIL_MyPageWidget/mock.js} +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.jsx +1 -1
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyParagraph/mock.stories.js → Constellation/Pega_DXIL_MyParagraph/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.jsx +22 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.jsx +1 -1
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyPercentage/mock.stories.js → Constellation/Pega_DXIL_MyPercentage/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.jsx +22 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.jsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.jsx +3 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.js +69 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/config.json +113 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.jsx +91 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.jsx +218 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.js +69 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.js +15 -0
- package/{src/tasks/create/templates/Constellation/Field/Date → tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons}/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.jsx +18 -9
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyText/mock.stories.js → Constellation/Pega_DXIL_MyText/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.jsx +15 -15
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.jsx +22 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.jsx +1 -1
- package/{src/tasks/create/templates/Constellation/Field/Text-Input/mock.stories.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +20 -7
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.jsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +3 -3
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyTwoColumnDetails/mock.stories.js → Constellation/Pega_DXIL_MyTwoColumnDetails/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js +0 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +7 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.jsx +22 -9
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.jsx +1 -1
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyURL/mock.stories.js → Constellation/Pega_DXIL_MyURL/mock.js} +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.jsx +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/component-constants.js +5 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/config.json +115 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/date.js +161 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/demo.stories.jsx +89 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/embed-utils.js +310 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/format-constants.js +41 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/index.jsx +1042 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/mock.js +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/picklist-utils.js +88 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-constants.js +20 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-utils.js +657 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/styles.js +15 -0
- package/{src/tasks/create/templates/Constellation/Field/Decimal-Percentage → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete}/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/utils.js +182 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/boolean-format.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.jsx +9 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.jsx +23 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.jsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/{mock.stories.js → mock.js} +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.jsx +24 -11
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.jsx +2 -1
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyCurrency/mock.stories.js → Launchpad/Pega_DXIL_MyCurrency/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.jsx +22 -8
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.jsx +22 -8
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.jsx +1 -2
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDateTime/mock.stories.js → Launchpad/Pega_DXIL_MyDateTime/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.jsx +1 -1
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDecimal/mock.stories.js → Launchpad/Pega_DXIL_MyDecimal/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.jsx +6 -4
- package/{src/tasks/create/templates/Constellation/Template/DETAILS/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/mock.js} +3 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/utils.js +2 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.jsx +1 -1
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyEmail/mock.stories.js → Launchpad/Pega_DXIL_MyEmail/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.jsx +24 -22
- package/{src/tasks/create/templates/Constellation/Template/FORM/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.jsx +2 -2
- package/{src/tasks/create/templates/Constellation/Field/Integer/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.jsx +1 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.jsx +21 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.jsx +3 -2
- package/{src/tasks/create/templates/Constellation/Template/PAGE/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js +1 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +2 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +24 -13
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.jsx +1 -1
- package/{src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.jsx +5 -7
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyPageWidget/mock.stories.js → Launchpad/Pega_DXIL_MyPageWidget/mock.js} +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.jsx +1 -1
- package/{src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.jsx +1 -1
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyPercentage/mock.stories.js → Launchpad/Pega_DXIL_MyPercentage/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.jsx +21 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.jsx +3 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.js +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/config.json +113 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.jsx +89 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.jsx +218 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.js +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.js +15 -0
- package/{src/tasks/create/templates/Constellation/Field/DateTime → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons}/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.jsx +18 -9
- package/{src/tasks/create/templates/Constellation/Field/Text/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.jsx +15 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.jsx +21 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/{mock.stories.js → mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +19 -7
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.jsx +1 -1
- package/{src/tasks/create/templates/Constellation/Field/TimeofDay/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +5 -4
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyTwoColumnDetails/mock.stories.js → Launchpad/Pega_DXIL_MyTwoColumnDetails/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js +0 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +14 -12
- package/{src/tasks/create/templates/Constellation/Template/FORM-region/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.jsx +21 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.jsx +1 -1
- package/{src/tasks/create/templates/Constellation/Field/Text-URL/mock.stories.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/mock.js} +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/suggestions-handler.js +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.jsx +2 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +0 -18
- package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/suggestions-handler.js +0 -10
- package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.jsx.mustache +0 -26
- package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Widget/CASE/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.js.mustache +0 -14
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache +0 -14
- package/src/tasks/init/template/.storybook/main.cjs +0 -6
- package/src/tasks/init/template/.storybook/package.json +0 -1
- package/src/tasks/init/template/.storybook/preview.tsx +0 -44
- /package/src/tasks/{build → build-comp}/helper.js +0 -0
- /package/src/tasks/create/templates/Constellation/Field/{TimeofDay → TimeOfDay}/config.json.mustache +0 -0
- /package/{src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/event-utils.js} +0 -0
- /package/{src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/event-utils.js} +0 -0
- /package/{src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/event-utils.js} +0 -0
- /package/{src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/event-utils.js} +0 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
|
|
2
|
+
import { useRef, useState } from 'react';
|
|
3
|
+
|
|
4
|
+
export const formatExists = (formatterVal) => {
|
|
5
|
+
const formatterValues = ['TextInput', 'Email', 'Phone'];
|
|
6
|
+
let isformatter = false;
|
|
7
|
+
if (formatterValues.includes(formatterVal)) {
|
|
8
|
+
isformatter = true;
|
|
9
|
+
}
|
|
10
|
+
return isformatter;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const urlLabelVal = (urlLabelSelection, btnVal, urlLabel, propUrlLabel) => {
|
|
14
|
+
if ((urlLabel !== '' || propUrlLabel !== '') && btnVal !== null) {
|
|
15
|
+
switch (urlLabelSelection) {
|
|
16
|
+
case 'constant': {
|
|
17
|
+
btnVal = urlLabel;
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
case 'propertyRef': {
|
|
21
|
+
btnVal = propUrlLabel;
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
// no default
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return btnVal;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const isImage = (url) => /\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(url);
|
|
31
|
+
|
|
32
|
+
const TableImage = (imageProps) => {
|
|
33
|
+
const { value, altText, altTextOfImage, propaltTextOfImage, urlLabelSelection, urlLabel, propUrlLabel } = imageProps;
|
|
34
|
+
const demoButtonRef = useRef(null);
|
|
35
|
+
let imageDisplayComp = null;
|
|
36
|
+
const [images, setImages] = useState(null);
|
|
37
|
+
const imgDescription = {
|
|
38
|
+
id: 'url',
|
|
39
|
+
name: urlLabelSelection === 'constant' ? urlLabel : propUrlLabel,
|
|
40
|
+
description: altText === 'constant' ? altTextOfImage : propaltTextOfImage,
|
|
41
|
+
src: value
|
|
42
|
+
};
|
|
43
|
+
const onClick = () => {
|
|
44
|
+
setImages([imgDescription]);
|
|
45
|
+
};
|
|
46
|
+
const onItemDownload = async (id) => {
|
|
47
|
+
const a = document.createElement('a');
|
|
48
|
+
a.href = await fetch(images[0].src)
|
|
49
|
+
.then((response) => {
|
|
50
|
+
return response.blob();
|
|
51
|
+
})
|
|
52
|
+
.then((blob) => {
|
|
53
|
+
return URL.createObjectURL(blob);
|
|
54
|
+
});
|
|
55
|
+
a.download = images?.find((image) => image.id === id)?.name ?? id;
|
|
56
|
+
document.body.appendChild(a);
|
|
57
|
+
a.click();
|
|
58
|
+
document.body.removeChild(a);
|
|
59
|
+
};
|
|
60
|
+
let btnVal = value;
|
|
61
|
+
btnVal = urlLabelVal(urlLabelSelection, btnVal, urlLabel, propUrlLabel);
|
|
62
|
+
imageDisplayComp = (
|
|
63
|
+
<>
|
|
64
|
+
{btnVal !== null && (
|
|
65
|
+
<Button ref={demoButtonRef} variant='link' compact={false} onClick={onClick} autoFocus>
|
|
66
|
+
{btnVal}
|
|
67
|
+
</Button>
|
|
68
|
+
)}
|
|
69
|
+
{images && (
|
|
70
|
+
<Lightbox
|
|
71
|
+
items={images}
|
|
72
|
+
cycle={false}
|
|
73
|
+
onAfterClose={() => {
|
|
74
|
+
setImages(null);
|
|
75
|
+
demoButtonRef.current?.focus();
|
|
76
|
+
}}
|
|
77
|
+
onItemDownload={isImage(images[0].src) ? onItemDownload : undefined}
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
80
|
+
</>
|
|
81
|
+
);
|
|
82
|
+
return imageDisplayComp;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const textFormatter = (formatter, value) => {
|
|
86
|
+
let displayComponent = null;
|
|
87
|
+
switch (formatter) {
|
|
88
|
+
case 'TextInput': {
|
|
89
|
+
displayComponent = value;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case 'Email': {
|
|
93
|
+
displayComponent = <EmailDisplay value={value} displayText={value} variant='link' />;
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
case 'Phone': {
|
|
97
|
+
displayComponent = <PhoneDisplay value={value} variant='link' />;
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
// no default
|
|
101
|
+
}
|
|
102
|
+
return displayComponent;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Returns a URL display component based on the options
|
|
107
|
+
* @function urlFormatter
|
|
108
|
+
* @param {string} value value
|
|
109
|
+
* @param {object} options options for formatting
|
|
110
|
+
* { displayAs,tableDisplayAs,isTableFormatter,altText,altTextOfImage,propaltTextOfImage,urlLabelSelection, urlLabel,propUrlLabel, widthSel, customWidth}
|
|
111
|
+
*/
|
|
112
|
+
export const urlFormatter = (value, options) => {
|
|
113
|
+
const {
|
|
114
|
+
displayAs,
|
|
115
|
+
tableDisplayAs,
|
|
116
|
+
isTableFormatter,
|
|
117
|
+
altText,
|
|
118
|
+
altTextOfImage,
|
|
119
|
+
propaltTextOfImage,
|
|
120
|
+
urlLabelSelection,
|
|
121
|
+
urlLabel,
|
|
122
|
+
propUrlLabel,
|
|
123
|
+
widthSel,
|
|
124
|
+
customWidth
|
|
125
|
+
} = options;
|
|
126
|
+
|
|
127
|
+
let urlFormatComp = null;
|
|
128
|
+
if (
|
|
129
|
+
(displayAs === 'labelText' || (isTableFormatter && tableDisplayAs === 'link')) &&
|
|
130
|
+
(urlLabel !== '' || propUrlLabel !== '')
|
|
131
|
+
) {
|
|
132
|
+
urlFormatComp = (
|
|
133
|
+
<URLDisplay
|
|
134
|
+
target='_blank'
|
|
135
|
+
value={value}
|
|
136
|
+
displayText={urlLabelSelection === 'constant' ? urlLabel : propUrlLabel}
|
|
137
|
+
variant='link'
|
|
138
|
+
/>
|
|
139
|
+
);
|
|
140
|
+
} else if ((displayAs === 'Image' || tableDisplayAs === 'Image') && !!value) {
|
|
141
|
+
if (isTableFormatter) {
|
|
142
|
+
urlFormatComp = TableImage({
|
|
143
|
+
value,
|
|
144
|
+
altText,
|
|
145
|
+
altTextOfImage,
|
|
146
|
+
propaltTextOfImage,
|
|
147
|
+
urlLabelSelection,
|
|
148
|
+
urlLabel,
|
|
149
|
+
propUrlLabel
|
|
150
|
+
});
|
|
151
|
+
} else {
|
|
152
|
+
const width = widthSel === 'widthpx' ? customWidth : null;
|
|
153
|
+
urlFormatComp = (
|
|
154
|
+
<Image src={value} width={width} alt={altText === 'constant' ? altTextOfImage : propaltTextOfImage} />
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
} else {
|
|
158
|
+
urlFormatComp = <URLDisplay target='_blank' value={value} displayText={value} variant='link' />;
|
|
159
|
+
}
|
|
160
|
+
return urlFormatComp;
|
|
161
|
+
};
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import equal from 'fast-deep-equal';
|
|
3
|
+
import get from 'lodash.get';
|
|
4
|
+
|
|
5
|
+
import { getFieldNameFromEmbeddedFieldName } from './embed-utils.js';
|
|
6
|
+
|
|
7
|
+
import { buildColumnForDisplayValue, setValuesToPropertyList } from './index.jsx';
|
|
8
|
+
|
|
9
|
+
export function usePaginate() {
|
|
10
|
+
const paginatationProperties = useRef({
|
|
11
|
+
startIndex: 0,
|
|
12
|
+
endIndex: 50,
|
|
13
|
+
matchPosition: '',
|
|
14
|
+
totalRecords: []
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
// clean up on unmount
|
|
19
|
+
return () => {
|
|
20
|
+
paginatationProperties.current = null;
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
const getInitialPaginatedRecords = (totalRecords, matchPosition) => {
|
|
25
|
+
const initialPaginatedRecords = totalRecords.slice(0, 50);
|
|
26
|
+
paginatationProperties.current.startIndex = 0;
|
|
27
|
+
paginatationProperties.current.endIndex = 50;
|
|
28
|
+
paginatationProperties.current.matchPosition = matchPosition;
|
|
29
|
+
paginatationProperties.current.totalRecords = totalRecords;
|
|
30
|
+
return initialPaginatedRecords;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const positionMatches = (text, searchText) => {
|
|
34
|
+
switch (paginatationProperties.current.matchPosition) {
|
|
35
|
+
case 'start':
|
|
36
|
+
return text.toLowerCase().startsWith(searchText.toLowerCase());
|
|
37
|
+
case 'contains':
|
|
38
|
+
return text.toLowerCase().includes(searchText.toLowerCase());
|
|
39
|
+
default:
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const fetchData = (searchText, onScroll, columns = []) => {
|
|
45
|
+
let progressivePaginatedRecords;
|
|
46
|
+
paginatationProperties.current.startIndex += 50;
|
|
47
|
+
paginatationProperties.current.endIndex += 50;
|
|
48
|
+
|
|
49
|
+
if (searchText === '' || searchText === undefined || searchText === null) {
|
|
50
|
+
// paginate on entire resultset
|
|
51
|
+
progressivePaginatedRecords = paginatationProperties.current.totalRecords.slice(
|
|
52
|
+
paginatationProperties.current.startIndex,
|
|
53
|
+
paginatationProperties.current.endIndex
|
|
54
|
+
);
|
|
55
|
+
} else if (onScroll) {
|
|
56
|
+
// paginate on filtered resultset
|
|
57
|
+
progressivePaginatedRecords = paginatationProperties.current.filteredRecords.slice(
|
|
58
|
+
paginatationProperties.current.startIndex,
|
|
59
|
+
paginatationProperties.current.endIndex
|
|
60
|
+
);
|
|
61
|
+
} else {
|
|
62
|
+
const searchInSecondaryItem = columns.some((e) => e.secondary && e.useForSearch);
|
|
63
|
+
// Filter the items and paginate on filtered resultset
|
|
64
|
+
const filteredRecords = paginatationProperties.current.totalRecords.filter(
|
|
65
|
+
(filteritem) =>
|
|
66
|
+
(filteritem.primary && positionMatches(filteritem.primary, searchText)) ||
|
|
67
|
+
(searchInSecondaryItem &&
|
|
68
|
+
filteritem.secondary &&
|
|
69
|
+
filteritem.secondary.length > 0 &&
|
|
70
|
+
filteritem.secondary.find((item) => positionMatches(item, searchText)))
|
|
71
|
+
);
|
|
72
|
+
progressivePaginatedRecords = filteredRecords.slice(
|
|
73
|
+
paginatationProperties.current.startIndex,
|
|
74
|
+
paginatationProperties.current.endIndex
|
|
75
|
+
);
|
|
76
|
+
paginatationProperties.current.filteredRecords = filteredRecords;
|
|
77
|
+
}
|
|
78
|
+
return progressivePaginatedRecords;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const resetIndexes = () => {
|
|
82
|
+
paginatationProperties.current.startIndex = -50;
|
|
83
|
+
paginatationProperties.current.endIndex = 0;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const hasMoreResults = (searchText) => {
|
|
87
|
+
if (searchText === '' || searchText === undefined || searchText === null) {
|
|
88
|
+
return paginatationProperties.current.startIndex + 50 < paginatationProperties.current.totalRecords.length;
|
|
89
|
+
}
|
|
90
|
+
return paginatationProperties.current.startIndex + 50 < paginatationProperties.current.filteredRecords.length;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
getInitialPaginatedRecords,
|
|
95
|
+
fetchData,
|
|
96
|
+
resetIndexes,
|
|
97
|
+
hasMoreResults
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function useDeepMemo(memoFn, key) {
|
|
102
|
+
const ref = useRef();
|
|
103
|
+
if (!ref.current || !equal(key, ref.current.key)) {
|
|
104
|
+
ref.current = { key, value: memoFn() };
|
|
105
|
+
}
|
|
106
|
+
return ref.current.value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function useIsMount() {
|
|
110
|
+
const isMountRef = useRef(true);
|
|
111
|
+
useEffect(() => {
|
|
112
|
+
isMountRef.current = false;
|
|
113
|
+
}, []);
|
|
114
|
+
return isMountRef.current;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const transformSearchedItem = (displayResponseData, displayFieldMeta, columnsWithSetProperty, dataApiObj) => {
|
|
118
|
+
return displayResponseData.map((entry) => {
|
|
119
|
+
const secondaryArr = [];
|
|
120
|
+
const secondaryFieldValues = [];
|
|
121
|
+
displayFieldMeta.current.secondary.forEach((col) => {
|
|
122
|
+
if (!displayFieldMeta.hidden?.includes(col)) secondaryArr.push(entry[col]);
|
|
123
|
+
if (columnsWithSetProperty.includes(col)) {
|
|
124
|
+
if (dataApiObj.isQueryable) {
|
|
125
|
+
secondaryFieldValues.push(entry[col]);
|
|
126
|
+
} else {
|
|
127
|
+
secondaryFieldValues.push(get(entry, getFieldNameFromEmbeddedFieldName(col)));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
return {
|
|
132
|
+
id: entry[displayFieldMeta.current.key],
|
|
133
|
+
primary: entry[displayFieldMeta.current.primary],
|
|
134
|
+
secondary: secondaryArr,
|
|
135
|
+
secondaryFieldValues
|
|
136
|
+
};
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export const updatePropertiesForNewRecord = (
|
|
141
|
+
dataConfig,
|
|
142
|
+
contextName,
|
|
143
|
+
dataApiObj,
|
|
144
|
+
setDataApiObj,
|
|
145
|
+
displayFieldMeta,
|
|
146
|
+
c11nEnv,
|
|
147
|
+
columns,
|
|
148
|
+
actions,
|
|
149
|
+
newCaseId
|
|
150
|
+
) => {
|
|
151
|
+
PCore.getDataApi()
|
|
152
|
+
.init(dataConfig, contextName)
|
|
153
|
+
.then((dataObj) => {
|
|
154
|
+
setDataApiObj(dataObj);
|
|
155
|
+
buildColumnForDisplayValue(dataObj);
|
|
156
|
+
// SET matchPosition to EQUALS to return exact matching record
|
|
157
|
+
dataObj.matchPosition = 'equals';
|
|
158
|
+
dataObj
|
|
159
|
+
.fetchData(newCaseId)
|
|
160
|
+
.then((displayResponse) => {
|
|
161
|
+
let columnsWithSetProperty = [];
|
|
162
|
+
if (dataApiObj.columns) {
|
|
163
|
+
columnsWithSetProperty = dataApiObj.columns
|
|
164
|
+
.filter((col) => col.setProperty && col.setProperty !== 'Associated property')
|
|
165
|
+
.map((col) => col.value);
|
|
166
|
+
}
|
|
167
|
+
const displayResponseData = displayResponse.data || [];
|
|
168
|
+
|
|
169
|
+
const searchedItem = transformSearchedItem(
|
|
170
|
+
displayResponseData,
|
|
171
|
+
displayFieldMeta,
|
|
172
|
+
columnsWithSetProperty,
|
|
173
|
+
dataApiObj
|
|
174
|
+
);
|
|
175
|
+
setValuesToPropertyList(searchedItem[0], c11nEnv.getStateProps().value, searchedItem[0], columns, actions);
|
|
176
|
+
})
|
|
177
|
+
.finally(() => {
|
|
178
|
+
// RESET matchPosition
|
|
179
|
+
dataObj.matchPosition = dataConfig.matchPosition;
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
};
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.jsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-no-useless-fragment */
|
|
1
2
|
import { useState } from 'react';
|
|
2
3
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
3
4
|
|
|
4
|
-
import { configProps, stateProps } from './mock
|
|
5
|
+
import { configProps, stateProps } from './mock';
|
|
5
6
|
|
|
6
7
|
import PegaDxilMyBoolean from './index';
|
|
7
8
|
|
|
@@ -11,8 +12,7 @@ export default {
|
|
|
11
12
|
component: PegaDxilMyBoolean
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
export const
|
|
15
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
15
|
+
export const BasePegaDxilMyBoolean = () => {
|
|
16
16
|
const [value, setValue] = useState(configProps.value);
|
|
17
17
|
|
|
18
18
|
const props = {
|
|
@@ -41,12 +41,16 @@ export const basePegaDxilMyBoolean = () => {
|
|
|
41
41
|
updateFieldValue: (propName, theValue) => {
|
|
42
42
|
setValue(theValue);
|
|
43
43
|
},
|
|
44
|
-
triggerFieldChange: () => {
|
|
44
|
+
triggerFieldChange: () => {
|
|
45
|
+
/* nothing */
|
|
46
|
+
}
|
|
45
47
|
};
|
|
46
48
|
},
|
|
47
49
|
getValidationApi: () => {
|
|
48
50
|
return {
|
|
49
|
-
validate: () => {
|
|
51
|
+
validate: () => {
|
|
52
|
+
/* nothing */
|
|
53
|
+
}
|
|
50
54
|
};
|
|
51
55
|
}
|
|
52
56
|
};
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.jsx
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/* eslint-disable storybook/prefer-pascal-case */
|
|
2
|
+
/* eslint-disable react/jsx-no-useless-fragment */
|
|
1
3
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
4
|
|
|
3
5
|
import PegaDxilMyCaseWidget from './index.jsx';
|
|
4
6
|
|
|
5
|
-
import historyData from './mock
|
|
7
|
+
import historyData from './mock';
|
|
6
8
|
|
|
7
9
|
export default {
|
|
8
10
|
title: 'PegaDxilMyCaseWidget',
|
|
@@ -40,8 +42,7 @@ window.PCore.getDataApiUtils = () => {
|
|
|
40
42
|
};
|
|
41
43
|
};
|
|
42
44
|
|
|
43
|
-
export const
|
|
44
|
-
|
|
45
|
+
export const BasePegaDxilMyCaseWidget = () => {
|
|
45
46
|
const props = {
|
|
46
47
|
label: 'Case history',
|
|
47
48
|
|
|
@@ -58,19 +59,31 @@ export const basePegaDxilMyCaseWidget = () => {
|
|
|
58
59
|
},
|
|
59
60
|
getActionsApi: () => {
|
|
60
61
|
return {
|
|
61
|
-
updateFieldValue: () => {
|
|
62
|
-
|
|
62
|
+
updateFieldValue: () => {
|
|
63
|
+
/* nothing */
|
|
64
|
+
},
|
|
65
|
+
triggerFieldChange: () => {
|
|
66
|
+
/* nothing */
|
|
67
|
+
}
|
|
63
68
|
};
|
|
64
69
|
},
|
|
65
|
-
ignoreSuggestion: () => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
ignoreSuggestion: () => {
|
|
71
|
+
/* nothing */
|
|
72
|
+
},
|
|
73
|
+
acceptSuggestion: () => {
|
|
74
|
+
/* nothing */
|
|
75
|
+
},
|
|
76
|
+
setInheritedProps: () => {
|
|
77
|
+
/* nothing */
|
|
78
|
+
},
|
|
79
|
+
resolveConfigProps: () => {
|
|
80
|
+
/* nothing */
|
|
81
|
+
}
|
|
69
82
|
};
|
|
70
83
|
}
|
|
71
|
-
};
|
|
84
|
+
};
|
|
72
85
|
|
|
73
|
-
return (
|
|
86
|
+
return (
|
|
74
87
|
<>
|
|
75
88
|
<PegaDxilMyCaseWidget {...props} />
|
|
76
89
|
</>
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.jsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/* eslint-disable storybook/prefer-pascal-case */
|
|
2
|
+
/* eslint-disable react/jsx-no-useless-fragment */
|
|
1
3
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
4
|
|
|
3
|
-
import { configProps, fieldMetadata, stateProps } from './mock.
|
|
4
|
-
|
|
5
|
+
import { configProps, fieldMetadata, stateProps } from './mock.js';
|
|
5
6
|
import PegaDxilMyCurrency from './index.jsx';
|
|
6
7
|
|
|
7
8
|
export default {
|
|
@@ -10,8 +11,7 @@ export default {
|
|
|
10
11
|
component: PegaDxilMyCurrency
|
|
11
12
|
};
|
|
12
13
|
|
|
13
|
-
export const
|
|
14
|
-
|
|
14
|
+
export const BasePegaDxilMyCurrency = () => {
|
|
15
15
|
const props = {
|
|
16
16
|
value: Number(configProps.value),
|
|
17
17
|
placeholder: configProps.placeholder,
|
|
@@ -32,15 +32,29 @@ export const basePegaDxilMyCurrency = () => {
|
|
|
32
32
|
},
|
|
33
33
|
getActionsApi: () => {
|
|
34
34
|
return {
|
|
35
|
-
updateFieldValue: () => {
|
|
36
|
-
|
|
35
|
+
updateFieldValue: () => {
|
|
36
|
+
/* nothing */
|
|
37
|
+
},
|
|
38
|
+
triggerFieldChange: () => {
|
|
39
|
+
/* nothing */
|
|
40
|
+
}
|
|
37
41
|
};
|
|
38
42
|
},
|
|
39
|
-
ignoreSuggestion: () => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
ignoreSuggestion: () => {
|
|
44
|
+
/* nothing */
|
|
45
|
+
},
|
|
46
|
+
acceptSuggestion: () => {
|
|
47
|
+
/* nothing */
|
|
48
|
+
},
|
|
49
|
+
setInheritedProps: () => {
|
|
50
|
+
/* nothing */
|
|
51
|
+
},
|
|
52
|
+
resolveConfigProps: () => {
|
|
53
|
+
/* nothing */
|
|
54
|
+
},
|
|
55
|
+
clearErrorMessages: () => {
|
|
56
|
+
/* nothing */
|
|
57
|
+
}
|
|
44
58
|
};
|
|
45
59
|
}
|
|
46
60
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
import { useState, useEffect } from 'react';
|
|
2
3
|
import {
|
|
3
4
|
CurrencyInput as CosmosCurrency,
|
|
@@ -71,7 +72,7 @@ const PegaDxilMyCurrency = props => {
|
|
|
71
72
|
} else if (!hasSuggestions && status !== 'success') {
|
|
72
73
|
setStatus(validatemessage !== '' ? 'error' : undefined);
|
|
73
74
|
}
|
|
74
|
-
}, [validatemessage, hasSuggestions]);
|
|
75
|
+
}, [validatemessage, hasSuggestions, status]);
|
|
75
76
|
|
|
76
77
|
useAfterInitialEffect(() => {
|
|
77
78
|
setCurrencyValue(formatValue(value));
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/* eslint-disable storybook/prefer-pascal-case */
|
|
2
|
+
/* eslint-disable react/jsx-no-useless-fragment */
|
|
1
3
|
import { withKnobs } from '@storybook/addon-knobs';
|
|
2
|
-
import { configProps, stateProps } from './mock
|
|
4
|
+
import { configProps, stateProps } from './mock';
|
|
3
5
|
import PegaDxilMyDate from './index.jsx';
|
|
4
6
|
|
|
5
7
|
export default {
|
|
@@ -20,19 +22,25 @@ window.PCore.getEnvironmentInfo = () => {
|
|
|
20
22
|
};
|
|
21
23
|
};
|
|
22
24
|
|
|
23
|
-
export const
|
|
25
|
+
export const BasePegaDxilMyDate = () => {
|
|
24
26
|
const props = {
|
|
25
27
|
getPConnect: () => {
|
|
26
28
|
return {
|
|
27
29
|
getActionsApi: () => {
|
|
28
30
|
return {
|
|
29
|
-
updateFieldValue: () => {
|
|
30
|
-
|
|
31
|
+
updateFieldValue: () => {
|
|
32
|
+
/* nothing */
|
|
33
|
+
},
|
|
34
|
+
triggerFieldChange: () => {
|
|
35
|
+
/* nothing */
|
|
36
|
+
}
|
|
31
37
|
};
|
|
32
38
|
},
|
|
33
39
|
getValidationApi: () => {
|
|
34
40
|
return {
|
|
35
|
-
validate: () => {
|
|
41
|
+
validate: () => {
|
|
42
|
+
/* nothing */
|
|
43
|
+
}
|
|
36
44
|
};
|
|
37
45
|
},
|
|
38
46
|
getStateProps: () => {
|
|
@@ -41,9 +49,15 @@ export const basePegaDxilMyDate = () => {
|
|
|
41
49
|
getConfigProps: () => {
|
|
42
50
|
return configProps;
|
|
43
51
|
},
|
|
44
|
-
ignoreSuggestion: () => {
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
ignoreSuggestion: () => {
|
|
53
|
+
/* nothing */
|
|
54
|
+
},
|
|
55
|
+
acceptSuggestion: () => {
|
|
56
|
+
/* nothing */
|
|
57
|
+
},
|
|
58
|
+
clearErrorMessages: () => {
|
|
59
|
+
/* nothing */
|
|
60
|
+
}
|
|
47
61
|
};
|
|
48
62
|
},
|
|
49
63
|
value: configProps.value,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-undef */
|
|
2
1
|
import { useEffect, useState } from 'react';
|
|
3
2
|
import { DateInput, FieldValueList, DateTimeDisplay, Text, } from '@pega/cosmos-react-core';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
@@ -62,7 +61,7 @@ const PegaDxilMyDate = props => {
|
|
|
62
61
|
} else if (!hasSuggestions && status !== 'success') {
|
|
63
62
|
setStatus(validatemessage !== '' ? 'error' : undefined);
|
|
64
63
|
}
|
|
65
|
-
}, [validatemessage, hasSuggestions]);
|
|
64
|
+
}, [validatemessage, hasSuggestions, status]);
|
|
66
65
|
|
|
67
66
|
// calculate min and max range of calendar
|
|
68
67
|
const currentYear = getFullYear();
|