@pega/react-sdk-components 0.25.1 → 0.25.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/Context/StoreContext.d.ts +0 -1
- package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +0 -6
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +11 -14
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.css +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.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 +49 -34
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +6 -8
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -5
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +2 -2
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -6
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +12 -9
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +28 -4
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css +4 -4
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
- 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 +2 -2
- 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.d.ts +10 -0
- package/lib/components/field/Location/Location.d.ts.map +1 -0
- package/lib/components/field/Location/Location.js +157 -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.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.d.ts +1 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +1 -2
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SelectableCard/SelectableCard.d.ts +2 -0
- package/lib/components/field/SelectableCard/SelectableCard.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/SelectableCard.js +57 -0
- package/lib/components/field/SelectableCard/SelectableCard.js.map +1 -0
- package/lib/components/field/SelectableCard/index.d.ts +2 -0
- package/lib/components/field/SelectableCard/index.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/index.js +2 -0
- package/lib/components/field/SelectableCard/index.js.map +1 -0
- package/lib/components/field/SelectableCard/utils.d.ts +14 -0
- package/lib/components/field/SelectableCard/utils.d.ts.map +1 -0
- package/lib/components/field/SelectableCard/utils.js +185 -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 +0 -1
- 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/attachmentHelpers.d.ts +14 -11
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js +52 -30
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- 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.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.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.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -1
- 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 +1 -2
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +2 -2
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -2
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +13 -77
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +0 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +0 -2
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +0 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +3 -4
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/container-helpers.d.ts +1 -0
- package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/container-helpers.js +46 -1
- package/lib/components/infra/Containers/container-helpers.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +2 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +0 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +2 -3
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +2 -4
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +0 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +8 -8
- 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 +1 -1
- 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 +4 -5
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +1 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +2 -3
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +1 -1
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +2 -2
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +0 -1
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +1 -1
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js.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.map +1 -1
- package/lib/components/template/AdvancedSearch/AdvancedSearch.d.ts.map +1 -1
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js +0 -1
- package/lib/components/template/AdvancedSearch/AdvancedSearch.js.map +1 -1
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts +0 -1
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.d.ts.map +1 -1
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js +2 -8
- package/lib/components/template/AdvancedSearch/SearchGroup/persistUtils.js.map +1 -1
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.d.ts.map +1 -1
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js +3 -5
- package/lib/components/template/AdvancedSearch/SearchGroups/SearchGroups.js.map +1 -1
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js +0 -1
- package/lib/components/template/AdvancedSearch/SearchGroups/hooks.js.map +1 -1
- package/lib/components/template/AdvancedSearch/SearchGroups/utils.js.map +1 -1
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts +0 -1
- package/lib/components/template/AdvancedSearch/TemplateContext.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.css +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +2 -2
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +4 -9
- 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 +2 -2
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +0 -1
- 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 +4 -5
- 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 +2 -2
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +8 -12
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts +1 -1
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReferenceAdvancedSearchContext.js.map +1 -1
- package/lib/components/template/DataReference/SearchForm.d.ts.map +1 -1
- package/lib/components/template/DataReference/SearchForm.js +3 -2
- package/lib/components/template/DataReference/SearchForm.js.map +1 -1
- package/lib/components/template/DataReference/utils.d.ts +4 -4
- package/lib/components/template/DataReference/utils.d.ts.map +1 -1
- package/lib/components/template/DataReference/utils.js +1 -1
- package/lib/components/template/DataReference/utils.js.map +1 -1
- 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.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +1 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +2 -3
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +2 -2
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +2 -3
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -3
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +1 -2
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +2 -2
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +1 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +3 -14
- 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 +0 -1
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -3
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +2 -2
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +0 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/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 +33 -31
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.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.map +1 -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 +3 -3
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- 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 +1 -1
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +52 -51
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- 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 +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +9 -10
- 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 +14 -8
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
- package/lib/hooks/useAfterInitialEffect.js.map +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts +1 -1
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/hooks/useFocusFirstField.d.ts.map +1 -1
- package/lib/hooks/useFocusFirstField.js.map +1 -1
- package/lib/hooks/useGetTabsCount.d.ts +0 -1
- package/lib/hooks/useGetTabsCount.d.ts.map +1 -1
- package/lib/hooks/useGetTabsCount.js +2 -3
- package/lib/hooks/useGetTabsCount.js.map +1 -1
- package/lib/hooks/useScrolltoTop.d.ts.map +1 -1
- package/lib/sdk-pega-component-map.d.ts +112 -106
- package/lib/sdk-pega-component-map.d.ts.map +1 -1
- package/lib/sdk-pega-component-map.js +9 -2
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/theme.d.ts +23 -0
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +189 -2
- package/lib/theme.js.map +1 -1
- package/lib/types/PConnProps.d.ts +1 -1
- package/package.json +16 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { default } from './ObjectReference';\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const SELECTION_MODE: {
|
|
2
|
+
SINGLE: string;
|
|
3
|
+
MULTI: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const AT_FILTEREDLIST = "@FILTERED_LIST";
|
|
6
|
+
export declare const AT_PROPERTY = "@P";
|
|
7
|
+
export declare const SQUARE_BRACKET_START = "[";
|
|
8
|
+
export declare const SQUARE_BRACKET_END = "]";
|
|
9
|
+
export declare const SIMPLE_TABLE_MANUAL_READONLY = "SimpleTableManualReadOnly";
|
|
10
|
+
export declare const PAGE = "!P!";
|
|
11
|
+
export declare const PAGELIST = "!PL!";
|
|
12
|
+
export declare const PERIOD = ".";
|
|
13
|
+
export declare function updatePageListPropertyValue(value: any): any;
|
|
14
|
+
export declare function getPropertyValue(value: any): any;
|
|
15
|
+
export declare const generateColumns: (config: any, pConn: any, referenceType: any) => void;
|
|
16
|
+
export declare const getDataRelationshipContextFromKey: (key: any) => any;
|
|
17
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;CAAuC,CAAC;AAMnE,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,IAAI,QAAQ,CAAC;AAC1B,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,MAAM,MAAM,CAAC;AAG1B,wBAAgB,2BAA2B,CAAC,KAAK,KAAA,OAGhD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,KAAA,OASrC;AAcD,eAAO,MAAM,eAAe,GAAI,WAAM,EAAE,UAAK,EAAE,kBAAa,SA6D3D,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAAG,QAAG,QAAwB,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Utils } from '../../helpers/utils';
|
|
2
|
+
export const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };
|
|
3
|
+
const getLeafNameFromPropertyName = property => property?.substr(property.lastIndexOf('.'));
|
|
4
|
+
const isSelfReferencedProperty = (param, referenceProp) => param === referenceProp?.split('.', 2)[1];
|
|
5
|
+
export const AT_FILTEREDLIST = '@FILTERED_LIST';
|
|
6
|
+
export const AT_PROPERTY = '@P';
|
|
7
|
+
export const SQUARE_BRACKET_START = '[';
|
|
8
|
+
export const SQUARE_BRACKET_END = ']';
|
|
9
|
+
export const SIMPLE_TABLE_MANUAL_READONLY = 'SimpleTableManualReadOnly';
|
|
10
|
+
export const PAGE = '!P!';
|
|
11
|
+
export const PAGELIST = '!PL!';
|
|
12
|
+
export const PERIOD = '.';
|
|
13
|
+
const AT = '@';
|
|
14
|
+
export function updatePageListPropertyValue(value) {
|
|
15
|
+
value = value.substring(0, value.indexOf(SQUARE_BRACKET_START)) + value.substring(value.indexOf(SQUARE_BRACKET_END) + 1);
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
export function getPropertyValue(value) {
|
|
19
|
+
if (value.startsWith(AT)) {
|
|
20
|
+
value = value.substring(value.indexOf(' ') + 1);
|
|
21
|
+
if (value.startsWith(PERIOD))
|
|
22
|
+
value = value.substring(1);
|
|
23
|
+
}
|
|
24
|
+
if (value.includes(SQUARE_BRACKET_START)) {
|
|
25
|
+
value = updatePageListPropertyValue(value);
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
const getCompositeKeys = (c11nEnv, property) => {
|
|
30
|
+
const { datasource: { parameters = {} } = {} } = c11nEnv.getFieldMetadata(property) || {};
|
|
31
|
+
return Object.values(parameters).reduce((compositeKeys, param) => {
|
|
32
|
+
if (isSelfReferencedProperty(property, param)) {
|
|
33
|
+
let propName = getPropertyValue(param);
|
|
34
|
+
propName = propName.substring(propName.indexOf('.'));
|
|
35
|
+
compositeKeys.push(propName);
|
|
36
|
+
}
|
|
37
|
+
return compositeKeys;
|
|
38
|
+
}, []);
|
|
39
|
+
};
|
|
40
|
+
export const generateColumns = (config, pConn, referenceType) => {
|
|
41
|
+
const displayField = getLeafNameFromPropertyName(config.displayField);
|
|
42
|
+
const referenceProp = config.value.split('.', 2)[1];
|
|
43
|
+
const compositeKeys = getCompositeKeys(pConn, referenceProp);
|
|
44
|
+
let value = getLeafNameFromPropertyName(config.value);
|
|
45
|
+
const columns = [];
|
|
46
|
+
if (displayField) {
|
|
47
|
+
columns.push({
|
|
48
|
+
value: displayField,
|
|
49
|
+
display: 'true',
|
|
50
|
+
useForSearch: true,
|
|
51
|
+
primary: 'true'
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (value && compositeKeys.indexOf(value) !== -1) {
|
|
55
|
+
columns.push({
|
|
56
|
+
value,
|
|
57
|
+
setProperty: 'Associated property',
|
|
58
|
+
key: 'true'
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const actualValue = compositeKeys.length > 0 ? compositeKeys[0] : value;
|
|
63
|
+
config.value = `@P .${referenceProp}${actualValue}`;
|
|
64
|
+
value = actualValue;
|
|
65
|
+
columns.push({
|
|
66
|
+
value: actualValue,
|
|
67
|
+
setProperty: 'Associated property',
|
|
68
|
+
key: 'true'
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
config.datasource = {
|
|
72
|
+
fields: {
|
|
73
|
+
key: getLeafNameFromPropertyName(config.value),
|
|
74
|
+
text: getLeafNameFromPropertyName(config.displayField),
|
|
75
|
+
value: getLeafNameFromPropertyName(config.value)
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
if (referenceType === 'Case') {
|
|
79
|
+
columns.push({
|
|
80
|
+
secondary: 'true',
|
|
81
|
+
display: 'true',
|
|
82
|
+
value: Utils.getMappedKey('pyID'),
|
|
83
|
+
useForSearch: true
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
compositeKeys.forEach(key => {
|
|
87
|
+
if (value !== key)
|
|
88
|
+
columns.push({
|
|
89
|
+
value: key,
|
|
90
|
+
display: 'false',
|
|
91
|
+
secondary: 'true',
|
|
92
|
+
useForSearch: false,
|
|
93
|
+
setProperty: `.${referenceProp}${key}`
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
config.columns = columns;
|
|
97
|
+
};
|
|
98
|
+
export const getDataRelationshipContextFromKey = key => key.split('.', 2)[1];
|
|
99
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/field/ObjectReference/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAEnE,MAAM,2BAA2B,GAAG,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;AAE5F,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC,KAAK,KAAK,aAAa,EAAE,KAAK,CAAC,G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,EAAE,OAAO;gBAChB,SAAS,EAAE,MAAM;gBACjB,YAAY,EAAE,KAAK;gBACnB,WAAW,EAAE,IAAI,aAAa,GAAG,GAAG,EAAE;aACvC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC","sourcesContent":["import { Utils } from '../../helpers/utils';\n\nexport const SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\nconst getLeafNameFromPropertyName = property => property?.substr(property.lastIndexOf('.'));\n\nconst isSelfReferencedProperty = (param, referenceProp) => param === referenceProp?.split('.', 2)[1];\n\nexport const AT_FILTEREDLIST = '@FILTERED_LIST';\nexport const AT_PROPERTY = '@P';\nexport const SQUARE_BRACKET_START = '[';\nexport const SQUARE_BRACKET_END = ']';\n\nexport const SIMPLE_TABLE_MANUAL_READONLY = 'SimpleTableManualReadOnly';\nexport const PAGE = '!P!';\nexport const PAGELIST = '!PL!';\nexport const PERIOD = '.';\nconst AT = '@';\n\nexport function updatePageListPropertyValue(value) {\n value = value.substring(0, value.indexOf(SQUARE_BRACKET_START)) + value.substring(value.indexOf(SQUARE_BRACKET_END) + 1);\n return value;\n}\n\nexport function getPropertyValue(value) {\n if (value.startsWith(AT)) {\n value = value.substring(value.indexOf(' ') + 1);\n if (value.startsWith(PERIOD)) value = value.substring(1);\n }\n if (value.includes(SQUARE_BRACKET_START)) {\n value = updatePageListPropertyValue(value);\n }\n return value;\n}\n\nconst getCompositeKeys = (c11nEnv, property) => {\n const { datasource: { parameters = {} } = {} } = c11nEnv.getFieldMetadata(property) || {};\n return Object.values(parameters).reduce((compositeKeys: any, param) => {\n if (isSelfReferencedProperty(property, param)) {\n let propName = getPropertyValue(param);\n propName = propName.substring(propName.indexOf('.'));\n compositeKeys.push(propName);\n }\n return compositeKeys;\n }, []);\n};\n\nexport const generateColumns = (config, pConn, referenceType) => {\n const displayField = getLeafNameFromPropertyName(config.displayField);\n const referenceProp = config.value.split('.', 2)[1];\n const compositeKeys: any = getCompositeKeys(pConn, referenceProp);\n let value = getLeafNameFromPropertyName(config.value);\n\n const columns: any = [];\n if (displayField) {\n columns.push({\n value: displayField,\n display: 'true',\n useForSearch: true,\n primary: 'true'\n });\n }\n if (value && compositeKeys.indexOf(value) !== -1) {\n columns.push({\n value,\n setProperty: 'Associated property',\n key: 'true'\n });\n } else {\n const actualValue = compositeKeys.length > 0 ? compositeKeys[0] : value;\n config.value = `@P .${referenceProp}${actualValue}`;\n value = actualValue;\n columns.push({\n value: actualValue,\n setProperty: 'Associated property',\n key: 'true'\n });\n }\n\n config.datasource = {\n fields: {\n key: getLeafNameFromPropertyName(config.value),\n text: getLeafNameFromPropertyName(config.displayField),\n value: getLeafNameFromPropertyName(config.value)\n }\n };\n\n if (referenceType === 'Case') {\n columns.push({\n secondary: 'true',\n display: 'true',\n value: Utils.getMappedKey('pyID'),\n useForSearch: true\n });\n }\n\n compositeKeys.forEach(key => {\n if (value !== key)\n columns.push({\n value: key,\n display: 'false',\n secondary: 'true',\n useForSearch: false,\n setProperty: `.${referenceProp}${key}`\n });\n });\n\n config.columns = columns;\n};\n\nexport const getDataRelationshipContextFromKey = key => key.split('.', 2)[1];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Percentage.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Percentage.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAQjE,UAAU,eAAgB,SAAQ,eAAe;IAE/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CA4FxD"}
|
|
@@ -33,10 +33,7 @@ export default function Percentage(props) {
|
|
|
33
33
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
34
34
|
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue, variant: 'stacked' });
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
testProp = {
|
|
38
|
-
'data-test-id': testId
|
|
39
|
-
};
|
|
36
|
+
const testProps = { 'data-test-id': testId };
|
|
40
37
|
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
41
38
|
const theCurrDec = theSymbols.theDecimalIndicator;
|
|
42
39
|
const theCurrSep = theSymbols.theDigitGroupSeparator;
|
|
@@ -48,6 +45,6 @@ export default function Percentage(props) {
|
|
|
48
45
|
};
|
|
49
46
|
return (_jsx(NumericFormat, { valueIsNumericString: true, fullWidth: true, variant: readOnly ? 'standard' : 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', required: required, disabled: disabled, error: status === 'error', label: label, value: values, onValueChange: val => {
|
|
50
47
|
handleChange(val);
|
|
51
|
-
}, onBlur: !readOnly ? PercentageOnBlur : undefined, decimalSeparator: theCurrDec, thousandSeparator: showGroupSeparators ? theCurrSep : '', decimalScale: decimalPrecision, suffix: '%',
|
|
48
|
+
}, onBlur: !readOnly ? PercentageOnBlur : undefined, decimalSeparator: theCurrDec, thousandSeparator: showGroupSeparators ? theCurrSep : '', decimalScale: decimalPrecision, suffix: '%', slotProps: { input: { ...readOnlyProp, inputProps: { ...testProps } } }, customInput: TextField }));
|
|
52
49
|
}
|
|
53
50
|
//# sourceMappingURL=Percentage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
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CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,UAAU,CAAC,mBAAmB,CAAC;IAClD,MAAM,UAAU,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAErD,SAAS,gBAAgB;QACvB,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,YAAY,GAAG,GAAG,CAAC,EAAE;QACzB,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,aAAa,IACZ,oBAAoB,QACpB,SAAS,QACT,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAC3C,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,WAAW,IAAI,EAAE,EAC9B,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,GAAG,CAAC,EAAE;YACnB,YAAY,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC,EACD,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,EAChD,gBAAgB,EAAE,UAAU,EAC5B,iBAAiB,EAAE,mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACxD,YAAY,EAAE,gBAAgB,EAC9B,MAAM,EAAC,GAAG,EACV,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,EACvE,WAAW,EAAE,SAAS,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { NumericFormat } from 'react-number-format';\nimport { TextField } from '@mui/material';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\nimport { getCurrencyCharacters, getCurrencyOptions } from '../Currency/currency-utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\n\n/* Using react-number-format component here, since it allows formatting decimal values,\nas per the locale.\n*/\ninterface PercentageProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Percentage here\n currencyISOCode?: string;\n showGroupSeparators?: string;\n decimalPrecision?: number;\n}\n\nexport default function Percentage(props: PercentageProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n // onChange,\n // onBlur,\n readOnly,\n currencyISOCode = 'USD',\n testId,\n helperText,\n displayMode,\n hideLabel,\n placeholder,\n showGroupSeparators,\n decimalPrecision\n } = props;\n\n const [values, setValues] = useState(value.toString());\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\n const formattedValue = format(value, pConn.getComponentName()?.toLowerCase(), theCurrencyOptions);\n\n useEffect(() => {\n setValues(value.toString());\n }, [value]);\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;\n }\n\n const testProps: any = { 'data-test-id': testId };\n\n const theSymbols = getCurrencyCharacters(currencyISOCode);\n const theCurrDec = theSymbols.theDecimalIndicator;\n const theCurrSep = theSymbols.theDigitGroupSeparator;\n\n function PercentageOnBlur() {\n handleEvent(actions, 'changeNblur', propName, values);\n }\n\n const handleChange = val => {\n setValues(val.value);\n };\n\n return (\n <NumericFormat\n valueIsNumericString\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n error={status === 'error'}\n label={label}\n value={values}\n onValueChange={val => {\n handleChange(val);\n }}\n onBlur={!readOnly ? PercentageOnBlur : undefined}\n decimalSeparator={theCurrDec}\n thousandSeparator={showGroupSeparators ? theCurrSep : ''}\n decimalScale={decimalPrecision}\n suffix='%'\n slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}\n customInput={TextField}\n />\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
1
|
+
import type { PConnFieldProps } from '../../../types/PConnProps';
|
|
2
2
|
interface PhoneProps extends PConnFieldProps {
|
|
3
3
|
}
|
|
4
4
|
export default function Phone(props: PhoneProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,UAAU,UAAW,SAAQ,eAAe;CAE3C;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,UAAU,2CAqG9C"}
|
|
@@ -25,9 +25,11 @@ export default function Phone(props) {
|
|
|
25
25
|
}
|
|
26
26
|
if (readOnly) {
|
|
27
27
|
const disableDropdown = true;
|
|
28
|
-
return (_jsx("div", { children: _jsx(MuiTelInput, { fullWidth: true, helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: onChange, error: status === 'error', label: label, value: value,
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
return (_jsx("div", { children: _jsx(MuiTelInput, { fullWidth: true, helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: onChange, error: status === 'error', label: label, value: value, slotProps: {
|
|
29
|
+
input: {
|
|
30
|
+
readOnly: true,
|
|
31
|
+
...testProp
|
|
32
|
+
}
|
|
31
33
|
}, disableDropdown: disableDropdown }) }));
|
|
32
34
|
}
|
|
33
35
|
const handleChange = inputVal => {
|
|
@@ -39,6 +41,6 @@ export default function Phone(props) {
|
|
|
39
41
|
phoneNumber = phoneNumber ? `+${phoneValue && phoneValue.replace(/\D+/g, '')}` : '';
|
|
40
42
|
handleEvent(actions, 'changeNblur', propName, phoneNumber);
|
|
41
43
|
};
|
|
42
|
-
return (_jsx(MuiTelInput, { fullWidth: true, variant: 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue,
|
|
44
|
+
return (_jsx(MuiTelInput, { fullWidth: true, variant: 'outlined', helperText: helperTextToDisplay, placeholder: placeholder ?? '', size: 'small', defaultCountry: 'US', required: required, disabled: disabled, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, error: status === 'error', label: label, value: inputValue, slotProps: { input: { ...testProp } } }));
|
|
43
45
|
}
|
|
44
46
|
//# sourceMappingURL=Phone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,WAAW,E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EAAE,EAC9B,IAAI,EAAC,OAAO,EACZ,cAAc,EAAC,IAAI,EACnB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,GACrC,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { MuiTelInput } from 'mui-tel-input';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\nimport handleEvent from '../../helpers/event-utils';\n\ninterface PhoneProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Phone here\n}\n\nexport default function Phone(props: PhoneProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n onChange,\n readOnly,\n testId,\n helperText,\n displayMode,\n hideLabel,\n placeholder\n } = props;\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n\n const [inputValue, setInputValue] = useState(value);\n useEffect(() => setInputValue(value), [value]);\n\n const helperTextToDisplay = validatemessage || helperText;\n\n let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant='stacked' />;\n }\n\n if (readOnly) {\n const disableDropdown = true;\n return (\n <div>\n <MuiTelInput\n fullWidth\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n defaultCountry='US'\n required={required}\n disabled={disabled}\n onChange={onChange}\n error={status === 'error'}\n label={label}\n value={value}\n slotProps={{\n input: {\n readOnly: true,\n ...testProp\n }\n }}\n disableDropdown={disableDropdown}\n />\n </div>\n );\n }\n\n const handleChange = inputVal => {\n setInputValue(inputVal);\n };\n\n const handleBlur = event => {\n const phoneValue = event?.target?.value;\n let phoneNumber = phoneValue.split(' ').slice(1).join();\n phoneNumber = phoneNumber ? `+${phoneValue && phoneValue.replace(/\\D+/g, '')}` : '';\n handleEvent(actions, 'changeNblur', propName, phoneNumber);\n };\n\n return (\n <MuiTelInput\n fullWidth\n variant='outlined'\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n defaultCountry='US'\n required={required}\n disabled={disabled}\n onChange={handleChange}\n onBlur={!readOnly ? handleBlur : undefined}\n error={status === 'error'}\n label={label}\n value={inputValue}\n slotProps={{ input: { ...testProp } }}\n />\n );\n}\n"]}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
1
|
+
import type { PConnFieldProps } from '../../../types/PConnProps';
|
|
2
2
|
interface RadioButtonsProps extends PConnFieldProps {
|
|
3
3
|
inline: boolean;
|
|
4
4
|
fieldMetadata?: any;
|
|
5
|
+
variant?: string;
|
|
6
|
+
hideFieldLabels?: boolean;
|
|
7
|
+
additionalProps?: any;
|
|
8
|
+
imagePosition?: string;
|
|
9
|
+
imageSize?: string;
|
|
10
|
+
showImageDescription?: boolean;
|
|
11
|
+
datasource?: any;
|
|
5
12
|
}
|
|
6
13
|
export default function RadioButtons(props: RadioButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAGjE,UAAU,iBAAkB,SAAQ,eAAe;IAEjD,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,GAAG,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAuI5D"}
|
|
@@ -7,7 +7,8 @@ import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
|
7
7
|
export default function RadioButtons(props) {
|
|
8
8
|
// Get emitted components from map (so we can get any override that may exist)
|
|
9
9
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
10
|
-
const
|
|
10
|
+
const SelectableCard = getComponentFromMap('SelectableCard');
|
|
11
|
+
const { getPConnect, label, value = '', readOnly, validatemessage, helperText, status, required, inline, displayMode, hideLabel, fieldMetadata, variant, hideFieldLabels, additionalProps, datasource, imagePosition, imageSize, showImageDescription } = props;
|
|
11
12
|
const [theSelectedButton, setSelectedButton] = useState(value);
|
|
12
13
|
const thePConn = getPConnect();
|
|
13
14
|
const theConfigProps = thePConn.getConfigProps();
|
|
@@ -44,6 +45,16 @@ export default function RadioButtons(props) {
|
|
|
44
45
|
const handleBlur = event => {
|
|
45
46
|
thePConn.getValidationApi().validate(event.target.value, ''); // 2nd arg empty string until typedef marked correctly as optional
|
|
46
47
|
};
|
|
48
|
+
if (variant === 'card') {
|
|
49
|
+
const stateProps = thePConn.getStateProps();
|
|
50
|
+
return (_jsxs("div", { children: [_jsx("h4", { style: { marginTop: 0, marginBottom: 0 }, children: label }), _jsx("div", { style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 40ch), 1fr))', gridAutoRows: '1fr', gap: '0.5rem' }, children: _jsx(SelectableCard, { hideFieldLabels: hideFieldLabels, additionalProps: additionalProps, getPConnect: getPConnect, dataSource: datasource, image: {
|
|
51
|
+
imagePosition,
|
|
52
|
+
imageSize,
|
|
53
|
+
showImageDescription,
|
|
54
|
+
imageField: stateProps.image?.split('.').pop(),
|
|
55
|
+
imageDescription: stateProps.imageDescription?.split('.').pop()
|
|
56
|
+
}, onChange: handleChange, recordKey: stateProps.value?.split('.').pop(), cardLabel: stateProps.primaryField?.split('.').pop(), radioBtnValue: value, type: 'radio', setIsRadioCardSelected: displayMode !== 'DISPLAY_ONLY' ? setSelectedButton : undefined }) })] }));
|
|
57
|
+
}
|
|
47
58
|
return (_jsxs(FormControl, { variant: 'standard', error: status === 'error', required: required, children: [_jsx(FormLabel, { component: 'legend', children: label }), _jsx(RadioGroup, { value: theSelectedButton, onChange: handleChange, onBlur: !readOnly ? handleBlur : undefined, row: inline, children: theOptions.map(theOption => {
|
|
48
59
|
return (_jsx(FormControlLabel, { value: theOption.key, label: thePConn.getLocalizedValue(theOption.value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)), control: _jsx(Radio, { color: 'primary', disabled: readOnly }, theOption.key) }, theOption.key));
|
|
49
60
|
}) }), _jsx(FormHelperText, { children: helperTextToDisplay })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtons.js","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CA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AC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,YAClH,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;oBAC1B,OAAO,CACL,KAAC,gBAAgB,IACf,KAAK,EAAE,SAAS,CAAC,GAAG,EAEpB,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAC/B,SAAS,CAAC,KAAK,EACf,UAAU,EACV,QAAQ,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,UAAU,CAAC,CAC3E,EACD,OAAO,EAAE,KAAC,KAAK,IAAqB,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAE,QAAQ,IAAjD,SAAS,CAAC,GAAG,CAAwC,IANrE,SAAS,CAAC,GAAG,CAOlB,CACH,CAAC;gBACJ,CAAC,CAAC,GACS,EACb,KAAC,cAAc,cAAE,mBAAmB,GAAkB,IAC1C,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelperText } from '@mui/material';\n\nimport Utils from '../../helpers/utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\n// Can't use RadioButtonProps until getLocaleRuleNameFromKeys is NOT private\ninterface RadioButtonsProps extends PConnFieldProps {\n // If any, enter additional props that only exist on RadioButtons here\n inline: boolean;\n fieldMetadata?: any;\n}\n\nexport default function RadioButtons(props: RadioButtonsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n value = '',\n readOnly,\n validatemessage,\n helperText,\n status,\n required,\n inline,\n displayMode,\n hideLabel,\n fieldMetadata\n } = props;\n const [theSelectedButton, setSelectedButton] = useState(value);\n\n const thePConn = getPConnect();\n const theConfigProps = thePConn.getConfigProps();\n const actionsApi = thePConn.getActionsApi();\n const propName = (thePConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n const className = thePConn.getCaseInfo().getClassName();\n\n let configProperty = (thePConn.getRawMetadata() as any)?.config?.value || '';\n configProperty = configProperty.startsWith('@P') ? configProperty.substring(3) : configProperty;\n configProperty = configProperty.startsWith('.') ? configProperty.substring(1) : configProperty;\n\n const metaData = Array.isArray(fieldMetadata) ? fieldMetadata.filter(field => field?.classID === className)[0] : fieldMetadata;\n let displayName = metaData?.datasource?.propertyForDisplayText;\n displayName = displayName?.slice(displayName.lastIndexOf('.') + 1);\n const localeContext = metaData?.datasource?.tableType === 'DataPage' ? 'datapage' : 'associated';\n const localeClass = localeContext === 'datapage' ? '@baseclass' : className;\n const localeName = localeContext === 'datapage' ? metaData?.datasource?.name : configProperty;\n const localePath = localeContext === 'datapage' ? displayName : localeName;\n\n // theOptions will be an array of JSON objects that are literally key/value pairs.\n // Ex: [ {key: \"Basic\", value: \"Basic\"} ]\n const theOptions = Utils.getOptionList(theConfigProps, thePConn.getDataObject(''));\n\n useEffect(() => {\n // This update theSelectedButton which will update the UI to show the selected button correctly\n setSelectedButton(value);\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return (\n <FieldValueList\n name={hideLabel ? '' : label}\n value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}\n />\n );\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return (\n <FieldValueList\n name={hideLabel ? '' : label}\n value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}\n variant='stacked'\n />\n );\n }\n\n const handleChange = event => {\n handleEvent(actionsApi, 'changeNblur', propName, event.target.value);\n };\n\n const handleBlur = event => {\n thePConn.getValidationApi().validate(event.target.value, ''); // 2nd arg empty string until typedef marked correctly as optional\n };\n\n return (\n <FormControl variant='standard' error={status === 'error'} required={required}>\n <FormLabel component='legend'>{label}</FormLabel>\n <RadioGroup value={theSelectedButton} onChange={handleChange} onBlur={!readOnly ? handleBlur : undefined} row={inline}>\n {theOptions.map(theOption => {\n return (\n <FormControlLabel\n value={theOption.key}\n key={theOption.key}\n label={thePConn.getLocalizedValue(\n theOption.value,\n localePath,\n thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)\n )}\n control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}\n />\n );\n })}\n </RadioGroup>\n <FormHelperText>{helperTextToDisplay}</FormHelperText>\n </FormControl>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"RadioButtons.js","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5G,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAiBhF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAwB;IAC3D,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,KAAK,GAAG,EAAE,EACV,QAAQ,EACR,eAAe,EACf,UAAU,EACV,MAAM,EACN,QAAQ,EACR,MAAM,EACN,WAAW,EACX,SAAS,EACT,aAAa,EACb,OAAO,EACP,eAAe,EACf,eAAe,EACf,UAAU,EACV,aAAa,EACb,SAAS,EACT,oBAAoB,EACrB,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAA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AK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EACpD,aAAa,EAAE,KAAK,EACpB,IAAI,EAAC,OAAO,EACZ,sBAAsB,EAAE,WAAW,KAAK,cAAc,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,GACtF,GACE,IACF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,MAAC,WAAW,IAAC,OAAO,EAAC,UAAU,EAAC,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,QAAQ,EAAE,QAAQ,aAC3E,KAAC,SAAS,IAAC,SAAS,EAAC,QAAQ,YAAE,KAAK,GAAa,EACjD,KAAC,UAAU,IAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,YAClH,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;oBAC1B,OAAO,CACL,KAAC,gBAAgB,IACf,KAAK,EAAE,SAAS,CAAC,GAAG,EAEpB,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAC/B,SAAS,CAAC,KAAK,EACf,UAAU,EACV,QAAQ,CAAC,yBAAyB,CAAC,WAAW,EAAE,aAAa,EAAE,UAAU,CAAC,CAC3E,EACD,OAAO,EAAE,KAAC,KAAK,IAAqB,KAAK,EAAC,SAAS,EAAC,QAAQ,EAAE,QAAQ,IAAjD,SAAS,CAAC,GAAG,CAAwC,IANrE,SAAS,CAAC,GAAG,CAOlB,CACH,CAAC;gBACJ,CAAC,CAAC,GACS,EACb,KAAC,cAAc,cAAE,mBAAmB,GAAkB,IAC1C,CACf,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport { Radio, RadioGroup, FormControl, FormControlLabel, FormLabel, FormHelperText } from '@mui/material';\n\nimport Utils from '../../helpers/utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\n// Can't use RadioButtonProps until getLocaleRuleNameFromKeys is NOT private\ninterface RadioButtonsProps extends PConnFieldProps {\n // If any, enter additional props that only exist on RadioButtons here\n inline: boolean;\n fieldMetadata?: any;\n variant?: string;\n hideFieldLabels?: boolean;\n additionalProps?: any;\n imagePosition?: string;\n imageSize?: string;\n showImageDescription?: boolean;\n datasource?: any;\n}\n\nexport default function RadioButtons(props: RadioButtonsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n const SelectableCard = getComponentFromMap('SelectableCard');\n\n const {\n getPConnect,\n label,\n value = '',\n readOnly,\n validatemessage,\n helperText,\n status,\n required,\n inline,\n displayMode,\n hideLabel,\n fieldMetadata,\n variant,\n hideFieldLabels,\n additionalProps,\n datasource,\n imagePosition,\n imageSize,\n showImageDescription\n } = props;\n const [theSelectedButton, setSelectedButton] = useState(value);\n\n const thePConn = getPConnect();\n const theConfigProps = thePConn.getConfigProps();\n const actionsApi = thePConn.getActionsApi();\n const propName = (thePConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n const className = thePConn.getCaseInfo().getClassName();\n\n let configProperty = (thePConn.getRawMetadata() as any)?.config?.value || '';\n configProperty = configProperty.startsWith('@P') ? configProperty.substring(3) : configProperty;\n configProperty = configProperty.startsWith('.') ? configProperty.substring(1) : configProperty;\n\n const metaData = Array.isArray(fieldMetadata) ? fieldMetadata.filter(field => field?.classID === className)[0] : fieldMetadata;\n let displayName = metaData?.datasource?.propertyForDisplayText;\n displayName = displayName?.slice(displayName.lastIndexOf('.') + 1);\n const localeContext = metaData?.datasource?.tableType === 'DataPage' ? 'datapage' : 'associated';\n const localeClass = localeContext === 'datapage' ? '@baseclass' : className;\n const localeName = localeContext === 'datapage' ? metaData?.datasource?.name : configProperty;\n const localePath = localeContext === 'datapage' ? displayName : localeName;\n\n // theOptions will be an array of JSON objects that are literally key/value pairs.\n // Ex: [ {key: \"Basic\", value: \"Basic\"} ]\n const theOptions = Utils.getOptionList(theConfigProps, thePConn.getDataObject(''));\n\n useEffect(() => {\n // This update theSelectedButton which will update the UI to show the selected button correctly\n setSelectedButton(value);\n }, [value]);\n\n if (displayMode === 'DISPLAY_ONLY') {\n return (\n <FieldValueList\n name={hideLabel ? '' : label}\n value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}\n />\n );\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return (\n <FieldValueList\n name={hideLabel ? '' : label}\n value={thePConn.getLocalizedValue(value, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}\n variant='stacked'\n />\n );\n }\n\n const handleChange = event => {\n handleEvent(actionsApi, 'changeNblur', propName, event.target.value);\n };\n\n const handleBlur = event => {\n thePConn.getValidationApi().validate(event.target.value, ''); // 2nd arg empty string until typedef marked correctly as optional\n };\n\n if (variant === 'card') {\n const stateProps = thePConn.getStateProps();\n return (\n <div>\n <h4 style={{ marginTop: 0, marginBottom: 0 }}>{label}</h4>\n <div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 40ch), 1fr))', gridAutoRows: '1fr', gap: '0.5rem' }}>\n <SelectableCard\n hideFieldLabels={hideFieldLabels}\n additionalProps={additionalProps}\n getPConnect={getPConnect}\n dataSource={datasource}\n image={{\n imagePosition,\n imageSize,\n showImageDescription,\n imageField: stateProps.image?.split('.').pop(),\n imageDescription: stateProps.imageDescription?.split('.').pop()\n }}\n onChange={handleChange}\n recordKey={stateProps.value?.split('.').pop()}\n cardLabel={stateProps.primaryField?.split('.').pop()}\n radioBtnValue={value}\n type='radio'\n setIsRadioCardSelected={displayMode !== 'DISPLAY_ONLY' ? setSelectedButton : undefined}\n />\n </div>\n </div>\n );\n }\n\n return (\n <FormControl variant='standard' error={status === 'error'} required={required}>\n <FormLabel component='legend'>{label}</FormLabel>\n <RadioGroup value={theSelectedButton} onChange={handleChange} onBlur={!readOnly ? handleBlur : undefined} row={inline}>\n {theOptions.map(theOption => {\n return (\n <FormControlLabel\n value={theOption.key}\n key={theOption.key}\n label={thePConn.getLocalizedValue(\n theOption.value,\n localePath,\n thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)\n )}\n control={<Radio key={theOption.key} color='primary' disabled={readOnly} />}\n />\n );\n })}\n </RadioGroup>\n <FormHelperText>{helperTextToDisplay}</FormHelperText>\n </FormControl>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RichText/RichText.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RichText/RichText.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,aAAc,SAAQ,eAAe;IAE7C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,OAoFpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.js","sourceRoot":"","sources":["../../../../src/components/field/RichText/RichText.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAQhF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;IACnD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,C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iBAAiB,CAAC;AAC3B,CAAC","sourcesContent":["import { useRef } from 'react';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface RichTextProps extends PConnFieldProps {\n // If any, enter additional props that only exist on TextArea here\n additionalProps?: object;\n}\n\nexport default function RichText(props: RichTextProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n const RichTextEditor = getComponentFromMap('RichTextEditor');\n\n const { getPConnect, value, placeholder, validatemessage, label, hideLabel, helperText, testId, displayMode, additionalProps } = props;\n const pConn = getPConnect();\n const editorRef: any = useRef(null);\n\n let { readOnly, required, disabled } = props;\n [readOnly, required, disabled] = [readOnly, required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));\n\n const helperTextToDisplay = validatemessage || helperText;\n\n if (displayMode === 'DISPLAY_ONLY') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} isHtml />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} isHtml variant='stacked' />;\n }\n\n let richTextComponent;\n\n if (readOnly) {\n // Rich Text read-only component\n richTextComponent = (\n <RichTextEditor\n {...additionalProps}\n label={label}\n labelHidden={hideLabel}\n defaultValue={value}\n testId={testId}\n info={helperTextToDisplay}\n ref={editorRef}\n readOnly\n />\n );\n } else {\n // Rich Text editable component\n const actionsApi = pConn.getActionsApi();\n let status = '';\n if (validatemessage !== '') {\n status = 'error';\n }\n const handleChange = () => {\n if (status === 'error') {\n const property = (pConn.getStateProps() as any).value;\n pConn.clearErrorMessages({\n property,\n category: '',\n context: ''\n });\n }\n };\n\n const handleBlur = () => {\n if (editorRef.current) {\n const editorValue = editorRef.current.getContent({ format: 'html' });\n const property = (pConn.getStateProps() as any).value;\n handleEvent(actionsApi, 'changeNblur', property, editorValue);\n }\n };\n\n richTextComponent = (\n <RichTextEditor\n {...additionalProps}\n label={label}\n labelHidden={hideLabel}\n info={helperTextToDisplay}\n defaultValue={value}\n placeholder={placeholder}\n disabled={disabled}\n required={required}\n testId={testId}\n ref={editorRef}\n error={status === 'error'}\n onBlur={handleBlur}\n onChange={handleChange}\n />\n );\n }\n\n return richTextComponent;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarList.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/ScalarList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarList.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/ScalarList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,eAAgB,SAAQ,UAAU;IAE1C,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAcD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CAoCxD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
/* eslint-disable react/no-array-index-key */
|
|
3
2
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
4
3
|
function CommaSeparatedList(props) {
|
|
5
4
|
const { items } = props;
|
|
@@ -22,7 +21,7 @@ export default function ScalarList(props) {
|
|
|
22
21
|
readOnly: 'true'
|
|
23
22
|
}
|
|
24
23
|
}, '',
|
|
25
|
-
// @ts-
|
|
24
|
+
// @ts-expect-error
|
|
26
25
|
'', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
|
|
27
26
|
});
|
|
28
27
|
if (['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarList.js","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/ScalarList.tsx"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"ScalarList.js","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/ScalarList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAchF,SAAS,kBAAkB,CAAC,KAAK;IAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,OAAO,CACL,aAAI,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,YACrC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC1B,OAAO,yBAAmB,KAAK,IAAb,KAAK,CAAgB,CAAC;QAC1C,CAAC,CAAC,GACC,CACN,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE/G,MAAM,KAAK,GAAG,YAAY,EAAE,GAAG,CAAC,WAAW,CAAC,EAAE;QAC5C,OAAO,WAAW,EAAE,CAAC,eAAe,CAClC;YACE,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACN,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,cAAc;gBAC3B,KAAK;gBACL,GAAG,SAAS;gBACZ,QAAQ,EAAE,MAAM;aACjB;SACF,EACD,EAAE;QACF,mBAAmB;QACnB,EAAE,EACF,EAAE,CACH,CAAC,CAAC,8FAA8F;IACnG,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QAChE,OAAO,CACL,wBACE,KAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI,GAChC,CACP,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG,KAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC;IAEzD,OAAO,KAAC,cAAc,IAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAC,SAAS,GAAG,CAAC;AAChG,CAAC","sourcesContent":["import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnProps } from '../../../types/PConnProps';\n\n// ScalarListProps can't extend PConnFieldProps because its 'value' has a different type\ninterface ScalarListProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n displayInModal: boolean;\n hideLabel: boolean;\n value: any[];\n componentType: string;\n label: string;\n displayMode: string;\n}\n\nfunction CommaSeparatedList(props) {\n const { items } = props;\n\n return (\n <ul style={{ padding: '0', margin: '0' }}>\n {items.map((value, index) => {\n return <span key={index}>{value}</span>;\n })}\n </ul>\n );\n}\n\nexport default function ScalarList(props: ScalarListProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const { label, getPConnect, componentType, value: scalarValues, displayMode, hideLabel, ...restProps } = props;\n\n const items = scalarValues?.map(scalarValue => {\n return getPConnect().createComponent(\n {\n type: componentType,\n config: {\n value: scalarValue,\n displayMode: 'DISPLAY_ONLY',\n label,\n ...restProps,\n readOnly: 'true'\n }\n },\n '',\n // @ts-expect-error\n '',\n {}\n ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;\n });\n\n if (['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode)) {\n return (\n <div>\n <CommaSeparatedList items={items} />\n </div>\n );\n }\n\n const displayComp = <CommaSeparatedList items={items} />;\n\n return <FieldValueList name={hideLabel ? '' : label} value={displayComp} variant='stacked' />;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectableCard.d.ts","sourceRoot":"","sources":["../../../../src/components/field/SelectableCard/SelectableCard.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,KAAA,2CA2K3C"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Radio, Checkbox, FormControlLabel, Card, CardContent, Typography } from '@mui/material';
|
|
3
|
+
import { resolveReferenceFields } from './utils';
|
|
4
|
+
export default function SelectableCard(props) {
|
|
5
|
+
const { getPConnect, type, image: { imagePosition, imageSize, showImageDescription, imageField = '', imageDescription = '' }, dataSource, recordKey = '', className, cardLabel, hideFieldLabels = false, readOnly, disabled, readOnlyList = [], displayMode, radioBtnValue, onChange, onBlur, onClick, onKeyDown, additionalProps, testId, setIsRadioCardSelected, showNoValue = false } = props;
|
|
6
|
+
const pConn = getPConnect();
|
|
7
|
+
if (showNoValue)
|
|
8
|
+
return _jsx(Typography, { children: "No Value" });
|
|
9
|
+
const cardDataSource = readOnly || displayMode === 'DISPLAY_ONLY' ? readOnlyList || [] : dataSource?.source;
|
|
10
|
+
const imageDescriptionKey = showImageDescription ? imageDescription : undefined;
|
|
11
|
+
let radioItemSelected = false;
|
|
12
|
+
return (_jsxs(_Fragment, { children: [(cardDataSource || []).map(item => {
|
|
13
|
+
const resolvedFields = resolveReferenceFields(item, hideFieldLabels, recordKey, pConn);
|
|
14
|
+
const commonProps = {
|
|
15
|
+
id: item[recordKey],
|
|
16
|
+
key: item[recordKey],
|
|
17
|
+
fields: resolvedFields,
|
|
18
|
+
label: item[cardLabel]
|
|
19
|
+
};
|
|
20
|
+
const image = item[imageField]
|
|
21
|
+
? {
|
|
22
|
+
src: item[imageField],
|
|
23
|
+
alt: showImageDescription && imageDescriptionKey ? item[imageDescriptionKey] : '',
|
|
24
|
+
style: { width: imageSize, objectPosition: imagePosition }
|
|
25
|
+
}
|
|
26
|
+
: undefined;
|
|
27
|
+
const cardContent = (_jsxs(Card, { className: className, style: { display: 'flex' }, "data-testid": testId, children: [image && _jsx("img", { src: image.src, alt: image.alt, style: { width: '100px' } }), _jsxs(CardContent, { children: [_jsx(Typography, { variant: 'body1', children: item[cardLabel] }), commonProps.fields.map((field, index) => (_jsx(Typography, { variant: 'body2', children: field.value }, index)))] })] }));
|
|
28
|
+
if (displayMode === 'DISPLAY_ONLY') {
|
|
29
|
+
return cardContent;
|
|
30
|
+
}
|
|
31
|
+
const component = (_jsx("div", { style: { paddingTop: '15px' }, children: _jsx(Card, { className: className, style: { display: 'flex', flexDirection: 'column', height: '100%' }, "data-testid": testId, children: _jsxs(CardContent, { style: {
|
|
32
|
+
...((imagePosition === 'inline-start' || imagePosition === 'inline-end') && { display: 'flex', height: '100%' }),
|
|
33
|
+
...(imagePosition === 'inline-end' && { flexDirection: 'row-reverse' })
|
|
34
|
+
}, children: [_jsx("div", { style: {
|
|
35
|
+
...((imagePosition === 'inline-start' || imagePosition === 'inline-end') && { width: '40%' })
|
|
36
|
+
}, children: image && (_jsx("img", { src: image.src, alt: image.alt, style: {
|
|
37
|
+
width: '100%',
|
|
38
|
+
backgroundColor: 'rgb(233, 238, 243)',
|
|
39
|
+
aspectRatio: '16 / 9',
|
|
40
|
+
maxHeight: '100%',
|
|
41
|
+
height: '100%',
|
|
42
|
+
objectFit: 'contain',
|
|
43
|
+
maxWidth: '100%'
|
|
44
|
+
} })) }), _jsxs("div", { style: {
|
|
45
|
+
...((imagePosition === 'inline-start' || imagePosition === 'inline-end') && { width: '60%' })
|
|
46
|
+
}, children: [type === 'radio' ? (_jsx(FormControlLabel, { control: _jsx(Radio, { value: item[recordKey], checked: radioBtnValue === item[recordKey], onChange: onChange, onBlur: onBlur, onClick: onClick, onKeyDown: onKeyDown, disabled: disabled, ...additionalProps }), label: _jsx(Typography, { variant: 'body1', children: item[cardLabel] }) })) : (_jsx(FormControlLabel, { control: _jsx(Checkbox, { id: item[recordKey], getPConnect: getPConnect, checked: readOnlyList.some(data => data[recordKey] === item[recordKey]), onChange: onChange, onBlur: onBlur, onClick: onClick, onKeyDown: onKeyDown, disabled: disabled, ...additionalProps }), label: _jsx(Typography, { variant: 'body1', children: item[cardLabel] }) })), commonProps.fields.map((field, index) => (_jsxs("div", { style: {
|
|
47
|
+
fontSize: '0.875rem',
|
|
48
|
+
...(field.type !== 'TextArea' && { display: 'grid', gridTemplateColumns: '1fr 1fr' }),
|
|
49
|
+
margin: '5px'
|
|
50
|
+
}, children: [_jsx("div", { style: { color: 'rgba(0, 0, 0, 0.6)' }, children: field.name }), _jsx("div", { children: field?.value?.props.value })] }, index)))] })] }) }) }));
|
|
51
|
+
if (type === 'radio' && radioBtnValue === item[recordKey]) {
|
|
52
|
+
radioItemSelected = true;
|
|
53
|
+
}
|
|
54
|
+
return component;
|
|
55
|
+
}), type === 'radio' && setIsRadioCardSelected && setIsRadioCardSelected(radioItemSelected)] }));
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=SelectableCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectableCard.js","sourceRoot":"","sources":["../../../../src/components/field/SelectableCard/SelectableCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK;IAC1C,MAAM,EACJ,WAAW,EACX,IAAI,EACJ,KAAK,EAAE,EAA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, Typography } from '@mui/material';\nimport { resolveReferenceFields } from './utils';\n\nexport default function SelectableCard(props) {\n const {\n getPConnect,\n type,\n image: { imagePosition, imageSize, showImageDescription, imageField = '', imageDescription = '' },\n dataSource,\n recordKey = '',\n className,\n cardLabel,\n hideFieldLabels = false,\n readOnly,\n disabled,\n readOnlyList = [],\n displayMode,\n radioBtnValue,\n onChange,\n onBlur,\n onClick,\n onKeyDown,\n additionalProps,\n testId,\n setIsRadioCardSelected,\n showNoValue = false\n } = props;\n\n const pConn = getPConnect();\n\n if (showNoValue) return <Typography>No Value</Typography>;\n\n const cardDataSource = readOnly || displayMode === 'DISPLAY_ONLY' ? readOnlyList || [] : dataSource?.source;\n const imageDescriptionKey = showImageDescription ? imageDescription : undefined;\n\n let radioItemSelected = false;\n\n return (\n <>\n {(cardDataSource || []).map(item => {\n const resolvedFields = resolveReferenceFields(item, hideFieldLabels, recordKey, pConn);\n\n const commonProps = {\n id: item[recordKey],\n key: item[recordKey],\n fields: resolvedFields,\n label: item[cardLabel]\n };\n\n const image = item[imageField]\n ? {\n src: item[imageField],\n alt: showImageDescription && imageDescriptionKey ? item[imageDescriptionKey] : '',\n style: { width: imageSize, objectPosition: imagePosition }\n }\n : undefined;\n\n const cardContent = (\n <Card className={className} style={{ display: 'flex' }} data-testid={testId}>\n {image && <img src={image.src} alt={image.alt} style={{ width: '100px' }} />}\n <CardContent>\n <Typography variant='body1'>{item[cardLabel]}</Typography>\n {commonProps.fields.map((field, index) => (\n <Typography key={index} variant='body2'>\n {field.value}\n </Typography>\n ))}\n </CardContent>\n </Card>\n );\n\n if (displayMode === 'DISPLAY_ONLY') {\n return cardContent;\n }\n\n const component = (\n <div style={{ paddingTop: '15px' }}>\n <Card className={className} style={{ display: 'flex', flexDirection: 'column', height: '100%' }} data-testid={testId}>\n <CardContent\n style={{\n ...((imagePosition === 'inline-start' || imagePosition === 'inline-end') && { display: 'flex', height: '100%' }),\n ...(imagePosition === 'inline-end' && { flexDirection: 'row-reverse' })\n }}\n >\n <div\n style={{\n ...((imagePosition === 'inline-start' || imagePosition === 'inline-end') && { width: '40%' })\n }}\n >\n {image && (\n <img\n src={image.src}\n alt={image.alt}\n style={{\n width: '100%',\n backgroundColor: 'rgb(233, 238, 243)',\n aspectRatio: '16 / 9',\n maxHeight: '100%',\n height: '100%',\n objectFit: 'contain',\n maxWidth: '100%'\n }}\n />\n )}\n </div>\n <div\n style={{\n ...((imagePosition === 'inline-start' || imagePosition === 'inline-end') && { width: '60%' })\n }}\n >\n {type === 'radio' ? (\n <FormControlLabel\n control={\n <Radio\n value={item[recordKey]}\n checked={radioBtnValue === item[recordKey]}\n onChange={onChange}\n onBlur={onBlur}\n onClick={onClick}\n onKeyDown={onKeyDown}\n disabled={disabled}\n {...additionalProps}\n />\n }\n label={<Typography variant='body1'>{item[cardLabel]}</Typography>}\n />\n ) : (\n <FormControlLabel\n control={\n <Checkbox\n id={item[recordKey]}\n getPConnect={getPConnect}\n checked={readOnlyList.some(data => data[recordKey] === item[recordKey])}\n onChange={onChange}\n onBlur={onBlur}\n onClick={onClick}\n onKeyDown={onKeyDown}\n disabled={disabled}\n {...additionalProps}\n />\n }\n label={<Typography variant='body1'>{item[cardLabel]}</Typography>}\n />\n )}\n\n {commonProps.fields.map((field, index) => (\n <div\n key={index}\n style={{\n fontSize: '0.875rem',\n ...(field.type !== 'TextArea' && { display: 'grid', gridTemplateColumns: '1fr 1fr' }),\n margin: '5px'\n }}\n >\n <div style={{ color: 'rgba(0, 0, 0, 0.6)' }}>{field.name}</div>\n <div>{field?.value?.props.value}</div>\n </div>\n ))}\n </div>\n </CardContent>\n </Card>\n </div>\n );\n\n if (type === 'radio' && radioBtnValue === item[recordKey]) {\n radioItemSelected = true;\n }\n\n return component;\n })}\n\n {type === 'radio' && setIsRadioCardSelected && setIsRadioCardSelected(radioItemSelected)}\n </>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/field/SelectableCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|