@pega/react-sdk-components 23.1.10 → 23.1.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/LICENSE +201 -0
- package/README.md +17 -0
- package/SECURITY.md +10 -0
- package/lib/bridge/Context/StoreContext.js +3 -3
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +24 -47
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +17 -28
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -2
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -10
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +30 -27
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +9 -15
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/index.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +5 -4
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +23 -12
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -16
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +1 -0
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +7 -11
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +15 -15
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +49 -62
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +2 -3
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +7 -10
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +7 -9
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +5 -11
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +2 -2
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +21 -23
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +8 -3
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +76 -68
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/CancelAlert/index.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +16 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +59 -45
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +13 -34
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +4 -5
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +14 -10
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +8 -8
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +2 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +18 -28
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Decimal/index.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +13 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +105 -29
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +8 -9
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Email/index.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +13 -0
- package/lib/components/field/Group/Group.d.ts.map +1 -0
- package/lib/components/field/Group/Group.js +15 -0
- package/lib/components/field/Group/Group.js.map +1 -0
- package/lib/components/field/Group/index.d.ts +2 -0
- package/lib/components/field/Group/index.d.ts.map +1 -0
- package/lib/components/field/Group/index.js +2 -0
- package/lib/components/field/Group/index.js.map +1 -0
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +6 -6
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/MultiSelect/Multiselect.d.ts +3 -0
- package/lib/components/field/MultiSelect/Multiselect.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/Multiselect.js +175 -0
- package/lib/components/field/MultiSelect/Multiselect.js.map +1 -0
- package/lib/components/field/MultiSelect/index.d.ts +2 -0
- package/lib/components/field/MultiSelect/index.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/index.js +2 -0
- package/lib/components/field/MultiSelect/index.js.map +1 -0
- package/lib/components/field/MultiSelect/utils.d.ts +10 -0
- package/lib/components/field/MultiSelect/utils.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/utils.js +197 -0
- package/lib/components/field/MultiSelect/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +2 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +25 -28
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +9 -10
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/Phone/index.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +18 -21
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.d.ts +1 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +9 -8
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +7 -9
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +4 -8
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +8 -8
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +5 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +2 -2
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +7 -6
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/TextInput/index.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +7 -7
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +6 -6
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/URL/index.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +3 -3
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +11 -11
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js +2 -2
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js +6 -6
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- package/lib/components/helpers/case-utils.d.ts.map +1 -1
- package/lib/components/helpers/case-utils.js +5 -5
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -0
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +4 -1
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +2 -3
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.js +3 -3
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.js +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js +9 -20
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +2 -2
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +13 -14
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +500 -500
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.d.ts +4 -4
- package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Date.js +20 -20
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/formatters/common.js +1 -1
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +6 -6
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js +25 -19
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts +5 -0
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -0
- package/lib/components/helpers/instructions-utils.js +36 -0
- package/lib/components/helpers/instructions-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/reactContextHelpers.js +1 -1
- package/lib/components/helpers/reactContextHelpers.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +44 -52
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js +6 -8
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.d.ts +1 -1
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +1 -2
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -1
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +3 -8
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +1 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +2 -2
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +10 -14
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/ActionButtons/index.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +10 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +68 -71
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Assignment/index.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +3 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +4 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/AssignmentCard/index.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +11 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +36 -158
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js +30 -30
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +9 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +36 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +178 -160
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +9 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js +29 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +10 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.js +102 -0
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts +2 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.js +2 -0
- package/lib/components/infra/Containers/SimpleView/index.js.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +17 -24
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/helpers.d.ts +2 -0
- package/lib/components/infra/Containers/helpers.d.ts.map +1 -0
- package/lib/components/infra/Containers/helpers.js +7 -0
- package/lib/components/infra/Containers/helpers.js.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +3 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +13 -17
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +10 -12
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +9 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +8 -17
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/DeferLoad/index.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +15 -14
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +11 -15
- package/lib/components/infra/MultiStep/MultiStep.d.ts +5 -7
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +29 -80
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/MultiStep/index.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +103 -105
- package/lib/components/infra/NavBar/NavBar.d.ts +3 -3
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +18 -52
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +9 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +6 -13
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +2 -3
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +2 -3
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +14 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +40 -62
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/RootContainer/index.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +2 -2
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +18 -21
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +6 -8
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +10 -9
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +3 -4
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +6 -11
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.css +22 -23
- package/lib/components/template/AppShell/AppShell.d.ts +6 -7
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +23 -29
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +4 -4
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +3 -3
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +3 -4
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +44 -8
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +3 -4
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +18 -41
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +3 -3
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -7
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +3 -4
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +7 -14
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +4 -4
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +35 -49
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +8 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +5 -14
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +8 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +5 -13
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +3 -4
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +5 -10
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +5 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +5 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/index.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +7 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +6 -17
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +2 -2
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +8 -9
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +3 -4
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -9
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +3 -4
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +7 -6
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +2 -2
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +16 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +106 -181
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +4 -6
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +38 -46
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +3 -3
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js +2 -10
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +8 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +5 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js +2 -5
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +3 -5
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -8
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +10 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +12 -29
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +19 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +17 -20
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +12 -7
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +124 -134
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +9 -21
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -5
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +4 -4
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +6 -9
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +2 -4
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +2 -10
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +8 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +5 -16
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js +2 -5
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +3 -3
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/index.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +3 -2
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +20 -37
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +2 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +10 -19
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +60 -1
- package/lib/components/widget/Attachment/Attachment.d.ts +8 -1
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +279 -353
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/index.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +37 -31
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/CaseHistory/index.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +4 -3
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +2 -4
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +107 -136
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +4 -4
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +8 -16
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +8 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +57 -35
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +3 -2
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +8 -23
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryItem/index.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +3 -2
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +3 -3
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +4 -4
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +31 -67
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/components_map.d.ts +2 -2
- package/lib/components_map.d.ts.map +1 -1
- package/lib/components_map.js +4 -2
- package/lib/components_map.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +21 -4
- package/lib/hooks/useConsolidatedRef.js +2 -2
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/sdk-local-component-map.js +2 -2
- package/lib/sdk-pega-component-map.d.ts +6 -0
- package/lib/sdk-pega-component-map.js +106 -100
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +14 -15
- package/package.json +5 -2
- package/lib/components/helpers/auth.d.ts +0 -18
- package/lib/components/helpers/auth.d.ts.map +0 -1
- package/lib/components/helpers/auth.js +0 -752
- package/lib/components/helpers/auth.js.map +0 -1
- package/lib/components/helpers/authManager.d.ts +0 -21
- package/lib/components/helpers/authManager.d.ts.map +0 -1
- package/lib/components/helpers/authManager.js +0 -864
- package/lib/components/helpers/authManager.js.map +0 -1
- package/lib/components/helpers/config_access.d.ts +0 -3
- package/lib/components/helpers/config_access.d.ts.map +0 -1
- package/lib/components/helpers/config_access.js +0 -198
- package/lib/components/helpers/config_access.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalViewContainer.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ModalViewContainer/ModalViewContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,OAAO,MAAM,iBAAiB,CAAC;AACtC,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAC5D,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,uFAAuF;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAkB9D,SAAS,SAAS,CAAC,QAAQ,EAAE,IAAI,GAAG,EAAE;IACpC,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAC1C,OAAO,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,mBAAmB,CAAC,WAAW,EAAE,KAAK;IAC7C,MAAM,aAAa,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAC;IAC/C,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE;QAChF,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC;QAC7C,MAAM,GAAG,GAAG,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACpD,MAAM,UAAU,GAAG,KAAK,CAAC,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AC,EAAE;oBAC7B,YAAY,CAAC,EAAE,CAAC,CAAC;iBAClB;aACF;SACF;IACH,CAAC,CAAC,CAAC;IAEH,qCAAqC;IACrC,8DAA8D;IAC9D,+DAA+D;IAC/D,uFAAuF;IACvF,0EAA0E;IAE1E,oHAAoH;IACpH,IAAI;IAEJ,oBAAoB;IACpB,gEAAgE;IAChE,+GAA+G;IAC/G,4CAA4C;IAC5C,sFAAsF;IACtF,IAAI;IAEJ,OAAO,CACL;QACE,oBAAC,MAAM,IAAC,IAAI,EAAE,UAAU,qBAAkB,mBAAmB;YAC3D,oBAAC,WAAW,IAAC,EAAE,EAAC,mBAAmB,EAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,IAC5D,KAAK,CACM;YACd,oBAAC,aAAa,IAAC,SAAS,EAAE,OAAO,CAAC,UAAU,IACzC,UAAU,CAAC,CAAC,CAAC,CACZ,oBAAC,UAAU,IACT,WAAW,EAAE,WAAW,CAAC,WAAW,EACpC,OAAO,EAAE,OAAO,EAChB,SAAS,QACT,OAAO,EAAE,UAAU,CAAC;oBAClB,MAAM,EAAE,OAAO;oBACf,YAAY;iBACb,CAAC,IAED,oBAAoB,CACV,CACd,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACa,CACT;QACR,gBAAgB,IAAI,CACnB,oBAAC,WAAW,IACV,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,gBAAgB,EAC3B,gBAAgB,EAAE,gBAAgB,GAClC,CACH,CACA,CACJ,CAAC;AACJ,CAAC;AAAA,CAAC","sourcesContent":["import React, { useEffect, useRef, useState, createElement } from 'react';\nimport isEqual from 'fast-deep-equal';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { makeStyles } from '@material-ui/core/styles';\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\n// Need to get correct implementation from component map for Assignment and CancelAlert\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\nimport { getBanners } from '../../../helpers/case-utils';\nimport { isEmptyObject } from '../../../helpers/common-utils';\n\n// import type { PConnProps } from '../../../../types/PConnProps';\n\n// Can't use ModalViewContainerProps until getContainerManager() knows about initializeContainers\n// Currently just expects \"object\"\n// interface ModalViewContainerProps extends PConnProps {\n// // If any, enter additional props that only exist on this component\n// loadingInfo?: string,\n// routingInfo?: any,\n// pageMessages?: Array<string>\n// }\n\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 8 errors)\ndeclare const PCore: any;\n\n\nfunction buildName(pConnect, name = '') {\n const context = pConnect.getContextName();\n return `${context}/${name}`;\n}\n\nfunction getKeyAndLatestItem(routinginfo, pConn) {\n const containerName = pConn.getContainerName();\n if (PCore.getContainerUtils().hasContainerItems(buildName(pConn, containerName))) {\n const { accessedOrder, items } = routinginfo;\n const key = accessedOrder[accessedOrder.length - 1];\n const latestItem = items[key];\n return { key, latestItem };\n }\n return {};\n}\n\nfunction getConfigObject(item, pConnect) {\n if (item) {\n const { context, view } = item;\n const config = {\n meta: view,\n options: {\n context,\n pageReference: view.config.context || pConnect.getPageReference(),\n hasForm: true\n }\n };\n return PCore.createPConnect(config);\n }\n return null;\n}\n\nconst useStyles = makeStyles(theme => ({\n dlgTitle: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(0)\n // paddingLeft: theme.spacing(0),\n // paddingRight: theme.spacing(0),\n // paddingTop: theme.spacing(0),\n // paddingBottom: theme.spacing(0),\n },\n dlgContent: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(0),\n marginBottom: theme.spacing(2)\n // paddingLeft: theme.spacing(0),\n // paddingRight: theme.spacing(0),\n // paddingTop: theme.spacing(0),\n // paddingBottom: theme.spacing(0),\n }\n}));\n\nexport default function ModalViewContainer(props /* : ModalViewContainerProps */) {\n // Get the proper implementation (local or Pega-provided) for these components that are emitted below\n const Assignment = getComponentFromMap(\"Assignment\");\n const CancelAlert = getComponentFromMap(\"CancelAlert\");\n\n const classes = useStyles();\n\n const routingInfoRef = useRef({});\n const { getPConnect, routingInfo = null, loadingInfo = '', pageMessages = [] } = props;\n const pConn = getPConnect();\n const {\n CONTAINER_TYPE: { MULTIPLE },\n PUB_SUB_EVENTS: { EVENT_SHOW_CANCEL_ALERT }\n } = PCore.getConstants();\n const { subscribe } = PCore.getPubSubUtils();\n const [bShowModal, setShowModal] = useState(false);\n const [bSubscribed, setSubscribed] = useState(false);\n const [bShowCancelAlert, setShowCancelAlert] = useState(false);\n const [oCaseInfo, setOCaseInfo] = useState({});\n const [createdView, setCreatedView] = useState<any>(null);\n const [title, setTitle] = useState('');\n const [arNewChildrenAsReact, setArNewChildrenAsReact] = useState<Array<any>>([]);\n const [itemKey, setItemKey] = useState('');\n const [cancelPConn, setCancelPConn] = useState(null);\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Data Object';\n\n\n function showAlert(payload) {\n const { latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn);\n const { isModalAction } = payload;\n\n /*\n If we are in create stage full page mode, created a new case and trying to click on cancel button\n it will show two alert dialogs which is not expected. Hence isModalAction flag to avoid that.\n */\n if (latestItem && isModalAction) {\n const configObject = getConfigObject(latestItem, pConn);\n setCancelPConn(configObject.getPConnect());\n setShowCancelAlert(true);\n }\n }\n\n function compareCaseInfoIsDifferent(oCurrentCaseInfo: Object): boolean {\n let bRet = false;\n\n // fast-deep-equal version\n if (isEqual !== undefined) {\n bRet = !isEqual(oCaseInfo, oCurrentCaseInfo);\n } else {\n const sCurrentCaseInfo = JSON.stringify(oCurrentCaseInfo);\n const sOldCaseInfo = JSON.stringify(oCaseInfo);\n // stringify compare version\n if (sCurrentCaseInfo !== sOldCaseInfo) {\n bRet = true;\n }\n }\n\n // if different, save off new case info\n if (bRet) {\n setOCaseInfo(JSON.parse(JSON.stringify(oCurrentCaseInfo)));\n }\n\n return bRet;\n }\n\n const updateAlertState = modalFlag => {\n setShowCancelAlert(false);\n setShowModal(modalFlag);\n };\n\n useEffect(() => {\n // Establish the necessary containers\n const containerMgr = pConn.getContainerManager();\n containerMgr.initializeContainers({ type: MULTIPLE });\n }, [MULTIPLE, pConn]);\n\n useEffect(() => {\n // Update routingInfoRef.current whenever routingInfo changes\n routingInfoRef.current = routingInfo;\n }, [routingInfo]);\n\n useEffect(() => {\n if (routingInfoRef.current && !loadingInfo) {\n const currentOrder = routingInfo.accessedOrder;\n\n if (undefined === currentOrder) {\n return;\n }\n\n const currentItems = routingInfo.items;\n\n const { key, latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn);\n\n // console.log(`ModalViewContainer: key: ${key} latestItem: ${JSON.stringify(latestItem)}`);\n\n if (currentOrder.length > 0) {\n if (\n currentItems[key] &&\n currentItems[key].view &&\n !isEmptyObject(currentItems[key].view)\n ) {\n const currentItem = currentItems[key];\n const rootView = currentItem.view;\n const { context } = rootView.config;\n const config = { meta: rootView };\n config['options'] = {\n context: currentItem.context,\n hasForm: true,\n pageReference: context || pConn.getPageReference()\n };\n\n if (!bSubscribed) {\n setSubscribed(true);\n subscribe(\n EVENT_SHOW_CANCEL_ALERT,\n showAlert,\n EVENT_SHOW_CANCEL_ALERT /* Unique string for subscription */\n );\n }\n\n const configObject = PCore.createPConnect(config);\n\n // THIS is where the ViewContainer creates a View\n // The config has meta.config.type = \"view\"\n const newComp = configObject.getPConnect();\n // const newCompName = newComp.getComponentName();\n const caseInfo =\n newComp && newComp.getDataObject() && newComp.getDataObject().caseInfo\n ? newComp.getDataObject().caseInfo\n : null;\n\n // console.log(`ModalViewContainer just created newComp: ${newCompName}`);\n\n // The metadata for pyDetails changed such that the \"template\": \"CaseView\"\n // is no longer a child of the created View but is in the created View's\n // config. So, we DON'T want to replace this.pConn$ since the created\n // component is a View (and not a ViewContainer). We now look for the\n // \"template\" type directly in the created component (newComp) and NOT\n // as a child of the newly created component.\n // console.log(`---> ModalViewContainer created new ${newCompName}`);\n\n // Use the newly created component (View) info but DO NOT replace\n // this ModalViewContainer's pConn$, etc.\n // Note that we're now using the newly created View's PConnect in the\n // ViewContainer HTML template to guide what's rendered similar to what\n // the React return of React.Fragment does\n\n // right now need to check caseInfo for changes, to trigger redraw, not getting\n // changes from angularPconnect except for first draw\n if (newComp && caseInfo && compareCaseInfoIsDifferent(caseInfo)) {\n setCreatedView(configObject);\n\n const { actionName } = latestItem;\n const theNewCaseInfo = newComp.getCaseInfo();\n const caseName = theNewCaseInfo.getName();\n const ID = theNewCaseInfo.getID();\n\n setTitle(actionName || `${localizedVal('New', localeCategory)} ${caseName} (${ID})`);\n\n let arChildrenAsReact: Array<any> = [];\n\n if (newComp.getComponentName() === 'reference') {\n // Reference component doesn't have children. It can build the View we want.\n // The Reference component getPConnect is in configObject\n\n arChildrenAsReact.push(\n createElement(createPConnectComponent(), {\n ...configObject,\n key: `${caseName}-${ID}`\n })\n );\n } else {\n // This is the 8.6 implementation. Leaving it in for reference for now.\n // And create a similar array of the children as React components\n // passed to Assignment component when rendered\n arChildrenAsReact = newComp.getChildren().map(child => {\n // Use Case Summary ID as the React element's key\n const caseSummaryID = child.getPConnect().getCaseSummary().ID;\n return createElement(createPConnectComponent(), { ...child, key: caseSummaryID });\n });\n }\n\n if (arChildrenAsReact.length > 0) setArNewChildrenAsReact(arChildrenAsReact);\n\n setShowModal(true);\n\n // save off itemKey to be used for finishAssignment, etc.\n setItemKey(key);\n }\n }\n } else {\n if (bShowModal) {\n setShowModal(false);\n }\n if (!isEmptyObject(oCaseInfo)) {\n setOCaseInfo({});\n }\n }\n }\n });\n\n // function placeholderModalClose() {\n // // Intentionally a no-op. Similar behavior in other SDKs.\n // // Does NOT close the window. This forces the user to use\n // // the cancel or submit button to close the modal (which, in turn, gets the right\n // // Constellation code to run to clean up the containers, data, etc.)\n\n // // console.log(`ModalViewContainer: placeholderModalClose setting bShowModal to false`) setShowModal(false);\n // }\n\n // if (bShowModal) {\n // console.log(`ModalViewContainer about to show modal with`);\n // console.log(`--> createdView: ${createdView} createdView.getPConnect: ${typeof createdView.getPConnect}`);\n // console.log(`--> itemKey: ${itemKey}`);\n // console.log(`--> arNewChildrenAsReact: ${JSON.stringify(arNewChildrenAsReact)}`);\n // }\n\n return (\n <>\n <Dialog open={bShowModal} aria-labelledby='form-dialog-title'>\n <DialogTitle id='form-dialog-title' className={classes.dlgTitle}>\n {title}\n </DialogTitle>\n <DialogContent className={classes.dlgContent}>\n {bShowModal ? (\n <Assignment\n getPConnect={createdView.getPConnect}\n itemKey={itemKey}\n isInModal\n banners={getBanners({\n target: itemKey,\n pageMessages\n })}\n >\n {arNewChildrenAsReact}\n </Assignment>\n ) : (\n <></>\n )}\n </DialogContent>\n </Dialog>\n {bShowCancelAlert && (\n <CancelAlert\n pConn={cancelPConn}\n showAlert={bShowCancelAlert}\n updateAlertState={updateAlertState}\n />\n )}\n </>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ModalViewContainer.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ModalViewContainer/ModalViewContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAC5D,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,UAAU,MAAM,gBAAgB,CAAC;AACxC,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAE3C,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,uFAAuF;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CA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,IAAC,SAAS,EAAE,GAAG,OAAO,CAAC,UAAU,sBAAsB,YAClE,UAAU,CAAC,CAAC,CAAC,CACZ,KAAC,uBAAuB,IAAC,KAAK,EAAE,UAAU,YACxC,KAAC,UAAU,IACT,WAAW,EAAE,WAAW,CAAC,YAAY,CAAC,WAAW,EACjD,OAAO,EAAE,OAAO,EAChB,SAAS,QACT,OAAO,EAAE,UAAU,CAAC;oCAClB,MAAM,EAAE,OAAO;oCACf,YAAY;iCACb,CAAC,YAED,oBAAoB,GACV,GACW,CAC3B,CAAC,CAAC,CAAC,IAAI,GACM,EAEf,iBAAiB,IAAI,CACpB,KAAC,qBAAqB,IACpB,WAAW,EAAE,WAAW,CAAC,YAAY,CAAC,WAAW,EACjD,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,EACvC,kBAAkB,EAAE,kBAAkB,GACtC,CACH,IACM,EACR,gBAAgB,IAAI,KAAC,WAAW,OAAK,gBAAgB,EAAE,OAAO,EAAE,kBAAkB,GAAI,IACtF,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { createElement, useEffect, useRef, useState } from 'react';\nimport Dialog from '@material-ui/core/Dialog';\nimport DialogContent from '@material-ui/core/DialogContent';\nimport DialogTitle from '@material-ui/core/DialogTitle';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { MuiPickersUtilsProvider } from '@material-ui/pickers';\nimport DayjsUtils from '@date-io/dayjs';\nimport difference from 'lodash.difference';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\n// Need to get correct implementation from component map for Assignment and CancelAlert\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\nimport { getBanners } from '../../../helpers/case-utils';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface ModalViewContainerProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n loadingInfo?: string;\n routingInfo?: any;\n pageMessages?: string[];\n}\n\nfunction isOpenModalAction(prevModalCollection, currentModalList) {\n return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length < currentModalList.length : false;\n}\n\nfunction isUpdateModalAction(prevModalCollection, currentModalList) {\n return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length === currentModalList.length : false;\n}\n\nfunction isCloseModalAction(prevModalCollection, currentModalList) {\n return prevModalCollection && currentModalList ? Object.keys(prevModalCollection).length > currentModalList.length : false;\n}\n\nfunction buildName(pConnect, name = '') {\n const context = pConnect.getContextName();\n return `${context}/${name}`;\n}\n\nfunction getKeyAndLatestItem(routinginfo, pConn, options) {\n const containerName = pConn.getContainerName();\n const { acTertiary = false } = options || {};\n if (PCore.getContainerUtils().hasContainerItems(buildName(pConn, containerName))) {\n const { accessedOrder, items } = routinginfo;\n let key;\n // eslint-disable-next-line no-plusplus\n for (let i = accessedOrder.length - 1; i >= 0; i--) {\n const tempkey = accessedOrder[i];\n if ((acTertiary && items[tempkey].acTertiary) || (!acTertiary && !items[tempkey].acTertiary)) {\n key = tempkey;\n break;\n }\n }\n const latestItem = items[key];\n return { key, latestItem };\n }\n return {};\n}\n\nfunction getConfigObject(item, pConnect, isReverseCoexistence = false) {\n let config;\n if (isReverseCoexistence) {\n config = {\n options: {\n pageReference: pConnect?.getPageReference(),\n hasForm: true,\n containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL\n }\n };\n return PCore.createPConnect(config);\n }\n if (item) {\n const { context, view, isBulkAction } = item;\n const target = PCore.getContainerUtils().getTargetFromContainerItemID(context);\n config = {\n meta: view,\n options: {\n context,\n pageReference: view.config.context || pConnect.getPageReference(),\n hasForm: true,\n ...(isBulkAction && { isBulkAction }),\n containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL,\n target\n }\n };\n return PCore.createPConnect(config);\n }\n return null;\n}\n\nconst useStyles = makeStyles(theme => ({\n dlgTitle: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(0)\n },\n dlgContent: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2),\n marginTop: theme.spacing(0),\n marginBottom: theme.spacing(2)\n }\n}));\n\nexport default function ModalViewContainer(props: ModalViewContainerProps) {\n // Get the proper implementation (local or Pega-provided) for these components that are emitted below\n const Assignment = getComponentFromMap('Assignment');\n const CancelAlert = getComponentFromMap('CancelAlert');\n const ListViewActionButtons = getComponentFromMap('ListViewActionButtons');\n\n const classes = useStyles();\n\n const modalCollection = useRef({});\n const routingInfoRef = useRef({});\n const { getPConnect, routingInfo = null, pageMessages = [] } = props;\n const pConn = getPConnect();\n const { acTertiary } = pConn.getConfigProps() as any;\n const {\n CONTAINER_TYPE: { MULTIPLE },\n PUB_SUB_EVENTS: { EVENT_SHOW_CANCEL_ALERT }\n } = PCore.getConstants();\n const { subscribe, unsubscribe } = PCore.getPubSubUtils();\n const [bShowModal, setShowModal] = useState(false);\n const [bShowCancelAlert, setShowCancelAlert] = useState(false);\n const [createdView, setCreatedView] = useState<any>(null);\n const [title, setTitle] = useState('');\n const [arNewChildrenAsReact, setArNewChildrenAsReact] = useState<any[]>([]);\n const [itemKey, setItemKey] = useState('');\n const [cancelAlertProps, setCancelAlertProps] = useState({});\n const [isMultiRecordData, setMultiRecordData] = useState(false);\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Data Object';\n\n const ERROR_WHILE_RENDERING = 'ERROR_WHILE_RENDERING';\n\n function showAlert(payload) {\n const { latestItem } = getKeyAndLatestItem(routingInfoRef.current, pConn, { acTertiary });\n const isReverseCoexistence = (PCore.getCoexistenceManager().getBroadcastUtils() as any).isReverseCoexistenceCaseLoaded();\n const { isModalAction, hideDelete, isDataObject, skipReleaseLockRequest } = payload;\n\n /*\n If we are in create stage full page mode, created a new case and trying to click on cancel button\n it will show two alert dialogs which is not expected. Hence isModalAction flag to avoid that.\n */\n if (latestItem && isModalAction) {\n const configObject = getConfigObject(latestItem, pConn, isReverseCoexistence);\n const contextName = configObject?.getPConnect().getContextName();\n setCancelAlertProps({\n heading: 'Discard unsaved changes?',\n content: 'You have unsaved changes. You can discard them or go back to keep working.',\n getPConnect: configObject?.getPConnect,\n itemKey: contextName,\n hideDelete,\n isDataObject,\n skipReleaseLockRequest\n });\n setShowCancelAlert(true);\n }\n }\n\n function handleModalOpen(key) {\n modalCollection.current = {\n ...modalCollection.current,\n [key]: {}\n };\n }\n\n function handleModalClose(accessedOrder) {\n const tempModalCollection = modalCollection.current;\n const [closedModalKey] = difference(Object.keys(tempModalCollection), accessedOrder);\n\n if (closedModalKey && tempModalCollection[closedModalKey]) {\n const modifiedModalCollection = { ...tempModalCollection };\n delete modifiedModalCollection[closedModalKey];\n modalCollection.current = modifiedModalCollection;\n setShowModal(false);\n }\n }\n\n const dismissCancelAlert = dismissAllModals => {\n setShowCancelAlert(false);\n\n if (dismissAllModals) {\n setShowModal(false);\n }\n };\n\n function getModalHeading(dataObjectAction) {\n return dataObjectAction === PCore.getConstants().RESOURCE_STATUS.CREATE\n ? localizedVal('Add Record', localeCategory)\n : localizedVal('Edit Record', localeCategory);\n }\n\n function determineModalHeaderByAction(actionName, caseTypeName, ID, caseLocaleRef) {\n if (actionName) {\n return localizedVal(actionName, localeCategory);\n }\n return `${localizedVal('Create', localeCategory)} ${localizedVal(caseTypeName, undefined, caseLocaleRef)} (${ID})`;\n }\n\n useEffect(() => {\n // Establish the necessary containers\n const containerMgr = pConn.getContainerManager();\n containerMgr.initializeContainers({ type: MULTIPLE });\n }, [MULTIPLE, pConn]);\n\n useEffect(() => {\n // Persisting routing information between the renders in showAlert\n routingInfoRef.current = routingInfo;\n });\n\n useEffect(() => {\n subscribe(EVENT_SHOW_CANCEL_ALERT, showAlert, EVENT_SHOW_CANCEL_ALERT /* Unique string for subscription */);\n subscribe(\n ERROR_WHILE_RENDERING,\n error => {\n // setError(true);\n // eslint-disable-next-line no-console\n console.error(error);\n },\n `${ERROR_WHILE_RENDERING}-mc-${getPConnect().getContextName()}`,\n false,\n getPConnect().getContextName()\n );\n\n // Unsubscribe on component unmount\n return () => {\n unsubscribe(EVENT_SHOW_CANCEL_ALERT, EVENT_SHOW_CANCEL_ALERT /* Should be same unique string passed during subscription */);\n };\n });\n\n useEffect(() => {\n if (routingInfo) {\n const { accessedOrder, type } = routingInfo;\n const { key, latestItem } = getKeyAndLatestItem(routingInfo, pConn, { acTertiary });\n\n if (\n latestItem &&\n type === MULTIPLE &&\n (isOpenModalAction(modalCollection.current, accessedOrder) || isUpdateModalAction(modalCollection.current, accessedOrder))\n ) {\n const { actionName } = latestItem;\n // const { isDockable = false } = latestItem?.modalOptions || {};\n const configObject: any = getConfigObject(latestItem, null, false);\n const pConnect = configObject.getPConnect();\n const caseInfo: any = pConnect.getCaseInfo();\n const caseName = caseInfo.getName();\n const caseTypeName = caseInfo.getCaseTypeName();\n const ID = caseInfo.getBusinessID() || caseInfo.getID();\n const isDataObject = routingInfo.items[latestItem.context].resourceType === PCore.getConstants().RESOURCE_TYPES.DATA;\n const dataObjectAction = routingInfo.items[latestItem.context].resourceStatus;\n const isMultiRecord = routingInfo.items[latestItem.context].isMultiRecordData;\n const headingValue =\n isDataObject || isMultiRecord\n ? getModalHeading(dataObjectAction)\n : determineModalHeaderByAction(actionName, caseTypeName, ID, `${caseInfo?.getClassName()}!CASE!${caseInfo.getName()}`.toUpperCase());\n\n let arChildrenAsReact: any[] = [];\n\n if (pConnect.getComponentName() === 'reference') {\n // Reference component doesn't have children. It can build the View we want.\n // The Reference component getPConnect is in configObject\n\n arChildrenAsReact.push(\n createElement(createPConnectComponent(), {\n ...configObject,\n key: `${caseName}-${ID}`\n })\n );\n } else {\n // This is the 8.6 implementation. Leaving it in for reference for now.\n // And create a similar array of the children as React components\n // passed to Assignment component when rendered\n arChildrenAsReact = (pConnect.getChildren() as []).map((child: any) => {\n // Use Case Summary ID as the React element's key\n const caseSummaryID = child.getPConnect().getCaseSummary().ID;\n return createElement(createPConnectComponent(), {\n ...child,\n key: caseSummaryID\n });\n });\n }\n\n if (arChildrenAsReact.length > 0) setArNewChildrenAsReact(arChildrenAsReact);\n setMultiRecordData(isMultiRecord);\n setTitle(headingValue);\n setCreatedView({ configObject, latestItem });\n setItemKey(key);\n setShowModal(true);\n\n // Update modal use case which happens when assignment in submitted in modal.\n if (isUpdateModalAction(modalCollection.current, accessedOrder)) {\n // handleModalUpdate(key);\n } else if (isOpenModalAction(modalCollection.current, accessedOrder)) {\n // New modal open scenario\n handleModalOpen(key);\n }\n } else if (isCloseModalAction(modalCollection.current, accessedOrder)) {\n handleModalClose(accessedOrder);\n }\n }\n }, [routingInfo]);\n\n function closeActionsDialog() {\n // actionsDialog.current = true;\n setShowModal(false);\n }\n\n return (\n <>\n <Dialog open={bShowModal} aria-labelledby='form-dialog-title'>\n <DialogTitle id='form-dialog-title' className={`${classes.dlgTitle} psdk-dialog-title`}>\n {title}\n </DialogTitle>\n <DialogContent className={`${classes.dlgContent} psdk-dialog-content`}>\n {bShowModal ? (\n <MuiPickersUtilsProvider utils={DayjsUtils}>\n <Assignment\n getPConnect={createdView.configObject.getPConnect}\n itemKey={itemKey}\n isInModal\n banners={getBanners({\n target: itemKey,\n pageMessages\n })}\n >\n {arNewChildrenAsReact}\n </Assignment>\n </MuiPickersUtilsProvider>\n ) : null}\n </DialogContent>\n\n {isMultiRecordData && (\n <ListViewActionButtons\n getPConnect={createdView.configObject.getPConnect}\n context={createdView.latestItem.context}\n closeActionsDialog={closeActionsDialog}\n />\n )}\n </Dialog>\n {bShowCancelAlert && <CancelAlert {...cancelAlertProps} dismiss={dismissCancelAlert} />}\n </>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ModalViewContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export { default } from './ModalViewContainer'
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ModalViewContainer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export { default } from './ModalViewContainer';\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const SimpleViewContainer: (props: any) => import("react").CElement<{
|
|
3
|
+
getPConnect: () => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default;
|
|
4
|
+
}, import("react").Component<{
|
|
5
|
+
getPConnect: () => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default;
|
|
6
|
+
}, any, any>> | null;
|
|
7
|
+
export declare const withSimpleViewContainerRenderer: (Component: any, options?: any) => (props: any) => JSX.Element;
|
|
8
|
+
export default SimpleViewContainer;
|
|
9
|
+
//# sourceMappingURL=SimpleView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleView.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/SimpleView.tsx"],"names":[],"mappings":";AAIA,QAAA,MAAM,mBAAmB;;;;oBAexB,CAAC;AAEF,eAAO,MAAM,+BAA+B,6BACrB,GAAG,gCAuBvB,CAAC;AAEJ,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { getActiveContainerItemID, getActiveContainerRootViewElement, getPConnectOfActiveContainerItem, useContainerInitializer } from './helper';
|
|
4
|
+
const SimpleViewContainer = props => {
|
|
5
|
+
const { CONTAINER_TYPE } = PCore.getConstants();
|
|
6
|
+
const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView, options = {} } = props;
|
|
7
|
+
const rootViewElement = useMemo(() => {
|
|
8
|
+
return getActiveContainerRootViewElement(containerInfo, {
|
|
9
|
+
isAssignmentView,
|
|
10
|
+
parentGetPConnect: getPConnect
|
|
11
|
+
});
|
|
12
|
+
}, [containerInfo, isAssignmentView, getPConnect]);
|
|
13
|
+
useContainerInitializer(getPConnect, options.mode || mode);
|
|
14
|
+
return rootViewElement;
|
|
15
|
+
};
|
|
16
|
+
export const withSimpleViewContainerRenderer = (Component, options = {}) => props => {
|
|
17
|
+
const { CONTAINER_TYPE } = PCore.getConstants();
|
|
18
|
+
const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView } = props;
|
|
19
|
+
const rootViewElement = _jsx(SimpleViewContainer, { ...props, options: options });
|
|
20
|
+
const activeContainerItemID = getActiveContainerItemID(containerInfo);
|
|
21
|
+
const getPConnectOfActiveItem = getPConnectOfActiveContainerItem(containerInfo, {
|
|
22
|
+
isAssignmentView,
|
|
23
|
+
parentGetPConnect: getPConnect
|
|
24
|
+
});
|
|
25
|
+
useContainerInitializer(getPConnect, options.mode || mode);
|
|
26
|
+
return (_jsx(Component, { ...props, rootViewElement: rootViewElement, activeContainerItemID: activeContainerItemID, getPConnectOfActiveContainerItem: getPConnectOfActiveItem }));
|
|
27
|
+
};
|
|
28
|
+
export default SimpleViewContainer;
|
|
29
|
+
//# sourceMappingURL=SimpleView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleView.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/SimpleView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,wBAAwB,EAAE,iCAAiC,EAAE,gCAAgC,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAElJ,MAAM,mBAAmB,GAAG,KAAK,CAAC,EAAE;IAClC,MAAM,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;IAEhD,MAAM,EAAE,WAAW,EAAE,IAAI,GAAG,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,OAAO,GAAG,EAAE,EAAE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ootViewElement, getPConnectOfActiveContainerItem, useContainerInitializer } from './helper';\n\nconst SimpleViewContainer = props => {\n const { CONTAINER_TYPE } = PCore.getConstants();\n\n const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView, options = {} } = props;\n\n const rootViewElement = useMemo(() => {\n return getActiveContainerRootViewElement(containerInfo, {\n isAssignmentView,\n parentGetPConnect: getPConnect\n });\n }, [containerInfo, isAssignmentView, getPConnect]);\n\n useContainerInitializer(getPConnect, options.mode || mode);\n\n return rootViewElement;\n};\n\nexport const withSimpleViewContainerRenderer =\n (Component, options: any = {}) =>\n props => {\n const { CONTAINER_TYPE } = PCore.getConstants();\n\n const { getPConnect, mode = CONTAINER_TYPE.SINGLE, routingInfo: containerInfo, isAssignmentView } = props;\n\n const rootViewElement = <SimpleViewContainer {...props} options={options} />;\n const activeContainerItemID = getActiveContainerItemID(containerInfo);\n const getPConnectOfActiveItem = getPConnectOfActiveContainerItem(containerInfo, {\n isAssignmentView,\n parentGetPConnect: getPConnect\n });\n\n useContainerInitializer(getPConnect, options.mode || mode);\n\n return (\n <Component\n {...props}\n rootViewElement={rootViewElement}\n activeContainerItemID={activeContainerItemID}\n getPConnectOfActiveContainerItem={getPConnectOfActiveItem}\n />\n );\n };\n\nexport default SimpleViewContainer;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const getPConnectOfActiveContainerItem: (containerInfo: any, options: any) => (() => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default) | null;
|
|
3
|
+
export declare const getActiveContainerRootViewElement: (containerInfo: any, options: any) => import("react").CElement<{
|
|
4
|
+
getPConnect: () => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default;
|
|
5
|
+
}, import("react").Component<{
|
|
6
|
+
getPConnect: () => import("@pega/pcore-pconnect-typedefs/interpreter/c11n-env").default;
|
|
7
|
+
}, any, any>> | null;
|
|
8
|
+
export declare const getActiveContainerItemID: (containerInfo: any) => any;
|
|
9
|
+
export declare const useContainerInitializer: (getPConnect: any, mode: any) => void;
|
|
10
|
+
//# sourceMappingURL=helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/helper.ts"],"names":[],"mappings":";AAsDA,eAAO,MAAM,gCAAgC,2HAwC5C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;oBAM7C,CAAC;AAEF,eAAO,MAAM,wBAAwB,6BAMpC,CAAC;AAEF,eAAO,MAAM,uBAAuB,uCAYnC,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { useEffect, createElement } from 'react';
|
|
2
|
+
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
3
|
+
import { isContainerInitialized } from '../helpers';
|
|
4
|
+
const processRootViewDetails = (rootView, containerItem, options) => {
|
|
5
|
+
const { config: { context: viewContext, name: viewName } } = rootView;
|
|
6
|
+
const { context: containerContext } = containerItem;
|
|
7
|
+
const { parentGetPConnect } = options;
|
|
8
|
+
let resolvedViewName = viewName;
|
|
9
|
+
let resolvedViewContext = viewContext;
|
|
10
|
+
const isAnnotedViewName = PCore.getAnnotationUtils().isProperty(viewName);
|
|
11
|
+
const isAnnotedViewContext = PCore.getAnnotationUtils().isProperty(viewContext);
|
|
12
|
+
// resolving annoted view context
|
|
13
|
+
if (isAnnotedViewContext) {
|
|
14
|
+
const viewContextProperty = PCore.getAnnotationUtils().getPropertyName(viewContext);
|
|
15
|
+
resolvedViewContext = PCore.getStoreValue(`.${viewContextProperty}`, viewContextProperty.startsWith('.') ? parentGetPConnect().getPageReference() : '', containerContext);
|
|
16
|
+
}
|
|
17
|
+
if (!resolvedViewContext) {
|
|
18
|
+
resolvedViewContext = parentGetPConnect().getPageReference();
|
|
19
|
+
}
|
|
20
|
+
// resolving annoted view name
|
|
21
|
+
if (isAnnotedViewName) {
|
|
22
|
+
const viewNameProperty = PCore.getAnnotationUtils().getPropertyName(viewName);
|
|
23
|
+
resolvedViewName = PCore.getStoreValue(`.${viewNameProperty}`, resolvedViewContext, containerContext);
|
|
24
|
+
}
|
|
25
|
+
/* Special case where context and viewname are dynamic values
|
|
26
|
+
Use case - split for each shape
|
|
27
|
+
|
|
28
|
+
Ex - (caseInfo.content.SCRequestWorkQueues[1]):context --> .pyViewName:viewName
|
|
29
|
+
*/
|
|
30
|
+
if (isAnnotedViewName && isAnnotedViewContext && resolvedViewName !== '') {
|
|
31
|
+
/* Allow context processor to resolve view and context when both are dynamic */
|
|
32
|
+
resolvedViewName = viewName;
|
|
33
|
+
resolvedViewContext = viewContext;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
viewName: resolvedViewName,
|
|
37
|
+
viewContext: resolvedViewContext
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export const getPConnectOfActiveContainerItem = (containerInfo, options) => {
|
|
41
|
+
const { accessedOrder, items } = containerInfo;
|
|
42
|
+
const { isAssignmentView = false, parentGetPConnect } = options;
|
|
43
|
+
const containerName = parentGetPConnect().getContainerName();
|
|
44
|
+
const { CONTAINER_NAMES } = PCore.getContainerUtils();
|
|
45
|
+
const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();
|
|
46
|
+
if (accessedOrder && items) {
|
|
47
|
+
const activeContainerItemKey = accessedOrder[accessedOrder.length - 1];
|
|
48
|
+
if (items[activeContainerItemKey] && items[activeContainerItemKey].view && Object.keys(items[activeContainerItemKey].view).length > 0) {
|
|
49
|
+
const activeContainerItem = items[activeContainerItemKey];
|
|
50
|
+
const target = activeContainerItemKey.substring(0, activeContainerItemKey.lastIndexOf('_'));
|
|
51
|
+
const { view: rootView, context } = activeContainerItem;
|
|
52
|
+
const { viewName, viewContext } = processRootViewDetails(rootView, activeContainerItem, { parentGetPConnect });
|
|
53
|
+
if (!viewName)
|
|
54
|
+
return null;
|
|
55
|
+
const config = {
|
|
56
|
+
meta: rootView,
|
|
57
|
+
options: {
|
|
58
|
+
context,
|
|
59
|
+
pageReference: viewContext || parentGetPConnect().getPageReference(),
|
|
60
|
+
containerName,
|
|
61
|
+
containerItemID: activeContainerItemKey,
|
|
62
|
+
parentPageReference: parentGetPConnect().getPageReference(),
|
|
63
|
+
hasForm: isAssignmentView ||
|
|
64
|
+
containerName === CONTAINER_NAMES.WORKAREA ||
|
|
65
|
+
containerName === CONTAINER_NAMES.MODAL ||
|
|
66
|
+
viewName === CREATE_DETAILS_VIEW_NAME,
|
|
67
|
+
target
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return PCore.createPConnect(config).getPConnect;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
};
|
|
75
|
+
export const getActiveContainerRootViewElement = (containerInfo, options) => {
|
|
76
|
+
const getPConnect = getPConnectOfActiveContainerItem(containerInfo, options);
|
|
77
|
+
if (getPConnect) {
|
|
78
|
+
return createElement(createPConnectComponent(), { getPConnect });
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
};
|
|
82
|
+
export const getActiveContainerItemID = containerInfo => {
|
|
83
|
+
const { accessedOrder } = containerInfo;
|
|
84
|
+
if (accessedOrder && accessedOrder.length > 0) {
|
|
85
|
+
return accessedOrder[accessedOrder.length - 1];
|
|
86
|
+
}
|
|
87
|
+
return '';
|
|
88
|
+
};
|
|
89
|
+
export const useContainerInitializer = (getPConnect, mode) => {
|
|
90
|
+
const pConnect = getPConnect();
|
|
91
|
+
const containerName = pConnect.getContainerName();
|
|
92
|
+
const containerManager = pConnect.getContainerManager();
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (!isContainerInitialized(pConnect)) {
|
|
95
|
+
containerManager.initializeContainers({
|
|
96
|
+
type: mode,
|
|
97
|
+
name: containerName
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 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ACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC,EAAE;IACtD,MAAM,EAAE,aAAa,EAAE,GAAG,aAAa,CAAC;IACxC,IAAI,aAAa,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7C,OAAO,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAChD;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE;IAC3D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,aAAa,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IAClD,MAAM,gBAAgB,GAAG,QAAQ,CAAC,mBAAmB,EAAE,CAAC;IACxD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,EAAE;YACrC,gBAAgB,CAAC,oBAAoB,CAAC;gBACpC,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,aAAa;aACpB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { useEffect, createElement } from 'react';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { isContainerInitialized } from '../helpers';\n\nconst processRootViewDetails = (rootView, containerItem, options) => {\n const {\n config: { context: viewContext, name: viewName }\n } = rootView;\n const { context: containerContext } = containerItem;\n const { parentGetPConnect } = options;\n let resolvedViewName = viewName;\n let resolvedViewContext = viewContext;\n\n const isAnnotedViewName = PCore.getAnnotationUtils().isProperty(viewName);\n const isAnnotedViewContext = PCore.getAnnotationUtils().isProperty(viewContext);\n\n // resolving annoted view context\n if (isAnnotedViewContext) {\n const viewContextProperty = PCore.getAnnotationUtils().getPropertyName(viewContext);\n resolvedViewContext = PCore.getStoreValue(\n `.${viewContextProperty}`,\n viewContextProperty.startsWith('.') ? parentGetPConnect().getPageReference() : '',\n containerContext\n );\n }\n\n if (!resolvedViewContext) {\n resolvedViewContext = parentGetPConnect().getPageReference();\n }\n\n // resolving annoted view name\n if (isAnnotedViewName) {\n const viewNameProperty = PCore.getAnnotationUtils().getPropertyName(viewName);\n resolvedViewName = PCore.getStoreValue(`.${viewNameProperty}`, resolvedViewContext, containerContext);\n }\n\n /* Special case where context and viewname are dynamic values\n Use case - split for each shape\n\n Ex - (caseInfo.content.SCRequestWorkQueues[1]):context --> .pyViewName:viewName\n */\n if (isAnnotedViewName && isAnnotedViewContext && resolvedViewName !== '') {\n /* Allow context processor to resolve view and context when both are dynamic */\n resolvedViewName = viewName;\n resolvedViewContext = viewContext;\n }\n\n return {\n viewName: resolvedViewName,\n viewContext: resolvedViewContext\n };\n};\n\nexport const getPConnectOfActiveContainerItem = (containerInfo, options) => {\n const { accessedOrder, items } = containerInfo;\n const { isAssignmentView = false, parentGetPConnect } = options;\n const containerName = parentGetPConnect().getContainerName();\n const { CONTAINER_NAMES } = PCore.getContainerUtils();\n const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();\n\n if (accessedOrder && items) {\n const activeContainerItemKey = accessedOrder[accessedOrder.length - 1];\n\n if (items[activeContainerItemKey] && items[activeContainerItemKey].view && Object.keys(items[activeContainerItemKey].view).length > 0) {\n const activeContainerItem = items[activeContainerItemKey];\n const target = activeContainerItemKey.substring(0, activeContainerItemKey.lastIndexOf('_'));\n\n const { view: rootView, context } = activeContainerItem;\n const { viewName, viewContext } = processRootViewDetails(rootView, activeContainerItem, { parentGetPConnect });\n\n if (!viewName) return null;\n\n const config = {\n meta: rootView,\n options: {\n context,\n pageReference: viewContext || parentGetPConnect().getPageReference(),\n containerName,\n containerItemID: activeContainerItemKey,\n parentPageReference: parentGetPConnect().getPageReference(),\n hasForm:\n isAssignmentView ||\n containerName === CONTAINER_NAMES.WORKAREA ||\n containerName === CONTAINER_NAMES.MODAL ||\n viewName === CREATE_DETAILS_VIEW_NAME,\n target\n }\n };\n\n return PCore.createPConnect(config).getPConnect;\n }\n }\n return null;\n};\n\nexport const getActiveContainerRootViewElement = (containerInfo, options) => {\n const getPConnect = getPConnectOfActiveContainerItem(containerInfo, options);\n if (getPConnect) {\n return createElement(createPConnectComponent(), { getPConnect });\n }\n return null;\n};\n\nexport const getActiveContainerItemID = containerInfo => {\n const { accessedOrder } = containerInfo;\n if (accessedOrder && accessedOrder.length > 0) {\n return accessedOrder[accessedOrder.length - 1];\n }\n return '';\n};\n\nexport const useContainerInitializer = (getPConnect, mode) => {\n const pConnect = getPConnect();\n const containerName = pConnect.getContainerName();\n const containerManager = pConnect.getContainerManager();\n useEffect(() => {\n if (!isContainerInitialized(pConnect)) {\n containerManager.initializeContainers({\n type: mode,\n name: containerName\n });\n }\n });\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { default } from './SimpleView';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ViewContainer/ViewContainer.tsx"],"names":[],"mappings":";AAMA,OAAO,
|
|
1
|
+
{"version":3,"file":"ViewContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ViewContainer/ViewContainer.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAWD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA8K9D"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { createElement, useContext, useEffect, useState } from 'react';
|
|
3
|
+
import { Box, CircularProgress } from '@material-ui/core';
|
|
4
|
+
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
|
+
import StoreContext from '../../../../bridge/Context/StoreContext';
|
|
5
6
|
import { isEmptyObject } from '../../../helpers/common-utils';
|
|
6
7
|
// ViewContainer can emit View
|
|
7
8
|
// import View from '../View';
|
|
@@ -18,19 +19,19 @@ export default function ViewContainer(props) {
|
|
|
18
19
|
const pConn = getPConnect();
|
|
19
20
|
const containerMgr = pConn.getContainerManager();
|
|
20
21
|
const [dispatchObjState, setDispatchObjState] = useState({
|
|
21
|
-
dispatchObject: { semanticURL:
|
|
22
|
+
dispatchObject: { semanticURL: '', context: '', acName: '' },
|
|
22
23
|
visible: false,
|
|
23
24
|
loadingInfo: null,
|
|
24
25
|
isLoadingInfoChange: false
|
|
25
26
|
}); // was this.state in class-based ViewContainer avoiding use of just "state" as the name
|
|
26
27
|
let root;
|
|
27
|
-
const thePConn =
|
|
28
|
+
const thePConn = typeof getPConnect === 'function' ? getPConnect() : null;
|
|
28
29
|
// beginning of functions for use by ViewContainer
|
|
29
30
|
function buildName() {
|
|
30
31
|
const context = thePConn?.getContextName();
|
|
31
32
|
let viewContainerName = name;
|
|
32
33
|
if (!viewContainerName)
|
|
33
|
-
viewContainerName =
|
|
34
|
+
viewContainerName = '';
|
|
34
35
|
return `${context?.toUpperCase()}/${viewContainerName.toUpperCase()}`;
|
|
35
36
|
}
|
|
36
37
|
function prepareDispatchObject() {
|
|
@@ -38,10 +39,10 @@ export default function ViewContainer(props) {
|
|
|
38
39
|
// const { acName = "primary" } = pConn.getContainerName(); // doesn't work with 8.23 typings
|
|
39
40
|
let acName = pConn.getContainerName();
|
|
40
41
|
if (!acName) {
|
|
41
|
-
acName =
|
|
42
|
+
acName = 'primary';
|
|
42
43
|
}
|
|
43
44
|
return {
|
|
44
|
-
semanticURL:
|
|
45
|
+
semanticURL: '',
|
|
45
46
|
context: baseContext,
|
|
46
47
|
acName
|
|
47
48
|
};
|
|
@@ -67,9 +68,7 @@ export default function ViewContainer(props) {
|
|
|
67
68
|
useEffect(() => {
|
|
68
69
|
// This is adapted from the class-based ViewContainer constructor
|
|
69
70
|
containerMgr.initializeContainers({
|
|
70
|
-
type: mode === CONTAINER_TYPE.MULTIPLE
|
|
71
|
-
? CONTAINER_TYPE.MULTIPLE
|
|
72
|
-
: CONTAINER_TYPE.SINGLE
|
|
71
|
+
type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE
|
|
73
72
|
});
|
|
74
73
|
if (mode === CONTAINER_TYPE.MULTIPLE && limit) {
|
|
75
74
|
/* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */
|
|
@@ -96,8 +95,8 @@ export default function ViewContainer(props) {
|
|
|
96
95
|
objectForAddContainer = theDispatchObject;
|
|
97
96
|
}
|
|
98
97
|
// Getting default view label
|
|
99
|
-
const navPages = pConn.getValue(
|
|
100
|
-
const defaultViewLabel = Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel :
|
|
98
|
+
const navPages = pConn.getValue('pyPortal.pyPrimaryNavPages', ''); // 2nd arg empty string until typedefs allow optional
|
|
99
|
+
const defaultViewLabel = Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel : '';
|
|
101
100
|
// TODO: Plan is to rename window.constellationCore to window.pega (or similar)
|
|
102
101
|
// And expose less via ui-bootstrap.js
|
|
103
102
|
// PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore
|
|
@@ -122,9 +121,7 @@ export default function ViewContainer(props) {
|
|
|
122
121
|
let componentVisible = accessedOrder.length > 0;
|
|
123
122
|
const { visible } = dispatchObjState;
|
|
124
123
|
componentVisible = visible || componentVisible;
|
|
125
|
-
if (items[key] &&
|
|
126
|
-
items[key].view &&
|
|
127
|
-
!isEmptyObject(items[key].view)) {
|
|
124
|
+
if (items[key] && items[key].view && !isEmptyObject(items[key].view)) {
|
|
128
125
|
const latestItem = items[key];
|
|
129
126
|
const rootView = latestItem.view;
|
|
130
127
|
const { context, name: viewName } = rootView.config;
|
|
@@ -139,18 +136,14 @@ export default function ViewContainer(props) {
|
|
|
139
136
|
const configObject = PCore.createPConnect(config);
|
|
140
137
|
// Add in displayOnlyFA if prop is on ViewContainer
|
|
141
138
|
if (displayOnlyFA) {
|
|
142
|
-
configObject
|
|
139
|
+
configObject.displayOnlyFA = true;
|
|
143
140
|
}
|
|
144
141
|
setRootComponent(configObject);
|
|
145
|
-
return (
|
|
146
|
-
componentVisible && root,
|
|
147
|
-
loadingInfo && React.createElement(Box, { textAlign: "center" },
|
|
148
|
-
React.createElement(CircularProgress, null))));
|
|
142
|
+
return (_jsxs(React.Fragment, { children: [componentVisible && root, loadingInfo && (_jsx(Box, { textAlign: 'center', children: _jsx(CircularProgress, {}) }))] }, theBuildName));
|
|
149
143
|
}
|
|
150
144
|
}
|
|
151
145
|
}
|
|
152
146
|
// fall through return if insufficient routingInfo
|
|
153
|
-
return (
|
|
154
|
-
React.createElement(CircularProgress, null))));
|
|
147
|
+
return (_jsx(React.Fragment, { children: loadingInfo && (_jsx(Box, { textAlign: 'center', children: _jsx(CircularProgress, {}) })) }, theBuildName));
|
|
155
148
|
}
|
|
156
149
|
//# sourceMappingURL=ViewContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewContainer.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ViewContainer/ViewContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAc9D,8BAA8B;AAC9B,8BAA8B;AAE9B,EAAE;AACF,qHAAqH;AACrH,uHAAuH;AACvH,+BAA+B;AAC/B,EAAE;AAGF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAyB;IAC7D,8DAA8D;IAC9D,MAAM,EAAE,WAAW,EAAE,IAAI,GAAG,EAAE,EAAE,IAAI,GAAG,QAAQ,EAAE,KAAK,GAAG,EAAE,EAAE,WAAW,GAAG,KAAK,EAAE,WAAW,GAAG,IAAI,EAAC,GAAG,KAAK,CAAC;IAE9G,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAM,YAAY,CAAC,CAAC;IAGxD,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;IACrD,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,YAAY,GAAQ,KAAK,CAAC,mBAAmB,EAAE,CAAC;IAEtD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC;QACvD,cAAc,EAAE,EAAC,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAC;QAC1D,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,IAAI;QACjB,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AC3B,aAAa,EAAE,OAAO,IAAI,WAAW,EAAE,CAAC,gBAAgB,EAAE;oBAC1D,aAAa,EAAE,WAAW,EAAE,CAAC,gBAAgB,EAAE;oBAC/C,iBAAiB,EAAE,GAAG;oBACtB,OAAO,EAAE,QAAQ,KAAK,wBAAwB;iBAC/C,CAAC;gBACF,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;gBAElD,mDAAmD;gBACnD,IAAI,aAAa,EAAE;oBACjB,YAAY,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;iBACtC;gBAED,gBAAgB,CAAC,YAAY,CAAC,CAAC;gBAC/B,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,YAAY;oBAC9B,gBAAgB,IAAI,IAAI;oBACxB,WAAW,IAAI,oBAAC,GAAG,IAAC,SAAS,EAAC,QAAQ;wBAAC,oBAAC,gBAAgB,OAAG,CAAM,CACnD,CAClB,CAAC;aACH;SACF;KACF;IAED,kDAAkD;IAClD,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,YAAY,IAC9B,WAAW,IAAI,oBAAC,GAAG,IAAC,SAAS,EAAC,QAAQ;QAAC,oBAAC,gBAAgB,OAAG,CAAM,CACnD,CAClB,CAAC;AAEJ,CAAC","sourcesContent":["import React, { useEffect, useState, useContext, createElement } from \"react\";\nimport { Box, CircularProgress } from \"@material-ui/core\";\nimport createPConnectComponent from \"../../../../bridge/react_pconnect\";\nimport StoreContext from \"../../../../bridge/Context/StoreContext\";\nimport { isEmptyObject } from '../../../helpers/common-utils';\n\nimport type { PConnProps } from '../../../../types/PConnProps';\n\ninterface ViewContainerProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n name?: string,\n loadingInfo?: any, // can't be boolean until setDispatchObjState expects loadingInfo to be type null\n routingInfo?: any,\n mode?: string,\n limit?: number\n}\n\n\n// ViewContainer can emit View\n// import View from '../View';\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\n\nexport default function ViewContainer(props: ViewContainerProps) {\n // const { getPConnect, children, routingInfo, name } = props;\n const { getPConnect, name = '', mode = 'single', limit = 16, loadingInfo = false, routingInfo = null} = props;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n\n const { CONTAINER_TYPE, APP } = PCore.getConstants();\n const pConn = getPConnect();\n const containerMgr: any = pConn.getContainerManager();\n\n const [dispatchObjState, setDispatchObjState] = useState({\n dispatchObject: {semanticURL: \"\", context: \"\", acName: \"\"},\n visible: false,\n loadingInfo: null,\n isLoadingInfoChange: false\n }); // was this.state in class-based ViewContainer avoiding use of just \"state\" as the name\n\n let root;\n\n\n const thePConn = ((typeof getPConnect) === 'function') ? getPConnect() : null;\n\n // beginning of functions for use by ViewContainer\n\n function buildName() {\n const context = thePConn?.getContextName();\n let viewContainerName = name;\n if (!viewContainerName) viewContainerName = \"\";\n return `${context?.toUpperCase()}/${viewContainerName.toUpperCase()}`;\n }\n\n function prepareDispatchObject() {\n const baseContext = pConn.getContextName();\n // const { acName = \"primary\" } = pConn.getContainerName(); // doesn't work with 8.23 typings\n let acName = pConn.getContainerName();\n if (!acName) {\n acName = \"primary\";\n }\n\n return {\n semanticURL: \"\",\n context: baseContext,\n acName\n };\n }\n\n // determine if or not loadingInfo prop changed on next re-render\n // function getDerivedStateFromProps(nextProps, prevState) {\n // const { loadingInfo: prevLoadingInfo } = prevState;\n // const { loadingInfo: nextLoadingIndfo } = nextProps;\n // return {\n // loadingInfo: nextLoadingIndfo,\n // isLoadingInfoChange: prevLoadingInfo !== nextLoadingIndfo\n // };\n // }\n\n // set the root component that is retrieved by PConnectHOC\n function setRootComponent(configObject) {\n\n const { isLoadingInfoChange } = dispatchObjState;\n if (!isLoadingInfoChange) {\n root = createElement(createPConnectComponent(), configObject);\n }\n }\n\n // end of functions for use by ViewContainer\n\n // useEffect on [] -> code that should be run once (as in old constructor and in componentDidMount)\n useEffect(() => {\n\n // This is adapted from the class-based ViewContainer constructor\n containerMgr.initializeContainers({\n type:\n mode === CONTAINER_TYPE.MULTIPLE\n ? CONTAINER_TYPE.MULTIPLE\n : CONTAINER_TYPE.SINGLE\n });\n\n if (mode === CONTAINER_TYPE.MULTIPLE && limit) {\n /* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */\n PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);\n }\n\n const dispatchObject = prepareDispatchObject();\n setDispatchObjState( {\n dispatchObject,\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n visible: !PCore.checkIfSemanticURL(),\n loadingInfo,\n isLoadingInfoChange: false\n });\n\n const { visible } = dispatchObjState;\n if (visible) containerMgr.addContainerItem(dispatchObject);\n\n // This is adapted from the class-based ViewContainer componentDidMount\n let objectForAddContainer;\n if (PCore.checkIfSemanticURL()) {\n objectForAddContainer = prepareDispatchObject();\n } else {\n const { dispatchObject: theDispatchObject } = dispatchObjState;\n objectForAddContainer = theDispatchObject;\n }\n\n // Getting default view label\n const navPages = pConn.getValue(\"pyPortal.pyPrimaryNavPages\", ''); // 2nd arg empty string until typedefs allow optional\n const defaultViewLabel =\n Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel : \"\";\n // TODO: Plan is to rename window.constellationCore to window.pega (or similar)\n // And expose less via ui-bootstrap.js\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n\n if (!displayOnlyFA) {\n // configureForBrowserBookmark not applicable in Embedded mode\n PCore.configureForBrowserBookmark({\n ...objectForAddContainer,\n defaultViewLabel\n });\n\n }\n\n },\n []);\n\n // This code (that's run every time the ViewContainer is called) is adapted from the class-based ViewContainer's render\n\n // Looking for routingInfo\n\n // debugging/investigation help\n // console.log(`ViewContainer props: ${JSON.stringify(props)}`);\n\n const theBuildName = buildName();\n const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();\n if (routingInfo) {\n const { accessedOrder, items } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n let componentVisible = accessedOrder.length > 0;\n const { visible } = dispatchObjState;\n componentVisible = visible || componentVisible;\n if (\n items[key] &&\n items[key].view &&\n !isEmptyObject(items[key].view)\n ) {\n const latestItem = items[key];\n const rootView = latestItem.view;\n const { context, name: viewName } = rootView.config;\n const config: any = { meta: rootView };\n config.options = {\n context: latestItem.context,\n pageReference: context || getPConnect().getPageReference(),\n containerName: getPConnect().getContainerName(),\n containerItemName: key,\n hasForm: viewName === CREATE_DETAILS_VIEW_NAME\n };\n const configObject = PCore.createPConnect(config);\n\n // Add in displayOnlyFA if prop is on ViewContainer\n if (displayOnlyFA) {\n configObject[\"displayOnlyFA\"] = true;\n }\n\n setRootComponent(configObject);\n return (\n <React.Fragment key={theBuildName}>\n {componentVisible && root}\n {loadingInfo && <Box textAlign=\"center\"><CircularProgress /></Box>}\n </React.Fragment>\n );\n }\n }\n }\n\n // fall through return if insufficient routingInfo\n return (\n <React.Fragment key={theBuildName}>\n {loadingInfo && <Box textAlign=\"center\"><CircularProgress /></Box>}\n </React.Fragment>\n );\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ViewContainer.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ViewContainer/ViewContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAY9D,8BAA8B;AAC9B,8BAA8B;AAE9B,EAAE;AACF,qHAAqH;AACrH,uHAAuH;AACvH,+BAA+B;A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AAG,GAChB,CACP,KANkB,YAAY,CAOhB,CAClB,CAAC;aACH;SACF;KACF;IAED,kDAAkD;IAClD,OAAO,CACL,KAAC,KAAK,CAAC,QAAQ,cACZ,WAAW,IAAI,CACd,KAAC,GAAG,IAAC,SAAS,EAAC,QAAQ,YACrB,KAAC,gBAAgB,KAAG,GAChB,CACP,IALkB,YAAY,CAMhB,CAClB,CAAC;AACJ,CAAC","sourcesContent":["import React, { createElement, useContext, useEffect, useState } from 'react';\nimport { Box, CircularProgress } from '@material-ui/core';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport StoreContext from '../../../../bridge/Context/StoreContext';\nimport { isEmptyObject } from '../../../helpers/common-utils';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface ViewContainerProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n name?: string;\n loadingInfo?: any; // can't be boolean until setDispatchObjState expects loadingInfo to be type null\n routingInfo?: any;\n mode?: string;\n limit?: number;\n}\n\n// ViewContainer can emit View\n// import View from '../View';\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nexport default function ViewContainer(props: ViewContainerProps) {\n // const { getPConnect, children, routingInfo, name } = props;\n const { getPConnect, name = '', mode = 'single', limit = 16, loadingInfo = false, routingInfo = null } = props;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n const { CONTAINER_TYPE, APP } = PCore.getConstants();\n const pConn = getPConnect();\n const containerMgr: any = pConn.getContainerManager();\n\n const [dispatchObjState, setDispatchObjState] = useState({\n dispatchObject: { semanticURL: '', context: '', acName: '' },\n visible: false,\n loadingInfo: null,\n isLoadingInfoChange: false\n }); // was this.state in class-based ViewContainer avoiding use of just \"state\" as the name\n\n let root;\n\n const thePConn = typeof getPConnect === 'function' ? getPConnect() : null;\n\n // beginning of functions for use by ViewContainer\n\n function buildName() {\n const context = thePConn?.getContextName();\n let viewContainerName = name;\n if (!viewContainerName) viewContainerName = '';\n return `${context?.toUpperCase()}/${viewContainerName.toUpperCase()}`;\n }\n\n function prepareDispatchObject() {\n const baseContext = pConn.getContextName();\n // const { acName = \"primary\" } = pConn.getContainerName(); // doesn't work with 8.23 typings\n let acName = pConn.getContainerName();\n if (!acName) {\n acName = 'primary';\n }\n\n return {\n semanticURL: '',\n context: baseContext,\n acName\n };\n }\n\n // determine if or not loadingInfo prop changed on next re-render\n // function getDerivedStateFromProps(nextProps, prevState) {\n // const { loadingInfo: prevLoadingInfo } = prevState;\n // const { loadingInfo: nextLoadingIndfo } = nextProps;\n // return {\n // loadingInfo: nextLoadingIndfo,\n // isLoadingInfoChange: prevLoadingInfo !== nextLoadingIndfo\n // };\n // }\n\n // set the root component that is retrieved by PConnectHOC\n function setRootComponent(configObject) {\n const { isLoadingInfoChange } = dispatchObjState;\n if (!isLoadingInfoChange) {\n root = createElement(createPConnectComponent(), configObject);\n }\n }\n\n // end of functions for use by ViewContainer\n\n // useEffect on [] -> code that should be run once (as in old constructor and in componentDidMount)\n useEffect(() => {\n // This is adapted from the class-based ViewContainer constructor\n containerMgr.initializeContainers({\n type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE\n });\n\n if (mode === CONTAINER_TYPE.MULTIPLE && limit) {\n /* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */\n PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);\n }\n\n const dispatchObject = prepareDispatchObject();\n setDispatchObjState({\n dispatchObject,\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n visible: !PCore.checkIfSemanticURL(),\n loadingInfo,\n isLoadingInfoChange: false\n });\n\n const { visible } = dispatchObjState;\n if (visible) containerMgr.addContainerItem(dispatchObject);\n\n // This is adapted from the class-based ViewContainer componentDidMount\n let objectForAddContainer;\n if (PCore.checkIfSemanticURL()) {\n objectForAddContainer = prepareDispatchObject();\n } else {\n const { dispatchObject: theDispatchObject } = dispatchObjState;\n objectForAddContainer = theDispatchObject;\n }\n\n // Getting default view label\n const navPages = pConn.getValue('pyPortal.pyPrimaryNavPages', ''); // 2nd arg empty string until typedefs allow optional\n const defaultViewLabel = Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel : '';\n // TODO: Plan is to rename window.constellationCore to window.pega (or similar)\n // And expose less via ui-bootstrap.js\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n\n if (!displayOnlyFA) {\n // configureForBrowserBookmark not applicable in Embedded mode\n PCore.configureForBrowserBookmark({\n ...objectForAddContainer,\n defaultViewLabel\n });\n }\n }, []);\n\n // This code (that's run every time the ViewContainer is called) is adapted from the class-based ViewContainer's render\n\n // Looking for routingInfo\n\n // debugging/investigation help\n // console.log(`ViewContainer props: ${JSON.stringify(props)}`);\n\n const theBuildName = buildName();\n const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();\n if (routingInfo) {\n const { accessedOrder, items } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n let componentVisible = accessedOrder.length > 0;\n const { visible } = dispatchObjState;\n componentVisible = visible || componentVisible;\n if (items[key] && items[key].view && !isEmptyObject(items[key].view)) {\n const latestItem = items[key];\n const rootView = latestItem.view;\n const { context, name: viewName } = rootView.config;\n const config: any = { meta: rootView };\n config.options = {\n context: latestItem.context,\n pageReference: context || getPConnect().getPageReference(),\n containerName: getPConnect().getContainerName(),\n containerItemName: key,\n hasForm: viewName === CREATE_DETAILS_VIEW_NAME\n };\n const configObject: any = PCore.createPConnect(config);\n\n // Add in displayOnlyFA if prop is on ViewContainer\n if (displayOnlyFA) {\n configObject.displayOnlyFA = true;\n }\n\n setRootComponent(configObject);\n return (\n <React.Fragment key={theBuildName}>\n {componentVisible && root}\n {loadingInfo && (\n <Box textAlign='center'>\n <CircularProgress />\n </Box>\n )}\n </React.Fragment>\n );\n }\n }\n }\n\n // fall through return if insufficient routingInfo\n return (\n <React.Fragment key={theBuildName}>\n {loadingInfo && (\n <Box textAlign='center'>\n <CircularProgress />\n </Box>\n )}\n </React.Fragment>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Containers/helpers.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,sBAAsB,4BAIlC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
2
|
+
export const isContainerInitialized = pConnect => {
|
|
3
|
+
const context = pConnect.getContextName();
|
|
4
|
+
const containerName = pConnect.getContainerName();
|
|
5
|
+
return PCore.getContainerUtils().isContainerInitialized(context, containerName);
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/components/infra/Containers/helpers.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,EAAE;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAC1C,MAAM,aAAa,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IAClD,OAAO,KAAK,CAAC,iBAAiB,EAAE,CAAC,sBAAsB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAClF,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/prefer-default-export\nexport const isContainerInitialized = pConnect => {\n const context = pConnect.getContextName();\n const containerName = pConnect.getContainerName();\n return PCore.getContainerUtils().isContainerInitialized(context, containerName);\n};\n"]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PConnProps } from '../../../types/PConnProps';
|
|
2
3
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
3
|
-
import type { PConnProps } from '../../../types/PConnProps';
|
|
4
4
|
interface DashboardFilterProps extends PConnProps {
|
|
5
|
-
children?: Array<any>;
|
|
6
5
|
name: string;
|
|
7
6
|
filterProp: string;
|
|
8
7
|
type?: string;
|
|
9
8
|
metadata?: any;
|
|
10
9
|
}
|
|
11
|
-
export default function DashboardFilter(props: DashboardFilterProps): JSX.Element;
|
|
10
|
+
export default function DashboardFilter(props: PropsWithChildren<DashboardFilterProps>): JSX.Element;
|
|
12
11
|
export {};
|
|
13
12
|
//# sourceMappingURL=DashboardFilter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/DashboardFilter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DashboardFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/DashboardFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,iBAAiB,EAA+B,MAAM,OAAO,CAAC;AAOnF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,4CAA4C,CAAC;AAEpD,UAAU,oBAAqB,SAAQ,UAAU;IAE/C,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,eAqIrF"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-shadow */
|
|
3
3
|
/* eslint-disable operator-assignment */
|
|
4
|
-
import {
|
|
4
|
+
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
5
|
+
import { TextField } from '@material-ui/core';
|
|
5
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
6
7
|
import { debounce } from 'throttle-debounce';
|
|
7
|
-
import { createFilter, combineFilters, getFormattedDate } from './filterUtils';
|
|
8
|
-
import { getFilterExpression } from './filterUtils';
|
|
9
|
-
import { TextField } from '@material-ui/core';
|
|
10
|
-
import React from 'react';
|
|
11
8
|
import DatePicker from 'react-datepicker';
|
|
9
|
+
import { createFilter, combineFilters, getFormattedDate, getFilterExpression } from './filterUtils';
|
|
12
10
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
13
11
|
export default function DashboardFilter(props) {
|
|
14
12
|
const { children = [], name, filterProp, type = '', metadata = null, getPConnect } = props;
|
|
@@ -81,16 +79,14 @@ export default function DashboardFilter(props) {
|
|
|
81
79
|
dateRangeChangeHandler({ start, end });
|
|
82
80
|
};
|
|
83
81
|
const label = metadata.config.label.substring(3);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
fireFilterChangeDebounced(event.target.value);
|
|
94
|
-
} }, children))));
|
|
82
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
83
|
+
const CustomDateInput = forwardRef(({ value, onClick }, ref) => (_jsx(TextField, { label: label, variant: 'outlined', fullWidth: true, value: value, size: 'small', onClick: onClick, ref: ref, children: value })));
|
|
84
|
+
return (_jsxs(_Fragment, { children: [type === 'DateTime' && (_jsx(DatePicker, { onChange: onChange, startDate: startDate, endDate: endDate, selectsRange: true, enableTabLoop: false, customInput: _jsx(CustomDateInput, {}) })), type === 'AutoComplete' && (_jsx("span", { onChange: event => {
|
|
85
|
+
if (event && event.target && !event.target.value) {
|
|
86
|
+
fireFilterChange('ALL');
|
|
87
|
+
}
|
|
88
|
+
}, children: renderAutoComplete() })), children && (_jsx("span", { onChange: event => {
|
|
89
|
+
fireFilterChangeDebounced(event.target.value);
|
|
90
|
+
}, children: children }))] }));
|
|
95
91
|
}
|
|
96
92
|
//# sourceMappingURL=DashboardFilter.js.map
|