@pega/react-sdk-components 23.1.10 → 23.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/LICENSE +201 -0
- package/README.md +17 -0
- package/SECURITY.md +10 -0
- package/lib/bridge/Context/StoreContext.js +3 -3
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +24 -47
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +17 -28
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -2
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -10
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +30 -27
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +9 -15
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/index.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +5 -4
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +23 -12
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -16
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -10
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +15 -15
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +49 -62
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +2 -3
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +7 -10
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +7 -9
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +5 -11
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +2 -2
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +21 -23
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +8 -3
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +76 -68
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/CancelAlert/index.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +13 -41
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +13 -34
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +4 -5
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +14 -10
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +8 -8
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +10 -27
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Decimal/index.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +13 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +105 -29
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +8 -9
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Email/index.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +13 -0
- package/lib/components/field/Group/Group.d.ts.map +1 -0
- package/lib/components/field/Group/Group.js +15 -0
- package/lib/components/field/Group/Group.js.map +1 -0
- package/lib/components/field/Group/index.d.ts +2 -0
- package/lib/components/field/Group/index.d.ts.map +1 -0
- package/lib/components/field/Group/index.js +2 -0
- package/lib/components/field/Group/index.js.map +1 -0
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +6 -6
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts +2 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +25 -28
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +9 -10
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/Phone/index.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +18 -21
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.d.ts +1 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +9 -8
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +7 -9
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +4 -8
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +8 -8
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +5 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +2 -2
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +7 -6
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/TextInput/index.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +7 -7
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +6 -6
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/URL/index.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +3 -3
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +11 -11
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js +2 -2
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js +6 -6
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- package/lib/components/helpers/case-utils.d.ts.map +1 -1
- package/lib/components/helpers/case-utils.js +5 -5
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -0
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +4 -1
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +2 -3
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.js +3 -3
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.js +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js +9 -20
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +2 -2
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +13 -14
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +500 -500
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.d.ts +4 -4
- package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Date.js +20 -20
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/formatters/common.js +1 -1
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +6 -6
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js +25 -19
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/reactContextHelpers.js +1 -1
- package/lib/components/helpers/reactContextHelpers.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +44 -52
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js +6 -8
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.d.ts +1 -1
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +1 -2
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -1
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +3 -8
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +1 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +2 -2
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +10 -14
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/ActionButtons/index.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +10 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +68 -71
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Assignment/index.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +3 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +4 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/AssignmentCard/index.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +11 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +36 -158
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js +30 -30
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +9 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +36 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +178 -160
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +9 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js +29 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +10 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.js +102 -0
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts +2 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.js +2 -0
- package/lib/components/infra/Containers/SimpleView/index.js.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +17 -24
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/helpers.d.ts +2 -0
- package/lib/components/infra/Containers/helpers.d.ts.map +1 -0
- package/lib/components/infra/Containers/helpers.js +7 -0
- package/lib/components/infra/Containers/helpers.js.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +3 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +13 -17
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +10 -12
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +9 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +8 -17
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/DeferLoad/index.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +15 -14
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +11 -15
- package/lib/components/infra/MultiStep/MultiStep.d.ts +5 -7
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +29 -80
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/MultiStep/index.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +103 -105
- package/lib/components/infra/NavBar/NavBar.d.ts +3 -3
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +18 -52
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +9 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +5 -12
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +2 -3
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +2 -3
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +14 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +40 -62
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/RootContainer/index.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +2 -2
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +18 -21
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +6 -8
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +10 -9
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +3 -4
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +6 -11
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.css +22 -23
- package/lib/components/template/AppShell/AppShell.d.ts +6 -7
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +23 -29
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +4 -4
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +3 -3
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +3 -4
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +44 -8
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +3 -4
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +18 -41
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +3 -3
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -7
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +3 -4
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +7 -14
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +4 -4
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +35 -49
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +8 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +5 -14
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +8 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +5 -13
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +3 -4
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +5 -10
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +5 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +5 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/index.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +7 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +6 -17
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +2 -2
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +8 -9
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +3 -4
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -9
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +3 -4
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +7 -6
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +2 -2
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +16 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +103 -178
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +4 -6
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +38 -46
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +3 -3
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js +2 -10
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +8 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +5 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js +2 -5
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +3 -5
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -8
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +10 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +12 -29
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +19 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +17 -20
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +12 -7
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +122 -132
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +9 -21
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -5
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +4 -4
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +6 -9
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +2 -4
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +2 -10
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +8 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +5 -16
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js +2 -5
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +3 -3
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/index.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +3 -2
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +20 -37
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +2 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +10 -19
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +60 -1
- package/lib/components/widget/Attachment/Attachment.d.ts +8 -1
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +279 -353
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/index.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +37 -31
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/CaseHistory/index.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +4 -3
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +2 -4
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +107 -136
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +4 -4
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +8 -16
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +8 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +57 -35
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +3 -2
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +8 -23
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryItem/index.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +3 -2
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +3 -3
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +4 -4
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +31 -67
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/components_map.d.ts +2 -2
- package/lib/components_map.d.ts.map +1 -1
- package/lib/components_map.js +4 -2
- package/lib/components_map.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +21 -4
- package/lib/hooks/useConsolidatedRef.js +2 -2
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/sdk-local-component-map.js +2 -2
- package/lib/sdk-pega-component-map.d.ts +4 -0
- package/lib/sdk-pega-component-map.js +104 -100
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +14 -15
- package/package.json +5 -2
- package/lib/components/helpers/auth.d.ts +0 -18
- package/lib/components/helpers/auth.d.ts.map +0 -1
- package/lib/components/helpers/auth.js +0 -752
- package/lib/components/helpers/auth.js.map +0 -1
- package/lib/components/helpers/authManager.d.ts +0 -21
- package/lib/components/helpers/authManager.d.ts.map +0 -1
- package/lib/components/helpers/authManager.js +0 -864
- package/lib/components/helpers/authManager.js.map +0 -1
- package/lib/components/helpers/config_access.d.ts +0 -3
- package/lib/components/helpers/config_access.d.ts.map +0 -1
- package/lib/components/helpers/config_access.js +0 -198
- package/lib/components/helpers/config_access.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Children, useMemo } from 'react';
|
|
3
3
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
4
4
|
/*
|
|
5
5
|
* BannerPage template.
|
|
@@ -11,7 +11,7 @@ export default function BannerPage(props) {
|
|
|
11
11
|
const childArray = useMemo(() => {
|
|
12
12
|
return Children.toArray(children);
|
|
13
13
|
}, [children]);
|
|
14
|
-
return (
|
|
14
|
+
return (_jsx(Banner, { variant: layout, a: childArray[0], b: childArray[1], banner: {
|
|
15
15
|
variant: imageTheme,
|
|
16
16
|
backgroundColor,
|
|
17
17
|
title: heading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerPage.js","sourceRoot":"","sources":["../../../../src/components/template/BannerPage/BannerPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"BannerPage.js","sourceRoot":"","sources":["../../../../src/components/template/BannerPage/BannerPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAqB,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAchF;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAyC;IAC1E,8EAA8E;IAC9E,MAAM,MAAM,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAE7C,MAAM,EACJ,QAAQ,EACR,MAAM,GAAG,YAAY,EACrB,OAAO,GAAG,EAAE,EACZ,OAAO,GAAG,EAAE,EACZ,UAAU,GAAG,OAAO,EACpB,eAAe,GAAG,EAAE,EACpB,eAAe,GAAG,EAAE,EACpB,SAAS,GAAG,KAAK,EAClB,GAAG,KAAK,CAAC;IAEV,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE;QAC9B,OAAO,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,KAAC,MAAM,IACL,OAAO,EAAE,MAAM,EACf,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAChB,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAChB,MAAM,EAAE;YACN,OAAO,EAAE,UAAU;YACnB,eAAe;YACf,KAAK,EAAE,OAAO;YACd,OAAO;YACP,eAAe;YACf,SAAS;SACV,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { Children, PropsWithChildren, useMemo } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface BannerPageProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n layout?: string;\n heading?: string;\n message?: string;\n imageTheme?: string;\n backgroundImage?: string;\n backgroundColor?: string;\n tintImage?: boolean;\n}\n\n/*\n * BannerPage template.\n */\nexport default function BannerPage(props: PropsWithChildren<BannerPageProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const Banner = getComponentFromMap('Banner');\n\n const {\n children,\n layout = 'two-column',\n heading = '',\n message = '',\n imageTheme = 'light',\n backgroundImage = '',\n backgroundColor = '',\n tintImage = false\n } = props;\n\n const childArray = useMemo(() => {\n return Children.toArray(children);\n }, [children]);\n\n return (\n <Banner\n variant={layout}\n a={childArray[0]}\n b={childArray[1]}\n banner={{\n variant: imageTheme,\n backgroundColor,\n title: heading,\n message,\n backgroundImage,\n tintImage\n }}\n />\n );\n}\n"]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
interface CaseSummaryProps extends PConnProps {
|
|
4
|
-
children: Array<any>;
|
|
5
4
|
}
|
|
6
|
-
export default function CaseSummary(props: CaseSummaryProps): JSX.Element;
|
|
5
|
+
export default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>): JSX.Element;
|
|
7
6
|
export {};
|
|
8
7
|
//# sourceMappingURL=CaseSummary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSummary.d.ts","sourceRoot":"","sources":["../../../../src/components/template/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CaseSummary.d.ts","sourceRoot":"","sources":["../../../../src/components/template/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgB,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,gBAAiB,SAAQ,UAAU;CAE5C;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,eAwF7E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
3
3
|
export default function CaseSummary(props) {
|
|
4
4
|
// Get emitted components from map (so we can get any override that may exist)
|
|
@@ -7,8 +7,10 @@ export default function CaseSummary(props) {
|
|
|
7
7
|
const thePConn = getPConnect();
|
|
8
8
|
const theConfigProps = thePConn.getConfigProps();
|
|
9
9
|
// const { status, showStatus } = theConfigProps;
|
|
10
|
-
const status = theConfigProps
|
|
11
|
-
const showStatus = theConfigProps
|
|
10
|
+
const status = theConfigProps.status;
|
|
11
|
+
const showStatus = theConfigProps.showStatus;
|
|
12
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
13
|
+
const localeCategory = 'ModalContainer';
|
|
12
14
|
// from Constellation DX Components
|
|
13
15
|
// get the primary and secondary fields with the raw data (which has the non-resolved property values)
|
|
14
16
|
// const regionsRaw = getPConnect().getRawMetadata().children;
|
|
@@ -18,14 +20,50 @@ export default function CaseSummary(props) {
|
|
|
18
20
|
// may want to move these into useEffect/useState combo
|
|
19
21
|
let arPrimaryFields = [];
|
|
20
22
|
let arSecondaryFields = [];
|
|
23
|
+
/* eslint-disable @typescript-eslint/no-shadow */
|
|
24
|
+
function prepareComponentInCaseSummary(pConnectMeta, getPConnect) {
|
|
25
|
+
const { config, children } = pConnectMeta;
|
|
26
|
+
const pConnect = getPConnect();
|
|
27
|
+
const caseSummaryComponentObject = {};
|
|
28
|
+
const { type } = pConnectMeta;
|
|
29
|
+
const createdComponent = pConnect.createComponent({
|
|
30
|
+
type,
|
|
31
|
+
children: children ? [...children] : [],
|
|
32
|
+
config: {
|
|
33
|
+
...config
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
caseSummaryComponentObject.value = createdComponent;
|
|
37
|
+
return caseSummaryComponentObject;
|
|
38
|
+
}
|
|
39
|
+
function prepareCaseSummaryData(summaryFieldChildren) {
|
|
40
|
+
const convertChildrenToSummaryData = kid => {
|
|
41
|
+
return kid?.map((childItem, index) => {
|
|
42
|
+
const childMeta = childItem.getPConnect().meta;
|
|
43
|
+
const caseSummaryComponentObject = prepareComponentInCaseSummary(childMeta, childItem.getPConnect);
|
|
44
|
+
caseSummaryComponentObject.id = index + 1;
|
|
45
|
+
return caseSummaryComponentObject;
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
return summaryFieldChildren ? convertChildrenToSummaryData(summaryFieldChildren?.getChildren()) : undefined;
|
|
49
|
+
}
|
|
21
50
|
for (const child of children) {
|
|
22
51
|
const childPConn = child.props.getPConnect();
|
|
23
52
|
const childPConnData = childPConn.resolveConfigProps(childPConn.getRawMetadata());
|
|
24
|
-
if (childPConnData.name.toLowerCase() ===
|
|
53
|
+
if (childPConnData.name.toLowerCase() === 'primary fields') {
|
|
25
54
|
arPrimaryFields = childPConnData.children;
|
|
55
|
+
arPrimaryFields.forEach(field => {
|
|
56
|
+
if (field.config?.value && typeof field.config?.value === 'string') {
|
|
57
|
+
field.config.value = localizedVal(field.config.value, localeCategory);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
26
60
|
}
|
|
27
|
-
else if (childPConnData.name.toLowerCase() ===
|
|
61
|
+
else if (childPConnData.name.toLowerCase() === 'secondary fields') {
|
|
62
|
+
const secondarySummaryFields = prepareCaseSummaryData(childPConn);
|
|
28
63
|
arSecondaryFields = childPConnData.children;
|
|
64
|
+
arSecondaryFields.forEach((field, index) => {
|
|
65
|
+
field.config.displayLabel = secondarySummaryFields[index]?.value?.props?.label;
|
|
66
|
+
});
|
|
29
67
|
}
|
|
30
68
|
}
|
|
31
69
|
// At this point, should hand off to another component for layout and rendering
|
|
@@ -33,8 +71,6 @@ export default function CaseSummary(props) {
|
|
|
33
71
|
// debugging/investigation help
|
|
34
72
|
// console.log(`CaseSummary: arPrimaryFields: ${JSON.stringify(arPrimaryFields)}`);
|
|
35
73
|
// console.log(`CaseSummary: arSecondaryFields: ${JSON.stringify(arSecondaryFields)}`);
|
|
36
|
-
return (
|
|
37
|
-
React.createElement(CaseSummaryFields, { status: status, showStatus: showStatus, theFields: arPrimaryFields }),
|
|
38
|
-
React.createElement(CaseSummaryFields, { theFields: arSecondaryFields })));
|
|
74
|
+
return (_jsxs("div", { id: 'CaseSummary', children: [_jsx(CaseSummaryFields, { status: status, showStatus: showStatus, theFields: arPrimaryFields }), _jsx(CaseSummaryFields, { theFields: arSecondaryFields })] }));
|
|
39
75
|
}
|
|
40
76
|
//# sourceMappingURL=CaseSummary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSummary.js","sourceRoot":"","sources":["../../../../src/components/template/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseSummary.js","sourceRoot":"","sources":["../../../../src/components/template/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAOhF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAA0C;IAC5E,8EAA8E;IAC9E,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;IAEnE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAExC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,cAAc,GAAQ,QAAQ,CAAC,cAAc,EAAE,CAAC;IACtD,iDAAiD;IACjD,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC;IACrC,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;IAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,cAAc,CAAC;IAC3D,MAAM,cAAc,GAAG,gBAAgB,CAAC;IACxC,mCAAmC;IACnC,sGAAsG;IACtG,8DAA8D;IAC9D,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F,KAAC,iBAAiB,IAAC,SAAS,EAAE,iBAAiB,GAAI,IAC/C,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, ReactElement } from 'react';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface CaseSummaryProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n}\n\nexport default function CaseSummary(props: PropsWithChildren<CaseSummaryProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const CaseSummaryFields = getComponentFromMap('CaseSummaryFields');\n\n const { getPConnect, children } = props;\n\n const thePConn = getPConnect();\n const theConfigProps: any = thePConn.getConfigProps();\n // const { status, showStatus } = theConfigProps;\n const status = theConfigProps.status;\n const showStatus = theConfigProps.showStatus;\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'ModalContainer';\n // from Constellation DX Components\n // get the primary and secondary fields with the raw data (which has the non-resolved property values)\n // const regionsRaw = getPConnect().getRawMetadata().children;\n // const primaryFieldsRaw = regionsRaw[0].children;\n // const secondaryFieldsRaw = regionsRaw[1].children;\n\n // From other SDKs\n // may want to move these into useEffect/useState combo\n let arPrimaryFields: any[] = [];\n let arSecondaryFields: any[] = [];\n\n /* eslint-disable @typescript-eslint/no-shadow */\n function prepareComponentInCaseSummary(pConnectMeta, getPConnect) {\n const { config, children } = pConnectMeta;\n const pConnect = getPConnect();\n\n const caseSummaryComponentObject: any = {};\n\n const { type } = pConnectMeta;\n const createdComponent = pConnect.createComponent({\n type,\n children: children ? [...children] : [],\n config: {\n ...config\n }\n });\n\n caseSummaryComponentObject.value = createdComponent;\n return caseSummaryComponentObject;\n }\n\n function prepareCaseSummaryData(summaryFieldChildren) {\n const convertChildrenToSummaryData = kid => {\n return kid?.map((childItem, index) => {\n const childMeta = childItem.getPConnect().meta;\n const caseSummaryComponentObject = prepareComponentInCaseSummary(childMeta, childItem.getPConnect);\n caseSummaryComponentObject.id = index + 1;\n return caseSummaryComponentObject;\n });\n };\n return summaryFieldChildren ? convertChildrenToSummaryData(summaryFieldChildren?.getChildren()) : undefined;\n }\n\n for (const child of children as ReactElement[]) {\n const childPConn = (child as ReactElement).props.getPConnect();\n const childPConnData = childPConn.resolveConfigProps(childPConn.getRawMetadata());\n if (childPConnData.name.toLowerCase() === 'primary fields') {\n arPrimaryFields = childPConnData.children;\n arPrimaryFields.forEach(field => {\n if (field.config?.value && typeof field.config?.value === 'string') {\n field.config.value = localizedVal(field.config.value, localeCategory);\n }\n });\n } else if (childPConnData.name.toLowerCase() === 'secondary fields') {\n const secondarySummaryFields = prepareCaseSummaryData(childPConn);\n arSecondaryFields = childPConnData.children;\n arSecondaryFields.forEach((field, index) => {\n field.config.displayLabel = secondarySummaryFields[index]?.value?.props?.label;\n });\n }\n }\n\n // At this point, should hand off to another component for layout and rendering\n // of primary and secondary fields in the Case Summary\n\n // debugging/investigation help\n // console.log(`CaseSummary: arPrimaryFields: ${JSON.stringify(arPrimaryFields)}`);\n // console.log(`CaseSummary: arSecondaryFields: ${JSON.stringify(arSecondaryFields)}`);\n\n return (\n <div id='CaseSummary'>\n <CaseSummaryFields status={status} showStatus={showStatus} theFields={arPrimaryFields} />\n <CaseSummaryFields theFields={arSecondaryFields} />\n </div>\n );\n}\n"]}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
interface CaseViewProps extends PConnProps {
|
|
4
4
|
icon: string;
|
|
5
|
-
children: Array<any>;
|
|
6
5
|
subheader: string;
|
|
7
6
|
header: string;
|
|
8
7
|
showIconInHeader: boolean;
|
|
9
8
|
caseInfo: any;
|
|
10
9
|
}
|
|
11
|
-
export default function CaseView(props: CaseViewProps): JSX.Element;
|
|
10
|
+
export default function CaseView(props: PropsWithChildren<CaseViewProps>): JSX.Element;
|
|
12
11
|
export {};
|
|
13
12
|
//# sourceMappingURL=CaseView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.d.ts","sourceRoot":"","sources":["../../../../src/components/template/CaseView/CaseView.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CaseView.d.ts","sourceRoot":"","sources":["../../../../src/components/template/CaseView/CaseView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAiD,MAAM,OAAO,CAAC;AAUzF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,aAAc,SAAQ,UAAU;IAExC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,GAAG,CAAC;CACf;AA6BD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC,aAAa,CAAC,eAuNvE"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
/* eslint-disable react/jsx-boolean-value */
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { Card, CardHeader, Avatar, Typography, Divider } from '@material-ui/core';
|
|
3
|
+
import { useContext, useEffect, useState } from 'react';
|
|
4
|
+
import { Avatar, Card, CardHeader, Divider, Typography } from '@material-ui/core';
|
|
5
5
|
import { makeStyles } from '@material-ui/core/styles';
|
|
6
6
|
import Box from '@material-ui/core/Box';
|
|
7
7
|
import Button from '@material-ui/core/Button';
|
|
8
8
|
import Grid from '@material-ui/core/Grid';
|
|
9
|
+
import { Utils } from '../../helpers/utils';
|
|
9
10
|
import StoreContext from '../../../bridge/Context/StoreContext';
|
|
10
11
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
11
12
|
const useStyles = makeStyles(theme => ({
|
|
@@ -36,11 +37,11 @@ const useStyles = makeStyles(theme => ({
|
|
|
36
37
|
}));
|
|
37
38
|
export default function CaseView(props) {
|
|
38
39
|
// Get emitted components from map (so we can get any override that may exist)
|
|
39
|
-
const CaseViewActionsMenu = getComponentFromMap(
|
|
40
|
-
const VerticalTabs = getComponentFromMap(
|
|
41
|
-
const DeferLoad = getComponentFromMap(
|
|
40
|
+
const CaseViewActionsMenu = getComponentFromMap('CaseViewActionsMenu');
|
|
41
|
+
const VerticalTabs = getComponentFromMap('VerticalTabs');
|
|
42
|
+
const DeferLoad = getComponentFromMap('DeferLoad');
|
|
42
43
|
const { getPConnect, icon = '', header, subheader, children = [],
|
|
43
|
-
// eslint-disable-next-line
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
44
45
|
showIconInHeader = true, caseInfo: { availableActions = [], availableProcesses = [], hasNewAttachments, caseTypeID = '', caseTypeName = '' } } = props;
|
|
45
46
|
const currentCaseID = props.caseInfo.ID;
|
|
46
47
|
let isComponentMounted = true;
|
|
@@ -57,12 +58,8 @@ export default function CaseView(props) {
|
|
|
57
58
|
*/
|
|
58
59
|
function getChildRegionByName(inName) {
|
|
59
60
|
for (const child of children) {
|
|
60
|
-
const theMetadataType = child.props
|
|
61
|
-
|
|
62
|
-
.getRawMetadata()['type'].toLowerCase();
|
|
63
|
-
const theMetadataName = child.props
|
|
64
|
-
.getPConnect()
|
|
65
|
-
.getRawMetadata()['name'].toLowerCase();
|
|
61
|
+
const theMetadataType = child.props.getPConnect().getRawMetadata().type.toLowerCase();
|
|
62
|
+
const theMetadataName = child.props.getPConnect().getRawMetadata().name.toLowerCase();
|
|
66
63
|
if (theMetadataType === 'region' && theMetadataName === inName) {
|
|
67
64
|
return child;
|
|
68
65
|
}
|
|
@@ -128,47 +125,27 @@ export default function CaseView(props) {
|
|
|
128
125
|
}, []);
|
|
129
126
|
useEffect(() => {
|
|
130
127
|
if (hasNewAttachments) {
|
|
128
|
+
// @ts-ignore - Argument of type 'boolean' is not assignable to parameter of type 'object'
|
|
131
129
|
PCore.getPubSubUtils().publish(PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true);
|
|
132
130
|
}
|
|
133
131
|
}, [hasNewAttachments]);
|
|
134
132
|
function _editClick() {
|
|
135
133
|
const actionsAPI = thePConn.getActionsApi();
|
|
136
134
|
const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);
|
|
137
|
-
openLocalAction(editAction.ID, { ...editAction });
|
|
135
|
+
openLocalAction(editAction.ID, { ...editAction, containerName: 'modal', type: 'express' });
|
|
138
136
|
}
|
|
139
137
|
function getActionButtonsHtml() {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
} }, localizedVal('Edit', localeCategory))),
|
|
144
|
-
React.createElement(CaseViewActionsMenu, { getPConnect: getPConnect, availableActions: availableActions, availableProcesses: availableProcesses, caseTypeName: caseTypeName, caseTypeID: caseTypeID })));
|
|
145
|
-
return aBHtml;
|
|
138
|
+
return (_jsxs(Box, { children: [editAction && (_jsx(Button, { onClick: () => {
|
|
139
|
+
_editClick();
|
|
140
|
+
}, children: localizedVal('Edit', localeCategory) })), _jsx(CaseViewActionsMenu, { getPConnect: getPConnect, availableActions: availableActions, availableProcesses: availableProcesses, caseTypeName: caseTypeName, caseTypeID: caseTypeID })] }));
|
|
146
141
|
}
|
|
147
142
|
function getContainerContents() {
|
|
148
143
|
if (!displayOnlyFA) {
|
|
149
144
|
// show full portal
|
|
150
|
-
return (
|
|
151
|
-
React.createElement(Grid, { item: true, xs: 3 },
|
|
152
|
-
React.createElement("div", { hidden: true, id: 'current-caseID' }, currentCaseID),
|
|
153
|
-
React.createElement(Card, { className: classes.root },
|
|
154
|
-
React.createElement(CardHeader, { className: classes.caseViewHeader, title: React.createElement(Typography, { variant: 'h6', component: 'div' }, PCore.getLocaleUtils().getLocaleValue(header, '', localeKey)), subheader: React.createElement(Typography, { variant: 'body1', component: 'div', id: 'caseId' }, subheader), avatar: React.createElement(Avatar, { className: classes.caseViewIconBox, variant: 'square' },
|
|
155
|
-
React.createElement("img", { src: svgCase, className: classes.caseViewIconImage })) }),
|
|
156
|
-
getActionButtonsHtml(),
|
|
157
|
-
React.createElement(Divider, null),
|
|
158
|
-
theSummaryRegion,
|
|
159
|
-
React.createElement(Divider, null),
|
|
160
|
-
vertTabInfo.length > 1 && React.createElement(VerticalTabs, { tabconfig: vertTabInfo }))),
|
|
161
|
-
React.createElement(Grid, { item: true, xs: 6 },
|
|
162
|
-
theStagesRegion,
|
|
163
|
-
theTodoRegion,
|
|
164
|
-
deferLoadInfo.length > 0 && (React.createElement(DeferLoad, { getPConnect: getPConnect, name: deferLoadInfo[activeVertTab].config.name, isTab: true }))),
|
|
165
|
-
React.createElement(Grid, { item: true, xs: 3 }, theUtilitiesRegion)));
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
// displayOnlyFA - only show the "todo" region
|
|
169
|
-
return (React.createElement(Grid, { container: true },
|
|
170
|
-
React.createElement(Grid, { item: true, xs: 12 }, theTodoRegion)));
|
|
145
|
+
return (_jsxs(Grid, { container: true, children: [_jsxs(Grid, { item: true, xs: 3, children: [_jsx("div", { hidden: true, id: 'current-caseID', children: currentCaseID }), _jsxs(Card, { className: classes.root, children: [_jsx(CardHeader, { className: classes.caseViewHeader, title: _jsx(Typography, { variant: 'h6', component: 'div', children: PCore.getLocaleUtils().getLocaleValue(header, '', localeKey) }), subheader: _jsx(Typography, { variant: 'body1', component: 'div', id: 'caseId', children: subheader }), avatar: _jsx(Avatar, { className: classes.caseViewIconBox, variant: 'square', children: _jsx("img", { src: svgCase, className: classes.caseViewIconImage }) }) }), getActionButtonsHtml(), _jsx(Divider, {}), theSummaryRegion, _jsx(Divider, {}), vertTabInfo.length > 1 && _jsx(VerticalTabs, { tabconfig: vertTabInfo })] })] }), _jsxs(Grid, { item: true, xs: 6, children: [theStagesRegion, theTodoRegion, deferLoadInfo.length > 0 && _jsx(DeferLoad, { getPConnect: getPConnect, name: deferLoadInfo[activeVertTab].config.name, isTab: true })] }), _jsx(Grid, { item: true, xs: 3, children: theUtilitiesRegion })] }));
|
|
171
146
|
}
|
|
147
|
+
// displayOnlyFA - only show the "todo" region
|
|
148
|
+
return (_jsx(Grid, { container: true, children: _jsx(Grid, { item: true, xs: 12, children: theTodoRegion }) }));
|
|
172
149
|
}
|
|
173
150
|
return getContainerContents();
|
|
174
151
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseView.js","sourceRoot":"","sources":["../../../../src/components/template/CaseView/CaseView.tsx"],"names":[],"mappings":"AAAA,4CAA4C;AAE5C,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAE1C,OAAO,YAAY,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAmBhF,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,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D,6BAAK,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,iBAAiB,GAAI,CACpD,GAEX;wBACD,oBAAoB,EAAE;wBACvB,oBAAC,OAAO,OAAG;wBACV,gBAAgB;wBACjB,oBAAC,OAAO,OAAG;wBACV,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAC,YAAY,IAAC,SAAS,EAAE,WAAW,GAAI,CAC9D,CACF;gBAEP,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;oBACb,eAAe;oBACf,aAAa;oBACb,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,CAC3B,oBAAC,SAAS,IACR,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,IAAI,EAC9C,KAAK,SACL,CACH,CACI;gBAEP,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,IACb,kBAAkB,CACd,CACF,CACR,CAAC;SACH;aAAM;YACL,8CAA8C;YAC9C,OAAO,CACL,oBAAC,IAAI,IAAC,SAAS;gBACb,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,IACd,aAAa,CACT,CACF,CACR,CAAC;SACH;IACH,CAAC;IAED,OAAO,oBAAoB,EAAE,CAAC;AAChC,CAAC","sourcesContent":["/* eslint-disable react/jsx-boolean-value */\n\nimport React, { useState, useEffect, useContext } from 'react';\nimport { Utils } from '../../helpers/utils';\nimport { Card, CardHeader, Avatar, Typography, Divider } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport Grid from '@material-ui/core/Grid';\n\nimport StoreContext from '../../../bridge/Context/StoreContext';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface CaseViewProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n icon: string,\n children: Array<any>,\n subheader: string,\n header: string,\n showIconInHeader: boolean,\n caseInfo: any,\n}\n\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 2 errors)\ndeclare const PCore: 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 caseViewHeader: {\n backgroundColor: theme.palette.info.light,\n color: theme.palette.getContrastText(theme.palette.info.light),\n borderRadius: 'inherit'\n },\n caseViewIconBox: {\n backgroundColor: theme.palette.info.dark,\n width: theme.spacing(8),\n height: theme.spacing(8),\n padding: theme.spacing(1)\n },\n caseViewIconImage: {\n filter: 'invert(100%)'\n }\n}));\n\nexport default function CaseView(props: CaseViewProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const CaseViewActionsMenu = getComponentFromMap(\"CaseViewActionsMenu\");\n const VerticalTabs = getComponentFromMap(\"VerticalTabs\");\n const DeferLoad = getComponentFromMap(\"DeferLoad\");\n\n const {\n getPConnect,\n icon = '',\n header,\n subheader,\n children = [],\n // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars\n showIconInHeader = true,\n caseInfo: {\n availableActions = [],\n availableProcesses = [],\n hasNewAttachments,\n caseTypeID = '',\n caseTypeName = ''\n }\n } = props;\n const currentCaseID = props.caseInfo.ID;\n let isComponentMounted = true;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n const thePConn = getPConnect();\n\n const classes = useStyles();\n\n const editAction = availableActions.find(action => action.ID === 'pyUpdateCaseDetails');\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'CaseView';\n const localeKey = `${caseTypeID}!CASE!${caseTypeName}`.toUpperCase();\n\n /**\n *\n * @param inName the metadata <em>name</em> that will cause a region to be returned\n */\n function getChildRegionByName(inName: string): any {\n for (const child of children) {\n const theMetadataType: string = child.props\n .getPConnect()\n .getRawMetadata()\n ['type'].toLowerCase();\n const theMetadataName: string = child.props\n .getPConnect()\n .getRawMetadata()\n ['name'].toLowerCase();\n\n if (theMetadataType === 'region' && theMetadataName === inName) {\n return child;\n }\n }\n\n return null;\n }\n\n const theSummaryRegion = getChildRegionByName('summary');\n const theStagesRegion = getChildRegionByName('stages');\n const theTodoRegion = getChildRegionByName('todo');\n const theUtilitiesRegion = getChildRegionByName('utilities');\n const theTabsRegion = getChildRegionByName('tabs');\n\n const svgCase = Utils.getImageSrc(icon, Utils.getSDKStaticConentUrl());\n\n const [activeVertTab, setActiveVertTab] = useState(0);\n\n // const tmpLoadData1 = { config: { label: \"Details\", name: \"pyDetailsTabContent\" }, type: \"DeferLoad\" };\n // const tmpLoadData2 = { config: { label: \"Case History\", name: \"CaseHistory\" }, type: \"DeferLoad\" };\n\n // Extract the tabs we need to display from theTabsRegion (one tab per entry in theTabsRegionChildren)\n const theTabsRegionChildren = theTabsRegion.props.getPConnect().getChildren();\n\n // vertTabInfo is sent to VerticalTabs component\n const vertTabInfo: Array<Object> = [];\n\n // deferLoadInfo is sent to DeferLoad component (currently selected entry)\n const deferLoadInfo: Array<any> = [];\n\n if (theTabsRegionChildren) {\n // populate vertTabInfo and deferLoadInfo\n theTabsRegionChildren.forEach((tabComp, index) => {\n const theTabCompConfig = tabComp.getPConnect().getConfigProps();\n // eslint-disable-next-line prefer-const\n let { label, inheritedProps } = theTabCompConfig;\n // For some tabs, \"label\" property is not avaialable in theTabCompConfig, so will get them from inheritedProps\n if (!label) {\n inheritedProps.forEach(inheritedProp => {\n if (inheritedProp.prop === 'label') {\n label = inheritedProp.value;\n }\n });\n }\n // We'll display the tabs when either visibility property doesn't exist or is true(if exists)\n if (theTabCompConfig.visibility === undefined || theTabCompConfig.visibility === true) {\n vertTabInfo.push({ name: label, id: index });\n deferLoadInfo.push({ type: 'DeferLoad', config: theTabCompConfig });\n }\n });\n }\n\n function handleVerticalTabClick(eventDetail: any) {\n const theItem = parseInt(eventDetail.additionalData.itemClicked, 10);\n\n // only call useEffectSetter if the component is mounted\n if (isComponentMounted) {\n setActiveVertTab(theItem);\n }\n }\n\n // Add and Remove event listener for VerticalTabClick only at startup and teardown\n useEffect(() => {\n document.addEventListener('VerticalTabClick', (event: any) => {\n handleVerticalTabClick(event.detail);\n });\n\n return (): void => {\n // inform that the component is unmounted so other code can\n // know not to try to call useState setters (to avoid console warnings)\n isComponentMounted = false;\n\n document.removeEventListener('VerticalTabClick', (event: any) => {\n handleVerticalTabClick(event.detail);\n });\n };\n }, []);\n\n useEffect(() => {\n if (hasNewAttachments) {\n PCore.getPubSubUtils().publish(\n PCore.getEvents().getCaseEvent().CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW,\n true\n );\n }\n }, [hasNewAttachments]);\n\n function _editClick() {\n const actionsAPI = thePConn.getActionsApi();\n const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);\n\n openLocalAction(editAction.ID, { ...editAction });\n }\n\n function getActionButtonsHtml(): any {\n const aBHtml = (\n <Box>\n {editAction && (\n <Button\n onClick={() => {\n _editClick();\n }}\n >\n {localizedVal('Edit', localeCategory)}\n </Button>\n )}\n <CaseViewActionsMenu\n getPConnect={getPConnect}\n availableActions={availableActions}\n availableProcesses={availableProcesses}\n caseTypeName={caseTypeName}\n caseTypeID={caseTypeID}\n />\n </Box>\n );\n\n return aBHtml;\n }\n\n function getContainerContents() {\n if (!displayOnlyFA) {\n // show full portal\n return (\n <Grid container>\n <Grid item xs={3}>\n <div hidden={true} id='current-caseID'>\n {currentCaseID}\n </div>\n <Card className={classes.root}>\n <CardHeader\n className={classes.caseViewHeader}\n title={\n <Typography variant='h6' component='div'>\n {PCore.getLocaleUtils().getLocaleValue(header, '', localeKey)}\n </Typography>\n }\n subheader={\n <Typography variant='body1' component='div' id='caseId'>\n {subheader}\n </Typography>\n }\n avatar={\n <Avatar className={classes.caseViewIconBox} variant='square'>\n <img src={svgCase} className={classes.caseViewIconImage} />\n </Avatar>\n }\n />\n {getActionButtonsHtml()}\n <Divider />\n {theSummaryRegion}\n <Divider />\n {vertTabInfo.length > 1 && <VerticalTabs tabconfig={vertTabInfo} />}\n </Card>\n </Grid>\n\n <Grid item xs={6}>\n {theStagesRegion}\n {theTodoRegion}\n {deferLoadInfo.length > 0 && (\n <DeferLoad\n getPConnect={getPConnect}\n name={deferLoadInfo[activeVertTab].config.name}\n isTab\n />\n )}\n </Grid>\n\n <Grid item xs={3}>\n {theUtilitiesRegion}\n </Grid>\n </Grid>\n );\n } else {\n // displayOnlyFA - only show the \"todo\" region\n return (\n <Grid container>\n <Grid item xs={12}>\n {theTodoRegion}\n </Grid>\n </Grid>\n );\n }\n }\n\n return getContainerContents();\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CaseView.js","sourceRoot":"","sources":["../../../../src/components/template/CaseView/CaseView.tsx"],"names":[],"mappings":";AAAA,4CAA4C;AAE5C,OAAO,EAAmC,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,YAAY,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAYhF,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;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AAS,EACP,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,EAAE,EAAC,QAAQ,YACpD,SAAS,GACC,EAEf,MAAM,EACJ,KAAC,MAAM,IAAC,SAAS,EAAE,OAAO,CAAC,eAAe,EAAE,OAAO,EAAC,QAAQ,YAC1D,cAAK,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,iBAAiB,GAAI,GACpD,GAEX,EACD,oBAAoB,EAAE,EACvB,KAAC,OAAO,KAAG,EACV,gBAAgB,EACjB,KAAC,OAAO,KAAG,EACV,WAAW,CAAC,MAAM,GAAG,CAAC,IAAI,KAAC,YAAY,IAAC,SAAS,EAAE,WAAW,GAAI,IAC9D,IACF,EAEP,MAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,aACb,eAAe,EACf,aAAa,EACb,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,KAAC,SAAS,IAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,SAAG,IACrH,EAEP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACb,kBAAkB,GACd,IACF,CACR,CAAC;SACH;QACD,8CAA8C;QAC9C,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,kBACb,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,YACd,aAAa,GACT,GACF,CACR,CAAC;IACJ,CAAC;IAED,OAAO,oBAAoB,EAAE,CAAC;AAChC,CAAC","sourcesContent":["/* eslint-disable react/jsx-boolean-value */\n\nimport { PropsWithChildren, ReactElement, useContext, useEffect, useState } from 'react';\nimport { Avatar, Card, CardHeader, Divider, Typography } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Box from '@material-ui/core/Box';\nimport Button from '@material-ui/core/Button';\nimport Grid from '@material-ui/core/Grid';\n\nimport { Utils } from '../../helpers/utils';\nimport StoreContext from '../../../bridge/Context/StoreContext';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface CaseViewProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n icon: string;\n subheader: string;\n header: string;\n showIconInHeader: boolean;\n caseInfo: 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 caseViewHeader: {\n backgroundColor: theme.palette.info.light,\n color: theme.palette.getContrastText(theme.palette.info.light),\n borderRadius: 'inherit'\n },\n caseViewIconBox: {\n backgroundColor: theme.palette.info.dark,\n width: theme.spacing(8),\n height: theme.spacing(8),\n padding: theme.spacing(1)\n },\n caseViewIconImage: {\n filter: 'invert(100%)'\n }\n}));\n\nexport default function CaseView(props: PropsWithChildren<CaseViewProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const CaseViewActionsMenu = getComponentFromMap('CaseViewActionsMenu');\n const VerticalTabs = getComponentFromMap('VerticalTabs');\n const DeferLoad = getComponentFromMap('DeferLoad');\n\n const {\n getPConnect,\n icon = '',\n header,\n subheader,\n children = [],\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n showIconInHeader = true,\n caseInfo: { availableActions = [], availableProcesses = [], hasNewAttachments, caseTypeID = '', caseTypeName = '' }\n } = props;\n\n const currentCaseID = props.caseInfo.ID;\n let isComponentMounted = true;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n const thePConn = getPConnect();\n\n const classes = useStyles();\n\n const editAction = availableActions.find(action => action.ID === 'pyUpdateCaseDetails');\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'CaseView';\n const localeKey = `${caseTypeID}!CASE!${caseTypeName}`.toUpperCase();\n\n /**\n *\n * @param inName the metadata <em>name</em> that will cause a region to be returned\n */\n function getChildRegionByName(inName: string): any {\n for (const child of children as ReactElement[]) {\n const theMetadataType: string = (child as ReactElement).props.getPConnect().getRawMetadata().type.toLowerCase();\n const theMetadataName: string = (child as ReactElement).props.getPConnect().getRawMetadata().name.toLowerCase();\n\n if (theMetadataType === 'region' && theMetadataName === inName) {\n return child;\n }\n }\n\n return null;\n }\n\n const theSummaryRegion = getChildRegionByName('summary');\n const theStagesRegion = getChildRegionByName('stages');\n const theTodoRegion = getChildRegionByName('todo');\n const theUtilitiesRegion = getChildRegionByName('utilities');\n const theTabsRegion = getChildRegionByName('tabs');\n\n const svgCase = Utils.getImageSrc(icon, Utils.getSDKStaticConentUrl());\n\n const [activeVertTab, setActiveVertTab] = useState(0);\n\n // const tmpLoadData1 = { config: { label: \"Details\", name: \"pyDetailsTabContent\" }, type: \"DeferLoad\" };\n // const tmpLoadData2 = { config: { label: \"Case History\", name: \"CaseHistory\" }, type: \"DeferLoad\" };\n\n // Extract the tabs we need to display from theTabsRegion (one tab per entry in theTabsRegionChildren)\n const theTabsRegionChildren = theTabsRegion.props.getPConnect().getChildren();\n\n // vertTabInfo is sent to VerticalTabs component\n const vertTabInfo: Object[] = [];\n\n // deferLoadInfo is sent to DeferLoad component (currently selected entry)\n const deferLoadInfo: any[] = [];\n\n if (theTabsRegionChildren) {\n // populate vertTabInfo and deferLoadInfo\n theTabsRegionChildren.forEach((tabComp, index) => {\n const theTabCompConfig = tabComp.getPConnect().getConfigProps();\n // eslint-disable-next-line prefer-const\n let { label, inheritedProps } = theTabCompConfig;\n // For some tabs, \"label\" property is not avaialable in theTabCompConfig, so will get them from inheritedProps\n if (!label) {\n inheritedProps.forEach(inheritedProp => {\n if (inheritedProp.prop === 'label') {\n label = inheritedProp.value;\n }\n });\n }\n // We'll display the tabs when either visibility property doesn't exist or is true(if exists)\n if (theTabCompConfig.visibility === undefined || theTabCompConfig.visibility === true) {\n vertTabInfo.push({ name: label, id: index });\n deferLoadInfo.push({ type: 'DeferLoad', config: theTabCompConfig });\n }\n });\n }\n\n function handleVerticalTabClick(eventDetail: any) {\n const theItem = parseInt(eventDetail.additionalData.itemClicked, 10);\n\n // only call useEffectSetter if the component is mounted\n if (isComponentMounted) {\n setActiveVertTab(theItem);\n }\n }\n\n // Add and Remove event listener for VerticalTabClick only at startup and teardown\n useEffect(() => {\n document.addEventListener('VerticalTabClick', (event: any) => {\n handleVerticalTabClick(event.detail);\n });\n\n return (): void => {\n // inform that the component is unmounted so other code can\n // know not to try to call useState setters (to avoid console warnings)\n isComponentMounted = false;\n\n document.removeEventListener('VerticalTabClick', (event: any) => {\n handleVerticalTabClick(event.detail);\n });\n };\n }, []);\n\n useEffect(() => {\n if (hasNewAttachments) {\n // @ts-ignore - Argument of type 'boolean' is not assignable to parameter of type 'object'\n PCore.getPubSubUtils().publish((PCore.getEvents().getCaseEvent() as any).CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW, true);\n }\n }, [hasNewAttachments]);\n\n function _editClick() {\n const actionsAPI = thePConn.getActionsApi();\n const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);\n\n openLocalAction(editAction.ID, { ...editAction, containerName: 'modal', type: 'express' });\n }\n\n function getActionButtonsHtml(): any {\n return (\n <Box>\n {editAction && (\n <Button\n onClick={() => {\n _editClick();\n }}\n >\n {localizedVal('Edit', localeCategory)}\n </Button>\n )}\n <CaseViewActionsMenu\n getPConnect={getPConnect}\n availableActions={availableActions}\n availableProcesses={availableProcesses}\n caseTypeName={caseTypeName}\n caseTypeID={caseTypeID}\n />\n </Box>\n );\n }\n\n function getContainerContents() {\n if (!displayOnlyFA) {\n // show full portal\n return (\n <Grid container>\n <Grid item xs={3}>\n <div hidden={true} id='current-caseID'>\n {currentCaseID}\n </div>\n <Card className={classes.root}>\n <CardHeader\n className={classes.caseViewHeader}\n title={\n <Typography variant='h6' component='div'>\n {PCore.getLocaleUtils().getLocaleValue(header, '', localeKey)}\n </Typography>\n }\n subheader={\n <Typography variant='body1' component='div' id='caseId'>\n {subheader}\n </Typography>\n }\n avatar={\n <Avatar className={classes.caseViewIconBox} variant='square'>\n <img src={svgCase} className={classes.caseViewIconImage} />\n </Avatar>\n }\n />\n {getActionButtonsHtml()}\n <Divider />\n {theSummaryRegion}\n <Divider />\n {vertTabInfo.length > 1 && <VerticalTabs tabconfig={vertTabInfo} />}\n </Card>\n </Grid>\n\n <Grid item xs={6}>\n {theStagesRegion}\n {theTodoRegion}\n {deferLoadInfo.length > 0 && <DeferLoad getPConnect={getPConnect} name={deferLoadInfo[activeVertTab].config.name} isTab />}\n </Grid>\n\n <Grid item xs={3}>\n {theUtilitiesRegion}\n </Grid>\n </Grid>\n );\n }\n // displayOnlyFA - only show the \"todo\" region\n return (\n <Grid container>\n <Grid item xs={12}>\n {theTodoRegion}\n </Grid>\n </Grid>\n );\n }\n\n return getContainerContents();\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
2
|
+
import { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
interface CaseViewActionsMenuProps extends PConnProps {
|
|
4
|
-
availableActions:
|
|
5
|
-
availableProcesses:
|
|
4
|
+
availableActions: any[];
|
|
5
|
+
availableProcesses: any[];
|
|
6
6
|
caseTypeID: string;
|
|
7
7
|
caseTypeName: string;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseViewActionsMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CaseViewActionsMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAKvD,UAAU,wBAAyB,SAAQ,UAAU;IAEnD,gBAAgB,EAAE,GAAG,EAAE,CAAC;IACxB,kBAAkB,EAAE,GAAG,EAAE,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eAkG1E"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import Button from '@material-ui/core/Button';
|
|
3
4
|
import Menu from '@material-ui/core/Menu';
|
|
4
5
|
import MenuItem from '@material-ui/core/MenuItem';
|
|
6
|
+
import Snackbar from '@material-ui/core/Snackbar';
|
|
7
|
+
import IconButton from '@material-ui/core/IconButton';
|
|
8
|
+
import CloseIcon from '@material-ui/icons/Close';
|
|
5
9
|
export default function CaseViewActionsMenu(props) {
|
|
6
10
|
const { getPConnect, availableActions, availableProcesses, caseTypeID, caseTypeName } = props;
|
|
7
11
|
const thePConn = getPConnect();
|
|
@@ -9,6 +13,8 @@ export default function CaseViewActionsMenu(props) {
|
|
|
9
13
|
const localeCategory = 'CaseView';
|
|
10
14
|
const localeKey = `${caseTypeID}!CASE!${caseTypeName}`.toUpperCase();
|
|
11
15
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
16
|
+
const [showSnackbar, setShowSnackbar] = useState(false);
|
|
17
|
+
const [snackbarMessage, setSnackbarMessage] = useState('');
|
|
12
18
|
const handleClick = (event) => {
|
|
13
19
|
setAnchorEl(event.currentTarget);
|
|
14
20
|
};
|
|
@@ -16,21 +22,45 @@ export default function CaseViewActionsMenu(props) {
|
|
|
16
22
|
setAnchorEl(null);
|
|
17
23
|
};
|
|
18
24
|
const arMenuItems = [];
|
|
25
|
+
function showToast(message) {
|
|
26
|
+
setSnackbarMessage(message);
|
|
27
|
+
setShowSnackbar(true);
|
|
28
|
+
}
|
|
29
|
+
function handleSnackbarClose(event, reason) {
|
|
30
|
+
if (reason === 'clickaway') {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
setShowSnackbar(false);
|
|
34
|
+
}
|
|
19
35
|
function _actionMenuActionsClick(data) {
|
|
20
36
|
const actionsAPI = thePConn.getActionsApi();
|
|
21
37
|
const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);
|
|
22
|
-
openLocalAction(data.ID, {
|
|
38
|
+
openLocalAction(data.ID, {
|
|
39
|
+
...data,
|
|
40
|
+
containerName: 'modal',
|
|
41
|
+
type: 'express'
|
|
42
|
+
});
|
|
23
43
|
// after doing the action, close the menu...
|
|
24
44
|
handleClose();
|
|
25
45
|
}
|
|
46
|
+
function _actionMenuProcessClick(process) {
|
|
47
|
+
const actionsAPI = thePConn.getActionsApi();
|
|
48
|
+
const openProcessAction = actionsAPI.openProcessAction.bind(actionsAPI);
|
|
49
|
+
openProcessAction(process.ID, {
|
|
50
|
+
...process
|
|
51
|
+
})
|
|
52
|
+
.then(() => { })
|
|
53
|
+
.catch(() => {
|
|
54
|
+
showToast(`${process.name} Submit failed!`);
|
|
55
|
+
});
|
|
56
|
+
handleClose();
|
|
57
|
+
}
|
|
26
58
|
availableActions.forEach(action => {
|
|
27
|
-
arMenuItems.push(
|
|
59
|
+
arMenuItems.push(_jsx(MenuItem, { onClick: () => _actionMenuActionsClick(action), children: localizedVal(action.name, '', localeKey) }, action.ID));
|
|
28
60
|
});
|
|
29
61
|
availableProcesses.forEach(process => {
|
|
30
|
-
arMenuItems.push(
|
|
62
|
+
arMenuItems.push(_jsx(MenuItem, { onClick: () => _actionMenuProcessClick(process), children: localizedVal(process.name, '', localeKey) }, process.ID));
|
|
31
63
|
});
|
|
32
|
-
return (
|
|
33
|
-
React.createElement(Button, { "aria-controls": 'simple-menu', "aria-haspopup": 'true', onClick: handleClick }, localizedVal('Actions...', localeCategory)),
|
|
34
|
-
React.createElement(Menu, { id: 'simple-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose }, arMenuItems)));
|
|
64
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { "aria-controls": 'simple-menu', "aria-haspopup": 'true', onClick: handleClick, children: localizedVal('Actions...', localeCategory) }), _jsx(Menu, { id: 'simple-menu', anchorEl: anchorEl, keepMounted: true, open: Boolean(anchorEl), onClose: handleClose, children: arMenuItems }), _jsx(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: _jsx(IconButton, { size: 'small', "aria-label": 'close', color: 'inherit', onClick: handleSnackbarClose, children: _jsx(CloseIcon, { fontSize: 'small' }) }) })] }));
|
|
35
65
|
}
|
|
36
66
|
//# sourceMappingURL=CaseViewActionsMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseViewActionsMenu.js","sourceRoot":"","sources":["../../../../src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CaseViewActionsMenu.js","sourceRoot":"","sources":["../../../../src/components/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAGlD,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAUjD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAA+B;IACzE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAC9F,MAAM,QAAQ,GAAG,WAAW,E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IAAC,EAAE,EAAC,aAAa,EAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,QAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,WAAW,YACjG,WAAW,GACP,EACP,KAAC,QAAQ,IACP,IAAI,EAAE,YAAY,EAClB,gBAAgB,EAAE,IAAI,EACtB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,EACxB,MAAM,EACJ,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,gBAAY,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,mBAAmB,YACtF,KAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,GACnB,GAEf,IACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport Button from '@material-ui/core/Button';\nimport Menu from '@material-ui/core/Menu';\nimport MenuItem from '@material-ui/core/MenuItem';\n\nimport { PConnProps } from '../../../types/PConnProps';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport CloseIcon from '@material-ui/icons/Close';\n\ninterface CaseViewActionsMenuProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n availableActions: any[];\n availableProcesses: any[];\n caseTypeID: string;\n caseTypeName: string;\n}\n\nexport default function CaseViewActionsMenu(props: CaseViewActionsMenuProps) {\n const { getPConnect, availableActions, availableProcesses, caseTypeID, caseTypeName } = props;\n const thePConn = getPConnect();\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'CaseView';\n const localeKey = `${caseTypeID}!CASE!${caseTypeName}`.toUpperCase();\n\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage]: any = useState('');\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const arMenuItems: any[] = [];\n\n function showToast(message: string) {\n setSnackbarMessage(message);\n setShowSnackbar(true);\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n function _actionMenuActionsClick(data) {\n const actionsAPI = thePConn.getActionsApi();\n const openLocalAction = actionsAPI.openLocalAction.bind(actionsAPI);\n\n openLocalAction(data.ID, {\n ...data,\n containerName: 'modal',\n type: 'express'\n });\n // after doing the action, close the menu...\n handleClose();\n }\n\n function _actionMenuProcessClick(process) {\n const actionsAPI = thePConn.getActionsApi();\n const openProcessAction = actionsAPI.openProcessAction.bind(actionsAPI);\n openProcessAction(process.ID, {\n ...process\n })\n .then(() => {})\n .catch(() => {\n showToast(`${process.name} Submit failed!`);\n });\n handleClose();\n }\n\n availableActions.forEach(action => {\n arMenuItems.push(\n <MenuItem key={action.ID} onClick={() => _actionMenuActionsClick(action)}>\n {localizedVal(action.name, '', localeKey)}\n </MenuItem>\n );\n });\n\n availableProcesses.forEach(process => {\n arMenuItems.push(\n <MenuItem key={process.ID} onClick={() => _actionMenuProcessClick(process)}>\n {localizedVal(process.name, '', localeKey)}\n </MenuItem>\n );\n });\n\n return (\n <>\n <Button aria-controls='simple-menu' aria-haspopup='true' onClick={handleClick}>\n {localizedVal('Actions...', localeCategory)}\n </Button>\n <Menu id='simple-menu' anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}>\n {arMenuItems}\n </Menu>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n );\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
interface ConfirmationProps extends PConnProps {
|
|
4
|
-
children: Array<any>;
|
|
5
4
|
datasource: {
|
|
6
5
|
source: any;
|
|
7
6
|
};
|
|
@@ -9,6 +8,6 @@ interface ConfirmationProps extends PConnProps {
|
|
|
9
8
|
showLabel: boolean;
|
|
10
9
|
showTasks: boolean;
|
|
11
10
|
}
|
|
12
|
-
export default function Confirmation(props: ConfirmationProps): JSX.Element | null;
|
|
11
|
+
export default function Confirmation(props: PropsWithChildren<ConfirmationProps>): JSX.Element | null;
|
|
13
12
|
export {};
|
|
14
13
|
//# sourceMappingURL=Confirmation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Confirmation.d.ts","sourceRoot":"","sources":["../../../../src/components/template/Confirmation/Confirmation.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Confirmation.d.ts","sourceRoot":"","sources":["../../../../src/components/template/Confirmation/Confirmation.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAKpD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,iBAAkB,SAAQ,UAAU;IAE5C,UAAU,EAAE;QAAE,MAAM,EAAE,GAAG,CAAA;KAAE,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACpB;AAeD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,sBA2C/E"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable no-unused-vars */
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
/* eslint-disable no-nested-ternary */
|
|
4
|
-
import
|
|
3
|
+
import { useState } from 'react';
|
|
5
4
|
import { Button, Card, makeStyles } from '@material-ui/core';
|
|
6
5
|
import { getToDoAssignments } from '../../infra/Containers/FlowContainer/helpers';
|
|
7
6
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
8
|
-
const useStyles = makeStyles(
|
|
7
|
+
const useStyles = makeStyles(theme => ({
|
|
9
8
|
root: {
|
|
10
9
|
paddingRight: theme.spacing(1),
|
|
11
10
|
paddingLeft: theme.spacing(1),
|
|
@@ -24,11 +23,11 @@ export default function Confirmation(props) {
|
|
|
24
23
|
const classes = useStyles();
|
|
25
24
|
const CONSTS = PCore.getConstants();
|
|
26
25
|
const [showConfirmView, setShowConfirmView] = useState(true);
|
|
27
|
-
const { showTasks, getPConnect
|
|
26
|
+
const { showTasks, getPConnect } = props;
|
|
28
27
|
// Get the inherited props from the parent to determine label settings
|
|
29
28
|
// Not using whatsNext at the moment, need to figure out the use of it
|
|
30
|
-
const whatsNext = datasource?.source;
|
|
31
|
-
const items = whatsNext.length > 0 ? whatsNext.map(
|
|
29
|
+
// const whatsNext = datasource?.source;
|
|
30
|
+
// const items = whatsNext.length > 0 ? whatsNext.map(item => item.label) : '';
|
|
32
31
|
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(getPConnect().getTarget());
|
|
33
32
|
const rootInfo = PCore.getContainerUtils().getContainerItemData(getPConnect().getTarget(), activeContainerItemID);
|
|
34
33
|
const onConfirmViewClose = () => {
|
|
@@ -39,12 +38,6 @@ export default function Confirmation(props) {
|
|
|
39
38
|
const toDoList = getToDoAssignments(getPConnect());
|
|
40
39
|
const detailProps = { ...props, showLabel: false };
|
|
41
40
|
const showDetails = detailProps?.children?.[0]?.props?.getPConnect()?.getChildren()?.length > 0;
|
|
42
|
-
return showConfirmView ? (
|
|
43
|
-
React.createElement("h2", { id: "confirm-label" }, props.showLabel ? props.label : ''),
|
|
44
|
-
showDetails ? React.createElement(Details, { ...detailProps }) : undefined,
|
|
45
|
-
showTasks ? (toDoList && toDoList.length > 0 ? (React.createElement(ToDo, { ...todoProps, datasource: { source: toDoList }, getPConnect: getPConnect, type: CONSTS.TODO, headerText: "Open Tasks", isConfirm: true })) : undefined) : undefined,
|
|
46
|
-
React.createElement("div", { style: { display: 'flex', justifyContent: 'flex-end' } },
|
|
47
|
-
React.createElement(Button, { variant: "contained", color: "primary", onClick: onConfirmViewClose }, "Done")))) : toDoList && toDoList.length > 0 ? (React.createElement(Card, { className: classes.root },
|
|
48
|
-
React.createElement(ToDo, { ...props, datasource: { source: toDoList }, getPConnect: getPConnect, type: CONSTS.TODO, headerText: "Tasks", isConfirm: true }))) : null;
|
|
41
|
+
return showConfirmView ? (_jsxs(Card, { className: classes.root, children: [_jsx("h2", { id: 'confirm-label', children: props.showLabel ? props.label : '' }), showDetails ? _jsx(Details, { ...detailProps }) : undefined, showTasks ? (toDoList && toDoList.length > 0 ? (_jsx(ToDo, { ...todoProps, datasource: { source: toDoList }, getPConnect: getPConnect, type: CONSTS.TODO, headerText: 'Open Tasks', isConfirm: true })) : undefined) : undefined, _jsx("div", { style: { display: 'flex', justifyContent: 'flex-end' }, children: _jsx(Button, { variant: 'contained', color: 'primary', onClick: onConfirmViewClose, children: "Done" }) })] })) : toDoList && toDoList.length > 0 ? (_jsx(Card, { className: classes.root, children: _jsx(ToDo, { ...props, datasource: { source: toDoList }, getPConnect: getPConnect, type: CONSTS.TODO, headerText: 'Tasks', isConfirm: true }) })) : null;
|
|
49
42
|
}
|
|
50
43
|
//# sourceMappingURL=Confirmation.js.map
|