@pega/react-sdk-components 23.1.10 → 23.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +17 -0
- package/SECURITY.md +10 -0
- package/lib/bridge/Context/StoreContext.js +3 -3
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +24 -47
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +17 -28
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -2
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -10
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +30 -27
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +9 -15
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/index.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +5 -4
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +23 -12
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -16
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +1 -0
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +7 -11
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +15 -15
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +49 -62
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +2 -3
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +7 -10
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +7 -9
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +5 -11
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +2 -2
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +21 -23
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +8 -3
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +76 -68
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/CancelAlert/index.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +16 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +59 -45
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +13 -34
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +4 -5
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +14 -10
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +8 -8
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +2 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +18 -28
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Decimal/index.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +13 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +105 -29
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +8 -9
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Email/index.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +13 -0
- package/lib/components/field/Group/Group.d.ts.map +1 -0
- package/lib/components/field/Group/Group.js +15 -0
- package/lib/components/field/Group/Group.js.map +1 -0
- package/lib/components/field/Group/index.d.ts +2 -0
- package/lib/components/field/Group/index.d.ts.map +1 -0
- package/lib/components/field/Group/index.js +2 -0
- package/lib/components/field/Group/index.js.map +1 -0
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +6 -6
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/MultiSelect/Multiselect.d.ts +3 -0
- package/lib/components/field/MultiSelect/Multiselect.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/Multiselect.js +175 -0
- package/lib/components/field/MultiSelect/Multiselect.js.map +1 -0
- package/lib/components/field/MultiSelect/index.d.ts +2 -0
- package/lib/components/field/MultiSelect/index.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/index.js +2 -0
- package/lib/components/field/MultiSelect/index.js.map +1 -0
- package/lib/components/field/MultiSelect/utils.d.ts +10 -0
- package/lib/components/field/MultiSelect/utils.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/utils.js +197 -0
- package/lib/components/field/MultiSelect/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +2 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +25 -28
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +9 -10
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/Phone/index.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +18 -21
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.d.ts +1 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +9 -8
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +7 -9
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +4 -8
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +8 -8
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +5 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +2 -2
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +7 -6
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/TextInput/index.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +7 -7
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +6 -6
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/URL/index.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +3 -3
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +11 -11
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js +2 -2
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js +6 -6
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- package/lib/components/helpers/case-utils.d.ts.map +1 -1
- package/lib/components/helpers/case-utils.js +5 -5
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -0
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +4 -1
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +2 -3
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.js +3 -3
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.js +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js +9 -20
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +2 -2
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +13 -14
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +500 -500
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.d.ts +4 -4
- package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Date.js +20 -20
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/formatters/common.js +1 -1
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +6 -6
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js +25 -19
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts +5 -0
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -0
- package/lib/components/helpers/instructions-utils.js +36 -0
- package/lib/components/helpers/instructions-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/reactContextHelpers.js +1 -1
- package/lib/components/helpers/reactContextHelpers.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +44 -52
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js +6 -8
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.d.ts +1 -1
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +1 -2
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -1
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +3 -8
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +1 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +2 -2
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +10 -14
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/ActionButtons/index.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +10 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +68 -71
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Assignment/index.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +3 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +4 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/AssignmentCard/index.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +11 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +36 -158
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js +30 -30
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +9 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +36 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +178 -160
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +9 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js +29 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +10 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.js +102 -0
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts +2 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.js +2 -0
- package/lib/components/infra/Containers/SimpleView/index.js.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +17 -24
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/helpers.d.ts +2 -0
- package/lib/components/infra/Containers/helpers.d.ts.map +1 -0
- package/lib/components/infra/Containers/helpers.js +7 -0
- package/lib/components/infra/Containers/helpers.js.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +3 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +13 -17
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +10 -12
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +9 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +8 -17
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/DeferLoad/index.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +15 -14
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +11 -15
- package/lib/components/infra/MultiStep/MultiStep.d.ts +5 -7
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +29 -80
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/MultiStep/index.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +103 -105
- package/lib/components/infra/NavBar/NavBar.d.ts +3 -3
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +18 -52
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +9 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +6 -13
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +2 -3
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +2 -3
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +14 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +40 -62
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/RootContainer/index.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +2 -2
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +18 -21
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +6 -8
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +10 -9
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +3 -4
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +6 -11
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.css +22 -23
- package/lib/components/template/AppShell/AppShell.d.ts +6 -7
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +23 -29
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +4 -4
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +3 -3
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +3 -4
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +44 -8
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +3 -4
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +18 -41
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +3 -3
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -7
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +3 -4
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +7 -14
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +4 -4
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +35 -49
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +8 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +5 -14
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +8 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +5 -13
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +3 -4
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +5 -10
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +5 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +5 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/index.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +7 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +6 -17
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +2 -2
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +8 -9
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +3 -4
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -9
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +3 -4
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +7 -6
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +2 -2
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +16 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +106 -181
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +4 -6
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +38 -46
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +3 -3
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js +2 -10
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +8 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +5 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js +2 -5
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +3 -5
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -8
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +10 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +12 -29
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +19 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +17 -20
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +12 -7
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +124 -134
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +9 -21
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -5
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +4 -4
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +6 -9
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +2 -4
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +2 -10
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +8 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +5 -16
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js +2 -5
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +3 -3
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/index.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +3 -2
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +20 -37
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +2 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +10 -19
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +60 -1
- package/lib/components/widget/Attachment/Attachment.d.ts +8 -1
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +279 -353
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/index.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +37 -31
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/CaseHistory/index.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +4 -3
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +2 -4
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +107 -136
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +4 -4
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +8 -16
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +8 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +57 -35
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +3 -2
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +8 -23
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryItem/index.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +3 -2
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +3 -3
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +4 -4
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +31 -67
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/components_map.d.ts +2 -2
- package/lib/components_map.d.ts.map +1 -1
- package/lib/components_map.js +4 -2
- package/lib/components_map.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +21 -4
- package/lib/hooks/useConsolidatedRef.js +2 -2
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/sdk-local-component-map.js +2 -2
- package/lib/sdk-pega-component-map.d.ts +6 -0
- package/lib/sdk-pega-component-map.js +106 -100
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +14 -15
- package/package.json +5 -2
- package/lib/components/helpers/auth.d.ts +0 -18
- package/lib/components/helpers/auth.d.ts.map +0 -1
- package/lib/components/helpers/auth.js +0 -752
- package/lib/components/helpers/auth.js.map +0 -1
- package/lib/components/helpers/authManager.d.ts +0 -21
- package/lib/components/helpers/authManager.d.ts.map +0 -1
- package/lib/components/helpers/authManager.js +0 -864
- package/lib/components/helpers/authManager.js.map +0 -1
- package/lib/components/helpers/config_access.d.ts +0 -3
- package/lib/components/helpers/config_access.d.ts.map +0 -1
- package/lib/components/helpers/config_access.js +0 -198
- package/lib/components/helpers/config_access.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../../src/components/template/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAwBhF,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC9B;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,OAAO;QACf,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC9B;CACF,CAAC,CAAC,CAAC;AAMJ,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAmB;IAClD,8EAA8E;IAC9E,MAAM,MAAM,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEnD,MAAM,EACJ,KAAK,GAAG,EAAE,EACV,SA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;YACV,6BAAK,SAAS,EAAE,OAAO,CAAC,OAAO,IAAG,QAAQ,CAAO,CAC7C,CACc,CACvB,CAAC;AACJ,CAAC","sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { Utils } from '../../helpers/utils';\nimport Avatar from '@material-ui/core/Avatar';\nimport { NavContext } from '../../helpers/reactContextHelpers';\nimport './AppShell.css';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface AppShellProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showAppName: boolean,\n pages: Array<{\n pxPageViewIcon: string,\n pyClassName: string,\n pyLabel: string,\n pyRuleName: string,\n pyURLContent: string,\n\n }>,\n caseTypes?:Array<object>,\n children?: Array<any>,\n portalTemplate: string,\n portalName: string,\n portalLogo : string,\n navDisplayOptions: { alignment: string, position: string }\n}\n\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'flex'\n },\n content: {\n flexGrow: 1,\n height: '100vh',\n overflow: 'auto',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n wsscontent: {\n flexGrow: 1,\n height: '100vh',\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1)\n }\n}));\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 1 error)\ndeclare const PCore: any;\n\n\nexport default function AppShell(props:AppShellProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const NavBar = getComponentFromMap(\"NavBar\");\n const WssNavBar = getComponentFromMap(\"WssNavBar\");\n\n const {\n pages = [],\n caseTypes = [],\n showAppName,\n children = [],\n getPConnect,\n portalTemplate,\n portalName,\n portalLogo,\n navDisplayOptions\n } = props;\n\n const [open, setOpen] = useState(true);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const [activeTab, setActiveTab] = useState(!pages ? null : pages[0]?.pyRuleName);\n const pConn = getPConnect();\n const envInfo = PCore.getEnvironmentInfo();\n const imageKey = envInfo.getOperatorImageInsKey();\n const userName = envInfo.getOperatorName();\n const currentUserInitials = Utils.getInitials(userName);\n const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : '';\n const portalClass = pConn.getValue('.classID', ''); // 2nd arg empty string until typedef marked correctly\n const envPortalName = envInfo.getPortalName();\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n\n const classes = useStyles();\n const actionsAPI = pConn.getActionsApi();\n const localeReference = pConn.getValue('.pyLocaleReference', ''); // 2nd arg empty string until typedef marked correctly\n const [imageBlobUrl, setImageBlobUrl] = useState(null);\n // useState for appName and mapChildren - note these are ONLY updated once (on component mount!)\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const [appName, setAppName] = useState('');\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const [mapChildren, setMapChildren] = useState([]);\n\n // Initial setting of appName and mapChildren\n useEffect(() => {\n setAppName(PCore.getEnvironmentInfo().getApplicationName());\n\n const tempMap: any = pConn.getChildren()?.[\"map\"]((child: any, index) => {\n const theChildComp = child.getPConnect().getComponentName();\n const theKey = `.${index}`;\n return (\n <div id={theChildComp} key={theKey} style={{ border: 'solid 1px silver', margin: '1px' }}>\n {theChildComp} will be here\n </div>\n );\n });\n\n setMapChildren(tempMap);\n }, []);\n\n const [iconURL, setIconURL] = useState('');\n const [fullIconURL, setFullIconURL] = useState('');\n useEffect(() => {\n // using the default icon then fetch it from the static folder (not auth involved)\n if (\n !portalLogo ||\n portalLogo.toLowerCase().includes('pzpega-logo-mark') ||\n portalLogo.toLowerCase().includes('py-logo') ||\n portalLogo.toLowerCase().includes('py-full-logo')\n ) {\n const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat(\n 'pzpega-logo-mark.svg'\n );\n setIconURL(portalLogoImage);\n setFullIconURL(`${Utils.getSDKStaticConentUrl()}static/py-full-logo.svg`);\n }\n // not using default icon to fetch it using the way which uses authentication\n else {\n PCore.getAssetLoader()\n .getSvcImage(portalLogo)\n .then(blob => window.URL.createObjectURL(blob))\n .then(data => {\n setIconURL(data);\n setFullIconURL(data);\n })\n .catch(() => {\n // eslint-disable-next-line no-console\n console.error(\n `${localizedVal('Unable to load the image for the portal logo/icon with the insName', 'AppShell')}:${portalLogo}`\n );\n });\n }\n }, [portalLogo]);\n\n useEffect(() => {\n if (imageKey && portalTemplate === 'wss') {\n PCore.getAssetLoader()\n .getSvcImage(imageKey)\n .then(blob => window.URL.createObjectURL(blob))\n .then(imagePath => setImageBlobUrl(imagePath));\n }\n }, []);\n\n const getOperator = () => {\n return {\n avatar: portalTemplate !== 'wss' ? <Avatar /> : { name: userName, imageSrc: imageBlobUrl },\n name: userName,\n currentUserInitials\n };\n };\n\n function showPage(viewName, className) {\n actionsAPI.showPage(viewName, className);\n }\n\n function openURL(URL) {\n window.open(URL, '_blank');\n }\n\n const links = !pages\n ? []\n : pages.map(page => {\n const name = localizedVal(page.pyLabel, '', localeReference);\n return {\n text: name,\n name,\n icon: page.pxPageViewIcon.replace('pi pi-', ''),\n active: page.pyRuleName === activeTab,\n onClick: () =>\n !page.pyURLContent || page.pyURLContent === ''\n ? showPage(page.pyRuleName, page.pyClassName)\n : openURL(page.pyURLContent)\n };\n });\n\n if (pConn.hasChildren()) {\n // const theChildren = pConn.getChildren();\n // const mapChildCompNames = theChildren.map((child) => { return child.getPConnect().getComponentName()});\n // debugging/investigation help\n // console.log(`AppShell has children: ${theChildren.length}`);\n // console.log(`--> ${mapChildCompNames.map((name) => {return name;})}`);\n }\n\n if (portalTemplate === 'wss') {\n return (\n <div id='AppShell'>\n <WssNavBar\n portalName={portalName}\n imageSrc={iconURL}\n fullImageSrc={fullIconURL}\n appName={localizedVal(\n appNameToDisplay,\n '',\n `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()\n )}\n appInfo={{\n imageSrc: iconURL,\n appName: localizedVal(\n appNameToDisplay,\n '',\n `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()\n ),\n onClick: links[0] && /* links[0].onClick ? */ links[0].onClick /* : undefined */\n }}\n navLinks={links.filter((link, index) => {\n return index !== 0;\n })}\n operator={getOperator()}\n navDisplayOptions={navDisplayOptions}\n />\n <div className={classes.wsscontent}>{children}</div>\n </div>\n\n );\n }\n\n return (\n <NavContext.Provider value={{ open, setOpen }}>\n <div id='AppShell' className={classes.root}>\n <NavBar\n getPConnect={getPConnect}\n pConn={getPConnect()}\n appName={localizedVal(\n appNameToDisplay,\n '',\n `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()\n )}\n pages={pages}\n caseTypes={caseTypes}\n ></NavBar>\n <div className={classes.content}>{children}</div>\n </div>\n </NavContext.Provider>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AppShell.js","sourceRoot":"","sources":["../../../../src/components/template/AppShell/AppShell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,gBAAgB,CAAC;AAmBxB,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC9B;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,CAAC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OAAO;IACL,mEAAmE;IACnE,KAAC,UAAU,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,YAC3C,eAAK,EAAE,EAAC,UAAU,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,aACxC,KAAC,MAAM,IACL,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,EAAE,YAAY,CAAC,gBAAgB,EAAE,EAAE,EAAE,GAAG,WAAW,WAAW,aAAa,EAAE,CAAC,WAAW,EAAE,CAAC,EACnG,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,GACpB,EACF,cAAK,SAAS,EAAE,OAAO,CAAC,OAAO,YAAG,QAAQ,GAAO,IAC7C,GACc,CACvB,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, useEffect, useState } from 'react';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Avatar from '@material-ui/core/Avatar';\n\nimport { Utils } from '../../helpers/utils';\nimport { NavContext } from '../../helpers/reactContextHelpers';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport './AppShell.css';\n\ninterface AppShellProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showAppName: boolean;\n pages: {\n pxPageViewIcon: string;\n pyClassName: string;\n pyLabel: string;\n pyRuleName: string;\n pyURLContent: string;\n }[];\n caseTypes?: object[];\n portalTemplate: string;\n portalName: string;\n portalLogo: string;\n navDisplayOptions: { alignment: string; position: string };\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n display: 'flex'\n },\n content: {\n flexGrow: 1,\n height: '100vh',\n overflow: 'auto',\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n wsscontent: {\n flexGrow: 1,\n height: '100vh',\n marginLeft: theme.spacing(1),\n marginRight: theme.spacing(1)\n }\n}));\n\nexport default function AppShell(props: PropsWithChildren<AppShellProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const NavBar = getComponentFromMap('NavBar');\n const WssNavBar = getComponentFromMap('WssNavBar');\n\n const { pages = [], caseTypes = [], showAppName, children = [], getPConnect, portalTemplate, portalName, portalLogo, navDisplayOptions } = props;\n\n const [open, setOpen] = useState(true);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [activeTab, setActiveTab] = useState(!pages ? null : pages[0]?.pyRuleName);\n const pConn = getPConnect();\n const envInfo = PCore.getEnvironmentInfo();\n const imageKey = envInfo.getOperatorImageInsKey();\n const userName = envInfo.getOperatorName();\n const currentUserInitials = Utils.getInitials(userName);\n const appNameToDisplay = showAppName ? envInfo.getApplicationLabel() : '';\n const portalClass = pConn.getValue('.classID', ''); // 2nd arg empty string until typedef marked correctly\n const envPortalName = envInfo.getPortalName();\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n\n const classes = useStyles();\n const actionsAPI = pConn.getActionsApi();\n const localeReference = pConn.getValue('.pyLocaleReference', ''); // 2nd arg empty string until typedef marked correctly\n const [imageBlobUrl, setImageBlobUrl] = useState<string | null>(null);\n // useState for appName and mapChildren - note these are ONLY updated once (on component mount!)\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [appName, setAppName] = useState('');\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [mapChildren, setMapChildren] = useState([]);\n\n // Initial setting of appName and mapChildren\n useEffect(() => {\n setAppName(PCore.getEnvironmentInfo().getApplicationName());\n\n const tempMap: any = (pConn.getChildren() as any)?.map((child: any, index) => {\n const theChildComp = child.getPConnect().getComponentName();\n const theKey = `.${index}`;\n return (\n <div id={theChildComp} key={theKey} style={{ border: 'solid 1px silver', margin: '1px' }}>\n {theChildComp} will be here\n </div>\n );\n });\n\n setMapChildren(tempMap);\n }, []);\n\n const [iconURL, setIconURL] = useState('');\n const [fullIconURL, setFullIconURL] = useState('');\n useEffect(() => {\n // using the default icon then fetch it from the static folder (not auth involved)\n if (\n !portalLogo ||\n portalLogo.toLowerCase().includes('pzpega-logo-mark') ||\n portalLogo.toLowerCase().includes('py-logo') ||\n portalLogo.toLowerCase().includes('py-full-logo')\n ) {\n const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat('pzpega-logo-mark.svg');\n setIconURL(portalLogoImage);\n setFullIconURL(`${Utils.getSDKStaticConentUrl()}static/py-full-logo.svg`);\n }\n // not using default icon to fetch it using the way which uses authentication\n else {\n PCore.getAssetLoader()\n .getSvcImage(portalLogo)\n .then(blob => window.URL.createObjectURL(blob))\n .then(data => {\n setIconURL(data);\n setFullIconURL(data);\n })\n .catch(() => {\n // eslint-disable-next-line no-console\n console.error(`${localizedVal('Unable to load the image for the portal logo/icon with the insName', 'AppShell')}:${portalLogo}`);\n });\n }\n }, [portalLogo]);\n\n useEffect(() => {\n if (imageKey && portalTemplate === 'wss') {\n PCore.getAssetLoader()\n .getSvcImage(imageKey)\n .then(blob => window.URL.createObjectURL(blob))\n .then(imagePath => setImageBlobUrl(imagePath));\n }\n }, []);\n\n const getOperator = () => {\n return {\n avatar: portalTemplate !== 'wss' ? <Avatar /> : { name: userName, imageSrc: imageBlobUrl },\n name: userName,\n currentUserInitials\n };\n };\n\n function showPage(viewName, className) {\n actionsAPI.showPage(viewName, className);\n }\n\n function openURL(URL) {\n window.open(URL, '_blank');\n }\n\n const links = !pages\n ? []\n : pages.map(page => {\n const name = localizedVal(page.pyLabel, '', localeReference);\n return {\n text: name,\n name,\n icon: page.pxPageViewIcon.replace('pi pi-', ''),\n active: page.pyRuleName === activeTab,\n onClick: () => (!page.pyURLContent || page.pyURLContent === '' ? showPage(page.pyRuleName, page.pyClassName) : openURL(page.pyURLContent))\n };\n });\n\n if (pConn.hasChildren()) {\n // const theChildren = pConn.getChildren();\n // const mapChildCompNames = theChildren.map((child) => { return child.getPConnect().getComponentName()});\n // debugging/investigation help\n // console.log(`AppShell has children: ${theChildren.length}`);\n // console.log(`--> ${mapChildCompNames.map((name) => {return name;})}`);\n }\n\n if (portalTemplate === 'wss') {\n return (\n <div id='AppShell'>\n <WssNavBar\n portalName={portalName}\n imageSrc={iconURL}\n fullImageSrc={fullIconURL}\n appName={localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}\n appInfo={{\n imageSrc: iconURL,\n appName: localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase()),\n onClick: links[0] && /* links[0].onClick ? */ links[0].onClick /* : undefined */\n }}\n navLinks={links.filter((link, index) => {\n return index !== 0;\n })}\n operator={getOperator()}\n navDisplayOptions={navDisplayOptions}\n />\n <div className={classes.wsscontent}>{children}</div>\n </div>\n );\n }\n\n return (\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n <NavContext.Provider value={{ open, setOpen }}>\n <div id='AppShell' className={classes.root}>\n <NavBar\n getPConnect={getPConnect}\n pConn={getPConnect()}\n appName={localizedVal(appNameToDisplay, '', `${portalClass}!PORTAL!${envPortalName}`.toUpperCase())}\n pages={pages}\n caseTypes={caseTypes}\n />\n <div className={classes.content}>{children}</div>\n </div>\n </NavContext.Provider>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PConnProps } from '../../../types/PConnProps';
|
|
3
|
+
interface BannerPageProps extends PConnProps {
|
|
4
4
|
layout?: string;
|
|
5
5
|
heading?: string;
|
|
6
6
|
message?: string;
|
|
@@ -9,6 +9,6 @@ interface BannerPageProps {
|
|
|
9
9
|
backgroundColor?: string;
|
|
10
10
|
tintImage?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export default function BannerPage(props: BannerPageProps): JSX.Element;
|
|
12
|
+
export default function BannerPage(props: PropsWithChildren<BannerPageProps>): JSX.Element;
|
|
13
13
|
export {};
|
|
14
14
|
//# sourceMappingURL=BannerPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerPage.d.ts","sourceRoot":"","sources":["../../../../src/components/template/BannerPage/BannerPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BannerPage.d.ts","sourceRoot":"","sources":["../../../../src/components/template/BannerPage/BannerPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAG7D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,eAAgB,SAAQ,UAAU;IAE1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAKD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,eAkC3E"}
|
|
@@ -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;IACt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E,eAAe,GAAI,EACzF,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,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AAC,QAAQ;gCAC1D,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,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AAC,GAClD,EAEf,SAAS,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
|