@pega/dx-component-builder-sdk 23.1.14 → 24.1.10
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/README.md +3 -3
- package/package.json +1 -1
- package/src/cli.js +7 -1
- package/src/constants.js +14 -0
- package/src/tasks/build-all/helper.js +6 -0
- package/src/tasks/build-comp/helper.js +6 -0
- package/src/tasks/build-jest-assets/index.js +153 -0
- package/src/tasks/bundle/builderAngular/webpack.config.js +14 -1
- package/src/tasks/bundle/builderAssociated/webpack.config.js +13 -0
- package/src/tasks/bundle/builderReact/webpack.config.js +14 -1
- 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 +28 -20
- package/src/tasks/create/templates/Constellation/field/Boolean/index.tsx.mustache +13 -49
- package/src/tasks/create/templates/Constellation/field/Boolean/mock.ts.mustache +2 -1
- package/src/tasks/create/templates/Constellation/field/Boolean/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/field/Date/{DateFormatter.js.mustache → DateFormatter.ts.mustache} +6 -6
- package/src/tasks/create/templates/Constellation/field/Date/FormattedText.tsx.mustache +20 -0
- package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/date.js → src/tasks/create/templates/Constellation/field/Date/date.ts.mustache} +3 -2
- package/src/tasks/create/templates/Constellation/field/Date/demo.stories.tsx.mustache +31 -24
- package/src/tasks/create/templates/Constellation/field/Date/index.tsx.mustache +19 -60
- package/src/tasks/create/templates/Constellation/field/Date/mock.ts.mustache +2 -1
- 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/src/tasks/create/templates/Constellation/field/{TimeOfDay/time-of-day.js.mustache → DateTime/date-utils.ts.mustache} +27 -26
- package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/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 +32 -25
- package/src/tasks/create/templates/Constellation/field/DateTime/index.tsx.mustache +13 -60
- package/src/tasks/create/templates/Constellation/field/DateTime/mock.ts.mustache +3 -1
- 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 +25 -13
- package/src/tasks/create/templates/Constellation/field/Decimal/index.tsx.mustache +15 -68
- package/src/tasks/create/templates/Constellation/field/Decimal/mock.ts.mustache +9 -1
- 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 +28 -15
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/index.tsx.mustache +24 -76
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/mock.ts.mustache +11 -1
- 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 +25 -12
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/index.tsx.mustache +14 -55
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/mock.ts.mustache +9 -2
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/PConnProps.d.ts.mustache +46 -0
- package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/config.json.mustache +64 -0
- package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/demo.stories.tsx.mustache +99 -0
- package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/index.tsx.mustache +204 -0
- package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/mock.ts.mustache +5 -0
- package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/styles.ts.mustache +8 -0
- package/src/tasks/create/templates/Constellation/field/Integer/demo.stories.tsx.mustache +25 -12
- package/src/tasks/create/templates/Constellation/field/Integer/index.tsx.mustache +24 -88
- package/src/tasks/create/templates/Constellation/field/Integer/mock.ts.mustache +8 -2
- 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 +25 -12
- package/src/tasks/create/templates/Constellation/field/Picklist/index.tsx.mustache +13 -62
- package/src/tasks/create/templates/Constellation/field/Picklist/mock.ts.mustache +9 -1
- package/src/tasks/create/templates/Constellation/field/Picklist/styles.ts.mustache +7 -14
- package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/date.js → src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/date.ts.mustache} +16 -37
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/demo.stories.tsx.mustache +26 -14
- package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/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 +26 -76
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/mock.ts.mustache +8 -1
- package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/picklist-utils.js → src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/picklist-utils.ts.mustache} +1 -0
- package/{tests/assets/sdk-r/components/createAll/custom-constellation/field/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/src/tasks/create/templates/Constellation/field/{Picklist-RadioButtons/textformat-utils.jsx.mustache → Picklist-Autocomplete/textformat-utils.tsx.mustache} +30 -10
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/utils.ts.mustache +4 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/demo.stories.tsx.mustache +25 -13
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/index.tsx.mustache +11 -58
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/mock.ts.mustache +9 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/field/{Picklist-Autocomplete/textformat-utils.jsx.mustache → Picklist-RadioButtons/textformat-utils.tsx.mustache} +1 -0
- package/src/tasks/create/templates/Constellation/field/Text/demo.stories.tsx.mustache +23 -9
- package/src/tasks/create/templates/Constellation/field/Text/index.tsx.mustache +96 -24
- package/src/tasks/create/templates/Constellation/field/Text/mock.ts.mustache +8 -1
- 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 +24 -11
- package/src/tasks/create/templates/Constellation/field/Text-Email/index.tsx.mustache +10 -47
- package/src/tasks/create/templates/Constellation/field/Text-Email/mock.ts.mustache +8 -1
- package/src/tasks/create/templates/Constellation/field/Text-Email/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/field/Text-Input/StatusWork.tsx +3 -9
- package/src/tasks/create/templates/Constellation/field/Text-Input/demo.stories.tsx.mustache +24 -11
- package/src/tasks/create/templates/Constellation/field/Text-Input/index.tsx.mustache +11 -51
- package/src/tasks/create/templates/Constellation/field/Text-Input/mock.ts.mustache +9 -1
- 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 +24 -11
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/index.tsx.mustache +13 -49
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/mock.ts.mustache +9 -1
- 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 +25 -11
- package/src/tasks/create/templates/Constellation/field/Text-Phone/index.tsx.mustache +14 -53
- package/src/tasks/create/templates/Constellation/field/Text-Phone/mock.ts.mustache +9 -1
- 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 +24 -11
- package/src/tasks/create/templates/Constellation/field/Text-URL/index.tsx.mustache +15 -71
- package/src/tasks/create/templates/Constellation/field/Text-URL/mock.ts.mustache +9 -1
- package/src/tasks/create/templates/Constellation/field/Text-URL/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/field/Text-URL/{text-url.jsx.mustache → text-url.tsx.mustache} +4 -3
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/demo.stories.tsx.mustache +28 -22
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/index.tsx.mustache +17 -53
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/mock.ts.mustache +2 -1
- 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/Avatar.tsx.mustache +78 -0
- package/src/tasks/create/templates/Constellation/template/DETAILS/DetailsRender.tsx.mustache +55 -0
- package/src/tasks/create/templates/Constellation/template/DETAILS/HighlightRender.tsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/template/DETAILS/Operator.tsx.mustache +218 -0
- package/src/tasks/create/templates/Constellation/template/DETAILS/StatusWork.tsx.mustache +17 -19
- package/src/tasks/create/templates/Constellation/template/DETAILS/demo.stories.tsx.mustache +94 -29
- package/src/tasks/create/templates/Constellation/template/DETAILS/index.tsx.mustache +53 -55
- package/src/tasks/create/templates/Constellation/template/DETAILS/mock.ts.mustache +78 -20
- package/src/tasks/create/templates/Constellation/template/DETAILS/styles.ts.mustache +21 -12
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/Avatar.tsx.mustache +78 -0
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/DetailsRender.tsx.mustache +55 -0
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/HighlightRender.tsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/Operator.tsx.mustache +218 -0
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/StatusWork.tsx.mustache +17 -19
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/demo.stories.tsx.mustache +112 -34
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/index.tsx.mustache +45 -56
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/mock.ts.mustache +68 -10
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/styles.ts.mustache +20 -12
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/{utils.js.mustache → utils.ts.mustache} +15 -13
- package/src/tasks/create/templates/Constellation/template/FORM/DetailsRender.tsx +59 -0
- package/src/tasks/create/templates/Constellation/template/FORM/demo.stories.tsx.mustache +91 -16
- package/src/tasks/create/templates/Constellation/template/FORM/index.tsx.mustache +36 -16
- package/src/tasks/create/templates/Constellation/template/FORM/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/template/FORM-region/DetailsRender.tsx +59 -0
- package/src/tasks/create/templates/Constellation/template/FORM-region/demo.stories.tsx.mustache +112 -22
- package/src/tasks/create/templates/Constellation/template/FORM-region/index.tsx.mustache +32 -16
- package/src/tasks/create/templates/Constellation/template/FORM-region/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/template/PAGE/GetNextWork.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/template/PAGE/demo.stories.tsx.mustache +14 -8
- package/src/tasks/create/templates/Constellation/template/PAGE/index.tsx.mustache +5 -16
- package/src/tasks/create/templates/Constellation/template/PAGE/localizations.json.mustache +4 -2
- package/src/tasks/create/templates/Constellation/template/PAGE/styles.ts.mustache +7 -14
- package/{tests/assets/sdk-r/components/createAll/custom-constellation/template/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 +13 -7
- 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 +102 -16
- package/src/tasks/create/templates/Constellation/widget/PAGE/index.tsx.mustache +69 -21
- 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 +5 -20
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/demo.stories.tsx.mustache +15 -9
- 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/SDK-Angular/field/Boolean/boolean.component.html.mustache +19 -18
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.ts.mustache +127 -44
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/config.json.mustache +64 -0
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/demo.stories.tsx.mustache +63 -0
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/icon-button-url.component.html.mustache +40 -0
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/icon-button-url.component.scss.mustache +24 -0
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/icon-button-url.component.spec.ts.mustache +26 -0
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/icon-button-url.component.ts.mustache +195 -0
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/mock.ts.mustache +37 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.html.mustache +1 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.ts.mustache +2 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.html.mustache +1 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.ts.mustache +2 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.scss.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.ts.mustache +2 -2
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/demo.stories.tsx.mustache +22 -5
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/mock.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.html.mustache +11 -1
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.ts.mustache +93 -1
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.ts.mustache +7 -5
- package/src/tasks/create/templates/SDK-React/field/Boolean/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +101 -23
- package/src/tasks/create/templates/SDK-React/field/Boolean/mock.ts.mustache +8 -8
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Date/mock.ts.mustache +7 -7
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +2 -3
- package/src/tasks/create/templates/SDK-React/field/DateTime/mock.ts.mustache +6 -6
- package/src/tasks/create/templates/SDK-React/field/Decimal/config.json.mustache +155 -0
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +62 -37
- package/src/tasks/create/templates/SDK-React/field/Decimal/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/config.json.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +49 -37
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/config.json.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +39 -20
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/config.json.mustache +64 -0
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/demo.stories.tsx.mustache +91 -0
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +160 -0
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/mock.ts.mustache +4 -0
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/styles.js.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/field/Integer/config.json.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/field/Integer/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +26 -26
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/mock.ts.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text/config.json.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Email/config.json.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Email/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Input/config.json.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Input/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +1 -3
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +17 -9
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +1 -2
- package/src/tasks/create/templates/SDK-React/field/Text-URL/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/demo.stories.tsx.mustache +4 -4
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +0 -2
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/mock.ts.mustache +6 -6
- package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +4 -9
- package/src/tasks/create/templates/SDK-React/template/DETAILS/mock.ts.mustache +197 -164
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +15 -6
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +4 -9
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/mock.ts.mustache +207 -163
- package/src/tasks/create/templates/SDK-React/template/FORM/config.json.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +13 -1
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +14 -16
- package/src/tasks/create/templates/SDK-React/template/FORM/utils.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.tsx.mustache +0 -2
- package/src/tasks/create/templates/SDK-React/template/FORM-region/mock.ts.mustache +121 -122
- package/src/tasks/create/templates/SDK-React/template/PAGE/OneColumn.tsx.mustache +12 -13
- package/src/tasks/create/templates/SDK-React/template/PAGE/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/PAGE/index.tsx.mustache +3 -5
- package/src/tasks/create/templates/SDK-React/template/PAGE/mock.ts.mustache +8 -9
- package/src/tasks/create/templates/SDK-React/widget/CASE/config.json.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/widget/CASE/demo.stories.tsx.mustache +19 -20
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/widget/PAGE/config.json.mustache +43 -43
- package/src/tasks/create/templates/SDK-React/widget/PAGE/demo.stories.tsx.mustache +45 -2
- package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +168 -3
- package/src/tasks/create/templates/SDK-React/widget/PAGE/mock.ts.mustache +26 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +20 -21
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/mock.ts.mustache +0 -1
- package/src/tasks/create-all/index.js +3 -0
- package/src/tasks/index.js +1 -0
- package/src/tasks/publish/helper.js +4 -0
- package/src/tasks/publish-all/helper.js +6 -2
- package/src/tasks/validator/index.js +7 -1
- package/src/util.js +7 -0
- package/tests/assets/sdk-r/components/create/_components.md +6 -0
- package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +23 -9
- package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +96 -24
- package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/mock.ts +8 -1
- package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/styles.ts +7 -14
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/config.json +1 -1
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +0 -1
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/mock.ts +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +10 -4
- package/tests/assets/sdk-r/components/create/override-sdk/field/CancelAlert/CancelAlert.tsx +2 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +101 -23
- package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +36 -26
- package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +44 -21
- package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/Multiselect.tsx +244 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Multiselect/utils.ts +230 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/Percentage/Percentage.tsx +33 -18
- package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/Phone.tsx +16 -7
- package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/RichText.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/field/ScalarList/ScalarList.tsx +2 -0
- package/tests/assets/sdk-r/components/create/override-sdk/field/UserReference/UserReference.tsx +11 -1
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/Assignment.tsx +28 -1
- package/tests/assets/sdk-r/components/create/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/infra/DeferLoad/DeferLoad.tsx +5 -1
- package/tests/assets/sdk-r/components/create/override-sdk/infra/MultiStep/MultiStep.tsx +3 -1
- package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/CaseView.tsx +2 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/DataReference/DataReference.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/DefaultForm/utils/index.ts +2 -7
- package/tests/assets/sdk-r/components/create/override-sdk/template/Details/Details.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +22 -33
- package/tests/assets/sdk-r/components/create/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +8 -4
- package/tests/assets/sdk-r/components/create/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +3 -2
- package/tests/assets/sdk-r/components/create/override-sdk/widget/FileUtility/FileUtility.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/_components.md +6 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/demo.stories.tsx +28 -20
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.tsx +13 -49
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/mock.ts +2 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/demo.stories.tsx +28 -15
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/index.tsx +24 -76
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/mock.ts +11 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/{DateFormatter.js → DateFormatter.ts} +6 -6
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
- package/{src/tasks/create/templates/Constellation/field/Date/date.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/date.ts} +3 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/demo.stories.tsx +31 -24
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/index.tsx +19 -60
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/mock.ts +2 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/{date-time.js → date-time.ts} +12 -12
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/{date-utils.js → date-utils.ts} +27 -26
- package/{src/tasks/create/templates/Constellation/field/DateTime/date.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/date.ts} +1 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/demo.stories.tsx +32 -25
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/index.tsx +13 -60
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/mock.ts +3 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/demo.stories.tsx +25 -13
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/index.tsx +15 -68
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/mock.ts +9 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/demo.stories.tsx +24 -11
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/index.tsx +10 -47
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/mock.ts +8 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/PConnProps.d.ts +46 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +99 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/index.tsx +201 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/mock.ts +5 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/styles.ts +8 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/demo.stories.tsx +25 -12
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/index.tsx +24 -88
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/mock.ts +8 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/demo.stories.tsx +24 -11
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/index.tsx +13 -49
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/mock.ts +9 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/demo.stories.tsx +25 -12
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/index.tsx +14 -55
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/mock.ts +9 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/demo.stories.tsx +25 -11
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/index.tsx +14 -53
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/mock.ts +9 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/demo.stories.tsx +25 -12
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/index.tsx +13 -62
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/mock.ts +9 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/demo.stories.tsx +25 -13
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/index.tsx +11 -58
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/mock.ts +9 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/{Pega_DXIL_MySearchbox/textformat-utils.jsx → Pega_DXIL_MyRadiobuttons/textformat-utils.tsx} +1 -0
- package/{src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/date.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/date.ts} +16 -37
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/demo.stories.tsx +26 -14
- package/{src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/embed-utils.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/embed-utils.ts} +2 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/index.tsx +26 -76
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/mock.ts +8 -1
- package/{src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/picklist-utils.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
- package/{src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/repeat-constants.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/repeat-constants.ts} +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/{repeat-utils.js → repeat-utils.ts} +6 -12
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/{Pega_DXIL_MyRadiobuttons/textformat-utils.jsx → Pega_DXIL_MySearchbox/textformat-utils.tsx} +30 -10
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/utils.ts +4 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/demo.stories.tsx +23 -9
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/index.tsx +96 -24
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/mock.ts +8 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/StatusWork.tsx +3 -9
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/demo.stories.tsx +24 -11
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.tsx +11 -51
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/mock.ts +9 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +28 -22
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/index.tsx +17 -53
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/mock.ts +2 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/{time-of-day.js → time-of-day.ts} +24 -23
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/demo.stories.tsx +24 -11
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/index.tsx +15 -71
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/mock.ts +9 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/{text-url.jsx → text-url.tsx} +4 -3
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/Avatar.tsx +78 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/DetailsRender.tsx +52 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/HighlightRender.tsx +46 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/Operator.tsx +215 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/StatusWork.tsx +17 -19
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/demo.stories.tsx +94 -29
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/index.tsx +50 -52
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/mock.ts +78 -20
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/styles.ts +21 -12
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/DetailsRender.tsx +59 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/demo.stories.tsx +91 -16
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/index.tsx +33 -16
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/GetNextWork.tsx +2 -1
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/demo.stories.tsx +14 -8
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/index.tsx +5 -16
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/localizations.json +4 -2
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/styles.ts +7 -14
- package/{src/tasks/create/templates/Constellation/template/PAGE/utils.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/utils.ts} +28 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +78 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/DetailsRender.tsx +52 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +46 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/Operator.tsx +215 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +17 -19
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +112 -34
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +42 -53
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/mock.ts +68 -10
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/styles.ts +20 -12
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/{utils.js → utils.ts} +15 -13
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/DetailsRender.tsx +59 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +112 -22
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/index.tsx +26 -13
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +13 -7
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/index.tsx +3 -10
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +3 -13
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/Operator.tsx +5 -20
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +15 -9
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +24 -39
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +102 -16
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/index.tsx +69 -21
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/demo.stories.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/index.tsx +101 -23
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyBoolean/mock.ts +8 -8
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/config.json +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/demo.stories.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +46 -34
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/mock.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/mock.ts +7 -7
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +2 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/mock.ts +6 -6
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/config.json +155 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +59 -34
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/mock.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/config.json +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/mock.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/config.json +64 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +91 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +157 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/mock.ts +4 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/styles.js +7 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/config.json +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/index.tsx +16 -17
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/mock.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/index.tsx +1 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/mock.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/config.json +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +37 -18
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/mock.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +17 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +23 -23
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/mock.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/config.json +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/mock.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/config.json +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/mock.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +4 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +0 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/mock.ts +6 -6
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/index.tsx +1 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/mock.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +4 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/mock.ts +197 -164
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/config.json +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/demo.stories.tsx +13 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/index.tsx +11 -13
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyForm/utils.ts +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/OneColumn.tsx +12 -13
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/demo.stories.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/index.tsx +3 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyPage/mock.ts +8 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +15 -6
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -9
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/mock.ts +207 -163
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +0 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/mock.ts +121 -122
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/config.json +2 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +19 -20
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +3 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +20 -21
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/mock.ts +0 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/config.json +43 -43
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +45 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/index.tsx +168 -3
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageWidget/mock.ts +26 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +10 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/CancelAlert/CancelAlert.tsx +2 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +101 -23
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +36 -26
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +44 -21
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/Multiselect.tsx +244 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Multiselect/utils.ts +230 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Percentage/Percentage.tsx +33 -18
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/Phone.tsx +16 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/RichText.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/ScalarList/ScalarList.tsx +2 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/UserReference/UserReference.tsx +11 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/Assignment.tsx +28 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DashboardFilter/DashboardFilter.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/DeferLoad/DeferLoad.tsx +5 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/MultiStep/MultiStep.tsx +3 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/CaseView.tsx +2 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DataReference/DataReference.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DefaultForm/utils/index.ts +2 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/Details/Details.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsThreeColumn/DetailsThreeColumn.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DetailsTwoColumn/DetailsTwoColumn.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +22 -33
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/NarrowWideDetails/NarrowWideDetails.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/PromotedFilters/PromotedFilters.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +8 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrowDetails/WideNarrowDetails.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +3 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/FileUtility/FileUtility.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +1 -0
- 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/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/Boolean.js +0 -38
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
- /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/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
- /package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Icon,
|
|
4
|
+
Button,
|
|
5
|
+
withConfiguration,
|
|
6
|
+
registerIcon,
|
|
7
|
+
Table,
|
|
8
|
+
Label,
|
|
9
|
+
Link,
|
|
10
|
+
URLDisplay
|
|
11
|
+
} from '@pega/cosmos-react-core';
|
|
12
|
+
import type { PConnFieldProps } from './PConnProps';
|
|
13
|
+
|
|
14
|
+
// IMPORTANT
|
|
15
|
+
// To use Icons, need to individually import the icon file form @pega/cosmos-react-core (see path below)
|
|
16
|
+
// Icons filename is kabab case (file-name), where as the icon you import is camel case (fileName)
|
|
17
|
+
// Icons need to be registered (camel case), and then used (kabab case)
|
|
18
|
+
import * as listNumber from '@pega/cosmos-react-core/lib/components/Icon/icons/list-number.icon';
|
|
19
|
+
import * as arrowRight from '@pega/cosmos-react-core/lib/components/Icon/icons/arrow-right.icon';
|
|
20
|
+
import * as globe from '@pega/cosmos-react-core/lib/components/Icon/icons/globe.icon';
|
|
21
|
+
|
|
22
|
+
import StyledPegaDxilMyIconButtonUrlWrapper from './styles';
|
|
23
|
+
|
|
24
|
+
// interface for props
|
|
25
|
+
interface PegaDxilMyIconButtonUrlProps extends PConnFieldProps {
|
|
26
|
+
// If any, enter additional props that only exist on TextInput here
|
|
27
|
+
countryCode: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const textFormatter = (value: string) => {
|
|
31
|
+
return <URLDisplay target='_blank' value={value} displayText={value} variant='link' />;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// *************
|
|
36
|
+
// This component is meant to be an example of usage (Icon, Button, Link, etc.) and NOT meant to be
|
|
37
|
+
// used "as is"
|
|
38
|
+
//
|
|
39
|
+
// In this example, Icon is shown on its own and inside a Button
|
|
40
|
+
// Though an Icon can have an "onClick" event is it recommended if you want to click on it,
|
|
41
|
+
// to put it in a Button (shown below), so you can have a tooltip and hover style or put it
|
|
42
|
+
// in a Link (shown below) as a URL.
|
|
43
|
+
//
|
|
44
|
+
// For the button, the click will get a list of states for a given country and display in a
|
|
45
|
+
// table below. The table display will toggle with the click of the button icon. Example shows
|
|
46
|
+
// how to handle click, retrieve data from PCore and display it.
|
|
47
|
+
//
|
|
48
|
+
// Globe icon is an icon placed in a Link element. The Link element to use an icon internally. (NOTE: In general
|
|
49
|
+
// the Link element shows the open icon to the left of the link text, but here we are using
|
|
50
|
+
// another icon, so with "icon" specified in the Link element, the open icon doesn't show)
|
|
51
|
+
// Link elements do not handle bad urls well, so we have a simple validator to prevent the Link element
|
|
52
|
+
// from getting most bad urls.
|
|
53
|
+
//
|
|
54
|
+
// NOTE: because icons have to be imported and registered, you can NOT put the icon name
|
|
55
|
+
// inside the config.json and let the user pick it, if it is not already part of your
|
|
56
|
+
// import and registration (can't be done on the fly)
|
|
57
|
+
// **************
|
|
58
|
+
|
|
59
|
+
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
60
|
+
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
61
|
+
function PegaDxilMyIconButtonUrl(props: PegaDxilMyIconButtonUrlProps) {
|
|
62
|
+
const { value, displayMode, countryCode = 'USA', getPConnect, testId } = props;
|
|
63
|
+
const [statelist, setStatelist] = useState([]);
|
|
64
|
+
const [showTable, setShowTable] = useState(false);
|
|
65
|
+
const [validUrl, setValidUrl] = useState('about:blank');
|
|
66
|
+
const PConnect = getPConnect();
|
|
67
|
+
|
|
68
|
+
// IMPORTANT: need to register icons used in camel case
|
|
69
|
+
registerIcon(listNumber, arrowRight, globe);
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
// setting up columns for the work list table
|
|
73
|
+
const columns = [
|
|
74
|
+
{ renderer: 'stateName', label: PConnect.getLocalizedValue('State name', '', '') },
|
|
75
|
+
{ renderer: 'stateCode', label: PConnect.getLocalizedValue('State code', '', '') }
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
// toggle showing table and getting table data
|
|
79
|
+
function showHideTable() {
|
|
80
|
+
setShowTable(prevShowTable => !prevShowTable);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// check if url is valid (simple)
|
|
84
|
+
function validateUrl(href: string) {
|
|
85
|
+
return /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(
|
|
86
|
+
href
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Testing to see if value entered is valid url, if not can't use it.
|
|
91
|
+
// Reason for this code is that you can NOT pass to Link component
|
|
92
|
+
// a bad url, or it will error out.
|
|
93
|
+
// For example: Since the value is the property field,
|
|
94
|
+
// it could be entered from another component and thus as it is
|
|
95
|
+
// entered (typed in), it won't be valid until it is all entered.
|
|
96
|
+
// NOTE: can't have a blank value for the url as the Link element will error out
|
|
97
|
+
// in App studio preview
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (validateUrl(value)) {
|
|
100
|
+
setValidUrl(value);
|
|
101
|
+
} else {
|
|
102
|
+
setValidUrl('about:blank');
|
|
103
|
+
}
|
|
104
|
+
}, [value]);
|
|
105
|
+
|
|
106
|
+
// going to get data for worklist to put into a table
|
|
107
|
+
// data comes from calling a PCore function to get
|
|
108
|
+
// get data from a data page and a PConnect function
|
|
109
|
+
// to get getContextName
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
const dataViewName = 'D_pyStateList';
|
|
112
|
+
const context = PConnect.getContextName();
|
|
113
|
+
const params = { pyCountry: countryCode };
|
|
114
|
+
|
|
115
|
+
// only retrieve table data if table is shown
|
|
116
|
+
if (showTable) {
|
|
117
|
+
PCore.getDataPageUtils()
|
|
118
|
+
.getDataAsync(dataViewName, context, params, null, null)
|
|
119
|
+
// @ts-ignore
|
|
120
|
+
.then((response: any) => {
|
|
121
|
+
// table requires an index or will get setExtraStackFrame error
|
|
122
|
+
setStatelist(
|
|
123
|
+
response.data.map((entry: any, index: number) => {
|
|
124
|
+
// mapping the data into the column names
|
|
125
|
+
// MUST have an id/index or will get a setExtraStackFrame error
|
|
126
|
+
// put a key in the table
|
|
127
|
+
return {
|
|
128
|
+
stateName: entry.pyLabel,
|
|
129
|
+
stateCode: entry.pyStateCode,
|
|
130
|
+
id: index
|
|
131
|
+
};
|
|
132
|
+
})
|
|
133
|
+
);
|
|
134
|
+
})
|
|
135
|
+
.catch((error: any) => {
|
|
136
|
+
console.log(error);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}, [PConnect, countryCode, showTable]);
|
|
140
|
+
|
|
141
|
+
// when DISPLAY_ONLY, in this example we will just show the URL.
|
|
142
|
+
if (displayMode === 'DISPLAY_ONLY') {
|
|
143
|
+
const displayComp = textFormatter(validUrl);
|
|
144
|
+
return (
|
|
145
|
+
<StyledPegaDxilMyIconButtonUrlWrapper> {displayComp} </StyledPegaDxilMyIconButtonUrlWrapper>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<StyledPegaDxilMyIconButtonUrlWrapper>
|
|
151
|
+
<div style={{ display: 'flex' }} data-testid={testId}>
|
|
152
|
+
<Icon
|
|
153
|
+
style={{ height: '1.5rem', width: '1.5rem' }}
|
|
154
|
+
// icon name is kabab case
|
|
155
|
+
name='arrow-right'
|
|
156
|
+
role='img'
|
|
157
|
+
aria-label='arrow right'
|
|
158
|
+
/>
|
|
159
|
+
<Label style={{ margin: '0.1rem' }}>
|
|
160
|
+
{' '}
|
|
161
|
+
{PConnect.getLocalizedValue('State list for', '', '')}{' '}
|
|
162
|
+
{PConnect.getLocalizedValue(`${countryCode}`, '', '')}{' '}
|
|
163
|
+
</Label>
|
|
164
|
+
<Button
|
|
165
|
+
icon
|
|
166
|
+
label={PConnect.getLocalizedValue('Click to show/hide state list', '', '')}
|
|
167
|
+
variant='link'
|
|
168
|
+
compact={false}
|
|
169
|
+
onClick={showHideTable}
|
|
170
|
+
>
|
|
171
|
+
<Icon
|
|
172
|
+
style={{ height: '1.5rem', width: '1.5rem' }}
|
|
173
|
+
// icon name is kabab case
|
|
174
|
+
name='list-number'
|
|
175
|
+
role='img'
|
|
176
|
+
aria-label='numbered list'
|
|
177
|
+
/>
|
|
178
|
+
</Button>
|
|
179
|
+
<Link href={validUrl} variant='link' label={validUrl} icon>
|
|
180
|
+
<Icon
|
|
181
|
+
style={{ height: '1.5rem', width: '1.5rem' }}
|
|
182
|
+
// icon name is kabab case
|
|
183
|
+
name='globe'
|
|
184
|
+
role='img'
|
|
185
|
+
aria-label='open link'
|
|
186
|
+
/>
|
|
187
|
+
</Link>
|
|
188
|
+
</div>
|
|
189
|
+
{showTable && (
|
|
190
|
+
<Table
|
|
191
|
+
title={PConnect.getLocalizedValue('State list', '', '')}
|
|
192
|
+
columns={columns}
|
|
193
|
+
data={statelist}
|
|
194
|
+
/>
|
|
195
|
+
)}
|
|
196
|
+
</StyledPegaDxilMyIconButtonUrlWrapper>
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
export default withConfiguration(PegaDxilMyIconButtonUrl);
|
|
@@ -1,29 +1,26 @@
|
|
|
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 { stateProps, configProps, fieldMetadata } from './mock';
|
|
6
6
|
|
|
7
7
|
import PegaDxilMyInteger from './index';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const meta: Meta<typeof PegaDxilMyInteger> = {
|
|
10
10
|
title: 'PegaDxilMyInteger',
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
component: PegaDxilMyInteger,
|
|
12
|
+
excludeStories: /.*Data$/
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof PegaDxilMyInteger>;
|
|
17
|
+
|
|
18
|
+
export const BasePegaDxilMyInteger: Story = args => {
|
|
16
19
|
|
|
17
20
|
const props = {
|
|
18
21
|
value: configProps.value,
|
|
19
|
-
placeholder: configProps.placeholder,
|
|
20
|
-
label: configProps.label,
|
|
21
|
-
helperText: configProps.helperText,
|
|
22
|
-
showGroupSeparators: configProps.showGroupSeparators,
|
|
23
22
|
hasSuggestions: configProps.hasSuggestions,
|
|
24
|
-
testId: configProps.testId,
|
|
25
23
|
fieldMetadata,
|
|
26
|
-
|
|
27
24
|
getPConnect: () => {
|
|
28
25
|
return {
|
|
29
26
|
getStateProps: () => {
|
|
@@ -45,7 +42,23 @@ export const BasePegaDxilMyInteger = () => {
|
|
|
45
42
|
|
|
46
43
|
return (
|
|
47
44
|
<>
|
|
48
|
-
<PegaDxilMyInteger {...props} />
|
|
45
|
+
<PegaDxilMyInteger {...props} {...args} />
|
|
49
46
|
</>
|
|
50
47
|
);
|
|
51
48
|
};
|
|
49
|
+
|
|
50
|
+
BasePegaDxilMyInteger.args = {
|
|
51
|
+
label: configProps.label,
|
|
52
|
+
helperText: configProps.helperText,
|
|
53
|
+
placeholder: configProps.placeholder,
|
|
54
|
+
showGroupSeparators: configProps.showGroupSeparators,
|
|
55
|
+
testId: configProps.testId,
|
|
56
|
+
readOnly: configProps.readOnly,
|
|
57
|
+
disabled: configProps.disabled,
|
|
58
|
+
required: configProps.required,
|
|
59
|
+
status: configProps.status,
|
|
60
|
+
hideLabel: configProps.hideLabel,
|
|
61
|
+
displayMode: configProps.displayMode,
|
|
62
|
+
variant: configProps.variant,
|
|
63
|
+
validatemessage: configProps.validatemessage
|
|
64
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { NumberInput, NumberDisplay, Slider, FieldValueList, CurrencyDisplay, Text } from '@pega/cosmos-react-core';
|
|
3
|
-
|
|
2
|
+
import { NumberInput, NumberDisplay, Slider, FieldValueList, CurrencyDisplay, Text, withConfiguration } from '@pega/cosmos-react-core';
|
|
3
|
+
|
|
4
4
|
|
|
5
5
|
import type { PConnFieldProps } from './PConnProps';
|
|
6
6
|
|
|
@@ -24,7 +24,6 @@ interface PegaDxilMyIntegerProps extends PConnFieldProps {
|
|
|
24
24
|
allowDecimals: boolean;
|
|
25
25
|
currencyISOCode: string;
|
|
26
26
|
alwaysShowISOCode: boolean;
|
|
27
|
-
isoCodeSelection: string;
|
|
28
27
|
additionalProps: any;
|
|
29
28
|
showGroupSeparators: boolean;
|
|
30
29
|
currencyDisplay: 'symbol' | 'code' | 'name' | undefined;
|
|
@@ -48,7 +47,7 @@ interface StateProps {
|
|
|
48
47
|
|
|
49
48
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
50
49
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
51
|
-
|
|
50
|
+
function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
|
|
52
51
|
const {
|
|
53
52
|
getPConnect,
|
|
54
53
|
value,
|
|
@@ -56,26 +55,26 @@ export default function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
|
|
|
56
55
|
placeholder,
|
|
57
56
|
validatemessage,
|
|
58
57
|
label,
|
|
59
|
-
hideLabel,
|
|
58
|
+
hideLabel = false,
|
|
60
59
|
helperText,
|
|
61
60
|
testId,
|
|
62
61
|
displayMode,
|
|
63
62
|
displayAs,
|
|
64
|
-
showInput,
|
|
65
|
-
min,
|
|
66
|
-
max,
|
|
67
|
-
step,
|
|
68
|
-
showTicks,
|
|
69
|
-
additionalProps,
|
|
70
|
-
variant,
|
|
71
|
-
formatter,
|
|
72
|
-
negative,
|
|
73
|
-
notation,
|
|
74
|
-
isTableFormatter,
|
|
75
|
-
hasSuggestions
|
|
63
|
+
showInput = true,
|
|
64
|
+
min = 0,
|
|
65
|
+
max = 100,
|
|
66
|
+
step = 1,
|
|
67
|
+
showTicks = true,
|
|
68
|
+
additionalProps = {},
|
|
69
|
+
variant = 'inline',
|
|
70
|
+
formatter = 'defaultInteger',
|
|
71
|
+
negative = 'minus-sign',
|
|
72
|
+
notation = 'standard',
|
|
73
|
+
isTableFormatter = false,
|
|
74
|
+
hasSuggestions = false
|
|
76
75
|
} = props;
|
|
77
|
-
let { showGroupSeparators } = props;
|
|
78
|
-
let { currencyDisplay } = props;
|
|
76
|
+
let { showGroupSeparators = false } = props;
|
|
77
|
+
let { currencyDisplay = 'symbol' } = props;
|
|
79
78
|
const pConn = getPConnect();
|
|
80
79
|
const actions = pConn.getActionsApi();
|
|
81
80
|
const stateProps = pConn.getStateProps() as StateProps;
|
|
@@ -86,11 +85,13 @@ export default function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
|
|
|
86
85
|
const hasValueChange = useRef(false);
|
|
87
86
|
|
|
88
87
|
|
|
89
|
-
let { readOnly, required, disabled } = props;
|
|
88
|
+
let { readOnly = false, required = false, disabled = false } = props;
|
|
90
89
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
91
90
|
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
92
91
|
);
|
|
93
92
|
|
|
93
|
+
|
|
94
|
+
|
|
94
95
|
const [status, setStatus] = useState(hasSuggestions ? 'pending' : '');
|
|
95
96
|
useEffect(() => {
|
|
96
97
|
if (validatemessage !== '') {
|
|
@@ -115,7 +116,7 @@ export default function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
|
|
|
115
116
|
}
|
|
116
117
|
}, [actions, displayAs, propName, sliderDefaultValue, value]);
|
|
117
118
|
|
|
118
|
-
const { decimalPrecision, currencyDecimalPrecision, currencyISOCode } = props;
|
|
119
|
+
const { decimalPrecision, currencyDecimalPrecision = 'auto', currencyISOCode = 'USD' } = props;
|
|
119
120
|
let noOfDecimals = parseInt(decimalPrecision, 10);
|
|
120
121
|
// @ts-ignore
|
|
121
122
|
if (Number.isNaN(noOfDecimals)) noOfDecimals = undefined;
|
|
@@ -183,7 +184,7 @@ export default function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
|
|
|
183
184
|
|
|
184
185
|
switch (displayMode) {
|
|
185
186
|
case 'DISPLAY_ONLY': {
|
|
186
|
-
return (<StyledPegaDxilMyIntegerWrapper> displayComp </StyledPegaDxilMyIntegerWrapper>);
|
|
187
|
+
return (<StyledPegaDxilMyIntegerWrapper> {displayComp} </StyledPegaDxilMyIntegerWrapper>);
|
|
187
188
|
}
|
|
188
189
|
case 'LABELS_LEFT': {
|
|
189
190
|
return (
|
|
@@ -307,70 +308,5 @@ export default function PegaDxilMyInteger(props: PegaDxilMyIntegerProps) {
|
|
|
307
308
|
);
|
|
308
309
|
}
|
|
309
310
|
|
|
310
|
-
PegaDxilMyInteger.defaultProps = {
|
|
311
|
-
value: '',
|
|
312
|
-
defaultValue: null,
|
|
313
|
-
placeholder: '',
|
|
314
|
-
validatemessage: '',
|
|
315
|
-
helperText: '',
|
|
316
|
-
hideLabel: false,
|
|
317
|
-
disabled: false,
|
|
318
|
-
readOnly: false,
|
|
319
|
-
required: false,
|
|
320
|
-
testId: '',
|
|
321
|
-
showGroupSeparators: false,
|
|
322
|
-
displayMode: null,
|
|
323
|
-
displayAs: 'input',
|
|
324
|
-
showInput: true,
|
|
325
|
-
min: 0,
|
|
326
|
-
max: 100,
|
|
327
|
-
step: 1,
|
|
328
|
-
showTicks: true,
|
|
329
|
-
additionalProps: {},
|
|
330
|
-
variant: 'inline',
|
|
331
|
-
decimalPrecision: null,
|
|
332
|
-
currencyISOCode: 'USD',
|
|
333
|
-
isoCodeSelection: 'constant',
|
|
334
|
-
formatter: 'defaultInteger',
|
|
335
|
-
negative: 'minus-sign',
|
|
336
|
-
notation: 'standard',
|
|
337
|
-
currencyDisplay: 'symbol',
|
|
338
|
-
currencyDecimalPrecision: 'auto',
|
|
339
|
-
isTableFormatter: false,
|
|
340
|
-
hasSuggestions: false
|
|
341
|
-
};
|
|
342
311
|
|
|
343
|
-
|
|
344
|
-
value: PropTypes.string,
|
|
345
|
-
defaultValue: PropTypes.number,
|
|
346
|
-
placeholder: PropTypes.string,
|
|
347
|
-
label: PropTypes.string.isRequired,
|
|
348
|
-
hideLabel: PropTypes.bool,
|
|
349
|
-
getPConnect: PropTypes.func.isRequired,
|
|
350
|
-
validatemessage: PropTypes.string,
|
|
351
|
-
helperText: PropTypes.string,
|
|
352
|
-
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
353
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
354
|
-
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
355
|
-
testId: PropTypes.string,
|
|
356
|
-
showGroupSeparators: PropTypes.bool,
|
|
357
|
-
displayMode: PropTypes.string,
|
|
358
|
-
displayAs: PropTypes.string,
|
|
359
|
-
showInput: PropTypes.bool,
|
|
360
|
-
min: PropTypes.number,
|
|
361
|
-
max: PropTypes.number,
|
|
362
|
-
step: PropTypes.number,
|
|
363
|
-
showTicks: PropTypes.bool,
|
|
364
|
-
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
365
|
-
variant: PropTypes.string,
|
|
366
|
-
decimalPrecision: PropTypes.number,
|
|
367
|
-
currencyISOCode: PropTypes.string,
|
|
368
|
-
isoCodeSelection: PropTypes.string,
|
|
369
|
-
formatter: PropTypes.string,
|
|
370
|
-
negative: PropTypes.string,
|
|
371
|
-
notation: PropTypes.string,
|
|
372
|
-
currencyDisplay: PropTypes.string,
|
|
373
|
-
currencyDecimalPrecision: PropTypes.string,
|
|
374
|
-
isTableFormatter: PropTypes.bool,
|
|
375
|
-
hasSuggestions: PropTypes.bool
|
|
376
|
-
};
|
|
312
|
+
export default withConfiguration(PegaDxilMyInteger);
|
|
@@ -3,10 +3,16 @@ export const configProps = {
|
|
|
3
3
|
value: '',
|
|
4
4
|
label: 'Integer Sample',
|
|
5
5
|
showGroupSeparators: true,
|
|
6
|
-
placeholder: 'Integer Placeholder',
|
|
7
6
|
helperText: 'Integer Helper Text',
|
|
8
7
|
testId: 'integer-12345678',
|
|
9
|
-
hasSuggestions: false
|
|
8
|
+
hasSuggestions: false,
|
|
9
|
+
displayMode: '',
|
|
10
|
+
hideLabel: false,
|
|
11
|
+
readOnly: false,
|
|
12
|
+
required: false,
|
|
13
|
+
disabled: false,
|
|
14
|
+
status: '',
|
|
15
|
+
validatemessage: ''
|
|
10
16
|
};
|
|
11
17
|
|
|
12
18
|
export const stateProps = {
|
|
@@ -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,29 +1,27 @@
|
|
|
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,
|
|
20
|
-
placeholder: configProps.placeholder,
|
|
21
|
-
label: configProps.label,
|
|
22
|
-
helperText: configProps.helperText,
|
|
23
|
-
testId: configProps.testId,
|
|
24
23
|
hasSuggestions: configProps.hasSuggestions,
|
|
25
24
|
fieldMetadata,
|
|
26
|
-
|
|
27
25
|
getPConnect: () => {
|
|
28
26
|
return {
|
|
29
27
|
getStateProps: () => {
|
|
@@ -45,7 +43,22 @@ export const BasePegaDxilMyParagraph = () => {
|
|
|
45
43
|
|
|
46
44
|
return (
|
|
47
45
|
<>
|
|
48
|
-
<PegaDxilMyParagraph {...props} />
|
|
46
|
+
<PegaDxilMyParagraph {...props} {...args} />
|
|
49
47
|
</>
|
|
50
48
|
);
|
|
51
49
|
};
|
|
50
|
+
|
|
51
|
+
BasePegaDxilMyParagraph.args = {
|
|
52
|
+
label: configProps.label,
|
|
53
|
+
helperText: configProps.helperText,
|
|
54
|
+
placeholder: configProps.placeholder,
|
|
55
|
+
testId: configProps.testId,
|
|
56
|
+
readOnly: configProps.readOnly,
|
|
57
|
+
disabled: configProps.disabled,
|
|
58
|
+
required: configProps.required,
|
|
59
|
+
status: configProps.status,
|
|
60
|
+
hideLabel: configProps.hideLabel,
|
|
61
|
+
displayMode: configProps.displayMode,
|
|
62
|
+
variant: configProps.variant,
|
|
63
|
+
validatemessage: configProps.validatemessage
|
|
64
|
+
};
|
|
@@ -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
|
);
|
|
@@ -126,7 +126,7 @@ export default function PegaDxilMyParagraph(props: PegaDxilMyParagraphProps) {
|
|
|
126
126
|
}
|
|
127
127
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
128
128
|
<StyledPegaDxilMyParagraphWrapper>
|
|
129
|
-
displayComp
|
|
129
|
+
{displayComp}
|
|
130
130
|
</StyledPegaDxilMyParagraphWrapper>
|
|
131
131
|
) : (
|
|
132
132
|
<StyledPegaDxilMyParagraphWrapper>
|
|
@@ -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);
|
|
@@ -6,7 +6,15 @@ export const configProps = {
|
|
|
6
6
|
placeholder: 'Paragraph Placeholder',
|
|
7
7
|
helperText: 'Paragraph Helper Text',
|
|
8
8
|
testId: 'paragraph-12345678',
|
|
9
|
-
hasSuggestions: false
|
|
9
|
+
hasSuggestions: false,
|
|
10
|
+
displayMode: '',
|
|
11
|
+
variant: '',
|
|
12
|
+
hideLabel: false,
|
|
13
|
+
readOnly: false,
|
|
14
|
+
required: false,
|
|
15
|
+
disabled: false,
|
|
16
|
+
status: '',
|
|
17
|
+
validatemessage: ''
|
|
10
18
|
};
|
|
11
19
|
|
|
12
20
|
export const fieldMetadata = {
|