@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Percentage.js","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Percentage.js","sourceRoot":"","sources":["../../../../src/components/field/Percentage/Percentage.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,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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,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 { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { 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 let readOnlyProp = {}; // Note: empty if NOT ReadOnly\n\n if (readOnly) {\n readOnlyProp = { readOnly: true };\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 let testProp = {};\n\n testProp = {\n 'data-test-id': testId\n };\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 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 PhoneProps extends PConnFieldProps {
|
|
4
3
|
}
|
|
5
|
-
export default function Phone(props: PhoneProps): JSX.Element;
|
|
4
|
+
export default function Phone(props: PhoneProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
|
7
6
|
//# sourceMappingURL=Phone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":"
|
|
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;AAG5D,UAAU,UAAW,SAAQ,eAAe;CAE3C;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,UAAU,2CAkG9C"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import MuiPhoneNumber from 'material-ui-phone-number';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
3
4
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
5
|
+
import handleEvent from '../../helpers/event-utils';
|
|
4
6
|
export default function Phone(props) {
|
|
5
7
|
// Get emitted components from map (so we can get any override that may exist)
|
|
6
8
|
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
7
|
-
const { label, required, disabled, value = '', validatemessage, status, onChange,
|
|
9
|
+
const { getPConnect, label, required, disabled, value = '', validatemessage, status, onChange, readOnly, testId, helperText, displayMode, hideLabel, placeholder } = props;
|
|
10
|
+
const pConn = getPConnect();
|
|
11
|
+
const actions = pConn.getActionsApi();
|
|
12
|
+
const propName = pConn.getStateProps().value;
|
|
13
|
+
const [inputValue, setInputValue] = useState(value);
|
|
14
|
+
useEffect(() => setInputValue(value), [value]);
|
|
8
15
|
const helperTextToDisplay = validatemessage || helperText;
|
|
9
16
|
let testProp = {};
|
|
10
17
|
testProp = {
|
|
@@ -24,15 +31,14 @@ export default function Phone(props) {
|
|
|
24
31
|
}, disableDropdown: disableDropdown }) }));
|
|
25
32
|
}
|
|
26
33
|
const handleChange = inputVal => {
|
|
27
|
-
|
|
28
|
-
phoneValue = `+${phoneValue}`;
|
|
29
|
-
onChange({ value: phoneValue });
|
|
34
|
+
setInputValue(inputVal);
|
|
30
35
|
};
|
|
31
36
|
const handleBlur = event => {
|
|
32
37
|
const phoneValue = event?.target?.value;
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
let phoneNumber = phoneValue.split(' ').slice(1).join();
|
|
39
|
+
phoneNumber = phoneNumber ? `+${phoneValue && phoneValue.replace(/\D+/g, '')}` : '';
|
|
40
|
+
handleEvent(actions, 'changeNblur', propName, phoneNumber);
|
|
35
41
|
};
|
|
36
|
-
return (_jsx(MuiPhoneNumber, { 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:
|
|
42
|
+
return (_jsx(MuiPhoneNumber, { 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, InputProps: { ...testProp } }));
|
|
37
43
|
}
|
|
38
44
|
//# sourceMappingURL=Phone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../src/components/field/Phone/Phone.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,WAAW,MAAM,2BAA2B,CAAC;AAMpD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAiB;IAC7C,8EAA8E;IAC9E,MA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,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC1C,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,GAC3B,CACH,CAAC;AACJ,CAAC","sourcesContent":["import MuiPhoneNumber from 'material-ui-phone-number';\nimport { useEffect, useState } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { 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 === 'LABELS_LEFT') {\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 <MuiPhoneNumber\n fullWidth\n helperText={helperTextToDisplay}\n placeholder={placeholder ?? ''}\n size='small'\n required={required}\n disabled={disabled}\n onChange={onChange}\n error={status === 'error'}\n label={label}\n value={value}\n InputProps={{\n readOnly: true,\n inputProps: { ...testProp }\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 <MuiPhoneNumber\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 InputProps={{ ...testProp }}\n />\n );\n}\n"]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface RadioButtonsProps extends PConnFieldProps {
|
|
4
3
|
inline: boolean;
|
|
5
4
|
fieldMetadata?: any;
|
|
6
5
|
}
|
|
7
|
-
export default function RadioButtons(props: RadioButtonsProps): JSX.Element;
|
|
6
|
+
export default function RadioButtons(props: RadioButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=RadioButtons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RadioButtons/RadioButtons.tsx"],"names":[],"mappings":"
|
|
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;AAG5D,UAAU,iBAAkB,SAAQ,eAAe;IAEjD,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAoG5D"}
|
|
@@ -13,10 +13,10 @@ export default function RichText(props) {
|
|
|
13
13
|
[readOnly, required, disabled] = [readOnly, required, disabled].map(prop => prop === true || (typeof prop === 'string' && prop === 'true'));
|
|
14
14
|
const helperTextToDisplay = validatemessage || helperText;
|
|
15
15
|
if (displayMode === 'LABELS_LEFT') {
|
|
16
|
-
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value });
|
|
16
|
+
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value, isHtml: true });
|
|
17
17
|
}
|
|
18
18
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
19
|
-
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value, variant: 'stacked' });
|
|
19
|
+
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value, isHtml: true, variant: 'stacked' });
|
|
20
20
|
}
|
|
21
21
|
let richTextComponent;
|
|
22
22
|
if (readOnly) {
|
|
@@ -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,CAAC,CAAC;IAE7D,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IACvI,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,SAAS,GA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,GAAG,OAAO,CAAC;SAClB;QACD,MAAM,YAAY,GAAG,GAAG,EAAE;YACxB,IAAI,MAAM,KAAK,OAAO,EAAE;gBACtB,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CAAC;gBACtD,KAAK,CAAC,kBAAkB,CAAC;oBACvB,QAAQ;oBACR,QAAQ,EAAE,EAAE;oBACZ,OAAO,EAAE,EAAE;iBACZ,CAAC,CAAC;aACJ;QACH,CAAC,CAAC;QAEF,MAAM,UAAU,GAAG,GAAG,EAAE;YACtB,IAAI,SAAS,CAAC,OAAO,EAAE;gBACrB,MAAM,WAAW,GAAG,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;gBACrE,MAAM,QAAQ,GAAI,KAAK,CAAC,aAAa,EAAU,CAAC,KAAK,CAAC;gBACtD,WAAW,CAAC,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;aAC/D;QACH,CAAC,CAAC;QAEF,iBAAiB,GAAG,CAClB,KAAC,cAAc,OACT,eAAe,EACnB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,SAAS,EACtB,IAAI,EAAE,mBAAmB,EACzB,YAAY,EAAE,KAAK,EACnB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;KACH;IAED,OAAO,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 { 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 === 'LABELS_LEFT') {\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,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnProps } from '../../../types/PConnProps';
|
|
3
2
|
interface ScalarListProps extends PConnProps {
|
|
4
3
|
displayInModal: boolean;
|
|
@@ -8,6 +7,6 @@ interface ScalarListProps extends PConnProps {
|
|
|
8
7
|
label: string;
|
|
9
8
|
displayMode: string;
|
|
10
9
|
}
|
|
11
|
-
export default function ScalarList(props: ScalarListProps): JSX.Element;
|
|
10
|
+
export default function ScalarList(props: ScalarListProps): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export {};
|
|
13
12
|
//# sourceMappingURL=ScalarList.d.ts.map
|
|
@@ -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":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,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,2CAqCxD"}
|
|
@@ -15,10 +15,12 @@ export default function ScalarList(props) {
|
|
|
15
15
|
return getPConnect().createComponent({
|
|
16
16
|
type: componentType,
|
|
17
17
|
config: {
|
|
18
|
+
// @ts-ignore - Type '{ readOnly: true; displayInModal: boolean; value: any; displayMode: string; label: string; }' is not assignable to type 'ComponentMetadataConfig'.
|
|
18
19
|
value: scalarValue,
|
|
19
20
|
displayMode: 'LABELS_LEFT',
|
|
20
21
|
label,
|
|
21
22
|
...restProps,
|
|
23
|
+
// @ts-ignore - Type 'string' is not assignable to type 'boolean | undefined'.
|
|
22
24
|
readOnly: 'true'
|
|
23
25
|
}
|
|
24
26
|
}, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarList.js","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/ScalarList.tsx"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,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,aAAa;gBAC1B,KAAK;gBACL,GAAG,SAAS;gBACZ,QAAQ,EAAE,MAAM;aACjB;SACF,EACD,EAAE,EACF,EAAE,EACF,EAAE,CACH,CAAC,CAAC,8FAA8F;IACnG,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,aAAa,EAAE,mBAAmB,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QAC9E,OAAO,CACL,wBACE,KAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI,GAChC,CACP,CAAC;KACH;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":["/* eslint-disable react/no-array-index-key */\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { 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: 'LABELS_LEFT',\n label,\n ...restProps,\n readOnly: 'true'\n }\n },\n '',\n '',\n {}\n ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;\n });\n\n if (['LABELS_LEFT', '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"]}
|
|
1
|
+
{"version":3,"file":"ScalarList.js","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/ScalarList.tsx"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,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,wKAAwK;gBACxK,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,aAAa;gBAC1B,KAAK;gBACL,GAAG,SAAS;gBACZ,8EAA8E;gBAC9E,QAAQ,EAAE,MAAM;aACjB;SACF,EACD,EAAE,EACF,EAAE,EACF,EAAE,CACH,CAAC,CAAC,8FAA8F;IACnG,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,aAAa,EAAE,mBAAmB,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QAC9E,OAAO,CACL,wBACE,KAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI,GAChC,CACP,CAAC;KACH;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":["/* eslint-disable react/no-array-index-key */\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { 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 // @ts-ignore - Type '{ readOnly: true; displayInModal: boolean; value: any; displayMode: string; label: string; }' is not assignable to type 'ComponentMetadataConfig'.\n value: scalarValue,\n displayMode: 'LABELS_LEFT',\n label,\n ...restProps,\n // @ts-ignore - Type 'string' is not assignable to type 'boolean | undefined'.\n readOnly: 'true'\n }\n },\n '',\n '',\n {}\n ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;\n });\n\n if (['LABELS_LEFT', '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"]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface SemanticLinkProps extends PConnFieldProps {
|
|
4
3
|
text: string;
|
|
5
4
|
}
|
|
6
|
-
export default function SemanticLink(props: SemanticLinkProps): JSX.Element | undefined;
|
|
5
|
+
export default function SemanticLink(props: SemanticLinkProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
7
6
|
export {};
|
|
8
7
|
//# sourceMappingURL=SemanticLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SemanticLink.d.ts","sourceRoot":"","sources":["../../../../src/components/field/SemanticLink/SemanticLink.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SemanticLink.d.ts","sourceRoot":"","sources":["../../../../src/components/field/SemanticLink/SemanticLink.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAoC5D,UAAU,iBAAkB,SAAQ,eAAe;IAGjD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,uDA4B5D"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface TextAreaProps extends PConnFieldProps {
|
|
4
3
|
fieldMetadata?: any;
|
|
5
4
|
}
|
|
6
|
-
export default function TextArea(props: TextAreaProps): JSX.Element;
|
|
5
|
+
export default function TextArea(props: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export {};
|
|
8
7
|
//# sourceMappingURL=TextArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextArea/TextArea.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextArea/TextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,aAAc,SAAQ,eAAe;IAE7C,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAmEpD"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnProps } from '../../../types/PConnProps';
|
|
3
2
|
interface TextContentProps extends PConnProps {
|
|
4
3
|
content: string;
|
|
5
4
|
displayAs: 'Paragraph' | 'Heading 1' | 'Heading 2' | 'Heading 3' | 'Heading 4';
|
|
6
5
|
}
|
|
7
|
-
export default function TextContent(props: TextContentProps): JSX.Element;
|
|
6
|
+
export default function TextContent(props: TextContentProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=TextContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextContent.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextContent.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextContent/TextContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;CAChF;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAoC1D"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface TextInputProps extends PConnFieldProps {
|
|
4
3
|
fieldMetadata?: any;
|
|
5
4
|
}
|
|
6
|
-
export default function TextInput(props: TextInputProps): JSX.Element;
|
|
5
|
+
export default function TextInput(props: TextInputProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export {};
|
|
8
7
|
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextInput/TextInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/field/TextInput/TextInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,cAAe,SAAQ,eAAe;IAE9C,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,2CAiFtD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface TimeProps extends PConnFieldProps {
|
|
4
3
|
}
|
|
5
|
-
export default function Time(props: TimeProps): JSX.Element;
|
|
4
|
+
export default function Time(props: TimeProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
|
7
6
|
//# sourceMappingURL=Time.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Time/Time.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../../../src/components/field/Time/Time.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,SAAU,SAAQ,eAAe;CAE1C;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,2CAgE5C"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
2
|
interface URLComponentProps extends PConnFieldProps {
|
|
4
3
|
}
|
|
5
|
-
export default function URLComponent(props: URLComponentProps): JSX.Element;
|
|
4
|
+
export default function URLComponent(props: URLComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
|
7
6
|
//# sourceMappingURL=URL.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"URL.d.ts","sourceRoot":"","sources":["../../../../src/components/field/URL/URL.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"URL.d.ts","sourceRoot":"","sources":["../../../../src/components/field/URL/URL.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,iBAAkB,SAAQ,eAAe;CAElD;AAKD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CA2D5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserReference.d.ts","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReference.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"UserReference.d.ts","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReference.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAQvD,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;;AA0KD,wBAAiD"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { memo, useEffect, useState } from 'react';
|
|
3
3
|
import { Typography } from '@material-ui/core';
|
|
4
4
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
5
|
+
import FieldValueList from '../../designSystemExtension/FieldValueList';
|
|
5
6
|
import { getUserId, isUserNameAvailable } from './UserReferenceUtils';
|
|
6
7
|
const DROPDOWN_LIST = 'Drop-down list';
|
|
7
8
|
const SEARCH_BOX = 'Search box';
|
|
@@ -9,7 +10,7 @@ const UserReference = (props) => {
|
|
|
9
10
|
// Get emitted components from map (so we can get any override that may exist)
|
|
10
11
|
const AutoComplete = getComponentFromMap('AutoComplete');
|
|
11
12
|
const Dropdown = getComponentFromMap('Dropdown');
|
|
12
|
-
const { label = '', displayAs = '', getPConnect, value = '', testId = '', helperText = '', validatemessage = '', placeholder = '', showAsFormattedText = false, additionalProps = {}, hideLabel = false, readOnly = false, required = false, disabled = false, onChange,
|
|
13
|
+
const { label = '', displayAs = '', displayMode = '', getPConnect, value = '', testId = '', helperText = '', validatemessage = '', placeholder = '', showAsFormattedText = false, additionalProps = {}, hideLabel = false, readOnly = false, required = false, disabled = false, onChange,
|
|
13
14
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
15
|
variant = 'inline' } = props;
|
|
15
16
|
const [dropDownDataSource, setDropDownDataSource] = useState([]);
|
|
@@ -54,6 +55,12 @@ const UserReference = (props) => {
|
|
|
54
55
|
}
|
|
55
56
|
}, [displayAs, readOnly, showAsFormattedText, value]);
|
|
56
57
|
let userReferenceComponent = null;
|
|
58
|
+
if (displayMode === 'LABELS_LEFT') {
|
|
59
|
+
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: userName || '' });
|
|
60
|
+
}
|
|
61
|
+
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
62
|
+
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: userName || '', variant: 'stacked' });
|
|
63
|
+
}
|
|
57
64
|
if (readOnly && showAsFormattedText) {
|
|
58
65
|
if (userId) {
|
|
59
66
|
userReferenceComponent = (_jsx(_Fragment, { children: _jsxs("div", { children: [_jsx(Typography, { variant: 'caption', children: label }), _jsx(Typography, { variant: 'body1', children: userName })] }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserReference.js","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI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sB,GAAG,CACvB,KAAC,QAAQ,IACP,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,kBAAkB,EAC9B,QAAQ,EAAC,YAAY,EACrB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;SACH;KACF;IAED,OAAO,sBAAsB,CAAC;AAChC,CAAC,CAAC;AAEF,oGAAoG;AACpG,2FAA2F;AAC3F,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE;IAC5C,OAAO,CACL,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC;QACzD,SAAS,CAAC,eAAe,KAAK,SAAS,CAAC,eAAe;QACvD,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;QACzC,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;QACzC,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,CAC1C,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import { memo, useEffect, useState } from 'react';\nimport { Typography } from '@material-ui/core';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport { getUserId, isUserNameAvailable } from './UserReferenceUtils';\n\nconst DROPDOWN_LIST = 'Drop-down list';\nconst SEARCH_BOX = 'Search box';\n\ninterface UserReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on URLComponent here\n displayAs?: string;\n label?: string;\n value?: any;\n testId?: string;\n placeholder?: string;\n helperText?: string;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n validatemessage?: string;\n showAsFormattedText?: boolean;\n additionalProps?: object;\n hideLabel?: boolean;\n variant?: string;\n onChange?: any;\n}\n\nconst UserReference = (props: UserReferenceProps) => {\n // Get emitted components from map (so we can get any override that may exist)\n const AutoComplete = getComponentFromMap('AutoComplete');\n const Dropdown = getComponentFromMap('Dropdown');\n\n const {\n label = '',\n displayAs = '',\n getPConnect,\n value = '',\n testId = '',\n helperText = '',\n validatemessage = '',\n placeholder = '',\n showAsFormattedText = false,\n additionalProps = {},\n hideLabel = false,\n readOnly = false,\n required = false,\n disabled = false,\n onChange,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n variant = 'inline'\n } = props;\n const [dropDownDataSource, setDropDownDataSource] = useState([]);\n const [userName, setUserName] = useState('');\n const OPERATORS_DP = PCore.getEnvironmentInfo().getDefaultOperatorDP();\n const userId = getUserId(value);\n\n useEffect(() => {\n if (userId && readOnly && showAsFormattedText) {\n if (isUserNameAvailable(value)) {\n setUserName(value.userName);\n } else {\n // if same user ref field is referred in view as editable & readonly formatted text\n // referenced users won't be available, so get user details from dx api\n const { getOperatorDetails } = PCore.getUserApi();\n getOperatorDetails(userId).then((res: any) => {\n if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {\n setUserName(res.data.pyOperatorInfo.pyUserName);\n }\n });\n }\n } else if (displayAs === DROPDOWN_LIST) {\n const queryPayload = {\n dataViewName: OPERATORS_DP\n };\n\n PCore.getRestClient()\n // @ts-ignore - Argument of type '{ queryPayload: { dataViewName: string; }; }' is not assignable to parameter of type 'RestApiOptionsObject'\n // @ts-ignore - Expected 3 arguments, but got 2\n .invokeRestApi('getListData', { queryPayload })\n .then((res: any) => {\n const ddDataSource = res.data.data.map(listItem => ({\n key: listItem.pyUserIdentifier,\n value: listItem.pyUserName\n }));\n setDropDownDataSource(ddDataSource);\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.error(err);\n });\n }\n }, [displayAs, readOnly, showAsFormattedText, value]);\n\n let userReferenceComponent: any = null;\n\n if (readOnly && showAsFormattedText) {\n if (userId) {\n userReferenceComponent = (\n <>\n {/*\n TODO: This has to be replaced with Operator Component\n */}\n <div>\n <Typography variant='caption'>{label}</Typography>\n <Typography variant='body1'>{userName}</Typography>\n </div>\n </>\n );\n }\n } else {\n if (displayAs === SEARCH_BOX) {\n const columns = [\n {\n value: 'pyUserName',\n display: 'true',\n useForSearch: true,\n primary: 'true'\n },\n {\n value: 'pyUserIdentifier',\n setProperty: 'Associated property',\n key: 'true',\n display: 'true',\n secondary: 'true',\n useForSearch: 'true'\n }\n ];\n\n userReferenceComponent = (\n <AutoComplete\n additionalProps={additionalProps}\n label={label}\n getPConnect={getPConnect}\n datasource={OPERATORS_DP}\n listType='datapage'\n columns={columns}\n testId={testId}\n placeholder={placeholder}\n readOnly={readOnly}\n disabled={disabled}\n required={required}\n helperText={helperText}\n validatemessage={validatemessage}\n value={userId}\n hideLabel={hideLabel}\n onChange={onChange}\n />\n );\n }\n if (displayAs === DROPDOWN_LIST) {\n userReferenceComponent = (\n <Dropdown\n additionalProps={additionalProps}\n datasource={dropDownDataSource}\n listType='associated'\n getPConnect={getPConnect}\n label={label}\n value={userId}\n testId={testId}\n placeholder={placeholder}\n readOnly={readOnly}\n disabled={disabled}\n required={required}\n helperText={helperText}\n validatemessage={validatemessage}\n hideLabel={hideLabel}\n onChange={onChange}\n />\n );\n }\n }\n\n return userReferenceComponent;\n};\n\n// as objects are there in props, shallow comparision fails & re-rendering of comp happens even with\n// same key value pairs in obj. hence using custom comparison function on when to re-render\nconst comparisonFn = (prevProps, nextProps) => {\n return (\n getUserId(prevProps.value) === getUserId(nextProps.value) &&\n prevProps.validatemessage === nextProps.validatemessage &&\n prevProps.required === nextProps.required &&\n prevProps.disabled === nextProps.disabled &&\n prevProps.readOnly === nextProps.readOnly\n );\n};\n\nexport default memo(UserReference, comparisonFn);\n"]}
|
|
1
|
+
{"version":3,"file":"UserReference.js","sourceRoot":"","sources":["../../../../src/components/field/UserReference/UserReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,cAAc,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEtE,MAAM,aAAa,GAAG,gBAAgB,CAAC;AACvC,MAAM,UAAU,GAAG,YAAY,CAAC;AAsBhC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IAClD,8EAA8E;IAC9E,MAAM,YAAY,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACzD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAEjD,MAAM,EACJ,KAAK,GAAG,EAAE,EACV,SAAS,GAAG,EAAE,EACd,WAAW,GAAG,EAAE,EAChB,WAAW,EACX,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,EAAE,EACX,UAAU,GAAG,EAAE,EACf,eAAe,GAAG,EAAE,EACpB,WAAW,GAAG,EAAE,EAChB,mBAAmB,GAAG,KAAK,EAC3B,eAAe,GAAG,EAAE,EACpB,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,QAAQ;IACR,6DAA6D;IAC7D,OAAO,GAAG,QAAQ,EACnB,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,Q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AAC,SAAS,CAAC,KAAK,CAAC;QACzD,SAAS,CAAC,eAAe,KAAK,SAAS,CAAC,eAAe;QACvD,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;QACzC,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;QACzC,SAAS,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,CAC1C,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC","sourcesContent":["import { memo, useEffect, useState } from 'react';\nimport { Typography } from '@material-ui/core';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport FieldValueList from '../../designSystemExtension/FieldValueList';\nimport { getUserId, isUserNameAvailable } from './UserReferenceUtils';\n\nconst DROPDOWN_LIST = 'Drop-down list';\nconst SEARCH_BOX = 'Search box';\n\ninterface UserReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on URLComponent here\n displayAs?: string;\n displayMode?: string;\n label?: string;\n value?: any;\n testId?: string;\n placeholder?: string;\n helperText?: string;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n validatemessage?: string;\n showAsFormattedText?: boolean;\n additionalProps?: object;\n hideLabel?: boolean;\n variant?: string;\n onChange?: any;\n}\n\nconst UserReference = (props: UserReferenceProps) => {\n // Get emitted components from map (so we can get any override that may exist)\n const AutoComplete = getComponentFromMap('AutoComplete');\n const Dropdown = getComponentFromMap('Dropdown');\n\n const {\n label = '',\n displayAs = '',\n displayMode = '',\n getPConnect,\n value = '',\n testId = '',\n helperText = '',\n validatemessage = '',\n placeholder = '',\n showAsFormattedText = false,\n additionalProps = {},\n hideLabel = false,\n readOnly = false,\n required = false,\n disabled = false,\n onChange,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n variant = 'inline'\n } = props;\n const [dropDownDataSource, setDropDownDataSource] = useState([]);\n const [userName, setUserName] = useState('');\n const OPERATORS_DP = PCore.getEnvironmentInfo().getDefaultOperatorDP();\n const userId = getUserId(value);\n\n useEffect(() => {\n if (userId && readOnly && showAsFormattedText) {\n if (isUserNameAvailable(value)) {\n setUserName(value.userName);\n } else {\n // if same user ref field is referred in view as editable & readonly formatted text\n // referenced users won't be available, so get user details from dx api\n const { getOperatorDetails } = PCore.getUserApi();\n getOperatorDetails(userId).then((res: any) => {\n if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {\n setUserName(res.data.pyOperatorInfo.pyUserName);\n }\n });\n }\n } else if (displayAs === DROPDOWN_LIST) {\n const queryPayload = {\n dataViewName: OPERATORS_DP\n };\n\n PCore.getRestClient()\n // @ts-ignore - Argument of type '{ queryPayload: { dataViewName: string; }; }' is not assignable to parameter of type 'RestApiOptionsObject'\n // @ts-ignore - Expected 3 arguments, but got 2\n .invokeRestApi('getListData', { queryPayload })\n .then((res: any) => {\n const ddDataSource = res.data.data.map(listItem => ({\n key: listItem.pyUserIdentifier,\n value: listItem.pyUserName\n }));\n setDropDownDataSource(ddDataSource);\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.error(err);\n });\n }\n }, [displayAs, readOnly, showAsFormattedText, value]);\n\n let userReferenceComponent: any = null;\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={userName || ''} variant='stacked' />;\n }\n\n if (readOnly && showAsFormattedText) {\n if (userId) {\n userReferenceComponent = (\n <>\n {/*\n TODO: This has to be replaced with Operator Component\n */}\n <div>\n <Typography variant='caption'>{label}</Typography>\n <Typography variant='body1'>{userName}</Typography>\n </div>\n </>\n );\n }\n } else {\n if (displayAs === SEARCH_BOX) {\n const columns = [\n {\n value: 'pyUserName',\n display: 'true',\n useForSearch: true,\n primary: 'true'\n },\n {\n value: 'pyUserIdentifier',\n setProperty: 'Associated property',\n key: 'true',\n display: 'true',\n secondary: 'true',\n useForSearch: 'true'\n }\n ];\n\n userReferenceComponent = (\n <AutoComplete\n additionalProps={additionalProps}\n label={label}\n getPConnect={getPConnect}\n datasource={OPERATORS_DP}\n listType='datapage'\n columns={columns}\n testId={testId}\n placeholder={placeholder}\n readOnly={readOnly}\n disabled={disabled}\n required={required}\n helperText={helperText}\n validatemessage={validatemessage}\n value={userId}\n hideLabel={hideLabel}\n onChange={onChange}\n />\n );\n }\n if (displayAs === DROPDOWN_LIST) {\n userReferenceComponent = (\n <Dropdown\n additionalProps={additionalProps}\n datasource={dropDownDataSource}\n listType='associated'\n getPConnect={getPConnect}\n label={label}\n value={userId}\n testId={testId}\n placeholder={placeholder}\n readOnly={readOnly}\n disabled={disabled}\n required={required}\n helperText={helperText}\n validatemessage={validatemessage}\n hideLabel={hideLabel}\n onChange={onChange}\n />\n );\n }\n }\n return userReferenceComponent;\n};\n\n// as objects are there in props, shallow comparision fails & re-rendering of comp happens even with\n// same key value pairs in obj. hence using custom comparison function on when to re-render\nconst comparisonFn = (prevProps, nextProps) => {\n return (\n getUserId(prevProps.value) === getUserId(nextProps.value) &&\n prevProps.validatemessage === nextProps.validatemessage &&\n prevProps.required === nextProps.required &&\n prevProps.disabled === nextProps.disabled &&\n prevProps.readOnly === nextProps.readOnly\n );\n};\n\nexport default memo(UserReference, comparisonFn);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/common-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/common-utils.ts"],"names":[],"mappings":"AACA,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAElD"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
1
2
|
export function isEmptyObject(obj) {
|
|
2
3
|
return Object.keys(obj).length === 0;
|
|
3
4
|
}
|
|
4
|
-
export function isInfinity23OrHigher() {
|
|
5
|
-
const pCoreVersion = PCore.getPCoreVersion();
|
|
6
|
-
return ['8.23.0', '23.1.1'].includes(pCoreVersion);
|
|
7
|
-
}
|
|
8
5
|
//# sourceMappingURL=common-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/common-utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACvC,CAAC
|
|
1
|
+
{"version":3,"file":"common-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/common-utils.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACvC,CAAC","sourcesContent":["/* eslint-disable import/prefer-default-export */\nexport function isEmptyObject(obj: Object): boolean {\n return Object.keys(obj).length === 0;\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function getLocale(locale?: string): string
|
|
2
|
-
export declare function getCurrentTimezone(timezone?: string):
|
|
1
|
+
export declare function getLocale(locale?: string): string;
|
|
2
|
+
export declare function getCurrentTimezone(timezone?: string): any;
|
|
3
3
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/common.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,MAAM,GAAE,MAAW,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/common.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,MAAM,GAAE,MAAW,UAO5C;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,GAAE,MAA2B,OAGvE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const updateNewInstuctions: (c11nEnv: any, selectionList: any) => void;
|
|
2
|
+
declare const insertInstruction: (c11nEnv: any, selectionList: any, selectionKey: any, primaryField: any, item: any) => void;
|
|
3
|
+
declare const deleteInstruction: (c11nEnv: any, selectionList: any, selectionKey: any, item: any) => void;
|
|
4
|
+
export { updateNewInstuctions, insertInstruction, deleteInstruction };
|
|
5
|
+
//# sourceMappingURL=instructions-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/instructions-utils.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,oBAAoB,4CAOzB,CAAC;AAEF,QAAA,MAAM,iBAAiB,6FAYtB,CAAC;AAEF,QAAA,MAAM,iBAAiB,0EAMtB,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const isSelfReferencedProperty = (param, referenceProp) => {
|
|
2
|
+
const [, parentPropName] = param.split('.');
|
|
3
|
+
const referencePropParent = referenceProp?.split('.').pop();
|
|
4
|
+
return parentPropName === referencePropParent;
|
|
5
|
+
};
|
|
6
|
+
const updateNewInstuctions = (c11nEnv, selectionList) => {
|
|
7
|
+
const { datasource: { parameters = {} } = {} } = c11nEnv.getFieldMetadata(selectionList) || {};
|
|
8
|
+
const compositeKeys = [];
|
|
9
|
+
Object.values(parameters).forEach((param) => {
|
|
10
|
+
if (isSelfReferencedProperty(param, selectionList))
|
|
11
|
+
compositeKeys.push(param.substring(param.lastIndexOf('.') + 1));
|
|
12
|
+
});
|
|
13
|
+
c11nEnv.getListActions().initDefaultPageInstructions(selectionList, compositeKeys);
|
|
14
|
+
};
|
|
15
|
+
const insertInstruction = (c11nEnv, selectionList, selectionKey, primaryField, item) => {
|
|
16
|
+
const { id, primary } = item;
|
|
17
|
+
const actualProperty = selectionKey.startsWith('.') ? selectionKey.substring(1) : selectionKey;
|
|
18
|
+
const displayProperty = primaryField.startsWith('.') ? primaryField.substring(1) : primaryField;
|
|
19
|
+
const rows = c11nEnv.getValue(`${c11nEnv.getPageReference()}${selectionList}`) || [];
|
|
20
|
+
const startIndex = rows.length;
|
|
21
|
+
const content = {
|
|
22
|
+
[actualProperty]: id,
|
|
23
|
+
[displayProperty]: primary,
|
|
24
|
+
nonFormProperties: actualProperty !== displayProperty ? [displayProperty] : []
|
|
25
|
+
};
|
|
26
|
+
c11nEnv.getListActions().insert(content, startIndex);
|
|
27
|
+
};
|
|
28
|
+
const deleteInstruction = (c11nEnv, selectionList, selectionKey, item) => {
|
|
29
|
+
const { id } = item;
|
|
30
|
+
const actualProperty = selectionKey.startsWith('.') ? selectionKey.substring(1) : selectionKey;
|
|
31
|
+
const rows = c11nEnv.getValue(`${c11nEnv.getPageReference()}${selectionList}`) || [];
|
|
32
|
+
const index = rows.findIndex(row => row[actualProperty] === id);
|
|
33
|
+
c11nEnv.getListActions().deleteEntry(index);
|
|
34
|
+
};
|
|
35
|
+
export { updateNewInstuctions, insertInstruction, deleteInstruction };
|
|
36
|
+
//# sourceMappingURL=instructions-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/instructions-utils.ts"],"names":[],"mappings":"AAAA,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE;IACxD,MAAM,CAAC,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,mBAAmB,GAAG,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAC5D,OAAO,cAAc,KAAK,mBAAmB,CAAC;AAChD,CAAC,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AAC,MAAM,CAAC;IAC/B,MAAM,OAAO,GAAG;QACd,CAAC,cAAc,CAAC,EAAE,EAAE;QACpB,CAAC,eAAe,CAAC,EAAE,OAAO;QAC1B,iBAAiB,EAAE,cAAc,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE;KAC/E,CAAC;IACF,OAAO,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE;IACvE,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC;IACpB,MAAM,cAAc,GAAG,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;IAC/F,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC;IACrF,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC;IAChE,OAAO,CAAC,cAAc,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["const isSelfReferencedProperty = (param, referenceProp) => {\n const [, parentPropName] = param.split('.');\n const referencePropParent = referenceProp?.split('.').pop();\n return parentPropName === referencePropParent;\n};\n\nconst updateNewInstuctions = (c11nEnv, selectionList) => {\n const { datasource: { parameters = {} } = {} } = c11nEnv.getFieldMetadata(selectionList) || {};\n const compositeKeys: any = [];\n Object.values(parameters).forEach((param: any) => {\n if (isSelfReferencedProperty(param, selectionList)) compositeKeys.push(param.substring(param.lastIndexOf('.') + 1));\n });\n c11nEnv.getListActions().initDefaultPageInstructions(selectionList, compositeKeys);\n};\n\nconst insertInstruction = (c11nEnv, selectionList, selectionKey, primaryField, item) => {\n const { id, primary } = item;\n const actualProperty = selectionKey.startsWith('.') ? selectionKey.substring(1) : selectionKey;\n const displayProperty = primaryField.startsWith('.') ? primaryField.substring(1) : primaryField;\n const rows = c11nEnv.getValue(`${c11nEnv.getPageReference()}${selectionList}`) || [];\n const startIndex = rows.length;\n const content = {\n [actualProperty]: id,\n [displayProperty]: primary,\n nonFormProperties: actualProperty !== displayProperty ? [displayProperty] : []\n };\n c11nEnv.getListActions().insert(content, startIndex);\n};\n\nconst deleteInstruction = (c11nEnv, selectionList, selectionKey, item) => {\n const { id } = item;\n const actualProperty = selectionKey.startsWith('.') ? selectionKey.substring(1) : selectionKey;\n const rows = c11nEnv.getValue(`${c11nEnv.getPageReference()}${selectionList}`) || [];\n const index = rows.findIndex(row => row[actualProperty] === id);\n c11nEnv.getListActions().deleteEntry(index);\n};\n\nexport { updateNewInstuctions, insertInstruction, deleteInstruction };\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const connectToState: (mapStateToProps?: () => void) => (Component: any) => (ownProps?: {}) => JSX.Element;
|
|
1
|
+
declare const connectToState: (mapStateToProps?: () => void) => (Component: any) => (ownProps?: {}) => import("react/jsx-runtime").JSX.Element;
|
|
3
2
|
export default connectToState;
|
|
4
3
|
//# sourceMappingURL=state-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/state-utils.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"state-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/state-utils.tsx"],"names":[],"mappings":"AAKA,QAAA,MAAM,cAAc,gDACC,GAAG,+DAkCvB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface ActionButtonsProps {
|
|
3
2
|
arMainButtons?: any[];
|
|
4
3
|
arSecondaryButtons?: any[];
|
|
5
4
|
onButtonPress: any;
|
|
6
5
|
}
|
|
7
|
-
export default function ActionButtons(props: ActionButtonsProps): JSX.Element;
|
|
6
|
+
export default function ActionButtons(props: ActionButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=ActionButtons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActionButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IAE1B,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;IACtB,kBAAkB,CAAC,EAAE,GAAG,EAAE,CAAC;IAC3B,aAAa,EAAE,GAAG,CAAC;CACpB;AAYD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAmD9D"}
|
|
@@ -6,6 +6,6 @@ interface AssignmentProps extends PConnProps {
|
|
|
6
6
|
banners: any[];
|
|
7
7
|
actionButtons: any[];
|
|
8
8
|
}
|
|
9
|
-
export default function Assignment(props: PropsWithChildren<AssignmentProps>): JSX.Element;
|
|
9
|
+
export default function Assignment(props: PropsWithChildren<AssignmentProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=Assignment.d.ts.map
|