@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,181 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import {
|
|
3
|
-
EmailDisplay,
|
|
4
|
-
PhoneDisplay,
|
|
5
|
-
URLDisplay,
|
|
6
|
-
Image,
|
|
7
|
-
Button,
|
|
8
|
-
Lightbox
|
|
9
|
-
} from '@pega/cosmos-react-core';
|
|
10
|
-
import { useRef, useState } from 'react';
|
|
11
|
-
|
|
12
|
-
export const formatExists = formatterVal => {
|
|
13
|
-
const formatterValues = ['TextInput', 'Email', 'Phone'];
|
|
14
|
-
let isformatter = false;
|
|
15
|
-
if (formatterValues.includes(formatterVal)) {
|
|
16
|
-
isformatter = true;
|
|
17
|
-
}
|
|
18
|
-
return isformatter;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const urlLabelVal = (urlLabelSelection, btnVal, urlLabel, propUrlLabel) => {
|
|
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 => /\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(url);
|
|
39
|
-
|
|
40
|
-
const TableImage = imageProps => {
|
|
41
|
-
const {
|
|
42
|
-
value,
|
|
43
|
-
altText,
|
|
44
|
-
altTextOfImage,
|
|
45
|
-
propaltTextOfImage,
|
|
46
|
-
urlLabelSelection,
|
|
47
|
-
urlLabel,
|
|
48
|
-
propUrlLabel
|
|
49
|
-
} = imageProps;
|
|
50
|
-
const demoButtonRef = useRef(null);
|
|
51
|
-
let imageDisplayComp = null;
|
|
52
|
-
const [images, setImages] = useState(null);
|
|
53
|
-
const imgDescription = {
|
|
54
|
-
id: 'url',
|
|
55
|
-
name: urlLabelSelection === 'constant' ? urlLabel : propUrlLabel,
|
|
56
|
-
description: altText === 'constant' ? altTextOfImage : propaltTextOfImage,
|
|
57
|
-
src: value
|
|
58
|
-
};
|
|
59
|
-
const onClick = () => {
|
|
60
|
-
setImages([imgDescription]);
|
|
61
|
-
};
|
|
62
|
-
const onItemDownload = async id => {
|
|
63
|
-
const a = document.createElement('a');
|
|
64
|
-
a.href = await fetch(images[0].src)
|
|
65
|
-
.then(response => {
|
|
66
|
-
return response.blob();
|
|
67
|
-
})
|
|
68
|
-
.then(blob => {
|
|
69
|
-
return URL.createObjectURL(blob);
|
|
70
|
-
});
|
|
71
|
-
a.download = images?.find(image => image.id === id)?.name ?? id;
|
|
72
|
-
document.body.appendChild(a);
|
|
73
|
-
a.click();
|
|
74
|
-
document.body.removeChild(a);
|
|
75
|
-
};
|
|
76
|
-
let btnVal = value;
|
|
77
|
-
btnVal = urlLabelVal(urlLabelSelection, btnVal, urlLabel, propUrlLabel);
|
|
78
|
-
imageDisplayComp = (
|
|
79
|
-
<>
|
|
80
|
-
{btnVal !== null && (
|
|
81
|
-
<Button ref={demoButtonRef} variant='link' compact={false} onClick={onClick} autoFocus>
|
|
82
|
-
{btnVal}
|
|
83
|
-
</Button>
|
|
84
|
-
)}
|
|
85
|
-
{images && (
|
|
86
|
-
<Lightbox
|
|
87
|
-
items={images}
|
|
88
|
-
cycle={false}
|
|
89
|
-
onAfterClose={() => {
|
|
90
|
-
setImages(null);
|
|
91
|
-
demoButtonRef.current?.focus();
|
|
92
|
-
}}
|
|
93
|
-
onItemDownload={isImage(images[0].src) ? onItemDownload : undefined}
|
|
94
|
-
/>
|
|
95
|
-
)}
|
|
96
|
-
</>
|
|
97
|
-
);
|
|
98
|
-
return imageDisplayComp;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export const textFormatter = (formatter, value) => {
|
|
102
|
-
let displayComponent = null;
|
|
103
|
-
switch (formatter) {
|
|
104
|
-
case 'TextInput': {
|
|
105
|
-
displayComponent = value;
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
case 'Email': {
|
|
109
|
-
displayComponent = <EmailDisplay value={value} displayText={value} variant='link' />;
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
case 'Phone': {
|
|
113
|
-
displayComponent = <PhoneDisplay value={value} variant='link' />;
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
// no default
|
|
117
|
-
}
|
|
118
|
-
return displayComponent;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Returns a URL display component based on the options
|
|
123
|
-
* @function urlFormatter
|
|
124
|
-
* @param {string} value value
|
|
125
|
-
* @param {object} options options for formatting
|
|
126
|
-
* { displayAs,tableDisplayAs,isTableFormatter,altText,altTextOfImage,propaltTextOfImage,urlLabelSelection, urlLabel,propUrlLabel, widthSel, customWidth}
|
|
127
|
-
*/
|
|
128
|
-
export const urlFormatter = (value, options) => {
|
|
129
|
-
const {
|
|
130
|
-
displayAs,
|
|
131
|
-
tableDisplayAs,
|
|
132
|
-
isTableFormatter,
|
|
133
|
-
altText,
|
|
134
|
-
altTextOfImage,
|
|
135
|
-
propaltTextOfImage,
|
|
136
|
-
urlLabelSelection,
|
|
137
|
-
urlLabel,
|
|
138
|
-
propUrlLabel,
|
|
139
|
-
widthSel,
|
|
140
|
-
customWidth
|
|
141
|
-
} = options;
|
|
142
|
-
|
|
143
|
-
let urlFormatComp = null;
|
|
144
|
-
if (
|
|
145
|
-
(displayAs === 'labelText' || (isTableFormatter && tableDisplayAs === 'link')) &&
|
|
146
|
-
(urlLabel !== '' || propUrlLabel !== '')
|
|
147
|
-
) {
|
|
148
|
-
urlFormatComp = (
|
|
149
|
-
<URLDisplay
|
|
150
|
-
target='_blank'
|
|
151
|
-
value={value}
|
|
152
|
-
displayText={urlLabelSelection === 'constant' ? urlLabel : propUrlLabel}
|
|
153
|
-
variant='link'
|
|
154
|
-
/>
|
|
155
|
-
);
|
|
156
|
-
} else if ((displayAs === 'Image' || tableDisplayAs === 'Image') && !!value) {
|
|
157
|
-
if (isTableFormatter) {
|
|
158
|
-
urlFormatComp = TableImage({
|
|
159
|
-
value,
|
|
160
|
-
altText,
|
|
161
|
-
altTextOfImage,
|
|
162
|
-
propaltTextOfImage,
|
|
163
|
-
urlLabelSelection,
|
|
164
|
-
urlLabel,
|
|
165
|
-
propUrlLabel
|
|
166
|
-
});
|
|
167
|
-
} else {
|
|
168
|
-
const width = widthSel === 'widthpx' ? customWidth : null;
|
|
169
|
-
urlFormatComp = (
|
|
170
|
-
<Image
|
|
171
|
-
src={value}
|
|
172
|
-
width={width}
|
|
173
|
-
alt={altText === 'constant' ? altTextOfImage : propaltTextOfImage}
|
|
174
|
-
/>
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
} else {
|
|
178
|
-
urlFormatComp = <URLDisplay target='_blank' value={value} displayText={value} variant='link' />;
|
|
179
|
-
}
|
|
180
|
-
return urlFormatComp;
|
|
181
|
-
};
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from 'react';
|
|
2
|
-
import equal from 'fast-deep-equal';
|
|
3
|
-
import get from 'lodash.get';
|
|
4
|
-
|
|
5
|
-
import { getFieldNameFromEmbeddedFieldName } from './embed-utils';
|
|
6
|
-
|
|
7
|
-
import { buildColumnForDisplayValue, setValuesToPropertyList } from './index';
|
|
8
|
-
|
|
9
|
-
export function usePaginate() {
|
|
10
|
-
const paginatationProperties = useRef({
|
|
11
|
-
startIndex: 0,
|
|
12
|
-
endIndex: 50,
|
|
13
|
-
matchPosition: '',
|
|
14
|
-
totalRecords: []
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
// clean up on unmount
|
|
19
|
-
return () => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
paginatationProperties.current = null;
|
|
22
|
-
};
|
|
23
|
-
}, []);
|
|
24
|
-
|
|
25
|
-
const getInitialPaginatedRecords = (totalRecords: any, matchPosition: string) => {
|
|
26
|
-
const initialPaginatedRecords = totalRecords.slice(0, 50);
|
|
27
|
-
paginatationProperties.current.startIndex = 0;
|
|
28
|
-
paginatationProperties.current.endIndex = 50;
|
|
29
|
-
paginatationProperties.current.matchPosition = matchPosition;
|
|
30
|
-
paginatationProperties.current.totalRecords = totalRecords;
|
|
31
|
-
return initialPaginatedRecords;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const positionMatches = (text: string, searchText: string) => {
|
|
35
|
-
switch (paginatationProperties.current.matchPosition) {
|
|
36
|
-
case 'start':
|
|
37
|
-
return text.toLowerCase().startsWith(searchText.toLowerCase());
|
|
38
|
-
case 'contains':
|
|
39
|
-
return text.toLowerCase().includes(searchText.toLowerCase());
|
|
40
|
-
default:
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const fetchData = (searchText: string, onScroll: boolean, columns = []) => {
|
|
46
|
-
let progressivePaginatedRecords;
|
|
47
|
-
paginatationProperties.current.startIndex += 50;
|
|
48
|
-
paginatationProperties.current.endIndex += 50;
|
|
49
|
-
|
|
50
|
-
if (searchText === '' || searchText === undefined || searchText === null) {
|
|
51
|
-
// paginate on entire resultset
|
|
52
|
-
progressivePaginatedRecords = paginatationProperties.current.totalRecords.slice(
|
|
53
|
-
paginatationProperties.current.startIndex,
|
|
54
|
-
paginatationProperties.current.endIndex
|
|
55
|
-
);
|
|
56
|
-
} else if (onScroll) {
|
|
57
|
-
// paginate on filtered resultset
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
progressivePaginatedRecords = paginatationProperties.current.filteredRecords.slice(
|
|
60
|
-
paginatationProperties.current.startIndex,
|
|
61
|
-
paginatationProperties.current.endIndex
|
|
62
|
-
);
|
|
63
|
-
} else {
|
|
64
|
-
// @ts-ignore
|
|
65
|
-
const searchInSecondaryItem = columns.some(e => e.secondary && e.useForSearch);
|
|
66
|
-
// Filter the items and paginate on filtered resultset
|
|
67
|
-
const filteredRecords = paginatationProperties.current.totalRecords.filter(
|
|
68
|
-
filteritem =>
|
|
69
|
-
// @ts-ignore
|
|
70
|
-
(filteritem.primary && positionMatches(filteritem.primary, searchText)) ||
|
|
71
|
-
(searchInSecondaryItem &&
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
filteritem.secondary &&
|
|
74
|
-
// @ts-ignore
|
|
75
|
-
filteritem.secondary.length > 0 &&
|
|
76
|
-
// @ts-ignore
|
|
77
|
-
filteritem.secondary.find(item => positionMatches(item, searchText)))
|
|
78
|
-
);
|
|
79
|
-
progressivePaginatedRecords = filteredRecords.slice(
|
|
80
|
-
paginatationProperties.current.startIndex,
|
|
81
|
-
paginatationProperties.current.endIndex
|
|
82
|
-
);
|
|
83
|
-
// @ts-ignore
|
|
84
|
-
paginatationProperties.current.filteredRecords = filteredRecords;
|
|
85
|
-
}
|
|
86
|
-
return progressivePaginatedRecords;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const resetIndexes = () => {
|
|
90
|
-
paginatationProperties.current.startIndex = -50;
|
|
91
|
-
paginatationProperties.current.endIndex = 0;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
const hasMoreResults = (searchText: string) => {
|
|
95
|
-
if (searchText === '' || searchText === undefined || searchText === null) {
|
|
96
|
-
return (
|
|
97
|
-
paginatationProperties.current.startIndex + 50 <
|
|
98
|
-
paginatationProperties.current.totalRecords.length
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
return (
|
|
102
|
-
// @ts-ignore
|
|
103
|
-
paginatationProperties.current.startIndex + 50 <
|
|
104
|
-
// @ts-ignore
|
|
105
|
-
paginatationProperties.current.filteredRecords.length
|
|
106
|
-
);
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
return {
|
|
110
|
-
getInitialPaginatedRecords,
|
|
111
|
-
fetchData,
|
|
112
|
-
resetIndexes,
|
|
113
|
-
hasMoreResults
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export function useDeepMemo(memoFn: any, key: any) {
|
|
118
|
-
const ref = useRef();
|
|
119
|
-
// @ts-ignore
|
|
120
|
-
if (!ref.current || !equal(key, ref.current.key)) {
|
|
121
|
-
// @ts-ignore
|
|
122
|
-
ref.current = { key, value: memoFn() };
|
|
123
|
-
}
|
|
124
|
-
// @ts-ignore
|
|
125
|
-
return ref.current.value;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export function useIsMount() {
|
|
129
|
-
const isMountRef = useRef(true);
|
|
130
|
-
useEffect(() => {
|
|
131
|
-
isMountRef.current = false;
|
|
132
|
-
}, []);
|
|
133
|
-
return isMountRef.current;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const transformSearchedItem = (
|
|
137
|
-
displayResponseData: any,
|
|
138
|
-
displayFieldMeta: any,
|
|
139
|
-
columnsWithSetProperty: any,
|
|
140
|
-
dataApiObj: any
|
|
141
|
-
) => {
|
|
142
|
-
// @ts-ignore
|
|
143
|
-
return displayResponseData.map(entry => {
|
|
144
|
-
const secondaryArr: Array<any> = [];
|
|
145
|
-
const secondaryFieldValues: Array<any> = [];
|
|
146
|
-
// @ts-ignore
|
|
147
|
-
displayFieldMeta.current.secondary.forEach(col => {
|
|
148
|
-
if (!displayFieldMeta.hidden?.includes(col)) secondaryArr.push(entry[col]);
|
|
149
|
-
if (columnsWithSetProperty.includes(col)) {
|
|
150
|
-
if (dataApiObj.isQueryable) {
|
|
151
|
-
secondaryFieldValues.push(entry[col]);
|
|
152
|
-
} else {
|
|
153
|
-
secondaryFieldValues.push(get(entry, getFieldNameFromEmbeddedFieldName(col)));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
return {
|
|
158
|
-
id: entry[displayFieldMeta.current.key],
|
|
159
|
-
primary: entry[displayFieldMeta.current.primary],
|
|
160
|
-
secondary: secondaryArr,
|
|
161
|
-
secondaryFieldValues
|
|
162
|
-
};
|
|
163
|
-
});
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// @ts-ignore
|
|
167
|
-
export const updatePropertiesForNewRecord = (
|
|
168
|
-
dataConfig: any,
|
|
169
|
-
contextName: any,
|
|
170
|
-
dataApiObj: any,
|
|
171
|
-
setDataApiObj: any,
|
|
172
|
-
displayFieldMeta: any,
|
|
173
|
-
c11nEnv: any,
|
|
174
|
-
columns: Array<any>,
|
|
175
|
-
actions: any,
|
|
176
|
-
newCaseId: string
|
|
177
|
-
) => {
|
|
178
|
-
PCore.getDataApi()
|
|
179
|
-
.init(dataConfig, contextName)
|
|
180
|
-
.then(dataObj => {
|
|
181
|
-
setDataApiObj(dataObj);
|
|
182
|
-
buildColumnForDisplayValue(dataObj);
|
|
183
|
-
// SET matchPosition to EQUALS to return exact matching record
|
|
184
|
-
// @ts-ignore
|
|
185
|
-
dataObj.matchPosition = 'equals';
|
|
186
|
-
// @ts-ignore
|
|
187
|
-
dataObj
|
|
188
|
-
.fetchData(newCaseId)
|
|
189
|
-
// @ts-ignore
|
|
190
|
-
.then(displayResponse => {
|
|
191
|
-
let columnsWithSetProperty = [];
|
|
192
|
-
if (dataApiObj.columns) {
|
|
193
|
-
columnsWithSetProperty = dataApiObj.columns
|
|
194
|
-
// @ts-ignore
|
|
195
|
-
.filter(col => col.setProperty && col.setProperty !== 'Associated property')
|
|
196
|
-
// @ts-ignore
|
|
197
|
-
.map(col => col.value);
|
|
198
|
-
}
|
|
199
|
-
const displayResponseData = displayResponse.data || [];
|
|
200
|
-
|
|
201
|
-
const searchedItem = transformSearchedItem(
|
|
202
|
-
displayResponseData,
|
|
203
|
-
displayFieldMeta,
|
|
204
|
-
columnsWithSetProperty,
|
|
205
|
-
dataApiObj
|
|
206
|
-
);
|
|
207
|
-
setValuesToPropertyList(
|
|
208
|
-
searchedItem[0],
|
|
209
|
-
c11nEnv.getStateProps().value,
|
|
210
|
-
searchedItem[0],
|
|
211
|
-
columns,
|
|
212
|
-
actions
|
|
213
|
-
);
|
|
214
|
-
})
|
|
215
|
-
.finally(() => {
|
|
216
|
-
// RESET matchPosition
|
|
217
|
-
// @ts-ignore
|
|
218
|
-
dataObj.matchPosition = dataConfig.matchPosition;
|
|
219
|
-
});
|
|
220
|
-
});
|
|
221
|
-
};
|
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyText/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
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Pega_DXIL_MyText",
|
|
3
|
-
"label": "My Text",
|
|
4
|
-
"description": "My Text",
|
|
5
|
-
"organization": "Pega",
|
|
6
|
-
"version": "0.0.1",
|
|
7
|
-
"library": "DXIL",
|
|
8
|
-
"allowedApplications": [],
|
|
9
|
-
"componentKey": "Pega_DXIL_MyText",
|
|
10
|
-
"type": "Field",
|
|
11
|
-
"subtype": "Text",
|
|
12
|
-
"properties": [
|
|
13
|
-
{
|
|
14
|
-
"name": "label",
|
|
15
|
-
"label": "Label value",
|
|
16
|
-
"format": "TEXT"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "placeholder",
|
|
20
|
-
"label": "Placeholder",
|
|
21
|
-
"format": "TEXT"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "visibility",
|
|
25
|
-
"label": "Visible",
|
|
26
|
-
"format": "VISIBILITY"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "disabled",
|
|
30
|
-
"label": "Disabled",
|
|
31
|
-
"format": "DISABLED"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "required",
|
|
35
|
-
"label": "Required",
|
|
36
|
-
"format": "REQUIRED"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"label": "Advanced",
|
|
40
|
-
"format": "GROUP",
|
|
41
|
-
"collapsible": true,
|
|
42
|
-
"properties": [
|
|
43
|
-
{
|
|
44
|
-
"name": "testId",
|
|
45
|
-
"label": "Test ID",
|
|
46
|
-
"format": "TEXT",
|
|
47
|
-
"ignorePattern": "[^-_\\p{N}\\p{L}]",
|
|
48
|
-
"includeAnnotations": false
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"defaultConfig": {
|
|
54
|
-
}
|
|
55
|
-
}
|
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable react/jsx-no-useless-fragment */
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
|
-
|
|
6
|
-
import { stateProps, configProps } from './mock';
|
|
7
|
-
|
|
8
|
-
import PegaDxilMyText from './index';
|
|
9
|
-
|
|
10
|
-
const meta: Meta<typeof PegaDxilMyText> = {
|
|
11
|
-
title: 'PegaDxilMyText',
|
|
12
|
-
component: PegaDxilMyText,
|
|
13
|
-
excludeStories: /.*Data$/
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default meta;
|
|
17
|
-
type Story = StoryObj<typeof PegaDxilMyText>;
|
|
18
|
-
|
|
19
|
-
export const BasePegaDxilMyText: Story = (args: any) => {
|
|
20
|
-
|
|
21
|
-
const [value, setValue] = useState(configProps.value);
|
|
22
|
-
|
|
23
|
-
const props = {
|
|
24
|
-
value,
|
|
25
|
-
hasSuggestions: configProps.hasSuggestions,
|
|
26
|
-
|
|
27
|
-
getPConnect: () => {
|
|
28
|
-
return {
|
|
29
|
-
getStateProps: () => {
|
|
30
|
-
return stateProps;
|
|
31
|
-
},
|
|
32
|
-
getActionsApi: () => {
|
|
33
|
-
return {
|
|
34
|
-
updateFieldValue: (propName: string, theValue: any) => {
|
|
35
|
-
setValue(theValue);
|
|
36
|
-
},
|
|
37
|
-
triggerFieldChange: () => {/* nothing */}
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
ignoreSuggestion: () => {/* nothing */},
|
|
41
|
-
acceptSuggestion: () => {/* nothing */},
|
|
42
|
-
setInheritedProps: () => {/* nothing */},
|
|
43
|
-
resolveConfigProps: () => {/* nothing */}
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<>
|
|
50
|
-
<PegaDxilMyText {...props} {...args} />
|
|
51
|
-
</>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
BasePegaDxilMyText.args = {
|
|
56
|
-
label: configProps.label,
|
|
57
|
-
helperText: configProps.helperText,
|
|
58
|
-
placeholder: configProps.placeholder,
|
|
59
|
-
testId: configProps.testId,
|
|
60
|
-
readOnly: configProps.readOnly,
|
|
61
|
-
disabled: configProps.disabled,
|
|
62
|
-
required: configProps.required,
|
|
63
|
-
status: configProps.status,
|
|
64
|
-
hideLabel: configProps.hideLabel,
|
|
65
|
-
displayMode: configProps.displayMode,
|
|
66
|
-
validatemessage: configProps.validatemessage
|
|
67
|
-
};
|