@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":"react_pconnect.d.ts","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":"AA+BO,0EAMN;;
|
|
1
|
+
{"version":3,"file":"react_pconnect.d.ts","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":"AA+BO,0EAMN;;AA4TD;;;;;GAKG;AACH,2EAEC"}
|
|
@@ -11,8 +11,8 @@ import StoreContext from './Context/StoreContext';
|
|
|
11
11
|
// As we add components, we'll need to import them here and add to the switch statement
|
|
12
12
|
// below in getComponent!
|
|
13
13
|
import { SdkComponentMap } from './helpers/sdk_component_map';
|
|
14
|
-
const isClassIDCompare = (key, prev) => {
|
|
15
|
-
return !(key === 'classID' && !prev[key]);
|
|
14
|
+
const isClassIDCompare = (key, prev, next) => {
|
|
15
|
+
return !(key === 'classID' && (!prev[key] || !next[key]));
|
|
16
16
|
};
|
|
17
17
|
const routingInfoCompare = (next, prev) => {
|
|
18
18
|
return 'routingInfo' in next && (!shallowEqual(next.routingInfo, prev.routingInfo) || !PCore.isDeepEqual(next.routingInfo, prev.routingInfo));
|
|
@@ -71,16 +71,13 @@ const connectRedux = (component, c11nEnv) => {
|
|
|
71
71
|
areStatePropsEqual: (next, prev) => {
|
|
72
72
|
const allStateProps = c11nEnv.getStateProps();
|
|
73
73
|
for (const key of Object.keys(allStateProps)) {
|
|
74
|
-
if ((
|
|
75
|
-
(next.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (allStateProps.status === '.pyStatusWork') {
|
|
82
|
-
for (const key of Object.keys(prev)) {
|
|
83
|
-
if (!PCore.isDeepEqual(next[key], prev[key])) {
|
|
74
|
+
if (Object.prototype.hasOwnProperty.call(allStateProps, key)) {
|
|
75
|
+
if (key === 'inheritedProps' && next.inheritedProps && !PCore.isDeepEqual(next.inheritedProps, prev.inheritedProps)) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
if (key !== 'inheritedProps' &&
|
|
79
|
+
((isClassIDCompare(key, prev, next) && !shallowEqual(next[key], prev[key])) ||
|
|
80
|
+
(next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo)))) {
|
|
84
81
|
return false;
|
|
85
82
|
}
|
|
86
83
|
}
|
|
@@ -139,146 +136,136 @@ const getComponent = c11nEnv => {
|
|
|
139
136
|
return connectRedux(component, c11nEnv);
|
|
140
137
|
};
|
|
141
138
|
/**
|
|
142
|
-
*
|
|
143
|
-
* @
|
|
144
|
-
*
|
|
145
|
-
|
|
139
|
+
* JEA - add Type info via JSdoc syntax...
|
|
140
|
+
* @extends {React.Components<Props, State>}
|
|
141
|
+
* createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object
|
|
142
|
+
* to pre-process meta data of each componnet.
|
|
143
|
+
* - Wraps each child in a component with PConnect
|
|
144
|
+
* - Process all actions and make them avaiable in props
|
|
145
|
+
* - Filters all properties in metadata and keeps them
|
|
146
|
+
* __internal for re-render process through connect
|
|
146
147
|
*/
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
this.c11nEnv.addFormField();
|
|
182
|
-
setVisibilityForList(this.c11nEnv, true);
|
|
183
|
-
}
|
|
184
|
-
componentDidCatch(error, info) {
|
|
185
|
-
// eslint-disable-next-line no-console
|
|
186
|
-
console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);
|
|
187
|
-
}
|
|
188
|
-
componentWillUnmount() {
|
|
189
|
-
if (this.c11nEnv.removeFormField) {
|
|
190
|
-
this.c11nEnv.removeFormField();
|
|
191
|
-
setVisibilityForList(this.c11nEnv, false);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
/*
|
|
195
|
-
* processActions to see all actions in meta and adds event in props.
|
|
196
|
-
* Attaches common handler (eventHandler) for all actions.
|
|
197
|
-
*/
|
|
198
|
-
processActions() {
|
|
199
|
-
if (this.c11nEnv.isEditable()) {
|
|
200
|
-
this.c11nEnv.setAction('onChange', this.changeHandler);
|
|
201
|
-
this.c11nEnv.setAction('onBlur', this.eventHandler);
|
|
202
|
-
}
|
|
148
|
+
class PConnect extends Component {
|
|
149
|
+
constructor(props) {
|
|
150
|
+
super(props);
|
|
151
|
+
const { getPConnect } = this.props;
|
|
152
|
+
this.state = {
|
|
153
|
+
hasError: false
|
|
154
|
+
};
|
|
155
|
+
this.eventHandler = this.eventHandler.bind(this);
|
|
156
|
+
this.changeHandler = this.changeHandler.bind(this);
|
|
157
|
+
this.c11nEnv = getPConnect();
|
|
158
|
+
// eslint-disable-next-line react/no-unused-class-component-methods
|
|
159
|
+
this.Control = getComponent(this.c11nEnv);
|
|
160
|
+
this.actionsAPI = this.c11nEnv.getActionsApi();
|
|
161
|
+
this.processActions(this.c11nEnv);
|
|
162
|
+
}
|
|
163
|
+
static getDerivedStateFromError(error) {
|
|
164
|
+
// Update state so the next render will show the fallback UI.
|
|
165
|
+
return {
|
|
166
|
+
hasError: true,
|
|
167
|
+
error
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
componentDidMount() {
|
|
171
|
+
this.c11nEnv.addFormField();
|
|
172
|
+
setVisibilityForList(this.c11nEnv, true);
|
|
173
|
+
}
|
|
174
|
+
componentDidCatch(error, info) {
|
|
175
|
+
// eslint-disable-next-line no-console
|
|
176
|
+
console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);
|
|
177
|
+
}
|
|
178
|
+
componentWillUnmount() {
|
|
179
|
+
if (this.c11nEnv.removeFormField) {
|
|
180
|
+
this.c11nEnv.removeFormField();
|
|
181
|
+
setVisibilityForList(this.c11nEnv, false);
|
|
203
182
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
183
|
+
}
|
|
184
|
+
/*
|
|
185
|
+
* processActions to see all actions in meta and adds event in props.
|
|
186
|
+
* Attaches common handler (eventHandler) for all actions.
|
|
187
|
+
*/
|
|
188
|
+
processActions() {
|
|
189
|
+
if (this.c11nEnv.isEditable()) {
|
|
190
|
+
this.c11nEnv.setAction('onChange', this.changeHandler);
|
|
191
|
+
this.c11nEnv.setAction('onBlur', this.eventHandler);
|
|
208
192
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
193
|
+
}
|
|
194
|
+
// Using separate handle for change as in case of dropdown, native click is mapped to react change
|
|
195
|
+
changeHandler(event) {
|
|
196
|
+
this.actionsAPI.changeHandler(this.c11nEnv, event);
|
|
197
|
+
// getActionProcessor().changeHandler(this.c11nEnv, event);
|
|
198
|
+
}
|
|
199
|
+
eventHandler(event) {
|
|
200
|
+
this.actionsAPI.eventHandler(this.c11nEnv, event);
|
|
201
|
+
// getActionProcessor().eventHandler(this.c11nEnv, event);
|
|
202
|
+
}
|
|
203
|
+
createChildren() {
|
|
204
|
+
const { getPConnect } = this.props;
|
|
205
|
+
if (getPConnect().hasChildren() && getPConnect().getChildren()) {
|
|
206
|
+
return (getPConnect()
|
|
207
|
+
.getChildren()
|
|
208
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
209
|
+
.map((childProps, index) => _jsx(PConnect, { ...childProps }, `${this.getKey(childProps)}_${index}`)));
|
|
212
210
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
getKey(props = this.props) {
|
|
214
|
+
const { getPConnect } = props;
|
|
215
|
+
const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();
|
|
216
|
+
let key = !viewName ? createUID() : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;
|
|
217
|
+
// In the case of pyDetails the key must be unique for each instance
|
|
218
|
+
if (viewName && viewName.toUpperCase() === 'PYDETAILS') {
|
|
219
|
+
key += `!${getPConnect().getCaseInfo().getID()}`;
|
|
222
220
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
return
|
|
221
|
+
return key.toUpperCase();
|
|
222
|
+
}
|
|
223
|
+
render() {
|
|
224
|
+
const { hasError } = this.state;
|
|
225
|
+
const { getPConnect, additionalProps, ...otherProps } = this.props;
|
|
226
|
+
if (hasError) {
|
|
227
|
+
// You can render any custom fallback UI
|
|
228
|
+
// console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);
|
|
229
|
+
return _jsx(ErrorBoundary, { getPConnect: () => this.c11nEnv, isInternalError: true });
|
|
232
230
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
getPConnect,
|
|
246
|
-
...actions,
|
|
247
|
-
additionalProps,
|
|
248
|
-
...otherProps
|
|
249
|
-
};
|
|
250
|
-
// If the new component is a reference node then mark with a unique key
|
|
251
|
-
if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {
|
|
252
|
-
finalProps.key = this.getKey();
|
|
253
|
-
}
|
|
254
|
-
// console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);
|
|
255
|
-
return _jsx(this.Control, { ...finalProps, children: this.createChildren() });
|
|
231
|
+
const props = this.c11nEnv.getConfigProps();
|
|
232
|
+
const actions = this.c11nEnv.getActions();
|
|
233
|
+
const finalProps = {
|
|
234
|
+
...props,
|
|
235
|
+
getPConnect,
|
|
236
|
+
...actions,
|
|
237
|
+
additionalProps,
|
|
238
|
+
...otherProps
|
|
239
|
+
};
|
|
240
|
+
// If the new component is a reference node then mark with a unique key
|
|
241
|
+
if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {
|
|
242
|
+
finalProps.key = this.getKey();
|
|
256
243
|
}
|
|
244
|
+
// console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);
|
|
245
|
+
return _jsx(this.Control, { ...finalProps, children: this.createChildren() });
|
|
257
246
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
return PConnect;
|
|
247
|
+
}
|
|
248
|
+
// eslint-disable-next-line react/static-property-placement
|
|
249
|
+
PConnect.propTypes = {
|
|
250
|
+
// __internal: PropTypes.object.isRequired,
|
|
251
|
+
// meta: PropTypes.object.isRequired,
|
|
252
|
+
// configObject: PropTypes.object.isRequired,
|
|
253
|
+
getPConnect: PropTypes.func.isRequired,
|
|
254
|
+
additionalProps: PropTypes.shape({
|
|
255
|
+
noLabel: PropTypes.bool,
|
|
256
|
+
readOnly: PropTypes.bool
|
|
257
|
+
}),
|
|
258
|
+
validatemessage: PropTypes.string
|
|
259
|
+
};
|
|
260
|
+
// eslint-disable-next-line react/static-property-placement
|
|
261
|
+
PConnect.defaultProps = {
|
|
262
|
+
additionalProps: {},
|
|
263
|
+
validatemessage: ''
|
|
276
264
|
};
|
|
277
265
|
// Move these into SdkConstellationReady so PCore is available
|
|
278
266
|
document.addEventListener('SdkConstellationReady', () => {
|
|
279
267
|
PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {
|
|
280
|
-
|
|
281
|
-
return createElement(PConnectComp, {
|
|
268
|
+
return createElement(PConnect, {
|
|
282
269
|
...c11nEnv,
|
|
283
270
|
...c11nEnv.getPConnect().getConfigProps(),
|
|
284
271
|
...c11nEnv.getPConnect().getActions(),
|
|
@@ -316,5 +303,14 @@ document.addEventListener('SdkConstellationReady', () => {
|
|
|
316
303
|
await Promise.allSettled(promises);
|
|
317
304
|
});
|
|
318
305
|
});
|
|
306
|
+
/**
|
|
307
|
+
*
|
|
308
|
+
* @param {*} declarative
|
|
309
|
+
* @returns {React.Components<Props, State>}
|
|
310
|
+
|
|
311
|
+
*/
|
|
312
|
+
const createPConnectComponent = () => {
|
|
313
|
+
return PConnect;
|
|
314
|
+
};
|
|
319
315
|
export default createPConnectComponent;
|
|
320
316
|
//# sourceMappingURL=react_pconnect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react_pconnect.js","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,YAAY,EAAE,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC,CAAC,2CAA2C;AAC1H,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAE9D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,iHAAiH;AAEjH,0FAA0F;AAC1F,uFAAuF;AACvF,4BAA4B;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;IACrC,OAAO,CAAC,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IACxC,OAAO,aAAa,IAAI,IAAI,IAAI,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC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AAC,CAAC,OAAO,CAAC,MAAM,EAAE;wBACnE,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BAC1C,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;wBAClC,CAAC,CAAC,CAAC;qBACJ;oBACD,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;wBACnE,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BAC1C,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;wBACtE,CAAC,CAAC,CAAC;qBACJ;iBACF;aACF;QACH,CAAC,CAAC,CAAC;QACH;;;;;YAKI;QACJ,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, shallowEqual } from 'react-redux';\n\nimport ComponentMap, { LazyMap as LazyComponentMap } from '../components_map'; // was '../../../../../src/components_map';\nimport ErrorBoundary from '../components/infra/ErrorBoundary';\n\nimport StoreContext from './Context/StoreContext';\n\n// const pathToComponents = \"../../../../../src/components\"; /* When bridge was local, it was \"../components\" */\n\n// For now, NOT doing lazy loading - needs some work on the loader to work with TypeScript\n// As we add components, we'll need to import them here and add to the switch statement\n// below in getComponent!\n\nimport { SdkComponentMap } from './helpers/sdk_component_map';\n\nconst isClassIDCompare = (key, prev) => {\n return !(key === 'classID' && !prev[key]);\n};\n\nconst routingInfoCompare = (next, prev) => {\n return 'routingInfo' in next && (!shallowEqual(next.routingInfo, prev.routingInfo) || !PCore.isDeepEqual(next.routingInfo, prev.routingInfo));\n};\n\n/** Generate unique id for elements */\nconst createUID = () => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) || (renderMode === 'Editable' && referenceList)) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nfunction withVisibility(WrappedComponent) {\n // eslint-disable-next-line react/prefer-stateless-function\n return class extends Component {\n render() {\n const { visibility } = this.props;\n\n if (visibility === false) {\n return null;\n }\n return <WrappedComponent {...this.props} />;\n }\n };\n}\n\nconst connectRedux = (component, c11nEnv) => {\n return connect(\n (state, ownProps) => {\n let addProps = {};\n const obj = {};\n // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render\n if (!ownProps.getPConnect) {\n // eslint-disable-next-line no-console\n console.error('connectRedux ownProps are not defined');\n } else {\n c11nEnv = ownProps.getPConnect();\n }\n\n if (typeof component.additionalProps === 'object') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps);\n } else if (typeof component.additionalProps === 'function') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps(state, ownProps.getPConnect));\n }\n\n c11nEnv.getConfigProps(obj);\n\n // populate additional props which are component specific and not present in configurations\n // This block can be removed once all these props will be added as part of configs\n c11nEnv.populateAdditionalProps(obj);\n\n return {\n ...obj,\n ...addProps\n };\n },\n null,\n null,\n {\n context: StoreContext,\n areStatePropsEqual: (next, prev) => {\n const allStateProps = c11nEnv.getStateProps();\n for (const key of Object.keys(allStateProps)) {\n if (\n (isClassIDCompare(key, prev) && !shallowEqual(next[key], prev[key])) ||\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo))\n ) {\n return false;\n }\n }\n\n // For CaseSummary (when status === \".pyStatusWork\"), we need to compare changes in\n // primaryFields and secondary Fields\n if (allStateProps.status === '.pyStatusWork') {\n for (const key of Object.keys(prev)) {\n if (!PCore.isDeepEqual(next[key], prev[key])) {\n return false;\n }\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !routingInfoCompare(next, prev);\n }\n }\n )(component);\n};\n\nconst getComponent = c11nEnv => {\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n const ComponentsRegistry = PCore.getComponentsRegistry();\n const type = c11nEnv.getComponentName();\n\n const componentObj = ComponentsRegistry.getComponent(type);\n const componentType = (componentObj && componentObj.component) || type;\n\n // JEA - modifying logic before bailing to RootContainer logic to work around async loading problem\n let component = LazyComponentMap[componentType]; /* || window[componentType] */\n\n // NOTE: Until we get lazy loading working, maintain this for each component we add\n if (component === undefined) {\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`react_pconnect getComponent found ${componentType}: Local`);\n component = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[componentType];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`react_pconnect getComponent found ${componentType}: Pega-provided`);\n component = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);\n component = ErrorBoundary;\n }\n }\n } else {\n // We no longer handle the \"old\" switch statement that was here in the original packaging.\n // All components seen here need to be in the SdkComponentMap\n // eslint-disable-next-line no-console\n console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);\n }\n } else {\n // eslint-disable-next-line no-console\n console.log(`getComponent doesn't have an entry for component ${component}`);\n component = ErrorBoundary;\n }\n\n if (c11nEnv.isConditionExist()) {\n return connectRedux(withVisibility(component), c11nEnv);\n }\n\n return connectRedux(component, c11nEnv);\n};\n\n/**\n *\n * @param {*} declarative\n * @returns {React.Components<Props, State>}\n\n */\nconst createPConnectComponent = () => {\n /**\n * JEA - add Type info via JSdoc syntax...\n * @extends {React.Components<Props, State>}\n * createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object\n * to pre-process meta data of each componnet.\n * - Wraps each child in a component with PConnect\n * - Process all actions and make them avaiable in props\n * - Filters all properties in metadata and keeps them\n * __internal for re-render process through connect\n */\n class PConnect extends Component {\n constructor(props) {\n super(props);\n const { getPConnect } = this.props;\n this.state = {\n hasError: false\n };\n\n this.eventHandler = this.eventHandler.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n\n this.c11nEnv = getPConnect();\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.Control = getComponent(this.c11nEnv);\n this.actionsAPI = this.c11nEnv.getActionsApi();\n\n this.processActions(this.c11nEnv);\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidMount() {\n this.c11nEnv.addFormField();\n setVisibilityForList(this.c11nEnv, true);\n }\n\n componentDidCatch(error, info) {\n // eslint-disable-next-line no-console\n console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);\n }\n\n componentWillUnmount() {\n if (this.c11nEnv.removeFormField) {\n this.c11nEnv.removeFormField();\n setVisibilityForList(this.c11nEnv, false);\n }\n }\n\n /*\n * processActions to see all actions in meta and adds event in props.\n * Attaches common handler (eventHandler) for all actions.\n */\n processActions() {\n if (this.c11nEnv.isEditable()) {\n this.c11nEnv.setAction('onChange', this.changeHandler);\n this.c11nEnv.setAction('onBlur', this.eventHandler);\n }\n }\n\n // Using separate handle for change as in case of dropdown, native click is mapped to react change\n changeHandler(event) {\n this.actionsAPI.changeHandler(this.c11nEnv, event);\n // getActionProcessor().changeHandler(this.c11nEnv, event);\n }\n\n eventHandler(event) {\n this.actionsAPI.eventHandler(this.c11nEnv, event);\n // getActionProcessor().eventHandler(this.c11nEnv, event);\n }\n\n createChildren() {\n const { getPConnect } = this.props;\n if (getPConnect().hasChildren() && getPConnect().getChildren()) {\n return (\n getPConnect()\n .getChildren()\n // eslint-disable-next-line react/no-array-index-key\n .map((childProps, index) => <PConnect key={`${this.getKey(childProps)}_${index}`} {...childProps} />)\n );\n }\n return null;\n }\n\n getKey(props = this.props) {\n const { getPConnect } = props;\n const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();\n let key = !viewName ? createUID() : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;\n\n // In the case of pyDetails the key must be unigue for each instance\n if (viewName && viewName.toUpperCase() === 'PYDETAILS') {\n key += `!${getPConnect().getCaseInfo().getID()}`;\n }\n\n return key.toUpperCase();\n }\n\n render() {\n const { hasError } = this.state;\n const { getPConnect, additionalProps, ...otherProps } = this.props;\n\n if (hasError) {\n // You can render any custom fallback UI\n // console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);\n return <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />;\n }\n\n const props = this.c11nEnv.getConfigProps();\n const actions = this.c11nEnv.getActions();\n const finalProps = {\n ...props,\n getPConnect,\n ...actions,\n additionalProps,\n ...otherProps\n };\n\n // If the new component is a reference node then mark with a unique key\n if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {\n finalProps.key = this.getKey();\n }\n\n // console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);\n\n return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;\n }\n }\n\n // eslint-disable-next-line react/static-property-placement\n PConnect.propTypes = {\n // __internal: PropTypes.object.isRequired,\n // meta: PropTypes.object.isRequired,\n // configObject: PropTypes.object.isRequired,\n getPConnect: PropTypes.func.isRequired,\n additionalProps: PropTypes.shape({\n noLabel: PropTypes.bool,\n readOnly: PropTypes.bool\n }),\n validatemessage: PropTypes.string\n };\n\n // eslint-disable-next-line react/static-property-placement\n PConnect.defaultProps = {\n additionalProps: {},\n validatemessage: ''\n };\n\n return PConnect;\n};\n\n// Move these into SdkConstellationReady so PCore is available\ndocument.addEventListener('SdkConstellationReady', () => {\n PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {\n const PConnectComp = createPConnectComponent();\n return createElement(PConnectComp, {\n ...c11nEnv,\n ...c11nEnv.getPConnect().getConfigProps(),\n ...c11nEnv.getPConnect().getActions(),\n ...{ additionalProps }\n });\n });\n\n PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {\n const promises = [];\n componentNames.forEach(comp => {\n if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {\n if (!ComponentMap[comp]) {\n const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;\n promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));\n } else {\n if (ComponentMap[comp].modules && ComponentMap[comp].modules.length) {\n ComponentMap[comp].modules.forEach(module => {\n LazyComponentMap[comp] = module;\n });\n }\n if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {\n ComponentMap[comp].scripts.forEach(script => {\n promises.push(PCore.getAssetLoader().getLoader()(script, 'script'));\n });\n }\n }\n }\n });\n /* Promise.all rejects or accepts all or none. This causes entire component loader to fail\n in case there is a single failure.\n Using allSettled to allow Promise to be resolved even if there are failed components\n Note : This is a liberty taken at component loader and unwise to be used at\n asset loader which will still use Promise.all\n */\n await Promise.allSettled(promises);\n });\n});\n\nexport default createPConnectComponent;\n\n/* These APIs need to be exposed for authoring bridge\nWill be removed when pxbootstrap and constellation_bridge is cleaned up\nto use single bootstrap file from constellation */\n// window.authoringUtils = {\n// createElement,\n// render,\n// unmountComponentAtNode,\n// LazyComponentMap\n// };\n"]}
|
|
1
|
+
{"version":3,"file":"react_pconnect.js","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,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;iBACF;aACF;QACH,CAAC,CAAC,CAAC;QACH;;;;;YAKI;QACJ,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG,GAAG,EAAE;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, shallowEqual } from 'react-redux';\n\nimport ComponentMap, { LazyMap as LazyComponentMap } from '../components_map'; // was '../../../../../src/components_map';\nimport ErrorBoundary from '../components/infra/ErrorBoundary';\n\nimport StoreContext from './Context/StoreContext';\n\n// const pathToComponents = \"../../../../../src/components\"; /* When bridge was local, it was \"../components\" */\n\n// For now, NOT doing lazy loading - needs some work on the loader to work with TypeScript\n// As we add components, we'll need to import them here and add to the switch statement\n// below in getComponent!\n\nimport { SdkComponentMap } from './helpers/sdk_component_map';\n\nconst isClassIDCompare = (key, prev, next) => {\n return !(key === 'classID' && (!prev[key] || !next[key]));\n};\n\nconst routingInfoCompare = (next, prev) => {\n return 'routingInfo' in next && (!shallowEqual(next.routingInfo, prev.routingInfo) || !PCore.isDeepEqual(next.routingInfo, prev.routingInfo));\n};\n\n/** Generate unique id for elements */\nconst createUID = () => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) || (renderMode === 'Editable' && referenceList)) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nfunction withVisibility(WrappedComponent) {\n // eslint-disable-next-line react/prefer-stateless-function\n return class extends Component {\n render() {\n const { visibility } = this.props;\n\n if (visibility === false) {\n return null;\n }\n return <WrappedComponent {...this.props} />;\n }\n };\n}\n\nconst connectRedux = (component, c11nEnv) => {\n return connect(\n (state, ownProps) => {\n let addProps = {};\n const obj = {};\n // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render\n if (!ownProps.getPConnect) {\n // eslint-disable-next-line no-console\n console.error('connectRedux ownProps are not defined');\n } else {\n c11nEnv = ownProps.getPConnect();\n }\n\n if (typeof component.additionalProps === 'object') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps);\n } else if (typeof component.additionalProps === 'function') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps(state, ownProps.getPConnect));\n }\n\n c11nEnv.getConfigProps(obj);\n\n // populate additional props which are component specific and not present in configurations\n // This block can be removed once all these props will be added as part of configs\n c11nEnv.populateAdditionalProps(obj);\n\n return {\n ...obj,\n ...addProps\n };\n },\n null,\n null,\n {\n context: StoreContext,\n areStatePropsEqual: (next, prev) => {\n const allStateProps = c11nEnv.getStateProps();\n for (const key of Object.keys(allStateProps)) {\n if (Object.prototype.hasOwnProperty.call(allStateProps, key)) {\n if (key === 'inheritedProps' && next.inheritedProps && !PCore.isDeepEqual(next.inheritedProps, prev.inheritedProps)) {\n return false;\n }\n if (\n key !== 'inheritedProps' &&\n ((isClassIDCompare(key, prev, next) && !shallowEqual(next[key], prev[key])) ||\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo)))\n ) {\n return false;\n }\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !routingInfoCompare(next, prev);\n }\n }\n )(component);\n};\n\nconst getComponent = c11nEnv => {\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n const ComponentsRegistry = PCore.getComponentsRegistry();\n const type = c11nEnv.getComponentName();\n\n const componentObj = ComponentsRegistry.getComponent(type);\n const componentType = (componentObj && componentObj.component) || type;\n\n // JEA - modifying logic before bailing to RootContainer logic to work around async loading problem\n let component = LazyComponentMap[componentType]; /* || window[componentType] */\n\n // NOTE: Until we get lazy loading working, maintain this for each component we add\n if (component === undefined) {\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`react_pconnect getComponent found ${componentType}: Local`);\n component = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[componentType];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`react_pconnect getComponent found ${componentType}: Pega-provided`);\n component = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);\n component = ErrorBoundary;\n }\n }\n } else {\n // We no longer handle the \"old\" switch statement that was here in the original packaging.\n // All components seen here need to be in the SdkComponentMap\n // eslint-disable-next-line no-console\n console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);\n }\n } else {\n // eslint-disable-next-line no-console\n console.log(`getComponent doesn't have an entry for component ${component}`);\n component = ErrorBoundary;\n }\n\n if (c11nEnv.isConditionExist()) {\n return connectRedux(withVisibility(component), c11nEnv);\n }\n\n return connectRedux(component, c11nEnv);\n};\n\n/**\n * JEA - add Type info via JSdoc syntax...\n * @extends {React.Components<Props, State>}\n * createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object\n * to pre-process meta data of each componnet.\n * - Wraps each child in a component with PConnect\n * - Process all actions and make them avaiable in props\n * - Filters all properties in metadata and keeps them\n * __internal for re-render process through connect\n */\nclass PConnect extends Component {\n constructor(props) {\n super(props);\n const { getPConnect } = this.props;\n this.state = {\n hasError: false\n };\n\n this.eventHandler = this.eventHandler.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n\n this.c11nEnv = getPConnect();\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.Control = getComponent(this.c11nEnv);\n this.actionsAPI = this.c11nEnv.getActionsApi();\n\n this.processActions(this.c11nEnv);\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidMount() {\n this.c11nEnv.addFormField();\n setVisibilityForList(this.c11nEnv, true);\n }\n\n componentDidCatch(error, info) {\n // eslint-disable-next-line no-console\n console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);\n }\n\n componentWillUnmount() {\n if (this.c11nEnv.removeFormField) {\n this.c11nEnv.removeFormField();\n setVisibilityForList(this.c11nEnv, false);\n }\n }\n\n /*\n * processActions to see all actions in meta and adds event in props.\n * Attaches common handler (eventHandler) for all actions.\n */\n processActions() {\n if (this.c11nEnv.isEditable()) {\n this.c11nEnv.setAction('onChange', this.changeHandler);\n this.c11nEnv.setAction('onBlur', this.eventHandler);\n }\n }\n\n // Using separate handle for change as in case of dropdown, native click is mapped to react change\n changeHandler(event) {\n this.actionsAPI.changeHandler(this.c11nEnv, event);\n // getActionProcessor().changeHandler(this.c11nEnv, event);\n }\n\n eventHandler(event) {\n this.actionsAPI.eventHandler(this.c11nEnv, event);\n // getActionProcessor().eventHandler(this.c11nEnv, event);\n }\n\n createChildren() {\n const { getPConnect } = this.props;\n if (getPConnect().hasChildren() && getPConnect().getChildren()) {\n return (\n getPConnect()\n .getChildren()\n // eslint-disable-next-line react/no-array-index-key\n .map((childProps, index) => <PConnect key={`${this.getKey(childProps)}_${index}`} {...childProps} />)\n );\n }\n return null;\n }\n\n getKey(props = this.props) {\n const { getPConnect } = props;\n const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();\n let key = !viewName ? createUID() : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;\n\n // In the case of pyDetails the key must be unique for each instance\n if (viewName && viewName.toUpperCase() === 'PYDETAILS') {\n key += `!${getPConnect().getCaseInfo().getID()}`;\n }\n\n return key.toUpperCase();\n }\n\n render() {\n const { hasError } = this.state;\n const { getPConnect, additionalProps, ...otherProps } = this.props;\n\n if (hasError) {\n // You can render any custom fallback UI\n // console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);\n return <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />;\n }\n\n const props = this.c11nEnv.getConfigProps();\n const actions = this.c11nEnv.getActions();\n const finalProps = {\n ...props,\n getPConnect,\n ...actions,\n additionalProps,\n ...otherProps\n };\n\n // If the new component is a reference node then mark with a unique key\n if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {\n finalProps.key = this.getKey();\n }\n\n // console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);\n\n return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;\n }\n}\n// eslint-disable-next-line react/static-property-placement\nPConnect.propTypes = {\n // __internal: PropTypes.object.isRequired,\n // meta: PropTypes.object.isRequired,\n // configObject: PropTypes.object.isRequired,\n getPConnect: PropTypes.func.isRequired,\n additionalProps: PropTypes.shape({\n noLabel: PropTypes.bool,\n readOnly: PropTypes.bool\n }),\n validatemessage: PropTypes.string\n};\n\n// eslint-disable-next-line react/static-property-placement\nPConnect.defaultProps = {\n additionalProps: {},\n validatemessage: ''\n};\n\n// Move these into SdkConstellationReady so PCore is available\ndocument.addEventListener('SdkConstellationReady', () => {\n PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {\n return createElement(PConnect, {\n ...c11nEnv,\n ...c11nEnv.getPConnect().getConfigProps(),\n ...c11nEnv.getPConnect().getActions(),\n ...{ additionalProps }\n });\n });\n\n PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {\n const promises = [];\n componentNames.forEach(comp => {\n if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {\n if (!ComponentMap[comp]) {\n const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;\n promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));\n } else {\n if (ComponentMap[comp].modules && ComponentMap[comp].modules.length) {\n ComponentMap[comp].modules.forEach(module => {\n LazyComponentMap[comp] = module;\n });\n }\n if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {\n ComponentMap[comp].scripts.forEach(script => {\n promises.push(PCore.getAssetLoader().getLoader()(script, 'script'));\n });\n }\n }\n }\n });\n /* Promise.all rejects or accepts all or none. This causes entire component loader to fail\n in case there is a single failure.\n Using allSettled to allow Promise to be resolved even if there are failed components\n Note : This is a liberty taken at component loader and unwise to be used at\n asset loader which will still use Promise.all\n */\n await Promise.allSettled(promises);\n });\n});\n\n/**\n *\n * @param {*} declarative\n * @returns {React.Components<Props, State>}\n\n */\nconst createPConnectComponent = () => {\n return PConnect;\n};\n\nexport default createPConnectComponent;\n\n/* These APIs need to be exposed for authoring bridge\nWill be removed when pxbootstrap and constellation_bridge is cleaned up\nto use single bootstrap file from constellation */\n// window.authoringUtils = {\n// createElement,\n// render,\n// unmountComponentAtNode,\n// LazyComponentMap\n// };\n"]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface AlertBannerProps {
|
|
3
2
|
id: string;
|
|
4
3
|
variant: string;
|
|
5
4
|
messages: string[];
|
|
6
5
|
onDismiss?: any;
|
|
7
6
|
}
|
|
8
|
-
export default function AlertBanner(props: AlertBannerProps): JSX.Element;
|
|
7
|
+
export default function AlertBanner(props: AlertBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=AlertBanner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AlertBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IAExB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AASD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAmB1D"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import './Banner.css';
|
|
3
2
|
interface BannerProps {
|
|
4
3
|
a: any;
|
|
@@ -13,6 +12,6 @@ interface BannerProps {
|
|
|
13
12
|
};
|
|
14
13
|
variant: any;
|
|
15
14
|
}
|
|
16
|
-
export default function Banner(props: BannerProps): JSX.Element;
|
|
15
|
+
export default function Banner(props: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
export {};
|
|
18
17
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAC;AAKtB,UAAU,WAAW;IAEnB,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,GAAG,CAAC;IACP,MAAM,EAAE;QACN,OAAO,EAAE,GAAG,CAAC;QACb,eAAe,EAAE,GAAG,CAAC;QACrB,KAAK,EAAE,GAAG,CAAC;QACX,OAAO,EAAE,GAAG,CAAC;QACb,eAAe,EAAE,GAAG,CAAC;QACrB,SAAS,EAAE,GAAG,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,GAAG,CAAC;CACd;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,2CA4BhD"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import './CaseSummaryFields.css';
|
|
3
2
|
interface CaseSummaryFieldsProps {
|
|
4
3
|
status?: string;
|
|
5
4
|
showStatus?: boolean;
|
|
6
5
|
theFields: any[] | any | never;
|
|
7
6
|
}
|
|
8
|
-
export default function CaseSummaryFields(props: CaseSummaryFieldsProps): JSX.Element;
|
|
7
|
+
export default function CaseSummaryFields(props: CaseSummaryFieldsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=CaseSummaryFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":"AASA,OAAO,yBAAyB,CAAC;AAMjC,UAAU,sBAAsB;IAE9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,KAAK,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CA8NtE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface DetailsFieldsProps {
|
|
3
2
|
fields: any[];
|
|
4
3
|
}
|
|
5
|
-
export default function DetailsFields(props: DetailsFieldsProps): JSX.Element;
|
|
4
|
+
export default function DetailsFields(props: DetailsFieldsProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
|
7
6
|
//# sourceMappingURL=DetailsFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":"AAWA,UAAU,kBAAkB;IAE1B,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAwBD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAsG9D"}
|
|
@@ -4,6 +4,6 @@ interface FieldGroupProps {
|
|
|
4
4
|
collapsible?: boolean;
|
|
5
5
|
instructions?: string;
|
|
6
6
|
}
|
|
7
|
-
export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>): JSX.Element;
|
|
7
|
+
export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=FieldGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAQpD,UAAU,eAAe;IAEvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4BD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAQpD,UAAU,eAAe;IAEvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4BD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,2CAsC3E"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface FieldGroupListProps {
|
|
3
2
|
items: any[] | any;
|
|
4
3
|
onDelete: any;
|
|
5
4
|
onAdd: any;
|
|
6
5
|
}
|
|
7
|
-
export default function FieldGroupList(props: FieldGroupListProps): JSX.Element;
|
|
6
|
+
export default function FieldGroupList(props: FieldGroupListProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=FieldGroupList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldGroupList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":"AAQA,UAAU,mBAAmB;IAE3B,KAAK,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CA0ChE"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface FieldValueListProps {
|
|
3
2
|
name?: string;
|
|
4
3
|
value: any;
|
|
5
4
|
variant?: string;
|
|
5
|
+
isHtml?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export default function FieldValueList(props: FieldValueListProps): JSX.Element;
|
|
7
|
+
export default function FieldValueList(props: FieldValueListProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=FieldValueList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldValueList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldValueList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":"AAMA,UAAU,mBAAmB;IAE3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAmCD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAqChE"}
|
|
@@ -32,14 +32,16 @@ function formatItemValue(value) {
|
|
|
32
32
|
return formattedVal;
|
|
33
33
|
}
|
|
34
34
|
export default function FieldValueList(props) {
|
|
35
|
-
const { name, value, variant = 'inline' } = props;
|
|
35
|
+
const { name, value, variant = 'inline', isHtml = false } = props;
|
|
36
36
|
const classes = useStyles();
|
|
37
37
|
function getGridItemLabel() {
|
|
38
38
|
return (_jsx(Grid, { item: true, xs: variant === 'stacked' ? 12 : 6, className: variant === 'stacked' ? classes.noPaddingBottom : '', children: _jsx(Typography, { variant: 'body2', component: 'span', className: `${classes.fieldLabel}`, children: name }) }));
|
|
39
39
|
}
|
|
40
40
|
function getGridItemValue() {
|
|
41
41
|
const formattedValue = formatItemValue(value);
|
|
42
|
-
return (_jsx(Grid, { item: true, xs: variant === 'stacked' ? 12 : 6, className: variant === 'stacked' ? classes.noPaddingTop : '', children:
|
|
42
|
+
return (_jsx(Grid, { item: true, xs: variant === 'stacked' ? 12 : 6, className: variant === 'stacked' ? classes.noPaddingTop : '', children: isHtml ? (
|
|
43
|
+
// eslint-disable-next-line react/no-danger
|
|
44
|
+
_jsx("div", { dangerouslySetInnerHTML: { __html: formattedValue } })) : (_jsx(Typography, { variant: variant === 'stacked' ? 'h6' : 'body2', component: 'span', className: classes.fieldValue, children: formattedValue })) }));
|
|
43
45
|
}
|
|
44
46
|
return (_jsxs(Grid, { container: true, spacing: 4, justifyContent: 'space-between', children: [getGridItemLabel(), getGridItemValue()] }));
|
|
45
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAYtD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC/B;IACD,UAAU,EAAE;QACV,UAAU,EAAE,GAAG;QACf,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS;KACpC;IACD,UAAU,EAAE;QACV,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;KAClC;IACD,YAAY,EAAE;QACZ,UAAU,EAAE,cAAc;KAC3B;IACD,eA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AAK,uBAAuB,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAI,CAC7D,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAE,OAAO,CAAC,UAAU,YACxG,cAAc,GACJ,CACd,GACI,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,cAAc,EAAC,eAAe,aACvD,gBAAgB,EAAE,EAClB,gBAAgB,EAAE,IACd,CACR,CAAC;AACJ,CAAC","sourcesContent":["import Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\n// FieldValueList is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface FieldValueListProps {\n // If any, enter additional props that only exist on this component\n name?: string;\n value: any;\n variant?: string;\n isHtml?: boolean;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n fieldLabel: {\n fontWeight: 400,\n color: theme.palette.text.secondary\n },\n fieldValue: {\n color: theme.palette.text.primary\n },\n noPaddingTop: {\n paddingTop: '0 !important'\n },\n noPaddingBottom: {\n paddingBottom: '0 !important'\n }\n}));\n\nfunction formatItemValue(value) {\n let formattedVal = value;\n\n // if the value is undefined or an empty string, we want to display it as \"---\"\n if (formattedVal === undefined || formattedVal === '') {\n formattedVal = '---';\n }\n\n return formattedVal;\n}\n\nexport default function FieldValueList(props: FieldValueListProps) {\n const { name, value, variant = 'inline', isHtml = false } = props;\n const classes = useStyles();\n\n function getGridItemLabel() {\n return (\n <Grid item xs={variant === 'stacked' ? 12 : 6} className={variant === 'stacked' ? classes.noPaddingBottom : ''}>\n <Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>\n {name}\n </Typography>\n </Grid>\n );\n }\n\n function getGridItemValue() {\n const formattedValue = formatItemValue(value);\n\n return (\n <Grid item xs={variant === 'stacked' ? 12 : 6} className={variant === 'stacked' ? classes.noPaddingTop : ''}>\n {isHtml ? (\n // eslint-disable-next-line react/no-danger\n <div dangerouslySetInnerHTML={{ __html: formattedValue }} />\n ) : (\n <Typography variant={variant === 'stacked' ? 'h6' : 'body2'} component='span' className={classes.fieldValue}>\n {formattedValue}\n </Typography>\n )}\n </Grid>\n );\n }\n\n return (\n <Grid container spacing={4} justifyContent='space-between'>\n {getGridItemLabel()}\n {getGridItemValue()}\n </Grid>\n );\n}\n"]}
|