@pega/react-sdk-components 23.1.11 → 24.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +136 -140
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +1 -2
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts +1 -2
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +1 -2
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +1 -2
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.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/FieldGroupList/FieldGroupList.d.ts +1 -2
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +2 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +4 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -2
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.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/WssQuickCreate/WssQuickCreate.d.ts +1 -2
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -2
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -2
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +2 -0
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +8 -2
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +51 -9
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +2 -2
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +19 -8
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -2
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -2
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +3 -3
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +25 -6
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +1 -2
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -2
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Group/Group.d.ts +1 -1
- package/lib/components/field/Group/Group.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +1 -2
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Multiselect/Multiselect.d.ts +2 -0
- package/lib/components/field/Multiselect/Multiselect.d.ts.map +1 -0
- package/lib/components/field/Multiselect/Multiselect.js +175 -0
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -0
- package/lib/components/field/Multiselect/index.d.ts +2 -0
- package/lib/components/field/Multiselect/index.d.ts.map +1 -0
- package/lib/components/field/Multiselect/index.js +2 -0
- package/lib/components/field/Multiselect/index.js.map +1 -0
- package/lib/components/field/Multiselect/utils.d.ts +10 -0
- package/lib/components/field/Multiselect/utils.d.ts.map +1 -0
- package/lib/components/field/Multiselect/utils.js +197 -0
- package/lib/components/field/Multiselect/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +3 -2
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +17 -8
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -2
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +13 -7
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +1 -2
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +2 -2
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -2
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +2 -0
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -2
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -2
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -2
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -2
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -2
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -2
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +1 -0
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +8 -1
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +0 -1
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +1 -4
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts +2 -2
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts +5 -0
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -0
- package/lib/components/helpers/instructions-utils.js +36 -0
- package/lib/components/helpers/instructions-utils.js.map +1 -0
- package/lib/components/helpers/state-utils.d.ts +1 -2
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +1 -2
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +22 -1
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +2 -2
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +2 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -2
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -2
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +3 -3
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +3 -3
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -2
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/helpers.d.ts +1 -1
- package/lib/components/infra/Containers/helpers.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts +1 -2
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +5 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.d.ts +1 -1
- 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.d.ts +1 -2
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +1 -1
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +1 -2
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +1 -1
- 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/Stages/Stages.d.ts +1 -2
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +1 -2
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/View/View.d.ts +1 -1
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +2 -2
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -2
- 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 +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +1 -1
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.js +2 -6
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +1 -2
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +1 -1
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -2
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -2
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -2
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -2
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +2 -0
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -2
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +1 -2
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +21 -28
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -2
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -2
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -2
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +1 -0
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -2
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +8 -4
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -2
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -2
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -2
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -2
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -2
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.d.ts +1 -2
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +3 -2
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -2
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -2
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -2
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +1 -1
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -2
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +1 -0
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -2
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -2
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -2
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +19 -7
- package/lib/sdk-pega-component-map.d.ts +2 -0
- package/lib/sdk-pega-component-map.js +2 -0
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnProps } from '../../../types/PConnProps';
|
|
3
2
|
interface OperatorProps extends PConnProps {
|
|
4
3
|
label: string;
|
|
@@ -16,6 +15,6 @@ interface OperatorProps extends PConnProps {
|
|
|
16
15
|
};
|
|
17
16
|
displayLabel?: any;
|
|
18
17
|
}
|
|
19
|
-
export default function Operator(props: OperatorProps): JSX.Element;
|
|
18
|
+
export default function Operator(props: OperatorProps): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
export {};
|
|
21
20
|
//# sourceMappingURL=Operator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operator.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Operator/Operator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Operator.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Operator/Operator.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAIvD,UAAU,aAAc,SAAQ,UAAU;IAExC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB;AAaD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAqLpD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
interface PulseProps {
|
|
3
3
|
}
|
|
4
|
-
export default function Pulse(props: PropsWithChildren<PulseProps>): JSX.Element;
|
|
4
|
+
export default function Pulse(props: PropsWithChildren<PulseProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=Pulse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pulse.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Pulse/Pulse.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM1C,UAAU,UAAU;CAEnB;AAWD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"Pulse.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Pulse/Pulse.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM1C,UAAU,UAAU;CAEnB;AAWD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC,UAAU,CAAC,2CAajE"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import './WssQuickCreate.css';
|
|
3
2
|
interface WssQuickCreateProps {
|
|
4
3
|
heading: string;
|
|
5
4
|
actions?: any[];
|
|
6
5
|
}
|
|
7
|
-
export default function WssQuickCreate(props: WssQuickCreateProps): JSX.Element;
|
|
6
|
+
export default function WssQuickCreate(props: WssQuickCreateProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=WssQuickCreate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WssQuickCreate.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WssQuickCreate.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx"],"names":[],"mappings":"AACA,OAAO,sBAAsB,CAAC;AAI9B,UAAU,mBAAmB;IAE3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAyBhE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface AutoCompleteProps extends PConnFieldProps {
|
|
4
3
|
displayMode?: string;
|
|
@@ -12,6 +11,6 @@ interface AutoCompleteProps extends PConnFieldProps {
|
|
|
12
11
|
datasource: any;
|
|
13
12
|
columns: any[];
|
|
14
13
|
}
|
|
15
|
-
export default function AutoComplete(props: AutoCompleteProps): JSX.Element;
|
|
14
|
+
export default function AutoComplete(props: AutoCompleteProps): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
export {};
|
|
17
16
|
//# sourceMappingURL=AutoComplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/field/AutoComplete/AutoComplete.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/field/AutoComplete/AutoComplete.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA8B5D,UAAU,iBAAkB,SAAQ,eAAe;IAEjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,UAAU,EAAE,GAAG,CAAC;IAChB,OAAO,EAAE,GAAG,EAAE,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAoK5D"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
import './CancelAlert.css';
|
|
4
3
|
interface CancelAlertProps extends PConnFieldProps {
|
|
@@ -10,6 +9,6 @@ interface CancelAlertProps extends PConnFieldProps {
|
|
|
10
9
|
skipReleaseLockRequest: any;
|
|
11
10
|
dismiss: Function;
|
|
12
11
|
}
|
|
13
|
-
export default function CancelAlert(props: CancelAlertProps): JSX.Element;
|
|
12
|
+
export default function CancelAlert(props: CancelAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export {};
|
|
15
14
|
//# sourceMappingURL=CancelAlert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancelAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/CancelAlert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CancelAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/CancelAlert.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAiB,SAAQ,eAAe;IAEhD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,GAAG,CAAC;IAC5B,OAAO,EAAE,QAAQ,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAoI1D"}
|
|
@@ -8,6 +8,7 @@ export default function CancelAlert(props) {
|
|
|
8
8
|
const actionsAPI = getPConnect().getActionsApi();
|
|
9
9
|
const containerManagerAPI = getPConnect().getContainerManager();
|
|
10
10
|
const isLocalAction = getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION);
|
|
11
|
+
// @ts-ignore - Property 'options' is private and only accessible within class 'C11nEnv'.
|
|
11
12
|
const isBulkAction = getPConnect()?.options?.isBulkAction;
|
|
12
13
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
13
14
|
const broadCastUtils = PCore.getCoexistenceManager().getBroadcastUtils();
|
|
@@ -69,6 +70,7 @@ export default function CancelAlert(props) {
|
|
|
69
70
|
}
|
|
70
71
|
else {
|
|
71
72
|
dismiss(true);
|
|
73
|
+
// @ts-ignore - Argument of type '{ containerItemID: string; skipReleaseLockRequest: any; }' is not assignable to parameter of type 'ContainerInfo'.
|
|
72
74
|
containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest });
|
|
73
75
|
}
|
|
74
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancelAlert.js","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/CancelAlert.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAGjD,OAAO,mBAAmB,CAAC;AAa3B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IACzD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACrI,MAAM,UAAU,GAAG,WAAW,EAAE,CAAC,aAAa,EAAE,CAAC;IACjD,MAAM,mBAAmB,GAAG,WAAW,EAAE,CAAC,mBAAmB,EAAE,CAAC;IAChE,MAAM,aAAa,GAAG,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC7F,MAAM,YAAY,GAAG,WAAW,EAAE,EAAE,OAAO,EAAE,YAAY,CAA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,gBAAY,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,mBAAmB,YACtF,KAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,GACnB,GAEf,IACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { Button, Grid, IconButton, Snackbar } from '@material-ui/core';\nimport CloseIcon from '@material-ui/icons/Close';\n\nimport { PConnFieldProps } from '../../../types/PConnProps';\nimport './CancelAlert.css';\n\ninterface CancelAlertProps extends PConnFieldProps {\n // If any, enter additional props that only exist on CancelAlert here\n heading: string;\n content: string;\n itemKey: string;\n hideDelete: boolean;\n isDataObject: boolean;\n skipReleaseLockRequest: any;\n dismiss: Function;\n}\n\nexport default function CancelAlert(props: CancelAlertProps) {\n const { heading, content, getPConnect, itemKey: containerItemID, hideDelete, isDataObject, skipReleaseLockRequest, dismiss } = props;\n const actionsAPI = getPConnect().getActionsApi();\n const containerManagerAPI = getPConnect().getContainerManager();\n const isLocalAction = getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION);\n const isBulkAction = getPConnect()?.options?.isBulkAction;\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const broadCastUtils: any = PCore.getCoexistenceManager().getBroadcastUtils();\n const isReverseCoexistence = broadCastUtils.isReverseCoexistenceCaseLoaded();\n const localeCategory = 'ModalContainer';\n const btnIds = {\n SAVE_AND_CLOSE: 'saveAndClose',\n CONTINUE_WORKING: 'continueWorking',\n DELETE: 'delete'\n };\n\n const [buttonsState, setButtonsState] = useState({\n [btnIds.SAVE_AND_CLOSE]: false,\n [btnIds.DELETE]: false\n });\n\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage] = useState('');\n\n function disableButton(id) {\n setButtonsState(prevState => ({\n ...prevState,\n [id]: true\n }));\n }\n\n function enableButton(id) {\n setButtonsState(prevState => ({\n ...prevState,\n [id]: false\n }));\n }\n\n function cancelHandler() {\n if (isReverseCoexistence) {\n dismiss(true);\n // @ts-ignore - An argument for 'payload' was not provided.\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD);\n } else if (!isDataObject && !isLocalAction && !isBulkAction) {\n disableButton(btnIds.DELETE);\n actionsAPI\n .deleteCaseInCreateStage(containerItemID, hideDelete)\n .then(() => {\n // @ts-ignore - An argument for 'payload' was not provided.\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);\n })\n .catch(() => {\n setSnackbarMessage(localizedVal('Delete failed.', localeCategory));\n setShowSnackbar(true);\n })\n .finally(() => {\n enableButton(btnIds.DELETE);\n dismiss(true);\n });\n } else if (isLocalAction) {\n dismiss(true);\n actionsAPI.cancelAssignment(containerItemID);\n } else if (isBulkAction) {\n dismiss(true);\n actionsAPI.cancelBulkAction(containerItemID);\n } else {\n dismiss(true);\n containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest });\n }\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n const leftButton = (\n <Button\n name={btnIds.CONTINUE_WORKING}\n variant='contained'\n color='secondary'\n onClick={() => {\n dismiss();\n if (isReverseCoexistence) {\n broadCastUtils.setCallBackFunction(null);\n broadCastUtils.setIsDirtyDialogActive(false);\n }\n }}\n >\n {localizedVal('Go back', localeCategory)}\n </Button>\n );\n\n const rightButton = (\n <Button name={btnIds.DELETE} variant='contained' color='primary' disabled={buttonsState[btnIds.DELETE]} onClick={cancelHandler}>\n {localizedVal('Discard', localeCategory)}\n </Button>\n );\n\n return (\n <>\n <div className='cancel-alert-background'>\n <div className='cancel-alert-top'>\n <h3>{localizedVal(heading, localeCategory)}</h3>\n <div>\n <p>{localizedVal(content, localeCategory)}</p>\n </div>\n <div className='action-controls'>\n <Grid container spacing={4} justifyContent='space-between'>\n <Grid item>{leftButton}</Grid>\n <Grid item>{rightButton}</Grid>\n </Grid>\n </div>\n </div>\n </div>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CancelAlert.js","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/CancelAlert.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAGjD,OAAO,mBAAmB,CAAC;AAa3B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IACzD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACrI,MAAM,UAAU,GAAG,WAAW,EAAE,CAAC,aAAa,EAAE,CAAC;IACjD,MAAM,mBAAmB,GAAG,WAAW,EAAE,CAAC,mBAAmB,EAAE,CAAC;IAChE,MAAM,aAAa,GAAG,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC7F,yFAAyF;IACzF,MAAM,YAAY,GAAG,WAAW,EAAE,EAAE,OAAO,EAAE,YAAY,CAAC;IAC1D,MAAM,YAAY,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,cAAc,CAAC;IAC3D,MAAM,cAAc,GAAQ,KAAK,CAAC,qBAAqB,EAAE,CAAC,iBAAiB,EAAE,CAAC;IAC9E,MAAM,oB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,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport { Button, Grid, IconButton, Snackbar } from '@material-ui/core';\nimport CloseIcon from '@material-ui/icons/Close';\n\nimport { PConnFieldProps } from '../../../types/PConnProps';\nimport './CancelAlert.css';\n\ninterface CancelAlertProps extends PConnFieldProps {\n // If any, enter additional props that only exist on CancelAlert here\n heading: string;\n content: string;\n itemKey: string;\n hideDelete: boolean;\n isDataObject: boolean;\n skipReleaseLockRequest: any;\n dismiss: Function;\n}\n\nexport default function CancelAlert(props: CancelAlertProps) {\n const { heading, content, getPConnect, itemKey: containerItemID, hideDelete, isDataObject, skipReleaseLockRequest, dismiss } = props;\n const actionsAPI = getPConnect().getActionsApi();\n const containerManagerAPI = getPConnect().getContainerManager();\n const isLocalAction = getPConnect().getValue(PCore.getConstants().CASE_INFO.IS_LOCAL_ACTION);\n // @ts-ignore - Property 'options' is private and only accessible within class 'C11nEnv'.\n const isBulkAction = getPConnect()?.options?.isBulkAction;\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const broadCastUtils: any = PCore.getCoexistenceManager().getBroadcastUtils();\n const isReverseCoexistence = broadCastUtils.isReverseCoexistenceCaseLoaded();\n const localeCategory = 'ModalContainer';\n const btnIds = {\n SAVE_AND_CLOSE: 'saveAndClose',\n CONTINUE_WORKING: 'continueWorking',\n DELETE: 'delete'\n };\n\n const [buttonsState, setButtonsState] = useState({\n [btnIds.SAVE_AND_CLOSE]: false,\n [btnIds.DELETE]: false\n });\n\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage] = useState('');\n\n function disableButton(id) {\n setButtonsState(prevState => ({\n ...prevState,\n [id]: true\n }));\n }\n\n function enableButton(id) {\n setButtonsState(prevState => ({\n ...prevState,\n [id]: false\n }));\n }\n\n function cancelHandler() {\n if (isReverseCoexistence) {\n dismiss(true);\n // @ts-ignore - An argument for 'payload' was not provided.\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD);\n } else if (!isDataObject && !isLocalAction && !isBulkAction) {\n disableButton(btnIds.DELETE);\n actionsAPI\n .deleteCaseInCreateStage(containerItemID, hideDelete)\n .then(() => {\n // @ts-ignore - An argument for 'payload' was not provided.\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_CANCEL);\n })\n .catch(() => {\n setSnackbarMessage(localizedVal('Delete failed.', localeCategory));\n setShowSnackbar(true);\n })\n .finally(() => {\n enableButton(btnIds.DELETE);\n dismiss(true);\n });\n } else if (isLocalAction) {\n dismiss(true);\n actionsAPI.cancelAssignment(containerItemID);\n } else if (isBulkAction) {\n dismiss(true);\n actionsAPI.cancelBulkAction(containerItemID);\n } else {\n dismiss(true);\n // @ts-ignore - Argument of type '{ containerItemID: string; skipReleaseLockRequest: any; }' is not assignable to parameter of type 'ContainerInfo'.\n containerManagerAPI.removeContainerItem({ containerItemID, skipReleaseLockRequest });\n }\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n const leftButton = (\n <Button\n name={btnIds.CONTINUE_WORKING}\n variant='contained'\n color='secondary'\n onClick={() => {\n dismiss();\n if (isReverseCoexistence) {\n broadCastUtils.setCallBackFunction(null);\n broadCastUtils.setIsDirtyDialogActive(false);\n }\n }}\n >\n {localizedVal('Go back', localeCategory)}\n </Button>\n );\n\n const rightButton = (\n <Button name={btnIds.DELETE} variant='contained' color='primary' disabled={buttonsState[btnIds.DELETE]} onClick={cancelHandler}>\n {localizedVal('Discard', localeCategory)}\n </Button>\n );\n\n return (\n <>\n <div className='cancel-alert-background'>\n <div className='cancel-alert-top'>\n <h3>{localizedVal(heading, localeCategory)}</h3>\n <div>\n <p>{localizedVal(content, localeCategory)}</p>\n </div>\n <div className='action-controls'>\n <Grid container spacing={4} justifyContent='space-between'>\n <Grid item>{leftButton}</Grid>\n <Grid item>{rightButton}</Grid>\n </Grid>\n </div>\n </div>\n </div>\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </>\n );\n}\n"]}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
|
|
4
3
|
value?: boolean;
|
|
5
4
|
caption?: string;
|
|
6
5
|
trueLabel?: string;
|
|
7
6
|
falseLabel?: string;
|
|
7
|
+
selectionMode?: string;
|
|
8
|
+
datasource?: any;
|
|
9
|
+
selectionKey?: string;
|
|
10
|
+
selectionList?: any;
|
|
11
|
+
primaryField: string;
|
|
12
|
+
readonlyContextList: any;
|
|
13
|
+
referenceList: string;
|
|
8
14
|
}
|
|
9
|
-
export default function CheckboxComponent(props: CheckboxProps): JSX.Element;
|
|
15
|
+
export default function CheckboxComponent(props: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
10
16
|
export {};
|
|
11
17
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Checkbox/Checkbox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,aAAc,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IAE5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,GAAG,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AASD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,aAAa,2CAyI7D"}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable react/no-array-index-key */
|
|
2
3
|
import { useState, useEffect } from 'react';
|
|
3
4
|
import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@material-ui/core';
|
|
4
5
|
import handleEvent from '../../helpers/event-utils';
|
|
5
6
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
7
|
+
import { insertInstruction, deleteInstruction, updateNewInstuctions } from '../../helpers/instructions-utils';
|
|
8
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
9
|
+
const useStyles = makeStyles(() => ({
|
|
10
|
+
checkbox: {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
flexDirection: 'column'
|
|
13
|
+
}
|
|
14
|
+
}));
|
|
6
15
|
export default function CheckboxComponent(props) {
|
|
7
16
|
// Get emitted components from map (so we can get any override that may exist)
|
|
8
17
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
9
|
-
const { getPConnect, label, value
|
|
18
|
+
const { getPConnect, label, caption, value, readOnly, testId, required, disabled, status, helperText, validatemessage, displayMode, hideLabel, trueLabel, falseLabel, selectionMode, datasource, selectionKey, selectionList, primaryField, referenceList, readonlyContextList: selectedvalues } = props;
|
|
19
|
+
const classes = useStyles();
|
|
10
20
|
const helperTextToDisplay = validatemessage || helperText;
|
|
11
21
|
const thePConn = getPConnect();
|
|
12
|
-
const theConfigProps = thePConn.getConfigProps();
|
|
13
|
-
const caption = theConfigProps.caption;
|
|
14
22
|
const actionsApi = thePConn.getActionsApi();
|
|
15
23
|
const propName = thePConn.getStateProps().value;
|
|
16
24
|
const [checked, setChecked] = useState(false);
|
|
@@ -18,6 +26,12 @@ export default function CheckboxComponent(props) {
|
|
|
18
26
|
// This update theSelectedButton which will update the UI to show the selected button correctly
|
|
19
27
|
setChecked(value);
|
|
20
28
|
}, [value]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (referenceList?.length > 0) {
|
|
31
|
+
thePConn.setReferenceList(selectionList);
|
|
32
|
+
updateNewInstuctions(thePConn, selectionList);
|
|
33
|
+
}
|
|
34
|
+
}, [thePConn]);
|
|
21
35
|
if (displayMode === 'LABELS_LEFT') {
|
|
22
36
|
return _jsx(FieldValueList, { name: hideLabel ? '' : caption, value: value ? trueLabel : falseLabel });
|
|
23
37
|
}
|
|
@@ -30,12 +44,40 @@ export default function CheckboxComponent(props) {
|
|
|
30
44
|
const handleBlur = event => {
|
|
31
45
|
thePConn.getValidationApi().validate(event.target.checked);
|
|
32
46
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
const handleChangeMultiMode = (event, element) => {
|
|
48
|
+
if (event.target.checked) {
|
|
49
|
+
insertInstruction(thePConn, selectionList, selectionKey, primaryField, {
|
|
50
|
+
id: element.key,
|
|
51
|
+
primary: element.text ?? element.value
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
deleteInstruction(thePConn, selectionList, selectionKey, {
|
|
56
|
+
id: element.key,
|
|
57
|
+
primary: element.text ?? element.value
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
thePConn.clearErrorMessages({
|
|
61
|
+
property: selectionList,
|
|
62
|
+
category: '',
|
|
63
|
+
context: ''
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
let theCheckbox;
|
|
67
|
+
const listOfCheckboxes = [];
|
|
68
|
+
if (selectionMode === 'multi') {
|
|
69
|
+
const listSourceItems = datasource?.source ?? [];
|
|
70
|
+
const dataField = selectionKey?.split?.('.')[1];
|
|
71
|
+
listSourceItems.forEach((element, index) => {
|
|
72
|
+
listOfCheckboxes.push(_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: selectedvalues?.some?.(data => data[dataField] === element.key), onChange: event => handleChangeMultiMode(event, element), onBlur: () => {
|
|
73
|
+
thePConn.getValidationApi().validate(selectedvalues, selectionList);
|
|
74
|
+
}, "data-testid": `${testId}:${element.value}` }, index), label: element.text ?? element.value, labelPlacement: 'end', "data-test-id": testId }, index));
|
|
75
|
+
});
|
|
76
|
+
theCheckbox = _jsx("div", { className: classes.checkbox, children: listOfCheckboxes });
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
theCheckbox = (_jsx(FormControlLabel, { control: _jsx(Checkbox, { color: 'primary', checked: checked, onChange: !readOnly ? handleChange : undefined, onBlur: !readOnly ? handleBlur : undefined, value: value, disabled: disabled, readOnly: readOnly }), label: caption, labelPlacement: 'end', "data-test-id": testId }));
|
|
38
80
|
}
|
|
39
|
-
return (_jsxs(FormControl, { required: required, error: status === 'error', children: [!hideLabel && _jsx(FormLabel, { component: 'legend', children: label }), _jsx(FormGroup, { children:
|
|
81
|
+
return (_jsxs(FormControl, { required: required, error: status === 'error', children: [!hideLabel && _jsx(FormLabel, { component: 'legend', children: label }), _jsx(FormGroup, { children: theCheckbox }), _jsx(FormHelperText, { children: helperTextToDisplay })] }));
|
|
40
82
|
}
|
|
41
83
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/components/field/Checkbox/Checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAA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;IAED,OAAO,CACL,MAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,aACvD,CAAC,SAAS,IAAI,KAAC,SAAS,IAAC,SAAS,EAAC,QAAQ,YAAE,KAAK,GAAa,EAChE,KAAC,SAAS,cAAE,WAAW,GAAa,EACpC,KAAC,cAAc,cAAE,mBAAmB,GAAkB,IAC1C,CACf,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable react/no-array-index-key */\nimport { useState, useEffect } from 'react';\nimport { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@material-ui/core';\n\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { insertInstruction, deleteInstruction, updateNewInstuctions } from '../../helpers/instructions-utils';\nimport { PConnFieldProps } from '../../../types/PConnProps';\nimport { makeStyles } from '@material-ui/core/styles';\n\ninterface CheckboxProps extends Omit<PConnFieldProps, 'value'> {\n // If any, enter additional props that only exist on Checkbox here\n value?: boolean;\n caption?: string;\n trueLabel?: string;\n falseLabel?: string;\n selectionMode?: string;\n datasource?: any;\n selectionKey?: string;\n selectionList?: any;\n primaryField: string;\n readonlyContextList: any;\n referenceList: string;\n}\n\nconst useStyles = makeStyles(() => ({\n checkbox: {\n display: 'flex',\n flexDirection: 'column'\n }\n}));\n\nexport default function CheckboxComponent(props: CheckboxProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n caption,\n value,\n readOnly,\n testId,\n required,\n disabled,\n status,\n helperText,\n validatemessage,\n displayMode,\n hideLabel,\n trueLabel,\n falseLabel,\n selectionMode,\n datasource,\n selectionKey,\n selectionList,\n primaryField,\n referenceList,\n readonlyContextList: selectedvalues\n } = props;\n const classes = useStyles();\n const helperTextToDisplay = validatemessage || helperText;\n const thePConn = getPConnect();\n const actionsApi = thePConn.getActionsApi();\n const propName = (thePConn.getStateProps() as any).value;\n\n const [checked, setChecked] = useState<any>(false);\n useEffect(() => {\n // This update theSelectedButton which will update the UI to show the selected button correctly\n setChecked(value);\n }, [value]);\n\n useEffect(() => {\n if (referenceList?.length > 0) {\n thePConn.setReferenceList(selectionList);\n updateNewInstuctions(thePConn, selectionList);\n }\n }, [thePConn]);\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} variant='stacked' />;\n }\n\n const handleChange = event => {\n handleEvent(actionsApi, 'changeNblur', propName, event.target.checked);\n };\n\n const handleBlur = event => {\n thePConn.getValidationApi().validate(event.target.checked);\n };\n\n const handleChangeMultiMode = (event, element) => {\n if (event.target.checked) {\n insertInstruction(thePConn, selectionList, selectionKey, primaryField, {\n id: element.key,\n primary: element.text ?? element.value\n });\n } else {\n deleteInstruction(thePConn, selectionList, selectionKey, {\n id: element.key,\n primary: element.text ?? element.value\n });\n }\n thePConn.clearErrorMessages({\n property: selectionList,\n category: '',\n context: ''\n });\n };\n\n let theCheckbox;\n const listOfCheckboxes: any = [];\n if (selectionMode === 'multi') {\n const listSourceItems = datasource?.source ?? [];\n const dataField: any = selectionKey?.split?.('.')[1];\n listSourceItems.forEach((element, index) => {\n listOfCheckboxes.push(\n <FormControlLabel\n control={\n <Checkbox\n key={index}\n checked={selectedvalues?.some?.(data => data[dataField] === element.key)}\n onChange={event => handleChangeMultiMode(event, element)}\n onBlur={() => {\n thePConn.getValidationApi().validate(selectedvalues, selectionList);\n }}\n data-testid={`${testId}:${element.value}`}\n />\n }\n key={index}\n label={element.text ?? element.value}\n labelPlacement='end'\n data-test-id={testId}\n />\n );\n });\n theCheckbox = <div className={classes.checkbox}>{listOfCheckboxes}</div>;\n } else {\n theCheckbox = (\n <FormControlLabel\n control={\n <Checkbox\n color='primary'\n checked={checked}\n onChange={!readOnly ? handleChange : undefined}\n onBlur={!readOnly ? handleBlur : undefined}\n value={value}\n disabled={disabled}\n readOnly={readOnly}\n />\n }\n label={caption}\n labelPlacement='end'\n data-test-id={testId}\n />\n );\n }\n\n return (\n <FormControl required={required} error={status === 'error'}>\n {!hideLabel && <FormLabel component='legend'>{label}</FormLabel>}\n <FormGroup>{theCheckbox}</FormGroup>\n <FormHelperText>{helperTextToDisplay}</FormHelperText>\n </FormControl>\n );\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface CurrrencyProps extends PConnFieldProps {
|
|
4
3
|
currencyISOCode?: string;
|
|
4
|
+
allowDecimals: boolean;
|
|
5
5
|
}
|
|
6
|
-
export default function Currency(props: CurrrencyProps): JSX.Element;
|
|
6
|
+
export default function Currency(props: CurrrencyProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=Currency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Currency.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAQ5D,UAAU,cAAe,SAAQ,eAAe;IAE9C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,cAAc,2CAyFrD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { TextField } from '@material-ui/core';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { NumericFormat } from 'react-number-format';
|
|
3
5
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
4
6
|
import handleEvent from '../../helpers/event-utils';
|
|
5
7
|
import { format } from '../../helpers/formatters';
|
|
@@ -9,12 +11,12 @@ export default function Currency(props) {
|
|
|
9
11
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
10
12
|
const { getPConnect, label, required, disabled, value = '', validatemessage, status,
|
|
11
13
|
/* onChange, onBlur, */
|
|
12
|
-
readOnly, testId, helperText, displayMode, hideLabel, currencyISOCode = 'USD', placeholder } = props;
|
|
14
|
+
readOnly, testId, helperText, displayMode, hideLabel, currencyISOCode = 'USD', placeholder, allowDecimals } = props;
|
|
13
15
|
const pConn = getPConnect();
|
|
14
16
|
const actions = pConn.getActionsApi();
|
|
15
17
|
const propName = pConn.getStateProps().value;
|
|
16
18
|
const helperTextToDisplay = validatemessage || helperText;
|
|
17
|
-
|
|
19
|
+
const [values, setValues] = useState(value.toString());
|
|
18
20
|
const testProp = {
|
|
19
21
|
'data-test-id': testId
|
|
20
22
|
};
|
|
@@ -25,17 +27,26 @@ export default function Currency(props) {
|
|
|
25
27
|
const theCurrSep = theSymbols.theDigitGroupSeparator;
|
|
26
28
|
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
27
29
|
const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
|
|
30
|
+
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
31
|
+
if (readOnly) {
|
|
32
|
+
readOnlyProp = { readOnly: true };
|
|
33
|
+
}
|
|
34
|
+
let currencyProp = {};
|
|
35
|
+
currencyProp = { prefix: theCurrSym, decimalSeparator: theCurrDec, thousandSeparator: theCurrSep };
|
|
28
36
|
if (displayMode === 'LABELS_LEFT') {
|
|
29
37
|
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue });
|
|
30
38
|
}
|
|
31
39
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
32
40
|
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue, variant: 'stacked' });
|
|
33
41
|
}
|
|
34
|
-
function currOnBlur(
|
|
35
|
-
|
|
36
|
-
handleEvent(actions, 'changeNblur', propName, inValue !== '' ? Number(inValue) : inValue);
|
|
42
|
+
function currOnBlur() {
|
|
43
|
+
handleEvent(actions, 'changeNblur', propName, values);
|
|
37
44
|
}
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
const handleChange = val => {
|
|
46
|
+
setValues(val.value);
|
|
47
|
+
};
|
|
48
|
+
return (_jsx(NumericFormat, { valueIsNumericString: true, label: label, helperText: helperTextToDisplay, placeholder: placeholder ?? '', required: required, disabled: disabled, onValueChange: val => {
|
|
49
|
+
handleChange(val);
|
|
50
|
+
}, onBlur: !readOnly ? currOnBlur : undefined, error: status === 'error', name: 'numberformat', value: values, ...currencyProp, decimalScale: allowDecimals !== false ? 2 : 0, fixedDecimalScale: allowDecimals, InputProps: { ...readOnlyProp, inputProps: { ...testProp } }, customInput: TextField }));
|
|
40
51
|
}
|
|
41
52
|
//# sourceMappingURL=Currency.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Currency.js","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Currency.js","sourceRoot":"","sources":["../../../../src/components/field/Currency/Currency.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,E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I,EAAC,cAAc,EACnB,KAAK,EAAE,MAAM,KACT,YAAY,EAChB,YAAY,EAAE,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC7C,iBAAiB,EAAE,aAAa,EAChC,UAAU,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,EAC5D,WAAW,EAAE,SAAS,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { TextField } from '@material-ui/core';\nimport { useState } from 'react';\nimport { NumericFormat } from 'react-number-format';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\nimport { getCurrencyCharacters, getCurrencyOptions } from './currency-utils';\n\n/* Using react-number-format component here, since it allows formatting decimal values,\nas per the locale.\n*/\ninterface CurrrencyProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Currency here\n currencyISOCode?: string;\n allowDecimals: boolean;\n}\n\nexport default function Currency(props: CurrrencyProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n /* onChange, onBlur, */\n readOnly,\n testId,\n helperText,\n displayMode,\n hideLabel,\n currencyISOCode = 'USD',\n placeholder,\n allowDecimals\n } = props;\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n const [values, setValues] = useState(value.toString());\n\n const testProp = {\n 'data-test-id': testId\n };\n\n // currencySymbols looks like this: { theCurrencySymbol: '$', theDecimalIndicator: '.', theSeparator: ',' }\n const theSymbols = getCurrencyCharacters(currencyISOCode);\n const theCurrSym = theSymbols.theCurrencySymbol;\n const theCurrDec = theSymbols.theDecimalIndicator;\n const theCurrSep = theSymbols.theDigitGroupSeparator;\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\n const formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n let currencyProp = {};\n currencyProp = { prefix: theCurrSym, decimalSeparator: theCurrDec, thousandSeparator: theCurrSep };\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;\n }\n\n function currOnBlur() {\n handleEvent(actions, 'changeNblur', propName, values);\n }\n\n const handleChange = val => {\n setValues(val.value);\n };\n\n return (\n <NumericFormat\n valueIsNumericString\n label={label}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n required={required}\n disabled={disabled}\n onValueChange={val => {\n handleChange(val);\n }}\n onBlur={!readOnly ? currOnBlur : undefined}\n error={status === 'error'}\n name='numberformat'\n value={values}\n {...currencyProp}\n decimalScale={allowDecimals !== false ? 2 : 0}\n fixedDecimalScale={allowDecimals}\n InputProps={{ ...readOnlyProp, inputProps: { ...testProp } }}\n customInput={TextField}\n />\n );\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface DateProps extends PConnFieldProps {
|
|
4
3
|
}
|
|
5
|
-
export default function Date(props: DateProps): JSX.Element;
|
|
4
|
+
export default function Date(props: DateProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
|
7
6
|
//# sourceMappingURL=Date.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Date.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Date/Date.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Date.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Date/Date.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAO5D,UAAU,SAAU,SAAQ,eAAe;CAE1C;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,2CA+F5C"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface DateTimeProps extends PConnFieldProps {
|
|
4
3
|
}
|
|
5
|
-
export default function DateTime(props: DateTimeProps): JSX.Element;
|
|
4
|
+
export default function DateTime(props: DateTimeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
|
7
6
|
//# sourceMappingURL=DateTime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../src/components/field/DateTime/DateTime.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateTime.d.ts","sourceRoot":"","sources":["../../../../src/components/field/DateTime/DateTime.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,aAAc,SAAQ,eAAe;CAE9C;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA0FpD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface DecimalProps extends PConnFieldProps {
|
|
4
3
|
currencyISOCode?: string;
|
|
5
4
|
decimalPrecision?: number;
|
|
6
|
-
showGroupSeparators?:
|
|
5
|
+
showGroupSeparators?: boolean;
|
|
6
|
+
formatter?: string;
|
|
7
7
|
}
|
|
8
|
-
export default function Decimal(props: DecimalProps): JSX.Element;
|
|
8
|
+
export default function Decimal(props: DecimalProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=Decimal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Decimal.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Decimal/Decimal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Decimal.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Decimal/Decimal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAM5D,UAAU,YAAa,SAAQ,eAAe;IAE5C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,2CAiGlD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { TextField } from '@material-ui/core';
|
|
3
|
+
import { NumericFormat } from 'react-number-format';
|
|
4
|
+
import { useState } from 'react';
|
|
3
5
|
import { getCurrencyCharacters, getCurrencyOptions } from '../Currency/currency-utils';
|
|
4
6
|
import handleEvent from '../../helpers/event-utils';
|
|
5
7
|
import { format } from '../../helpers/formatters';
|
|
@@ -9,7 +11,8 @@ export default function Decimal(props) {
|
|
|
9
11
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
10
12
|
const { getPConnect, label, required, disabled, value = '', validatemessage, status,
|
|
11
13
|
/* onChange, onBlur, */
|
|
12
|
-
readOnly, helperText, displayMode, hideLabel, currencyISOCode = 'USD', decimalPrecision
|
|
14
|
+
readOnly, helperText, displayMode, hideLabel, currencyISOCode = 'USD', decimalPrecision, showGroupSeparators, testId, placeholder, formatter } = props;
|
|
15
|
+
const [values, setValues] = useState(value.toString());
|
|
13
16
|
const pConn = getPConnect();
|
|
14
17
|
const actions = pConn.getActionsApi();
|
|
15
18
|
const propName = pConn.getStateProps().value;
|
|
@@ -17,8 +20,19 @@ export default function Decimal(props) {
|
|
|
17
20
|
const theSymbols = getCurrencyCharacters(currencyISOCode);
|
|
18
21
|
const theCurrDec = theSymbols.theDecimalIndicator;
|
|
19
22
|
const theCurrSep = theSymbols.theDigitGroupSeparator;
|
|
23
|
+
const theCurrSym = theSymbols.theCurrencySymbol;
|
|
20
24
|
const theCurrencyOptions = getCurrencyOptions(currencyISOCode);
|
|
21
|
-
|
|
25
|
+
let readOnlyProp = {}; // Note: empty if NOT ReadOnly
|
|
26
|
+
if (readOnly) {
|
|
27
|
+
readOnlyProp = { readOnly: true };
|
|
28
|
+
}
|
|
29
|
+
let formattedValue = '';
|
|
30
|
+
if (formatter === 'Currency') {
|
|
31
|
+
formattedValue = format(value, formatter.toLowerCase(), theCurrencyOptions);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);
|
|
35
|
+
}
|
|
22
36
|
if (displayMode === 'LABELS_LEFT') {
|
|
23
37
|
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: formattedValue });
|
|
24
38
|
}
|
|
@@ -28,9 +42,14 @@ export default function Decimal(props) {
|
|
|
28
42
|
const testProp = {
|
|
29
43
|
'data-test-id': testId
|
|
30
44
|
};
|
|
31
|
-
function decimalOnBlur(
|
|
32
|
-
handleEvent(actions, 'changeNblur', propName,
|
|
45
|
+
function decimalOnBlur() {
|
|
46
|
+
handleEvent(actions, 'changeNblur', propName, values);
|
|
33
47
|
}
|
|
34
|
-
|
|
48
|
+
const handleChange = val => {
|
|
49
|
+
setValues(val.value);
|
|
50
|
+
};
|
|
51
|
+
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 => {
|
|
52
|
+
handleChange(val);
|
|
53
|
+
}, onBlur: !readOnly ? decimalOnBlur : undefined, prefix: readOnly && formatter === 'Currency' ? theCurrSym : '', decimalSeparator: theCurrDec, thousandSeparator: showGroupSeparators ? theCurrSep : '', decimalScale: readOnly && formatter === 'Currency' ? undefined : decimalPrecision, InputProps: { ...readOnlyProp, inputProps: { ...testProp } }, customInput: TextField }));
|
|
35
54
|
}
|
|
36
55
|
//# sourceMappingURL=Decimal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Decimal.js","sourceRoot":"","sources":["../../../../src/components/field/Decimal/Decimal.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Decimal.js","sourceRoot":"","sources":["../../../../src/components/field/Decimal/Decimal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAehF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAmB;IACjD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAE7D,MAAM,EACJ,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,EAAE,EACV,eAAe,EACf,MAAM;IACN,uBAAuB;IACvB,QAAQ,EACR,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mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EACxD,YAAY,EAAE,QAAQ,IAAI,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,EACjF,UAAU,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,EAC5D,WAAW,EAAE,SAAS,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { TextField } from '@material-ui/core';\nimport { NumericFormat } from 'react-number-format';\nimport { useState } from 'react';\nimport { getCurrencyCharacters, getCurrencyOptions } from '../Currency/currency-utils';\nimport handleEvent from '../../helpers/event-utils';\nimport { format } from '../../helpers/formatters';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\n/* Using react-number-format component here, since it allows formatting decimal values,\nas per the locale.\n*/\n\ninterface DecimalProps extends PConnFieldProps {\n // If any, enter additional props that only exist on Decimal here\n currencyISOCode?: string;\n decimalPrecision?: number;\n showGroupSeparators?: boolean;\n formatter?: string;\n}\n\nexport default function Decimal(props: DecimalProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n disabled,\n value = '',\n validatemessage,\n status,\n /* onChange, onBlur, */\n readOnly,\n helperText,\n displayMode,\n hideLabel,\n currencyISOCode = 'USD',\n decimalPrecision,\n showGroupSeparators,\n testId,\n placeholder,\n formatter\n } = props;\n\n const [values, setValues] = useState(value.toString());\n\n const pConn = getPConnect();\n const actions = pConn.getActionsApi();\n const propName = (pConn.getStateProps() as any).value;\n const helperTextToDisplay = validatemessage || helperText;\n\n const theSymbols = getCurrencyCharacters(currencyISOCode);\n const theCurrDec = theSymbols.theDecimalIndicator;\n const theCurrSep = theSymbols.theDigitGroupSeparator;\n const theCurrSym = theSymbols.theCurrencySymbol;\n\n const theCurrencyOptions = getCurrencyOptions(currencyISOCode);\n\n let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\n }\n\n let formattedValue = '';\n if (formatter === 'Currency') {\n formattedValue = format(value, formatter.toLowerCase(), theCurrencyOptions);\n } else {\n formattedValue = format(value, pConn.getComponentName().toLowerCase(), theCurrencyOptions);\n }\n\n if (displayMode === 'LABELS_LEFT') {\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 testProp = {\n 'data-test-id': testId\n };\n\n function decimalOnBlur() {\n handleEvent(actions, 'changeNblur', propName, values);\n }\n\n const handleChange = val => {\n setValues(val.value);\n };\n\n return (\n <NumericFormat\n valueIsNumericString\n fullWidth\n variant={readOnly ? 'standard' : 'outlined'}\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n error={status === 'error'}\n label={label}\n value={values}\n onValueChange={val => {\n handleChange(val);\n }}\n onBlur={!readOnly ? decimalOnBlur : undefined}\n prefix={readOnly && formatter === 'Currency' ? theCurrSym : ''}\n decimalSeparator={theCurrDec}\n thousandSeparator={showGroupSeparators ? theCurrSep : ''}\n decimalScale={readOnly && formatter === 'Currency' ? undefined : decimalPrecision}\n InputProps={{ ...readOnlyProp, inputProps: { ...testProp } }}\n customInput={TextField}\n />\n );\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface DropdownProps extends PConnFieldProps {
|
|
4
3
|
datasource?: any[];
|
|
@@ -10,6 +9,6 @@ interface DropdownProps extends PConnFieldProps {
|
|
|
10
9
|
parameters?: any;
|
|
11
10
|
columns: any[];
|
|
12
11
|
}
|
|
13
|
-
export default function Dropdown(props: DropdownProps): JSX.Element | null;
|
|
12
|
+
export default function Dropdown(props: DropdownProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
13
|
export {};
|
|
15
14
|
//# sourceMappingURL=Dropdown.d.ts.map
|