@pega/react-sdk-components 23.1.10 → 23.1.12
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/LICENSE +201 -0
- package/README.md +17 -0
- package/SECURITY.md +10 -0
- package/lib/bridge/Context/StoreContext.js +3 -3
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +24 -47
- 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 +17 -28
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -2
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -10
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +30 -27
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +9 -15
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/index.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +5 -4
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +23 -12
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -16
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +1 -0
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +7 -11
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +15 -15
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +49 -62
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +2 -3
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +7 -10
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +7 -9
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +5 -11
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +2 -2
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +21 -23
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +8 -3
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +76 -68
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/CancelAlert/index.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +16 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +59 -45
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +13 -34
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +4 -5
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +14 -10
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +8 -8
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +2 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +18 -28
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Decimal/index.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +13 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +105 -29
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +8 -9
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Email/index.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +13 -0
- package/lib/components/field/Group/Group.d.ts.map +1 -0
- package/lib/components/field/Group/Group.js +15 -0
- package/lib/components/field/Group/Group.js.map +1 -0
- package/lib/components/field/Group/index.d.ts +2 -0
- package/lib/components/field/Group/index.d.ts.map +1 -0
- package/lib/components/field/Group/index.js +2 -0
- package/lib/components/field/Group/index.js.map +1 -0
- package/lib/components/field/Integer/Integer.d.ts +1 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +6 -6
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/MultiSelect/Multiselect.d.ts +3 -0
- package/lib/components/field/MultiSelect/Multiselect.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/Multiselect.js +175 -0
- package/lib/components/field/MultiSelect/Multiselect.js.map +1 -0
- package/lib/components/field/MultiSelect/index.d.ts +2 -0
- package/lib/components/field/MultiSelect/index.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/index.js +2 -0
- package/lib/components/field/MultiSelect/index.js.map +1 -0
- package/lib/components/field/MultiSelect/utils.d.ts +10 -0
- package/lib/components/field/MultiSelect/utils.d.ts.map +1 -0
- package/lib/components/field/MultiSelect/utils.js +197 -0
- package/lib/components/field/MultiSelect/utils.js.map +1 -0
- package/lib/components/field/Percentage/Percentage.d.ts +2 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +25 -28
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +9 -10
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/Phone/index.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 +18 -21
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.d.ts +1 -1
- package/lib/components/field/RichText/RichText.d.ts.map +1 -1
- package/lib/components/field/RichText/RichText.js +9 -8
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +7 -9
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +4 -8
- 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 +8 -8
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +5 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +2 -2
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +7 -6
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/TextInput/index.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +7 -7
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +6 -6
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/URL/index.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +3 -3
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +11 -11
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js +2 -2
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js +6 -6
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- package/lib/components/helpers/case-utils.d.ts.map +1 -1
- package/lib/components/helpers/case-utils.js +5 -5
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +1 -0
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +4 -1
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +2 -3
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.js +3 -3
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.js +1 -1
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js +9 -20
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +2 -2
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +13 -14
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +500 -500
- 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 +20 -20
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/formatters/common.js +1 -1
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +6 -6
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js +25 -19
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/instructions-utils.d.ts +5 -0
- package/lib/components/helpers/instructions-utils.d.ts.map +1 -0
- package/lib/components/helpers/instructions-utils.js +36 -0
- package/lib/components/helpers/instructions-utils.js.map +1 -0
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/reactContextHelpers.js +1 -1
- package/lib/components/helpers/reactContextHelpers.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +44 -52
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js +6 -8
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.d.ts +1 -1
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +1 -2
- 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 +3 -8
- 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 +1 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +2 -2
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +10 -14
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/ActionButtons/index.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +10 -2
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +68 -71
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Assignment/index.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +3 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +4 -5
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/AssignmentCard/index.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +11 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +36 -158
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js +30 -30
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +9 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +36 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +178 -160
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +9 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js +29 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +10 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.js +102 -0
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts +2 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.js +2 -0
- package/lib/components/infra/Containers/SimpleView/index.js.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +17 -24
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/helpers.d.ts +2 -0
- package/lib/components/infra/Containers/helpers.d.ts.map +1 -0
- package/lib/components/infra/Containers/helpers.js +7 -0
- package/lib/components/infra/Containers/helpers.js.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +3 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +13 -17
- 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 +10 -12
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +9 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +8 -17
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/DeferLoad/index.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +15 -14
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +11 -15
- package/lib/components/infra/MultiStep/MultiStep.d.ts +5 -7
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +29 -80
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/MultiStep/index.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +103 -105
- package/lib/components/infra/NavBar/NavBar.d.ts +3 -3
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +18 -52
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +9 -1
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +6 -13
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +2 -3
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +2 -3
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +14 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +40 -62
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/RootContainer/index.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +2 -2
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +18 -21
- 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 +6 -8
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +10 -9
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +3 -4
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +6 -11
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.css +22 -23
- package/lib/components/template/AppShell/AppShell.d.ts +6 -7
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +23 -29
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +4 -4
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +3 -3
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +3 -4
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +44 -8
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +3 -4
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +18 -41
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +3 -3
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -7
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +3 -4
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +7 -14
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +4 -4
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +35 -49
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +8 -2
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +5 -14
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +8 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +5 -13
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +3 -4
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +5 -10
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +5 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +8 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +5 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/index.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +7 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +6 -17
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +2 -2
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +8 -9
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +3 -4
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -9
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +3 -4
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +7 -6
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +2 -2
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- 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 +16 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +106 -181
- 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 +4 -6
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +38 -46
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +3 -3
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js +2 -10
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +8 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +5 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js +2 -5
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +4 -4
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +3 -5
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -8
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +2 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -4
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -2
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +10 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +12 -29
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +19 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +17 -20
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +12 -7
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +124 -134
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +9 -21
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -5
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +4 -4
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +6 -9
- 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 +2 -4
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +4 -4
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +14 -12
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +2 -10
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +8 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +5 -16
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js +2 -5
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +4 -4
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +3 -3
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/index.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +3 -2
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +20 -37
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +2 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +10 -19
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +60 -1
- package/lib/components/widget/Attachment/Attachment.d.ts +8 -1
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +279 -353
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/index.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +37 -31
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/CaseHistory/index.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +4 -3
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +2 -4
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +107 -136
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +4 -4
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +8 -16
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +8 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +57 -35
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +3 -2
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +8 -23
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryItem/index.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +3 -2
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +3 -3
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +4 -4
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +31 -67
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/components_map.d.ts +2 -2
- package/lib/components_map.d.ts.map +1 -1
- package/lib/components_map.js +4 -2
- package/lib/components_map.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +21 -4
- package/lib/hooks/useConsolidatedRef.js +2 -2
- package/lib/hooks/useConsolidatedRef.js.map +1 -1
- package/lib/sdk-local-component-map.js +2 -2
- package/lib/sdk-pega-component-map.d.ts +6 -0
- package/lib/sdk-pega-component-map.js +106 -100
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +14 -15
- package/package.json +5 -2
- package/lib/components/helpers/auth.d.ts +0 -18
- package/lib/components/helpers/auth.d.ts.map +0 -1
- package/lib/components/helpers/auth.js +0 -752
- package/lib/components/helpers/auth.js.map +0 -1
- package/lib/components/helpers/authManager.d.ts +0 -21
- package/lib/components/helpers/authManager.d.ts.map +0 -1
- package/lib/components/helpers/authManager.js +0 -864
- package/lib/components/helpers/authManager.js.map +0 -1
- package/lib/components/helpers/config_access.d.ts +0 -3
- package/lib/components/helpers/config_access.d.ts.map +0 -1
- package/lib/components/helpers/config_access.js +0 -198
- package/lib/components/helpers/config_access.js.map +0 -1
|
@@ -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,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,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAA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X,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"]}
|
|
1
|
+
{"version":3,"file":"react_pconnect.js","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,YAAY,EAAE,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC,CAAC,2CAA2C;AAC1H,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAE9D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,iHAAiH;AAEjH,0FAA0F;AAC1F,uFAAuF;AACvF,4BAA4B;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,gBAAgB,G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,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;oBACvB,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,cAAc,EAAE,CAAC,0BAA0B,EAAE,SAAS,KAAK,CAAC,cAAc,EAAE,CAAC,WAAW,EAAE,cAAc,IAAI,KAAK,CAAC;oBAC1I,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,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,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;wBACtE,CAAC,CAAC,CAAC;qBACJ;iBACF;aACF;QACH,CAAC,CAAC,CAAC;QACH;;;;;YAKI;QACJ,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,eAAe,uBAAuB,CAAC","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, shallowEqual } from 'react-redux';\n\nimport ComponentMap, { LazyMap as LazyComponentMap } from '../components_map'; // was '../../../../../src/components_map';\nimport ErrorBoundary from '../components/infra/ErrorBoundary';\n\nimport StoreContext from './Context/StoreContext';\n\n// const pathToComponents = \"../../../../../src/components\"; /* When bridge was local, it was \"../components\" */\n\n// For now, NOT doing lazy loading - needs some work on the loader to work with TypeScript\n// As we add components, we'll need to import them here and add to the switch statement\n// below in getComponent!\n\nimport { SdkComponentMap } from './helpers/sdk_component_map';\n\nconst isClassIDCompare = (key, prev) => {\n return !(key === 'classID' && !prev[key]);\n};\n\nconst routingInfoCompare = (next, prev) => {\n return 'routingInfo' in next && (!shallowEqual(next.routingInfo, prev.routingInfo) || !PCore.isDeepEqual(next.routingInfo, prev.routingInfo));\n};\n\n/** Generate unique id for elements */\nconst createUID = () => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) || (renderMode === 'Editable' && referenceList)) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nfunction withVisibility(WrappedComponent) {\n // eslint-disable-next-line react/prefer-stateless-function\n return class extends Component {\n render() {\n const { visibility } = this.props;\n\n if (visibility === false) {\n return null;\n }\n return <WrappedComponent {...this.props} />;\n }\n };\n}\n\nconst connectRedux = (component, c11nEnv) => {\n return connect(\n (state, ownProps) => {\n let addProps = {};\n const obj = {};\n // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render\n if (!ownProps.getPConnect) {\n // eslint-disable-next-line no-console\n console.error('connectRedux ownProps are not defined');\n } else {\n c11nEnv = ownProps.getPConnect();\n }\n\n if (typeof component.additionalProps === 'object') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps);\n } else if (typeof component.additionalProps === 'function') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps(state, ownProps.getPConnect));\n }\n\n c11nEnv.getConfigProps(obj);\n\n // populate additional props which are component specific and not present in configurations\n // This block can be removed once all these props will be added as part of configs\n c11nEnv.populateAdditionalProps(obj);\n\n return {\n ...obj,\n ...addProps\n };\n },\n null,\n null,\n {\n context: StoreContext,\n areStatePropsEqual: (next, prev) => {\n const allStateProps = c11nEnv.getStateProps();\n for (const key of Object.keys(allStateProps)) {\n if (\n (isClassIDCompare(key, prev) && !shallowEqual(next[key], prev[key])) ||\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo))\n ) {\n return false;\n }\n }\n\n // For CaseSummary (when status === \".pyStatusWork\"), we need to compare changes in\n // primaryFields and secondary Fields\n if (allStateProps.status === '.pyStatusWork') {\n for (const key of Object.keys(prev)) {\n if (!PCore.isDeepEqual(next[key], prev[key])) {\n return false;\n }\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !routingInfoCompare(next, prev);\n }\n }\n )(component);\n};\n\nconst getComponent = c11nEnv => {\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n const ComponentsRegistry = PCore.getComponentsRegistry();\n const type = c11nEnv.getComponentName();\n\n const componentObj = ComponentsRegistry.getComponent(type);\n const componentType = (componentObj && componentObj.component) || type;\n\n // JEA - modifying logic before bailing to RootContainer logic to work around async loading problem\n let component = LazyComponentMap[componentType]; /* || window[componentType] */\n\n // NOTE: Until we get lazy loading working, maintain this for each component we add\n if (component === undefined) {\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`react_pconnect getComponent found ${componentType}: Local`);\n component = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[componentType];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`react_pconnect getComponent found ${componentType}: Pega-provided`);\n component = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);\n component = ErrorBoundary;\n }\n }\n } else {\n // We no longer handle the \"old\" switch statement that was here in the original packaging.\n // All components seen here need to be in the SdkComponentMap\n // eslint-disable-next-line no-console\n console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);\n }\n } else {\n // eslint-disable-next-line no-console\n console.log(`getComponent doesn't have an entry for component ${component}`);\n component = ErrorBoundary;\n }\n\n if (c11nEnv.isConditionExist()) {\n return connectRedux(withVisibility(component), c11nEnv);\n }\n\n return connectRedux(component, c11nEnv);\n};\n\n/**\n *\n * @param {*} declarative\n * @returns {React.Components<Props, State>}\n\n */\nconst createPConnectComponent = () => {\n /**\n * JEA - add Type info via JSdoc syntax...\n * @extends {React.Components<Props, State>}\n * createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object\n * to pre-process meta data of each componnet.\n * - Wraps each child in a component with PConnect\n * - Process all actions and make them avaiable in props\n * - Filters all properties in metadata and keeps them\n * __internal for re-render process through connect\n */\n class PConnect extends Component {\n constructor(props) {\n super(props);\n const { getPConnect } = this.props;\n this.state = {\n hasError: false\n };\n\n this.eventHandler = this.eventHandler.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n\n this.c11nEnv = getPConnect();\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.Control = getComponent(this.c11nEnv);\n this.actionsAPI = this.c11nEnv.getActionsApi();\n\n this.processActions(this.c11nEnv);\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidMount() {\n this.c11nEnv.addFormField();\n setVisibilityForList(this.c11nEnv, true);\n }\n\n componentDidCatch(error, info) {\n // eslint-disable-next-line no-console\n console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);\n }\n\n componentWillUnmount() {\n if (this.c11nEnv.removeFormField) {\n this.c11nEnv.removeFormField();\n setVisibilityForList(this.c11nEnv, false);\n }\n }\n\n /*\n * processActions to see all actions in meta and adds event in props.\n * Attaches common handler (eventHandler) for all actions.\n */\n processActions() {\n if (this.c11nEnv.isEditable()) {\n this.c11nEnv.setAction('onChange', this.changeHandler);\n this.c11nEnv.setAction('onBlur', this.eventHandler);\n }\n }\n\n // Using separate handle for change as in case of dropdown, native click is mapped to react change\n changeHandler(event) {\n this.actionsAPI.changeHandler(this.c11nEnv, event);\n // getActionProcessor().changeHandler(this.c11nEnv, event);\n }\n\n eventHandler(event) {\n this.actionsAPI.eventHandler(this.c11nEnv, event);\n // getActionProcessor().eventHandler(this.c11nEnv, event);\n }\n\n createChildren() {\n const { getPConnect } = this.props;\n if (getPConnect().hasChildren() && getPConnect().getChildren()) {\n return (\n getPConnect()\n .getChildren()\n // eslint-disable-next-line react/no-array-index-key\n .map((childProps, index) => <PConnect key={`${this.getKey(childProps)}_${index}`} {...childProps} />)\n );\n }\n return null;\n }\n\n getKey(props = this.props) {\n const { getPConnect } = props;\n const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();\n let key = !viewName ? createUID() : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;\n\n // In the case of pyDetails the key must be unigue for each instance\n if (viewName && viewName.toUpperCase() === 'PYDETAILS') {\n key += `!${getPConnect().getCaseInfo().getID()}`;\n }\n\n return key.toUpperCase();\n }\n\n render() {\n const { hasError } = this.state;\n const { getPConnect, additionalProps, ...otherProps } = this.props;\n\n if (hasError) {\n // You can render any custom fallback UI\n // console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);\n return <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />;\n }\n\n const props = this.c11nEnv.getConfigProps();\n const actions = this.c11nEnv.getActions();\n const finalProps = {\n ...props,\n getPConnect,\n ...actions,\n additionalProps,\n ...otherProps\n };\n\n // If the new component is a reference node then mark with a unique key\n if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {\n finalProps.key = this.getKey();\n }\n\n // console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);\n\n return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;\n }\n }\n\n // eslint-disable-next-line react/static-property-placement\n PConnect.propTypes = {\n // __internal: PropTypes.object.isRequired,\n // meta: PropTypes.object.isRequired,\n // configObject: PropTypes.object.isRequired,\n getPConnect: PropTypes.func.isRequired,\n additionalProps: PropTypes.shape({\n noLabel: PropTypes.bool,\n readOnly: PropTypes.bool\n }),\n validatemessage: PropTypes.string\n };\n\n // eslint-disable-next-line react/static-property-placement\n PConnect.defaultProps = {\n additionalProps: {},\n validatemessage: ''\n };\n\n return PConnect;\n};\n\n// Move these into SdkConstellationReady so PCore is available\ndocument.addEventListener('SdkConstellationReady', () => {\n PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {\n const PConnectComp = createPConnectComponent();\n return createElement(PConnectComp, {\n ...c11nEnv,\n ...c11nEnv.getPConnect().getConfigProps(),\n ...c11nEnv.getPConnect().getActions(),\n ...{ additionalProps }\n });\n });\n\n PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {\n const promises = [];\n componentNames.forEach(comp => {\n if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {\n if (!ComponentMap[comp]) {\n const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;\n promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));\n } else {\n if (ComponentMap[comp].modules && ComponentMap[comp].modules.length) {\n ComponentMap[comp].modules.forEach(module => {\n LazyComponentMap[comp] = module;\n });\n }\n if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {\n ComponentMap[comp].scripts.forEach(script => {\n promises.push(PCore.getAssetLoader().getLoader()(script, 'script'));\n });\n }\n }\n }\n });\n /* Promise.all rejects or accepts all or none. This causes entire component loader to fail\n in case there is a single failure.\n Using allSettled to allow Promise to be resolved even if there are failed components\n Note : This is a liberty taken at component loader and unwise to be used at\n asset loader which will still use Promise.all\n */\n await Promise.allSettled(promises);\n });\n});\n\nexport default createPConnectComponent;\n\n/* These APIs need to be exposed for authoring bridge\nWill be removed when pxbootstrap and constellation_bridge is cleaned up\nto use single bootstrap file from constellation */\n// window.authoringUtils = {\n// createElement,\n// render,\n// unmountComponentAtNode,\n// LazyComponentMap\n// };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AlertBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":";AAIA,UAAU,gBAAgB;IAExB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AASD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAmB1D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Alert } from '@material-ui/lab';
|
|
3
3
|
const SEVERITY_MAP = {
|
|
4
4
|
urgent: 'error',
|
|
@@ -14,6 +14,6 @@ export default function AlertBanner(props) {
|
|
|
14
14
|
onClose: onDismiss
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
return (
|
|
17
|
+
return (_jsx("div", { id: id, children: messages.map(message => (_jsx(Alert, { variant: 'outlined', severity: SEVERITY_MAP[variant], ...additionalProps, children: message }, message))) }));
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=AlertBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertBanner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AlertBanner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAYzC,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,KAAuB;IACzD,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,cAAK,EAAE,EAAE,EAAE,YACR,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CACvB,KAAC,KAAK,IAAe,OAAO,EAAC,UAAU,EAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,KAAM,eAAe,YACzF,OAAO,IADE,OAAO,CAEX,CACT,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { Alert } from '@material-ui/lab';\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: string[];\n onDismiss?: any;\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 key={message} variant='outlined' severity={SEVERITY_MAP[variant]} {...additionalProps}>\n {message}\n </Alert>\n ))}\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":";AACA,OAAO,cAAc,CAAC;AAKtB,UAAU,WAAW;IAEnB,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,GAAG,CAAC;IACP,MAAM,EAAE;QACN,OAAO,EAAE,GAAG,CAAC;QACb,eAAe,EAAE,GAAG,CAAC;QACrB,KAAK,EAAE,GAAG,CAAC;QACX,OAAO,EAAE,GAAG,CAAC;QACb,eAAe,EAAE,GAAG,CAAC;QACrB,SAAS,EAAE,GAAG,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,GAAG,CAAC;CACd;AAED,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,eA4BhD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Grid from '@material-ui/core/Grid';
|
|
3
3
|
import './Banner.css';
|
|
4
4
|
export default function Banner(props) {
|
|
@@ -9,14 +9,6 @@ export default function Banner(props) {
|
|
|
9
9
|
'narrow-wide': [4, 8],
|
|
10
10
|
'wide-narrow': [8, 4]
|
|
11
11
|
};
|
|
12
|
-
return (
|
|
13
|
-
React.createElement("div", { className: 'background-image-style', style: { backgroundImage: `url(${backgroundImage})` } },
|
|
14
|
-
React.createElement("div", { className: 'background-style content' },
|
|
15
|
-
React.createElement("div", null,
|
|
16
|
-
React.createElement("h1", { className: 'title' }, title),
|
|
17
|
-
React.createElement("p", { className: 'message' }, message)))),
|
|
18
|
-
React.createElement(Grid, { container: true, item: true, xs: 12, className: 'banner-layout', spacing: 1 },
|
|
19
|
-
React.createElement(Grid, { item: true, xs: variantMap[variant][0], style: { padding: '1em' } }, a),
|
|
20
|
-
React.createElement(Grid, { item: true, xs: variantMap[variant][1], style: { padding: '1em' } }, b))));
|
|
12
|
+
return (_jsxs("div", { style: { marginBottom: '2rem' }, children: [_jsx("div", { className: 'background-image-style', style: { backgroundImage: `url(${backgroundImage})` }, children: _jsx("div", { className: 'background-style content', children: _jsxs("div", { children: [_jsx("h1", { className: 'title', children: title }), _jsx("p", { className: 'message', children: message })] }) }) }), _jsxs(Grid, { container: true, item: true, xs: 12, className: 'banner-layout', spacing: 1, children: [_jsx(Grid, { item: true, xs: variantMap[variant][0], style: { padding: '1em' }, children: a }), _jsx(Grid, { item: true, xs: variantMap[variant][1], style: { padding: '1em' }, children: b })] })] }));
|
|
21
13
|
}
|
|
22
14
|
//# sourceMappingURL=Banner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,cAAc,CAAC;AAoBtB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAkB;IAC/C,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACxC,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,eAAK,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,aAClC,cAAK,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,eAAe,GAAG,EAAE,YAC3F,cAAK,SAAS,EAAC,0BAA0B,YACvC,0BACE,aAAI,SAAS,EAAC,OAAO,YAAE,KAAK,GAAM,EAClC,YAAG,SAAS,EAAC,SAAS,YAAE,OAAO,GAAK,IAChC,GACF,GACF,EACN,MAAC,IAAI,IAAC,SAAS,QAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,CAAC,aAC/D,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAC7D,CAAC,GACG,EACP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAC7D,CAAC,GACG,IACF,IACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["import 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: {\n variant: any;\n backgroundColor: any;\n title: any;\n message: any;\n backgroundImage: any;\n tintImage: any;\n };\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 className='background-image-style' style={{ backgroundImage: `url(${backgroundImage})` }}>\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"]}
|
|
@@ -3,7 +3,7 @@ import './CaseSummaryFields.css';
|
|
|
3
3
|
interface CaseSummaryFieldsProps {
|
|
4
4
|
status?: string;
|
|
5
5
|
showStatus?: boolean;
|
|
6
|
-
theFields:
|
|
6
|
+
theFields: any[] | any | never;
|
|
7
7
|
}
|
|
8
8
|
export default function CaseSummaryFields(props: CaseSummaryFieldsProps): JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":";AASA,OAAO,yBAAyB,CAAC;AAMjC,UAAU,sBAAsB;IAE9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,KAAK,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eA8NtE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
2
3
|
import isDeepEqual from 'fast-deep-equal/react';
|
|
3
4
|
import Grid from '@material-ui/core/Grid';
|
|
4
5
|
import TextField from '@material-ui/core/TextField';
|
|
@@ -9,7 +10,7 @@ import './CaseSummaryFields.css';
|
|
|
9
10
|
import { format } from '../../helpers/formatters';
|
|
10
11
|
export default function CaseSummaryFields(props) {
|
|
11
12
|
// Get emitted components from map (so we can get any override that may exist)
|
|
12
|
-
const Operator = getComponentFromMap(
|
|
13
|
+
const Operator = getComponentFromMap('Operator');
|
|
13
14
|
const { status, showStatus, theFields } = props;
|
|
14
15
|
const [theFieldsToRender, setFieldsToRender] = useState([]);
|
|
15
16
|
const [theFieldsAsGridItems, setFieldsAsGridItems] = useState([]);
|
|
@@ -20,10 +21,10 @@ export default function CaseSummaryFields(props) {
|
|
|
20
21
|
// eslint-disable-next-line sonarjs/no-small-switch
|
|
21
22
|
switch (fieldTypeLower) {
|
|
22
23
|
case 'caseoperator':
|
|
23
|
-
return
|
|
24
|
+
return _jsx(Operator, { ...field.config });
|
|
24
25
|
break;
|
|
25
26
|
default:
|
|
26
|
-
return (
|
|
27
|
+
return (_jsx(TextField, { value: '---', label: field.config.label, InputProps: {
|
|
27
28
|
readOnly: true,
|
|
28
29
|
disableUnderline: true
|
|
29
30
|
} }));
|
|
@@ -34,7 +35,7 @@ export default function CaseSummaryFields(props) {
|
|
|
34
35
|
case 'decimal':
|
|
35
36
|
case 'integer':
|
|
36
37
|
case 'dropdown':
|
|
37
|
-
return (
|
|
38
|
+
return (_jsx(TextField, { value: field.config.value, label: field.config.label, InputProps: {
|
|
38
39
|
readOnly: true,
|
|
39
40
|
disableUnderline: true
|
|
40
41
|
} }));
|
|
@@ -42,63 +43,63 @@ export default function CaseSummaryFields(props) {
|
|
|
42
43
|
const { caption, label, value, trueLabel, falseLabel } = field.config;
|
|
43
44
|
const fieldLabel = label || caption;
|
|
44
45
|
const fieldValue = value ? trueLabel : falseLabel;
|
|
45
|
-
return (
|
|
46
|
+
return (_jsx(TextField, { value: fieldValue, label: fieldLabel, InputProps: {
|
|
46
47
|
readOnly: true,
|
|
47
48
|
disableUnderline: true
|
|
48
49
|
} }));
|
|
49
50
|
}
|
|
50
51
|
case 'status':
|
|
51
|
-
return (
|
|
52
|
+
return (_jsx(TextField, { className: 'psdk-csf-status-style', value: field.config.value, label: field.config.label, InputProps: {
|
|
52
53
|
readOnly: true,
|
|
53
54
|
disableUnderline: true
|
|
54
55
|
} }));
|
|
55
56
|
case 'phone': {
|
|
56
57
|
const displayPhone = field.config.value !== '' ? field.config.value : '---';
|
|
57
|
-
return (
|
|
58
|
-
React.createElement(TextField, { value: field.config.value, label: field.config.label, InputProps: {
|
|
58
|
+
return (_jsx("a", { href: `tel:${displayPhone}`, children: _jsx(TextField, { value: field.config.value, label: field.config.label, InputProps: {
|
|
59
59
|
readOnly: true,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
disableUnderline: true,
|
|
61
|
+
inputProps: {
|
|
62
|
+
style: { cursor: 'pointer' }
|
|
63
|
+
}
|
|
64
|
+
} }) }));
|
|
62
65
|
}
|
|
63
66
|
case 'email': {
|
|
64
67
|
const displayEmail = format(field.config.value, field.type);
|
|
65
|
-
return (
|
|
66
|
-
React.createElement(TextField, { value: field.config.value, label: field.config.label, InputProps: {
|
|
68
|
+
return (_jsx("a", { href: `mailto:${displayEmail}`, children: _jsx(TextField, { value: field.config.value, label: field.config.label, InputProps: {
|
|
67
69
|
readOnly: true,
|
|
68
70
|
disableUnderline: true,
|
|
69
71
|
inputProps: { style: { cursor: 'pointer' } }
|
|
70
|
-
} })));
|
|
72
|
+
} }) }));
|
|
71
73
|
}
|
|
72
74
|
case 'date':
|
|
73
75
|
case 'datetime': {
|
|
74
76
|
const theDateFormatInfo = getDateFormatInfo();
|
|
75
77
|
// console.log(`theDateFormatInfo: ${theDateFormatInfo}`);
|
|
76
|
-
const theFormat =
|
|
77
|
-
return (
|
|
78
|
+
const theFormat = fieldTypeLower === 'datetime' ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong;
|
|
79
|
+
return (_jsx(TextField, { value: format(field.config.value, field.type, {
|
|
80
|
+
format: theFormat
|
|
81
|
+
}), label: field.config.label, InputProps: {
|
|
78
82
|
readOnly: true,
|
|
79
83
|
disableUnderline: true
|
|
80
84
|
} }));
|
|
81
85
|
}
|
|
82
86
|
case 'currency': {
|
|
83
87
|
const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);
|
|
84
|
-
return (
|
|
88
|
+
return (_jsx(TextField, { value: format(field.config.value, field.type, theCurrencyOptions), label: field.config.label, InputProps: {
|
|
85
89
|
readOnly: true,
|
|
86
90
|
disableUnderline: true
|
|
87
91
|
} }));
|
|
88
92
|
}
|
|
89
93
|
case 'boolean':
|
|
90
94
|
case 'userreference':
|
|
91
|
-
return (
|
|
95
|
+
return (_jsx(TextField, { value: format(field.config.value, field.type), label: field.config.label, InputProps: {
|
|
92
96
|
readOnly: true,
|
|
93
97
|
disableUnderline: true
|
|
94
98
|
} }));
|
|
95
99
|
case 'caseoperator':
|
|
96
|
-
return
|
|
100
|
+
return _jsx(Operator, { ...field.config });
|
|
97
101
|
default:
|
|
98
|
-
return (
|
|
99
|
-
field.type.toLowerCase(),
|
|
100
|
-
" ",
|
|
101
|
-
field.config.value));
|
|
102
|
+
return (_jsxs("span", { children: [field.type.toLowerCase(), " ", field.config.value] }));
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
// Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render
|
|
@@ -106,7 +107,7 @@ export default function CaseSummaryFields(props) {
|
|
|
106
107
|
const arGridItems = theFieldsToRender.map((field) => {
|
|
107
108
|
// display the field when either visibility property doesn't exist or is true(if exists)
|
|
108
109
|
if (field.config.visibility === undefined || field.config.visibility === true) {
|
|
109
|
-
return (
|
|
110
|
+
return (_jsx(Grid, { item: true, xs: 6, children: getFieldValue(field) }, field.config.label));
|
|
110
111
|
}
|
|
111
112
|
return null;
|
|
112
113
|
});
|
|
@@ -116,7 +117,10 @@ export default function CaseSummaryFields(props) {
|
|
|
116
117
|
// Special Case: if showStatus is true, splice the status value to be 2nd in theFields
|
|
117
118
|
// if it's not already there
|
|
118
119
|
if (showStatus && theFields?.[1].type !== 'status') {
|
|
119
|
-
const oStatus = {
|
|
120
|
+
const oStatus = {
|
|
121
|
+
type: 'status',
|
|
122
|
+
config: { value: status, label: 'Status' }
|
|
123
|
+
};
|
|
120
124
|
const count = theFieldsModifiable.length;
|
|
121
125
|
if (count < 2) {
|
|
122
126
|
theFieldsModifiable.push(oStatus);
|
|
@@ -130,7 +134,6 @@ export default function CaseSummaryFields(props) {
|
|
|
130
134
|
if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {
|
|
131
135
|
setFieldsToRender(theFieldsModifiable);
|
|
132
136
|
}
|
|
133
|
-
return (
|
|
134
|
-
React.createElement(Grid, { container: true, className: 'psdk-case-summary-fields' }, theFieldsAsGridItems)));
|
|
137
|
+
return (_jsx(Grid, { container: true, className: 'psdk-case-summary-fields', children: theFieldsAsGridItems }));
|
|
135
138
|
}
|
|
136
139
|
//# 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,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,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H;YAED,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;QACH,oBAAoB,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC,EAAE,CAAC,iBAAiB,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","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
|
+
{"version":3,"file":"CaseSummaryFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,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;AAWlD,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,CAAQ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AAK,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,KAAC,IAAI,IAAC,SAAS,QAAC,SAAS,EAAC,0BAA0B,YACjD,oBAAoB,GAChB,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { 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';\n\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: any[] | any | never;\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<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 {...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 disableUnderline: true,\n inputProps: {\n style: { cursor: 'pointer' }\n }\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 =\n fieldTypeLower === 'datetime' ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong;\n\n return (\n <TextField\n value={format(field.config.value, field.type, {\n format: theFormat\n })}\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 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 {...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 = {\n type: 'status',\n config: { value: status, label: 'Status' }\n };\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 <Grid container className='psdk-case-summary-fields'>\n {theFieldsAsGridItems}\n </Grid>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":";AAWA,UAAU,kBAAkB;IAE1B,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAwBD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,eAsG9D"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
/* eslint-disable react/no-array-index-key */
|
|
2
3
|
import React, { createElement, isValidElement } from 'react';
|
|
3
4
|
import Grid from '@material-ui/core/Grid';
|
|
@@ -43,13 +44,12 @@ export default function DetailsFields(props) {
|
|
|
43
44
|
fieldComponents.push({
|
|
44
45
|
type: theCompType,
|
|
45
46
|
label,
|
|
46
|
-
value: (React.
|
|
47
|
+
value: _jsx(React.Fragment, { children: createElement(createPConnectComponent(), thePConn.getReferencedViewPConnect()) }, index)
|
|
47
48
|
});
|
|
48
49
|
});
|
|
49
50
|
function getGridItemLabel(field, keyVal) {
|
|
50
51
|
const dispValue = field.label;
|
|
51
|
-
return (
|
|
52
|
-
React.createElement(Typography, { variant: 'body2', component: 'span', className: `${classes.fieldLabel}` }, dispValue)));
|
|
52
|
+
return (_jsx(Grid, { item: true, xs: 6, children: _jsx(Typography, { variant: 'body2', component: 'span', className: `${classes.fieldLabel}`, children: dispValue }) }, keyVal));
|
|
53
53
|
}
|
|
54
54
|
function formatItemValue(inField) {
|
|
55
55
|
const { type, value } = inField;
|
|
@@ -71,29 +71,23 @@ export default function DetailsFields(props) {
|
|
|
71
71
|
}
|
|
72
72
|
function getGridItemValue(field, keyVal) {
|
|
73
73
|
const formattedValue = formatItemValue(field);
|
|
74
|
-
return (
|
|
75
|
-
React.createElement(Typography, { variant: 'body2', component: 'span', className: classes.fieldValue }, formattedValue)));
|
|
74
|
+
return (_jsx(Grid, { item: true, xs: 6, children: _jsx(Typography, { variant: 'body2', component: 'span', className: classes.fieldValue, children: formattedValue }) }, keyVal));
|
|
76
75
|
}
|
|
77
76
|
function getGridItem(field, keyVal) {
|
|
78
|
-
return (
|
|
79
|
-
React.createElement(Typography, { variant: 'body2', component: 'span', className: classes.fieldValue }, field?.value)));
|
|
77
|
+
return (_jsx(Grid, { item: true, xs: 12, children: _jsx(Typography, { variant: 'body2', component: 'span', className: classes.fieldValue, children: field?.value }) }, keyVal));
|
|
80
78
|
}
|
|
81
79
|
function getGridItems() {
|
|
82
80
|
const gridItems = fieldComponents.map((field, index) => {
|
|
83
81
|
if (field?.type === 'reference') {
|
|
84
82
|
return field?.value;
|
|
85
83
|
}
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
return (React.createElement(Grid, { container: true, spacing: 1, style: { padding: '4px 0px' }, key: index },
|
|
91
|
-
getGridItemLabel(field, `${index}-label`),
|
|
92
|
-
getGridItemValue(field, `${index}-value`)));
|
|
84
|
+
if (isValidElement(field?.value)) {
|
|
85
|
+
return (_jsx(Grid, { container: true, spacing: 1, style: { padding: '4px 0px' }, children: getGridItem(field, `${index}-item`) }, index));
|
|
93
86
|
}
|
|
87
|
+
return (_jsxs(Grid, { container: true, spacing: 1, style: { padding: '4px 0px' }, children: [getGridItemLabel(field, `${index}-label`), getGridItemValue(field, `${index}-value`)] }, index));
|
|
94
88
|
});
|
|
95
89
|
return gridItems;
|
|
96
90
|
}
|
|
97
|
-
return
|
|
91
|
+
return _jsx(_Fragment, { children: getGridItems() });
|
|
98
92
|
}
|
|
99
93
|
//# sourceMappingURL=DetailsFields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"DetailsFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":";AAAA,6CAA6C;AAC7C,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AASlD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC/B;IACD,UAAU,EAAE;QACV,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,GAAG;QACf,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SA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AAO,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,EAAE,OAAO,CAAC,UAAU,YACvE,KAAK,EAAE,KAAK,GACF,IAHS,MAAM,CAIvB,CACR,CAAC;IACJ,CAAC;IAED,SAAS,YAAY;QACnB,MAAM,SAAS,GAAU,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC5D,IAAI,KAAK,EAAE,IAAI,KAAK,WAAW,EAAE;gBAC/B,OAAO,KAAK,EAAE,KAAK,CAAC;aACrB;YACD,IAAI,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;gBAChC,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,YACtD,WAAW,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,IAD0B,KAAK,CAE9D,CACR,CAAC;aACH;YACD,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,aACtD,gBAAgB,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,CAAC,EACzC,gBAAgB,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,CAAC,KAFoB,KAAK,CAG9D,CACR,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,4BAAG,YAAY,EAAE,GAAI,CAAC;AAC/B,CAAC","sourcesContent":["/* eslint-disable react/no-array-index-key */\nimport React, { createElement, isValidElement } from 'react';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport createPConnectComponent from '../../../bridge/react_pconnect';\nimport { format } from '../../helpers/formatters';\n\n// DetailsFields is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface DetailsFieldsProps {\n // If any, enter additional props that only exist on this component\n fields: any[];\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n fieldLabel: {\n display: 'block',\n fontWeight: 400,\n color: theme.palette.text.secondary\n },\n fieldValue: {\n fontWeight: 400,\n color: theme.palette.text.primary\n }\n}));\n\nexport default function DetailsFields(props: DetailsFieldsProps) {\n // const componentName = \"DetailsFields\";\n const { fields = [] } = props;\n const classes = useStyles();\n const fieldComponents: any[] = [];\n\n fields?.forEach((field, index) => {\n const thePConn = field.getPConnect();\n const theCompType = thePConn.getComponentName().toLowerCase();\n const { label } = thePConn.getConfigProps();\n const configObj = thePConn?.getReferencedView();\n configObj.config.readOnly = true;\n configObj.config.displayMode = 'LABELS_LEFT';\n const propToUse = { ...thePConn.getInheritedProps() };\n configObj.config.label = theCompType === 'reference' ? propToUse?.label : label;\n fieldComponents.push({\n type: theCompType,\n label,\n value: <React.Fragment key={index}>{createElement(createPConnectComponent(), thePConn.getReferencedViewPConnect())}</React.Fragment>\n });\n });\n\n function getGridItemLabel(field: any, keyVal: string) {\n const dispValue = field.label;\n\n return (\n <Grid item xs={6} key={keyVal}>\n <Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>\n {dispValue}\n </Typography>\n </Grid>\n );\n }\n\n function formatItemValue(inField: any) {\n const { type, value } = inField;\n let formattedVal = value;\n\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (type) {\n case 'date':\n formattedVal = format(value, type);\n break;\n\n default:\n // No match means we return the value as we received it\n break;\n }\n\n // Finally, if the value is undefined or an empty string, we want to display it as \"---\"\n if (formattedVal === undefined || formattedVal === '') {\n formattedVal = '---';\n }\n\n return formattedVal;\n }\n\n function getGridItemValue(field: any, keyVal: string) {\n const formattedValue = formatItemValue(field);\n\n return (\n <Grid item xs={6} key={keyVal}>\n <Typography variant='body2' component='span' className={classes.fieldValue}>\n {formattedValue}\n </Typography>\n </Grid>\n );\n }\n\n function getGridItem(field: any, keyVal: string) {\n return (\n <Grid item xs={12} key={keyVal}>\n <Typography variant='body2' component='span' className={classes.fieldValue}>\n {field?.value}\n </Typography>\n </Grid>\n );\n }\n\n function getGridItems() {\n const gridItems: any[] = fieldComponents.map((field, index) => {\n if (field?.type === 'reference') {\n return field?.value;\n }\n if (isValidElement(field?.value)) {\n return (\n <Grid container spacing={1} style={{ padding: '4px 0px' }} key={index}>\n {getGridItem(field, `${index}-item`)}\n </Grid>\n );\n }\n return (\n <Grid container spacing={1} style={{ padding: '4px 0px' }} key={index}>\n {getGridItemLabel(field, `${index}-label`)}\n {getGridItemValue(field, `${index}-value`)}\n </Grid>\n );\n });\n return gridItems;\n }\n\n return <>{getGridItems()}</>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { default } from './DetailsFields'
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { default } from './DetailsFields';\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
interface FieldGroupProps {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
name?: string;
|
|
4
|
+
collapsible?: boolean;
|
|
5
|
+
instructions?: string;
|
|
5
6
|
}
|
|
6
|
-
export default function FieldGroup(props: FieldGroupProps): JSX.Element;
|
|
7
|
+
export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>): JSX.Element;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=FieldGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAQpD,UAAU,eAAe;IAEvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4BD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,eAsC3E"}
|