@pega/react-sdk-components 24.2.11 → 25.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/Context/StoreContext.d.ts +0 -1
- package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +0 -6
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +11 -14
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.css +46 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +2 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +18 -16
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +50 -35
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +3 -3
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +32 -4
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +12 -2
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +52 -3
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +2 -2
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +0 -2
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +3 -6
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +4 -7
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +2 -4
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +6 -9
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +6 -7
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +2 -2
- package/lib/components/field/Group/Group.d.ts.map +1 -1
- package/lib/components/field/Group/Group.js +4 -3
- package/lib/components/field/Group/Group.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +4 -5
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Location/Location.css +4 -0
- package/lib/components/field/Location/Location.d.ts +11 -0
- package/lib/components/field/Location/Location.d.ts.map +1 -0
- package/lib/components/field/Location/Location.js +158 -0
- package/lib/components/field/Location/Location.js.map +1 -0
- package/lib/components/field/Location/index.d.ts +2 -0
- package/lib/components/field/Location/index.d.ts.map +1 -0
- package/lib/components/field/Location/index.js +2 -0
- package/lib/components/field/Location/index.js.map +1 -0
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
- package/lib/components/field/Multiselect/utils.d.ts +2 -1
- package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
- package/lib/components/field/Multiselect/utils.js +1 -1
- package/lib/components/field/Multiselect/utils.js.map +1 -1
- package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
- package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
- package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
- package/lib/components/field/ObjectReference/index.d.ts +2 -0
- package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/index.js +2 -0
- package/lib/components/field/ObjectReference/index.js.map +1 -0
- package/lib/components/field/ObjectReference/utils.d.ts +17 -0
- package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/utils.js +99 -0
- package/lib/components/field/ObjectReference/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +2 -5
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +6 -4
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.css +79 -0
- package/lib/components/field/RichText/RichText.d.ts +2 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +1 -0
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +1 -2
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
- package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/SelectableCard.js +68 -0
- package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
- package/lib/components/field/SelectableCard/index.d.ts +2 -0
- package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/index.js +2 -0
- package/lib/components/field/SelectableCard/index.js.map +1 -0
- package/lib/components/field/SelectableCard/utils.d.ts +13 -0
- package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/utils.js +183 -0
- package/lib/components/field/SelectableCard/utils.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +1 -1
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +4 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +0 -1
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +4 -5
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +2 -5
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +4 -5
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +1 -2
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +1 -2
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentShared.d.ts +2 -0
- package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
- package/lib/components/helpers/attachmentShared.js +6 -0
- package/lib/components/helpers/attachmentShared.js.map +1 -0
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -1
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +1 -2
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +0 -1
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts +1 -1
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +1 -0
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +8 -4
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +1 -0
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
- package/lib/components/helpers/object-utils.d.ts +9 -0
- package/lib/components/helpers/object-utils.d.ts.map +1 -0
- package/lib/components/helpers/object-utils.js +11 -0
- package/lib/components/helpers/object-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +111 -5
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -0
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +7 -1
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +0 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +38 -30
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Assignment/useValidationBanner.d.ts +7 -0
- package/lib/components/infra/Assignment/useValidationBanner.d.ts.map +1 -0
- package/lib/components/infra/Assignment/useValidationBanner.js +26 -0
- package/lib/components/infra/Assignment/useValidationBanner.js.map +1 -0
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +20 -85
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +5 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -5
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +5 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +7 -11
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
- package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/container-helpers.js +46 -1
- package/lib/components/infra/Containers/container-helpers.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +1 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +2 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +26 -13
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +48 -70
- package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +19 -37
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +19 -7
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +1 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +6 -3
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +1 -1
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +4 -6
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +1 -1
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +2 -2
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +2 -2
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +7 -7
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js +68 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +23 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +26 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +179 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +25 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
- package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/index.js +2 -0
- package/lib/components/template/AdvancedSearch/index.js.map +1 -0
- package/lib/components/template/AppShell/AppShell.css +1 -5
- package/lib/components/template/AppShell/AppShell.d.ts +2 -2
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +10 -13
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +22 -39
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +2 -2
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +13 -15
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +0 -1
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +9 -2
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +239 -80
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
- package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
- package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
- package/lib/components/template/DataReference/SearchForm.js +87 -0
- package/lib/components/template/DataReference/SearchForm.js.map +1 -0
- package/lib/components/template/DataReference/utils.d.ts +15 -0
- package/lib/components/template/DataReference/utils.d.ts.map +1 -0
- package/lib/components/template/DataReference/utils.js +75 -0
- package/lib/components/template/DataReference/utils.js.map +1 -0
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.js +1 -2
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
- package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
- package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
- package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
- package/lib/components/template/DefaultPage/index.d.ts +2 -0
- package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/index.js +2 -0
- package/lib/components/template/DefaultPage/index.js.map +1 -0
- package/lib/components/template/Details/Details/Details.d.ts +1 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +2 -3
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +2 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +8 -5
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/HierarchicalForm/HierarchicalForm.d.ts +4 -0
- package/lib/components/template/HierarchicalForm/HierarchicalForm.d.ts.map +1 -0
- package/lib/components/template/HierarchicalForm/HierarchicalForm.js +16 -0
- package/lib/components/template/HierarchicalForm/HierarchicalForm.js.map +1 -0
- package/lib/components/template/HierarchicalForm/hooks.d.ts +15 -0
- package/lib/components/template/HierarchicalForm/hooks.d.ts.map +1 -0
- package/lib/components/template/HierarchicalForm/hooks.js +163 -0
- package/lib/components/template/HierarchicalForm/hooks.js.map +1 -0
- package/lib/components/template/HierarchicalForm/index.d.ts +2 -0
- package/lib/components/template/HierarchicalForm/index.d.ts.map +1 -0
- package/lib/components/template/HierarchicalForm/index.js +2 -0
- package/lib/components/template/HierarchicalForm/index.js.map +1 -0
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +5 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +186 -70
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +2 -5
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +28 -5
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +4 -2
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +13 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/ObjectPage/index.d.ts +2 -0
- package/lib/components/template/ObjectPage/index.d.ts.map +1 -0
- package/lib/components/template/ObjectPage/index.js +2 -0
- package/lib/components/template/ObjectPage/index.js.map +1 -0
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +84 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.js +2 -0
- package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +37 -33
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.d.ts +17 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.d.ts.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.js +94 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.js.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.d.ts +2 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.d.ts.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.js +2 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.js.map +1 -0
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +102 -1
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/template/utils.d.ts +7 -0
- package/lib/components/template/utils.d.ts.map +1 -0
- package/lib/components/template/utils.js +52 -0
- package/lib/components/template/utils.js.map +1 -0
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +6 -8
- package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +255 -202
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
- package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
- package/lib/components/widget/Attachment/Attachment.types.js +2 -0
- package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +2 -2
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +0 -2
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +1 -13
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +21 -16
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
- package/lib/hooks/useAfterInitialEffect.js.map +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/hooks/useFocusFirstField.d.ts +3 -3
- package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
- package/lib/hooks/useFocusFirstField.js +19 -12
- package/lib/hooks/useFocusFirstField.js.map +1 -1
- package/lib/hooks/useGetTabsCount.d.ts +10 -0
- package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
- package/lib/hooks/useGetTabsCount.js +165 -0
- package/lib/hooks/useGetTabsCount.js.map +1 -0
- package/lib/hooks/useIsMount.d.ts +2 -0
- package/lib/hooks/useIsMount.d.ts.map +1 -0
- package/lib/hooks/useIsMount.js +9 -0
- package/lib/hooks/useIsMount.js.map +1 -0
- package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
- package/lib/mediaco/ToDo/ToDo.css +81 -0
- package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
- package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
- package/lib/mediaco/ToDo/ToDo.js +187 -0
- package/lib/mediaco/ToDo/ToDo.js.map +1 -0
- package/lib/mediaco/ToDo/index.d.ts +2 -0
- package/lib/mediaco/ToDo/index.d.ts.map +1 -0
- package/lib/mediaco/ToDo/index.js +2 -0
- package/lib/mediaco/ToDo/index.js.map +1 -0
- package/lib/samples/Embedded/styles.css +26 -0
- package/lib/sdk-pega-component-map.d.ts +125 -103
- package/lib/sdk-pega-component-map.d.ts.map +1 -1
- package/lib/sdk-pega-component-map.js +26 -3
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/theme.d.ts +30 -1
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +209 -2
- package/lib/theme.js.map +1 -1
- package/lib/types/PConnProps.d.ts +1 -1
- package/package.json +32 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +0 -13
- package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
- package/lib/components/helpers/attachmentHelpers.js +0 -72
- package/lib/components/helpers/attachmentHelpers.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createElement } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import Grid2 from '@mui/material/Grid2';
|
|
4
4
|
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
5
|
import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
|
|
6
6
|
export default function DetailsTwoColumn(props) {
|
|
@@ -15,7 +15,6 @@ export default function DetailsTwoColumn(props) {
|
|
|
15
15
|
getPConnect().setInheritedProp('readOnly', true);
|
|
16
16
|
const children = getPConnect().getChildren().map((configObject, index) => createElement(createPConnectComponent(), {
|
|
17
17
|
...configObject,
|
|
18
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
19
18
|
key: index.toString()
|
|
20
19
|
}));
|
|
21
20
|
// Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent
|
|
@@ -32,6 +31,6 @@ export default function DetailsTwoColumn(props) {
|
|
|
32
31
|
return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
33
32
|
});
|
|
34
33
|
}
|
|
35
|
-
return (_jsxs(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '', children: [showHighlightedData && highlightedDataArr.length > 0 && (_jsx(
|
|
34
|
+
return (_jsxs(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '', children: [showHighlightedData && highlightedDataArr.length > 0 && (_jsx(Grid2, { container: true, spacing: 1, style: { padding: '0 0 1em' }, children: highlightedDataArr.map((child, i) => (_jsx(Grid2, { size: { xs: 6 }, children: child }, `hf-${i + 1}`))) })), _jsx(Grid2, { container: true, spacing: 1, children: children.map((child, i) => (_jsx(Grid2, { size: { xs: 6 }, children: child }, `r-${i + 1}`))) })] }));
|
|
36
35
|
}
|
|
37
36
|
//# sourceMappingURL=DetailsTwoColumn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsTwoColumn.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"DetailsTwoColumn.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAExC,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAUnF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAA4B;IACnE,8EAA8E;IAC9E,MAAM,UAAU,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAErD,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,WAAW,EAAE,mBAAmB,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IAEpF,sEAAsE;IACtE,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,WAAW,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC;IAE9E,wFAAwF;IACxF,qDAAqD;IACrD,WAAW,EAAE,CAAC,gBAAgB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAC9D,WAAW,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAI,WAAW,EAAE,CAAC,WAAW,EAAY,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,CAClF,aAAa,CAAC,uBAAuB,EAAE,EAAE;QACvC,GAAG,YAAY;QAEf,GAAG,EAAE,KAAK,CAAC,QAAQ,E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B,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,KAAC,KAAK,IAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,YACnB,KAAK,IADqB,KAAK,CAAC,GAAG,CAAC,EAAE,CAEjC,CACT,CAAC,GACI,IACG,CACd,CAAC;AACJ,CAAC","sourcesContent":["import { createElement } from 'react';\nimport Grid2 from '@mui/material/Grid2';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\nimport type { PConnProps } from '../../../../types/PConnProps';\n\ninterface DetailsTwoColumnProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showLabel: boolean;\n label: string;\n showHighlightedData: boolean;\n}\n\nexport default function DetailsTwoColumn(props: DetailsTwoColumnProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldGroup = getComponentFromMap('FieldGroup');\n\n const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;\n\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };\n\n // Set display mode prop and re-create the children so this part of the dom tree renders\n // in a readonly (display) mode instead of a editable\n getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');\n getPConnect().setInheritedProp('readOnly', true);\n const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>\n createElement(createPConnectComponent(), {\n ...configObject,\n\n key: index.toString()\n })\n );\n\n // Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent\n let highlightedDataArr = [];\n if (showHighlightedData) {\n const { highlightedData = [] } = (getPConnect().getRawMetadata() as any).config;\n highlightedDataArr = highlightedData.map(field => {\n field.config.displayMode = 'STACKED_LARGE_VAL';\n\n // Mark as status display when using pyStatusWork\n if (field.config.value === '@P .pyStatusWork') {\n field.type = 'TextInput';\n field.config.displayAsStatus = true;\n }\n\n return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional\n });\n }\n\n return (\n <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>\n {showHighlightedData && highlightedDataArr.length > 0 && (\n <Grid2 container spacing={1} style={{ padding: '0 0 1em' }}>\n {highlightedDataArr.map((child, i) => (\n <Grid2 size={{ xs: 6 }} key={`hf-${i + 1}`}>\n {child}\n </Grid2>\n ))}\n </Grid2>\n )}\n <Grid2 container spacing={1}>\n {children.map((child, i) => (\n <Grid2 size={{ xs: 6 }} key={`r-${i + 1}`}>\n {child}\n </Grid2>\n ))}\n </Grid2>\n </FieldGroup>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DynamicTabs/DynamicTabs.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"DynamicTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DynamicTabs/DynamicTabs.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ/D,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;CACvB;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAuD3C;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicTabs.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DynamicTabs/DynamicTabs.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,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,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,GAAG,IAA9D,GAAG,CAAC,EAAE,CAA4D,CAC7E,CAAC,GACG,EAEN,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAC1B,KAAC,QAAQ,IAAc,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAC,kBAAkB,YACvF,wBAAM,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,mBAAmB,GAAO,IAD7D,GAAG,CAAC,EAAE,CAEV,CACZ,CAAC,IACS,IACZ,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { Children, useMemo, useState } from 'react';\nimport { Tab, Tabs } from '@mui/material';\nimport { TabContext, TabPanel } from '@mui/lab';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport { buildView } from '../../../helpers/field-group-utils';\nimport { PConnProps } from '../../../../types/PConnProps';\n\nconst useStyles = makeStyles(() => ({\n tab: {\n minWidth: '72px'\n }\n}));\n\ninterface DynamicTabsProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showLabel: boolean;\n label: string;\n referenceList?: any[];\n}\n\nfunction DynamicTabs(props: DynamicTabsProps) {\n const classes = useStyles();\n const { referenceList, showLabel, label, getPConnect } = props;\n const pConnect = getPConnect();\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...pConnect.getInheritedProps() };\n const defaultTabIndex = 0;\n const { tablabel } = pConnect.getComponentConfig();\n const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);\n const referenceListData: any = pConnect.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional\n const memoisedTabViews = useMemo(() => {\n pConnect.setInheritedProp('displayMode', 'DISPLAY_ONLY');\n pConnect.setInheritedProp('readOnly', true);\n\n return (\n referenceListData &&\n Children.toArray(\n referenceListData.map((item, index) => {\n return <React.Fragment key={item[tablabelProp]}>{buildView(pConnect, index, '')}</React.Fragment>;\n })\n )\n );\n }, [referenceListData]);\n const [panelShown, changePanel] = useState(defaultTabIndex);\n const handleTabClick = (e, id) => {\n changePanel(parseInt(id, 10));\n };\n // Loop over the tab contents and and pull out the labels for the navigation\n const tabItems =\n referenceListData?.map((item, i) => {\n const currentTabLabel = item[tablabelProp] || PCore.getLocaleUtils().getLocaleValue('No label specified in config', 'Generic');\n return {\n name: currentTabLabel,\n id: i\n };\n }) || [];\n\n return (\n <>\n {propsToUse.label && <h3 id='dynamic-tabs-title'>{propsToUse.label}</h3>}\n <TabContext value={panelShown.toString()}>\n <Tabs onChange={handleTabClick} value={panelShown} variant='scrollable' scrollButtons='auto' indicatorColor='primary' id='dynamic-tabs'>\n {tabItems.map((tab: any) => (\n <Tab key={tab.id} label={tab.name} value={tab.id} className={classes.tab} />\n ))}\n </Tabs>\n\n {tabItems.map((tab: any) => (\n <TabPanel key={tab.id} value={tab.id.toString()} tabIndex={+tab.id} id='dynamic-tabpanel'>\n <div>{memoisedTabViews[parseInt(tab.id, 10)] || 'No content exists'}</div>\n </TabPanel>\n ))}\n </TabContext>\n </>\n );\n}\n\nexport default DynamicTabs;\n"]}
|
|
1
|
+
{"version":3,"file":"DynamicTabs.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DynamicTabs/DynamicTabs.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,M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AC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAC1B,KAAC,QAAQ,IAAc,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAC,kBAAkB,YACvF,wBAAM,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,mBAAmB,GAAO,IAD7D,GAAG,CAAC,EAAE,CAEV,CACZ,CAAC,IACS,IACZ,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { Children, useMemo, useState } from 'react';\nimport { Tab, Tabs } from '@mui/material';\nimport { TabContext, TabPanel } from '@mui/lab';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport { buildView } from '../../../helpers/field-group-utils';\nimport type { PConnProps } from '../../../../types/PConnProps';\n\nconst useStyles = makeStyles(() => ({\n tab: {\n minWidth: '72px'\n }\n}));\n\ninterface DynamicTabsProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showLabel: boolean;\n label: string;\n referenceList?: any[];\n}\n\nfunction DynamicTabs(props: DynamicTabsProps) {\n const classes = useStyles();\n const { referenceList, showLabel, label, getPConnect } = props;\n const pConnect = getPConnect();\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...pConnect.getInheritedProps() };\n const defaultTabIndex = 0;\n const { tablabel } = pConnect.getComponentConfig();\n const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);\n const referenceListData: any = pConnect.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional\n const memoisedTabViews = useMemo(() => {\n pConnect.setInheritedProp('displayMode', 'DISPLAY_ONLY');\n pConnect.setInheritedProp('readOnly', true);\n\n return (\n referenceListData &&\n Children.toArray(\n referenceListData.map((item, index) => {\n return <React.Fragment key={item[tablabelProp]}>{buildView(pConnect, index, '')}</React.Fragment>;\n })\n )\n );\n }, [referenceListData]);\n const [panelShown, changePanel] = useState(defaultTabIndex);\n const handleTabClick = (e, id) => {\n changePanel(parseInt(id, 10));\n };\n // Loop over the tab contents and and pull out the labels for the navigation\n const tabItems =\n referenceListData?.map((item, i) => {\n const currentTabLabel = item[tablabelProp] || PCore.getLocaleUtils().getLocaleValue('No label specified in config', 'Generic');\n return {\n name: currentTabLabel,\n id: i\n };\n }) || [];\n\n return (\n <>\n {propsToUse.label && <h3 id='dynamic-tabs-title'>{propsToUse.label}</h3>}\n <TabContext value={panelShown.toString()}>\n <Tabs onChange={handleTabClick} value={panelShown} variant='scrollable' scrollButtons='auto' indicatorColor='primary' id='dynamic-tabs'>\n {tabItems.map((tab: any) => (\n <Tab key={tab.id} label={tab.name} value={tab.id} className={classes.tab} />\n ))}\n </Tabs>\n\n {tabItems.map((tab: any) => (\n <TabPanel key={tab.id} value={tab.id.toString()} tabIndex={+tab.id} id='dynamic-tabpanel'>\n <div>{memoisedTabViews[parseInt(tab.id, 10)] || 'No content exists'}</div>\n </TabPanel>\n ))}\n </TabContext>\n </>\n );\n}\n\nexport default DynamicTabs;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PConnProps } from '../../../types/PConnProps';
|
|
1
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
2
2
|
interface FieldGroupTemplateProps extends PConnProps {
|
|
3
3
|
referenceList?: any[];
|
|
4
4
|
contextClass: string;
|
|
@@ -8,6 +8,7 @@ interface FieldGroupTemplateProps extends PConnProps {
|
|
|
8
8
|
displayMode?: string;
|
|
9
9
|
fieldHeader?: string;
|
|
10
10
|
allowTableEdit: boolean;
|
|
11
|
+
allowActions?: any;
|
|
11
12
|
}
|
|
12
13
|
export default function FieldGroupTemplate(props: FieldGroupTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldGroupTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,uBAAwB,SAAQ,UAAU;IAElD,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAgGxE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable react-hooks/rules-of-hooks */
|
|
3
2
|
import { useLayoutEffect, useMemo } from 'react';
|
|
4
3
|
import { getReferenceList, buildView } from '../../helpers/field-group-utils';
|
|
5
4
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
@@ -7,16 +6,20 @@ export default function FieldGroupTemplate(props) {
|
|
|
7
6
|
// Get emitted components from map (so we can get any override that may exist)
|
|
8
7
|
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
9
8
|
const FieldGroupList = getComponentFromMap('FieldGroupList');
|
|
10
|
-
const { referenceList = [], renderMode, contextClass, getPConnect, lookForChildInConfig, heading = '', displayMode, fieldHeader, allowTableEdit: allowAddEdit } = props;
|
|
9
|
+
const { referenceList = [], renderMode, contextClass, getPConnect, lookForChildInConfig, heading = '', displayMode, fieldHeader, allowActions, allowTableEdit: allowAddEdit } = props;
|
|
11
10
|
const pConn = getPConnect();
|
|
12
11
|
const resolvedList = getReferenceList(pConn);
|
|
13
12
|
pConn.setReferenceList(resolvedList);
|
|
14
13
|
const pageReference = `${pConn.getPageReference()}${resolvedList}`;
|
|
15
14
|
const isReadonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';
|
|
16
15
|
const HEADING = heading ?? 'Row';
|
|
16
|
+
const hasAllowActions = Object.keys(allowActions ?? {}).length > 0;
|
|
17
|
+
const { allowAdd: actionAdd, allowDelete: actionDelete } = allowActions ?? {};
|
|
18
|
+
const allowAdd = hasAllowActions ? (actionAdd ?? true) : (allowAddEdit ?? true);
|
|
19
|
+
const allowDelete = hasAllowActions ? (actionDelete ?? true) : (allowAddEdit ?? true);
|
|
17
20
|
useLayoutEffect(() => {
|
|
18
21
|
if (!isReadonlyMode) {
|
|
19
|
-
// @ts-
|
|
22
|
+
// @ts-expect-error - Expected 3 arguments, but got 1
|
|
20
23
|
pConn.getListActions().initDefaultPageInstructions(resolvedList);
|
|
21
24
|
}
|
|
22
25
|
}, [referenceList?.length]);
|
|
@@ -46,7 +49,7 @@ export default function FieldGroupTemplate(props) {
|
|
|
46
49
|
pConn.getListActions().deleteEntry(index);
|
|
47
50
|
}
|
|
48
51
|
};
|
|
49
|
-
if (referenceList.length === 0 &&
|
|
52
|
+
if (referenceList.length === 0 && allowAdd) {
|
|
50
53
|
addFieldGroupItem();
|
|
51
54
|
}
|
|
52
55
|
const MemoisedChildren = useMemo(() => {
|
|
@@ -56,7 +59,7 @@ export default function FieldGroupTemplate(props) {
|
|
|
56
59
|
children: buildView(pConn, index, lookForChildInConfig)
|
|
57
60
|
}));
|
|
58
61
|
}, [referenceList?.length]);
|
|
59
|
-
return (_jsx(FieldGroupList, { items: MemoisedChildren, onAdd:
|
|
62
|
+
return (_jsx(FieldGroupList, { items: MemoisedChildren, onAdd: allowAdd ? addFieldGroupItem : undefined, onDelete: allowDelete ? deleteFieldGroupItem : undefined }));
|
|
60
63
|
}
|
|
61
64
|
pConn.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
62
65
|
const memoisedReadOnlyList = useMemo(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupTemplate.js","sourceRoot":"","sources":["../../../../src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"FieldGroupTemplate.js","sourceRoot":"","sources":["../../../../src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAgBhF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAA8B;IACvE,8EAA8E;IAC9E,MAAM,UAAU,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;IACrD,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,aAAa,GAAG,EAAE,EAClB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,OAAO,GAAG,EAAE,EACZ,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EAAE,YAAY,EAC7B,GAAG,KAAK,CAAC;IACV,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,YAAY,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC7C,KAAK,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;IACrC,MAAM,aAAa,GAAG,GAAG,KAAK,CAAC,gBAAgB,EAAE,GAAG,YAAY,EAAE,CAAC;IACnE,MAAM,cAAc,GAAG,UAAU,KAAK,U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AC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;QAE5B,OAAO,CACL,KAAC,cAAc,IACb,KAAK,EAAE,gBAAgB,EACvB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,EAC/C,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,GACxD,CACH,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACtD,MAAM,oBAAoB,GAAG,OAAO,CAAC,GAAG,EAAE;QACxC,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YACvC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,mBAAmB,KAAK,EAAE,CAAC;YACxD,OAAO,CACL,KAAC,UAAU,IAAW,IAAI,EAAE,WAAW,KAAK,aAAa,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,KAAK,GAAG,CAAC,EAAE,YACtH,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,oBAAoB,CAAC,IAD/B,GAAG,CAEP,CACd,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,wBAAM,oBAAoB,GAAO,CAAC;AAC3C,CAAC","sourcesContent":["import { useLayoutEffect, useMemo } from 'react';\n\nimport { getReferenceList, buildView } from '../../helpers/field-group-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface FieldGroupTemplateProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n referenceList?: any[];\n contextClass: string;\n renderMode?: string;\n heading?: string;\n lookForChildInConfig?: boolean;\n displayMode?: string;\n fieldHeader?: string;\n allowTableEdit: boolean;\n allowActions?: any;\n}\n\nexport default function FieldGroupTemplate(props: FieldGroupTemplateProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldGroup = getComponentFromMap('FieldGroup');\n const FieldGroupList = getComponentFromMap('FieldGroupList');\n\n const {\n referenceList = [],\n renderMode,\n contextClass,\n getPConnect,\n lookForChildInConfig,\n heading = '',\n displayMode,\n fieldHeader,\n allowActions,\n allowTableEdit: allowAddEdit\n } = props;\n const pConn = getPConnect();\n const resolvedList = getReferenceList(pConn);\n pConn.setReferenceList(resolvedList);\n const pageReference = `${pConn.getPageReference()}${resolvedList}`;\n const isReadonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';\n const HEADING = heading ?? 'Row';\n\n const hasAllowActions = Object.keys(allowActions ?? {}).length > 0;\n const { allowAdd: actionAdd, allowDelete: actionDelete } = allowActions ?? {};\n const allowAdd = hasAllowActions ? (actionAdd ?? true) : (allowAddEdit ?? true);\n const allowDelete = hasAllowActions ? (actionDelete ?? true) : (allowAddEdit ?? true);\n\n useLayoutEffect(() => {\n if (!isReadonlyMode) {\n // @ts-expect-error - Expected 3 arguments, but got 1\n pConn.getListActions().initDefaultPageInstructions(resolvedList);\n }\n }, [referenceList?.length]);\n\n const getDynamicHeaderProp = (item, index) => {\n if (fieldHeader === 'propertyRef' && heading && item[heading.substring(1)]) {\n return item[heading.substring(1)];\n }\n return `Row ${index + 1}`;\n };\n\n const addRecord = () => {\n if (PCore.getPCoreVersion()?.includes('8.7')) {\n pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);\n } else {\n pConn.getListActions().insert({}, referenceList.length);\n }\n };\n\n if (!isReadonlyMode) {\n const addFieldGroupItem = () => {\n addRecord();\n };\n const deleteFieldGroupItem = index => {\n if (PCore.getPCoreVersion()?.includes('8.7')) {\n pConn.getListActions().deleteEntry(index, pageReference);\n } else {\n pConn.getListActions().deleteEntry(index);\n }\n };\n if (referenceList.length === 0 && allowAdd) {\n addFieldGroupItem();\n }\n\n const MemoisedChildren = useMemo(() => {\n return referenceList.map((item, index) => ({\n id: index,\n name: fieldHeader === 'propertyRef' ? getDynamicHeaderProp(item, index) : `${HEADING} ${index + 1}`,\n children: buildView(pConn, index, lookForChildInConfig)\n }));\n }, [referenceList?.length]);\n\n return (\n <FieldGroupList\n items={MemoisedChildren}\n onAdd={allowAdd ? addFieldGroupItem : undefined}\n onDelete={allowDelete ? deleteFieldGroupItem : undefined}\n />\n );\n }\n\n pConn.setInheritedProp('displayMode', 'DISPLAY_ONLY');\n const memoisedReadOnlyList = useMemo(() => {\n return referenceList.map((item, index) => {\n const key = item[heading] || `field-group-row-${index}`;\n return (\n <FieldGroup key={key} name={fieldHeader === 'propertyRef' ? getDynamicHeaderProp(item, index) : `${HEADING} ${index + 1}`}>\n {buildView(pConn, index, lookForChildInConfig)}\n </FieldGroup>\n );\n });\n }, []);\n\n return <div>{memoisedReadOnlyList}</div>;\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import { type HierarchicalFormProps } from './hooks';
|
|
3
|
+
export default function HierarchicalForm(props: PropsWithChildren<HierarchicalFormProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
//# sourceMappingURL=HierarchicalForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchicalForm.d.ts","sourceRoot":"","sources":["../../../../src/components/template/HierarchicalForm/HierarchicalForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,OAAO,EAAuB,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE1E,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,CAAC,qBAAqB,CAAC,kDAmDvF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {} from 'react';
|
|
3
|
+
import { Tab, Tabs, Box, Badge, Tooltip } from '@mui/material';
|
|
4
|
+
import { TabContext, TabPanel } from '@mui/lab';
|
|
5
|
+
import { useHierarchicalForm } from './hooks';
|
|
6
|
+
export default function HierarchicalForm(props) {
|
|
7
|
+
const { currentTabId, handleTabClick, processedTabs, instructions } = useHierarchicalForm(props);
|
|
8
|
+
if (!currentTabId) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
return (_jsxs(Box, { display: 'flex', flexDirection: 'column', children: [instructions && (_jsx(Box, { mb: 2, children: _jsx("div", { dangerouslySetInnerHTML: { __html: instructions } }) })), _jsx(Box, { sx: { flexGrow: 1 }, children: _jsxs(TabContext, { value: currentTabId.toString(), children: [_jsx(Box, { sx: { borderBottom: 1, borderColor: 'divider' }, children: _jsx(Tabs, { onChange: handleTabClick, value: currentTabId.toString(), variant: 'scrollable', children: processedTabs.map((tab) => {
|
|
12
|
+
const tabLabel = tab.name || tab.label;
|
|
13
|
+
return (_jsx(Tab, { sx: { textTransform: 'none' }, label: tab.errors ? (_jsx(Tooltip, { title: `${tabLabel} has errors`, placement: 'top', children: _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [_jsx("span", { children: tabLabel }), _jsx(Badge, { badgeContent: tab.errors, color: 'error', sx: { '& .MuiBadge-badge': { position: 'static', transform: 'none' } } })] }) })) : (tabLabel), value: tab.id?.toString() }, tab.id));
|
|
14
|
+
}) }) }), processedTabs.map((tab) => (_jsx(TabPanel, { value: tab.id?.toString(), tabIndex: +tab.id, keepMounted: true, sx: { px: 0 }, children: _jsx("div", { children: tab.content ? tab.content : 'No content exists' }) }, tab.id)))] }) })] }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=HierarchicalForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchicalForm.js","sourceRoot":"","sources":["../../../../src/components/template/HierarchicalForm/HierarchicalForm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E,MAAM,EAAE,EAC7B,KAAK,EACH,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CACX,KAAC,OAAO,IAAC,KAAK,EAAE,GAAG,QAAQ,aAAa,EAAE,SAAS,EAAC,KAAK,YACvD,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aACxD,yBAAO,QAAQ,GAAQ,EACvB,KAAC,KAAK,IAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,GAAI,IACrH,GACE,CACX,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,EAEH,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,IAdpB,GAAG,CAAC,EAAE,CAeX,CACH,CAAC;gCACJ,CAAC,CAAC,GACG,GACH,EACL,aAAa,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAC/B,KAAC,QAAQ,IAAc,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,WAAW,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,YAC5F,wBAAM,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,GAAO,IAD/C,GAAG,CAAC,EAAE,CAEV,CACZ,CAAC,IACS,GACT,IACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { type PropsWithChildren } from 'react';\nimport { Tab, Tabs, Box, Badge, Tooltip } from '@mui/material';\nimport { TabContext, TabPanel } from '@mui/lab';\n\nimport { useHierarchicalForm, type HierarchicalFormProps } from './hooks';\n\nexport default function HierarchicalForm(props: PropsWithChildren<HierarchicalFormProps>) {\n const { currentTabId, handleTabClick, processedTabs, instructions } = useHierarchicalForm(props);\n\n if (!currentTabId) {\n return null;\n }\n\n return (\n <Box display='flex' flexDirection='column'>\n {instructions && (\n <Box mb={2}>\n <div dangerouslySetInnerHTML={{ __html: instructions }} />\n </Box>\n )}\n <Box sx={{ flexGrow: 1 }}>\n <TabContext value={currentTabId.toString()}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <Tabs onChange={handleTabClick} value={currentTabId.toString()} variant='scrollable'>\n {processedTabs.map((tab: any) => {\n const tabLabel = tab.name || tab.label;\n return (\n <Tab\n key={tab.id}\n sx={{ textTransform: 'none' }}\n label={\n tab.errors ? (\n <Tooltip title={`${tabLabel} has errors`} placement='top'>\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\n <span>{tabLabel}</span>\n <Badge badgeContent={tab.errors} color='error' sx={{ '& .MuiBadge-badge': { position: 'static', transform: 'none' } }} />\n </Box>\n </Tooltip>\n ) : (\n tabLabel\n )\n }\n value={tab.id?.toString()}\n />\n );\n })}\n </Tabs>\n </Box>\n {processedTabs.map((tab: any) => (\n <TabPanel key={tab.id} value={tab.id?.toString()} tabIndex={+tab.id} keepMounted sx={{ px: 0 }}>\n <div>{tab.content ? tab.content : 'No content exists'}</div>\n </TabPanel>\n ))}\n </TabContext>\n </Box>\n </Box>\n );\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type PropsWithChildren, type SyntheticEvent } from 'react';
|
|
2
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
3
|
+
export interface HierarchicalFormProps extends PConnProps {
|
|
4
|
+
tabsVisibility?: Record<string, boolean>;
|
|
5
|
+
template?: string;
|
|
6
|
+
instructions?: string;
|
|
7
|
+
lastUpdateCaseTime?: string | number;
|
|
8
|
+
}
|
|
9
|
+
export declare function useHierarchicalForm(props: PropsWithChildren<HierarchicalFormProps>): {
|
|
10
|
+
currentTabId: any;
|
|
11
|
+
handleTabClick: (event: SyntheticEvent, id: string) => void;
|
|
12
|
+
processedTabs: any[];
|
|
13
|
+
instructions: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/components/template/HierarchicalForm/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+D,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAKjI,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAW5D,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtC;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,CAAC,qBAAqB,CAAC;;4BAoGvE,cAAc,MAAM,MAAM;;;EAoGrC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { useState, useEffect, useMemo, useCallback, useRef, Children } from 'react';
|
|
2
|
+
import useGetTabsCount from '../../../hooks/useGetTabsCount';
|
|
3
|
+
import { searchtabsClick as tabClick, getActiveTabId, getFirstVisibleTabId } from '../SubTabs/tabUtils';
|
|
4
|
+
import { getInstructions } from '../../helpers/template-utils';
|
|
5
|
+
const ComponentName = 'HierarchicalForm';
|
|
6
|
+
const getLandingPageViewName = (contextName) => {
|
|
7
|
+
const target = contextName.substring(0, contextName.lastIndexOf('_'));
|
|
8
|
+
const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(target);
|
|
9
|
+
const containerItemData = PCore.getContainerUtils().getContainerItemData(target, activeContainerItemID);
|
|
10
|
+
return containerItemData?.view?.config?.name;
|
|
11
|
+
};
|
|
12
|
+
export function useHierarchicalForm(props) {
|
|
13
|
+
const { children = [], getPConnect, tabsVisibility = {}, template } = props;
|
|
14
|
+
const [tabErrors, setTabErrors] = useState({});
|
|
15
|
+
const tabErrorsRef = useRef({});
|
|
16
|
+
const submitAttemptedRef = useRef(false);
|
|
17
|
+
const { lastUpdateCaseTime = getPConnect().getValue('caseInfo.lastUpdateTime') } = props;
|
|
18
|
+
const fullCaseId = getPConnect().getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
|
|
19
|
+
const deferLoadedTabs = Children.toArray(children)[0];
|
|
20
|
+
deferLoadedTabs.props.getPConnect().setInheritedProp('template', template);
|
|
21
|
+
const navigationKey = useMemo(() => {
|
|
22
|
+
const parentNavKey = `${getPConnect().getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID) || getLandingPageViewName(getPConnect().getContextName())}`;
|
|
23
|
+
return `${parentNavKey}-${getPConnect().getMetadata()?.name}-${ComponentName}`;
|
|
24
|
+
}, []);
|
|
25
|
+
const instructions = getInstructions(getPConnect(), props.instructions);
|
|
26
|
+
const storedTab = PCore.getNavigationUtils().getComponentState(navigationKey)?.activeTab;
|
|
27
|
+
const tabsFromChildren = deferLoadedTabs.props.getPConnect().getChildren();
|
|
28
|
+
const firstTabId = getFirstVisibleTabId(deferLoadedTabs, undefined);
|
|
29
|
+
const [currentTabId, setCurrentTabId] = useState(getActiveTabId(tabsFromChildren, storedTab || firstTabId));
|
|
30
|
+
const [tabVisibilityStr, setTabVisibilityStr] = useState('');
|
|
31
|
+
const { data: tabData, refreshTabData } = useGetTabsCount(deferLoadedTabs, 'hierarchical', currentTabId, template);
|
|
32
|
+
const handleCaseRefresh = (message) => {
|
|
33
|
+
if (message.subtype === 'tab') {
|
|
34
|
+
refreshTabData();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
let index = 0;
|
|
39
|
+
let caseSubId = '';
|
|
40
|
+
deferLoadedTabs.props
|
|
41
|
+
.getPConnect()
|
|
42
|
+
.getChildren()
|
|
43
|
+
?.forEach((child) => {
|
|
44
|
+
const rawConfigProps = child.getPConnect().getRawConfigProps();
|
|
45
|
+
if ('visibility' in rawConfigProps) {
|
|
46
|
+
tabsVisibility[`${index}`] = rawConfigProps.visibility;
|
|
47
|
+
}
|
|
48
|
+
index += 1;
|
|
49
|
+
});
|
|
50
|
+
getPConnect().registerAdditionalProps({ tabsVisibility });
|
|
51
|
+
getPConnect().registerAdditionalProps({ lastUpdateCaseTime: '@P caseInfo.lastUpdateTime' });
|
|
52
|
+
if (fullCaseId) {
|
|
53
|
+
caseSubId = PCore.getMessagingServiceManager().getCaseSubscription(fullCaseId).subscribe({ caseId: fullCaseId }, handleCaseRefresh);
|
|
54
|
+
}
|
|
55
|
+
return () => {
|
|
56
|
+
if (fullCaseId)
|
|
57
|
+
PCore.getMessagingServiceManager().getCaseSubscription(fullCaseId).unsubscribe(caseSubId);
|
|
58
|
+
};
|
|
59
|
+
}, []);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
refreshTabData();
|
|
62
|
+
}, [lastUpdateCaseTime]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
const isVisibilityAvailable = Object.values(tabsVisibility).length > 0 && Object.values(tabsVisibility).every(visibility => typeof visibility === 'boolean');
|
|
65
|
+
if (isVisibilityAvailable) {
|
|
66
|
+
let str = '';
|
|
67
|
+
Object.keys(tabsVisibility).forEach(key => {
|
|
68
|
+
str += key + tabsVisibility[key];
|
|
69
|
+
});
|
|
70
|
+
setTabVisibilityStr(str);
|
|
71
|
+
}
|
|
72
|
+
}, [tabsVisibility]);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (tabData && tabData.length) {
|
|
75
|
+
const activeTabId = getActiveTabId(tabData, currentTabId);
|
|
76
|
+
if (activeTabId !== currentTabId) {
|
|
77
|
+
setCurrentTabId(activeTabId);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, [tabVisibilityStr, tabData]);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
PCore.getNavigationUtils().setComponentState(navigationKey, { activeTab: currentTabId });
|
|
83
|
+
const activeTabNavKey = `${getPConnect().getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID)}-CaseView-ActiveTab`;
|
|
84
|
+
PCore.getNavigationUtils().setComponentState(activeTabNavKey, { id: currentTabId });
|
|
85
|
+
return () => {
|
|
86
|
+
if (getPConnect().getContextName()?.includes('/modal')) {
|
|
87
|
+
PCore.getNavigationUtils().setComponentState(navigationKey, { activeTab: firstTabId });
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}, [currentTabId, children]);
|
|
91
|
+
const handleTabClick = useCallback((event, id) => {
|
|
92
|
+
tabClick(id, tabData, currentTabId, setCurrentTabId);
|
|
93
|
+
}, [tabData, currentTabId]);
|
|
94
|
+
const tabItems = useMemo(() => tabData?.filter((tab) => tab.visibility()) ?? [], [tabData, tabVisibilityStr]);
|
|
95
|
+
const tabsRef = useRef(tabItems);
|
|
96
|
+
tabsRef.current = tabItems;
|
|
97
|
+
const updateTabErrorsOnViewMutate = useCallback((messageObject, tab) => {
|
|
98
|
+
if (!messageObject.type) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const previousTabErrors = tabErrorsRef.current;
|
|
102
|
+
let currentTabState = previousTabErrors[tab.id] || {};
|
|
103
|
+
const { MESSAGES_TYPE_ERROR } = PCore.getConstants().MESSAGES;
|
|
104
|
+
if (messageObject.type !== MESSAGES_TYPE_ERROR) {
|
|
105
|
+
delete currentTabState[messageObject.fieldName];
|
|
106
|
+
currentTabState = Object.keys(currentTabState).length > 0 ? currentTabState : undefined;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
currentTabState = { ...currentTabState, [messageObject.fieldName]: messageObject.messages };
|
|
110
|
+
}
|
|
111
|
+
const newErrors = { ...previousTabErrors, [tab.id]: currentTabState };
|
|
112
|
+
tabErrorsRef.current = newErrors;
|
|
113
|
+
setTabErrors(newErrors);
|
|
114
|
+
}, []);
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
const rawConfig = '_rawConfig';
|
|
117
|
+
tabItems.forEach((tab) => {
|
|
118
|
+
PCore.getContextTreeManager().onViewMutate(tab.getPConnect().getContextName(), tab.getPConnect().getPageReference(), tab.getPConnect()[rawConfig].config?.name, (messageObject) => updateTabErrorsOnViewMutate(messageObject, tab));
|
|
119
|
+
});
|
|
120
|
+
}, [tabItems, updateTabErrorsOnViewMutate]);
|
|
121
|
+
const navigateToFirstErrorTab = useCallback(() => {
|
|
122
|
+
const currentErrors = tabErrorsRef.current;
|
|
123
|
+
const firstTabWithError = tabsRef.current.find((tab) => {
|
|
124
|
+
const tabErrorState = currentErrors[tab.id];
|
|
125
|
+
return tabErrorState && Object.keys(tabErrorState).length > 0;
|
|
126
|
+
});
|
|
127
|
+
if (firstTabWithError) {
|
|
128
|
+
submitAttemptedRef.current = false;
|
|
129
|
+
setCurrentTabId(firstTabWithError.id);
|
|
130
|
+
}
|
|
131
|
+
}, []);
|
|
132
|
+
const highlightFirstErrorTab = useCallback(() => {
|
|
133
|
+
submitAttemptedRef.current = true;
|
|
134
|
+
navigateToFirstErrorTab();
|
|
135
|
+
}, [navigateToFirstErrorTab]);
|
|
136
|
+
useEffect(() => {
|
|
137
|
+
const { CURRENT_ASSIGNMENT_UPDATED } = PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS;
|
|
138
|
+
PCore.getPubSubUtils().subscribe(CURRENT_ASSIGNMENT_UPDATED, () => {
|
|
139
|
+
tabErrorsRef.current = {};
|
|
140
|
+
submitAttemptedRef.current = false;
|
|
141
|
+
setTabErrors({});
|
|
142
|
+
}, 'CURRENT_ASSIGNMENT_UPDATED-HierarchicalForm');
|
|
143
|
+
PCore.getPubSubUtils().subscribe(PCore.getConstants().PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT, highlightFirstErrorTab, 'ERROR_ON_FINISH_ASSIGNMENT-HierarchicalForm');
|
|
144
|
+
return () => {
|
|
145
|
+
PCore.getPubSubUtils().unsubscribe(CURRENT_ASSIGNMENT_UPDATED, 'CURRENT_ASSIGNMENT_UPDATED-HierarchicalForm');
|
|
146
|
+
PCore.getPubSubUtils().unsubscribe(PCore.getConstants().PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT, 'ERROR_ON_FINISH_ASSIGNMENT-HierarchicalForm');
|
|
147
|
+
};
|
|
148
|
+
}, []);
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
if (submitAttemptedRef.current) {
|
|
151
|
+
navigateToFirstErrorTab();
|
|
152
|
+
}
|
|
153
|
+
}, [tabErrors, navigateToFirstErrorTab]);
|
|
154
|
+
const processedTabs = useMemo(() => {
|
|
155
|
+
return tabItems.map(tab => {
|
|
156
|
+
const errorKeys = Object.keys(tabErrors[tab.id] ?? {});
|
|
157
|
+
const errors = errorKeys.length > 0 ? errorKeys.reduce((sum, fieldName) => sum + tabErrors[tab.id][fieldName].length, 0) : undefined;
|
|
158
|
+
return { ...tab, errors };
|
|
159
|
+
});
|
|
160
|
+
}, [tabItems, tabErrors]);
|
|
161
|
+
return { currentTabId, handleTabClick, processedTabs, instructions };
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../src/components/template/HierarchicalForm/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAA+C,MAAM,OAAO,CAAC;AAEjI,OAAO,eAAe,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,IAAI,QAAQ,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;A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P,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,kBAAkB,CAAC,OAAO,EAAE,CAAC;YAC/B,uBAAuB,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAEzC,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE;QACjC,OAAO,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACxB,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;YACvD,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACrI,OAAO,EAAE,GAAG,GAAG,EAAE,MAAM,EAAE,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAE1B,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;AACvE,CAAC","sourcesContent":["import { useState, useEffect, useMemo, useCallback, useRef, Children, type PropsWithChildren, type SyntheticEvent } from 'react';\n\nimport useGetTabsCount from '../../../hooks/useGetTabsCount';\nimport { searchtabsClick as tabClick, getActiveTabId, getFirstVisibleTabId } from '../SubTabs/tabUtils';\nimport { getInstructions } from '../../helpers/template-utils';\nimport type { PConnProps } from '../../../types/PConnProps';\n\nconst ComponentName = 'HierarchicalForm';\n\nconst getLandingPageViewName = (contextName: string) => {\n const target = contextName.substring(0, contextName.lastIndexOf('_'));\n const activeContainerItemID = PCore.getContainerUtils().getActiveContainerItemName(target);\n const containerItemData = PCore.getContainerUtils().getContainerItemData(target, activeContainerItemID);\n return containerItemData?.view?.config?.name;\n};\n\nexport interface HierarchicalFormProps extends PConnProps {\n tabsVisibility?: Record<string, boolean>;\n template?: string;\n instructions?: string;\n lastUpdateCaseTime?: string | number;\n}\n\nexport function useHierarchicalForm(props: PropsWithChildren<HierarchicalFormProps>) {\n const { children = [], getPConnect, tabsVisibility = {}, template } = props;\n const [tabErrors, setTabErrors] = useState<Record<string, any>>({});\n const tabErrorsRef = useRef<Record<string, any>>({});\n const submitAttemptedRef = useRef(false);\n const { lastUpdateCaseTime = getPConnect().getValue('caseInfo.lastUpdateTime') } = props;\n const fullCaseId = getPConnect().getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);\n\n const deferLoadedTabs: any = Children.toArray(children)[0];\n deferLoadedTabs.props.getPConnect().setInheritedProp('template', template);\n\n const navigationKey = useMemo(() => {\n const parentNavKey = `${\n getPConnect().getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID) || getLandingPageViewName(getPConnect().getContextName())\n }`;\n return `${parentNavKey}-${getPConnect().getMetadata()?.name}-${ComponentName}`;\n }, []);\n\n const instructions = getInstructions(getPConnect(), props.instructions);\n\n const storedTab = (PCore.getNavigationUtils().getComponentState(navigationKey) as any)?.activeTab;\n\n const tabsFromChildren = deferLoadedTabs.props.getPConnect().getChildren();\n\n const firstTabId = getFirstVisibleTabId(deferLoadedTabs, undefined);\n\n const [currentTabId, setCurrentTabId] = useState(getActiveTabId(tabsFromChildren, storedTab || firstTabId));\n const [tabVisibilityStr, setTabVisibilityStr] = useState('');\n const { data: tabData, refreshTabData } = useGetTabsCount(deferLoadedTabs, 'hierarchical', currentTabId, template);\n\n const handleCaseRefresh = (message: any) => {\n if (message.subtype === 'tab') {\n refreshTabData();\n }\n };\n\n useEffect(() => {\n let index = 0;\n let caseSubId = '';\n deferLoadedTabs.props\n .getPConnect()\n .getChildren()\n ?.forEach((child: any) => {\n const rawConfigProps = child.getPConnect().getRawConfigProps();\n if ('visibility' in rawConfigProps) {\n tabsVisibility[`${index}`] = rawConfigProps.visibility;\n }\n index += 1;\n });\n\n getPConnect().registerAdditionalProps({ tabsVisibility });\n getPConnect().registerAdditionalProps({ lastUpdateCaseTime: '@P caseInfo.lastUpdateTime' });\n\n if (fullCaseId) {\n caseSubId = PCore.getMessagingServiceManager().getCaseSubscription(fullCaseId).subscribe({ caseId: fullCaseId }, handleCaseRefresh);\n }\n\n return () => {\n if (fullCaseId) PCore.getMessagingServiceManager().getCaseSubscription(fullCaseId).unsubscribe(caseSubId);\n };\n }, []);\n\n useEffect(() => {\n refreshTabData();\n }, [lastUpdateCaseTime]);\n\n useEffect(() => {\n const isVisibilityAvailable =\n Object.values(tabsVisibility).length > 0 && Object.values(tabsVisibility).every(visibility => typeof visibility === 'boolean');\n if (isVisibilityAvailable) {\n let str = '';\n Object.keys(tabsVisibility).forEach(key => {\n str += key + tabsVisibility[key];\n });\n setTabVisibilityStr(str);\n }\n }, [tabsVisibility]);\n\n useEffect(() => {\n if (tabData && tabData.length) {\n const activeTabId = getActiveTabId(tabData, currentTabId);\n if (activeTabId !== currentTabId) {\n setCurrentTabId(activeTabId);\n }\n }\n }, [tabVisibilityStr, tabData]);\n\n useEffect(() => {\n PCore.getNavigationUtils().setComponentState(navigationKey, { activeTab: currentTabId });\n const activeTabNavKey = `${getPConnect().getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID)}-CaseView-ActiveTab`;\n PCore.getNavigationUtils().setComponentState(activeTabNavKey, { id: currentTabId });\n\n return () => {\n if (getPConnect().getContextName()?.includes('/modal')) {\n PCore.getNavigationUtils().setComponentState(navigationKey, { activeTab: firstTabId });\n }\n };\n }, [currentTabId, children]);\n\n const handleTabClick = useCallback(\n (event: SyntheticEvent, id: string) => {\n tabClick(id, tabData, currentTabId, setCurrentTabId);\n },\n [tabData, currentTabId]\n );\n\n const tabItems = useMemo(() => tabData?.filter((tab: any) => tab.visibility()) ?? [], [tabData, tabVisibilityStr]);\n\n const tabsRef = useRef(tabItems);\n tabsRef.current = tabItems;\n\n const updateTabErrorsOnViewMutate = useCallback((messageObject: any, tab: any) => {\n if (!messageObject.type) {\n return;\n }\n const previousTabErrors = tabErrorsRef.current;\n let currentTabState = previousTabErrors[tab.id] || {};\n const { MESSAGES_TYPE_ERROR } = PCore.getConstants().MESSAGES;\n if (messageObject.type !== MESSAGES_TYPE_ERROR) {\n delete currentTabState[messageObject.fieldName];\n currentTabState = Object.keys(currentTabState).length > 0 ? currentTabState : undefined;\n } else {\n currentTabState = { ...currentTabState, [messageObject.fieldName]: messageObject.messages };\n }\n const newErrors = { ...previousTabErrors, [tab.id]: currentTabState };\n tabErrorsRef.current = newErrors;\n setTabErrors(newErrors);\n }, []);\n\n useEffect(() => {\n const rawConfig = '_rawConfig';\n tabItems.forEach((tab: any) => {\n PCore.getContextTreeManager().onViewMutate(\n tab.getPConnect().getContextName(),\n tab.getPConnect().getPageReference(),\n tab.getPConnect()[rawConfig].config?.name,\n (messageObject: any) => updateTabErrorsOnViewMutate(messageObject, tab)\n );\n });\n }, [tabItems, updateTabErrorsOnViewMutate]);\n\n const navigateToFirstErrorTab = useCallback(() => {\n const currentErrors = tabErrorsRef.current;\n const firstTabWithError = tabsRef.current.find((tab: any) => {\n const tabErrorState = currentErrors[tab.id];\n return tabErrorState && Object.keys(tabErrorState).length > 0;\n });\n if (firstTabWithError) {\n submitAttemptedRef.current = false;\n setCurrentTabId(firstTabWithError.id);\n }\n }, []);\n\n const highlightFirstErrorTab = useCallback(() => {\n submitAttemptedRef.current = true;\n navigateToFirstErrorTab();\n }, [navigateToFirstErrorTab]);\n\n useEffect(() => {\n const { CURRENT_ASSIGNMENT_UPDATED } = PCore.getConstants().PUB_SUB_EVENTS.CASE_EVENTS;\n PCore.getPubSubUtils().subscribe(\n CURRENT_ASSIGNMENT_UPDATED,\n () => {\n tabErrorsRef.current = {};\n submitAttemptedRef.current = false;\n setTabErrors({});\n },\n 'CURRENT_ASSIGNMENT_UPDATED-HierarchicalForm'\n );\n\n PCore.getPubSubUtils().subscribe(\n PCore.getConstants().PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,\n highlightFirstErrorTab,\n 'ERROR_ON_FINISH_ASSIGNMENT-HierarchicalForm'\n );\n\n return () => {\n PCore.getPubSubUtils().unsubscribe(CURRENT_ASSIGNMENT_UPDATED, 'CURRENT_ASSIGNMENT_UPDATED-HierarchicalForm');\n PCore.getPubSubUtils().unsubscribe(\n PCore.getConstants().PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,\n 'ERROR_ON_FINISH_ASSIGNMENT-HierarchicalForm'\n );\n };\n }, []);\n\n useEffect(() => {\n if (submitAttemptedRef.current) {\n navigateToFirstErrorTab();\n }\n }, [tabErrors, navigateToFirstErrorTab]);\n\n const processedTabs = useMemo(() => {\n return tabItems.map(tab => {\n const errorKeys = Object.keys(tabErrors[tab.id] ?? {});\n const errors = errorKeys.length > 0 ? errorKeys.reduce((sum, fieldName) => sum + tabErrors[tab.id][fieldName].length, 0) : undefined;\n return { ...tab, errors };\n });\n }, [tabItems, tabErrors]);\n\n return { currentTabId, handleTabClick, processedTabs, instructions };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/template/HierarchicalForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/template/HierarchicalForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { default } from './HierarchicalForm';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { PConnProps } from '../../../types/PConnProps';
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
interface InlineDashboardProps extends PConnProps {
|
|
4
4
|
title: string;
|
|
5
5
|
filterPosition?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineDashboard.d.ts","sourceRoot":"","sources":["../../../../src/components/template/InlineDashboard/InlineDashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InlineDashboard.d.ts","sourceRoot":"","sources":["../../../../src/components/template/InlineDashboard/InlineDashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,OAAO,CAAC;AAG7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,oBAAqB,SAAQ,UAAU;IAE/C,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA6BD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,2CAiCrF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Grid2, Typography } from '@mui/material';
|
|
3
3
|
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
const useStyles = makeStyles(( /* theme */) => ({
|
|
5
5
|
headerStyles: {
|
|
@@ -32,6 +32,6 @@ export default function InlineDashboard(props) {
|
|
|
32
32
|
const { children, title, filterPosition } = props;
|
|
33
33
|
const childrenToRender = children;
|
|
34
34
|
const direction = filterPosition === 'inline-start' ? 'row-reverse' : 'row';
|
|
35
|
-
return (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: 'h4', className: classes.headerStyles, children: title }), filterPosition === 'block-start' && (_jsxs(
|
|
35
|
+
return (_jsxs(_Fragment, { children: [_jsx(Typography, { variant: 'h4', className: classes.headerStyles, children: title }), filterPosition === 'block-start' && (_jsxs(Grid2, { container: true, spacing: 2, direction: 'column-reverse', className: classes.containerStyles, children: [_jsx(Grid2, { size: { xs: 12 }, className: classes.colStyles, children: childrenToRender[0] }), _jsx(Grid2, { id: 'filters', size: { xs: 12 }, className: classes.filterContainerStyles, children: childrenToRender[1] })] })), filterPosition !== 'block-start' && (_jsxs(Grid2, { container: true, spacing: 2, direction: direction, className: classes.containerStyles, children: [_jsx(Grid2, { size: { xs: 9 }, children: childrenToRender[0] }), _jsx(Grid2, { id: 'filters', size: { xs: 3 }, className: classes.inlineStyles, children: childrenToRender[1] })] }))] }));
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=InlineDashboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineDashboard.js","sourceRoot":"","sources":["../../../../src/components/template/InlineDashboard/InlineDashboard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InlineDashboard.js","sourceRoot":"","sources":["../../../../src/components/template/InlineDashboard/InlineDashboard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAShD,MAAM,SAAS,GAAG,UAAU,CAAC,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC7C,YAAY,EAAE;QACZ,UAAU,EAAE,GAAG;QACf,QAAQ,EAAE,SAAS;KACpB;IACD,eAAe,EAAE;QACf,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,MAAM;KACrB;IACD,SAAS,EAAE;QACT,OAAO,EAAE,MAAM;QACf,GAAG,EAAE,MAAM;QACX,YAAY,EAAE,UAAU;KACzB;IACD,qBAAqB,EAAE;QACrB,OAAO,EAAE,MAAM;QACf,GAAG,EAA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AI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,YAAG,gBAAgB,CAAC,CAAC,CAAC,GAAS,EACrD,KAAC,KAAK,IAAC,EAAE,EAAC,SAAS,EAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,YAAY,YACjE,gBAAgB,CAAC,CAAC,CAAC,GACd,IACF,CACT,IACA,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import type { PropsWithChildren, ReactElement } from 'react';\nimport { Grid2, Typography } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface InlineDashboardProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n title: string;\n filterPosition?: string;\n}\n\nconst useStyles = makeStyles((/* theme */) => ({\n headerStyles: {\n fontWeight: 500,\n fontSize: '1.25rem'\n },\n containerStyles: {\n marginTop: '1rem',\n marginBottom: '1rem'\n },\n colStyles: {\n display: 'grid',\n gap: '1rem',\n alignContent: 'baseline'\n },\n filterContainerStyles: {\n display: 'grid',\n gap: '1rem',\n gridTemplateColumns: 'repeat(7, 1fr);'\n },\n inlineStyles: {\n display: 'grid',\n gap: '1rem',\n alignContent: 'baseline',\n marginTop: '1rem'\n }\n}));\n\nexport default function InlineDashboard(props: PropsWithChildren<InlineDashboardProps>) {\n const classes = useStyles();\n\n const { children, title, filterPosition } = props;\n const childrenToRender = children as ReactElement[];\n\n const direction = filterPosition === 'inline-start' ? 'row-reverse' : 'row';\n return (\n <>\n <Typography variant='h4' className={classes.headerStyles}>\n {title}\n </Typography>\n\n {filterPosition === 'block-start' && (\n <Grid2 container spacing={2} direction='column-reverse' className={classes.containerStyles}>\n <Grid2 size={{ xs: 12 }} className={classes.colStyles}>\n {childrenToRender[0]}\n </Grid2>\n <Grid2 id='filters' size={{ xs: 12 }} className={classes.filterContainerStyles}>\n {childrenToRender[1]}\n </Grid2>\n </Grid2>\n )}\n {filterPosition !== 'block-start' && (\n <Grid2 container spacing={2} direction={direction} className={classes.containerStyles}>\n <Grid2 size={{ xs: 9 }}>{childrenToRender[0]}</Grid2>\n <Grid2 id='filters' size={{ xs: 3 }} className={classes.inlineStyles}>\n {childrenToRender[1]}\n </Grid2>\n </Grid2>\n )}\n </>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { PConnProps } from '../../../types/PConnProps';
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
interface InlineDashboardPageProps extends PConnProps {
|
|
4
4
|
title: string;
|
|
5
5
|
icon?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineDashboardPage.d.ts","sourceRoot":"","sources":["../../../../src/components/template/InlineDashboardPage/InlineDashboardPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InlineDashboardPage.d.ts","sourceRoot":"","sources":["../../../../src/components/template/InlineDashboardPage/InlineDashboardPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAIvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,wBAAyB,SAAQ,UAAU;IAEnD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,CAAC,wBAAwB,CAAC,2CAyB7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineDashboardPage.js","sourceRoot":"","sources":["../../../../src/components/template/InlineDashboardPage/InlineDashboardPage.tsx"],"names":[],"mappings":";AAAA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CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IACxC,eAAe;IACf,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC;IAE3C,OAAO,KAAC,eAAe,OAAK,WAAW,GAAI,CAAC;AAC9C,CAAC","sourcesContent":["import { useMemo, Children, useEffect, useState, type PropsWithChildren } from 'react';\n\nimport { buildFilterComponents } from '../../infra/DashboardFilter/filterUtils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface InlineDashboardPageProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n title: string;\n icon?: string;\n filterPosition?: string;\n}\n\nexport default function InlineDashboardPage(props: PropsWithChildren<InlineDashboardPageProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const InlineDashboard = getComponentFromMap('InlineDashboard');\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children, getPConnect, icon = '', filterPosition = 'block-start' } = props;\n const [filterComponents, setFilterComponents] = useState([]);\n const childArray = useMemo(() => {\n return Children.toArray(children);\n }, [children]);\n\n const allFilters = (getPConnect().getRawMetadata() as any).children[1];\n\n useEffect(() => {\n setFilterComponents(buildFilterComponents(getPConnect, allFilters));\n }, []);\n\n const inlineProps = { ...props };\n inlineProps.children = [];\n // Region layout views\n inlineProps.children[0] = childArray[0];\n // filter items\n inlineProps.children[1] = filterComponents;\n\n return <InlineDashboard {...inlineProps} />;\n}\n"]}
|