@pega/react-sdk-components 23.1.12 → 24.2.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 +137 -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/AlertBanner/AlertBanner.js +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.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/Banner/Banner.js +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +1 -2
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +13 -13
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.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/DetailsFields/DetailsFields.js +4 -4
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +4 -4
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.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/FieldGroupList/FieldGroupList.js +4 -4
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +1 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +5 -5
- 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/Operator/Operator.js +6 -6
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +2 -2
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +3 -2
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.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/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -2
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +4 -4
- package/lib/components/field/AutoComplete/AutoComplete.js.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 +4 -2
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +1 -2
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +4 -4
- 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 +20 -9
- 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/Date/Date.js +18 -9
- package/lib/components/field/Date/Date.js.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/DateTime/DateTime.js +30 -8
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +2 -3
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +18 -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/Dropdown/Dropdown.js +3 -3
- package/lib/components/field/Dropdown/Dropdown.js.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/Email/Email.js +21 -5
- package/lib/components/field/Email/Email.js.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/Group/Group.js +2 -2
- package/lib/components/field/Group/Group.js.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/Integer/Integer.js +17 -6
- package/lib/components/field/Integer/Integer.js.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}/Multiselect.js +12 -8
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -0
- package/lib/components/field/Multiselect/index.d.ts.map +1 -0
- package/lib/components/field/{MultiSelect → Multiselect}/index.js.map +1 -1
- package/lib/components/field/{MultiSelect → Multiselect}/utils.d.ts.map +1 -1
- package/lib/components/field/{MultiSelect → Multiselect}/utils.js.map +1 -1
- 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 +18 -9
- 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 +16 -10
- 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/RadioButtons/RadioButtons.js +3 -3
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.js +1 -1
- 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 +4 -2
- 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/SemanticLink/SemanticLink.js +4 -4
- package/lib/components/field/SemanticLink/SemanticLink.js.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/TextArea/TextArea.js +20 -4
- package/lib/components/field/TextArea/TextArea.js.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/TextContent/TextContent.js +1 -1
- package/lib/components/field/TextContent/TextContent.js.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/TextInput/TextInput.js +2 -2
- package/lib/components/field/TextInput/TextInput.js.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/Time/Time.js +30 -7
- package/lib/components/field/Time/Time.js.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/URL/URL.js +19 -4
- package/lib/components/field/URL/URL.js.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 +9 -2
- 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/field-group-utils.js +2 -2
- package/lib/components/helpers/field-group-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/simpleTableHelpers.js +1 -1
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- 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/ActionButtons/ActionButtons.js +3 -3
- package/lib/components/infra/ActionButtons/ActionButtons.js.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 +30 -6
- 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 +9 -7
- 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/ListViewActionButtons/ListViewActionButtons.js +7 -4
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.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/ModalViewContainer/ModalViewContainer.js +7 -7
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.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/ViewContainer/ViewContainer.js +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.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 +2 -2
- 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/DashboardFilter/filterUtils.js +2 -2
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +8 -4
- 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 +2 -2
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +11 -6
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +1 -0
- 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 +24 -16
- 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/Region/Region.d.ts +1 -1
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +5 -6
- package/lib/components/infra/RootContainer/RootContainer.js.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/Stages/Stages.js +4 -4
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +4 -3
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.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/VerticalTabs/VerticalTabs/VerticalTabs.js +2 -2
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +2 -1
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +32 -2
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +3 -1
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +29 -6
- package/lib/components/template/AppShell/AppShell.js.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 +7 -7
- 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 +7 -7
- 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/Confirmation/Confirmation.js +2 -1
- package/lib/components/template/Confirmation/Confirmation.js.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 +3 -3
- 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 +3 -3
- 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/DetailsSubTabs/DetailsSubTabs.js +3 -3
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.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 +3 -3
- 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 +3 -3
- 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/Details/DynamicTabs/DynamicTabs.js +4 -3
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.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 +11 -3
- 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/InlineDashboard/InlineDashboard.js +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.js.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 +62 -67
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/utils.js +1 -1
- package/lib/components/template/ListView/utils.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 +3 -3
- 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/OneColumn/OneColumn.js +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -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 +2 -1
- 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 +36 -24
- 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/SubTabs/SubTabs.js +2 -2
- package/lib/components/template/SubTabs/SubTabs.js.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/TwoColumn/TwoColumn.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.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/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.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 +3 -3
- 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/template/WssNavBar/WssNavBar.js +9 -9
- package/lib/components/template/WssNavBar/WssNavBar.js.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/AppAnnouncement/AppAnnouncement.js +2 -2
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.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 +8 -5
- 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/CaseHistory/CaseHistory.js +8 -7
- package/lib/components/widget/CaseHistory/CaseHistory.js.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/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.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 +4 -4
- 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/Followers/Followers.js +2 -2
- package/lib/components/widget/Followers/Followers.js.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/SummaryItem/SummaryItem.js +3 -3
- package/lib/components/widget/SummaryItem/SummaryItem.js.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/components/widget/ToDo/ToDo.js +59 -16
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +19 -7
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useFocusFirstField.d.ts +7 -0
- package/lib/hooks/useFocusFirstField.d.ts.map +1 -0
- package/lib/hooks/useFocusFirstField.js +20 -0
- package/lib/hooks/useFocusFirstField.js.map +1 -0
- package/lib/hooks/useScrolltoTop.d.ts +7 -0
- package/lib/hooks/useScrolltoTop.d.ts.map +1 -0
- package/lib/hooks/useScrolltoTop.js +13 -0
- package/lib/hooks/useScrolltoTop.js.map +1 -0
- package/lib/sdk-pega-component-map.d.ts +1 -1
- package/lib/sdk-pega-component-map.js +1 -1
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/theme.d.ts +11 -0
- package/lib/theme.d.ts.map +1 -0
- package/lib/theme.js +31 -0
- package/lib/theme.js.map +1 -0
- package/package.json +1 -1
- package/lib/components/field/MultiSelect/Multiselect.d.ts +0 -3
- package/lib/components/field/MultiSelect/Multiselect.d.ts.map +0 -1
- package/lib/components/field/MultiSelect/Multiselect.js.map +0 -1
- package/lib/components/field/MultiSelect/index.d.ts.map +0 -1
- /package/lib/components/field/{MultiSelect → Multiselect}/index.d.ts +0 -0
- /package/lib/components/field/{MultiSelect → Multiselect}/index.js +0 -0
- /package/lib/components/field/{MultiSelect → Multiselect}/utils.d.ts +0 -0
- /package/lib/components/field/{MultiSelect → Multiselect}/utils.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataReference.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC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M,WAAW,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAChD,IAAI,WAAW,EAAE,IAAI,KAAK,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE;YAChE,gBAAgB,GAAG,CAAC,mBAAmB,EAAE,GAAI,QAA2B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACpF;aAAM;YACL,gBAAgB,GAAG,CAAC,mBAAmB,CAAC,CAAC;SAC1C;KACF;IAED,OAAO,gBAAgB,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACrC,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAC5B,CAAC,CAAC,CAAC,CACF,wBACG,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAC7B,4BAAG,KAAK,GAAI,CACb,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, ReactElement, useEffect, useMemo, useState } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\n// ReferenceProps can't be used until getComponentConfig() is NOT private\ninterface DataReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n label: string;\n showLabel: any;\n displayMode: string;\n allowAndPersistChangesInReviewMode: boolean;\n referenceType: string;\n selectionMode: string;\n displayAs: string;\n ruleClass: string;\n parameters: string[]; // need to fix\n hideLabel: boolean;\n}\n\nconst SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\nexport default function DataReference(props: PropsWithChildren<DataReferenceProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');\n const MultiReferenceReadonly = getComponentFromMap('MultiReferenceReadOnly');\n\n const {\n children,\n getPConnect,\n label,\n showLabel,\n displayMode,\n allowAndPersistChangesInReviewMode,\n referenceType,\n selectionMode,\n displayAs,\n ruleClass,\n parameters,\n hideLabel\n } = props;\n let childrenToRender = children as ReactElement[];\n const pConn = getPConnect();\n const [dropDownDataSource, setDropDownDataSource] = useState(null);\n const propsToUse: any = { label, showLabel, ...pConn.getInheritedProps() };\n if (propsToUse.showLabel === false) {\n propsToUse.label = '';\n }\n const rawViewMetadata: any = pConn.getRawMetadata();\n const viewName = rawViewMetadata.name;\n const [firstChildMeta] = rawViewMetadata.children;\n const refList = rawViewMetadata.config.referenceList;\n const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');\n let propName;\n const isDisplayModeEnabled = ['LABELS_LEFT', 'STACKED_LARGE_VAL'].includes(displayMode);\n let firstChildPConnect;\n\n /* Only for dropdown when it has param use data api to get the data back and add it to datasource */\n useEffect(() => {\n if (firstChildMeta?.type === 'Dropdown' && rawViewMetadata.config?.parameters) {\n const { value, key, text } = firstChildMeta.config.datasource.fields;\n (\n PCore.getDataApiUtils().getData(\n refList,\n {\n dataViewParameters: parameters\n } as any,\n ''\n ) as Promise<any>\n )\n .then(res => {\n if (res.data.data !== null) {\n const ddDataSource = res.data.data\n .map(listItem => ({\n key: listItem[key.split(' .', 2)[1]],\n text: listItem[text.split(' .', 2)[1]],\n value: listItem[value.split(' .', 2)[1]]\n }))\n .filter(item => item.key);\n // Filtering out undefined entries that will break preview\n setDropDownDataSource(ddDataSource);\n } else {\n const ddDataSource: any = [];\n setDropDownDataSource(ddDataSource);\n }\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.error(err?.stack);\n return Promise.resolve({\n data: { data: [] }\n });\n });\n }\n }, [firstChildMeta, rawViewMetadata, parameters]);\n\n if (firstChildMeta?.type !== 'Region') {\n firstChildPConnect = getPConnect().getChildren()?.[0].getPConnect;\n /* remove refresh When condition from those old view so that it will not be used for runtime */\n if (firstChildMeta.config?.readOnly) {\n delete firstChildMeta.config.readOnly;\n }\n if (firstChildMeta?.type === 'Dropdown') {\n firstChildMeta.config.datasource.source = rawViewMetadata.config?.parameters\n ? dropDownDataSource\n : '@DATASOURCE '.concat(refList).concat('.pxResults');\n } else if (firstChildMeta?.type === 'AutoComplete') {\n firstChildMeta.config.datasource = refList;\n\n /* Insert the parameters to the component only if present */\n if (rawViewMetadata.config?.parameters) {\n firstChildMeta.config.parameters = parameters;\n }\n }\n // set displayMode conditionally\n if (!canBeChangedInReviewMode) {\n firstChildMeta.config.displayMode = displayMode;\n }\n if (firstChildMeta.type === 'SimpleTableSelect' && selectionMode === SELECTION_MODE.MULTI) {\n propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.selectionList);\n } else {\n propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.value);\n }\n }\n\n const handleSelection = event => {\n const caseKey = pConn.getCaseInfo().getKey();\n const refreshOptions = { autoDetectRefresh: true };\n if (canBeChangedInReviewMode && pConn.getValue('__currentPageTabViewName', '')) {\n // 2nd arg empty string until typedef marked correctly\n getPConnect().getActionsApi().refreshCaseView(caseKey, pConn.getValue('__currentPageTabViewName', ''), null, refreshOptions); // 2nd arg empty string until typedef marked correctly\n PCore.getDeferLoadManager().refreshActiveComponents(pConn.getContextName());\n } else {\n const pgRef = pConn.getPageReference().replace('caseInfo.content', '');\n getPConnect().getActionsApi().refreshCaseView(caseKey, viewName, pgRef, refreshOptions);\n }\n\n // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value\n const propValue = event?.id || event?.target.value;\n if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {\n (PCore.getDataApiUtils().getCaseEditLock(caseKey, '') as Promise<any>).then(caseResponse => {\n const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');\n let curr = {};\n const commitData = curr;\n\n pageTokens.forEach(el => {\n if (el !== '') {\n curr[el] = {};\n curr = curr[el];\n }\n });\n\n // expecting format like {Customer: {pyID:\"C-100\"}}\n const propArr = propName.split('.');\n propArr.forEach((element, idx) => {\n if (idx + 1 === propArr.length) {\n curr[element] = propValue;\n } else {\n curr[element] = {};\n curr = curr[element];\n }\n });\n\n (\n PCore.getDataApiUtils().updateCaseEditFieldsData(\n caseKey,\n { [caseKey]: commitData },\n caseResponse.headers.etag,\n pConn.getContextName()\n ) as Promise<any>\n ).then(response => {\n PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), response.data.data.caseInfo.lastUpdateTime);\n PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);\n });\n });\n }\n };\n\n // Re-create first child with overridden props\n // Memoized child in order to stop unmount and remount of the child component when data reference\n // rerenders without any actual change\n const recreatedFirstChild = useMemo(() => {\n const { type, config } = firstChildMeta;\n if (firstChildMeta?.type !== 'Region') {\n pConn.clearErrorMessages({\n // Need to add empty string for category and context to match typdef\n property: propName,\n category: '',\n context: ''\n });\n if (!canBeChangedInReviewMode && isDisplayModeEnabled && selectionMode === SELECTION_MODE.SINGLE) {\n return (\n <SingleReferenceReadonly\n config={config}\n getPConnect={firstChildPConnect}\n label={propsToUse.label}\n type={type}\n displayAs={displayAs}\n displayMode={displayMode}\n ruleClass={ruleClass}\n referenceType={referenceType}\n hideLabel={hideLabel}\n dataRelationshipContext={rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null}\n />\n );\n }\n\n if (isDisplayModeEnabled && selectionMode === SELECTION_MODE.MULTI) {\n return <MultiReferenceReadonly config={config} getPConnect={firstChildPConnect} label={propsToUse.label} hideLabel={hideLabel} />;\n }\n\n // In the case of a datasource with parameters you cannot load the dropdown before the parameters\n if (type === 'Dropdown' && rawViewMetadata.config?.parameters && dropDownDataSource === null) {\n return null;\n }\n\n return firstChildPConnect().createComponent(\n {\n type,\n config: {\n ...config,\n required: propsToUse.required,\n visibility: propsToUse.visibility,\n disabled: propsToUse.disabled,\n label: propsToUse.label,\n viewName: getPConnect().getCurrentView(),\n parameters: rawViewMetadata.config.parameters,\n readOnly: false,\n localeReference: rawViewMetadata.config.localeReference,\n ...(selectionMode === SELECTION_MODE.SINGLE ? { referenceType } : ''),\n dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null,\n hideLabel,\n onRecordChange: handleSelection\n }\n },\n '',\n '',\n {}\n ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);\n }\n }, [firstChildMeta.config?.datasource?.source, parameters, dropDownDataSource, propsToUse.required, propsToUse.disabled]);\n\n // Only include the views region for rendering when it has content\n if (firstChildMeta?.type !== 'Region') {\n const viewsRegion = rawViewMetadata.children[1];\n if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {\n childrenToRender = [recreatedFirstChild, ...(children as ReactElement[]).slice(1)];\n } else {\n childrenToRender = [recreatedFirstChild];\n }\n }\n\n return childrenToRender.length === 1 ? (\n childrenToRender[0] ?? null\n ) : (\n <div>\n {childrenToRender.map(child => (\n <>{child}</>\n ))}\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DataReference.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAmC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAkBhF,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAA4C;IAChF,8EAA8E;IAC9E,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,yBAAyB,CAAC,CAAC;IAC/E,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,wBAAwB,CAAC,CAAC;IAE7E,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,SAAS,EACT,WAAW,EACX,kCAAkC,EAClC,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACV,GAAG,KAAK,CAAC;IACV,IAAI,gBAAgB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B,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAC7B,4BAAG,KAAK,GAAI,CACb,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, ReactElement, useEffect, useMemo, useState } from 'react';\n\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../types/PConnProps';\n\n// ReferenceProps can't be used until getComponentConfig() is NOT private\ninterface DataReferenceProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n label: string;\n showLabel: any;\n displayMode: string;\n allowAndPersistChangesInReviewMode: boolean;\n referenceType: string;\n selectionMode: string;\n displayAs: string;\n ruleClass: string;\n parameters: string[]; // need to fix\n hideLabel: boolean;\n}\n\nconst SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\nexport default function DataReference(props: PropsWithChildren<DataReferenceProps>) {\n // Get emitted components from map (so we can get any override that may exist)\n const SingleReferenceReadonly = getComponentFromMap('SingleReferenceReadOnly');\n const MultiReferenceReadonly = getComponentFromMap('MultiReferenceReadOnly');\n\n const {\n children,\n getPConnect,\n label,\n showLabel,\n displayMode,\n allowAndPersistChangesInReviewMode,\n referenceType,\n selectionMode,\n displayAs,\n ruleClass,\n parameters,\n hideLabel\n } = props;\n let childrenToRender = children as ReactElement[];\n const pConn = getPConnect();\n const [dropDownDataSource, setDropDownDataSource] = useState(null);\n const propsToUse: any = { label, showLabel, ...pConn.getInheritedProps() };\n if (propsToUse.showLabel === false) {\n propsToUse.label = '';\n }\n const rawViewMetadata: any = pConn.getRawMetadata();\n const viewName = rawViewMetadata.name;\n const [firstChildMeta] = rawViewMetadata.children;\n const refList = rawViewMetadata.config.referenceList;\n const canBeChangedInReviewMode = allowAndPersistChangesInReviewMode && (displayAs === 'autocomplete' || displayAs === 'dropdown');\n let propName;\n const isDisplayModeEnabled = ['STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode);\n let firstChildPConnect;\n\n /* Only for dropdown when it has param use data api to get the data back and add it to datasource */\n useEffect(() => {\n if (firstChildMeta?.type === 'Dropdown' && rawViewMetadata.config?.parameters) {\n const { value, key, text } = firstChildMeta.config.datasource.fields;\n (\n PCore.getDataApiUtils().getData(\n refList,\n {\n dataViewParameters: parameters\n } as any,\n ''\n ) as Promise<any>\n )\n .then(res => {\n if (res.data.data !== null) {\n const ddDataSource = res.data.data\n .map(listItem => ({\n key: listItem[key.split(' .', 2)[1]],\n text: listItem[text.split(' .', 2)[1]],\n value: listItem[value.split(' .', 2)[1]]\n }))\n .filter(item => item.key);\n // Filtering out undefined entries that will break preview\n setDropDownDataSource(ddDataSource);\n } else {\n const ddDataSource: any = [];\n setDropDownDataSource(ddDataSource);\n }\n })\n .catch(err => {\n // eslint-disable-next-line no-console\n console.error(err?.stack);\n return Promise.resolve({\n data: { data: [] }\n });\n });\n }\n }, [firstChildMeta, rawViewMetadata, parameters]);\n\n if (firstChildMeta?.type !== 'Region') {\n firstChildPConnect = getPConnect().getChildren()?.[0].getPConnect;\n /* remove refresh When condition from those old view so that it will not be used for runtime */\n if (firstChildMeta.config?.readOnly) {\n delete firstChildMeta.config.readOnly;\n }\n if (firstChildMeta?.type === 'Dropdown') {\n firstChildMeta.config.datasource.source = rawViewMetadata.config?.parameters\n ? dropDownDataSource\n : '@DATASOURCE '.concat(refList).concat('.pxResults');\n } else if (firstChildMeta?.type === 'AutoComplete') {\n firstChildMeta.config.datasource = refList;\n\n /* Insert the parameters to the component only if present */\n if (rawViewMetadata.config?.parameters) {\n firstChildMeta.config.parameters = parameters;\n }\n }\n // set displayMode conditionally\n if (!canBeChangedInReviewMode) {\n firstChildMeta.config.displayMode = displayMode;\n }\n if (firstChildMeta.type === 'SimpleTableSelect' && selectionMode === SELECTION_MODE.MULTI) {\n propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.selectionList);\n } else {\n propName = PCore.getAnnotationUtils().getPropertyName(firstChildMeta.config.value);\n }\n }\n\n const handleSelection = event => {\n const caseKey = pConn.getCaseInfo().getKey();\n const refreshOptions = { autoDetectRefresh: true };\n if (canBeChangedInReviewMode && pConn.getValue('__currentPageTabViewName', '')) {\n // 2nd arg empty string until typedef marked correctly\n getPConnect().getActionsApi().refreshCaseView(caseKey, pConn.getValue('__currentPageTabViewName', ''), '', refreshOptions); // 2nd arg empty string until typedef marked correctly\n PCore.getDeferLoadManager().refreshActiveComponents(pConn.getContextName());\n } else {\n const pgRef = pConn.getPageReference().replace('caseInfo.content', '');\n getPConnect().getActionsApi().refreshCaseView(caseKey, viewName, pgRef, refreshOptions);\n }\n\n // AutoComplete sets value on event.id whereas Dropdown sets it on event.target.value\n const propValue = event?.id || event?.target.value;\n if (propValue && canBeChangedInReviewMode && isDisplayModeEnabled) {\n (PCore.getDataApiUtils().getCaseEditLock(caseKey, '') as Promise<any>).then(caseResponse => {\n const pageTokens = pConn.getPageReference().replace('caseInfo.content', '').split('.');\n let curr = {};\n const commitData = curr;\n\n pageTokens.forEach(el => {\n if (el !== '') {\n curr[el] = {};\n curr = curr[el];\n }\n });\n\n // expecting format like {Customer: {pyID:\"C-100\"}}\n const propArr = propName.split('.');\n propArr.forEach((element, idx) => {\n if (idx + 1 === propArr.length) {\n curr[element] = propValue;\n } else {\n curr[element] = {};\n curr = curr[element];\n }\n });\n\n (\n PCore.getDataApiUtils().updateCaseEditFieldsData(\n caseKey,\n { [caseKey]: commitData },\n caseResponse.headers.etag,\n pConn.getContextName()\n ) as Promise<any>\n ).then(response => {\n PCore.getContainerUtils().updateParentLastUpdateTime(pConn.getContextName(), response.data.data.caseInfo.lastUpdateTime);\n PCore.getContainerUtils().updateRelatedContextEtag(pConn.getContextName(), response.headers.etag);\n });\n });\n }\n };\n\n // Re-create first child with overridden props\n // Memoized child in order to stop unmount and remount of the child component when data reference\n // rerenders without any actual change\n const recreatedFirstChild = useMemo(() => {\n const { type, config } = firstChildMeta;\n if (firstChildMeta?.type !== 'Region') {\n pConn.clearErrorMessages({\n // Need to add empty string for category and context to match typdef\n property: propName,\n category: '',\n context: ''\n });\n if (!canBeChangedInReviewMode && isDisplayModeEnabled && selectionMode === SELECTION_MODE.SINGLE) {\n return (\n <SingleReferenceReadonly\n config={config}\n getPConnect={firstChildPConnect}\n label={propsToUse.label}\n type={type}\n displayAs={displayAs}\n displayMode={displayMode}\n ruleClass={ruleClass}\n referenceType={referenceType}\n hideLabel={hideLabel}\n dataRelationshipContext={rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null}\n />\n );\n }\n\n if (isDisplayModeEnabled && selectionMode === SELECTION_MODE.MULTI) {\n return <MultiReferenceReadonly config={config} getPConnect={firstChildPConnect} label={propsToUse.label} hideLabel={hideLabel} />;\n }\n\n // In the case of a datasource with parameters you cannot load the dropdown before the parameters\n if (type === 'Dropdown' && rawViewMetadata.config?.parameters && dropDownDataSource === null) {\n return null;\n }\n\n return firstChildPConnect().createComponent(\n {\n type,\n config: {\n ...config,\n required: propsToUse.required,\n visibility: propsToUse.visibility,\n disabled: propsToUse.disabled,\n label: propsToUse.label,\n viewName: getPConnect().getCurrentView(),\n parameters: rawViewMetadata.config.parameters,\n readOnly: false,\n localeReference: rawViewMetadata.config.localeReference,\n ...(selectionMode === SELECTION_MODE.SINGLE ? { referenceType } : ''),\n dataRelationshipContext: rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null,\n hideLabel,\n onRecordChange: handleSelection\n }\n },\n '',\n '',\n {}\n ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);\n }\n }, [firstChildMeta.config?.datasource?.source, parameters, dropDownDataSource, propsToUse.required, propsToUse.disabled]);\n\n // Only include the views region for rendering when it has content\n if (firstChildMeta?.type !== 'Region') {\n const viewsRegion = rawViewMetadata.children[1];\n if (viewsRegion?.name === 'Views' && viewsRegion.children.length) {\n childrenToRender = [recreatedFirstChild, ...(children as ReactElement[]).slice(1)];\n } else {\n childrenToRender = [recreatedFirstChild];\n }\n }\n\n return childrenToRender.length === 1 ? (\n (childrenToRender[0] ?? null)\n ) : (\n <div>\n {childrenToRender.map(child => (\n <>{child}</>\n ))}\n </div>\n );\n}\n"]}
|
|
@@ -5,6 +5,6 @@ interface DefaultFormProps extends PConnProps {
|
|
|
5
5
|
NumCols: string;
|
|
6
6
|
instructions: string;
|
|
7
7
|
}
|
|
8
|
-
export default function DefaultForm(props: PropsWithChildren<DefaultFormProps>): JSX.Element;
|
|
8
|
+
export default function DefaultForm(props: PropsWithChildren<DefaultFormProps>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=DefaultForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultForm.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DefaultForm/DefaultForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAOzD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAQD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"DefaultForm.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DefaultForm/DefaultForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAOzD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAQD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,2CA0C7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/DefaultForm/utils/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,EAAE,GAO7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/DefaultForm/utils/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,EAAE,GAO7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,qBAgBhC,CAAC"}
|
|
@@ -15,12 +15,8 @@ export const getKeyForMappedField = field => {
|
|
|
15
15
|
.join('__');
|
|
16
16
|
}
|
|
17
17
|
const pConnect = field?.getPConnect?.();
|
|
18
|
-
if (pConnect?.meta
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
// Using label as a fallback if name is not defined.
|
|
22
|
-
if (pConnect?.meta?.type && pConnect?.meta?.config?.label) {
|
|
23
|
-
return `${pConnect.meta.type}_${pConnect.meta.config.label}`;
|
|
18
|
+
if (pConnect?.meta) {
|
|
19
|
+
return JSON.stringify(pConnect.meta);
|
|
24
20
|
}
|
|
25
21
|
return uuidv4();
|
|
26
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/template/DefaultForm/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,CAAC,MAAM,eAAe,GAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAClD,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;IAEjC,OAAO;QACL,UAAU,EAAE,WAAW,EAAE,CAAC,qBAAqB,EAAE;QACjD,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,EAAE;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK;aACT,GAAG,CAAC,IAAI,CAAC,EAAE;YACV,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAC;KACf;IAED,MAAM,QAAQ,GAAG,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC;IAExC,IAAI,QAAQ,EAAE,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/template/DefaultForm/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,CAAC,MAAM,eAAe,GAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE;IAClD,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;IAEjC,OAAO;QACL,UAAU,EAAE,WAAW,EAAE,CAAC,qBAAqB,EAAE;QACjD,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC,EAAE;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK;aACT,GAAG,CAAC,IAAI,CAAC,EAAE;YACV,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAC;KACf;IAED,MAAM,QAAQ,GAAG,KAAK,EAAE,WAAW,EAAE,EAAE,CAAC;IAExC,IAAI,QAAQ,EAAE,IAAI,EAAE;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;KACtC;IAED,OAAO,MAAM,EAAE,CAAC;AAClB,CAAC,CAAC","sourcesContent":["import { v4 as uuidv4 } from 'uuid';\n\nexport const mapStateToProps: any = (_, ownProps) => {\n const { getPConnect } = ownProps;\n\n return {\n visibility: getPConnect().getComputedVisibility(),\n getPConnect\n };\n};\n\nexport const getKeyForMappedField = field => {\n if (Array.isArray(field)) {\n return field\n .map(item => {\n return getKeyForMappedField(item);\n })\n .join('__');\n }\n\n const pConnect = field?.getPConnect?.();\n\n if (pConnect?.meta) {\n return JSON.stringify(pConnect.meta);\n }\n\n return uuidv4();\n};\n"]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnProps } from '../../../../types/PConnProps';
|
|
3
2
|
interface DetailsProps extends PConnProps {
|
|
4
3
|
label: string;
|
|
5
4
|
showLabel: boolean;
|
|
6
5
|
showHighlightedData: boolean;
|
|
7
6
|
}
|
|
8
|
-
export default function Details(props: DetailsProps): JSX.Element;
|
|
7
|
+
export default function Details(props: DetailsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=Details.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/Details/Details.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/Details/Details.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,UAAU,YAAa,SAAQ,UAAU;IAEvC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,EAAE,YAAY,2CA0DlD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createElement } from 'react';
|
|
3
|
-
import Grid from '@material
|
|
3
|
+
import Grid from '@mui/material/Grid';
|
|
4
4
|
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
5
|
import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
|
|
6
6
|
export default function Details(props) {
|
|
@@ -11,7 +11,7 @@ export default function Details(props) {
|
|
|
11
11
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
12
12
|
// Set display mode prop and re-create the children so this part of the dom tree renders
|
|
13
13
|
// in a readonly (display) mode instead of a editable
|
|
14
|
-
getPConnect().setInheritedProp('displayMode', '
|
|
14
|
+
getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
15
15
|
getPConnect().setInheritedProp('readOnly', true);
|
|
16
16
|
const children = getPConnect().getChildren().map((configObject, index) => createElement(createPConnectComponent(), {
|
|
17
17
|
...configObject,
|
|
@@ -29,7 +29,7 @@ export default function Details(props) {
|
|
|
29
29
|
field.type = 'TextInput';
|
|
30
30
|
field.config.displayAsStatus = true;
|
|
31
31
|
}
|
|
32
|
-
return getPConnect().createComponent(field, '',
|
|
32
|
+
return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
return (_jsxs(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '', children: [showHighlightedData && highlightedDataArr.length > 0 && (_jsx(Grid, { container: true, spacing: 1, style: { padding: '0 0 1em' }, children: highlightedDataArr.map((child, i) => (_jsx(Grid, { item: true, xs: 12, children: child }, `hf-${i + 1}`))) })), _jsx(Grid, { container: true, spacing: 1, children: children.map((child, i) => (_jsx(Grid, { item: true, xs: 12, children: child }, `r-${i + 1}`))) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Details.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/Details/Details.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"Details.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/Details/Details.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAUnF,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAmB;IACjD,8EAA8E;IAC9E,MAAM,UAAU,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAErD,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAErE,sEAAsE;IACtE,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,WAAW,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC;IAE9E,wFAAwF;IACxF,qDAAqD;IACrD,WAAW,EAAE,CAAC,gBAAgB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IAC9D,WAAW,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAI,WAAW,EAAE,CAAC,WAAW,EAAY,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,CAClF,aAAa,CAAC,uBAAuB,EAAE,EAAE;QACvC,GAAG,YAAY;QACf,oDAAoD;QACpD,GAAG,EAAE,KAAK,CAAC,QAAQ,EAAE;KACtB,CAAC,CACH,CAAC;IAEF,4GAA4G;IAC5G,IAAI,kBAAkB,GAAG,EAAE,CAAC;IAC5B,IAAI,mBAAmB,EAAE;QACvB,MAAM,EAAE,eAAe,GAAG,EAAE,EAAE,GAAI,WAAW,EAAE,CAAC,cAAc,EAAU,CAAC,MAAM,CAAC;QA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react';\nimport Grid from '@mui/material/Grid';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface DetailsProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n label: string;\n showLabel: boolean;\n showHighlightedData: boolean;\n}\n\nexport default function Details(props: DetailsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldGroup = getComponentFromMap('FieldGroup');\n\n const { label, showLabel, getPConnect, showHighlightedData } = props;\n\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };\n\n // Set display mode prop and re-create the children so this part of the dom tree renders\n // in a readonly (display) mode instead of a editable\n getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');\n getPConnect().setInheritedProp('readOnly', true);\n const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>\n createElement(createPConnectComponent(), {\n ...configObject,\n // eslint-disable-next-line react/no-array-index-key\n key: index.toString()\n })\n );\n\n // Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent\n let highlightedDataArr = [];\n if (showHighlightedData) {\n const { highlightedData = [] } = (getPConnect().getRawMetadata() as any).config;\n highlightedDataArr = highlightedData.map(field => {\n field.config.displayMode = 'STACKED_LARGE_VAL';\n\n // Mark as status display when using pyStatusWork\n if (field.config.value === '@P .pyStatusWork') {\n field.type = 'TextInput';\n field.config.displayAsStatus = true;\n }\n\n return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional\n });\n }\n\n return (\n <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>\n {showHighlightedData && highlightedDataArr.length > 0 && (\n <Grid container spacing={1} style={{ padding: '0 0 1em' }}>\n {highlightedDataArr.map((child, i) => (\n <Grid item xs={12} key={`hf-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n )}\n <Grid container spacing={1}>\n {children.map((child, i) => (\n <Grid item xs={12} key={`r-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n </FieldGroup>\n );\n}\n"]}
|
|
@@ -4,6 +4,6 @@ interface DetailsSubTabsProps extends PConnProps {
|
|
|
4
4
|
showLabel: boolean;
|
|
5
5
|
label: string;
|
|
6
6
|
}
|
|
7
|
-
export default function DetailsSubTabs(props: PropsWithChildren<DetailsSubTabsProps>): JSX.Element;
|
|
7
|
+
export default function DetailsSubTabs(props: PropsWithChildren<DetailsSubTabsProps>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=DetailsSubTabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsSubTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsSubTabs/DetailsSubTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAKzE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,UAAU,mBAAoB,SAAQ,UAAU;IAE9C,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"DetailsSubTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsSubTabs/DetailsSubTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAKzE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,UAAU,mBAAoB,SAAQ,UAAU;IAE9C,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,2CA4CnF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Children, useEffect, useState } from 'react';
|
|
3
|
-
import { Tab, Tabs
|
|
4
|
-
import { TabContext, TabPanel } from '@
|
|
3
|
+
import { Tab, Tabs } from '@mui/material';
|
|
4
|
+
import { TabContext, TabPanel } from '@mui/lab';
|
|
5
5
|
import { getTransientTabs, getVisibleTabs, tabClick } from '../../SubTabs/tabUtils';
|
|
6
6
|
export default function DetailsSubTabs(props) {
|
|
7
7
|
const { children = [], label, showLabel = true, getPConnect } = props;
|
|
@@ -23,6 +23,6 @@ export default function DetailsSubTabs(props) {
|
|
|
23
23
|
setCurrentTabId(index);
|
|
24
24
|
tabClick(index, availableTabs, currentTabId, setCurrentTabId, tabItems);
|
|
25
25
|
};
|
|
26
|
-
return (_jsxs(_Fragment, { children: [propsToUse.showLabel && _jsx(
|
|
26
|
+
return (_jsxs(_Fragment, { children: [propsToUse.showLabel && _jsx("h3", { children: propsToUse.label }), _jsxs(TabContext, { value: currentTabId.toString(), children: [_jsx(Tabs, { onChange: handleTabClick, value: currentTabId, children: tabItems.map((tab) => (_jsx(Tab, { label: tab.name, value: tab.id }, tab.id))) }), tabItems.map((tab) => (_jsx(TabPanel, { value: tab.id, tabIndex: +tab.id, children: _jsx("div", { children: tab.content ? tab.content : 'No content exists' }) }, tab.id)))] })] }));
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=DetailsSubTabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsSubTabs.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsSubTabs/DetailsSubTabs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAqB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,GAAG,EAAE,IAAI,EAA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EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;QAC7E,UAAU,CAAC,YAAY,CAAC,CAAC;IAC3B,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,MAAM,cAAc,GAAG,CAAC,EAAE,EAAE,KAAa,EAAE,EAAE;QAC3C,eAAe,CAAC,KAAK,CAAC,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC1E,CAAC,CAAC;IAEF,OAAO,CACL,8BACG,UAAU,CAAC,SAAS,IAAI,uBAAK,UAAU,CAAC,KAAK,GAAM,EACpD,MAAC,UAAU,IAAC,KAAK,EAAE,YAAY,CAAC,QAAQ,EAAE,aACxC,KAAC,IAAI,IAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,YAAY,YAChD,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAC1B,KAAC,GAAG,IAAc,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,IAAtC,GAAG,CAAC,EAAE,CAAoC,CACrD,CAAC,GACG,EAEN,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAQ,EAAE,EAAE,CAAC,CAC1B,KAAC,QAAQ,IAAc,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,YACrD,wBAAM,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,GAAO,IAD/C,GAAG,CAAC,EAAE,CAEV,CACZ,CAAC,IACS,IACZ,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import { Children, PropsWithChildren, useEffect, useState } from 'react';\nimport { Tab, Tabs } from '@mui/material';\nimport { TabContext, TabPanel } from '@mui/lab';\n\nimport { getTransientTabs, getVisibleTabs, tabClick } from '../../SubTabs/tabUtils';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface DetailsSubTabsProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showLabel: boolean;\n label: string;\n}\n\nexport default function DetailsSubTabs(props: PropsWithChildren<DetailsSubTabsProps>) {\n const { children = [], label, showLabel = true, getPConnect } = props;\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };\n\n const defaultTabIndex = 0;\n const deferLoadedTabs = Children.toArray(children)[0];\n let availableTabs = [];\n\n useEffect(() => {\n availableTabs = getVisibleTabs(deferLoadedTabs, 'detailsSubTabs');\n }, [availableTabs]);\n\n const [currentTabId, setCurrentTabId] = useState(defaultTabIndex.toString());\n\n const [tabItems, setTabitem] = useState([]);\n useEffect(() => {\n const tempTabItems = getTransientTabs(availableTabs, currentTabId, tabItems);\n setTabitem(tempTabItems);\n }, [currentTabId]);\n\n const handleTabClick = (id, index: string) => {\n setCurrentTabId(index);\n tabClick(index, availableTabs, currentTabId, setCurrentTabId, tabItems);\n };\n\n return (\n <>\n {propsToUse.showLabel && <h3>{propsToUse.label}</h3>}\n <TabContext value={currentTabId.toString()}>\n <Tabs onChange={handleTabClick} value={currentTabId}>\n {tabItems.map((tab: any) => (\n <Tab key={tab.id} label={tab.name} value={tab.id} />\n ))}\n </Tabs>\n\n {tabItems.map((tab: any) => (\n <TabPanel key={tab.id} value={tab.id} tabIndex={+tab.id}>\n <div>{tab.content ? tab.content : 'No content exists'}</div>\n </TabPanel>\n ))}\n </TabContext>\n </>\n );\n}\n"]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnProps } from '../../../../types/PConnProps';
|
|
3
2
|
interface DetailsThreeColumnProps extends PConnProps {
|
|
4
3
|
showLabel: boolean;
|
|
5
4
|
label: string;
|
|
6
5
|
showHighlightedData: boolean;
|
|
7
6
|
}
|
|
8
|
-
export default function DetailsThreeColumn(props: DetailsThreeColumnProps): JSX.Element;
|
|
7
|
+
export default function DetailsThreeColumn(props: DetailsThreeColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=DetailsThreeColumn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsThreeColumn.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DetailsThreeColumn.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,UAAU,uBAAwB,SAAQ,UAAU;IAElD,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA0DxE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createElement } from 'react';
|
|
3
|
-
import Grid from '@material
|
|
3
|
+
import Grid from '@mui/material/Grid';
|
|
4
4
|
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
5
|
import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
|
|
6
6
|
export default function DetailsThreeColumn(props) {
|
|
@@ -11,7 +11,7 @@ export default function DetailsThreeColumn(props) {
|
|
|
11
11
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
12
12
|
// Set display mode prop and re-create the children so this part of the dom tree renders
|
|
13
13
|
// in a readonly (display) mode instead of a editable
|
|
14
|
-
getPConnect().setInheritedProp('displayMode', '
|
|
14
|
+
getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
15
15
|
getPConnect().setInheritedProp('readOnly', true);
|
|
16
16
|
const children = getPConnect().getChildren().map((configObject, index) => createElement(createPConnectComponent(), {
|
|
17
17
|
...configObject,
|
|
@@ -29,7 +29,7 @@ export default function DetailsThreeColumn(props) {
|
|
|
29
29
|
field.type = 'TextInput';
|
|
30
30
|
field.config.displayAsStatus = true;
|
|
31
31
|
}
|
|
32
|
-
return getPConnect().createComponent(field, '',
|
|
32
|
+
return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
return (_jsxs(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '', children: [showHighlightedData && highlightedDataArr.length > 0 && (_jsx(Grid, { container: true, spacing: 1, style: { padding: '0 0 1em' }, children: highlightedDataArr.map((child, i) => (_jsx(Grid, { item: true, xs: 4, children: child }, `hf-${i + 1}`))) })), _jsx(Grid, { container: true, spacing: 1, children: children.map((child, i) => (_jsx(Grid, { item: true, xs: 4, children: child }, `r-${i + 1}`))) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsThreeColumn.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"DetailsThreeColumn.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAUnF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAA8B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Ae,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,+FAA+F;QACzJ,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,CACL,MAAC,UAAU,IAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,aAC3D,mBAAmB,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,IAAI,CACvD,KAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,YACtD,kBAAkB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CACpC,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACb,KAAK,IADe,MAAM,CAAC,GAAG,CAAC,EAAE,CAE7B,CACR,CAAC,GACG,CACR,EACD,KAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,YACvB,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACb,KAAK,IADe,KAAK,CAAC,GAAG,CAAC,EAAE,CAE5B,CACR,CAAC,GACG,IACI,CACd,CAAC;AACJ,CAAC","sourcesContent":["import { createElement } from 'react';\nimport Grid from '@mui/material/Grid';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface DetailsThreeColumnProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showLabel: boolean;\n label: string;\n showHighlightedData: boolean;\n}\n\nexport default function DetailsThreeColumn(props: DetailsThreeColumnProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldGroup = getComponentFromMap('FieldGroup');\n\n const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;\n\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };\n\n // Set display mode prop and re-create the children so this part of the dom tree renders\n // in a readonly (display) mode instead of a editable\n getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');\n getPConnect().setInheritedProp('readOnly', true);\n const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>\n createElement(createPConnectComponent(), {\n ...configObject,\n // eslint-disable-next-line react/no-array-index-key\n key: index.toString()\n })\n );\n\n // Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent\n let highlightedDataArr = [];\n if (showHighlightedData) {\n const { highlightedData = [] } = (getPConnect().getRawMetadata() as any).config;\n highlightedDataArr = highlightedData.map(field => {\n field.config.displayMode = 'STACKED_LARGE_VAL';\n\n // Mark as status display when using pyStatusWork\n if (field.config.value === '@P .pyStatusWork') {\n field.type = 'TextInput';\n field.config.displayAsStatus = true;\n }\n\n return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);\n });\n }\n\n return (\n <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>\n {showHighlightedData && highlightedDataArr.length > 0 && (\n <Grid container spacing={1} style={{ padding: '0 0 1em' }}>\n {highlightedDataArr.map((child, i) => (\n <Grid item xs={4} key={`hf-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n )}\n <Grid container spacing={1}>\n {children.map((child, i) => (\n <Grid item xs={4} key={`r-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n </FieldGroup>\n );\n}\n"]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnProps } from '../../../../types/PConnProps';
|
|
3
2
|
interface DetailsTwoColumnProps extends PConnProps {
|
|
4
3
|
showLabel: boolean;
|
|
5
4
|
label: string;
|
|
6
5
|
showHighlightedData: boolean;
|
|
7
6
|
}
|
|
8
|
-
export default function DetailsTwoColumn(props: DetailsTwoColumnProps): JSX.Element;
|
|
7
|
+
export default function DetailsTwoColumn(props: DetailsTwoColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
10
9
|
//# sourceMappingURL=DetailsTwoColumn.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsTwoColumn.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DetailsTwoColumn.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,UAAU,qBAAsB,SAAQ,UAAU;IAEhD,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CA0DpE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createElement } from 'react';
|
|
3
|
-
import Grid from '@material
|
|
3
|
+
import Grid from '@mui/material/Grid';
|
|
4
4
|
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
5
|
import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
|
|
6
6
|
export default function DetailsTwoColumn(props) {
|
|
@@ -11,7 +11,7 @@ export default function DetailsTwoColumn(props) {
|
|
|
11
11
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
12
12
|
// Set display mode prop and re-create the children so this part of the dom tree renders
|
|
13
13
|
// in a readonly (display) mode instead of a editable
|
|
14
|
-
getPConnect().setInheritedProp('displayMode', '
|
|
14
|
+
getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
15
15
|
getPConnect().setInheritedProp('readOnly', true);
|
|
16
16
|
const children = getPConnect().getChildren().map((configObject, index) => createElement(createPConnectComponent(), {
|
|
17
17
|
...configObject,
|
|
@@ -29,7 +29,7 @@ export default function DetailsTwoColumn(props) {
|
|
|
29
29
|
field.type = 'TextInput';
|
|
30
30
|
field.config.displayAsStatus = true;
|
|
31
31
|
}
|
|
32
|
-
return getPConnect().createComponent(field, '',
|
|
32
|
+
return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
return (_jsxs(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '', children: [showHighlightedData && highlightedDataArr.length > 0 && (_jsx(Grid, { container: true, spacing: 1, style: { padding: '0 0 1em' }, children: highlightedDataArr.map((child, i) => (_jsx(Grid, { item: true, xs: 6, children: child }, `hf-${i + 1}`))) })), _jsx(Grid, { container: true, spacing: 1, children: children.map((child, i) => (_jsx(Grid, { item: true, xs: 6, children: child }, `r-${i + 1}`))) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsTwoColumn.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"DetailsTwoColumn.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8C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C,eAAe,GAAG,IAAI,CAAC;aACrC;YAED,OAAO,WAAW,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,6FAA6F;QACvJ,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,CACL,MAAC,UAAU,IAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,aAC3D,mBAAmB,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,IAAI,CACvD,KAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,YACtD,kBAAkB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CACpC,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACb,KAAK,IADe,MAAM,CAAC,GAAG,CAAC,EAAE,CAE7B,CACR,CAAC,GACG,CACR,EACD,KAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,YACvB,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACb,KAAK,IADe,KAAK,CAAC,GAAG,CAAC,EAAE,CAE5B,CACR,CAAC,GACG,IACI,CACd,CAAC;AACJ,CAAC","sourcesContent":["import { createElement } from 'react';\nimport Grid from '@mui/material/Grid';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface DetailsTwoColumnProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showLabel: boolean;\n label: string;\n showHighlightedData: boolean;\n}\n\nexport default function DetailsTwoColumn(props: DetailsTwoColumnProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldGroup = getComponentFromMap('FieldGroup');\n\n const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;\n\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };\n\n // Set display mode prop and re-create the children so this part of the dom tree renders\n // in a readonly (display) mode instead of a editable\n getPConnect().setInheritedProp('displayMode', 'DISPLAY_ONLY');\n getPConnect().setInheritedProp('readOnly', true);\n const children = (getPConnect().getChildren() as any[]).map((configObject, index) =>\n createElement(createPConnectComponent(), {\n ...configObject,\n // eslint-disable-next-line react/no-array-index-key\n key: index.toString()\n })\n );\n\n // Set up highlighted data to pass in return if is set to show, need raw metadata to pass to createComponent\n let highlightedDataArr = [];\n if (showHighlightedData) {\n const { highlightedData = [] } = (getPConnect().getRawMetadata() as any).config;\n highlightedDataArr = highlightedData.map(field => {\n field.config.displayMode = 'STACKED_LARGE_VAL';\n\n // Mark as status display when using pyStatusWork\n if (field.config.value === '@P .pyStatusWork') {\n field.type = 'TextInput';\n field.config.displayAsStatus = true;\n }\n\n return getPConnect().createComponent(field, '', 0, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional\n });\n }\n\n return (\n <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>\n {showHighlightedData && highlightedDataArr.length > 0 && (\n <Grid container spacing={1} style={{ padding: '0 0 1em' }}>\n {highlightedDataArr.map((child, i) => (\n <Grid item xs={6} key={`hf-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n )}\n <Grid container spacing={1}>\n {children.map((child, i) => (\n <Grid item xs={6} key={`r-${i + 1}`}>\n {child}\n </Grid>\n ))}\n </Grid>\n </FieldGroup>\n );\n}\n"]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnProps } from '../../../../types/PConnProps';
|
|
3
2
|
interface DynamicTabsProps extends PConnProps {
|
|
4
3
|
showLabel: boolean;
|
|
5
4
|
label: string;
|
|
6
5
|
referenceList?: any[];
|
|
7
6
|
}
|
|
8
|
-
declare function DynamicTabs(props: DynamicTabsProps): JSX.Element;
|
|
7
|
+
declare function DynamicTabs(props: DynamicTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export default DynamicTabs;
|
|
10
9
|
//# sourceMappingURL=DynamicTabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DynamicTabs/DynamicTabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DynamicTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DynamicTabs/DynamicTabs.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAQ1D,UAAU,gBAAiB,SAAQ,UAAU;IAE3C,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;CACvB;AAED,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAwD3C;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React, { Children, useMemo, useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { TabContext, TabPanel } from '@
|
|
3
|
+
import { Tab, Tabs } from '@mui/material';
|
|
4
|
+
import { TabContext, TabPanel } from '@mui/lab';
|
|
5
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
5
6
|
import { buildView } from '../../../helpers/field-group-utils';
|
|
6
7
|
const useStyles = makeStyles(() => ({
|
|
7
8
|
tab: {
|
|
@@ -20,7 +21,7 @@ function DynamicTabs(props) {
|
|
|
20
21
|
const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);
|
|
21
22
|
const referenceListData = pConnect.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional
|
|
22
23
|
const memoisedTabViews = useMemo(() => {
|
|
23
|
-
pConnect.setInheritedProp('displayMode', '
|
|
24
|
+
pConnect.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
24
25
|
pConnect.setInheritedProp('readOnly', true);
|
|
25
26
|
return (referenceListData &&
|
|
26
27
|
Children.toArray(referenceListData.map((item, index) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicTabs.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DynamicTabs/DynamicTabs.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DynamicTabs.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DynamicTabs/DynamicTabs.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAG/D,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;IAClC,GAAG,EAAE;QACH,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC,CAAC,CAAC;AASJ,SAAS,WAAW,CAAC,KAAuB;IAC1C,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAC5B,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,GA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O,IAD7D,GAAG,CAAC,EAAE,CAEV,CACZ,CAAC,IACS,IACZ,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC","sourcesContent":["import React, { Children, useMemo, useState } from 'react';\nimport { Tab, Tabs } from '@mui/material';\nimport { TabContext, TabPanel } from '@mui/lab';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport { buildView } from '../../../helpers/field-group-utils';\nimport { PConnProps } from '../../../../types/PConnProps';\n\nconst useStyles = makeStyles(() => ({\n tab: {\n minWidth: '72px'\n }\n}));\n\ninterface DynamicTabsProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n showLabel: boolean;\n label: string;\n referenceList?: any[];\n}\n\nfunction DynamicTabs(props: DynamicTabsProps) {\n const classes = useStyles();\n const { referenceList, showLabel, label, getPConnect } = props;\n const pConnect = getPConnect();\n // Get the inherited props from the parent to determine label settings\n const propsToUse = { label, showLabel, ...pConnect.getInheritedProps() };\n const defaultTabIndex = 0;\n // @ts-ignore - Property 'getComponentConfig' is private and only accessible within class 'C11nEnv'.\n const { tablabel } = pConnect.getComponentConfig();\n const tablabelProp = PCore.getAnnotationUtils().getPropertyName(tablabel);\n const referenceListData: any = pConnect.getValue(`${referenceList}.pxResults`, ''); // 2nd arg empty string until typedefs properly allow optional\n const memoisedTabViews = useMemo(() => {\n pConnect.setInheritedProp('displayMode', 'DISPLAY_ONLY');\n pConnect.setInheritedProp('readOnly', true);\n\n return (\n referenceListData &&\n Children.toArray(\n referenceListData.map((item, index) => {\n return <React.Fragment key={item[tablabelProp]}>{buildView(pConnect, index, '')}</React.Fragment>;\n })\n )\n );\n }, [referenceListData]);\n const [panelShown, changePanel] = useState(defaultTabIndex);\n const handleTabClick = (e, id) => {\n changePanel(parseInt(id, 10));\n };\n // Loop over the tab contents and and pull out the labels for the navigation\n const tabItems =\n referenceListData?.map((item, i) => {\n const currentTabLabel = item[tablabelProp] || PCore.getLocaleUtils().getLocaleValue('No label specified in config', 'Generic');\n return {\n name: currentTabLabel,\n id: i\n };\n }) || [];\n\n return (\n <>\n {propsToUse.label && <h3 id='dynamic-tabs-title'>{propsToUse.label}</h3>}\n <TabContext value={panelShown.toString()}>\n <Tabs onChange={handleTabClick} value={panelShown} variant='scrollable' scrollButtons='auto' indicatorColor='primary' id='dynamic-tabs'>\n {tabItems.map((tab: any) => (\n <Tab key={tab.id} label={tab.name} value={tab.id} className={classes.tab} />\n ))}\n </Tabs>\n\n {tabItems.map((tab: any) => (\n <TabPanel key={tab.id} value={tab.id.toString()} tabIndex={+tab.id} id='dynamic-tabpanel'>\n <div>{memoisedTabViews[parseInt(tab.id, 10)] || 'No content exists'}</div>\n </TabPanel>\n ))}\n </TabContext>\n </>\n );\n}\n\nexport default DynamicTabs;\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnProps } from '../../../types/PConnProps';
|
|
3
2
|
interface FieldGroupTemplateProps extends PConnProps {
|
|
4
3
|
referenceList?: any[];
|
|
@@ -10,6 +9,6 @@ interface FieldGroupTemplateProps extends PConnProps {
|
|
|
10
9
|
fieldHeader?: string;
|
|
11
10
|
allowTableEdit: boolean;
|
|
12
11
|
}
|
|
13
|
-
export default function FieldGroupTemplate(props: FieldGroupTemplateProps): JSX.Element;
|
|
12
|
+
export default function FieldGroupTemplate(props: FieldGroupTemplateProps): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export {};
|
|
15
14
|
//# sourceMappingURL=FieldGroupTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldGroupTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/template/FieldGroupTemplate/FieldGroupTemplate.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,UAAU,uBAAwB,SAAQ,UAAU;IAElD,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CA4FxE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
3
|
-
import { useMemo } from 'react';
|
|
3
|
+
import { useLayoutEffect, useMemo } from 'react';
|
|
4
4
|
import { getReferenceList, buildView } from '../../helpers/field-group-utils';
|
|
5
5
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
6
6
|
export default function FieldGroupTemplate(props) {
|
|
@@ -12,8 +12,14 @@ export default function FieldGroupTemplate(props) {
|
|
|
12
12
|
const resolvedList = getReferenceList(pConn);
|
|
13
13
|
pConn.setReferenceList(resolvedList);
|
|
14
14
|
const pageReference = `${pConn.getPageReference()}${resolvedList}`;
|
|
15
|
-
const isReadonlyMode = renderMode === 'ReadOnly' || displayMode === '
|
|
15
|
+
const isReadonlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY';
|
|
16
16
|
const HEADING = heading ?? 'Row';
|
|
17
|
+
useLayoutEffect(() => {
|
|
18
|
+
if (!isReadonlyMode) {
|
|
19
|
+
// @ts-ignore - Expected 3 arguments, but got 1
|
|
20
|
+
pConn.getListActions().initDefaultPageInstructions(resolvedList);
|
|
21
|
+
}
|
|
22
|
+
}, [referenceList?.length]);
|
|
17
23
|
const getDynamicHeaderProp = (item, index) => {
|
|
18
24
|
if (fieldHeader === 'propertyRef' && heading && item[heading.substring(1)]) {
|
|
19
25
|
return item[heading.substring(1)];
|
|
@@ -25,6 +31,7 @@ export default function FieldGroupTemplate(props) {
|
|
|
25
31
|
pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);
|
|
26
32
|
}
|
|
27
33
|
else {
|
|
34
|
+
// @ts-ignore - An argument for 'pageRef' was not provided.
|
|
28
35
|
pConn.getListActions().insert({}, referenceList.length);
|
|
29
36
|
}
|
|
30
37
|
};
|
|
@@ -37,6 +44,7 @@ export default function FieldGroupTemplate(props) {
|
|
|
37
44
|
pConn.getListActions().deleteEntry(index, pageReference);
|
|
38
45
|
}
|
|
39
46
|
else {
|
|
47
|
+
// @ts-ignore - An argument for 'pageRef' was not provided.
|
|
40
48
|
pConn.getListActions().deleteEntry(index);
|
|
41
49
|
}
|
|
42
50
|
};
|
|
@@ -52,7 +60,7 @@ export default function FieldGroupTemplate(props) {
|
|
|
52
60
|
}, [referenceList?.length]);
|
|
53
61
|
return (_jsx(FieldGroupList, { items: MemoisedChildren, onAdd: allowAddEdit !== false ? addFieldGroupItem : undefined, onDelete: allowAddEdit !== false ? deleteFieldGroupItem : undefined }));
|
|
54
62
|
}
|
|
55
|
-
pConn.setInheritedProp('displayMode', '
|
|
63
|
+
pConn.setInheritedProp('displayMode', 'DISPLAY_ONLY');
|
|
56
64
|
const memoisedReadOnlyList = useMemo(() => {
|
|
57
65
|
return referenceList.map((item, index) => {
|
|
58
66
|
const key = item[heading] || `field-group-row-${index}`;
|