@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
|
@@ -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
|
+
});
|
|
@@ -2,33 +2,29 @@
|
|
|
2
2
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
import { useState } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
6
6
|
|
|
7
7
|
import { configProps, rawMetadata, fieldMetadata, stateProps } from './mock';
|
|
8
8
|
|
|
9
9
|
import PegaDxilMyRadiobuttons from './index';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const meta: Meta<typeof PegaDxilMyRadiobuttons> = {
|
|
12
12
|
title: 'PegaDxilMyRadiobuttons',
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
component: PegaDxilMyRadiobuttons,
|
|
14
|
+
excludeStories: /.*Data$/
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof PegaDxilMyRadiobuttons>;
|
|
19
|
+
|
|
20
|
+
export const BasePegaDxilMyRadiobuttons: Story = args => {
|
|
18
21
|
|
|
19
22
|
const [value, setValue] = useState(configProps.value);
|
|
20
23
|
|
|
21
24
|
const props = {
|
|
22
25
|
value,
|
|
23
|
-
align: 'vertical',
|
|
24
|
-
placeholder: configProps.placeholder,
|
|
25
|
-
label: configProps.label,
|
|
26
|
-
helperText: configProps.helperText,
|
|
27
|
-
datasource: configProps.datasource,
|
|
28
|
-
testId: configProps.testId,
|
|
29
26
|
hasSuggestions: configProps.hasSuggestions,
|
|
30
27
|
fieldMetadata,
|
|
31
|
-
|
|
32
28
|
getPConnect: () => {
|
|
33
29
|
return {
|
|
34
30
|
getConfigProps: () => {
|
|
@@ -79,7 +75,23 @@ export const BasePegaDxilMyRadiobuttons = () => {
|
|
|
79
75
|
|
|
80
76
|
return (
|
|
81
77
|
<>
|
|
82
|
-
<PegaDxilMyRadiobuttons {...props} />
|
|
78
|
+
<PegaDxilMyRadiobuttons {...props} {...args} />
|
|
83
79
|
</>
|
|
84
80
|
);
|
|
85
81
|
};
|
|
82
|
+
|
|
83
|
+
BasePegaDxilMyRadiobuttons.args = {
|
|
84
|
+
datasource: configProps.datasource,
|
|
85
|
+
label: configProps.label,
|
|
86
|
+
helperText: configProps.helperText,
|
|
87
|
+
placeholder: configProps.placeholder,
|
|
88
|
+
inline: configProps.inline,
|
|
89
|
+
testId: configProps.testId,
|
|
90
|
+
readOnly: configProps.readOnly,
|
|
91
|
+
disabled: configProps.disabled,
|
|
92
|
+
required: configProps.required,
|
|
93
|
+
status: configProps.status,
|
|
94
|
+
hideLabel: configProps.hideLabel,
|
|
95
|
+
displayMode: configProps.displayMode,
|
|
96
|
+
validatemessage: configProps.validatemessage
|
|
97
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/* eslint-disable no-nested-ternary */
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { RadioButton, RadioButtonGroup } from '@pega/cosmos-react-core';
|
|
3
|
+
import { RadioButton, RadioButtonGroup, withConfiguration } from '@pega/cosmos-react-core';
|
|
5
4
|
import type { PConnFieldProps } from './PConnProps';
|
|
6
5
|
|
|
7
6
|
// includes in bundle
|
|
8
|
-
import { formatExists, textFormatter } from './textformat-utils
|
|
7
|
+
import { formatExists, textFormatter } from './textformat-utils';
|
|
9
8
|
import handleEvent from './event-utils';
|
|
10
9
|
|
|
11
10
|
import StyledPegaDxilMyRadiobuttonsWrapper from './styles';
|
|
@@ -20,7 +19,6 @@ interface PegaDxilMyRadiobuttonsProps extends PConnFieldProps {
|
|
|
20
19
|
listType: string;
|
|
21
20
|
datasource: Array<any>;
|
|
22
21
|
inline: boolean;
|
|
23
|
-
align: string;
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
|
|
@@ -53,24 +51,23 @@ const getDisplayValue = (dataSource: any, value: any, isDatapage: boolean) => {
|
|
|
53
51
|
|
|
54
52
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
55
53
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
56
|
-
|
|
54
|
+
function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProps) {
|
|
57
55
|
const {
|
|
58
56
|
getPConnect,
|
|
59
57
|
value,
|
|
60
58
|
label,
|
|
61
|
-
hideLabel,
|
|
59
|
+
hideLabel = false,
|
|
62
60
|
helperText,
|
|
63
|
-
datasource,
|
|
61
|
+
datasource = [],
|
|
64
62
|
listType,
|
|
65
63
|
validatemessage,
|
|
66
|
-
align,
|
|
67
64
|
testId,
|
|
68
|
-
additionalProps,
|
|
65
|
+
additionalProps = {},
|
|
69
66
|
displayMode,
|
|
70
|
-
inline,
|
|
67
|
+
inline = false,
|
|
71
68
|
placeholder,
|
|
72
|
-
fieldMetadata,
|
|
73
|
-
isTableFormatter
|
|
69
|
+
fieldMetadata = {},
|
|
70
|
+
isTableFormatter = false
|
|
74
71
|
} = props;
|
|
75
72
|
const pConn = getPConnect();
|
|
76
73
|
const { formatter } = props;
|
|
@@ -89,7 +86,7 @@ export default function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProp
|
|
|
89
86
|
const fullReference = getFullReference(pConn, configProperty);
|
|
90
87
|
|
|
91
88
|
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
92
|
-
let { readOnly, required, disabled } = props;
|
|
89
|
+
let { readOnly = false, required = false, disabled = false } = props;
|
|
93
90
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
94
91
|
(prop) => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
95
92
|
);
|
|
@@ -186,7 +183,6 @@ export default function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProp
|
|
|
186
183
|
// @ts-ignore
|
|
187
184
|
pConn.getValidationApi().validate(event.target.value);
|
|
188
185
|
}}
|
|
189
|
-
align={align}
|
|
190
186
|
disabled={disabled}
|
|
191
187
|
className='standard'
|
|
192
188
|
name={fullReference}
|
|
@@ -197,47 +193,4 @@ export default function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProp
|
|
|
197
193
|
);
|
|
198
194
|
}
|
|
199
195
|
|
|
200
|
-
|
|
201
|
-
PegaDxilMyRadiobuttons.defaultProps = {
|
|
202
|
-
value: '',
|
|
203
|
-
validatemessage: '',
|
|
204
|
-
helperText: '',
|
|
205
|
-
hideLabel: false,
|
|
206
|
-
disabled: false,
|
|
207
|
-
readOnly: false,
|
|
208
|
-
required: false,
|
|
209
|
-
align: 'vertical',
|
|
210
|
-
testId: '',
|
|
211
|
-
datasource: [],
|
|
212
|
-
listType: '',
|
|
213
|
-
additionalProps: {},
|
|
214
|
-
fieldMetadata: {},
|
|
215
|
-
displayMode: null,
|
|
216
|
-
inline: false,
|
|
217
|
-
placeholder: null,
|
|
218
|
-
formatter: '',
|
|
219
|
-
isTableFormatter: false
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
PegaDxilMyRadiobuttons.propTypes = {
|
|
223
|
-
getPConnect: PropTypes.func.isRequired,
|
|
224
|
-
value: PropTypes.string,
|
|
225
|
-
label: PropTypes.string.isRequired,
|
|
226
|
-
hideLabel: PropTypes.bool,
|
|
227
|
-
datasource: PropTypes.arrayOf(PropTypes.any),
|
|
228
|
-
listType: PropTypes.string,
|
|
229
|
-
validatemessage: PropTypes.string,
|
|
230
|
-
helperText: PropTypes.string,
|
|
231
|
-
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
232
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
233
|
-
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
234
|
-
align: PropTypes.string,
|
|
235
|
-
testId: PropTypes.string,
|
|
236
|
-
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
237
|
-
fieldMetadata: PropTypes.objectOf(PropTypes.any),
|
|
238
|
-
displayMode: PropTypes.string,
|
|
239
|
-
inline: PropTypes.bool,
|
|
240
|
-
placeholder: PropTypes.string,
|
|
241
|
-
formatter: PropTypes.string,
|
|
242
|
-
isTableFormatter: PropTypes.bool
|
|
243
|
-
};
|
|
196
|
+
export default withConfiguration(PegaDxilMyRadiobuttons);
|
|
@@ -21,7 +21,15 @@ export const configProps = {
|
|
|
21
21
|
],
|
|
22
22
|
helperText: 'Picklist Helper Text',
|
|
23
23
|
testId: 'picklist-12345678',
|
|
24
|
-
hasSuggestions: false
|
|
24
|
+
hasSuggestions: false,
|
|
25
|
+
displayMode: '',
|
|
26
|
+
inline: false,
|
|
27
|
+
hideLabel: false,
|
|
28
|
+
readOnly: false,
|
|
29
|
+
required: false,
|
|
30
|
+
disabled: false,
|
|
31
|
+
status: '',
|
|
32
|
+
validatemessage: ''
|
|
25
33
|
};
|
|
26
34
|
|
|
27
35
|
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
|
+
});
|
|
@@ -5,7 +5,7 @@ import utc from 'dayjs/plugin/utc.js';
|
|
|
5
5
|
import tzone from 'dayjs/plugin/timezone.js';
|
|
6
6
|
import { formatDateTime, parseToDate } from '@pega/cosmos-react-core';
|
|
7
7
|
|
|
8
|
-
import formatConstants from './format-constants
|
|
8
|
+
import formatConstants from './format-constants';
|
|
9
9
|
|
|
10
10
|
dayjs.extend(relativeTime);
|
|
11
11
|
dayjs.extend(localizedFormat);
|
|
@@ -34,18 +34,9 @@ const constellationToCosmosFormatterMap = new Map([
|
|
|
34
34
|
[
|
|
35
35
|
DATE_TYPES.DATE,
|
|
36
36
|
new Map([
|
|
37
|
-
[
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
],
|
|
41
|
-
[
|
|
42
|
-
formatConstants.DateTimeShort,
|
|
43
|
-
{ format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.DATE }
|
|
44
|
-
],
|
|
45
|
-
[
|
|
46
|
-
formatConstants.DateTimeSince,
|
|
47
|
-
{ format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.RELATIVE }
|
|
48
|
-
],
|
|
37
|
+
[formatConstants.DateTimeLong, { format: COSMOS_FORMAT_CONSTANTS.LONG, variant: COSMOS_VARIANT_CONSTANTS.DATE_TIME }],
|
|
38
|
+
[formatConstants.DateTimeShort, { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.DATE }],
|
|
39
|
+
[formatConstants.DateTimeSince, { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.RELATIVE }],
|
|
49
40
|
[formatConstants.DateDefault, { format: COSMOS_FORMAT_CONSTANTS.LONG, variant: COSMOS_VARIANT_CONSTANTS.DATE }]
|
|
50
41
|
])
|
|
51
42
|
],
|
|
@@ -59,22 +50,10 @@ const constellationToCosmosFormatterMap = new Map([
|
|
|
59
50
|
[
|
|
60
51
|
DATE_TYPES.DATE_TIME,
|
|
61
52
|
new Map([
|
|
62
|
-
[
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
],
|
|
66
|
-
[
|
|
67
|
-
formatConstants.DateTimeShort,
|
|
68
|
-
{ format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.DATE }
|
|
69
|
-
],
|
|
70
|
-
[
|
|
71
|
-
formatConstants.DateTimeSince,
|
|
72
|
-
{ format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.RELATIVE }
|
|
73
|
-
],
|
|
74
|
-
[
|
|
75
|
-
formatConstants.DateTimeLong,
|
|
76
|
-
{ format: COSMOS_FORMAT_CONSTANTS.LONG, variant: COSMOS_VARIANT_CONSTANTS.DATE_TIME }
|
|
77
|
-
],
|
|
53
|
+
[formatConstants.DateTimeDefault, { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.DATE_TIME }],
|
|
54
|
+
[formatConstants.DateTimeShort, { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.DATE }],
|
|
55
|
+
[formatConstants.DateTimeSince, { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.RELATIVE }],
|
|
56
|
+
[formatConstants.DateTimeLong, { format: COSMOS_FORMAT_CONSTANTS.LONG, variant: COSMOS_VARIANT_CONSTANTS.DATE_TIME }],
|
|
78
57
|
[formatConstants.TimeOnly, { format: COSMOS_FORMAT_CONSTANTS.SHORT, variant: COSMOS_VARIANT_CONSTANTS.TIME }]
|
|
79
58
|
])
|
|
80
59
|
]
|
|
@@ -84,13 +63,14 @@ const types = ['fromNow', 'customFormat'];
|
|
|
84
63
|
// value should be in ISO 8601 format.
|
|
85
64
|
function DateFormatter(
|
|
86
65
|
value,
|
|
87
|
-
//
|
|
88
|
-
|
|
66
|
+
// @ts-ignore
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
68
|
+
{ type = types[1], format = 'DD/MM/YYYY', timezone, fieldType } = {}
|
|
69
|
+
) {
|
|
89
70
|
if (!value) return value;
|
|
90
71
|
switch (type) {
|
|
91
72
|
case types[1]:
|
|
92
|
-
if (timezone && !(fieldType === 'Date' || fieldType === 'Date only'))
|
|
93
|
-
return dayjs(value).tz(timezone).format(format); // Date only value should be formatted without timezone
|
|
73
|
+
if (timezone && !(fieldType === 'Date' || fieldType === 'Date only')) return dayjs(value).tz(timezone).format(format); // Date only value should be formatted without timezone
|
|
94
74
|
return dayjs(value).format(format);
|
|
95
75
|
case types[0]:
|
|
96
76
|
return dayjs(value).from(dayjs());
|
|
@@ -128,8 +108,8 @@ function DateFormatter(
|
|
|
128
108
|
export function format(value, options) {
|
|
129
109
|
if (!value) return null;
|
|
130
110
|
const { type, locale, timezone, formatter, translate } = options;
|
|
131
|
-
// eslint-disable-next-line
|
|
132
|
-
const { format, variant } = constellationToCosmosFormatterMap.get(type).get(formatter);
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
112
|
+
const { format, variant } = (constellationToCosmosFormatterMap.get(type) as any).get(formatter);
|
|
133
113
|
return formatDateTime(parseToDate(value), {
|
|
134
114
|
t: translate,
|
|
135
115
|
locale,
|
|
@@ -153,8 +133,7 @@ export default {
|
|
|
153
133
|
})
|
|
154
134
|
: value;
|
|
155
135
|
},
|
|
156
|
-
convertFromTimezone: (value, timezone) =>
|
|
157
|
-
value && timezone ? dayjs.tz(value, timezone).utc().format('YYYY-MM-DDTHH:mm:ss[Z]') : value,
|
|
136
|
+
convertFromTimezone: (value, timezone) => (value && timezone ? dayjs.tz(value, timezone).utc().format('YYYY-MM-DDTHH:mm:ss[Z]') : value),
|
|
158
137
|
Date: (value, options) => DateFormatter(value, { type: 'customFormat', ...options }),
|
|
159
138
|
'Date-Default': (value, options) => format(value, { ...options, formatter: 'Date-Default' }),
|
|
160
139
|
'Date-Time-Default': (value, options) => format(value, { ...options, formatter: 'Date-Time-Default' }),
|
|
@@ -2,38 +2,33 @@
|
|
|
2
2
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
import { useState } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
6
6
|
|
|
7
7
|
import { configProps, rawMetadata, fieldMetadata, stateProps } from './mock';
|
|
8
8
|
|
|
9
9
|
import PegaDxilMySearchbox from './index';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const meta: Meta<typeof PegaDxilMySearchbox> = {
|
|
12
12
|
title: 'PegaDxilMySearchbox',
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
component: PegaDxilMySearchbox,
|
|
14
|
+
excludeStories: /.*Data$/
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof PegaDxilMySearchbox>;
|
|
19
|
+
|
|
20
|
+
export const BasePegaDxilMySearchbox: Story = args => {
|
|
18
21
|
|
|
19
22
|
const [value, setValue] = useState(configProps.value);
|
|
20
23
|
const datasourceMetadata = fieldMetadata;
|
|
21
24
|
|
|
22
25
|
const props = {
|
|
23
26
|
value,
|
|
24
|
-
placeholder: configProps.placeholder,
|
|
25
|
-
label: configProps.label,
|
|
26
|
-
helperText: configProps.helperText,
|
|
27
|
-
datasource: configProps.datasource,
|
|
28
|
-
testId: configProps.testId,
|
|
29
27
|
hasSuggestions: configProps.hasSuggestions,
|
|
30
28
|
columns: [],
|
|
31
|
-
isTableFormatter: false,
|
|
32
29
|
listType: 'associated',
|
|
33
|
-
parameters: {},
|
|
34
30
|
datasourceMetadata,
|
|
35
31
|
fieldMetadata,
|
|
36
|
-
|
|
37
32
|
getPConnect: () => {
|
|
38
33
|
return {
|
|
39
34
|
getConfigProps: () => {
|
|
@@ -84,7 +79,24 @@ export const BasePegaDxilMySearchbox = () => {
|
|
|
84
79
|
|
|
85
80
|
return (
|
|
86
81
|
<>
|
|
87
|
-
<PegaDxilMySearchbox {...props} />
|
|
82
|
+
<PegaDxilMySearchbox {...props} {...args} />
|
|
88
83
|
</>
|
|
89
84
|
);
|
|
90
85
|
};
|
|
86
|
+
|
|
87
|
+
BasePegaDxilMySearchbox.args = {
|
|
88
|
+
datasource: configProps.datasource,
|
|
89
|
+
label: configProps.label,
|
|
90
|
+
helperText: configProps.helperText,
|
|
91
|
+
placeholder: configProps.placeholder,
|
|
92
|
+
parameters: {},
|
|
93
|
+
isTableFormatter: false,
|
|
94
|
+
testId: configProps.testId,
|
|
95
|
+
readOnly: configProps.readOnly,
|
|
96
|
+
disabled: configProps.disabled,
|
|
97
|
+
required: configProps.required,
|
|
98
|
+
status: configProps.status,
|
|
99
|
+
hideLabel: configProps.hideLabel,
|
|
100
|
+
displayMode: configProps.displayMode,
|
|
101
|
+
validatemessage: configProps.validatemessage
|
|
102
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { isEmbeddedField, isPageListInPath, PAGE, PAGELIST, buildAggOrCalcId } from './repeat-utils';
|
|
2
3
|
|
|
3
4
|
export const AT_FILTEREDLIST = '@FILTERED_LIST';
|
|
4
5
|
export const AT_PROPERTY = '@P';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
2
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
3
|
-
import { useEffect, useRef, useState,
|
|
4
|
-
import { ComboBox, menuHelpers, debounce, throttle, Button, Icon, type MenuGroupProps, type MenuItemProps } from '@pega/cosmos-react-core';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
3
|
+
import { useEffect, useRef, useState, useMemo, type MutableRefObject, type SetStateAction } from 'react';
|
|
4
|
+
import { ComboBox, menuHelpers, debounce, throttle, Button, Icon, withConfiguration, type MenuGroupProps, type MenuItemProps } from '@pega/cosmos-react-core';
|
|
6
5
|
import get from 'lodash.get';
|
|
7
6
|
import type { PConnFieldProps } from './PConnProps';
|
|
8
7
|
|
|
@@ -10,10 +9,10 @@ import type { PConnFieldProps } from './PConnProps';
|
|
|
10
9
|
import handleEvent from "./event-utils";
|
|
11
10
|
import { suggestionsHandler } from './suggestions-handler';
|
|
12
11
|
|
|
13
|
-
import { formatExists, textFormatter } from './textformat-utils
|
|
14
|
-
import { flattenParameters } from './picklist-utils
|
|
15
|
-
import { isSelfReferencedProperty, getDescriptorsFieldName } from './repeat-utils
|
|
16
|
-
import { getFieldNameFromEmbeddedFieldName } from './embed-utils
|
|
12
|
+
import { formatExists, textFormatter } from './textformat-utils';
|
|
13
|
+
import { flattenParameters } from './picklist-utils';
|
|
14
|
+
import { isSelfReferencedProperty, getDescriptorsFieldName } from './repeat-utils';
|
|
15
|
+
import { getFieldNameFromEmbeddedFieldName } from './embed-utils';
|
|
17
16
|
|
|
18
17
|
import { usePaginate, useDeepMemo, useIsMount, updatePropertiesForNewRecord } from './utils';
|
|
19
18
|
|
|
@@ -378,17 +377,17 @@ const DisplayComponent = (props: PegaDxilMySearchboxPropsSubSet) => {
|
|
|
378
377
|
|
|
379
378
|
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
380
379
|
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
381
|
-
|
|
380
|
+
function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
382
381
|
const {
|
|
383
382
|
getPConnect,
|
|
384
383
|
value,
|
|
385
384
|
placeholder,
|
|
386
385
|
validatemessage,
|
|
387
386
|
label,
|
|
388
|
-
hideLabel,
|
|
387
|
+
hideLabel = false,
|
|
389
388
|
helperText,
|
|
390
389
|
testId,
|
|
391
|
-
matchPosition,
|
|
390
|
+
matchPosition = 'contains',
|
|
392
391
|
maxResultsDisplay,
|
|
393
392
|
cacheLifeSpan,
|
|
394
393
|
displayMode,
|
|
@@ -396,17 +395,17 @@ export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
|
396
395
|
createNewRecord,
|
|
397
396
|
datasourceMetadata,
|
|
398
397
|
deferDatasource,
|
|
399
|
-
additionalProps,
|
|
398
|
+
additionalProps = {},
|
|
400
399
|
referenceType,
|
|
401
400
|
primaryField,
|
|
402
|
-
isTableFormatter,
|
|
401
|
+
isTableFormatter = false,
|
|
403
402
|
descriptors,
|
|
404
403
|
dataRelationshipContext,
|
|
405
|
-
hasSuggestions,
|
|
404
|
+
hasSuggestions = false,
|
|
406
405
|
contextClass
|
|
407
406
|
} = props;
|
|
408
407
|
const { formatter } = props;
|
|
409
|
-
let { listType, datasource, parameters, columns } = props;
|
|
408
|
+
let { listType, datasource = [], parameters = {}, columns = [] } = props;
|
|
410
409
|
|
|
411
410
|
// enable searhing based on the key
|
|
412
411
|
const { isSearchableOnKey } = props;
|
|
@@ -488,7 +487,7 @@ export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
|
488
487
|
}
|
|
489
488
|
|
|
490
489
|
// BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
|
|
491
|
-
let { readOnly, required, disabled } = props;
|
|
490
|
+
let { readOnly = false, required = false, disabled = false } = props;
|
|
492
491
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(
|
|
493
492
|
prop => prop === true || (typeof prop === 'string' && prop === 'true')
|
|
494
493
|
);
|
|
@@ -646,12 +645,14 @@ export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
|
646
645
|
PCore.getDataApi()
|
|
647
646
|
.init(dataConfig, contextName)
|
|
648
647
|
.then(dataObj => {
|
|
648
|
+
// @ts-ignore
|
|
649
649
|
setDataApiObj(dataObj);
|
|
650
650
|
// To avoid calling doSearch if someone types/pastes value before the API call is made
|
|
651
651
|
if (!filterValue)
|
|
652
652
|
doSearch(
|
|
653
653
|
'',
|
|
654
654
|
getDisplayFieldsMetaData(dataConfig.columns),
|
|
655
|
+
// @ts-ignore
|
|
655
656
|
dataObj,
|
|
656
657
|
setItems as any,
|
|
657
658
|
setLoading,
|
|
@@ -678,6 +679,7 @@ export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
|
678
679
|
PCore.getDataApi()
|
|
679
680
|
.init(dataConfig, contextName)
|
|
680
681
|
.then(dataObj => {
|
|
682
|
+
// @ts-ignore
|
|
681
683
|
setDataApiObj(dataObj);
|
|
682
684
|
// To avoid calling doSearch if someone types/pastes value before the API call is made
|
|
683
685
|
if (!filterValue) {
|
|
@@ -693,6 +695,7 @@ export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
|
693
695
|
doSearch(
|
|
694
696
|
'',
|
|
695
697
|
getDisplayFieldsMetaData(dataConfig.columns),
|
|
698
|
+
// @ts-ignore
|
|
696
699
|
dataObj,
|
|
697
700
|
setItems as any,
|
|
698
701
|
setLoading,
|
|
@@ -712,6 +715,7 @@ export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
|
712
715
|
doSearch(
|
|
713
716
|
'',
|
|
714
717
|
getDisplayFieldsMetaData(dataConfig.columns),
|
|
718
|
+
// @ts-ignore
|
|
715
719
|
dataObj,
|
|
716
720
|
setItems as any,
|
|
717
721
|
setLoading,
|
|
@@ -771,10 +775,14 @@ export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
|
771
775
|
PCore.getDataApi()
|
|
772
776
|
.init(dataConfig, contextName)
|
|
773
777
|
.then(dataObj => {
|
|
778
|
+
// @ts-ignore
|
|
774
779
|
setDataApiObj(dataObj);
|
|
780
|
+
// @ts-ignore
|
|
775
781
|
buildColumnForDisplayValue(dataObj);
|
|
776
782
|
// SET matchPosition to EQUALS to return exact matching record
|
|
783
|
+
// @ts-ignore
|
|
777
784
|
dataObj.matchPosition = 'equals';
|
|
785
|
+
// @ts-ignore
|
|
778
786
|
dataObj
|
|
779
787
|
.fetchData(value)
|
|
780
788
|
.then((displayResponse: { data: Array<never> }) => {
|
|
@@ -823,11 +831,13 @@ export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
|
823
831
|
setSelected(searchedItem[0]);
|
|
824
832
|
setActualValue(value);
|
|
825
833
|
// RESET matchPosition
|
|
834
|
+
// @ts-ignore
|
|
826
835
|
dataObj.matchPosition = dataConfig.matchPosition;
|
|
827
836
|
})
|
|
828
837
|
.catch(() => {
|
|
829
838
|
setActualValue(value);
|
|
830
839
|
// RESET matchPosition
|
|
840
|
+
// @ts-ignore
|
|
831
841
|
dataObj.matchPosition = dataConfig.matchPosition;
|
|
832
842
|
});
|
|
833
843
|
});
|
|
@@ -1172,65 +1182,5 @@ export function PegaDxilMySearchbox(props: PegaDxilMySearchboxProps) {
|
|
|
1172
1182
|
);
|
|
1173
1183
|
}
|
|
1174
1184
|
|
|
1175
|
-
export default memo(PegaDxilMySearchbox);
|
|
1176
1185
|
|
|
1177
|
-
|
|
1178
|
-
value: '',
|
|
1179
|
-
matchPosition: 'contains',
|
|
1180
|
-
maxResultsDisplay: '',
|
|
1181
|
-
placeholder: '',
|
|
1182
|
-
hideLabel: false,
|
|
1183
|
-
validatemessage: '',
|
|
1184
|
-
helperText: '',
|
|
1185
|
-
disabled: false,
|
|
1186
|
-
readOnly: false,
|
|
1187
|
-
required: false,
|
|
1188
|
-
testId: '',
|
|
1189
|
-
datasource: [],
|
|
1190
|
-
listType: '',
|
|
1191
|
-
parameters: {},
|
|
1192
|
-
columns: [],
|
|
1193
|
-
cacheLifeSpan: '',
|
|
1194
|
-
displayMode: null,
|
|
1195
|
-
onRecordChange: null,
|
|
1196
|
-
datasourceMetadata: null,
|
|
1197
|
-
deferDatasource: false,
|
|
1198
|
-
additionalProps: {},
|
|
1199
|
-
formatter: '',
|
|
1200
|
-
referenceType: null,
|
|
1201
|
-
isTableFormatter: false,
|
|
1202
|
-
primaryField: '',
|
|
1203
|
-
hasSuggestions: false
|
|
1204
|
-
};
|
|
1205
|
-
|
|
1206
|
-
PegaDxilMySearchbox.propTypes = {
|
|
1207
|
-
value: PropTypes.string,
|
|
1208
|
-
maxResultsDisplay: PropTypes.string,
|
|
1209
|
-
matchPosition: PropTypes.string,
|
|
1210
|
-
placeholder: PropTypes.string,
|
|
1211
|
-
label: PropTypes.string.isRequired,
|
|
1212
|
-
hideLabel: PropTypes.bool,
|
|
1213
|
-
getPConnect: PropTypes.func.isRequired,
|
|
1214
|
-
validatemessage: PropTypes.string,
|
|
1215
|
-
helperText: PropTypes.string,
|
|
1216
|
-
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
1217
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
1218
|
-
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
1219
|
-
testId: PropTypes.string,
|
|
1220
|
-
datasource: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.any), PropTypes.string]),
|
|
1221
|
-
listType: PropTypes.string,
|
|
1222
|
-
parameters: PropTypes.objectOf(PropTypes.any),
|
|
1223
|
-
columns: PropTypes.arrayOf(PropTypes.object),
|
|
1224
|
-
cacheLifeSpan: PropTypes.string,
|
|
1225
|
-
displayMode: PropTypes.string,
|
|
1226
|
-
createNewRecord: PropTypes.func,
|
|
1227
|
-
onRecordChange: PropTypes.func,
|
|
1228
|
-
datasourceMetadata: PropTypes.objectOf(PropTypes.any),
|
|
1229
|
-
deferDatasource: PropTypes.bool,
|
|
1230
|
-
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
1231
|
-
formatter: PropTypes.string,
|
|
1232
|
-
referenceType: PropTypes.string,
|
|
1233
|
-
primaryField: PropTypes.string,
|
|
1234
|
-
isTableFormatter: PropTypes.bool,
|
|
1235
|
-
hasSuggestions: PropTypes.bool
|
|
1236
|
-
};
|
|
1186
|
+
export default withConfiguration(PegaDxilMySearchbox);
|
|
@@ -20,7 +20,14 @@ export const configProps = {
|
|
|
20
20
|
],
|
|
21
21
|
helperText: 'Picklist Helper Text',
|
|
22
22
|
testId: 'picklist-12345678',
|
|
23
|
-
hasSuggestions: false
|
|
23
|
+
hasSuggestions: false,
|
|
24
|
+
displayMode: '',
|
|
25
|
+
hideLabel: false,
|
|
26
|
+
readOnly: false,
|
|
27
|
+
required: false,
|
|
28
|
+
disabled: false,
|
|
29
|
+
status: '',
|
|
30
|
+
validatemessage: ''
|
|
24
31
|
};
|
|
25
32
|
|
|
26
33
|
export const stateProps = {
|