@pega/react-sdk-components 24.2.11 → 25.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/Context/StoreContext.d.ts +0 -1
- package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +0 -6
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +11 -14
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +50 -35
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +2 -2
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +32 -4
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +12 -2
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +52 -3
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +2 -2
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +0 -2
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +3 -6
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +4 -7
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +2 -4
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +6 -9
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +6 -7
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +2 -2
- package/lib/components/field/Group/Group.d.ts.map +1 -1
- package/lib/components/field/Group/Group.js +4 -3
- package/lib/components/field/Group/Group.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +4 -5
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Location/Location.css +4 -0
- package/lib/components/field/Location/Location.d.ts +11 -0
- package/lib/components/field/Location/Location.d.ts.map +1 -0
- package/lib/components/field/Location/Location.js +158 -0
- package/lib/components/field/Location/Location.js.map +1 -0
- package/lib/components/field/Location/index.d.ts +2 -0
- package/lib/components/field/Location/index.d.ts.map +1 -0
- package/lib/components/field/Location/index.js +2 -0
- package/lib/components/field/Location/index.js.map +1 -0
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
- package/lib/components/field/Multiselect/utils.d.ts +2 -1
- package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
- package/lib/components/field/Multiselect/utils.js +1 -1
- package/lib/components/field/Multiselect/utils.js.map +1 -1
- package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
- package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
- package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
- package/lib/components/field/ObjectReference/index.d.ts +2 -0
- package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/index.js +2 -0
- package/lib/components/field/ObjectReference/index.js.map +1 -0
- package/lib/components/field/ObjectReference/utils.d.ts +17 -0
- package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/utils.js +99 -0
- package/lib/components/field/ObjectReference/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +2 -5
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +6 -4
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.css +79 -0
- package/lib/components/field/RichText/RichText.d.ts +2 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +1 -0
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +1 -2
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
- package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/SelectableCard.js +57 -0
- package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
- package/lib/components/field/SelectableCard/index.d.ts +2 -0
- package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/index.js +2 -0
- package/lib/components/field/SelectableCard/index.js.map +1 -0
- package/lib/components/field/SelectableCard/utils.d.ts +13 -0
- package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/utils.js +183 -0
- package/lib/components/field/SelectableCard/utils.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +1 -1
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +4 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +0 -1
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +4 -5
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +2 -5
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +4 -5
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +1 -2
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +1 -2
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentShared.d.ts +2 -0
- package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
- package/lib/components/helpers/attachmentShared.js +6 -0
- package/lib/components/helpers/attachmentShared.js.map +1 -0
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -1
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +1 -2
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +0 -1
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts +1 -1
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +1 -0
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +8 -4
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +1 -0
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
- package/lib/components/helpers/object-utils.d.ts +9 -0
- package/lib/components/helpers/object-utils.d.ts.map +1 -0
- package/lib/components/helpers/object-utils.js +11 -0
- package/lib/components/helpers/object-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +111 -5
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -0
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +7 -1
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +0 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +32 -28
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +15 -79
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -5
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +3 -4
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
- package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/container-helpers.js +46 -1
- package/lib/components/infra/Containers/container-helpers.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +1 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +2 -4
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +48 -70
- package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +19 -37
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +13 -7
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +1 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +2 -3
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +1 -1
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +0 -1
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +1 -1
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +2 -2
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +2 -2
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +2 -1
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js +68 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +23 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +26 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +179 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +25 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
- package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/index.js +2 -0
- package/lib/components/template/AdvancedSearch/index.js.map +1 -0
- package/lib/components/template/AppShell/AppShell.css +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +2 -2
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +10 -13
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +24 -37
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +2 -2
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +13 -15
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +0 -1
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +9 -2
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +239 -80
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
- package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
- package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
- package/lib/components/template/DataReference/SearchForm.js +87 -0
- package/lib/components/template/DataReference/SearchForm.js.map +1 -0
- package/lib/components/template/DataReference/utils.d.ts +15 -0
- package/lib/components/template/DataReference/utils.d.ts.map +1 -0
- package/lib/components/template/DataReference/utils.js +75 -0
- package/lib/components/template/DataReference/utils.js.map +1 -0
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.js +1 -2
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
- package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
- package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
- package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
- package/lib/components/template/DefaultPage/index.d.ts +2 -0
- package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/index.js +2 -0
- package/lib/components/template/DefaultPage/index.js.map +1 -0
- package/lib/components/template/Details/Details/Details.d.ts +1 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +2 -3
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -2
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +4 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +133 -64
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +2 -5
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +28 -5
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +73 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.js +2 -0
- package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +34 -32
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +102 -1
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/template/utils.d.ts +7 -0
- package/lib/components/template/utils.d.ts.map +1 -0
- package/lib/components/template/utils.js +52 -0
- package/lib/components/template/utils.js.map +1 -0
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +6 -8
- package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +255 -202
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
- package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
- package/lib/components/widget/Attachment/Attachment.types.js +2 -0
- package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +2 -2
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +0 -2
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +1 -13
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +21 -16
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
- package/lib/hooks/useAfterInitialEffect.js.map +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
- package/lib/hooks/useFocusFirstField.js.map +1 -1
- package/lib/hooks/useGetTabsCount.d.ts +10 -0
- package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
- package/lib/hooks/useGetTabsCount.js +165 -0
- package/lib/hooks/useGetTabsCount.js.map +1 -0
- package/lib/hooks/useIsMount.d.ts +2 -0
- package/lib/hooks/useIsMount.d.ts.map +1 -0
- package/lib/hooks/useIsMount.js +9 -0
- package/lib/hooks/useIsMount.js.map +1 -0
- package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
- package/lib/mediaco/ToDo/ToDo.css +81 -0
- package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
- package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
- package/lib/mediaco/ToDo/ToDo.js +187 -0
- package/lib/mediaco/ToDo/ToDo.js.map +1 -0
- package/lib/mediaco/ToDo/index.d.ts +2 -0
- package/lib/mediaco/ToDo/index.d.ts.map +1 -0
- package/lib/mediaco/ToDo/index.js +2 -0
- package/lib/mediaco/ToDo/index.js.map +1 -0
- package/lib/samples/Embedded/styles.css +26 -0
- package/lib/sdk-pega-component-map.d.ts +119 -103
- package/lib/sdk-pega-component-map.d.ts.map +1 -1
- package/lib/sdk-pega-component-map.js +20 -3
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/theme.d.ts +30 -1
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +209 -2
- package/lib/theme.js.map +1 -1
- package/lib/types/PConnProps.d.ts +1 -1
- package/package.json +32 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +0 -13
- package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
- package/lib/components/helpers/attachmentHelpers.js +0 -72
- package/lib/components/helpers/attachmentHelpers.js.map +0 -1
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import Grid2 from '@mui/material/Grid2';
|
|
4
|
+
import { SELECTION_MODE, generateColumns, getDataRelationshipContextFromKey } from './utils';
|
|
5
|
+
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
6
|
+
export default function ObjectReference(props) {
|
|
7
|
+
const { getPConnect, displayMode, allowAndPersistChangesInReviewMode: editableInReview = false, targetObjectType, mode = '', parameters, hideLabel = false, inline = false, showPromotedFilters = false, additionalFields } = props;
|
|
8
|
+
const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');
|
|
9
|
+
// Configs
|
|
10
|
+
const pConn = getPConnect();
|
|
11
|
+
const referenceType = targetObjectType === 'case' ? 'Case' : 'Data';
|
|
12
|
+
const rawViewMetadata = pConn.getRawMetadata();
|
|
13
|
+
const refFieldMetadata = pConn.getFieldMetadata(rawViewMetadata?.config?.value?.split('.', 2)[1]);
|
|
14
|
+
// Destructured properties
|
|
15
|
+
const propsToUse = { ...pConn.getInheritedProps(), ...props };
|
|
16
|
+
// Computed variables
|
|
17
|
+
const isDisplayModeEnabled = displayMode === 'DISPLAY_ONLY';
|
|
18
|
+
const canBeChangedInReviewMode = editableInReview && ['Autocomplete', 'Dropdown'].includes(rawViewMetadata.config.componentType);
|
|
19
|
+
// Editable first child on change handler
|
|
20
|
+
const onRecordChange = event => {
|
|
21
|
+
const caseKey = pConn.getCaseInfo().getKey();
|
|
22
|
+
const refreshOptions = { autoDetectRefresh: true, propertyName: '' };
|
|
23
|
+
refreshOptions.propertyName = rawViewMetadata.config?.value;
|
|
24
|
+
if (!canBeChangedInReviewMode || !pConn.getValue('__currentPageTabViewName')) {
|
|
25
|
+
const pgRef = pConn.getPageReference().replace('caseInfo.content', '');
|
|
26
|
+
const viewName = rawViewMetadata.name;
|
|
27
|
+
if (viewName && viewName.length > 0) {
|
|
28
|
+
getPConnect().getActionsApi().refreshCaseView(caseKey, viewName, pgRef, refreshOptions);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value if event.id is unset
|
|
32
|
+
// When value is empty propValue will be undefined here and no value will be set for the reference
|
|
33
|
+
const propValue = event?.id || event?.target?.value;
|
|
34
|
+
const propName = rawViewMetadata.type === 'SimpleTableSelect' && mode === SELECTION_MODE.MULTI
|
|
35
|
+
? PCore.getAnnotationUtils().getPropertyName(rawViewMetadata.config.selectionList)
|
|
36
|
+
: PCore.getAnnotationUtils().getPropertyName(rawViewMetadata.config?.value);
|
|
37
|
+
if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {
|
|
38
|
+
PCore.getCaseUtils()
|
|
39
|
+
.getCaseEditLock(caseKey, '')
|
|
40
|
+
.then(caseResponse => {
|
|
41
|
+
const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');
|
|
42
|
+
let curr = {};
|
|
43
|
+
const commitData = curr;
|
|
44
|
+
pageTokens.forEach(el => {
|
|
45
|
+
if (el !== '') {
|
|
46
|
+
curr[el] = {};
|
|
47
|
+
curr = curr[el];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
// expecting format like {Customer: {pyID:"C-100"}}
|
|
51
|
+
const propArr = propName.split('.');
|
|
52
|
+
propArr.forEach((element, idx) => {
|
|
53
|
+
if (idx + 1 === propArr.length) {
|
|
54
|
+
curr[element] = propValue;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
curr[element] = {};
|
|
58
|
+
curr = curr[element];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
PCore.getCaseUtils()
|
|
62
|
+
.updateCaseEditFieldsData(caseKey, { [caseKey]: commitData }, caseResponse.headers.etag, pConn.getContextName())
|
|
63
|
+
.then(response => {
|
|
64
|
+
PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), response.data.data.caseInfo.lastUpdateTime);
|
|
65
|
+
PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
// Prepare first child
|
|
71
|
+
const recreatedFirstChild = useMemo(() => {
|
|
72
|
+
const type = rawViewMetadata.config.componentType;
|
|
73
|
+
/* Read-only variants */
|
|
74
|
+
if (type === 'SemanticLink' && !canBeChangedInReviewMode) {
|
|
75
|
+
const config = {
|
|
76
|
+
...rawViewMetadata.config,
|
|
77
|
+
primaryField: rawViewMetadata.config.displayField
|
|
78
|
+
};
|
|
79
|
+
config.caseClass = rawViewMetadata.config.targetObjectClass;
|
|
80
|
+
config.text = config.primaryField;
|
|
81
|
+
config.caseID = config.value;
|
|
82
|
+
config.contextPage = `@P .${rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null}`;
|
|
83
|
+
config.resourceParams = {
|
|
84
|
+
workID: config.value
|
|
85
|
+
};
|
|
86
|
+
config.resourcePayload = {
|
|
87
|
+
caseClassName: config.caseClass
|
|
88
|
+
};
|
|
89
|
+
return getPConnect().createComponent({
|
|
90
|
+
type: 'SemanticLink',
|
|
91
|
+
config: {
|
|
92
|
+
...config,
|
|
93
|
+
displayMode,
|
|
94
|
+
referenceType,
|
|
95
|
+
hideLabel,
|
|
96
|
+
dataRelationshipContext: rawViewMetadata.config?.displayField
|
|
97
|
+
? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField)
|
|
98
|
+
: null
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
if (isDisplayModeEnabled && !canBeChangedInReviewMode) {
|
|
103
|
+
return (_jsx(SingleReferenceReadonly, { config: {
|
|
104
|
+
...rawViewMetadata.config,
|
|
105
|
+
primaryField: rawViewMetadata.config.displayField
|
|
106
|
+
}, getPConnect: getPConnect, label: propsToUse.label, type: type, displayAs: 'readonly', displayMode: displayMode, activeViewRuleClass: rawViewMetadata.config.targetObjectClass, referenceType: referenceType, hideLabel: hideLabel, dataRelationshipContext: rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null, additionalFields: additionalFields }));
|
|
107
|
+
}
|
|
108
|
+
// 1) Set datasource
|
|
109
|
+
generateColumns(rawViewMetadata.config, pConn, referenceType);
|
|
110
|
+
rawViewMetadata.config.deferDatasource = true;
|
|
111
|
+
rawViewMetadata.config.listType = 'datapage';
|
|
112
|
+
if (['Dropdown', 'AutoComplete'].includes(type) && !rawViewMetadata.config.placeholder) {
|
|
113
|
+
rawViewMetadata.config.placeholder = '@L Select...';
|
|
114
|
+
}
|
|
115
|
+
// 2) Pass through configs
|
|
116
|
+
rawViewMetadata.config.showPromotedFilters = showPromotedFilters;
|
|
117
|
+
if (!canBeChangedInReviewMode) {
|
|
118
|
+
rawViewMetadata.config.displayMode = displayMode;
|
|
119
|
+
}
|
|
120
|
+
// 3) Define field meta
|
|
121
|
+
let fieldMetaData = null;
|
|
122
|
+
fieldMetaData = {
|
|
123
|
+
datasourceMetadata: {
|
|
124
|
+
datasource: {
|
|
125
|
+
parameters: {}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
if (rawViewMetadata.config?.parameters) {
|
|
130
|
+
fieldMetaData.datasourceMetadata.datasource.parameters = parameters;
|
|
131
|
+
}
|
|
132
|
+
fieldMetaData.datasourceMetadata.datasource.propertyForDisplayText = rawViewMetadata?.config?.datasource?.fields?.text.startsWith('@P')
|
|
133
|
+
? rawViewMetadata?.config?.datasource?.fields?.text?.substring(3)
|
|
134
|
+
: rawViewMetadata?.config?.datasource?.fields?.text;
|
|
135
|
+
fieldMetaData.datasourceMetadata.datasource.propertyForValue = rawViewMetadata?.config?.datasource?.fields?.value.startsWith('@P')
|
|
136
|
+
? rawViewMetadata?.config?.datasource?.fields?.value?.substring(3)
|
|
137
|
+
: rawViewMetadata?.config?.datasource?.fields?.value;
|
|
138
|
+
fieldMetaData.datasourceMetadata.datasource.name = rawViewMetadata.config?.referenceList;
|
|
139
|
+
return getPConnect().createComponent({
|
|
140
|
+
type,
|
|
141
|
+
config: {
|
|
142
|
+
...rawViewMetadata.config,
|
|
143
|
+
descriptors: mode === SELECTION_MODE.SINGLE ? refFieldMetadata?.descriptors : null,
|
|
144
|
+
datasourceMetadata: fieldMetaData?.datasourceMetadata,
|
|
145
|
+
required: propsToUse.required,
|
|
146
|
+
visibility: propsToUse.visibility,
|
|
147
|
+
disabled: propsToUse.disabled,
|
|
148
|
+
label: propsToUse.label,
|
|
149
|
+
parameters: rawViewMetadata.config.parameters,
|
|
150
|
+
readOnly: false,
|
|
151
|
+
localeReference: rawViewMetadata.config.localeReference,
|
|
152
|
+
...(mode === SELECTION_MODE.SINGLE ? { referenceType } : ''),
|
|
153
|
+
contextClass: rawViewMetadata.config.targetObjectClass,
|
|
154
|
+
primaryField: rawViewMetadata.config?.displayField,
|
|
155
|
+
dataRelationshipContext: rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null,
|
|
156
|
+
hideLabel,
|
|
157
|
+
onRecordChange,
|
|
158
|
+
inline
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}, [rawViewMetadata.config?.datasource?.source, parameters, propsToUse.required, propsToUse.disabled, getPConnect().getPageReference()]);
|
|
162
|
+
// Prepare children to render
|
|
163
|
+
return (_jsx(Grid2, { container: true, children: _jsx(Grid2, { children: recreatedFirstChild }) }));
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=ObjectReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectReference.js","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/ObjectReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAiBhF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAA2B;IACjE,MAAM,EACJ,WAAW,EACX,WAAW,EACX,kCAAkC,EAAE,gBAAgB,GAAG,KAAK,EAC5D,gBAAgB,EAChB,IAAI,GAAG,EAAE,EACT,UAAU,EACV,SAAS,GAAG,K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,MAAM,CAAC,UAAU;gBAC7C,QAAQ,EAAE,KAAK;gBACf,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC,eAAe;gBACvD,GAAG,CAAC,IAAI,KAAK,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5D,YAAY,EAAE,eAAe,CAAC,MAAM,CAAC,iBAAiB;gBACtD,YAAY,EAAE,eAAe,CAAC,MAAM,EAAE,YAAY;gBAClD,uBAAuB,EAAE,eAAe,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,iCAAiC,CAAC,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC7I,SAAS;gBACT,cAAc;gBACd,MAAM;aACP;SACF,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,WAAW,EAAE,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;IAEzI,6BAA6B;IAC7B,OAAO,CACL,KAAC,KAAK,IAAC,SAAS,kBACd,KAAC,KAAK,cAAE,mBAAmB,GAAS,GAC9B,CACT,CAAC;AACJ,CAAC","sourcesContent":["import { useMemo } from 'react';\n\nimport Grid2 from '@mui/material/Grid2';\n\nimport { SELECTION_MODE, generateColumns, getDataRelationshipContextFromKey } from './utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface ObjectReferenceProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on ObjectReference here\n getPConnect: any;\n displayMode;\n allowAndPersistChangesInReviewMode: any;\n targetObjectType: any;\n mode: string;\n parameters: object;\n hideLabel: boolean;\n inline: boolean;\n showPromotedFilters: boolean;\n additionalFields: any;\n}\n\nexport default function ObjectReference(props: ObjectReferenceProps) {\n const {\n getPConnect,\n displayMode,\n allowAndPersistChangesInReviewMode: editableInReview = false,\n targetObjectType,\n mode = '',\n parameters,\n hideLabel = false,\n inline = false,\n showPromotedFilters = false,\n additionalFields\n } = props;\n\n const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');\n\n // Configs\n const pConn = getPConnect();\n const referenceType = targetObjectType === 'case' ? 'Case' : 'Data';\n const rawViewMetadata = pConn.getRawMetadata();\n const refFieldMetadata = pConn.getFieldMetadata(rawViewMetadata?.config?.value?.split('.', 2)[1]);\n\n // Destructured properties\n const propsToUse = { ...pConn.getInheritedProps(), ...props };\n\n // Computed variables\n const isDisplayModeEnabled = displayMode === 'DISPLAY_ONLY';\n const canBeChangedInReviewMode = editableInReview && ['Autocomplete', 'Dropdown'].includes(rawViewMetadata.config.componentType);\n\n // Editable first child on change handler\n const onRecordChange = event => {\n const caseKey = pConn.getCaseInfo().getKey();\n const refreshOptions = { autoDetectRefresh: true, propertyName: '' };\n refreshOptions.propertyName = rawViewMetadata.config?.value;\n\n if (!canBeChangedInReviewMode || !pConn.getValue('__currentPageTabViewName')) {\n const pgRef = pConn.getPageReference().replace('caseInfo.content', '');\n const viewName = rawViewMetadata.name;\n if (viewName && viewName.length > 0) {\n getPConnect().getActionsApi().refreshCaseView(caseKey, viewName, pgRef, refreshOptions);\n }\n }\n\n // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value if event.id is unset\n // When value is empty propValue will be undefined here and no value will be set for the reference\n const propValue = event?.id || event?.target?.value;\n const propName =\n rawViewMetadata.type === 'SimpleTableSelect' && mode === SELECTION_MODE.MULTI\n ? PCore.getAnnotationUtils().getPropertyName(rawViewMetadata.config.selectionList)\n : PCore.getAnnotationUtils().getPropertyName(rawViewMetadata.config?.value);\n\n if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {\n PCore.getCaseUtils()\n .getCaseEditLock(caseKey, '')\n .then(caseResponse => {\n const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');\n let curr = {};\n const commitData = curr;\n\n pageTokens.forEach(el => {\n if (el !== '') {\n curr[el] = {};\n curr = curr[el];\n }\n });\n\n // expecting format like {Customer: {pyID:\"C-100\"}}\n const propArr = propName.split('.');\n propArr.forEach((element, idx) => {\n if (idx + 1 === propArr.length) {\n curr[element] = propValue;\n } else {\n curr[element] = {};\n curr = curr[element];\n }\n });\n\n PCore.getCaseUtils()\n .updateCaseEditFieldsData(caseKey, { [caseKey]: commitData }, caseResponse.headers.etag, pConn.getContextName())\n .then(response => {\n PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), (response.data as any).data.caseInfo.lastUpdateTime);\n PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);\n });\n });\n }\n };\n\n // Prepare first child\n const recreatedFirstChild = useMemo(() => {\n const type = rawViewMetadata.config.componentType;\n\n /* Read-only variants */\n if (type === 'SemanticLink' && !canBeChangedInReviewMode) {\n const config = {\n ...rawViewMetadata.config,\n primaryField: rawViewMetadata.config.displayField\n };\n config.caseClass = rawViewMetadata.config.targetObjectClass;\n config.text = config.primaryField;\n config.caseID = config.value;\n config.contextPage = `@P .${\n rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null\n }`;\n config.resourceParams = {\n workID: config.value\n };\n config.resourcePayload = {\n caseClassName: config.caseClass\n };\n\n return getPConnect().createComponent({\n type: 'SemanticLink',\n config: {\n ...config,\n displayMode,\n referenceType,\n hideLabel,\n dataRelationshipContext: rawViewMetadata.config?.displayField\n ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField)\n : null\n }\n });\n }\n if (isDisplayModeEnabled && !canBeChangedInReviewMode) {\n return (\n <SingleReferenceReadonly\n config={{\n ...rawViewMetadata.config,\n primaryField: rawViewMetadata.config.displayField\n }}\n getPConnect={getPConnect}\n label={propsToUse.label}\n type={type}\n displayAs='readonly'\n displayMode={displayMode}\n activeViewRuleClass={rawViewMetadata.config.targetObjectClass} // for older views which may not have context class set, fall back to previous behavior\n referenceType={referenceType}\n hideLabel={hideLabel}\n dataRelationshipContext={\n rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null\n }\n additionalFields={additionalFields}\n />\n );\n }\n\n // 1) Set datasource\n generateColumns(rawViewMetadata.config, pConn, referenceType);\n rawViewMetadata.config.deferDatasource = true;\n rawViewMetadata.config.listType = 'datapage';\n if (['Dropdown', 'AutoComplete'].includes(type) && !rawViewMetadata.config.placeholder) {\n rawViewMetadata.config.placeholder = '@L Select...';\n }\n\n // 2) Pass through configs\n rawViewMetadata.config.showPromotedFilters = showPromotedFilters;\n\n if (!canBeChangedInReviewMode) {\n rawViewMetadata.config.displayMode = displayMode;\n }\n\n // 3) Define field meta\n let fieldMetaData: any = null;\n\n fieldMetaData = {\n datasourceMetadata: {\n datasource: {\n parameters: {}\n }\n }\n };\n if (rawViewMetadata.config?.parameters) {\n fieldMetaData.datasourceMetadata.datasource.parameters = parameters;\n }\n fieldMetaData.datasourceMetadata.datasource.propertyForDisplayText = rawViewMetadata?.config?.datasource?.fields?.text.startsWith('@P')\n ? rawViewMetadata?.config?.datasource?.fields?.text?.substring(3)\n : rawViewMetadata?.config?.datasource?.fields?.text;\n fieldMetaData.datasourceMetadata.datasource.propertyForValue = rawViewMetadata?.config?.datasource?.fields?.value.startsWith('@P')\n ? rawViewMetadata?.config?.datasource?.fields?.value?.substring(3)\n : rawViewMetadata?.config?.datasource?.fields?.value;\n fieldMetaData.datasourceMetadata.datasource.name = rawViewMetadata.config?.referenceList;\n\n return getPConnect().createComponent({\n type,\n config: {\n ...rawViewMetadata.config,\n descriptors: mode === SELECTION_MODE.SINGLE ? refFieldMetadata?.descriptors : null,\n datasourceMetadata: fieldMetaData?.datasourceMetadata,\n required: propsToUse.required,\n visibility: propsToUse.visibility,\n disabled: propsToUse.disabled,\n label: propsToUse.label,\n parameters: rawViewMetadata.config.parameters,\n readOnly: false,\n localeReference: rawViewMetadata.config.localeReference,\n ...(mode === SELECTION_MODE.SINGLE ? { referenceType } : ''),\n contextClass: rawViewMetadata.config.targetObjectClass,\n primaryField: rawViewMetadata.config?.displayField,\n dataRelationshipContext: rawViewMetadata.config?.displayField ? getDataRelationshipContextFromKey(rawViewMetadata.config.displayField) : null,\n hideLabel,\n onRecordChange,\n inline\n }\n });\n }, [rawViewMetadata.config?.datasource?.source, parameters, propsToUse.required, propsToUse.disabled, getPConnect().getPageReference()]);\n\n // Prepare children to render\n return (\n <Grid2 container>\n <Grid2>{recreatedFirstChild}</Grid2>\n </Grid2>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { default } from './ObjectReference';\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const SELECTION_MODE: {
|
|
2
|
+
SINGLE: string;
|
|
3
|
+
MULTI: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const AT_FILTEREDLIST = "@FILTERED_LIST";
|
|
6
|
+
export declare const AT_PROPERTY = "@P";
|
|
7
|
+
export declare const SQUARE_BRACKET_START = "[";
|
|
8
|
+
export declare const SQUARE_BRACKET_END = "]";
|
|
9
|
+
export declare const SIMPLE_TABLE_MANUAL_READONLY = "SimpleTableManualReadOnly";
|
|
10
|
+
export declare const PAGE = "!P!";
|
|
11
|
+
export declare const PAGELIST = "!PL!";
|
|
12
|
+
export declare const PERIOD = ".";
|
|
13
|
+
export declare function updatePageListPropertyValue(value: any): any;
|
|
14
|
+
export declare function getPropertyValue(value: any): any;
|
|
15
|
+
export declare const generateColumns: (config: any, pConn: any, referenceType: any) => void;
|
|
16
|
+
export declare const getDataRelationshipContextFromKey: (key: any) => any;
|
|
17
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;CAAuC,CAAC;AAMnE,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,IAAI,QAAQ,CAAC;AAC1B,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,MAAM,MAAM,CAAC;AAG1B,wBAAgB,2BAA2B,CAAC,KAAK,KAAA,OAGhD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,KAAA,OASrC;AAcD,eAAO,MAAM,eAAe,GAAI,WAAM,EAAE,UAAK,EAAE,kBAAa,SA6D3D,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAAG,QAAG,QAAwB,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Utils } from '../../helpers/utils';
|
|
2
|
+
export const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
|
|
3
|
+
const getLeafNameFromPropertyName = property => property?.substr(property.lastIndexOf('.'));
|
|
4
|
+
const isSelfReferencedProperty = (param, referenceProp) => param === referenceProp?.split('.', 2)[1];
|
|
5
|
+
export const AT_FILTEREDLIST = '@FILTERED_LIST';
|
|
6
|
+
export const AT_PROPERTY = '@P';
|
|
7
|
+
export const SQUARE_BRACKET_START = '[';
|
|
8
|
+
export const SQUARE_BRACKET_END = ']';
|
|
9
|
+
export const SIMPLE_TABLE_MANUAL_READONLY = 'SimpleTableManualReadOnly';
|
|
10
|
+
export const PAGE = '!P!';
|
|
11
|
+
export const PAGELIST = '!PL!';
|
|
12
|
+
export const PERIOD = '.';
|
|
13
|
+
const AT = '@';
|
|
14
|
+
export function updatePageListPropertyValue(value) {
|
|
15
|
+
value = value.substring(0, value.indexOf(SQUARE_BRACKET_START)) + value.substring(value.indexOf(SQUARE_BRACKET_END) + 1);
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
export function getPropertyValue(value) {
|
|
19
|
+
if (value.startsWith(AT)) {
|
|
20
|
+
value = value.substring(value.indexOf(' ') + 1);
|
|
21
|
+
if (value.startsWith(PERIOD))
|
|
22
|
+
value = value.substring(1);
|
|
23
|
+
}
|
|
24
|
+
if (value.includes(SQUARE_BRACKET_START)) {
|
|
25
|
+
value = updatePageListPropertyValue(value);
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
const getCompositeKeys = (c11nEnv, property) => {
|
|
30
|
+
const { datasource: { parameters = {} } = {} } = c11nEnv.getFieldMetadata(property) || {};
|
|
31
|
+
return Object.values(parameters).reduce((compositeKeys, param) => {
|
|
32
|
+
if (isSelfReferencedProperty(property, param)) {
|
|
33
|
+
let propName = getPropertyValue(param);
|
|
34
|
+
propName = propName.substring(propName.indexOf('.'));
|
|
35
|
+
compositeKeys.push(propName);
|
|
36
|
+
}
|
|
37
|
+
return compositeKeys;
|
|
38
|
+
}, []);
|
|
39
|
+
};
|
|
40
|
+
export const generateColumns = (config, pConn, referenceType) => {
|
|
41
|
+
const displayField = getLeafNameFromPropertyName(config.displayField);
|
|
42
|
+
const referenceProp = config.value.split('.', 2)[1];
|
|
43
|
+
const compositeKeys = getCompositeKeys(pConn, referenceProp);
|
|
44
|
+
let value = getLeafNameFromPropertyName(config.value);
|
|
45
|
+
const columns = [];
|
|
46
|
+
if (displayField) {
|
|
47
|
+
columns.push({
|
|
48
|
+
value: displayField,
|
|
49
|
+
display: 'true',
|
|
50
|
+
useForSearch: true,
|
|
51
|
+
primary: 'true'
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (value && compositeKeys.indexOf(value) !== -1) {
|
|
55
|
+
columns.push({
|
|
56
|
+
value,
|
|
57
|
+
setProperty: 'Associated property',
|
|
58
|
+
key: 'true'
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const actualValue = compositeKeys.length > 0 ? compositeKeys[0] : value;
|
|
63
|
+
config.value = `@P .${referenceProp}${actualValue}`;
|
|
64
|
+
value = actualValue;
|
|
65
|
+
columns.push({
|
|
66
|
+
value: actualValue,
|
|
67
|
+
setProperty: 'Associated property',
|
|
68
|
+
key: 'true'
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
config.datasource = {
|
|
72
|
+
fields: {
|
|
73
|
+
key: getLeafNameFromPropertyName(config.value),
|
|
74
|
+
text: getLeafNameFromPropertyName(config.displayField),
|
|
75
|
+
value: getLeafNameFromPropertyName(config.value)
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
if (referenceType === 'Case') {
|
|
79
|
+
columns.push({
|
|
80
|
+
secondary: 'true',
|
|
81
|
+
display: 'true',
|
|
82
|
+
value: Utils.getMappedKey('pyID'),
|
|
83
|
+
useForSearch: true
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
compositeKeys.forEach(key => {
|
|
87
|
+
if (value !== key)
|
|
88
|
+
columns.push({
|
|
89
|
+
value: key,
|
|
90
|
+
display: 'false',
|
|
91
|
+
secondary: 'true',
|
|
92
|
+
useForSearch: false,
|
|
93
|
+
setProperty: `.${referenceProp}${key}`
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
config.columns = columns;
|
|
97
|
+
};
|
|
98
|
+
export const getDataRelationshipContextFromKey = key => key.split('.', 2)[1];
|
|
99
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|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AAC,MAAM,CAAC,YAAY,CAAC;YACtD,KAAK,EAAE,2BAA2B,CAAC,MAAM,CAAC,KAAK,CAAC;SACjD;KACF,CAAC;IAEF,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;QAC7B,OAAO,CAAC,IAAI,CAAC;YACX,SAAS,EAAE,MAAM;YACjB,OAAO,EAAE,MAAM;YACf,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC;YACjC,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QAC1B,IAAI,KAAK,KAAK,GAAG;YACf,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,GAAG;gBACV,OAAO,EAAE,OAAO;gBAChB,SAAS,EAAE,MAAM;gBACjB,YAAY,EAAE,KAAK;gBACnB,WAAW,EAAE,IAAI,aAAa,GAAG,GAAG,EAAE;aACvC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["import { Utils } from '../../helpers/utils';\n\nexport const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\nconst getLeafNameFromPropertyName = property => property?.substr(property.lastIndexOf('.'));\n\nconst isSelfReferencedProperty = (param, referenceProp) => param === referenceProp?.split('.', 2)[1];\n\nexport const AT_FILTEREDLIST = '@FILTERED_LIST';\nexport const AT_PROPERTY = '@P';\nexport const SQUARE_BRACKET_START = '[';\nexport const SQUARE_BRACKET_END = ']';\n\nexport const SIMPLE_TABLE_MANUAL_READONLY = 'SimpleTableManualReadOnly';\nexport const PAGE = '!P!';\nexport const PAGELIST = '!PL!';\nexport const PERIOD = '.';\nconst AT = '@';\n\nexport function updatePageListPropertyValue(value) {\n value = value.substring(0, value.indexOf(SQUARE_BRACKET_START)) + value.substring(value.indexOf(SQUARE_BRACKET_END) + 1);\n return value;\n}\n\nexport function getPropertyValue(value) {\n if (value.startsWith(AT)) {\n value = value.substring(value.indexOf(' ') + 1);\n if (value.startsWith(PERIOD)) value = value.substring(1);\n }\n if (value.includes(SQUARE_BRACKET_START)) {\n value = updatePageListPropertyValue(value);\n }\n return value;\n}\n\nconst getCompositeKeys = (c11nEnv, property) => {\n const { datasource: { parameters = {} } = {} } = c11nEnv.getFieldMetadata(property) || {};\n return Object.values(parameters).reduce((compositeKeys: any, param) => {\n if (isSelfReferencedProperty(property, param)) {\n let propName = getPropertyValue(param);\n propName = propName.substring(propName.indexOf('.'));\n compositeKeys.push(propName);\n }\n return compositeKeys;\n }, []);\n};\n\nexport const generateColumns = (config, pConn, referenceType) => {\n const displayField = getLeafNameFromPropertyName(config.displayField);\n const referenceProp = config.value.split('.', 2)[1];\n const compositeKeys: any = getCompositeKeys(pConn, referenceProp);\n let value = getLeafNameFromPropertyName(config.value);\n\n const columns: any = [];\n if (displayField) {\n columns.push({\n value: displayField,\n display: 'true',\n useForSearch: true,\n primary: 'true'\n });\n }\n if (value && compositeKeys.indexOf(value) !== -1) {\n columns.push({\n value,\n setProperty: 'Associated property',\n key: 'true'\n });\n } else {\n const actualValue = compositeKeys.length > 0 ? compositeKeys[0] : value;\n config.value = `@P .${referenceProp}${actualValue}`;\n value = actualValue;\n columns.push({\n value: actualValue,\n setProperty: 'Associated property',\n key: 'true'\n });\n }\n\n config.datasource = {\n fields: {\n key: getLeafNameFromPropertyName(config.value),\n text: getLeafNameFromPropertyName(config.displayField),\n value: getLeafNameFromPropertyName(config.value)\n }\n };\n\n if (referenceType === 'Case') {\n columns.push({\n secondary: 'true',\n display: 'true',\n value: Utils.getMappedKey('pyID'),\n useForSearch: true\n });\n }\n\n compositeKeys.forEach(key => {\n if (value !== key)\n columns.push({\n value: key,\n display: 'false',\n secondary: 'true',\n useForSearch: false,\n setProperty: `.${referenceProp}${key}`\n });\n });\n\n config.columns = columns;\n};\n\nexport const getDataRelationshipContextFromKey = key => key.split('.', 2)[1];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Percentage.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Percentage.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAQjE,UAAU,eAAgB,SAAQ,eAAe;IAE/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CA4FxD"}
|
|
@@ -33,10 +33,7 @@ export default function Percentage(props) {
|
|
|
33
33
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
34
34
|
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue, variant: 'stacked' });
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
testProp = {
|
|
38
|
-
'data-test-id': testId
|
|
39
|
-
};
|
|
36
|
+
const testProps = { 'data-test-id': testId };
|
|
40
37
|
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
41
38
|
const theCurrDec = theSymbols.theDecimalIndicator;
|
|
42
39
|
const theCurrSep = theSymbols.theDigitGroupSeparator;
|
|
@@ -48,6 +45,6 @@ export default function Percentage(props) {
|
|
|
48
45
|
};
|
|
49
46
|
return (_jsx(NumericFormat, { valueIsNumericString: true, fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, error: status === 'error', label: label, value: values, onValueChange: val => {
|
|
50
47
|
handleChange(val);
|
|
51
|
-
}, onBlur: !readOnly ? PercentageOnBlur : undefined, decimalSeparator: theCurrDec, thousandSeparator: showGroupSeparators ? theCurrSep : '', decimalScale: decimalPrecision, suffix: '%',
|
|
48
|
+
}, onBlur: !readOnly ? PercentageOnBlur : undefined, decimalSeparator: theCurrDec, thousandSeparator: showGroupSeparators ? theCurrSep : '', decimalScale: decimalPrecision, suffix: '%', slotProps: { input: { ...readOnlyProp, inputProps: { ...testProps } } }, customInput: TextField }));
|
|
52
49
|
}
|
|
53
50
|
//# sourceMappingURL=Percentage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Percentage.js","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAYlD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM;IACN,YAAY;IACZ,UAAU;IACV,QAAQ,EACR,eAAe,GAAG,KAAK,EACvB,MAAM,EACN,UA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AC,EACD,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,EAChD,gBAAgB,EAAE,UAAU,EAC5B,iBAAiB,EAAE,mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACxD,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAC,GAAG,EACV,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,EACvE,WAAW,EAAE,SAAS,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { NumericFormat } from 'react-number-format';\nimport { TextField } from '@mui/material';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\nimport { getCurrencyCharacters, getCurrencyOptions } from '../Currency/currency-utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\n\n/* Using react-number-format component here, since it allows formatting decimal values,\nas per the locale.\n*/\ninterface PercentageProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Percentage here\n currencyISOCode?: string;\n showGroupSeparators?: string;\n decimalPrecision?: number;\n}\n\nexport default function Percentage(props: PercentageProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n // onChange,\n // onBlur,\n readOnly,\n currencyISOCode = 'USD',\n testId,\n helperText,\n displayMode,\n hideLabel,\n placeholder,\n showGroupSeparators,\n decimalPrecision\n } = props;\n\n const [values, setValues] = useState(value.toString());\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\n const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);\n\n useEffect(() => {\n setValues(value.toString());\n }, [value]);\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n const theSymbols = getCurrencyCharacters(currencyISOCode);\n const theCurrDec = theSymbols.theDecimalIndicator;\n const theCurrSep = theSymbols.theDigitGroupSeparator;\n\n function PercentageOnBlur() {\n handleEvent(actions, 'changeNblur', propName, values);\n }\n\n const handleChange = val => {\n setValues(val.value);\n };\n\n return (\n <NumericFormat\n valueIsNumericString\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n error={status === 'error'}\n label={label}\n value={values}\n onValueChange={val => {\n handleChange(val);\n }}\n onBlur={!readOnly ? PercentageOnBlur : undefined}\n decimalSeparator={theCurrDec}\n thousandSeparator={showGroupSeparators ? theCurrSep : ''}\n decimalScale={decimalPrecision}\n suffix='%'\n slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}\n customInput={TextField}\n />\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
1
|
+
import type { PConnFieldProps } from '../../../types/PConnProps';
|
|
2
2
|
interface PhoneProps extends PConnFieldProps {
|
|
3
3
|
}
|
|
4
4
|
export default function Phone(props: PhoneProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,UAAU,UAAW,SAAQ,eAAe;CAE3C;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,UAAU,2CAqG9C"}
|
|
@@ -25,9 +25,11 @@ export default function Phone(props) {
|
|
|
25
25
|
}
|
|
26
26
|
if (readOnly) {
|
|
27
27
|
const disableDropdown = true;
|
|
28
|
-
return (_jsx("div", { children: _jsx(MuiTelInput, { fullWidth: true, helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: onChange, error: status === 'error', label: label, value: value,
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
return (_jsx("div", { children: _jsx(MuiTelInput, { fullWidth: true, helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: onChange, error: status === 'error', label: label, value: value, slotProps: {
|
|
29
|
+
input: {
|
|
30
|
+
readOnly: true,
|
|
31
|
+
...testProp
|
|
32
|
+
}
|
|
31
33
|
}, disableDropdown: disableDropdown }) }));
|
|
32
34
|
}
|
|
33
35
|
const handleChange = inputVal => {
|
|
@@ -39,6 +41,6 @@ export default function Phone(props) {
|
|
|
39
41
|
phoneNumber = phoneNumber ? `+${phoneValue && phoneValue.replace(/\D+/g, '')}` : '';
|
|
40
42
|
handleEvent(actions, 'changeNblur', propName, phoneNumber);
|
|
41
43
|
};
|
|
42
|
-
return (_jsx(MuiTelInput, { fullWidth: true, variant: 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue,
|
|
44
|
+
return (_jsx(MuiTelInput, { fullWidth: true, variant: 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, slotProps: { input: { ...testProp } } }));
|
|
43
45
|
}
|
|
44
46
|
//# sourceMappingURL=Phone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAMpD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAiB;IAC7C,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACZ,GAAG,KAAK,CAAC;IAEV,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;IACtC,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CAAC;IAEtD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,SAAS,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,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ACxC,IAAI,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACxD,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACpF,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC7D,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,WAAW,IACV,SAAS,QACT,OAAO,EAAC,UAAU,EAClB,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,WAAW,IAAI,EAAE,EAC9B,IAAI,EAAC,OAAO,EACZ,cAAc,EAAC,IAAI,EACnB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,GACrC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { MuiTelInput } from 'mui-tel-input';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\nimport handleEvent from '../../helpers/event-utils';\n\ninterface PhoneProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Phone here\n}\n\nexport default function Phone(props: PhoneProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n onChange,\n readOnly,\n testId,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n\n const [inputValue, setInputValue] = useState(value);\n useEffect(() => setInputValue(value), [value]);\n\n const helperTextToDisplay = validatemessage || helperText;\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n const disableDropdown = true;\n return (\n <div>\n <MuiTelInput\n fullWidth\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n defaultCountry='US'\n required={required}\n disabled={disabled}\n onChange={onChange}\n error={status === 'error'}\n label={label}\n value={value}\n slotProps={{\n input: {\n readOnly: true,\n ...testProp\n }\n }}\n disableDropdown={disableDropdown}\n />\n </div>\n );\n }\n\n const handleChange = inputVal => {\n setInputValue(inputVal);\n };\n\n const handleBlur = event => {\n const phoneValue = event?.target?.value;\n let phoneNumber = phoneValue.split(' ').slice(1).join();\n phoneNumber = phoneNumber ? `+${phoneValue && phoneValue.replace(/\\D+/g, '')}` : '';\n handleEvent(actions, 'changeNblur', propName, phoneNumber);\n };\n\n return (\n <MuiTelInput\n fullWidth\n variant='outlined'\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n defaultCountry='US'\n required={required}\n disabled={disabled}\n onChange={handleChange}\n onBlur={!readOnly ? handleBlur : undefined}\n error={status === 'error'}\n label={label}\n value={inputValue}\n slotProps={{ input: { ...testProp } }}\n />\n );\n}\n"]}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
1
|
+
import type { PConnFieldProps } from '../../../types/PConnProps';
|
|
2
2
|
interface RadioButtonsProps extends PConnFieldProps {
|
|
3
3
|
inline: boolean;
|
|
4
4
|
fieldMetadata?: any;
|
|
5
|
+
variant?: string;
|
|
6
|
+
hideFieldLabels?: boolean;
|
|
7
|
+
additionalProps?: any;
|
|
8
|
+
imagePosition?: string;
|
|
9
|
+
imageSize?: string;
|
|
10
|
+
showImageDescription?: boolean;
|
|
11
|
+
datasource?: any;
|
|
5
12
|
}
|
|
6
13
|
export default function RadioButtons(props: RadioButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,UAAU,iBAAkB,SAAQ,eAAe;IAEjD,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAuI5D"}
|
|
@@ -7,7 +7,8 @@ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
|
7
7
|
export default function RadioButtons(props) {
|
|
8
8
|
// Get emitted components from map (so we can get any override that may exist)
|
|
9
9
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
10
|
-
const
|
|
10
|
+
const SelectableCard = getComponentFromMap('SelectableCard');
|
|
11
|
+
const { getPConnect, label, value = '', readOnly, validatemessage, helperText, status, required, inline, displayMode, hideLabel, fieldMetadata, variant, hideFieldLabels, additionalProps, datasource, imagePosition, imageSize, showImageDescription } = props;
|
|
11
12
|
const [theSelectedButton, setSelectedButton] = useState(value);
|
|
12
13
|
const thePConn = getPConnect();
|
|
13
14
|
const theConfigProps = thePConn.getConfigProps();
|
|
@@ -44,6 +45,16 @@ export default function RadioButtons(props) {
|
|
|
44
45
|
const handleBlur = event => {
|
|
45
46
|
thePConn.getValidationApi().validate(event.target.value, ''); // 2nd arg empty string until typedef marked correctly as optional
|
|
46
47
|
};
|
|
48
|
+
if (variant === 'card') {
|
|
49
|
+
const stateProps = thePConn.getStateProps();
|
|
50
|
+
return (_jsxs("div", { children: [_jsx("h4", { style: { marginTop: 0, marginBottom: 0 }, children: label }), _jsx("div", { id: 'selectable-card', style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(200px, 100%), 1fr))', gap: '1rem' }, children: _jsx(SelectableCard, { hideFieldLabels: hideFieldLabels, additionalProps: additionalProps, getPConnect: getPConnect, dataSource: datasource, image: {
|
|
51
|
+
imagePosition,
|
|
52
|
+
imageSize,
|
|
53
|
+
showImageDescription,
|
|
54
|
+
imageField: stateProps.image?.split('.').pop(),
|
|
55
|
+
imageDescription: stateProps.imageDescription?.split('.').pop()
|
|
56
|
+
}, onChange: handleChange, recordKey: stateProps.value?.split('.').pop(), cardLabel: stateProps.primaryField?.split('.').pop(), radioBtnValue: value, type: 'radio', setIsRadioCardSelected: displayMode !== 'DISPLAY_ONLY' ? setSelectedButton : undefined }) })] }));
|
|
57
|
+
}
|
|
47
58
|
return (_jsxs(FormControl, { variant: 'standard', error: status === 'error', required: required, children: [_jsx(FormLabel, { component: 'legend', children: label }), _jsx(RadioGroup, { value: theSelectedButton, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, row: inline, children: theOptions.map(theOption => {
|
|
48
59
|
return (_jsx(FormControlLabel, { value: theOption.key, label: thePConn.getLocalizedValue(theOption.value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)), control: _jsx(Radio, { color: 'primary', disabled: readOnly }, theOption.key) }, theOption.key));
|
|
49
60
|
}) }), _jsx(FormHelperText, { children: helperTextToDisplay })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtons.js","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5G,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAUhF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAwB;IAC3D,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,KAAK,GAAG,EAAE,EACV,QAAQ,EACR,eAAe,EACf,UAAU,EACV,MAAM,EACN,QAAQ,EACR,MAAM,EACN,WAAW,EACX,SAAS,EACT,aAAa,EACd,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE/D,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,cAAc,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IACjD,MAAM,UAAU,GAAG,QAAQ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IAEF,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE;QACzB,QAAQ,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,kEAAkE;IAClI,CAAC,CAAC;IAEF,OAAO,CACL,MAAC,WAAW,IAAC,OAAO,EAAC,UAAU,EAAC,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,QAAQ,EAAE,QAAQ,aAC3E,KAAC,SAAS,IAAC,SAAS,EAAC,QAAQ,YAAE,KAAK,GAAa,EACjD,KAAC,UAAU,IAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,YAClH,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;oBAC1B,OAAO,CACL,KAAC,gBAAgB,IACf,KAAK,EAAE,SAAS,CAAC,GAAG,EAEpB,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAC/B,SAAS,CAAC,KAAK,EACf,UAAU,EACV,QAAQ,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,UAAU,CAAC,CAC3E,EACD,OAAO,EAAE,KAAC,KAAK,IAAqB,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAE,QAAQ,IAAjD,SAAS,CAAC,GAAG,CAAwC,IANrE,SAAS,CAAC,GAAG,CAOlB,CACH,CAAC;gBACJ,CAAC,CAAC,GACS,EACb,KAAC,cAAc,cAAE,mBAAmB,GAAkB,IAC1C,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelperText } from '@mui/material';\n\nimport Utils from '../../helpers/utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\n// Can't use RadioButtonProps until getLocaleRuleNameFromKeys is NOT private\ninterface RadioButtonsProps extends PConnFieldProps {\n // If any, enter additional props that only exist on RadioButtons here\n inline: boolean;\n fieldMetadata?: any;\n}\n\nexport default function RadioButtons(props: RadioButtonsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n value = '',\n readOnly,\n validatemessage,\n helperText,\n status,\n required,\n inline,\n displayMode,\n hideLabel,\n fieldMetadata\n } = props;\n const [theSelectedButton, setSelectedButton] = useState(value);\n\n const thePConn = getPConnect();\n const theConfigProps = thePConn.getConfigProps();\n const actionsApi = thePConn.getActionsApi();\n const propName = (thePConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n const className = thePConn.getCaseInfo().getClassName();\n\n let configProperty = (thePConn.getRawMetadata() as any)?.config?.value || '';\n configProperty = configProperty.startsWith('@P') ? configProperty.substring(3) : configProperty;\n configProperty = configProperty.startsWith('.') ? configProperty.substring(1) : configProperty;\n\n const metaData = Array.isArray(fieldMetadata) ? fieldMetadata.filter(field => field?.classID === className)[0] : fieldMetadata;\n let displayName = metaData?.datasource?.propertyForDisplayText;\n displayName = displayName?.slice(displayName.lastIndexOf('.') + 1);\n const localeContext = metaData?.datasource?.tableType === 'DataPage' ? 'datapage' : 'associated';\n const localeClass = localeContext === 'datapage' ? '@baseclass' : className;\n const localeName = localeContext === 'datapage' ? metaData?.datasource?.name : configProperty;\n const localePath = localeContext === 'datapage' ? displayName : localeName;\n\n // theOptions will be an array of JSON objects that are literally key/value pairs.\n // Ex: [ {key: \"Basic\", value: \"Basic\"} ]\n const theOptions = Utils.getOptionList(theConfigProps, thePConn.getDataObject(''));\n\n useEffect(() => {\n // This update theSelectedButton which will update the UI to show the selected button correctly\n setSelectedButton(value);\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return (\n <FieldValueList\n name={hideLabel ? '' : label}\n value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}\n />\n );\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return (\n <FieldValueList\n name={hideLabel ? '' : label}\n value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}\n variant='stacked'\n />\n );\n }\n\n const handleChange = event => {\n handleEvent(actionsApi, 'changeNblur', propName, event.target.value);\n };\n\n const handleBlur = event => {\n thePConn.getValidationApi().validate(event.target.value, ''); // 2nd arg empty string until typedef marked correctly as optional\n };\n\n return (\n <FormControl variant='standard' error={status === 'error'} required={required}>\n <FormLabel component='legend'>{label}</FormLabel>\n <RadioGroup value={theSelectedButton} onChange={handleChange} onBlur={!readOnly ? handleBlur : undefined} row={inline}>\n {theOptions.map(theOption => {\n return (\n <FormControlLabel\n value={theOption.key}\n key={theOption.key}\n label={thePConn.getLocalizedValue(\n theOption.value,\n localePath,\n thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)\n )}\n control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}\n />\n );\n })}\n </RadioGroup>\n <FormHelperText>{helperTextToDisplay}</FormHelperText>\n </FormControl>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RadioButtons.js","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5G,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAiBhF,MAAM,CAAC,OAAO,UA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Q,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,UAAU,CAAC,CAC3E,EACD,OAAO,EAAE,KAAC,KAAK,IAAqB,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAE,QAAQ,IAAjD,SAAS,CAAC,GAAG,CAAwC,IANrE,SAAS,CAAC,GAAG,CAOlB,CACH,CAAC;gBACJ,CAAC,CAAC,GACS,EACb,KAAC,cAAc,cAAE,mBAAmB,GAAkB,IAC1C,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelperText } from '@mui/material';\n\nimport Utils from '../../helpers/utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\n// Can't use RadioButtonProps until getLocaleRuleNameFromKeys is NOT private\ninterface RadioButtonsProps extends PConnFieldProps {\n // If any, enter additional props that only exist on RadioButtons here\n inline: boolean;\n fieldMetadata?: any;\n variant?: string;\n hideFieldLabels?: boolean;\n additionalProps?: any;\n imagePosition?: string;\n imageSize?: string;\n showImageDescription?: boolean;\n datasource?: any;\n}\n\nexport default function RadioButtons(props: RadioButtonsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n const SelectableCard = getComponentFromMap('SelectableCard');\n\n const {\n getPConnect,\n label,\n value = '',\n readOnly,\n validatemessage,\n helperText,\n status,\n required,\n inline,\n displayMode,\n hideLabel,\n fieldMetadata,\n variant,\n hideFieldLabels,\n additionalProps,\n datasource,\n imagePosition,\n imageSize,\n showImageDescription\n } = props;\n const [theSelectedButton, setSelectedButton] = useState(value);\n\n const thePConn = getPConnect();\n const theConfigProps = thePConn.getConfigProps();\n const actionsApi = thePConn.getActionsApi();\n const propName = (thePConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n const className = thePConn.getCaseInfo().getClassName();\n\n let configProperty = (thePConn.getRawMetadata() as any)?.config?.value || '';\n configProperty = configProperty.startsWith('@P') ? configProperty.substring(3) : configProperty;\n configProperty = configProperty.startsWith('.') ? configProperty.substring(1) : configProperty;\n\n const metaData = Array.isArray(fieldMetadata) ? fieldMetadata.filter(field => field?.classID === className)[0] : fieldMetadata;\n let displayName = metaData?.datasource?.propertyForDisplayText;\n displayName = displayName?.slice(displayName.lastIndexOf('.') + 1);\n const localeContext = metaData?.datasource?.tableType === 'DataPage' ? 'datapage' : 'associated';\n const localeClass = localeContext === 'datapage' ? '@baseclass' : className;\n const localeName = localeContext === 'datapage' ? metaData?.datasource?.name : configProperty;\n const localePath = localeContext === 'datapage' ? displayName : localeName;\n\n // theOptions will be an array of JSON objects that are literally key/value pairs.\n // Ex: [ {key: \"Basic\", value: \"Basic\"} ]\n const theOptions = Utils.getOptionList(theConfigProps, thePConn.getDataObject(''));\n\n useEffect(() => {\n // This update theSelectedButton which will update the UI to show the selected button correctly\n setSelectedButton(value);\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return (\n <FieldValueList\n name={hideLabel ? '' : label}\n value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}\n />\n );\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return (\n <FieldValueList\n name={hideLabel ? '' : label}\n value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}\n variant='stacked'\n />\n );\n }\n\n const handleChange = event => {\n handleEvent(actionsApi, 'changeNblur', propName, event.target.value);\n };\n\n const handleBlur = event => {\n thePConn.getValidationApi().validate(event.target.value, ''); // 2nd arg empty string until typedef marked correctly as optional\n };\n\n if (variant === 'card') {\n const stateProps = thePConn.getStateProps();\n return (\n <div>\n <h4 style={{ marginTop: 0, marginBottom: 0 }}>{label}</h4>\n <div id='selectable-card' style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(200px, 100%), 1fr))', gap: '1rem' }}>\n <SelectableCard\n hideFieldLabels={hideFieldLabels}\n additionalProps={additionalProps}\n getPConnect={getPConnect}\n dataSource={datasource}\n image={{\n imagePosition,\n imageSize,\n showImageDescription,\n imageField: stateProps.image?.split('.').pop(),\n imageDescription: stateProps.imageDescription?.split('.').pop()\n }}\n onChange={handleChange}\n recordKey={stateProps.value?.split('.').pop()}\n cardLabel={stateProps.primaryField?.split('.').pop()}\n radioBtnValue={value}\n type='radio'\n setIsRadioCardSelected={displayMode !== 'DISPLAY_ONLY' ? setSelectedButton : undefined}\n />\n </div>\n </div>\n );\n }\n\n return (\n <FormControl variant='standard' error={status === 'error'} required={required}>\n <FormLabel component='legend'>{label}</FormLabel>\n <RadioGroup value={theSelectedButton} onChange={handleChange} onBlur={!readOnly ? handleBlur : undefined} row={inline}>\n {theOptions.map(theOption => {\n return (\n <FormControlLabel\n value={theOption.key}\n key={theOption.key}\n label={thePConn.getLocalizedValue(\n theOption.value,\n localePath,\n thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)\n )}\n control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}\n />\n );\n })}\n </RadioGroup>\n <FormHelperText>{helperTextToDisplay}</FormHelperText>\n </FormControl>\n );\n}\n"]}
|