@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
package/tests/assets/library/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts
DELETED
|
@@ -1,658 +0,0 @@
|
|
|
1
|
-
/* eslint-disable sonarjs/no-collapsible-if */
|
|
2
|
-
/* eslint-disable func-names */
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
import { splitConditionTree } from '@pega/cosmos-react-condition-builder';
|
|
5
|
-
import cloneDeep from 'lodash/cloneDeep.js';
|
|
6
|
-
|
|
7
|
-
import DateTimeFormatter from './date';
|
|
8
|
-
import Constants from './component-constants';
|
|
9
|
-
|
|
10
|
-
import { getEmbeddedFieldName, mergePageListFieldAggregation } from './embed-utils';
|
|
11
|
-
import { confirmationModalLabels } from './repeat-constants';
|
|
12
|
-
|
|
13
|
-
export const SIMPLE_TABLE_MANUAL_READONLY = 'SimpleTableManualReadOnly';
|
|
14
|
-
export const PAGE = '!P!';
|
|
15
|
-
export const PAGELIST = '!PL!';
|
|
16
|
-
|
|
17
|
-
/** Date-functions supported by the Data-views API */
|
|
18
|
-
export const defaultDateFunctions = {
|
|
19
|
-
// TODO: Enable HOURS
|
|
20
|
-
DATE_TIME: [
|
|
21
|
-
'YEARS',
|
|
22
|
-
'QUARTERS',
|
|
23
|
-
'MONTHS',
|
|
24
|
-
'WEEKS',
|
|
25
|
-
'DAYS',
|
|
26
|
-
'HOURS',
|
|
27
|
-
'MINUTES',
|
|
28
|
-
'MONTHS_OF_YEAR',
|
|
29
|
-
'DAYS_OF_MONTH',
|
|
30
|
-
'DAYS_OF_WEEK',
|
|
31
|
-
'HOURS_OF_DAY'
|
|
32
|
-
],
|
|
33
|
-
DATE_ONLY: ['YEARS', 'QUARTERS', 'MONTHS', 'WEEKS', 'MONTHS_OF_YEAR', 'DAYS_OF_MONTH', 'DAYS_OF_WEEK']
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export function getMappedKey(key) {
|
|
37
|
-
const mappedKey = PCore.getEnvironmentInfo().getKeyMapping(key);
|
|
38
|
-
if (!mappedKey) {
|
|
39
|
-
return key;
|
|
40
|
-
}
|
|
41
|
-
return mappedKey;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function launchLocalAction(getPConnect, rowContext, action, cb) {
|
|
45
|
-
const pConnect = getPConnect && getPConnect();
|
|
46
|
-
const actionsAPI = pConnect && pConnect.getActionsApi();
|
|
47
|
-
const openLocalAction = actionsAPI && actionsAPI.openLocalAction.bind(actionsAPI);
|
|
48
|
-
|
|
49
|
-
const assignmentID = rowContext[getMappedKey('pzInsKey')];
|
|
50
|
-
let caseID;
|
|
51
|
-
if (assignmentID.indexOf('!') === -1) {
|
|
52
|
-
caseID = assignmentID;
|
|
53
|
-
} else {
|
|
54
|
-
// "ASSIGN-WORKLIST ON8TTL-C11NGALL-WORK LAT-3!ENTERINFO_FLOW_1" use case
|
|
55
|
-
const [assignKey] = assignmentID.split('!');
|
|
56
|
-
const [, className, workId] = assignKey.split(' ');
|
|
57
|
-
// eslint-disable-next-line prefer-template
|
|
58
|
-
caseID = className + ' ' + workId;
|
|
59
|
-
}
|
|
60
|
-
openLocalAction(action.ID, {
|
|
61
|
-
caseID,
|
|
62
|
-
type: 'express',
|
|
63
|
-
containerName: 'modal',
|
|
64
|
-
name: action.name,
|
|
65
|
-
callbacks: {
|
|
66
|
-
submit: (response) => {
|
|
67
|
-
console.log('callback for modal submit');
|
|
68
|
-
console.log(response);
|
|
69
|
-
cb();
|
|
70
|
-
},
|
|
71
|
-
cancel: () => {
|
|
72
|
-
cb();
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
refreshConditions: action.refreshConditions
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function launchBulkAction(getPConnect, selectedList, action, caseTypeID, cb) {
|
|
80
|
-
const pConnect = getPConnect && getPConnect();
|
|
81
|
-
const actionsAPI = pConnect && pConnect.getActionsApi();
|
|
82
|
-
const openBulkAction = actionsAPI && actionsAPI.openBulkAction.bind(actionsAPI);
|
|
83
|
-
|
|
84
|
-
const caseSummary = getPConnect().getCaseSummary();
|
|
85
|
-
const { ID: bulkContextID, caseTypeID: bulkContextType } = caseSummary;
|
|
86
|
-
|
|
87
|
-
openBulkAction(action.ID, {
|
|
88
|
-
selectedList,
|
|
89
|
-
type: 'express',
|
|
90
|
-
containerName: 'modal',
|
|
91
|
-
name: action.name,
|
|
92
|
-
caseTypeID,
|
|
93
|
-
bulkContextID,
|
|
94
|
-
bulkContextType,
|
|
95
|
-
callbacks: {
|
|
96
|
-
submit: (response) => {
|
|
97
|
-
console.log(response);
|
|
98
|
-
console.log('callback for modal submit 1');
|
|
99
|
-
if (typeof cb === 'function') {
|
|
100
|
-
cb();
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
cancel: () => {
|
|
104
|
-
console.log('callback for modal submit 2');
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
showProgress: true,
|
|
108
|
-
progressMessage: 'Updating data... please wait'
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function getFieldMapByName(fieldDefs) {
|
|
113
|
-
return fieldDefs.reduce((acc, field) => {
|
|
114
|
-
acc[field.name] = field;
|
|
115
|
-
return acc;
|
|
116
|
-
}, {});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const updateDateTimeField = (expr, fieldMap, dateOnlyFunctions, timezone) => {
|
|
120
|
-
if (expr.condition) {
|
|
121
|
-
// TODO: Get back to this after knowing if the server api considers timezone or not and how it works internally
|
|
122
|
-
if (
|
|
123
|
-
fieldMap[expr.condition.lhs.field].type === 'datetime' &&
|
|
124
|
-
expr.condition.rhs?.value &&
|
|
125
|
-
(!expr.condition.rhs?.dateFunction ||
|
|
126
|
-
(expr.condition.rhs?.dateFunction && !dateOnlyFunctions.includes(expr.condition.rhs?.dateFunction)))
|
|
127
|
-
) {
|
|
128
|
-
if (expr.condition.rhs?.dateFunction === 'HOURS_OF_DAY') {
|
|
129
|
-
expr.condition.rhs.value = Number(expr.condition.rhs.value).toString().padStart(2, '0');
|
|
130
|
-
} else {
|
|
131
|
-
expr.condition.rhs.value = new Date(
|
|
132
|
-
DateTimeFormatter.convertFromTimezone(expr.condition.rhs.value, timezone)
|
|
133
|
-
).toISOString();
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
} else if (Array.isArray(expr)) {
|
|
137
|
-
expr.forEach((e) => updateDateTimeField(e, fieldMap, dateOnlyFunctions, timezone));
|
|
138
|
-
} else {
|
|
139
|
-
Object.values(expr).forEach((e) => updateDateTimeField(e, fieldMap, dateOnlyFunctions, timezone));
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export function updateWithTimeZone(stateFromTable, meta) {
|
|
144
|
-
const { externalFilters } = meta;
|
|
145
|
-
const isExternalFiltersExist =
|
|
146
|
-
externalFilters &&
|
|
147
|
-
stateFromTable.externalState?.[externalFilters] &&
|
|
148
|
-
Object.keys(stateFromTable.externalState?.[externalFilters]).length > 0;
|
|
149
|
-
|
|
150
|
-
if (!(stateFromTable.filterExpression || isExternalFiltersExist)) {
|
|
151
|
-
return stateFromTable;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
stateFromTable = cloneDeep(stateFromTable);
|
|
155
|
-
const fieldMap = getFieldMapByName(meta.fieldDefs);
|
|
156
|
-
const environmentInfo = PCore.getEnvironmentInfo();
|
|
157
|
-
const timezone = environmentInfo && environmentInfo.getTimeZone();
|
|
158
|
-
const dateOnlyFunctions = [...defaultDateFunctions.DATE_ONLY, 'DAYS'];
|
|
159
|
-
if (stateFromTable.filterExpression) {
|
|
160
|
-
updateDateTimeField(stateFromTable.filterExpression, fieldMap, dateOnlyFunctions, timezone);
|
|
161
|
-
}
|
|
162
|
-
if (isExternalFiltersExist) {
|
|
163
|
-
updateDateTimeField(stateFromTable.externalState[externalFilters], fieldMap, dateOnlyFunctions, timezone);
|
|
164
|
-
}
|
|
165
|
-
return stateFromTable;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export function isHybrid() {
|
|
169
|
-
return typeof pega !== 'undefined' && typeof pega.desktop !== 'undefined';
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export const isPageListInPath = (propertyName, currentClassID) => {
|
|
173
|
-
if (!propertyName.includes('.')) {
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
|
-
const [first, ...rest] = propertyName.split('.');
|
|
177
|
-
const metadata = PCore.getMetadataUtils().getPropertyMetadata(first, currentClassID);
|
|
178
|
-
if (metadata?.type === 'Page List') {
|
|
179
|
-
return true;
|
|
180
|
-
}
|
|
181
|
-
return isPageListInPath(rest.join('.'), metadata?.pageClass);
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
export const isEmbeddedField = (field) => {
|
|
185
|
-
if (field?.startsWith('@')) {
|
|
186
|
-
field = field.substring(field.indexOf(' ') + 1);
|
|
187
|
-
if (field[0] === '.') field = field.substring(1);
|
|
188
|
-
}
|
|
189
|
-
return field?.indexOf('.') > 0;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
// Take a filterExpression created by ConditionBuilder, and convert to match table's group/sort syntax
|
|
193
|
-
export const getFieldListFromFilter = (filterExpression) => {
|
|
194
|
-
const splitFilter = splitConditionTree(filterExpression);
|
|
195
|
-
const arrFilter = Object.values(splitFilter.conditions);
|
|
196
|
-
|
|
197
|
-
const filterReferences = [];
|
|
198
|
-
|
|
199
|
-
// Add in any field references
|
|
200
|
-
arrFilter.forEach((item) => {
|
|
201
|
-
if (item.lhs?.field) {
|
|
202
|
-
filterReferences.push({ columnId: item.lhs.field });
|
|
203
|
-
}
|
|
204
|
-
if (item.rhs?.field) {
|
|
205
|
-
filterReferences.push({ columnId: item.rhs.field });
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
return filterReferences;
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
// Todo : This check used to skip fetch data in grouping, remove it once its handled by table --> in ServerApi.js
|
|
213
|
-
// and also used to make fetchAllData if groups are applied --> in DataApi.js
|
|
214
|
-
export function isGroupingAdded(state) {
|
|
215
|
-
const { groups, groupFilters } = state;
|
|
216
|
-
|
|
217
|
-
return groups && groups.length > 0 && !(groupFilters && groupFilters.length > 0);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/*
|
|
221
|
-
It validates and returns the dataviewParameters.
|
|
222
|
-
*/
|
|
223
|
-
export function getDataViewParameters(parameters, runtimeParams) {
|
|
224
|
-
if (!runtimeParams || !parameters) return {};
|
|
225
|
-
|
|
226
|
-
return Object.keys(runtimeParams)
|
|
227
|
-
.filter((key) => parameters.find((e) => e.name === key) && runtimeParams[key] !== '')
|
|
228
|
-
.reduce((obj, key) => {
|
|
229
|
-
return {
|
|
230
|
-
...obj,
|
|
231
|
-
[key]: runtimeParams[key]
|
|
232
|
-
};
|
|
233
|
-
}, {});
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export function generateKeyFromCompositeKeys(compositeKeys, rowData) {
|
|
237
|
-
const key = compositeKeys.reduce((acc, k) => (rowData[k] ? `${acc}${rowData[k]}` : acc), '').trim();
|
|
238
|
-
return `${key}`;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export function getLookUpDataPageInfo(classID) {
|
|
242
|
-
const lookUpDatePage = PCore.getDataTypeUtils().getLookUpDataPage(classID);
|
|
243
|
-
const lookUpDataPageInfo = PCore.getDataTypeUtils().getLookUpDataPageInfo(classID);
|
|
244
|
-
return { lookUpDatePage, lookUpDataPageInfo };
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export function isAlternateKeyStorageForLookUp(lookUpDataPageInfo) {
|
|
248
|
-
return !!lookUpDataPageInfo?.isAlternateKeyStorage;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
export const isSelfReferencedProperty = (param, referenceProp) => {
|
|
252
|
-
const [, parentPropName] = param.split('.');
|
|
253
|
-
const referencePropParent = referenceProp?.split('.').pop();
|
|
254
|
-
return parentPropName === referencePropParent;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
/*
|
|
258
|
-
convert configured descriptors/parameters fieldNames
|
|
259
|
-
for leaf level property - @P .Employee.Name -> Name
|
|
260
|
-
for embedded porperty - @P .Employee.Address.City -> !P!Address:City
|
|
261
|
-
*/
|
|
262
|
-
export function getDescriptorsFieldName(property, pageClass) {
|
|
263
|
-
if (property.startsWith('@')) {
|
|
264
|
-
property = property.substring(property.indexOf(' ') + 1);
|
|
265
|
-
if (property[0] === '.') property = property.substring(1);
|
|
266
|
-
}
|
|
267
|
-
property = property.substring(property.indexOf('.') + 1);
|
|
268
|
-
if (isEmbeddedField(property)) {
|
|
269
|
-
return getEmbeddedFieldName(property, pageClass);
|
|
270
|
-
}
|
|
271
|
-
return property;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// eslint-disable-next-line @typescript-eslint/default-param-last, sonarjs/cognitive-complexity
|
|
275
|
-
export function preparePatchQueryFields(fields, isDataObject = false, classID = '', getPConnect) {
|
|
276
|
-
const queryFields = [];
|
|
277
|
-
// Descriptors can be configured only for single selectionMode properties
|
|
278
|
-
const configProps = getPConnect?.().getRawConfigProps();
|
|
279
|
-
if (configProps?.descriptors?.length) {
|
|
280
|
-
const { descriptors, dataRelationshipContext, pageClass } = getPConnect().getRawConfigProps();
|
|
281
|
-
descriptors.forEach((value) => {
|
|
282
|
-
if (isSelfReferencedProperty(value, dataRelationshipContext) && !value.includes('(')) {
|
|
283
|
-
const name = getDescriptorsFieldName(value, pageClass);
|
|
284
|
-
queryFields.push(name);
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
const { lookUpDatePage, lookUpDataPageInfo } = getLookUpDataPageInfo(classID);
|
|
289
|
-
fields.forEach((field) => {
|
|
290
|
-
const pzInsKey = getMappedKey('pzInsKey');
|
|
291
|
-
const pyID = getMappedKey('pyID');
|
|
292
|
-
const pxObjClass = getMappedKey('pxObjClass');
|
|
293
|
-
const pxRefObjectClass = getMappedKey('pxRefObjectClass');
|
|
294
|
-
const patchFields = [];
|
|
295
|
-
const { meta: { config } = {} } = field;
|
|
296
|
-
if (field.cellRenderer === 'WorkLink') {
|
|
297
|
-
if (field.customObject && field.customObject.isAssignmentLink) {
|
|
298
|
-
const associationName = field.name.includes(':') ? `${field.name.split(':')[0]}:` : '';
|
|
299
|
-
patchFields.push(`${associationName}${pzInsKey}`);
|
|
300
|
-
patchFields.push(`${associationName}${pxRefObjectClass}`);
|
|
301
|
-
} else if (field.customObject && field.customObject.isAssociation) {
|
|
302
|
-
const associationCategory = field.name.split(':')[0];
|
|
303
|
-
patchFields.push(`${associationCategory}:${pyID}`);
|
|
304
|
-
patchFields.push(`${associationCategory}:${pzInsKey}`);
|
|
305
|
-
patchFields.push(`${associationCategory}:${pxObjClass}`);
|
|
306
|
-
} else if (isDataObject) {
|
|
307
|
-
const dataViewName = PCore.getDataTypeUtils().getSavableDataPage(classID);
|
|
308
|
-
const dataPageKeys = PCore.getDataTypeUtils().getDataPageKeys(dataViewName);
|
|
309
|
-
dataPageKeys?.forEach((item) =>
|
|
310
|
-
item.isAlternateKeyStorage ? patchFields.push(item.linkedField) : patchFields.push(item.keyName)
|
|
311
|
-
);
|
|
312
|
-
} else {
|
|
313
|
-
patchFields.push(pyID);
|
|
314
|
-
patchFields.push(pzInsKey);
|
|
315
|
-
patchFields.push(pxObjClass);
|
|
316
|
-
}
|
|
317
|
-
if (lookUpDatePage && isAlternateKeyStorageForLookUp(lookUpDataPageInfo)) {
|
|
318
|
-
const { parameters } = lookUpDataPageInfo;
|
|
319
|
-
Object.keys(parameters).forEach((param) => {
|
|
320
|
-
const paramValue = parameters[param];
|
|
321
|
-
|
|
322
|
-
if (PCore.getAnnotationUtils().isProperty(paramValue)) {
|
|
323
|
-
patchFields.push(PCore.getAnnotationUtils().getPropertyName(paramValue));
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
} else if (field.cellRenderer === 'UserReference') {
|
|
328
|
-
// TODO: Support Embedded UserReference(.Page.UserReference) with field.cellRenderer === 'PageReferenceRenderer' || 'ScalarList'. Please check BUG-784885 / US-539805
|
|
329
|
-
if (field.customObject.associationID) {
|
|
330
|
-
patchFields.push(`${field.customObject.associationID}:pyUserName`);
|
|
331
|
-
}
|
|
332
|
-
} else if (field.cellRenderer === 'URL') {
|
|
333
|
-
if (config?.urlLabelSelection === Constants.PROPERTY_REFERENCE && config?.propUrlLabel !== '') {
|
|
334
|
-
patchFields.push(PCore.getAnnotationUtils().getPropertyName(config.propUrlLabel));
|
|
335
|
-
}
|
|
336
|
-
} else if (field.cellRenderer === 'Currency-Code') {
|
|
337
|
-
if (config?.isoCodeSelection === Constants.PROPERTY_REFERENCE && config?.currencyISOCode !== '') {
|
|
338
|
-
patchFields.push(PCore.getAnnotationUtils().getPropertyName(config.currencyISOCode));
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
patchFields.forEach((k) => {
|
|
343
|
-
if (!queryFields.find((q) => q === k)) {
|
|
344
|
-
queryFields.push(k);
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
});
|
|
348
|
-
return queryFields;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
function getFilterExpression(key, value = null, comparator = 'IS_NULL') {
|
|
352
|
-
return {
|
|
353
|
-
comparator,
|
|
354
|
-
lhs: {
|
|
355
|
-
field: key
|
|
356
|
-
},
|
|
357
|
-
...(value && { rhs: { value } })
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
export function prepareFilters(keys = [], data = {}, logicOperator = '') {
|
|
362
|
-
if (!(keys.length && Object.keys(data))) {
|
|
363
|
-
return null;
|
|
364
|
-
}
|
|
365
|
-
let logicString = '';
|
|
366
|
-
const filterConditions = {};
|
|
367
|
-
keys.forEach((key, index) => {
|
|
368
|
-
const value = data[key];
|
|
369
|
-
let filterExpression = {};
|
|
370
|
-
if (value) {
|
|
371
|
-
filterExpression = getFilterExpression(key, value, 'EQ');
|
|
372
|
-
} else {
|
|
373
|
-
filterExpression = getFilterExpression(key);
|
|
374
|
-
}
|
|
375
|
-
filterConditions[`T${index + 1}`] = filterExpression;
|
|
376
|
-
|
|
377
|
-
if (index + 1 !== keys.length) {
|
|
378
|
-
logicString = `${logicString}T${index + 1} ${logicOperator} `;
|
|
379
|
-
} else {
|
|
380
|
-
logicString = `${logicString}T${index + 1}`;
|
|
381
|
-
}
|
|
382
|
-
});
|
|
383
|
-
return { logic: logicString, filterConditions };
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
export function prepareAdditionalApiParams({ useExtendedTimeout, includeTotalCount } = {}) {
|
|
387
|
-
const additionalApiParams = {};
|
|
388
|
-
if (useExtendedTimeout) {
|
|
389
|
-
additionalApiParams.useExtendedTimeout = useExtendedTimeout;
|
|
390
|
-
}
|
|
391
|
-
additionalApiParams.includeTotalCount = includeTotalCount;
|
|
392
|
-
return additionalApiParams;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
function getTableViewName({ personalization = {} } = {}) {
|
|
396
|
-
const activePersonalization = personalization.active;
|
|
397
|
-
return personalization.allPersonalizations?.[activePersonalization]?.name;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
export function getLabelsForTimeoutModal(tableState) {
|
|
401
|
-
const getLocaleValue = PCore.getLocaleUtils().getLocaleValue;
|
|
402
|
-
|
|
403
|
-
let {
|
|
404
|
-
heading,
|
|
405
|
-
genericDescription,
|
|
406
|
-
tableNameMessagePrefix,
|
|
407
|
-
tableNameMessageSuffix,
|
|
408
|
-
cancelButtonLabel,
|
|
409
|
-
submitButtonLabel
|
|
410
|
-
} = confirmationModalLabels.TIMEOUT;
|
|
411
|
-
|
|
412
|
-
heading = getLocaleValue(heading, 'TableConfirmationModal');
|
|
413
|
-
genericDescription = getLocaleValue(genericDescription, 'TableConfirmationModal');
|
|
414
|
-
tableNameMessagePrefix = getLocaleValue(tableNameMessagePrefix, 'TableConfirmationModal');
|
|
415
|
-
tableNameMessageSuffix = getLocaleValue(tableNameMessageSuffix, 'TableConfirmationModal');
|
|
416
|
-
cancelButtonLabel = getLocaleValue(cancelButtonLabel, 'TableConfirmationModal');
|
|
417
|
-
submitButtonLabel = getLocaleValue(submitButtonLabel, 'TableConfirmationModal');
|
|
418
|
-
|
|
419
|
-
const tableViewName = getTableViewName(tableState);
|
|
420
|
-
const description = tableViewName
|
|
421
|
-
? `${tableNameMessagePrefix} ${tableViewName} ${tableNameMessageSuffix}`
|
|
422
|
-
: genericDescription;
|
|
423
|
-
|
|
424
|
-
return {
|
|
425
|
-
heading,
|
|
426
|
-
description,
|
|
427
|
-
submitButtonLabel,
|
|
428
|
-
cancelButtonLabel
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
function isAssociationField(field) {
|
|
433
|
-
return field.includes(':') && !(field.startsWith(PAGE) || field.startsWith(PAGELIST));
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* [isAssociationAlreadyAdded]
|
|
438
|
-
* Description - A utility to be called when it is required to check only one field of an association should be considered.
|
|
439
|
-
* @ignore
|
|
440
|
-
* @param {string} field field name
|
|
441
|
-
* @param {Set} associationNames a utility set of associations that will be used to add association parents names in case it is not considered before.
|
|
442
|
-
* @returns {boolean} if association is already considered or not
|
|
443
|
-
*/
|
|
444
|
-
function isAssociationAlreadyAdded(field, associationNames) {
|
|
445
|
-
const [associationName] = field.split(':');
|
|
446
|
-
if (!associationNames.has(associationName)) {
|
|
447
|
-
associationNames.add(associationName);
|
|
448
|
-
return false;
|
|
449
|
-
}
|
|
450
|
-
return true;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
export function getAssociationFieldsFromQuery(query) {
|
|
454
|
-
const associationNames = new Set();
|
|
455
|
-
return query?.select.filter(
|
|
456
|
-
({ field }) => isAssociationField(field) && !isAssociationAlreadyAdded(field, associationNames)
|
|
457
|
-
);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
// Other - Sort,group,filter fields
|
|
461
|
-
function getOtherRelevantFields(stateFromTable) {
|
|
462
|
-
const otherRelevantFields = [];
|
|
463
|
-
stateFromTable.sortingOrder?.forEach((sort) => {
|
|
464
|
-
if (!otherRelevantFields.includes(sort.columnId)) {
|
|
465
|
-
otherRelevantFields.push(sort.columnId);
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
|
-
stateFromTable.groups?.forEach((group) => {
|
|
469
|
-
if (!otherRelevantFields.includes(group.columnId)) {
|
|
470
|
-
otherRelevantFields.push(group.columnId);
|
|
471
|
-
}
|
|
472
|
-
});
|
|
473
|
-
|
|
474
|
-
if (stateFromTable.filterExpression) {
|
|
475
|
-
const filterArray = getFieldListFromFilter(stateFromTable.filterExpression);
|
|
476
|
-
filterArray.forEach((item) => {
|
|
477
|
-
const id = item.columnId;
|
|
478
|
-
if (!otherRelevantFields.includes(id)) {
|
|
479
|
-
otherRelevantFields.push(id);
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
return otherRelevantFields;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
export function mergeAssociationFieldsAggregations(meta, stateFromTable, select, existingAggregations) {
|
|
487
|
-
const otherRelevantFields = meta.isAnalyticsTable ? getOtherRelevantFields(stateFromTable) : [];
|
|
488
|
-
const existingAggregationNames = Object.keys(existingAggregations).toString();
|
|
489
|
-
const associationNames = new Set();
|
|
490
|
-
meta.fieldDefs.forEach(({ name }) => {
|
|
491
|
-
if (
|
|
492
|
-
isAssociationField(name) &&
|
|
493
|
-
(meta.isAnalyticsTable
|
|
494
|
-
? !stateFromTable.hiddenColumns.includes(name) || otherRelevantFields.includes(name)
|
|
495
|
-
: true) &&
|
|
496
|
-
!isAssociationAlreadyAdded(name, associationNames)
|
|
497
|
-
) {
|
|
498
|
-
mergePageListFieldAggregation(name, select, existingAggregations, existingAggregationNames);
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
export function filterDuplicatesBy(id) {
|
|
504
|
-
const uniqueSelectFields = new Set();
|
|
505
|
-
return function (obj) {
|
|
506
|
-
let check = false;
|
|
507
|
-
if (obj[id] && !uniqueSelectFields.has(obj[id])) {
|
|
508
|
-
uniqueSelectFields.add(obj[id]);
|
|
509
|
-
check = true;
|
|
510
|
-
} else if (!obj[id]) {
|
|
511
|
-
check = true;
|
|
512
|
-
}
|
|
513
|
-
return check;
|
|
514
|
-
};
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
export function isOpenViewInModal(additionalDetails) {
|
|
518
|
-
return (
|
|
519
|
-
additionalDetails.type === 'OPEN_VIEW' && additionalDetails.mode === 'MODAL' && additionalDetails.params.config.name
|
|
520
|
-
);
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
*
|
|
525
|
-
* @param {Object} promotedFiltersObject
|
|
526
|
-
* @returns An array of conditions formed with the promoted filters
|
|
527
|
-
*
|
|
528
|
-
* example:
|
|
529
|
-
* promotedFiltersObject = {a:2, b: 3};
|
|
530
|
-
* return
|
|
531
|
-
* [
|
|
532
|
-
condition: {
|
|
533
|
-
comp: 'EQ',
|
|
534
|
-
lhs: {field: 'a'},
|
|
535
|
-
rhs: {value: '2'}
|
|
536
|
-
},
|
|
537
|
-
condition: {
|
|
538
|
-
comp: 'EQ',
|
|
539
|
-
lhs: {field: 'b'},
|
|
540
|
-
rhs: {value: '3'}
|
|
541
|
-
}
|
|
542
|
-
]
|
|
543
|
-
*/
|
|
544
|
-
export function formatPromotedFiltersAsFilterConditions(promotedFiltersObject = {}) {
|
|
545
|
-
return Object.entries(promotedFiltersObject).reduce((acc, [field, value]) => {
|
|
546
|
-
if (value) {
|
|
547
|
-
acc.push({
|
|
548
|
-
condition: {
|
|
549
|
-
lhs: {
|
|
550
|
-
field
|
|
551
|
-
},
|
|
552
|
-
comparator: 'EQ',
|
|
553
|
-
rhs: {
|
|
554
|
-
value
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
return acc;
|
|
561
|
-
}, []);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* @param {Object} state
|
|
566
|
-
* @param {Object} meta
|
|
567
|
-
* @returns Calculated indexes in multiple of pageSize(splitting the virtualizer indexes)
|
|
568
|
-
* For pageSize: 25, startIndex: 0, endIndex: 40 => generate [0, 24], [25, 49]
|
|
569
|
-
*/
|
|
570
|
-
function calculateIndexes(state, meta) {
|
|
571
|
-
const virtualizerIndexes = state.paginationOptions.rootVirtualiser;
|
|
572
|
-
const pageSize = meta.pageSize;
|
|
573
|
-
|
|
574
|
-
const fromPage = Math.floor(virtualizerIndexes.startIndex / pageSize);
|
|
575
|
-
const toPage = Math.ceil((virtualizerIndexes.endIndex + 1) / pageSize); // adding +1 because if endIndex is 175 then toPage = 7 but the the last page ends at 174[... (125, 149), (150, 174)]
|
|
576
|
-
const indexes = [];
|
|
577
|
-
for (let i = fromPage; i < toPage; i += 1) {
|
|
578
|
-
indexes.push({ startIndex: pageSize * i, endIndex: pageSize * (i + 1) - 1 });
|
|
579
|
-
}
|
|
580
|
-
return indexes;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
/**
|
|
584
|
-
* @param {Object} state
|
|
585
|
-
* @param {Object} meta
|
|
586
|
-
* @returns Copy of states with virtualizer indexes
|
|
587
|
-
*/
|
|
588
|
-
export function updatePaginationStatesForMultipleCalls(state, meta) {
|
|
589
|
-
const indexes = calculateIndexes(state, meta);
|
|
590
|
-
return indexes.map((index) => ({
|
|
591
|
-
...state,
|
|
592
|
-
paginationOptions: {
|
|
593
|
-
rootVirtualiser: {
|
|
594
|
-
startIndex: index.startIndex,
|
|
595
|
-
endIndex: index.endIndex
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
}));
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* @param {Object} state
|
|
603
|
-
* @param {Object} meta
|
|
604
|
-
* @param {Array} requests
|
|
605
|
-
* @returns Resolves promise, compiles and slices the data
|
|
606
|
-
*/
|
|
607
|
-
export async function processRequests(state, meta, requests) {
|
|
608
|
-
let data = [];
|
|
609
|
-
let queryStats = [];
|
|
610
|
-
let count;
|
|
611
|
-
const virtualizerIndexes = state.paginationOptions.rootVirtualiser;
|
|
612
|
-
|
|
613
|
-
await Promise.all(requests)
|
|
614
|
-
.then((results) =>
|
|
615
|
-
results.forEach((result) => {
|
|
616
|
-
if (result.status === 200 || Array.isArray(result.data)) {
|
|
617
|
-
data = data.concat(result.data);
|
|
618
|
-
queryStats = queryStats.concat(result.queryStats);
|
|
619
|
-
if (result.count !== null && result.count !== undefined) count = result.count;
|
|
620
|
-
} else {
|
|
621
|
-
throw new Error('Failed: Error while fetching records');
|
|
622
|
-
}
|
|
623
|
-
return { data, queryStats, count };
|
|
624
|
-
})
|
|
625
|
-
)
|
|
626
|
-
.catch((err) => {
|
|
627
|
-
throw err;
|
|
628
|
-
});
|
|
629
|
-
|
|
630
|
-
if (meta.pageSize) {
|
|
631
|
-
// For slicing data, startIndex needs to be calculated from the page fetched
|
|
632
|
-
// eg: startIndex: 63, endIndex: 120, pageSize: 25, pages fetched - [50, 74], [75, 99], [100, 124]
|
|
633
|
-
// Have to slice the data from arr of records [50, 124] -> [13, 70]
|
|
634
|
-
const startIdx = virtualizerIndexes.startIndex % meta.pageSize; // 63 % 25 = 13
|
|
635
|
-
const endIdx = virtualizerIndexes.endIndex - virtualizerIndexes.startIndex + startIdx; // (120 - 63) + 13
|
|
636
|
-
data = data.slice(startIdx, endIdx + 1);
|
|
637
|
-
}
|
|
638
|
-
return { data, queryStats: queryStats[0], count };
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
export function getLeafValue(data, fieldName, fieldSeparator) {
|
|
642
|
-
if (!data) {
|
|
643
|
-
return null;
|
|
644
|
-
}
|
|
645
|
-
if (!fieldName.includes(fieldSeparator)) {
|
|
646
|
-
return data[fieldName];
|
|
647
|
-
}
|
|
648
|
-
const [first, ...rest] = fieldName.split(fieldSeparator);
|
|
649
|
-
return getLeafValue(data[first], rest.join(fieldSeparator));
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
// Builds a uniquely identifyable aggregation/calculation ID for sending to the server.
|
|
653
|
-
export const buildAggOrCalcId = (columnId, functionName) => {
|
|
654
|
-
// Server does not support agg/calc ID's containing special chars, but Association ID's can contain - and _
|
|
655
|
-
// AND the data_views API uses : to separate the assoc ID and the field ID
|
|
656
|
-
// EmbeddedFields starts with !P! or !PL!, so ! should be removed as it is a special chars
|
|
657
|
-
return `${columnId.replace(/[-_!:]/g, '')}${functionName}`;
|
|
658
|
-
};
|