@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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import { Avatar as CosmosAvatar } from '@pega/cosmos-react-core';
|
|
6
5
|
import type { PConnFieldProps } from './PConnProps';
|
|
7
6
|
|
|
@@ -15,7 +14,7 @@ interface {{COMPONENT_CLASS_NAME}}AvatarProps extends PConnFieldProps {
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
function Avatar(props: {{COMPONENT_CLASS_NAME}}AvatarProps) {
|
|
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: {{COMPONENT_CLASS_NAME}}AvatarProps) {
|
|
|
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
|
-
|
|
83
|
-
Avatar.defaultProps = {
|
|
84
|
-
metaObj: null,
|
|
85
|
-
showStatus: false
|
|
86
|
-
};
|
|
87
77
|
|
|
88
78
|
export default Avatar;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
1
2
|
import { useState, useEffect, Fragment } from 'react';
|
|
2
3
|
import {
|
|
3
4
|
Link,
|
|
@@ -11,12 +12,12 @@ import {
|
|
|
11
12
|
} from '@pega/cosmos-react-core';
|
|
12
13
|
import { Glimpse } from '@pega/cosmos-react-work';
|
|
13
14
|
import { EmailDisplay } from '@pega/cosmos-react-core';
|
|
14
|
-
import PropTypes from 'prop-types';
|
|
15
15
|
|
|
16
16
|
import type { PConnFieldProps } from './PConnProps';
|
|
17
17
|
|
|
18
18
|
import Avatar from './Avatar';
|
|
19
19
|
|
|
20
|
+
|
|
20
21
|
// interface for props
|
|
21
22
|
interface {{COMPONENT_CLASS_NAME}}OperatorProps extends PConnFieldProps {
|
|
22
23
|
// If any, enter additional props that only exist on TextInput here
|
|
@@ -27,18 +28,19 @@ interface {{COMPONENT_CLASS_NAME}}OperatorProps extends PConnFieldProps {
|
|
|
27
28
|
externalUser: any;
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
let pTarget = null;
|
|
32
|
+
|
|
30
33
|
export default function Operator(props: {{COMPONENT_CLASS_NAME}}OperatorProps) {
|
|
31
34
|
const { id, name, label, testId, helperText, externalUser, metaObj } = props;
|
|
32
35
|
const [isOpen, setIsOpen] = useState(false);
|
|
33
36
|
const [isLoading, setIsLoading] = useState(true);
|
|
34
|
-
const [popoverTarget, setPopoverTarget] = useState(null);
|
|
35
37
|
const [popoverEl, setPopoverEl] = useElement(null);
|
|
36
38
|
const [popoverContent, setpopoverContent] = useState(null);
|
|
37
|
-
const theme = useTheme();
|
|
39
|
+
const theme: any = useTheme();
|
|
38
40
|
|
|
39
41
|
/* If the id has changed, we need to reset the popover */
|
|
40
42
|
useEffect(() => {
|
|
41
|
-
|
|
43
|
+
pTarget = null;
|
|
42
44
|
}, [id]);
|
|
43
45
|
|
|
44
46
|
|
|
@@ -46,10 +48,9 @@ export default function Operator(props: {{COMPONENT_CLASS_NAME}}OperatorProps) {
|
|
|
46
48
|
{{=<% %>=}}
|
|
47
49
|
|
|
48
50
|
const OperatorPreview = () => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
52
|
+
const localeCategory = 'Operator';
|
|
51
53
|
setpopoverContent(
|
|
52
|
-
// @ts-ignore
|
|
53
54
|
<Progress variant='ring' message={localizedVal('Loading operator...', localeCategory)} placement='local' />
|
|
54
55
|
);
|
|
55
56
|
if (externalUser && externalUser.classID !== 'Data-Party-Operator') {
|
|
@@ -73,10 +74,8 @@ export default function Operator(props: {{COMPONENT_CLASS_NAME}}OperatorProps) {
|
|
|
73
74
|
];
|
|
74
75
|
setIsLoading(false);
|
|
75
76
|
setpopoverContent(
|
|
76
|
-
// @ts-ignore
|
|
77
77
|
<Glimpse
|
|
78
78
|
visual={
|
|
79
|
-
// @ts-ignore
|
|
80
79
|
<Avatar
|
|
81
80
|
metaObj={{
|
|
82
81
|
name: externalUser.name
|
|
@@ -86,134 +85,63 @@ export default function Operator(props: {{COMPONENT_CLASS_NAME}}OperatorProps) {
|
|
|
86
85
|
primary={externalUser.name}
|
|
87
86
|
secondary={[externalUser.position]}
|
|
88
87
|
fields={fields}
|
|
88
|
+
target={pTarget}
|
|
89
89
|
/>
|
|
90
90
|
);
|
|
91
91
|
} else {
|
|
92
|
-
localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
93
|
-
localeCategory = 'Operator';
|
|
94
92
|
return PCore.getUserApi()
|
|
95
93
|
.getOperatorDetails(id, true)
|
|
96
94
|
.then(res => {
|
|
97
95
|
if (res.data?.data && res.data.data[0].BusinessID && res.data.data[0].Name) {
|
|
98
96
|
const fields = [];
|
|
99
|
-
if (res.data.data[0].Name)
|
|
97
|
+
if (res.data.data[0].Name) {
|
|
100
98
|
fields.push({
|
|
101
99
|
id: 'Name',
|
|
102
100
|
name: localizedVal('Name', localeCategory),
|
|
103
101
|
value: res.data.data[0].Name
|
|
104
102
|
});
|
|
105
|
-
|
|
103
|
+
}
|
|
104
|
+
if (res.data.data[0].BusinessID) {
|
|
106
105
|
fields.push({
|
|
107
106
|
id: 'Email',
|
|
108
107
|
name: localizedVal('Email address', localeCategory),
|
|
109
108
|
value: <EmailDisplay value={res.data.data[0].BusinessID} />
|
|
110
109
|
});
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
visual: (
|
|
118
|
-
// @ts-ignore
|
|
119
|
-
<Avatar
|
|
120
|
-
metaObj={{
|
|
121
|
-
image: '',
|
|
122
|
-
name: res.data.data[0].Name
|
|
123
|
-
}}
|
|
124
|
-
/>
|
|
125
|
-
)
|
|
110
|
+
}
|
|
111
|
+
const opAvatar = (
|
|
112
|
+
<Avatar
|
|
113
|
+
metaObj={{
|
|
114
|
+
image: '',
|
|
115
|
+
name: res.data.data[0].Name
|
|
126
116
|
}}
|
|
127
|
-
fields={fields}
|
|
128
|
-
// @ts-ignore
|
|
129
|
-
target={popoverTarget}
|
|
130
|
-
onDismiss={() => setPopoverTarget(null)}
|
|
131
117
|
/>
|
|
132
118
|
);
|
|
133
|
-
|
|
134
|
-
});
|
|
135
|
-
/*
|
|
136
|
-
const { getOperatorDetails } = PCore.getUserApi();
|
|
137
|
-
getOperatorDetails(id)
|
|
138
|
-
.then((res) => {
|
|
139
|
-
if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {
|
|
140
|
-
const fields = [
|
|
141
|
-
{
|
|
142
|
-
id: 'pyOrganization',
|
|
143
|
-
name: localizedVal('Organization', localeCategory),
|
|
144
|
-
value: res.data.pyOperatorInfo.pyOrganization
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
id: 'pyTelephone',
|
|
148
|
-
name: localizedVal('Telephone', localeCategory),
|
|
149
|
-
value:
|
|
150
|
-
res.data.pyOperatorInfo.pyTelephone !== '' ? (
|
|
151
|
-
<Link href={`tel:${res.data.pyOperatorInfo.pyTelephone}`}>
|
|
152
|
-
{res.data.pyOperatorInfo.pyTelephone}
|
|
153
|
-
</Link>
|
|
154
|
-
) : (
|
|
155
|
-
''
|
|
156
|
-
)
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
id: 'pyEmailAddress',
|
|
160
|
-
name: localizedVal('Email address', localeCategory),
|
|
161
|
-
value:
|
|
162
|
-
res.data.pyOperatorInfo.pyEmailAddress !== '' ? (
|
|
163
|
-
<Link href={`mailto:${res.data.pyOperatorInfo.pyEmailAddress}`}>
|
|
164
|
-
{res.data.pyOperatorInfo.pyEmailAddress}
|
|
165
|
-
</Link>
|
|
166
|
-
) : (
|
|
167
|
-
''
|
|
168
|
-
)
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
id: 'ReportToUserName',
|
|
172
|
-
name: localizedVal('Reports to', localeCategory),
|
|
173
|
-
value: res.data.pyOperatorInfo.pyReportToUserName
|
|
174
|
-
}
|
|
175
|
-
];
|
|
119
|
+
|
|
176
120
|
setIsLoading(false);
|
|
177
121
|
setpopoverContent(
|
|
178
|
-
// @ts-ignore
|
|
179
122
|
<Glimpse
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
name: res.data.pyOperatorInfo.pyUserName
|
|
186
|
-
}}
|
|
187
|
-
/>
|
|
188
|
-
}
|
|
189
|
-
primary={res.data.pyOperatorInfo.pyUserName}
|
|
190
|
-
secondary={[res.data.pyOperatorInfo.pyPosition]}
|
|
123
|
+
heading={{
|
|
124
|
+
primary: res.data.data[0].Name,
|
|
125
|
+
secondary: res.data.data[0].BusinessID,
|
|
126
|
+
visual: opAvatar
|
|
127
|
+
}}
|
|
191
128
|
fields={fields}
|
|
129
|
+
target={pTarget}
|
|
130
|
+
onDismiss={() => {pTarget = null;}}
|
|
192
131
|
/>
|
|
193
132
|
);
|
|
194
|
-
} else {
|
|
195
|
-
setIsLoading(false);
|
|
196
|
-
// @ts-ignore
|
|
197
|
-
setpopoverContent(<Flex container={{ pad: 1 }}>{localizedVal('Operator not found', localeCategory)}</Flex>);
|
|
198
133
|
}
|
|
199
|
-
})
|
|
200
|
-
.catch(() => {
|
|
201
|
-
setIsLoading(false);
|
|
202
|
-
setpopoverContent(
|
|
203
|
-
// @ts-ignore
|
|
204
|
-
<Flex container={{ pad: 1 }}>{localizedVal('Error loading the operator profile', localeCategory)}</Flex>
|
|
205
|
-
);
|
|
206
134
|
});
|
|
207
|
-
*/
|
|
208
135
|
}
|
|
209
136
|
};
|
|
210
137
|
|
|
211
138
|
<%={{ }}=%> {{! revert delimiters for mustache }}
|
|
212
139
|
|
|
213
140
|
const clickAction = (e: any) => {
|
|
214
|
-
|
|
141
|
+
|
|
215
142
|
setIsOpen(!isOpen);
|
|
216
|
-
if (
|
|
143
|
+
if (pTarget === null) {
|
|
144
|
+
pTarget = e.currentTarget;
|
|
217
145
|
OperatorPreview();
|
|
218
146
|
}
|
|
219
147
|
};
|
|
@@ -224,8 +152,8 @@ export default function Operator(props: {{COMPONENT_CLASS_NAME}}OperatorProps) {
|
|
|
224
152
|
}
|
|
225
153
|
};
|
|
226
154
|
|
|
227
|
-
//
|
|
228
|
-
|
|
155
|
+
useOuterEvent('mousedown', [popoverEl], hidePopover); // Call the method on clicking outside these elements
|
|
156
|
+
|
|
229
157
|
const hideOnEscape = (e: any) => {
|
|
230
158
|
if (e.key === 'Escape') hidePopover(); // Call the method when Escape key is pressed
|
|
231
159
|
};
|
|
@@ -242,7 +170,7 @@ export default function Operator(props: {{COMPONENT_CLASS_NAME}}OperatorProps) {
|
|
|
242
170
|
data-test-id={testId}
|
|
243
171
|
style={label !== null ? { width: 'max-content', height: theme.components.input.height } : undefined}
|
|
244
172
|
>
|
|
245
|
-
<Avatar {...props}
|
|
173
|
+
<Avatar {...props} />
|
|
246
174
|
</Button>
|
|
247
175
|
) : (
|
|
248
176
|
<Button
|
|
@@ -262,7 +190,7 @@ export default function Operator(props: {{COMPONENT_CLASS_NAME}}OperatorProps) {
|
|
|
262
190
|
<Popover
|
|
263
191
|
ref={setPopoverEl}
|
|
264
192
|
groupId='operator'
|
|
265
|
-
target={
|
|
193
|
+
target={pTarget}
|
|
266
194
|
placement='bottom-start'
|
|
267
195
|
style={isLoading ? { position: 'relative', width: '10rem', minHeight: '4rem' } : undefined}
|
|
268
196
|
strategy='fixed'
|
|
@@ -283,21 +211,3 @@ export default function Operator(props: {{COMPONENT_CLASS_NAME}}OperatorProps) {
|
|
|
283
211
|
|
|
284
212
|
return comp;
|
|
285
213
|
};
|
|
286
|
-
|
|
287
|
-
Operator.propTypes = {
|
|
288
|
-
name: PropTypes.string,
|
|
289
|
-
id: PropTypes.string,
|
|
290
|
-
label: PropTypes.string,
|
|
291
|
-
testId: PropTypes.string,
|
|
292
|
-
helperText: PropTypes.string,
|
|
293
|
-
metaObj: PropTypes.object
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
Operator.defaultProps = {
|
|
297
|
-
name: '',
|
|
298
|
-
id: '',
|
|
299
|
-
label: null,
|
|
300
|
-
testId: null,
|
|
301
|
-
helperText: null,
|
|
302
|
-
metaObj: null
|
|
303
|
-
};
|
|
@@ -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 {{COMPONENT_CLASS_NAME}} from './index';
|
|
6
6
|
|
|
7
7
|
import { configProps, operatorDetails } from './mock';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
10
10
|
title: '{{COMPONENT_CLASS_NAME}}',
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
component: {{COMPONENT_CLASS_NAME}},
|
|
12
|
+
excludeStories: /.*Data$/
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof {{COMPONENT_CLASS_NAME}}>;
|
|
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 Base{{COMPONENT_CLASS_NAME}} =
|
|
40
|
+
export const Base{{COMPONENT_CLASS_NAME}}: 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 {{COMPONENT_CLASS_NAME}}Props 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 {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
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;
|
|
@@ -48,8 +47,22 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
48
47
|
<CardContent>
|
|
49
48
|
{{! pick new delimiters for mustache }} {{=<% %>=}}
|
|
50
49
|
<Flex container={{ direction: 'row'}}>
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
<Operator
|
|
51
|
+
label={_label}
|
|
52
|
+
name={user}
|
|
53
|
+
id={user}
|
|
54
|
+
getPConnect={getPConnect}
|
|
55
|
+
value={undefined}
|
|
56
|
+
validatemessage=''
|
|
57
|
+
hideLabel={false}
|
|
58
|
+
readOnly={false}
|
|
59
|
+
required={false}
|
|
60
|
+
disabled={false}
|
|
61
|
+
externalUser={undefined}
|
|
62
|
+
testId=''
|
|
63
|
+
helperText=''
|
|
64
|
+
metaObj={undefined}
|
|
65
|
+
/><%={{ }}=%> {{! revert delimiters for mustache }}
|
|
53
66
|
{dateTimeValue && (
|
|
54
67
|
<Fragment>
|
|
55
68
|
{' '}
|
|
@@ -67,20 +80,8 @@ export default function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}
|
|
|
67
80
|
|
|
68
81
|
}
|
|
69
82
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"title": "Create operator",
|
|
73
|
-
createLabel: null,
|
|
74
|
-
updateLabel: null
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
{{COMPONENT_CLASS_NAME}}.propTypes = {
|
|
78
|
-
getPConnect: PropTypes.func.isRequired,
|
|
79
|
-
label: PropTypes.string,
|
|
80
|
-
title: PropTypes.string,
|
|
81
|
-
createLabel: PropTypes.string,
|
|
82
|
-
updateLabel: PropTypes.string
|
|
83
|
-
};
|
|
83
|
+
|
|
84
|
+
export default withConfiguration({{COMPONENT_CLASS_NAME}});
|
|
84
85
|
|
|
85
86
|
// as objects are there in props, shallow comparision fails & re-rendering of comp happens even with
|
|
86
87
|
// 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
|
+
});
|
|
@@ -143,9 +143,26 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
143
143
|
({library, organization} = lpAnswers);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
|
|
147
|
+
let spinner;
|
|
148
|
+
let data;
|
|
149
|
+
try {
|
|
150
|
+
spinner = ora('Fetching components from server').start();
|
|
151
|
+
data = await getComponentsFromServer(library, organization);
|
|
152
|
+
spinner.stop();
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
spinner.stop();
|
|
156
|
+
if (error.indexOf("ECONNREFUSED") >= 0) {
|
|
157
|
+
console.log(`\n${chalk.bold.red('Error occurred in authentication. Please regenerate using authenticate')}`);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
console.log(`${chalk.bold.red(error)}`);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// spinner.stop();
|
|
164
|
+
process.exit(1);
|
|
165
|
+
}
|
|
149
166
|
|
|
150
167
|
|
|
151
168
|
// const serverComponents = isLaunchpad ? data : data.pxResults;
|
|
@@ -185,7 +202,13 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
185
202
|
const componentsList = serverComponents.map((component) => `${component.name}~|~`);
|
|
186
203
|
for (const componentToDelete of componentsList) {
|
|
187
204
|
// eslint-disable-next-line no-await-in-loop
|
|
188
|
-
|
|
205
|
+
try {
|
|
206
|
+
await deleteLaunchpadServerComponent(componentToDelete);
|
|
207
|
+
}
|
|
208
|
+
catch (err) {
|
|
209
|
+
console.log(chalk.bold.red(err.toString()));
|
|
210
|
+
process.exit(1);
|
|
211
|
+
}
|
|
189
212
|
}
|
|
190
213
|
}
|
|
191
214
|
} else {
|
|
@@ -253,7 +276,16 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
253
276
|
const [name, rulesetName, rulesetVersion] = componentToDelete.split('~|~');
|
|
254
277
|
if (rulesetName === selectedComp.rulesetName && rulesetVersion === selectedComp.rulesetVersion) {
|
|
255
278
|
// eslint-disable-next-line no-await-in-loop
|
|
256
|
-
|
|
279
|
+
|
|
280
|
+
try {
|
|
281
|
+
await deleteInfinityServerComponent(componentToDelete);
|
|
282
|
+
}
|
|
283
|
+
catch (err) {
|
|
284
|
+
console.log(chalk.bold.red(err.toString()));
|
|
285
|
+
process.exit(1);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
|
|
257
289
|
}
|
|
258
290
|
}
|
|
259
291
|
}
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@pega/configs": "^0.6.0",
|
|
72
|
-
"@pega/custom-dx-components": "0.23.
|
|
73
|
-
"@pega/pcore-pconnect-typedefs": "2.
|
|
72
|
+
"@pega/custom-dx-components": "0.23.36",
|
|
73
|
+
"@pega/pcore-pconnect-typedefs": "~2.1.1",
|
|
74
74
|
"@storybook/addon-actions": "^7.6.7",
|
|
75
75
|
"@storybook/addon-essentials": "^7.6.7",
|
|
76
76
|
"@storybook/addon-knobs": "^7.0.2",
|
|
@@ -15,12 +15,15 @@ export const lintComponent = async (dirToLint) => {
|
|
|
15
15
|
const formatter = await eslint.loadFormatter("stylish");
|
|
16
16
|
const resultText = formatter.format(results);
|
|
17
17
|
|
|
18
|
-
// 4. Output it.
|
|
19
|
-
// console.log(`lint resultText: ${resultText}`);
|
|
20
|
-
console.log(resultText);
|
|
21
|
-
|
|
22
18
|
// Indicate linting is complete
|
|
23
19
|
console.log(chalk.green(` linting complete...`));
|
|
20
|
+
|
|
21
|
+
if (resultText.length > 0 && resultText.indexOf("error") >= 0) {
|
|
22
|
+
throw new Error( "Lint:\n" + resultText );
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
console.log(resultText);
|
|
26
|
+
}
|
|
24
27
|
};
|
|
25
28
|
|
|
26
29
|
// inpsired by https://eslint.org/docs/latest/developer-guide/nodejs-api
|
package/src/tasks/list/helper.js
CHANGED
|
@@ -102,6 +102,15 @@ async function fetchComponentsFromInfinity(apiUrl, headers) {
|
|
|
102
102
|
})
|
|
103
103
|
.then((response) => {
|
|
104
104
|
status = response.status;
|
|
105
|
+
if (status === 404){
|
|
106
|
+
throw new Error('404: Server resource not found');
|
|
107
|
+
}
|
|
108
|
+
else if (status === 405){
|
|
109
|
+
throw new Error('405: Server method not allowed');
|
|
110
|
+
}
|
|
111
|
+
else if (status === 408){
|
|
112
|
+
throw new Error('408: Server timed out');
|
|
113
|
+
}
|
|
105
114
|
return response.json();
|
|
106
115
|
})
|
|
107
116
|
.then((resp) => {
|
|
@@ -122,6 +131,7 @@ async function fetchComponentsFromInfinity(apiUrl, headers) {
|
|
|
122
131
|
}
|
|
123
132
|
|
|
124
133
|
async function fetchComponentsFromLaunchpad(apiUrl, headers) {
|
|
134
|
+
|
|
125
135
|
const serverConfig = await getPegaServerConfig();
|
|
126
136
|
// constructing urls for all type of components
|
|
127
137
|
const urls = COMPONENT_SCHEMA.type.map((type) => apiUrl.replace('{type}', type.value));
|
package/src/tasks/list/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import inquirer from 'inquirer';
|
|
2
2
|
import ora from 'ora';
|
|
3
|
+
import chalk from 'chalk';
|
|
3
4
|
|
|
4
5
|
import { showVersion, getPegaServerConfig } from '../../util.js';
|
|
5
6
|
|
|
@@ -35,9 +36,25 @@ const getList = async (sourceOfComponents, answers) => {
|
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
const spinner = ora('Fetching components from server\n').start();
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const data = await getComponentsFromServer(library, organization);
|
|
42
|
+
spinner.stop();
|
|
43
|
+
await displayServerComponents(data, answers);
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
|
|
47
|
+
if (error.indexOf("ECONNREFUSED") >= 0) {
|
|
48
|
+
console.log(`\n${chalk.bold.red('Error occurred in authentication. Please regenerate using authenticate')}`);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
console.log(`${chalk.bold.red(error)}`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// spinner.stop();
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
|
|
41
58
|
|
|
42
59
|
break;
|
|
43
60
|
}
|
|
@@ -94,7 +94,7 @@ export const zipComponent = async componentKey => {
|
|
|
94
94
|
|
|
95
95
|
const configContent = Buffer.from(fs.readFileSync(`${srcDirectory}/config.json`)).toString();
|
|
96
96
|
|
|
97
|
-
fs.
|
|
97
|
+
fs.rm('dist', { recursive: true }, err => {
|
|
98
98
|
if (err) {
|
|
99
99
|
throw err;
|
|
100
100
|
}
|
|
@@ -9,7 +9,7 @@ import { getComponentDirectoryPath, showVersion } from '../../util.js';
|
|
|
9
9
|
|
|
10
10
|
import { getPublishComponentQuestions, publishComponentToServer, zipComponent } from './helper.js';
|
|
11
11
|
|
|
12
|
-
export default async
|
|
12
|
+
export default async options => {
|
|
13
13
|
showVersion();
|
|
14
14
|
|
|
15
15
|
let componentKey;
|
|
@@ -19,13 +19,15 @@ export default async (options) => {
|
|
|
19
19
|
|
|
20
20
|
let doFetch = true;
|
|
21
21
|
|
|
22
|
-
if (options.params.length >=
|
|
22
|
+
if (options.params.length >= 7) {
|
|
23
23
|
componentKey = options.params[3];
|
|
24
24
|
const rulesetName = options.params[4];
|
|
25
25
|
const rulesetVersion = options.params[5];
|
|
26
26
|
const dBuild = options.params[6];
|
|
27
27
|
devBuild = dBuild === 'Y' || dBuild === 'y' || dBuild === true || dBuild === 'true';
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line no-unneeded-ternary,no-nested-ternary
|
|
30
|
+
doFetch = options.params.length >= 7 ? (options.params[7] === 'noFetch' ? false : true) : true;
|
|
29
31
|
|
|
30
32
|
content = { componentKey, rulesetName, rulesetVersion, devBuild };
|
|
31
33
|
} else {
|
|
@@ -79,7 +81,7 @@ export default async (options) => {
|
|
|
79
81
|
}
|
|
80
82
|
);
|
|
81
83
|
|
|
82
|
-
await tasks.run().catch(
|
|
84
|
+
await tasks.run().catch(err => {
|
|
83
85
|
console.log(chalk.bold.red(err.toString()));
|
|
84
86
|
});
|
|
85
87
|
return true;
|