@pega/react-sdk-components 24.2.11 → 25.1.11
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/lib/bridge/Context/StoreContext.d.ts +0 -1
- package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
- 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 +0 -6
- 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 +11 -14
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.css +46 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +2 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +18 -16
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
- 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.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +50 -35
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +3 -3
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- 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 +32 -4
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +12 -2
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +52 -3
- 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 +2 -2
- 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 +0 -2
- 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 +3 -6
- 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 +4 -7
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +2 -4
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +6 -9
- 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 +6 -7
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +2 -2
- package/lib/components/field/Group/Group.d.ts.map +1 -1
- package/lib/components/field/Group/Group.js +4 -3
- package/lib/components/field/Group/Group.js.map +1 -1
- 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 +4 -5
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Location/Location.css +4 -0
- package/lib/components/field/Location/Location.d.ts +11 -0
- package/lib/components/field/Location/Location.d.ts.map +1 -0
- package/lib/components/field/Location/Location.js +158 -0
- package/lib/components/field/Location/Location.js.map +1 -0
- package/lib/components/field/Location/index.d.ts +2 -0
- package/lib/components/field/Location/index.d.ts.map +1 -0
- package/lib/components/field/Location/index.js +2 -0
- package/lib/components/field/Location/index.js.map +1 -0
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
- package/lib/components/field/Multiselect/utils.d.ts +2 -1
- package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
- package/lib/components/field/Multiselect/utils.js +1 -1
- package/lib/components/field/Multiselect/utils.js.map +1 -1
- package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
- package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
- package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
- package/lib/components/field/ObjectReference/index.d.ts +2 -0
- package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/index.js +2 -0
- package/lib/components/field/ObjectReference/index.js.map +1 -0
- package/lib/components/field/ObjectReference/utils.d.ts +17 -0
- package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/utils.js +99 -0
- package/lib/components/field/ObjectReference/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +2 -5
- 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 +6 -4
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.css +79 -0
- package/lib/components/field/RichText/RichText.d.ts +2 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +1 -0
- 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 +1 -2
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
- package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/SelectableCard.js +68 -0
- package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
- package/lib/components/field/SelectableCard/index.d.ts +2 -0
- package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/index.js +2 -0
- package/lib/components/field/SelectableCard/index.js.map +1 -0
- package/lib/components/field/SelectableCard/utils.d.ts +13 -0
- package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/utils.js +183 -0
- package/lib/components/field/SelectableCard/utils.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +1 -1
- 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 +4 -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 +0 -1
- 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 +4 -5
- package/lib/components/field/TextInput/TextInput.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 +2 -5
- 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 +4 -5
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +1 -2
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +1 -2
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentShared.d.ts +2 -0
- package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
- package/lib/components/helpers/attachmentShared.js +6 -0
- package/lib/components/helpers/attachmentShared.js.map +1 -0
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -1
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +1 -2
- 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 +0 -1
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts +1 -1
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +1 -0
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +8 -4
- 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 +0 -1
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +1 -0
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
- package/lib/components/helpers/object-utils.d.ts +9 -0
- package/lib/components/helpers/object-utils.d.ts.map +1 -0
- package/lib/components/helpers/object-utils.js +11 -0
- package/lib/components/helpers/object-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +111 -5
- 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.map +1 -1
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -0
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +7 -1
- 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 +0 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +38 -30
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Assignment/useValidationBanner.d.ts +7 -0
- package/lib/components/infra/Assignment/useValidationBanner.d.ts.map +1 -0
- package/lib/components/infra/Assignment/useValidationBanner.js +26 -0
- package/lib/components/infra/Assignment/useValidationBanner.js.map +1 -0
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +20 -85
- 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.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +5 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -5
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +5 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +7 -11
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
- package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/container-helpers.js +46 -1
- package/lib/components/infra/Containers/container-helpers.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +1 -4
- 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 +2 -3
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +2 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +26 -13
- package/lib/components/infra/DeferLoad/DeferLoad.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 +0 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +48 -70
- package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +19 -37
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +19 -7
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +1 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +6 -3
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +1 -1
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +4 -6
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +1 -1
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +2 -2
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +2 -2
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +7 -7
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js +68 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +23 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +26 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +179 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +25 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
- package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/index.js +2 -0
- package/lib/components/template/AdvancedSearch/index.js.map +1 -0
- package/lib/components/template/AppShell/AppShell.css +1 -5
- package/lib/components/template/AppShell/AppShell.d.ts +2 -2
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +10 -13
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +22 -39
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +2 -2
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +13 -15
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +0 -1
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +9 -2
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +239 -80
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
- package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
- package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
- package/lib/components/template/DataReference/SearchForm.js +87 -0
- package/lib/components/template/DataReference/SearchForm.js.map +1 -0
- package/lib/components/template/DataReference/utils.d.ts +15 -0
- package/lib/components/template/DataReference/utils.d.ts.map +1 -0
- package/lib/components/template/DataReference/utils.js +75 -0
- package/lib/components/template/DataReference/utils.js.map +1 -0
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.js +1 -2
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
- package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
- package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
- package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
- package/lib/components/template/DefaultPage/index.d.ts +2 -0
- package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/index.js +2 -0
- package/lib/components/template/DefaultPage/index.js.map +1 -0
- package/lib/components/template/Details/Details/Details.d.ts +1 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +2 -3
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +2 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +8 -5
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/HierarchicalForm/HierarchicalForm.d.ts +4 -0
- package/lib/components/template/HierarchicalForm/HierarchicalForm.d.ts.map +1 -0
- package/lib/components/template/HierarchicalForm/HierarchicalForm.js +16 -0
- package/lib/components/template/HierarchicalForm/HierarchicalForm.js.map +1 -0
- package/lib/components/template/HierarchicalForm/hooks.d.ts +15 -0
- package/lib/components/template/HierarchicalForm/hooks.d.ts.map +1 -0
- package/lib/components/template/HierarchicalForm/hooks.js +163 -0
- package/lib/components/template/HierarchicalForm/hooks.js.map +1 -0
- package/lib/components/template/HierarchicalForm/index.d.ts +2 -0
- package/lib/components/template/HierarchicalForm/index.d.ts.map +1 -0
- package/lib/components/template/HierarchicalForm/index.js +2 -0
- package/lib/components/template/HierarchicalForm/index.js.map +1 -0
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +5 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +186 -70
- 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 +2 -5
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +28 -5
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +4 -2
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +13 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/ObjectPage/index.d.ts +2 -0
- package/lib/components/template/ObjectPage/index.d.ts.map +1 -0
- package/lib/components/template/ObjectPage/index.js +2 -0
- package/lib/components/template/ObjectPage/index.js.map +1 -0
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +84 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.js +2 -0
- package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +37 -33
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.d.ts +17 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.d.ts.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.js +94 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.js.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.d.ts +2 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.d.ts.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.js +2 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.js.map +1 -0
- 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 +3 -2
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +102 -1
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/template/utils.d.ts +7 -0
- package/lib/components/template/utils.d.ts.map +1 -0
- package/lib/components/template/utils.js +52 -0
- package/lib/components/template/utils.js.map +1 -0
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +6 -8
- package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +255 -202
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
- package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
- package/lib/components/widget/Attachment/Attachment.types.js +2 -0
- package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
- 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 +2 -2
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +2 -2
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +0 -2
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +1 -13
- 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 +21 -16
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
- package/lib/hooks/useAfterInitialEffect.js.map +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/hooks/useFocusFirstField.d.ts +3 -3
- package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
- package/lib/hooks/useFocusFirstField.js +19 -12
- package/lib/hooks/useFocusFirstField.js.map +1 -1
- package/lib/hooks/useGetTabsCount.d.ts +10 -0
- package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
- package/lib/hooks/useGetTabsCount.js +165 -0
- package/lib/hooks/useGetTabsCount.js.map +1 -0
- package/lib/hooks/useIsMount.d.ts +2 -0
- package/lib/hooks/useIsMount.d.ts.map +1 -0
- package/lib/hooks/useIsMount.js +9 -0
- package/lib/hooks/useIsMount.js.map +1 -0
- package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
- package/lib/mediaco/ToDo/ToDo.css +81 -0
- package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
- package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
- package/lib/mediaco/ToDo/ToDo.js +187 -0
- package/lib/mediaco/ToDo/ToDo.js.map +1 -0
- package/lib/mediaco/ToDo/index.d.ts +2 -0
- package/lib/mediaco/ToDo/index.d.ts.map +1 -0
- package/lib/mediaco/ToDo/index.js +2 -0
- package/lib/mediaco/ToDo/index.js.map +1 -0
- package/lib/samples/Embedded/styles.css +26 -0
- package/lib/sdk-pega-component-map.d.ts +125 -103
- package/lib/sdk-pega-component-map.d.ts.map +1 -1
- package/lib/sdk-pega-component-map.js +26 -3
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/theme.d.ts +30 -1
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +209 -2
- package/lib/theme.js.map +1 -1
- package/lib/types/PConnProps.d.ts +1 -1
- package/package.json +32 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +0 -13
- package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
- package/lib/components/helpers/attachmentHelpers.js +0 -72
- package/lib/components/helpers/attachmentHelpers.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { useTheme } from '@mui/material/styles';
|
|
4
4
|
import makeStyles from '@mui/styles/makeStyles';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { Drawer, List, ListItem, ListItemIcon, ListItemText,
|
|
6
|
+
import { Drawer, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Collapse, Divider, IconButton, Menu, MenuItem, Typography } from '@mui/material';
|
|
7
7
|
import PersonOutlineIcon from '@mui/icons-material/PersonOutlineOutlined';
|
|
8
8
|
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
9
9
|
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
@@ -65,7 +65,8 @@ const useStyles = makeStyles(theme => ({
|
|
|
65
65
|
},
|
|
66
66
|
appListLogo: {
|
|
67
67
|
marginRight: theme.spacing(2),
|
|
68
|
-
width: '3.6rem'
|
|
68
|
+
width: '3.6rem',
|
|
69
|
+
filter: 'var(--svg-color)'
|
|
69
70
|
},
|
|
70
71
|
appListIcon: {
|
|
71
72
|
color: theme.palette.getContrastText(theme.palette.primary.light)
|
|
@@ -94,14 +95,21 @@ export default function NavBar(props) {
|
|
|
94
95
|
const [bShowOperatorButtons, setBShowOperatorButtons] = useState(false);
|
|
95
96
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
96
97
|
const localeUtils = PCore.getLocaleUtils();
|
|
97
|
-
const localeReference = pConn.getValue('.pyLocaleReference');
|
|
98
98
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
99
99
|
const localeCategory = 'AppShell';
|
|
100
100
|
const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat('pzpega-logo-mark.svg');
|
|
101
101
|
const portalOperator = PCore.getEnvironmentInfo().getOperatorName();
|
|
102
102
|
const portalApp = PCore.getEnvironmentInfo().getApplicationLabel();
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
const localeReference = PCore.getLocaleUtils().getPortalLocaleReference() || pConn.getValue('.pyLocaleReference');
|
|
103
105
|
useEffect(() => {
|
|
104
|
-
|
|
106
|
+
const updatedPages = pages.map((page) => {
|
|
107
|
+
const destinationObject = {};
|
|
108
|
+
pConn.resolveConfigProps({ defaultHeading: page.pyDefaultHeading || page.pyLabel, localeReference: page.pyLocalizationReference }, destinationObject);
|
|
109
|
+
const name = localeUtils.getLocaleValue(destinationObject.defaultHeading, '', destinationObject.localeReference || localeReference);
|
|
110
|
+
return { ...page, name };
|
|
111
|
+
});
|
|
112
|
+
setNavPages(updatedPages);
|
|
105
113
|
}, [pages]);
|
|
106
114
|
function navPanelButtonClick(oPageData) {
|
|
107
115
|
const { pyClassName, pyRuleName } = oPageData;
|
|
@@ -109,8 +117,10 @@ export default function NavBar(props) {
|
|
|
109
117
|
.getActionsApi()
|
|
110
118
|
.showPage(pyRuleName, pyClassName)
|
|
111
119
|
.then(() => {
|
|
112
|
-
// eslint-disable-next-line no-console
|
|
113
120
|
console.log(`${localizedVal('showPage completed', localeCategory)}`);
|
|
121
|
+
})
|
|
122
|
+
.catch(error => {
|
|
123
|
+
console.error('Failed to navigate to page from NavBar', error);
|
|
114
124
|
});
|
|
115
125
|
}
|
|
116
126
|
function navPanelCreateCaseType(sCaseType, sFlowType) {
|
|
@@ -123,8 +133,10 @@ export default function NavBar(props) {
|
|
|
123
133
|
.getActionsApi()
|
|
124
134
|
.createWork(sCaseType, actionInfo)
|
|
125
135
|
.then(() => {
|
|
126
|
-
// eslint-disable-next-line no-console
|
|
127
136
|
console.log(`${localizedVal('createWork completed', localeCategory)}`);
|
|
137
|
+
})
|
|
138
|
+
.catch(error => {
|
|
139
|
+
console.error('Failed to create case from NavBar', error);
|
|
128
140
|
});
|
|
129
141
|
}
|
|
130
142
|
// Toggle showing the Operator buttons
|
|
@@ -154,7 +166,7 @@ export default function NavBar(props) {
|
|
|
154
166
|
}, [isDesktop]);
|
|
155
167
|
return (_jsxs(Drawer, { variant: 'permanent', classes: {
|
|
156
168
|
paper: clsx(classes.drawerPaper, !open && classes.drawerPaperClose)
|
|
157
|
-
}, open: open && isDesktop, children: [open ? (_jsx(List, { className: classes.appListItem, children: _jsxs(ListItem, { onClick: handleDrawerOpen,
|
|
169
|
+
}, open: open && isDesktop, children: [open ? (_jsx(List, { className: classes.appListItem, children: _jsxs(ListItem, { onClick: handleDrawerOpen, secondaryAction: _jsx(IconButton, { edge: 'end', onClick: handleDrawerOpen, size: 'large', children: _jsx(ChevronLeftIcon, { className: classes.appListIcon }) }), children: [_jsx(ListItemIcon, { children: _jsx("img", { src: portalLogoImage, className: classes.appListLogo }) }), _jsx(ListItemText, { primary: _jsx(Typography, { variant: 'h6', className: classes.applicationLabel, children: portalApp }) })] }) })) : (_jsx("div", { className: classes.appListDiv, onClick: handleDrawerOpen, children: _jsx(ChevronRightIcon, { className: classes.appListIcon, id: 'chevron-right-icon', fontSize: 'large' }) })), _jsx(List, { children: _jsxs(ListItemButton, { onClick: handleCaseItemClick, children: [_jsx(ListItemIcon, { children: bShowCaseTypes && open ? _jsx(ClearOutlinedIcon, { fontSize: 'large' }) : _jsx(AddIcon, { fontSize: 'large' }) }), _jsx(ListItemText, { primary: 'Create' }), bShowCaseTypes ? _jsx(ExpandLess, {}) : _jsx(ExpandMore, {})] }) }), _jsx(Collapse, { in: bShowCaseTypes && open, timeout: 'auto', unmountOnExit: true, className: 'scrollable', children: _jsx(List, { component: 'div', disablePadding: true, children: caseTypes.map(caseType => (_jsxs(ListItemButton, { className: classes.nested, onClick: () => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType), children: [_jsx(ListItemIcon, { children: _jsx(WorkOutlineIcon, { fontSize: 'large' }) }), _jsx(ListItemText, { primary: localeUtils.getLocaleValue(caseType.pyLabel, '', localeUtils.getCaseLocaleReference(caseType.pyClassName)) })] }, caseType.pyLabel))) }) }), _jsx(List, { children: navPages.map(page => (_jsxs(ListItemButton, { onClick: () => navPanelButtonClick(page), children: [_jsx(ListItemIcon, { children: iconMap[page.pxPageViewIcon] }), _jsx(ListItemText, { primary: page.name })] }, page.pyLabel))) }), _jsx(Divider, {}), _jsx(List, { className: 'marginTopAuto', children: _jsxs(_Fragment, { children: [_jsxs(ListItem, { onClick: navPanelOperatorButtonClick, secondaryAction: open ? (_jsx(IconButton, { edge: 'end', onClick: navPanelOperatorButtonClick, size: 'large', children: _jsx(ChevronRightIcon, {}) })) : null, children: [_jsx(ListItemIcon, { id: 'person-icon', children: _jsx(PersonOutlineIcon, { fontSize: 'large' }) }), _jsx(ListItemText, { primary: portalOperator })] }), _jsx(Menu, { anchorEl: anchorEl, keepMounted: bShowOperatorButtons, open: bShowOperatorButtons, onClick: navPanelOperatorButtonClick, anchorOrigin: {
|
|
158
170
|
vertical: 'top',
|
|
159
171
|
horizontal: 'right'
|
|
160
172
|
}, transformOrigin: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.js","sourceRoot":"","sources":["../../../../src/components/infra/NavBar/NavBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,uBAAuB,EACvB,QAAQ,EACR,OAAO,EACP,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,iBAAiB,MAAM,2CAA2C,CAAC;AAC1E,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,gBAAgB,MAAM,kCAAkC,CAAC;AAChE,OAAO,gBAAgB,MAAM,kCAAkC,CA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AC,gBAAgB,KAAG,GACT,GACW,CAC3B,IACQ,EACX,KAAC,IAAI,IACH,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,oBAAoB,EAC1B,OAAO,EAAE,2BAA2B,EACpC,YAAY,EAAE;gCACZ,QAAQ,EAAE,KAAK;gCACf,UAAU,EAAE,OAAO;6BACpB,EACD,eAAe,EAAE;gCACf,QAAQ,EAAE,KAAK;gCACf,UAAU,EAAE,MAAM;6BACnB,YAED,MAAC,QAAQ,IAAC,OAAO,EAAE,MAAM,aACvB,KAAC,YAAY,cACX,KAAC,aAAa,IAAC,QAAQ,EAAC,OAAO,GAAG,GACrB,EACf,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,YAAE,YAAY,CAAC,SAAS,EAAE,cAAc,CAAC,GAAc,IAC3E,GACN,IACN,GACE,IACA,CACV,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { useTheme } from '@mui/material/styles';\nimport makeStyles from '@mui/styles/makeStyles';\nimport clsx from 'clsx';\n\nimport {\n Drawer,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n ListItemSecondaryAction,\n Collapse,\n Divider,\n IconButton,\n Menu,\n MenuItem,\n Typography\n} from '@mui/material';\nimport PersonOutlineIcon from '@mui/icons-material/PersonOutlineOutlined';\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft';\nimport ChevronRightIcon from '@mui/icons-material/ChevronRight';\nimport FlagOutlinedIcon from '@mui/icons-material/FlagOutlined';\nimport HomeOutlinedIcon from '@mui/icons-material/HomeOutlined';\nimport TabletAndroidOutlineIcon from '@mui/icons-material/TabletAndroidOutlined';\nimport AirportShuttleOutlinedIcon from '@mui/icons-material/AirportShuttleOutlined';\nimport EditOutlinedIcon from '@mui/icons-material/EditOutlined';\nimport ExpandLess from '@mui/icons-material/ExpandLess';\nimport ExpandMore from '@mui/icons-material/ExpandMore';\nimport AddIcon from '@mui/icons-material/Add';\nimport WorkOutlineIcon from '@mui/icons-material/WorkOutline';\nimport ClearOutlinedIcon from '@mui/icons-material/ClearOutlined';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { logout } from '@pega/auth/lib/sdk-auth-manager';\n\nimport { useNavBar } from '../../helpers/reactContextHelpers';\nimport { Utils } from '../../helpers/utils';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport './NavBar.css';\n\ninterface NavBarProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n // eslint-disable-next-line react/no-unused-prop-types\n appName?: string;\n pages?: any[];\n caseTypes: any[];\n pConn?: any;\n}\n\nconst iconMap = {\n 'pi pi-headline': <HomeOutlinedIcon fontSize='large' />,\n 'pi pi-flag-solid': <FlagOutlinedIcon fontSize='large' />,\n 'pi pi-home-solid': <HomeOutlinedIcon fontSize='large' />,\n 'pi pi-tablet': <TabletAndroidOutlineIcon fontSize='large' />,\n 'pi pi-ambulance': <AirportShuttleOutlinedIcon fontSize='large' />,\n 'pi pi-ink-solid': <EditOutlinedIcon fontSize='large' />,\n 'pi pi-columns': <HomeOutlinedIcon fontSize='large' />\n};\n\nconst drawerWidth = 300;\n\nconst useStyles = makeStyles(theme => ({\n drawerPaper: {\n position: 'relative',\n whiteSpace: 'nowrap',\n width: drawerWidth,\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen\n }),\n height: '100vh'\n },\n drawerPaperClose: {\n overflowX: 'hidden',\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen\n }),\n width: theme.spacing(7),\n [theme.breakpoints.up('md')]: {\n width: theme.spacing(9)\n },\n height: '100vh'\n },\n nested: {\n paddingLeft: theme.spacing(4)\n },\n appListItem: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n appListLogo: {\n marginRight: theme.spacing(2),\n width: '3.6rem'\n },\n appListIcon: {\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n appListDiv: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light),\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n applicationLabel: {\n whiteSpace: 'initial'\n }\n}));\n\nexport default function NavBar(props: NavBarProps) {\n const { pConn, pages = [], caseTypes = [] } = props;\n\n const classes = useStyles();\n const theme = useTheme();\n const isDesktop = useMediaQuery(theme.breakpoints.up('md'));\n\n const { open, setOpen } = useNavBar();\n const [navPages, setNavPages] = useState(JSON.parse(JSON.stringify(pages)));\n const [bShowCaseTypes, setBShowCaseTypes] = useState(true);\n const [bShowOperatorButtons, setBShowOperatorButtons] = useState(false);\n const [anchorEl, setAnchorEl] = useState(null);\n const localeUtils = PCore.getLocaleUtils();\n const localeReference = pConn.getValue('.pyLocaleReference');\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'AppShell';\n\n const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat('pzpega-logo-mark.svg');\n const portalOperator = PCore.getEnvironmentInfo().getOperatorName();\n const portalApp = PCore.getEnvironmentInfo().getApplicationLabel();\n\n useEffect(() => {\n setNavPages(JSON.parse(JSON.stringify(pages)));\n }, [pages]);\n\n function navPanelButtonClick(oPageData: any) {\n const { pyClassName, pyRuleName } = oPageData;\n\n pConn\n .getActionsApi()\n .showPage(pyRuleName, pyClassName)\n .then(() => {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('showPage completed', localeCategory)}`);\n });\n }\n\n function navPanelCreateCaseType(sCaseType: string, sFlowType: string) {\n setOpen(false);\n const actionInfo = {\n containerName: 'primary',\n flowType: sFlowType || 'pyStartCase'\n };\n\n pConn\n .getActionsApi()\n .createWork(sCaseType, actionInfo)\n .then(() => {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('createWork completed', localeCategory)}`);\n });\n }\n\n // Toggle showing the Operator buttons\n function navPanelOperatorButtonClick(evt) {\n setBShowOperatorButtons(!bShowOperatorButtons);\n if (!bShowOperatorButtons) setAnchorEl(evt.currentTarget);\n else setAnchorEl(null);\n }\n\n const handleDrawerOpen = () => {\n setOpen(!open);\n };\n\n const handleCaseItemClick = () => {\n if (!open) {\n setOpen(true);\n setBShowCaseTypes(true);\n } else setBShowCaseTypes(!bShowCaseTypes);\n };\n\n useEffect(() => {\n if (!isDesktop) setOpen(false);\n else setOpen(true);\n }, [isDesktop]);\n\n return (\n <Drawer\n variant='permanent'\n classes={{\n paper: clsx(classes.drawerPaper, !open && classes.drawerPaperClose)\n }}\n open={open && isDesktop}\n >\n {open ? (\n <List className={classes.appListItem}>\n <ListItem onClick={handleDrawerOpen}>\n <ListItemIcon>\n <img src={portalLogoImage} className={classes.appListLogo} />\n </ListItemIcon>\n <ListItemText\n primary={\n <Typography variant='h6' className={classes.applicationLabel}>\n {portalApp}\n </Typography>\n }\n />\n <ListItemSecondaryAction>\n <IconButton edge='end' onClick={handleDrawerOpen} size='large'>\n <ChevronLeftIcon className={classes.appListIcon} />\n </IconButton>\n </ListItemSecondaryAction>\n </ListItem>\n </List>\n ) : (\n <div className={classes.appListDiv} onClick={handleDrawerOpen}>\n <ChevronRightIcon className={classes.appListIcon} id='chevron-right-icon' fontSize='large' />\n </div>\n )}\n <List>\n <ListItem button onClick={handleCaseItemClick}>\n <ListItemIcon>{bShowCaseTypes && open ? <ClearOutlinedIcon fontSize='large' /> : <AddIcon fontSize='large' />}</ListItemIcon>\n <ListItemText primary='Create' />\n {bShowCaseTypes ? <ExpandLess /> : <ExpandMore />}\n </ListItem>\n </List>\n <Collapse in={bShowCaseTypes && open} timeout='auto' unmountOnExit className='scrollable'>\n <List component='div' disablePadding>\n {caseTypes.map(caseType => (\n <ListItem\n button\n className={classes.nested}\n onClick={() => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)}\n key={caseType.pyLabel}\n >\n <ListItemIcon>\n <WorkOutlineIcon fontSize='large' />\n </ListItemIcon>\n <ListItemText primary={localeUtils.getLocaleValue(caseType.pyLabel, '', localeReference)} />\n </ListItem>\n ))}\n </List>\n </Collapse>\n <List>\n {navPages.map(page => (\n <ListItem button onClick={() => navPanelButtonClick(page)} key={page.pyLabel}>\n <ListItemIcon>{iconMap[page.pxPageViewIcon]}</ListItemIcon>\n <ListItemText primary={localeUtils.getLocaleValue(page.pyLabel, '', localeReference)} />\n </ListItem>\n ))}\n </List>\n <Divider />\n <List className='marginTopAuto'>\n <>\n <ListItem onClick={navPanelOperatorButtonClick}>\n <ListItemIcon id='person-icon'>\n <PersonOutlineIcon fontSize='large' />\n </ListItemIcon>\n <ListItemText primary={portalOperator} />\n {open && (\n <ListItemSecondaryAction>\n <IconButton edge='end' onClick={navPanelOperatorButtonClick} size='large'>\n <ChevronRightIcon />\n </IconButton>\n </ListItemSecondaryAction>\n )}\n </ListItem>\n <Menu\n anchorEl={anchorEl}\n keepMounted={bShowOperatorButtons}\n open={bShowOperatorButtons}\n onClick={navPanelOperatorButtonClick}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left'\n }}\n >\n <MenuItem onClick={logout}>\n <ListItemIcon>\n <ArrowBackIcon fontSize='large' />\n </ListItemIcon>\n <Typography variant='inherit'>{localizedVal('Log off', localeCategory)}</Typography>\n </MenuItem>\n </Menu>\n </>\n </List>\n </Drawer>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"NavBar.js","sourceRoot":"","sources":["../../../../src/components/infra/NavBar/NavBar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,IAAI,MAAM,MAAM,CAAC;AAEx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;gCACZ,QAAQ,EAAE,KAAK;gCACf,UAAU,EAAE,OAAO;6BACpB,EACD,eAAe,EAAE;gCACf,QAAQ,EAAE,KAAK;gCACf,UAAU,EAAE,MAAM;6BACnB,YAED,MAAC,QAAQ,IAAC,OAAO,EAAE,MAAM,aACvB,KAAC,YAAY,cACX,KAAC,aAAa,IAAC,QAAQ,EAAC,OAAO,GAAG,GACrB,EACf,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,YAAE,YAAY,CAAC,SAAS,EAAE,cAAc,CAAC,GAAc,IAC3E,GACN,IACN,GACE,IACA,CACV,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { useTheme } from '@mui/material/styles';\nimport makeStyles from '@mui/styles/makeStyles';\nimport clsx from 'clsx';\n\nimport {\n Drawer,\n List,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Collapse,\n Divider,\n IconButton,\n Menu,\n MenuItem,\n Typography\n} from '@mui/material';\nimport PersonOutlineIcon from '@mui/icons-material/PersonOutlineOutlined';\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft';\nimport ChevronRightIcon from '@mui/icons-material/ChevronRight';\nimport FlagOutlinedIcon from '@mui/icons-material/FlagOutlined';\nimport HomeOutlinedIcon from '@mui/icons-material/HomeOutlined';\nimport TabletAndroidOutlineIcon from '@mui/icons-material/TabletAndroidOutlined';\nimport AirportShuttleOutlinedIcon from '@mui/icons-material/AirportShuttleOutlined';\nimport EditOutlinedIcon from '@mui/icons-material/EditOutlined';\nimport ExpandLess from '@mui/icons-material/ExpandLess';\nimport ExpandMore from '@mui/icons-material/ExpandMore';\nimport AddIcon from '@mui/icons-material/Add';\nimport WorkOutlineIcon from '@mui/icons-material/WorkOutline';\nimport ClearOutlinedIcon from '@mui/icons-material/ClearOutlined';\nimport ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { logout } from '@pega/auth/lib/sdk-auth-manager';\n\nimport { useNavBar } from '../../helpers/reactContextHelpers';\nimport { Utils } from '../../helpers/utils';\nimport type { PConnProps } from '../../../types/PConnProps';\n\nimport './NavBar.css';\n\ninterface NavBarProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n\n appName?: string;\n pages?: any[];\n caseTypes: any[];\n pConn?: any;\n}\n\nconst iconMap = {\n 'pi pi-headline': <HomeOutlinedIcon fontSize='large' />,\n 'pi pi-flag-solid': <FlagOutlinedIcon fontSize='large' />,\n 'pi pi-home-solid': <HomeOutlinedIcon fontSize='large' />,\n 'pi pi-tablet': <TabletAndroidOutlineIcon fontSize='large' />,\n 'pi pi-ambulance': <AirportShuttleOutlinedIcon fontSize='large' />,\n 'pi pi-ink-solid': <EditOutlinedIcon fontSize='large' />,\n 'pi pi-columns': <HomeOutlinedIcon fontSize='large' />\n};\n\nconst drawerWidth = 300;\n\nconst useStyles = makeStyles(theme => ({\n drawerPaper: {\n position: 'relative',\n whiteSpace: 'nowrap',\n width: drawerWidth,\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen\n }),\n height: '100vh'\n },\n drawerPaperClose: {\n overflowX: 'hidden',\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen\n }),\n width: theme.spacing(7),\n [theme.breakpoints.up('md')]: {\n width: theme.spacing(9)\n },\n height: '100vh'\n },\n nested: {\n paddingLeft: theme.spacing(4)\n },\n appListItem: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n appListLogo: {\n marginRight: theme.spacing(2),\n width: '3.6rem',\n filter: 'var(--svg-color)'\n },\n appListIcon: {\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n appListDiv: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light),\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n applicationLabel: {\n whiteSpace: 'initial'\n }\n}));\n\nexport default function NavBar(props: NavBarProps) {\n const { pConn, pages = [], caseTypes = [] } = props;\n\n const classes = useStyles();\n const theme = useTheme();\n const isDesktop = useMediaQuery(theme.breakpoints.up('md'));\n\n const { open, setOpen } = useNavBar();\n const [navPages, setNavPages] = useState(JSON.parse(JSON.stringify(pages)));\n const [bShowCaseTypes, setBShowCaseTypes] = useState(true);\n const [bShowOperatorButtons, setBShowOperatorButtons] = useState(false);\n const [anchorEl, setAnchorEl] = useState(null);\n const localeUtils = PCore.getLocaleUtils();\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'AppShell';\n\n const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat('pzpega-logo-mark.svg');\n const portalOperator = PCore.getEnvironmentInfo().getOperatorName();\n const portalApp = PCore.getEnvironmentInfo().getApplicationLabel();\n // @ts-ignore\n const localeReference = PCore.getLocaleUtils().getPortalLocaleReference() || pConn.getValue('.pyLocaleReference');\n useEffect(() => {\n const updatedPages = pages.map((page: any) => {\n const destinationObject: any = {};\n pConn.resolveConfigProps(\n { defaultHeading: page.pyDefaultHeading || page.pyLabel, localeReference: page.pyLocalizationReference },\n destinationObject\n );\n const name = localeUtils.getLocaleValue(destinationObject.defaultHeading, '', destinationObject.localeReference || localeReference);\n return { ...page, name };\n });\n setNavPages(updatedPages);\n }, [pages]);\n\n function navPanelButtonClick(oPageData: any) {\n const { pyClassName, pyRuleName } = oPageData;\n pConn\n .getActionsApi()\n .showPage(pyRuleName, pyClassName)\n .then(() => {\n console.log(`${localizedVal('showPage completed', localeCategory)}`);\n })\n .catch(error => {\n console.error('Failed to navigate to page from NavBar', error);\n });\n }\n\n function navPanelCreateCaseType(sCaseType: string, sFlowType: string) {\n setOpen(false);\n const actionInfo = {\n containerName: 'primary',\n flowType: sFlowType || 'pyStartCase'\n };\n pConn\n .getActionsApi()\n .createWork(sCaseType, actionInfo)\n .then(() => {\n console.log(`${localizedVal('createWork completed', localeCategory)}`);\n })\n .catch(error => {\n console.error('Failed to create case from NavBar', error);\n });\n }\n\n // Toggle showing the Operator buttons\n function navPanelOperatorButtonClick(evt) {\n setBShowOperatorButtons(!bShowOperatorButtons);\n if (!bShowOperatorButtons) setAnchorEl(evt.currentTarget);\n else setAnchorEl(null);\n }\n\n const handleDrawerOpen = () => {\n setOpen(!open);\n };\n\n const handleCaseItemClick = () => {\n if (!open) {\n setOpen(true);\n setBShowCaseTypes(true);\n } else setBShowCaseTypes(!bShowCaseTypes);\n };\n\n useEffect(() => {\n if (!isDesktop) setOpen(false);\n else setOpen(true);\n }, [isDesktop]);\n\n return (\n <Drawer\n variant='permanent'\n classes={{\n paper: clsx(classes.drawerPaper, !open && classes.drawerPaperClose)\n }}\n open={open && isDesktop}\n >\n {open ? (\n <List className={classes.appListItem}>\n <ListItem\n onClick={handleDrawerOpen}\n secondaryAction={\n <IconButton edge='end' onClick={handleDrawerOpen} size='large'>\n <ChevronLeftIcon className={classes.appListIcon} />\n </IconButton>\n }\n >\n <ListItemIcon>\n <img src={portalLogoImage} className={classes.appListLogo} />\n </ListItemIcon>\n <ListItemText\n primary={\n <Typography variant='h6' className={classes.applicationLabel}>\n {portalApp}\n </Typography>\n }\n />\n </ListItem>\n </List>\n ) : (\n <div className={classes.appListDiv} onClick={handleDrawerOpen}>\n <ChevronRightIcon className={classes.appListIcon} id='chevron-right-icon' fontSize='large' />\n </div>\n )}\n <List>\n <ListItemButton onClick={handleCaseItemClick}>\n <ListItemIcon>{bShowCaseTypes && open ? <ClearOutlinedIcon fontSize='large' /> : <AddIcon fontSize='large' />}</ListItemIcon>\n <ListItemText primary='Create' />\n {bShowCaseTypes ? <ExpandLess /> : <ExpandMore />}\n </ListItemButton>\n </List>\n <Collapse in={bShowCaseTypes && open} timeout='auto' unmountOnExit className='scrollable'>\n <List component='div' disablePadding>\n {caseTypes.map(caseType => (\n <ListItemButton\n className={classes.nested}\n onClick={() => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)}\n key={caseType.pyLabel}\n >\n <ListItemIcon>\n <WorkOutlineIcon fontSize='large' />\n </ListItemIcon>\n <ListItemText primary={localeUtils.getLocaleValue(caseType.pyLabel, '', localeUtils.getCaseLocaleReference(caseType.pyClassName))} />\n </ListItemButton>\n ))}\n </List>\n </Collapse>\n <List>\n {navPages.map(page => (\n <ListItemButton onClick={() => navPanelButtonClick(page)} key={page.pyLabel}>\n <ListItemIcon>{iconMap[page.pxPageViewIcon]}</ListItemIcon>\n <ListItemText primary={page.name} />\n </ListItemButton>\n ))}\n </List>\n <Divider />\n <List className='marginTopAuto'>\n <>\n <ListItem\n onClick={navPanelOperatorButtonClick}\n secondaryAction={\n open ? (\n <IconButton edge='end' onClick={navPanelOperatorButtonClick} size='large'>\n <ChevronRightIcon />\n </IconButton>\n ) : null\n }\n >\n <ListItemIcon id='person-icon'>\n <PersonOutlineIcon fontSize='large' />\n </ListItemIcon>\n <ListItemText primary={portalOperator} />\n </ListItem>\n <Menu\n anchorEl={anchorEl}\n keepMounted={bShowOperatorButtons}\n open={bShowOperatorButtons}\n onClick={navPanelOperatorButtonClick}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left'\n }}\n >\n <MenuItem onClick={logout}>\n <ListItemIcon>\n <ArrowBackIcon fontSize='large' />\n </ListItemIcon>\n <Typography variant='inherit'>{localizedVal('Log off', localeCategory)}</Typography>\n </MenuItem>\n </Menu>\n </>\n </List>\n </Drawer>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Reference/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Reference/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,cAAe,SAAQ,UAAU;IAEzC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,kDA6CtD"}
|
|
@@ -2,8 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
export default function Reference(props) {
|
|
3
3
|
const { visibility = true, context = '', getPConnect, readOnly = false, displayMode = '' } = props;
|
|
4
4
|
const pConnect = getPConnect();
|
|
5
|
-
|
|
6
|
-
const referenceConfig = { ...pConnect.getComponentConfig() } || {};
|
|
5
|
+
const referenceConfig = { ...pConnect.getComponentConfig() };
|
|
7
6
|
delete referenceConfig?.name;
|
|
8
7
|
delete referenceConfig?.type;
|
|
9
8
|
delete referenceConfig?.visibility;
|
|
@@ -19,10 +18,14 @@ export default function Reference(props) {
|
|
|
19
18
|
...referenceConfig
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
|
-
// @ts-
|
|
21
|
+
// @ts-expect-error - Argument of type 'null' is not assignable to parameter of type 'string'.
|
|
23
22
|
const viewComponent = pConnect.createComponent(viewObject, null, null, {
|
|
24
23
|
pageReference: context && context.startsWith('@CLASS') ? '' : context
|
|
25
24
|
});
|
|
25
|
+
if (referenceConfig.inheritedProps && referenceConfig.inheritedProps.length > 0) {
|
|
26
|
+
const inheritedProps = pConnect.getInheritedProps();
|
|
27
|
+
referenceConfig.inheritedProps = Object.keys(inheritedProps).map(prop => ({ prop, value: inheritedProps[prop] }));
|
|
28
|
+
}
|
|
26
29
|
viewComponent.props.getPConnect().setInheritedConfig({
|
|
27
30
|
...referenceConfig,
|
|
28
31
|
readOnly,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.js","sourceRoot":"","sources":["../../../../src/components/infra/Reference/Reference.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAqB;IACrD,MAAM,EAAE,UAAU,GAAG,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,WAAW,EAAE,QAAQ,GAAG,KAAK,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAEnG,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,
|
|
1
|
+
{"version":3,"file":"Reference.js","sourceRoot":"","sources":["../../../../src/components/infra/Reference/Reference.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAqB;IACrD,MAAM,EAAE,UAAU,GAAG,IAAI,EAAE,OAAO,GAAG,EAAE,EAAE,WAAW,EAAE,QAAQ,GAAG,KAAK,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAEnG,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,eAAe,GAAG,EAAE,GAAG,QAAQ,CAAC,kBAAkB,EAAE,EAAE,CAAC;IAE7D,OAAO,eAAe,EAAE,IAAI,CAAC;IAC7B,OAAO,eAAe,EAAE,IAAI,CAAC;IAC7B,OAAO,eAAe,EAAE,UAAU,CAAC;IAEnC,MAAM,YAAY,GAAQ,QAAQ,CAAC,iBAAiB,EAAE,CAAC;IAEvD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,iEAAiE;QACjE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,UAAU,GAAG;QACjB,GAAG,YAAY;QACf,MAAM,EAAE;YACN,GAAG,YAAY,CAAC,MAAM;YACtB,GAAG,eAAe;SACnB;KACF,CAAC;IAEF,8FAA8F;IAC9F,MAAM,aAAa,GAAQ,QAAQ,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;QAC1E,aAAa,EAAE,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO;KACtE,CAAC,CAAC;IAEH,IAAI,eAAe,CAAC,cAAc,IAAI,eAAe,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChF,MAAM,cAAc,GAAG,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QACpD,eAAe,CAAC,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACpH,CAAC;IAED,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,kBAAkB,CAAC;QACnD,GAAG,eAAe;QAClB,QAAQ;QACR,WAAW;KACZ,CAAC,CAAC;IAEH,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QACzB,OAAO,4BAAG,aAAa,GAAI,CAAC;IAC9B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { PConnProps } from '../../../types/PConnProps';\n\ninterface ReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n visibility?: boolean;\n context?: string;\n readOnly?: boolean;\n displayMode?: string;\n}\n\nexport default function Reference(props: ReferenceProps) {\n const { visibility = true, context = '', getPConnect, readOnly = false, displayMode = '' } = props;\n\n const pConnect = getPConnect();\n const referenceConfig = { ...pConnect.getComponentConfig() };\n\n delete referenceConfig?.name;\n delete referenceConfig?.type;\n delete referenceConfig?.visibility;\n\n const viewMetadata: any = pConnect.getReferencedView();\n\n if (!viewMetadata) {\n // console.log(\"View not found \", pConnect.getComponentConfig());\n return null;\n }\n\n const viewObject = {\n ...viewMetadata,\n config: {\n ...viewMetadata.config,\n ...referenceConfig\n }\n };\n\n // @ts-expect-error - Argument of type 'null' is not assignable to parameter of type 'string'.\n const viewComponent: any = pConnect.createComponent(viewObject, null, null, {\n pageReference: context && context.startsWith('@CLASS') ? '' : context\n });\n\n if (referenceConfig.inheritedProps && referenceConfig.inheritedProps.length > 0) {\n const inheritedProps = pConnect.getInheritedProps();\n referenceConfig.inheritedProps = Object.keys(inheritedProps).map(prop => ({ prop, value: inheritedProps[prop] }));\n }\n\n viewComponent.props.getPConnect().setInheritedConfig({\n ...referenceConfig,\n readOnly,\n displayMode\n });\n\n if (visibility !== false) {\n return <>{viewComponent}</>;\n }\n return null;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Region.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Region/Region.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Region.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Region/Region.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,UAAU,WAAW;CAEpB;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,2CASnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Region.js","sourceRoot":"","sources":["../../../../src/components/infra/Region/Region.tsx"],"names":[],"mappings":";AAOA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAqC;IAClE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE3B,OAAO,CACL,4BAEG,QAAQ,GACR,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren } from 'react';\n\n// Region does NOT have getPConnect. So, no need to extend from PConnProps\ninterface RegionProps {\n // If any, enter additional props that only exist on this component\n}\n\nexport default function Region(props: PropsWithChildren<RegionProps>) {\n const { children } = props;\n\n return (\n <>\n {/* <div>Region</div> */}\n {children}\n </>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Region.js","sourceRoot":"","sources":["../../../../src/components/infra/Region/Region.tsx"],"names":[],"mappings":";AAOA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAqC;IAClE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE3B,OAAO,CACL,4BAEG,QAAQ,GACR,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import type { PropsWithChildren } from 'react';\n\n// Region does NOT have getPConnect. So, no need to extend from PConnProps\ninterface RegionProps {\n // If any, enter additional props that only exist on this component\n}\n\nexport default function Region(props: PropsWithChildren<RegionProps>) {\n const { children } = props;\n\n return (\n <>\n {/* <div>Region</div> */}\n {children}\n </>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { PConnProps } from '../../../types/PConnProps';
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
interface RootContainerProps extends PConnProps {
|
|
4
4
|
renderingMode?: string;
|
|
5
5
|
routingInfo: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/RootContainer/RootContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,iBAAiB,EAAoD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RootContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/RootContainer/RootContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,iBAAiB,EAAoD,MAAM,OAAO,CAAC;AAO1H,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,GAAG,EAAE,CAAC;QAAC,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC;IAChE,QAAQ,EAAE,GAAG,CAAC;IACd,YAAY,EAAE,GAAG,EAAE,CAAC;CACrB;AA+BD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,OA+LjF"}
|
|
@@ -5,11 +5,10 @@ import createPConnectComponent from '../../../bridge/react_pconnect';
|
|
|
5
5
|
import StoreContext from '../../../bridge/Context/StoreContext';
|
|
6
6
|
import { LazyMap as LazyComponentMap } from '../../../components_map';
|
|
7
7
|
import { isEmptyObject } from '../../helpers/common-utils';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
//
|
|
8
|
+
/**
|
|
9
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
10
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
11
|
+
*/
|
|
13
12
|
const renderingModes = ['portal', 'view'];
|
|
14
13
|
function usePrevious(value) {
|
|
15
14
|
const ref = useRef(null);
|
|
@@ -140,7 +139,6 @@ export default function RootContainer(props) {
|
|
|
140
139
|
return (_jsxs("div", { id: 'ModalManager', children: [rootView.current, MemoizedModalViewContainer, _jsx("div", { id: 'MemoizedPreviewViewContainer' }), _jsx("div", { id: 'ReAuthMessageModal' })] }));
|
|
141
140
|
}
|
|
142
141
|
if (renderingMode === 'noPortal') {
|
|
143
|
-
// eslint-disable-next-line no-console
|
|
144
142
|
console.log(`${localizedVal('RootContainer rendering in noPortal mode', localeCategory)}`);
|
|
145
143
|
const theChildren = pConn.getChildren();
|
|
146
144
|
if (theChildren && theChildren.length === 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootContainer.js","sourceRoot":"","sources":["../../../../src/components/inf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,IAAI,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC5C,OAAO,CACL,8BACE,wBAAM,YAAY,CAAC,8EAA8E,EAAE,cAAc,CAAC,GAAO,EACxH,QAAQ,EACR,0BAA0B,IAC1B,CACJ,CAAC;KACH;IACD,IAAI,QAAQ,EAAE;QACZ,6DAA6D;QAC7D,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAEpD,OAAO,CACL,cAAK,EAAE,EAAC,gBAAgB,YAEtB,KAAC,GAAG,IAAC,SAAS,EAAC,QAAQ,YACrB,KAAC,gBAAgB,KAAG,GAChB,GACF,CACP,CAAC;KACH;IACD,OAAO,CACL,cAAK,EAAE,EAAC,gBAAgB,YACtB,wBAAM,YAAY,CAAC,6CAA6C,EAAE,cAAc,CAAC,GAAO,GACpF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { Children, createElement, PropsWithChildren, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { Box, CircularProgress } from '@mui/material';\n\nimport createPConnectComponent from '../../../bridge/react_pconnect';\nimport StoreContext from '../../../bridge/Context/StoreContext';\nimport { LazyMap as LazyComponentMap } from '../../../components_map';\nimport { isEmptyObject } from '../../helpers/common-utils';\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface RootContainerProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n renderingMode?: string;\n routingInfo: { type: string; accessedOrder: any[]; items: any };\n skeleton: any;\n httpMessages: any[];\n}\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\nconst renderingModes = ['portal', 'view'];\n\nfunction usePrevious(value) {\n const ref = useRef(null);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\nfunction getItemView(routingInfo, renderingMode) {\n const viewConfigs: any = [];\n if (routingInfo && renderingModes.includes(renderingMode)) {\n const { accessedOrder, items }: { accessedOrder: any; items: any } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n if (items[key] && items[key].view && !isEmptyObject(items[key].view)) {\n viewConfigs.push(items[key]);\n }\n }\n }\n return viewConfigs;\n}\n\nexport default function RootContainer(props: PropsWithChildren<RootContainerProps>) {\n const { getPConnect, renderingMode = '', children, skeleton, httpMessages = [], routingInfo } = props;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n const pConn = getPConnect();\n\n const options = { context: 'app' };\n const rootView = useRef(null);\n\n const [componentName, setComponentName] = useState('');\n\n useEffect(() => {\n // debugging/investigation help\n // console.log(`componentName change: ${componentName} triggering a re-render`);\n }, [componentName]);\n\n // debugging/investigation help\n // console.log(`RootContainer props.routingInfo: ${JSON.stringify(routingInfo)}`);\n\n let hasBanner = false;\n let banners: any = null;\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Messages';\n\n const messages = httpMessages ? httpMessages.map(msg => localizedVal(msg.message, localeCategory)) : httpMessages;\n\n hasBanner = messages && messages.length > 0;\n banners = hasBanner && <div>{localizedVal(`RootContainer: trying to emit Banner with ${messages}`, localeCategory)}</div>;\n\n const MemoizedModalViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: 'ModalViewContainer',\n config: {\n name: 'modal'\n }\n },\n options\n })\n );\n }, []);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const MemoizedPreviewViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: 'PreviewViewContainer',\n config: {\n name: 'preview'\n }\n },\n options\n })\n );\n }, []);\n\n //\n function getNoPortalContent() {\n let noPortalContent: any;\n\n switch (componentName) {\n case 'View':\n noPortalContent = <div>{localizedVal('getNoPortalContent: RootContainer wants to render View in noPortal mode', localeCategory)}</div>;\n break;\n\n case 'ViewContainer': {\n const configProps = pConn.getConfigProps();\n const viewContConfig = {\n meta: {\n type: 'ViewContainer',\n config: configProps\n },\n options\n };\n const theViewCont: any = PCore.createPConnect(viewContConfig);\n // Add in displayOnlyFA if prop is on RootContainer\n if (displayOnlyFA) {\n theViewCont.displayOnlyFA = true;\n }\n\n const theViewContainerAsReact = createElement(createPConnectComponent(), theViewCont);\n\n noPortalContent = theViewContainerAsReact;\n break;\n }\n\n default:\n noPortalContent = (\n <div>{localizedVal('getNoPortalContent: RootContainer wants to render NO componentName in noPortal mode', localeCategory)}</div>\n );\n break;\n }\n\n return noPortalContent;\n }\n\n let rootViewConfig: any = null;\n\n useEffect(() => {\n const { containers } = PCore.getStore().getState();\n const items = Object.keys(containers).filter(item => item.includes('root'));\n (PCore.getContainerUtils().getContainerAPI() as any).addContainerItems(items);\n }, [routingInfo]);\n\n const items: any = getItemView(routingInfo, renderingMode);\n\n if (items.length > 0) {\n rootViewConfig = {\n meta: items[0].view,\n options: {\n context: items[0].context\n }\n };\n }\n const prevRootConfig = usePrevious(rootViewConfig);\n\n if (renderingModes.includes(renderingMode) && messages && routingInfo && routingInfo?.accessedOrder.length === 0) {\n return <div id='root-container'>{banners}</div>;\n }\n\n if (items.length > 0) {\n const itemView = items[0].view;\n const currentRootConfig = {\n meta: itemView,\n options: {\n context: items[0].context\n }\n };\n\n if (prevRootConfig === null || !PCore.isDeepEqual(currentRootConfig, prevRootConfig)) {\n rootView.current = createElement(createPConnectComponent(), PCore.createPConnect(currentRootConfig)) as any;\n }\n\n // debugging/investigation help\n // console.log(`rootView.props.getPConnect().getComponentName(): ${rootView.props.getPConnect().getComponentName()}`);\n\n return (\n <div id='ModalManager'>\n {rootView.current}\n {MemoizedModalViewContainer}\n <div id='MemoizedPreviewViewContainer' />\n <div id='ReAuthMessageModal' />\n </div>\n );\n }\n if (renderingMode === 'noPortal') {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('RootContainer rendering in noPortal mode', localeCategory)}`);\n\n const theChildren = pConn.getChildren() as any[];\n if (theChildren && theChildren.length === 1) {\n const localPConn = theChildren[0].getPConnect();\n const localCompName = localPConn.getComponentName();\n if (componentName !== localCompName) {\n setComponentName(localCompName);\n }\n }\n\n return getNoPortalContent();\n }\n if (children && Children.count(children) > 0) {\n return (\n <>\n <div>{localizedVal('RootContainer: Has children. Trying to show ModalManager with children, etc.', localeCategory)}</div>\n {children}\n {MemoizedModalViewContainer}\n </>\n );\n }\n if (skeleton) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const LoadingComponent = LazyComponentMap[skeleton];\n\n return (\n <div id='root-container'>\n {/* <div>RootContainer: Trying to show skeleton</div> */}\n <Box textAlign='center'>\n <CircularProgress />\n </Box>\n </div>\n );\n }\n return (\n <div id='root-container'>\n <div>{localizedVal('RootContainer: Should be ModalManager, etc.', localeCategory)}</div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RootContainer.js","sourceRoot":"","sources":["../../../../src/components/infra/RootContainer/RootContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAA0B,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1H,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,YAAY,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAW3D;;;GAGG;AAEH,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAE1C,SAAS,WAAW,CAAC,KAAK;IACxB,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACzB,SAAS,CAAC,GAAG,EAAE;QACb,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;IACtB,C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P,CAAC;AACJ,CAAC","sourcesContent":["import { Children, createElement, type PropsWithChildren, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { Box, CircularProgress } from '@mui/material';\n\nimport createPConnectComponent from '../../../bridge/react_pconnect';\nimport StoreContext from '../../../bridge/Context/StoreContext';\nimport { LazyMap as LazyComponentMap } from '../../../components_map';\nimport { isEmptyObject } from '../../helpers/common-utils';\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface RootContainerProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n renderingMode?: string;\n routingInfo: { type: string; accessedOrder: any[]; items: any };\n skeleton: any;\n httpMessages: any[];\n}\n\n/**\n * WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.\n * You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.\n */\n\nconst renderingModes = ['portal', 'view'];\n\nfunction usePrevious(value) {\n const ref = useRef(null);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\nfunction getItemView(routingInfo, renderingMode) {\n const viewConfigs: any = [];\n if (routingInfo && renderingModes.includes(renderingMode)) {\n const { accessedOrder, items }: { accessedOrder: any; items: any } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n if (items[key] && items[key].view && !isEmptyObject(items[key].view)) {\n viewConfigs.push(items[key]);\n }\n }\n }\n return viewConfigs;\n}\n\nexport default function RootContainer(props: PropsWithChildren<RootContainerProps>) {\n const { getPConnect, renderingMode = '', children, skeleton, httpMessages = [], routingInfo } = props;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n const pConn = getPConnect();\n\n const options = { context: 'app' };\n const rootView = useRef(null);\n\n const [componentName, setComponentName] = useState('');\n\n useEffect(() => {\n // debugging/investigation help\n // console.log(`componentName change: ${componentName} triggering a re-render`);\n }, [componentName]);\n\n // debugging/investigation help\n // console.log(`RootContainer props.routingInfo: ${JSON.stringify(routingInfo)}`);\n\n let hasBanner = false;\n let banners: any = null;\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Messages';\n\n const messages = httpMessages ? httpMessages.map(msg => localizedVal(msg.message, localeCategory)) : httpMessages;\n\n hasBanner = messages && messages.length > 0;\n banners = hasBanner && <div>{localizedVal(`RootContainer: trying to emit Banner with ${messages}`, localeCategory)}</div>;\n\n const MemoizedModalViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: 'ModalViewContainer',\n config: {\n name: 'modal'\n }\n },\n options\n })\n );\n }, []);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const MemoizedPreviewViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: 'PreviewViewContainer',\n config: {\n name: 'preview'\n }\n },\n options\n })\n );\n }, []);\n\n //\n function getNoPortalContent() {\n let noPortalContent: any;\n\n switch (componentName) {\n case 'View':\n noPortalContent = <div>{localizedVal('getNoPortalContent: RootContainer wants to render View in noPortal mode', localeCategory)}</div>;\n break;\n\n case 'ViewContainer': {\n const configProps = pConn.getConfigProps();\n const viewContConfig = {\n meta: {\n type: 'ViewContainer',\n config: configProps\n },\n options\n };\n const theViewCont: any = PCore.createPConnect(viewContConfig);\n // Add in displayOnlyFA if prop is on RootContainer\n if (displayOnlyFA) {\n theViewCont.displayOnlyFA = true;\n }\n\n const theViewContainerAsReact = createElement(createPConnectComponent(), theViewCont);\n\n noPortalContent = theViewContainerAsReact;\n break;\n }\n\n default:\n noPortalContent = (\n <div>{localizedVal('getNoPortalContent: RootContainer wants to render NO componentName in noPortal mode', localeCategory)}</div>\n );\n break;\n }\n\n return noPortalContent;\n }\n\n let rootViewConfig: any = null;\n\n useEffect(() => {\n const { containers } = PCore.getStore().getState();\n const items = Object.keys(containers).filter(item => item.includes('root'));\n (PCore.getContainerUtils().getContainerAPI() as any).addContainerItems(items);\n }, [routingInfo]);\n\n const items: any = getItemView(routingInfo, renderingMode);\n\n if (items.length > 0) {\n rootViewConfig = {\n meta: items[0].view,\n options: {\n context: items[0].context\n }\n };\n }\n const prevRootConfig = usePrevious(rootViewConfig);\n\n if (renderingModes.includes(renderingMode) && messages && routingInfo && routingInfo?.accessedOrder.length === 0) {\n return <div id='root-container'>{banners}</div>;\n }\n\n if (items.length > 0) {\n const itemView = items[0].view;\n const currentRootConfig = {\n meta: itemView,\n options: {\n context: items[0].context\n }\n };\n\n if (prevRootConfig === null || !PCore.isDeepEqual(currentRootConfig, prevRootConfig)) {\n rootView.current = createElement(createPConnectComponent(), PCore.createPConnect(currentRootConfig)) as any;\n }\n\n // debugging/investigation help\n // console.log(`rootView.props.getPConnect().getComponentName(): ${rootView.props.getPConnect().getComponentName()}`);\n\n return (\n <div id='ModalManager'>\n {rootView.current}\n {MemoizedModalViewContainer}\n <div id='MemoizedPreviewViewContainer' />\n <div id='ReAuthMessageModal' />\n </div>\n );\n }\n if (renderingMode === 'noPortal') {\n console.log(`${localizedVal('RootContainer rendering in noPortal mode', localeCategory)}`);\n\n const theChildren = pConn.getChildren() as any[];\n if (theChildren && theChildren.length === 1) {\n const localPConn = theChildren[0].getPConnect();\n const localCompName = localPConn.getComponentName();\n if (componentName !== localCompName) {\n setComponentName(localCompName);\n }\n }\n\n return getNoPortalContent();\n }\n if (children && Children.count(children) > 0) {\n return (\n <>\n <div>{localizedVal('RootContainer: Has children. Trying to show ModalManager with children, etc.', localeCategory)}</div>\n {children}\n {MemoizedModalViewContainer}\n </>\n );\n }\n if (skeleton) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const LoadingComponent = LazyComponentMap[skeleton];\n\n return (\n <div id='root-container'>\n {/* <div>RootContainer: Trying to show skeleton</div> */}\n <Box textAlign='center'>\n <CircularProgress />\n </Box>\n </div>\n );\n }\n return (\n <div id='root-container'>\n <div>{localizedVal('RootContainer: Should be ModalManager, etc.', localeCategory)}</div>\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stages.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Stages.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,WAAY,SAAQ,UAAU;IAEtC,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AA4CD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,2CA8DhD"}
|
|
@@ -46,13 +46,13 @@ export default function Stages(props) {
|
|
|
46
46
|
const classes = useStyles();
|
|
47
47
|
const { getPConnect, stages } = props;
|
|
48
48
|
const pConn = getPConnect();
|
|
49
|
-
const
|
|
49
|
+
const localizationService = pConn.getLocalizationService();
|
|
50
50
|
const filteredStages = getFilteredStages(stages);
|
|
51
51
|
const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID, ''); // 2nd arg empty string until typedef allows optional
|
|
52
52
|
const stagesObj = filteredStages.map((stage, index, arr) => {
|
|
53
53
|
const theID = stage.ID || stage.id;
|
|
54
54
|
return {
|
|
55
|
-
name:
|
|
55
|
+
name: localizationService.getLocalizedText(stage.name),
|
|
56
56
|
id: theID,
|
|
57
57
|
complete: stage.visited_status === 'completed',
|
|
58
58
|
current: theID === currentStageID,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stages.js","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,UAAU,MAAM,wB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AAC,YAAY,CAAC;QAClC,CAAC;aAAM,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC1B,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;QACpC,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;QACjC,CAAC;QAED,OAAO,CACL,2BACG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,EACvE,KAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,EAAC,SAAS,EAAE,QAAQ,YAC3E,KAAK,CAAC,IAAI,GACA,KAJJ,KAAK,CAKT,CACR,CAAC;IACJ,CAAC;IAED,SAAS,SAAS,CAAC,QAAQ;QACzB,OAAO,CACL,KAAC,WAAW,kBAAY,QAAQ,EAAC,SAAS,EAAE,KAAC,eAAe,IAAC,SAAS,EAAE,OAAO,CAAC,aAAa,GAAI,YAC9F,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;gBAC7B,OAAO,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAChC,CAAC,CAAC,GACU,CACf,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,YAItC,SAAS,CAAC,SAAS,CAAC,GAChB,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { Breadcrumbs, Card, Typography } from '@mui/material';\nimport DoubleArrowIcon from '@mui/icons-material/DoubleArrow';\nimport DoneIcon from '@mui/icons-material/Done';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface StagesProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n stages: any[];\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n completedStage: {\n color: theme.palette.text.primary\n },\n currentStage: {\n color: theme.palette.info.dark,\n fontWeight: 600\n },\n futureStage: {\n color: theme.palette.text.secondary\n },\n separatorIcon: {\n color: theme.palette.text.disabled\n }\n}));\n\n/**\n * API to filter out the alternate stages which are not in active and return all other stages\n * @param {Array} stages - Stages of a case type\n *\n * @returns {Array} - Returns stages which are non alternate stages and alternate stage which is active.\n */\nfunction getFilteredStages(stages) {\n if (!Array.isArray(stages)) {\n return [];\n }\n\n return stages.filter(stage => stage.type !== 'Alternate' || (stage.type === 'Alternate' && stage.visited_status === 'active'));\n}\n\n/* TODO - this component should be refactored and not exposed as top level DX Component -\n the stages should be created as part of the CaseView */\nexport default function Stages(props: StagesProps) {\n const classes = useStyles();\n\n const { getPConnect, stages } = props;\n const pConn = getPConnect();\n const localizationService = pConn.getLocalizationService();\n const filteredStages = getFilteredStages(stages);\n const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID, ''); // 2nd arg empty string until typedef allows optional\n const stagesObj = filteredStages.map((stage, index, arr) => {\n const theID = stage.ID || stage.id;\n return {\n name: localizationService.getLocalizedText(stage.name),\n id: theID,\n complete: stage.visited_status === 'completed',\n current: theID === currentStageID,\n last: index === arr.length - 1\n };\n });\n\n // debugging/investigation help\n // console.log(`Stages: current: ${currentStageID} stagesObj: ${JSON.stringify(stagesObj)}`);\n\n function getStage(stage, index) {\n // Removing nested ternary for lint\n // const theClass = stage.current ? classes.currentStage : (stage.complete ? classes.completedStage : classes.futureStage);\n let theClass;\n if (stage.current) {\n theClass = classes.currentStage;\n } else if (stage.complete) {\n theClass = classes.completedStage;\n } else {\n theClass = classes.futureStage;\n }\n\n return (\n <span key={index}>\n {stage.complete ? <DoneIcon color='disabled' fontSize='small' /> : null}\n <Typography variant='h5' component='span' display='inline' className={theClass}>\n {stage.name}\n </Typography>\n </span>\n );\n }\n\n function getStages(inStages) {\n return (\n <Breadcrumbs aria-label='stages' separator={<DoubleArrowIcon className={classes.separatorIcon} />}>\n {inStages.map((stage, index) => {\n return getStage(stage, index);\n })}\n </Breadcrumbs>\n );\n }\n\n return (\n <Card id='Stages' className={classes.root}>\n {/* Stages<br />\n currentStageID: {currentStageID}<br />\n {JSON.stringify(stagesObj)}<br /><br /> */}\n {getStages(stagesObj)}\n </Card>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createElement as _createElement } from "react";
|
|
3
|
-
import { useState, useEffect } from 'react';
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
4
|
import makeStyles from '@mui/styles/makeStyles';
|
|
5
5
|
import Tabs from '@mui/material/Tabs';
|
|
6
6
|
import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAQnF,+FAA+F;AAC/F,2FAA2F;AAC3F,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,C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AEF,OAAO,CACL,cAAK,EAAE,EAAC,cAAc,YAEpB,KAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,EAAC,UAAU,EAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,YACvF,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACpB,eAAC,oBAAoB,OAAK,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,GAAI,CACpE,CAAC,GACG,GACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Tabs from '@mui/material/Tabs';\n\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\n\n// VerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps\ninterface VerticalTabsProps {\n // If any, enter additional props that only exist on this component\n tabconfig: any[];\n}\n\n// The MuiTabs-indicator class is in a span whose parent is div (under the Tabs root component)\n// So, we're going to make the selected vertical tab indicator use a color from our theme.\nconst useStyles = makeStyles(theme => ({\n tabs: {\n '& div > span': {\n backgroundColor: theme.palette.info.dark,\n width: '3px'\n }\n }\n}));\n\n// Implementation of custom event inspired by:\n// https://betterprogramming.pub/master-your-react-skills-with-event-listeners-ebc01dde4fad\nconst createCustomEvent = (eventName: string, additionalData: { [key: string]: string }): CustomEvent | null => {\n if (window) {\n return new CustomEvent(eventName, {\n detail: { additionalData }\n });\n }\n\n return null;\n};\n\nexport default function VerticalTabs(props: VerticalTabsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const LeftAlignVerticalTab = getComponentFromMap('LeftAlignVerticalTabs');\n\n // Get a React warning when we use tabConfig as mixed case. So all lowercase tabconfig\n const { tabconfig = [] } = props;\n const classes = useStyles();\n const [value, setValue] = useState(0);\n\n useEffect(() => {\n const eventData = { itemClicked: value.toString() };\n const myEvent = createCustomEvent('VerticalTabClick', eventData);\n\n if (myEvent !== null) {\n document.dispatchEvent(myEvent);\n }\n }, [value]);\n\n const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => {\n setValue(newValue);\n };\n\n return (\n <div id='VerticalTabs'>\n {/* VerticalTabs: {JSON.stringify(tabconfig)} */}\n <Tabs className={classes.tabs} orientation='vertical' value={value} onChange={handleChange}>\n {tabconfig.map(tab => (\n <LeftAlignVerticalTab {...props} label={tab.name} key={tab.name} />\n ))}\n </Tabs>\n </div>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { PConnProps } from '../../../types/PConnProps';
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
import './View.css';
|
|
4
4
|
interface ViewProps extends PConnProps {
|
|
5
5
|
template?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAI1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAI5D,OAAO,YAAY,CAAC;AAEpB,UAAU,SAAU,SAAQ,UAAU;IAEpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAsBD,iBAAwB,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,uDAsH/D;kBAtHuB,IAAI;;;eAAJ,IAAI"}
|
|
@@ -4,12 +4,11 @@ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
|
4
4
|
import { getAllFields } from '../../helpers/template-utils';
|
|
5
5
|
// Need to import any templates that we might render
|
|
6
6
|
import './View.css';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide'];
|
|
7
|
+
/**
|
|
8
|
+
* WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.
|
|
9
|
+
* You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.
|
|
10
|
+
*/
|
|
11
|
+
const FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide', 'HierarchicalForm'];
|
|
13
12
|
const NO_HEADER_TEMPLATES = [
|
|
14
13
|
'SubTabs',
|
|
15
14
|
'SimpleTable',
|
|
@@ -20,7 +19,8 @@ const NO_HEADER_TEMPLATES = [
|
|
|
20
19
|
'WideNarrowDetails',
|
|
21
20
|
'Confirmation',
|
|
22
21
|
'DynamicTabs',
|
|
23
|
-
'DetailsSubTabs'
|
|
22
|
+
'DetailsSubTabs',
|
|
23
|
+
'ListView'
|
|
24
24
|
];
|
|
25
25
|
export default function View(props) {
|
|
26
26
|
const { children, template, getPConnect, mode, visibility, name: pageName, type, title } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,SAAS,EAAE,M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O,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { PropsWithChildren, useEffect } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { getAllFields } from '../../helpers/template-utils';\nimport { PConnProps } from '../../../types/PConnProps';\n\n// Need to import any templates that we might render\n\nimport './View.css';\n\ninterface ViewProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n template?: string;\n label?: string;\n showLabel: boolean;\n mode?: string;\n title?: string;\n visibility?: boolean;\n name?: string;\n bInForm?: boolean;\n type?: any;\n}\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\nconst FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide'];\nconst NO_HEADER_TEMPLATES = [\n 'SubTabs',\n 'SimpleTable',\n 'Details',\n 'DetailsTwoColumn',\n 'DetailsThreeColumn',\n 'NarrowWideDetails',\n 'WideNarrowDetails',\n 'Confirmation',\n 'DynamicTabs',\n 'DetailsSubTabs'\n];\n\nexport default function View(props: PropsWithChildren<ViewProps>) {\n const { children, template, getPConnect, mode, visibility, name: pageName, type, title } = props;\n let { label = '', showLabel = false } = props;\n const { PAGE_TYPES: { PAGE, LANDINGPAGE, LISTPAGE } = {}, MODAL } = PCore.getConstants();\n\n // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views\n // Putting this logic here instead of copy/paste in every Form template index.js\n\n const inheritedProps: any = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed\n label = inheritedProps.label || label;\n showLabel = inheritedProps.showLabel || showLabel;\n const localeUtils = PCore.getLocaleUtils();\n\n const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible\n if (isEmbeddedDataView && showLabel === undefined) {\n showLabel = true;\n }\n\n useEffect(() => {\n // Get the localized application label\n let applicationLabel = PCore.getEnvironmentInfo().getApplicationLabel();\n applicationLabel = localeUtils.getLocaleValue(`${applicationLabel}`, '', '');\n const caseInfo = getPConnect().getCaseInfo();\n const isAssignmentInCreateStage = caseInfo && caseInfo.isAssignmentInCreateStage();\n const isRenderingInModal = getPConnect().getContainerName().includes(MODAL);\n const isRenderingInPreviewPanel = getPConnect().getContainerName().includes('preview');\n\n /* If assignment is in create stage and rendering in modal don't update the title.\n Title will be updated on completion of create stage and when the assignment is rendered inline to the page.\n */\n const canUpdateTitle =\n !isRenderingInPreviewPanel &&\n (type === PAGE || type === LANDINGPAGE || type === LISTPAGE) &&\n !(isRenderingInModal && isAssignmentInCreateStage) &&\n PCore.getEnvironmentInfo().getRenderingMode() === 'FULL_PORTAL';\n // Incase of home route title is same as applicationLabel so setting to empty to just show applicationLabel\n let titleVar = title === applicationLabel ? '' : title;\n\n if (canUpdateTitle) {\n if (caseInfo) {\n const name = caseInfo.getName();\n const id = caseInfo.getBusinessID();\n titleVar = name && id ? `${name} (${id})` : titleVar;\n }\n document.title = titleVar ? `${titleVar} - ${applicationLabel}` : applicationLabel;\n }\n }, [type, title, getPConnect, PAGE, LANDINGPAGE, LISTPAGE]);\n\n const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n if (visibility === false) {\n return '';\n }\n\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n // JA - React SDK not using LazyComponentMap yet\n if (template /* && LazyComponentMap[template] */) {\n // const ViewTemplate = LazyComponentMap[template];\n const ViewTemplate: any = getComponentFromMap(template);\n\n if (template === 'ListView') {\n // special case for ListView - add in a prop\n const bInForm = true;\n props = { ...props, bInForm };\n }\n\n // for debugging/investigation\n // console.log(`View rendering template: ${template}`);\n\n // spreading because all props should go to the template\n let RenderedTemplate = (\n <ViewTemplate key={key} {...props}>\n {children}\n </ViewTemplate>\n );\n\n if (FORMTEMPLATES.includes(template) && showLabel) {\n // Original:\n // RenderedTemplate = (\n // <FieldGroup name={label} style={{ marginBlockStart: \"1rem\" }}>\n // {RenderedTemplate}\n // </FieldGroup>\n // );\n RenderedTemplate = (\n <div\n data-name='RenderedTemplate'\n data-template-type={template}\n /* name */ id='label'\n style={{ marginBlockStart: '1rem' }}\n className='grid-column'\n >\n {RenderedTemplate}\n </div>\n );\n }\n\n return (\n <div className='grid-column'>\n {showLabel && !NO_HEADER_TEMPLATES.includes(template) && (\n <div className='template-title-container'>\n <span>{label}</span>\n </div>\n )}\n {RenderedTemplate}\n </div>\n );\n }\n\n // debugging/investigation help\n // console.log(`View about to render React.Fragment for children: ${children}`);\n\n if (children) {\n return <>{children}</>;\n }\n\n return null;\n}\n\n// Adapted from Constellation DX Component to add in additional props for some templates\nView.additionalProps = (state, getPConnect) => {\n const thePConn = getPConnect();\n const { template } = thePConn.getConfigProps();\n\n let propObj = {};\n let allFields = {};\n\n switch (template) {\n case 'CaseSummary':\n allFields = getAllFields(thePConn);\n // eslint-disable-next-line no-case-declarations\n const unresFields = {\n primaryFields: allFields[0],\n secondaryFields: allFields[1]\n };\n propObj = thePConn.resolveConfigProps(unresFields);\n break;\n\n case 'Details':\n allFields = getAllFields(thePConn);\n propObj = { fields: allFields[0] };\n break;\n\n default:\n break;\n }\n\n return propObj;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,oDAAoD;AAEpD,OAAO,YAAY,CAAC;AAepB;;;GAGG;AAEH,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC;AAChH,MAAM,m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,SAAS,EAAC,0BAA0B,YACvC,yBAAO,KAAK,GAAQ,GAChB,CACP,EACA,gBAAgB,IACb,CACP,CAAC;IACJ,CAAC;IAED,+BAA+B;IAC/B,gFAAgF;IAEhF,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,4BAAG,QAAQ,GAAI,CAAC;IACzB,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,wFAAwF;AACxF,IAAI,CAAC,eAAe,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE;IAC5C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAE/C,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,aAAa;YAChB,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnC,gDAAgD;YAChD,MAAM,WAAW,GAAG;gBAClB,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;gBAC3B,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC;aAC9B,CAAC;YACF,OAAO,GAAG,QAAQ,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YACnD,MAAM;QAER,KAAK,SAAS;YACZ,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,MAAM;QAER;YACE,MAAM;IACV,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { type PropsWithChildren, useEffect } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { getAllFields } from '../../helpers/template-utils';\nimport type { PConnProps } from '../../../types/PConnProps';\n\n// Need to import any templates that we might render\n\nimport './View.css';\n\ninterface ViewProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n template?: string;\n label?: string;\n showLabel: boolean;\n mode?: string;\n title?: string;\n visibility?: boolean;\n name?: string;\n bInForm?: boolean;\n type?: any;\n}\n\n/**\n * WARNING: This file is part of the infrastructure component responsible for working with Redux and managing the creation and update of Redux containers and PConnect.\n * You may override Material components within this component if needed, but do not modify any container-related logic. Changing this logic can lead to unexpected behavior.\n */\n\nconst FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide', 'HierarchicalForm'];\nconst NO_HEADER_TEMPLATES = [\n 'SubTabs',\n 'SimpleTable',\n 'Details',\n 'DetailsTwoColumn',\n 'DetailsThreeColumn',\n 'NarrowWideDetails',\n 'WideNarrowDetails',\n 'Confirmation',\n 'DynamicTabs',\n 'DetailsSubTabs',\n 'ListView'\n];\n\nexport default function View(props: PropsWithChildren<ViewProps>) {\n const { children, template, getPConnect, mode, visibility, name: pageName, type, title } = props;\n let { label = '', showLabel = false } = props;\n const { PAGE_TYPES: { PAGE, LANDINGPAGE, LISTPAGE } = {}, MODAL } = PCore.getConstants();\n\n // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views\n // Putting this logic here instead of copy/paste in every Form template index.js\n\n const inheritedProps: any = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed\n label = inheritedProps.label || label;\n showLabel = inheritedProps.showLabel || showLabel;\n const localeUtils = PCore.getLocaleUtils();\n\n const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible\n if (isEmbeddedDataView && showLabel === undefined) {\n showLabel = true;\n }\n\n useEffect(() => {\n // Get the localized application label\n let applicationLabel = PCore.getEnvironmentInfo().getApplicationLabel();\n applicationLabel = localeUtils.getLocaleValue(`${applicationLabel}`, '', '');\n const caseInfo = getPConnect().getCaseInfo();\n const isAssignmentInCreateStage = caseInfo && caseInfo.isAssignmentInCreateStage();\n const isRenderingInModal = getPConnect().getContainerName().includes(MODAL);\n const isRenderingInPreviewPanel = getPConnect().getContainerName().includes('preview');\n\n /* If assignment is in create stage and rendering in modal don't update the title.\n Title will be updated on completion of create stage and when the assignment is rendered inline to the page.\n */\n const canUpdateTitle =\n !isRenderingInPreviewPanel &&\n (type === PAGE || type === LANDINGPAGE || type === LISTPAGE) &&\n !(isRenderingInModal && isAssignmentInCreateStage) &&\n PCore.getEnvironmentInfo().getRenderingMode() === 'FULL_PORTAL';\n // Incase of home route title is same as applicationLabel so setting to empty to just show applicationLabel\n let titleVar = title === applicationLabel ? '' : title;\n\n if (canUpdateTitle) {\n if (caseInfo) {\n const name = caseInfo.getName();\n const id = caseInfo.getBusinessID();\n titleVar = name && id ? `${name} (${id})` : titleVar;\n }\n document.title = titleVar ? `${titleVar} - ${applicationLabel}` : applicationLabel;\n }\n }, [type, title, getPConnect, PAGE, LANDINGPAGE, LISTPAGE]);\n\n const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n if (visibility === false) {\n return '';\n }\n\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n // JA - React SDK not using LazyComponentMap yet\n if (template /* && LazyComponentMap[template] */) {\n // const ViewTemplate = LazyComponentMap[template];\n const ViewTemplate: any = getComponentFromMap(template);\n\n if (template === 'ListView') {\n // special case for ListView - add in a prop\n const bInForm = true;\n props = { ...props, bInForm };\n }\n\n // for debugging/investigation\n // console.log(`View rendering template: ${template}`);\n\n // spreading because all props should go to the template\n let RenderedTemplate = (\n <ViewTemplate key={key} {...props}>\n {children}\n </ViewTemplate>\n );\n\n if (FORMTEMPLATES.includes(template) && showLabel) {\n // Original:\n // RenderedTemplate = (\n // <FieldGroup name={label} style={{ marginBlockStart: \"1rem\" }}>\n // {RenderedTemplate}\n // </FieldGroup>\n // );\n RenderedTemplate = (\n <div\n data-name='RenderedTemplate'\n data-template-type={template}\n /* name */ id='label'\n style={{ marginBlockStart: '1rem' }}\n className='grid-column'\n >\n {RenderedTemplate}\n </div>\n );\n }\n\n return (\n <div className='grid-column'>\n {showLabel && !NO_HEADER_TEMPLATES.includes(template) && (\n <div className='template-title-container'>\n <span>{label}</span>\n </div>\n )}\n {RenderedTemplate}\n </div>\n );\n }\n\n // debugging/investigation help\n // console.log(`View about to render React.Fragment for children: ${children}`);\n\n if (children) {\n return <>{children}</>;\n }\n\n return null;\n}\n\n// Adapted from Constellation DX Component to add in additional props for some templates\nView.additionalProps = (state, getPConnect) => {\n const thePConn = getPConnect();\n const { template } = thePConn.getConfigProps();\n\n let propObj = {};\n let allFields = {};\n\n switch (template) {\n case 'CaseSummary':\n allFields = getAllFields(thePConn);\n // eslint-disable-next-line no-case-declarations\n const unresFields = {\n primaryFields: allFields[0],\n secondaryFields: allFields[1]\n };\n propObj = thePConn.resolveConfigProps(unresFields);\n break;\n\n case 'Details':\n allFields = getAllFields(thePConn);\n propObj = { fields: allFields[0] };\n break;\n\n default:\n break;\n }\n\n return propObj;\n};\n"]}
|