@pega/dx-component-builder-sdk 24.2.11 → 24.2.12
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/constants.js +39 -6
- package/src/tasks/create/templates/Constellation/field/Date/demo.stories.tsx.mustache +0 -16
- package/src/tasks/create/templates/Constellation/field/DateTime/demo.stories.tsx.mustache +0 -17
- package/src/tasks/create/templates/Constellation/field/Decimal/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/field/Icon-Button-URL/demo.stories.tsx.mustache +9 -20
- package/src/tasks/create/templates/Constellation/field/Picklist/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-Autocomplete/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Picklist-RadioButtons/index.tsx.mustache +3 -5
- package/src/tasks/create/templates/Constellation/field/Text/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Email/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Email/mock.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/field/Text-Input/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Phone/demo.stories.tsx.mustache +1 -2
- package/src/tasks/create/templates/Constellation/field/Text-URL/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/demo.stories.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/template/DETAILS/demo.stories.tsx.mustache +10 -0
- package/src/tasks/create/templates/Constellation/template/PAGE/demo.stories.tsx.mustache +1 -13
- package/src/tasks/create/templates/Constellation/widget/CASE/demo.stories.tsx.mustache +10 -32
- package/src/tasks/create/templates/Constellation/widget/CASE/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/widget/PAGE/demo.stories.tsx.mustache +10 -21
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/demo.stories.tsx.mustache +10 -22
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.spec.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Date/demo.stories.tsx.mustache +1 -11
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/demo.stories.tsx.mustache +1 -12
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.spec.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/demo.stories.tsx.mustache +1 -15
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.spec.ts.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/demo.stories.tsx.mustache +10 -21
- package/src/tasks/create/templates/SDK-Angular/field/Integer/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-Autocomplete/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Picklist-RadioButtons/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-Angular/template/FORM/demo.stories.tsx.mustache +9 -17
- package/src/tasks/create/templates/SDK-Angular/template/FORM/mock.ts.mustache +19 -1
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/demo.stories.tsx.mustache +7 -16
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/mock.ts.mustache +19 -1
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/demo.stories.tsx.mustache +35 -47
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/demo.stories.tsx.mustache +7 -17
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/demo.stories.tsx.mustache +7 -10
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/demo.stories.tsx.mustache +9 -17
- package/src/tasks/create/templates/SDK-React/field/Date/demo.stories.tsx.mustache +0 -21
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +5 -1
- package/src/tasks/create/templates/SDK-React/field/DateTime/demo.stories.tsx.mustache +0 -21
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +13 -5
- package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.tsx.mustache +0 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +6 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/demo.stories.tsx.mustache +0 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +6 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/demo.stories.tsx.mustache +0 -14
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +5 -1
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/demo.stories.tsx.mustache +2 -6
- package/src/tasks/create/templates/SDK-React/field/Icon-Button-URL/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/field/Integer/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +25 -20
- package/src/tasks/create/templates/SDK-React/field/Picklist-RadioButtons/index.tsx.mustache +1 -4
- package/src/tasks/create/templates/SDK-React/field/Text/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-Email/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-Input/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/Text-URL/demo.stories.tsx.mustache +3 -0
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/demo.stories.tsx.mustache +8 -28
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +7 -2
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/demo.stories.tsx.mustache +8 -28
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +7 -2
- package/src/tasks/create/templates/SDK-React/template/FORM/demo.stories.tsx.mustache +10 -16
- package/src/tasks/create/templates/SDK-React/template/FORM-region/index.tsx.mustache +5 -5
- package/src/tasks/create/templates/SDK-React/widget/CASE/demo.stories.tsx.mustache +10 -20
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/SDK-React/widget/PAGE/demo.stories.tsx.mustache +9 -19
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.tsx.mustache +10 -20
- package/tests/assets/sdk-a/components/create/custom-constellation/field/Pega_DXIL_MyTestText/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/create/custom-sdk/field/pega-dxil-my-test-text/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/create/override-sdk/field/user-reference/user-reference.component.html +2 -10
- package/tests/assets/sdk-a/components/create/override-sdk/field/user-reference/user-reference.component.ts +34 -12
- package/tests/assets/sdk-a/components/create/override-sdk/infra/view/view.component.ts +15 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/demo.stories.tsx +0 -16
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/demo.stories.tsx +0 -17
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/mock.ts +1 -0
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +9 -20
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/mock.ts +1 -0
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/demo.stories.tsx +1 -2
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyRadioButtons/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyRadioButtons/index.tsx +3 -5
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyText/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/demo.stories.tsx +0 -1
- package/tests/assets/sdk-a/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/demo.stories.tsx +10 -0
- package/tests/assets/sdk-a/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/demo.stories.tsx +1 -13
- package/tests/assets/sdk-a/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +10 -32
- package/tests/assets/sdk-a/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/index.tsx +2 -2
- package/tests/assets/sdk-a/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +10 -22
- package/tests/assets/sdk-a/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +10 -21
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-currency/demo.stories.tsx +1 -15
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date/demo.stories.tsx +1 -11
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date/pega-dxil-my-date.component.spec.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date-time/demo.stories.tsx +1 -12
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-decimal/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-decimal/pega-dxil-my-decimal.component.spec.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-email/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-icon-button-url/demo.stories.tsx +10 -21
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-integer/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-paragraph/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-percentage/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-percentage/pega-dxil-my-percentage.component.spec.ts +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-phone/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-picklist/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-radiobuttons/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-searchbox/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-text/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-text-input/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-time-of-day/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-url/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-details/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/demo.stories.tsx +9 -17
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/mock.ts +19 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-page/demo.stories.tsx +35 -47
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-details/demo.stories.tsx +1 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-form/demo.stories.tsx +7 -16
- package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-form/mock.ts +19 -1
- package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-case-widget/demo.stories.tsx +7 -17
- package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-page-case-widget/demo.stories.tsx +9 -17
- package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-page-widget/demo.stories.tsx +7 -10
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/user-reference/user-reference.component.html +2 -10
- package/tests/assets/sdk-a/components/createAll/override-sdk/field/user-reference/user-reference.component.ts +34 -12
- package/tests/assets/sdk-a/components/createAll/override-sdk/infra/view/view.component.ts +15 -1
- package/tests/assets/sdk-r/components/create/custom-sdk/field/Pega_DXIL_MyTestText/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/create/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +2 -2
- package/tests/assets/sdk-r/components/create/override-sdk/field/Phone/Phone.tsx +5 -5
- package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/FlowContainer.tsx +360 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/helpers.ts +138 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/FlowContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +68 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +345 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ModalViewContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/NavBar/NavBar.css +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Reference/Reference.tsx +52 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Reference/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Region/Region.tsx +17 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/Region/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/RootContainer/RootContainer.tsx +240 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/RootContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/SimpleView.tsx +48 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/helper.ts +125 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/SimpleView/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ViewContainer/ViewContainer.tsx +201 -0
- package/tests/assets/sdk-r/components/create/override-sdk/infra/ViewContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/DynamicTabs.tsx +80 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/config.json +36 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/index.tsx +1 -0
- package/tests/assets/sdk-r/components/create/override-sdk/template/ListView/ListView.tsx +29 -28
- package/tests/assets/sdk-r/components/create/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +13 -5
- package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/index.tsx +3 -5
- package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/index.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx +6 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDate/index.tsx +5 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDateTime/index.tsx +13 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyDecimal/index.tsx +6 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyEmail/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyIconButtonURL/index.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyInteger/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyParagraph/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPercentage/index.tsx +5 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPhone/index.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyPicklist/index.tsx +25 -20
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyRadiobuttons/index.tsx +1 -4
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyText/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTextInput/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -1
- package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyURL/demo.stories.tsx +3 -0
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyDetails/index.tsx +7 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +7 -2
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +28 -13
- package/tests/assets/sdk-r/components/createAll/custom-sdk/template/Pega_DXIL_MyTwoColumnForm/index.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/custom-sdk/widget/Pega_DXIL_MyCaseWidget/index.tsx +2 -1
- package/tests/assets/sdk-r/components/createAll/override-sdk/designSystemExtension/FieldValueList/FieldValueList.tsx +2 -2
- package/tests/assets/sdk-r/components/createAll/override-sdk/field/Phone/Phone.tsx +5 -5
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/FlowContainer.tsx +360 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/helpers.ts +138 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/FlowContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +68 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ListViewActionButtons/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/ModalViewContainer.tsx +345 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ModalViewContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/NavBar/NavBar.css +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Reference/Reference.tsx +52 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Reference/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Region/Region.tsx +17 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/Region/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/RootContainer/RootContainer.tsx +240 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/RootContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/SimpleView.tsx +48 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/helper.ts +125 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/SimpleView/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ViewContainer/ViewContainer.tsx +201 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/infra/ViewContainer/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/DynamicTabs.tsx +80 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/config.json +36 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/DynamicTabs/index.tsx +1 -0
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/ListView/ListView.tsx +29 -28
- package/tests/assets/sdk-r/components/createAll/override-sdk/template/SimpleTableManual/SimpleTableManual.tsx +13 -5
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { getActiveContainerItemID, getActiveContainerRootViewElement, getPConnectOfActiveContainerItem, useContainerInitializer } from './helper';
|
|
4
|
+
|
|
5
|
+
const SimpleViewContainer = props => {
|
|
6
|
+
const { CONTAINER_TYPE } = PCore.getConstants();
|
|
7
|
+
|
|
8
|
+
const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView, options = {} } = props;
|
|
9
|
+
|
|
10
|
+
const rootViewElement = useMemo(() => {
|
|
11
|
+
return getActiveContainerRootViewElement(containerInfo, {
|
|
12
|
+
isAssignmentView,
|
|
13
|
+
parentGetPConnect: getPConnect
|
|
14
|
+
});
|
|
15
|
+
}, [containerInfo, isAssignmentView, getPConnect]);
|
|
16
|
+
|
|
17
|
+
useContainerInitializer(getPConnect, options.mode || mode);
|
|
18
|
+
|
|
19
|
+
return rootViewElement;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const withSimpleViewContainerRenderer =
|
|
23
|
+
(Component, options: any = {}) =>
|
|
24
|
+
props => {
|
|
25
|
+
const { CONTAINER_TYPE } = PCore.getConstants();
|
|
26
|
+
|
|
27
|
+
const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView } = props;
|
|
28
|
+
|
|
29
|
+
const rootViewElement = <SimpleViewContainer {...props} options={options} />;
|
|
30
|
+
const activeContainerItemID = getActiveContainerItemID(containerInfo);
|
|
31
|
+
const getPConnectOfActiveItem = getPConnectOfActiveContainerItem(containerInfo, {
|
|
32
|
+
isAssignmentView,
|
|
33
|
+
parentGetPConnect: getPConnect
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
useContainerInitializer(getPConnect, options.mode || mode);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Component
|
|
40
|
+
{...props}
|
|
41
|
+
rootViewElement={rootViewElement}
|
|
42
|
+
activeContainerItemID={activeContainerItemID}
|
|
43
|
+
getPConnectOfActiveContainerItem={getPConnectOfActiveItem}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default SimpleViewContainer;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { useEffect, createElement } from 'react';
|
|
2
|
+
|
|
3
|
+
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
4
|
+
import { isContainerInitialized } from '@pega/react-sdk-components/lib/components/helpers';
|
|
5
|
+
|
|
6
|
+
const processRootViewDetails = (rootView, containerItem, options) => {
|
|
7
|
+
const {
|
|
8
|
+
config: { context: viewContext, name: viewName }
|
|
9
|
+
} = rootView;
|
|
10
|
+
const { context: containerContext } = containerItem;
|
|
11
|
+
const { parentGetPConnect } = options;
|
|
12
|
+
let resolvedViewName = viewName;
|
|
13
|
+
let resolvedViewContext = viewContext;
|
|
14
|
+
|
|
15
|
+
const isAnnotedViewName = PCore.getAnnotationUtils().isProperty(viewName);
|
|
16
|
+
const isAnnotedViewContext = PCore.getAnnotationUtils().isProperty(viewContext);
|
|
17
|
+
|
|
18
|
+
// resolving annoted view context
|
|
19
|
+
if (isAnnotedViewContext) {
|
|
20
|
+
const viewContextProperty = PCore.getAnnotationUtils().getPropertyName(viewContext);
|
|
21
|
+
resolvedViewContext = PCore.getStoreValue(
|
|
22
|
+
`.${viewContextProperty}`,
|
|
23
|
+
viewContextProperty.startsWith('.') ? parentGetPConnect().getPageReference() : '',
|
|
24
|
+
containerContext
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (!resolvedViewContext) {
|
|
29
|
+
resolvedViewContext = parentGetPConnect().getPageReference();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// resolving annoted view name
|
|
33
|
+
if (isAnnotedViewName) {
|
|
34
|
+
const viewNameProperty = PCore.getAnnotationUtils().getPropertyName(viewName);
|
|
35
|
+
resolvedViewName = PCore.getStoreValue(`.${viewNameProperty}`, resolvedViewContext, containerContext);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Special case where context and viewname are dynamic values
|
|
39
|
+
Use case - split for each shape
|
|
40
|
+
|
|
41
|
+
Ex - (caseInfo.content.SCRequestWorkQueues[1]):context --> .pyViewName:viewName
|
|
42
|
+
*/
|
|
43
|
+
if (isAnnotedViewName && isAnnotedViewContext && resolvedViewName !== '') {
|
|
44
|
+
/* Allow context processor to resolve view and context when both are dynamic */
|
|
45
|
+
resolvedViewName = viewName;
|
|
46
|
+
resolvedViewContext = viewContext;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
viewName: resolvedViewName,
|
|
51
|
+
viewContext: resolvedViewContext
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const getPConnectOfActiveContainerItem = (containerInfo, options) => {
|
|
56
|
+
const { accessedOrder, items } = containerInfo;
|
|
57
|
+
const { isAssignmentView = false, parentGetPConnect } = options;
|
|
58
|
+
const containerName = parentGetPConnect().getContainerName();
|
|
59
|
+
const { CONTAINER_NAMES } = PCore.getContainerUtils();
|
|
60
|
+
const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();
|
|
61
|
+
|
|
62
|
+
if (accessedOrder && items) {
|
|
63
|
+
const activeContainerItemKey = accessedOrder[accessedOrder.length - 1];
|
|
64
|
+
|
|
65
|
+
if (items[activeContainerItemKey] && items[activeContainerItemKey].view && Object.keys(items[activeContainerItemKey].view).length > 0) {
|
|
66
|
+
const activeContainerItem = items[activeContainerItemKey];
|
|
67
|
+
const target = activeContainerItemKey.substring(0, activeContainerItemKey.lastIndexOf('_'));
|
|
68
|
+
|
|
69
|
+
const { view: rootView, context } = activeContainerItem;
|
|
70
|
+
const { viewName, viewContext } = processRootViewDetails(rootView, activeContainerItem, { parentGetPConnect });
|
|
71
|
+
|
|
72
|
+
if (!viewName) return null;
|
|
73
|
+
|
|
74
|
+
const config = {
|
|
75
|
+
meta: rootView,
|
|
76
|
+
options: {
|
|
77
|
+
context,
|
|
78
|
+
pageReference: viewContext || parentGetPConnect().getPageReference(),
|
|
79
|
+
containerName,
|
|
80
|
+
containerItemID: activeContainerItemKey,
|
|
81
|
+
parentPageReference: parentGetPConnect().getPageReference(),
|
|
82
|
+
hasForm:
|
|
83
|
+
isAssignmentView ||
|
|
84
|
+
containerName === CONTAINER_NAMES.WORKAREA ||
|
|
85
|
+
containerName === CONTAINER_NAMES.MODAL ||
|
|
86
|
+
viewName === CREATE_DETAILS_VIEW_NAME,
|
|
87
|
+
target
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return PCore.createPConnect(config).getPConnect;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const getActiveContainerRootViewElement = (containerInfo, options) => {
|
|
98
|
+
const getPConnect = getPConnectOfActiveContainerItem(containerInfo, options);
|
|
99
|
+
if (getPConnect) {
|
|
100
|
+
return createElement(createPConnectComponent(), { getPConnect });
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const getActiveContainerItemID = containerInfo => {
|
|
106
|
+
const { accessedOrder } = containerInfo;
|
|
107
|
+
if (accessedOrder && accessedOrder.length > 0) {
|
|
108
|
+
return accessedOrder[accessedOrder.length - 1];
|
|
109
|
+
}
|
|
110
|
+
return '';
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export const useContainerInitializer = (getPConnect, mode) => {
|
|
114
|
+
const pConnect = getPConnect();
|
|
115
|
+
const containerName = pConnect.getContainerName();
|
|
116
|
+
const containerManager = pConnect.getContainerManager();
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
if (!isContainerInitialized(pConnect)) {
|
|
119
|
+
containerManager.initializeContainers({
|
|
120
|
+
type: mode,
|
|
121
|
+
name: containerName
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SimpleView';
|
package/tests/assets/sdk-r/components/create/override-sdk/infra/ViewContainer/ViewContainer.tsx
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import React, { createElement, useContext, useEffect, useState } from 'react';
|
|
2
|
+
import { Box, CircularProgress } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
import createPConnectComponent from '@pega/react-sdk-components/lib/bridge/react_pconnect';
|
|
5
|
+
import StoreContext from '@pega/react-sdk-components/lib/bridge/Context/StoreContext';
|
|
6
|
+
import { isEmptyObject } from '@pega/react-sdk-components/lib/components/helpers/common-utils';
|
|
7
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
|
|
9
|
+
interface ViewContainerProps extends PConnProps {
|
|
10
|
+
// If any, enter additional props that only exist on this component
|
|
11
|
+
name?: string;
|
|
12
|
+
loadingInfo?: any; // can't be boolean until setDispatchObjState expects loadingInfo to be type null
|
|
13
|
+
routingInfo?: any;
|
|
14
|
+
mode?: string;
|
|
15
|
+
limit?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// ViewContainer can emit View
|
|
19
|
+
// import View from '../View';
|
|
20
|
+
|
|
21
|
+
//
|
|
22
|
+
// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
|
|
23
|
+
// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and
|
|
24
|
+
// is totally at your own risk.
|
|
25
|
+
//
|
|
26
|
+
|
|
27
|
+
export default function ViewContainer(props: ViewContainerProps) {
|
|
28
|
+
// const { getPConnect, children, routingInfo, name } = props;
|
|
29
|
+
const { getPConnect, name = '', mode = 'single', limit = 16, loadingInfo = false, routingInfo = null } = props;
|
|
30
|
+
|
|
31
|
+
const { displayOnlyFA } = useContext<any>(StoreContext);
|
|
32
|
+
|
|
33
|
+
const { CONTAINER_TYPE, APP } = PCore.getConstants();
|
|
34
|
+
const pConn = getPConnect();
|
|
35
|
+
const containerMgr: any = pConn.getContainerManager();
|
|
36
|
+
|
|
37
|
+
const [dispatchObjState, setDispatchObjState] = useState({
|
|
38
|
+
dispatchObject: { semanticURL: '', context: '', acName: '' },
|
|
39
|
+
visible: false,
|
|
40
|
+
loadingInfo: null,
|
|
41
|
+
isLoadingInfoChange: false
|
|
42
|
+
}); // was this.state in class-based ViewContainer avoiding use of just "state" as the name
|
|
43
|
+
|
|
44
|
+
let root;
|
|
45
|
+
|
|
46
|
+
const thePConn = typeof getPConnect === 'function' ? getPConnect() : null;
|
|
47
|
+
|
|
48
|
+
// beginning of functions for use by ViewContainer
|
|
49
|
+
|
|
50
|
+
function buildName() {
|
|
51
|
+
const context = thePConn?.getContextName();
|
|
52
|
+
let viewContainerName = name;
|
|
53
|
+
if (!viewContainerName) viewContainerName = '';
|
|
54
|
+
return `${context?.toUpperCase()}/${viewContainerName.toUpperCase()}`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function prepareDispatchObject() {
|
|
58
|
+
const baseContext = pConn.getContextName();
|
|
59
|
+
// const { acName = "primary" } = pConn.getContainerName(); // doesn't work with 8.23 typings
|
|
60
|
+
let acName = pConn.getContainerName();
|
|
61
|
+
if (!acName) {
|
|
62
|
+
acName = 'primary';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
semanticURL: '',
|
|
67
|
+
context: baseContext,
|
|
68
|
+
acName
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// determine if or not loadingInfo prop changed on next re-render
|
|
73
|
+
// function getDerivedStateFromProps(nextProps, prevState) {
|
|
74
|
+
// const { loadingInfo: prevLoadingInfo } = prevState;
|
|
75
|
+
// const { loadingInfo: nextLoadingIndfo } = nextProps;
|
|
76
|
+
// return {
|
|
77
|
+
// loadingInfo: nextLoadingIndfo,
|
|
78
|
+
// isLoadingInfoChange: prevLoadingInfo !== nextLoadingIndfo
|
|
79
|
+
// };
|
|
80
|
+
// }
|
|
81
|
+
|
|
82
|
+
// set the root component that is retrieved by PConnectHOC
|
|
83
|
+
function setRootComponent(configObject) {
|
|
84
|
+
const { isLoadingInfoChange } = dispatchObjState;
|
|
85
|
+
if (!isLoadingInfoChange) {
|
|
86
|
+
root = createElement(createPConnectComponent(), configObject);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// end of functions for use by ViewContainer
|
|
91
|
+
|
|
92
|
+
// useEffect on [] -> code that should be run once (as in old constructor and in componentDidMount)
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
// This is adapted from the class-based ViewContainer constructor
|
|
95
|
+
containerMgr.initializeContainers({
|
|
96
|
+
type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
if (mode === CONTAINER_TYPE.MULTIPLE && limit) {
|
|
100
|
+
/* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */
|
|
101
|
+
PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const dispatchObject = prepareDispatchObject();
|
|
105
|
+
setDispatchObjState({
|
|
106
|
+
dispatchObject,
|
|
107
|
+
// PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore
|
|
108
|
+
visible: !PCore.checkIfSemanticURL(),
|
|
109
|
+
loadingInfo,
|
|
110
|
+
isLoadingInfoChange: false
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const { visible } = dispatchObjState;
|
|
114
|
+
if (visible) containerMgr.addContainerItem(dispatchObject);
|
|
115
|
+
|
|
116
|
+
// This is adapted from the class-based ViewContainer componentDidMount
|
|
117
|
+
let objectForAddContainer;
|
|
118
|
+
if (PCore.checkIfSemanticURL()) {
|
|
119
|
+
objectForAddContainer = prepareDispatchObject();
|
|
120
|
+
} else {
|
|
121
|
+
const { dispatchObject: theDispatchObject } = dispatchObjState;
|
|
122
|
+
objectForAddContainer = theDispatchObject;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Getting default view label
|
|
126
|
+
const navPages = pConn.getValue('pyPortal.pyPrimaryNavPages', ''); // 2nd arg empty string until typedefs allow optional
|
|
127
|
+
const defaultViewLabel = Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel : '';
|
|
128
|
+
// TODO: Plan is to rename window.constellationCore to window.pega (or similar)
|
|
129
|
+
// And expose less via ui-bootstrap.js
|
|
130
|
+
// PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore
|
|
131
|
+
|
|
132
|
+
if (!displayOnlyFA) {
|
|
133
|
+
// configureForBrowserBookmark not applicable in Embedded mode
|
|
134
|
+
PCore.configureForBrowserBookmark({
|
|
135
|
+
...objectForAddContainer,
|
|
136
|
+
defaultViewLabel
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}, []);
|
|
140
|
+
|
|
141
|
+
// This code (that's run every time the ViewContainer is called) is adapted from the class-based ViewContainer's render
|
|
142
|
+
|
|
143
|
+
// Looking for routingInfo
|
|
144
|
+
|
|
145
|
+
// debugging/investigation help
|
|
146
|
+
// console.log(`ViewContainer props: ${JSON.stringify(props)}`);
|
|
147
|
+
|
|
148
|
+
const theBuildName = buildName();
|
|
149
|
+
const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();
|
|
150
|
+
if (routingInfo) {
|
|
151
|
+
const { accessedOrder, items } = routingInfo;
|
|
152
|
+
if (accessedOrder && items) {
|
|
153
|
+
const key = accessedOrder[accessedOrder.length - 1];
|
|
154
|
+
let componentVisible = accessedOrder.length > 0;
|
|
155
|
+
const { visible } = dispatchObjState;
|
|
156
|
+
componentVisible = visible || componentVisible;
|
|
157
|
+
if (items[key] && items[key].view && !isEmptyObject(items[key].view)) {
|
|
158
|
+
const latestItem = items[key];
|
|
159
|
+
const rootView = latestItem.view;
|
|
160
|
+
const { context, name: viewName } = rootView.config;
|
|
161
|
+
const config: any = { meta: rootView };
|
|
162
|
+
config.options = {
|
|
163
|
+
context: latestItem.context,
|
|
164
|
+
pageReference: context || getPConnect().getPageReference(),
|
|
165
|
+
containerName: getPConnect().getContainerName(),
|
|
166
|
+
containerItemName: key,
|
|
167
|
+
hasForm: viewName === CREATE_DETAILS_VIEW_NAME
|
|
168
|
+
};
|
|
169
|
+
const configObject: any = PCore.createPConnect(config);
|
|
170
|
+
|
|
171
|
+
// Add in displayOnlyFA if prop is on ViewContainer
|
|
172
|
+
if (displayOnlyFA) {
|
|
173
|
+
configObject.displayOnlyFA = true;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
setRootComponent(configObject);
|
|
177
|
+
return (
|
|
178
|
+
<React.Fragment key={theBuildName}>
|
|
179
|
+
{componentVisible && root}
|
|
180
|
+
{loadingInfo && (
|
|
181
|
+
<Box textAlign='center'>
|
|
182
|
+
<CircularProgress />
|
|
183
|
+
</Box>
|
|
184
|
+
)}
|
|
185
|
+
</React.Fragment>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// fall through return if insufficient routingInfo
|
|
192
|
+
return (
|
|
193
|
+
<React.Fragment key={theBuildName}>
|
|
194
|
+
{loadingInfo && (
|
|
195
|
+
<Box textAlign='center'>
|
|
196
|
+
<CircularProgress />
|
|
197
|
+
</Box>
|
|
198
|
+
)}
|
|
199
|
+
</React.Fragment>
|
|
200
|
+
);
|
|
201
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ViewContainer';
|
package/tests/assets/sdk-r/components/create/override-sdk/template/DynamicTabs/DynamicTabs.tsx
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { Children, useMemo, useState } from 'react';
|
|
2
|
+
import { Tab, Tabs } from '@mui/material';
|
|
3
|
+
import { TabContext, TabPanel } from '@mui/lab';
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
5
|
+
|
|
6
|
+
import { buildView } from '@pega/react-sdk-components/lib/components/helpers/field-group-utils';
|
|
7
|
+
import { PConnProps } from '@pega/react-sdk-components/lib/types/PConnProps';
|
|
8
|
+
|
|
9
|
+
const useStyles = makeStyles(() => ({
|
|
10
|
+
tab: {
|
|
11
|
+
minWidth: '72px'
|
|
12
|
+
}
|
|
13
|
+
}));
|
|
14
|
+
|
|
15
|
+
interface DynamicTabsProps extends PConnProps {
|
|
16
|
+
// If any, enter additional props that only exist on this component
|
|
17
|
+
showLabel: boolean;
|
|
18
|
+
label: string;
|
|
19
|
+
referenceList?: any[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function DynamicTabs(props: DynamicTabsProps) {
|
|
23
|
+
const classes = useStyles();
|
|
24
|
+
const { referenceList, showLabel, label, getPConnect } = props;
|
|
25
|
+
const pConnect = getPConnect();
|
|
26
|
+
// Get the inherited props from the parent to determine label settings
|
|
27
|
+
const propsToUse = { label, showLabel, ...pConnect.getInheritedProps() };
|
|
28
|
+
const defaultTabIndex = 0;
|
|
29
|
+
// @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv'.
|
|
30
|
+
const { tablabel } = pConnect.getComponentConfig();
|
|
31
|
+
const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);
|
|
32
|
+
const referenceListData: any = pConnect.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
33
|
+
const memoisedTabViews = useMemo(() => {
|
|
34
|
+
pConnect.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
35
|
+
pConnect.setInheritedProp('readOnly', true);
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
referenceListData &&
|
|
39
|
+
Children.toArray(
|
|
40
|
+
referenceListData.map((item, index) => {
|
|
41
|
+
return <React.Fragment key={item[tablabelProp]}>{buildView(pConnect, index, '')}</React.Fragment>;
|
|
42
|
+
})
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
}, [referenceListData]);
|
|
46
|
+
const [panelShown, changePanel] = useState(defaultTabIndex);
|
|
47
|
+
const handleTabClick = (e, id) => {
|
|
48
|
+
changePanel(parseInt(id, 10));
|
|
49
|
+
};
|
|
50
|
+
// Loop over the tab contents and and pull out the labels for the navigation
|
|
51
|
+
const tabItems =
|
|
52
|
+
referenceListData?.map((item, i) => {
|
|
53
|
+
const currentTabLabel = item[tablabelProp] || PCore.getLocaleUtils().getLocaleValue('No label specified in config', 'Generic');
|
|
54
|
+
return {
|
|
55
|
+
name: currentTabLabel,
|
|
56
|
+
id: i
|
|
57
|
+
};
|
|
58
|
+
}) || [];
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<>
|
|
62
|
+
{propsToUse.label && <h3 id='dynamic-tabs-title'>{propsToUse.label}</h3>}
|
|
63
|
+
<TabContext value={panelShown.toString()}>
|
|
64
|
+
<Tabs onChange={handleTabClick} value={panelShown} variant='scrollable' scrollButtons='auto' indicatorColor='primary' id='dynamic-tabs'>
|
|
65
|
+
{tabItems.map((tab: any) => (
|
|
66
|
+
<Tab key={tab.id} label={tab.name} value={tab.id} className={classes.tab} />
|
|
67
|
+
))}
|
|
68
|
+
</Tabs>
|
|
69
|
+
|
|
70
|
+
{tabItems.map((tab: any) => (
|
|
71
|
+
<TabPanel key={tab.id} value={tab.id.toString()} tabIndex={+tab.id} id='dynamic-tabpanel'>
|
|
72
|
+
<div>{memoisedTabViews[parseInt(tab.id, 10)] || 'No content exists'}</div>
|
|
73
|
+
</TabPanel>
|
|
74
|
+
))}
|
|
75
|
+
</TabContext>
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export default DynamicTabs;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "DynamicTabs",
|
|
3
|
+
"label": "Dynamic tabs (list)",
|
|
4
|
+
"description": "Dynamic tabs (list)",
|
|
5
|
+
"type": "Template",
|
|
6
|
+
"subtype": "DETAILS",
|
|
7
|
+
"icon": "DynamicTabs.svg",
|
|
8
|
+
"hideTemplateEdit": true,
|
|
9
|
+
"hideFromTemplatePicker": true,
|
|
10
|
+
"viewHeadingLabel": "Default heading",
|
|
11
|
+
"properties": [
|
|
12
|
+
{
|
|
13
|
+
"name": "referenceList",
|
|
14
|
+
"label": "Data page",
|
|
15
|
+
"format": "CONTENTPICKERSOURCE"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "parameters",
|
|
19
|
+
"label": "Parameters",
|
|
20
|
+
"format": "PARAMETERS",
|
|
21
|
+
"showOverride": false
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "tablabel",
|
|
25
|
+
"label": "Tab label",
|
|
26
|
+
"format": "PROPERTY",
|
|
27
|
+
"ofContextClass": true
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"format": "VIEWPICKER",
|
|
31
|
+
"name": "Views",
|
|
32
|
+
"label": "Tab content",
|
|
33
|
+
"ofContextClass": true
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DynamicTabs';
|
|
@@ -1034,34 +1034,35 @@ export default function ListView(props: ListViewProps) {
|
|
|
1034
1034
|
</TableRow>
|
|
1035
1035
|
</TableHead>
|
|
1036
1036
|
<TableBody>
|
|
1037
|
-
{
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
{
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
{
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1037
|
+
{arRows &&
|
|
1038
|
+
stableSort(arRows, getComparator(order, orderBy))
|
|
1039
|
+
.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
|
1040
|
+
.map(row => {
|
|
1041
|
+
return (
|
|
1042
|
+
<TableRow key={row.pxRefObjectInsName || row.pyID}>
|
|
1043
|
+
{arColumns.map(column => {
|
|
1044
|
+
const value = row[column.id];
|
|
1045
|
+
return (
|
|
1046
|
+
<TableCell key={column.id} align={column.align} className={classes.cell}>
|
|
1047
|
+
{_showButton(column.id, row) || column.displayAsLink ? (
|
|
1048
|
+
<Link
|
|
1049
|
+
component='button'
|
|
1050
|
+
onClick={() => {
|
|
1051
|
+
_listViewClick(row, column);
|
|
1052
|
+
}}
|
|
1053
|
+
underline='hover'
|
|
1054
|
+
>
|
|
1055
|
+
{column.format && typeof value === 'number' ? column.format(value) : value}
|
|
1056
|
+
</Link>
|
|
1057
|
+
) : (
|
|
1058
|
+
<>{column.format && typeof value === 'number' ? column.format(value) : value || '---'}</>
|
|
1059
|
+
)}
|
|
1060
|
+
</TableCell>
|
|
1061
|
+
);
|
|
1062
|
+
})}
|
|
1063
|
+
</TableRow>
|
|
1064
|
+
);
|
|
1065
|
+
})}
|
|
1065
1066
|
</TableBody>
|
|
1066
1067
|
</Table>
|
|
1067
1068
|
</TableContainer>
|
|
@@ -258,11 +258,16 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
258
258
|
function generateRowsData() {
|
|
259
259
|
// if referenceList is empty and dataPageName property value exists then make a datapage fetch call and get the list of data.
|
|
260
260
|
if (!referenceList.length && dataPageName) {
|
|
261
|
-
getDataPage(dataPageName, parameters, context)
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
261
|
+
getDataPage(dataPageName, parameters, context)
|
|
262
|
+
.then(listData => {
|
|
263
|
+
const data = formatRowsData(listData);
|
|
264
|
+
myRows = data;
|
|
265
|
+
setRowData(data);
|
|
266
|
+
})
|
|
267
|
+
.catch(e => {
|
|
268
|
+
// eslint-disable-next-line no-console
|
|
269
|
+
console.log(e);
|
|
270
|
+
});
|
|
266
271
|
} else {
|
|
267
272
|
// The referenceList prop has the JSON data for each row to be displayed
|
|
268
273
|
// in the table. So, iterate over referenceList to create the dataRows that
|
|
@@ -378,6 +383,9 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
378
383
|
};
|
|
379
384
|
|
|
380
385
|
function descendingComparator<T>(a: T, b: T, orderedBy: keyof T) {
|
|
386
|
+
if (!orderedBy || (!a[orderedBy] && !b[orderedBy])) {
|
|
387
|
+
return 0;
|
|
388
|
+
}
|
|
381
389
|
if (!b[orderedBy] || b[orderedBy] < a[orderedBy]) {
|
|
382
390
|
return -1;
|
|
383
391
|
}
|
|
@@ -77,9 +77,7 @@ function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProps) {
|
|
|
77
77
|
const propName: string = stateProps.value;
|
|
78
78
|
const configProps = pConn.getConfigProps();
|
|
79
79
|
const className = pConn.getCaseInfo().getClassName();
|
|
80
|
-
|
|
81
|
-
const { getLocaleRuleNameFromKeys, getLocalizedValue } = pConn;
|
|
82
|
-
|
|
80
|
+
|
|
83
81
|
// @ts-ignore
|
|
84
82
|
let configProperty = pConn.getRawMetadata()?.config?.value || '';
|
|
85
83
|
configProperty = configProperty.startsWith('@P') ? configProperty.substring(3) : configProperty;
|
|
@@ -141,10 +139,10 @@ function PegaDxilMyRadiobuttons(props: PegaDxilMyRadiobuttonsProps) {
|
|
|
141
139
|
id={`${fullReference}.${item.key}`}
|
|
142
140
|
value={item.key}
|
|
143
141
|
key={`${fullReference}.${item.key}`}
|
|
144
|
-
label={getLocalizedValue(
|
|
142
|
+
label={pConn.getLocalizedValue(
|
|
145
143
|
isDatapage ? item.text : item.value,
|
|
146
144
|
localePath,
|
|
147
|
-
getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
145
|
+
pConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
148
146
|
)}
|
|
149
147
|
name={fullReference}
|
|
150
148
|
/>
|
|
@@ -48,8 +48,8 @@ function PegaDxilMyCaseWidget(props: PegaDxilMyCaseWidgetProps) {
|
|
|
48
48
|
description: <Text style={{ wordBreak: 'break-word' }}>{entry.pyMessageKey}</Text>,
|
|
49
49
|
user: entry.pyPerformer,
|
|
50
50
|
id: index
|
|
51
|
-
};
|
|
52
|
-
})
|
|
51
|
+
} as any;
|
|
52
|
+
}) as any
|
|
53
53
|
);
|
|
54
54
|
} else {
|
|
55
55
|
setHistory([]);
|
package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
2
|
import { NumericFormat } from 'react-number-format';
|
|
3
3
|
import { TextField } from '@mui/material';
|
|
4
4
|
import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
|
|
@@ -55,6 +55,10 @@ export default function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
|
|
|
55
55
|
'data-test-id': testId
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
setValues(value.toString());
|
|
60
|
+
}, [value]);
|
|
61
|
+
|
|
58
62
|
// currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }
|
|
59
63
|
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
60
64
|
const theCurrSym = theSymbols.theCurrencySymbol;
|
|
@@ -93,6 +97,7 @@ export default function PegaDxilMyCurrency(props: PegaDxilMyCurrencyProps) {
|
|
|
93
97
|
<StyledPegaDxilMyCurrencyWrapper>
|
|
94
98
|
<NumericFormat
|
|
95
99
|
valueIsNumericString
|
|
100
|
+
variant={readOnly ? 'standard' : 'outlined'}
|
|
96
101
|
label={label}
|
|
97
102
|
helperText={helperTextToDisplay}
|
|
98
103
|
placeholder={placeholder ?? ''}
|