@pega/react-sdk-components 8.23.11 → 23.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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 +0 -7
- 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.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +6 -9
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +3 -7
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +1 -8
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +6 -2
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -3
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +3 -3
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +3 -3
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +1 -6
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +3 -6
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +77 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.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 +18 -16
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +7 -2
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +3 -3
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +35 -7
- 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 +12 -12
- 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 +1 -1
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +5 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +9 -7
- 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 +11 -10
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +26 -12
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +5 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +7 -5
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +5 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +6 -4
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts +5 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +6 -4
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +5 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +8 -6
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +21 -14
- 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 +53 -0
- package/lib/components/field/RichText/RichText.js.map +1 -0
- package/lib/components/field/RichText/index.d.ts +2 -0
- package/lib/components/field/RichText/index.d.ts.map +1 -0
- package/lib/components/field/RichText/index.js +2 -0
- package/lib/components/field/RichText/index.js.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.js +34 -0
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
- package/lib/components/field/ScalarList/index.d.ts +2 -0
- package/lib/components/field/ScalarList/index.d.ts.map +1 -0
- package/lib/components/field/ScalarList/index.js +2 -0
- package/lib/components/field/ScalarList/index.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +10 -14
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +6 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +5 -3
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +7 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +6 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +7 -5
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +5 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +10 -8
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +5 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +6 -4
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +19 -40
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +16 -45
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +3 -3
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- package/lib/components/helpers/auth.d.ts +8 -6
- package/lib/components/helpers/auth.d.ts.map +1 -1
- package/lib/components/helpers/auth.js +642 -327
- package/lib/components/helpers/auth.js.map +1 -1
- package/lib/components/helpers/authManager.d.ts +20 -17
- package/lib/components/helpers/authManager.d.ts.map +1 -1
- package/lib/components/helpers/authManager.js +711 -439
- package/lib/components/helpers/authManager.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 +1 -1
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/config_access.d.ts.map +1 -1
- package/lib/components/helpers/config_access.js +0 -63
- package/lib/components/helpers/config_access.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.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js +4 -8
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +6 -6
- package/lib/components/helpers/formatters/Currency.js +2 -2
- 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.map +1 -1
- package/lib/components/helpers/formatters/Date.d.ts +4 -4
- 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.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +11 -11
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +3 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +5 -3
- 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.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 +1 -0
- package/lib/components/helpers/template-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 +6 -0
- 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 +1 -13
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +1 -16
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +23 -23
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +8 -14
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +3 -16
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -21
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +41 -48
- 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.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -17
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +4 -15
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +9 -22
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -19
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +2 -16
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -14
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +13 -15
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +3 -13
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.d.ts +11 -17
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +4 -18
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +3 -16
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +1 -18
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +11 -16
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +4 -7
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +0 -4
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +1 -21
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +4 -21
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +5 -8
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +1 -6
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +4 -9
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +13 -16
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +4 -21
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +20 -15
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +10 -22
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +11 -23
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +4 -22
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -7
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +6 -6
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +10 -22
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +8 -21
- 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 +0 -12
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +10 -16
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +12 -23
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +15 -30
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +25 -48
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -11
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +9 -10
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +1 -16
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +10 -15
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -15
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +1 -13
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +14 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +14 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +4 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +56 -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 +7 -21
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -7
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +0 -5
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -15
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +6 -15
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +5 -13
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +6 -10
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +1 -9
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +177 -192
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +44 -0
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +142 -1
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +2 -13
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +10 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +14 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +5 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +7 -14
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +4 -13
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -7
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +0 -5
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +3 -6
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -7
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +0 -5
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -15
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +15 -11
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +57 -5
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +18 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +3 -3
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -29
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +22 -28
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -26
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +4 -10
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +1 -8
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +5 -11
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +1 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +3 -6
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +5 -11
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +1 -9
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +10 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -16
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +31 -23
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +5 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +7 -14
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +4 -14
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +17 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +8 -17
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +4 -19
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +24 -16
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +4 -8
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +8 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +31 -21
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +4 -5
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +3 -10
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +10 -2
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +7 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +7 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +5 -2
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +28 -64
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +22 -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-pega-component-map.d.ts +17 -1
- package/lib/sdk-pega-component-map.js +17 -1
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +42 -0
- package/package.json +1 -1
|
@@ -1,31 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
import './ToDo.css';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
context: PropTypes.Requireable<string>;
|
|
16
|
-
isConfirm: PropTypes.Requireable<boolean>;
|
|
17
|
-
};
|
|
18
|
-
var defaultProps: {
|
|
19
|
-
caseInfoID: string;
|
|
20
|
-
datasource: never[];
|
|
21
|
-
myWorkList: {};
|
|
22
|
-
headerText: string;
|
|
23
|
-
itemKey: string;
|
|
24
|
-
showTodoList: boolean;
|
|
25
|
-
type: string;
|
|
26
|
-
context: string;
|
|
27
|
-
isConfirm: boolean;
|
|
28
|
-
};
|
|
3
|
+
import type { PConnProps } from '../../../types/PConnProps';
|
|
4
|
+
interface ToDoProps extends PConnProps {
|
|
5
|
+
datasource?: any;
|
|
6
|
+
myWorkList?: any;
|
|
7
|
+
caseInfoID?: string;
|
|
8
|
+
headerText?: string;
|
|
9
|
+
itemKey?: string;
|
|
10
|
+
showTodoList?: boolean;
|
|
11
|
+
type?: string;
|
|
12
|
+
context?: string;
|
|
13
|
+
isConfirm?: boolean;
|
|
29
14
|
}
|
|
30
|
-
export default ToDo;
|
|
15
|
+
export default function ToDo(props: ToDoProps): JSX.Element;
|
|
16
|
+
export {};
|
|
31
17
|
//# sourceMappingURL=ToDo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToDo.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/ToDo/ToDo.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ToDo.d.ts","sourceRoot":"","sources":["../../../../src/components/widget/ToDo/ToDo.tsx"],"names":[],"mappings":";AA2BA,OAAO,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,UAAU,SAAU,SAAQ,UAAU;IAEpC,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,UAAU,CAAC,EAAE,GAAG,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAyCD,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,eA4O5C"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-shadow */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-shadow */
|
|
3
3
|
import React, { Fragment, useState } from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import { Utils } from '../../helpers/utils';
|
|
6
5
|
import { Box, Button, Card, CardContent, CardHeader, Avatar, Typography, Badge, List, ListItem, ListItemText, ListItemSecondaryAction } from '@material-ui/core';
|
|
7
6
|
import Snackbar from '@material-ui/core/Snackbar';
|
|
@@ -12,7 +11,7 @@ import { makeStyles } from '@material-ui/core/styles';
|
|
|
12
11
|
import { useTheme } from '@material-ui/core/styles';
|
|
13
12
|
import useMediaQuery from '@material-ui/core/useMediaQuery';
|
|
14
13
|
import './ToDo.css';
|
|
15
|
-
const isChildCase = assignment => {
|
|
14
|
+
const isChildCase = (assignment) => {
|
|
16
15
|
return assignment.isChild;
|
|
17
16
|
};
|
|
18
17
|
function topThreeAssignments(assignmentsSource) {
|
|
@@ -29,7 +28,7 @@ function getID(assignment) {
|
|
|
29
28
|
return arKeys[2];
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
|
-
const useStyles = makeStyles(theme => ({
|
|
31
|
+
const useStyles = makeStyles((theme) => ({
|
|
33
32
|
root: {
|
|
34
33
|
marginTop: theme.spacing(1),
|
|
35
34
|
marginBottom: theme.spacing(1),
|
|
@@ -49,7 +48,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
49
48
|
}
|
|
50
49
|
}));
|
|
51
50
|
export default function ToDo(props) {
|
|
52
|
-
const {
|
|
51
|
+
const { getPConnect, datasource = [], headerText = 'To do', showTodoList = true, myWorkList = {}, type = 'worklist', isConfirm = false } = props;
|
|
53
52
|
const CONSTS = PCore.getConstants();
|
|
54
53
|
const bLogging = true;
|
|
55
54
|
let assignmentCount = 0;
|
|
@@ -80,13 +79,13 @@ export default function ToDo(props) {
|
|
|
80
79
|
return [];
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
|
-
const getAssignmentId = assignment => {
|
|
82
|
+
const getAssignmentId = (assignment) => {
|
|
84
83
|
return type === CONSTS.TODO ? assignment.ID : assignment.id;
|
|
85
84
|
};
|
|
86
|
-
const getPriority = assignment => {
|
|
85
|
+
const getPriority = (assignment) => {
|
|
87
86
|
return type === CONSTS.TODO ? assignment.urgency : assignment.priority;
|
|
88
87
|
};
|
|
89
|
-
const getAssignmentName = assignment => {
|
|
88
|
+
const getAssignmentName = (assignment) => {
|
|
90
89
|
return type === CONSTS.TODO ? assignment.name : assignment.stepName;
|
|
91
90
|
};
|
|
92
91
|
function showToast(message) {
|
|
@@ -115,7 +114,7 @@ export default function ToDo(props) {
|
|
|
115
114
|
let { classname = '' } = assignment;
|
|
116
115
|
const sTarget = thePConn.getContainerName();
|
|
117
116
|
const sTargetContainerName = sTarget;
|
|
118
|
-
const options = { containerName: sTargetContainerName };
|
|
117
|
+
const options = { containerName: sTargetContainerName, channelName: '' };
|
|
119
118
|
if (classname === null || classname === '') {
|
|
120
119
|
classname = thePConn.getCaseInfo().getClassName();
|
|
121
120
|
}
|
|
@@ -146,87 +145,52 @@ export default function ToDo(props) {
|
|
|
146
145
|
const displayID = getID(assignment);
|
|
147
146
|
if ((showTodoList && type !== CONSTS.TODO) || assignment.isChild === true) {
|
|
148
147
|
/* Supress link for todo inside flow step */
|
|
149
|
-
return
|
|
148
|
+
return React.createElement(Button, { size: "small", color: "primary" }, `${assignment.name} ${getID(assignment)}`);
|
|
150
149
|
}
|
|
151
150
|
return displayID;
|
|
152
151
|
};
|
|
153
|
-
const getListItemComponent = assignment => {
|
|
152
|
+
const getListItemComponent = (assignment) => {
|
|
154
153
|
if (isDesktop) {
|
|
155
154
|
return (React.createElement(React.Fragment, null,
|
|
156
155
|
localizedVal('Task in', localeCategory),
|
|
157
156
|
renderTaskId(type, getPConnect, showTodoList, assignment),
|
|
158
157
|
type === CONSTS.WORKLIST && assignment.status ? `\u2022 ` : undefined,
|
|
159
|
-
type === CONSTS.WORKLIST && assignment.status ?
|
|
158
|
+
type === CONSTS.WORKLIST && assignment.status ? React.createElement("span", { className: "psdk-todo-assignment-status" }, assignment.status) : undefined,
|
|
160
159
|
` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`));
|
|
161
160
|
}
|
|
162
161
|
return (React.createElement(React.Fragment, null,
|
|
163
|
-
React.createElement(Button, { size:
|
|
162
|
+
React.createElement(Button, { size: "small", color: "primary" }, `${assignment.name} ${getID(assignment)}`),
|
|
164
163
|
` \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`));
|
|
165
164
|
};
|
|
166
165
|
const toDoContent = (React.createElement(React.Fragment, null,
|
|
167
|
-
showTodoList && (React.createElement(CardHeader, { title: React.createElement(Badge, { badgeContent: assignmentCount, color:
|
|
168
|
-
React.createElement(Typography, { variant:
|
|
166
|
+
showTodoList && (React.createElement(CardHeader, { title: React.createElement(Badge, { badgeContent: assignmentCount, overlap: "rectangular", color: "primary" },
|
|
167
|
+
React.createElement(Typography, { variant: "h6" },
|
|
169
168
|
headerText,
|
|
170
169
|
"\u00A0\u00A0\u00A0")) })),
|
|
171
|
-
React.createElement(List, null, assignments.map(assignment => (React.createElement(
|
|
172
|
-
React.createElement(
|
|
173
|
-
|
|
174
|
-
React.createElement(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
React.createElement(
|
|
179
|
-
React.createElement(ArrowForwardIosOutlinedIcon, null)))))))))));
|
|
170
|
+
React.createElement(List, null, assignments.map((assignment) => (React.createElement("div", { className: "psdk-todo-avatar-header", key: getAssignmentId(assignment) },
|
|
171
|
+
React.createElement(Avatar, { className: classes.avatar, style: { marginRight: '16px' } }, currentUserInitials),
|
|
172
|
+
React.createElement("div", { style: { display: 'block' } },
|
|
173
|
+
React.createElement(Typography, { variant: "h6" }, assignment?.name),
|
|
174
|
+
`${localizedVal('Task in', localeCategory)} ${renderTaskId(type, getPConnect, showTodoList, assignment)} \u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`),
|
|
175
|
+
!isConfirm && (React.createElement("div", { style: { marginLeft: 'auto' } },
|
|
176
|
+
React.createElement(IconButton, { onClick: () => clickGo(assignment) },
|
|
177
|
+
React.createElement(ArrowForwardIosOutlinedIcon, null))))))))));
|
|
180
178
|
return (React.createElement(React.Fragment, null,
|
|
181
179
|
type === CONSTS.WORKLIST && (React.createElement(Card, { className: classes.root },
|
|
182
|
-
showTodoList && (React.createElement(CardHeader, { title: React.createElement(Badge, { badgeContent: assignmentCount, color:
|
|
183
|
-
React.createElement(Typography, { variant:
|
|
180
|
+
showTodoList && (React.createElement(CardHeader, { title: React.createElement(Badge, { badgeContent: assignmentCount, overlap: "rectangular", color: "primary" },
|
|
181
|
+
React.createElement(Typography, { variant: "h6" },
|
|
184
182
|
headerText,
|
|
185
183
|
"\u00A0\u00A0\u00A0")), avatar: React.createElement(Avatar, { className: classes.avatar }, currentUserInitials) })),
|
|
186
184
|
React.createElement(CardContent, null,
|
|
187
|
-
React.createElement(List, null, assignments.map(assignment => (React.createElement(ListItem, { key: getAssignmentId(assignment), dense: true, divider: true, onClick: () => clickGo(assignment) },
|
|
185
|
+
React.createElement(List, null, assignments.map((assignment) => (React.createElement(ListItem, { key: getAssignmentId(assignment), dense: true, divider: true, onClick: () => clickGo(assignment) },
|
|
188
186
|
React.createElement(ListItemText, { primary: getAssignmentName(assignment), secondary: getListItemComponent(assignment) }),
|
|
189
187
|
React.createElement(ListItemSecondaryAction, null,
|
|
190
188
|
React.createElement(IconButton, { onClick: () => clickGo(assignment) },
|
|
191
189
|
React.createElement(ArrowForwardIosOutlinedIcon, null)))))))))),
|
|
192
|
-
type === CONSTS.TODO && !isConfirm &&
|
|
190
|
+
type === CONSTS.TODO && !isConfirm && React.createElement(Card, { className: classes.todoWrapper }, toDoContent),
|
|
193
191
|
type === CONSTS.TODO && isConfirm && React.createElement(Fragment, null, toDoContent),
|
|
194
|
-
assignmentCount > 3 && (React.createElement(Box, { display:
|
|
195
|
-
React.createElement(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: React.createElement(IconButton, { size:
|
|
196
|
-
React.createElement(CloseIcon, { fontSize:
|
|
192
|
+
assignmentCount > 3 && (React.createElement(Box, { display: "flex", justifyContent: "center" }, bShowMore ? (React.createElement(Button, { color: "primary", onClick: _showMore }, showMoreLocalizedValue === 'show_more' ? 'Show more' : showMoreLocalizedValue)) : (React.createElement(Button, { onClick: _showLess }, showlessLocalizedValue === 'show_less' ? 'Show less' : showlessLocalizedValue)))),
|
|
193
|
+
React.createElement(Snackbar, { open: showSnackbar, autoHideDuration: 3000, onClose: handleSnackbarClose, message: snackbarMessage, action: React.createElement(IconButton, { size: "small", "aria-label": "close", color: "inherit", onClick: handleSnackbarClose },
|
|
194
|
+
React.createElement(CloseIcon, { fontSize: "small" })) })));
|
|
197
195
|
}
|
|
198
|
-
ToDo.propTypes = {
|
|
199
|
-
datasource: PropTypes.instanceOf(Object),
|
|
200
|
-
myWorkList: PropTypes.instanceOf(Object),
|
|
201
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
202
|
-
caseInfoID: PropTypes.string,
|
|
203
|
-
// buildName: PropTypes.string,
|
|
204
|
-
getPConnect: PropTypes.func.isRequired,
|
|
205
|
-
headerText: PropTypes.string,
|
|
206
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
207
|
-
itemKey: PropTypes.string,
|
|
208
|
-
showTodoList: PropTypes.bool,
|
|
209
|
-
// target: PropTypes.string,
|
|
210
|
-
type: PropTypes.string,
|
|
211
|
-
// pageMessages: PropTypes.arrayOf(PropTypes.any),
|
|
212
|
-
// eslint-disable-next-line react/no-unused-prop-types
|
|
213
|
-
context: PropTypes.string,
|
|
214
|
-
// hideActionButtons: PropTypes.bool
|
|
215
|
-
isConfirm: PropTypes.bool
|
|
216
|
-
};
|
|
217
|
-
ToDo.defaultProps = {
|
|
218
|
-
caseInfoID: '',
|
|
219
|
-
datasource: [],
|
|
220
|
-
myWorkList: {},
|
|
221
|
-
// buildName: "",
|
|
222
|
-
headerText: 'To do',
|
|
223
|
-
itemKey: '',
|
|
224
|
-
showTodoList: true,
|
|
225
|
-
// target: "",
|
|
226
|
-
type: 'worklist',
|
|
227
|
-
// pageMessages: null,
|
|
228
|
-
context: '',
|
|
229
|
-
// hideActionButtons: false
|
|
230
|
-
isConfirm: false
|
|
231
|
-
};
|
|
232
196
|
//# sourceMappingURL=ToDo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToDo.js","sourceRoot":"","sources":["../../../../src/components/widget/ToDo/ToDo.tsx"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,iDAAiD;AACjD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EACL,GAAG,EACH,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,MAAM,EACN,UAAU,EACV,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAEjD,OAAO,2BAA2B,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAI5D,OAAO,YAAY,CAAC;AAIpB,MAAM,WAAW,GAA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ACtD,UAAU,EAAE,SAAS,CAAC,MAAM;IAC5B,+BAA+B;IAC/B,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACtC,UAAU,EAAE,SAAS,CAAC,MAAM;IAC5B,sDAAsD;IACtD,OAAO,EAAE,SAAS,CAAC,MAAM;IACzB,YAAY,EAAE,SAAS,CAAC,IAAI;IAC5B,4BAA4B;IAC5B,IAAI,EAAE,SAAS,CAAC,MAAM;IACtB,kDAAkD;IAClD,sDAAsD;IACtD,OAAO,EAAE,SAAS,CAAC,MAAM;IACzB,oCAAoC;IACpC,SAAS,EAAE,SAAS,CAAC,IAAI;CAC1B,CAAC;AAEF,IAAI,CAAC,YAAY,GAAG;IAClB,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,iBAAiB;IACjB,UAAU,EAAE,OAAO;IACnB,OAAO,EAAE,EAAE;IACX,YAAY,EAAE,IAAI;IAClB,cAAc;IACd,IAAI,EAAE,UAAU;IAChB,sBAAsB;IACtB,OAAO,EAAE,EAAE;IACX,2BAA2B;IAC3B,SAAS,EAAE,KAAK;CACjB,CAAC","sourcesContent":["/* eslint-disable no-shadow */\n/* eslint-disable @typescript-eslint/no-shadow */\nimport React, { Fragment, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { Utils } from '../../helpers/utils';\nimport {\n Box,\n Button,\n Card,\n CardContent,\n CardHeader,\n Avatar,\n Typography,\n Badge,\n List,\n ListItem,\n ListItemText,\n ListItemSecondaryAction\n} from '@material-ui/core';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport CloseIcon from '@material-ui/icons/Close';\n\nimport ArrowForwardIosOutlinedIcon from '@material-ui/icons/ArrowForwardIosOutlined';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useTheme } from '@material-ui/core/styles';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\n\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\nimport './ToDo.css';\n\ndeclare const PCore: typeof PCoreType;\n\nconst isChildCase = assignment => {\n return assignment.isChild;\n};\n\nfunction topThreeAssignments(assignmentsSource: Array<any>): Array<any> {\n return Array.isArray(assignmentsSource) ? assignmentsSource.slice(0, 3) : [];\n}\n\nfunction getID(assignment: any) {\n if (assignment.value) {\n const refKey = assignment.value;\n return refKey.substring(refKey.lastIndexOf(' ') + 1);\n } else {\n const refKey = assignment.ID;\n const arKeys = refKey.split('!')[0].split(' ');\n return arKeys[2];\n }\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n borderLeft: '6px solid',\n borderLeftColor: theme.palette.primary.light\n },\n avatar: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n todoWrapper: {\n borderLeft: '6px solid',\n borderLeftColor: theme.palette.primary.light,\n padding: theme.spacing(1),\n margin: theme.spacing(1)\n }\n}));\n\nexport default function ToDo(props) {\n const { datasource, getPConnect, headerText, showTodoList, myWorkList, type, isConfirm } = props;\n\n const CONSTS = PCore.getConstants();\n\n const bLogging = true;\n let assignmentCount = 0;\n const currentUser = PCore.getEnvironmentInfo().getOperatorName();\n const currentUserInitials = Utils.getInitials(currentUser);\n const assignmentsSource = datasource?.source || myWorkList?.source;\n\n const [bShowMore, setBShowMore] = useState(true);\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage]: any = useState('');\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n const [assignments, setAssignments] = useState<Array<any>>(initAssignments());\n\n const thePConn = getPConnect();\n const classes = useStyles();\n const theme = useTheme();\n const isDesktop = useMediaQuery(theme.breakpoints.up('md'));\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Todo';\n const showlessLocalizedValue = localizedVal('show_less', 'CosmosFields');\n const showMoreLocalizedValue = localizedVal('show_more', 'CosmosFields');\n // const { setOpen } = useNavBar();\n\n function initAssignments(): Array<any> {\n if (assignmentsSource) {\n assignmentCount = assignmentsSource.length;\n return topThreeAssignments(assignmentsSource);\n } else {\n // turn off todolist\n return [];\n }\n }\n\n const getAssignmentId = assignment => {\n return type === CONSTS.TODO ? assignment.ID : assignment.id;\n };\n\n const getPriority = assignment => {\n return type === CONSTS.TODO ? assignment.urgency : assignment.priority;\n };\n\n const getAssignmentName = assignment => {\n return type === CONSTS.TODO ? assignment.name : assignment.stepName;\n };\n\n function showToast(message: string) {\n const theMessage = `Assignment: ${message}`;\n // eslint-disable-next-line no-console\n console.error(theMessage);\n setSnackbarMessage(message);\n setShowSnackbar(true);\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n function _showMore() {\n setBShowMore(false);\n setAssignments(assignmentsSource);\n }\n\n function _showLess() {\n setBShowMore(true);\n setAssignments(topThreeAssignments(assignmentsSource));\n }\n\n function clickGo(assignment) {\n const id = getAssignmentId(assignment);\n let { classname = '' } = assignment;\n const sTarget = thePConn.getContainerName();\n const sTargetContainerName = sTarget;\n\n const options = { containerName: sTargetContainerName };\n\n if (classname === null || classname === '') {\n classname = thePConn.getCaseInfo().getClassName();\n }\n\n if (sTarget === 'workarea') {\n options['isActionFromToDoList'] = true;\n options['target'] = '';\n options['context'] = null;\n options['isChild'] = isChildCase(assignment);\n } else {\n options['isActionFromToDoList'] = false;\n options['target'] = sTarget;\n }\n\n thePConn\n .getActionsApi()\n .openAssignment(id, classname, options)\n .then(() => {\n if (bLogging) {\n // eslint-disable-next-line no-console\n console.log(`openAssignment completed`);\n }\n })\n .catch(() => {\n showToast(`Submit failed!`);\n });\n }\n\n const renderTaskId = (type, getPConnect, showTodoList, assignment) => {\n const displayID = getID(assignment);\n\n if ((showTodoList && type !== CONSTS.TODO) || assignment.isChild === true) {\n /* Supress link for todo inside flow step */\n return (\n <Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>\n );\n }\n return displayID;\n };\n\n const getListItemComponent = assignment => {\n if (isDesktop) {\n return (\n <>\n {localizedVal('Task in', localeCategory)}\n {renderTaskId(type, getPConnect, showTodoList, assignment)}\n {type === CONSTS.WORKLIST && assignment.status ? `\\u2022 ` : undefined}\n {type === CONSTS.WORKLIST && assignment.status ? (\n <span className='psdk-todo-assignment-status'>{assignment.status}</span>\n ) : undefined}\n {` \\u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}\n </>\n );\n }\n return (\n <>\n <Button size='small' color='primary'>{`${assignment.name} ${getID(assignment)}`}</Button>\n {` \\u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}\n </>\n );\n };\n\n const toDoContent = (\n <>\n {showTodoList && (\n <CardHeader\n title={\n <Badge badgeContent={assignmentCount} color='primary'>\n <Typography variant='h6'>{headerText} </Typography>\n </Badge>\n }\n ></CardHeader>\n )}\n <List>\n {assignments.map(assignment => (\n <>\n <div className='psdk-todo-avatar-header' key={getAssignmentId(assignment)}>\n <Avatar className={classes.avatar} style={{ marginRight: '16px' }}>\n {currentUserInitials}\n </Avatar>\n <div style={{ display: 'block' }}>\n <Typography variant='h6'>{assignment?.name}</Typography>\n {`${localizedVal('Task in', localeCategory)} ${renderTaskId(\n type,\n getPConnect,\n showTodoList,\n assignment\n )} \\u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}\n </div>\n {!isConfirm && (\n <div style={{ marginLeft: 'auto' }}>\n <IconButton onClick={() => clickGo(assignment)}>\n <ArrowForwardIosOutlinedIcon />\n </IconButton>\n </div>\n )}\n </div>\n </>\n ))}\n </List>\n </>\n );\n\n return (\n <React.Fragment>\n {type === CONSTS.WORKLIST && (\n <Card className={classes.root}>\n {showTodoList && (\n <CardHeader\n title={\n <Badge badgeContent={assignmentCount} color='primary'>\n <Typography variant='h6'>{headerText} </Typography>\n </Badge>\n }\n avatar={<Avatar className={classes.avatar}>{currentUserInitials}</Avatar>}\n ></CardHeader>\n )}\n <CardContent>\n <List>\n {assignments.map(assignment => (\n <ListItem\n key={getAssignmentId(assignment)}\n dense\n divider\n onClick={() => clickGo(assignment)}\n >\n <ListItemText\n primary={getAssignmentName(assignment)}\n secondary={getListItemComponent(assignment)}\n />\n <ListItemSecondaryAction>\n <IconButton onClick={() => clickGo(assignment)}>\n <ArrowForwardIosOutlinedIcon />\n </IconButton>\n </ListItemSecondaryAction>\n </ListItem>\n ))}\n </List>\n </CardContent>\n </Card>\n )}\n\n {type === CONSTS.TODO && !isConfirm && (\n <Card className={classes.todoWrapper}>{toDoContent}</Card>\n )}\n {type === CONSTS.TODO && isConfirm && <Fragment>{toDoContent}</Fragment>}\n\n {assignmentCount > 3 && (\n <Box display='flex' justifyContent='center'>\n {bShowMore ? (\n <Button color='primary' onClick={_showMore}>\n {showMoreLocalizedValue === 'show_more' ? 'Show more': showMoreLocalizedValue}\n </Button>\n ) : (\n <Button onClick={_showLess}>\n {showlessLocalizedValue === 'show_less' ? 'Show less': showlessLocalizedValue}\n </Button>\n )}\n </Box>\n )}\n\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size='small' aria-label='close' color='inherit' onClick={handleSnackbarClose}>\n <CloseIcon fontSize='small' />\n </IconButton>\n }\n />\n </React.Fragment>\n );\n}\n\nToDo.propTypes = {\n datasource: PropTypes.instanceOf(Object),\n myWorkList: PropTypes.instanceOf(Object),\n // eslint-disable-next-line react/no-unused-prop-types\n caseInfoID: PropTypes.string,\n // buildName: PropTypes.string,\n getPConnect: PropTypes.func.isRequired,\n headerText: PropTypes.string,\n // eslint-disable-next-line react/no-unused-prop-types\n itemKey: PropTypes.string,\n showTodoList: PropTypes.bool,\n // target: PropTypes.string,\n type: PropTypes.string,\n // pageMessages: PropTypes.arrayOf(PropTypes.any),\n // eslint-disable-next-line react/no-unused-prop-types\n context: PropTypes.string,\n // hideActionButtons: PropTypes.bool\n isConfirm: PropTypes.bool\n};\n\nToDo.defaultProps = {\n caseInfoID: '',\n datasource: [],\n myWorkList: {},\n // buildName: \"\",\n headerText: 'To do',\n itemKey: '',\n showTodoList: true,\n // target: \"\",\n type: 'worklist',\n // pageMessages: null,\n context: '',\n // hideActionButtons: false\n isConfirm: false\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ToDo.js","sourceRoot":"","sources":["../../../../src/components/widget/ToDo/ToDo.tsx"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,iDAAiD;AACjD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EACL,GAAG,EACH,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,MAAM,EACN,UAAU,EACV,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AAEjD,OAAO,2BAA2B,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAE5D,OAAO,YAAY,CAAC;AAoBpB,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,EAAE;IACjC,OAAO,UAAU,CAAC,OAAO,CAAC;AAC5B,CAAC,CAAC;AAEF,SAAS,mBAAmB,CAAC,iBAA6B;IACxD,OAAO,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,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,CAAC,CACG,CACK,CACT,CACR;QAEA,IAAI,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,IAAI,oBAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,WAAW,IAAG,WAAW,CAAQ;QAChG,IAAI,KAAK,MAAM,CAAC,IAAI,IAAI,SAAS,IAAI,oBAAC,QAAQ,QAAE,WAAW,CAAY;QAEvE,eAAe,GAAG,CAAC,IAAI,CACtB,oBAAC,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,cAAc,EAAC,QAAQ,IACxC,SAAS,CAAC,CAAC,CAAC,CACX,oBAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,SAAS,IACvC,sBAAsB,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,sBAAsB,CACvE,CACV,CAAC,CAAC,CAAC,CACF,oBAAC,MAAM,IAAC,OAAO,EAAE,SAAS,IAAG,sBAAsB,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,sBAAsB,CAAU,CACrH,CACG,CACP;QAED,oBAAC,QAAQ,IACP,IAAI,EAAE,YAAY,EAClB,gBAAgB,EAAE,IAAI,EACtB,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,eAAe,EACxB,MAAM,EACJ,oBAAC,UAAU,IAAC,IAAI,EAAC,OAAO,gBAAY,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,mBAAmB;gBACtF,oBAAC,SAAS,IAAC,QAAQ,EAAC,OAAO,GAAG,CACnB,GAEf,CACa,CAClB,CAAC;AACJ,CAAC","sourcesContent":["/* eslint-disable no-shadow */\n/* eslint-disable @typescript-eslint/no-shadow */\nimport React, { Fragment, useState } from 'react';\nimport { Utils } from '../../helpers/utils';\nimport {\n Box,\n Button,\n Card,\n CardContent,\n CardHeader,\n Avatar,\n Typography,\n Badge,\n List,\n ListItem,\n ListItemText,\n ListItemSecondaryAction\n} from '@material-ui/core';\nimport Snackbar from '@material-ui/core/Snackbar';\nimport IconButton from '@material-ui/core/IconButton';\nimport CloseIcon from '@material-ui/icons/Close';\n\nimport ArrowForwardIosOutlinedIcon from '@material-ui/icons/ArrowForwardIosOutlined';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useTheme } from '@material-ui/core/styles';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\n\nimport './ToDo.css';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\ninterface ToDoProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n datasource?: any;\n myWorkList?: any;\n // eslint-disable-next-line react/no-unused-prop-types\n caseInfoID?: string;\n headerText?: string;\n // eslint-disable-next-line react/no-unused-prop-types\n itemKey?: string;\n showTodoList?: boolean;\n type?: string;\n // eslint-disable-next-line react/no-unused-prop-types\n context?: string;\n isConfirm?: boolean;\n}\n\nconst isChildCase = (assignment) => {\n return assignment.isChild;\n};\n\nfunction topThreeAssignments(assignmentsSource: Array<any>): Array<any> {\n return Array.isArray(assignmentsSource) ? assignmentsSource.slice(0, 3) : [];\n}\n\nfunction getID(assignment: any) {\n if (assignment.value) {\n const refKey = assignment.value;\n return refKey.substring(refKey.lastIndexOf(' ') + 1);\n } else {\n const refKey = assignment.ID;\n const arKeys = refKey.split('!')[0].split(' ');\n return arKeys[2];\n }\n}\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n borderLeft: '6px solid',\n borderLeftColor: theme.palette.primary.light\n },\n avatar: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n todoWrapper: {\n borderLeft: '6px solid',\n borderLeftColor: theme.palette.primary.light,\n padding: theme.spacing(1),\n margin: theme.spacing(1)\n }\n}));\n\nexport default function ToDo(props: ToDoProps) {\n const { getPConnect, datasource = [], headerText = 'To do', showTodoList = true, myWorkList = {}, type = 'worklist', isConfirm = false } = props;\n\n const CONSTS = PCore.getConstants();\n\n const bLogging = true;\n let assignmentCount = 0;\n const currentUser = PCore.getEnvironmentInfo().getOperatorName();\n const currentUserInitials = Utils.getInitials(currentUser);\n const assignmentsSource = datasource?.source || myWorkList?.source;\n\n const [bShowMore, setBShowMore] = useState(true);\n const [showSnackbar, setShowSnackbar] = useState(false);\n const [snackbarMessage, setSnackbarMessage]: any = useState('');\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n const [assignments, setAssignments] = useState<Array<any>>(initAssignments());\n\n const thePConn = getPConnect();\n const classes = useStyles();\n const theme = useTheme();\n const isDesktop = useMediaQuery(theme.breakpoints.up('md'));\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Todo';\n const showlessLocalizedValue = localizedVal('show_less', 'CosmosFields');\n const showMoreLocalizedValue = localizedVal('show_more', 'CosmosFields');\n // const { setOpen } = useNavBar();\n\n function initAssignments(): Array<any> {\n if (assignmentsSource) {\n assignmentCount = assignmentsSource.length;\n return topThreeAssignments(assignmentsSource);\n } else {\n // turn off todolist\n return [];\n }\n }\n\n const getAssignmentId = (assignment) => {\n return type === CONSTS.TODO ? assignment.ID : assignment.id;\n };\n\n const getPriority = (assignment) => {\n return type === CONSTS.TODO ? assignment.urgency : assignment.priority;\n };\n\n const getAssignmentName = (assignment) => {\n return type === CONSTS.TODO ? assignment.name : assignment.stepName;\n };\n\n function showToast(message: string) {\n const theMessage = `Assignment: ${message}`;\n // eslint-disable-next-line no-console\n console.error(theMessage);\n setSnackbarMessage(message);\n setShowSnackbar(true);\n }\n\n function handleSnackbarClose(event: React.SyntheticEvent | React.MouseEvent, reason?: string) {\n if (reason === 'clickaway') {\n return;\n }\n setShowSnackbar(false);\n }\n\n function _showMore() {\n setBShowMore(false);\n setAssignments(assignmentsSource);\n }\n\n function _showLess() {\n setBShowMore(true);\n setAssignments(topThreeAssignments(assignmentsSource));\n }\n\n function clickGo(assignment) {\n const id = getAssignmentId(assignment);\n let { classname = '' } = assignment;\n const sTarget = thePConn.getContainerName();\n const sTargetContainerName = sTarget;\n\n const options = { containerName: sTargetContainerName, channelName: '' };\n\n if (classname === null || classname === '') {\n classname = thePConn.getCaseInfo().getClassName();\n }\n\n if (sTarget === 'workarea') {\n options['isActionFromToDoList'] = true;\n options['target'] = '';\n options['context'] = null;\n options['isChild'] = isChildCase(assignment);\n } else {\n options['isActionFromToDoList'] = false;\n options['target'] = sTarget;\n }\n\n thePConn\n .getActionsApi()\n .openAssignment(id, classname, options)\n .then(() => {\n if (bLogging) {\n // eslint-disable-next-line no-console\n console.log(`openAssignment completed`);\n }\n })\n .catch(() => {\n showToast(`Submit failed!`);\n });\n }\n\n const renderTaskId = (type, getPConnect, showTodoList, assignment) => {\n const displayID = getID(assignment);\n\n if ((showTodoList && type !== CONSTS.TODO) || assignment.isChild === true) {\n /* Supress link for todo inside flow step */\n return <Button size=\"small\" color=\"primary\">{`${assignment.name} ${getID(assignment)}`}</Button>;\n }\n return displayID;\n };\n\n const getListItemComponent = (assignment) => {\n if (isDesktop) {\n return (\n <>\n {localizedVal('Task in', localeCategory)}\n {renderTaskId(type, getPConnect, showTodoList, assignment)}\n {type === CONSTS.WORKLIST && assignment.status ? `\\u2022 ` : undefined}\n {type === CONSTS.WORKLIST && assignment.status ? <span className=\"psdk-todo-assignment-status\">{assignment.status}</span> : undefined}\n {` \\u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}\n </>\n );\n }\n return (\n <>\n <Button size=\"small\" color=\"primary\">{`${assignment.name} ${getID(assignment)}`}</Button>\n {` \\u2022 ${localizedVal('Urgency', localeCategory)} ${getPriority(assignment)}`}\n </>\n );\n };\n\n const toDoContent = (\n <>\n {showTodoList && (\n <CardHeader\n title={\n <Badge badgeContent={assignmentCount} overlap=\"rectangular\" color=\"primary\">\n <Typography variant=\"h6\">{headerText} </Typography>\n </Badge>\n }\n ></CardHeader>\n )}\n <List>\n {assignments.map((assignment) => (\n <div className=\"psdk-todo-avatar-header\" key={getAssignmentId(assignment)}>\n <Avatar className={classes.avatar} style={{ marginRight: '16px' }}>\n {currentUserInitials}\n </Avatar>\n <div style={{ display: 'block' }}>\n <Typography variant=\"h6\">{assignment?.name}</Typography>\n {`${localizedVal('Task in', localeCategory)} ${renderTaskId(type, getPConnect, showTodoList, assignment)} \\u2022 ${localizedVal(\n 'Urgency',\n localeCategory\n )} ${getPriority(assignment)}`}\n </div>\n {!isConfirm && (\n <div style={{ marginLeft: 'auto' }}>\n <IconButton onClick={() => clickGo(assignment)}>\n <ArrowForwardIosOutlinedIcon />\n </IconButton>\n </div>\n )}\n </div>\n ))}\n </List>\n </>\n );\n\n return (\n <React.Fragment>\n {type === CONSTS.WORKLIST && (\n <Card className={classes.root}>\n {showTodoList && (\n <CardHeader\n title={\n <Badge badgeContent={assignmentCount} overlap=\"rectangular\" color=\"primary\">\n <Typography variant=\"h6\">{headerText} </Typography>\n </Badge>\n }\n avatar={<Avatar className={classes.avatar}>{currentUserInitials}</Avatar>}\n ></CardHeader>\n )}\n <CardContent>\n <List>\n {assignments.map((assignment) => (\n <ListItem key={getAssignmentId(assignment)} dense divider onClick={() => clickGo(assignment)}>\n <ListItemText primary={getAssignmentName(assignment)} secondary={getListItemComponent(assignment)} />\n <ListItemSecondaryAction>\n <IconButton onClick={() => clickGo(assignment)}>\n <ArrowForwardIosOutlinedIcon />\n </IconButton>\n </ListItemSecondaryAction>\n </ListItem>\n ))}\n </List>\n </CardContent>\n </Card>\n )}\n\n {type === CONSTS.TODO && !isConfirm && <Card className={classes.todoWrapper}>{toDoContent}</Card>}\n {type === CONSTS.TODO && isConfirm && <Fragment>{toDoContent}</Fragment>}\n\n {assignmentCount > 3 && (\n <Box display=\"flex\" justifyContent=\"center\">\n {bShowMore ? (\n <Button color=\"primary\" onClick={_showMore}>\n {showMoreLocalizedValue === 'show_more' ? 'Show more' : showMoreLocalizedValue}\n </Button>\n ) : (\n <Button onClick={_showLess}>{showlessLocalizedValue === 'show_less' ? 'Show less' : showlessLocalizedValue}</Button>\n )}\n </Box>\n )}\n\n <Snackbar\n open={showSnackbar}\n autoHideDuration={3000}\n onClose={handleSnackbarClose}\n message={snackbarMessage}\n action={\n <IconButton size=\"small\" aria-label=\"close\" color=\"inherit\" onClick={handleSnackbarClose}>\n <CloseIcon fontSize=\"small\" />\n </IconButton>\n }\n />\n </React.Fragment>\n );\n}\n"]}
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
### React SDK - Release Announcement - v23.1.10 (08 November 2023)
|
|
2
|
+
|
|
3
|
+
This release - **SDK-R v23.1.10** - is **only compatible with Pega Infinity 23**. This release is related to the [**main** branch of the React SDK repository](https://github.com/pegasystems/react-sdk/tree/main).
|
|
4
|
+
<br>
|
|
5
|
+
(If you currently are using the React SDK with Pega Infinity 8.8, update your SDK to
|
|
6
|
+
the [SDK-R v8.8.20 - release/8.8.20 branch](https://github.com/pegasystems/react-sdk/tree/release/8.8.20).)
|
|
7
|
+
|
|
8
|
+
The SDK-R v23.1.10 and v8.8.20 releases allow React SDK users to to take advantage of the latest
|
|
9
|
+
[SDK enhancements and fixes noted in **What's New in the SDK?**](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/react-sdk-updates.html) including:
|
|
10
|
+
|
|
11
|
+
* Added the use of **TypeScript typedefs** (from @pega/pcore-pconnect-typedefs) to SDK components.
|
|
12
|
+
For more information, see [Using type definitions - update link when published](https://pega-dev.zoominsoftware.io/bundle/constellation-sdk/page/constellation-sdks/sdks/type-definitions-constellation-sdks.html)
|
|
13
|
+
* Additional functionality including **RichTextEditor** and **Dynamic Tabs** components and **many-to-many data reference** support
|
|
14
|
+
* Enhanced security including token storage and item obfuscation support.
|
|
15
|
+
* Bug fixes.
|
|
16
|
+
* Full set of merged PRs can be found in the [react-sdk-components GitHub repo list of merged PRs](https://github.com/pegasystems/react-sdk-components/pulls?q=is%3Apr+is%3Amerged+base%3Amaster+). This release includes all PRs since (and including) #166 and #230.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
<hr />
|
|
20
|
+
|
|
21
|
+
### Previous Releases
|
|
22
|
+
|
|
1
23
|
#### **Release SDK-R-C 8.23.11 (10 August 2023)**
|
|
2
24
|
|
|
3
25
|
* Many significant improvements to localization
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { default as useAfterInitialEffect } from './useAfterInitialEffect';\nexport { default as useConsolidatedRef } from './useConsolidatedRef';\nexport { default as useUID } from './useUID';\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EffectCallback, DependencyList } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @example useAfterInitialEffect(cb, dependencies);
|
|
4
|
+
* @param cb The function that should be executed whenever this hook is called. [React EffectCallback](https://reactjs.org/docs/hooks-reference.html#useeffect)
|
|
5
|
+
* @param dependencies A list of variables or functions that will initiate this hook when they are updated.
|
|
6
|
+
*/
|
|
7
|
+
declare const useAfterInitialEffect: (cb: EffectCallback, dependencies: DependencyList) => void;
|
|
8
|
+
export default useAfterInitialEffect;
|
|
9
|
+
//# sourceMappingURL=useAfterInitialEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAfterInitialEffect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAfterInitialEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE1E;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,OAAQ,cAAc,uCAOhD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @example useAfterInitialEffect(cb, dependencies);
|
|
4
|
+
* @param cb The function that should be executed whenever this hook is called. [React EffectCallback](https://reactjs.org/docs/hooks-reference.html#useeffect)
|
|
5
|
+
* @param dependencies A list of variables or functions that will initiate this hook when they are updated.
|
|
6
|
+
*/
|
|
7
|
+
const useAfterInitialEffect = (cb, dependencies) => {
|
|
8
|
+
const ref = useRef(false);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (ref.current)
|
|
11
|
+
return cb();
|
|
12
|
+
ref.current = true;
|
|
13
|
+
}, dependencies);
|
|
14
|
+
};
|
|
15
|
+
export default useAfterInitialEffect;
|
|
16
|
+
//# sourceMappingURL=useAfterInitialEffect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAfterInitialEffect.js","sourceRoot":"","sources":["../../src/hooks/useAfterInitialEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAkC,MAAM,OAAO,CAAC;AAE1E;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,CAAC,EAAkB,EAAE,YAA4B,EAAE,EAAE;IACjF,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE1B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,GAAG,CAAC,OAAO;YAAE,OAAO,EAAE,EAAE,CAAC;QAC7B,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACrB,CAAC,EAAE,YAAY,CAAC,CAAC;AACnB,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import { useEffect, useRef, EffectCallback, DependencyList } from 'react';\n\n/**\n * @example useAfterInitialEffect(cb, dependencies);\n * @param cb The function that should be executed whenever this hook is called. [React EffectCallback](https://reactjs.org/docs/hooks-reference.html#useeffect)\n * @param dependencies A list of variables or functions that will initiate this hook when they are updated.\n */\nconst useAfterInitialEffect = (cb: EffectCallback, dependencies: DependencyList) => {\n const ref = useRef(false);\n\n useEffect(() => {\n if (ref.current) return cb();\n ref.current = true;\n }, dependencies);\n};\n\nexport default useAfterInitialEffect;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Ref, RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @example const ref = useConsolidatedRefs(refs);
|
|
4
|
+
* @param refs The ref or refs to consolidate.
|
|
5
|
+
* @returns ref:: The consolidated ref.
|
|
6
|
+
*/
|
|
7
|
+
declare const useConsolidatedRef: <T>(...refs: (Ref<T> | undefined)[]) => RefObject<T>;
|
|
8
|
+
export default useConsolidatedRef;
|
|
9
|
+
//# sourceMappingURL=useConsolidatedRef.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConsolidatedRef.d.ts","sourceRoot":"","sources":["../../src/hooks/useConsolidatedRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,GAAG,EAAoB,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3E;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,sDAwBvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useRef, useState } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @example const ref = useConsolidatedRefs(refs);
|
|
4
|
+
* @param refs The ref or refs to consolidate.
|
|
5
|
+
* @returns ref:: The consolidated ref.
|
|
6
|
+
*/
|
|
7
|
+
const useConsolidatedRef = (...refs) => {
|
|
8
|
+
const targetRef = useRef(null);
|
|
9
|
+
const [refProxy] = useState(() => Object.defineProperty({ current: null }, 'current', {
|
|
10
|
+
configurable: true,
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: () => targetRef.current,
|
|
13
|
+
set: (value) => {
|
|
14
|
+
targetRef.current = value;
|
|
15
|
+
refs.forEach((ref) => {
|
|
16
|
+
if (!ref)
|
|
17
|
+
return;
|
|
18
|
+
if (typeof ref === 'function') {
|
|
19
|
+
ref(targetRef.current);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
ref.current = targetRef.current;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
return refProxy;
|
|
28
|
+
};
|
|
29
|
+
export default useConsolidatedRef;
|
|
30
|
+
//# sourceMappingURL=useConsolidatedRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConsolidatedRef.js","sourceRoot":"","sources":["../../src/hooks/useConsolidatedRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAoC,MAAM,OAAO,CAAC;AAE3E;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,CAAI,GAAG,IAA+B,EAAgB,EAAE;IACjF,MAAM,SAAS,GAA+B,MAAM,CAAI,IAAI,CAAC,CAAC;IAE9D,MAAM,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAC/B,MAAM,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE;QAClD,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;QAChB,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO;QAC5B,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE;YACb,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;YAC1B,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACnB,IAAI,CAAC,GAAG;oBAAE,OAAO;gBAEjB,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;oBAC7B,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;iBACxB;qBAAM;oBACJ,GAAkC,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;iBACjE;YACH,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CACH,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { useRef, useState, Ref, MutableRefObject, RefObject } from 'react';\n\n/**\n * @example const ref = useConsolidatedRefs(refs);\n * @param refs The ref or refs to consolidate.\n * @returns ref:: The consolidated ref.\n */\nconst useConsolidatedRef = <T>(...refs: Array<Ref<T> | undefined>): RefObject<T> => {\n const targetRef: MutableRefObject<T | null> = useRef<T>(null);\n\n const [refProxy] = useState(() =>\n Object.defineProperty({ current: null }, 'current', {\n configurable: true,\n enumerable: true,\n get: () => targetRef.current,\n set: (value) => {\n targetRef.current = value;\n refs.forEach((ref) => {\n if (!ref) return;\n\n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n (ref as MutableRefObject<T | null>).current = targetRef.current;\n }\n });\n }\n })\n );\n\n return refProxy;\n};\n\nexport default useConsolidatedRef;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate unique identifier that is stable across renders.
|
|
3
|
+
* @example const stableUID = useUID();
|
|
4
|
+
* @returns uid:: The same autogenerated UID between renders.
|
|
5
|
+
*/
|
|
6
|
+
declare const useUID: () => string;
|
|
7
|
+
export default useUID;
|
|
8
|
+
//# sourceMappingURL=useUID.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUID.d.ts","sourceRoot":"","sources":["../../src/hooks/useUID.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,QAAA,MAAM,MAAM,QAAO,MAElB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
const createUID = () => {
|
|
3
|
+
return `_${Math.random().toString(36).slice(2, 11)}`;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Generate unique identifier that is stable across renders.
|
|
7
|
+
* @example const stableUID = useUID();
|
|
8
|
+
* @returns uid:: The same autogenerated UID between renders.
|
|
9
|
+
*/
|
|
10
|
+
const useUID = () => {
|
|
11
|
+
return useRef(createUID()).current;
|
|
12
|
+
};
|
|
13
|
+
export default useUID;
|
|
14
|
+
//# sourceMappingURL=useUID.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUID.js","sourceRoot":"","sources":["../../src/hooks/useUID.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,MAAM,SAAS,GAAG,GAAW,EAAE;IAC7B,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;AACvD,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,GAAG,GAAW,EAAE;IAC1B,OAAO,MAAM,CAAS,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC;AAC7C,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { useRef } from 'react';\n\nconst createUID = (): string => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\n/**\n * Generate unique identifier that is stable across renders.\n * @example const stableUID = useUID();\n * @returns uid:: The same autogenerated UID between renders.\n */\nconst useUID = (): string => {\n return useRef<string>(createUID()).current;\n};\n\nexport default useUID;\n"]}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC"}
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,+DAA+D;AAC/D,cAAc,SAAS,CAAC","sourcesContent":["/* eslint-disable import/export */\n// This file is autogenerated. Any changes will be overwritten.\nexport * from './hooks';\n"]}
|
|
@@ -2,6 +2,7 @@ export default pegaSdkComponentMap;
|
|
|
2
2
|
declare namespace pegaSdkComponentMap {
|
|
3
3
|
export { ActionButtons };
|
|
4
4
|
export { ActionButtonsForFileUtil };
|
|
5
|
+
export { AlertBanner };
|
|
5
6
|
export { AppAnnouncement };
|
|
6
7
|
export { AppShell };
|
|
7
8
|
export { Assignment };
|
|
@@ -31,9 +32,13 @@ declare namespace pegaSdkComponentMap {
|
|
|
31
32
|
export { DetailsThreeColumn };
|
|
32
33
|
export { DetailsTwoColumn };
|
|
33
34
|
export { Dropdown };
|
|
35
|
+
export { DynamicTabs };
|
|
34
36
|
export { Email };
|
|
35
37
|
export { ErrorBoundary };
|
|
38
|
+
export { FieldGroup };
|
|
39
|
+
export { FieldGroupList };
|
|
36
40
|
export { FieldGroupTemplate };
|
|
41
|
+
export { FieldValueList };
|
|
37
42
|
export { FileUtility };
|
|
38
43
|
export { FlowContainer };
|
|
39
44
|
export { Followers };
|
|
@@ -63,7 +68,10 @@ declare namespace pegaSdkComponentMap {
|
|
|
63
68
|
export { Reference as reference };
|
|
64
69
|
export { RadioButtons };
|
|
65
70
|
export { Region };
|
|
71
|
+
export { RichText };
|
|
72
|
+
export { RichTextEditor };
|
|
66
73
|
export { RootContainer };
|
|
74
|
+
export { ScalarList };
|
|
67
75
|
export { SemanticLink };
|
|
68
76
|
export { SimpleTable };
|
|
69
77
|
export { SimpleTableManual };
|
|
@@ -91,10 +99,11 @@ declare namespace pegaSdkComponentMap {
|
|
|
91
99
|
export { WideNarrowForm };
|
|
92
100
|
export { WideNarrowPage };
|
|
93
101
|
export { WssNavBar };
|
|
94
|
-
export { WssQuickCreate
|
|
102
|
+
export { WssQuickCreate };
|
|
95
103
|
}
|
|
96
104
|
import ActionButtons from "../lib/components/infra/ActionButtons";
|
|
97
105
|
import ActionButtonsForFileUtil from "./components/widget/FileUtility/ActionButtonsForFileUtil";
|
|
106
|
+
import AlertBanner from "./components/designSystemExtension/AlertBanner";
|
|
98
107
|
import AppAnnouncement from "./components/widget/AppAnnouncement";
|
|
99
108
|
import AppShell from "./components/template/AppShell/AppShell";
|
|
100
109
|
import Assignment from "./components/infra/Assignment/Assignment";
|
|
@@ -124,9 +133,13 @@ import DetailsSubTabs from "./components/template/Details/DetailsSubTabs";
|
|
|
124
133
|
import DetailsThreeColumn from "./components/template/Details/DetailsThreeColumn";
|
|
125
134
|
import DetailsTwoColumn from "./components/template/Details/DetailsTwoColumn/DetailsTwoColumn";
|
|
126
135
|
import Dropdown from "./components/field/Dropdown";
|
|
136
|
+
import DynamicTabs from "./components/template/Details/DynamicTabs";
|
|
127
137
|
import Email from "./components/field/Email/Email";
|
|
128
138
|
import ErrorBoundary from "./components/infra/ErrorBoundary";
|
|
139
|
+
import FieldGroup from "./components/designSystemExtension/FieldGroup";
|
|
140
|
+
import FieldGroupList from "./components/designSystemExtension/FieldGroupList";
|
|
129
141
|
import FieldGroupTemplate from "./components/template/FieldGroupTemplate";
|
|
142
|
+
import FieldValueList from "./components/designSystemExtension/FieldValueList";
|
|
130
143
|
import FileUtility from "./components/widget/FileUtility/FileUtility";
|
|
131
144
|
import FlowContainer from "./components/infra/Containers/FlowContainer";
|
|
132
145
|
import Followers from "./components/widget/Followers";
|
|
@@ -156,7 +169,10 @@ import QuickCreate from "./components/widget/QuickCreate";
|
|
|
156
169
|
import Reference from "./components/infra/Reference/Reference";
|
|
157
170
|
import RadioButtons from "./components/field/RadioButtons";
|
|
158
171
|
import Region from "./components/infra/Region/Region";
|
|
172
|
+
import RichText from "./components/field/RichText";
|
|
173
|
+
import RichTextEditor from "./components/designSystemExtension/RichTextEditor";
|
|
159
174
|
import RootContainer from "./components/infra/RootContainer/RootContainer";
|
|
175
|
+
import ScalarList from "./components/field/ScalarList";
|
|
160
176
|
import SemanticLink from "./components/field/SemanticLink";
|
|
161
177
|
import SimpleTable from "./components/template/SimpleTable/SimpleTable";
|
|
162
178
|
import SimpleTableManual from "./components/template/SimpleTable/SimpleTableManual";
|