@pega/custom-dx-components 0.23.35 → 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 +10 -47
- 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 +4 -19
- 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 -51
- 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 +102 -60
- 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 +4 -19
- 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 -51
- 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/Launchpad/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,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
|
-
import { DateTimeDisplay, Card, CardHeader, CardContent, Flex } from '@pega/cosmos-react-core';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
2
|
+
import { DateTimeDisplay, Card, CardHeader, CardContent, Flex, withConfiguration } from '@pega/cosmos-react-core';
|
|
4
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
5
4
|
|
|
6
5
|
// includes in bundle
|
|
@@ -21,12 +20,12 @@ interface PegaDxilMyPageCaseWidgetProps extends PConnFieldProps {
|
|
|
21
20
|
|
|
22
21
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
23
22
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
24
|
-
|
|
23
|
+
function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidgetProps) {
|
|
25
24
|
|
|
26
25
|
const {
|
|
27
26
|
getPConnect,
|
|
28
|
-
title,
|
|
29
|
-
label,
|
|
27
|
+
title = 'Create operator',
|
|
28
|
+
label = 'Create operator',
|
|
30
29
|
createLabel,
|
|
31
30
|
updateLabel
|
|
32
31
|
} = props;
|
|
@@ -47,7 +46,22 @@ export default function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidget
|
|
|
47
46
|
<CardHeader>{title}</CardHeader>
|
|
48
47
|
<CardContent>
|
|
49
48
|
<Flex container={{ direction: 'row'}}>
|
|
50
|
-
|
|
49
|
+
<Operator
|
|
50
|
+
label={_label}
|
|
51
|
+
name={user}
|
|
52
|
+
id={user}
|
|
53
|
+
getPConnect={getPConnect}
|
|
54
|
+
value={undefined}
|
|
55
|
+
validatemessage=''
|
|
56
|
+
hideLabel={false}
|
|
57
|
+
readOnly={false}
|
|
58
|
+
required={false}
|
|
59
|
+
disabled={false}
|
|
60
|
+
externalUser={undefined}
|
|
61
|
+
testId=''
|
|
62
|
+
helperText=''
|
|
63
|
+
metaObj={undefined}
|
|
64
|
+
/>
|
|
51
65
|
{dateTimeValue && (
|
|
52
66
|
<Fragment>
|
|
53
67
|
{' '}
|
|
@@ -65,20 +79,8 @@ export default function PegaDxilMyPageCaseWidget(props: PegaDxilMyPageCaseWidget
|
|
|
65
79
|
|
|
66
80
|
}
|
|
67
81
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"title": "Create operator",
|
|
71
|
-
createLabel: null,
|
|
72
|
-
updateLabel: null
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
PegaDxilMyPageCaseWidget.propTypes = {
|
|
76
|
-
getPConnect: PropTypes.func.isRequired,
|
|
77
|
-
label: PropTypes.string,
|
|
78
|
-
title: PropTypes.string,
|
|
79
|
-
createLabel: PropTypes.string,
|
|
80
|
-
updateLabel: PropTypes.string
|
|
81
|
-
};
|
|
82
|
+
|
|
83
|
+
export default withConfiguration(PegaDxilMyPageCaseWidget);
|
|
82
84
|
|
|
83
85
|
// as objects are there in props, shallow comparision fails & re-rendering of comp happens even with
|
|
84
86
|
// same key value pairs in obj. hence using custom comparison function on when to re-render
|
|
@@ -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
|
+
});
|
|
@@ -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);
|
|
@@ -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
|
+
});
|
|
@@ -1,19 +1,22 @@
|
|
|
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 PegaDxilMyParagraph from './index';
|
|
7
7
|
|
|
8
8
|
import { stateProps, configProps, fieldMetadata } from './mock';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const meta: Meta<typeof PegaDxilMyParagraph> = {
|
|
11
11
|
title: 'PegaDxilMyParagraph',
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
component: PegaDxilMyParagraph,
|
|
13
|
+
excludeStories: /.*Data$/
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof PegaDxilMyParagraph>;
|
|
18
|
+
|
|
19
|
+
export const BasePegaDxilMyParagraph: Story = args => {
|
|
17
20
|
|
|
18
21
|
const props = {
|
|
19
22
|
value: configProps.value,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { TextArea as CosmosTextArea, FieldValueList, ParagraphDisplay, Text, EmailDisplay, PhoneDisplay, URLDisplay } from '@pega/cosmos-react-core';
|
|
3
|
-
|
|
2
|
+
import { TextArea as CosmosTextArea, FieldValueList, ParagraphDisplay, Text, EmailDisplay, PhoneDisplay, URLDisplay, withConfiguration } from '@pega/cosmos-react-core';
|
|
3
|
+
|
|
4
4
|
import type { PConnFieldProps } from './PConnProps';
|
|
5
5
|
|
|
6
6
|
// includes in bundle
|
|
@@ -73,22 +73,22 @@ export const textFormatter = (formatter: string, value: any) => {
|
|
|
73
73
|
|
|
74
74
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
75
75
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
76
|
-
|
|
76
|
+
function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
|
|
77
77
|
const {
|
|
78
78
|
getPConnect,
|
|
79
79
|
value,
|
|
80
|
-
hideLabel,
|
|
80
|
+
hideLabel = false,
|
|
81
81
|
placeholder,
|
|
82
82
|
validatemessage,
|
|
83
83
|
label,
|
|
84
84
|
helperText,
|
|
85
85
|
testId,
|
|
86
|
-
fieldMetadata,
|
|
86
|
+
fieldMetadata = {},
|
|
87
87
|
displayMode,
|
|
88
|
-
additionalProps,
|
|
89
|
-
variant,
|
|
90
|
-
isTableFormatter,
|
|
91
|
-
hasSuggestions
|
|
88
|
+
additionalProps = {},
|
|
89
|
+
variant = 'inline',
|
|
90
|
+
isTableFormatter = false,
|
|
91
|
+
hasSuggestions = false
|
|
92
92
|
} = props;
|
|
93
93
|
const { formatter } = props;
|
|
94
94
|
const pConn = getPConnect();
|
|
@@ -99,7 +99,7 @@ export default function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
|
|
|
99
99
|
const hasValueChange = useRef(false);
|
|
100
100
|
|
|
101
101
|
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
102
|
-
let { readOnly, required, disabled } = props;
|
|
102
|
+
let { readOnly = false, required = false, disabled = false } = props;
|
|
103
103
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
104
104
|
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
105
105
|
);
|
|
@@ -207,42 +207,6 @@ export default function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
|
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
PegaDxilMyParagraph.defaultProps = {
|
|
211
|
-
value: '',
|
|
212
|
-
placeholder: '',
|
|
213
|
-
validatemessage: '',
|
|
214
|
-
helperText: '',
|
|
215
|
-
hideLabel: false,
|
|
216
|
-
disabled: false,
|
|
217
|
-
readOnly: false,
|
|
218
|
-
required: false,
|
|
219
|
-
testId: '',
|
|
220
|
-
displayMode: null,
|
|
221
|
-
fieldMetadata: {},
|
|
222
|
-
additionalProps: {},
|
|
223
|
-
variant: 'inline',
|
|
224
|
-
formatter: '',
|
|
225
|
-
isTableFormatter: false,
|
|
226
|
-
hasSuggestions: false
|
|
227
|
-
};
|
|
228
210
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
placeholder: PropTypes.string,
|
|
232
|
-
label: PropTypes.string.isRequired,
|
|
233
|
-
hideLabel: PropTypes.bool,
|
|
234
|
-
getPConnect: PropTypes.func.isRequired,
|
|
235
|
-
validatemessage: PropTypes.string,
|
|
236
|
-
displayMode: PropTypes.string,
|
|
237
|
-
helperText: PropTypes.string,
|
|
238
|
-
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
239
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
240
|
-
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
241
|
-
testId: PropTypes.string,
|
|
242
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
243
|
-
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
244
|
-
variant: PropTypes.string,
|
|
245
|
-
formatter: PropTypes.string,
|
|
246
|
-
isTableFormatter: PropTypes.bool,
|
|
247
|
-
hasSuggestions: PropTypes.bool
|
|
248
|
-
};
|
|
211
|
+
|
|
212
|
+
export default withConfiguration(PegaDxilMyParagraph);
|
|
@@ -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
|
+
});
|
|
@@ -1,19 +1,22 @@
|
|
|
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 { configProps, stateProps, fieldMetadata } from './mock';
|
|
7
7
|
|
|
8
8
|
import PegaDxilMyPercentage from './index';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const meta: Meta<typeof PegaDxilMyPercentage> = {
|
|
11
11
|
title: 'PegaDxilMyPercentage',
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
component: PegaDxilMyPercentage,
|
|
13
|
+
excludeStories: /.*Data$/
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof PegaDxilMyPercentage>;
|
|
18
|
+
|
|
19
|
+
export const BasePegaDxilMyPercentage: Story = args => {
|
|
17
20
|
|
|
18
21
|
const props = {
|
|
19
22
|
value: configProps.value,
|
|
@@ -4,9 +4,10 @@ import {
|
|
|
4
4
|
NumberDisplay,
|
|
5
5
|
CurrencyDisplay,
|
|
6
6
|
FieldValueList,
|
|
7
|
-
Text
|
|
7
|
+
Text,
|
|
8
|
+
withConfiguration
|
|
8
9
|
} from '@pega/cosmos-react-core';
|
|
9
|
-
|
|
10
|
+
|
|
10
11
|
|
|
11
12
|
import type { PConnFieldProps } from './PConnProps';
|
|
12
13
|
|
|
@@ -47,25 +48,25 @@ interface StateProps {
|
|
|
47
48
|
|
|
48
49
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
49
50
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
50
|
-
|
|
51
|
+
function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
51
52
|
const {
|
|
52
53
|
getPConnect,
|
|
53
54
|
value,
|
|
54
55
|
placeholder,
|
|
55
56
|
validatemessage,
|
|
56
57
|
label,
|
|
57
|
-
hideLabel,
|
|
58
|
+
hideLabel = false,
|
|
58
59
|
helperText,
|
|
59
60
|
testId,
|
|
60
61
|
decimalPrecision,
|
|
61
|
-
additionalProps,
|
|
62
|
+
additionalProps = {},
|
|
62
63
|
displayMode,
|
|
63
|
-
variant,
|
|
64
|
+
variant = 'inline',
|
|
64
65
|
formatter,
|
|
65
|
-
isTableFormatter,
|
|
66
|
-
hasSuggestions
|
|
66
|
+
isTableFormatter = false,
|
|
67
|
+
hasSuggestions = false
|
|
67
68
|
} = props;
|
|
68
|
-
let { showGroupSeparators } = props;
|
|
69
|
+
let { showGroupSeparators = false } = props;
|
|
69
70
|
const pConn = getPConnect();
|
|
70
71
|
const actions = pConn.getActionsApi();
|
|
71
72
|
const stateProps = pConn.getStateProps() as StateProps;
|
|
@@ -74,7 +75,7 @@ export default function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
|
74
75
|
|
|
75
76
|
const hasValueChange = useRef(false);
|
|
76
77
|
|
|
77
|
-
let { readOnly, required, disabled } = props;
|
|
78
|
+
let { readOnly = false, required = false, disabled = false } = props;
|
|
78
79
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
79
80
|
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
80
81
|
);
|
|
@@ -144,7 +145,7 @@ export default function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
|
144
145
|
/>
|
|
145
146
|
);
|
|
146
147
|
if (isTableFormatter && (formatter === 'Currency' || formatter === 'Currency-Code')) {
|
|
147
|
-
const { currencyISOCode } = props;
|
|
148
|
+
const { currencyISOCode = 'USD' } = props;
|
|
148
149
|
let showIsoCode = true;
|
|
149
150
|
if (formatter === 'Currency') {
|
|
150
151
|
showIsoCode = false;
|
|
@@ -261,46 +262,4 @@ export default function PegaDxilMyPercentage(props: PegaDxilMyPercentageProps) {
|
|
|
261
262
|
);
|
|
262
263
|
}
|
|
263
264
|
|
|
264
|
-
|
|
265
|
-
value: '',
|
|
266
|
-
placeholder: '',
|
|
267
|
-
validatemessage: '',
|
|
268
|
-
helperText: '',
|
|
269
|
-
hideLabel: false,
|
|
270
|
-
disabled: false,
|
|
271
|
-
readOnly: false,
|
|
272
|
-
required: false,
|
|
273
|
-
testId: '',
|
|
274
|
-
decimalPrecision: '',
|
|
275
|
-
showGroupSeparators: false,
|
|
276
|
-
additionalProps: {},
|
|
277
|
-
displayMode: null,
|
|
278
|
-
variant: 'inline',
|
|
279
|
-
currencyISOCode: 'USD',
|
|
280
|
-
formatter: '',
|
|
281
|
-
isTableFormatter: false,
|
|
282
|
-
hasSuggestions: false
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
PegaDxilMyPercentage.propTypes = {
|
|
286
|
-
value: PropTypes.string,
|
|
287
|
-
placeholder: PropTypes.string,
|
|
288
|
-
label: PropTypes.string.isRequired,
|
|
289
|
-
hideLabel: PropTypes.bool,
|
|
290
|
-
getPConnect: PropTypes.func.isRequired,
|
|
291
|
-
validatemessage: PropTypes.string,
|
|
292
|
-
helperText: PropTypes.string,
|
|
293
|
-
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
294
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
295
|
-
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
296
|
-
testId: PropTypes.string,
|
|
297
|
-
decimalPrecision: PropTypes.string,
|
|
298
|
-
showGroupSeparators: PropTypes.bool,
|
|
299
|
-
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
300
|
-
displayMode: PropTypes.string,
|
|
301
|
-
variant: PropTypes.string,
|
|
302
|
-
formatter: PropTypes.string,
|
|
303
|
-
currencyISOCode: PropTypes.string,
|
|
304
|
-
isTableFormatter: PropTypes.bool,
|
|
305
|
-
hasSuggestions: PropTypes.bool
|
|
306
|
-
};
|
|
265
|
+
export default withConfiguration(PegaDxilMyPercentage);
|
|
@@ -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
|
+
});
|
|
@@ -1,18 +1,21 @@
|
|
|
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 PegaDxilMyPhone from './index';
|
|
7
7
|
import { stateProps, configProps } from './mock';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const meta: Meta<typeof PegaDxilMyPhone> = {
|
|
10
10
|
title: 'PegaDxilMyPhone',
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
component: PegaDxilMyPhone,
|
|
12
|
+
excludeStories: /.*Data$/
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof PegaDxilMyPhone>;
|
|
17
|
+
|
|
18
|
+
export const BasePegaDxilMyPhone: Story = args => {
|
|
16
19
|
|
|
17
20
|
const props = {
|
|
18
21
|
value: configProps.value,
|
|
@@ -5,9 +5,10 @@ import {
|
|
|
5
5
|
PhoneDisplay,
|
|
6
6
|
FieldValueList,
|
|
7
7
|
Text,
|
|
8
|
-
EmailDisplay,
|
|
8
|
+
EmailDisplay,
|
|
9
|
+
URLDisplay,
|
|
10
|
+
withConfiguration
|
|
9
11
|
} from '@pega/cosmos-react-core';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
12
|
import type { PConnFieldProps } from './PConnProps';
|
|
12
13
|
|
|
13
14
|
// includes in bundle
|
|
@@ -82,23 +83,23 @@ export const textFormatter = (formatter: string, value: any) => {
|
|
|
82
83
|
|
|
83
84
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
84
85
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
85
|
-
|
|
86
|
+
function PegaDxilMyPhone(props: PegaDxilMyPhoneProps) {
|
|
86
87
|
const {
|
|
87
88
|
getPConnect,
|
|
88
89
|
value,
|
|
89
|
-
showCountryCode,
|
|
90
|
+
showCountryCode = true,
|
|
90
91
|
placeholder,
|
|
91
92
|
validatemessage,
|
|
92
93
|
label,
|
|
93
|
-
hideLabel,
|
|
94
|
+
hideLabel = false,
|
|
94
95
|
helperText,
|
|
95
|
-
datasource,
|
|
96
|
+
datasource = [],
|
|
96
97
|
testId,
|
|
97
98
|
displayMode,
|
|
98
|
-
additionalProps,
|
|
99
|
-
variant,
|
|
100
|
-
isTableFormatter,
|
|
101
|
-
hasSuggestions
|
|
99
|
+
additionalProps = {},
|
|
100
|
+
variant = 'inline',
|
|
101
|
+
isTableFormatter = false,
|
|
102
|
+
hasSuggestions = false
|
|
102
103
|
} = props;
|
|
103
104
|
const { formatter } = props;
|
|
104
105
|
const pConn = getPConnect();
|
|
@@ -119,7 +120,7 @@ export default function PegaDxilMyPhone(props: PegaDxilMyPhoneProps) {
|
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
122
|
-
let { readOnly, required, disabled } = props;
|
|
123
|
+
let { readOnly = false, required = false, disabled = false } = props;
|
|
123
124
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
124
125
|
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
125
126
|
);
|
|
@@ -245,44 +246,4 @@ export default function PegaDxilMyPhone(props: PegaDxilMyPhoneProps) {
|
|
|
245
246
|
);
|
|
246
247
|
}
|
|
247
248
|
|
|
248
|
-
|
|
249
|
-
value: '',
|
|
250
|
-
placeholder: '',
|
|
251
|
-
validatemessage: '',
|
|
252
|
-
helperText: '',
|
|
253
|
-
datasource: undefined,
|
|
254
|
-
hideLabel: false,
|
|
255
|
-
disabled: false,
|
|
256
|
-
readOnly: false,
|
|
257
|
-
required: false,
|
|
258
|
-
showCountryCode: true,
|
|
259
|
-
testId: '',
|
|
260
|
-
displayMode: null,
|
|
261
|
-
additionalProps: {},
|
|
262
|
-
variant: 'inline',
|
|
263
|
-
formatter: '',
|
|
264
|
-
isTableFormatter: false,
|
|
265
|
-
hasSuggestions: false
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
PegaDxilMyPhone.propTypes = {
|
|
269
|
-
value: PropTypes.string,
|
|
270
|
-
placeholder: PropTypes.string,
|
|
271
|
-
datasource: PropTypes.objectOf(PropTypes.any),
|
|
272
|
-
label: PropTypes.string.isRequired,
|
|
273
|
-
hideLabel: PropTypes.bool,
|
|
274
|
-
getPConnect: PropTypes.func.isRequired,
|
|
275
|
-
validatemessage: PropTypes.string,
|
|
276
|
-
helperText: PropTypes.string,
|
|
277
|
-
showCountryCode: PropTypes.bool,
|
|
278
|
-
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
279
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
280
|
-
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
281
|
-
testId: PropTypes.string,
|
|
282
|
-
displayMode: PropTypes.string,
|
|
283
|
-
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
284
|
-
variant: PropTypes.string,
|
|
285
|
-
formatter: PropTypes.string,
|
|
286
|
-
isTableFormatter: PropTypes.bool,
|
|
287
|
-
hasSuggestions: PropTypes.bool
|
|
288
|
-
};
|
|
249
|
+
export default withConfiguration(PegaDxilMyPhone);
|