@pega/react-sdk-components 24.2.11 → 25.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/Context/StoreContext.d.ts +0 -1
- package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +0 -6
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +11 -14
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.css +46 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +2 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +18 -16
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -2
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +50 -35
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +3 -3
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +32 -4
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +12 -2
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.css +4 -4
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +52 -3
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +2 -2
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +0 -2
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +3 -6
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +4 -7
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +2 -4
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +6 -9
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +6 -7
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +2 -2
- package/lib/components/field/Group/Group.d.ts.map +1 -1
- package/lib/components/field/Group/Group.js +4 -3
- package/lib/components/field/Group/Group.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +4 -5
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Location/Location.css +4 -0
- package/lib/components/field/Location/Location.d.ts +11 -0
- package/lib/components/field/Location/Location.d.ts.map +1 -0
- package/lib/components/field/Location/Location.js +158 -0
- package/lib/components/field/Location/Location.js.map +1 -0
- package/lib/components/field/Location/index.d.ts +2 -0
- package/lib/components/field/Location/index.d.ts.map +1 -0
- package/lib/components/field/Location/index.js +2 -0
- package/lib/components/field/Location/index.js.map +1 -0
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
- package/lib/components/field/Multiselect/utils.d.ts +2 -1
- package/lib/components/field/Multiselect/utils.d.ts.map +1 -1
- package/lib/components/field/Multiselect/utils.js +1 -1
- package/lib/components/field/Multiselect/utils.js.map +1 -1
- package/lib/components/field/ObjectReference/ObjectReference.d.ts +16 -0
- package/lib/components/field/ObjectReference/ObjectReference.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/ObjectReference.js +165 -0
- package/lib/components/field/ObjectReference/ObjectReference.js.map +1 -0
- package/lib/components/field/ObjectReference/index.d.ts +2 -0
- package/lib/components/field/ObjectReference/index.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/index.js +2 -0
- package/lib/components/field/ObjectReference/index.js.map +1 -0
- package/lib/components/field/ObjectReference/utils.d.ts +17 -0
- package/lib/components/field/ObjectReference/utils.d.ts.map +1 -0
- package/lib/components/field/ObjectReference/utils.js +99 -0
- package/lib/components/field/ObjectReference/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +2 -5
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +6 -4
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +8 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +12 -1
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.css +79 -0
- package/lib/components/field/RichText/RichText.d.ts +2 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +1 -0
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +1 -2
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
- package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/SelectableCard.js +68 -0
- package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
- package/lib/components/field/SelectableCard/index.d.ts +2 -0
- package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/index.js +2 -0
- package/lib/components/field/SelectableCard/index.js.map +1 -0
- package/lib/components/field/SelectableCard/utils.d.ts +13 -0
- package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/utils.js +183 -0
- package/lib/components/field/SelectableCard/utils.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +10 -2
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +128 -15
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +1 -1
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +4 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +0 -1
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +4 -5
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +2 -5
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +4 -5
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +1 -2
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +1 -2
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentShared.d.ts +2 -0
- package/lib/components/helpers/attachmentShared.d.ts.map +1 -0
- package/lib/components/helpers/attachmentShared.js +6 -0
- package/lib/components/helpers/attachmentShared.js.map +1 -0
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -1
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +1 -2
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +0 -1
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts +1 -1
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +1 -0
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +8 -4
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +0 -1
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +1 -0
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
- package/lib/components/helpers/object-utils.d.ts +9 -0
- package/lib/components/helpers/object-utils.d.ts.map +1 -0
- package/lib/components/helpers/object-utils.js +11 -0
- package/lib/components/helpers/object-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts +0 -1
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +15 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +111 -5
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -0
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +7 -1
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +0 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +12 -7
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +2 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +38 -30
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Assignment/useValidationBanner.d.ts +7 -0
- package/lib/components/infra/Assignment/useValidationBanner.d.ts.map +1 -0
- package/lib/components/infra/Assignment/useValidationBanner.js +26 -0
- package/lib/components/infra/Assignment/useValidationBanner.js.map +1 -0
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +20 -85
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +5 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -5
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +5 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +7 -11
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
- package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/container-helpers.js +46 -1
- package/lib/components/infra/Containers/container-helpers.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +1 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +2 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +26 -13
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +48 -70
- package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +19 -37
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +19 -7
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +1 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +6 -3
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +1 -1
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +4 -6
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +1 -1
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +2 -2
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +2 -2
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +7 -7
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js +68 -0
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +23 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +26 -0
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts +3 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +179 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +25 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js +2 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/index.js.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts +16 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js +22 -0
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +10 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js +11 -0
- package/lib/components/template/AdvancedSearch/TemplateContext.js.map +1 -0
- package/lib/components/template/AdvancedSearch/index.d.ts +2 -0
- package/lib/components/template/AdvancedSearch/index.d.ts.map +1 -0
- package/lib/components/template/AdvancedSearch/index.js +2 -0
- package/lib/components/template/AdvancedSearch/index.js.map +1 -0
- package/lib/components/template/AppShell/AppShell.css +1 -5
- package/lib/components/template/AppShell/AppShell.d.ts +2 -2
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +10 -13
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +2 -2
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +4 -2
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +22 -39
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +2 -2
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +13 -15
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +2 -2
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +0 -1
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +9 -2
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +239 -80
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +8 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js +9 -0
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -0
- package/lib/components/template/DataReference/SearchForm.d.ts +3 -0
- package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -0
- package/lib/components/template/DataReference/SearchForm.js +87 -0
- package/lib/components/template/DataReference/SearchForm.js.map +1 -0
- package/lib/components/template/DataReference/utils.d.ts +15 -0
- package/lib/components/template/DataReference/utils.d.ts.map +1 -0
- package/lib/components/template/DataReference/utils.js +75 -0
- package/lib/components/template/DataReference/utils.js.map +1 -0
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +2 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.js +1 -2
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
- package/lib/components/template/DefaultPage/DefaultPage.d.ts +36 -0
- package/lib/components/template/DefaultPage/DefaultPage.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/DefaultPage.js +28 -0
- package/lib/components/template/DefaultPage/DefaultPage.js.map +1 -0
- package/lib/components/template/DefaultPage/index.d.ts +2 -0
- package/lib/components/template/DefaultPage/index.d.ts.map +1 -0
- package/lib/components/template/DefaultPage/index.js +2 -0
- package/lib/components/template/DefaultPage/index.js.map +1 -0
- package/lib/components/template/Details/Details/Details.d.ts +1 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +2 -3
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +2 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +8 -5
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/HierarchicalForm/HierarchicalForm.d.ts +4 -0
- package/lib/components/template/HierarchicalForm/HierarchicalForm.d.ts.map +1 -0
- package/lib/components/template/HierarchicalForm/HierarchicalForm.js +16 -0
- package/lib/components/template/HierarchicalForm/HierarchicalForm.js.map +1 -0
- package/lib/components/template/HierarchicalForm/hooks.d.ts +15 -0
- package/lib/components/template/HierarchicalForm/hooks.d.ts.map +1 -0
- package/lib/components/template/HierarchicalForm/hooks.js +163 -0
- package/lib/components/template/HierarchicalForm/hooks.js.map +1 -0
- package/lib/components/template/HierarchicalForm/index.d.ts +2 -0
- package/lib/components/template/HierarchicalForm/index.d.ts.map +1 -0
- package/lib/components/template/HierarchicalForm/index.js +2 -0
- package/lib/components/template/HierarchicalForm/index.js.map +1 -0
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +5 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +186 -70
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +2 -5
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +28 -5
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +4 -2
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +13 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/ObjectPage/index.d.ts +2 -0
- package/lib/components/template/ObjectPage/index.d.ts.map +1 -0
- package/lib/components/template/ObjectPage/index.js +2 -0
- package/lib/components/template/ObjectPage/index.js.map +1 -0
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js +84 -0
- package/lib/components/template/SelfServiceCaseView/SelfServiceCaseView.js.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts +2 -0
- package/lib/components/template/SelfServiceCaseView/index.d.ts.map +1 -0
- package/lib/components/template/SelfServiceCaseView/index.js +2 -0
- package/lib/components/template/SelfServiceCaseView/index.js.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +1 -2
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +37 -33
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.d.ts +17 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.d.ts.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.js +94 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/SimpleTableSelectReadonly.js.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.d.ts +2 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.d.ts.map +1 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.js +2 -0
- package/lib/components/template/SimpleTable/SimpleTableSelectReadonly/index.js.map +1 -0
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +3 -2
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +2 -2
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts +10 -0
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +102 -1
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -3
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +2 -3
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +2 -2
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.css +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +4 -4
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/template/utils.d.ts +7 -0
- package/lib/components/template/utils.d.ts.map +1 -0
- package/lib/components/template/utils.js +52 -0
- package/lib/components/template/utils.js.map +1 -0
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +6 -8
- package/lib/components/widget/Attachment/Attachment.d.ts +4 -2
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +255 -202
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.types.d.ts +90 -0
- package/lib/components/widget/Attachment/Attachment.types.d.ts.map +1 -0
- package/lib/components/widget/Attachment/Attachment.types.js +2 -0
- package/lib/components/widget/Attachment/Attachment.types.js.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts +25 -0
- package/lib/components/widget/Attachment/AttachmentUtils.d.ts.map +1 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js +255 -0
- package/lib/components/widget/Attachment/AttachmentUtils.js.map +1 -0
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +2 -2
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +7 -6
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +2 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +29 -17
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +2 -2
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +0 -2
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -11
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +1 -13
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +21 -16
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
- package/lib/hooks/useAfterInitialEffect.js.map +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/hooks/useFocusFirstField.d.ts +3 -3
- package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
- package/lib/hooks/useFocusFirstField.js +19 -12
- package/lib/hooks/useFocusFirstField.js.map +1 -1
- package/lib/hooks/useGetTabsCount.d.ts +10 -0
- package/lib/hooks/useGetTabsCount.d.ts.map +1 -0
- package/lib/hooks/useGetTabsCount.js +165 -0
- package/lib/hooks/useGetTabsCount.js.map +1 -0
- package/lib/hooks/useIsMount.d.ts +2 -0
- package/lib/hooks/useIsMount.d.ts.map +1 -0
- package/lib/hooks/useIsMount.js +9 -0
- package/lib/hooks/useIsMount.js.map +1 -0
- package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
- package/lib/mediaco/ToDo/ToDo.css +81 -0
- package/lib/mediaco/ToDo/ToDo.d.ts +16 -0
- package/lib/mediaco/ToDo/ToDo.d.ts.map +1 -0
- package/lib/mediaco/ToDo/ToDo.js +187 -0
- package/lib/mediaco/ToDo/ToDo.js.map +1 -0
- package/lib/mediaco/ToDo/index.d.ts +2 -0
- package/lib/mediaco/ToDo/index.d.ts.map +1 -0
- package/lib/mediaco/ToDo/index.js +2 -0
- package/lib/mediaco/ToDo/index.js.map +1 -0
- package/lib/samples/Embedded/styles.css +26 -0
- package/lib/sdk-pega-component-map.d.ts +125 -103
- package/lib/sdk-pega-component-map.d.ts.map +1 -1
- package/lib/sdk-pega-component-map.js +26 -3
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/theme.d.ts +30 -1
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +209 -2
- package/lib/theme.js.map +1 -1
- package/lib/types/PConnProps.d.ts +1 -1
- package/package.json +32 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +0 -13
- package/lib/components/helpers/attachmentHelpers.d.ts.map +0 -1
- package/lib/components/helpers/attachmentHelpers.js +0 -72
- package/lib/components/helpers/attachmentHelpers.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable react/no-array-index-key */
|
|
3
2
|
import { useState, useEffect } from 'react';
|
|
4
3
|
import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@mui/material';
|
|
5
4
|
import makeStyles from '@mui/styles/makeStyles';
|
|
@@ -10,12 +9,22 @@ const useStyles = makeStyles(() => ({
|
|
|
10
9
|
checkbox: {
|
|
11
10
|
display: 'flex',
|
|
12
11
|
flexDirection: 'column'
|
|
12
|
+
},
|
|
13
|
+
selectableCard: {
|
|
14
|
+
display: 'grid',
|
|
15
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 40ch), 1fr))',
|
|
16
|
+
gridAutoRows: '1fr',
|
|
17
|
+
gap: '0.5rem'
|
|
13
18
|
}
|
|
14
19
|
}));
|
|
15
20
|
export default function CheckboxComponent(props) {
|
|
16
21
|
// Get emitted components from map (so we can get any override that may exist)
|
|
17
22
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
18
|
-
const
|
|
23
|
+
const SelectableCard = getComponentFromMap('SelectableCard');
|
|
24
|
+
const { getPConnect, label, caption, value, readOnly, testId, required, disabled, status, helperText, validatemessage, displayMode, hideLabel, trueLabel, falseLabel, selectionMode, datasource, selectionKey, selectionList, primaryField, referenceList, readonlyContextList: selectedvalues, variant, hideFieldLabels, additionalProps, imagePosition, imageSize, showImageDescription, renderMode, image } = props;
|
|
25
|
+
const readOnlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly;
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
|
+
const [theSelectedButton, setSelectedButton] = useState(value);
|
|
19
28
|
const classes = useStyles();
|
|
20
29
|
const helperTextToDisplay = validatemessage || helperText;
|
|
21
30
|
const thePConn = getPConnect();
|
|
@@ -27,11 +36,15 @@ export default function CheckboxComponent(props) {
|
|
|
27
36
|
setChecked(value);
|
|
28
37
|
}, [value]);
|
|
29
38
|
useEffect(() => {
|
|
30
|
-
if (referenceList?.length > 0) {
|
|
39
|
+
if (referenceList?.length > 0 && !readOnlyMode) {
|
|
31
40
|
thePConn.setReferenceList(selectionList);
|
|
32
41
|
updateNewInstuctions(thePConn, selectionList);
|
|
33
42
|
}
|
|
34
43
|
}, [thePConn]);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
// This update theSelectedButton which will update the UI to show the selected button correctly
|
|
46
|
+
setSelectedButton(value);
|
|
47
|
+
}, [value]);
|
|
35
48
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
36
49
|
return _jsx(FieldValueList, { name: hideLabel ? '' : caption, value: value ? trueLabel : falseLabel });
|
|
37
50
|
}
|
|
@@ -44,6 +57,42 @@ export default function CheckboxComponent(props) {
|
|
|
44
57
|
const handleBlur = event => {
|
|
45
58
|
thePConn.getValidationApi().validate(event.target.checked);
|
|
46
59
|
};
|
|
60
|
+
const handleCheckboxChange = (event, item) => {
|
|
61
|
+
if (event.target.checked) {
|
|
62
|
+
insertInstruction(thePConn, selectionList, selectionKey, primaryField, item);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
deleteInstruction(thePConn, selectionList, selectionKey, item);
|
|
66
|
+
}
|
|
67
|
+
thePConn.clearErrorMessages({ property: selectionList });
|
|
68
|
+
};
|
|
69
|
+
const actions = thePConn.getActionsApi();
|
|
70
|
+
const commonProps = {
|
|
71
|
+
...additionalProps,
|
|
72
|
+
className: 'standard',
|
|
73
|
+
disabled,
|
|
74
|
+
readOnly,
|
|
75
|
+
onClick: actions.onClick
|
|
76
|
+
};
|
|
77
|
+
if (variant === 'card') {
|
|
78
|
+
return (_jsxs("div", { children: [_jsx("h4", { style: { marginTop: 0, marginBottom: 0 }, children: label }), _jsx("div", { className: classes.selectableCard, children: _jsx(SelectableCard, { ...commonProps, testId: testId, displayMode: displayMode, dataSource: datasource, getPConnect: getPConnect, readOnly: renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly, onChange: e => {
|
|
79
|
+
e.stopPropagation();
|
|
80
|
+
const recordKey = selectionKey?.split('.').pop();
|
|
81
|
+
const selectedItem = datasource?.source?.find(item => item[recordKey] === e.target.id) ?? {};
|
|
82
|
+
handleCheckboxChange(e, {
|
|
83
|
+
id: selectedItem[recordKey],
|
|
84
|
+
primary: selectedItem[recordKey]
|
|
85
|
+
});
|
|
86
|
+
}, onBlur: () => {
|
|
87
|
+
thePConn.getValidationApi().validate(selectedvalues, selectionList);
|
|
88
|
+
}, hideFieldLabels: hideFieldLabels, recordKey: selectionKey?.split('.').pop(), cardLabel: primaryField.split('.').pop(), image: {
|
|
89
|
+
imagePosition,
|
|
90
|
+
imageSize,
|
|
91
|
+
showImageDescription,
|
|
92
|
+
imageField: image?.split('.').pop(),
|
|
93
|
+
imageDescription: (thePConn?.getRawMetadata()?.config).imageDescription?.split('.').pop()
|
|
94
|
+
}, readOnlyList: selectedvalues, type: 'checkbox', showNoValue: (renderMode === 'ReadOnly' || readOnly || displayMode === 'DISPLAY_ONLY') && selectedvalues.length === 0 }) })] }));
|
|
95
|
+
}
|
|
47
96
|
const handleChangeMultiMode = (event, element) => {
|
|
48
97
|
if (event.target.checked) {
|
|
49
98
|
insertInstruction(thePConn, selectionList, selectionKey, primaryField, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/field/Checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC9G,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,O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CAAC,IAAI,IAAI,OAAO,CAAC,KAAK,EACpC,cAAc,EAAC,KAAK,kBACN,MAAM,IAHf,KAAK,CAIV,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,WAAW,GAAG,cAAK,SAAS,EAAE,OAAO,CAAC,QAAQ,YAAG,gBAAgB,GAAO,CAAC;KAC1E;SAAM;QACL,WAAW,GAAG,CACZ,KAAC,gBAAgB,IACf,OAAO,EACL,KAAC,QAAQ,IACP,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EAC9C,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,EAEJ,KAAK,EAAE,OAAO,EACd,cAAc,EAAC,KAAK,kBACN,MAAM,GACpB,CACH,CAAC;KACH;IAED,OAAO,CACL,MAAC,WAAW,IAAC,OAAO,EAAC,UAAU,EAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,aAC1E,CAAC,SAAS,IAAI,KAAC,SAAS,IAAC,SAAS,EAAC,QAAQ,YAAE,KAAK,GAAa,EAChE,KAAC,SAAS,cAAE,WAAW,GAAa,EACpC,KAAC,cAAc,cAAE,mBAAmB,GAAkB,IAC1C,CACf,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable react/no-array-index-key */\nimport { useState, useEffect } from 'react';\nimport { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { insertInstruction, deleteInstruction, updateNewInstuctions } from '../../helpers/instructions-utils';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface CheckboxProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on Checkbox here\n value?: boolean;\n caption?: string;\n trueLabel?: string;\n falseLabel?: string;\n selectionMode?: string;\n datasource?: any;\n selectionKey?: string;\n selectionList?: any;\n primaryField: string;\n readonlyContextList: any;\n referenceList: string;\n}\n\nconst useStyles = makeStyles(() => ({\n checkbox: {\n display: 'flex',\n flexDirection: 'column'\n }\n}));\n\nexport default function CheckboxComponent(props: CheckboxProps) {\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 caption,\n value,\n readOnly,\n testId,\n required,\n disabled,\n status,\n helperText,\n validatemessage,\n displayMode,\n hideLabel,\n trueLabel,\n falseLabel,\n selectionMode,\n datasource,\n selectionKey,\n selectionList,\n primaryField,\n referenceList,\n readonlyContextList: selectedvalues\n } = props;\n const classes = useStyles();\n const helperTextToDisplay = validatemessage || helperText;\n const thePConn = getPConnect();\n const actionsApi = thePConn.getActionsApi();\n const propName = (thePConn.getStateProps() as any).value;\n\n const [checked, setChecked] = useState<any>(false);\n useEffect(() => {\n // This update theSelectedButton which will update the UI to show the selected button correctly\n setChecked(value);\n }, [value]);\n\n useEffect(() => {\n if (referenceList?.length > 0) {\n thePConn.setReferenceList(selectionList);\n updateNewInstuctions(thePConn, selectionList);\n }\n }, [thePConn]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} variant='stacked' />;\n }\n\n const handleChange = event => {\n handleEvent(actionsApi, 'changeNblur', propName, event.target.checked);\n };\n\n const handleBlur = event => {\n thePConn.getValidationApi().validate(event.target.checked);\n };\n\n const handleChangeMultiMode = (event, element) => {\n if (event.target.checked) {\n insertInstruction(thePConn, selectionList, selectionKey, primaryField, {\n id: element.key,\n primary: element.text ?? element.value\n });\n } else {\n deleteInstruction(thePConn, selectionList, selectionKey, {\n id: element.key,\n primary: element.text ?? element.value\n });\n }\n thePConn.clearErrorMessages({\n property: selectionList,\n category: '',\n context: ''\n });\n };\n\n let theCheckbox;\n const listOfCheckboxes: any = [];\n if (selectionMode === 'multi') {\n const listSourceItems = datasource?.source ?? [];\n const dataField: any = selectionKey?.split?.('.')[1];\n listSourceItems.forEach((element, index) => {\n listOfCheckboxes.push(\n <FormControlLabel\n control={\n <Checkbox\n key={index}\n checked={selectedvalues?.some?.(data => data[dataField] === element.key)}\n onChange={event => handleChangeMultiMode(event, element)}\n onBlur={() => {\n thePConn.getValidationApi().validate(selectedvalues, selectionList);\n }}\n data-testid={`${testId}:${element.value}`}\n />\n }\n key={index}\n label={element.text ?? element.value}\n labelPlacement='end'\n data-test-id={testId}\n />\n );\n });\n theCheckbox = <div className={classes.checkbox}>{listOfCheckboxes}</div>;\n } else {\n theCheckbox = (\n <FormControlLabel\n control={\n <Checkbox\n color='primary'\n checked={checked}\n onChange={!readOnly ? handleChange : undefined}\n onBlur={!readOnly ? handleBlur : undefined}\n value={value}\n disabled={disabled}\n readOnly={readOnly}\n />\n }\n label={caption}\n labelPlacement='end'\n data-test-id={testId}\n />\n );\n }\n\n return (\n <FormControl variant='standard' required={required} error={status === 'error'}>\n {!hideLabel && <FormLabel component='legend'>{label}</FormLabel>}\n <FormGroup>{theCheckbox}</FormGroup>\n <FormHelperText>{helperTextToDisplay}</FormHelperText>\n </FormControl>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/field/Checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,E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OAAO,CACL,MAAC,WAAW,IAAC,OAAO,EAAC,UAAU,EAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,aAC1E,CAAC,SAAS,IAAI,KAAC,SAAS,IAAC,SAAS,EAAC,QAAQ,YAAE,KAAK,GAAa,EAChE,KAAC,SAAS,cAAE,WAAW,GAAa,EACpC,KAAC,cAAc,cAAE,mBAAmB,GAAkB,IAC1C,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { insertInstruction, deleteInstruction, updateNewInstuctions } from '../../helpers/instructions-utils';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface CheckboxProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on Checkbox here\n value?: boolean;\n caption?: string;\n trueLabel?: string;\n falseLabel?: string;\n selectionMode?: string;\n datasource?: any;\n selectionKey?: string;\n selectionList?: any;\n primaryField: string;\n readonlyContextList: any;\n referenceList: string;\n variant?: string;\n hideFieldLabels: boolean;\n additionalProps: any;\n imagePosition: string;\n imageSize: string;\n showImageDescription: string;\n renderMode: string;\n image: string;\n}\n\nconst useStyles = makeStyles(() => ({\n checkbox: {\n display: 'flex',\n flexDirection: 'column'\n },\n selectableCard: {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 40ch), 1fr))',\n gridAutoRows: '1fr',\n gap: '0.5rem'\n }\n}));\n\nexport default function CheckboxComponent(props: CheckboxProps) {\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 caption,\n value,\n readOnly,\n testId,\n required,\n disabled,\n status,\n helperText,\n validatemessage,\n displayMode,\n hideLabel,\n trueLabel,\n falseLabel,\n selectionMode,\n datasource,\n selectionKey,\n selectionList,\n primaryField,\n referenceList,\n readonlyContextList: selectedvalues,\n variant,\n hideFieldLabels,\n additionalProps,\n imagePosition,\n imageSize,\n showImageDescription,\n renderMode,\n image\n } = props;\n const readOnlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly;\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [theSelectedButton, setSelectedButton] = useState(value);\n const classes = useStyles();\n const helperTextToDisplay = validatemessage || helperText;\n const thePConn = getPConnect();\n const actionsApi = thePConn.getActionsApi();\n const propName = (thePConn.getStateProps() as any).value;\n\n const [checked, setChecked] = useState<any>(false);\n useEffect(() => {\n // This update theSelectedButton which will update the UI to show the selected button correctly\n setChecked(value);\n }, [value]);\n\n useEffect(() => {\n if (referenceList?.length > 0 && !readOnlyMode) {\n thePConn.setReferenceList(selectionList);\n updateNewInstuctions(thePConn, selectionList);\n }\n }, [thePConn]);\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 <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} variant='stacked' />;\n }\n\n const handleChange = event => {\n handleEvent(actionsApi, 'changeNblur', propName, event.target.checked);\n };\n\n const handleBlur = event => {\n thePConn.getValidationApi().validate(event.target.checked);\n };\n\n const handleCheckboxChange = (event, item) => {\n if (event.target.checked) {\n insertInstruction(thePConn, selectionList, selectionKey, primaryField, item);\n } else {\n deleteInstruction(thePConn, selectionList, selectionKey, item);\n }\n thePConn.clearErrorMessages({ property: selectionList });\n };\n\n const actions = thePConn.getActionsApi();\n\n const commonProps = {\n ...additionalProps,\n className: 'standard',\n disabled,\n readOnly,\n onClick: (actions as any).onClick\n };\n\n if (variant === 'card') {\n return (\n <div>\n <h4 style={{ marginTop: 0, marginBottom: 0 }}>{label}</h4>\n <div className={classes.selectableCard}>\n <SelectableCard\n {...commonProps}\n testId={testId}\n displayMode={displayMode}\n dataSource={datasource}\n getPConnect={getPConnect}\n readOnly={renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly}\n onChange={e => {\n e.stopPropagation();\n const recordKey = selectionKey?.split('.').pop();\n const selectedItem = datasource?.source?.find(item => item[recordKey as any] === e.target.id) ?? {};\n handleCheckboxChange(e, {\n id: selectedItem[recordKey as any],\n primary: selectedItem[recordKey as any]\n });\n }}\n onBlur={() => {\n thePConn.getValidationApi().validate(selectedvalues, selectionList);\n }}\n hideFieldLabels={hideFieldLabels}\n recordKey={selectionKey?.split('.').pop()}\n cardLabel={primaryField.split('.').pop()}\n image={{\n imagePosition,\n imageSize,\n showImageDescription,\n imageField: image?.split('.').pop(),\n imageDescription: (thePConn?.getRawMetadata()?.config as any).imageDescription?.split('.').pop()\n }}\n readOnlyList={selectedvalues}\n type='checkbox'\n showNoValue={(renderMode === 'ReadOnly' || readOnly || displayMode === 'DISPLAY_ONLY') && selectedvalues.length === 0}\n />\n </div>\n </div>\n );\n }\n\n const handleChangeMultiMode = (event, element) => {\n if (event.target.checked) {\n insertInstruction(thePConn, selectionList, selectionKey, primaryField, {\n id: element.key,\n primary: element.text ?? element.value\n });\n } else {\n deleteInstruction(thePConn, selectionList, selectionKey, {\n id: element.key,\n primary: element.text ?? element.value\n });\n }\n thePConn.clearErrorMessages({\n property: selectionList,\n category: '',\n context: ''\n });\n };\n\n let theCheckbox;\n const listOfCheckboxes: any = [];\n if (selectionMode === 'multi') {\n const listSourceItems = datasource?.source ?? [];\n const dataField: any = selectionKey?.split?.('.')[1];\n listSourceItems.forEach((element, index) => {\n listOfCheckboxes.push(\n <FormControlLabel\n control={\n <Checkbox\n key={index}\n checked={selectedvalues?.some?.(data => data[dataField] === element.key)}\n onChange={event => handleChangeMultiMode(event, element)}\n onBlur={() => {\n thePConn.getValidationApi().validate(selectedvalues, selectionList);\n }}\n data-testid={`${testId}:${element.value}`}\n />\n }\n key={index}\n label={element.text ?? element.value}\n labelPlacement='end'\n data-test-id={testId}\n />\n );\n });\n theCheckbox = <div className={classes.checkbox}>{listOfCheckboxes}</div>;\n } else {\n theCheckbox = (\n <FormControlLabel\n control={\n <Checkbox\n color='primary'\n checked={checked}\n onChange={!readOnly ? handleChange : undefined}\n onBlur={!readOnly ? handleBlur : undefined}\n value={value}\n disabled={disabled}\n readOnly={readOnly}\n />\n }\n label={caption}\n labelPlacement='end'\n data-test-id={testId}\n />\n );\n }\n\n return (\n <FormControl variant='standard' required={required} error={status === 'error'}>\n {!hideLabel && <FormLabel component='legend'>{label}</FormLabel>}\n <FormGroup>{theCheckbox}</FormGroup>\n <FormHelperText>{helperTextToDisplay}</FormHelperText>\n </FormControl>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAQjE,UAAU,cAAe,SAAQ,eAAe;IAE9C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,cAAc,2CA4FrD"}
|
|
@@ -17,7 +17,7 @@ export default function Currency(props) {
|
|
|
17
17
|
const propName = pConn.getStateProps().value;
|
|
18
18
|
const helperTextToDisplay = validatemessage || helperText;
|
|
19
19
|
const [values, setValues] = useState(value.toString());
|
|
20
|
-
const
|
|
20
|
+
const testProps = { 'data-test-id': testId };
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
setValues(value.toString());
|
|
23
23
|
}, [value]);
|
|
@@ -48,6 +48,6 @@ export default function Currency(props) {
|
|
|
48
48
|
};
|
|
49
49
|
return (_jsx(NumericFormat, { valueIsNumericString: true, variant: readOnly ? 'standard' : 'outlined', label: label, helperText: helperTextToDisplay, placeholder: placeholder ?? '', required: required, disabled: disabled, onValueChange: val => {
|
|
50
50
|
handleChange(val);
|
|
51
|
-
}, onBlur: !readOnly ? currOnBlur : undefined, error: status === 'error', name: 'numberformat', value: values, ...currencyProp, decimalScale: allowDecimals !== false ? 2 : 0, fixedDecimalScale: allowDecimals,
|
|
51
|
+
}, onBlur: !readOnly ? currOnBlur : undefined, error: status === 'error', name: 'numberformat', value: values, ...currencyProp, decimalScale: allowDecimals !== false ? 2 : 0, fixedDecimalScale: allowDecimals, slotProps: { input: { ...readOnlyProp, inputProps: { ...testProps } } }, customInput: TextField }));
|
|
52
52
|
}
|
|
53
53
|
//# sourceMappingURL=Currency.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Currency.js","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.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,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAW7E,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAqB;IACp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AC,CAAC,SAAS,EAC1C,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE,MAAM,KACT,YAAY,EAChB,YAAY,EAAE,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC7C,iBAAiB,EAAE,aAAa,EAChC,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 handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\nimport { getCurrencyCharacters, getCurrencyOptions } from './currency-utils';\n\n/* Using react-number-format component here, since it allows formatting decimal values,\nas per the locale.\n*/\ninterface CurrrencyProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Currency here\n currencyISOCode?: string;\n allowDecimals: boolean;\n}\n\nexport default function Currency(props: CurrrencyProps) {\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, onBlur, */\n readOnly,\n testId,\n helperText,\n displayMode,\n hideLabel,\n currencyISOCode = 'USD',\n placeholder,\n allowDecimals\n } = props;\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n const [values, setValues] = useState(value.toString());\n\n const testProps: any = { 'data-test-id': testId };\n\n useEffect(() => {\n setValues(value.toString());\n }, [value]);\n\n // currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }\n const theSymbols = getCurrencyCharacters(currencyISOCode);\n const theCurrSym = theSymbols.theCurrencySymbol;\n const theCurrDec = theSymbols.theDecimalIndicator;\n const theCurrSep = theSymbols.theDigitGroupSeparator;\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\n const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n let currencyProp = {};\n currencyProp = { prefix: theCurrSym, decimalSeparator: theCurrDec, thousandSeparator: theCurrSep };\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 function currOnBlur() {\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 variant={readOnly ? 'standard' : 'outlined'}\n label={label}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n required={required}\n disabled={disabled}\n onValueChange={val => {\n handleChange(val);\n }}\n onBlur={!readOnly ? currOnBlur : undefined}\n error={status === 'error'}\n name='numberformat'\n value={values}\n {...currencyProp}\n decimalScale={allowDecimals !== false ? 2 : 0}\n fixedDecimalScale={allowDecimals}\n slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}\n customInput={TextField}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currency-utils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/currency-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"currency-utils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/currency-utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM;;;;CAkCnD,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,WAAW,MAAM;;;;CA0BtD,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
// eslint-disable-next-line import/no-named-default
|
|
2
1
|
import { default as CurrencyAlias } from '../../helpers/formatters/Currency';
|
|
3
|
-
// eslint-disable-next-line import/no-named-default
|
|
4
2
|
import { default as CurrencyMapAlias } from '../../helpers/formatters/CurrencyMap';
|
|
5
3
|
export const getCurrencyOptions = (inISOCode) => {
|
|
6
4
|
const operatorLocale = PCore.getEnvironmentInfo().getUseLocale() || PCore.getEnvironmentInfo().getLocale() || 'en-US';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currency-utils.js","sourceRoot":"","sources":["../../../../src/components/field/Currency/currency-utils.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"currency-utils.js","sourceRoot":"","sources":["../../../../src/components/field/Currency/currency-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAE7E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAEnF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAE,EAAE;IACtD,MAAM,cAAc,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC,YAAY,EAAE,IAAI,KAAK,CAAC,kBAAkB,EAAE,CAAC,SAAS,EAAE,IAAI,OAAO,CAAC;IAEtH,IAAI,YAAY,GAAG,gBAAgB,CAAC,EAAE,CAAC;IACvC,IAAI,WAAW,GAAG,cAAc,CAAC;IAEjC,iEAAiE;IACjE,8BAA8B;IAC9B,+BAA+B;IAC/B,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;YACxB,YAAY,GAAG,gBAAgB,CAAC,EAAE,CAAC;YACnC,WAAW,GAAG,OA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1C,gBAAgB,CAAC,iBAAiB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IACxD,gBAAgB,CAAC,sBAAsB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAC7D,gBAAgB,CAAC,mBAAmB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAE1D,sNAAsN;IAEtN,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["import { default as CurrencyAlias } from '../../helpers/formatters/Currency';\n\nimport { default as CurrencyMapAlias } from '../../helpers/formatters/CurrencyMap';\n\nexport const getCurrencyOptions = (inISOCode: string) => {\n const operatorLocale = PCore.getEnvironmentInfo().getUseLocale() || PCore.getEnvironmentInfo().getLocale() || 'en-US';\n\n let currMapToUse = CurrencyMapAlias.US;\n let localeToUse = operatorLocale;\n\n // Determine CurrencyMap lookup based on ISO code (if specified).\n // If no ISO code, use locale\n // If no locale, default to US\n if (inISOCode) {\n if (inISOCode === 'EUR') {\n currMapToUse = CurrencyMapAlias.NL;\n localeToUse = 'nl-NL';\n } else {\n // For all other ISO codes, use first 2 characters as the lookup from CurrencyMap\n const countryCode = inISOCode.substring(0, 2);\n currMapToUse = CurrencyMapAlias[countryCode];\n }\n } else if (operatorLocale) {\n // No ISO Code so check for operator locale (and force upper case for lookup)\n const countryCode = operatorLocale.substring(3).toUpperCase();\n currMapToUse = CurrencyMapAlias[countryCode];\n } else {\n // no ISO code and no operator locale, default to US\n currMapToUse = CurrencyMapAlias.US;\n }\n\n // If no currMapToUse at this point, default to US as a failsafe\n if (!currMapToUse) {\n currMapToUse = CurrencyMapAlias.US;\n }\n\n const theCode = currMapToUse.currencyCode.substring(0, 3);\n return { locale: localeToUse, style: 'currency', currency: theCode };\n};\n\nexport const getCurrencyCharacters = (inISOCode: string) => {\n const theCurrencyChars = {\n theCurrencySymbol: '$',\n theDecimalIndicator: '.',\n theDigitGroupSeparator: ','\n };\n\n const theCurrencyOptions = getCurrencyOptions(inISOCode);\n\n const testValue = 1234.56;\n const formattedString = CurrencyAlias.Currency(testValue, theCurrencyOptions);\n\n // console.log(`formattedString: ${formattedString}`);\n\n // Here, we have the formatted string (ex: $1,234.56) where:\n // Currency symbol = formattedString[0]\n // Separator = formattedString[2]\n // DecimalIndicator = formattedString[6];\n\n theCurrencyChars.theCurrencySymbol = formattedString[0];\n theCurrencyChars.theDigitGroupSeparator = formattedString[2];\n theCurrencyChars.theDecimalIndicator = formattedString[6];\n\n // console.log(`theCurrencyChars: symbol: ${theCurrencyChars.theCurrencySymbol} | theDigitGroupSeparator: ${theCurrencyChars.theDigitGroupSeparator} | theDecimalIndicator: ${theCurrencyChars.theDecimalIndicator}`);\n\n return theCurrencyChars;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Date.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Date/Date.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Date.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Date/Date.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAOjE,UAAU,SAAU,SAAQ,eAAe;CAE1C;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,2CA0E5C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
|
|
4
|
-
import dayjs from 'dayjs';
|
|
4
|
+
import dayjs, { Dayjs } from 'dayjs';
|
|
5
5
|
import handleEvent from '../../helpers/event-utils';
|
|
6
6
|
import { format } from '../../helpers/formatters';
|
|
7
7
|
import { dateFormatInfoDefault, getDateFormatInfo } from '../../helpers/date-format-utils';
|
|
@@ -46,10 +46,7 @@ export default function Date(props) {
|
|
|
46
46
|
// const theReadOnlyComp = <TextInput props />
|
|
47
47
|
return _jsx(TextInput, { ...props });
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
testProp = {
|
|
51
|
-
'data-test-id': testId
|
|
52
|
-
};
|
|
49
|
+
const testProps = { 'data-test-id': testId };
|
|
53
50
|
const handleChange = date => {
|
|
54
51
|
if (date && date.isValid()) {
|
|
55
52
|
setDateValue(date);
|
|
@@ -64,7 +61,7 @@ export default function Date(props) {
|
|
|
64
61
|
error: status === 'error',
|
|
65
62
|
helperText: helperTextToDisplay,
|
|
66
63
|
size: 'small',
|
|
67
|
-
InputProps: { ...
|
|
64
|
+
InputProps: { ...testProps }
|
|
68
65
|
}
|
|
69
66
|
}, onChange: handleChange }));
|
|
70
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Date.js","sourceRoot":"","sources":["../../../../src/components/field/Date/Date.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,
|
|
1
|
+
{"version":3,"file":"Date.js","sourceRoot":"","sources":["../../../../src/components/field/Date/Date.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,wFAAwF;AACxF,SAAS,gBAAgB,CAAC,IA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AAI,CAAC,CAAC,CAAC;QACxE,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,cAAc,CAAC,gBAAgB,EACvC,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE;YACT,SAAS,EAAE;gBACT,QAAQ;gBACR,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,cAAc,CAAC,kBAAkB;gBAC9C,KAAK,EAAE,MAAM,KAAK,OAAO;gBACzB,UAAU,EAAE,mBAAmB;gBAC/B,IAAI,EAAE,OAAO;gBACb,UAAU,EAAE,EAAE,GAAG,SAAS,EAAE;aAC7B;SACF,EACD,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { DatePicker } from '@mui/x-date-pickers/DatePicker';\nimport dayjs, { Dayjs } from 'dayjs';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\nimport { dateFormatInfoDefault, getDateFormatInfo } from '../../helpers/date-format-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\n// Will return the date string in YYYY-MM-DD format which we'll be POSTing to the server\nfunction getFormattedDate(date) {\n return `${date.$y.toString()}-${(date.$M + 1).toString().padStart(2, '0')}-${date.$D.toString().padStart(2, '0')}`;\n}\n\ninterface DateProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Date here\n}\n\nexport default function Date(props: DateProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const TextInput = getComponentFromMap('TextInput');\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const { getPConnect, label, required, disabled, value, validatemessage, status, readOnly, testId, helperText, displayMode, hideLabel } = props;\n\n const [dateValue, setDateValue] = useState<Dayjs | null>(value ? dayjs(value) : null);\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 // Start with default dateFormatInfo\n const dateFormatInfo = dateFormatInfoDefault;\n // and then update, as needed, based on locale, etc.\n const theDateFormat = getDateFormatInfo();\n dateFormatInfo.dateFormatString = theDateFormat.dateFormatString;\n dateFormatInfo.dateFormatStringLC = theDateFormat.dateFormatStringLC;\n dateFormatInfo.dateFormatMask = theDateFormat.dateFormatMask;\n\n useEffect(() => {\n setDateValue(dayjs(value));\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n const formattedDate = format(props.value, 'date', {\n format: dateFormatInfo.dateFormatString\n });\n return <FieldValueList name={hideLabel ? '' : label} value={formattedDate} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n const formattedDate = format(props.value, 'date', {\n format: dateFormatInfo.dateFormatString\n });\n return <FieldValueList name={hideLabel ? '' : label} value={formattedDate} variant='stacked' />;\n }\n\n if (readOnly) {\n // const theReadOnlyComp = <TextInput props />\n return <TextInput {...props} />;\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n const handleChange = date => {\n if (date && date.isValid()) {\n setDateValue(date);\n handleEvent(actions, 'changeNblur', propName, getFormattedDate(date));\n }\n };\n\n return (\n <DatePicker\n label={label}\n disabled={disabled}\n format={dateFormatInfo.dateFormatString}\n value={dateValue}\n slotProps={{\n textField: {\n required,\n variant: 'outlined',\n placeholder: dateFormatInfo.dateFormatStringLC,\n error: status === 'error',\n helperText: helperTextToDisplay,\n size: 'small',\n InputProps: { ...testProps }\n }\n }}\n onChange={handleChange}\n />\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
1
|
+
import type { PConnFieldProps } from '../../../types/PConnProps';
|
|
2
2
|
interface DateTimeProps extends PConnFieldProps {
|
|
3
3
|
}
|
|
4
4
|
export default function DateTime(props: DateTimeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../src/components/field/DateTime/DateTime.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../src/components/field/DateTime/DateTime.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,aAAc,SAAQ,eAAe;CAE9C;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAsFpD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
3
|
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
|
|
4
|
-
import dayjs from 'dayjs';
|
|
4
|
+
import dayjs, { Dayjs } from 'dayjs';
|
|
5
5
|
import DateFormatter from '../../helpers/formatters/Date';
|
|
6
6
|
import handleEvent from '../../helpers/event-utils';
|
|
7
7
|
import { format } from '../../helpers/formatters';
|
|
@@ -45,10 +45,7 @@ export default function DateTime(props) {
|
|
|
45
45
|
const formattedDateTime = format(props.value, 'datetime');
|
|
46
46
|
return _jsx(TextInput, { ...props, value: formattedDateTime });
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
testProp = {
|
|
50
|
-
'data-test-id': testId
|
|
51
|
-
};
|
|
48
|
+
const testProps = { 'data-test-id': testId };
|
|
52
49
|
const handleChange = date => {
|
|
53
50
|
const timeZoneDateTime = dayjs.tz(date.format('YYYY-MM-DDTHH:mm:ss'), timezone);
|
|
54
51
|
const changeValue = timeZoneDateTime && timeZoneDateTime.isValid() ? timeZoneDateTime.toISOString() : '';
|
|
@@ -67,7 +64,7 @@ export default function DateTime(props) {
|
|
|
67
64
|
// autoOk
|
|
68
65
|
disabled: disabled, format: `${dateFormatInfo.dateFormatString} hh:mm a`,
|
|
69
66
|
// mask={`${dateFormatInfo.dateFormatMask} __:__ _m`}
|
|
70
|
-
minutesStep: 5, label: label, value: dateValue, onChange: handleChange,
|
|
67
|
+
minutesStep: 5, label: label, value: dateValue, onChange: handleChange, slotProps: {
|
|
71
68
|
textField: {
|
|
72
69
|
variant: 'outlined',
|
|
73
70
|
required,
|
|
@@ -75,7 +72,7 @@ export default function DateTime(props) {
|
|
|
75
72
|
error: status === 'error',
|
|
76
73
|
helperText: helperTextToDisplay,
|
|
77
74
|
size: 'small',
|
|
78
|
-
InputProps: { ...
|
|
75
|
+
InputProps: { ...testProps }
|
|
79
76
|
}
|
|
80
77
|
} }));
|
|
81
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTime.js","sourceRoot":"","sources":["../../../../src/components/field/DateTime/DateTime.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"DateTime.js","sourceRoot":"","sources":["../../../../src/components/field/DateTime/DateTime.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAOhF,MAAM,CAAC,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EAAE,QAAQ,CAAC,CAAC;QACzF,MAAM,WAAW,GAAG,gBAAgB,IAAI,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzG,YAAY,CAAC,gBAAgB,CAAC,CAAC;QAC/B,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC7D,CAAC,CAAC;IAEF,EAAE;IACF,iGAAiG;IACjG,8DAA8D;IAC9D,EAAE;IAEF,OAAO,CACL,KAAC,cAAc;IACb,YAAY;IACZ,SAAS;;QADT,YAAY;QACZ,SAAS;QACT,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,GAAG,cAAc,CAAC,gBAAgB,UAAU;QACpD,qDAAqD;QACrD,WAAW,EAAE,CAAC,EACd,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE;YACT,SAAS,EAAE;gBACT,OAAO,EAAE,UAAU;gBACnB,QAAQ;gBACR,WAAW,EAAE,GAAG,cAAc,CAAC,kBAAkB,UAAU;gBAC3D,KAAK,EAAE,MAAM,KAAK,OAAO;gBACzB,UAAU,EAAE,mBAAmB;gBAC/B,IAAI,EAAE,OAAO;gBACb,UAAU,EAAE,EAAE,GAAG,SAAS,EAAE;aAC7B;SACF,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';\nimport dayjs, { Dayjs } from 'dayjs';\nimport DateFormatter from '../../helpers/formatters/Date';\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\nimport { dateFormatInfoDefault, getDateFormatInfo } from '../../helpers/date-format-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface DateTimeProps extends PConnFieldProps {\n // If any, enter additional props that only exist on DateTime here\n}\n\nexport default function DateTime(props: DateTimeProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const TextInput = getComponentFromMap('TextInput');\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const { getPConnect, label, required, disabled, value = '', validatemessage, status, readOnly, testId, helperText, displayMode, hideLabel } = props;\n\n const environmentInfo = PCore.getEnvironmentInfo();\n const timezone = environmentInfo && environmentInfo.getTimeZone();\n\n const [dateValue, setDateValue] = useState<Dayjs | null>(value ? dayjs(DateFormatter.convertToTimezone(value, { timezone })) : null);\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 // Start with default dateFormatInfo\n const dateFormatInfo = dateFormatInfoDefault;\n // and then update, as needed, based on locale, etc.\n const theDateFormat = getDateFormatInfo();\n dateFormatInfo.dateFormatString = theDateFormat.dateFormatString;\n dateFormatInfo.dateFormatStringLC = theDateFormat.dateFormatStringLC;\n dateFormatInfo.dateFormatMask = theDateFormat.dateFormatMask;\n\n useEffect(() => {\n setDateValue(dayjs(DateFormatter.convertToTimezone(value, { timezone })));\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n const formattedDateTime = format(props.value, 'datetime', {\n format: `${dateFormatInfo.dateFormatString} hh:mm a`\n });\n return <FieldValueList name={hideLabel ? '' : label} value={formattedDateTime} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n const formattedDateTime = format(props.value, 'datetime', {\n format: `${dateFormatInfo.dateFormatString} hh:mm a`\n });\n return <FieldValueList name={hideLabel ? '' : label} value={formattedDateTime} variant='stacked' />;\n }\n\n if (readOnly) {\n const formattedDateTime = format(props.value, 'datetime');\n return <TextInput {...props} value={formattedDateTime} />;\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n const handleChange = date => {\n const timeZoneDateTime = (dayjs as any).tz(date.format('YYYY-MM-DDTHH:mm:ss'), timezone);\n const changeValue = timeZoneDateTime && timeZoneDateTime.isValid() ? timeZoneDateTime.toISOString() : '';\n setDateValue(timeZoneDateTime);\n handleEvent(actions, 'changeNblur', propName, changeValue);\n };\n\n //\n // TODO: Keyboard doesn't work in the minute field, it updates one digit then jump to am/pm field\n // try an older version of the lib or use DateTimePicker\n //\n\n return (\n <DateTimePicker\n // fullWidth\n // autoOk\n disabled={disabled}\n format={`${dateFormatInfo.dateFormatString} hh:mm a`}\n // mask={`${dateFormatInfo.dateFormatMask} __:__ _m`}\n minutesStep={5}\n label={label}\n value={dateValue}\n onChange={handleChange}\n slotProps={{\n textField: {\n variant: 'outlined',\n required,\n placeholder: `${dateFormatInfo.dateFormatStringLC} hh:mm a`,\n error: status === 'error',\n helperText: helperTextToDisplay,\n size: 'small',\n InputProps: { ...testProps }\n }\n }}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Decimal.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Decimal/Decimal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Decimal.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Decimal/Decimal.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAMjE,UAAU,YAAa,SAAQ,eAAe;IAE5C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,2CAoGlD"}
|
|
@@ -42,9 +42,7 @@ export default function Decimal(props) {
|
|
|
42
42
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
43
43
|
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue, variant: 'stacked' });
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
'data-test-id': testId
|
|
47
|
-
};
|
|
45
|
+
const testProps = { 'data-test-id': testId };
|
|
48
46
|
function decimalOnBlur() {
|
|
49
47
|
handleEvent(actions, 'changeNblur', propName, values);
|
|
50
48
|
}
|
|
@@ -53,6 +51,6 @@ export default function Decimal(props) {
|
|
|
53
51
|
};
|
|
54
52
|
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 => {
|
|
55
53
|
handleChange(val);
|
|
56
|
-
}, onBlur: !readOnly ? decimalOnBlur : undefined, prefix: readOnly && formatter === 'Currency' ? theCurrSym : '', suffix: readOnly && formatter === 'Percentage' ? '%' : '', decimalSeparator: theCurrDec, thousandSeparator: showGroupSeparators ? theCurrSep : '', decimalScale: readOnly && formatter === 'Currency' ? undefined : decimalPrecision,
|
|
54
|
+
}, onBlur: !readOnly ? decimalOnBlur : undefined, prefix: readOnly && formatter === 'Currency' ? theCurrSym : '', suffix: readOnly && formatter === 'Percentage' ? '%' : '', decimalSeparator: theCurrDec, thousandSeparator: showGroupSeparators ? theCurrSep : '', decimalScale: readOnly && formatter === 'Currency' ? undefined : decimalPrecision, slotProps: { input: { ...readOnlyProp, inputProps: { ...testProps } } }, customInput: TextField }));
|
|
57
55
|
}
|
|
58
56
|
//# sourceMappingURL=Decimal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Decimal.js","sourceRoot":"","sources":["../../../../src/components/field/Decimal/Decimal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE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C,UAAU,CAAC,CAAC,CAAC,EAAE,EACxD,YAAY,EAAE,QAAQ,IAAI,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,EACjF,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 { NumericFormat } from 'react-number-format';\nimport { TextField } from '@mui/material';\nimport { useEffect, useState } from 'react';\nimport { getCurrencyCharacters, getCurrencyOptions } from '../Currency/currency-utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\n/* Using react-number-format component here, since it allows formatting decimal values,\nas per the locale.\n*/\n\ninterface DecimalProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Decimal here\n currencyISOCode?: string;\n decimalPrecision?: number;\n showGroupSeparators?: boolean;\n formatter?: string;\n}\n\nexport default function Decimal(props: DecimalProps) {\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, onBlur, */\n readOnly,\n helperText,\n displayMode,\n hideLabel,\n currencyISOCode = 'USD',\n decimalPrecision,\n showGroupSeparators,\n testId,\n placeholder,\n formatter\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 theSymbols = getCurrencyCharacters(currencyISOCode);\n const theCurrDec = theSymbols.theDecimalIndicator;\n const theCurrSep = theSymbols.theDigitGroupSeparator;\n const theCurrSym = theSymbols.theCurrencySymbol;\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\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 let formattedValue = '';\n if (formatter === 'Currency') {\n formattedValue = format(value, formatter.toLowerCase(), theCurrencyOptions);\n } else {\n formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);\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 function decimalOnBlur() {\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 ? decimalOnBlur : undefined}\n prefix={readOnly && formatter === 'Currency' ? theCurrSym : ''}\n suffix={readOnly && formatter === 'Percentage' ? '%' : ''}\n decimalSeparator={theCurrDec}\n thousandSeparator={showGroupSeparators ? theCurrSep : ''}\n decimalScale={readOnly && formatter === 'Currency' ? undefined : decimalPrecision}\n slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}\n customInput={TextField}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAwCjE,UAAU,aAAc,SAAQ,eAAe;IAE7C,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;IACnB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,OAAO,EAAE,GAAG,EAAE,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,kDAiLpD"}
|
|
@@ -119,14 +119,10 @@ export default function Dropdown(props) {
|
|
|
119
119
|
let readOnlyProp = {};
|
|
120
120
|
const displayFn = (displayM, val) => {
|
|
121
121
|
if (displayM === 'DISPLAY_ONLY') {
|
|
122
|
-
return (_jsx(FieldValueList, { name: hideLabel ? '' : label,
|
|
123
|
-
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
|
|
124
|
-
value: thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)) }));
|
|
122
|
+
return (_jsx(FieldValueList, { name: hideLabel ? '' : label, value: thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)) }));
|
|
125
123
|
}
|
|
126
124
|
if (displayM === 'STACKED_LARGE_VAL') {
|
|
127
|
-
return (_jsx(FieldValueList, { name: hideLabel ? '' : label,
|
|
128
|
-
// @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
|
|
129
|
-
value: thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)), variant: 'stacked' }));
|
|
125
|
+
return (_jsx(FieldValueList, { name: hideLabel ? '' : label, value: thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)), variant: 'stacked' }));
|
|
130
126
|
}
|
|
131
127
|
return null;
|
|
132
128
|
};
|
|
@@ -136,8 +132,7 @@ export default function Dropdown(props) {
|
|
|
136
132
|
if (readOnly) {
|
|
137
133
|
readOnlyProp = { readOnly: true };
|
|
138
134
|
}
|
|
139
|
-
|
|
140
|
-
testProp = {
|
|
135
|
+
const testProps = {
|
|
141
136
|
'data-test-id': testId
|
|
142
137
|
};
|
|
143
138
|
const handleChange = evt => {
|
|
@@ -149,6 +144,8 @@ export default function Dropdown(props) {
|
|
|
149
144
|
};
|
|
150
145
|
// Material UI shows a warning if the component is rendered before options are set.
|
|
151
146
|
// So, hold off on rendering anything until options are available...
|
|
152
|
-
return options.length === 0 ? null : (_jsx(TextField, { fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: thePConn.getLocalizedValue(placeholder, '', ''), size: 'small', required: required, disabled: disabled, onChange: !readOnly ? handleChange : undefined, error: status === 'error', label: label, value: value === '' && !readOnly ? placeholder : value, select: true,
|
|
147
|
+
return options.length === 0 ? null : (_jsx(TextField, { fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: thePConn.getLocalizedValue(placeholder, '', ''), size: 'small', required: required, disabled: disabled, onChange: !readOnly ? handleChange : undefined, error: status === 'error', label: label, value: value === '' && !readOnly ? placeholder : value, select: true, slotProps: {
|
|
148
|
+
input: { ...readOnlyProp, ...testProps }
|
|
149
|
+
}, children: options.map((option) => (_jsx(MenuItem, { value: option.key, children: thePConn.getLocalizedValue(option.value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)) }, option.key))) }));
|
|
153
150
|
}
|
|
154
151
|
//# sourceMappingURL=Dropdown.js.map
|