@pega/react-sdk-components 24.2.10 → 25.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/Context/StoreContext.d.ts +0 -1
- package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +0 -6
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +11 -14
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +50 -35
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +2 -2
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +32 -4
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +12 -2
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +4 -7
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +52 -3
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +8 -7
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +0 -2
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +7 -7
- 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 +15 -11
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +7 -6
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +16 -13
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +6 -7
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +2 -2
- package/lib/components/field/Group/Group.d.ts.map +1 -1
- package/lib/components/field/Group/Group.js +4 -3
- package/lib/components/field/Group/Group.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +4 -5
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Location/Location.css +4 -0
- package/lib/components/field/Location/Location.d.ts +11 -0
- package/lib/components/field/Location/Location.d.ts.map +1 -0
- package/lib/components/field/Location/Location.js +158 -0
- package/lib/components/field/Location/Location.js.map +1 -0
- package/lib/components/field/Location/index.d.ts +2 -0
- package/lib/components/field/Location/index.d.ts.map +1 -0
- package/lib/components/field/Location/index.js +2 -0
- package/lib/components/field/Location/index.js.map +1 -0
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
- package/lib/components/field/Multiselect/utils.d.ts +2 -1
- package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
- package/lib/components/field/Multiselect/utils.js +1 -1
- package/lib/components/field/Multiselect/utils.js.map +1 -1
- package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
- package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
- package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
- package/lib/components/field/ObjectReference/index.d.ts +2 -0
- package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/index.js +2 -0
- package/lib/components/field/ObjectReference/index.js.map +1 -0
- package/lib/components/field/ObjectReference/utils.d.ts +17 -0
- package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/utils.js +99 -0
- package/lib/components/field/ObjectReference/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +7 -7
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +6 -4
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +15 -10
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.css +79 -0
- package/lib/components/field/RichText/RichText.d.ts +2 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +1 -0
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +3 -4
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
- package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/SelectableCard.js +57 -0
- package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
- package/lib/components/field/SelectableCard/index.d.ts +2 -0
- package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/index.js +2 -0
- package/lib/components/field/SelectableCard/index.js.map +1 -0
- package/lib/components/field/SelectableCard/utils.d.ts +13 -0
- package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/utils.js +183 -0
- package/lib/components/field/SelectableCard/utils.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +1 -1
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +4 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +0 -1
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +4 -5
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +3 -6
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +4 -5
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +1 -2
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +2 -5
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentShared.d.ts +2 -0
- package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
- package/lib/components/helpers/attachmentShared.js +6 -0
- package/lib/components/helpers/attachmentShared.js.map +1 -0
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +8 -1
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +20 -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 +0 -1
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts +1 -1
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +1 -0
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +20 -19
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts +2 -2
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/formatters/common.js +2 -1
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +1 -0
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js +2 -3
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
- package/lib/components/helpers/object-utils.d.ts +9 -0
- package/lib/components/helpers/object-utils.d.ts.map +1 -0
- package/lib/components/helpers/object-utils.js +11 -0
- package/lib/components/helpers/object-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +16 -2
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +111 -5
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -0
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +7 -1
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +0 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +35 -36
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +18 -93
- 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 +1 -5
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +3 -2
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -5
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.js +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
- 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 +3 -4
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/container-helpers.d.ts +3 -0
- package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -0
- package/lib/components/infra/Containers/container-helpers.js +52 -0
- package/lib/components/infra/Containers/container-helpers.js.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +3 -7
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +2 -5
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +2 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +6 -9
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +48 -70
- package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +19 -41
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +13 -7
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +1 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +2 -3
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +1 -1
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +1 -2
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +1 -1
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +2 -2
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +2 -2
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +2 -1
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js +68 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +23 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +26 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +179 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +25 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
- package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/index.js +2 -0
- package/lib/components/template/AdvancedSearch/index.js.map +1 -0
- package/lib/components/template/AppShell/AppShell.css +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +2 -2
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +14 -17
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +24 -37
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +3 -2
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +14 -16
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +1 -2
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +9 -2
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +239 -80
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
- package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
- package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
- package/lib/components/template/DataReference/SearchForm.js +87 -0
- package/lib/components/template/DataReference/SearchForm.js.map +1 -0
- package/lib/components/template/DataReference/utils.d.ts +15 -0
- package/lib/components/template/DataReference/utils.d.ts.map +1 -0
- package/lib/components/template/DataReference/utils.js +75 -0
- package/lib/components/template/DataReference/utils.js.map +1 -0
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.js +1 -2
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
- package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
- package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
- package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
- package/lib/components/template/DefaultPage/index.d.ts +2 -0
- package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/index.js +2 -0
- package/lib/components/template/DefaultPage/index.js.map +1 -0
- package/lib/components/template/Details/Details/Details.d.ts +1 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +2 -3
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +0 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -4
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +4 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +134 -67
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +2 -5
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +28 -6
- 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.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -2
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +73 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.js +2 -0
- package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -4
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +4 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +64 -47
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +2 -4
- 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 +3 -2
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +102 -1
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/template/utils.d.ts +7 -0
- package/lib/components/template/utils.d.ts.map +1 -0
- package/lib/components/template/utils.js +52 -0
- package/lib/components/template/utils.js.map +1 -0
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +7 -8
- package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +255 -207
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
- package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
- package/lib/components/widget/Attachment/Attachment.types.js +2 -0
- package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +2 -2
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +0 -2
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +0 -2
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +1 -13
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +22 -17
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
- package/lib/hooks/useAfterInitialEffect.js.map +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
- package/lib/hooks/useFocusFirstField.js.map +1 -1
- package/lib/hooks/useGetTabsCount.d.ts +10 -0
- package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
- package/lib/hooks/useGetTabsCount.js +165 -0
- package/lib/hooks/useGetTabsCount.js.map +1 -0
- package/lib/hooks/useIsMount.d.ts +2 -0
- package/lib/hooks/useIsMount.d.ts.map +1 -0
- package/lib/hooks/useIsMount.js +9 -0
- package/lib/hooks/useIsMount.js.map +1 -0
- package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
- package/lib/mediaco/ToDo/ToDo.css +81 -0
- package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
- package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
- package/lib/mediaco/ToDo/ToDo.js +187 -0
- package/lib/mediaco/ToDo/ToDo.js.map +1 -0
- package/lib/mediaco/ToDo/index.d.ts +2 -0
- package/lib/mediaco/ToDo/index.d.ts.map +1 -0
- package/lib/mediaco/ToDo/index.js +2 -0
- package/lib/mediaco/ToDo/index.js.map +1 -0
- package/lib/samples/Embedded/styles.css +26 -0
- package/lib/sdk-pega-component-map.d.ts +119 -103
- package/lib/sdk-pega-component-map.d.ts.map +1 -1
- package/lib/sdk-pega-component-map.js +20 -3
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/theme.d.ts +30 -1
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +209 -2
- package/lib/theme.js.map +1 -1
- package/lib/types/PConnProps.d.ts +1 -1
- package/package.json +32 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +0 -13
- package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
- package/lib/components/helpers/attachmentHelpers.js +0 -72
- package/lib/components/helpers/attachmentHelpers.js.map +0 -1
- package/lib/components/infra/Containers/helpers.d.ts +0 -2
- package/lib/components/infra/Containers/helpers.d.ts.map +0 -1
- package/lib/components/infra/Containers/helpers.js +0 -7
- package/lib/components/infra/Containers/helpers.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/helpers/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAChC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAC9B,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAE3B,MAAM,OAAO,KAAK;IAChB,MAAM,CAAC,aAAa,GAAG,CAAC,CAAC;IAEzB,MAAM,CAAC,qBAAqB;QAC1B,MAAM,eAAe,GAAG,eAAe,CAAC,kBAAkB,EAAE,CAAC;QAE7D,2DAA2D;QAC3D,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACtD,eAAe,CAAC,mBAAmB,GAAG,GAAG,eAAe,CAAC,mBAAmB,GAAG,CAAC;SACjF;QAED,OAAO,GAAG,eAAe,CAAC,mBAAmB,gBAAgB,CAAC;IAChE,CAAC;IAED,MAAM,CAAC,kBAAkB;QACvB,MAAM,OAAO,GAAG,UAAU,CAAC;QAE3B,IAAI,CAAC,aAAa,IAAI,CAAC,CAAC;QAExB,OAAO,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,aAAa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,IAAI,GAAG,OAAO,CAAC;gBACf,MAAM;YACR;gBACE,IAAI,GAAG,cAAc,CAAC;SACzB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAI;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,QAAQ;QACtB,OAAO,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,WAAW,KAAK,MAAM,CAAC;IACrF,CAAC;;AAGH,eAAe,KAAK,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport { SdkConfigAccess } from '@pega/auth/lib/sdk-auth-manager';\n\ndayjs.extend(customParseFormat);\ndayjs.extend(localizedFormat);\ndayjs.extend(relativeTime);\n\nexport class Utils {\n static lastControlID = 0;\n\n static getSDKStaticConentUrl() {\n const sdkConfigServer = SdkConfigAccess.getSdkConfigServer();\n\n // NOTE: Needs a trailing slash! So add one if not provided\n if (!sdkConfigServer.sdkContentServerUrl.endsWith('/')) {\n sdkConfigServer.sdkContentServerUrl = `${sdkConfigServer.sdkContentServerUrl}/`;\n }\n\n return `${sdkConfigServer.sdkContentServerUrl}constellation/`;\n }\n\n static getUniqueControlID(): string {\n const sPrefix = 'control-';\n\n this.lastControlID += 1;\n\n return sPrefix + this.lastControlID.toString();\n }\n\n static getOptionList(configProps: any, dataObject: any): any[] {\n const listType = configProps.listType;\n let arReturn: any[] = [];\n\n if (listType) {\n switch (listType.toLowerCase()) {\n case 'associated':\n // data source should be an array\n if (typeof configProps.datasource === 'object') {\n arReturn = configProps.datasource;\n }\n break;\n\n case 'datapage':\n // get data page\n // eslint-disable-next-line no-case-declarations\n const dataPage = configProps.datasource;\n if (typeof dataPage === 'string' && dataObject[dataPage]) {\n // eslint-disable-next-line no-alert\n alert('need to handle data page');\n } else {\n let listSourceItems = configProps.listOutput;\n if (typeof dataPage === 'object' && !Array.isArray(listSourceItems)) {\n listSourceItems = dataPage.source ? dataPage.source : [];\n }\n (listSourceItems || []).forEach(item => {\n item.value = item.text ? item.text : item.value;\n });\n arReturn = listSourceItems || [];\n }\n break;\n\n default:\n break;\n }\n }\n\n return arReturn;\n }\n\n static getInitials(userName: string): string {\n let userInitials = userName;\n\n if (userName && userName !== '') {\n userInitials = userName.charAt(0);\n\n if (userName.lastIndexOf(' ') > 0) {\n const lastName = userName.substring(userName.lastIndexOf(' ') + 1);\n userInitials += lastName.charAt(0);\n } else if (userName.lastIndexOf('.') > 0) {\n const lastName = userName.substring(userName.lastIndexOf('.') + 1);\n userInitials += lastName.charAt(0);\n }\n } else {\n userInitials = '';\n }\n\n return userInitials.toUpperCase();\n }\n\n static getImageSrc(name: string, serverUrl: string): string {\n let iconName = name.replace('pi-', '').replace('pi ', '').trim();\n if (iconName === 'line-chart') {\n iconName = 'chart-line';\n }\n\n return this.getIconPath(serverUrl).concat(iconName).concat('.svg');\n }\n\n static getIconPath(serverUrl: string): string {\n // Directory in the constellation folder where the icons will be\n return serverUrl.concat('icons/');\n }\n\n static getBooleanValue(inValue: any): boolean {\n let bReturn = false;\n\n if (typeof inValue === 'string') {\n // Experiment with having \"\" be true, too (and \"on\")\n if (inValue.toLowerCase() === 'true' || inValue.toLowerCase() === 'on' || inValue === '') {\n bReturn = true;\n }\n } else {\n bReturn = inValue;\n }\n\n return bReturn;\n }\n\n // Note: Explored using formatters/format but that doesn't do the same as this function. So not possible to just invoke\n // format and do away with all the separate Pega possible dateFormats.\n static generateDate(dateVal, dateFormat) {\n let sReturnDate = dateVal;\n\n if (dateVal === null || dateVal === '') {\n return dateVal;\n }\n\n // VRS: Dont think we need the below line. Commenting out for now. (2020.05.20)\n // dateTimeVal = dateTimeVal.replace(\"GMT\", \"+0000\")\n // Anything else would require a specific String pattern be specified as an argument to the dayjs constructor\n\n // if date has a \".\", then of the format YYYMMDD[T]HHmmss[.]SSS Z, need to change to YYYYMMDD\n if (dateVal.indexOf('.') >= 0) {\n // VRS: Dont think we need the dateVal.replace(\"GMT\", \"+0000\"). Commenting out for now. (2020.05.20)\n // dateVal = dayjs(dateVal.replace(\"GMT\", \"+0000\"), \"YYYYMMDD[T]HHmmss[.]SSS Z\").format(\"YYYYMMDD\");\n // dateVal format appears to be YYYY-MM-DDThh:mm:ss.SSSZ (which is the default dayjs expected format)\n // Don't change the dateVal passed to dayjs (rather just set a default sReturnDate--if that is what we want to do)\n // (better might be just doing that in a default switch block)\n sReturnDate = dayjs(dateVal).format('YYYYMMDD');\n }\n\n switch (dateFormat) {\n case 'Date-Short':\n // 1/1/01\n sReturnDate = dayjs(dateVal).format('M/D/YY');\n break;\n case 'Date-Short-YYYY':\n // 1/1/2001\n sReturnDate = dayjs(dateVal).format('M/D/YYYY');\n break;\n case 'Date-Short-Custom':\n // 01/01/01\n sReturnDate = dayjs(dateVal).format('MM/DD/YY');\n break;\n case 'Date-Short-Custom-YYYY':\n // 01/01/2001\n sReturnDate = dayjs(dateVal).format('L');\n break;\n case 'Date-Medium':\n // Jan 1, 2001\n sReturnDate = dayjs(dateVal).format('ll');\n break;\n case 'Date-DayMonthYear-Custom':\n // 01-Jan-2001\n sReturnDate = dayjs(dateVal).format('DD-MMM-YYYY');\n break;\n case 'Date-Full':\n // Monday, January 1, 2001\n sReturnDate = dayjs(dateVal).format('dddd, MMMM D, YYYY');\n break;\n case 'DateTime-Frame':\n case 'DateTime-Frame-Short':\n case 'DateTime-Since':\n // 2 days, 5 hours ago\n sReturnDate = dayjs(dateVal).fromNow();\n break;\n case 'Date-Long':\n // January 1, 2001\n sReturnDate = dayjs(dateVal).format('MMMM D, YYYY');\n break;\n case 'Date-ISO-8601':\n // 2001/01/01 y/m/d\n sReturnDate = dayjs(dateVal).format('YYYY/MM/DD');\n break;\n case 'Date-Gregorian-1':\n // 01 January, 2001\n sReturnDate = dayjs(dateVal).format('DD MMMM, YYYY');\n break;\n case 'Date-Gregorian-2':\n // January 01, 2001\n sReturnDate = dayjs(dateVal).format('MMMM DD, YYYY');\n break;\n case 'Date-Gregorian-3':\n // 2001, January 01\n sReturnDate = dayjs(dateVal).format('YYYY, MMMM DD');\n break;\n case 'DateTime-Custom':\n break;\n default:\n break;\n }\n\n return sReturnDate;\n }\n\n // Note: Explored using formatters/format but that doesn't do the same as this function. So not possible to just invoke\n // format and do away with all the separate Pega possible dateFormats.\n static generateDateTime(dateTimeVal, dateFormat) {\n let sReturnDate = dateTimeVal;\n\n if (dateTimeVal === null || dateTimeVal === '') {\n return dateTimeVal;\n }\n\n // VRS: Dont think we need the below line. Commenting out for now. (2020.05.20)\n // dateTimeVal = dateTimeVal.replace(\"GMT\", \"+0000\")\n // dateTimeVal format appears to be YYYY-MM-DDThh:mm:ss.SSSZ (which is the default dayjs expected format)\n // Anything else would require a specific String pattern be specified as an argument to the dayjs constructor\n\n switch (dateFormat) {\n case 'DateTime-Short':\n // 1/1/01 1:00 AM\n sReturnDate = dayjs(dateTimeVal).format('M/D/YY h:mm A');\n break;\n case 'DateTime-Short-Custom':\n // 01/01/01 01:00 AM\n sReturnDate = dayjs(dateTimeVal).format('MM/DD/YY hh:mm A');\n break;\n case 'DateTime-Short-YYYY-Custom':\n // 01/01/2001 01:00 AM\n sReturnDate = dayjs(dateTimeVal).format('M/D/YYYY hh:mm A');\n break;\n case 'DateTime-Short-YYYY':\n // 1/1/2001 1:00 AM\n sReturnDate = dayjs(dateTimeVal).format('M/D/YYYY h:mm A');\n break;\n case 'DateTime-Medium':\n // Jan 1, 2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('MMM D, YYYY h:mm:ss A');\n break;\n case 'DateTime-Long':\n // January 1, 2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('MMMM D, YYYY h:mm:ss A');\n break;\n case 'DateTime-DayMonthYear-Custom':\n // 01-Jan-2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('DD-MMM-YYYY h:mm:ss A');\n break;\n case 'DateTime-Full':\n // Monday, January 1, 2001 1:00 AM EDT\n sReturnDate = dayjs(dateTimeVal).format('dddd, MMMM D, YYYY h:mm A z');\n break;\n case 'DateTime-Frame':\n case 'DateTime-Frame-Short':\n case 'DateTime-Since':\n // 2 days, 5 hours ago\n sReturnDate = dayjs(dateTimeVal).fromNow();\n break;\n case 'DateTime-ISO-8601':\n // 2001/01/01 1:00:00 AM y/m/d\n sReturnDate = dayjs(dateTimeVal).format('YYYY/MM/DD h:mm:ss A');\n break;\n case 'DateTime-Gregorian-1':\n // 01 January, 2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('DD MMMM, YYYY h:mm:ss A');\n break;\n case 'DateTime-Gregorian-2':\n // January 01, 2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('MMMM DD, YYYY h:mm:ss A');\n break;\n case 'DateTime-Gregorian-3':\n // 2001, January 01 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('YYYY, MMMM DD h:mm:ss A');\n break;\n case 'DateTime-Custom':\n break;\n default:\n break;\n }\n\n return sReturnDate;\n }\n\n static getSeconds(sTime): any {\n return dayjs(sTime).valueOf();\n }\n\n static getIconFromFileType(fileType): string {\n let icon = 'document-doc';\n if (!fileType) return icon;\n if (fileType.startsWith('audio')) {\n icon = 'audio';\n } else if (fileType.startsWith('video')) {\n icon = 'video';\n } else if (fileType.startsWith('image')) {\n icon = 'picture';\n } else if (fileType.includes('pdf')) {\n icon = 'document-pdf';\n } else {\n const [, subtype] = fileType.split('/');\n const foundMatch = sources => {\n return sources.some(key => subtype.includes(key));\n };\n\n if (foundMatch(['excel', 'spreadsheet'])) {\n icon = 'document-xls';\n } else if (foundMatch(['zip', 'compressed', 'gzip', 'rar', 'tar'])) {\n icon = 'document-compress';\n }\n }\n\n return icon;\n }\n\n static getIconForAttachment(attachment) {\n let icon;\n switch (attachment.type) {\n case 'FILE':\n icon = this.getIconFromFileType(attachment.mimeType);\n break;\n case 'URL':\n icon = 'chain';\n break;\n default:\n icon = 'document-doc';\n }\n return icon;\n }\n\n static getLastChar(text) {\n return text.charAt(text.length - 1);\n }\n\n static isObject(objValue) {\n return objValue && typeof objValue === 'object' && objValue.constructor === Object;\n }\n}\n\nexport default Utils;\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/helpers/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAChC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;AAC9B,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAE3B,MAAM,OAAO,KAAK;IAChB,MAAM,CAAC,aAAa,GAAG,CAAC,CAAC;IAEzB,MAAM,CAAC,qBAAqB;QAC1B,MAAM,eAAe,GAAG,eAAe,CAAC,kBAAkB,EAAE,CAAC;QAE7D,2DAA2D;QAC3D,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACvD,eAAe,CAAC,mBAAmB,GAAG,GAAG,eAAe,CAAC,mBAAmB,GAAG,CAAC;QAClF,CAAC;QAED,OAAO,GAAG,eAAe,CAAC,mBAAmB,gBAAgB,CAAC;IAChE,CAAC;IAED,MAAM,CAAC,kBAAkB;QACvB,MAAM,OAAO,GAAG,UAAU,CAAC;QAE3B,IAAI,CAAC,aAAa,IAAI,CAAC,CAAC;QAExB,OAAO,OAAO,GAAG,IAAI,CAAC,aAAa,C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AAE,KAAK,CAAC,CAAC,EAAE,CAAC;gBACnE,IAAI,GAAG,mBAAmB,CAAC;YAC7B,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,oBAAoB,CAAC,UAAU;QACpC,IAAI,IAAI,CAAC;QACT,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;YACxB,KAAK,MAAM;gBACT,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;gBACrD,MAAM;YACR,KAAK,KAAK;gBACR,IAAI,GAAG,OAAO,CAAC;gBACf,MAAM;YACR;gBACE,IAAI,GAAG,cAAc,CAAC;QAC1B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAI;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,QAAQ;QACtB,OAAO,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,WAAW,KAAK,MAAM,CAAC;IACrF,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,GAAG;QACrB,MAAM,SAAS,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAChE,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO,GAAG,CAAC;QACb,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;;AAGH,eAAe,KAAK,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport { SdkConfigAccess } from '@pega/auth/lib/sdk-auth-manager';\n\ndayjs.extend(customParseFormat);\ndayjs.extend(localizedFormat);\ndayjs.extend(relativeTime);\n\nexport class Utils {\n static lastControlID = 0;\n\n static getSDKStaticConentUrl() {\n const sdkConfigServer = SdkConfigAccess.getSdkConfigServer();\n\n // NOTE: Needs a trailing slash! So add one if not provided\n if (!sdkConfigServer.sdkContentServerUrl.endsWith('/')) {\n sdkConfigServer.sdkContentServerUrl = `${sdkConfigServer.sdkContentServerUrl}/`;\n }\n\n return `${sdkConfigServer.sdkContentServerUrl}constellation/`;\n }\n\n static getUniqueControlID(): string {\n const sPrefix = 'control-';\n\n this.lastControlID += 1;\n\n return sPrefix + this.lastControlID.toString();\n }\n\n static getOptionList(configProps: any, dataObject: any): any[] {\n const listType = configProps.listType;\n let arReturn: any[] = [];\n\n if (listType) {\n switch (listType.toLowerCase()) {\n case 'associated':\n // data source should be an array\n if (typeof configProps.datasource === 'object') {\n arReturn = configProps.datasource;\n }\n break;\n\n case 'datapage':\n // get data page\n // eslint-disable-next-line no-case-declarations\n const dataPage = configProps.datasource;\n if (typeof dataPage === 'string' && dataObject[dataPage]) {\n alert('need to handle data page');\n } else {\n let listSourceItems = configProps.listOutput;\n if (typeof dataPage === 'object' && !Array.isArray(listSourceItems)) {\n listSourceItems = dataPage.source ? dataPage.source : [];\n }\n (listSourceItems || []).forEach(item => {\n item.value = item.text ? item.text : item.value;\n });\n arReturn = listSourceItems || [];\n }\n break;\n\n default:\n break;\n }\n }\n\n return arReturn;\n }\n\n static getInitials(userName: string): string {\n let userInitials = userName;\n\n if (userName && userName !== '') {\n userInitials = userName.charAt(0);\n\n if (userName.lastIndexOf(' ') > 0) {\n const lastName = userName.substring(userName.lastIndexOf(' ') + 1);\n userInitials += lastName.charAt(0);\n } else if (userName.lastIndexOf('.') > 0) {\n const lastName = userName.substring(userName.lastIndexOf('.') + 1);\n userInitials += lastName.charAt(0);\n }\n } else {\n userInitials = '';\n }\n\n return userInitials.toUpperCase();\n }\n\n static getImageSrc(name: string, serverUrl: string): string {\n let iconName = name.replace('pi-', '').replace('pi ', '').trim();\n if (iconName === 'line-chart') {\n iconName = 'chart-line';\n }\n\n return this.getIconPath(serverUrl).concat(iconName).concat('.svg');\n }\n\n static getIconPath(serverUrl: string): string {\n // Directory in the constellation folder where the icons will be\n return serverUrl.concat('icons/');\n }\n\n static getBooleanValue(inValue: any): boolean {\n let bReturn = false;\n\n if (typeof inValue === 'string') {\n // Experiment with having \"\" be true, too (and \"on\")\n if (inValue.toLowerCase() === 'true' || inValue.toLowerCase() === 'on' || inValue === '') {\n bReturn = true;\n }\n } else {\n bReturn = inValue;\n }\n\n return bReturn;\n }\n\n // Note: Explored using formatters/format but that doesn't do the same as this function. So not possible to just invoke\n // format and do away with all the separate Pega possible dateFormats.\n static generateDate(dateVal, dateFormat) {\n let sReturnDate = dateVal;\n\n if (dateVal === null || dateVal === '') {\n return dateVal;\n }\n\n // VRS: Dont think we need the below line. Commenting out for now. (2020.05.20)\n // dateTimeVal = dateTimeVal.replace(\"GMT\", \"+0000\")\n // Anything else would require a specific String pattern be specified as an argument to the dayjs constructor\n\n // if date has a \".\", then of the format YYYMMDD[T]HHmmss[.]SSS Z, need to change to YYYYMMDD\n if (dateVal.indexOf('.') >= 0) {\n // VRS: Dont think we need the dateVal.replace(\"GMT\", \"+0000\"). Commenting out for now. (2020.05.20)\n // dateVal = dayjs(dateVal.replace(\"GMT\", \"+0000\"), \"YYYYMMDD[T]HHmmss[.]SSS Z\").format(\"YYYYMMDD\");\n // dateVal format appears to be YYYY-MM-DDThh:mm:ss.SSSZ (which is the default dayjs expected format)\n // Don't change the dateVal passed to dayjs (rather just set a default sReturnDate--if that is what we want to do)\n // (better might be just doing that in a default switch block)\n sReturnDate = dayjs(dateVal).format('YYYYMMDD');\n }\n\n switch (dateFormat) {\n case 'Date-Short':\n // 1/1/01\n sReturnDate = dayjs(dateVal).format('M/D/YY');\n break;\n case 'Date-Short-YYYY':\n // 1/1/2001\n sReturnDate = dayjs(dateVal).format('M/D/YYYY');\n break;\n case 'Date-Short-Custom':\n // 01/01/01\n sReturnDate = dayjs(dateVal).format('MM/DD/YY');\n break;\n case 'Date-Short-Custom-YYYY':\n // 01/01/2001\n sReturnDate = dayjs(dateVal).format('L');\n break;\n case 'Date-Medium':\n // Jan 1, 2001\n sReturnDate = dayjs(dateVal).format('ll');\n break;\n case 'Date-DayMonthYear-Custom':\n // 01-Jan-2001\n sReturnDate = dayjs(dateVal).format('DD-MMM-YYYY');\n break;\n case 'Date-Full':\n // Monday, January 1, 2001\n sReturnDate = dayjs(dateVal).format('dddd, MMMM D, YYYY');\n break;\n case 'DateTime-Frame':\n case 'DateTime-Frame-Short':\n case 'DateTime-Since':\n // 2 days, 5 hours ago\n sReturnDate = dayjs(dateVal).fromNow();\n break;\n case 'Date-Long':\n // January 1, 2001\n sReturnDate = dayjs(dateVal).format('MMMM D, YYYY');\n break;\n case 'Date-ISO-8601':\n // 2001/01/01 y/m/d\n sReturnDate = dayjs(dateVal).format('YYYY/MM/DD');\n break;\n case 'Date-Gregorian-1':\n // 01 January, 2001\n sReturnDate = dayjs(dateVal).format('DD MMMM, YYYY');\n break;\n case 'Date-Gregorian-2':\n // January 01, 2001\n sReturnDate = dayjs(dateVal).format('MMMM DD, YYYY');\n break;\n case 'Date-Gregorian-3':\n // 2001, January 01\n sReturnDate = dayjs(dateVal).format('YYYY, MMMM DD');\n break;\n case 'DateTime-Custom':\n break;\n default:\n break;\n }\n\n return sReturnDate;\n }\n\n // Note: Explored using formatters/format but that doesn't do the same as this function. So not possible to just invoke\n // format and do away with all the separate Pega possible dateFormats.\n static generateDateTime(dateTimeVal, dateFormat) {\n let sReturnDate = dateTimeVal;\n\n if (dateTimeVal === null || dateTimeVal === '') {\n return dateTimeVal;\n }\n\n // VRS: Dont think we need the below line. Commenting out for now. (2020.05.20)\n // dateTimeVal = dateTimeVal.replace(\"GMT\", \"+0000\")\n // dateTimeVal format appears to be YYYY-MM-DDThh:mm:ss.SSSZ (which is the default dayjs expected format)\n // Anything else would require a specific String pattern be specified as an argument to the dayjs constructor\n\n switch (dateFormat) {\n case 'DateTime-Short':\n // 1/1/01 1:00 AM\n sReturnDate = dayjs(dateTimeVal).format('M/D/YY h:mm A');\n break;\n case 'DateTime-Short-Custom':\n // 01/01/01 01:00 AM\n sReturnDate = dayjs(dateTimeVal).format('MM/DD/YY hh:mm A');\n break;\n case 'DateTime-Short-YYYY-Custom':\n // 01/01/2001 01:00 AM\n sReturnDate = dayjs(dateTimeVal).format('M/D/YYYY hh:mm A');\n break;\n case 'DateTime-Short-YYYY':\n // 1/1/2001 1:00 AM\n sReturnDate = dayjs(dateTimeVal).format('M/D/YYYY h:mm A');\n break;\n case 'DateTime-Medium':\n // Jan 1, 2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('MMM D, YYYY h:mm:ss A');\n break;\n case 'DateTime-Long':\n // January 1, 2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('MMMM D, YYYY h:mm:ss A');\n break;\n case 'DateTime-DayMonthYear-Custom':\n // 01-Jan-2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('DD-MMM-YYYY h:mm:ss A');\n break;\n case 'DateTime-Full':\n // Monday, January 1, 2001 1:00 AM EDT\n sReturnDate = dayjs(dateTimeVal).format('dddd, MMMM D, YYYY h:mm A z');\n break;\n case 'DateTime-Frame':\n case 'DateTime-Frame-Short':\n case 'DateTime-Since':\n // 2 days, 5 hours ago\n sReturnDate = dayjs(dateTimeVal).fromNow();\n break;\n case 'DateTime-ISO-8601':\n // 2001/01/01 1:00:00 AM y/m/d\n sReturnDate = dayjs(dateTimeVal).format('YYYY/MM/DD h:mm:ss A');\n break;\n case 'DateTime-Gregorian-1':\n // 01 January, 2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('DD MMMM, YYYY h:mm:ss A');\n break;\n case 'DateTime-Gregorian-2':\n // January 01, 2001 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('MMMM DD, YYYY h:mm:ss A');\n break;\n case 'DateTime-Gregorian-3':\n // 2001, January 01 1:00:00 AM\n sReturnDate = dayjs(dateTimeVal).format('YYYY, MMMM DD h:mm:ss A');\n break;\n case 'DateTime-Custom':\n break;\n default:\n break;\n }\n\n return sReturnDate;\n }\n\n static getSeconds(sTime): any {\n return dayjs(sTime).valueOf();\n }\n\n static getIconFromFileType(fileType): string {\n let icon = 'document-doc';\n if (!fileType) return icon;\n if (fileType.startsWith('audio')) {\n icon = 'audio';\n } else if (fileType.startsWith('video')) {\n icon = 'video';\n } else if (fileType.startsWith('image')) {\n icon = 'picture';\n } else if (fileType.includes('pdf')) {\n icon = 'document-pdf';\n } else {\n const [, subtype] = fileType.split('/');\n const foundMatch = sources => {\n return sources.some(key => subtype.includes(key));\n };\n\n if (foundMatch(['excel', 'spreadsheet'])) {\n icon = 'document-xls';\n } else if (foundMatch(['zip', 'compressed', 'gzip', 'rar', 'tar'])) {\n icon = 'document-compress';\n }\n }\n\n return icon;\n }\n\n static getIconForAttachment(attachment) {\n let icon;\n switch (attachment.type) {\n case 'FILE':\n icon = this.getIconFromFileType(attachment.mimeType);\n break;\n case 'URL':\n icon = 'chain';\n break;\n default:\n icon = 'document-doc';\n }\n return icon;\n }\n\n static getLastChar(text) {\n return text.charAt(text.length - 1);\n }\n\n static isObject(objValue) {\n return objValue && typeof objValue === 'object' && objValue.constructor === Object;\n }\n\n static getMappedKey(key) {\n const mappedKey = PCore.getEnvironmentInfo().getKeyMapping(key);\n if (!mappedKey) {\n return key;\n }\n return mappedKey;\n }\n}\n\nexport default Utils;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/versionHelpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,UAAU,QAAQ,CAAC;AAEhC,wBAAgB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"versionHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/versionHelpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,UAAU,QAAQ,CAAC;AAEhC,wBAAgB,uBAAuB,SAItC"}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
export const sdkVersion = '8.7';
|
|
8
8
|
export function compareSdkPCoreVersions() {
|
|
9
9
|
// const theConstellationVersion = PCore.getPCoreVersion();
|
|
10
|
-
// eslint-disable-next-line no-console
|
|
11
10
|
console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. Ensure this is the same version as your Infinity server.`);
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=versionHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionHelpers.js","sourceRoot":"","sources":["../../../src/components/helpers/versionHelpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC;AAEhC,MAAM,UAAU,uBAAuB;IACrC,2DAA2D;IAE3D,
|
|
1
|
+
{"version":3,"file":"versionHelpers.js","sourceRoot":"","sources":["../../../src/components/helpers/versionHelpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC;AAEhC,MAAM,UAAU,uBAAuB;IACrC,2DAA2D;IAE3D,OAAO,CAAC,IAAI,CAAC,+BAA+B,KAAK,CAAC,eAAe,EAAE,4DAA4D,CAAC,CAAC;AACnI,CAAC","sourcesContent":["/**\n * versionHelpers.ts\n *\n * Container helper functions that can identify which version of\n * PCore/PConnect is being run\n */\n\nexport const sdkVersion = '8.7';\n\nexport function compareSdkPCoreVersions() {\n // const theConstellationVersion = PCore.getPCoreVersion();\n\n console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. Ensure this is the same version as your Infinity server.`);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IAE1B,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;IACtB,kBAAkB,CAAC,EAAE,GAAG,EAAE,CAAC;IAC3B,aAAa,EAAE,GAAG,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"ActionButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IAE1B,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;IACtB,kBAAkB,CAAC,EAAE,GAAG,EAAE,CAAC;IAC3B,aAAa,EAAE,GAAG,CAAC;CACpB;AAiBD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAqD9D"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import makeStyles from '@mui/styles/makeStyles';
|
|
3
3
|
import Button from '@mui/material/Button';
|
|
4
|
-
import {
|
|
5
|
-
const useStyles = makeStyles(
|
|
6
|
-
button: {
|
|
7
|
-
padding: '0px 5px'
|
|
8
|
-
},
|
|
4
|
+
import { Grid2, Divider } from '@mui/material';
|
|
5
|
+
const useStyles = makeStyles(theme => ({
|
|
9
6
|
divider: {
|
|
10
7
|
marginTop: '10px',
|
|
11
8
|
marginBottom: '10px'
|
|
9
|
+
},
|
|
10
|
+
secondaryButton: {
|
|
11
|
+
backgroundColor: theme.actionButtons.secondary.backgroundColor,
|
|
12
|
+
color: theme.actionButtons.secondary.color
|
|
13
|
+
},
|
|
14
|
+
primaryButton: {
|
|
15
|
+
backgroundColor: theme.actionButtons.primary.backgroundColor,
|
|
16
|
+
color: theme.actionButtons.primary.color
|
|
12
17
|
}
|
|
13
18
|
}));
|
|
14
19
|
export default function ActionButtons(props) {
|
|
@@ -19,9 +24,9 @@ export default function ActionButtons(props) {
|
|
|
19
24
|
function _onButtonPress(sAction, sButtonType) {
|
|
20
25
|
onButtonPress(sAction, sButtonType);
|
|
21
26
|
}
|
|
22
|
-
return (_jsxs(_Fragment, { children: [_jsx(Divider, { className: classes.divider }), _jsxs(
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_jsx(Divider, { className: classes.divider }), _jsxs(Grid2, { container: true, spacing: 4, justifyContent: 'space-between', children: [_jsx(Grid2, { children: _jsx(Grid2, { container: true, spacing: 1, children: arSecondaryButtons.map(sButton => (_jsx(Grid2, { children: _jsx(Button, { className: classes.secondaryButton, color: 'secondary', variant: 'contained', onClick: () => {
|
|
23
28
|
_onButtonPress(sButton.jsAction, 'secondary');
|
|
24
|
-
}, children: localizedVal(sButton.name, localeCategory) }) }, sButton.name))) }) }), _jsx(
|
|
29
|
+
}, children: localizedVal(sButton.name, localeCategory) }) }, sButton.name))) }) }), _jsx(Grid2, { children: _jsx(Grid2, { container: true, spacing: 1, children: arMainButtons.map(mButton => (_jsx(Grid2, { children: _jsx(Button, { className: classes.primaryButton, color: 'primary', variant: 'contained', onClick: () => {
|
|
25
30
|
_onButtonPress(mButton.jsAction, 'primary');
|
|
26
31
|
}, children: localizedVal(mButton.name, localeCategory) }) }, mButton.name))) }) })] })] }));
|
|
27
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButtons.js","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ActionButtons.js","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAU/C,MAAM,SAAS,GAAG,U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B,OAAO,EAAE,GAAG,EAAE;wCACZ,cAAc,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;oCAChD,CAAC,YAEA,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,CAAC,GACpC,IAVC,OAAO,CAAC,IAAI,CAWhB,CACT,CAAC,GACI,GACF,EACR,KAAC,KAAK,cACJ,KAAC,KAAK,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,YACxB,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAC5B,KAAC,KAAK,cACJ,KAAC,MAAM,IACL,SAAS,EAAE,OAAO,CAAC,aAAa,EAChC,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE;wCACZ,cAAc,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;oCAC9C,CAAC,YAEA,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,CAAC,GACpC,IAVC,OAAO,CAAC,IAAI,CAWhB,CACT,CAAC,GACI,GACF,IACF,IACP,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import makeStyles from '@mui/styles/makeStyles';\nimport Button from '@mui/material/Button';\nimport { Grid2, Divider } from '@mui/material';\n\n// ActionButtons does NOT have getPConnect. So, no need to extend from PConnProps\ninterface ActionButtonsProps {\n // If any, enter additional props that only exist on this component\n arMainButtons?: any[];\n arSecondaryButtons?: any[];\n onButtonPress: any;\n}\n\nconst useStyles = makeStyles(theme => ({\n divider: {\n marginTop: '10px',\n marginBottom: '10px'\n },\n secondaryButton: {\n backgroundColor: theme.actionButtons.secondary.backgroundColor,\n color: theme.actionButtons.secondary.color\n },\n primaryButton: {\n backgroundColor: theme.actionButtons.primary.backgroundColor,\n color: theme.actionButtons.primary.color\n }\n}));\n\nexport default function ActionButtons(props: ActionButtonsProps) {\n const { arMainButtons = [], arSecondaryButtons = [], onButtonPress } = props;\n const classes = useStyles();\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Assignment';\n\n function _onButtonPress(sAction: string, sButtonType: string) {\n onButtonPress(sAction, sButtonType);\n }\n\n return (\n <>\n <Divider className={classes.divider} />\n <Grid2 container spacing={4} justifyContent='space-between'>\n <Grid2>\n <Grid2 container spacing={1}>\n {arSecondaryButtons.map(sButton => (\n <Grid2 key={sButton.name}>\n <Button\n className={classes.secondaryButton}\n color='secondary'\n variant='contained'\n onClick={() => {\n _onButtonPress(sButton.jsAction, 'secondary');\n }}\n >\n {localizedVal(sButton.name, localeCategory)}\n </Button>\n </Grid2>\n ))}\n </Grid2>\n </Grid2>\n <Grid2>\n <Grid2 container spacing={1}>\n {arMainButtons.map(mButton => (\n <Grid2 key={mButton.name}>\n <Button\n className={classes.primaryButton}\n color='primary'\n variant='contained'\n onClick={() => {\n _onButtonPress(mButton.jsAction, 'primary');\n }}\n >\n {localizedVal(mButton.name, localeCategory)}\n </Button>\n </Grid2>\n ))}\n </Grid2>\n </Grid2>\n </Grid2>\n </>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { PConnProps } from '../../../types/PConnProps';
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
interface AssignmentProps extends PConnProps {
|
|
4
4
|
itemKey: string;
|
|
5
5
|
isInModal: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Assignment.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Assignment/Assignment.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Assignment.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Assignment/Assignment.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAQ3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,eAAgB,SAAQ,UAAU;IAE1C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,GAAG,EAAE,CAAC;IAEf,aAAa,EAAE,GAAG,EAAE,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,2CAmV3E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import Snackbar from '@mui/material/Snackbar';
|
|
4
4
|
import IconButton from '@mui/material/IconButton';
|
|
5
5
|
import CloseIcon from '@mui/icons-material/Close';
|
|
@@ -18,8 +18,8 @@ export default function Assignment(props) {
|
|
|
18
18
|
const [arNavigationSteps, setArNavigationSteps] = useState([]);
|
|
19
19
|
const actionsAPI = thePConn.getActionsApi();
|
|
20
20
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
21
|
+
const localizationService = thePConn.getLocalizationService();
|
|
21
22
|
const localeCategory = 'Assignment';
|
|
22
|
-
const localeReference = `${getPConnect().getCaseInfo().getClassName()}!CASE!${getPConnect().getCaseInfo().getName()}`.toUpperCase();
|
|
23
23
|
// store off bound functions to above pointers
|
|
24
24
|
const finishAssignment = actionsAPI.finishAssignment.bind(actionsAPI);
|
|
25
25
|
const navigateToStep = actionsAPI.navigateToStep.bind(actionsAPI);
|
|
@@ -56,7 +56,7 @@ export default function Assignment(props) {
|
|
|
56
56
|
function getStepsInfo(steps, formedSteps = []) {
|
|
57
57
|
steps.forEach(step => {
|
|
58
58
|
if (step.name) {
|
|
59
|
-
step.name =
|
|
59
|
+
step.name = localizationService.getLocalizedText(step.name);
|
|
60
60
|
}
|
|
61
61
|
if (step.steps) {
|
|
62
62
|
formedSteps = getStepsInfo(step.steps, formedSteps);
|
|
@@ -76,36 +76,40 @@ export default function Assignment(props) {
|
|
|
76
76
|
const oWorkItem = firstChild.props.getPConnect();
|
|
77
77
|
const oWorkData = oWorkItem.getDataObject();
|
|
78
78
|
const oData = thePConn.getDataObject(''); // 1st arg empty string until typedefs allow it to be optional
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
79
|
+
const caseInfo = oData?.caseInfo;
|
|
80
|
+
if (!oWorkData?.caseInfo || oWorkData.caseInfo.assignments === null || !caseInfo) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
// Set action buttons
|
|
84
|
+
if (caseInfo.actionButtons) {
|
|
85
|
+
setActionButtons(caseInfo.actionButtons);
|
|
86
|
+
}
|
|
87
|
+
// Handle navigation setup
|
|
88
|
+
const navigation = caseInfo.navigation;
|
|
89
|
+
if (!navigation) {
|
|
90
|
+
setHasNavigation(false);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const isStandardTemplate = navigation.template?.toLowerCase() === 'standard';
|
|
94
|
+
const hasSingleStep = navigation.steps?.length === 1;
|
|
95
|
+
const shouldHideNavigation = isStandardTemplate || hasSingleStep;
|
|
96
|
+
setHasNavigation(!shouldHideNavigation);
|
|
97
|
+
if (shouldHideNavigation) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
// set vertical navigation
|
|
101
|
+
const isVerticalTemplate = navigation.template?.toLowerCase() === 'vertical';
|
|
102
|
+
setIsVertical(isVerticalTemplate);
|
|
103
|
+
if (navigation.steps) {
|
|
104
|
+
const steps = JSON.parse(JSON.stringify(navigation.steps));
|
|
105
|
+
const formedSteps = getStepsInfo(steps);
|
|
106
|
+
setArNavigationSteps(formedSteps);
|
|
103
107
|
}
|
|
108
|
+
setArCurrentStepIndicies(findCurrentIndicies(arNavigationSteps, arCurrentStepIndicies, 0));
|
|
104
109
|
}
|
|
105
110
|
}, [children]);
|
|
106
111
|
function showToast(message) {
|
|
107
112
|
const theMessage = `Assignment: ${message}`;
|
|
108
|
-
// eslint-disable-next-line no-console
|
|
109
113
|
console.error(theMessage);
|
|
110
114
|
setSnackbarMessage(message);
|
|
111
115
|
setShowSnackbar(true);
|
|
@@ -117,7 +121,7 @@ export default function Assignment(props) {
|
|
|
117
121
|
setShowSnackbar(false);
|
|
118
122
|
}
|
|
119
123
|
function onSaveActionSuccess(data) {
|
|
120
|
-
actionsAPI.cancelAssignment(itemKey).then(() => {
|
|
124
|
+
actionsAPI.cancelAssignment(itemKey, false).then(() => {
|
|
121
125
|
PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED, data);
|
|
122
126
|
});
|
|
123
127
|
}
|
|
@@ -139,7 +143,6 @@ export default function Assignment(props) {
|
|
|
139
143
|
const savePromise = saveAssignment(itemKey);
|
|
140
144
|
savePromise
|
|
141
145
|
.then(() => {
|
|
142
|
-
// @ts-ignore - Property 'c11nEnv' is private and only accessible within class 'CaseInfo'.
|
|
143
146
|
const caseType = thePConn.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);
|
|
144
147
|
onSaveActionSuccess({ caseType, caseID, assignmentID });
|
|
145
148
|
})
|
|
@@ -152,11 +155,8 @@ export default function Assignment(props) {
|
|
|
152
155
|
// check if create stage (modal)
|
|
153
156
|
const { PUB_SUB_EVENTS } = PCore.getConstants();
|
|
154
157
|
const { publish } = PCore.getPubSubUtils();
|
|
155
|
-
// @ts-ignore - Property 'isAssignmentInCreateStage' is private and only accessible within class 'CaseInfo'
|
|
156
158
|
const isAssignmentInCreateStage = thePConn.getCaseInfo().isAssignmentInCreateStage();
|
|
157
|
-
const isLocalAction =
|
|
158
|
-
// @ts-ignore - Property 'isLocalAction' is private and only accessible within class 'CaseInfo'.
|
|
159
|
-
thePConn.getCaseInfo().isLocalAction() ||
|
|
159
|
+
const isLocalAction = thePConn.getCaseInfo().isLocalAction() ||
|
|
160
160
|
(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION && getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));
|
|
161
161
|
if (isAssignmentInCreateStage && isInModal && !isLocalAction) {
|
|
162
162
|
const cancelPromise = cancelCreateStageAssignment(itemKey);
|
|
@@ -169,7 +169,7 @@ export default function Assignment(props) {
|
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
else {
|
|
172
|
-
const cancelPromise = cancelAssignment(itemKey);
|
|
172
|
+
const cancelPromise = cancelAssignment(itemKey, false);
|
|
173
173
|
cancelPromise
|
|
174
174
|
.then(data => {
|
|
175
175
|
publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);
|
|
@@ -226,7 +226,6 @@ export default function Assignment(props) {
|
|
|
226
226
|
return refreshConditions.filter(item => item.event && item.event === 'Changes').map(item => [item.field, item.field?.substring(1)]) || [];
|
|
227
227
|
}
|
|
228
228
|
// expected format of refreshConditions : [{field: ".Name", event: "Changes"}]
|
|
229
|
-
// @ts-ignore - Property 'getActionRefreshConditions' is private and only accessible within class 'CaseInfo'
|
|
230
229
|
const refreshConditions = thePConn.getCaseInfo()?.getActionRefreshConditions();
|
|
231
230
|
const context = thePConn.getContextName();
|
|
232
231
|
const pageReference = thePConn.getPageReference();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Assignment.js","sourceRoot":"","sources":["../../../../src/components/infra/Assignment/Assignment.tsx"],"names":[],"mappings":";AAAA,OAAc,EA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I,EAAE,YAAY,EAClB,gBAAgB,EAAE,IAAI,EACtB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,EACxB,MAAM,EACJ,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,gBAAY,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,mBAAmB,YACtF,KAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,GACnB,GAEf,IACD,CACJ,CAAC,CAAC,CAAC,CACF,8BACE,KAAC,cAAc,IAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,YACjH,QAAQ,GACM,EACjB,KAAC,QAAQ,IACP,IAAI,EAAE,YAAY,EAClB,gBAAgB,EAAE,IAAI,EACtB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,EACxB,MAAM,EACJ,KAAC,UAAU,IAAC,IAAI,EAAC,OAAO,gBAAY,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,mBAAmB,YACtF,KAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,GACnB,GAEf,IACD,CACJ,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { PropsWithChildren, useEffect, useState } from 'react';\nimport Snackbar from '@mui/material/Snackbar';\nimport IconButton from '@mui/material/IconButton';\nimport CloseIcon from '@mui/icons-material/Close';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { useFocusFirstField, useScrolltoTop } from '../../../hooks';\n\nimport { PConnProps } from '../../../types/PConnProps';\n\ninterface AssignmentProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n itemKey: string;\n isInModal: boolean;\n banners: any[];\n // eslint-disable-next-line react/no-unused-prop-types\n actionButtons: any[];\n}\n\nexport default function Assignment(props: PropsWithChildren<AssignmentProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const AssignmentCard = getComponentFromMap('AssignmentCard');\n const MultiStep = getComponentFromMap('MultiStep');\n\n const { getPConnect, children, itemKey = '', isInModal = false, banners = [] } = props;\n const thePConn = getPConnect();\n\n const [bHasNavigation, setHasNavigation] = useState(false);\n const [actionButtons, setActionButtons] = useState([]);\n const [bIsVertical, setIsVertical] = useState(false);\n const [arCurrentStepIndicies, setArCurrentStepIndicies] = useState<any[]>([]);\n const [arNavigationSteps, setArNavigationSteps] = useState<any[]>([]);\n\n const actionsAPI = thePConn.getActionsApi();\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Assignment';\n const localeReference = `${getPConnect().getCaseInfo().getClassName()}!CASE!${getPConnect().getCaseInfo().getName()}`.toUpperCase();\n\n // store off bound functions to above pointers\n const finishAssignment = actionsAPI.finishAssignment.bind(actionsAPI);\n const navigateToStep = actionsAPI.navigateToStep.bind(actionsAPI);\n const cancelAssignment = actionsAPI.cancelAssignment.bind(actionsAPI);\n const saveAssignment = actionsAPI.saveAssignment?.bind(actionsAPI);\n const cancelCreateStageAssignment = actionsAPI.cancelCreateStageAssignment.bind(actionsAPI);\n const approveCase = actionsAPI.approveCase?.bind(actionsAPI);\n const rejectCase = actionsAPI.rejectCase?.bind(actionsAPI);\n // const showPage = actionsAPI.showPage.bind(actionsAPI);\n\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage] = useState('');\n\n function findCurrentIndicies(arStepperSteps: any[], arIndicies: number[], depth: number): number[] {\n let count = 0;\n arStepperSteps.forEach(step => {\n if (step.visited_status === 'current') {\n arIndicies[depth] = count;\n\n // add in\n step.step_status = '';\n } else if (step.visited_status === 'success') {\n count += 1;\n step.step_status = 'completed';\n } else {\n count += 1;\n step.step_status = '';\n }\n\n if (step.steps) {\n arIndicies = findCurrentIndicies(step.steps, arIndicies, depth + 1);\n }\n });\n\n return arIndicies;\n }\n\n function getStepsInfo(steps, formedSteps: any = []) {\n steps.forEach(step => {\n if (step.name) {\n step.name = PCore.getLocaleUtils().getLocaleValue(step.name, undefined, localeReference);\n }\n if (step.steps) {\n formedSteps = getStepsInfo(step.steps, formedSteps);\n } else {\n formedSteps.push(step);\n }\n });\n return formedSteps;\n }\n\n const scrollId = window.location.href.includes('embedded') ? '#pega-part-of-page' : '#portal';\n useScrolltoTop(scrollId, children);\n useFocusFirstField('Assignment', children);\n\n useEffect(() => {\n if (children) {\n const firstChild = Array.isArray(children) ? children[0] : children;\n const oWorkItem = firstChild.props.getPConnect();\n const oWorkData = oWorkItem.getDataObject();\n const oData: any = thePConn.getDataObject(''); // 1st arg empty string until typedefs allow it to be optional\n\n if (oWorkData?.caseInfo && oWorkData.caseInfo.assignments !== null) {\n const oCaseInfo = oData?.caseInfo;\n\n if (oCaseInfo && oCaseInfo.actionButtons) {\n setActionButtons(oCaseInfo.actionButtons);\n }\n\n if (oCaseInfo?.navigation /* was oCaseInfo.navigation != null */) {\n setHasNavigation(true);\n\n if (\n (oCaseInfo.navigation.template && oCaseInfo.navigation.template.toLowerCase() === 'standard') ||\n oCaseInfo?.navigation?.steps?.length === 1\n ) {\n setHasNavigation(false);\n } else if (oCaseInfo.navigation.template && oCaseInfo.navigation.template.toLowerCase() === 'vertical') {\n setIsVertical(true);\n } else {\n setIsVertical(false);\n }\n\n if (oCaseInfo?.navigation?.steps) {\n const steps = JSON.parse(JSON.stringify(oCaseInfo?.navigation?.steps));\n const formedSteps = getStepsInfo(steps);\n setArNavigationSteps(formedSteps);\n }\n\n setArCurrentStepIndicies(findCurrentIndicies(arNavigationSteps, arCurrentStepIndicies, 0));\n }\n }\n }\n }, [children]);\n\n function showToast(message: string) {\n const theMessage = `Assignment: ${message}`;\n // eslint-disable-next-line no-console\n console.error(theMessage);\n setSnackbarMessage(message);\n setShowSnackbar(true);\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent<any> | Event, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n function onSaveActionSuccess(data) {\n actionsAPI.cancelAssignment(itemKey).then(() => {\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED, data);\n });\n }\n\n function buttonPress(sAction: string, sButtonType: string) {\n if (sButtonType === 'secondary') {\n switch (sAction) {\n case 'navigateToStep': {\n const navigatePromise = navigateToStep('previous', itemKey);\n\n navigatePromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Navigation failed!', localeCategory)}`);\n });\n\n break;\n }\n\n case 'saveAssignment': {\n const caseID = thePConn.getCaseInfo().getKey();\n const assignmentID = thePConn.getCaseInfo().getAssignmentID();\n const savePromise = saveAssignment(itemKey);\n\n savePromise\n .then(() => {\n // @ts-ignore - Property 'c11nEnv' is private and only accessible within class 'CaseInfo'.\n const caseType = thePConn.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);\n onSaveActionSuccess({ caseType, caseID, assignmentID });\n })\n .catch(() => {\n showToast(`${localizedVal('Save failed', localeCategory)}`);\n });\n\n break;\n }\n\n case 'cancelAssignment': {\n // check if create stage (modal)\n const { PUB_SUB_EVENTS } = PCore.getConstants();\n const { publish } = PCore.getPubSubUtils();\n // @ts-ignore - Property 'isAssignmentInCreateStage' is private and only accessible within class 'CaseInfo'\n const isAssignmentInCreateStage = thePConn.getCaseInfo().isAssignmentInCreateStage();\n const isLocalAction =\n // @ts-ignore - Property 'isLocalAction' is private and only accessible within class 'CaseInfo'.\n thePConn.getCaseInfo().isLocalAction() ||\n (PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION && getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));\n if (isAssignmentInCreateStage && isInModal && !isLocalAction) {\n const cancelPromise = cancelCreateStageAssignment(itemKey);\n\n cancelPromise\n .then(data => {\n publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);\n })\n .catch(() => {\n showToast(`${localizedVal('Cancel failed!', localeCategory)}`);\n });\n } else {\n const cancelPromise = cancelAssignment(itemKey);\n\n cancelPromise\n .then(data => {\n publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);\n })\n .catch(() => {\n showToast(`${localizedVal('Cancel failed!', localeCategory)}`);\n });\n }\n break;\n }\n\n case 'rejectCase': {\n const rejectPromise = rejectCase(itemKey);\n\n rejectPromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Rejection failed!', localeCategory)}`);\n });\n\n break;\n }\n\n default:\n break;\n }\n } else if (sButtonType === 'primary') {\n switch (sAction) {\n case 'finishAssignment': {\n const finishPromise = finishAssignment(itemKey);\n\n finishPromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Submit failed!', localeCategory)}`);\n });\n\n break;\n }\n\n case 'approveCase': {\n const approvePromise = approveCase(itemKey);\n\n approvePromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Approve failed!', localeCategory)}`);\n });\n\n break;\n }\n\n default:\n break;\n }\n }\n }\n\n function getRefreshProps(refreshConditions) {\n // refreshConditions cuurently supports only \"Changes\" event\n if (!refreshConditions) {\n return [];\n }\n return refreshConditions.filter(item => item.event && item.event === 'Changes').map(item => [item.field, item.field?.substring(1)]) || [];\n }\n\n // expected format of refreshConditions : [{field: \".Name\", event: \"Changes\"}]\n // @ts-ignore - Property 'getActionRefreshConditions' is private and only accessible within class 'CaseInfo'\n const refreshConditions = thePConn.getCaseInfo()?.getActionRefreshConditions();\n const context = thePConn.getContextName();\n const pageReference = thePConn.getPageReference();\n\n // refresh api de-registration\n PCore.getRefreshManager().deRegisterForRefresh(context);\n\n // refresh api registration\n const refreshProps = getRefreshProps(refreshConditions);\n const caseKey = thePConn.getCaseInfo().getKey();\n const refreshOptions = {\n autoDetectRefresh: true,\n preserveClientChanges: false\n };\n if (refreshProps.length > 0) {\n refreshProps.forEach(prop => {\n PCore.getRefreshManager().registerForRefresh(\n 'PROP_CHANGE',\n thePConn.getActionsApi().refreshCaseView.bind(thePConn.getActionsApi(), caseKey, '', pageReference, {\n ...refreshOptions,\n refreshFor: prop[0]\n }),\n `${pageReference}.${prop[1]}`,\n `${context}/${pageReference}`,\n context\n );\n });\n }\n\n return (\n <div id='Assignment'>\n {banners}\n {bHasNavigation ? (\n <>\n <MultiStep\n getPConnect={getPConnect}\n itemKey={itemKey}\n actionButtons={actionButtons}\n onButtonPress={buttonPress}\n bIsVertical={bIsVertical}\n arCurrentStepIndicies={arCurrentStepIndicies}\n arNavigationSteps={arNavigationSteps}\n >\n {children}\n </MultiStep>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n ) : (\n <>\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n )}\n </div>\n );\n}\n\n// From WC SDK\n// const aHtml = html`\n// ${this.bHasNavigation?\n// html`\n// <div class=\"psdk-stepper\">\n// <multi-step-component .pConn=${this.pConn} .arChildren=${this.arChildren} itemKey=${this.itemKey}\n// .arMainButtons=${this.arMainButtons} .arSecondaryButtons=${this.arSecondaryButtons}\n// .bIsVertical=${this.bIsVertical} .arCurrentStepIndicies=${this.arCurrentStepIndicies}\n// .arNavigationSteps=${this.arNavigationSteps}\n// @MultiStepActionButtonClick=\"${this._onActionButtonClick}\">\n// </multi-step-component>\n// <lit-toast></lit-toast>\n// </div>`\n// :\n// html`\n// <div>\n// <assignment-card-component .pConn=${this.pConn} .arChildren=${this.arChildren} itemKey=${this.itemKey}\n// .arMainButtons=${this.arMainButtons} .arSecondaryButtons=${this.arSecondaryButtons}\n// @AssignmentActionButtonClick=\"${this._onActionButtonClick}\">\n// </assignment-card-component>\n// <lit-toast></lit-toast>\n// </div>`}\n// `;\n"]}
|
|
1
|
+
{"version":3,"file":"Assignment.js","sourceRoot":"","sources":["../../../../src/components/infra/Assignment/Assignment.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAA0B,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAapE,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAyC;IAC1E,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,SAAS,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IAEnD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAE,SAAS,GAAG,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IACvF,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrD,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GAAG,QAAQ,CAAQ,EAAE,CAAC,CAAC;IAC9E,MAAM,CAAC,iBAAiB,EAAE,oBA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\nimport Snackbar from '@mui/material/Snackbar';\nimport IconButton from '@mui/material/IconButton';\nimport CloseIcon from '@mui/icons-material/Close';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { useFocusFirstField, useScrolltoTop } from '../../../hooks';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface AssignmentProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n itemKey: string;\n isInModal: boolean;\n banners: any[];\n\n actionButtons: any[];\n}\n\nexport default function Assignment(props: PropsWithChildren<AssignmentProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const AssignmentCard = getComponentFromMap('AssignmentCard');\n const MultiStep = getComponentFromMap('MultiStep');\n\n const { getPConnect, children, itemKey = '', isInModal = false, banners = [] } = props;\n const thePConn = getPConnect();\n\n const [bHasNavigation, setHasNavigation] = useState(false);\n const [actionButtons, setActionButtons] = useState([]);\n const [bIsVertical, setIsVertical] = useState(false);\n const [arCurrentStepIndicies, setArCurrentStepIndicies] = useState<any[]>([]);\n const [arNavigationSteps, setArNavigationSteps] = useState<any[]>([]);\n\n const actionsAPI = thePConn.getActionsApi();\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localizationService = thePConn.getLocalizationService();\n const localeCategory = 'Assignment';\n\n // store off bound functions to above pointers\n const finishAssignment = actionsAPI.finishAssignment.bind(actionsAPI);\n const navigateToStep = actionsAPI.navigateToStep.bind(actionsAPI);\n const cancelAssignment = actionsAPI.cancelAssignment.bind(actionsAPI);\n const saveAssignment = actionsAPI.saveAssignment?.bind(actionsAPI);\n const cancelCreateStageAssignment = actionsAPI.cancelCreateStageAssignment.bind(actionsAPI);\n const approveCase = actionsAPI.approveCase?.bind(actionsAPI);\n const rejectCase = actionsAPI.rejectCase?.bind(actionsAPI);\n // const showPage = actionsAPI.showPage.bind(actionsAPI);\n\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage] = useState('');\n\n function findCurrentIndicies(arStepperSteps: any[], arIndicies: number[], depth: number): number[] {\n let count = 0;\n arStepperSteps.forEach(step => {\n if (step.visited_status === 'current') {\n arIndicies[depth] = count;\n\n // add in\n step.step_status = '';\n } else if (step.visited_status === 'success') {\n count += 1;\n step.step_status = 'completed';\n } else {\n count += 1;\n step.step_status = '';\n }\n\n if (step.steps) {\n arIndicies = findCurrentIndicies(step.steps, arIndicies, depth + 1);\n }\n });\n\n return arIndicies;\n }\n\n function getStepsInfo(steps, formedSteps: any = []) {\n steps.forEach(step => {\n if (step.name) {\n step.name = localizationService.getLocalizedText(step.name);\n }\n if (step.steps) {\n formedSteps = getStepsInfo(step.steps, formedSteps);\n } else {\n formedSteps.push(step);\n }\n });\n return formedSteps;\n }\n\n const scrollId = window.location.href.includes('embedded') ? '#pega-part-of-page' : '#portal';\n useScrolltoTop(scrollId, children);\n useFocusFirstField('Assignment', children);\n\n useEffect(() => {\n if (children) {\n const firstChild = Array.isArray(children) ? children[0] : children;\n const oWorkItem = firstChild.props.getPConnect();\n const oWorkData = oWorkItem.getDataObject();\n const oData: any = thePConn.getDataObject(''); // 1st arg empty string until typedefs allow it to be optional\n const caseInfo = oData?.caseInfo;\n if (!oWorkData?.caseInfo || oWorkData.caseInfo.assignments === null || !caseInfo) {\n return;\n }\n\n // Set action buttons\n if (caseInfo.actionButtons) {\n setActionButtons(caseInfo.actionButtons);\n }\n\n // Handle navigation setup\n const navigation = caseInfo.navigation;\n if (!navigation) {\n setHasNavigation(false);\n return;\n }\n\n const isStandardTemplate = navigation.template?.toLowerCase() === 'standard';\n const hasSingleStep = navigation.steps?.length === 1;\n const shouldHideNavigation = isStandardTemplate || hasSingleStep;\n\n setHasNavigation(!shouldHideNavigation);\n\n if (shouldHideNavigation) {\n return;\n }\n\n // set vertical navigation\n const isVerticalTemplate = navigation.template?.toLowerCase() === 'vertical';\n setIsVertical(isVerticalTemplate);\n\n if (navigation.steps) {\n const steps = JSON.parse(JSON.stringify(navigation.steps));\n const formedSteps = getStepsInfo(steps);\n setArNavigationSteps(formedSteps);\n }\n\n setArCurrentStepIndicies(findCurrentIndicies(arNavigationSteps, arCurrentStepIndicies, 0));\n }\n }, [children]);\n\n function showToast(message: string) {\n const theMessage = `Assignment: ${message}`;\n\n console.error(theMessage);\n setSnackbarMessage(message);\n setShowSnackbar(true);\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent<any> | Event, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n function onSaveActionSuccess(data) {\n actionsAPI.cancelAssignment(itemKey, false).then(() => {\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_SAVED, data);\n });\n }\n\n function buttonPress(sAction: string, sButtonType: string) {\n if (sButtonType === 'secondary') {\n switch (sAction) {\n case 'navigateToStep': {\n const navigatePromise = navigateToStep('previous', itemKey);\n\n navigatePromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Navigation failed!', localeCategory)}`);\n });\n\n break;\n }\n\n case 'saveAssignment': {\n const caseID = thePConn.getCaseInfo().getKey();\n const assignmentID = thePConn.getCaseInfo().getAssignmentID();\n const savePromise = saveAssignment(itemKey);\n\n savePromise\n .then(() => {\n const caseType = thePConn.getCaseInfo().c11nEnv.getValue(PCore.getConstants().CASE_INFO.CASE_TYPE_ID);\n onSaveActionSuccess({ caseType, caseID, assignmentID });\n })\n .catch(() => {\n showToast(`${localizedVal('Save failed', localeCategory)}`);\n });\n\n break;\n }\n\n case 'cancelAssignment': {\n // check if create stage (modal)\n const { PUB_SUB_EVENTS } = PCore.getConstants();\n const { publish } = PCore.getPubSubUtils();\n const isAssignmentInCreateStage = thePConn.getCaseInfo().isAssignmentInCreateStage();\n const isLocalAction =\n thePConn.getCaseInfo().isLocalAction() ||\n (PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION && getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION));\n if (isAssignmentInCreateStage && isInModal && !isLocalAction) {\n const cancelPromise = cancelCreateStageAssignment(itemKey);\n\n cancelPromise\n .then(data => {\n publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);\n })\n .catch(() => {\n showToast(`${localizedVal('Cancel failed!', localeCategory)}`);\n });\n } else {\n const cancelPromise = cancelAssignment(itemKey, false);\n\n cancelPromise\n .then(data => {\n publish(PUB_SUB_EVENTS.EVENT_CANCEL, data);\n })\n .catch(() => {\n showToast(`${localizedVal('Cancel failed!', localeCategory)}`);\n });\n }\n break;\n }\n\n case 'rejectCase': {\n const rejectPromise = rejectCase(itemKey);\n\n rejectPromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Rejection failed!', localeCategory)}`);\n });\n\n break;\n }\n\n default:\n break;\n }\n } else if (sButtonType === 'primary') {\n switch (sAction) {\n case 'finishAssignment': {\n const finishPromise = finishAssignment(itemKey);\n\n finishPromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Submit failed!', localeCategory)}`);\n });\n\n break;\n }\n\n case 'approveCase': {\n const approvePromise = approveCase(itemKey);\n\n approvePromise\n .then(() => {})\n .catch(() => {\n showToast(`${localizedVal('Approve failed!', localeCategory)}`);\n });\n\n break;\n }\n\n default:\n break;\n }\n }\n }\n\n function getRefreshProps(refreshConditions) {\n // refreshConditions cuurently supports only \"Changes\" event\n if (!refreshConditions) {\n return [];\n }\n return refreshConditions.filter(item => item.event && item.event === 'Changes').map(item => [item.field, item.field?.substring(1)]) || [];\n }\n\n // expected format of refreshConditions : [{field: \".Name\", event: \"Changes\"}]\n const refreshConditions = thePConn.getCaseInfo()?.getActionRefreshConditions();\n const context = thePConn.getContextName();\n const pageReference = thePConn.getPageReference();\n\n // refresh api de-registration\n PCore.getRefreshManager().deRegisterForRefresh(context);\n\n // refresh api registration\n const refreshProps = getRefreshProps(refreshConditions);\n const caseKey = thePConn.getCaseInfo().getKey();\n const refreshOptions = {\n autoDetectRefresh: true,\n preserveClientChanges: false\n };\n if (refreshProps.length > 0) {\n refreshProps.forEach(prop => {\n PCore.getRefreshManager().registerForRefresh(\n 'PROP_CHANGE',\n thePConn.getActionsApi().refreshCaseView.bind(thePConn.getActionsApi(), caseKey, '', pageReference, {\n ...refreshOptions,\n refreshFor: prop[0]\n }),\n `${pageReference}.${prop[1]}`,\n `${context}/${pageReference}`,\n context\n );\n });\n }\n\n return (\n <div id='Assignment'>\n {banners}\n {bHasNavigation ? (\n <>\n <MultiStep\n getPConnect={getPConnect}\n itemKey={itemKey}\n actionButtons={actionButtons}\n onButtonPress={buttonPress}\n bIsVertical={bIsVertical}\n arCurrentStepIndicies={arCurrentStepIndicies}\n arNavigationSteps={arNavigationSteps}\n >\n {children}\n </MultiStep>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n ) : (\n <>\n <AssignmentCard getPConnect={getPConnect} itemKey={itemKey} actionButtons={actionButtons} onButtonPress={buttonPress}>\n {children}\n </AssignmentCard>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n )}\n </div>\n );\n}\n\n// From WC SDK\n// const aHtml = html`\n// ${this.bHasNavigation?\n// html`\n// <div class=\"psdk-stepper\">\n// <multi-step-component .pConn=${this.pConn} .arChildren=${this.arChildren} itemKey=${this.itemKey}\n// .arMainButtons=${this.arMainButtons} .arSecondaryButtons=${this.arSecondaryButtons}\n// .bIsVertical=${this.bIsVertical} .arCurrentStepIndicies=${this.arCurrentStepIndicies}\n// .arNavigationSteps=${this.arNavigationSteps}\n// @MultiStepActionButtonClick=\"${this._onActionButtonClick}\">\n// </multi-step-component>\n// <lit-toast></lit-toast>\n// </div>`\n// :\n// html`\n// <div>\n// <assignment-card-component .pConn=${this.pConn} .arChildren=${this.arChildren} itemKey=${this.itemKey}\n// .arMainButtons=${this.arMainButtons} .arSecondaryButtons=${this.arSecondaryButtons}\n// @AssignmentActionButtonClick=\"${this._onActionButtonClick}\">\n// </assignment-card-component>\n// <lit-toast></lit-toast>\n// </div>`}\n// `;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { PConnProps } from '../../../types/PConnProps';
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
interface AssignmentCardProps extends PConnProps {
|
|
4
4
|
actionButtons: any;
|
|
5
5
|
onButtonPress: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignmentCard.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/AssignmentCard/AssignmentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssignmentCard.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/AssignmentCard/AssignmentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,mBAAoB,SAAQ,UAAU;IAE9C,aAAa,EAAE,GAAG,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,2CA4BnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssignmentCard.js","sourceRoot":"","sources":["../../../../src/components/infra/AssignmentCard/AssignmentCard.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AssignmentCard.js","sourceRoot":"","sources":["../../../../src/components/infra/AssignmentCard/AssignmentCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAQhF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAA6C;IAClF,8EAA8E;IAC9E,MAAM,aAAa,GAAG,mBAAmB,CAAC,eAAe,CAAC,CAAC;IAE3D,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAEzD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEjE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,EAAE,CAAC;YAClB,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YACrC,qBAAqB,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,SAAS,WAAW,CAAC,OAAO,EAAE,KAAK;QACjC,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,CACL,8BACG,QAAQ,EACR,aAAa,IAAI,kBAAkB,IAAI,CACtC,KAAC,aAAa,IAAC,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,WAAW,GAAI,CACpH,IACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { type PropsWithChildren, useEffect, useState } from 'react';\n\nimport type { PConnProps } from '../../../types/PConnProps';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\ninterface AssignmentCardProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n actionButtons: any;\n onButtonPress: any;\n}\n\nexport default function AssignmentCard(props: PropsWithChildren<AssignmentCardProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const ActionButtons = getComponentFromMap('ActionButtons');\n\n const { children, actionButtons, onButtonPress } = props;\n\n const [arMainButtons, setArMainButtons] = useState([]);\n const [arSecondaryButtons, setArSecondaryButtons] = useState([]);\n\n useEffect(() => {\n if (actionButtons) {\n setArMainButtons(actionButtons.main);\n setArSecondaryButtons(actionButtons.secondary);\n }\n }, [actionButtons]);\n\n function buttonPress(sAction, sType) {\n onButtonPress(sAction, sType);\n }\n\n return (\n <>\n {children}\n {arMainButtons && arSecondaryButtons && (\n <ActionButtons arMainButtons={arMainButtons} arSecondaryButtons={arSecondaryButtons} onButtonPress={buttonPress} />\n )}\n </>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/FlowContainer/FlowContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlowContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/FlowContainer/FlowContainer.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI/D,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,YAAY,EAAE,GAAG,EAAE,CAAC;IACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,gCAAgC,EAAE,QAAQ,CAAC;IAC3C,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AA6BD,eAAO,MAAM,aAAa,GAAI,OAAO,kBAAkB,4CAsNtD,CAAC;;AAEF,wBAA8D"}
|