@pega/custom-dx-components 0.242.37 → 0.242.38
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/build-jest-assets/index.js +26 -5
- package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +0 -3
- package/src/tasks/create-all/index.js +1 -0
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/src/util.js +19 -4
- package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +0 -3
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +1 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +0 -3
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +0 -3
- package/tests/functional/localCreatePublishAllDeleteAll.test.js +1 -1
- package/tests/functional/localLibCreateLibListDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +11 -1
- package/tests/functional/localLibCreateLibVersionDeleteLib.test.js +4 -4
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.ts +0 -35
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyBoolean/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyBoolean/boolean-format.ts +0 -25
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +0 -145
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +0 -70
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyBoolean/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +0 -165
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyBoolean/mock.ts +0 -22
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/OneColumnPage.svg +0 -36
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +0 -23
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +0 -84
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +0 -72
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/mock.ts +0 -391
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCurrency/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +0 -291
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +0 -68
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCurrency/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +0 -279
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.ts +0 -33
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyCurrency/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.ts +0 -61
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.tsx +0 -20
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +0 -199
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts +0 -439
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +0 -86
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +0 -260
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/mock.ts +0 -25
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDate/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +0 -256
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.ts +0 -92
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.ts +0 -288
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date.ts +0 -331
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +0 -85
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +0 -251
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/mock.ts +0 -27
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/suggestions-handler.ts +0 -10
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDecimal/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +0 -278
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +0 -63
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDecimal/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +0 -244
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDecimal/mock.ts +0 -30
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDecimal/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/Avatar.tsx +0 -76
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/DetailsRender.tsx +0 -52
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/OneColumnDetails.svg +0 -22
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/Operator.tsx +0 -215
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.tsx +0 -26
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/config.json +0 -35
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +0 -204
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +0 -99
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/mock.ts +0 -248
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.ts +0 -24
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDetails/utils.js +0 -151
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyEmail/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +0 -111
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +0 -63
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyEmail/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +0 -212
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyEmail/mock.ts +0 -31
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyEmail/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyForm/DefaultForm.svg +0 -29
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyForm/DetailsRender.tsx +0 -59
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyForm/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyForm/config.json +0 -45
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.tsx +0 -246
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +0 -68
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyForm/mock.ts +0 -139
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +0 -32
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +0 -102
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/index.tsx +0 -212
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/mock.ts +0 -4
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyInteger/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +0 -344
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +0 -63
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyInteger/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +0 -305
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.ts +0 -29
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyInteger/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.tsx +0 -45
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/OneColumnPage.svg +0 -36
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/config.json +0 -32
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +0 -111
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +0 -71
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/localizations.json +0 -6
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/mock.ts +0 -94
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.ts +0 -229
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -76
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/OneColumnPage.svg +0 -36
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.tsx +0 -210
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/config.json +0 -55
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +0 -80
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -89
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/mock.ts +0 -51
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/OneColumnPage.svg +0 -36
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/config.json +0 -59
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +0 -118
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +0 -106
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/mock.ts +0 -24
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyParagraph/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +0 -111
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +0 -63
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyParagraph/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +0 -210
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyParagraph/mock.ts +0 -28
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyParagraph/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPercentage/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +0 -93
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +0 -64
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPercentage/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +0 -262
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.ts +0 -29
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPercentage/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPhone/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +0 -123
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +0 -61
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPhone/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +0 -245
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPhone/mock.ts +0 -45
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPhone/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPicklist/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +0 -114
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +0 -92
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPicklist/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +0 -338
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.ts +0 -76
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyPicklist/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/config.json +0 -113
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/demo.stories.tsx +0 -95
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/index.tsx +0 -191
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/mock.ts +0 -75
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/textformat-utils.tsx +0 -162
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/component-constants.ts +0 -5
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/config.json +0 -115
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.ts +0 -163
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +0 -100
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/embed-utils.ts +0 -314
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/format-constants.ts +0 -41
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +0 -1144
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/mock.ts +0 -74
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/picklist-utils.ts +0 -88
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-constants.ts +0 -20
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -658
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/textformat-utils.tsx +0 -181
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +0 -221
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyText/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +0 -55
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +0 -67
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +0 -145
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyText/mock.ts +0 -21
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyText/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTextInput/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -26
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +0 -111
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +0 -63
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTextInput/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +0 -224
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTextInput/mock.ts +0 -30
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTextInput/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +0 -185
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +0 -65
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +0 -209
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/mock.ts +0 -21
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.ts +0 -288
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -76
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +0 -52
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Operator.tsx +0 -215
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -26
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/TwoColumnDetails.svg +0 -28
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/config.json +0 -42
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +0 -221
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +0 -86
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/mock.ts +0 -288
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.ts +0 -23
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.ts +0 -149
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +0 -59
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/TwoColumn.svg +0 -38
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/config.json +0 -27
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +0 -192
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +0 -73
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/mock.ts +0 -145
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyURL/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +0 -237
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +0 -60
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyURL/event-utils.ts +0 -18
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +0 -203
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyURL/mock.ts +0 -30
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.ts +0 -8
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyURL/suggestions-handler.ts +0 -9
- package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.tsx +0 -179
- package/tests/assets/library/components/createAll/Launchpad/shared/PConnProps.d.ts +0 -46
- package/tests/assets/library/components/createAll/Launchpad/shared/suggestions-handler.ts +0 -9
- package/tests/assets/original/components/create/shared/PConnProps.d.ts +0 -46
- package/tests/assets/original/components/create/shared/create-nonce.ts +0 -6
- package/tests/assets/original/components/create/shared/suggestions-handler.ts +0 -9
- package/tests/assets/original/components/createAll/Constellation/shared/PConnProps.d.ts +0 -46
- package/tests/assets/original/components/createAll/Constellation/shared/create-nonce.ts +0 -6
- package/tests/assets/original/components/createAll/Constellation/shared/suggestions-handler.ts +0 -9
- package/tests/assets/original/components/createAll/Launchpad/shared/PConnProps.d.ts +0 -46
- package/tests/assets/original/components/createAll/Launchpad/shared/create-nonce.ts +0 -6
- package/tests/assets/original/components/createAll/Launchpad/shared/suggestions-handler.ts +0 -9
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/event-utils.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const handleEvent = (actions: any, eventType: string, propName: string, value: string) => {
|
|
2
|
-
switch (eventType) {
|
|
3
|
-
case 'change':
|
|
4
|
-
actions.updateFieldValue(propName, value);
|
|
5
|
-
break;
|
|
6
|
-
case 'blur':
|
|
7
|
-
actions.triggerFieldChange(propName, value);
|
|
8
|
-
break;
|
|
9
|
-
case 'changeNblur':
|
|
10
|
-
actions.updateFieldValue(propName, value);
|
|
11
|
-
actions.triggerFieldChange(propName, value);
|
|
12
|
-
break;
|
|
13
|
-
default:
|
|
14
|
-
break;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default handleEvent;
|
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/index.tsx
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-nested-ternary */
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { RadioButton, RadioButtonGroup, withConfiguration } from '@pega/cosmos-react-core';
|
|
4
|
-
import type { PConnFieldProps } from './PConnProps';
|
|
5
|
-
|
|
6
|
-
// includes in bundle
|
|
7
|
-
import { formatExists, textFormatter } from './textformat-utils';
|
|
8
|
-
import handleEvent from './event-utils';
|
|
9
|
-
|
|
10
|
-
import StyledPegaDxilMyRadiobuttonsWrapper from './styles';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// interface for props
|
|
14
|
-
interface PegaDxilMyRadiobuttonsProps extends PConnFieldProps {
|
|
15
|
-
// If any, enter additional props that only exist on TextInput here
|
|
16
|
-
isTableFormatter?: boolean;
|
|
17
|
-
hasSuggestions?: boolean;
|
|
18
|
-
formatter: string;
|
|
19
|
-
listType: string;
|
|
20
|
-
datasource: Array<any>;
|
|
21
|
-
inline: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// interface for StateProps object
|
|
26
|
-
interface StateProps {
|
|
27
|
-
value: string;
|
|
28
|
-
hasSuggestions: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const getFullReference = (pConn: any, configProperty: string) => {
|
|
32
|
-
const pageReference = pConn.getPageReference();
|
|
33
|
-
return pageReference ? `${pageReference}.${configProperty}` : configProperty;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const getDisplayValue = (dataSource: any, value: any, isDatapage: boolean) => {
|
|
37
|
-
if (value !== 0 && (!value || (typeof value === 'string' && !value.trim().length))) {
|
|
38
|
-
return <span aria-hidden='true'>––</span>;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const matchedEntry =
|
|
42
|
-
dataSource &&
|
|
43
|
-
dataSource.filter((entry: any) => {
|
|
44
|
-
return entry.key === value;
|
|
45
|
-
})[0];
|
|
46
|
-
return matchedEntry ? (isDatapage ? matchedEntry.text : matchedEntry.value) : value;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// Duplicated runtime code from Constellation Design System Component
|
|
51
|
-
|
|
52
|
-
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
53
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
54
|
-
function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProps) {
|
|
55
|
-
const {
|
|
56
|
-
getPConnect,
|
|
57
|
-
value,
|
|
58
|
-
label,
|
|
59
|
-
hideLabel = false,
|
|
60
|
-
helperText,
|
|
61
|
-
datasource = [],
|
|
62
|
-
listType,
|
|
63
|
-
validatemessage,
|
|
64
|
-
testId,
|
|
65
|
-
additionalProps = {},
|
|
66
|
-
displayMode,
|
|
67
|
-
inline = false,
|
|
68
|
-
placeholder,
|
|
69
|
-
fieldMetadata = {},
|
|
70
|
-
isTableFormatter = false
|
|
71
|
-
} = props;
|
|
72
|
-
const pConn = getPConnect();
|
|
73
|
-
const { formatter } = props;
|
|
74
|
-
const actions = pConn.getActionsApi();
|
|
75
|
-
const stateProps = pConn.getStateProps() as StateProps;
|
|
76
|
-
const propName: string = stateProps.value;
|
|
77
|
-
const configProps = pConn.getConfigProps();
|
|
78
|
-
const className = pConn.getCaseInfo().getClassName();
|
|
79
|
-
const { getLocaleRuleNameFromKeys, getLocalizedValue } = pConn;
|
|
80
|
-
|
|
81
|
-
// @ts-ignore
|
|
82
|
-
let configProperty = pConn.getRawMetadata()?.config?.value || '';
|
|
83
|
-
configProperty = configProperty.startsWith('@P') ? configProperty.substring(3) : configProperty;
|
|
84
|
-
configProperty = configProperty.startsWith('.') ? configProperty.substring(1) : configProperty;
|
|
85
|
-
const fullReference = getFullReference(pConn, configProperty);
|
|
86
|
-
|
|
87
|
-
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
88
|
-
let { readOnly = false, required = false, disabled = false } = props;
|
|
89
|
-
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
90
|
-
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
let status = '';
|
|
94
|
-
if (validatemessage !== '') {
|
|
95
|
-
status = 'error';
|
|
96
|
-
}
|
|
97
|
-
const metaData = Array.isArray(fieldMetadata)
|
|
98
|
-
? fieldMetadata.filter((field) => field?.classID === className)[0]
|
|
99
|
-
: fieldMetadata;
|
|
100
|
-
let displayName = metaData?.datasource?.propertyForDisplayText;
|
|
101
|
-
displayName = displayName?.slice(displayName.lastIndexOf('.') + 1);
|
|
102
|
-
const localeContext = metaData?.datasource?.tableType === 'DataPage' ? 'datapage' : 'associated';
|
|
103
|
-
const localeClass = localeContext === 'datapage' ? '@baseclass' : className;
|
|
104
|
-
const localeName = localeContext === 'datapage' ? metaData?.datasource?.name : configProperty;
|
|
105
|
-
const localePath = localeContext === 'datapage' ? displayName : localeName;
|
|
106
|
-
|
|
107
|
-
const items: Array<any> = [];
|
|
108
|
-
const isDatapage = listType === 'datapage';
|
|
109
|
-
const listSource = isDatapage ? configProps.listOutput : datasource;
|
|
110
|
-
let autoFocusProp = additionalProps?.autoFocus
|
|
111
|
-
? {
|
|
112
|
-
autoFocus: true
|
|
113
|
-
}
|
|
114
|
-
: {};
|
|
115
|
-
if (placeholder) {
|
|
116
|
-
items.push(
|
|
117
|
-
<RadioButton
|
|
118
|
-
{...autoFocusProp}
|
|
119
|
-
defaultChecked={value === ''}
|
|
120
|
-
id={`${fullReference}.EMPTY`}
|
|
121
|
-
value=''
|
|
122
|
-
key={`${fullReference}.EMPTY`}
|
|
123
|
-
label={placeholder}
|
|
124
|
-
name={fullReference}
|
|
125
|
-
/>
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
(listSource || []).forEach((item: any) => {
|
|
129
|
-
if (additionalProps?.autoFocus && value === item.key) {
|
|
130
|
-
autoFocusProp = {
|
|
131
|
-
autoFocus: true
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
items.push(
|
|
135
|
-
<RadioButton
|
|
136
|
-
{...autoFocusProp}
|
|
137
|
-
checked={`${value}` === `${item.key}`}
|
|
138
|
-
id={`${fullReference}.${item.key}`}
|
|
139
|
-
value={item.key}
|
|
140
|
-
key={`${fullReference}.${item.key}`}
|
|
141
|
-
label={getLocalizedValue(
|
|
142
|
-
isDatapage ? item.text : item.value,
|
|
143
|
-
localePath,
|
|
144
|
-
getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
145
|
-
)}
|
|
146
|
-
name={fullReference}
|
|
147
|
-
/>
|
|
148
|
-
);
|
|
149
|
-
autoFocusProp = {};
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
const displayComponent = useMemo(() => {
|
|
153
|
-
const displayValue = getDisplayValue(listSource, value, isDatapage);
|
|
154
|
-
|
|
155
|
-
return isTableFormatter && formatExists(formatter) ? textFormatter(formatter, displayValue) : displayValue;
|
|
156
|
-
}, [listSource, value, isDatapage, isTableFormatter, formatter]);
|
|
157
|
-
|
|
158
|
-
if (displayMode === 'DISPLAY_ONLY') {
|
|
159
|
-
return displayComponent;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return (
|
|
163
|
-
<StyledPegaDxilMyRadiobuttonsWrapper>
|
|
164
|
-
<RadioButtonGroup
|
|
165
|
-
{...additionalProps}
|
|
166
|
-
label={label}
|
|
167
|
-
labelHidden={hideLabel}
|
|
168
|
-
info={validatemessage || helperText}
|
|
169
|
-
inline={inline}
|
|
170
|
-
status={status}
|
|
171
|
-
data-testid={testId}
|
|
172
|
-
value={value}
|
|
173
|
-
required={required}
|
|
174
|
-
readOnly={readOnly}
|
|
175
|
-
onChange={(event) => {
|
|
176
|
-
handleEvent(actions, 'changeNblur', propName, event.target.value);
|
|
177
|
-
}}
|
|
178
|
-
onBlur={(event: any) => {
|
|
179
|
-
pConn.getValidationApi().validate(event.target.value);
|
|
180
|
-
}}
|
|
181
|
-
disabled={disabled}
|
|
182
|
-
className='standard'
|
|
183
|
-
name={fullReference}
|
|
184
|
-
>
|
|
185
|
-
{items}
|
|
186
|
-
</RadioButtonGroup>
|
|
187
|
-
</StyledPegaDxilMyRadiobuttonsWrapper>
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export default withConfiguration(PegaDxilMyRadiobuttons);
|
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/mock.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'Picklist Sample',
|
|
4
|
-
placeholder: 'Select...',
|
|
5
|
-
listType: 'associated',
|
|
6
|
-
datasource: [
|
|
7
|
-
{
|
|
8
|
-
key: 'Option 1',
|
|
9
|
-
value: 'Option 1'
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
key: 'Option 2',
|
|
13
|
-
value: 'Option 2'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
key: 'Option 3',
|
|
17
|
-
value: 'Option 3'
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
helperText: 'Picklist Helper Text',
|
|
21
|
-
testId: 'picklist-12345678',
|
|
22
|
-
hasSuggestions: false,
|
|
23
|
-
displayMode: '',
|
|
24
|
-
inline: false,
|
|
25
|
-
hideLabel: false,
|
|
26
|
-
readOnly: false,
|
|
27
|
-
required: false,
|
|
28
|
-
disabled: false,
|
|
29
|
-
status: '',
|
|
30
|
-
validatemessage: ''
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const stateProps = {
|
|
34
|
-
value: '.PicklistSample',
|
|
35
|
-
placeholder: 'Select...',
|
|
36
|
-
datasource: '.PicklistSample',
|
|
37
|
-
hasSuggestions: false
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const rawMetadata = {
|
|
41
|
-
type: 'Dropdown',
|
|
42
|
-
config: {
|
|
43
|
-
value: '@P .PicklistSample',
|
|
44
|
-
label: '@L Picklist Sample',
|
|
45
|
-
placeholder: '@L Select...',
|
|
46
|
-
listType: 'associated',
|
|
47
|
-
datasource: '@ASSOCIATED .PicklistSample',
|
|
48
|
-
helperText: '@L Picklist Helper Text',
|
|
49
|
-
testId: 'picklist-12345678'
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const fieldMetadata = {
|
|
54
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
55
|
-
type: 'Text',
|
|
56
|
-
displayAs: 'pxDropdown',
|
|
57
|
-
label: 'Picklist sample',
|
|
58
|
-
datasource: {
|
|
59
|
-
tableType: 'PromptList',
|
|
60
|
-
records: [
|
|
61
|
-
{
|
|
62
|
-
key: 'Option 1',
|
|
63
|
-
value: 'Option 1'
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
key: 'Option 2',
|
|
67
|
-
value: 'Option 2'
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
key: 'Option 3',
|
|
71
|
-
value: 'Option 3'
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
|
|
3
|
-
import { useRef, useState } from 'react';
|
|
4
|
-
|
|
5
|
-
export const formatExists = (formatterVal) => {
|
|
6
|
-
const formatterValues = ['TextInput', 'Email', 'Phone'];
|
|
7
|
-
let isformatter = false;
|
|
8
|
-
if (formatterValues.includes(formatterVal)) {
|
|
9
|
-
isformatter = true;
|
|
10
|
-
}
|
|
11
|
-
return isformatter;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const urlLabelVal = (urlLabelSelection, btnVal, urlLabel, propUrlLabel) => {
|
|
15
|
-
if ((urlLabel !== '' || propUrlLabel !== '') && btnVal !== null) {
|
|
16
|
-
switch (urlLabelSelection) {
|
|
17
|
-
case 'constant': {
|
|
18
|
-
btnVal = urlLabel;
|
|
19
|
-
break;
|
|
20
|
-
}
|
|
21
|
-
case 'propertyRef': {
|
|
22
|
-
btnVal = propUrlLabel;
|
|
23
|
-
break;
|
|
24
|
-
}
|
|
25
|
-
// no default
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return btnVal;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const isImage = (url) => /\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(url);
|
|
32
|
-
|
|
33
|
-
const TableImage = (imageProps) => {
|
|
34
|
-
const { value, altText, altTextOfImage, propaltTextOfImage, urlLabelSelection, urlLabel, propUrlLabel } = imageProps;
|
|
35
|
-
const demoButtonRef = useRef(null);
|
|
36
|
-
let imageDisplayComp = null;
|
|
37
|
-
const [images, setImages] = useState(null);
|
|
38
|
-
const imgDescription = {
|
|
39
|
-
id: 'url',
|
|
40
|
-
name: urlLabelSelection === 'constant' ? urlLabel : propUrlLabel,
|
|
41
|
-
description: altText === 'constant' ? altTextOfImage : propaltTextOfImage,
|
|
42
|
-
src: value
|
|
43
|
-
};
|
|
44
|
-
const onClick = () => {
|
|
45
|
-
setImages([imgDescription]);
|
|
46
|
-
};
|
|
47
|
-
const onItemDownload = async (id) => {
|
|
48
|
-
const a = document.createElement('a');
|
|
49
|
-
a.href = await fetch(images[0].src)
|
|
50
|
-
.then((response) => {
|
|
51
|
-
return response.blob();
|
|
52
|
-
})
|
|
53
|
-
.then((blob) => {
|
|
54
|
-
return URL.createObjectURL(blob);
|
|
55
|
-
});
|
|
56
|
-
a.download = images?.find((image) => image.id === id)?.name ?? id;
|
|
57
|
-
document.body.appendChild(a);
|
|
58
|
-
a.click();
|
|
59
|
-
document.body.removeChild(a);
|
|
60
|
-
};
|
|
61
|
-
let btnVal = value;
|
|
62
|
-
btnVal = urlLabelVal(urlLabelSelection, btnVal, urlLabel, propUrlLabel);
|
|
63
|
-
imageDisplayComp = (
|
|
64
|
-
<>
|
|
65
|
-
{btnVal !== null && (
|
|
66
|
-
<Button ref={demoButtonRef} variant='link' compact={false} onClick={onClick} autoFocus>
|
|
67
|
-
{btnVal}
|
|
68
|
-
</Button>
|
|
69
|
-
)}
|
|
70
|
-
{images && (
|
|
71
|
-
<Lightbox
|
|
72
|
-
items={images}
|
|
73
|
-
cycle={false}
|
|
74
|
-
onAfterClose={() => {
|
|
75
|
-
setImages(null);
|
|
76
|
-
demoButtonRef.current?.focus();
|
|
77
|
-
}}
|
|
78
|
-
onItemDownload={isImage(images[0].src) ? onItemDownload : undefined}
|
|
79
|
-
/>
|
|
80
|
-
)}
|
|
81
|
-
</>
|
|
82
|
-
);
|
|
83
|
-
return imageDisplayComp;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const textFormatter = (formatter, value) => {
|
|
87
|
-
let displayComponent = null;
|
|
88
|
-
switch (formatter) {
|
|
89
|
-
case 'TextInput': {
|
|
90
|
-
displayComponent = value;
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
case 'Email': {
|
|
94
|
-
displayComponent = <EmailDisplay value={value} displayText={value} variant='link' />;
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
case 'Phone': {
|
|
98
|
-
displayComponent = <PhoneDisplay value={value} variant='link' />;
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
// no default
|
|
102
|
-
}
|
|
103
|
-
return displayComponent;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Returns a URL display component based on the options
|
|
108
|
-
* @function urlFormatter
|
|
109
|
-
* @param {string} value value
|
|
110
|
-
* @param {object} options options for formatting
|
|
111
|
-
* { displayAs,tableDisplayAs,isTableFormatter,altText,altTextOfImage,propaltTextOfImage,urlLabelSelection, urlLabel,propUrlLabel, widthSel, customWidth}
|
|
112
|
-
*/
|
|
113
|
-
export const urlFormatter = (value, options) => {
|
|
114
|
-
const {
|
|
115
|
-
displayAs,
|
|
116
|
-
tableDisplayAs,
|
|
117
|
-
isTableFormatter,
|
|
118
|
-
altText,
|
|
119
|
-
altTextOfImage,
|
|
120
|
-
propaltTextOfImage,
|
|
121
|
-
urlLabelSelection,
|
|
122
|
-
urlLabel,
|
|
123
|
-
propUrlLabel,
|
|
124
|
-
widthSel,
|
|
125
|
-
customWidth
|
|
126
|
-
} = options;
|
|
127
|
-
|
|
128
|
-
let urlFormatComp = null;
|
|
129
|
-
if (
|
|
130
|
-
(displayAs === 'labelText' || (isTableFormatter && tableDisplayAs === 'link')) &&
|
|
131
|
-
(urlLabel !== '' || propUrlLabel !== '')
|
|
132
|
-
) {
|
|
133
|
-
urlFormatComp = (
|
|
134
|
-
<URLDisplay
|
|
135
|
-
target='_blank'
|
|
136
|
-
value={value}
|
|
137
|
-
displayText={urlLabelSelection === 'constant' ? urlLabel : propUrlLabel}
|
|
138
|
-
variant='link'
|
|
139
|
-
/>
|
|
140
|
-
);
|
|
141
|
-
} else if ((displayAs === 'Image' || tableDisplayAs === 'Image') && !!value) {
|
|
142
|
-
if (isTableFormatter) {
|
|
143
|
-
urlFormatComp = TableImage({
|
|
144
|
-
value,
|
|
145
|
-
altText,
|
|
146
|
-
altTextOfImage,
|
|
147
|
-
propaltTextOfImage,
|
|
148
|
-
urlLabelSelection,
|
|
149
|
-
urlLabel,
|
|
150
|
-
propUrlLabel
|
|
151
|
-
});
|
|
152
|
-
} else {
|
|
153
|
-
const width = widthSel === 'widthpx' ? customWidth : null;
|
|
154
|
-
urlFormatComp = (
|
|
155
|
-
<Image src={value} width={width} alt={altText === 'constant' ? altTextOfImage : propaltTextOfImage} />
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
} else {
|
|
159
|
-
urlFormatComp = <URLDisplay target='_blank' value={value} displayText={value} variant='link' />;
|
|
160
|
-
}
|
|
161
|
-
return urlFormatComp;
|
|
162
|
-
};
|
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/PConnProps.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {PConnect } from '@pega/pcore-pconnect-typedefs';
|
|
2
|
-
|
|
3
|
-
// PConnProps.d.ts
|
|
4
|
-
// This gives us a place to have each component (which is most DX Components) that is
|
|
5
|
-
// expected to have a getPConnect extend its props (from BaseProps)
|
|
6
|
-
// such that every component will be expected to have a getPConnect() function
|
|
7
|
-
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
8
|
-
// This PConnProps can be extended to include other props that we know are in every component
|
|
9
|
-
export interface PConnProps {
|
|
10
|
-
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
11
|
-
getPConnect: () => typeof PConnect;
|
|
12
|
-
|
|
13
|
-
// Allow any/all other key/value pairs in the BaseProps for now
|
|
14
|
-
// TODO: refine which other props are always expected for various component
|
|
15
|
-
// types and consider further interface "subclassing". For example, we may
|
|
16
|
-
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
17
|
-
// and any other props that every Form component expects.
|
|
18
|
-
// For example, see the PConnFieldProps below.
|
|
19
|
-
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
20
|
-
// otherwise undefined types to appear. This can be helpful for debugging
|
|
21
|
-
// or when adding new components whose types aren't yet known.
|
|
22
|
-
// [key: string]: any;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
27
|
-
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
28
|
-
// components/field directory
|
|
29
|
-
export interface PConnFieldProps extends PConnProps {
|
|
30
|
-
label: string,
|
|
31
|
-
required: boolean,
|
|
32
|
-
disabled: boolean,
|
|
33
|
-
value: any,
|
|
34
|
-
validatemessage: string,
|
|
35
|
-
status?: string,
|
|
36
|
-
onChange?: any,
|
|
37
|
-
onBlur?: any,
|
|
38
|
-
readOnly: boolean,
|
|
39
|
-
testId: string,
|
|
40
|
-
helperText: string,
|
|
41
|
-
displayMode?: string,
|
|
42
|
-
hideLabel: boolean,
|
|
43
|
-
placeholder?: string,
|
|
44
|
-
fieldMetadata?: any,
|
|
45
|
-
additionalProps?: any
|
|
46
|
-
}
|
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/config.json
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Pega_DXIL_MySearchbox",
|
|
3
|
-
"label": "My Search box",
|
|
4
|
-
"description": "My Search box",
|
|
5
|
-
"organization": "Pega",
|
|
6
|
-
"version": "0.0.1",
|
|
7
|
-
"library": "DXIL",
|
|
8
|
-
"allowedApplications": [],
|
|
9
|
-
"componentKey": "Pega_DXIL_MySearchbox",
|
|
10
|
-
"type": "Field",
|
|
11
|
-
"subtype": "Picklist",
|
|
12
|
-
"icon": "images/pz-dropdown-active.svg",
|
|
13
|
-
"properties": [
|
|
14
|
-
{
|
|
15
|
-
"name": "label",
|
|
16
|
-
"label": "Field label",
|
|
17
|
-
"format": "TEXT",
|
|
18
|
-
"required": true
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"name": "readOnly",
|
|
22
|
-
"label": "Edit mode",
|
|
23
|
-
"format": "READONLY"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"label": "Column settings",
|
|
27
|
-
"format": "GROUP",
|
|
28
|
-
"visibility": "@VIEWTYPE == 'MultiRecordDisplayAsTable'",
|
|
29
|
-
"properties": [
|
|
30
|
-
{
|
|
31
|
-
"name": "columnWidth",
|
|
32
|
-
"label": "Column width",
|
|
33
|
-
"format": "SELECT",
|
|
34
|
-
"source": [
|
|
35
|
-
{
|
|
36
|
-
"key": "auto",
|
|
37
|
-
"value": "Auto"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"key": "custom",
|
|
41
|
-
"value": "Custom"
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "width",
|
|
47
|
-
"label": "Width (px)",
|
|
48
|
-
"format": "NUMBER",
|
|
49
|
-
"visibility": "$this.columnWidth == 'custom'"
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"label": "Input settings",
|
|
55
|
-
"format": "GROUP",
|
|
56
|
-
"visibility": "(!readOnly = true)",
|
|
57
|
-
"properties": [
|
|
58
|
-
{
|
|
59
|
-
"name": "placeholder",
|
|
60
|
-
"label": "Placeholder",
|
|
61
|
-
"format": "TEXT"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"name": "helperText",
|
|
65
|
-
"label": "Helper text",
|
|
66
|
-
"format": "TEXT"
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"label": "Conditions",
|
|
72
|
-
"format": "GROUP",
|
|
73
|
-
"properties": [
|
|
74
|
-
{
|
|
75
|
-
"name": "required",
|
|
76
|
-
"label": "Required",
|
|
77
|
-
"format": "REQUIRED",
|
|
78
|
-
"visibility": "(!readOnly = true)"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"name": "disabled",
|
|
82
|
-
"label": "Disabled",
|
|
83
|
-
"format": "DISABLED",
|
|
84
|
-
"visibility": "(!readOnly = true)"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"name": "visibility",
|
|
88
|
-
"label": "Visibility",
|
|
89
|
-
"format": "VISIBILITY"
|
|
90
|
-
}
|
|
91
|
-
]
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"label": "Advanced",
|
|
95
|
-
"format": "GROUP",
|
|
96
|
-
"collapsible": true,
|
|
97
|
-
"properties": [
|
|
98
|
-
{
|
|
99
|
-
"name": "testId",
|
|
100
|
-
"label": "Test ID",
|
|
101
|
-
"format": "TEXT",
|
|
102
|
-
"ignorePattern": "[^-_\\p{N}\\p{L}]",
|
|
103
|
-
"includeAnnotations": false
|
|
104
|
-
}
|
|
105
|
-
]
|
|
106
|
-
}
|
|
107
|
-
],
|
|
108
|
-
"defaultConfig": {
|
|
109
|
-
"label": "@L $this.label",
|
|
110
|
-
"placeholder": "@L Select...",
|
|
111
|
-
"listType": "associated",
|
|
112
|
-
"datasource": "@ASSOCIATED .$this.name",
|
|
113
|
-
"deferDatasource": true
|
|
114
|
-
}
|
|
115
|
-
}
|