@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,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const ReactReduxContext: import("react").Context<{}>;
|
|
3
|
+
export declare const useConstellationContext: () => {};
|
|
2
4
|
export default ReactReduxContext;
|
|
3
|
-
declare const ReactReduxContext: import("react").Context<any>;
|
|
4
5
|
//# sourceMappingURL=StoreContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreContext.d.ts","sourceRoot":"","sources":["../../../src/bridge/Context/StoreContext.
|
|
1
|
+
{"version":3,"file":"StoreContext.d.ts","sourceRoot":"","sources":["../../../src/bridge/Context/StoreContext.ts"],"names":[],"mappings":";AAMA,QAAA,MAAM,iBAAiB,6BAAoB,CAAC;AAM5C,eAAO,MAAM,uBAAuB,UAAsC,CAAC;AAC3E,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext } from "react";
|
|
2
|
-
// Argument was null but that failed TypeScript compilation. Change to
|
|
3
|
-
const ReactReduxContext = createContext();
|
|
4
|
-
// eslint-disable-next-line no-undef
|
|
2
|
+
// Argument was null but that failed TypeScript compilation. Change to empty object
|
|
3
|
+
const ReactReduxContext = createContext({});
|
|
5
4
|
if (process.env.NODE_ENV !== "production") {
|
|
6
5
|
ReactReduxContext.displayName = "ReactRedux";
|
|
7
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoreContext.js","sourceRoot":"","sources":["../../../src/bridge/Context/StoreContext.
|
|
1
|
+
{"version":3,"file":"StoreContext.js","sourceRoot":"","sources":["../../../src/bridge/Context/StoreContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAIlD,mFAAmF;AAEnF,MAAM,iBAAiB,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC;AAE5C,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,iBAAiB,CAAC,WAAW,GAAG,YAAY,CAAC;CAC9C;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAC3E,eAAe,iBAAiB,CAAC","sourcesContent":["import { createContext, useContext } from \"react\";\n\ndeclare const process:any;\n\n// Argument was null but that failed TypeScript compilation. Change to empty object\n\nconst ReactReduxContext = createContext({});\n\nif (process.env.NODE_ENV !== \"production\") {\n ReactReduxContext.displayName = \"ReactRedux\";\n}\n\nexport const useConstellationContext = () => useContext(ReactReduxContext);\nexport default ReactReduxContext;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk_component_map.d.ts","sourceRoot":"","sources":["../../../src/bridge/helpers/sdk_component_map.ts"],"names":[],"mappings":"AAWA,eAAO,IAAI,eAAe,KAAA,CAAC;
|
|
1
|
+
{"version":3,"file":"sdk_component_map.d.ts","sourceRoot":"","sources":["../../../src/bridge/helpers/sdk_component_map.ts"],"names":[],"mappings":"AAWA,eAAO,IAAI,eAAe,KAAA,CAAC;AA6F3B,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,GAAG,GAAG,CAmBhE;AAaD,wBAAsB,kBAAkB,CAAC,mBAAmB,KAAK,oBAmChE"}
|
|
@@ -98,6 +98,28 @@ class ComponentMap {
|
|
|
98
98
|
return this.sdkComponentMap.localComponentMap;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
export function getComponentFromMap(inComponentName) {
|
|
102
|
+
let theComponentImplementation = null;
|
|
103
|
+
const theLocalComponent = SdkComponentMap.getLocalComponentMap()[inComponentName];
|
|
104
|
+
if (theLocalComponent !== undefined) {
|
|
105
|
+
// eslint-disable-next-line no-console
|
|
106
|
+
console.log(`Requested component found ${inComponentName}: Local`);
|
|
107
|
+
theComponentImplementation = theLocalComponent;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[inComponentName];
|
|
111
|
+
if (thePegaProvidedComponent !== undefined) {
|
|
112
|
+
// console.log(`Requested component found ${inComponentName}: Pega-provided`);
|
|
113
|
+
theComponentImplementation = thePegaProvidedComponent;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
// eslint-disable-next-line no-console
|
|
117
|
+
console.error(`Requested component has neither Local nor Pega-provided implementation: ${inComponentName}`);
|
|
118
|
+
theComponentImplementation = getComponentFromMap("ErrorBoundary");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return theComponentImplementation;
|
|
122
|
+
}
|
|
101
123
|
// Implement Factory function to allow async load
|
|
102
124
|
// See https://stackoverflow.com/questions/49905178/asynchronous-operations-in-constructor/49906064#49906064 for inspiration
|
|
103
125
|
async function createSdkComponentMap(inLocalComponentMap = {}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk_component_map.js","sourceRoot":"","sources":["../../../src/bridge/helpers/sdk_component_map.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,gCAAgC;AAChC,oEAAoE;AACpE,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAE/D,yCAAyC;AAEzC,8FAA8F;AAC9F,mGAAmG;AACnG,+FAA+F;AAC/F,qDAAqD;AACrD,MAAM,CAAC,IAAI,eAAe,CAAC;AAC3B,IAAI,+BAA+B,GAAG,KAAK,CAAC;AAO5C,MAAM,YAAY;IAIhB;QAHA;;;;;WAAkC,CAAY,mBAAmB;QACjE;;;;;WAA8B;QA+D9B;;;;mBAAuB,G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AC;aAClD;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Helper singleton class to assist with loading and\n// accessing the SDK components\n// import localSdkComponentMap from '../../sdk-local-component-map';\nimport pegaSdkComponentMap from '../../sdk-pega-component-map';\n\n// Statically load all \"local\" components\n\n// Create a singleton for this class (with async loading of components map file) and export it\n// Note: Initializing SdkComponentMap to null seems to cause lots of compile issues with references\n// within other components and the value potentially being null (so try to leave it undefined)\n// eslint-disable-next-line import/no-mutable-exports\nexport let SdkComponentMap;\nlet SdkComponentMapCreateInProgress = false;\n\ninterface ISdkComponentMap {\n localComponentMap: Object,\n pegaProvidedComponentMap: Object\n}\n\nclass ComponentMap {\n sdkComponentMap: ISdkComponentMap; // Top level object\n isComponentMapLoaded: boolean;\n\n constructor() {\n // sdkComponentMap is top-level object\n this.sdkComponentMap = { localComponentMap: {}, pegaProvidedComponentMap: {} };\n\n // isCoComponentMapLoaded will be updated to true after the async load is complete\n this.isComponentMapLoaded = false;\n\n // pegaSdkComponents.local is the JSON object where we'll store the components that are\n // found locally or can be found in the Pega-provided repo\n this.sdkComponentMap.localComponentMap = { };\n\n this.sdkComponentMap.pegaProvidedComponentMap = { };\n\n // The \"work\" to load the config file is done (asynchronously) via the initialize\n // (Factory function) below)\n\n }\n\n /**\n * Asynchronous initialization of the config file contents.\n * @returns Promise of config file fetch\n */\n async readSdkComponentMap(inLocalSdkComponentMap = {}) {\n // debugger;\n if( Object.keys(this.sdkComponentMap.localComponentMap).length === 0 && Object.keys(this.sdkComponentMap.pegaProvidedComponentMap).length === 0) {\n\n const theLocalCompPromise = this.readLocalSdkComponentMap(inLocalSdkComponentMap);\n const thePegaCompPromise = this.readPegaSdkComponentMap(pegaSdkComponentMap);\n\n\n Promise.all([theLocalCompPromise, thePegaCompPromise]).then((/* results */) => {\n return this.sdkComponentMap;\n }).catch((error) => {\n // eslint-disable-next-line no-console\n console.error(`Error in readSdkComponentMap: ${error}`);\n })\n\n } else {\n return Promise.resolve(this.sdkComponentMap);\n }\n }\n\n async readLocalSdkComponentMap(inLocalSdkComponentMap = {}) {\n\n // debugger;\n if (Object.entries(this.getLocalComponentMap()).length === 0) {\n this.sdkComponentMap.localComponentMap = inLocalSdkComponentMap;\n }\n return Promise.resolve(this);\n }\n\n async readPegaSdkComponentMap(inPegaSdkComponentMap = {}) {\n\n // debugger;\n if (Object.entries(this.getPegaProvidedComponentMap()).length === 0) {\n this.sdkComponentMap.pegaProvidedComponentMap = inPegaSdkComponentMap;\n }\n return Promise.resolve(this);\n }\n\n\n getLocalComponentMap = () => {\n return this.sdkComponentMap.localComponentMap;\n }\n\n setLocalComponentMap(inLocalSdkComponentMap) {\n this.sdkComponentMap.localComponentMap = inLocalSdkComponentMap;\n return this.sdkComponentMap.localComponentMap;\n }\n\n getPegaProvidedComponentMap = () => {\n return this.sdkComponentMap.pegaProvidedComponentMap;\n }\n\n setPegaProvidedComponentMap = (inPegaProvidedComponentMap) => {\n this.sdkComponentMap.pegaProvidedComponentMap = inPegaProvidedComponentMap\n return this.sdkComponentMap.pegaProvidedComponentMap;\n }\n\n}\n\n\n// Implement Factory function to allow async load\n// See https://stackoverflow.com/questions/49905178/asynchronous-operations-in-constructor/49906064#49906064 for inspiration\nasync function createSdkComponentMap(inLocalComponentMap = {}) {\n // Note that our initialize function returns a promise...\n const singleton = new ComponentMap();\n await singleton.readSdkComponentMap(inLocalComponentMap);\n return singleton;\n}\n\n// Initialize exported SdkComponentMap structure\nexport async function getSdkComponentMap(inLocalComponentMap = {}) {\n return new Promise( (resolve) => {\n let idNextCheck;\n if( !SdkComponentMap && !SdkComponentMapCreateInProgress ) {\n SdkComponentMapCreateInProgress = true;\n createSdkComponentMap(inLocalComponentMap).then( theComponentMap => {\n // debugger;\n // Key initialization of SdkComponentMap\n SdkComponentMap = theComponentMap;\n SdkComponentMapCreateInProgress = false;\n // eslint-disable-next-line no-console\n console.log(`getSdkComponentMap: created SdkComponentMap singleton`);\n // Create and dispatch the SdkConfigAccessReady event\n // Not used anyplace yet but putting it in place in case we need it.\n const event = new CustomEvent(\"SdkComponentMapReady\", { });\n document.dispatchEvent(event);\n return resolve( SdkComponentMap /* .sdkComponentMap */ );\n });\n } else {\n const fnCheckForConfig = () => {\n if( SdkComponentMap ) {\n if( idNextCheck ) {\n clearInterval(idNextCheck);\n }\n return resolve( SdkComponentMap.sdkComponentMap );\n }\n idNextCheck = setInterval(fnCheckForConfig, 500);\n };\n if( SdkComponentMap ) {\n return resolve( SdkComponentMap.sdkComponentMap );\n } else {\n idNextCheck = setInterval(fnCheckForConfig, 500);\n }\n }\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sdk_component_map.js","sourceRoot":"","sources":["../../../src/bridge/helpers/sdk_component_map.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,gCAAgC;AAChC,oEAAoE;AACpE,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAE/D,yCAAyC;AAEzC,8FAA8F;AAC9F,mGAAmG;AACnG,+FAA+F;AAC/F,qDAAqD;AACrD,MAAM,CAAC,IAAI,eAAe,CAAC;AAC3B,IAAI,+BAA+B,GAAG,KAAK,CAAC;AAO5C,MAAM,YAAY;IAIhB;QAHA;;;;;WAAkC,CAAY,mBAAmB;QACjE;;;;;WAA8B;QA+D9B;;;;mBAAuB,GAAG,EAAE;gBAC1B,OAAO,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC;YAChD,CAAC;WAAA;QAOD;;;;mBAA8B,GAAG,EAAE;gBACjC,OAAO,IAAI,CAAC,eAAe,CAAC,wBAAwB,CAAC;YACvD,CAAC;WAAA;QAED;;;;mBAA8B,CAAC,0BAA0B,EAAE,EAAE;gBAC3D,IAAI,CAAC,eAAe,CAAC,wBAAwB,GAAG,0BAA0B,CAAA;gBAC1E,OAAO,IAAI,CAAC,eAAe,CAAC,wBAAwB,CAAC;YACvD,CAAC;WAAA;QA5EC,sCAAsC;QACtC,IAAI,CAAC,eAAe,GAAG,EAAE,iBAAiB,EAAE,EA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E,CAAC;iBACnD;gBACD,WAAW,GAAG,WAAW,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;YACnD,CAAC,CAAC;YACF,IAAI,eAAe,EAAG;gBACpB,OAAO,OAAO,CAAE,eAAe,CAAC,eAAe,CAAE,CAAC;aACnD;iBAAM;gBACL,WAAW,GAAG,WAAW,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;aAClD;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Helper singleton class to assist with loading and\n// accessing the SDK components\n// import localSdkComponentMap from '../../sdk-local-component-map';\nimport pegaSdkComponentMap from '../../sdk-pega-component-map';\n\n// Statically load all \"local\" components\n\n// Create a singleton for this class (with async loading of components map file) and export it\n// Note: Initializing SdkComponentMap to null seems to cause lots of compile issues with references\n// within other components and the value potentially being null (so try to leave it undefined)\n// eslint-disable-next-line import/no-mutable-exports\nexport let SdkComponentMap;\nlet SdkComponentMapCreateInProgress = false;\n\ninterface ISdkComponentMap {\n localComponentMap: Object,\n pegaProvidedComponentMap: Object\n}\n\nclass ComponentMap {\n sdkComponentMap: ISdkComponentMap; // Top level object\n isComponentMapLoaded: boolean;\n\n constructor() {\n // sdkComponentMap is top-level object\n this.sdkComponentMap = { localComponentMap: {}, pegaProvidedComponentMap: {} };\n\n // isCoComponentMapLoaded will be updated to true after the async load is complete\n this.isComponentMapLoaded = false;\n\n // pegaSdkComponents.local is the JSON object where we'll store the components that are\n // found locally or can be found in the Pega-provided repo\n this.sdkComponentMap.localComponentMap = { };\n\n this.sdkComponentMap.pegaProvidedComponentMap = { };\n\n // The \"work\" to load the config file is done (asynchronously) via the initialize\n // (Factory function) below)\n\n }\n\n /**\n * Asynchronous initialization of the config file contents.\n * @returns Promise of config file fetch\n */\n async readSdkComponentMap(inLocalSdkComponentMap = {}) {\n // debugger;\n if( Object.keys(this.sdkComponentMap.localComponentMap).length === 0 && Object.keys(this.sdkComponentMap.pegaProvidedComponentMap).length === 0) {\n\n const theLocalCompPromise = this.readLocalSdkComponentMap(inLocalSdkComponentMap);\n const thePegaCompPromise = this.readPegaSdkComponentMap(pegaSdkComponentMap);\n\n\n Promise.all([theLocalCompPromise, thePegaCompPromise]).then((/* results */) => {\n return this.sdkComponentMap;\n }).catch((error) => {\n // eslint-disable-next-line no-console\n console.error(`Error in readSdkComponentMap: ${error}`);\n })\n\n } else {\n return Promise.resolve(this.sdkComponentMap);\n }\n }\n\n async readLocalSdkComponentMap(inLocalSdkComponentMap = {}) {\n\n // debugger;\n if (Object.entries(this.getLocalComponentMap()).length === 0) {\n this.sdkComponentMap.localComponentMap = inLocalSdkComponentMap;\n }\n return Promise.resolve(this);\n }\n\n async readPegaSdkComponentMap(inPegaSdkComponentMap = {}) {\n\n // debugger;\n if (Object.entries(this.getPegaProvidedComponentMap()).length === 0) {\n this.sdkComponentMap.pegaProvidedComponentMap = inPegaSdkComponentMap;\n }\n return Promise.resolve(this);\n }\n\n\n getLocalComponentMap = () => {\n return this.sdkComponentMap.localComponentMap;\n }\n\n setLocalComponentMap(inLocalSdkComponentMap) {\n this.sdkComponentMap.localComponentMap = inLocalSdkComponentMap;\n return this.sdkComponentMap.localComponentMap;\n }\n\n getPegaProvidedComponentMap = () => {\n return this.sdkComponentMap.pegaProvidedComponentMap;\n }\n\n setPegaProvidedComponentMap = (inPegaProvidedComponentMap) => {\n this.sdkComponentMap.pegaProvidedComponentMap = inPegaProvidedComponentMap\n return this.sdkComponentMap.pegaProvidedComponentMap;\n }\n\n}\n\nexport function getComponentFromMap(inComponentName: string): any {\n let theComponentImplementation = null;\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[inComponentName];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`Requested component found ${inComponentName}: Local`);\n theComponentImplementation = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[inComponentName];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`Requested component found ${inComponentName}: Pega-provided`);\n theComponentImplementation = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`Requested component has neither Local nor Pega-provided implementation: ${inComponentName}`);\n theComponentImplementation = getComponentFromMap(\"ErrorBoundary\");\n }\n }\n return theComponentImplementation;\n}\n\n\n// Implement Factory function to allow async load\n// See https://stackoverflow.com/questions/49905178/asynchronous-operations-in-constructor/49906064#49906064 for inspiration\nasync function createSdkComponentMap(inLocalComponentMap = {}) {\n // Note that our initialize function returns a promise...\n const singleton = new ComponentMap();\n await singleton.readSdkComponentMap(inLocalComponentMap);\n return singleton;\n}\n\n// Initialize exported SdkComponentMap structure\nexport async function getSdkComponentMap(inLocalComponentMap = {}) {\n return new Promise( (resolve) => {\n let idNextCheck;\n if( !SdkComponentMap && !SdkComponentMapCreateInProgress ) {\n SdkComponentMapCreateInProgress = true;\n createSdkComponentMap(inLocalComponentMap).then( theComponentMap => {\n // debugger;\n // Key initialization of SdkComponentMap\n SdkComponentMap = theComponentMap;\n SdkComponentMapCreateInProgress = false;\n // eslint-disable-next-line no-console\n console.log(`getSdkComponentMap: created SdkComponentMap singleton`);\n // Create and dispatch the SdkConfigAccessReady event\n // Not used anyplace yet but putting it in place in case we need it.\n const event = new CustomEvent(\"SdkComponentMapReady\", { });\n document.dispatchEvent(event);\n return resolve( SdkComponentMap /* .sdkComponentMap */ );\n });\n } else {\n const fnCheckForConfig = () => {\n if( SdkComponentMap ) {\n if( idNextCheck ) {\n clearInterval(idNextCheck);\n }\n return resolve( SdkComponentMap.sdkComponentMap );\n }\n idNextCheck = setInterval(fnCheckForConfig, 500);\n };\n if( SdkComponentMap ) {\n return resolve( SdkComponentMap.sdkComponentMap );\n } else {\n idNextCheck = setInterval(fnCheckForConfig, 500);\n }\n }\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react_pconnect.d.ts","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react_pconnect.d.ts","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":"AAmCO,0EASN;;AAkID;;;;;GAKG;AACH,2EA4JC"}
|
|
@@ -16,7 +16,6 @@ const isClassIDCompare = (key, prev) => {
|
|
|
16
16
|
const routingInfoCompare = (next, prev) => {
|
|
17
17
|
return ('routingInfo' in next &&
|
|
18
18
|
(!shallowEqual(next.routingInfo, prev.routingInfo) ||
|
|
19
|
-
// eslint-disable-next-line no-undef
|
|
20
19
|
!PCore.isDeepEqual(next.routingInfo, prev.routingInfo)));
|
|
21
20
|
};
|
|
22
21
|
/** Generate unique id for elements */
|
|
@@ -26,9 +25,7 @@ const createUID = () => {
|
|
|
26
25
|
export const setVisibilityForList = (c11nEnv, visibility) => {
|
|
27
26
|
const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();
|
|
28
27
|
// usecase:multiselect, fieldgroup, editable table
|
|
29
|
-
if (
|
|
30
|
-
// eslint-disable-next-line no-undef
|
|
31
|
-
(selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) ||
|
|
28
|
+
if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) ||
|
|
32
29
|
(renderMode === 'Editable' && referenceList)) {
|
|
33
30
|
c11nEnv.getListActions().setVisibility(visibility);
|
|
34
31
|
}
|
|
@@ -77,7 +74,6 @@ const connectRedux = (component, c11nEnv) => {
|
|
|
77
74
|
const allStateProps = c11nEnv.getStateProps();
|
|
78
75
|
for (const key in allStateProps) {
|
|
79
76
|
if ((isClassIDCompare(key, prev) && !shallowEqual(next[key], prev[key])) ||
|
|
80
|
-
// eslint-disable-next-line no-undef
|
|
81
77
|
(next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo))) {
|
|
82
78
|
return false;
|
|
83
79
|
}
|
|
@@ -86,7 +82,6 @@ const connectRedux = (component, c11nEnv) => {
|
|
|
86
82
|
// primaryFields and secondary Fields
|
|
87
83
|
if (allStateProps.status === '.pyStatusWork') {
|
|
88
84
|
for (const key in prev) {
|
|
89
|
-
// eslint-disable-next-line no-undef
|
|
90
85
|
if (!PCore.isDeepEqual(next[key], prev[key])) {
|
|
91
86
|
return false;
|
|
92
87
|
}
|
|
@@ -99,7 +94,6 @@ const connectRedux = (component, c11nEnv) => {
|
|
|
99
94
|
};
|
|
100
95
|
const getComponent = c11nEnv => {
|
|
101
96
|
// PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore
|
|
102
|
-
// eslint-disable-next-line no-undef
|
|
103
97
|
const ComponentsRegistry = PCore.getComponentsRegistry();
|
|
104
98
|
const type = c11nEnv.getComponentName();
|
|
105
99
|
const componentObj = ComponentsRegistry.getComponent(type);
|
|
@@ -284,7 +278,6 @@ const createPConnectComponent = () => {
|
|
|
284
278
|
};
|
|
285
279
|
// Move these into SdkConstellationReady so PCore is available
|
|
286
280
|
document.addEventListener('SdkConstellationReady', () => {
|
|
287
|
-
// eslint-disable-next-line no-undef
|
|
288
281
|
PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {
|
|
289
282
|
const PConnectComp = createPConnectComponent();
|
|
290
283
|
return createElement(PConnectComp, {
|
|
@@ -294,15 +287,12 @@ document.addEventListener('SdkConstellationReady', () => {
|
|
|
294
287
|
...{ additionalProps }
|
|
295
288
|
});
|
|
296
289
|
});
|
|
297
|
-
// eslint-disable-next-line no-undef
|
|
298
290
|
PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {
|
|
299
291
|
const promises = [];
|
|
300
292
|
componentNames.forEach(comp => {
|
|
301
293
|
if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {
|
|
302
294
|
if (!ComponentMap[comp]) {
|
|
303
|
-
// eslint-disable-next-line no-undef
|
|
304
295
|
const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;
|
|
305
|
-
// eslint-disable-next-line no-undef
|
|
306
296
|
promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));
|
|
307
297
|
}
|
|
308
298
|
else {
|
|
@@ -313,9 +303,7 @@ document.addEventListener('SdkConstellationReady', () => {
|
|
|
313
303
|
}
|
|
314
304
|
if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {
|
|
315
305
|
ComponentMap[comp].scripts.forEach(script => {
|
|
316
|
-
promises.push(
|
|
317
|
-
// eslint-disable-next-line no-undef
|
|
318
|
-
PCore.getAssetLoader().getLoader()(script, 'script'));
|
|
306
|
+
promises.push(PCore.getAssetLoader().getLoader()(script, 'script'));
|
|
319
307
|
});
|
|
320
308
|
}
|
|
321
309
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react_pconnect.js","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,YAAY,EAAE,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC,CAAC,2CAA2C;AAC1H,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,iHAAiH;AAEjH,0FAA0F;AAC1F,uFAAuF;AACvF,4BAA4B;AAE5B,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;IACrC,OAAO,CAAC,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IACxC,O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,CAAC,CAAC,CAAC;iBACrE;qBAAM;oBACL,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;wBACnE,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BAC1C,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;wBAClC,CAAC,CAAC,CAAC;qBACJ;oBACD,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;wBACnE,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BAC1C,QAAQ,CAAC,IAAI;4BACX,oCAAoC;4BACpC,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CACrD,CAAC;wBACJ,CAAC,CAAC,CAAC;qBACJ;iBACF;aACF;QACH,CAAC,CAAC,CAAC;QACH;;;;;YAKI;QACJ,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC;AAEvC;;mDAEmD;AACnD,4BAA4B;AAC5B,mBAAmB;AACnB,YAAY;AACZ,4BAA4B;AAC5B,qBAAqB;AACrB,KAAK","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport React, { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, shallowEqual } from 'react-redux';\n\nimport ComponentMap, { LazyMap as LazyComponentMap } from '../components_map'; // was '../../../../../src/components_map';\nimport StoreContext from './Context/StoreContext';\n\n// const pathToComponents = \"../../../../../src/components\"; /* When bridge was local, it was \"../components\" */\n\n// For now, NOT doing lazy loading - needs some work on the loader to work with TypeScript\n// As we add components, we'll need to import them here and add to the switch statement\n// below in getComponent!\n\nimport ErrorBoundary from '../components/infra/ErrorBoundary';\n\nimport { SdkComponentMap } from './helpers/sdk_component_map';\n\nconst isClassIDCompare = (key, prev) => {\n return !(key === 'classID' && !prev[key]);\n};\n\nconst routingInfoCompare = (next, prev) => {\n return (\n 'routingInfo' in next &&\n (!shallowEqual(next.routingInfo, prev.routingInfo) ||\n // eslint-disable-next-line no-undef\n !PCore.isDeepEqual(next.routingInfo, prev.routingInfo))\n );\n};\n\n/** Generate unique id for elements */\nconst createUID = () => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if (\n // eslint-disable-next-line no-undef\n (selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) ||\n (renderMode === 'Editable' && referenceList)\n ) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nfunction withVisibility(WrappedComponent) {\n // eslint-disable-next-line react/prefer-stateless-function\n return class extends Component {\n render() {\n const { visibility } = this.props;\n\n if (visibility === false) {\n return null;\n }\n return <WrappedComponent {...this.props} />;\n }\n };\n}\n\nconst connectRedux = (component, c11nEnv) => {\n return connect(\n (state, ownProps) => {\n let addProps = {};\n const obj = {};\n // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render\n if (!ownProps.getPConnect) {\n // eslint-disable-next-line no-console\n console.error('connectRedux ownProps are not defined');\n } else {\n c11nEnv = ownProps.getPConnect();\n }\n\n if (typeof component.additionalProps === 'object') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps);\n } else if (typeof component.additionalProps === 'function') {\n addProps = c11nEnv.resolveConfigProps(\n component.additionalProps(state, ownProps.getPConnect)\n );\n }\n\n c11nEnv.getConfigProps(obj);\n\n // populate additional props which are component specific and not present in configurations\n // This block can be removed once all these props will be added as part of configs\n c11nEnv.populateAdditionalProps(obj);\n\n return {\n ...obj,\n ...addProps\n };\n },\n null,\n null,\n {\n context: StoreContext,\n areStatePropsEqual: (next, prev) => {\n const allStateProps = c11nEnv.getStateProps();\n for (const key in allStateProps) {\n if (\n (isClassIDCompare(key, prev) && !shallowEqual(next[key], prev[key])) ||\n // eslint-disable-next-line no-undef\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo))\n ) {\n return false;\n }\n }\n\n // For CaseSummary (when status === \".pyStatusWork\"), we need to compare changes in\n // primaryFields and secondary Fields\n if (allStateProps.status === '.pyStatusWork') {\n for (const key in prev) {\n // eslint-disable-next-line no-undef\n if (!PCore.isDeepEqual(next[key], prev[key])) {\n return false;\n }\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !routingInfoCompare(next, prev);\n }\n }\n )(component);\n};\n\nconst getComponent = c11nEnv => {\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n // eslint-disable-next-line no-undef\n const ComponentsRegistry = PCore.getComponentsRegistry();\n const type = c11nEnv.getComponentName();\n\n const componentObj = ComponentsRegistry.getComponent(type);\n const componentType = (componentObj && componentObj.component) || type;\n\n // JEA - modifying logic before bailing to RootContainer logic to work around async loading problem\n let component = LazyComponentMap[componentType]; /* || window[componentType] */\n\n // NOTE: Until we get lazy loading working, maintain this for each component we add\n if (component === undefined) {\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`react_pconnect getComponent found ${componentType}: Local`);\n component = theLocalComponent;\n } else {\n const thePegaProvidedComponent =\n SdkComponentMap.getPegaProvidedComponentMap()[componentType];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`react_pconnect getComponent found ${componentType}: Pega-provided`);\n component = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);\n component = ErrorBoundary;\n }\n }\n } else {\n // We no longer handle the \"old\" switch statement that was here in the original packaging.\n // All components seen here need to be in the SdkComponentMap\n // eslint-disable-next-line no-console\n console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);\n }\n } else {\n // eslint-disable-next-line no-console\n console.log(`getComponent doesn't have an entry for component ${component}`);\n component = ErrorBoundary;\n }\n\n if (c11nEnv.isConditionExist()) {\n return connectRedux(withVisibility(component), c11nEnv);\n }\n\n return connectRedux(component, c11nEnv);\n};\n\n/**\n *\n * @param {*} declarative\n * @returns {React.Components<Props, State>}\n\n */\nconst createPConnectComponent = () => {\n /**\n * JEA - add Type info via JSdoc syntax...\n * @extends {React.Components<Props, State>}\n * createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object\n * to pre-process meta data of each componnet.\n * - Wraps each child in a component with PConnect\n * - Process all actions and make them avaiable in props\n * - Filters all properties in metadata and keeps them\n * __internal for re-render process through connect\n */\n class PConnect extends Component {\n constructor(props) {\n super(props);\n const { getPConnect } = this.props;\n this.state = {\n hasError: false\n };\n\n this.eventHandler = this.eventHandler.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n\n this.c11nEnv = getPConnect();\n this.Control = getComponent(this.c11nEnv);\n this.actionsAPI = this.c11nEnv.getActionsApi();\n\n this.processActions(this.c11nEnv);\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidMount() {\n this.c11nEnv.addFormField();\n setVisibilityForList(this.c11nEnv, true);\n }\n\n componentDidCatch(error, info) {\n // eslint-disable-next-line no-console\n console.error(\n `Error while Rendering the component ${this.componentName} : `,\n error,\n info.componentStack\n );\n }\n\n componentWillUnmount() {\n if (this.c11nEnv.removeFormField) {\n this.c11nEnv.removeFormField();\n setVisibilityForList(this.c11nEnv, false);\n }\n }\n\n /*\n * processActions to see all actions in meta and adds event in props.\n * Attaches common handler (eventHandler) for all actions.\n */\n processActions() {\n if (this.c11nEnv.isEditable()) {\n this.c11nEnv.setAction('onChange', this.changeHandler);\n this.c11nEnv.setAction('onBlur', this.eventHandler);\n }\n }\n\n // Using separate handle for change as in case of dropdown, native click is mapped to react change\n changeHandler(event) {\n this.actionsAPI.changeHandler(this.c11nEnv, event);\n // getActionProcessor().changeHandler(this.c11nEnv, event);\n }\n\n eventHandler(event) {\n this.actionsAPI.eventHandler(this.c11nEnv, event);\n // getActionProcessor().eventHandler(this.c11nEnv, event);\n }\n\n createChildren() {\n const { getPConnect } = this.props;\n if (getPConnect().hasChildren() && getPConnect().getChildren()) {\n return getPConnect()\n .getChildren()\n .map(childProps => <PConnect {...childProps} />);\n }\n return null;\n }\n\n getKey() {\n const { getPConnect } = this.props;\n const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();\n let key = !viewName\n ? createUID()\n : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;\n\n // In the case of pyDetails the key must be unigue for each instance\n if (viewName && viewName.toUpperCase() === 'PYDETAILS') {\n key += `!${getPConnect().getCaseInfo().getID()}`;\n }\n\n return key.toUpperCase();\n }\n\n render() {\n const { hasError } = this.state;\n const { getPConnect, additionalProps, ...otherProps } = this.props;\n\n if (hasError) {\n // You can render any custom fallback UI\n // console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);\n return <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />;\n }\n\n const props = this.c11nEnv.getConfigProps();\n const actions = this.c11nEnv.getActions();\n const finalProps = {\n ...props,\n getPConnect,\n ...actions,\n additionalProps,\n ...otherProps\n };\n\n // If the new component is a reference node then mark with a unique key\n if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {\n finalProps.key = this.getKey();\n }\n\n // console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);\n\n return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;\n }\n }\n\n // eslint-disable-next-line react/static-property-placement\n PConnect.propTypes = {\n // __internal: PropTypes.object.isRequired,\n // meta: PropTypes.object.isRequired,\n // configObject: PropTypes.object.isRequired,\n getPConnect: PropTypes.func.isRequired,\n additionalProps: PropTypes.shape({\n noLabel: PropTypes.bool,\n readOnly: PropTypes.bool\n }),\n validatemessage: PropTypes.string\n };\n\n // eslint-disable-next-line react/static-property-placement\n PConnect.defaultProps = {\n additionalProps: {},\n validatemessage: ''\n };\n\n return PConnect;\n};\n\n// Move these into SdkConstellationReady so PCore is available\ndocument.addEventListener('SdkConstellationReady', () => {\n // eslint-disable-next-line no-undef\n PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {\n const PConnectComp = createPConnectComponent();\n return createElement(PConnectComp, {\n ...c11nEnv,\n ...c11nEnv.getPConnect().getConfigProps(),\n ...c11nEnv.getPConnect().getActions(),\n ...{ additionalProps }\n });\n });\n\n // eslint-disable-next-line no-undef\n PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {\n const promises = [];\n componentNames.forEach(comp => {\n if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {\n if (!ComponentMap[comp]) {\n // eslint-disable-next-line no-undef\n const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;\n // eslint-disable-next-line no-undef\n promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));\n } else {\n if (ComponentMap[comp].modules && ComponentMap[comp].modules.length) {\n ComponentMap[comp].modules.forEach(module => {\n LazyComponentMap[comp] = module;\n });\n }\n if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {\n ComponentMap[comp].scripts.forEach(script => {\n promises.push(\n // eslint-disable-next-line no-undef\n PCore.getAssetLoader().getLoader()(script, 'script')\n );\n });\n }\n }\n }\n });\n /* Promise.all rejects or accepts all or none. This causes entire component loader to fail\n in case there is a single failure.\n Using allSettled to allow Promise to be resolved even if there are failed components\n Note : This is a liberty taken at component loader and unwise to be used at\n asset loader which will still use Promise.all\n */\n await Promise.allSettled(promises);\n });\n});\n\nexport default createPConnectComponent;\n\n/* These APIs need to be exposed for authoring bridge\nWill be removed when pxbootstrap and constellation_bridge is cleaned up\nto use single bootstrap file from constellation */\n// window.authoringUtils = {\n// createElement,\n// render,\n// unmountComponentAtNode,\n// LazyComponentMap\n// };\n"]}
|
|
1
|
+
{"version":3,"file":"react_pconnect.js","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,YAAY,EAAE,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC,CAAC,2CAA2C;AAC1H,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,iHAAiH;AAEjH,0FAA0F;AAC1F,uFAAuF;AACvF,4BAA4B;AAE5B,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;IACrC,OAAO,CAAC,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IACxC,OAAO,CACL,aAAa,IAAI,IAAI;QACrB,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC;YAChD,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAC1D,CAAC;AACJ,CAAC,CAAC;AAEF,sCAAsC;AACtC,MAAM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AAC,OAAO,CAAC,MAAM,EAAE;wBACnE,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BAC1C,QAAQ,CAAC,IAAI,CACX,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CACrD,CAAC;wBACJ,CAAC,CAAC,CAAC;qBACJ;iBACF;aACF;QACH,CAAC,CAAC,CAAC;QACH;;;;;YAKI;QACJ,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC;AAEvC;;mDAEmD;AACnD,4BAA4B;AAC5B,mBAAmB;AACnB,YAAY;AACZ,4BAA4B;AAC5B,qBAAqB;AACrB,KAAK","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport React, { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, shallowEqual } from 'react-redux';\n\nimport ComponentMap, { LazyMap as LazyComponentMap } from '../components_map'; // was '../../../../../src/components_map';\nimport StoreContext from './Context/StoreContext';\n\n// const pathToComponents = \"../../../../../src/components\"; /* When bridge was local, it was \"../components\" */\n\n// For now, NOT doing lazy loading - needs some work on the loader to work with TypeScript\n// As we add components, we'll need to import them here and add to the switch statement\n// below in getComponent!\n\nimport ErrorBoundary from '../components/infra/ErrorBoundary';\n\nimport { SdkComponentMap } from './helpers/sdk_component_map';\n\nconst isClassIDCompare = (key, prev) => {\n return !(key === 'classID' && !prev[key]);\n};\n\nconst routingInfoCompare = (next, prev) => {\n return (\n 'routingInfo' in next &&\n (!shallowEqual(next.routingInfo, prev.routingInfo) ||\n !PCore.isDeepEqual(next.routingInfo, prev.routingInfo))\n );\n};\n\n/** Generate unique id for elements */\nconst createUID = () => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if (\n (selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) ||\n (renderMode === 'Editable' && referenceList)\n ) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nfunction withVisibility(WrappedComponent) {\n // eslint-disable-next-line react/prefer-stateless-function\n return class extends Component {\n render() {\n const { visibility } = this.props;\n\n if (visibility === false) {\n return null;\n }\n return <WrappedComponent {...this.props} />;\n }\n };\n}\n\nconst connectRedux = (component, c11nEnv) => {\n return connect(\n (state, ownProps) => {\n let addProps = {};\n const obj = {};\n // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render\n if (!ownProps.getPConnect) {\n // eslint-disable-next-line no-console\n console.error('connectRedux ownProps are not defined');\n } else {\n c11nEnv = ownProps.getPConnect();\n }\n\n if (typeof component.additionalProps === 'object') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps);\n } else if (typeof component.additionalProps === 'function') {\n addProps = c11nEnv.resolveConfigProps(\n component.additionalProps(state, ownProps.getPConnect)\n );\n }\n\n c11nEnv.getConfigProps(obj);\n\n // populate additional props which are component specific and not present in configurations\n // This block can be removed once all these props will be added as part of configs\n c11nEnv.populateAdditionalProps(obj);\n\n return {\n ...obj,\n ...addProps\n };\n },\n null,\n null,\n {\n context: StoreContext,\n areStatePropsEqual: (next, prev) => {\n const allStateProps = c11nEnv.getStateProps();\n for (const key in allStateProps) {\n if (\n (isClassIDCompare(key, prev) && !shallowEqual(next[key], prev[key])) ||\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo))\n ) {\n return false;\n }\n }\n\n // For CaseSummary (when status === \".pyStatusWork\"), we need to compare changes in\n // primaryFields and secondary Fields\n if (allStateProps.status === '.pyStatusWork') {\n for (const key in prev) {\n if (!PCore.isDeepEqual(next[key], prev[key])) {\n return false;\n }\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !routingInfoCompare(next, prev);\n }\n }\n )(component);\n};\n\nconst getComponent = c11nEnv => {\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n const ComponentsRegistry = PCore.getComponentsRegistry();\n const type = c11nEnv.getComponentName();\n\n const componentObj = ComponentsRegistry.getComponent(type);\n const componentType = (componentObj && componentObj.component) || type;\n\n // JEA - modifying logic before bailing to RootContainer logic to work around async loading problem\n let component = LazyComponentMap[componentType]; /* || window[componentType] */\n\n // NOTE: Until we get lazy loading working, maintain this for each component we add\n if (component === undefined) {\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`react_pconnect getComponent found ${componentType}: Local`);\n component = theLocalComponent;\n } else {\n const thePegaProvidedComponent =\n SdkComponentMap.getPegaProvidedComponentMap()[componentType];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`react_pconnect getComponent found ${componentType}: Pega-provided`);\n component = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);\n component = ErrorBoundary;\n }\n }\n } else {\n // We no longer handle the \"old\" switch statement that was here in the original packaging.\n // All components seen here need to be in the SdkComponentMap\n // eslint-disable-next-line no-console\n console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);\n }\n } else {\n // eslint-disable-next-line no-console\n console.log(`getComponent doesn't have an entry for component ${component}`);\n component = ErrorBoundary;\n }\n\n if (c11nEnv.isConditionExist()) {\n return connectRedux(withVisibility(component), c11nEnv);\n }\n\n return connectRedux(component, c11nEnv);\n};\n\n/**\n *\n * @param {*} declarative\n * @returns {React.Components<Props, State>}\n\n */\nconst createPConnectComponent = () => {\n /**\n * JEA - add Type info via JSdoc syntax...\n * @extends {React.Components<Props, State>}\n * createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object\n * to pre-process meta data of each componnet.\n * - Wraps each child in a component with PConnect\n * - Process all actions and make them avaiable in props\n * - Filters all properties in metadata and keeps them\n * __internal for re-render process through connect\n */\n class PConnect extends Component {\n constructor(props) {\n super(props);\n const { getPConnect } = this.props;\n this.state = {\n hasError: false\n };\n\n this.eventHandler = this.eventHandler.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n\n this.c11nEnv = getPConnect();\n this.Control = getComponent(this.c11nEnv);\n this.actionsAPI = this.c11nEnv.getActionsApi();\n\n this.processActions(this.c11nEnv);\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidMount() {\n this.c11nEnv.addFormField();\n setVisibilityForList(this.c11nEnv, true);\n }\n\n componentDidCatch(error, info) {\n // eslint-disable-next-line no-console\n console.error(\n `Error while Rendering the component ${this.componentName} : `,\n error,\n info.componentStack\n );\n }\n\n componentWillUnmount() {\n if (this.c11nEnv.removeFormField) {\n this.c11nEnv.removeFormField();\n setVisibilityForList(this.c11nEnv, false);\n }\n }\n\n /*\n * processActions to see all actions in meta and adds event in props.\n * Attaches common handler (eventHandler) for all actions.\n */\n processActions() {\n if (this.c11nEnv.isEditable()) {\n this.c11nEnv.setAction('onChange', this.changeHandler);\n this.c11nEnv.setAction('onBlur', this.eventHandler);\n }\n }\n\n // Using separate handle for change as in case of dropdown, native click is mapped to react change\n changeHandler(event) {\n this.actionsAPI.changeHandler(this.c11nEnv, event);\n // getActionProcessor().changeHandler(this.c11nEnv, event);\n }\n\n eventHandler(event) {\n this.actionsAPI.eventHandler(this.c11nEnv, event);\n // getActionProcessor().eventHandler(this.c11nEnv, event);\n }\n\n createChildren() {\n const { getPConnect } = this.props;\n if (getPConnect().hasChildren() && getPConnect().getChildren()) {\n return getPConnect()\n .getChildren()\n .map(childProps => <PConnect {...childProps} />);\n }\n return null;\n }\n\n getKey() {\n const { getPConnect } = this.props;\n const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();\n let key = !viewName\n ? createUID()\n : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;\n\n // In the case of pyDetails the key must be unigue for each instance\n if (viewName && viewName.toUpperCase() === 'PYDETAILS') {\n key += `!${getPConnect().getCaseInfo().getID()}`;\n }\n\n return key.toUpperCase();\n }\n\n render() {\n const { hasError } = this.state;\n const { getPConnect, additionalProps, ...otherProps } = this.props;\n\n if (hasError) {\n // You can render any custom fallback UI\n // console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);\n return <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />;\n }\n\n const props = this.c11nEnv.getConfigProps();\n const actions = this.c11nEnv.getActions();\n const finalProps = {\n ...props,\n getPConnect,\n ...actions,\n additionalProps,\n ...otherProps\n };\n\n // If the new component is a reference node then mark with a unique key\n if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {\n finalProps.key = this.getKey();\n }\n\n // console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);\n\n return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;\n }\n }\n\n // eslint-disable-next-line react/static-property-placement\n PConnect.propTypes = {\n // __internal: PropTypes.object.isRequired,\n // meta: PropTypes.object.isRequired,\n // configObject: PropTypes.object.isRequired,\n getPConnect: PropTypes.func.isRequired,\n additionalProps: PropTypes.shape({\n noLabel: PropTypes.bool,\n readOnly: PropTypes.bool\n }),\n validatemessage: PropTypes.string\n };\n\n // eslint-disable-next-line react/static-property-placement\n PConnect.defaultProps = {\n additionalProps: {},\n validatemessage: ''\n };\n\n return PConnect;\n};\n\n// Move these into SdkConstellationReady so PCore is available\ndocument.addEventListener('SdkConstellationReady', () => {\n PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {\n const PConnectComp = createPConnectComponent();\n return createElement(PConnectComp, {\n ...c11nEnv,\n ...c11nEnv.getPConnect().getConfigProps(),\n ...c11nEnv.getPConnect().getActions(),\n ...{ additionalProps }\n });\n });\n\n PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {\n const promises = [];\n componentNames.forEach(comp => {\n if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {\n if (!ComponentMap[comp]) {\n const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;\n promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));\n } else {\n if (ComponentMap[comp].modules && ComponentMap[comp].modules.length) {\n ComponentMap[comp].modules.forEach(module => {\n LazyComponentMap[comp] = module;\n });\n }\n if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {\n ComponentMap[comp].scripts.forEach(script => {\n promises.push(\n PCore.getAssetLoader().getLoader()(script, 'script')\n );\n });\n }\n }\n }\n });\n /* Promise.all rejects or accepts all or none. This causes entire component loader to fail\n in case there is a single failure.\n Using allSettled to allow Promise to be resolved even if there are failed components\n Note : This is a liberty taken at component loader and unwise to be used at\n asset loader which will still use Promise.all\n */\n await Promise.allSettled(promises);\n });\n});\n\nexport default createPConnectComponent;\n\n/* These APIs need to be exposed for authoring bridge\nWill be removed when pxbootstrap and constellation_bridge is cleaned up\nto use single bootstrap file from constellation */\n// window.authoringUtils = {\n// createElement,\n// render,\n// unmountComponentAtNode,\n// LazyComponentMap\n// };\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface AlertBannerProps {
|
|
3
|
+
id: string;
|
|
4
|
+
variant: string;
|
|
5
|
+
messages: Array<string>;
|
|
6
|
+
onDismiss?: any;
|
|
7
|
+
}
|
|
8
|
+
export default function AlertBanner(props: AlertBannerProps): JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=AlertBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":";AAMA,UAAU,gBAAgB;IAExB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,SAAS,CAAC,EAAE,GAAG,CAAA;CAChB;AAUD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAC,gBAAgB,eAwBzD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Alert } from '@material-ui/lab';
|
|
3
|
+
const SEVERITY_MAP = {
|
|
4
|
+
urgent: 'error',
|
|
5
|
+
warning: 'warning',
|
|
6
|
+
success: 'success',
|
|
7
|
+
info: 'info'
|
|
8
|
+
};
|
|
9
|
+
export default function AlertBanner(props) {
|
|
10
|
+
const { id, variant, messages, onDismiss } = props;
|
|
11
|
+
let additionalProps = {};
|
|
12
|
+
if (onDismiss) {
|
|
13
|
+
additionalProps = {
|
|
14
|
+
onClose: onDismiss
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return (React.createElement("div", { id: id }, messages.map(message => (React.createElement(Alert, { key: message, variant: 'outlined', severity: SEVERITY_MAP[variant], ...additionalProps }, message)))));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=AlertBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertBanner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAczC,MAAM,YAAY,GAAG;IACnB,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAsB;IACxD,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACnD,IAAI,eAAe,GAAG,EAAE,CAAC;IAEzB,IAAI,SAAS,EAAE;QACb,eAAe,GAAG;YAChB,OAAO,EAAE,SAAS;SACnB,CAAC;KACH;IAED,OAAO,CACL,6BAAK,EAAE,EAAE,EAAE,IACR,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CACvB,oBAAC,KAAK,IACJ,GAAG,EAAE,OAAO,EACZ,OAAO,EAAC,UAAU,EAClB,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,KAC3B,eAAe,IAElB,OAAO,CACF,CACT,CAAC,CACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Alert } from '@material-ui/lab';\n\n\n// AlertBanner is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface AlertBannerProps {\n // If any, enter additional props that only exist on Date here\n id: string,\n variant: string,\n messages: Array<string>,\n onDismiss?: any\n}\n\n\nconst SEVERITY_MAP = {\n urgent: 'error',\n warning: 'warning',\n success: 'success',\n info: 'info'\n};\n\nexport default function AlertBanner(props:AlertBannerProps) {\n const { id, variant, messages, onDismiss } = props;\n let additionalProps = {};\n\n if (onDismiss) {\n additionalProps = {\n onClose: onDismiss\n };\n }\n\n return (\n <div id={id}>\n {messages.map(message => (\n <Alert\n key={message}\n variant='outlined'\n severity={SEVERITY_MAP[variant]}\n {...additionalProps}\n >\n {message}\n </Alert>\n ))}\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { default } from './AlertBanner';\n"]}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './Banner.css';
|
|
3
|
-
|
|
3
|
+
interface BannerProps {
|
|
4
|
+
a: any;
|
|
5
|
+
b: any;
|
|
6
|
+
banner: {
|
|
7
|
+
variant: any;
|
|
8
|
+
backgroundColor: any;
|
|
9
|
+
title: any;
|
|
10
|
+
message: any;
|
|
11
|
+
backgroundImage: any;
|
|
12
|
+
tintImage: any;
|
|
13
|
+
};
|
|
14
|
+
variant: any;
|
|
15
|
+
}
|
|
16
|
+
export default function Banner(props: BannerProps): JSX.Element;
|
|
17
|
+
export {};
|
|
4
18
|
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":";AAEA,OAAO,cAAc,CAAC;AAKtB,UAAU,WAAW;IAEnB,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,GAAG,CAAC;IACP,MAAM,EAAE;QAAE,OAAO,EAAE,GAAG,CAAC;QAAC,eAAe,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,GAAG,CAAC;QAAC,OAAO,EAAE,GAAG,CAAC;QAAC,eAAe,EAAE,GAAG,CAAC;QAAC,SAAS,EAAE,GAAG,CAAA;KAAE,CAAC;IAC/G,OAAO,EAAE,GAAG,CAAA;CACb;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAC,WAAW,eA+B/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,cAAc,CAAC;AAatB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAiB;IAC9C,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAC,GAAG,KAAK,CAAC;IACvC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IACnD,MAAM,UAAU,GAAG;QACjB,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACpB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;KACtB,CAAC;IACF,OAAO,CACL,6BAAK,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE;QAClC,6BACE,SAAS,EAAC,wBAAwB,EAClC,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,eAAe,GAAG,EAAE;YAErD,6BAAK,SAAS,EAAC,0BAA0B;gBACvC;oBACE,4BAAI,SAAS,EAAC,OAAO,IAAE,KAAK,CAAM;oBAClC,2BAAG,SAAS,EAAC,SAAS,IAAE,OAAO,CAAK,CAChC,CACF,CACF;QACN,oBAAC,IAAI,IAAC,SAAS,QAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,CAAC;YAC/D,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,IAC7D,CAAC,CACG;YACP,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,IAC7D,CAAC,CACG,CACF,CACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport Grid from '@material-ui/core/Grid';\nimport './Banner.css';\n\n// AlertBanner is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\n\ninterface BannerProps {\n // If any, enter additional props that only exist on this component\n a: any,\n b: any,\n banner: { variant: any, backgroundColor: any, title: any, message: any, backgroundImage: any, tintImage: any },\n variant: any\n}\n\nexport default function Banner(props:BannerProps) {\n const { a, b, banner, variant} = props;\n const { title, message, backgroundImage } = banner;\n const variantMap = {\n 'two-column': [6, 6],\n 'narrow-wide': [4, 8],\n 'wide-narrow': [8, 4]\n };\n return (\n <div style={{ marginBottom: '2rem' }}>\n <div\n className='background-image-style'\n style={{ backgroundImage: `url(${backgroundImage})` }}\n >\n <div className='background-style content'>\n <div>\n <h1 className='title'>{title}</h1>\n <p className='message'>{message}</p>\n </div>\n </div>\n </div>\n <Grid container item xs={12} className='banner-layout' spacing={1}>\n <Grid item xs={variantMap[variant][0]} style={{ padding: '1em' }}>\n {a}\n </Grid>\n <Grid item xs={variantMap[variant][1]} style={{ padding: '1em' }}>\n {b}\n </Grid>\n </Grid>\n </div>\n );\n}\n"]}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import './CaseSummaryFields.css';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
showStatus: PropTypes.Requireable<boolean>;
|
|
9
|
-
theFields: PropTypes.Requireable<(object | null | undefined)[]>;
|
|
10
|
-
};
|
|
3
|
+
interface CaseSummaryFieldsProps {
|
|
4
|
+
status?: string;
|
|
5
|
+
showStatus?: boolean;
|
|
6
|
+
theFields: Array<any> | any | never;
|
|
11
7
|
}
|
|
12
|
-
export default CaseSummaryFields;
|
|
8
|
+
export default function CaseSummaryFields(props: CaseSummaryFieldsProps): JSX.Element;
|
|
9
|
+
export {};
|
|
13
10
|
//# sourceMappingURL=CaseSummaryFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":";AAQA,OAAO,yBAAyB,CAAC;AAMjC,UAAU,sBAAsB;IAE9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAA;CACpC;AAGD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAyNtE"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import isDeepEqual from 'fast-deep-equal/react';
|
|
4
3
|
import Grid from '@material-ui/core/Grid';
|
|
5
4
|
import TextField from '@material-ui/core/TextField';
|
|
6
|
-
import Operator from '../Operator';
|
|
7
5
|
import { getDateFormatInfo } from '../../helpers/date-format-utils';
|
|
8
6
|
import { getCurrencyOptions } from '../../field/Currency/currency-utils';
|
|
7
|
+
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
9
8
|
import './CaseSummaryFields.css';
|
|
10
9
|
import { format } from '../../helpers/formatters';
|
|
11
10
|
export default function CaseSummaryFields(props) {
|
|
11
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
12
|
+
const Operator = getComponentFromMap("Operator");
|
|
12
13
|
const { status, showStatus, theFields } = props;
|
|
13
14
|
const [theFieldsToRender, setFieldsToRender] = useState([]);
|
|
14
15
|
const [theFieldsAsGridItems, setFieldsAsGridItems] = useState([]);
|
|
@@ -132,9 +133,4 @@ export default function CaseSummaryFields(props) {
|
|
|
132
133
|
return (React.createElement(React.Fragment, null,
|
|
133
134
|
React.createElement(Grid, { container: true, className: 'psdk-case-summary-fields' }, theFieldsAsGridItems)));
|
|
134
135
|
}
|
|
135
|
-
CaseSummaryFields.propTypes = {
|
|
136
|
-
status: PropTypes.string,
|
|
137
|
-
showStatus: PropTypes.bool,
|
|
138
|
-
theFields: PropTypes.arrayOf(PropTypes.object)
|
|
139
|
-
};
|
|
140
136
|
//# sourceMappingURL=CaseSummaryFields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSummaryFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,MAAM,CAAC,OAAO,U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B,CAAC,CAAC,CAAC;IAExB,MAAM,mBAAmB,GAAG,SAAS,CAAC;IAEtC,sFAAsF;IACtF,6BAA6B;IAC7B,IAAI,UAAU,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE;QAClD,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC;QAE/E,MAAM,KAAK,GAAG,mBAAmB,CAAC,MAAM,CAAC;QACzC,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACnC;aAAM;YACL,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;SAC3C;KACF;IAED,0DAA0D;IAC1D,wCAAwC;IACxC,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,EAAE;QACxD,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;KACxC;IAED,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ;QACb,oBAAC,IAAI,IAAC,SAAS,QAAC,SAAS,EAAC,0BAA0B,IACjD,oBAAoB,CAChB,CACQ,CAClB,CAAC;AACJ,CAAC;AAED,iBAAiB,CAAC,SAAS,GAAG;IAC5B,MAAM,EAAE,SAAS,CAAC,MAAM;IACxB,UAAU,EAAE,SAAS,CAAC,IAAI;IAC1B,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;CAC/C,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport isDeepEqual from 'fast-deep-equal/react';\n\nimport Grid from '@material-ui/core/Grid';\nimport TextField from '@material-ui/core/TextField';\nimport Operator from '../Operator';\nimport { getDateFormatInfo } from '../../helpers/date-format-utils';\nimport { getCurrencyOptions } from '../../field/Currency/currency-utils';\n\nimport './CaseSummaryFields.css';\n\nimport { format } from '../../helpers/formatters';\n\nexport default function CaseSummaryFields(props) {\n const { status, showStatus, theFields } = props;\n\n const [theFieldsToRender, setFieldsToRender] = useState([]);\n const [theFieldsAsGridItems, setFieldsAsGridItems] = useState<Array<any>>([]);\n\n function getFieldValue(field: any): any {\n const fieldTypeLower = field.type.toLowerCase();\n\n if (field.config.value === null || field.config.value === '') {\n // Special handling for missing value\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (fieldTypeLower) {\n case 'caseoperator':\n return <Operator caseOpConfig={field.config} />;\n break;\n\n default:\n return (\n <TextField\n value='---'\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n }\n\n switch (fieldTypeLower) {\n case 'textinput':\n case 'decimal':\n case 'integer':\n case 'dropdown':\n return (\n <TextField\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'checkbox': {\n const { caption, label, value, trueLabel, falseLabel } = field.config;\n const fieldLabel = label || caption;\n const fieldValue = value ? trueLabel : falseLabel;\n\n return (\n <TextField\n value={fieldValue}\n label={fieldLabel}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'status':\n return (\n <TextField\n className='psdk-csf-status-style'\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'phone': {\n const displayPhone = field.config.value !== '' ? field.config.value : '---';\n return (\n <a href={`tel:${displayPhone}`}>\n <TextField\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n inputProps: { style: { cursor: 'pointer' }, disableUnderline: true }\n }}\n />\n </a>\n );\n }\n\n case 'email': {\n const displayEmail = format(field.config.value, field.type);\n return (\n <a href={`mailto:${displayEmail}`}>\n <TextField\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true,\n inputProps: { style: { cursor: 'pointer' } }\n }}\n />\n </a>\n );\n }\n\n case 'date':\n case 'datetime': {\n const theDateFormatInfo = getDateFormatInfo();\n // console.log(`theDateFormatInfo: ${theDateFormatInfo}`);\n const theFormat = (fieldTypeLower === 'datetime') ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong\n\n return (\n <TextField\n value={format(field.config.value, field.type, { format: theFormat })}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'currency': {\n const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);\n return (\n <TextField\n value={format(field.config.value, field.type, theCurrencyOptions)}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n }\n\n\n case 'boolean':\n case 'userreference':\n return (\n <TextField\n value={format(field.config.value, field.type)}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'caseoperator':\n return <Operator caseOpConfig={field.config} />;\n\n default:\n return (\n <span>\n {field.type.toLowerCase()} {field.config.value}\n </span>\n );\n }\n }\n\n // Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render\n useEffect(() => {\n const arGridItems = theFieldsToRender.map((field: any) => {\n // display the field when either visibility property doesn't exist or is true(if exists)\n if (field.config.visibility === undefined || field.config.visibility === true) {\n return (\n <Grid item xs={6} key={field.config.label}>\n {getFieldValue(field)}\n </Grid>\n );\n }\n\n return null;\n });\n setFieldsAsGridItems(arGridItems);\n }, [theFieldsToRender]);\n\n const theFieldsModifiable = theFields;\n\n // Special Case: if showStatus is true, splice the status value to be 2nd in theFields\n // if it's not already there\n if (showStatus && theFields?.[1].type !== 'status') {\n const oStatus = { type: 'status', config: { value: status, label: 'Status' } };\n\n const count = theFieldsModifiable.length;\n if (count < 2) {\n theFieldsModifiable.push(oStatus);\n } else {\n theFieldsModifiable.splice(1, 0, oStatus);\n }\n }\n\n // At this point, we know what fields we want to render...\n // So, update our state if it's changed\n if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {\n setFieldsToRender(theFieldsModifiable);\n }\n\n return (\n <React.Fragment>\n <Grid container className='psdk-case-summary-fields'>\n {theFieldsAsGridItems}\n </Grid>\n </React.Fragment>\n );\n}\n\nCaseSummaryFields.propTypes = {\n status: PropTypes.string,\n showStatus: PropTypes.bool,\n theFields: PropTypes.arrayOf(PropTypes.object)\n};\n"]}
|
|
1
|
+
{"version":3,"file":"CaseSummaryFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAYlD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAA6B;IACrE,8EAA8E;IAC9E,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAEjD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEhD,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC5D,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAa,EAAE,CAAC,CAAC;IAE9E,SAAS,aAAa,CAAC,KAAU;QA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,CAAC;QAE/E,MAAM,KAAK,GAAG,mBAAmB,CAAC,MAAM,CAAC;QACzC,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACnC;aAAM;YACL,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;SAC3C;KACF;IAED,0DAA0D;IAC1D,wCAAwC;IACxC,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,EAAE;QACxD,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;KACxC;IAED,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ;QACb,oBAAC,IAAI,IAAC,SAAS,QAAC,SAAS,EAAC,0BAA0B,IACjD,oBAAoB,CAChB,CACQ,CAClB,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState, useEffect } from 'react';\nimport isDeepEqual from 'fast-deep-equal/react';\nimport Grid from '@material-ui/core/Grid';\nimport TextField from '@material-ui/core/TextField';\nimport { getDateFormatInfo } from '../../helpers/date-format-utils';\nimport { getCurrencyOptions } from '../../field/Currency/currency-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nimport './CaseSummaryFields.css';\n\nimport { format } from '../../helpers/formatters';\n\n// CaseSummaryFields is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface CaseSummaryFieldsProps{\n // If any, enter additional props that only exist on this component\n status?: string,\n showStatus?: boolean,\n theFields: Array<any> | any | never\n}\n\n\nexport default function CaseSummaryFields(props: CaseSummaryFieldsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const Operator = getComponentFromMap(\"Operator\");\n\n const { status, showStatus, theFields } = props;\n\n const [theFieldsToRender, setFieldsToRender] = useState([]);\n const [theFieldsAsGridItems, setFieldsAsGridItems] = useState<Array<any>>([]);\n\n function getFieldValue(field: any): any {\n const fieldTypeLower = field.type.toLowerCase();\n\n if (field.config.value === null || field.config.value === '') {\n // Special handling for missing value\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (fieldTypeLower) {\n case 'caseoperator':\n return <Operator caseOpConfig={field.config} />;\n break;\n\n default:\n return (\n <TextField\n value='---'\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n }\n\n switch (fieldTypeLower) {\n case 'textinput':\n case 'decimal':\n case 'integer':\n case 'dropdown':\n return (\n <TextField\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'checkbox': {\n const { caption, label, value, trueLabel, falseLabel } = field.config;\n const fieldLabel = label || caption;\n const fieldValue = value ? trueLabel : falseLabel;\n\n return (\n <TextField\n value={fieldValue}\n label={fieldLabel}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'status':\n return (\n <TextField\n className='psdk-csf-status-style'\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'phone': {\n const displayPhone = field.config.value !== '' ? field.config.value : '---';\n return (\n <a href={`tel:${displayPhone}`}>\n <TextField\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n inputProps: { style: { cursor: 'pointer' }, disableUnderline: true }\n }}\n />\n </a>\n );\n }\n\n case 'email': {\n const displayEmail = format(field.config.value, field.type);\n return (\n <a href={`mailto:${displayEmail}`}>\n <TextField\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true,\n inputProps: { style: { cursor: 'pointer' } }\n }}\n />\n </a>\n );\n }\n\n case 'date':\n case 'datetime': {\n const theDateFormatInfo = getDateFormatInfo();\n // console.log(`theDateFormatInfo: ${theDateFormatInfo}`);\n const theFormat = (fieldTypeLower === 'datetime') ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong\n\n return (\n <TextField\n value={format(field.config.value, field.type, { format: theFormat })}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'currency': {\n const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);\n return (\n <TextField\n value={format(field.config.value, field.type, theCurrencyOptions)}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n }\n\n\n case 'boolean':\n case 'userreference':\n return (\n <TextField\n value={format(field.config.value, field.type)}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'caseoperator':\n return <Operator caseOpConfig={field.config} />;\n\n default:\n return (\n <span>\n {field.type.toLowerCase()} {field.config.value}\n </span>\n );\n }\n }\n\n // Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render\n useEffect(() => {\n const arGridItems = theFieldsToRender.map((field: any) => {\n // display the field when either visibility property doesn't exist or is true(if exists)\n if (field.config.visibility === undefined || field.config.visibility === true) {\n return (\n <Grid item xs={6} key={field.config.label}>\n {getFieldValue(field)}\n </Grid>\n );\n }\n\n return null;\n });\n setFieldsAsGridItems(arGridItems);\n }, [theFieldsToRender]);\n\n const theFieldsModifiable = theFields;\n\n // Special Case: if showStatus is true, splice the status value to be 2nd in theFields\n // if it's not already there\n if (showStatus && theFields?.[1].type !== 'status') {\n const oStatus = { type: 'status', config: { value: status, label: 'Status' } };\n\n const count = theFieldsModifiable.length;\n if (count < 2) {\n theFieldsModifiable.push(oStatus);\n } else {\n theFieldsModifiable.splice(1, 0, oStatus);\n }\n }\n\n // At this point, we know what fields we want to render...\n // So, update our state if it's changed\n if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {\n setFieldsToRender(theFieldsModifiable);\n }\n\n return (\n <React.Fragment>\n <Grid container className='psdk-case-summary-fields'>\n {theFieldsAsGridItems}\n </Grid>\n </React.Fragment>\n );\n}\n"]}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare namespace DetailsFields {
|
|
5
|
-
var defaultProps: {
|
|
6
|
-
fields: never[];
|
|
7
|
-
};
|
|
8
|
-
var propTypes: {
|
|
9
|
-
fields: PropTypes.Requireable<any[]>;
|
|
10
|
-
};
|
|
2
|
+
interface DetailsFieldsProps {
|
|
3
|
+
fields: Array<any>;
|
|
11
4
|
}
|
|
12
|
-
export default DetailsFields;
|
|
5
|
+
export default function DetailsFields(props: DetailsFieldsProps): JSX.Element;
|
|
6
|
+
export {};
|
|
13
7
|
//# sourceMappingURL=DetailsFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":";AAYA,UAAU,kBAAkB;IAE1B,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;CACnB;AAyBD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA0G9D"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable react/no-array-index-key */
|
|
2
2
|
import React, { createElement, isValidElement } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import Grid from '@material-ui/core/Grid';
|
|
5
4
|
import Typography from '@material-ui/core/Typography';
|
|
6
5
|
import { makeStyles } from '@material-ui/core/styles';
|
|
@@ -29,7 +28,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
29
28
|
}));
|
|
30
29
|
export default function DetailsFields(props) {
|
|
31
30
|
// const componentName = "DetailsFields";
|
|
32
|
-
const { fields } = props;
|
|
31
|
+
const { fields = [] } = props;
|
|
33
32
|
const classes = useStyles();
|
|
34
33
|
const fieldComponents = [];
|
|
35
34
|
fields?.forEach((field, index) => {
|
|
@@ -97,10 +96,4 @@ export default function DetailsFields(props) {
|
|
|
97
96
|
}
|
|
98
97
|
return React.createElement(React.Fragment, null, getGridItems());
|
|
99
98
|
}
|
|
100
|
-
DetailsFields.defaultProps = {
|
|
101
|
-
fields: []
|
|
102
|
-
};
|
|
103
|
-
DetailsFields.propTypes = {
|
|
104
|
-
fields: PropTypes.arrayOf(PropTypes.any)
|
|
105
|
-
};
|
|
106
99
|
//# sourceMappingURL=DetailsFields.js.map
|