@pega/custom-dx-components 0.23.34 → 0.23.36
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/SECURITY.md +10 -0
- package/package.json +1 -1
- package/src/tasks/build-all/index.js +10 -25
- package/src/tasks/build-comp/index.js +1 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.ts.mustache +35 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +11 -48
- package/src/tasks/create/templates/Constellation/Field/Boolean/styles.ts.mustache +7 -14
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js → src/tasks/create/templates/Constellation/Field/Date/DateFormatter.ts.mustache} +6 -6
- package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.tsx.mustache +20 -0
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js → src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache} +2 -2
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +29 -70
- package/src/tasks/create/templates/Constellation/Field/Date/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/DateTime/{date-time.js.mustache → date-time.ts.mustache} +12 -12
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js → src/tasks/create/templates/Constellation/Field/DateTime/date-utils.ts.mustache} +27 -26
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js → src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache} +1 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +9 -6
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +12 -59
- package/src/tasks/create/templates/Constellation/Field/DateTime/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +14 -67
- package/src/tasks/create/templates/Constellation/Field/Decimal/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +21 -75
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +13 -54
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +23 -87
- package/src/tasks/create/templates/Constellation/Field/Integer/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +12 -60
- package/src/tasks/create/templates/Constellation/Field/Picklist/styles.ts.mustache +7 -14
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache} +2 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +8 -5
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/embed-utils.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.ts.mustache} +2 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +15 -76
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/picklist-utils.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.ts.mustache} +1 -0
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-constants.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.ts.mustache} +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{repeat-utils.js.mustache → repeat-utils.ts.mustache} +6 -12
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.ts.mustache +7 -14
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/textformat-utils.jsx → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.tsx.mustache} +30 -10
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +11 -55
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -22
- package/src/tasks/create/templates/Constellation/Field/Text/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +9 -46
- package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +7 -4
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +10 -50
- package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +12 -48
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +13 -52
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +15 -71
- package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.ts.mustache +7 -14
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.jsx → src/tasks/create/templates/Constellation/Field/Text-URL/text-url.tsx.mustache} +4 -3
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +8 -6
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +16 -52
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Field/{DateTime/date-utils.js.mustache → TimeofDay/time-of-day.ts.mustache} +24 -23
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +14 -5
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -17
- package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +10 -3
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +4 -18
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +7 -14
- package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js → src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache} +15 -13
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +11 -5
- package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +5 -13
- package/src/tasks/create/templates/Constellation/Template/FORM/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +11 -5
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +4 -10
- package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +5 -16
- package/src/tasks/create/templates/Constellation/Template/PAGE/styles.ts.mustache +7 -14
- package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js → src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache} +28 -14
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +3 -10
- package/src/tasks/create/templates/Constellation/Widget/CASE/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +4 -18
- package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +3 -13
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +49 -94
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +24 -39
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +3 -9
- package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.tsx.mustache +1 -11
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.tsx.mustache +33 -123
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +8 -5
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +22 -21
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.ts.mustache +7 -14
- package/src/tasks/delete-all/helper.js +37 -5
- package/src/tasks/init/template/package.json.mustache +2 -2
- package/src/tasks/linter/index.js +7 -4
- package/src/tasks/list/helper.js +10 -0
- package/src/tasks/list/index.js +20 -3
- package/src/tasks/publish/helper.js +1 -1
- package/src/tasks/publish/index.js +6 -4
- package/src/tasks/publish-all/helper.js +52 -40
- package/src/tasks/publish-all/index.js +16 -17
- package/src/util.js +103 -61
- package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +8 -5
- package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +4 -22
- package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +10 -47
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +3 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +21 -75
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.ts +7 -14
- package/{src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDate/date.js → Constellation/Pega_DXIL_MyDate/date.ts} +2 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +18 -59
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.ts +7 -14
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDateTime/date-time.js → Constellation/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
- package/{src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.ts} +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +9 -6
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +12 -59
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +14 -67
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +12 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +4 -17
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +9 -46
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.tsx +11 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +5 -13
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +23 -87
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +5 -16
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{utils.js → utils.ts} +28 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +3 -13
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.tsx +49 -94
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +24 -39
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -18
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +12 -48
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +13 -54
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +13 -52
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +12 -60
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +11 -55
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{date.js → date.ts} +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{embed-utils.js → embed-utils.ts} +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +15 -76
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/picklist-utils.js → Constellation/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{repeat-constants.js → repeat-constants.ts} +1 -1
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/repeat-utils.js → Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/styles.ts +7 -14
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/textformat-utils.jsx → Constellation/Pega_DXIL_MySearchbox/textformat-utils.tsx} +30 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +4 -22
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +7 -4
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +10 -50
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +8 -6
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/{time-of-day.js → time-of-day.ts} +24 -23
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +10 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
- package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js → Constellation/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +11 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +15 -71
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.ts +7 -14
- package/{src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.tsx} +4 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +10 -47
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +3 -9
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +21 -75
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.ts +7 -14
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDate/DateFormatter.js → Launchpad/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
- package/{src/tasks/create/templates/Constellation/Field/Date/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts} +2 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +18 -59
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.ts +7 -14
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDateTime/date-time.js → Launchpad/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/{date.js → date.ts} +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +9 -6
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +12 -59
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +14 -67
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +12 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +4 -17
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +9 -46
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.tsx +11 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +5 -13
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +23 -87
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +5 -16
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.ts +7 -14
- package/{src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.ts} +28 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +1 -11
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.tsx +33 -123
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +22 -20
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +4 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +12 -48
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +13 -54
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +13 -52
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +12 -60
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +11 -55
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
- package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.ts} +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +8 -5
- package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/embed-utils.ts} +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +15 -76
- package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
- package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-constants.ts} +1 -1
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MySearchbox/repeat-utils.js → Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/styles.ts +7 -14
- package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.jsx.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/textformat-utils.tsx} +30 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +4 -22
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +7 -4
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +10 -50
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +8 -6
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
- package/{src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.ts} +24 -23
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +10 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
- package/{src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +11 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +8 -5
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +15 -71
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.ts +7 -14
- package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyURL/text-url.jsx → Launchpad/Pega_DXIL_MyURL/text-url.tsx} +4 -3
- package/tests/functional/localCreateAllListDeleteAll.test.js +10 -3
- package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +0 -38
- package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +0 -41
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.js +0 -38
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.js +0 -38
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +0 -287
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -287
- /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{component-constants.js → component-constants.ts} +0 -0
- /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{format-constants.js.mustache → format-constants.ts.mustache} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
- /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
- /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{utils.js → utils.ts}
RENAMED
|
@@ -9,7 +9,7 @@ const LazyComponentMap = {};
|
|
|
9
9
|
* metadata of all regions.
|
|
10
10
|
* @param {Function} pConnect PConnect of a Template component.
|
|
11
11
|
*/
|
|
12
|
-
export function getAllFields(pConnect) {
|
|
12
|
+
export function getAllFields(pConnect: Function) {
|
|
13
13
|
const metadata = pConnect().getRawMetadata();
|
|
14
14
|
if (!metadata.children) {
|
|
15
15
|
return [];
|
|
@@ -17,15 +17,15 @@ export function getAllFields(pConnect) {
|
|
|
17
17
|
|
|
18
18
|
let allFields = [];
|
|
19
19
|
|
|
20
|
-
const makeField = (f) => ({
|
|
20
|
+
const makeField = (f: any) => ({
|
|
21
21
|
...pConnect().resolveConfigProps(f.config),
|
|
22
22
|
type: f.type
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
const hasRegions = !!metadata.children[0]?.children;
|
|
26
26
|
if (hasRegions) {
|
|
27
|
-
allFields = metadata.children.map((region) =>
|
|
28
|
-
region.children.map((field) => {
|
|
27
|
+
allFields = metadata.children.map((region: any) =>
|
|
28
|
+
region.children.map((field: any) => {
|
|
29
29
|
// Do not resolve the config props if is status work, instead create component here as status badge and mark as status display
|
|
30
30
|
if (field.config?.value === '@P .pyStatusWork') {
|
|
31
31
|
field.type = 'TextInput';
|
|
@@ -50,7 +50,7 @@ export function getAllFields(pConnect) {
|
|
|
50
50
|
* @param {Function} getPConnect PConnect function passed along to other components.
|
|
51
51
|
* @param {string} displayMode displayMode string contains information about the layout of component in review mode.
|
|
52
52
|
*/
|
|
53
|
-
export function prepareComponentInCaseSummary(configObject, getPConnect, displayMode) {
|
|
53
|
+
export function prepareComponentInCaseSummary(configObject: any, getPConnect: Function, displayMode: string) {
|
|
54
54
|
const { config, children } = configObject;
|
|
55
55
|
let { type } = configObject;
|
|
56
56
|
const caseSummaryComponentObject = {};
|
|
@@ -60,33 +60,40 @@ export function prepareComponentInCaseSummary(configObject, getPConnect, display
|
|
|
60
60
|
type = 'TextInput'; // force the type to be TextInput for status field.
|
|
61
61
|
// As TextInput is loaded forcefully sometimes, TextInput component might not be available in lazy map.
|
|
62
62
|
// Load TextInput if it is not available.
|
|
63
|
+
// @ts-ignore
|
|
63
64
|
if (!LazyComponentMap[type]) {
|
|
64
65
|
PCore.getAssetLoader().getLoader('component-loader')([type]);
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
// @ts-ignore
|
|
68
70
|
caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
|
|
69
71
|
label: config.label
|
|
70
72
|
}).label;
|
|
71
73
|
if (type === 'CaseOperator') {
|
|
74
|
+
// @ts-ignore
|
|
72
75
|
switch (caseSummaryComponentObject.name) {
|
|
73
76
|
case 'Create operator':
|
|
77
|
+
// @ts-ignore
|
|
74
78
|
caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
|
|
75
79
|
createLabel: config.createLabel
|
|
76
80
|
}).createLabel;
|
|
77
81
|
break;
|
|
78
82
|
case 'Update operator':
|
|
83
|
+
// @ts-ignore
|
|
79
84
|
caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
|
|
80
85
|
updateLabel: config.updateLabel
|
|
81
86
|
}).updateLabel;
|
|
82
87
|
break;
|
|
83
88
|
default:
|
|
89
|
+
// @ts-ignore
|
|
84
90
|
caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
|
|
85
91
|
resolveLabel: config.resolveLabel
|
|
86
92
|
}).resolveLabel;
|
|
87
93
|
break;
|
|
88
94
|
}
|
|
89
95
|
} else if (type === 'Checkbox') {
|
|
96
|
+
// @ts-ignore
|
|
90
97
|
caseSummaryComponentObject.name = getPConnect().resolveConfigProps({
|
|
91
98
|
label: config.caption
|
|
92
99
|
}).label;
|
|
@@ -108,15 +115,17 @@ export function prepareComponentInCaseSummary(configObject, getPConnect, display
|
|
|
108
115
|
createdComponent.props.getPConnect().setInheritedProp('showAddressLabel', showAddressLabel);
|
|
109
116
|
}
|
|
110
117
|
// createdComponent.props.getPConnect().setInheritedProp("hideLabel", true);
|
|
118
|
+
// @ts-ignore
|
|
111
119
|
caseSummaryComponentObject.value = createdComponent;
|
|
112
120
|
if (type === 'reference') {
|
|
121
|
+
// @ts-ignore
|
|
113
122
|
caseSummaryComponentObject.name = createdComponent.props.getPConnect().getInheritedProps().label;
|
|
114
123
|
}
|
|
115
124
|
|
|
116
125
|
return caseSummaryComponentObject;
|
|
117
126
|
}
|
|
118
127
|
|
|
119
|
-
export function getFilteredFields(getPConnect) {
|
|
128
|
+
export function getFilteredFields(getPConnect: Function) {
|
|
120
129
|
let primaryFieldsRaw;
|
|
121
130
|
let secondaryFieldsRaw;
|
|
122
131
|
const metadata = getPConnect().getRawMetadata();
|
|
@@ -129,12 +138,12 @@ export function getFilteredFields(getPConnect) {
|
|
|
129
138
|
}
|
|
130
139
|
|
|
131
140
|
// Filter out fields that are not visible and unsupported types for primary fields (for CaseSummary)
|
|
132
|
-
primaryFieldsRaw = primaryFieldsRaw.filter((item) => {
|
|
141
|
+
primaryFieldsRaw = primaryFieldsRaw.filter((item: any) => {
|
|
133
142
|
const resolvedItem = getPConnect().resolveConfigProps(item.config);
|
|
134
143
|
return resolvedItem.visibility !== false && item.type !== 'TextContent';
|
|
135
144
|
});
|
|
136
145
|
|
|
137
|
-
secondaryFieldsRaw = secondaryFieldsRaw.filter((item) => {
|
|
146
|
+
secondaryFieldsRaw = secondaryFieldsRaw.filter((item: any) => {
|
|
138
147
|
const resolvedItem = getPConnect().resolveConfigProps(item.config);
|
|
139
148
|
return resolvedItem.visibility !== false && item.type !== 'TextContent';
|
|
140
149
|
});
|
|
@@ -147,17 +156,18 @@ export function getFilteredFields(getPConnect) {
|
|
|
147
156
|
* @param {object[]} regionData template children item.
|
|
148
157
|
* @returns {object[]} ConfigurableLayout content.
|
|
149
158
|
*/
|
|
150
|
-
export function getLayoutDataFromRegion(regionData) {
|
|
159
|
+
export function getLayoutDataFromRegion(regionData: object[]) {
|
|
151
160
|
const defaultLayoutConfig = {
|
|
152
161
|
width: 'full',
|
|
153
162
|
fillAvailable: true,
|
|
154
163
|
minWidth: [300, 'px']
|
|
155
164
|
};
|
|
156
165
|
|
|
166
|
+
// @ts-ignore
|
|
157
167
|
return regionData.props
|
|
158
168
|
?.getPConnect()
|
|
159
169
|
?.getChildren()
|
|
160
|
-
?.map((item, index) => {
|
|
170
|
+
?.map((item: any, index: number) => {
|
|
161
171
|
const itemPConnect = item?.getPConnect();
|
|
162
172
|
|
|
163
173
|
return {
|
|
@@ -175,15 +185,18 @@ export function getLayoutDataFromRegion(regionData) {
|
|
|
175
185
|
* Determine if the current view is the view of the case step/assignment.
|
|
176
186
|
* @param {Function} pConnect PConnect object for the component
|
|
177
187
|
*/
|
|
178
|
-
export function getIsAssignmentView(pConnect) {
|
|
188
|
+
export function getIsAssignmentView(pConnect: Function) {
|
|
179
189
|
// Get caseInfo content from the store which contains the view info about the current assignment/step
|
|
180
190
|
// TODO To be replaced with pConnect.getCaseInfo().getCurrentAssignmentView when it's available
|
|
191
|
+
// @ts-ignore
|
|
181
192
|
const assignmentViewClass = pConnect.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_CLASSID);
|
|
193
|
+
// @ts-ignore
|
|
182
194
|
const assignmentViewName = pConnect.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENTACTION_ID);
|
|
183
195
|
|
|
184
196
|
const assignmentViewId = `${assignmentViewName}!${assignmentViewClass}`;
|
|
185
197
|
|
|
186
198
|
// Get the info about the current view from pConnect
|
|
199
|
+
// @ts-ignore
|
|
187
200
|
const currentViewId = `${pConnect.getCurrentView()}!${pConnect.getCurrentClassID()}`;
|
|
188
201
|
|
|
189
202
|
return assignmentViewId === currentViewId;
|
|
@@ -194,7 +207,8 @@ export function getIsAssignmentView(pConnect) {
|
|
|
194
207
|
* @param {Function} pConnect PConnect object for the component
|
|
195
208
|
* @param {string} [instructions="casestep"] 'casestep', 'none', or the html content of a Rule-UI-Paragraph rule (processed via core's paragraph annotation handler)
|
|
196
209
|
*/
|
|
197
|
-
export function getInstructions(pConnect, instructions = 'casestep') {
|
|
210
|
+
export function getInstructions(pConnect: Function, instructions: string = 'casestep') {
|
|
211
|
+
// @ts-ignore
|
|
198
212
|
const caseStepInstructions = pConnect.getValue(PCore.getConstants().CASE_INFO.INSTRUCTIONS);
|
|
199
213
|
|
|
200
214
|
// Determine if this view is the current assignment/step view
|
|
@@ -212,9 +226,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
|
|
|
212
226
|
|
|
213
227
|
// If the annotation wasn't processed correctly, don't return any instruction text
|
|
214
228
|
if (instructions?.startsWith('@PARAGRAPH')) {
|
|
215
|
-
|
|
229
|
+
|
|
216
230
|
console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
|
|
217
|
-
|
|
231
|
+
|
|
218
232
|
return undefined;
|
|
219
233
|
}
|
|
220
234
|
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
-
import
|
|
5
|
-
import { Avatar as CosmosAvatar } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Avatar as CosmosAvatar, withConfiguration } from '@pega/cosmos-react-core';
|
|
6
5
|
import type { PConnFieldProps } from './PConnProps';
|
|
7
6
|
|
|
8
7
|
|
|
@@ -15,7 +14,7 @@ interface PegaDxilMyPageCaseWidgetAvatarProps extends PConnFieldProps {
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
function Avatar(props: PegaDxilMyPageCaseWidgetAvatarProps) {
|
|
18
|
-
const { metaObj, showStatus } = props;
|
|
17
|
+
const { metaObj, showStatus = false } = props;
|
|
19
18
|
const [imageBlobUrl, setImageBlobUrl] = useState(null);
|
|
20
19
|
let userName: string;
|
|
21
20
|
let userIdentifier: string;
|
|
@@ -75,14 +74,5 @@ function Avatar(props: PegaDxilMyPageCaseWidgetAvatarProps) {
|
|
|
75
74
|
return <CosmosAvatar name={userName} imageSrc={imageBlobUrl as React.SetStateAction<any>} />;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
Avatar.propTypes = {
|
|
79
|
-
metaObj: PropTypes.objectOf(PropTypes.any),
|
|
80
|
-
showStatus: PropTypes.bool
|
|
81
|
-
};
|
|
82
77
|
|
|
83
|
-
|
|
84
|
-
metaObj: null,
|
|
85
|
-
showStatus: false
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export default Avatar;
|
|
78
|
+
export default withConfiguration(Avatar);
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.tsx
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
//
|
|
2
|
-
import React from 'react';
|
|
1
|
+
// @ts-nocheck
|
|
3
2
|
import { useState, useEffect, Fragment } from 'react';
|
|
4
3
|
import {
|
|
5
4
|
Link,
|
|
6
5
|
Button,
|
|
7
6
|
Popover,
|
|
8
|
-
Flex,
|
|
9
7
|
useOuterEvent,
|
|
10
8
|
useElement,
|
|
11
9
|
Progress,
|
|
12
10
|
FormField,
|
|
13
|
-
useTheme
|
|
11
|
+
useTheme,
|
|
12
|
+
withConfiguration
|
|
14
13
|
} from '@pega/cosmos-react-core';
|
|
15
14
|
import { Glimpse } from '@pega/cosmos-react-work';
|
|
16
|
-
import
|
|
15
|
+
import { EmailDisplay } from '@pega/cosmos-react-core';
|
|
17
16
|
|
|
18
17
|
import type { PConnFieldProps } from './PConnProps';
|
|
19
18
|
|
|
@@ -30,19 +29,19 @@ interface PegaDxilMyPageCaseWidgetOperatorProps extends PConnFieldProps {
|
|
|
30
29
|
externalUser: any;
|
|
31
30
|
}
|
|
32
31
|
|
|
32
|
+
let pTarget = null;
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
|
|
35
35
|
const { id, name, label, testId, helperText, externalUser, metaObj } = props;
|
|
36
36
|
const [isOpen, setIsOpen] = useState(false);
|
|
37
37
|
const [isLoading, setIsLoading] = useState(true);
|
|
38
|
-
const [popoverTarget, setPopoverTarget] = useState(null);
|
|
39
38
|
const [popoverEl, setPopoverEl] = useElement(null);
|
|
40
39
|
const [popoverContent, setpopoverContent] = useState(null);
|
|
41
40
|
const theme: any = useTheme();
|
|
42
41
|
|
|
43
42
|
/* If the id has changed, we need to reset the popover */
|
|
44
43
|
useEffect(() => {
|
|
45
|
-
|
|
44
|
+
pTarget = null;
|
|
46
45
|
}, [id]);
|
|
47
46
|
|
|
48
47
|
|
|
@@ -51,7 +50,6 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
|
|
|
51
50
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
52
51
|
const localeCategory = 'Operator';
|
|
53
52
|
setpopoverContent(
|
|
54
|
-
// @ts-ignore
|
|
55
53
|
<Progress variant='ring' message={localizedVal('Loading operator...', localeCategory)} placement='local' />
|
|
56
54
|
);
|
|
57
55
|
if (externalUser && externalUser.classID !== 'Data-Party-Operator') {
|
|
@@ -75,10 +73,8 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
|
|
|
75
73
|
];
|
|
76
74
|
setIsLoading(false);
|
|
77
75
|
setpopoverContent(
|
|
78
|
-
// @ts-ignore
|
|
79
76
|
<Glimpse
|
|
80
77
|
visual={
|
|
81
|
-
// @ts-ignore
|
|
82
78
|
<Avatar
|
|
83
79
|
metaObj={{
|
|
84
80
|
name: externalUser.name
|
|
@@ -88,88 +84,63 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
|
|
|
88
84
|
primary={externalUser.name}
|
|
89
85
|
secondary={[externalUser.position]}
|
|
90
86
|
fields={fields}
|
|
87
|
+
target={pTarget}
|
|
91
88
|
/>
|
|
92
89
|
);
|
|
93
90
|
} else {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
.then(
|
|
97
|
-
if (res.data
|
|
98
|
-
const fields = [
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
{res.data.pyOperatorInfo.pyTelephone}
|
|
111
|
-
</Link>
|
|
112
|
-
) : (
|
|
113
|
-
''
|
|
114
|
-
)
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
id: 'pyEmailAddress',
|
|
91
|
+
return PCore.getUserApi()
|
|
92
|
+
.getOperatorDetails(id, true)
|
|
93
|
+
.then(res => {
|
|
94
|
+
if (res.data?.pyOperatorInfo) {
|
|
95
|
+
const fields = [];
|
|
96
|
+
const data = res.data;
|
|
97
|
+
if (data.pyOperatorInfo && data.pyOperatorInfo.pyUserName) {
|
|
98
|
+
fields.push({
|
|
99
|
+
id: 'Name',
|
|
100
|
+
name: localizedVal('Name', localeCategory),
|
|
101
|
+
value: data.pyOperatorInfo.pyUserName
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (data.pyOperatorInfo && data.pyOperatorInfo.pyEmailAddress) {
|
|
105
|
+
fields.push({
|
|
106
|
+
id: 'Email',
|
|
118
107
|
name: localizedVal('Email address', localeCategory),
|
|
119
|
-
value:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
value: res.data.pyOperatorInfo.pyReportToUserName
|
|
132
|
-
}
|
|
133
|
-
];
|
|
108
|
+
value: <EmailDisplay value={data.pyOperatorInfo.pyEmailAddress} />
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
const opAvatar = (
|
|
112
|
+
<Avatar
|
|
113
|
+
metaObj={{
|
|
114
|
+
image: '',
|
|
115
|
+
name: data.pyOperatorInfo.pyUserName
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
);
|
|
119
|
+
|
|
134
120
|
setIsLoading(false);
|
|
135
121
|
setpopoverContent(
|
|
136
|
-
// @ts-ignore
|
|
137
122
|
<Glimpse
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
name: res.data.pyOperatorInfo.pyUserName
|
|
144
|
-
}}
|
|
145
|
-
/>
|
|
146
|
-
}
|
|
147
|
-
primary={res.data.pyOperatorInfo.pyUserName}
|
|
148
|
-
secondary={[res.data.pyOperatorInfo.pyPosition]}
|
|
123
|
+
heading={{
|
|
124
|
+
primary: data.pyOperatorInfo.pyUserName,
|
|
125
|
+
secondary: data.pyOperatorInfo.pyEmailAddress,
|
|
126
|
+
visual: opAvatar
|
|
127
|
+
}}
|
|
149
128
|
fields={fields}
|
|
129
|
+
target={pTarget}
|
|
130
|
+
onDismiss={() => {pTarget = null;}}
|
|
150
131
|
/>
|
|
151
132
|
);
|
|
152
|
-
} else {
|
|
153
|
-
setIsLoading(false);
|
|
154
|
-
// @ts-ignore
|
|
155
|
-
setpopoverContent(<Flex container={{ pad: 1 }}>{localizedVal('Operator not found', localeCategory)}</Flex>);
|
|
156
133
|
}
|
|
157
|
-
})
|
|
158
|
-
.catch(() => {
|
|
159
|
-
setIsLoading(false);
|
|
160
|
-
setpopoverContent(
|
|
161
|
-
// @ts-ignore
|
|
162
|
-
<Flex container={{ pad: 1 }}>{localizedVal('Error loading the operator profile', localeCategory)}</Flex>
|
|
163
|
-
);
|
|
164
134
|
});
|
|
165
135
|
}
|
|
166
136
|
};
|
|
167
137
|
|
|
168
138
|
|
|
169
139
|
const clickAction = (e: any) => {
|
|
170
|
-
|
|
140
|
+
|
|
171
141
|
setIsOpen(!isOpen);
|
|
172
|
-
if (
|
|
142
|
+
if (pTarget === null) {
|
|
143
|
+
pTarget = e.currentTarget;
|
|
173
144
|
OperatorPreview();
|
|
174
145
|
}
|
|
175
146
|
};
|
|
@@ -180,8 +151,7 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
|
|
|
180
151
|
}
|
|
181
152
|
};
|
|
182
153
|
|
|
183
|
-
//
|
|
184
|
-
useOuterEvent('mousedown', [popoverEl, popoverTarget], hidePopover); // Call the method on clicking outside these elements
|
|
154
|
+
useOuterEvent('mousedown', [popoverEl], hidePopover); // Call the method on clicking outside these elements
|
|
185
155
|
|
|
186
156
|
const hideOnEscape = (e: any) => {
|
|
187
157
|
if (e.key === 'Escape') hidePopover(); // Call the method when Escape key is pressed
|
|
@@ -219,7 +189,7 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
|
|
|
219
189
|
<Popover
|
|
220
190
|
ref={setPopoverEl}
|
|
221
191
|
groupId='operator'
|
|
222
|
-
target={
|
|
192
|
+
target={pTarget}
|
|
223
193
|
placement='bottom-start'
|
|
224
194
|
style={isLoading ? { position: 'relative', width: '10rem', minHeight: '4rem' } : undefined}
|
|
225
195
|
strategy='fixed'
|
|
@@ -241,20 +211,5 @@ export default function Operator(props: PegaDxilMyPageCaseWidgetOperatorProps) {
|
|
|
241
211
|
return comp;
|
|
242
212
|
};
|
|
243
213
|
|
|
244
|
-
Operator.propTypes = {
|
|
245
|
-
name: PropTypes.string,
|
|
246
|
-
id: PropTypes.string,
|
|
247
|
-
label: PropTypes.string,
|
|
248
|
-
testId: PropTypes.string,
|
|
249
|
-
helperText: PropTypes.string,
|
|
250
|
-
metaObj: PropTypes.object
|
|
251
|
-
};
|
|
252
214
|
|
|
253
|
-
|
|
254
|
-
name: '',
|
|
255
|
-
id: '',
|
|
256
|
-
label: null,
|
|
257
|
-
testId: null,
|
|
258
|
-
helperText: null,
|
|
259
|
-
metaObj: null
|
|
260
|
-
};
|
|
215
|
+
export default withConfiguration(Operator);
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
2
2
|
// @ts-nocheck
|
|
3
|
-
import {
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
4
|
|
|
5
5
|
import PegaDxilMyPageCaseWidget from './index';
|
|
6
6
|
|
|
7
7
|
import { configProps, operatorDetails } from './mock';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const meta: Meta<typeof PegaDxilMyPageCaseWidget> = {
|
|
10
10
|
title: 'PegaDxilMyPageCaseWidget',
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
component: PegaDxilMyPageCaseWidget,
|
|
12
|
+
excludeStories: /.*Data$/
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof PegaDxilMyPageCaseWidget>;
|
|
17
|
+
|
|
15
18
|
if (!window.PCore) {
|
|
16
19
|
window.PCore = {};
|
|
17
20
|
}
|
|
@@ -34,7 +37,7 @@ window.PCore.getUserApi = () => {
|
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
39
|
|
|
37
|
-
export const BasePegaDxilMyPageCaseWidget =
|
|
40
|
+
export const BasePegaDxilMyPageCaseWidget: Story = args => {
|
|
38
41
|
|
|
39
42
|
const props = {
|
|
40
43
|
label: configProps.label,
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/* eslint-disable no-nested-ternary */
|
|
3
3
|
import { Fragment } from 'react';
|
|
4
|
-
import { DateTimeDisplay, Card, CardHeader, CardContent, Flex } from '@pega/cosmos-react-core';
|
|
5
|
-
|
|
4
|
+
import { DateTimeDisplay, Card, CardHeader, CardContent, Flex, withConfiguration } from '@pega/cosmos-react-core';
|
|
5
|
+
|
|
6
6
|
import type { PConnFieldProps } from './PConnProps';
|
|
7
7
|
|
|
8
8
|
// includes in bundle
|
|
@@ -25,7 +25,6 @@ interface PegaDxilMyPageCaseWidgetProps extends PConnFieldProps {
|
|
|
25
25
|
updateDateTime: string;
|
|
26
26
|
resolveDateTime: string;
|
|
27
27
|
hideLabel: boolean;
|
|
28
|
-
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
|
|
@@ -33,12 +32,12 @@ interface PegaDxilMyPageCaseWidgetProps extends PConnFieldProps {
|
|
|
33
32
|
|
|
34
33
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
35
34
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
36
|
-
|
|
35
|
+
function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidgetProps) {
|
|
37
36
|
|
|
38
37
|
const {
|
|
39
38
|
getPConnect,
|
|
40
|
-
title,
|
|
41
|
-
label,
|
|
39
|
+
title = 'Create operator',
|
|
40
|
+
label = 'Create operator',
|
|
42
41
|
createLabel,
|
|
43
42
|
updateLabel,
|
|
44
43
|
createOperator,
|
|
@@ -67,9 +66,22 @@ export default function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidget
|
|
|
67
66
|
<CardHeader>{title}</CardHeader>
|
|
68
67
|
<CardContent>
|
|
69
68
|
<Flex container={{ direction: 'row'}}>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
<Operator
|
|
70
|
+
label={hideLabel ? '' : _label}
|
|
71
|
+
name={user.userName}
|
|
72
|
+
id={user.userId}
|
|
73
|
+
getPConnect={getPConnect}
|
|
74
|
+
value={undefined}
|
|
75
|
+
validatemessage=''
|
|
76
|
+
hideLabel={false}
|
|
77
|
+
readOnly={false}
|
|
78
|
+
required={false}
|
|
79
|
+
disabled={false}
|
|
80
|
+
externalUser={undefined}
|
|
81
|
+
metaObj={undefined}
|
|
82
|
+
testId=''
|
|
83
|
+
helperText=''
|
|
84
|
+
/>
|
|
73
85
|
{dateTimeValue && (
|
|
74
86
|
<Fragment>
|
|
75
87
|
{' '}
|
|
@@ -91,36 +103,9 @@ export default function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidget
|
|
|
91
103
|
|
|
92
104
|
}
|
|
93
105
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
createLabel: null,
|
|
98
|
-
updateLabel: null,
|
|
99
|
-
createOperator: null,
|
|
100
|
-
updateOperator: null,
|
|
101
|
-
createDateTime: null,
|
|
102
|
-
updateDateTime: null,
|
|
103
|
-
resolveLabel: null,
|
|
104
|
-
resolveOperator: null,
|
|
105
|
-
resolveDateTime: null,
|
|
106
|
-
hideLabel: false
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
PegaDxilMyPageCaseWidget.propTypes = {
|
|
110
|
-
getPConnect: PropTypes.func.isRequired,
|
|
111
|
-
label: PropTypes.string,
|
|
112
|
-
title: PropTypes.string,
|
|
113
|
-
createLabel: PropTypes.string,
|
|
114
|
-
updateLabel: PropTypes.string,
|
|
115
|
-
resolveLabel: PropTypes.string,
|
|
116
|
-
createOperator: PropTypes.objectOf(PropTypes.any),
|
|
117
|
-
updateOperator: PropTypes.objectOf(PropTypes.any),
|
|
118
|
-
resolveOperator: PropTypes.objectOf(PropTypes.any),
|
|
119
|
-
createDateTime: PropTypes.string,
|
|
120
|
-
updateDateTime: PropTypes.string,
|
|
121
|
-
resolveDateTime: PropTypes.string,
|
|
122
|
-
hideLabel: PropTypes.bool
|
|
123
|
-
};
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
export default withConfiguration(PegaDxilMyPageCaseWidget);
|
|
124
109
|
|
|
125
110
|
// as objects are there in props, shallow comparision fails & re-rendering of comp happens even with
|
|
126
111
|
// same key value pairs in obj. hence using custom comparison function on when to re-render
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.ts
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
// utilizing theming, comment out, if want individual style
|
|
3
|
-
import styled from 'styled-components';
|
|
4
|
-
import { Configuration } from '@pega/cosmos-react-core';
|
|
5
|
-
|
|
6
|
-
export default styled(Configuration)``;
|
|
7
|
-
|
|
8
1
|
// individual style, comment out above, and uncomment here and add styles
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
export default styled.div(() => {
|
|
5
|
+
return css`
|
|
6
|
+
margin: 0px 0;
|
|
7
|
+
`;
|
|
8
|
+
});
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
|
|
2
2
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
3
3
|
// @ts-nocheck
|
|
4
|
-
import {
|
|
4
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
import PegaDxilMyPageWidget from './index';
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
import configProps from './mock';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const meta: Meta<typeof PegaDxilMyPageWidget> = {
|
|
12
12
|
title: 'PegaDxilMyPageWidget',
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
component: PegaDxilMyPageWidget,
|
|
14
|
+
excludeStories: /.*Data$/
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof PegaDxilMyPageWidget>;
|
|
19
|
+
|
|
20
|
+
export const BasePegaDxilMyPageWidget: Story = args => {
|
|
18
21
|
|
|
19
22
|
const props = {
|
|
20
23
|
label: configProps.label,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { withConfiguration } from '@pega/cosmos-react-core';
|
|
2
2
|
import { AppAnnouncement as PegaAppAnnouncement } from '@pega/cosmos-react-work';
|
|
3
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
4
4
|
|
|
@@ -19,9 +19,9 @@ interface PegaDxilMyPageWidgetProps extends PConnFieldProps {
|
|
|
19
19
|
|
|
20
20
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
21
21
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
22
|
-
|
|
22
|
+
function PegaDxilMyPageWidget(props: PegaDxilMyPageWidgetProps) {
|
|
23
23
|
|
|
24
|
-
const { header, description, datasource, whatsnewlink, image } = props;
|
|
24
|
+
const { header, description, datasource = [], whatsnewlink, image } = props;
|
|
25
25
|
let details = [];
|
|
26
26
|
// @ts-ignore
|
|
27
27
|
if (datasource && datasource.source) {
|
|
@@ -44,18 +44,4 @@ export default function PegaDxilMyPageWidget(props: PegaDxilMyPageWidgetProps) {
|
|
|
44
44
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
header: '',
|
|
49
|
-
description: '',
|
|
50
|
-
image: '',
|
|
51
|
-
datasource: [],
|
|
52
|
-
whatsnewlink: ''
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
PegaDxilMyPageWidget.propTypes = {
|
|
56
|
-
header: PropTypes.string,
|
|
57
|
-
description: PropTypes.string,
|
|
58
|
-
datasource: PropTypes.instanceOf(Object),
|
|
59
|
-
whatsnewlink: PropTypes.string,
|
|
60
|
-
image: PropTypes.string
|
|
61
|
-
};
|
|
47
|
+
export default withConfiguration(PegaDxilMyPageWidget);
|