@pega/custom-dx-components 0.242.37 → 0.242.39
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
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import { DateInput, FieldValueList, DateTimeDisplay, Text, withConfiguration } from '@pega/cosmos-react-core';
|
|
3
|
-
import FormattedText from "./FormattedText";
|
|
4
|
-
|
|
5
|
-
import type { PConnFieldProps } from './PConnProps';
|
|
6
|
-
|
|
7
|
-
import StyledPegaDxilMyDateWrapper from './styles';
|
|
8
|
-
|
|
9
|
-
// includes in bundle
|
|
10
|
-
import {
|
|
11
|
-
datetimedisplayformatter,
|
|
12
|
-
formatExists,
|
|
13
|
-
getFullYear,
|
|
14
|
-
getMaxDate,
|
|
15
|
-
getMinDate,
|
|
16
|
-
datetimeFireChangeBlurEvents,
|
|
17
|
-
getDateFormat
|
|
18
|
-
} from "./date";
|
|
19
|
-
import { suggestionsHandler } from './suggestions-handler';
|
|
20
|
-
import type { DateTimeFormat, DateTimeVariant } from '@pega/cosmos-react-core/lib/components/DateTime/DateTime.types.js';
|
|
21
|
-
|
|
22
|
-
// interface for props
|
|
23
|
-
interface PegaDxilMyDateProps extends PConnFieldProps {
|
|
24
|
-
// If any, enter additional props that only exist on TextInput here
|
|
25
|
-
displayAsStatus?: boolean;
|
|
26
|
-
isTableFormatter?: boolean;
|
|
27
|
-
hasSuggestions?: boolean;
|
|
28
|
-
variant?: any;
|
|
29
|
-
formatter?: string;
|
|
30
|
-
withSeconds: boolean;
|
|
31
|
-
nextYearRange: string;
|
|
32
|
-
previousYearRange: string;
|
|
33
|
-
showWeekNumber: boolean;
|
|
34
|
-
showAsFormattedText: boolean;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// interface for StateProps object
|
|
38
|
-
interface StateProps {
|
|
39
|
-
value: string;
|
|
40
|
-
hasSuggestions: boolean;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
interface ConfigProps {
|
|
44
|
-
formatter?: string | undefined;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
interface ActionsProps {
|
|
48
|
-
onFocus: any;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Duplicated runtime code from Constellation Design System Component
|
|
52
|
-
|
|
53
|
-
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
54
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
55
|
-
function PegaDxilMyDate (props: PegaDxilMyDateProps) {
|
|
56
|
-
const {
|
|
57
|
-
getPConnect,
|
|
58
|
-
value,
|
|
59
|
-
validatemessage,
|
|
60
|
-
label,
|
|
61
|
-
hideLabel = false,
|
|
62
|
-
helperText = '',
|
|
63
|
-
nextYearRange,
|
|
64
|
-
previousYearRange,
|
|
65
|
-
showWeekNumber = false,
|
|
66
|
-
testId,
|
|
67
|
-
showAsFormattedText = false,
|
|
68
|
-
additionalProps = {},
|
|
69
|
-
displayMode,
|
|
70
|
-
variant = 'inline',
|
|
71
|
-
hasSuggestions = false
|
|
72
|
-
} = props;
|
|
73
|
-
|
|
74
|
-
let {formatter = 'defaultDate' } = props;
|
|
75
|
-
const pConn = getPConnect();
|
|
76
|
-
const actions = pConn.getActionsApi();
|
|
77
|
-
const actionsProps = pConn.getActionsApi() as unknown as ActionsProps;
|
|
78
|
-
const stateProps = pConn.getStateProps() as StateProps;
|
|
79
|
-
const propName: string = stateProps.value;
|
|
80
|
-
|
|
81
|
-
let { readOnly = false, required = false, disabled = false } = props;
|
|
82
|
-
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
83
|
-
(prop) => prop === true || (typeof prop === "string" && prop === "true")
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
const [status, setStatus] = useState(hasSuggestions ? 'pending' : '');
|
|
87
|
-
|
|
88
|
-
// cast status
|
|
89
|
-
let myStatus: 'success' | 'warning' | 'error' | 'pending';
|
|
90
|
-
// eslint-disable-next-line prefer-const
|
|
91
|
-
myStatus = status as 'success' | 'warning' | 'error' | 'pending';
|
|
92
|
-
|
|
93
|
-
useEffect(() => {
|
|
94
|
-
if (validatemessage !== '') {
|
|
95
|
-
setStatus('error');
|
|
96
|
-
}
|
|
97
|
-
if (hasSuggestions) {
|
|
98
|
-
setStatus('pending');
|
|
99
|
-
} else if (!hasSuggestions && myStatus !== 'success') {
|
|
100
|
-
// @ts-ignore
|
|
101
|
-
setStatus(validatemessage !== '' ? 'error' : undefined);
|
|
102
|
-
}
|
|
103
|
-
}, [validatemessage, hasSuggestions, myStatus]);
|
|
104
|
-
|
|
105
|
-
// calculate min and max range of calendar
|
|
106
|
-
const currentYear = getFullYear(null);
|
|
107
|
-
|
|
108
|
-
const yearFromValue = getFullYear(value);
|
|
109
|
-
const maxDate = getMaxDate(
|
|
110
|
-
parseInt(nextYearRange, 10),
|
|
111
|
-
currentYear,
|
|
112
|
-
yearFromValue
|
|
113
|
-
);
|
|
114
|
-
const minDate = getMinDate(
|
|
115
|
-
parseInt(previousYearRange, 10),
|
|
116
|
-
currentYear,
|
|
117
|
-
yearFromValue
|
|
118
|
-
);
|
|
119
|
-
|
|
120
|
-
const onResolveSuggestionHandler = (accepted: boolean) => {
|
|
121
|
-
suggestionsHandler(accepted, pConn, setStatus);
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
function handleBlur(onBlurValue: any) {
|
|
127
|
-
const { valueAsISOString: date, state: errorState } = onBlurValue;
|
|
128
|
-
const trimmedDate = date ? date.substring(0, date.indexOf('T')) : date;
|
|
129
|
-
datetimeFireChangeBlurEvents(errorState, value, trimmedDate, actions, propName, pConn);
|
|
130
|
-
const isValueChanged = !(value === undefined && trimmedDate === '') && value !== trimmedDate;
|
|
131
|
-
if (hasSuggestions && isValueChanged) {
|
|
132
|
-
pConn.ignoreSuggestion("");
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function handleChange(onChangeValue: any) {
|
|
137
|
-
const { valueAsISOString: date } = onChangeValue;
|
|
138
|
-
const trimmedDate = date ? date.substring(0, date.indexOf('T')) : date;
|
|
139
|
-
if (hasSuggestions && value !== trimmedDate) {
|
|
140
|
-
setStatus("");
|
|
141
|
-
}
|
|
142
|
-
pConn.clearErrorMessages({
|
|
143
|
-
category: "",
|
|
144
|
-
property: propName,
|
|
145
|
-
context: ""
|
|
146
|
-
})
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (displayMode === 'LABELS_LEFT' || displayMode === 'STACKED_LARGE_VAL' || displayMode === 'DISPLAY_ONLY') {
|
|
150
|
-
let variantValue = "date";
|
|
151
|
-
let formatValue = "long";
|
|
152
|
-
if (pConn && pConn.getConfigProps()){
|
|
153
|
-
const configProps = pConn.getConfigProps() as ConfigProps;
|
|
154
|
-
const runtimeformatter = configProps?.formatter;
|
|
155
|
-
|
|
156
|
-
if (formatter !== runtimeformatter) {
|
|
157
|
-
formatter = runtimeformatter!;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
if (formatter !== "" && formatExists(formatter)) {
|
|
163
|
-
// @ts-ignore
|
|
164
|
-
const {variantVal, formatVal} = datetimedisplayformatter(formatter);
|
|
165
|
-
variantValue = variantVal;
|
|
166
|
-
formatValue = formatVal;
|
|
167
|
-
}
|
|
168
|
-
const displayComp = (
|
|
169
|
-
<DateTimeDisplay
|
|
170
|
-
variant={variantValue as DateTimeVariant}
|
|
171
|
-
format={formatValue as DateTimeFormat}
|
|
172
|
-
value={value}
|
|
173
|
-
/>
|
|
174
|
-
);
|
|
175
|
-
switch(displayMode){
|
|
176
|
-
case 'DISPLAY_ONLY': {
|
|
177
|
-
return ( <StyledPegaDxilMyDateWrapper> {displayComp} </StyledPegaDxilMyDateWrapper>);
|
|
178
|
-
}
|
|
179
|
-
case "LABELS_LEFT" : {
|
|
180
|
-
return (
|
|
181
|
-
<StyledPegaDxilMyDateWrapper>
|
|
182
|
-
<FieldValueList
|
|
183
|
-
variant={hideLabel ? "stacked" : variant}
|
|
184
|
-
data-testid={testId}
|
|
185
|
-
fields={[{ id: '1', name: hideLabel ? "" :label, value: displayComp }]}
|
|
186
|
-
/>
|
|
187
|
-
</StyledPegaDxilMyDateWrapper>
|
|
188
|
-
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
case "STACKED_LARGE_VAL" : {
|
|
192
|
-
return (
|
|
193
|
-
<StyledPegaDxilMyDateWrapper>
|
|
194
|
-
<FieldValueList
|
|
195
|
-
variant='stacked'
|
|
196
|
-
data-testid={testId}
|
|
197
|
-
fields={[{ id: '2', name: hideLabel ? "" :label, value: <Text variant='h1' as='span'>{displayComp}</Text> }]}
|
|
198
|
-
/>
|
|
199
|
-
</StyledPegaDxilMyDateWrapper>
|
|
200
|
-
|
|
201
|
-
);
|
|
202
|
-
}
|
|
203
|
-
// no default
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
let dateComponent;
|
|
209
|
-
|
|
210
|
-
if (readOnly && showAsFormattedText) {
|
|
211
|
-
const environmentInfo = PCore.getEnvironmentInfo();
|
|
212
|
-
const locale = environmentInfo && environmentInfo.getLocale();
|
|
213
|
-
const textAdditionalProps = {
|
|
214
|
-
format: getDateFormat(locale as string, {}),
|
|
215
|
-
fieldType: 'Date'
|
|
216
|
-
};
|
|
217
|
-
dateComponent = (
|
|
218
|
-
<StyledPegaDxilMyDateWrapper>
|
|
219
|
-
<FormattedText
|
|
220
|
-
formatType='date'
|
|
221
|
-
value={value}
|
|
222
|
-
label={label}
|
|
223
|
-
hideLabel={hideLabel}
|
|
224
|
-
testId={testId}
|
|
225
|
-
additionalProps={textAdditionalProps}
|
|
226
|
-
customFormat={getDateFormat(locale, null)}
|
|
227
|
-
/>
|
|
228
|
-
</StyledPegaDxilMyDateWrapper>
|
|
229
|
-
);
|
|
230
|
-
} else {
|
|
231
|
-
|
|
232
|
-
dateComponent = (
|
|
233
|
-
<StyledPegaDxilMyDateWrapper>
|
|
234
|
-
<DateInput
|
|
235
|
-
{...additionalProps}
|
|
236
|
-
label={label}
|
|
237
|
-
labelHidden={hideLabel}
|
|
238
|
-
info={validatemessage || helperText}
|
|
239
|
-
status={status}
|
|
240
|
-
value={value || undefined}
|
|
241
|
-
disabled={disabled}
|
|
242
|
-
readOnly={readOnly}
|
|
243
|
-
required={required}
|
|
244
|
-
showWeekNumber={showWeekNumber}
|
|
245
|
-
min={minDate}
|
|
246
|
-
max={maxDate}
|
|
247
|
-
data-testid={testId}
|
|
248
|
-
onFocus={actionsProps.onFocus}
|
|
249
|
-
onChange={handleChange}
|
|
250
|
-
onBlur={handleBlur}
|
|
251
|
-
onResolveSuggestion={onResolveSuggestionHandler}
|
|
252
|
-
/>
|
|
253
|
-
</StyledPegaDxilMyDateWrapper>
|
|
254
|
-
);
|
|
255
|
-
}
|
|
256
|
-
return dateComponent;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
export default withConfiguration(PegaDxilMyDate);
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export const configProps = {
|
|
3
|
-
value: '2023-01-31T12:23:00.000Z',
|
|
4
|
-
validatemessage: '',
|
|
5
|
-
label: 'Date Label',
|
|
6
|
-
hideLabel: false,
|
|
7
|
-
helperText: 'Date helper text',
|
|
8
|
-
nextYearRange: '10',
|
|
9
|
-
previousYearRange: '10',
|
|
10
|
-
showWeekNumber: true,
|
|
11
|
-
testId: '12345678',
|
|
12
|
-
showAsFormattedText: true,
|
|
13
|
-
additionalProps: {},
|
|
14
|
-
displayMode: '',
|
|
15
|
-
variant: '',
|
|
16
|
-
hasSuggestions: false,
|
|
17
|
-
readOnly: false,
|
|
18
|
-
required: false,
|
|
19
|
-
disabled: false,
|
|
20
|
-
status: ''
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const stateProps = {
|
|
24
|
-
value: '.DateLabel'
|
|
25
|
-
};
|
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/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_MyDateTime/config.json
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Pega_DXIL_MyDateTime",
|
|
3
|
-
"label": "My DateTime",
|
|
4
|
-
"description": "My DateTime",
|
|
5
|
-
"organization": "Pega",
|
|
6
|
-
"version": "0.0.1",
|
|
7
|
-
"library": "DXIL",
|
|
8
|
-
"allowedApplications": [],
|
|
9
|
-
"componentKey": "Pega_DXIL_MyDateTime",
|
|
10
|
-
"type": "Field",
|
|
11
|
-
"subtype": "DateTime",
|
|
12
|
-
"icon": "images/pz-text-input-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
|
-
"format": "SELECT",
|
|
27
|
-
"name": "clockFormat",
|
|
28
|
-
"label": "Clock",
|
|
29
|
-
"defaultValue": "0",
|
|
30
|
-
"source": [
|
|
31
|
-
{
|
|
32
|
-
"key": "0",
|
|
33
|
-
"value": "use locale"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"key": "12",
|
|
37
|
-
"value": "12 hours"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"key": "24",
|
|
41
|
-
"value": "24 hours"
|
|
42
|
-
}
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "withSeconds",
|
|
47
|
-
"label": "Display seconds",
|
|
48
|
-
"format": "BOOLEAN"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"label": "Column settings",
|
|
52
|
-
"format": "GROUP",
|
|
53
|
-
"visibility": "@VIEWTYPE == 'MultiRecordDisplayAsTable'",
|
|
54
|
-
"properties": [
|
|
55
|
-
{
|
|
56
|
-
"name": "columnWidth",
|
|
57
|
-
"label": "Column width",
|
|
58
|
-
"format": "SELECT",
|
|
59
|
-
"source": [
|
|
60
|
-
{
|
|
61
|
-
"key": "auto",
|
|
62
|
-
"value": "Auto"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"key": "custom",
|
|
66
|
-
"value": "Custom"
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "width",
|
|
72
|
-
"label": "Width (px)",
|
|
73
|
-
"format": "NUMBER",
|
|
74
|
-
"visibility": "$this.columnWidth == 'custom'"
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"label": "Input settings",
|
|
80
|
-
"format": "GROUP",
|
|
81
|
-
"visibility": "(!readOnly = true)",
|
|
82
|
-
"properties": [
|
|
83
|
-
{
|
|
84
|
-
"format": "LABEL",
|
|
85
|
-
"label": "Year range",
|
|
86
|
-
"variant": "secondary"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"format": "INLINE",
|
|
90
|
-
"elements": [
|
|
91
|
-
{
|
|
92
|
-
"key": "next",
|
|
93
|
-
"format": "LABEL",
|
|
94
|
-
"label": "Next",
|
|
95
|
-
"variant": "secondary"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"key": "nextYears",
|
|
99
|
-
"format": "NUMBER",
|
|
100
|
-
"label": "",
|
|
101
|
-
"name": "nextYearRange",
|
|
102
|
-
"min": 0
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"key": "year",
|
|
106
|
-
"format": "LABEL",
|
|
107
|
-
"label": "years",
|
|
108
|
-
"variant": "secondary"
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"format": "INLINE",
|
|
114
|
-
"elements": [
|
|
115
|
-
{
|
|
116
|
-
"key": "previous",
|
|
117
|
-
"format": "LABEL",
|
|
118
|
-
"label": "Previous",
|
|
119
|
-
"variant": "secondary"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"key": "previousYears",
|
|
123
|
-
"format": "NUMBER",
|
|
124
|
-
"label": "",
|
|
125
|
-
"name": "previousYearRange",
|
|
126
|
-
"min": 0
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"key": "year",
|
|
130
|
-
"format": "LABEL",
|
|
131
|
-
"label": "years",
|
|
132
|
-
"variant": "secondary"
|
|
133
|
-
}
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"name": "showWeekNumber",
|
|
138
|
-
"label": "Display week numbers on calendar",
|
|
139
|
-
"format": "BOOLEAN"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"format": "SELECT",
|
|
143
|
-
"name": "pickerInterval",
|
|
144
|
-
"label": "Time picker",
|
|
145
|
-
"defaultValue": "30",
|
|
146
|
-
"source": [
|
|
147
|
-
{
|
|
148
|
-
"key": "5",
|
|
149
|
-
"value": "5 min"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"key": "10",
|
|
153
|
-
"value": "10 min"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"key": "15",
|
|
157
|
-
"value": "15 min"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"key": "20",
|
|
161
|
-
"value": "20 min"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"key": "30",
|
|
165
|
-
"value": "30 min"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"key": "60",
|
|
169
|
-
"value": "1 hr"
|
|
170
|
-
}
|
|
171
|
-
]
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"name": "helperText",
|
|
175
|
-
"label": "Helper text",
|
|
176
|
-
"format": "TEXT"
|
|
177
|
-
}
|
|
178
|
-
]
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"label": "Read-only settings",
|
|
182
|
-
"format": "GROUP",
|
|
183
|
-
"properties": [
|
|
184
|
-
{
|
|
185
|
-
"name": "showAsFormattedText",
|
|
186
|
-
"label": "Show as formatted text",
|
|
187
|
-
"format": "BOOLEAN"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"format": "SELECT",
|
|
191
|
-
"name": "formatter",
|
|
192
|
-
"label": "Format",
|
|
193
|
-
"defaultValue": "defaultDateTime",
|
|
194
|
-
"source": [
|
|
195
|
-
{
|
|
196
|
-
"key": "defaultDateTime",
|
|
197
|
-
"value": "Default"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"key": "DateTime-Short",
|
|
201
|
-
"value": "Date"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"key": "DateTime-Since",
|
|
205
|
-
"value": "Since"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"key": "Time-Only",
|
|
209
|
-
"value": "Time only"
|
|
210
|
-
}
|
|
211
|
-
]
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"label": "Conditions",
|
|
217
|
-
"format": "GROUP",
|
|
218
|
-
"properties": [
|
|
219
|
-
{
|
|
220
|
-
"name": "required",
|
|
221
|
-
"label": "Required",
|
|
222
|
-
"format": "REQUIRED",
|
|
223
|
-
"visibility": "(!readOnly = true)"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"name": "disabled",
|
|
227
|
-
"label": "Disabled",
|
|
228
|
-
"format": "DISABLED",
|
|
229
|
-
"visibility": "(!readOnly = true)"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"name": "visibility",
|
|
233
|
-
"label": "Visibility",
|
|
234
|
-
"format": "VISIBILITY"
|
|
235
|
-
}
|
|
236
|
-
]
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"label": "Advanced",
|
|
240
|
-
"format": "GROUP",
|
|
241
|
-
"collapsible": true,
|
|
242
|
-
"properties": [
|
|
243
|
-
{
|
|
244
|
-
"name": "testId",
|
|
245
|
-
"label": "Test ID",
|
|
246
|
-
"format": "TEXT",
|
|
247
|
-
"ignorePattern": "[^-_\\p{N}\\p{L}]",
|
|
248
|
-
"includeAnnotations": false
|
|
249
|
-
}
|
|
250
|
-
]
|
|
251
|
-
}
|
|
252
|
-
],
|
|
253
|
-
"defaultConfig": {
|
|
254
|
-
"label": "@L $this.label"
|
|
255
|
-
}
|
|
256
|
-
}
|
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import dayjs from "dayjs";
|
|
2
|
-
import relativeTime from 'dayjs/plugin/relativeTime.js';
|
|
3
|
-
import localizedFormat from 'dayjs/plugin/localizedFormat.js';
|
|
4
|
-
import utc from 'dayjs/plugin/utc.js';
|
|
5
|
-
import timezone from 'dayjs/plugin/timezone.js';
|
|
6
|
-
|
|
7
|
-
dayjs.extend(relativeTime);
|
|
8
|
-
dayjs.extend(localizedFormat);
|
|
9
|
-
dayjs.extend(utc);
|
|
10
|
-
dayjs.extend(timezone);
|
|
11
|
-
|
|
12
|
-
const types = ["fromNow", "customFormat"];
|
|
13
|
-
|
|
14
|
-
// value should be in ISO 8601 format.
|
|
15
|
-
function DateFormatter(
|
|
16
|
-
value : any,
|
|
17
|
-
{ type = types[1], format = "DD/MM/YYYY", tzone = null, fieldType = '' } = {}
|
|
18
|
-
) {
|
|
19
|
-
if (!value) return value;
|
|
20
|
-
switch (type) {
|
|
21
|
-
case types[1]:
|
|
22
|
-
if (tzone && fieldType !== 'Date') return dayjs(value).tz(tzone).format(format); // Date only value should be formatted without timezone
|
|
23
|
-
return dayjs(value).format(format);
|
|
24
|
-
case types[0]:
|
|
25
|
-
return dayjs(value).from(dayjs());
|
|
26
|
-
default:
|
|
27
|
-
return value;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
// value should be in hh:mm:ss format (00:00:00 - 23:59:59).
|
|
31
|
-
function TimeFormatter(value: any, options: any) {
|
|
32
|
-
if (!value) return value;
|
|
33
|
-
const { locale = "en-US" } = options;
|
|
34
|
-
const timeOnlyRegex = /^(?:[01]\d|2[0123]):(?:[012345]\d):(?:[012345]\d)$/;
|
|
35
|
-
if (value.length === 8 && timeOnlyRegex.test(value)) {
|
|
36
|
-
const { timeOptions = {} } = options;
|
|
37
|
-
const tempDate = new Date();
|
|
38
|
-
const hours = parseInt(value.substr(0, 2), 10);
|
|
39
|
-
const minutes = parseInt(value.substr(3, 2), 10);
|
|
40
|
-
const seconds = parseInt(value.substr(6, 2), 10);
|
|
41
|
-
tempDate.setHours(hours);
|
|
42
|
-
tempDate.setMinutes(minutes);
|
|
43
|
-
tempDate.setSeconds(seconds);
|
|
44
|
-
return tempDate.toLocaleTimeString(locale, timeOptions);
|
|
45
|
-
}
|
|
46
|
-
return DateFormatter(value, options);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const DateTimeShortFormatter = (value: any, options: any) => {
|
|
50
|
-
return DateFormatter(value, {
|
|
51
|
-
...options,
|
|
52
|
-
type: "customFormat",
|
|
53
|
-
format: "MMM DD, YYYY"
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export default {
|
|
58
|
-
"DateTime-Long": (value: any, options: any) =>
|
|
59
|
-
DateFormatter(value, { ...options, type: "customFormat", format: "LLL" }),
|
|
60
|
-
"DateTime-Short": DateTimeShortFormatter,
|
|
61
|
-
"DateTime-Since": (value: any) => DateFormatter(value, { type: "fromNow" }),
|
|
62
|
-
"Time-Only": (value: any, options: any) =>
|
|
63
|
-
TimeFormatter(value, {
|
|
64
|
-
...options,
|
|
65
|
-
type: "customFormat",
|
|
66
|
-
format: "hh:mm:ss A"
|
|
67
|
-
}),
|
|
68
|
-
convertToTimezone: (value: any, options: any) => {
|
|
69
|
-
return value && options && options.timezone
|
|
70
|
-
? DateFormatter(value, {
|
|
71
|
-
...options,
|
|
72
|
-
type: "customFormat",
|
|
73
|
-
format: "YYYY-MM-DDTHH:mm:ss"
|
|
74
|
-
})
|
|
75
|
-
: value;
|
|
76
|
-
},
|
|
77
|
-
convertFromTimezone: (value: any, tzone: any) =>
|
|
78
|
-
value && tzone
|
|
79
|
-
? dayjs.tz(value, tzone).utc().format("YYYY-MM-DDTHH:mm:ss[Z]")
|
|
80
|
-
: value,
|
|
81
|
-
Date: (value: any, options: any) =>
|
|
82
|
-
DateFormatter(value, { type: "customFormat", ...options }),
|
|
83
|
-
"Date-Default": DateTimeShortFormatter,
|
|
84
|
-
"Date-Time-Default": (value: any, options: any) =>
|
|
85
|
-
DateFormatter(value, { ...options, type: "customFormat", format: "lll" }),
|
|
86
|
-
"Time-Default": (value: any, options: any) =>
|
|
87
|
-
TimeFormatter(value, {
|
|
88
|
-
...options,
|
|
89
|
-
type: "customFormat",
|
|
90
|
-
format: "hh:mm A"
|
|
91
|
-
})
|
|
92
|
-
};
|