@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_MyURL/demo.stories.tsx
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-useless-fragment */
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
|
|
4
|
-
import PegaDxilMyUrl from './index';
|
|
5
|
-
import { stateProps, configProps } from './mock';
|
|
6
|
-
|
|
7
|
-
const meta: Meta<typeof PegaDxilMyUrl> = {
|
|
8
|
-
title: 'PegaDxilMyUrl',
|
|
9
|
-
component: PegaDxilMyUrl,
|
|
10
|
-
excludeStories: /.*Data$/
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default meta;
|
|
14
|
-
type Story = StoryObj<typeof PegaDxilMyUrl>;
|
|
15
|
-
|
|
16
|
-
export const BasePegaDxilMyUrl: Story = (args: any) => {
|
|
17
|
-
|
|
18
|
-
const props = {
|
|
19
|
-
value: configProps.value,
|
|
20
|
-
hasSuggestions: configProps.hasSuggestions,
|
|
21
|
-
getPConnect: () => {
|
|
22
|
-
return {
|
|
23
|
-
getStateProps: () => {
|
|
24
|
-
return stateProps;
|
|
25
|
-
},
|
|
26
|
-
getActionsApi: () => {
|
|
27
|
-
return {
|
|
28
|
-
updateFieldValue: () => {/* nothing */},
|
|
29
|
-
triggerFieldChange: () => {/* nothing */}
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
ignoreSuggestion: () => {/* nothing */},
|
|
33
|
-
acceptSuggestion: () => {/* nothing */},
|
|
34
|
-
setInheritedProps: () => {/* nothing */},
|
|
35
|
-
resolveConfigProps: () => {/* nothing */}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<>
|
|
42
|
-
<PegaDxilMyUrl {...props} {...args} />
|
|
43
|
-
</>
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
BasePegaDxilMyUrl.args = {
|
|
48
|
-
label: configProps.label,
|
|
49
|
-
helperText: configProps.helperText,
|
|
50
|
-
placeholder: configProps.placeholder,
|
|
51
|
-
testId: configProps.testId,
|
|
52
|
-
readOnly: configProps.readOnly,
|
|
53
|
-
disabled: configProps.disabled,
|
|
54
|
-
required: configProps.required,
|
|
55
|
-
status: configProps.status,
|
|
56
|
-
hideLabel: configProps.hideLabel,
|
|
57
|
-
displayMode: configProps.displayMode,
|
|
58
|
-
variant: configProps.variant,
|
|
59
|
-
validatemessage: configProps.validatemessage
|
|
60
|
-
};
|
|
@@ -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;
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useRef} from "react";
|
|
2
|
-
import { Input, FieldValueList, Text, withConfiguration } from "@pega/cosmos-react-core";
|
|
3
|
-
import type { PConnFieldProps } from './PConnProps';
|
|
4
|
-
|
|
5
|
-
// includes in bundle
|
|
6
|
-
import {formatExists,textFormatter, urlFormatter} from "./text-url";
|
|
7
|
-
import handleEvent from "./event-utils";
|
|
8
|
-
import { suggestionsHandler } from './suggestions-handler';
|
|
9
|
-
|
|
10
|
-
import StyledPegaDxilMyUrlWrapper from './styles';
|
|
11
|
-
|
|
12
|
-
// interface for props
|
|
13
|
-
interface PegaDxilMyUrlProps extends PConnFieldProps {
|
|
14
|
-
// If any, enter additional props that only exist on TextInput here
|
|
15
|
-
displayAsStatus?: boolean;
|
|
16
|
-
displayAs: string;
|
|
17
|
-
isTableFormatter?: boolean;
|
|
18
|
-
hasSuggestions?: boolean;
|
|
19
|
-
variant?: any;
|
|
20
|
-
formatter: string;
|
|
21
|
-
datasource: Array<any>;
|
|
22
|
-
widthSel: string;
|
|
23
|
-
customWidth: number;
|
|
24
|
-
altText: string;
|
|
25
|
-
altTextOfImage: string;
|
|
26
|
-
propaltTextOfImage: string;
|
|
27
|
-
urlLabel: string;
|
|
28
|
-
propUrlLabel: string;
|
|
29
|
-
urlLabelSelection: string;
|
|
30
|
-
tableDisplayAs: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// interface for StateProps object
|
|
34
|
-
interface StateProps {
|
|
35
|
-
value: string;
|
|
36
|
-
hasSuggestions: boolean;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Duplicated runtime code from Constellation Design System Component
|
|
40
|
-
|
|
41
|
-
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
42
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
43
|
-
function PegaDxilMyUrl(props: PegaDxilMyUrlProps) {
|
|
44
|
-
const {
|
|
45
|
-
getPConnect,
|
|
46
|
-
value,
|
|
47
|
-
hideLabel = false,
|
|
48
|
-
placeholder,
|
|
49
|
-
validatemessage,
|
|
50
|
-
label,
|
|
51
|
-
helperText,
|
|
52
|
-
testId,
|
|
53
|
-
displayMode,
|
|
54
|
-
additionalProps = {},
|
|
55
|
-
variant = 'inline',
|
|
56
|
-
isTableFormatter = false,
|
|
57
|
-
displayAs = 'defaultURL',
|
|
58
|
-
widthSel = 'defaultWidth',
|
|
59
|
-
customWidth,
|
|
60
|
-
altText = 'constant',
|
|
61
|
-
altTextOfImage,
|
|
62
|
-
propaltTextOfImage,
|
|
63
|
-
urlLabel,
|
|
64
|
-
propUrlLabel,
|
|
65
|
-
urlLabelSelection = 'constant',
|
|
66
|
-
tableDisplayAs = 'link',
|
|
67
|
-
hasSuggestions = false
|
|
68
|
-
} = props;
|
|
69
|
-
const { formatter } = props;
|
|
70
|
-
const pConn = getPConnect();
|
|
71
|
-
const actions = pConn.getActionsApi();
|
|
72
|
-
const stateProps = pConn.getStateProps() as StateProps;
|
|
73
|
-
const propName: string = stateProps.value;
|
|
74
|
-
const hasValueChange = useRef(false);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
78
|
-
let { readOnly = false, required = false, disabled = false } = props;
|
|
79
|
-
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
80
|
-
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
const [inputValue, setInputValue] = useState(value);
|
|
84
|
-
const [status, setStatus] = useState(hasSuggestions ? 'pending' : undefined);
|
|
85
|
-
useEffect(() => setInputValue(value), [value]);
|
|
86
|
-
|
|
87
|
-
useEffect(() => {
|
|
88
|
-
if (validatemessage !== '') {
|
|
89
|
-
setStatus('error');
|
|
90
|
-
}
|
|
91
|
-
if (hasSuggestions) {
|
|
92
|
-
setStatus('pending');
|
|
93
|
-
} else if (!hasSuggestions && status !== 'success') {
|
|
94
|
-
setStatus(validatemessage !== '' ? 'error' : undefined);
|
|
95
|
-
}
|
|
96
|
-
}, [validatemessage, hasSuggestions, status]);
|
|
97
|
-
|
|
98
|
-
let displayComp: any = null;
|
|
99
|
-
if (displayMode) {
|
|
100
|
-
displayComp = urlFormatter(value, {
|
|
101
|
-
displayAs,
|
|
102
|
-
tableDisplayAs,
|
|
103
|
-
isTableFormatter,
|
|
104
|
-
altText,
|
|
105
|
-
altTextOfImage,
|
|
106
|
-
propaltTextOfImage,
|
|
107
|
-
urlLabelSelection,
|
|
108
|
-
urlLabel,
|
|
109
|
-
propUrlLabel,
|
|
110
|
-
widthSel,
|
|
111
|
-
customWidth
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if (displayMode === 'LABELS_LEFT' || displayMode === 'DISPLAY_ONLY') {
|
|
118
|
-
if (isTableFormatter && formatter !== 'URL' && formatExists(formatter)) {
|
|
119
|
-
displayComp = textFormatter(formatter, value);
|
|
120
|
-
}
|
|
121
|
-
return displayMode === 'DISPLAY_ONLY' ? (
|
|
122
|
-
displayComp
|
|
123
|
-
) : (
|
|
124
|
-
<StyledPegaDxilMyUrlWrapper>
|
|
125
|
-
<FieldValueList
|
|
126
|
-
variant={hideLabel ? 'stacked' : variant}
|
|
127
|
-
data-testid={testId}
|
|
128
|
-
fields={[{ id: '1', name: hideLabel ? '' : label, value: displayComp }]}
|
|
129
|
-
/>
|
|
130
|
-
</StyledPegaDxilMyUrlWrapper>
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
135
|
-
return (
|
|
136
|
-
<StyledPegaDxilMyUrlWrapper>
|
|
137
|
-
<FieldValueList
|
|
138
|
-
variant='stacked'
|
|
139
|
-
data-testid={testId}
|
|
140
|
-
fields={[
|
|
141
|
-
{
|
|
142
|
-
id: '2',
|
|
143
|
-
name: hideLabel ? '' : label,
|
|
144
|
-
value: (
|
|
145
|
-
<Text variant='h1' as='span'>
|
|
146
|
-
{displayComp}
|
|
147
|
-
</Text>
|
|
148
|
-
)
|
|
149
|
-
}
|
|
150
|
-
]}
|
|
151
|
-
/>
|
|
152
|
-
</StyledPegaDxilMyUrlWrapper>
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
const onResolveSuggestionHandler = (accepted: boolean) => {
|
|
157
|
-
suggestionsHandler(accepted, pConn, setStatus);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
return (
|
|
161
|
-
<StyledPegaDxilMyUrlWrapper>
|
|
162
|
-
<Input
|
|
163
|
-
{...additionalProps}
|
|
164
|
-
type='url'
|
|
165
|
-
label={label}
|
|
166
|
-
labelHidden={hideLabel}
|
|
167
|
-
info={validatemessage || helperText}
|
|
168
|
-
status={status}
|
|
169
|
-
value={inputValue}
|
|
170
|
-
placeholder={placeholder}
|
|
171
|
-
disabled={disabled}
|
|
172
|
-
readOnly={readOnly}
|
|
173
|
-
required={required}
|
|
174
|
-
data-testid={testId}
|
|
175
|
-
onChange={(event: any) => {
|
|
176
|
-
if (hasSuggestions) {
|
|
177
|
-
setStatus('');
|
|
178
|
-
}
|
|
179
|
-
setInputValue(event.target.value);
|
|
180
|
-
if (value !== event.target.value) {
|
|
181
|
-
handleEvent(actions, 'change', propName, event.target.value);
|
|
182
|
-
hasValueChange.current = true;
|
|
183
|
-
}
|
|
184
|
-
}}
|
|
185
|
-
onBlur={(event: any) => {
|
|
186
|
-
if (!value || hasValueChange.current) {
|
|
187
|
-
handleEvent(actions, 'blur', propName, event.target.value);
|
|
188
|
-
if (hasSuggestions) {
|
|
189
|
-
pConn.ignoreSuggestion('');
|
|
190
|
-
}
|
|
191
|
-
hasValueChange.current = false;
|
|
192
|
-
}
|
|
193
|
-
}}
|
|
194
|
-
// @ts-ignore
|
|
195
|
-
onFocus={actions.onFocus}
|
|
196
|
-
onResolveSuggestion={onResolveSuggestionHandler}
|
|
197
|
-
/>
|
|
198
|
-
</StyledPegaDxilMyUrlWrapper>
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
export default withConfiguration(PegaDxilMyUrl);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export const configProps = {
|
|
2
|
-
value: '',
|
|
3
|
-
label: 'URL Sample',
|
|
4
|
-
placeholder: 'URL Placeholder',
|
|
5
|
-
helperText: 'URL Helper Text',
|
|
6
|
-
testId: 'url-12345678',
|
|
7
|
-
hasSuggestions: false,
|
|
8
|
-
displayMode: '',
|
|
9
|
-
variant: '',
|
|
10
|
-
hideLabel: false,
|
|
11
|
-
readOnly: false,
|
|
12
|
-
required: false,
|
|
13
|
-
disabled: false,
|
|
14
|
-
status: '',
|
|
15
|
-
validatemessage: ''
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const fieldMetadata = {
|
|
19
|
-
classID: 'DIXL-MediaCo-Work-NewService',
|
|
20
|
-
type: 'Text',
|
|
21
|
-
maxLength: 256,
|
|
22
|
-
displayAs: 'pxURL',
|
|
23
|
-
label: 'URL sample',
|
|
24
|
-
validateAs: 'pxIsValidURL'
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const stateProps = {
|
|
28
|
-
value: '.URLSample',
|
|
29
|
-
hasSuggestions: false
|
|
30
|
-
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { useState, useRef, Fragment} from "react";
|
|
2
|
-
import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
|
|
3
|
-
|
|
4
|
-
export const formatExists = (formatterVal: string) => {
|
|
5
|
-
const formatterValues = [
|
|
6
|
-
"TextInput",
|
|
7
|
-
"WorkStatus",
|
|
8
|
-
"RichText",
|
|
9
|
-
"Email",
|
|
10
|
-
"Phone",
|
|
11
|
-
"URL",
|
|
12
|
-
"Operator"
|
|
13
|
-
];
|
|
14
|
-
let isformatter = false;
|
|
15
|
-
if (formatterValues.includes(formatterVal)) {
|
|
16
|
-
isformatter = true;
|
|
17
|
-
}
|
|
18
|
-
return isformatter;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const urlLabelVal = (urlLabelSelection: string, btnVal: string, urlLabel: string, propUrlLabel: string) => {
|
|
22
|
-
if ((urlLabel !== '' || propUrlLabel !== '') && btnVal !== null) {
|
|
23
|
-
switch (urlLabelSelection) {
|
|
24
|
-
case 'constant': {
|
|
25
|
-
btnVal = urlLabel;
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
case 'propertyRef': {
|
|
29
|
-
btnVal = propUrlLabel;
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
// no default
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return btnVal;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const isImage = (url: string) => /\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(url);
|
|
39
|
-
|
|
40
|
-
const TableImage = (imageProps: any) => {
|
|
41
|
-
const { value, altText, altTextOfImage, propaltTextOfImage, urlLabelSelection, urlLabel, propUrlLabel } = imageProps;
|
|
42
|
-
const demoButtonRef = useRef(null);
|
|
43
|
-
let imageDisplayComp = null;
|
|
44
|
-
const [images, setImages] = useState(null);
|
|
45
|
-
const imgDescription = {
|
|
46
|
-
id: 'url',
|
|
47
|
-
name: urlLabelSelection === 'constant' ? urlLabel : propUrlLabel,
|
|
48
|
-
description: altText === 'constant' ? altTextOfImage : propaltTextOfImage,
|
|
49
|
-
src: value
|
|
50
|
-
};
|
|
51
|
-
const onClick = () => {
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
setImages([imgDescription]);
|
|
54
|
-
};
|
|
55
|
-
const onItemDownload = async (id: string) => {
|
|
56
|
-
const a = document.createElement('a');
|
|
57
|
-
// @ts-ignore
|
|
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
|
-
|
|
66
|
-
// @ts-ignore
|
|
67
|
-
a.download = images?.find((image) => image.id === id)?.name ?? id;
|
|
68
|
-
document.body.appendChild(a);
|
|
69
|
-
a.click();
|
|
70
|
-
document.body.removeChild(a);
|
|
71
|
-
};
|
|
72
|
-
let btnVal = value;
|
|
73
|
-
btnVal = urlLabelVal(urlLabelSelection, btnVal, urlLabel, propUrlLabel);
|
|
74
|
-
imageDisplayComp = (
|
|
75
|
-
<Fragment>
|
|
76
|
-
{btnVal !== null && (
|
|
77
|
-
<Button ref={demoButtonRef} variant='link' compact={false} onClick={onClick} autoFocus>
|
|
78
|
-
{btnVal}
|
|
79
|
-
</Button>
|
|
80
|
-
)}
|
|
81
|
-
{images && (
|
|
82
|
-
<Lightbox
|
|
83
|
-
items={images}
|
|
84
|
-
cycle={false}
|
|
85
|
-
onAfterClose={() => {
|
|
86
|
-
setImages(null);
|
|
87
|
-
// @ts-ignore
|
|
88
|
-
demoButtonRef.current?.focus();
|
|
89
|
-
}}
|
|
90
|
-
// @ts-ignore
|
|
91
|
-
onItemDownload={isImage(images[0].src) ? onItemDownload : undefined}
|
|
92
|
-
/>
|
|
93
|
-
)}
|
|
94
|
-
</Fragment>
|
|
95
|
-
);
|
|
96
|
-
return imageDisplayComp;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export const textFormatter = (formatter: string, value: any) => {
|
|
100
|
-
let displayComponent = null;
|
|
101
|
-
switch(formatter){
|
|
102
|
-
case "TextInput" : {
|
|
103
|
-
displayComponent = value;
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
case "Email" : {
|
|
107
|
-
displayComponent = (<EmailDisplay value={value} displayText={value} variant="link" />);
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
case "Phone" : {
|
|
111
|
-
displayComponent = (<PhoneDisplay value={value} variant="link" />);
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
case "URL" : {
|
|
115
|
-
displayComponent = (<URLDisplay target="_blank" value={value} displayText={value} variant="link" />);
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
// no default
|
|
119
|
-
}
|
|
120
|
-
return displayComponent;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Returns a URL display component based on the options
|
|
125
|
-
* @function urlFormatter
|
|
126
|
-
* @param {string} value value
|
|
127
|
-
* @param {object} options options for formatting
|
|
128
|
-
* { displayAs,tableDisplayAs,isTableFormatter,altText,altTextOfImage,propaltTextOfImage,urlLabelSelection, urlLabel,propUrlLabel, widthSel, customWidth}
|
|
129
|
-
*/
|
|
130
|
-
export const urlFormatter = (value: string, options: any) => {
|
|
131
|
-
const {
|
|
132
|
-
displayAs,
|
|
133
|
-
tableDisplayAs,
|
|
134
|
-
isTableFormatter,
|
|
135
|
-
altText,
|
|
136
|
-
altTextOfImage,
|
|
137
|
-
propaltTextOfImage,
|
|
138
|
-
urlLabelSelection,
|
|
139
|
-
urlLabel,
|
|
140
|
-
propUrlLabel,
|
|
141
|
-
widthSel,
|
|
142
|
-
customWidth
|
|
143
|
-
} = options;
|
|
144
|
-
|
|
145
|
-
let urlFormatComp = null;
|
|
146
|
-
if (
|
|
147
|
-
(displayAs === 'labelText' || (isTableFormatter && tableDisplayAs === 'link')) &&
|
|
148
|
-
(urlLabel !== '' || propUrlLabel !== '')
|
|
149
|
-
) {
|
|
150
|
-
urlFormatComp = (
|
|
151
|
-
<URLDisplay
|
|
152
|
-
target='_blank'
|
|
153
|
-
value={value}
|
|
154
|
-
displayText={urlLabelSelection === 'constant' ? urlLabel : propUrlLabel}
|
|
155
|
-
variant='link'
|
|
156
|
-
/>
|
|
157
|
-
);
|
|
158
|
-
} else if ((displayAs === 'Image' || tableDisplayAs === 'Image') && !!value) {
|
|
159
|
-
if (isTableFormatter) {
|
|
160
|
-
urlFormatComp = TableImage({
|
|
161
|
-
value,
|
|
162
|
-
altText,
|
|
163
|
-
altTextOfImage,
|
|
164
|
-
propaltTextOfImage,
|
|
165
|
-
urlLabelSelection,
|
|
166
|
-
urlLabel,
|
|
167
|
-
propUrlLabel
|
|
168
|
-
});
|
|
169
|
-
} else {
|
|
170
|
-
const width = widthSel === 'widthpx' ? customWidth : null;
|
|
171
|
-
urlFormatComp = (
|
|
172
|
-
<Image src={value} width={width} alt={altText === 'constant' ? altTextOfImage : propaltTextOfImage} />
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
} else {
|
|
176
|
-
urlFormatComp = <URLDisplay target='_blank' value={value} displayText={value} variant='link' />;
|
|
177
|
-
}
|
|
178
|
-
return urlFormatComp;
|
|
179
|
-
};
|
|
@@ -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
|
-
}
|
|
@@ -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
|
-
}
|
|
@@ -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
|
-
}
|