@pega/react-sdk-components 0.23.26 → 8.8.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/Context/StoreContext.d.ts +3 -2
- package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
- package/lib/bridge/Context/StoreContext.js +2 -3
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts +1 -0
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +22 -0
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +2 -14
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +10 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +19 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -0
- package/lib/components/designSystemExtension/AlertBanner/index.d.ts +2 -0
- package/lib/components/designSystemExtension/AlertBanner/index.d.ts.map +1 -0
- package/lib/components/designSystemExtension/AlertBanner/index.js +2 -0
- package/lib/components/designSystemExtension/AlertBanner/index.js.map +1 -0
- package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +6 -9
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +3 -7
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +1 -8
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +6 -2
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -3
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -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 +7 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +3 -3
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +13 -16
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +3 -6
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +77 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +2 -2
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +15 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +17 -15
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +7 -2
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +12 -10
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +19 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +12 -10
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +6 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +11 -11
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +1 -1
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +5 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +19 -11
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +5 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +15 -9
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +8 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +43 -9
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +10 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +26 -9
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +5 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +7 -5
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +5 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +6 -4
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts +5 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +6 -4
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +5 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +10 -7
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +24 -11
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.d.ts +7 -0
- package/lib/components/field/RichText/RichText.d.ts.map +1 -0
- package/lib/components/field/RichText/RichText.js +51 -0
- package/lib/components/field/RichText/RichText.js.map +1 -0
- package/lib/components/field/RichText/index.d.ts +2 -0
- package/lib/components/field/RichText/index.d.ts.map +1 -0
- package/lib/components/field/RichText/index.js +2 -0
- package/lib/components/field/RichText/index.js.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.js +34 -0
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
- package/lib/components/field/ScalarList/index.d.ts +2 -0
- package/lib/components/field/ScalarList/index.d.ts.map +1 -0
- package/lib/components/field/ScalarList/index.js +2 -0
- package/lib/components/field/ScalarList/index.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +10 -14
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +6 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +5 -3
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +7 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +6 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +24 -5
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +5 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +14 -8
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +5 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +11 -5
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +19 -40
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +16 -45
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +6 -6
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js +2 -2
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- package/lib/components/helpers/auth.d.ts +8 -6
- package/lib/components/helpers/auth.d.ts.map +1 -1
- package/lib/components/helpers/auth.js +642 -327
- package/lib/components/helpers/auth.js.map +1 -1
- package/lib/components/helpers/authManager.d.ts +20 -17
- package/lib/components/helpers/authManager.d.ts.map +1 -1
- package/lib/components/helpers/authManager.js +713 -438
- package/lib/components/helpers/authManager.js.map +1 -1
- package/lib/components/helpers/case-utils.d.ts +20 -0
- package/lib/components/helpers/case-utils.d.ts.map +1 -0
- package/lib/components/helpers/case-utils.js +82 -0
- package/lib/components/helpers/case-utils.js.map +1 -0
- package/lib/components/helpers/common-utils.d.ts +2 -0
- package/lib/components/helpers/common-utils.d.ts.map +1 -0
- package/lib/components/helpers/common-utils.js +5 -0
- package/lib/components/helpers/common-utils.js.map +1 -0
- package/lib/components/helpers/config_access.d.ts.map +1 -1
- package/lib/components/helpers/config_access.js +28 -98
- package/lib/components/helpers/config_access.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.d.ts +1 -6
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/date-format-utils.js +23 -14
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.d.ts +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts +15 -2
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js +3 -3
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.d.ts +3 -3
- package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +6 -6
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +6 -5
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts +881 -1399
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.d.ts +4 -4
- package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Date.js +1 -1
- package/lib/components/helpers/formatters/Date.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/formatters/common.js +4 -5
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +11 -11
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/reactContextHelpers.d.ts +3 -2
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/reactContextHelpers.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +5 -3
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +10 -5
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts +4 -0
- package/lib/components/helpers/state-utils.d.ts.map +1 -0
- package/lib/components/helpers/state-utils.js +36 -0
- package/lib/components/helpers/state-utils.js.map +1 -0
- package/lib/components/helpers/template-utils.d.ts +7 -3
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -1
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +9 -3
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +5 -15
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +9 -14
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +32 -33
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +8 -14
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +3 -16
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -21
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +53 -52
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts +12 -12
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js +17 -16
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -17
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +22 -24
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +7 -22
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -19
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +2 -16
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -14
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +13 -15
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +9 -16
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.d.ts +11 -17
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +6 -20
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +9 -20
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +8 -17
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +1 -15
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +4 -7
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +0 -4
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +1 -21
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +16 -36
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +5 -8
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +3 -7
- 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.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +4 -9
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +13 -16
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +8 -54
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +20 -15
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +17 -29
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +11 -23
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +4 -22
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -7
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +6 -6
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +10 -22
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +41 -45
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -13
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +9 -16
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +10 -16
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +12 -23
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +1 -31
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +41 -48
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -11
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +18 -15
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts +3 -0
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -0
- package/lib/components/template/DefaultForm/utils/index.js +27 -0
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -0
- package/lib/components/template/Details/Details/Details.d.ts +1 -16
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +10 -15
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -15
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +1 -13
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +14 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +14 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +7 -21
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -7
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +0 -5
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -15
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +5 -14
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +5 -13
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +6 -10
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.d.ts +1 -90
- package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +1 -9
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +96 -100
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +0 -1
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +72 -16
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +143 -3
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +2 -13
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +10 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +14 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +5 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +7 -14
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +4 -13
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -7
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +0 -5
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +3 -6
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -7
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +0 -5
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -15
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +17 -13
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +57 -5
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +18 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +5 -5
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -29
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +22 -28
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -26
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +4 -10
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +1 -8
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +5 -11
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +1 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +3 -6
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +5 -11
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +1 -9
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +10 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -16
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +31 -23
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +5 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +7 -14
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +4 -14
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +17 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +2 -2
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +8 -17
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +4 -19
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +15 -3
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +44 -32
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +4 -8
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +8 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +33 -23
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +4 -5
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +3 -10
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +12 -4
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +7 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +2 -2
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +7 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +5 -2
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +35 -67
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/components_map.d.ts +3 -3
- package/lib/components_map.d.ts.map +1 -1
- package/lib/components_map.js +819 -818
- package/lib/components_map.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +65 -9
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +4 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
- package/lib/hooks/useAfterInitialEffect.js +16 -0
- package/lib/hooks/useAfterInitialEffect.js.map +1 -0
- package/lib/hooks/useConsolidatedRef.d.ts +9 -0
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
- package/lib/hooks/useConsolidatedRef.js +30 -0
- package/lib/hooks/useConsolidatedRef.js.map +1 -0
- package/lib/hooks/useUID.d.ts +8 -0
- package/lib/hooks/useUID.d.ts.map +1 -0
- package/lib/hooks/useUID.js +14 -0
- package/lib/hooks/useUID.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/sdk-pega-component-map.d.ts +15 -1
- package/lib/sdk-pega-component-map.js +15 -1
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +42 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataReference.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,uBAAuB,MAAM,4BAA4B,CAAC;AACjE,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAE/D,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAI5D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK;IACzC,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,GAAG,QAAQ,CAAC;IAChC,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnE,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,iBAAiB,EAAE,EAAE,CAAC;IACtE,IAAI,UAAU,CAAC,SAAS,KAAK,KAAK,EAAE;QAClC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC;KACvB;IACD,MAAM,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MAAM;IAC7B,kCAAkC,EAAE,SAAS,CAAC,IAAI;IAClD,aAAa,EAAE,SAAS,CAAC,MAAM;IAC/B,aAAa,EAAE,SAAS,CAAC,MAAM;IAC/B,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,SAAS,EAAE,SAAS,CAAC,MAAM;IAC3B,UAAU,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;IAC/C,SAAS,EAAE,SAAS,CAAC,IAAI;CAC1B,CAAC","sourcesContent":["import React, { useMemo, useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport SingleReferenceReadonly from '../SingleReferenceReadOnly';\nimport MultiReferenceReadonly from '../MultiReferenceReadOnly';\n\nconst SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\ndeclare const PCore: any;\n\nexport default function DataReference(props) {\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;\n const pConn = getPConnect();\n const [dropDownDataSource, setDropDownDataSource] = useState(null);\n const propsToUse = { label, showLabel, ...pConn.getInheritedProps() };\n if (propsToUse.showLabel === false) {\n propsToUse.label = '';\n }\n const rawViewMetadata = 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 (\n firstChildMeta?.type === \"Dropdown\" &&\n rawViewMetadata.config?.parameters\n ) {\n const { value, key, text } = firstChildMeta.config.datasource.fields;\n PCore.getDataApiUtils()\n .getData(refList, {\n dataViewParameters: parameters\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 getPConnect()\n .getActionsApi()\n .refreshCaseView(caseKey, pConn.getValue('__currentPageTabViewName'), null, refreshOptions);\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()\n .getCaseEditLock(caseKey)\n .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 PCore.getDataApiUtils()\n .updateCaseEditFieldsData(\n caseKey,\n { [caseKey]: commitData },\n caseResponse.headers.etag,\n pConn.getContextName()\n )\n .then(response => {\n PCore.getContainerUtils().updateChildContainersEtag(\n pConn.getContextName(),\n response.headers.etag\n );\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 property: propName\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={\n rawViewMetadata.config.contextClass && rawViewMetadata.config.name ? rawViewMetadata.config.name : null\n }\n />\n );\n }\n\n if (isDisplayModeEnabled && selectionMode === SELECTION_MODE.MULTI) {\n return (\n <MultiReferenceReadonly\n config={config}\n getPConnect={firstChildPConnect}\n label={propsToUse.label}\n hideLabel={hideLabel}\n />\n );\n }\n\n // In the case of a datasource with parameters you cannot load the dropdown before the parameters\n if (\n type === 'Dropdown' &&\n rawViewMetadata.config?.parameters &&\n dropDownDataSource === null\n ) {\n return null;\n }\n\n return firstChildPConnect().createComponent({\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:\n rawViewMetadata.config.contextClass && rawViewMetadata.config.name\n ? rawViewMetadata.config.name\n : null,\n hideLabel,\n onRecordChange: handleSelection\n }\n });\n }\n }, [\n firstChildMeta.config?.datasource?.source,\n parameters,\n dropDownDataSource,\n propsToUse.required,\n propsToUse.disabled\n ]);\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.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 <React.Fragment>{child}</React.Fragment>\n ))}\n </div>\n );\n}\n\nDataReference.defaultProps = {\n label: undefined,\n showLabel: undefined,\n displayMode: undefined,\n allowAndPersistChangesInReviewMode: false,\n referenceType: '',\n selectionMode: '',\n displayAs: '',\n ruleClass: '',\n parameters: undefined,\n hideLabel: false\n};\n\nDataReference.propTypes = {\n children: PropTypes.arrayOf(PropTypes.node).isRequired,\n getPConnect: PropTypes.func.isRequired,\n label: PropTypes.string,\n showLabel: PropTypes.func,\n displayMode: PropTypes.string,\n allowAndPersistChangesInReviewMode: PropTypes.bool,\n referenceType: PropTypes.string,\n selectionMode: PropTypes.string,\n displayAs: PropTypes.string,\n ruleClass: PropTypes.string,\n parameters: PropTypes.arrayOf(PropTypes.string), // need to fix\n hideLabel: PropTypes.bool\n};\n"]}
|
|
1
|
+
{"version":3,"file":"DataReference.js","sourceRoot":"","sources":["../../../../src/components/template/DataReference/DataReference.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,+DAA+D;AAE/D,yEAAyE;AACzE,oDAAoD;AACpD,wEAAwE;AACxE,0BAA0B;AAC1B,mBAAmB;AACnB,oBAAoB;AACpB,yBAAyB;AACzB,iDAAiD;AACjD,2BAA2B;AAC3B,2BAA2B;AAC3B,uBAAuB;AACvB,uBAAuB;AACvB,8CAA8C;AAC9C,uBAAuB;AACvB,IAAI;AAGJ,MAAM,cAAc,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAM5D,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,CAAC,yBAAyB;IACnE,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,GAAG,QAAQ,CAAC;IAChC,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,MAAM,CA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esContent":["import React, { useMemo, useState, useEffect } from 'react';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\n// import type { PConnProps } from '../../../types/PConnProps';\n\n// ReferenceProps can't be used until getComponentConfig() is NOT private\n// interface DataReferenceProps extends PConnProps {\n// // If any, enter additional props that only exist on this component\n// children: Array<any>,\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: Array<string>, // need to fix\n// hideLabel: boolean\n// }\n\n\nconst SELECTION_MODE = { SINGLE: 'single', MULTI: 'multi' };\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows ~7 errors)\ndeclare const PCore: any;\n\n\nexport default function DataReference(props /*: 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;\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 = 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 (\n firstChildMeta?.type === \"Dropdown\" &&\n rawViewMetadata[\"config\"]?.parameters\n ) {\n const { value, key, text } = firstChildMeta.config.datasource.fields;\n PCore.getDataApiUtils()\n .getData(refList, {\n dataViewParameters: parameters\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', '')) { // 2nd arg empty string until typedef marked correctly\n getPConnect()\n .getActionsApi()\n .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()\n .getCaseEditLock(caseKey)\n .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 PCore.getDataApiUtils()\n .updateCaseEditFieldsData(\n caseKey,\n { [caseKey]: commitData },\n caseResponse.headers.etag,\n pConn.getContextName()\n )\n .then(response => {\n PCore.getContainerUtils().updateChildContainersEtag(\n pConn.getContextName(),\n response.headers.etag\n );\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({ // 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={\n rawViewMetadata[\"config\"].contextClass && rawViewMetadata[\"config\"].name ? rawViewMetadata[\"config\"].name : null\n }\n />\n );\n }\n\n if (isDisplayModeEnabled && selectionMode === SELECTION_MODE.MULTI) {\n return (\n <MultiReferenceReadonly\n config={config}\n getPConnect={firstChildPConnect}\n label={propsToUse.label}\n hideLabel={hideLabel}\n />\n );\n }\n\n // In the case of a datasource with parameters you cannot load the dropdown before the parameters\n if (\n type === 'Dropdown' &&\n rawViewMetadata[\"config\"]?.parameters &&\n dropDownDataSource === null\n ) {\n return null;\n }\n\n return firstChildPConnect().createComponent({\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:\n rawViewMetadata[\"config\"].contextClass && rawViewMetadata[\"config\"].name\n ? rawViewMetadata[\"config\"].name\n : null,\n hideLabel,\n onRecordChange: handleSelection\n },\n },\n '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);\n }\n }, [\n firstChildMeta.config?.datasource?.source,\n parameters,\n dropDownDataSource,\n propsToUse.required,\n propsToUse.disabled\n ]);\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.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 <React.Fragment>{child}</React.Fragment>\n ))}\n </div>\n );\n}\n"]}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import './DefaultForm.css';
|
|
4
|
-
|
|
5
|
-
declare namespace DefaultForm {
|
|
6
|
-
var propTypes: {
|
|
7
|
-
NumCols: PropTypes.Requireable<string>;
|
|
8
|
-
};
|
|
9
|
-
var defaultProps: {
|
|
10
|
-
NumCols: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export default DefaultForm;
|
|
3
|
+
export default function DefaultForm(props: any): JSX.Element;
|
|
14
4
|
//# sourceMappingURL=DefaultForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultForm.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DefaultForm/DefaultForm.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DefaultForm.d.ts","sourceRoot":"","sources":["../../../../src/components/template/DefaultForm/DefaultForm.tsx"],"names":[],"mappings":";AAQA,OAAO,mBAAmB,CAAC;AAkB3B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,KAAA,eA0CxC"}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import React, { createElement } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import { getInstructions } from '../../helpers/template-utils';
|
|
4
3
|
import createPConnectComponent from '../../../bridge/react_pconnect';
|
|
4
|
+
import connectToState from '../../helpers/state-utils';
|
|
5
|
+
import { getKeyForMappedField, mapStateToProps } from './utils';
|
|
6
|
+
// import type { PConnProps } from '../../../types/PConnProps';
|
|
5
7
|
import './DefaultForm.css';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
// Can't use PConn props until proper props for getPConnect().getChildren()[0].getPConnect;
|
|
9
|
+
// interface DefaultFormProps extends PConnProps {
|
|
10
|
+
// // If any, enter additional props that only exist on this component
|
|
11
|
+
// children: Array<any>,
|
|
12
|
+
// NumCols: string
|
|
13
|
+
// }
|
|
14
|
+
const Child = connectToState(mapStateToProps)(props => {
|
|
15
|
+
const { key, visibility, ...rest } = props;
|
|
16
|
+
return createElement(createPConnectComponent(), { ...rest, key, visibility });
|
|
17
|
+
});
|
|
18
|
+
export default function DefaultForm(props /* : DefaultFormProps */) {
|
|
19
|
+
const { getPConnect, NumCols = '1' } = props;
|
|
8
20
|
const instructions = getInstructions(getPConnect(), props.instructions);
|
|
9
|
-
const instructionText = instructions?.replace(/<\/?[^>]+(>|$)/g, '');
|
|
10
21
|
let divClass;
|
|
11
22
|
const numCols = NumCols || '1';
|
|
12
23
|
switch (numCols) {
|
|
@@ -28,18 +39,10 @@ export default function DefaultForm(props) {
|
|
|
28
39
|
// to take the children and create components for them, put in an array and pass as the
|
|
29
40
|
// defaultForm kids
|
|
30
41
|
const arChildren = getPConnect().getChildren()[0].getPConnect().getChildren();
|
|
31
|
-
const dfChildren = arChildren.map((
|
|
32
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
33
|
-
createElement(createPConnectComponent(), { ...kid, key: idx }));
|
|
42
|
+
const dfChildren = arChildren.map(kid => React.createElement(Child, { key: getKeyForMappedField(kid), ...kid }));
|
|
34
43
|
return (React.createElement(React.Fragment, null,
|
|
35
|
-
|
|
44
|
+
instructions && (React.createElement("div", { className: 'psdk-default-form-instruction-text' },
|
|
45
|
+
React.createElement("div", { key: "instructions", id: "instruction-text", dangerouslySetInnerHTML: { __html: instructions } }))),
|
|
36
46
|
React.createElement("div", { className: divClass }, dfChildren)));
|
|
37
47
|
}
|
|
38
|
-
DefaultForm.propTypes = {
|
|
39
|
-
// children: PropTypes.arrayOf(PropTypes.node).isRequired,
|
|
40
|
-
NumCols: PropTypes.string
|
|
41
|
-
};
|
|
42
|
-
DefaultForm.defaultProps = {
|
|
43
|
-
NumCols: '1'
|
|
44
|
-
};
|
|
45
48
|
//# sourceMappingURL=DefaultForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultForm.js","sourceRoot":"","sources":["../../../../src/components/template/DefaultForm/DefaultForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,
|
|
1
|
+
{"version":3,"file":"DefaultForm.js","sourceRoot":"","sources":["../../../../src/components/template/DefaultForm/DefaultForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAChE,+DAA+D;AAG/D,OAAO,mBAAmB,CAAC;AAG3B,2FAA2F;AAC3F,kDAAkD;AAClD,wEAAwE;AACxE,0BAA0B;AAC1B,oBAAoB;AAEpB,IAAI;AAGJ,MAAM,KAAK,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,EAAE;IACpD,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAE3C,OAAO,aAAa,CAAC,uBAAuB,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,CAAC,wBAAwB;IAChE,MAAM,EAAE,WAAW,EAAE,OAAO,GAAG,GAAG,EAAE,GAAG,KAAK,CAAC;IAC7C,MAAM,YAAY,GAAG,eAAe,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAExE,IAAI,QAAgB,CAAC;IAErB,MAAM,OAAO,GAAG,OAAO,IAAI,GAAG,CAAC;IAC/B,QAAQ,OAAO,EAAE;QACf,KAAK,GAAG;YACN,QAAQ,GAAG,8BAA8B,CAAC;YAC1C,MAAM;QACR,KAAK,GAAG;YACN,QAAQ,GAAG,8BAA8B,CAAC;YAC1C,MAAM;QACR,KAAK,GAAG;YACN,QAAQ,GAAG,gCAAgC,CAAC;YAC5C,MAAM;QACR;YACE,QAAQ,GAAG,8BAA8B,CAAC;YAC1C,MAAM;KACT;IAED,YAAY;IAEZ,yFAAyF;IACzF,uFAAuF;IACvF,mBAAmB;IACnB,MAAM,UAAU,GAAG,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9E,MAAM,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,oBAAC,KAAK,IAAC,GAAG,EAAE,oBAAoB,CAAC,GAAG,CAAC,KAAM,GAAG,GAAI,CAAC,CAAC;IAE7F,OAAO,CACL;QACG,YAAY,IAAI,CACf,6BAAK,SAAS,EAAC,oCAAoC;YAGjD,6BAAK,GAAG,EAAC,cAAc,EAAC,EAAE,EAAC,kBAAkB,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,GAAI,CAC/F,CACP;QACD,6BAAK,SAAS,EAAE,QAAQ,IAAG,UAAU,CAAO,CAC3C,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { createElement } from 'react';\nimport { getInstructions } from '../../helpers/template-utils';\nimport createPConnectComponent from '../../../bridge/react_pconnect';\nimport connectToState from '../../helpers/state-utils';\nimport { getKeyForMappedField, mapStateToProps } from './utils';\n// import type { PConnProps } from '../../../types/PConnProps';\n\n\nimport './DefaultForm.css';\n\n\n// Can't use PConn props until proper props for getPConnect().getChildren()[0].getPConnect;\n// interface DefaultFormProps extends PConnProps {\n// // If any, enter additional props that only exist on this component\n// children: Array<any>,\n// NumCols: string\n\n// }\n\n\nconst Child = connectToState(mapStateToProps)(props => {\n const { key, visibility, ...rest } = props;\n\n return createElement(createPConnectComponent(), { ...rest, key, visibility });\n});\n\nexport default function DefaultForm(props /* : DefaultFormProps */) {\n const { getPConnect, NumCols = '1' } = props;\n const instructions = getInstructions(getPConnect(), props.instructions);\n\n let divClass: string;\n\n const numCols = NumCols || '1';\n switch (numCols) {\n case '1':\n divClass = 'psdk-default-form-one-column';\n break;\n case '2':\n divClass = 'psdk-default-form-two-column';\n break;\n case '3':\n divClass = 'psdk-default-form-three-column';\n break;\n default:\n divClass = 'psdk-default-form-one-column';\n break;\n }\n\n // debugger;\n\n // repoint the children because they are in a region and we need to not render the region\n // to take the children and create components for them, put in an array and pass as the\n // defaultForm kids\n const arChildren = getPConnect().getChildren()[0].getPConnect().getChildren();\n const dfChildren = arChildren.map(kid => <Child key={getKeyForMappedField(kid)} {...kid} />);\n\n return (\n <>\n {instructions && (\n <div className='psdk-default-form-instruction-text'>\n {/* server performs sanitization method for instructions html content */}\n { /* eslint-disable react/no-danger */ }\n <div key=\"instructions\" id=\"instruction-text\" dangerouslySetInnerHTML={{ __html: instructions }} />\n </div>\n )}\n <div className={divClass}>{dfChildren}</div>\n </>\n );\n}\n"]}
|
|
@@ -0,0 +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,qBAqBhC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
+
export const mapStateToProps = (_, ownProps) => {
|
|
3
|
+
const { getPConnect } = ownProps;
|
|
4
|
+
return {
|
|
5
|
+
visibility: getPConnect().getComputedVisibility(),
|
|
6
|
+
getPConnect
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export const getKeyForMappedField = field => {
|
|
10
|
+
if (Array.isArray(field)) {
|
|
11
|
+
return field
|
|
12
|
+
.map(item => {
|
|
13
|
+
return getKeyForMappedField(item);
|
|
14
|
+
})
|
|
15
|
+
.join('__');
|
|
16
|
+
}
|
|
17
|
+
const pConnect = field?.getPConnect?.();
|
|
18
|
+
if (pConnect?.meta?.type && pConnect?.meta?.config?.name) {
|
|
19
|
+
return `${pConnect.meta.type}_${pConnect.meta.config.name}`;
|
|
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}`;
|
|
24
|
+
}
|
|
25
|
+
return uuidv4();
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,IAAI,IAAI,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QACxD,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;KAC7D;IAED,oDAAoD;IACpD,IAAI,QAAQ,EAAE,IAAI,EAAE,IAAI,IAAI,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;QACzD,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;KAC9D;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?.type && pConnect?.meta?.config?.name) {\n return `${pConnect.meta.type}_${pConnect.meta.config.name}`;\n }\n\n // Using label as a fallback if name is not defined.\n if (pConnect?.meta?.type && pConnect?.meta?.config?.label) {\n return `${pConnect.meta.type}_${pConnect.meta.config.label}`;\n }\n\n return uuidv4();\n};\n"]}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
declare function Details(props: any): JSX.Element;
|
|
4
|
-
declare namespace Details {
|
|
5
|
-
var defaultProps: {
|
|
6
|
-
label: undefined;
|
|
7
|
-
showLabel: boolean;
|
|
8
|
-
showHighlightedData: boolean;
|
|
9
|
-
};
|
|
10
|
-
var propTypes: {
|
|
11
|
-
showLabel: PropTypes.Requireable<boolean>;
|
|
12
|
-
label: PropTypes.Requireable<string>;
|
|
13
|
-
getPConnect: PropTypes.Validator<(...args: any[]) => any>;
|
|
14
|
-
showHighlightedData: PropTypes.Requireable<boolean>;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export default Details;
|
|
2
|
+
export default function Details(props: any): JSX.Element;
|
|
18
3
|
//# 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":";AAcA,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,KAAK,KAAA,eA6DpC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import React, { createElement } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import Grid from '@material-ui/core/Grid';
|
|
4
3
|
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
|
-
import
|
|
6
|
-
|
|
4
|
+
import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
|
|
5
|
+
// import type { PConnProps } from '../../../../types/PConnProps';
|
|
6
|
+
// Can't use PConnProps until getPConnect().getChildren() type is ok
|
|
7
|
+
// interface DetailsProps extends PConnProps {
|
|
8
|
+
// // If any, enter additional props that only exist on this component
|
|
9
|
+
// }
|
|
10
|
+
export default function Details(props /* : DetailsProps */) {
|
|
11
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
12
|
+
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
7
13
|
const { label, showLabel, getPConnect, showHighlightedData } = props;
|
|
8
14
|
// Get the inherited props from the parent to determine label settings
|
|
9
15
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
@@ -29,22 +35,11 @@ export default function Details(props) {
|
|
|
29
35
|
field.type = 'TextInput';
|
|
30
36
|
field.config.displayAsStatus = true;
|
|
31
37
|
}
|
|
32
|
-
return getPConnect().createComponent(field);
|
|
38
|
+
return getPConnect().createComponent(field, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
33
39
|
});
|
|
34
40
|
}
|
|
35
41
|
return (React.createElement(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '' },
|
|
36
42
|
showHighlightedData && highlightedDataArr.length > 0 && (React.createElement(Grid, { container: true, spacing: 1, style: { padding: '0 0 1em' } }, highlightedDataArr.map((child, i) => (React.createElement(Grid, { item: true, xs: 12, key: `hf-${i + 1}` }, child))))),
|
|
37
43
|
React.createElement(Grid, { container: true, spacing: 1 }, children.map((child, i) => (React.createElement(Grid, { item: true, xs: 12, key: `r-${i + 1}` }, child))))));
|
|
38
44
|
}
|
|
39
|
-
Details.defaultProps = {
|
|
40
|
-
label: undefined,
|
|
41
|
-
showLabel: true,
|
|
42
|
-
showHighlightedData: false
|
|
43
|
-
};
|
|
44
|
-
Details.propTypes = {
|
|
45
|
-
showLabel: PropTypes.bool,
|
|
46
|
-
label: PropTypes.string,
|
|
47
|
-
getPConnect: PropTypes.func.isRequired,
|
|
48
|
-
showHighlightedData: PropTypes.bool
|
|
49
|
-
};
|
|
50
45
|
//# sourceMappingURL=Details.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Details.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/Details/Details.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,
|
|
1
|
+
{"version":3,"file":"Details.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/Details/Details.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,IAAI,MAAM,wBAAwB,C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E/C,iDAAiD;YACjD,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,kBAAkB,EAAE;gBAC7C,KAAK,CAAC,IAAI,GAAG,WAAW,CAAC;gBACzB,KAAK,CAAC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC;aACrC;YAED,OAAO,WAAW,EAAE,CAAC,eAAe,CAAC,KAAK,EACxC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,6FAA6F;QAC9G,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,CACL,oBAAC,UAAU,IAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QAC3D,mBAAmB,IAAI,kBAAkB,CAAC,MAAM,GAAG,CAAC,IAAI,CACvD,oBAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IACtD,kBAAkB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CACpC,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,IAClC,KAAK,CACD,CACR,CAAC,CACG,CACR;QACD,oBAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,IACvB,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,IACjC,KAAK,CACD,CACR,CAAC,CACG,CACI,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React, { createElement } from 'react';\nimport Grid from '@material-ui/core/Grid';\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\n\n// import type { PConnProps } from '../../../../types/PConnProps';\n\n\n// Can't use PConnProps until getPConnect().getChildren() type is ok\n// interface DetailsProps extends PConnProps {\n// // If any, enter additional props that only exist on this component\n// }\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', 'LABELS_LEFT');\n getPConnect().setInheritedProp('readOnly', true);\n const children = getPConnect()\n .getChildren()\n .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().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,\n '', '', {}); // 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"]}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
label: undefined;
|
|
8
|
-
showLabel: boolean;
|
|
9
|
-
};
|
|
10
|
-
var propTypes: {
|
|
11
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike[]>;
|
|
12
|
-
showLabel: PropTypes.Requireable<boolean>;
|
|
13
|
-
label: PropTypes.Requireable<string>;
|
|
14
|
-
getPConnect: PropTypes.Validator<(...args: any[]) => any>;
|
|
15
|
-
};
|
|
2
|
+
import type { PConnProps } from '../../../../types/PConnProps';
|
|
3
|
+
interface DetailsSubTabsProps extends PConnProps {
|
|
4
|
+
children: Array<any>;
|
|
5
|
+
showLabel: boolean;
|
|
6
|
+
label: string;
|
|
16
7
|
}
|
|
17
|
-
export default DetailsSubTabs;
|
|
8
|
+
export default function DetailsSubTabs(props: DetailsSubTabsProps): JSX.Element;
|
|
9
|
+
export {};
|
|
18
10
|
//# 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":";
|
|
1
|
+
{"version":3,"file":"DetailsSubTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsSubTabs/DetailsSubTabs.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAG/D,UAAU,mBAAoB,SAAQ,UAAU;IAE9C,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAA;CAEd;AAGD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,eA4ChE"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useState, useEffect, Fragment } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import { getTransientTabs, getVisibleTabs, tabClick } from '../../SubTabs/tabUtils';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import { Tab, Tabs, TextField } from '@material-ui/core';
|
|
6
5
|
import { TabContext, TabPanel } from '@material-ui/lab';
|
|
7
6
|
export default function DetailsSubTabs(props) {
|
|
8
|
-
const { children, label, showLabel, getPConnect } = props;
|
|
7
|
+
const { children = [], label, showLabel = true, getPConnect } = props;
|
|
9
8
|
// Get the inherited props from the parent to determine label settings
|
|
10
9
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
11
10
|
const defaultTabIndex = 0;
|
|
@@ -31,15 +30,4 @@ export default function DetailsSubTabs(props) {
|
|
|
31
30
|
tabItems.map((tab) => (React.createElement(TabPanel, { key: tab.id, value: tab.id, tabIndex: +tab.id },
|
|
32
31
|
React.createElement("div", null, tab.content ? tab.content : 'No content exists')))))));
|
|
33
32
|
}
|
|
34
|
-
DetailsSubTabs.defaultProps = {
|
|
35
|
-
children: [],
|
|
36
|
-
label: undefined,
|
|
37
|
-
showLabel: true
|
|
38
|
-
};
|
|
39
|
-
DetailsSubTabs.propTypes = {
|
|
40
|
-
children: PropTypes.arrayOf(PropTypes.node),
|
|
41
|
-
showLabel: PropTypes.bool,
|
|
42
|
-
label: PropTypes.string,
|
|
43
|
-
getPConnect: PropTypes.func.isRequired
|
|
44
|
-
};
|
|
45
33
|
//# 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,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,
|
|
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import React from 'react';\nimport { Tab, Tabs, TextField } from '@material-ui/core';\nimport { TabContext, TabPanel } from '@material-ui/lab';\nimport type { PConnProps } from '../../../../types/PConnProps';\n\n\ninterface DetailsSubTabsProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n children: Array<any>,\n showLabel: boolean,\n label: string\n\n}\n\n\nexport default function DetailsSubTabs(props: 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[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 <Fragment>\n {propsToUse.showLabel && <TextField>{propsToUse.label}</TextField>}\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 </Fragment>\n );\n}\n"]}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
declare function DetailsThreeColumn(props: any): JSX.Element;
|
|
4
|
-
declare namespace DetailsThreeColumn {
|
|
5
|
-
var defaultProps: {
|
|
6
|
-
label: undefined;
|
|
7
|
-
showLabel: boolean;
|
|
8
|
-
showHighlightedData: boolean;
|
|
9
|
-
};
|
|
10
|
-
var propTypes: {
|
|
11
|
-
showLabel: PropTypes.Requireable<boolean>;
|
|
12
|
-
label: PropTypes.Requireable<string>;
|
|
13
|
-
getPConnect: PropTypes.Validator<(...args: any[]) => any>;
|
|
14
|
-
showHighlightedData: PropTypes.Requireable<boolean>;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export default DetailsThreeColumn;
|
|
2
|
+
export default function DetailsThreeColumn(props: any): JSX.Element;
|
|
18
3
|
//# 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":";AAgBA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,KAAA,eA6D/C"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import React, { createElement } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import Grid from '@material-ui/core/Grid';
|
|
4
3
|
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
|
|
5
|
+
// import type { PConnProps } from '../../../../types/PConnProps';
|
|
6
|
+
// Can't use PConnProps until getPConnect().getChildren() type is ok
|
|
7
|
+
// interface DetailsThreeColumnProps extends PConnProps {
|
|
8
|
+
// // If any, enter additional props that only exist on this component
|
|
9
|
+
// showLabel: boolean,
|
|
10
|
+
// label: string,
|
|
11
|
+
// showHighlightedData: boolean
|
|
12
|
+
// }
|
|
13
|
+
export default function DetailsThreeColumn(props /* : DetailsThreeColumnProps */) {
|
|
14
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
15
|
+
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
16
|
+
const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
8
17
|
// Get the inherited props from the parent to determine label settings
|
|
9
18
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
10
19
|
// Set display mode prop and re-create the children so this part of the dom tree renders
|
|
@@ -29,22 +38,11 @@ export default function DetailsThreeColumn(props) {
|
|
|
29
38
|
field.type = 'TextInput';
|
|
30
39
|
field.config.displayAsStatus = true;
|
|
31
40
|
}
|
|
32
|
-
return getPConnect().createComponent(field);
|
|
41
|
+
return getPConnect().createComponent(field, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
|
|
33
42
|
});
|
|
34
43
|
}
|
|
35
44
|
return (React.createElement(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '' },
|
|
36
45
|
showHighlightedData && highlightedDataArr.length > 0 && (React.createElement(Grid, { container: true, spacing: 1, style: { padding: '0 0 1em' } }, highlightedDataArr.map((child, i) => (React.createElement(Grid, { item: true, xs: 4, key: `hf-${i + 1}` }, child))))),
|
|
37
46
|
React.createElement(Grid, { container: true, spacing: 1 }, children.map((child, i) => (React.createElement(Grid, { item: true, xs: 4, key: `r-${i + 1}` }, child))))));
|
|
38
47
|
}
|
|
39
|
-
DetailsThreeColumn.defaultProps = {
|
|
40
|
-
label: undefined,
|
|
41
|
-
showLabel: true,
|
|
42
|
-
showHighlightedData: false
|
|
43
|
-
};
|
|
44
|
-
DetailsThreeColumn.propTypes = {
|
|
45
|
-
showLabel: PropTypes.bool,
|
|
46
|
-
label: PropTypes.string,
|
|
47
|
-
getPConnect: PropTypes.func.isRequired,
|
|
48
|
-
showHighlightedData: PropTypes.bool
|
|
49
|
-
};
|
|
50
48
|
//# sourceMappingURL=DetailsThreeColumn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsThreeColumn.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,
|
|
1
|
+
{"version":3,"file":"DetailsThreeColumn.js","sourceRoot":"","sources":["../../../../../src/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,kEAAkE;AAElE,oEAAoE;AACpE,yDAAyD;AACzD,wEAAwE;AACxE,wBAAwB;AACxB,mBAAmB;AACnB,iCAAiC;AACjC,IAAI;AAGJ,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,CAAC,+BAA+B;IAC9E,8EAA8E;IAC9E,MAAM,UAAU,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAErD,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,WAAW,EAAE,mBAAmB,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IAEpF,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,aAAa,CAAC,CAAC;IAC7D,WAAW,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,WAAW,EAAE;SAC3B,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EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,IACjC,KAAK,CACD,CACR,CAAC,CACG,CACR;QACD,oBAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,IACvB,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,IAChC,KAAK,CACD,CACR,CAAC,CACG,CACI,CACd,CAAC;AACJ,CAAC","sourcesContent":["import React, { createElement } from 'react';\nimport Grid from '@material-ui/core/Grid';\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';\n\n// import type { PConnProps } from '../../../../types/PConnProps';\n\n// Can't use PConnProps until getPConnect().getChildren() type is ok\n// interface 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\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', 'LABELS_LEFT');\n getPConnect().setInheritedProp('readOnly', true);\n const children = getPConnect()\n .getChildren()\n .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().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,\n '', '', {}); // 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,18 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
declare function DetailsTwoColumn(props: any): JSX.Element;
|
|
4
|
-
declare namespace DetailsTwoColumn {
|
|
5
|
-
var defaultProps: {
|
|
6
|
-
label: undefined;
|
|
7
|
-
showLabel: boolean;
|
|
8
|
-
showHighlightedData: boolean;
|
|
9
|
-
};
|
|
10
|
-
var propTypes: {
|
|
11
|
-
showLabel: PropTypes.Requireable<boolean>;
|
|
12
|
-
label: PropTypes.Requireable<string>;
|
|
13
|
-
getPConnect: PropTypes.Validator<(...args: any[]) => any>;
|
|
14
|
-
showHighlightedData: PropTypes.Requireable<boolean>;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export default DetailsTwoColumn;
|
|
2
|
+
export default function DetailsTwoColumn(props: any): JSX.Element;
|
|
18
3
|
//# 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":";AAiBA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,KAAA,eA6D7C"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import React, { createElement } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import Grid from '@material-ui/core/Grid';
|
|
4
3
|
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { getComponentFromMap } from '../../../../bridge/helpers/sdk_component_map';
|
|
5
|
+
// import type { PConnProps } from '../../../../types/PConnProps';
|
|
6
|
+
// Can't use PConnProps until getPConnect().getChildren() type is ok
|
|
7
|
+
// interface DetailsTwoColumnProps extends PConnProps {
|
|
8
|
+
// // If any, enter additional props that only exist on this component
|
|
9
|
+
// showLabel: boolean,
|
|
10
|
+
// label: string,
|
|
11
|
+
// showHighlightedData: boolean
|
|
12
|
+
// }
|
|
13
|
+
export default function DetailsTwoColumn(props /* : DetailsTwoColumnProps */) {
|
|
14
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
15
|
+
const FieldGroup = getComponentFromMap('FieldGroup');
|
|
16
|
+
const { label, showLabel = true, getPConnect, showHighlightedData = false } = props;
|
|
8
17
|
// Get the inherited props from the parent to determine label settings
|
|
9
18
|
const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
|
|
10
19
|
// Set display mode prop and re-create the children so this part of the dom tree renders
|
|
@@ -29,22 +38,11 @@ export default function DetailsTwoColumn(props) {
|
|
|
29
38
|
field.type = 'TextInput';
|
|
30
39
|
field.config.displayAsStatus = true;
|
|
31
40
|
}
|
|
32
|
-
return getPConnect().createComponent(field);
|
|
41
|
+
return getPConnect().createComponent(field, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional
|
|
33
42
|
});
|
|
34
43
|
}
|
|
35
44
|
return (React.createElement(FieldGroup, { name: propsToUse.showLabel ? propsToUse.label : '' },
|
|
36
45
|
showHighlightedData && highlightedDataArr.length > 0 && (React.createElement(Grid, { container: true, spacing: 1, style: { padding: '0 0 1em' } }, highlightedDataArr.map((child, i) => (React.createElement(Grid, { item: true, xs: 6, key: `hf-${i + 1}` }, child))))),
|
|
37
46
|
React.createElement(Grid, { container: true, spacing: 1 }, children.map((child, i) => (React.createElement(Grid, { item: true, xs: 6, key: `r-${i + 1}` }, child))))));
|
|
38
47
|
}
|
|
39
|
-
DetailsTwoColumn.defaultProps = {
|
|
40
|
-
label: undefined,
|
|
41
|
-
showLabel: true,
|
|
42
|
-
showHighlightedData: false
|
|
43
|
-
};
|
|
44
|
-
DetailsTwoColumn.propTypes = {
|
|
45
|
-
showLabel: PropTypes.bool,
|
|
46
|
-
label: PropTypes.string,
|
|
47
|
-
getPConnect: PropTypes.func.isRequired,
|
|
48
|
-
showHighlightedData: PropTypes.bool
|
|
49
|
-
};
|
|
50
48
|
//# sourceMappingURL=DetailsTwoColumn.js.map
|