@pega/react-sdk-components 8.23.11 → 23.1.11
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 +7 -10
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -9
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +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 +6 -9
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +32 -33
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +10 -23
- 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 +8 -3
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +25 -14
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +6 -18
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +6 -12
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +49 -67
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -2
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +9 -15
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +75 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +5 -11
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +15 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +17 -17
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +12 -2
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +78 -70
- 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 +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +13 -13
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +6 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +15 -36
- 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 +5 -6
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +5 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +15 -9
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +5 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +15 -9
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +8 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +13 -29
- 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 -15
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +5 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +12 -11
- 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 +5 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +10 -8
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts +6 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +28 -29
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +5 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +10 -9
- 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 +19 -15
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.d.ts +7 -0
- package/lib/components/field/RichText/RichText.d.ts.map +1 -0
- package/lib/components/field/RichText/RichText.js +54 -0
- package/lib/components/field/RichText/RichText.js.map +1 -0
- package/lib/components/field/RichText/index.d.ts +2 -0
- package/lib/components/field/RichText/index.d.ts.map +1 -0
- package/lib/components/field/RichText/index.js +2 -0
- package/lib/components/field/RichText/index.js.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.js +32 -0
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
- package/lib/components/field/ScalarList/index.d.ts +2 -0
- package/lib/components/field/ScalarList/index.d.ts.map +1 -0
- package/lib/components/field/ScalarList/index.js +2 -0
- package/lib/components/field/ScalarList/index.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +11 -19
- 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 +6 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +8 -6
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +7 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +2 -2
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +6 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +10 -7
- 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 +5 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +11 -9
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +5 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +10 -8
- 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 +20 -41
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +17 -46
- 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 +3 -3
- 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 -4
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +2 -1
- 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.d.ts +1 -6
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.d.ts +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js +3 -3
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js +3 -7
- 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 +6 -6
- 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 +69 -320
- 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 +5 -5
- 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 +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 +12 -12
- 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/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 +3 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +48 -54
- 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 +7 -3
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +2 -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 +6 -0
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +7 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +11 -27
- 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 +9 -16
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +71 -74
- 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 +7 -15
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +6 -20
- 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 +10 -20
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +63 -192
- 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 -17
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +179 -172
- 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 +9 -22
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +24 -44
- 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 +9 -20
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +15 -33
- 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 +8 -13
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +11 -22
- 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 +5 -12
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +17 -26
- 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 +10 -18
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +32 -97
- 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 +8 -16
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +19 -66
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +8 -17
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +5 -17
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +4 -8
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +2 -7
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +13 -20
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +41 -80
- 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 +5 -8
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +19 -27
- 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 +4 -10
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +13 -17
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +13 -17
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +10 -32
- 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 +20 -16
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +27 -45
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +12 -24
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +7 -25
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -8
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +48 -12
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +10 -23
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +22 -58
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -15
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -19
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +10 -17
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +10 -28
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +15 -30
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +35 -72
- 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 +7 -11
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +5 -15
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +7 -15
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +8 -21
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -16
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +6 -23
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +7 -15
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +9 -22
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +7 -15
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +9 -22
- 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 +10 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +45 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -0
- package/lib/components/template/Details/DynamicTabs/index.d.ts +2 -0
- package/lib/components/template/Details/DynamicTabs/index.d.ts.map +1 -0
- package/lib/components/template/Details/DynamicTabs/index.js +2 -0
- package/lib/components/template/Details/DynamicTabs/index.js.map +1 -0
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +11 -26
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -8
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -14
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -16
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +9 -17
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +5 -13
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +7 -11
- 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 +15 -8
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +168 -258
- 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 +45 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +165 -32
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +5 -16
- 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 +11 -2
- 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 +7 -15
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +9 -22
- 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 +6 -2
- 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 +8 -15
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +7 -18
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +5 -8
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -13
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +5 -8
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +5 -8
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -7
- 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 +9 -14
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +14 -27
- 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 +62 -13
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +24 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +120 -130
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -29
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +15 -33
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +8 -29
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +5 -11
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +7 -17
- 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 +6 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +15 -24
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +5 -8
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +6 -12
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +15 -21
- 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 +11 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +3 -11
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +7 -15
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +23 -26
- 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 +6 -2
- 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 +8 -15
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +7 -17
- 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 +18 -1
- 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 +9 -17
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +13 -37
- 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 +277 -343
- 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 +4 -7
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +38 -36
- 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 +9 -1
- 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 +5 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +121 -140
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +5 -6
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +10 -25
- 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 +59 -29
- 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 +8 -1
- 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 +8 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +6 -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 +13 -27
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +26 -98
- 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 +39 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +4 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
- package/lib/hooks/useAfterInitialEffect.js +16 -0
- package/lib/hooks/useAfterInitialEffect.js.map +1 -0
- package/lib/hooks/useConsolidatedRef.d.ts +9 -0
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
- package/lib/hooks/useConsolidatedRef.js +30 -0
- package/lib/hooks/useConsolidatedRef.js.map +1 -0
- package/lib/hooks/useUID.d.ts +8 -0
- package/lib/hooks/useUID.d.ts.map +1 -0
- package/lib/hooks/useUID.js +14 -0
- package/lib/hooks/useUID.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/sdk-local-component-map.js +2 -2
- package/lib/sdk-pega-component-map.d.ts +21 -1
- package/lib/sdk-pega-component-map.js +112 -92
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +41 -0
- package/package.json +5 -2
- package/lib/components/helpers/auth.d.ts +0 -16
- package/lib/components/helpers/auth.d.ts.map +0 -1
- package/lib/components/helpers/auth.js +0 -437
- package/lib/components/helpers/auth.js.map +0 -1
- package/lib/components/helpers/authManager.d.ts +0 -18
- package/lib/components/helpers/authManager.d.ts.map +0 -1
- package/lib/components/helpers/authManager.js +0 -592
- 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 -261
- package/lib/components/helpers/config_access.js.map +0 -1
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { useEffect, createElement } from 'react';
|
|
2
|
+
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
3
|
+
import { isContainerInitialized } from '../helpers';
|
|
4
|
+
const processRootViewDetails = (rootView, containerItem, options) => {
|
|
5
|
+
const { config: { context: viewContext, name: viewName } } = rootView;
|
|
6
|
+
const { context: containerContext } = containerItem;
|
|
7
|
+
const { parentGetPConnect } = options;
|
|
8
|
+
let resolvedViewName = viewName;
|
|
9
|
+
let resolvedViewContext = viewContext;
|
|
10
|
+
const isAnnotedViewName = PCore.getAnnotationUtils().isProperty(viewName);
|
|
11
|
+
const isAnnotedViewContext = PCore.getAnnotationUtils().isProperty(viewContext);
|
|
12
|
+
// resolving annoted view context
|
|
13
|
+
if (isAnnotedViewContext) {
|
|
14
|
+
const viewContextProperty = PCore.getAnnotationUtils().getPropertyName(viewContext);
|
|
15
|
+
resolvedViewContext = PCore.getStoreValue(`.${viewContextProperty}`, viewContextProperty.startsWith('.') ? parentGetPConnect().getPageReference() : '', containerContext);
|
|
16
|
+
}
|
|
17
|
+
if (!resolvedViewContext) {
|
|
18
|
+
resolvedViewContext = parentGetPConnect().getPageReference();
|
|
19
|
+
}
|
|
20
|
+
// resolving annoted view name
|
|
21
|
+
if (isAnnotedViewName) {
|
|
22
|
+
const viewNameProperty = PCore.getAnnotationUtils().getPropertyName(viewName);
|
|
23
|
+
resolvedViewName = PCore.getStoreValue(`.${viewNameProperty}`, resolvedViewContext, containerContext);
|
|
24
|
+
}
|
|
25
|
+
/* Special case where context and viewname are dynamic values
|
|
26
|
+
Use case - split for each shape
|
|
27
|
+
|
|
28
|
+
Ex - (caseInfo.content.SCRequestWorkQueues[1]):context --> .pyViewName:viewName
|
|
29
|
+
*/
|
|
30
|
+
if (isAnnotedViewName && isAnnotedViewContext && resolvedViewName !== '') {
|
|
31
|
+
/* Allow context processor to resolve view and context when both are dynamic */
|
|
32
|
+
resolvedViewName = viewName;
|
|
33
|
+
resolvedViewContext = viewContext;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
viewName: resolvedViewName,
|
|
37
|
+
viewContext: resolvedViewContext
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export const getPConnectOfActiveContainerItem = (containerInfo, options) => {
|
|
41
|
+
const { accessedOrder, items } = containerInfo;
|
|
42
|
+
const { isAssignmentView = false, parentGetPConnect } = options;
|
|
43
|
+
const containerName = parentGetPConnect().getContainerName();
|
|
44
|
+
const { CONTAINER_NAMES } = PCore.getContainerUtils();
|
|
45
|
+
const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();
|
|
46
|
+
if (accessedOrder && items) {
|
|
47
|
+
const activeContainerItemKey = accessedOrder[accessedOrder.length - 1];
|
|
48
|
+
if (items[activeContainerItemKey] && items[activeContainerItemKey].view && Object.keys(items[activeContainerItemKey].view).length > 0) {
|
|
49
|
+
const activeContainerItem = items[activeContainerItemKey];
|
|
50
|
+
const target = activeContainerItemKey.substring(0, activeContainerItemKey.lastIndexOf('_'));
|
|
51
|
+
const { view: rootView, context } = activeContainerItem;
|
|
52
|
+
const { viewName, viewContext } = processRootViewDetails(rootView, activeContainerItem, { parentGetPConnect });
|
|
53
|
+
if (!viewName)
|
|
54
|
+
return null;
|
|
55
|
+
const config = {
|
|
56
|
+
meta: rootView,
|
|
57
|
+
options: {
|
|
58
|
+
context,
|
|
59
|
+
pageReference: viewContext || parentGetPConnect().getPageReference(),
|
|
60
|
+
containerName,
|
|
61
|
+
containerItemID: activeContainerItemKey,
|
|
62
|
+
parentPageReference: parentGetPConnect().getPageReference(),
|
|
63
|
+
hasForm: isAssignmentView ||
|
|
64
|
+
containerName === CONTAINER_NAMES.WORKAREA ||
|
|
65
|
+
containerName === CONTAINER_NAMES.MODAL ||
|
|
66
|
+
viewName === CREATE_DETAILS_VIEW_NAME,
|
|
67
|
+
target
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return PCore.createPConnect(config).getPConnect;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return null;
|
|
74
|
+
};
|
|
75
|
+
export const getActiveContainerRootViewElement = (containerInfo, options) => {
|
|
76
|
+
const getPConnect = getPConnectOfActiveContainerItem(containerInfo, options);
|
|
77
|
+
if (getPConnect) {
|
|
78
|
+
return createElement(createPConnectComponent(), { getPConnect });
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
};
|
|
82
|
+
export const getActiveContainerItemID = containerInfo => {
|
|
83
|
+
const { accessedOrder } = containerInfo;
|
|
84
|
+
if (accessedOrder && accessedOrder.length > 0) {
|
|
85
|
+
return accessedOrder[accessedOrder.length - 1];
|
|
86
|
+
}
|
|
87
|
+
return '';
|
|
88
|
+
};
|
|
89
|
+
export const useContainerInitializer = (getPConnect, mode) => {
|
|
90
|
+
const pConnect = getPConnect();
|
|
91
|
+
const containerName = pConnect.getContainerName();
|
|
92
|
+
const containerManager = pConnect.getContainerManager();
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (!isContainerInitialized(pConnect)) {
|
|
95
|
+
containerManager.initializeContainers({
|
|
96
|
+
type: mode,
|
|
97
|
+
name: containerName
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,sBAAsB,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,EAAE;IAClE,MAAM,EACJ,MAAM,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,EACjD,GAAG,QAAQ,CAAC;IACb,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,aAAa,CAAC;IACpD,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC;IACtC,IAAI,gBAAgB,GAAG,QAAQ,CAAC;IAChC,IAAI,mBAAmB,GAAG,WAAW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AC,EAAE;YACrC,gBAAgB,CAAC,oBAAoB,CAAC;gBACpC,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,aAAa;aACpB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { useEffect, createElement } from 'react';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport { isContainerInitialized } from '../helpers';\n\nconst processRootViewDetails = (rootView, containerItem, options) => {\n const {\n config: { context: viewContext, name: viewName }\n } = rootView;\n const { context: containerContext } = containerItem;\n const { parentGetPConnect } = options;\n let resolvedViewName = viewName;\n let resolvedViewContext = viewContext;\n\n const isAnnotedViewName = PCore.getAnnotationUtils().isProperty(viewName);\n const isAnnotedViewContext = PCore.getAnnotationUtils().isProperty(viewContext);\n\n // resolving annoted view context\n if (isAnnotedViewContext) {\n const viewContextProperty = PCore.getAnnotationUtils().getPropertyName(viewContext);\n resolvedViewContext = PCore.getStoreValue(\n `.${viewContextProperty}`,\n viewContextProperty.startsWith('.') ? parentGetPConnect().getPageReference() : '',\n containerContext\n );\n }\n\n if (!resolvedViewContext) {\n resolvedViewContext = parentGetPConnect().getPageReference();\n }\n\n // resolving annoted view name\n if (isAnnotedViewName) {\n const viewNameProperty = PCore.getAnnotationUtils().getPropertyName(viewName);\n resolvedViewName = PCore.getStoreValue(`.${viewNameProperty}`, resolvedViewContext, containerContext);\n }\n\n /* Special case where context and viewname are dynamic values\n Use case - split for each shape\n\n Ex - (caseInfo.content.SCRequestWorkQueues[1]):context --> .pyViewName:viewName\n */\n if (isAnnotedViewName && isAnnotedViewContext && resolvedViewName !== '') {\n /* Allow context processor to resolve view and context when both are dynamic */\n resolvedViewName = viewName;\n resolvedViewContext = viewContext;\n }\n\n return {\n viewName: resolvedViewName,\n viewContext: resolvedViewContext\n };\n};\n\nexport const getPConnectOfActiveContainerItem = (containerInfo, options) => {\n const { accessedOrder, items } = containerInfo;\n const { isAssignmentView = false, parentGetPConnect } = options;\n const containerName = parentGetPConnect().getContainerName();\n const { CONTAINER_NAMES } = PCore.getContainerUtils();\n const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();\n\n if (accessedOrder && items) {\n const activeContainerItemKey = accessedOrder[accessedOrder.length - 1];\n\n if (items[activeContainerItemKey] && items[activeContainerItemKey].view && Object.keys(items[activeContainerItemKey].view).length > 0) {\n const activeContainerItem = items[activeContainerItemKey];\n const target = activeContainerItemKey.substring(0, activeContainerItemKey.lastIndexOf('_'));\n\n const { view: rootView, context } = activeContainerItem;\n const { viewName, viewContext } = processRootViewDetails(rootView, activeContainerItem, { parentGetPConnect });\n\n if (!viewName) return null;\n\n const config = {\n meta: rootView,\n options: {\n context,\n pageReference: viewContext || parentGetPConnect().getPageReference(),\n containerName,\n containerItemID: activeContainerItemKey,\n parentPageReference: parentGetPConnect().getPageReference(),\n hasForm:\n isAssignmentView ||\n containerName === CONTAINER_NAMES.WORKAREA ||\n containerName === CONTAINER_NAMES.MODAL ||\n viewName === CREATE_DETAILS_VIEW_NAME,\n target\n }\n };\n\n return PCore.createPConnect(config).getPConnect;\n }\n }\n return null;\n};\n\nexport const getActiveContainerRootViewElement = (containerInfo, options) => {\n const getPConnect = getPConnectOfActiveContainerItem(containerInfo, options);\n if (getPConnect) {\n return createElement(createPConnectComponent(), { getPConnect });\n }\n return null;\n};\n\nexport const getActiveContainerItemID = containerInfo => {\n const { accessedOrder } = containerInfo;\n if (accessedOrder && accessedOrder.length > 0) {\n return accessedOrder[accessedOrder.length - 1];\n }\n return '';\n};\n\nexport const useContainerInitializer = (getPConnect, mode) => {\n const pConnect = getPConnect();\n const containerName = pConnect.getContainerName();\n const containerManager = pConnect.getContainerManager();\n useEffect(() => {\n if (!isContainerInitialized(pConnect)) {\n containerManager.initializeContainers({\n type: mode,\n name: containerName\n });\n }\n });\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/SimpleView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { default } from './SimpleView';\n"]}
|
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
routingInfo: null;
|
|
10
|
-
mode: string;
|
|
11
|
-
limit: number;
|
|
12
|
-
};
|
|
13
|
-
var propTypes: {
|
|
14
|
-
getPConnect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
name: PropTypes.Requireable<string>;
|
|
16
|
-
loadingInfo: PropTypes.Requireable<boolean>;
|
|
17
|
-
routingInfo: PropTypes.Requireable<{
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
}>;
|
|
20
|
-
mode: PropTypes.Requireable<string>;
|
|
21
|
-
limit: PropTypes.Requireable<number>;
|
|
22
|
-
};
|
|
2
|
+
import { PConnProps } from '../../../../types/PConnProps';
|
|
3
|
+
interface ViewContainerProps extends PConnProps {
|
|
4
|
+
name?: string;
|
|
5
|
+
loadingInfo?: any;
|
|
6
|
+
routingInfo?: any;
|
|
7
|
+
mode?: string;
|
|
8
|
+
limit?: number;
|
|
23
9
|
}
|
|
24
|
-
export default ViewContainer;
|
|
10
|
+
export default function ViewContainer(props: ViewContainerProps): JSX.Element;
|
|
11
|
+
export {};
|
|
25
12
|
//# sourceMappingURL=ViewContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ViewContainer/ViewContainer.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ViewContainer.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ViewContainer/ViewContainer.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,UAAU,kBAAmB,SAAQ,UAAU;IAE7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAWD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA8K9D"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { Box, CircularProgress } from
|
|
4
|
-
import createPConnectComponent from
|
|
5
|
-
import StoreContext from
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { createElement, useContext, useEffect, useState } from 'react';
|
|
3
|
+
import { Box, CircularProgress } from '@material-ui/core';
|
|
4
|
+
import createPConnectComponent from '../../../../bridge/react_pconnect';
|
|
5
|
+
import StoreContext from '../../../../bridge/Context/StoreContext';
|
|
6
6
|
import { isEmptyObject } from '../../../helpers/common-utils';
|
|
7
7
|
// ViewContainer can emit View
|
|
8
8
|
// import View from '../View';
|
|
@@ -13,32 +13,36 @@ import { isEmptyObject } from '../../../helpers/common-utils';
|
|
|
13
13
|
//
|
|
14
14
|
export default function ViewContainer(props) {
|
|
15
15
|
// const { getPConnect, children, routingInfo, name } = props;
|
|
16
|
-
const { getPConnect, name, mode, limit, loadingInfo, routingInfo } = props;
|
|
16
|
+
const { getPConnect, name = '', mode = 'single', limit = 16, loadingInfo = false, routingInfo = null } = props;
|
|
17
17
|
const { displayOnlyFA } = useContext(StoreContext);
|
|
18
18
|
const { CONTAINER_TYPE, APP } = PCore.getConstants();
|
|
19
19
|
const pConn = getPConnect();
|
|
20
20
|
const containerMgr = pConn.getContainerManager();
|
|
21
21
|
const [dispatchObjState, setDispatchObjState] = useState({
|
|
22
|
-
dispatchObject: { semanticURL:
|
|
22
|
+
dispatchObject: { semanticURL: '', context: '', acName: '' },
|
|
23
23
|
visible: false,
|
|
24
24
|
loadingInfo: null,
|
|
25
25
|
isLoadingInfoChange: false
|
|
26
26
|
}); // was this.state in class-based ViewContainer avoiding use of just "state" as the name
|
|
27
27
|
let root;
|
|
28
|
-
const thePConn =
|
|
28
|
+
const thePConn = typeof getPConnect === 'function' ? getPConnect() : null;
|
|
29
29
|
// beginning of functions for use by ViewContainer
|
|
30
30
|
function buildName() {
|
|
31
|
-
const context = thePConn
|
|
31
|
+
const context = thePConn?.getContextName();
|
|
32
32
|
let viewContainerName = name;
|
|
33
33
|
if (!viewContainerName)
|
|
34
|
-
viewContainerName =
|
|
35
|
-
return `${context
|
|
34
|
+
viewContainerName = '';
|
|
35
|
+
return `${context?.toUpperCase()}/${viewContainerName.toUpperCase()}`;
|
|
36
36
|
}
|
|
37
37
|
function prepareDispatchObject() {
|
|
38
38
|
const baseContext = pConn.getContextName();
|
|
39
|
-
const { acName = "primary" } = pConn.getContainerName();
|
|
39
|
+
// const { acName = "primary" } = pConn.getContainerName(); // doesn't work with 8.23 typings
|
|
40
|
+
let acName = pConn.getContainerName();
|
|
41
|
+
if (!acName) {
|
|
42
|
+
acName = 'primary';
|
|
43
|
+
}
|
|
40
44
|
return {
|
|
41
|
-
semanticURL:
|
|
45
|
+
semanticURL: '',
|
|
42
46
|
context: baseContext,
|
|
43
47
|
acName
|
|
44
48
|
};
|
|
@@ -64,9 +68,7 @@ export default function ViewContainer(props) {
|
|
|
64
68
|
useEffect(() => {
|
|
65
69
|
// This is adapted from the class-based ViewContainer constructor
|
|
66
70
|
containerMgr.initializeContainers({
|
|
67
|
-
type: mode === CONTAINER_TYPE.MULTIPLE
|
|
68
|
-
? CONTAINER_TYPE.MULTIPLE
|
|
69
|
-
: CONTAINER_TYPE.SINGLE
|
|
71
|
+
type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE
|
|
70
72
|
});
|
|
71
73
|
if (mode === CONTAINER_TYPE.MULTIPLE && limit) {
|
|
72
74
|
/* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */
|
|
@@ -93,8 +95,8 @@ export default function ViewContainer(props) {
|
|
|
93
95
|
objectForAddContainer = theDispatchObject;
|
|
94
96
|
}
|
|
95
97
|
// Getting default view label
|
|
96
|
-
const navPages = pConn.getValue(
|
|
97
|
-
const defaultViewLabel = Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel :
|
|
98
|
+
const navPages = pConn.getValue('pyPortal.pyPrimaryNavPages', ''); // 2nd arg empty string until typedefs allow optional
|
|
99
|
+
const defaultViewLabel = Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel : '';
|
|
98
100
|
// TODO: Plan is to rename window.constellationCore to window.pega (or similar)
|
|
99
101
|
// And expose less via ui-bootstrap.js
|
|
100
102
|
// PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore
|
|
@@ -119,9 +121,7 @@ export default function ViewContainer(props) {
|
|
|
119
121
|
let componentVisible = accessedOrder.length > 0;
|
|
120
122
|
const { visible } = dispatchObjState;
|
|
121
123
|
componentVisible = visible || componentVisible;
|
|
122
|
-
if (items[key] &&
|
|
123
|
-
items[key].view &&
|
|
124
|
-
!isEmptyObject(items[key].view)) {
|
|
124
|
+
if (items[key] && items[key].view && !isEmptyObject(items[key].view)) {
|
|
125
125
|
const latestItem = items[key];
|
|
126
126
|
const rootView = latestItem.view;
|
|
127
127
|
const { context, name: viewName } = rootView.config;
|
|
@@ -136,34 +136,14 @@ export default function ViewContainer(props) {
|
|
|
136
136
|
const configObject = PCore.createPConnect(config);
|
|
137
137
|
// Add in displayOnlyFA if prop is on ViewContainer
|
|
138
138
|
if (displayOnlyFA) {
|
|
139
|
-
configObject
|
|
139
|
+
configObject.displayOnlyFA = true;
|
|
140
140
|
}
|
|
141
141
|
setRootComponent(configObject);
|
|
142
|
-
return (
|
|
143
|
-
componentVisible && root,
|
|
144
|
-
loadingInfo && React.createElement(Box, { textAlign: "center" },
|
|
145
|
-
React.createElement(CircularProgress, null))));
|
|
142
|
+
return (_jsxs(React.Fragment, { children: [componentVisible && root, loadingInfo && (_jsx(Box, { textAlign: 'center', children: _jsx(CircularProgress, {}) }))] }, theBuildName));
|
|
146
143
|
}
|
|
147
144
|
}
|
|
148
145
|
}
|
|
149
146
|
// fall through return if insufficient routingInfo
|
|
150
|
-
return (
|
|
151
|
-
React.createElement(CircularProgress, null))));
|
|
147
|
+
return (_jsx(React.Fragment, { children: loadingInfo && (_jsx(Box, { textAlign: 'center', children: _jsx(CircularProgress, {}) })) }, theBuildName));
|
|
152
148
|
}
|
|
153
|
-
ViewContainer.defaultProps = {
|
|
154
|
-
getPConnect: null,
|
|
155
|
-
name: "",
|
|
156
|
-
loadingInfo: false,
|
|
157
|
-
routingInfo: null,
|
|
158
|
-
mode: "single",
|
|
159
|
-
limit: 16
|
|
160
|
-
};
|
|
161
|
-
ViewContainer.propTypes = {
|
|
162
|
-
getPConnect: PropTypes.func,
|
|
163
|
-
name: PropTypes.string,
|
|
164
|
-
loadingInfo: PropTypes.bool,
|
|
165
|
-
routingInfo: PropTypes.objectOf(PropTypes.any),
|
|
166
|
-
mode: PropTypes.string,
|
|
167
|
-
limit: PropTypes.number
|
|
168
|
-
};
|
|
169
149
|
//# sourceMappingURL=ViewContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewContainer.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ViewContainer/ViewContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;A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,IAAI,CAAC;iBACtC;gBAED,gBAAgB,CAAC,YAAY,CAAC,CAAC;gBAC/B,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,YAAY;oBAC9B,gBAAgB,IAAI,IAAI;oBACxB,WAAW,IAAI,oBAAC,GAAG,IAAC,SAAS,EAAC,QAAQ;wBAAC,oBAAC,gBAAgB,OAAG,CAAM,CACnD,CAClB,CAAC;aACH;SACF;KACF;IAED,kDAAkD;IAClD,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,YAAY,IAC9B,WAAW,IAAI,oBAAC,GAAG,IAAC,SAAS,EAAC,QAAQ;QAAC,oBAAC,gBAAgB,OAAG,CAAM,CACnD,CAClB,CAAC;AAEJ,CAAC;AAED,aAAa,CAAC,YAAY,GAAG;IAC3B,WAAW,EAAE,IAAI;IACjB,IAAI,EAAE,EAAE;IACR,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,IAAI;IACjB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,aAAa,CAAC,SAAS,GAAG;IACxB,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,IAAI,EAAE,SAAS,CAAC,MAAM;IACtB,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,WAAW,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;IAC9C,IAAI,EAAE,SAAS,CAAC,MAAM;IACtB,KAAK,EAAE,SAAS,CAAC,MAAM;CACxB,CAAC","sourcesContent":["import React, { useEffect, useState, useContext, createElement } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Box, CircularProgress } from \"@material-ui/core\";\nimport createPConnectComponent from \"../../../../bridge/react_pconnect\";\nimport StoreContext from \"../../../../bridge/Context/StoreContext\";\nimport { isEmptyObject } from '../../../helpers/common-utils';\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\n// ViewContainer can emit View\n// import View from '../View';\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\n\nexport default function ViewContainer(props) {\n // const { getPConnect, children, routingInfo, name } = props;\n const { getPConnect, name, mode, limit, loadingInfo, routingInfo } = props;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n\n const { CONTAINER_TYPE, APP } = PCore.getConstants();\n const pConn = getPConnect();\n const containerMgr: any = pConn.getContainerManager();\n\n const [dispatchObjState, setDispatchObjState] = useState({\n dispatchObject: {semanticURL: \"\", context: \"\", acName: \"\"},\n visible: false,\n loadingInfo: null,\n isLoadingInfoChange: false\n }); // was this.state in class-based ViewContainer avoiding use of just \"state\" as the name\n\n let root;\n\n\n const thePConn = ((typeof getPConnect) === 'function') ? getPConnect() : null;\n\n // beginning of functions for use by ViewContainer\n\n function buildName() {\n const context = thePConn.getContextName();\n let viewContainerName = name;\n if (!viewContainerName) viewContainerName = \"\";\n return `${context.toUpperCase()}/${viewContainerName.toUpperCase()}`;\n }\n\n function prepareDispatchObject() {\n const baseContext = pConn.getContextName();\n const { acName = \"primary\" } = pConn.getContainerName();\n\n return {\n semanticURL: \"\",\n context: baseContext,\n acName\n };\n }\n\n // determine if or not loadingInfo prop changed on next re-render\n // function getDerivedStateFromProps(nextProps, prevState) {\n // const { loadingInfo: prevLoadingInfo } = prevState;\n // const { loadingInfo: nextLoadingIndfo } = nextProps;\n // return {\n // loadingInfo: nextLoadingIndfo,\n // isLoadingInfoChange: prevLoadingInfo !== nextLoadingIndfo\n // };\n // }\n\n // set the root component that is retrieved by PConnectHOC\n function setRootComponent(configObject) {\n\n const { isLoadingInfoChange } = dispatchObjState;\n if (!isLoadingInfoChange) {\n root = createElement(createPConnectComponent(), configObject);\n }\n }\n\n // end of functions for use by ViewContainer\n\n // useEffect on [] -> code that should be run once (as in old constructor and in componentDidMount)\n useEffect(() => {\n\n // This is adapted from the class-based ViewContainer constructor\n containerMgr.initializeContainers({\n type:\n mode === CONTAINER_TYPE.MULTIPLE\n ? CONTAINER_TYPE.MULTIPLE\n : CONTAINER_TYPE.SINGLE\n });\n\n if (mode === CONTAINER_TYPE.MULTIPLE && limit) {\n /* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */\n PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);\n }\n\n const dispatchObject = prepareDispatchObject();\n setDispatchObjState( {\n dispatchObject,\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n visible: !PCore.checkIfSemanticURL(),\n loadingInfo,\n isLoadingInfoChange: false\n });\n\n const { visible } = dispatchObjState;\n if (visible) containerMgr.addContainerItem(dispatchObject);\n\n // This is adapted from the class-based ViewContainer componentDidMount\n let objectForAddContainer;\n if (PCore.checkIfSemanticURL()) {\n objectForAddContainer = prepareDispatchObject();\n } else {\n const { dispatchObject: theDispatchObject } = dispatchObjState;\n objectForAddContainer = theDispatchObject;\n }\n\n // Getting default view label\n const navPages = pConn.getValue(\"pyPortal.pyPrimaryNavPages\");\n const defaultViewLabel =\n Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel : \"\";\n // TODO: Plan is to rename window.constellationCore to window.pega (or similar)\n // And expose less via ui-bootstrap.js\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n\n if (!displayOnlyFA) {\n // configureForBrowserBookmark not applicable in Embedded mode\n PCore.configureForBrowserBookmark({\n ...objectForAddContainer,\n defaultViewLabel\n });\n\n }\n\n },\n []);\n\n // This code (that's run every time the ViewContainer is called) is adapted from the class-based ViewContainer's render\n\n // Looking for routingInfo\n\n // debugging/investigation help\n // console.log(`ViewContainer props: ${JSON.stringify(props)}`);\n\n const theBuildName = buildName();\n const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();\n if (routingInfo) {\n const { accessedOrder, items } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n let componentVisible = accessedOrder.length > 0;\n const { visible } = dispatchObjState;\n componentVisible = visible || componentVisible;\n if (\n items[key] &&\n items[key].view &&\n !isEmptyObject(items[key].view)\n ) {\n const latestItem = items[key];\n const rootView = latestItem.view;\n const { context, name: viewName } = rootView.config;\n const config: any = { meta: rootView };\n config.options = {\n context: latestItem.context,\n pageReference: context || getPConnect().getPageReference(),\n containerName: getPConnect().getContainerName(),\n containerItemName: key,\n hasForm: viewName === CREATE_DETAILS_VIEW_NAME\n };\n const configObject = PCore.createPConnect(config);\n\n // Add in displayOnlyFA if prop is on ViewContainer\n if (displayOnlyFA) {\n configObject[\"displayOnlyFA\"] = true;\n }\n\n setRootComponent(configObject);\n return (\n <React.Fragment key={theBuildName}>\n {componentVisible && root}\n {loadingInfo && <Box textAlign=\"center\"><CircularProgress /></Box>}\n </React.Fragment>\n );\n }\n }\n }\n\n // fall through return if insufficient routingInfo\n return (\n <React.Fragment key={theBuildName}>\n {loadingInfo && <Box textAlign=\"center\"><CircularProgress /></Box>}\n </React.Fragment>\n );\n\n}\n\nViewContainer.defaultProps = {\n getPConnect: null,\n name: \"\",\n loadingInfo: false,\n routingInfo: null,\n mode: \"single\",\n limit: 16\n};\n\nViewContainer.propTypes = {\n getPConnect: PropTypes.func,\n name: PropTypes.string,\n loadingInfo: PropTypes.bool,\n routingInfo: PropTypes.objectOf(PropTypes.any),\n mode: PropTypes.string,\n limit: PropTypes.number\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ViewContainer.js","sourceRoot":"","sources":["../../../../../src/components/infra/Containers/ViewContainer/ViewContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,YAA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C,CAAC;gBAC/B,OAAO,CACL,MAAC,KAAK,CAAC,QAAQ,eACZ,gBAAgB,IAAI,IAAI,EACxB,WAAW,IAAI,CACd,KAAC,GAAG,IAAC,SAAS,EAAC,QAAQ,YACrB,KAAC,gBAAgB,KAAG,GAChB,CACP,KANkB,YAAY,CAOhB,CAClB,CAAC;aACH;SACF;KACF;IAED,kDAAkD;IAClD,OAAO,CACL,KAAC,KAAK,CAAC,QAAQ,cACZ,WAAW,IAAI,CACd,KAAC,GAAG,IAAC,SAAS,EAAC,QAAQ,YACrB,KAAC,gBAAgB,KAAG,GAChB,CACP,IALkB,YAAY,CAMhB,CAClB,CAAC;AACJ,CAAC","sourcesContent":["import React, { createElement, useContext, useEffect, useState } from 'react';\nimport { Box, CircularProgress } from '@material-ui/core';\n\nimport createPConnectComponent from '../../../../bridge/react_pconnect';\nimport StoreContext from '../../../../bridge/Context/StoreContext';\nimport { isEmptyObject } from '../../../helpers/common-utils';\nimport { PConnProps } from '../../../../types/PConnProps';\n\ninterface ViewContainerProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n name?: string;\n loadingInfo?: any; // can't be boolean until setDispatchObjState expects loadingInfo to be type null\n routingInfo?: any;\n mode?: string;\n limit?: number;\n}\n\n// ViewContainer can emit View\n// import View from '../View';\n\n//\n// WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with\n// Redux and creation/update of Redux containers and PConnect. Modifying this code could have undesireable results and\n// is totally at your own risk.\n//\n\nexport default function ViewContainer(props: ViewContainerProps) {\n // const { getPConnect, children, routingInfo, name } = props;\n const { getPConnect, name = '', mode = 'single', limit = 16, loadingInfo = false, routingInfo = null } = props;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n const { CONTAINER_TYPE, APP } = PCore.getConstants();\n const pConn = getPConnect();\n const containerMgr: any = pConn.getContainerManager();\n\n const [dispatchObjState, setDispatchObjState] = useState({\n dispatchObject: { semanticURL: '', context: '', acName: '' },\n visible: false,\n loadingInfo: null,\n isLoadingInfoChange: false\n }); // was this.state in class-based ViewContainer avoiding use of just \"state\" as the name\n\n let root;\n\n const thePConn = typeof getPConnect === 'function' ? getPConnect() : null;\n\n // beginning of functions for use by ViewContainer\n\n function buildName() {\n const context = thePConn?.getContextName();\n let viewContainerName = name;\n if (!viewContainerName) viewContainerName = '';\n return `${context?.toUpperCase()}/${viewContainerName.toUpperCase()}`;\n }\n\n function prepareDispatchObject() {\n const baseContext = pConn.getContextName();\n // const { acName = \"primary\" } = pConn.getContainerName(); // doesn't work with 8.23 typings\n let acName = pConn.getContainerName();\n if (!acName) {\n acName = 'primary';\n }\n\n return {\n semanticURL: '',\n context: baseContext,\n acName\n };\n }\n\n // determine if or not loadingInfo prop changed on next re-render\n // function getDerivedStateFromProps(nextProps, prevState) {\n // const { loadingInfo: prevLoadingInfo } = prevState;\n // const { loadingInfo: nextLoadingIndfo } = nextProps;\n // return {\n // loadingInfo: nextLoadingIndfo,\n // isLoadingInfoChange: prevLoadingInfo !== nextLoadingIndfo\n // };\n // }\n\n // set the root component that is retrieved by PConnectHOC\n function setRootComponent(configObject) {\n const { isLoadingInfoChange } = dispatchObjState;\n if (!isLoadingInfoChange) {\n root = createElement(createPConnectComponent(), configObject);\n }\n }\n\n // end of functions for use by ViewContainer\n\n // useEffect on [] -> code that should be run once (as in old constructor and in componentDidMount)\n useEffect(() => {\n // This is adapted from the class-based ViewContainer constructor\n containerMgr.initializeContainers({\n type: mode === CONTAINER_TYPE.MULTIPLE ? CONTAINER_TYPE.MULTIPLE : CONTAINER_TYPE.SINGLE\n });\n\n if (mode === CONTAINER_TYPE.MULTIPLE && limit) {\n /* NOTE: setContainerLimit use is temporary. It is a non-public, unsupported API. */\n PCore.getContainerUtils().setContainerLimit(`${APP.APP}/${name}`, limit);\n }\n\n const dispatchObject = prepareDispatchObject();\n setDispatchObjState({\n dispatchObject,\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n visible: !PCore.checkIfSemanticURL(),\n loadingInfo,\n isLoadingInfoChange: false\n });\n\n const { visible } = dispatchObjState;\n if (visible) containerMgr.addContainerItem(dispatchObject);\n\n // This is adapted from the class-based ViewContainer componentDidMount\n let objectForAddContainer;\n if (PCore.checkIfSemanticURL()) {\n objectForAddContainer = prepareDispatchObject();\n } else {\n const { dispatchObject: theDispatchObject } = dispatchObjState;\n objectForAddContainer = theDispatchObject;\n }\n\n // Getting default view label\n const navPages = pConn.getValue('pyPortal.pyPrimaryNavPages', ''); // 2nd arg empty string until typedefs allow optional\n const defaultViewLabel = Array.isArray(navPages) && navPages[0] ? navPages[0].pyLabel : '';\n // TODO: Plan is to rename window.constellationCore to window.pega (or similar)\n // And expose less via ui-bootstrap.js\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n\n if (!displayOnlyFA) {\n // configureForBrowserBookmark not applicable in Embedded mode\n PCore.configureForBrowserBookmark({\n ...objectForAddContainer,\n defaultViewLabel\n });\n }\n }, []);\n\n // This code (that's run every time the ViewContainer is called) is adapted from the class-based ViewContainer's render\n\n // Looking for routingInfo\n\n // debugging/investigation help\n // console.log(`ViewContainer props: ${JSON.stringify(props)}`);\n\n const theBuildName = buildName();\n const { CREATE_DETAILS_VIEW_NAME } = PCore.getConstants();\n if (routingInfo) {\n const { accessedOrder, items } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n let componentVisible = accessedOrder.length > 0;\n const { visible } = dispatchObjState;\n componentVisible = visible || componentVisible;\n if (items[key] && items[key].view && !isEmptyObject(items[key].view)) {\n const latestItem = items[key];\n const rootView = latestItem.view;\n const { context, name: viewName } = rootView.config;\n const config: any = { meta: rootView };\n config.options = {\n context: latestItem.context,\n pageReference: context || getPConnect().getPageReference(),\n containerName: getPConnect().getContainerName(),\n containerItemName: key,\n hasForm: viewName === CREATE_DETAILS_VIEW_NAME\n };\n const configObject: any = PCore.createPConnect(config);\n\n // Add in displayOnlyFA if prop is on ViewContainer\n if (displayOnlyFA) {\n configObject.displayOnlyFA = true;\n }\n\n setRootComponent(configObject);\n return (\n <React.Fragment key={theBuildName}>\n {componentVisible && root}\n {loadingInfo && (\n <Box textAlign='center'>\n <CircularProgress />\n </Box>\n )}\n </React.Fragment>\n );\n }\n }\n }\n\n // fall through return if insufficient routingInfo\n return (\n <React.Fragment key={theBuildName}>\n {loadingInfo && (\n <Box textAlign='center'>\n <CircularProgress />\n </Box>\n )}\n </React.Fragment>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Containers/helpers.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,sBAAsB,4BAIlC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
2
|
+
export const isContainerInitialized = pConnect => {
|
|
3
|
+
const context = pConnect.getContextName();
|
|
4
|
+
const containerName = pConnect.getContainerName();
|
|
5
|
+
return PCore.getContainerUtils().isContainerInitialized(context, containerName);
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/components/infra/Containers/helpers.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,EAAE;IAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAC1C,MAAM,aAAa,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IAClD,OAAO,KAAK,CAAC,iBAAiB,EAAE,CAAC,sBAAsB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAClF,CAAC,CAAC","sourcesContent":["// eslint-disable-next-line import/prefer-default-export\nexport const isContainerInitialized = pConnect => {\n const context = pConnect.getContextName();\n const containerName = pConnect.getContainerName();\n return PCore.getContainerUtils().isContainerInitialized(context, containerName);\n};\n"]}
|
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PConnProps } from '../../../types/PConnProps';
|
|
3
3
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
metadata: null;
|
|
10
|
-
};
|
|
11
|
-
var propTypes: {
|
|
12
|
-
getPConnect: PropTypes.Validator<(...args: any[]) => any>;
|
|
13
|
-
children: PropTypes.Requireable<object>;
|
|
14
|
-
name: PropTypes.Validator<string>;
|
|
15
|
-
filterProp: PropTypes.Validator<string>;
|
|
16
|
-
type: PropTypes.Requireable<string>;
|
|
17
|
-
metadata: PropTypes.Requireable<{
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
}>;
|
|
20
|
-
};
|
|
4
|
+
interface DashboardFilterProps extends PConnProps {
|
|
5
|
+
name: string;
|
|
6
|
+
filterProp: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
metadata?: any;
|
|
21
9
|
}
|
|
22
|
-
export default DashboardFilter;
|
|
10
|
+
export default function DashboardFilter(props: PropsWithChildren<DashboardFilterProps>): JSX.Element;
|
|
11
|
+
export {};
|
|
23
12
|
//# sourceMappingURL=DashboardFilter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/DashboardFilter.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"DashboardFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/DashboardFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,iBAAiB,EAA+B,MAAM,OAAO,CAAC;AAOnF,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,4CAA4C,CAAC;AAEpD,UAAU,oBAAqB,SAAQ,UAAU;IAE/C,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,eAqIrF"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-shadow */
|
|
3
3
|
/* eslint-disable operator-assignment */
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
5
|
+
import { TextField } from '@material-ui/core';
|
|
6
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
7
|
import { debounce } from 'throttle-debounce';
|
|
8
|
-
import { createFilter, combineFilters, getFormattedDate } from './filterUtils';
|
|
9
|
-
import { getFilterExpression } from './filterUtils';
|
|
10
|
-
import { TextField } from '@material-ui/core';
|
|
11
|
-
import React from 'react';
|
|
12
8
|
import DatePicker from 'react-datepicker';
|
|
9
|
+
import { createFilter, combineFilters, getFormattedDate, getFilterExpression } from './filterUtils';
|
|
13
10
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
14
11
|
export default function DashboardFilter(props) {
|
|
15
|
-
const { children, name, filterProp, type, metadata, getPConnect } = props;
|
|
12
|
+
const { children = [], name, filterProp, type = '', metadata = null, getPConnect } = props;
|
|
16
13
|
const { current: filterId } = useRef(uuidv4());
|
|
17
14
|
const [startDate, setStartDate] = useState(null);
|
|
18
15
|
const [endDate, setEndDate] = useState(null);
|
|
@@ -73,7 +70,7 @@ export default function DashboardFilter(props) {
|
|
|
73
70
|
metadata.config.onRecordChange = e => {
|
|
74
71
|
fireFilterChange(e.id);
|
|
75
72
|
};
|
|
76
|
-
return getPConnect().createComponent(metadata);
|
|
73
|
+
return getPConnect().createComponent(metadata, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);
|
|
77
74
|
};
|
|
78
75
|
const onChange = dates => {
|
|
79
76
|
const [start, end] = dates;
|
|
@@ -82,29 +79,14 @@ export default function DashboardFilter(props) {
|
|
|
82
79
|
dateRangeChangeHandler({ start, end });
|
|
83
80
|
};
|
|
84
81
|
const label = metadata.config.label.substring(3);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
fireFilterChangeDebounced(event.target.value);
|
|
95
|
-
} }, children))));
|
|
82
|
+
// eslint-disable-next-line react/no-unstable-nested-components
|
|
83
|
+
const CustomDateInput = forwardRef(({ value, onClick }, ref) => (_jsx(TextField, { label: label, variant: 'outlined', fullWidth: true, value: value, size: 'small', onClick: onClick, ref: ref, children: value })));
|
|
84
|
+
return (_jsxs(_Fragment, { children: [type === 'DateTime' && (_jsx(DatePicker, { onChange: onChange, startDate: startDate, endDate: endDate, selectsRange: true, enableTabLoop: false, customInput: _jsx(CustomDateInput, {}) })), type === 'AutoComplete' && (_jsx("span", { onChange: event => {
|
|
85
|
+
if (event && event.target && !event.target.value) {
|
|
86
|
+
fireFilterChange('ALL');
|
|
87
|
+
}
|
|
88
|
+
}, children: renderAutoComplete() })), children && (_jsx("span", { onChange: event => {
|
|
89
|
+
fireFilterChangeDebounced(event.target.value);
|
|
90
|
+
}, children: children }))] }));
|
|
96
91
|
}
|
|
97
|
-
DashboardFilter.defaultProps = {
|
|
98
|
-
children: null,
|
|
99
|
-
type: null,
|
|
100
|
-
metadata: null
|
|
101
|
-
};
|
|
102
|
-
DashboardFilter.propTypes = {
|
|
103
|
-
getPConnect: PropTypes.func.isRequired,
|
|
104
|
-
children: PropTypes.object,
|
|
105
|
-
name: PropTypes.string.isRequired,
|
|
106
|
-
filterProp: PropTypes.string.isRequired,
|
|
107
|
-
type: PropTypes.string,
|
|
108
|
-
metadata: PropTypes.objectOf(PropTypes.any)
|
|
109
|
-
};
|
|
110
92
|
//# sourceMappingURL=DashboardFilter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardFilter.js","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/DashboardFilter.tsx"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,iDAAiD;AACjD,wCAAwC;AACxC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,OAAO,4CAA4C,CAAC;AAOpD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK;IAC3C,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC1E,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAE/C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAA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E;gBAChB,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,IAAI,CAAE,KAAK,CAAC,MAA2B,CAAC,KAAK,EAAE;oBACtE,gBAAgB,CAAC,KAAK,CAAC,CAAC;iBACzB;YACH,CAAC,IAEA,kBAAkB,EAAE,CAChB,CACR;QACA,QAAQ,IAAI,CACX,8BACE,QAAQ,EAAE,KAAK,CAAC,EAAE;gBAChB,yBAAyB,CAAE,KAAK,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAC;YACtE,CAAC,IAEA,QAAQ,CACJ,CACR,CACQ,CACZ,CAAC;AACJ,CAAC;AAED,eAAe,CAAC,YAAY,GAAG;IAC7B,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,eAAe,CAAC,SAAS,GAAG;IAC1B,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACtC,QAAQ,EAAE,SAAS,CAAC,MAAM;IAC1B,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACjC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;IACvC,IAAI,EAAE,SAAS,CAAC,MAAM;IACtB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC;CAC5C,CAAC","sourcesContent":["/* eslint-disable no-shadow */\n/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable operator-assignment */\nimport { useRef, useEffect, useState, Fragment, forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { v4 as uuidv4 } from 'uuid';\nimport { debounce } from 'throttle-debounce';\nimport { createFilter, combineFilters, getFormattedDate } from './filterUtils';\nimport { getFilterExpression } from './filterUtils';\nimport { TextField } from '@material-ui/core';\nimport React from 'react';\nimport DatePicker from 'react-datepicker';\n\nimport 'react-datepicker/dist/react-datepicker.css';\n\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nexport default function DashboardFilter(props) {\n const { children, name, filterProp, type, metadata, getPConnect } = props;\n const { current: filterId } = useRef(uuidv4());\n\n const [startDate, setStartDate] = useState(null);\n const [endDate, setEndDate] = useState(null);\n\n useEffect(() => {\n PCore.getPubSubUtils().subscribe(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL,\n () => {\n if (type === 'Dropdown') {\n getPConnect().getActionsApi().updateFieldValue(filterProp, '');\n } else if (type === 'RadioButtons') {\n const reference = getPConnect().getFullReference() + filterProp;\n const radList = document.getElementsByName(reference);\n for (let i = 0; i < radList.length; i = i + 1) {\n if ((radList[i] as HTMLInputElement).value === '') {\n (radList[i] as HTMLInputElement).checked = true;\n } else {\n (radList[i] as HTMLInputElement).checked = false;\n }\n }\n } else {\n getPConnect().getActionsApi().updateFieldValue(filterProp, undefined);\n if (type === 'DateTime') {\n setStartDate(null);\n setEndDate(null);\n }\n }\n },\n filterId,\n false,\n getPConnect().getContextName()\n );\n return function cleanup() {\n PCore.getPubSubUtils().unsubscribe(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL,\n filterId,\n getPConnect().getContextName()\n );\n };\n });\n\n const fireFilterChange = filterValue => {\n const filterData = {\n filterId,\n filterExpression: getFilterExpression(filterValue, name, metadata)\n };\n\n PCore.getPubSubUtils().publish(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CHANGE,\n filterData\n );\n };\n\n const fireFilterChangeDebounced = debounce(500, fireFilterChange);\n const dateRangeChangeHandler = value => {\n const { start, end } = value;\n\n let startDate = getFormattedDate(start);\n let endDate = getFormattedDate(end);\n\n if (startDate && endDate) {\n startDate = `${startDate}T00:00:00`;\n endDate = `${endDate}T00:00:00`;\n const startFilter = createFilter(startDate, name, 'GT');\n const endFilter = createFilter(endDate, name, 'LT');\n\n const filterData = {\n filterId,\n filterExpression: combineFilters([startFilter, endFilter], null)\n };\n PCore.getPubSubUtils().publish(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CHANGE,\n filterData\n );\n }\n };\n\n const renderAutoComplete = () => {\n metadata.config.onRecordChange = e => {\n fireFilterChange(e.id);\n };\n return getPConnect().createComponent(metadata);\n };\n\n const onChange = dates => {\n const [start, end] = dates;\n setStartDate(start);\n setEndDate(end);\n dateRangeChangeHandler({ start, end });\n };\n\n type TextProps = React.HTMLProps<HTMLInputElement>;\n\n const label = metadata.config.label.substring(3);\n\n const CustomDateInput = forwardRef<HTMLInputElement, TextProps>(\n ({ value, onClick }, ref: any) => (\n <TextField\n label={label}\n variant='outlined'\n fullWidth\n value={value}\n size='small'\n onClick={onClick}\n ref={ref}\n >\n {value}\n </TextField>\n )\n );\n\n return (\n <Fragment>\n {type === 'DateTime' && (\n <DatePicker\n onChange={onChange}\n startDate={startDate}\n endDate={endDate}\n selectsRange\n enableTabLoop={false}\n customInput={<CustomDateInput />}\n />\n )}\n {type === 'AutoComplete' && (\n <span\n onChange={event => {\n if (event && event.target && !(event.target as HTMLInputElement).value) {\n fireFilterChange('ALL');\n }\n }}\n >\n {renderAutoComplete()}\n </span>\n )}\n {children && (\n <span\n onChange={event => {\n fireFilterChangeDebounced((event.target as HTMLInputElement).value);\n }}\n >\n {children}\n </span>\n )}\n </Fragment>\n );\n}\n\nDashboardFilter.defaultProps = {\n children: null,\n type: null,\n metadata: null\n};\n\nDashboardFilter.propTypes = {\n getPConnect: PropTypes.func.isRequired,\n children: PropTypes.object,\n name: PropTypes.string.isRequired,\n filterProp: PropTypes.string.isRequired,\n type: PropTypes.string,\n metadata: PropTypes.objectOf(PropTypes.any)\n};\n"]}
|
|
1
|
+
{"version":3,"file":"DashboardFilter.js","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/DashboardFilter.tsx"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,wCAAwC;AACxC,OAAO,EAAE,UAAU,EAAqB,SAAS,EAAE,MAAM,EA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cesContent":["/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable operator-assignment */\nimport { forwardRef, PropsWithChildren, useEffect, useRef, useState } from 'react';\nimport { TextField } from '@material-ui/core';\nimport { v4 as uuidv4 } from 'uuid';\nimport { debounce } from 'throttle-debounce';\nimport DatePicker from 'react-datepicker';\n\nimport { createFilter, combineFilters, getFormattedDate, getFilterExpression } from './filterUtils';\nimport { PConnProps } from '../../../types/PConnProps';\n\nimport 'react-datepicker/dist/react-datepicker.css';\n\ninterface DashboardFilterProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n name: string;\n filterProp: string;\n type?: string;\n metadata?: any;\n}\n\nexport default function DashboardFilter(props: PropsWithChildren<DashboardFilterProps>) {\n const { children = [], name, filterProp, type = '', metadata = null, getPConnect } = props;\n const { current: filterId } = useRef(uuidv4());\n\n const [startDate, setStartDate] = useState(null);\n const [endDate, setEndDate] = useState(null);\n\n useEffect(() => {\n PCore.getPubSubUtils().subscribe(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL,\n () => {\n if (type === 'Dropdown') {\n getPConnect().getActionsApi().updateFieldValue(filterProp, '');\n } else if (type === 'RadioButtons') {\n const reference = getPConnect().getFullReference() + filterProp;\n const radList = document.getElementsByName(reference);\n for (let i = 0; i < radList.length; i = i + 1) {\n if ((radList[i] as HTMLInputElement).value === '') {\n (radList[i] as HTMLInputElement).checked = true;\n } else {\n (radList[i] as HTMLInputElement).checked = false;\n }\n }\n } else {\n getPConnect().getActionsApi().updateFieldValue(filterProp, undefined);\n if (type === 'DateTime') {\n setStartDate(null);\n setEndDate(null);\n }\n }\n },\n filterId,\n false,\n getPConnect().getContextName()\n );\n return function cleanup() {\n PCore.getPubSubUtils().unsubscribe(\n PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CLEAR_ALL,\n filterId,\n getPConnect().getContextName()\n );\n };\n });\n\n const fireFilterChange = filterValue => {\n const filterData = {\n filterId,\n filterExpression: getFilterExpression(filterValue, name, metadata)\n };\n\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CHANGE, filterData);\n };\n\n const fireFilterChangeDebounced = debounce(500, fireFilterChange);\n const dateRangeChangeHandler = value => {\n const { start, end } = value;\n\n let startDate = getFormattedDate(start);\n let endDate = getFormattedDate(end);\n\n if (startDate && endDate) {\n startDate = `${startDate}T00:00:00`;\n endDate = `${endDate}T00:00:00`;\n const startFilter = createFilter(startDate, name, 'GT');\n const endFilter = createFilter(endDate, name, 'LT');\n\n const filterData = {\n filterId,\n filterExpression: combineFilters([startFilter, endFilter], null)\n };\n PCore.getPubSubUtils().publish(PCore.getConstants().PUB_SUB_EVENTS.EVENT_DASHBOARD_FILTER_CHANGE, filterData);\n }\n };\n\n const renderAutoComplete = () => {\n metadata.config.onRecordChange = e => {\n fireFilterChange(e.id);\n };\n return getPConnect().createComponent(metadata, '', '', {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional);\n };\n\n const onChange = dates => {\n const [start, end] = dates;\n setStartDate(start);\n setEndDate(end);\n dateRangeChangeHandler({ start, end });\n };\n\n type TextProps = React.HTMLProps<HTMLInputElement>;\n\n const label = metadata.config.label.substring(3);\n\n // eslint-disable-next-line react/no-unstable-nested-components\n const CustomDateInput = forwardRef<HTMLInputElement, TextProps>(({ value, onClick }, ref: any) => (\n <TextField label={label} variant='outlined' fullWidth value={value} size='small' onClick={onClick} ref={ref}>\n {value}\n </TextField>\n ));\n\n return (\n <>\n {type === 'DateTime' && (\n <DatePicker\n onChange={onChange}\n startDate={startDate}\n endDate={endDate}\n selectsRange\n enableTabLoop={false}\n customInput={<CustomDateInput />}\n />\n )}\n {type === 'AutoComplete' && (\n <span\n onChange={event => {\n if (event && event.target && !(event.target as HTMLInputElement).value) {\n fireFilterChange('ALL');\n }\n }}\n >\n {renderAutoComplete()}\n </span>\n )}\n {children && (\n <span\n onChange={event => {\n fireFilterChangeDebounced((event.target as HTMLInputElement).value);\n }}\n >\n {children}\n </span>\n )}\n </>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/filterUtils.tsx"],"names":[],"mappings":"AACA,6HAA6H;;
|
|
1
|
+
{"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/DashboardFilter/filterUtils.tsx"],"names":[],"mappings":"AACA,6HAA6H;;AAM7H,eAAO,MAAM,YAAY;;;;;;;;;;CAYxB,CAAC;AAEF,eAAO,MAAM,cAAc,gDAiB1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,gEAkCjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,4CAkBjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,qBAG5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;QAuB/B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,KAAA,OAsBjD;AAED,eAAO,MAAM,gBAAgB,oBAK5B,CAAC"}
|