@pega/custom-dx-components 0.23.22 → 0.23.24
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 +1 -1
- package/src/tasks/init/template/.eslintrc.json +1 -1
- package/src/tasks/init/template/babel.config.cjs +4 -4
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/Boolean.js +0 -38
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/boolean-format.ts +0 -27
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/config.json +0 -145
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/demo.stories.tsx +0 -64
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/index.tsx +0 -196
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/mock.ts +0 -22
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyBoolean/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/OneColumnPage.svg +0 -36
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/config.json +0 -23
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/demo.stories.tsx +0 -81
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/index.tsx +0 -81
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/mock.ts +0 -391
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCaseWidget/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/config.json +0 -291
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/demo.stories.tsx +0 -56
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/index.tsx +0 -333
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/mock.ts +0 -25
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyCurrency/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/DateFormatter.js +0 -62
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/FormattedText.jsx +0 -42
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/config.json +0 -199
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/date.js +0 -439
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/demo.stories.tsx +0 -79
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/index.tsx +0 -302
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/mock.ts +0 -24
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDate/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/config.json +0 -256
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/date-time.js +0 -93
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/date-utils.js +0 -288
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/date.js +0 -331
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/demo.stories.tsx +0 -79
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/index.tsx +0 -297
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/mock.ts +0 -25
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDateTime/suggestions-handler.ts +0 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/config.json +0 -278
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/demo.stories.tsx +0 -52
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/index.tsx +0 -300
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/mock.ts +0 -23
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDecimal/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/OneColumnDetails.svg +0 -22
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/StatusWork.tsx +0 -26
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/config.json +0 -35
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/demo.stories.tsx +0 -137
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/index.tsx +0 -101
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/mock.ts +0 -192
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyDetails/utils.js +0 -151
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/config.json +0 -111
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/demo.stories.tsx +0 -51
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/index.tsx +0 -251
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/mock.ts +0 -24
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyEmail/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/DefaultForm.svg +0 -29
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/config.json +0 -45
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/demo.stories.tsx +0 -175
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/index.tsx +0 -53
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/mock.ts +0 -139
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyForm/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/config.json +0 -344
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/demo.stories.tsx +0 -51
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/index.tsx +0 -376
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/mock.ts +0 -22
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyInteger/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/GetNextWork.tsx +0 -43
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/OneColumnPage.svg +0 -36
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/config.json +0 -32
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/demo.stories.tsx +0 -106
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/index.tsx +0 -83
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/localizations.json +0 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/mock.ts +0 -96
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPage/utils.js +0 -227
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -86
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/OneColumnPage.svg +0 -36
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/Operator.tsx +0 -301
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/config.json +0 -55
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +0 -76
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -89
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/mock.ts +0 -52
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageCaseWidget/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/OneColumnPage.svg +0 -36
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/config.json +0 -59
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/demo.stories.tsx +0 -33
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/index.tsx +0 -61
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/mock.ts +0 -25
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPageWidget/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/config.json +0 -111
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/demo.stories.tsx +0 -51
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/index.tsx +0 -248
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/mock.ts +0 -22
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyParagraph/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/config.json +0 -93
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/demo.stories.tsx +0 -52
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/index.tsx +0 -306
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/mock.ts +0 -23
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPercentage/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/config.json +0 -123
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/demo.stories.tsx +0 -49
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/index.tsx +0 -288
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/mock.ts +0 -39
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPhone/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/config.json +0 -114
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/demo.stories.tsx +0 -81
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/index.tsx +0 -393
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/config.json +0 -113
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/demo.stories.tsx +0 -85
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/index.tsx +0 -243
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/mock.ts +0 -69
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +0 -161
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/config.json +0 -55
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/demo.stories.tsx +0 -54
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/index.tsx +0 -73
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/mock.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyText/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -30
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/config.json +0 -111
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/demo.stories.tsx +0 -51
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/index.tsx +0 -263
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/mock.ts +0 -23
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTextInput/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/config.json +0 -185
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +0 -60
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/index.tsx +0 -245
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/mock.ts +0 -22
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -287
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -26
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/TwoColumnDetails.svg +0 -28
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/config.json +0 -42
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +0 -141
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/index.tsx +0 -100
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/mock.ts +0 -232
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnDetails/utils.js +0 -151
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/TwoColumn.svg +0 -38
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/config.json +0 -27
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +0 -181
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/index.tsx +0 -60
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/mock.ts +0 -145
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyTwoColumnForm/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/PConnProps.d.ts +0 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/config.json +0 -237
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/demo.stories.tsx +0 -49
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/event-utils.ts +0 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/index.tsx +0 -261
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/mock.ts +0 -24
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/styles.ts +0 -15
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/suggestions-handler.ts +0 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/text-url.jsx +0 -175
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/mock.js +0 -68
- /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{mock.js.mustache → mock.ts.mustache} +0 -0
- /package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyPicklist → Constellation/Pega_DXIL_MyAutocomplete}/mock.ts +0 -0
- /package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyAutocomplete/mock.js → Launchpad/Pega_DXIL_MyAutocomplete/mock.ts} +0 -0
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useRef} from "react";
|
|
2
|
-
import { Input, FieldValueList, Text } from "@pega/cosmos-react-core";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import type { PConnFieldProps } from './PConnProps';
|
|
5
|
-
|
|
6
|
-
// includes in bundle
|
|
7
|
-
import {formatExists,textFormatter, urlFormatter} from "./text-url.jsx";
|
|
8
|
-
import handleEvent from "./event-utils";
|
|
9
|
-
import { suggestionsHandler } from './suggestions-handler';
|
|
10
|
-
|
|
11
|
-
import StyledPegaDxilMyUrlWrapper from './styles';
|
|
12
|
-
|
|
13
|
-
// interface for props
|
|
14
|
-
interface PegaDxilMyUrlProps extends PConnFieldProps {
|
|
15
|
-
// If any, enter additional props that only exist on TextInput here
|
|
16
|
-
displayAsStatus?: boolean;
|
|
17
|
-
displayAs: string;
|
|
18
|
-
isTableFormatter?: boolean;
|
|
19
|
-
hasSuggestions?: boolean;
|
|
20
|
-
variant?: any;
|
|
21
|
-
formatter: string;
|
|
22
|
-
datasource: Array<any>;
|
|
23
|
-
widthSel: string;
|
|
24
|
-
customWidth: number;
|
|
25
|
-
altText: string;
|
|
26
|
-
altTextOfImage: string;
|
|
27
|
-
propaltTextOfImage: string;
|
|
28
|
-
urlLabel: string;
|
|
29
|
-
propUrlLabel: string;
|
|
30
|
-
urlLabelSelection: string;
|
|
31
|
-
tableDisplayAs: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// interface for StateProps object
|
|
35
|
-
interface StateProps {
|
|
36
|
-
value: string;
|
|
37
|
-
hasSuggestions: boolean;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Duplicated runtime code from Constellation Design System Component
|
|
41
|
-
|
|
42
|
-
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
43
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
44
|
-
export default function PegaDxilMyUrl(props: PegaDxilMyUrlProps) {
|
|
45
|
-
const {
|
|
46
|
-
getPConnect,
|
|
47
|
-
value,
|
|
48
|
-
hideLabel,
|
|
49
|
-
placeholder,
|
|
50
|
-
validatemessage,
|
|
51
|
-
label,
|
|
52
|
-
helperText,
|
|
53
|
-
testId,
|
|
54
|
-
displayMode,
|
|
55
|
-
additionalProps,
|
|
56
|
-
variant,
|
|
57
|
-
isTableFormatter,
|
|
58
|
-
displayAs,
|
|
59
|
-
widthSel,
|
|
60
|
-
customWidth,
|
|
61
|
-
altText,
|
|
62
|
-
altTextOfImage,
|
|
63
|
-
propaltTextOfImage,
|
|
64
|
-
urlLabel,
|
|
65
|
-
propUrlLabel,
|
|
66
|
-
urlLabelSelection,
|
|
67
|
-
tableDisplayAs,
|
|
68
|
-
hasSuggestions
|
|
69
|
-
} = props;
|
|
70
|
-
const { formatter } = props;
|
|
71
|
-
const pConn = getPConnect();
|
|
72
|
-
const actions = pConn.getActionsApi();
|
|
73
|
-
const stateProps = pConn.getStateProps() as StateProps;
|
|
74
|
-
let propName: string = stateProps.value;
|
|
75
|
-
const hasValueChange = useRef(false);
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
79
|
-
let { readOnly, required, disabled } = props;
|
|
80
|
-
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
81
|
-
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
const [inputValue, setInputValue] = useState(value);
|
|
85
|
-
const [status, setStatus] = useState(hasSuggestions ? 'pending' : undefined);
|
|
86
|
-
useEffect(() => setInputValue(value), [value]);
|
|
87
|
-
|
|
88
|
-
useEffect(() => {
|
|
89
|
-
if (validatemessage !== '') {
|
|
90
|
-
setStatus('error');
|
|
91
|
-
}
|
|
92
|
-
if (hasSuggestions) {
|
|
93
|
-
setStatus('pending');
|
|
94
|
-
} else if (!hasSuggestions && status !== 'success') {
|
|
95
|
-
setStatus(validatemessage !== '' ? 'error' : undefined);
|
|
96
|
-
}
|
|
97
|
-
}, [validatemessage, hasSuggestions, status]);
|
|
98
|
-
|
|
99
|
-
let displayComp = null;
|
|
100
|
-
if (displayMode) {
|
|
101
|
-
displayComp = urlFormatter(value, {
|
|
102
|
-
displayAs,
|
|
103
|
-
tableDisplayAs,
|
|
104
|
-
isTableFormatter,
|
|
105
|
-
altText,
|
|
106
|
-
altTextOfImage,
|
|
107
|
-
propaltTextOfImage,
|
|
108
|
-
urlLabelSelection,
|
|
109
|
-
urlLabel,
|
|
110
|
-
propUrlLabel,
|
|
111
|
-
widthSel,
|
|
112
|
-
customWidth
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if (displayMode === 'LABELS_LEFT' || displayMode === 'DISPLAY_ONLY') {
|
|
119
|
-
if (isTableFormatter && formatter !== 'URL' && formatExists(formatter)) {
|
|
120
|
-
displayComp = textFormatter(formatter, value);
|
|
121
|
-
}
|
|
122
|
-
return displayMode === 'DISPLAY_ONLY' ? (
|
|
123
|
-
displayComp
|
|
124
|
-
) : (
|
|
125
|
-
<StyledPegaDxilMyUrlWrapper>
|
|
126
|
-
<FieldValueList
|
|
127
|
-
variant={hideLabel ? 'stacked' : variant}
|
|
128
|
-
data-testid={testId}
|
|
129
|
-
fields={[{ id: '1', name: hideLabel ? '' : label, value: displayComp }]}
|
|
130
|
-
/>
|
|
131
|
-
</StyledPegaDxilMyUrlWrapper>
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
136
|
-
return (
|
|
137
|
-
<StyledPegaDxilMyUrlWrapper>
|
|
138
|
-
<FieldValueList
|
|
139
|
-
variant='stacked'
|
|
140
|
-
data-testid={testId}
|
|
141
|
-
fields={[
|
|
142
|
-
{
|
|
143
|
-
id: '2',
|
|
144
|
-
name: hideLabel ? '' : label,
|
|
145
|
-
value: (
|
|
146
|
-
<Text variant='h1' as='span'>
|
|
147
|
-
{displayComp}
|
|
148
|
-
</Text>
|
|
149
|
-
)
|
|
150
|
-
}
|
|
151
|
-
]}
|
|
152
|
-
/>
|
|
153
|
-
</StyledPegaDxilMyUrlWrapper>
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const onResolveSuggestionHandler = (accepted: boolean) => {
|
|
158
|
-
suggestionsHandler(accepted, pConn, setStatus);
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
return (
|
|
162
|
-
<StyledPegaDxilMyUrlWrapper>
|
|
163
|
-
<Input
|
|
164
|
-
{...additionalProps}
|
|
165
|
-
type='url'
|
|
166
|
-
label={label}
|
|
167
|
-
labelHidden={hideLabel}
|
|
168
|
-
info={validatemessage || helperText}
|
|
169
|
-
status={status}
|
|
170
|
-
value={inputValue}
|
|
171
|
-
placeholder={placeholder}
|
|
172
|
-
disabled={disabled}
|
|
173
|
-
readOnly={readOnly}
|
|
174
|
-
required={required}
|
|
175
|
-
data-testid={testId}
|
|
176
|
-
onChange={(event: any) => {
|
|
177
|
-
if (hasSuggestions) {
|
|
178
|
-
setStatus('');
|
|
179
|
-
}
|
|
180
|
-
setInputValue(event.target.value);
|
|
181
|
-
if (value !== event.target.value) {
|
|
182
|
-
// @ts-ignore
|
|
183
|
-
handleEvent(actions, 'change', propName, event.target.value);
|
|
184
|
-
hasValueChange.current = true;
|
|
185
|
-
}
|
|
186
|
-
}}
|
|
187
|
-
onBlur={(event: any) => {
|
|
188
|
-
if (!value || hasValueChange.current) {
|
|
189
|
-
// @ts-ignore
|
|
190
|
-
handleEvent(actions, 'blur', propName, event.target.value);
|
|
191
|
-
if (hasSuggestions) {
|
|
192
|
-
pConn.ignoreSuggestion('');
|
|
193
|
-
}
|
|
194
|
-
hasValueChange.current = false;
|
|
195
|
-
}
|
|
196
|
-
}}
|
|
197
|
-
// @ts-ignore
|
|
198
|
-
onFocus={actions.onFocus}
|
|
199
|
-
onResolveSuggestion={onResolveSuggestionHandler}
|
|
200
|
-
/>
|
|
201
|
-
</StyledPegaDxilMyUrlWrapper>
|
|
202
|
-
);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
PegaDxilMyUrl.defaultProps = {
|
|
206
|
-
value: '',
|
|
207
|
-
placeholder: '',
|
|
208
|
-
validatemessage: '',
|
|
209
|
-
helperText: '',
|
|
210
|
-
hideLabel: false,
|
|
211
|
-
disabled: false,
|
|
212
|
-
readOnly: false,
|
|
213
|
-
required: false,
|
|
214
|
-
testId: '',
|
|
215
|
-
displayMode: null,
|
|
216
|
-
additionalProps: {},
|
|
217
|
-
variant: 'inline',
|
|
218
|
-
formatter: '',
|
|
219
|
-
isTableFormatter: false,
|
|
220
|
-
displayAs: 'defaultURL',
|
|
221
|
-
widthSel: 'defaultWidth',
|
|
222
|
-
customWidth: null,
|
|
223
|
-
altText: 'constant',
|
|
224
|
-
altTextOfImage: '',
|
|
225
|
-
propaltTextOfImage: '',
|
|
226
|
-
urlLabel: '',
|
|
227
|
-
propUrlLabel: '',
|
|
228
|
-
urlLabelSelection: 'constant',
|
|
229
|
-
tableDisplayAs: 'link',
|
|
230
|
-
hasSuggestions: false
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
PegaDxilMyUrl.propTypes = {
|
|
234
|
-
value: PropTypes.string,
|
|
235
|
-
placeholder: PropTypes.string,
|
|
236
|
-
label: PropTypes.string.isRequired,
|
|
237
|
-
hideLabel: PropTypes.bool,
|
|
238
|
-
getPConnect: PropTypes.func.isRequired,
|
|
239
|
-
validatemessage: PropTypes.string,
|
|
240
|
-
helperText: PropTypes.string,
|
|
241
|
-
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
242
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
243
|
-
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
244
|
-
testId: PropTypes.string,
|
|
245
|
-
displayMode: PropTypes.string,
|
|
246
|
-
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
247
|
-
variant: PropTypes.string,
|
|
248
|
-
formatter: PropTypes.string,
|
|
249
|
-
isTableFormatter: PropTypes.bool,
|
|
250
|
-
displayAs: PropTypes.string,
|
|
251
|
-
widthSel: PropTypes.string,
|
|
252
|
-
customWidth: PropTypes.number,
|
|
253
|
-
altText: PropTypes.string,
|
|
254
|
-
altTextOfImage: PropTypes.string,
|
|
255
|
-
propaltTextOfImage: PropTypes.string,
|
|
256
|
-
urlLabel: PropTypes.string,
|
|
257
|
-
propUrlLabel: PropTypes.string,
|
|
258
|
-
urlLabelSelection: PropTypes.string,
|
|
259
|
-
tableDisplayAs: PropTypes.string,
|
|
260
|
-
hasSuggestions: PropTypes.bool
|
|
261
|
-
};
|
package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/Pega_DXIL_MyURL/mock.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
export const configProps = {
|
|
4
|
-
value: '',
|
|
5
|
-
label: 'URL Sample',
|
|
6
|
-
placeholder: 'URL Placeholder',
|
|
7
|
-
helperText: 'URL Helper Text',
|
|
8
|
-
testId: 'url-12345678',
|
|
9
|
-
hasSuggestions: false
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const fieldMetadata = {
|
|
13
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
14
|
-
type: 'Text',
|
|
15
|
-
maxLength: 256,
|
|
16
|
-
displayAs: 'pxURL',
|
|
17
|
-
label: 'URL sample',
|
|
18
|
-
validateAs: 'pxIsValidURL'
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const stateProps = {
|
|
22
|
-
value: '.URLSample',
|
|
23
|
-
hasSuggestions: false
|
|
24
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// utilizing theming, comment out, if want individual style
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { Configuration } from '@pega/cosmos-react-core';
|
|
5
|
-
|
|
6
|
-
export default styled(Configuration)``;
|
|
7
|
-
|
|
8
|
-
// individual style, comment out above, and uncomment here and add styles
|
|
9
|
-
// import styled, { css } from 'styled-components';
|
|
10
|
-
//
|
|
11
|
-
// export default styled.div(() => {
|
|
12
|
-
// return css`
|
|
13
|
-
// margin: 0px 0;
|
|
14
|
-
// `;
|
|
15
|
-
// });
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable react/jsx-fragments */
|
|
3
|
-
import { useState, useRef, React} from "react";
|
|
4
|
-
import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
|
|
5
|
-
|
|
6
|
-
export const formatExists = (formatterVal) => {
|
|
7
|
-
const formatterValues = [
|
|
8
|
-
"TextInput",
|
|
9
|
-
"WorkStatus",
|
|
10
|
-
"RichText",
|
|
11
|
-
"Email",
|
|
12
|
-
"Phone",
|
|
13
|
-
"URL",
|
|
14
|
-
"Operator"
|
|
15
|
-
];
|
|
16
|
-
let isformatter = false;
|
|
17
|
-
if (formatterValues.includes(formatterVal)) {
|
|
18
|
-
isformatter = true;
|
|
19
|
-
}
|
|
20
|
-
return isformatter;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const urlLabelVal = (urlLabelSelection, btnVal, urlLabel, propUrlLabel) => {
|
|
24
|
-
if ((urlLabel !== '' || propUrlLabel !== '') && btnVal !== null) {
|
|
25
|
-
switch (urlLabelSelection) {
|
|
26
|
-
case 'constant': {
|
|
27
|
-
btnVal = urlLabel;
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
case 'propertyRef': {
|
|
31
|
-
btnVal = propUrlLabel;
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
// no default
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return btnVal;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const isImage = (url) => /\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(url);
|
|
41
|
-
|
|
42
|
-
const TableImage = (imageProps) => {
|
|
43
|
-
const { value, altText, altTextOfImage, propaltTextOfImage, urlLabelSelection, urlLabel, propUrlLabel } = imageProps;
|
|
44
|
-
const demoButtonRef = useRef(null);
|
|
45
|
-
let imageDisplayComp = null;
|
|
46
|
-
const [images, setImages] = useState(null);
|
|
47
|
-
const imgDescription = {
|
|
48
|
-
id: 'url',
|
|
49
|
-
name: urlLabelSelection === 'constant' ? urlLabel : propUrlLabel,
|
|
50
|
-
description: altText === 'constant' ? altTextOfImage : propaltTextOfImage,
|
|
51
|
-
src: value
|
|
52
|
-
};
|
|
53
|
-
const onClick = () => {
|
|
54
|
-
setImages([imgDescription]);
|
|
55
|
-
};
|
|
56
|
-
const onItemDownload = async (id) => {
|
|
57
|
-
const a = document.createElement('a');
|
|
58
|
-
a.href = await fetch(images[0].src)
|
|
59
|
-
.then((response) => {
|
|
60
|
-
return response.blob();
|
|
61
|
-
})
|
|
62
|
-
.then((blob) => {
|
|
63
|
-
return URL.createObjectURL(blob);
|
|
64
|
-
});
|
|
65
|
-
a.download = images?.find((image) => image.id === id)?.name ?? id;
|
|
66
|
-
document.body.appendChild(a);
|
|
67
|
-
a.click();
|
|
68
|
-
document.body.removeChild(a);
|
|
69
|
-
};
|
|
70
|
-
let btnVal = value;
|
|
71
|
-
btnVal = urlLabelVal(urlLabelSelection, btnVal, urlLabel, propUrlLabel);
|
|
72
|
-
imageDisplayComp = (
|
|
73
|
-
<React.Fragment>
|
|
74
|
-
{btnVal !== null && (
|
|
75
|
-
<Button ref={demoButtonRef} variant='link' compact={false} onClick={onClick} autoFocus>
|
|
76
|
-
{btnVal}
|
|
77
|
-
</Button>
|
|
78
|
-
)}
|
|
79
|
-
{images && (
|
|
80
|
-
<Lightbox
|
|
81
|
-
items={images}
|
|
82
|
-
cycle={false}
|
|
83
|
-
onAfterClose={() => {
|
|
84
|
-
setImages(null);
|
|
85
|
-
demoButtonRef.current?.focus();
|
|
86
|
-
}}
|
|
87
|
-
onItemDownload={isImage(images[0].src) ? onItemDownload : undefined}
|
|
88
|
-
/>
|
|
89
|
-
)}
|
|
90
|
-
</React.Fragment>
|
|
91
|
-
);
|
|
92
|
-
return imageDisplayComp;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export const textFormatter = (formatter,value) => {
|
|
96
|
-
let displayComponent = null;
|
|
97
|
-
switch(formatter){
|
|
98
|
-
case "TextInput" : {
|
|
99
|
-
displayComponent = value;
|
|
100
|
-
break;
|
|
101
|
-
}
|
|
102
|
-
case "Email" : {
|
|
103
|
-
displayComponent = (<EmailDisplay value={value} displayText={value} variant="link" />);
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
case "Phone" : {
|
|
107
|
-
displayComponent = (<PhoneDisplay value={value} variant="link" />);
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
case "URL" : {
|
|
111
|
-
displayComponent = (<URLDisplay target="_blank" value={value} displayText={value} variant="link" />);
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
// no default
|
|
115
|
-
}
|
|
116
|
-
return displayComponent;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Returns a URL display component based on the options
|
|
121
|
-
* @function urlFormatter
|
|
122
|
-
* @param {string} value value
|
|
123
|
-
* @param {object} options options for formatting
|
|
124
|
-
* { displayAs,tableDisplayAs,isTableFormatter,altText,altTextOfImage,propaltTextOfImage,urlLabelSelection, urlLabel,propUrlLabel, widthSel, customWidth}
|
|
125
|
-
*/
|
|
126
|
-
export const urlFormatter = (value, options) => {
|
|
127
|
-
const {
|
|
128
|
-
displayAs,
|
|
129
|
-
tableDisplayAs,
|
|
130
|
-
isTableFormatter,
|
|
131
|
-
altText,
|
|
132
|
-
altTextOfImage,
|
|
133
|
-
propaltTextOfImage,
|
|
134
|
-
urlLabelSelection,
|
|
135
|
-
urlLabel,
|
|
136
|
-
propUrlLabel,
|
|
137
|
-
widthSel,
|
|
138
|
-
customWidth
|
|
139
|
-
} = options;
|
|
140
|
-
|
|
141
|
-
let urlFormatComp = null;
|
|
142
|
-
if (
|
|
143
|
-
(displayAs === 'labelText' || (isTableFormatter && tableDisplayAs === 'link')) &&
|
|
144
|
-
(urlLabel !== '' || propUrlLabel !== '')
|
|
145
|
-
) {
|
|
146
|
-
urlFormatComp = (
|
|
147
|
-
<URLDisplay
|
|
148
|
-
target='_blank'
|
|
149
|
-
value={value}
|
|
150
|
-
displayText={urlLabelSelection === 'constant' ? urlLabel : propUrlLabel}
|
|
151
|
-
variant='link'
|
|
152
|
-
/>
|
|
153
|
-
);
|
|
154
|
-
} else if ((displayAs === 'Image' || tableDisplayAs === 'Image') && !!value) {
|
|
155
|
-
if (isTableFormatter) {
|
|
156
|
-
urlFormatComp = TableImage({
|
|
157
|
-
value,
|
|
158
|
-
altText,
|
|
159
|
-
altTextOfImage,
|
|
160
|
-
propaltTextOfImage,
|
|
161
|
-
urlLabelSelection,
|
|
162
|
-
urlLabel,
|
|
163
|
-
propUrlLabel
|
|
164
|
-
});
|
|
165
|
-
} else {
|
|
166
|
-
const width = widthSel === 'widthpx' ? customWidth : null;
|
|
167
|
-
urlFormatComp = (
|
|
168
|
-
<Image src={value} width={width} alt={altText === 'constant' ? altTextOfImage : propaltTextOfImage} />
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
} else {
|
|
172
|
-
urlFormatComp = <URLDisplay target='_blank' value={value} displayText={value} variant='link' />;
|
|
173
|
-
}
|
|
174
|
-
return urlFormatComp;
|
|
175
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
export const configProps = {
|
|
3
|
-
value: '',
|
|
4
|
-
label: 'Picklist Sample',
|
|
5
|
-
placeholder: 'Select...',
|
|
6
|
-
listType: 'associated',
|
|
7
|
-
datasource: [
|
|
8
|
-
{
|
|
9
|
-
key: 'Option 1',
|
|
10
|
-
value: 'Option 1'
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
key: 'Option 2',
|
|
14
|
-
value: 'Option 2'
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
key: 'Option 3',
|
|
18
|
-
value: 'Option 3'
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
helperText: 'Picklist Helper Text',
|
|
22
|
-
testId: 'picklist-12345678',
|
|
23
|
-
hasSuggestions: false
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const stateProps = {
|
|
27
|
-
value: '.PicklistSample',
|
|
28
|
-
placeholder: 'Select...',
|
|
29
|
-
datasource: '.PicklistSample',
|
|
30
|
-
hasSuggestions: false
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const rawMetadata = {
|
|
34
|
-
type: 'Dropdown',
|
|
35
|
-
config: {
|
|
36
|
-
value: '@P .PicklistSample',
|
|
37
|
-
label: '@L Picklist Sample',
|
|
38
|
-
placeholder: '@L Select...',
|
|
39
|
-
listType: 'associated',
|
|
40
|
-
datasource: '@ASSOCIATED .PicklistSample',
|
|
41
|
-
helperText: '@L Picklist Helper Text',
|
|
42
|
-
testId: 'picklist-12345678'
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const fieldMetadata = {
|
|
47
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
48
|
-
type: 'Text',
|
|
49
|
-
displayAs: 'pxDropdown',
|
|
50
|
-
label: 'Picklist sample',
|
|
51
|
-
datasource: {
|
|
52
|
-
tableType: 'PromptList',
|
|
53
|
-
records: [
|
|
54
|
-
{
|
|
55
|
-
key: 'Option 1',
|
|
56
|
-
value: 'Option 1'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
key: 'Option 2',
|
|
60
|
-
value: 'Option 2'
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
key: 'Option 3',
|
|
64
|
-
value: 'Option 3'
|
|
65
|
-
}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
};
|
|
File without changes
|
|
File without changes
|