@pega/react-sdk-components 24.2.11 → 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 +3 -3
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +52 -3
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +2 -2
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +0 -2
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +3 -6
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +4 -7
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +2 -4
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +6 -9
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +6 -7
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +2 -2
- package/lib/components/field/Group/Group.d.ts.map +1 -1
- package/lib/components/field/Group/Group.js +4 -3
- package/lib/components/field/Group/Group.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +4 -5
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Location/Location.css +4 -0
- package/lib/components/field/Location/Location.d.ts +11 -0
- package/lib/components/field/Location/Location.d.ts.map +1 -0
- package/lib/components/field/Location/Location.js +158 -0
- package/lib/components/field/Location/Location.js.map +1 -0
- package/lib/components/field/Location/index.d.ts +2 -0
- package/lib/components/field/Location/index.d.ts.map +1 -0
- package/lib/components/field/Location/index.js +2 -0
- package/lib/components/field/Location/index.js.map +1 -0
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
- package/lib/components/field/Multiselect/utils.d.ts +2 -1
- package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
- package/lib/components/field/Multiselect/utils.js +1 -1
- package/lib/components/field/Multiselect/utils.js.map +1 -1
- package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
- package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
- package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
- package/lib/components/field/ObjectReference/index.d.ts +2 -0
- package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/index.js +2 -0
- package/lib/components/field/ObjectReference/index.js.map +1 -0
- package/lib/components/field/ObjectReference/utils.d.ts +17 -0
- package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/utils.js +99 -0
- package/lib/components/field/ObjectReference/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +2 -5
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +6 -4
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.css +79 -0
- package/lib/components/field/RichText/RichText.d.ts +2 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +1 -0
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +1 -2
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
- package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/SelectableCard.js +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 +2 -5
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +4 -5
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +1 -2
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +1 -2
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentShared.d.ts +2 -0
- package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
- package/lib/components/helpers/attachmentShared.js +6 -0
- package/lib/components/helpers/attachmentShared.js.map +1 -0
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -1
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +1 -2
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +0 -1
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts +1 -1
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +1 -0
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +8 -4
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +1 -0
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
- package/lib/components/helpers/object-utils.d.ts +9 -0
- package/lib/components/helpers/object-utils.d.ts.map +1 -0
- package/lib/components/helpers/object-utils.js +11 -0
- package/lib/components/helpers/object-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +111 -5
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -0
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +7 -1
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +0 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +32 -28
- 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 +15 -79
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +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.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 +1 -0
- package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/container-helpers.js +46 -1
- package/lib/components/infra/Containers/container-helpers.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +1 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +2 -4
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +48 -70
- package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +19 -37
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +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 +0 -1
- 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 +10 -13
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +24 -37
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +2 -2
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +13 -15
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +0 -1
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +9 -2
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +239 -80
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
- package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
- package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
- package/lib/components/template/DataReference/SearchForm.js +87 -0
- package/lib/components/template/DataReference/SearchForm.js.map +1 -0
- package/lib/components/template/DataReference/utils.d.ts +15 -0
- package/lib/components/template/DataReference/utils.d.ts.map +1 -0
- package/lib/components/template/DataReference/utils.js +75 -0
- package/lib/components/template/DataReference/utils.js.map +1 -0
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.js +1 -2
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
- package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
- package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
- package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
- package/lib/components/template/DefaultPage/index.d.ts +2 -0
- package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/index.js +2 -0
- package/lib/components/template/DefaultPage/index.js.map +1 -0
- package/lib/components/template/Details/Details/Details.d.ts +1 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +2 -3
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -2
- 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 +133 -64
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +2 -5
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +28 -5
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +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 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +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 -2
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +34 -32
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +102 -1
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/template/utils.d.ts +7 -0
- package/lib/components/template/utils.d.ts.map +1 -0
- package/lib/components/template/utils.js +52 -0
- package/lib/components/template/utils.js.map +1 -0
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +6 -8
- package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +255 -202
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
- package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
- package/lib/components/widget/Attachment/Attachment.types.js +2 -0
- package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +2 -2
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +0 -2
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +1 -13
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +21 -16
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
- package/lib/hooks/useAfterInitialEffect.js.map +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/hooks/useFocusFirstField.d.ts.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stages.js","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,UAAU,MAAM,wBA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AC,YAAY,CAAC;QAClC,CAAC;aAAM,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC1B,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;QACpC,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC;QACjC,CAAC;QAED,OAAO,CACL,2BACG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,GAAG,CAAC,CAAC,CAAC,IAAI,EACvE,KAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,EAAC,SAAS,EAAE,QAAQ,YAC3E,KAAK,CAAC,IAAI,GACA,KAJJ,KAAK,CAKT,CACR,CAAC;IACJ,CAAC;IAED,SAAS,SAAS,CAAC,QAAQ;QACzB,OAAO,CACL,KAAC,WAAW,kBAAY,QAAQ,EAAC,SAAS,EAAE,KAAC,eAAe,IAAC,SAAS,EAAE,OAAO,CAAC,aAAa,GAAI,YAC9F,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;gBAC7B,OAAO,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAChC,CAAC,CAAC,GACU,CACf,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,YAItC,SAAS,CAAC,SAAS,CAAC,GAChB,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { Breadcrumbs, Card, Typography } from '@mui/material';\nimport DoubleArrowIcon from '@mui/icons-material/DoubleArrow';\nimport DoneIcon from '@mui/icons-material/Done';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface StagesProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n stages: any[];\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n completedStage: {\n color: theme.palette.text.primary\n },\n currentStage: {\n color: theme.palette.info.dark,\n fontWeight: 600\n },\n futureStage: {\n color: theme.palette.text.secondary\n },\n separatorIcon: {\n color: theme.palette.text.disabled\n }\n}));\n\n/**\n * API to filter out the alternate stages which are not in active and return all other stages\n * @param {Array} stages - Stages of a case type\n *\n * @returns {Array} - Returns stages which are non alternate stages and alternate stage which is active.\n */\nfunction getFilteredStages(stages) {\n if (!Array.isArray(stages)) {\n return [];\n }\n\n return stages.filter(stage => stage.type !== 'Alternate' || (stage.type === 'Alternate' && stage.visited_status === 'active'));\n}\n\n/* TODO - this component should be refactored and not exposed as top level DX Component -\n the stages should be created as part of the CaseView */\nexport default function Stages(props: StagesProps) {\n const classes = useStyles();\n\n const { getPConnect, stages } = props;\n const pConn = getPConnect();\n const localizationService = pConn.getLocalizationService();\n const filteredStages = getFilteredStages(stages);\n const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID, ''); // 2nd arg empty string until typedef allows optional\n const stagesObj = filteredStages.map((stage, index, arr) => {\n const theID = stage.ID || stage.id;\n return {\n name: localizationService.getLocalizedText(stage.name),\n id: theID,\n complete: stage.visited_status === 'completed',\n current: theID === currentStageID,\n last: index === arr.length - 1\n };\n });\n\n // debugging/investigation help\n // console.log(`Stages: current: ${currentStageID} stagesObj: ${JSON.stringify(stagesObj)}`);\n\n function getStage(stage, index) {\n // Removing nested ternary for lint\n // const theClass = stage.current ? classes.currentStage : (stage.complete ? classes.completedStage : classes.futureStage);\n let theClass;\n if (stage.current) {\n theClass = classes.currentStage;\n } else if (stage.complete) {\n theClass = classes.completedStage;\n } else {\n theClass = classes.futureStage;\n }\n\n return (\n <span key={index}>\n {stage.complete ? <DoneIcon color='disabled' fontSize='small' /> : null}\n <Typography variant='h5' component='span' display='inline' className={theClass}>\n {stage.name}\n </Typography>\n </span>\n );\n }\n\n function getStages(inStages) {\n return (\n <Breadcrumbs aria-label='stages' separator={<DoubleArrowIcon className={classes.separatorIcon} />}>\n {inStages.map((stage, index) => {\n return getStage(stage, index);\n })}\n </Breadcrumbs>\n );\n }\n\n return (\n <Card id='Stages' className={classes.root}>\n {/* Stages<br />\n currentStageID: {currentStageID}<br />\n {JSON.stringify(stagesObj)}<br /><br /> */}\n {getStages(stagesObj)}\n </Card>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createElement as _createElement } from "react";
|
|
3
|
-
import { useState, useEffect } from 'react';
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
4
|
import makeStyles from '@mui/styles/makeStyles';
|
|
5
5
|
import Tabs from '@mui/material/Tabs';
|
|
6
6
|
import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"VerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAQnF,+FAA+F;AAC/F,2FAA2F;AAC3F,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CA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EF,OAAO,CACL,cAAK,EAAE,EAAC,cAAc,YAEpB,KAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,IAAI,EAAE,WAAW,EAAC,UAAU,EAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,YACvF,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACpB,eAAC,oBAAoB,OAAK,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,GAAI,CACpE,CAAC,GACG,GACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport makeStyles from '@mui/styles/makeStyles';\nimport Tabs from '@mui/material/Tabs';\n\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\n\n// VerticalTabs does NOT have getPConnect. So, no need to extend from PConnProps\ninterface VerticalTabsProps {\n // If any, enter additional props that only exist on this component\n tabconfig: any[];\n}\n\n// The MuiTabs-indicator class is in a span whose parent is div (under the Tabs root component)\n// So, we're going to make the selected vertical tab indicator use a color from our theme.\nconst useStyles = makeStyles(theme => ({\n tabs: {\n '& div > span': {\n backgroundColor: theme.palette.info.dark,\n width: '3px'\n }\n }\n}));\n\n// Implementation of custom event inspired by:\n// https://betterprogramming.pub/master-your-react-skills-with-event-listeners-ebc01dde4fad\nconst createCustomEvent = (eventName: string, additionalData: { [key: string]: string }): CustomEvent | null => {\n if (window) {\n return new CustomEvent(eventName, {\n detail: { additionalData }\n });\n }\n\n return null;\n};\n\nexport default function VerticalTabs(props: VerticalTabsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const LeftAlignVerticalTab = getComponentFromMap('LeftAlignVerticalTabs');\n\n // Get a React warning when we use tabConfig as mixed case. So all lowercase tabconfig\n const { tabconfig = [] } = props;\n const classes = useStyles();\n const [value, setValue] = useState(0);\n\n useEffect(() => {\n const eventData = { itemClicked: value.toString() };\n const myEvent = createCustomEvent('VerticalTabClick', eventData);\n\n if (myEvent !== null) {\n document.dispatchEvent(myEvent);\n }\n }, [value]);\n\n const handleChange = (event: React.ChangeEvent<{}>, newValue: number) => {\n setValue(newValue);\n };\n\n return (\n <div id='VerticalTabs'>\n {/* VerticalTabs: {JSON.stringify(tabconfig)} */}\n <Tabs className={classes.tabs} orientation='vertical' value={value} onChange={handleChange}>\n {tabconfig.map(tab => (\n <LeftAlignVerticalTab {...props} label={tab.name} key={tab.name} />\n ))}\n </Tabs>\n </div>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { PConnProps } from '../../../types/PConnProps';
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
import './View.css';
|
|
4
4
|
interface ViewProps extends PConnProps {
|
|
5
5
|
template?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"View.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAI1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAI5D,OAAO,YAAY,CAAC;AAEpB,UAAU,SAAU,SAAQ,UAAU;IAEpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAuBD,iBAAwB,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,uDAsH/D;kBAtHuB,IAAI;;;eAAJ,IAAI"}
|
|
@@ -20,7 +20,8 @@ const NO_HEADER_TEMPLATES = [
|
|
|
20
20
|
'WideNarrowDetails',
|
|
21
21
|
'Confirmation',
|
|
22
22
|
'DynamicTabs',
|
|
23
|
-
'DetailsSubTabs'
|
|
23
|
+
'DetailsSubTabs',
|
|
24
|
+
'ListView'
|
|
24
25
|
];
|
|
25
26
|
export default function View(props) {
|
|
26
27
|
const { children, template, getPConnect, mode, visibility, name: pageName, type, title } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,oDAAoD;AAEpD,OAAO,YAAY,CAAC;AAepB,EAAE;AACF,qHAAqH;AACrH,uHAAuH;AACvH,+BAA+B;AAC/B,EAAE;AAEF,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AAC5F,MAAM,mBAAmB,GAAG;IAC1B,SAAS;IACT,aAAa;IACb,SAAS;IACT,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,gBAAgB;CACjB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAmC;IAC9D,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QA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,QAAQ,CAAC,cAAc,EAAE,CAAC;IAE/C,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,QAAQ,QAAQ,EAAE;QAChB,KAAK,aAAa;YAChB,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnC,gDAAgD;YAChD,MAAM,WAAW,GAAG;gBAClB,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;gBAC3B,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC;aAC9B,CAAC;YACF,OAAO,GAAG,QAAQ,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YACnD,MAAM;QAER,KAAK,SAAS;YACZ,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,MAAM;QAER;YACE,MAAM;KACT;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { PropsWithChildren, useEffect } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { getAllFields } from '../../helpers/template-utils';\nimport { PConnProps } from '../../../types/PConnProps';\n\n// Need to import any templates that we might render\n\nimport './View.css';\n\ninterface ViewProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n template?: string;\n label?: string;\n showLabel: boolean;\n mode?: string;\n title?: string;\n visibility?: boolean;\n name?: string;\n bInForm?: boolean;\n type?: any;\n}\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nconst FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide'];\nconst NO_HEADER_TEMPLATES = [\n 'SubTabs',\n 'SimpleTable',\n 'Details',\n 'DetailsTwoColumn',\n 'DetailsThreeColumn',\n 'NarrowWideDetails',\n 'WideNarrowDetails',\n 'Confirmation',\n 'DynamicTabs',\n 'DetailsSubTabs'\n];\n\nexport default function View(props: PropsWithChildren<ViewProps>) {\n const { children, template, getPConnect, mode, visibility, name: pageName, type, title } = props;\n let { label = '', showLabel = false } = props;\n const { PAGE_TYPES: { PAGE, LANDINGPAGE, LISTPAGE } = {}, MODAL } = PCore.getConstants();\n\n // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views\n // Putting this logic here instead of copy/paste in every Form template index.js\n\n const inheritedProps: any = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed\n label = inheritedProps.label || label;\n showLabel = inheritedProps.showLabel || showLabel;\n const localeUtils = PCore.getLocaleUtils();\n\n const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible\n if (isEmbeddedDataView && showLabel === undefined) {\n showLabel = true;\n }\n\n useEffect(() => {\n // Get the localized application label\n let applicationLabel = PCore.getEnvironmentInfo().getApplicationLabel();\n applicationLabel = localeUtils.getLocaleValue(`${applicationLabel}`, '', '');\n const caseInfo = getPConnect().getCaseInfo();\n const isAssignmentInCreateStage = caseInfo && caseInfo.isAssignmentInCreateStage();\n const isRenderingInModal = getPConnect().getContainerName().includes(MODAL);\n const isRenderingInPreviewPanel = getPConnect().getContainerName().includes('preview');\n\n /* If assignment is in create stage and rendering in modal don't update the title.\n Title will be updated on completion of create stage and when the assignment is rendered inline to the page.\n */\n const canUpdateTitle =\n !isRenderingInPreviewPanel &&\n (type === PAGE || type === LANDINGPAGE || type === LISTPAGE) &&\n !(isRenderingInModal && isAssignmentInCreateStage) &&\n PCore.getEnvironmentInfo().getRenderingMode() === 'FULL_PORTAL';\n // Incase of home route title is same as applicationLabel so setting to empty to just show applicationLabel\n let titleVar = title === applicationLabel ? '' : title;\n\n if (canUpdateTitle) {\n if (caseInfo) {\n const name = caseInfo.getName();\n const id = caseInfo.getBusinessID();\n titleVar = name && id ? `${name} (${id})` : titleVar;\n }\n document.title = titleVar ? `${titleVar} - ${applicationLabel}` : applicationLabel;\n }\n }, [type, title, getPConnect, PAGE, LANDINGPAGE, LISTPAGE]);\n\n const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n if (visibility === false) {\n return '';\n }\n\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n // JA - React SDK not using LazyComponentMap yet\n if (template /* && LazyComponentMap[template] */) {\n // const ViewTemplate = LazyComponentMap[template];\n const ViewTemplate: any = getComponentFromMap(template);\n\n if (template === 'ListView') {\n // special case for ListView - add in a prop\n const bInForm = true;\n props = { ...props, bInForm };\n }\n\n // for debugging/investigation\n // console.log(`View rendering template: ${template}`);\n\n // spreading because all props should go to the template\n let RenderedTemplate = (\n <ViewTemplate key={key} {...props}>\n {children}\n </ViewTemplate>\n );\n\n if (FORMTEMPLATES.includes(template) && showLabel) {\n // Original:\n // RenderedTemplate = (\n // <FieldGroup name={label} style={{ marginBlockStart: \"1rem\" }}>\n // {RenderedTemplate}\n // </FieldGroup>\n // );\n RenderedTemplate = (\n <div\n data-name='RenderedTemplate'\n data-template-type={template}\n /* name */ id='label'\n style={{ marginBlockStart: '1rem' }}\n className='grid-column'\n >\n {RenderedTemplate}\n </div>\n );\n }\n\n return (\n <div className='grid-column'>\n {showLabel && !NO_HEADER_TEMPLATES.includes(template) && (\n <div className='template-title-container'>\n <span>{label}</span>\n </div>\n )}\n {RenderedTemplate}\n </div>\n );\n }\n\n // debugging/investigation help\n // console.log(`View about to render React.Fragment for children: ${children}`);\n\n if (children) {\n return <>{children}</>;\n }\n\n return null;\n}\n\n// Adapted from Constellation DX Component to add in additional props for some templates\nView.additionalProps = (state, getPConnect) => {\n const thePConn = getPConnect();\n const { template } = thePConn.getConfigProps();\n\n let propObj = {};\n let allFields = {};\n\n switch (template) {\n case 'CaseSummary':\n allFields = getAllFields(thePConn);\n // eslint-disable-next-line no-case-declarations\n const unresFields = {\n primaryFields: allFields[0],\n secondaryFields: allFields[1]\n };\n propObj = thePConn.resolveConfigProps(unresFields);\n break;\n\n case 'Details':\n allFields = getAllFields(thePConn);\n propObj = { fields: allFields[0] };\n break;\n\n default:\n break;\n }\n\n return propObj;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"View.js","sourceRoot":"","sources":["../../../../src/components/infra/View/View.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA0B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,oDAAoD;AAEpD,OAAO,YAAY,CAAC;AAepB,EAAE;AACF,qHAAqH;AACrH,uHAAuH;AACvH,+BAA+B;AAC/B,EAAE;AAEF,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AAC5F,MAAM,mBAAmB,GAAG;IAC1B,SAAS;IACT,aAAa;IACb,SAAS;IACT,kBAAkB;IAClB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAmC;IAC9D,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACjG,IAAI,EAAE,KAAK,GAAG,EAAE,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IAC9C,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC;IAEzF,0HA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,CAAC,CAAC;YACnC,gDAAgD;YAChD,MAAM,WAAW,GAAG;gBAClB,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;gBAC3B,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC;aAC9B,CAAC;YACF,OAAO,GAAG,QAAQ,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YACnD,MAAM;QAER,KAAK,SAAS;YACZ,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,MAAM;QAER;YACE,MAAM;IACV,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { type PropsWithChildren, useEffect } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { getAllFields } from '../../helpers/template-utils';\nimport type { PConnProps } from '../../../types/PConnProps';\n\n// Need to import any templates that we might render\n\nimport './View.css';\n\ninterface ViewProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n template?: string;\n label?: string;\n showLabel: boolean;\n mode?: string;\n title?: string;\n visibility?: boolean;\n name?: string;\n bInForm?: boolean;\n type?: any;\n}\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nconst FORMTEMPLATES = ['OneColumn', 'TwoColumn', 'DefaultForm', 'WideNarrow', 'NarrowWide'];\nconst NO_HEADER_TEMPLATES = [\n 'SubTabs',\n 'SimpleTable',\n 'Details',\n 'DetailsTwoColumn',\n 'DetailsThreeColumn',\n 'NarrowWideDetails',\n 'WideNarrowDetails',\n 'Confirmation',\n 'DynamicTabs',\n 'DetailsSubTabs',\n 'ListView'\n];\n\nexport default function View(props: PropsWithChildren<ViewProps>) {\n const { children, template, getPConnect, mode, visibility, name: pageName, type, title } = props;\n let { label = '', showLabel = false } = props;\n const { PAGE_TYPES: { PAGE, LANDINGPAGE, LISTPAGE } = {}, MODAL } = PCore.getConstants();\n\n // Get the inherited props from the parent to determine label settings. For 8.6, this is only for embedded data form views\n // Putting this logic here instead of copy/paste in every Form template index.js\n\n const inheritedProps: any = getPConnect().getInheritedProps(); // try to remove any when getInheritedProps typedefs are fixed\n label = inheritedProps.label || label;\n showLabel = inheritedProps.showLabel || showLabel;\n const localeUtils = PCore.getLocaleUtils();\n\n const isEmbeddedDataView = mode === 'editable'; // would be better to check the reference child for `context` attribute if possible\n if (isEmbeddedDataView && showLabel === undefined) {\n showLabel = true;\n }\n\n useEffect(() => {\n // Get the localized application label\n let applicationLabel = PCore.getEnvironmentInfo().getApplicationLabel();\n applicationLabel = localeUtils.getLocaleValue(`${applicationLabel}`, '', '');\n const caseInfo = getPConnect().getCaseInfo();\n const isAssignmentInCreateStage = caseInfo && caseInfo.isAssignmentInCreateStage();\n const isRenderingInModal = getPConnect().getContainerName().includes(MODAL);\n const isRenderingInPreviewPanel = getPConnect().getContainerName().includes('preview');\n\n /* If assignment is in create stage and rendering in modal don't update the title.\n Title will be updated on completion of create stage and when the assignment is rendered inline to the page.\n */\n const canUpdateTitle =\n !isRenderingInPreviewPanel &&\n (type === PAGE || type === LANDINGPAGE || type === LISTPAGE) &&\n !(isRenderingInModal && isAssignmentInCreateStage) &&\n PCore.getEnvironmentInfo().getRenderingMode() === 'FULL_PORTAL';\n // Incase of home route title is same as applicationLabel so setting to empty to just show applicationLabel\n let titleVar = title === applicationLabel ? '' : title;\n\n if (canUpdateTitle) {\n if (caseInfo) {\n const name = caseInfo.getName();\n const id = caseInfo.getBusinessID();\n titleVar = name && id ? `${name} (${id})` : titleVar;\n }\n document.title = titleVar ? `${titleVar} - ${applicationLabel}` : applicationLabel;\n }\n }, [type, title, getPConnect, PAGE, LANDINGPAGE, LISTPAGE]);\n\n const key = `${getPConnect().getContextName()}_${getPConnect().getPageReference()}_${pageName}`;\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n if (visibility === false) {\n return '';\n }\n\n // As long as the template is defined in the dependencies of the view\n // it will be loaded, otherwise fall back to single column\n // JA - React SDK not using LazyComponentMap yet\n if (template /* && LazyComponentMap[template] */) {\n // const ViewTemplate = LazyComponentMap[template];\n const ViewTemplate: any = getComponentFromMap(template);\n\n if (template === 'ListView') {\n // special case for ListView - add in a prop\n const bInForm = true;\n props = { ...props, bInForm };\n }\n\n // for debugging/investigation\n // console.log(`View rendering template: ${template}`);\n\n // spreading because all props should go to the template\n let RenderedTemplate = (\n <ViewTemplate key={key} {...props}>\n {children}\n </ViewTemplate>\n );\n\n if (FORMTEMPLATES.includes(template) && showLabel) {\n // Original:\n // RenderedTemplate = (\n // <FieldGroup name={label} style={{ marginBlockStart: \"1rem\" }}>\n // {RenderedTemplate}\n // </FieldGroup>\n // );\n RenderedTemplate = (\n <div\n data-name='RenderedTemplate'\n data-template-type={template}\n /* name */ id='label'\n style={{ marginBlockStart: '1rem' }}\n className='grid-column'\n >\n {RenderedTemplate}\n </div>\n );\n }\n\n return (\n <div className='grid-column'>\n {showLabel && !NO_HEADER_TEMPLATES.includes(template) && (\n <div className='template-title-container'>\n <span>{label}</span>\n </div>\n )}\n {RenderedTemplate}\n </div>\n );\n }\n\n // debugging/investigation help\n // console.log(`View about to render React.Fragment for children: ${children}`);\n\n if (children) {\n return <>{children}</>;\n }\n\n return null;\n}\n\n// Adapted from Constellation DX Component to add in additional props for some templates\nView.additionalProps = (state, getPConnect) => {\n const thePConn = getPConnect();\n const { template } = thePConn.getConfigProps();\n\n let propObj = {};\n let allFields = {};\n\n switch (template) {\n case 'CaseSummary':\n allFields = getAllFields(thePConn);\n // eslint-disable-next-line no-case-declarations\n const unresFields = {\n primaryFields: allFields[0],\n secondaryFields: allFields[1]\n };\n propObj = thePConn.resolveConfigProps(unresFields);\n break;\n\n case 'Details':\n allFields = getAllFields(thePConn);\n propObj = { fields: allFields[0] };\n break;\n\n default:\n break;\n }\n\n return propObj;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdvancedSearch.d.ts","sourceRoot":"","sources":["../../../../src/components/template/AdvancedSearch/AdvancedSearch.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,KAAA,2CA+E3C"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useContext, useState } from 'react';
|
|
3
|
+
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
4
|
+
import DataReferenceAdvancedSearchContext from '../DataReference/DataReferenceAdvancedSearchContext';
|
|
5
|
+
import { getFirstChildConfig } from '../DataReference/utils';
|
|
6
|
+
export default function AdvancedSearch(props) {
|
|
7
|
+
const { getPConnect, targetObjectClass, localeReference } = props;
|
|
8
|
+
const SearchGroups = getComponentFromMap('SearchGroups');
|
|
9
|
+
const { dataReferenceConfigToChild, isCreateNewReferenceEnabled, disableStartingFieldsForReference, pyID, searchSelectCacheKey } = useContext(DataReferenceAdvancedSearchContext);
|
|
10
|
+
const { selectionMode, value: singleSelectFieldValue, readonlyContextList: multiSelectField } = dataReferenceConfigToChild;
|
|
11
|
+
let isSelectionExist = false;
|
|
12
|
+
const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;
|
|
13
|
+
if (selectionMode === MULTI) {
|
|
14
|
+
isSelectionExist = getPConnect().getValue(multiSelectField)?.length || false;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
isSelectionExist = getPConnect().getValue(singleSelectFieldValue) || false;
|
|
18
|
+
}
|
|
19
|
+
const [showRecords, setShowRecords] = useState(isSelectionExist);
|
|
20
|
+
const pConn = getPConnect();
|
|
21
|
+
const rawViewMetadata = pConn.getRawMetadata();
|
|
22
|
+
const searchFieldsSet = new Set();
|
|
23
|
+
const searchFields = [];
|
|
24
|
+
rawViewMetadata.config.searchGroups.forEach(group => {
|
|
25
|
+
group.children.forEach(child => {
|
|
26
|
+
if (!searchFieldsSet.has(child.config.value) && !child.config.validator) {
|
|
27
|
+
searchFields.push(child);
|
|
28
|
+
searchFieldsSet.add(child.config.value);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const firstChildPConnect = getPConnect().getChildren()[0].getPConnect;
|
|
33
|
+
const [firstChildMeta] = rawViewMetadata.children;
|
|
34
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
35
|
+
const cache = PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey) ?? {};
|
|
36
|
+
const editableFieldComp = firstChildPConnect().createComponent({
|
|
37
|
+
type: firstChildMeta.type,
|
|
38
|
+
config: {
|
|
39
|
+
...getFirstChildConfig({
|
|
40
|
+
firstChildMeta,
|
|
41
|
+
getPConnect,
|
|
42
|
+
rawViewMetadata,
|
|
43
|
+
contextClass: targetObjectClass,
|
|
44
|
+
dataReferenceConfigToChild,
|
|
45
|
+
isCreateNewReferenceEnabled,
|
|
46
|
+
disableStartingFieldsForReference,
|
|
47
|
+
pyID
|
|
48
|
+
}),
|
|
49
|
+
searchFields,
|
|
50
|
+
showRecords,
|
|
51
|
+
label: localizedVal('Search results', 'DataReference'),
|
|
52
|
+
searchSelectCacheKey,
|
|
53
|
+
cache
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const { selectionList, dataRelationshipContext } = editableFieldComp.props.getPConnect().getConfigProps();
|
|
57
|
+
const editableField = selectionMode === MULTI ? selectionList.substring(1) : dataRelationshipContext;
|
|
58
|
+
const searchGroupsProps = {
|
|
59
|
+
getPConnect,
|
|
60
|
+
editableField,
|
|
61
|
+
localeReference,
|
|
62
|
+
setShowRecords,
|
|
63
|
+
searchSelectCacheKey,
|
|
64
|
+
cache
|
|
65
|
+
};
|
|
66
|
+
return (_jsxs(_Fragment, { children: [_jsx(SearchGroups, { ...searchGroupsProps }), editableFieldComp] }));
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=AdvancedSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdvancedSearch.js","sourceRoot":"","sources":["../../../../src/components/template/AdvancedSearch/AdvancedSearch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,kCAAkC,MAAM,qDAAqD,CAAC;AACrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK;IAC1C,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAClE,MAAM,YAAY,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACzD,MAAM,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,iCAAiC,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,UAAU,CAC3I,kCAAkC,CAC5B,CAAC;IAET,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,GAAG,0BAA0B,CAAC;IAE3H,IAAI,gBAAgB,GAAG,KAAK,CAAC;IAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,YAAY,EAAE,CAAC,mBAAmB,CAAC;IAE3D,IAAI,aAAa,KAAK,KAAK,EAAE,CAAC;QAC5B,gBAAgB,GAAG,WAAW,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,IAAI,KAAK,CAAC;IAC/E,CAAC;SAAM,CAAC;QACN,gBAAgB,GAAG,WAAW,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC,IAAI,KAAK,CAAC;IAC7E,CAAC;IAED,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,G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A2B;gBAC3B,iCAAiC;gBACjC,IAAI;aACL,CAAC;YACF,YAAY;YACZ,WAAW;YACX,KAAK,EAAE,YAAY,CAAC,gBAAgB,EAAE,eAAe,CAAC;YACtD,oBAAoB;YACpB,KAAK;SACN;KACF,CAAC,CAAC;IAEH,MAAM,EAAE,aAAa,EAAE,uBAAuB,EAAE,GAAG,iBAAiB,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,CAAC;IAC1G,MAAM,aAAa,GAAG,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC;IAErG,MAAM,iBAAiB,GAAG;QACxB,WAAW;QACX,aAAa;QACb,eAAe;QACf,cAAc;QACd,oBAAoB;QACpB,KAAK;KACN,CAAC;IAEF,OAAO,CACL,8BACE,KAAC,YAAY,OAAK,iBAAiB,GAAI,EACtC,iBAAiB,IACjB,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { useContext, useState } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport DataReferenceAdvancedSearchContext from '../DataReference/DataReferenceAdvancedSearchContext';\nimport { getFirstChildConfig } from '../DataReference/utils';\n\nexport default function AdvancedSearch(props) {\n const { getPConnect, targetObjectClass, localeReference } = props;\n const SearchGroups = getComponentFromMap('SearchGroups');\n const { dataReferenceConfigToChild, isCreateNewReferenceEnabled, disableStartingFieldsForReference, pyID, searchSelectCacheKey } = useContext(\n DataReferenceAdvancedSearchContext\n ) as any;\n\n const { selectionMode, value: singleSelectFieldValue, readonlyContextList: multiSelectField } = dataReferenceConfigToChild;\n\n let isSelectionExist = false;\n const { MULTI } = PCore.getConstants().LIST_SELECTION_MODE;\n\n if (selectionMode === MULTI) {\n isSelectionExist = getPConnect().getValue(multiSelectField)?.length || false;\n } else {\n isSelectionExist = getPConnect().getValue(singleSelectFieldValue) || false;\n }\n\n const [showRecords, setShowRecords] = useState(isSelectionExist);\n\n const pConn = getPConnect();\n const rawViewMetadata = pConn.getRawMetadata();\n\n const searchFieldsSet = new Set();\n const searchFields: any = [];\n rawViewMetadata.config.searchGroups.forEach(group => {\n group.children.forEach(child => {\n if (!searchFieldsSet.has(child.config.value) && !child.config.validator) {\n searchFields.push(child);\n searchFieldsSet.add(child.config.value);\n }\n });\n });\n\n const firstChildPConnect = getPConnect().getChildren()[0].getPConnect;\n const [firstChildMeta] = rawViewMetadata.children;\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const cache = PCore.getNavigationUtils().getComponentCache(searchSelectCacheKey) ?? {};\n\n const editableFieldComp = firstChildPConnect().createComponent({\n type: firstChildMeta.type,\n config: {\n ...getFirstChildConfig({\n firstChildMeta,\n getPConnect,\n rawViewMetadata,\n contextClass: targetObjectClass,\n dataReferenceConfigToChild,\n isCreateNewReferenceEnabled,\n disableStartingFieldsForReference,\n pyID\n }),\n searchFields,\n showRecords,\n label: localizedVal('Search results', 'DataReference'),\n searchSelectCacheKey,\n cache\n }\n });\n\n const { selectionList, dataRelationshipContext } = editableFieldComp.props.getPConnect().getConfigProps();\n const editableField = selectionMode === MULTI ? selectionList.substring(1) : dataRelationshipContext;\n\n const searchGroupsProps = {\n getPConnect,\n editableField,\n localeReference,\n setShowRecords,\n searchSelectCacheKey,\n cache\n };\n\n return (\n <>\n <SearchGroups {...searchGroupsProps} />\n {editableFieldComp}\n </>\n );\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const getComponentStateOptions: (getPConnect: any) => {
|
|
2
|
+
clearOnCancelForContext: any;
|
|
3
|
+
};
|
|
4
|
+
interface SearchCategory {
|
|
5
|
+
selectedCategory: string;
|
|
6
|
+
}
|
|
7
|
+
interface SearchGroup {
|
|
8
|
+
searchFields: unknown;
|
|
9
|
+
activeGroupId: string;
|
|
10
|
+
}
|
|
11
|
+
declare const componentCachePersistUtils: {
|
|
12
|
+
getComponentStateKey: (getPConnect: any, propertyName: string) => string;
|
|
13
|
+
getComponentStateOptions: (getPConnect: any) => {
|
|
14
|
+
clearOnCancelForContext: any;
|
|
15
|
+
};
|
|
16
|
+
setComponentCache: ({ cacheKey, state, options }: {
|
|
17
|
+
cacheKey: string;
|
|
18
|
+
state: SearchCategory | SearchGroup;
|
|
19
|
+
options: ReturnType<typeof getComponentStateOptions>;
|
|
20
|
+
}) => void;
|
|
21
|
+
};
|
|
22
|
+
export default componentCachePersistUtils;
|
|
23
|
+
//# sourceMappingURL=persistUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroup/persistUtils.ts"],"names":[],"mappings":"AAgBA,QAAA,MAAM,wBAAwB,GAAG,gBAAW;;CAE3C,CAAC;AAEF,UAAU,cAAc;IAEtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,WAAW;IAEnB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAgBD,QAAA,MAAM,0BAA0B;2DAzCyB,MAAM;;;;sDA+B5D;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,cAAc,GAAG,WAAW,CAAC;QACpC,OAAO,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;KACtD;CAUA,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Utils } from '../../../helpers/utils';
|
|
2
|
+
const SKIP_CACHE_KEY = '';
|
|
3
|
+
const getComponentStateKey = (getPConnect, propertyName) => {
|
|
4
|
+
const pConnect = getPConnect();
|
|
5
|
+
const caseID = `.${Utils.getMappedKey('pyID')}`; // Enhance this later when use-case arrives for data objects using S&S.
|
|
6
|
+
const resolvedCaseID = pConnect.getValue(caseID);
|
|
7
|
+
if (!resolvedCaseID) {
|
|
8
|
+
return SKIP_CACHE_KEY;
|
|
9
|
+
}
|
|
10
|
+
return `Search-${resolvedCaseID}-${pConnect.getPageReference()}-${propertyName}-${pConnect.getCurrentView()}`;
|
|
11
|
+
};
|
|
12
|
+
const getComponentStateOptions = getPConnect => {
|
|
13
|
+
return { clearOnCancelForContext: getPConnect().getContextName() };
|
|
14
|
+
};
|
|
15
|
+
const setComponentCache = ({ cacheKey, state, options }) => {
|
|
16
|
+
if (cacheKey !== SKIP_CACHE_KEY) {
|
|
17
|
+
PCore.getNavigationUtils().setComponentCache(cacheKey, state, options);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const componentCachePersistUtils = {
|
|
21
|
+
getComponentStateKey,
|
|
22
|
+
getComponentStateOptions,
|
|
23
|
+
setComponentCache
|
|
24
|
+
};
|
|
25
|
+
export default componentCachePersistUtils;
|
|
26
|
+
//# sourceMappingURL=persistUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistUtils.js","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroup/persistUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,oBAAoB,GAAG,CAAC,WAAW,EAAE,YAAoB,EAAE,EAAE;IACjE,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,uEAAuE;IACxH,MAAM,cAAc,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjD,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,OAAO,UAAU,cAAc,IAAI,QAAQ,CAAC,gBAAgB,EAAE,IAAI,YAAY,IAAI,QAAQ,CAAC,cAAc,EAAE,EAAE,CAAC;AAChH,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,WAAW,CAAC,EAAE;IAC7C,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,CAAC,cAAc,EAAE,EAAE,CAAC;AACrE,CAAC,CAAC;AAaF,MAAM,iBAAiB,GAAG,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,OAAO,EAKR,EAAE,EAAE;IACH,IAAI,QAAQ,KAAK,cAAc,EAAE,CAAC;QAC/B,KAAK,CAAC,kBAAkB,EAAU,CAAC,iBAAiB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG;IACjC,oBAAoB;IACpB,wBAAwB;IACxB,iBAAiB;CAClB,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["import { Utils } from '../../../helpers/utils';\n\nconst SKIP_CACHE_KEY = '';\n\nconst getComponentStateKey = (getPConnect, propertyName: string) => {\n const pConnect = getPConnect();\n const caseID = `.${Utils.getMappedKey('pyID')}`; // Enhance this later when use-case arrives for data objects using S&S.\n const resolvedCaseID = pConnect.getValue(caseID);\n\n if (!resolvedCaseID) {\n return SKIP_CACHE_KEY;\n }\n\n return `Search-${resolvedCaseID}-${pConnect.getPageReference()}-${propertyName}-${pConnect.getCurrentView()}`;\n};\n\nconst getComponentStateOptions = getPConnect => {\n return { clearOnCancelForContext: getPConnect().getContextName() };\n};\n\ninterface SearchCategory {\n // tabId of search category selected\n selectedCategory: string;\n}\n\ninterface SearchGroup {\n // searchFields can be any object based on what fields are authored.\n searchFields: unknown;\n activeGroupId: string;\n}\n\nconst setComponentCache = ({\n cacheKey,\n state,\n options\n}: {\n cacheKey: string;\n state: SearchCategory | SearchGroup;\n options: ReturnType<typeof getComponentStateOptions>;\n}) => {\n if (cacheKey !== SKIP_CACHE_KEY) {\n (PCore.getNavigationUtils() as any).setComponentCache(cacheKey, state, options);\n }\n};\n\nconst componentCachePersistUtils = {\n getComponentStateKey,\n getComponentStateOptions,\n setComponentCache\n};\n\nexport default componentCachePersistUtils;\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const initializeSearchFields: (searchFields: any, getPConnect: any, referenceListClassID: any, searchFieldRestoreValues?: {}) => {};
|
|
2
|
+
export default function SearchGroups(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=SearchGroups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchGroups.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,sBAAsB,GAAI,iBAAY,EAAE,gBAAW,EAAE,yBAAoB,EAAE,6BAA6B,OAmCpH,CAAC;AAmBF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,KAAA,2CAmLzC"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { Button, Grid2, Select, MenuItem, Box } from '@mui/material';
|
|
4
|
+
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
|
+
import TemplateContext from '../TemplateContext';
|
|
6
|
+
import componentCachePersistUtils from '../SearchGroup/persistUtils';
|
|
7
|
+
import { getCacheInfo, isValidInput } from './utils';
|
|
8
|
+
import { useCacheWhenListViewReady } from './hooks';
|
|
9
|
+
export const initializeSearchFields = (searchFields, getPConnect, referenceListClassID, searchFieldRestoreValues = {}) => {
|
|
10
|
+
const filtersProperties = {};
|
|
11
|
+
searchFields.forEach(field => {
|
|
12
|
+
let val = '';
|
|
13
|
+
const { value, defaultValue = '' } = field.config;
|
|
14
|
+
const propPath = PCore.getAnnotationUtils().getPropertyName(value);
|
|
15
|
+
if (searchFieldRestoreValues[propPath]) {
|
|
16
|
+
val = searchFieldRestoreValues[propPath];
|
|
17
|
+
}
|
|
18
|
+
else if (PCore.getAnnotationUtils().isProperty(defaultValue)) {
|
|
19
|
+
val = getPConnect().getValue(defaultValue.split(' ')[1]);
|
|
20
|
+
}
|
|
21
|
+
else if (defaultValue.startsWith('@L')) {
|
|
22
|
+
val = defaultValue.split(' ')[1];
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
val = defaultValue;
|
|
26
|
+
}
|
|
27
|
+
filtersProperties[propPath] = val;
|
|
28
|
+
const valueSplit = value.split('@P ')[1]?.split('.').filter(Boolean) ?? [];
|
|
29
|
+
valueSplit.pop();
|
|
30
|
+
if (valueSplit.length) {
|
|
31
|
+
let path = '';
|
|
32
|
+
let currentClassID = referenceListClassID;
|
|
33
|
+
valueSplit.forEach(item => {
|
|
34
|
+
path = path.length ? `${path}.${item}` : item;
|
|
35
|
+
currentClassID = PCore.getMetadataUtils().getPropertyMetadata(item, currentClassID).pageClass;
|
|
36
|
+
if (currentClassID) {
|
|
37
|
+
filtersProperties[`${path}.classID`] = currentClassID;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return filtersProperties;
|
|
43
|
+
};
|
|
44
|
+
const flattenObj = obj => {
|
|
45
|
+
const result = {};
|
|
46
|
+
Object.keys(obj).forEach(key => {
|
|
47
|
+
if (!['context_data', 'pageInstructions'].includes(key)) {
|
|
48
|
+
if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {
|
|
49
|
+
const temp = flattenObj(obj[key]);
|
|
50
|
+
Object.keys(temp).forEach(nestedKey => {
|
|
51
|
+
result[`${key}.${nestedKey}`] = temp[nestedKey];
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
result[key] = obj[key];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return result;
|
|
60
|
+
};
|
|
61
|
+
export default function SearchGroups(props) {
|
|
62
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
63
|
+
const { getPConnect, editableField, localeReference, setShowRecords, searchSelectCacheKey, cache } = props;
|
|
64
|
+
const referenceFieldName = editableField.replaceAll('.', '_');
|
|
65
|
+
const state = useRef({ searchFields: {}, activeGroupId: '' }).current;
|
|
66
|
+
const options = componentCachePersistUtils.getComponentStateOptions(getPConnect);
|
|
67
|
+
const { searchGroups: groups, referenceList } = getPConnect().getConfigProps();
|
|
68
|
+
const { useCache, initialActiveGroupId } = getCacheInfo(cache, groups);
|
|
69
|
+
const [activeGroupId, setActiveGroupId] = useState(initialActiveGroupId);
|
|
70
|
+
const [transientItemID, setTransientItemID] = useState(null);
|
|
71
|
+
const [previousFormValues, setPreviousFormValues] = useState(null);
|
|
72
|
+
const viewName = getPConnect().getCurrentView();
|
|
73
|
+
const rawGroupsConfig = getPConnect().getRawConfigProps().searchGroups;
|
|
74
|
+
const activeGroupIndex = groups.findIndex(group => group.config.id === activeGroupId);
|
|
75
|
+
const { children: searchFieldsChildren = [] } = activeGroupIndex !== -1 ? rawGroupsConfig[activeGroupIndex] : {};
|
|
76
|
+
const searchFields = searchFieldsChildren.map(field => ({
|
|
77
|
+
...field,
|
|
78
|
+
config: { ...field.config, isSearchField: true }
|
|
79
|
+
}));
|
|
80
|
+
const searchByRef = useRef(null);
|
|
81
|
+
const searchFieldsRef = useRef(null);
|
|
82
|
+
const isValidatorField = searchFields.some(field => field.config.validator);
|
|
83
|
+
const { classID: referenceListClassID } = PCore.getMetadataUtils().getDataPageMetadata(referenceList);
|
|
84
|
+
const initialSearchFields = useMemo(() => initializeSearchFields(searchFields, getPConnect, referenceListClassID, useCache && cache.activeGroupId === activeGroupId ? cache.searchFields : {}), [activeGroupId, getPConnect, cache.searchFields]);
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
if (transientItemID) {
|
|
87
|
+
const filtersWithClassID = {
|
|
88
|
+
...initialSearchFields,
|
|
89
|
+
classID: referenceListClassID
|
|
90
|
+
};
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
PCore.getContainerUtils().replaceTransientData({ transientItemID, data: filtersWithClassID });
|
|
93
|
+
}
|
|
94
|
+
}, [activeGroupId]);
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
const filtersWithClassID = {
|
|
97
|
+
...initialSearchFields,
|
|
98
|
+
classID: referenceListClassID
|
|
99
|
+
};
|
|
100
|
+
const transientId = getPConnect()
|
|
101
|
+
.getContainerManager()
|
|
102
|
+
.addTransientItem({ id: `${referenceFieldName}-${viewName}`, data: filtersWithClassID });
|
|
103
|
+
setTransientItemID(transientId);
|
|
104
|
+
}, []);
|
|
105
|
+
const getFilterData = useCallback(() => {
|
|
106
|
+
// @ts-ignore
|
|
107
|
+
let changes = PCore.getFormUtils().getSubmitData(transientItemID, {
|
|
108
|
+
isTransientContext: true,
|
|
109
|
+
includeDisabledFields: true
|
|
110
|
+
});
|
|
111
|
+
if (Object.keys(cache.searchFields ?? {}).length > 0 && Object.keys(changes).length === 1) {
|
|
112
|
+
changes = cache.searchFields;
|
|
113
|
+
}
|
|
114
|
+
const formValues = flattenObj(changes);
|
|
115
|
+
if (!PCore.isDeepEqual(previousFormValues, formValues) && PCore.getFormUtils().isFormValid(transientItemID) && isValidInput(formValues)) {
|
|
116
|
+
if (isValidatorField) {
|
|
117
|
+
// @ts-ignore
|
|
118
|
+
PCore.getMessageManager().clearContextMessages({ context: transientItemID });
|
|
119
|
+
}
|
|
120
|
+
setPreviousFormValues(formValues);
|
|
121
|
+
setShowRecords(true);
|
|
122
|
+
PCore.getPubSubUtils().publish(PCore.getEvents().getTransientEvent().UPDATE_PROMOTED_FILTERS, {
|
|
123
|
+
payload: formValues,
|
|
124
|
+
showRecords: true,
|
|
125
|
+
viewName
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
state.activeGroupId = activeGroupId;
|
|
129
|
+
state.searchFields = changes;
|
|
130
|
+
state.selectedCategory = viewName;
|
|
131
|
+
componentCachePersistUtils.setComponentCache({ cacheKey: searchSelectCacheKey, state, options });
|
|
132
|
+
}, [transientItemID, setShowRecords, viewName, activeGroupId, previousFormValues]);
|
|
133
|
+
const resetFilterData = useCallback(() => {
|
|
134
|
+
// @ts-ignore
|
|
135
|
+
PCore.getNavigationUtils().resetComponentCache(searchSelectCacheKey);
|
|
136
|
+
const resetPayload = {
|
|
137
|
+
transientItemID,
|
|
138
|
+
data: initializeSearchFields(searchFields, getPConnect, referenceListClassID),
|
|
139
|
+
options: { reset: true }
|
|
140
|
+
};
|
|
141
|
+
// @ts-ignore
|
|
142
|
+
PCore.getContainerUtils().updateTransientData(resetPayload);
|
|
143
|
+
}, [transientItemID, initialSearchFields]);
|
|
144
|
+
useCacheWhenListViewReady(cache, viewName, useCache, getFilterData, searchSelectCacheKey);
|
|
145
|
+
const searchDropdown = groups.length > 1 && (_jsx(Grid2, { container: true, spacing: 2, children: _jsx(Select, { value: activeGroupId, onChange: e => setActiveGroupId(e.target.value), ref: searchByRef, fullWidth: true, children: groups.map(group => (_jsx(MenuItem, { value: group.config.id, children: group.config.label }, group.config.id))) }) }));
|
|
146
|
+
const actionButtons = (_jsxs(Box, { display: 'flex', gap: 2, children: [_jsx(Button, { variant: 'outlined', onClick: resetFilterData, children: localizedVal('Reset', 'SimpleTable') }), _jsx(Button, { variant: 'contained', onClick: getFilterData, children: localizedVal('Search', 'SimpleTable') })] }));
|
|
147
|
+
const searchFieldsViewConfig = {
|
|
148
|
+
name: 'SearchFields',
|
|
149
|
+
type: 'View',
|
|
150
|
+
config: {
|
|
151
|
+
template: 'DefaultForm',
|
|
152
|
+
NumCols: '3',
|
|
153
|
+
contextName: transientItemID,
|
|
154
|
+
readOnly: false,
|
|
155
|
+
context: transientItemID,
|
|
156
|
+
localeReference
|
|
157
|
+
},
|
|
158
|
+
children: [
|
|
159
|
+
{
|
|
160
|
+
name: 'Fields',
|
|
161
|
+
type: 'Region',
|
|
162
|
+
children: searchFields
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
};
|
|
166
|
+
const searchFieldsC11nEnv = PCore.createPConnect({
|
|
167
|
+
meta: searchFieldsViewConfig,
|
|
168
|
+
options: {
|
|
169
|
+
hasForm: true,
|
|
170
|
+
contextName: transientItemID
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
const templateContext = useContext(TemplateContext);
|
|
174
|
+
const templateContextValue = useMemo(() => ({ ...templateContext, outerColumnCount: undefined }), []);
|
|
175
|
+
const searchFieldsViewComp = transientItemID ? (_jsx(TemplateContext.Provider, { value: templateContextValue, children: _jsx("div", { ref: searchFieldsRef, children: createElement(createPConnectComponent(), { ...searchFieldsC11nEnv }) }) })) : null;
|
|
176
|
+
const childrenToRender = [searchDropdown, searchFieldsViewComp, actionButtons];
|
|
177
|
+
return (_jsx(Box, { display: 'flex', flexDirection: 'column', gap: 2, children: childrenToRender.map((child, index) => (_jsx(React.Fragment, { children: child }, index))) }));
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=SearchGroups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchGroups.js","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/SearchGroups.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5G,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,0BAA0B,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,CAAC,M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,EAAE,QAAQ;gBACd,QAAQ,EAAE,YAAY;aACvB;SACF;KACF,CAAC;IAEF,MAAM,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC;QAC/C,IAAI,EAAE,sBAAsB;QAC5B,OAAO,EAAE;YACP,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,eAAe;SAC7B;KACF,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IACpD,MAAM,oBAAoB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,eAAe,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEtG,MAAM,oBAAoB,GAAG,eAAe,CAAC,CAAC,CAAC,CAC7C,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,oBAAoB,YACnD,cAAK,GAAG,EAAE,eAAe,YAAG,aAAa,CAAC,uBAAuB,EAAE,EAAE,EAAE,GAAG,mBAAmB,EAAE,CAAC,GAAO,GAC9E,CAC5B,CAAC,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,gBAAgB,GAAG,CAAC,cAAc,EAAE,oBAAoB,EAAE,aAAa,CAAC,CAAC;IAE/E,OAAO,CACL,KAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,aAAa,EAAC,QAAQ,EAAC,GAAG,EAAE,CAAC,YAC9C,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CACtC,KAAC,KAAK,CAAC,QAAQ,cAAc,KAAK,IAAb,KAAK,CAA0B,CACrD,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React, { createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { Button, Grid2, Select, MenuItem, Box } from '@mui/material';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport TemplateContext from '../TemplateContext';\nimport componentCachePersistUtils from '../SearchGroup/persistUtils';\n\nimport { getCacheInfo, isValidInput } from './utils';\nimport { useCacheWhenListViewReady } from './hooks';\n\nexport const initializeSearchFields = (searchFields, getPConnect, referenceListClassID, searchFieldRestoreValues = {}) => {\n const filtersProperties = {};\n searchFields.forEach(field => {\n let val = '';\n const { value, defaultValue = '' } = field.config;\n const propPath = PCore.getAnnotationUtils().getPropertyName(value);\n\n if (searchFieldRestoreValues[propPath]) {\n val = searchFieldRestoreValues[propPath];\n } else if (PCore.getAnnotationUtils().isProperty(defaultValue)) {\n val = getPConnect().getValue(defaultValue.split(' ')[1]);\n } else if (defaultValue.startsWith('@L')) {\n val = defaultValue.split(' ')[1];\n } else {\n val = defaultValue;\n }\n\n filtersProperties[propPath] = val;\n\n const valueSplit = value.split('@P ')[1]?.split('.').filter(Boolean) ?? [];\n valueSplit.pop();\n\n if (valueSplit.length) {\n let path = '';\n let currentClassID = referenceListClassID;\n valueSplit.forEach(item => {\n path = path.length ? `${path}.${item}` : item;\n currentClassID = (PCore.getMetadataUtils().getPropertyMetadata(item, currentClassID) as any).pageClass;\n if (currentClassID) {\n filtersProperties[`${path}.classID`] = currentClassID;\n }\n });\n }\n });\n return filtersProperties;\n};\n\nconst flattenObj = obj => {\n const result = {};\n Object.keys(obj).forEach(key => {\n if (!['context_data', 'pageInstructions'].includes(key)) {\n if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {\n const temp = flattenObj(obj[key]);\n Object.keys(temp).forEach(nestedKey => {\n result[`${key}.${nestedKey}`] = temp[nestedKey];\n });\n } else {\n result[key] = obj[key];\n }\n }\n });\n return result;\n};\n\nexport default function SearchGroups(props) {\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const { getPConnect, editableField, localeReference, setShowRecords, searchSelectCacheKey, cache } = props;\n const referenceFieldName = editableField.replaceAll('.', '_');\n\n const state: any = useRef({ searchFields: {}, activeGroupId: '' }).current;\n const options = componentCachePersistUtils.getComponentStateOptions(getPConnect);\n\n const { searchGroups: groups, referenceList } = getPConnect().getConfigProps();\n const { useCache, initialActiveGroupId } = getCacheInfo(cache, groups);\n const [activeGroupId, setActiveGroupId] = useState(initialActiveGroupId);\n const [transientItemID, setTransientItemID] = useState<any>(null);\n const [previousFormValues, setPreviousFormValues] = useState<any>(null);\n const viewName = getPConnect().getCurrentView();\n\n const rawGroupsConfig = getPConnect().getRawConfigProps().searchGroups;\n const activeGroupIndex = groups.findIndex(group => group.config.id === activeGroupId);\n const { children: searchFieldsChildren = [] } = activeGroupIndex !== -1 ? rawGroupsConfig[activeGroupIndex] : {};\n const searchFields = searchFieldsChildren.map(field => ({\n ...field,\n config: { ...field.config, isSearchField: true }\n }));\n\n const searchByRef = useRef(null);\n const searchFieldsRef = useRef(null);\n const isValidatorField = searchFields.some(field => field.config.validator);\n const { classID: referenceListClassID } = PCore.getMetadataUtils().getDataPageMetadata(referenceList) as any;\n\n const initialSearchFields = useMemo(\n () =>\n initializeSearchFields(\n searchFields,\n getPConnect,\n referenceListClassID,\n useCache && cache.activeGroupId === activeGroupId ? cache.searchFields : {}\n ),\n [activeGroupId, getPConnect, cache.searchFields]\n );\n\n useEffect(() => {\n if (transientItemID) {\n const filtersWithClassID = {\n ...initialSearchFields,\n classID: referenceListClassID\n };\n // @ts-ignore\n PCore.getContainerUtils().replaceTransientData({ transientItemID, data: filtersWithClassID });\n }\n }, [activeGroupId]);\n\n useEffect(() => {\n const filtersWithClassID = {\n ...initialSearchFields,\n classID: referenceListClassID\n };\n\n const transientId = getPConnect()\n .getContainerManager()\n .addTransientItem({ id: `${referenceFieldName}-${viewName}`, data: filtersWithClassID });\n setTransientItemID(transientId);\n }, []);\n\n const getFilterData = useCallback(() => {\n // @ts-ignore\n let changes = PCore.getFormUtils().getSubmitData(transientItemID, {\n isTransientContext: true,\n includeDisabledFields: true\n });\n\n if (Object.keys(cache.searchFields ?? {}).length > 0 && Object.keys(changes).length === 1) {\n changes = cache.searchFields;\n }\n\n const formValues = flattenObj(changes);\n\n if (!PCore.isDeepEqual(previousFormValues, formValues) && PCore.getFormUtils().isFormValid(transientItemID) && isValidInput(formValues)) {\n if (isValidatorField) {\n // @ts-ignore\n PCore.getMessageManager().clearContextMessages({ context: transientItemID });\n }\n setPreviousFormValues(formValues);\n setShowRecords(true);\n PCore.getPubSubUtils().publish(PCore.getEvents().getTransientEvent().UPDATE_PROMOTED_FILTERS, {\n payload: formValues,\n showRecords: true,\n viewName\n });\n }\n\n state.activeGroupId = activeGroupId;\n state.searchFields = changes;\n state.selectedCategory = viewName;\n\n componentCachePersistUtils.setComponentCache({ cacheKey: searchSelectCacheKey, state, options });\n }, [transientItemID, setShowRecords, viewName, activeGroupId, previousFormValues]);\n\n const resetFilterData = useCallback(() => {\n // @ts-ignore\n PCore.getNavigationUtils().resetComponentCache(searchSelectCacheKey);\n const resetPayload = {\n transientItemID,\n data: initializeSearchFields(searchFields, getPConnect, referenceListClassID),\n options: { reset: true }\n };\n // @ts-ignore\n PCore.getContainerUtils().updateTransientData(resetPayload);\n }, [transientItemID, initialSearchFields]);\n\n useCacheWhenListViewReady(cache, viewName, useCache, getFilterData, searchSelectCacheKey);\n\n const searchDropdown = groups.length > 1 && (\n <Grid2 container spacing={2}>\n <Select value={activeGroupId} onChange={e => setActiveGroupId(e.target.value)} ref={searchByRef} fullWidth>\n {groups.map(group => (\n <MenuItem key={group.config.id} value={group.config.id}>\n {group.config.label}\n </MenuItem>\n ))}\n </Select>\n </Grid2>\n );\n\n const actionButtons = (\n <Box display='flex' gap={2}>\n <Button variant='outlined' onClick={resetFilterData}>\n {localizedVal('Reset', 'SimpleTable')}\n </Button>\n <Button variant='contained' onClick={getFilterData}>\n {localizedVal('Search', 'SimpleTable')}\n </Button>\n </Box>\n );\n\n const searchFieldsViewConfig = {\n name: 'SearchFields',\n type: 'View',\n config: {\n template: 'DefaultForm',\n NumCols: '3',\n contextName: transientItemID,\n readOnly: false,\n context: transientItemID,\n localeReference\n },\n children: [\n {\n name: 'Fields',\n type: 'Region',\n children: searchFields\n }\n ]\n };\n\n const searchFieldsC11nEnv = PCore.createPConnect({\n meta: searchFieldsViewConfig,\n options: {\n hasForm: true,\n contextName: transientItemID\n }\n });\n\n const templateContext = useContext(TemplateContext);\n const templateContextValue = useMemo(() => ({ ...templateContext, outerColumnCount: undefined }), []);\n\n const searchFieldsViewComp = transientItemID ? (\n <TemplateContext.Provider value={templateContextValue}>\n <div ref={searchFieldsRef}>{createElement(createPConnectComponent(), { ...searchFieldsC11nEnv })}</div>\n </TemplateContext.Provider>\n ) : null;\n\n const childrenToRender = [searchDropdown, searchFieldsViewComp, actionButtons];\n\n return (\n <Box display='flex' flexDirection='column' gap={2}>\n {childrenToRender.map((child, index) => (\n <React.Fragment key={index}>{child}</React.Fragment>\n ))}\n </Box>\n );\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This hook registers a callback for the whenever list view component is ready
|
|
3
|
+
* then makes a call to get the data using the search fields pre-filled with cache data.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useCacheWhenListViewReady(cache: {
|
|
6
|
+
searchFields: unknown;
|
|
7
|
+
}, viewName: string, useCache: boolean, getFilterData: (params: {
|
|
8
|
+
isCalledFromCache: boolean;
|
|
9
|
+
}) => void, searchSelectCacheKey: string): void;
|
|
10
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/hooks.ts"],"names":[],"mappings":"AAOA;;;GAGG;AAEH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,EAChC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EACjB,aAAa,EAAE,CAAC,MAAM,EAAE;IAAE,iBAAiB,EAAE,OAAO,CAAA;CAAE,KAAK,IAAI,EAC/D,oBAAoB,EAAE,MAAM,QAmB7B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
const listViewConstants = {
|
|
3
|
+
EVENTS: {
|
|
4
|
+
LIST_VIEW_READY: 'LIST_VIEW_READY'
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* This hook registers a callback for the whenever list view component is ready
|
|
9
|
+
* then makes a call to get the data using the search fields pre-filled with cache data.
|
|
10
|
+
*/
|
|
11
|
+
export function useCacheWhenListViewReady(cache, viewName, useCache, getFilterData, searchSelectCacheKey) {
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (Object.keys(cache.searchFields ?? {}).length > 0) {
|
|
14
|
+
PCore.getPubSubUtils().subscribe(listViewConstants.EVENTS.LIST_VIEW_READY, ({ viewName: viewNameFromListView }) => {
|
|
15
|
+
if (viewNameFromListView === viewName && useCache) {
|
|
16
|
+
getFilterData({ isCalledFromCache: true });
|
|
17
|
+
}
|
|
18
|
+
}, `${searchSelectCacheKey}-listview-ready`);
|
|
19
|
+
}
|
|
20
|
+
return () => {
|
|
21
|
+
PCore.getPubSubUtils().unsubscribe(listViewConstants.EVENTS.LIST_VIEW_READY, `${searchSelectCacheKey}-listview-ready`);
|
|
22
|
+
};
|
|
23
|
+
}, []);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,iBAAiB,GAAG;IACxB,MAAM,EAAE;QACN,eAAe,EAAE,iBAAiB;KACnC;CACF,CAAC;AACF;;;GAGG;AAEH,MAAM,UAAU,yBAAyB,CACvC,KAAgC,EAChC,QAAgB,EAChB,QAAiB,EACjB,aAA+D,EAC/D,oBAA4B;IAE5B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrD,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,CAC9B,iBAAiB,CAAC,MAAM,CAAC,eAAe,EACxC,CAAC,EAAE,QAAQ,EAAE,oBAAoB,EAAwB,EAAE,EAAE;gBAC3D,IAAI,oBAAoB,KAAK,QAAQ,IAAI,QAAQ,EAAE,CAAC;oBAClD,aAAa,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC,EACD,GAAG,oBAAoB,iBAAiB,CACzC,CAAC;QACJ,CAAC;QAED,OAAO,GAAG,EAAE;YACV,KAAK,CAAC,cAAc,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,oBAAoB,iBAAiB,CAAC,CAAC;QACzH,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC","sourcesContent":["import { useEffect } from 'react';\n\nconst listViewConstants = {\n EVENTS: {\n LIST_VIEW_READY: 'LIST_VIEW_READY'\n }\n};\n/**\n * This hook registers a callback for the whenever list view component is ready\n * then makes a call to get the data using the search fields pre-filled with cache data.\n */\n\nexport function useCacheWhenListViewReady(\n cache: { searchFields: unknown },\n viewName: string,\n useCache: boolean,\n getFilterData: (params: { isCalledFromCache: boolean }) => void,\n searchSelectCacheKey: string\n) {\n useEffect(() => {\n if (Object.keys(cache.searchFields ?? {}).length > 0) {\n PCore.getPubSubUtils().subscribe(\n listViewConstants.EVENTS.LIST_VIEW_READY,\n ({ viewName: viewNameFromListView }: { viewName: string }) => {\n if (viewNameFromListView === viewName && useCache) {\n getFilterData({ isCalledFromCache: true });\n }\n },\n `${searchSelectCacheKey}-listview-ready`\n );\n }\n\n return () => {\n PCore.getPubSubUtils().unsubscribe(listViewConstants.EVENTS.LIST_VIEW_READY, `${searchSelectCacheKey}-listview-ready`);\n };\n }, []);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/template/AdvancedSearch/SearchGroups/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { default } from './SearchGroups';\n"]}
|