@pega/dx-component-builder-sdk 23.1.13 → 23.1.15
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 +4 -4
- package/package.json +1 -1
- package/src/cli.js +6 -0
- package/src/constants.js +10 -0
- package/src/tasks/build-jest-assets/index.js +153 -0
- package/src/tasks/create/templates/Constellation/field/Boolean/Boolean.ts.mustache +35 -0
- package/src/tasks/create/templates/Constellation/field/Boolean/demo.stories.tsx.mustache +71 -0
- package/src/tasks/create/templates/Constellation/field/Boolean/index.tsx.mustache +11 -48
- 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/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/DateFormatter.js → src/tasks/create/templates/Constellation/field/Date/DateFormatter.ts.mustache} +6 -6
- package/src/tasks/create/templates/Constellation/field/Date/FormattedText.tsx.mustache +20 -0
- package/src/tasks/create/templates/Constellation/field/Date/{date.js.mustache → 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/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/time-of-day.js → src/tasks/create/templates/Constellation/field/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/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 -61
- 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} +2 -1
- 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 +15 -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/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/{repeat-constants.js.mustache → 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 +1 -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 +4 -22
- 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/{tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/date-utils.js → src/tasks/create/templates/Constellation/field/TimeOfDay/time-of-day.ts.mustache} +24 -23
- 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 +19 -8
- package/src/tasks/create/templates/Constellation/template/DETAILS/index.tsx.mustache +4 -17
- package/src/tasks/create/templates/Constellation/template/DETAILS/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/StatusWork.tsx.mustache +17 -19
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/demo.stories.tsx.mustache +17 -8
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/index.tsx.mustache +5 -19
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/styles.ts.mustache +7 -14
- 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/demo.stories.tsx.mustache +18 -8
- package/src/tasks/create/templates/Constellation/template/FORM/index.tsx.mustache +5 -13
- package/src/tasks/create/templates/Constellation/template/FORM/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/template/FORM-region/demo.stories.tsx.mustache +17 -7
- package/src/tasks/create/templates/Constellation/template/FORM-region/index.tsx.mustache +4 -10
- package/src/tasks/create/templates/Constellation/template/FORM-region/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/template/PAGE/demo.stories.tsx.mustache +14 -8
- package/src/tasks/create/templates/Constellation/template/PAGE/index.tsx.mustache +5 -16
- package/src/tasks/create/templates/Constellation/template/PAGE/styles.ts.mustache +7 -14
- package/{tests/assets/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 +18 -13
- package/src/tasks/create/templates/Constellation/widget/PAGE/index.tsx.mustache +4 -18
- package/src/tasks/create/templates/Constellation/widget/PAGE/styles.ts.mustache +7 -14
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/Avatar.tsx.mustache +3 -13
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/Operator.tsx.mustache +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/widget/PAGE-CASE/page-case.component.ts.mustache +7 -5
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +104 -25
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +8 -1
- 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 +15 -12
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +10 -16
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/demo.stories.tsx.mustache +20 -0
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +41 -36
- package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +10 -0
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +17 -3
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +7 -0
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +5 -3
- package/src/tasks/index.js +1 -0
- package/src/tasks/map/map.js +29 -8
- package/src/tasks/publish/index.js +3 -1
- package/src/tasks/publish-all/index.js +7 -5
- 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 +4 -22
- 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/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +10 -4
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/Operator/Operator.tsx +5 -3
- package/tests/assets/sdk-r/components/create/override-sdk/field/CancelAlert/CancelAlert.tsx +95 -78
- package/tests/assets/sdk-r/components/create/override-sdk/field/Checkbox/Checkbox.tsx +104 -24
- package/tests/assets/sdk-r/components/create/override-sdk/field/Currency/Currency.tsx +10 -16
- package/tests/assets/sdk-r/components/create/override-sdk/field/Decimal/Decimal.tsx +18 -13
- package/tests/assets/sdk-r/components/create/override-sdk/field/Group/Group.tsx +2 -0
- 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 +41 -36
- package/tests/assets/sdk-r/components/create/override-sdk/field/RichText/RichText.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Assignment/Assignment.tsx +21 -7
- package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.tsx +6 -4
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseSummary/CaseSummary.tsx +43 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseView/CaseView.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +34 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +8 -7
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/utils.ts +3 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +32 -16
- package/tests/assets/sdk-r/components/create/override-sdk/template/WideNarrow/WideNarrow.tsx +1 -1
- package/tests/assets/sdk-r/components/create/override-sdk/template/WssNavBar/WssNavBar.tsx +4 -1
- package/tests/assets/sdk-r/components/create/override-sdk/widget/Attachment/Attachment.tsx +12 -2
- package/tests/assets/sdk-r/components/create/override-sdk/widget/QuickCreate/QuickCreate.tsx +52 -25
- 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.jsx → demo.stories.tsx} +28 -20
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.tsx +11 -48
- 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/{src/tasks/create/templates/Constellation/field/Date/DateFormatter.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/{date.js → 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/{src/tasks/create/templates/Constellation/field/TimeOfDay/time-of-day.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/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_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 -61
- 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} +2 -1
- 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 +15 -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/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/{repeat-constants.js → 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 +1 -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 +4 -22
- 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/{src/tasks/create/templates/Constellation/field/DateTime/date-utils.js.mustache → tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/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/StatusWork.tsx +17 -19
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/demo.stories.tsx +19 -8
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/index.tsx +4 -17
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/styles.ts +7 -14
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/demo.stories.tsx +18 -8
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/index.tsx +5 -13
- 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/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/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/StatusWork.tsx +17 -19
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +17 -8
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +5 -19
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
- 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/demo.stories.tsx +17 -7
- package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
- 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 +18 -13
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/index.tsx +4 -18
- 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/index.tsx +104 -25
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +10 -16
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +8 -1
- 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 +15 -12
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/demo.stories.tsx +20 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +41 -36
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/demo.stories.tsx +10 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +17 -3
- 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 +7 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +5 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +10 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/Operator/Operator.tsx +5 -3
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/CancelAlert/CancelAlert.tsx +95 -78
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Checkbox/Checkbox.tsx +104 -24
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Currency/Currency.tsx +10 -16
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Decimal/Decimal.tsx +18 -13
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Group/Group.tsx +2 -0
- 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 +41 -36
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/RichText/RichText.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Assignment/Assignment.tsx +21 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.tsx +6 -4
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseSummary/CaseSummary.tsx +43 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseView/CaseView.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +34 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +8 -7
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/utils.ts +3 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +32 -16
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WideNarrow/WideNarrow.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/WssNavBar/WssNavBar.tsx +4 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/Attachment/Attachment.tsx +12 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/widget/QuickCreate/QuickCreate.tsx +52 -25
- package/src/tasks/create/templates/Constellation/field/Boolean/Boolean.js.mustache +0 -38
- package/src/tasks/create/templates/Constellation/field/Boolean/demo.stories.jsx.mustache +0 -63
- 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/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/PConnProps.d.ts +0 -46
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +0 -54
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +0 -73
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/mock.ts +0 -15
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTestText/styles.ts +0 -15
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/config.json +0 -83
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +0 -59
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx +0 -101
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/mock.ts +0 -16
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/styles.js +0 -7
- /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,63 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-useless-fragment */
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { withKnobs } from '@storybook/addon-knobs';
|
|
5
|
-
|
|
6
|
-
import { configProps, stateProps } from './mock';
|
|
7
|
-
|
|
8
|
-
import {{COMPONENT_CLASS_NAME}} from './index';
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
title: '{{COMPONENT_CLASS_NAME}}',
|
|
12
|
-
decorators: [withKnobs],
|
|
13
|
-
component: {{COMPONENT_CLASS_NAME}}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const Base{{COMPONENT_CLASS_NAME}} = () => {
|
|
17
|
-
|
|
18
|
-
const [value, setValue] = useState(configProps.value);
|
|
19
|
-
|
|
20
|
-
const props = {
|
|
21
|
-
value,
|
|
22
|
-
label: configProps.label,
|
|
23
|
-
helperText: configProps.helperText,
|
|
24
|
-
caption: configProps.caption,
|
|
25
|
-
validatemessage: configProps.validatemessage,
|
|
26
|
-
hideLabel: configProps.hideLabel,
|
|
27
|
-
testId: configProps.testId,
|
|
28
|
-
additionalProps: configProps.additionalProps,
|
|
29
|
-
displayMode: configProps.displayMode,
|
|
30
|
-
variant: configProps.variant,
|
|
31
|
-
trueLabel: configProps.trueLabel,
|
|
32
|
-
falseLabel: configProps.falseLabel,
|
|
33
|
-
disabled: configProps.disabled,
|
|
34
|
-
readOnly: configProps.readOnly,
|
|
35
|
-
required: configProps.required,
|
|
36
|
-
getPConnect: () => {
|
|
37
|
-
return {
|
|
38
|
-
getStateProps: () => {
|
|
39
|
-
return stateProps;
|
|
40
|
-
},
|
|
41
|
-
getActionsApi: () => {
|
|
42
|
-
return {
|
|
43
|
-
updateFieldValue: (propName, theValue) => {
|
|
44
|
-
setValue(theValue);
|
|
45
|
-
},
|
|
46
|
-
triggerFieldChange: () => { /* nothing */}
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
getValidationApi: () => {
|
|
50
|
-
return {
|
|
51
|
-
validate: () => { /* nothing */}
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<>
|
|
60
|
-
<{{COMPONENT_CLASS_NAME}} {...props} />
|
|
61
|
-
</>
|
|
62
|
-
);
|
|
63
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { FieldValueList } from '@pega/cosmos-react-core';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
import { format } from './date.js';
|
|
5
|
-
|
|
6
|
-
export default function FormattedText(props) {
|
|
7
|
-
const { formatType, label, value, testId, hideLabel, variant, additionalProps } = props;
|
|
8
|
-
|
|
9
|
-
let text = value;
|
|
10
|
-
|
|
11
|
-
text = format(text, formatType, additionalProps);
|
|
12
|
-
|
|
13
|
-
const fields = [
|
|
14
|
-
{
|
|
15
|
-
id: label.toLowerCase(),
|
|
16
|
-
name: hideLabel ? '' : label,
|
|
17
|
-
value: text
|
|
18
|
-
}
|
|
19
|
-
];
|
|
20
|
-
return <FieldValueList variant={variant} fields={fields} data-testid={testId} />;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
FormattedText.defaultProps = {
|
|
24
|
-
formatType: 'none',
|
|
25
|
-
variant: 'stacked',
|
|
26
|
-
value: undefined,
|
|
27
|
-
label: '',
|
|
28
|
-
testId: null,
|
|
29
|
-
hideLabel: false,
|
|
30
|
-
additionalProps: {}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
FormattedText.propTypes = {
|
|
34
|
-
formatType: PropTypes.string,
|
|
35
|
-
variant: PropTypes.oneOf(['inline', 'stacked']),
|
|
36
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
|
37
|
-
label: PropTypes.string,
|
|
38
|
-
testId: PropTypes.string,
|
|
39
|
-
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
40
|
-
hideLabel: PropTypes.bool
|
|
41
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
function Boolean(value, { allowEmpty = true, tick = "", cross = "" } = {}) {
|
|
2
|
-
if (
|
|
3
|
-
(!allowEmpty && !value) ||
|
|
4
|
-
value === false ||
|
|
5
|
-
value?.toString()?.toLowerCase() === "false" ||
|
|
6
|
-
value === 0 ||
|
|
7
|
-
value === "0"
|
|
8
|
-
) {
|
|
9
|
-
return cross || "";
|
|
10
|
-
}
|
|
11
|
-
if (
|
|
12
|
-
value === true ||
|
|
13
|
-
value?.toString()?.toLowerCase() === "true" ||
|
|
14
|
-
value === 1 ||
|
|
15
|
-
value === "1"
|
|
16
|
-
) {
|
|
17
|
-
return tick || "";
|
|
18
|
-
}
|
|
19
|
-
if (
|
|
20
|
-
allowEmpty &&
|
|
21
|
-
(value === "null" ||
|
|
22
|
-
value === "" ||
|
|
23
|
-
value === null ||
|
|
24
|
-
typeof value === "undefined")
|
|
25
|
-
) {
|
|
26
|
-
return "––";
|
|
27
|
-
}
|
|
28
|
-
return value;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
TrueFalse: (value, options) =>
|
|
33
|
-
Boolean(value, {
|
|
34
|
-
...options,
|
|
35
|
-
tick: "True",
|
|
36
|
-
cross: "False"
|
|
37
|
-
})
|
|
38
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { FieldValueList } from '@pega/cosmos-react-core';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
import { format } from './date.js';
|
|
5
|
-
|
|
6
|
-
export default function FormattedText(props) {
|
|
7
|
-
const { formatType, label, value, testId, hideLabel, variant, additionalProps } = props;
|
|
8
|
-
|
|
9
|
-
let text = value;
|
|
10
|
-
|
|
11
|
-
text = format(text, formatType, additionalProps);
|
|
12
|
-
|
|
13
|
-
const fields = [
|
|
14
|
-
{
|
|
15
|
-
id: label.toLowerCase(),
|
|
16
|
-
name: hideLabel ? '' : label,
|
|
17
|
-
value: text
|
|
18
|
-
}
|
|
19
|
-
];
|
|
20
|
-
return <FieldValueList variant={variant} fields={fields} data-testid={testId} />;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
FormattedText.defaultProps = {
|
|
24
|
-
formatType: 'none',
|
|
25
|
-
variant: 'stacked',
|
|
26
|
-
value: undefined,
|
|
27
|
-
label: '',
|
|
28
|
-
testId: null,
|
|
29
|
-
hideLabel: false,
|
|
30
|
-
additionalProps: {}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
FormattedText.propTypes = {
|
|
34
|
-
formatType: PropTypes.string,
|
|
35
|
-
variant: PropTypes.oneOf(['inline', 'stacked']),
|
|
36
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
|
37
|
-
label: PropTypes.string,
|
|
38
|
-
testId: PropTypes.string,
|
|
39
|
-
additionalProps: PropTypes.objectOf(PropTypes.any),
|
|
40
|
-
hideLabel: PropTypes.bool
|
|
41
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {PConnect } from '@pega/pcore-pconnect-typedefs';
|
|
2
|
-
|
|
3
|
-
// PConnProps.d.ts
|
|
4
|
-
// This gives us a place to have each component (which is most DX Components) that is
|
|
5
|
-
// expected to have a getPConnect extend its props (from BaseProps)
|
|
6
|
-
// such that every component will be expected to have a getPConnect() function
|
|
7
|
-
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
8
|
-
// This PConnProps can be extended to include other props that we know are in every component
|
|
9
|
-
export interface PConnProps {
|
|
10
|
-
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
11
|
-
getPConnect: () => typeof PConnect;
|
|
12
|
-
|
|
13
|
-
// Allow any/all other key/value pairs in the BaseProps for now
|
|
14
|
-
// TODO: refine which other props are always expected for various component
|
|
15
|
-
// types and consider further interface "subclassing". For example, we may
|
|
16
|
-
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
17
|
-
// and any other props that every Form component expects.
|
|
18
|
-
// For example, see the PConnFieldProps below.
|
|
19
|
-
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
20
|
-
// otherwise undefined types to appear. This can be helpful for debugging
|
|
21
|
-
// or when adding new components whose types aren't yet known.
|
|
22
|
-
// [key: string]: any;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
27
|
-
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
28
|
-
// components/field directory
|
|
29
|
-
export interface PConnFieldProps extends PConnProps {
|
|
30
|
-
label: string,
|
|
31
|
-
required: boolean,
|
|
32
|
-
disabled: boolean,
|
|
33
|
-
value: any,
|
|
34
|
-
validatemessage: string,
|
|
35
|
-
status?: string,
|
|
36
|
-
onChange?: any,
|
|
37
|
-
onBlur?: any,
|
|
38
|
-
readOnly: boolean,
|
|
39
|
-
testId: string,
|
|
40
|
-
helperText: string,
|
|
41
|
-
displayMode?: string,
|
|
42
|
-
hideLabel: boolean,
|
|
43
|
-
placeholder?: string,
|
|
44
|
-
fieldMetadata?: any,
|
|
45
|
-
additionalProps?: any
|
|
46
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable react/jsx-no-useless-fragment */
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
import { useState } from 'react';
|
|
5
|
-
import { withKnobs } from '@storybook/addon-knobs';
|
|
6
|
-
|
|
7
|
-
import { stateProps, configProps } from './mock';
|
|
8
|
-
|
|
9
|
-
import PegaDxilMyTestText from './index';
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
title: 'PegaDxilMyTestText',
|
|
13
|
-
decorators: [withKnobs],
|
|
14
|
-
component: PegaDxilMyTestText
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const BasePegaDxilMyTestText = () => {
|
|
18
|
-
|
|
19
|
-
const [value, setValue] = useState(configProps.value);
|
|
20
|
-
|
|
21
|
-
const props = {
|
|
22
|
-
value,
|
|
23
|
-
placeholder: configProps.placeholder,
|
|
24
|
-
label: configProps.label,
|
|
25
|
-
testId: configProps.testId,
|
|
26
|
-
hasSuggestions: configProps.hasSuggestions,
|
|
27
|
-
|
|
28
|
-
getPConnect: () => {
|
|
29
|
-
return {
|
|
30
|
-
getStateProps: () => {
|
|
31
|
-
return stateProps;
|
|
32
|
-
},
|
|
33
|
-
getActionsApi: () => {
|
|
34
|
-
return {
|
|
35
|
-
updateFieldValue: (propName, theValue) => {
|
|
36
|
-
setValue(theValue);
|
|
37
|
-
},
|
|
38
|
-
triggerFieldChange: () => {/* nothing */}
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
ignoreSuggestion: () => {/* nothing */},
|
|
42
|
-
acceptSuggestion: () => {/* nothing */},
|
|
43
|
-
setInheritedProps: () => {/* nothing */},
|
|
44
|
-
resolveConfigProps: () => {/* nothing */}
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<>
|
|
51
|
-
<PegaDxilMyTestText {...props} />
|
|
52
|
-
</>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
import { Input } from '@pega/cosmos-react-core';
|
|
3
|
-
|
|
4
|
-
import type { PConnFieldProps } from './PConnProps';
|
|
5
|
-
|
|
6
|
-
import StyledPegaDxilMyTestTextWrapper from './styles';
|
|
7
|
-
|
|
8
|
-
// interface for props
|
|
9
|
-
interface PegaDxilMyTestTextProps extends PConnFieldProps {
|
|
10
|
-
// If any, enter additional props that only exist on TextInput here
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// interface for StateProps object
|
|
15
|
-
interface StateProps {
|
|
16
|
-
value: string;
|
|
17
|
-
hasSuggestions: boolean;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// Duplicated runtime code from Constellation Design System Component
|
|
21
|
-
|
|
22
|
-
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
23
|
-
// any default values in config.pros should be set in defaultProps at bottom of this file
|
|
24
|
-
export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
|
|
25
|
-
const { getPConnect, value, placeholder, disabled, readOnly, required, label, hideLabel, testId } = props;
|
|
26
|
-
|
|
27
|
-
const pConn = getPConnect();
|
|
28
|
-
const actions = pConn.getActionsApi();
|
|
29
|
-
const stateProps = pConn.getStateProps() as StateProps;
|
|
30
|
-
const propName: string = stateProps.value;
|
|
31
|
-
|
|
32
|
-
const handleOnChange = (event: any) => {
|
|
33
|
-
const { value: updatedValue } = event.target;
|
|
34
|
-
actions.updateFieldValue(propName, updatedValue);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<StyledPegaDxilMyTestTextWrapper>
|
|
39
|
-
<Input
|
|
40
|
-
type='text'
|
|
41
|
-
value={value}
|
|
42
|
-
label={label}
|
|
43
|
-
labelHidden={hideLabel}
|
|
44
|
-
placeholder={placeholder}
|
|
45
|
-
disabled={disabled}
|
|
46
|
-
readOnly={readOnly}
|
|
47
|
-
required={required}
|
|
48
|
-
onChange={handleOnChange}
|
|
49
|
-
testId={testId}
|
|
50
|
-
/>
|
|
51
|
-
</StyledPegaDxilMyTestTextWrapper>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
PegaDxilMyTestText.defaultProps = {
|
|
56
|
-
value: '',
|
|
57
|
-
placeholder: '',
|
|
58
|
-
disabled: false,
|
|
59
|
-
readOnly: false,
|
|
60
|
-
required: false,
|
|
61
|
-
testId: ''
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
PegaDxilMyTestText.propTypes = {
|
|
65
|
-
label: PropTypes.string,
|
|
66
|
-
value: PropTypes.string,
|
|
67
|
-
placeholder: PropTypes.string,
|
|
68
|
-
getPConnect: PropTypes.func.isRequired,
|
|
69
|
-
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
70
|
-
readOnly: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
71
|
-
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),
|
|
72
|
-
testId: PropTypes.string
|
|
73
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
export const configProps = {
|
|
4
|
-
value: '',
|
|
5
|
-
label: 'Text Sample',
|
|
6
|
-
placeholder: 'Text Placeholder',
|
|
7
|
-
helperText: 'Text Helper Text',
|
|
8
|
-
testId: 'Text-12345678',
|
|
9
|
-
hasSuggestions: false
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const stateProps = {
|
|
13
|
-
value: '.TextSample',
|
|
14
|
-
hasSuggestions: false
|
|
15
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
// individual style, comment out above, and uncomment here and add styles
|
|
9
|
-
// import styled, { css } from 'styled-components';
|
|
10
|
-
//
|
|
11
|
-
// export default styled.div(() => {
|
|
12
|
-
// return css`
|
|
13
|
-
// margin: 0px 0;
|
|
14
|
-
// `;
|
|
15
|
-
// });
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/config.json
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "Pega_DXIL_MyTestText",
|
|
3
|
-
"label": "My Test Text",
|
|
4
|
-
"description": "My Test Text Description",
|
|
5
|
-
"organization": "Pega",
|
|
6
|
-
"version": "0.0.1",
|
|
7
|
-
"library": "DXIL",
|
|
8
|
-
"allowedApplications": [],
|
|
9
|
-
"componentKey": "Pega_DXIL_MyTestText",
|
|
10
|
-
"type": "Field",
|
|
11
|
-
"subtype": "Text",
|
|
12
|
-
"icon": "images/pz-url-active.svg",
|
|
13
|
-
"properties": [
|
|
14
|
-
{
|
|
15
|
-
"name": "label",
|
|
16
|
-
"label": "Field label",
|
|
17
|
-
"format": "TEXT",
|
|
18
|
-
"required": true
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"name": "readOnly",
|
|
22
|
-
"label": "Edit mode",
|
|
23
|
-
"format": "READONLY"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"label": "Input settings",
|
|
27
|
-
"format": "GROUP",
|
|
28
|
-
"visibility": "(!readOnly = true)",
|
|
29
|
-
"properties": [
|
|
30
|
-
{
|
|
31
|
-
"name": "placeholder",
|
|
32
|
-
"label": "Placeholder",
|
|
33
|
-
"format": "TEXT"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "helperText",
|
|
37
|
-
"label": "Helper text",
|
|
38
|
-
"format": "TEXT"
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"label": "Conditions",
|
|
44
|
-
"format": "GROUP",
|
|
45
|
-
"properties": [
|
|
46
|
-
{
|
|
47
|
-
"name": "required",
|
|
48
|
-
"label": "Required",
|
|
49
|
-
"format": "REQUIRED",
|
|
50
|
-
"visibility": "(!readOnly = true)"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"name": "disabled",
|
|
54
|
-
"label": "Disabled",
|
|
55
|
-
"format": "DISABLED",
|
|
56
|
-
"visibility": "(!readOnly = true)"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"name": "visibility",
|
|
60
|
-
"label": "Visibility",
|
|
61
|
-
"format": "VISIBILITY"
|
|
62
|
-
}
|
|
63
|
-
]
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"label": "Advanced",
|
|
67
|
-
"format": "GROUP",
|
|
68
|
-
"collapsible": true,
|
|
69
|
-
"properties": [
|
|
70
|
-
{
|
|
71
|
-
"name": "testId",
|
|
72
|
-
"label": "Test ID",
|
|
73
|
-
"format": "TEXT",
|
|
74
|
-
"ignorePattern": "[^-_\\p{N}\\p{L}]",
|
|
75
|
-
"includeAnnotations": false
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"defaultConfig": {
|
|
81
|
-
"label": "@L $this.label"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
|
-
|
|
5
|
-
import PegaDxilMyTestText from './index';
|
|
6
|
-
import { configProps } from './mock';
|
|
7
|
-
|
|
8
|
-
const meta: Meta<typeof PegaDxilMyTestText> = {
|
|
9
|
-
title: 'PegaDxilMyTestText',
|
|
10
|
-
component: PegaDxilMyTestText,
|
|
11
|
-
excludeStories: /.*Data$/
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof PegaDxilMyTestText>;
|
|
16
|
-
|
|
17
|
-
export const BasePegaDxilMyTestText: Story = args => {
|
|
18
|
-
const [value, setValue] = useState(configProps.value);
|
|
19
|
-
|
|
20
|
-
const props = {
|
|
21
|
-
value,
|
|
22
|
-
placeholder: configProps.placeholder,
|
|
23
|
-
getPConnect: () => {
|
|
24
|
-
return {
|
|
25
|
-
getActionsApi: () => {
|
|
26
|
-
return {
|
|
27
|
-
updateFieldValue: (propName, theValue) => {
|
|
28
|
-
setValue(theValue);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
getStateProps: () => {
|
|
33
|
-
return { value: '.name' };
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
onChange: event => {
|
|
38
|
-
setValue(event.target.value);
|
|
39
|
-
},
|
|
40
|
-
onBlur: () => {
|
|
41
|
-
return configProps.value;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return <PegaDxilMyTestText {...props} {...args} />;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
BasePegaDxilMyTestText.args = {
|
|
49
|
-
label: configProps.label,
|
|
50
|
-
helperText: configProps.helperText,
|
|
51
|
-
testId: configProps.testId,
|
|
52
|
-
readOnly: configProps.readOnly,
|
|
53
|
-
disabled: configProps.disabled,
|
|
54
|
-
required: configProps.required,
|
|
55
|
-
status: configProps.status,
|
|
56
|
-
hideLabel: configProps.hideLabel,
|
|
57
|
-
displayMode: configProps.displayMode,
|
|
58
|
-
validatemessage: configProps.validatemessage
|
|
59
|
-
};
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/index.tsx
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect } from 'react';
|
|
2
|
-
import { TextField } from '@material-ui/core';
|
|
3
|
-
|
|
4
|
-
import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
|
|
5
|
-
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
6
|
-
import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
7
|
-
import StyledPegaDxilMyTestTextWrapper from './styles';
|
|
8
|
-
|
|
9
|
-
interface PegaDxilMyTestTextProps extends PConnFieldProps {
|
|
10
|
-
// If any, enter additional props that only exist on this componentName
|
|
11
|
-
fieldMetadata?: any;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Duplicated runtime code from React SDK
|
|
15
|
-
|
|
16
|
-
// props passed in combination of props from property panel (config.json) and run time props from Constellation
|
|
17
|
-
export default function PegaDxilMyTestText(props: PegaDxilMyTestTextProps) {
|
|
18
|
-
// Get emitted components from map (so we can get any override that may exist)
|
|
19
|
-
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
20
|
-
|
|
21
|
-
const {
|
|
22
|
-
getPConnect,
|
|
23
|
-
label,
|
|
24
|
-
required,
|
|
25
|
-
disabled,
|
|
26
|
-
value = '',
|
|
27
|
-
validatemessage,
|
|
28
|
-
status,
|
|
29
|
-
/* onChange, onBlur */
|
|
30
|
-
readOnly,
|
|
31
|
-
testId,
|
|
32
|
-
fieldMetadata,
|
|
33
|
-
helperText,
|
|
34
|
-
displayMode,
|
|
35
|
-
hideLabel,
|
|
36
|
-
placeholder
|
|
37
|
-
} = props;
|
|
38
|
-
|
|
39
|
-
const pConn = getPConnect();
|
|
40
|
-
const actions = pConn.getActionsApi();
|
|
41
|
-
const propName = (pConn.getStateProps() as any).value;
|
|
42
|
-
|
|
43
|
-
const helperTextToDisplay = validatemessage || helperText;
|
|
44
|
-
|
|
45
|
-
const [inputValue, setInputValue] = useState('');
|
|
46
|
-
const maxLength = fieldMetadata?.maxLength;
|
|
47
|
-
|
|
48
|
-
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
49
|
-
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
setInputValue(value);
|
|
52
|
-
}, [value]);
|
|
53
|
-
|
|
54
|
-
if (displayMode === 'LABELS_LEFT') {
|
|
55
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} />;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
59
|
-
return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (readOnly) {
|
|
63
|
-
readOnlyProp = { readOnly: true };
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
let testProp = {};
|
|
67
|
-
|
|
68
|
-
testProp = {
|
|
69
|
-
'data-test-id': testId
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
function handleChange(event) {
|
|
73
|
-
// update internal value
|
|
74
|
-
setInputValue(event?.target?.value);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function handleBlur() {
|
|
78
|
-
handleEvent(actions, 'changeNblur', propName, inputValue);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<StyledPegaDxilMyTestTextWrapper>
|
|
83
|
-
<TextField
|
|
84
|
-
fullWidth
|
|
85
|
-
variant={readOnly ? 'standard' : 'outlined'}
|
|
86
|
-
helperText={helperTextToDisplay}
|
|
87
|
-
placeholder={placeholder ?? ''}
|
|
88
|
-
size='small'
|
|
89
|
-
required={required}
|
|
90
|
-
disabled={disabled}
|
|
91
|
-
onChange={handleChange}
|
|
92
|
-
onBlur={!readOnly ? handleBlur : undefined}
|
|
93
|
-
error={status === 'error'}
|
|
94
|
-
label={label}
|
|
95
|
-
value={inputValue}
|
|
96
|
-
InputProps={{ ...readOnlyProp, inputProps: { maxLength, ...testProp } }}
|
|
97
|
-
/>
|
|
98
|
-
</StyledPegaDxilMyTestTextWrapper>
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTestText/mock.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
2
|
-
export const configProps = {
|
|
3
|
-
value: '',
|
|
4
|
-
label: 'Text Sample',
|
|
5
|
-
placeholder: 'Text Placeholder',
|
|
6
|
-
helperText: 'Text Helper Text',
|
|
7
|
-
testId: 'Text-12345678',
|
|
8
|
-
hasSuggestions: false,
|
|
9
|
-
disabled: false,
|
|
10
|
-
readOnly: false,
|
|
11
|
-
required: false,
|
|
12
|
-
displayMode: '',
|
|
13
|
-
status: '',
|
|
14
|
-
hideLabel: false,
|
|
15
|
-
validatemessage: ''
|
|
16
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|