@pega/react-sdk-components 8.8.21 → 8.23.11-debug
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 +10 -7
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +7 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts +1 -15
- 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 +9 -6
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +7 -3
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +10 -4
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +8 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +2 -6
- 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 +2 -7
- 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 +2 -7
- 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 +7 -17
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +6 -1
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -5
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +6 -3
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -6
- 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 +1 -15
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +15 -17
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +2 -7
- 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 +1 -19
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +8 -10
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +1 -6
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +11 -11
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.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 +1 -5
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +6 -8
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -5
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +8 -14
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +1 -8
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +9 -10
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +1 -10
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +9 -12
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -5
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +5 -7
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +1 -5
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +4 -6
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts +1 -5
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +4 -6
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -5
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +6 -8
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +1 -7
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +12 -12
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +9 -5
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +14 -10
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -6
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +3 -5
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -7
- 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 +1 -6
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +4 -6
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -5
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +8 -10
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -5
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +4 -6
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +40 -19
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +45 -16
- 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 +6 -8
- package/lib/components/helpers/auth.d.ts.map +1 -1
- package/lib/components/helpers/auth.js +335 -642
- package/lib/components/helpers/auth.js.map +1 -1
- package/lib/components/helpers/authManager.d.ts +17 -20
- package/lib/components/helpers/authManager.d.ts.map +1 -1
- package/lib/components/helpers/authManager.js +439 -711
- 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 +4 -5
- 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 +63 -0
- package/lib/components/helpers/config_access.js.map +1 -1
- package/lib/components/helpers/date-format-utils.d.ts +6 -1
- 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/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 +320 -69
- 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 +1 -3
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +3 -5
- 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 +3 -7
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +0 -1
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts +0 -6
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +0 -6
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +13 -6
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +13 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +15 -9
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +21 -8
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +14 -8
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +16 -3
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +21 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +48 -41
- 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 +17 -8
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +17 -6
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +22 -9
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +20 -3
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +19 -9
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +16 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.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 +14 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +15 -13
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +12 -5
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +12 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.d.ts +17 -11
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +18 -4
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +16 -8
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +16 -3
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +17 -8
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +15 -1
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +7 -4
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +4 -0
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +21 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +21 -4
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +8 -5
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +6 -1
- 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 +10 -4
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +9 -4
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +16 -13
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +20 -2
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +15 -20
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +22 -10
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +23 -11
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +22 -4
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +7 -5
- 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 +22 -10
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +21 -8
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +15 -8
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +12 -0
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +16 -10
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +23 -12
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +31 -1
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +48 -41
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +11 -1
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +10 -9
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +16 -1
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +15 -10
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +15 -7
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +13 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +16 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +16 -14
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +16 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +16 -14
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +19 -12
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +21 -7
- 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 +5 -0
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +15 -8
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +14 -5
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +13 -5
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +10 -6
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +9 -1
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +123 -127
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +0 -44
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +1 -142
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +13 -9
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +13 -2
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +1 -10
- 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 +16 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +16 -14
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +1 -5
- 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 +14 -7
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +13 -4
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +7 -4
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +5 -0
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +8 -4
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +6 -3
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +7 -4
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +5 -0
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +15 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +11 -15
- 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 +5 -57
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +1 -18
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +2 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +29 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +28 -22
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +26 -14
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +26 -5
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +10 -4
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +8 -1
- 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 +11 -5
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +12 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +8 -4
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +6 -3
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +11 -5
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +9 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +1 -10
- 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 +16 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +23 -31
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +1 -5
- 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 +14 -7
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +14 -4
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -17
- 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 +17 -8
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +19 -4
- 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 +16 -24
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +7 -4
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +8 -4
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -8
- 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 +1 -5
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +21 -31
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +5 -4
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +10 -3
- 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 +2 -10
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -7
- 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 +1 -7
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +2 -5
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts +27 -13
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +64 -28
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +0 -21
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/sdk-pega-component-map.d.ts +1 -15
- package/lib/sdk-pega-component-map.js +1 -15
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/package.json +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +0 -19
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +0 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +0 -77
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +0 -1
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +0 -2
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +0 -1
- package/lib/components/designSystemExtension/RichTextEditor/index.js +0 -2
- package/lib/components/designSystemExtension/RichTextEditor/index.js.map +0 -1
- package/lib/components/field/RichText/RichText.d.ts +0 -7
- package/lib/components/field/RichText/RichText.d.ts.map +0 -1
- package/lib/components/field/RichText/RichText.js +0 -51
- package/lib/components/field/RichText/RichText.js.map +0 -1
- package/lib/components/field/RichText/index.d.ts +0 -2
- package/lib/components/field/RichText/index.d.ts.map +0 -1
- package/lib/components/field/RichText/index.js +0 -2
- package/lib/components/field/RichText/index.js.map +0 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +0 -13
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +0 -1
- package/lib/components/field/ScalarList/ScalarList.js +0 -34
- package/lib/components/field/ScalarList/ScalarList.js.map +0 -1
- package/lib/components/field/ScalarList/index.d.ts +0 -2
- package/lib/components/field/ScalarList/index.d.ts.map +0 -1
- package/lib/components/field/ScalarList/index.js +0 -2
- package/lib/components/field/ScalarList/index.js.map +0 -1
- package/lib/hooks/index.d.ts +0 -4
- package/lib/hooks/index.d.ts.map +0 -1
- package/lib/hooks/index.js +0 -4
- package/lib/hooks/index.js.map +0 -1
- package/lib/hooks/useAfterInitialEffect.d.ts +0 -9
- package/lib/hooks/useAfterInitialEffect.d.ts.map +0 -1
- package/lib/hooks/useAfterInitialEffect.js +0 -16
- package/lib/hooks/useAfterInitialEffect.js.map +0 -1
- package/lib/hooks/useConsolidatedRef.d.ts +0 -9
- package/lib/hooks/useConsolidatedRef.d.ts.map +0 -1
- package/lib/hooks/useConsolidatedRef.js +0 -30
- package/lib/hooks/useConsolidatedRef.js.map +0 -1
- package/lib/hooks/useUID.d.ts +0 -8
- package/lib/hooks/useUID.d.ts.map +0 -1
- package/lib/hooks/useUID.js +0 -14
- package/lib/hooks/useUID.js.map +0 -1
- package/lib/types/PConnProps.d.ts +0 -42
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
import './NavBar.css';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
declare function NavBar(props: any): JSX.Element;
|
|
5
|
+
declare namespace NavBar {
|
|
6
|
+
var defaultProps: {
|
|
7
|
+
pConn: null;
|
|
8
|
+
appName: string;
|
|
9
|
+
pages: never[];
|
|
10
|
+
caseTypes: never[];
|
|
11
|
+
};
|
|
12
|
+
var propTypes: {
|
|
13
|
+
pConn: PropTypes.Requireable<object>;
|
|
14
|
+
appName: PropTypes.Requireable<string>;
|
|
15
|
+
pages: PropTypes.Requireable<(object | null | undefined)[]>;
|
|
16
|
+
caseTypes: PropTypes.Requireable<(object | null | undefined)[]>;
|
|
17
|
+
};
|
|
9
18
|
}
|
|
10
|
-
export default
|
|
11
|
-
export {};
|
|
19
|
+
export default NavBar;
|
|
12
20
|
//# sourceMappingURL=NavBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/NavBar/NavBar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/NavBar/NavBar.tsx"],"names":[],"mappings":";AAGA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,cAAc,CAAC;AA+FtB,iBAAwB,MAAM,CAAC,KAAK,KAAA,eAiMnC;kBAjMuB,MAAM;;;;;;;;;;;;;;eAAN,MAAM"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { makeStyles, useTheme } from '@material-ui/core/styles';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
4
5
|
import { Utils } from '../../helpers/utils';
|
|
5
6
|
import './NavBar.css';
|
|
6
7
|
import { Drawer, List, ListItem, ListItemIcon, ListItemText, ListItemSecondaryAction, Collapse, Divider, IconButton, Menu, MenuItem, Typography } from '@material-ui/core';
|
|
@@ -20,8 +21,7 @@ import { useNavBar } from '../../helpers/reactContextHelpers';
|
|
|
20
21
|
import { logout } from '../../helpers/authManager';
|
|
21
22
|
const iconMap = {
|
|
22
23
|
'pi pi-headline': React.createElement(HomeOutlinedIcon, { fontSize: 'large' }),
|
|
23
|
-
'pi pi-flag-solid': React.createElement(FlagOutlinedIcon, { fontSize: 'large' })
|
|
24
|
-
'pi pi-home-solid': React.createElement(HomeOutlinedIcon, { fontSize: 'large' })
|
|
24
|
+
'pi pi-flag-solid': React.createElement(FlagOutlinedIcon, { fontSize: 'large' })
|
|
25
25
|
};
|
|
26
26
|
const drawerWidth = 300;
|
|
27
27
|
const useStyles = makeStyles(theme => ({
|
|
@@ -75,7 +75,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
75
75
|
}
|
|
76
76
|
}));
|
|
77
77
|
export default function NavBar(props) {
|
|
78
|
-
const { pConn, pages
|
|
78
|
+
const { pConn, pages, caseTypes } = props;
|
|
79
79
|
const classes = useStyles();
|
|
80
80
|
const theme = useTheme();
|
|
81
81
|
const isDesktop = useMediaQuery(theme.breakpoints.up('md'));
|
|
@@ -188,4 +188,17 @@ export default function NavBar(props) {
|
|
|
188
188
|
React.createElement(ArrowBackIcon, { fontSize: 'large' })),
|
|
189
189
|
React.createElement(Typography, { variant: 'inherit' }, localizedVal('Logout', localeCategory))))))));
|
|
190
190
|
}
|
|
191
|
+
NavBar.defaultProps = {
|
|
192
|
+
pConn: null,
|
|
193
|
+
appName: '',
|
|
194
|
+
pages: [],
|
|
195
|
+
caseTypes: []
|
|
196
|
+
};
|
|
197
|
+
NavBar.propTypes = {
|
|
198
|
+
pConn: PropTypes.object,
|
|
199
|
+
// eslint-disable-next-line react/no-unused-prop-types
|
|
200
|
+
appName: PropTypes.string,
|
|
201
|
+
pages: PropTypes.arrayOf(PropTypes.object),
|
|
202
|
+
caseTypes: PropTypes.arrayOf(PropTypes.object)
|
|
203
|
+
};
|
|
191
204
|
//# sourceMappingURL=NavBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.js","sourceRoot":"","sources":["../../../../src/components/infra/NavBar/NavBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,cAAc,CAAC;AACtB,OAAO,EACL,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,uBAAuB,EACvB,QAAQ,EACR,OAAO,EACP,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,UAAU,EACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,iBAAiB,MAAM,0CAA0C,CAAC;AACzE,OAAO,eAAe,MAAM,gCAA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c,CAC1E,CACN,CACN,CACE,CACA,CACV,CAAC;AACJ,CAAC","sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport clsx from 'clsx';\nimport { Utils } from '../../helpers/utils';\nimport './NavBar.css';\nimport {\n Drawer,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n ListItemSecondaryAction,\n Collapse,\n Divider,\n IconButton,\n Menu,\n MenuItem,\n Typography\n} from '@material-ui/core';\n\nimport PersonOutlineIcon from '@material-ui/icons/PersonOutlineOutlined';\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport ChevronRightIcon from '@material-ui/icons/ChevronRight';\nimport FlagOutlinedIcon from '@material-ui/icons/FlagOutlined';\nimport HomeOutlinedIcon from '@material-ui/icons/HomeOutlined';\nimport ExpandLess from '@material-ui/icons/ExpandLess';\nimport ExpandMore from '@material-ui/icons/ExpandMore';\nimport AddIcon from '@material-ui/icons/Add';\nimport WorkOutlineIcon from '@material-ui/icons/WorkOutline';\nimport ClearOutlinedIcon from '@material-ui/icons/ClearOutlined';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\n\nimport { useNavBar } from '../../helpers/reactContextHelpers';\nimport { logout } from '../../helpers/authManager';\n\nimport type { PConnProps } from '../../../types/PConnProps';\n\n\ninterface NavBarProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n // eslint-disable-next-line react/no-unused-prop-types\n appName?: string,\n pages?: Array<any>,\n caseTypes: Array<any>,\n pConn?: any\n}\n\n\nconst iconMap = {\n 'pi pi-headline': <HomeOutlinedIcon fontSize='large' />,\n 'pi pi-flag-solid': <FlagOutlinedIcon fontSize='large' />,\n 'pi pi-home-solid': <HomeOutlinedIcon fontSize='large' />\n};\n\nconst drawerWidth = 300;\n\nconst useStyles = makeStyles(theme => ({\n drawerPaper: {\n position: 'relative',\n whiteSpace: 'nowrap',\n width: drawerWidth,\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen\n }),\n height: '100vh'\n },\n drawerPaperClose: {\n overflowX: 'hidden',\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen\n }),\n width: theme.spacing(7),\n [theme.breakpoints.up('md')]: {\n width: theme.spacing(9)\n },\n height: '100vh'\n },\n nested: {\n paddingLeft: theme.spacing(4)\n },\n appListItem: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n appListLogo: {\n marginRight: theme.spacing(2),\n width: '3.6rem'\n },\n appListIcon: {\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n appListDiv: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light),\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n applicationLabel: {\n whiteSpace: 'initial'\n }\n}));\n\nexport default function NavBar(props: NavBarProps) {\n const { pConn, pages = [], caseTypes = [] } = props;\n\n const classes = useStyles();\n const theme = useTheme();\n const isDesktop = useMediaQuery(theme.breakpoints.up('md'));\n\n const { open, setOpen } = useNavBar();\n const [navPages, setNavPages] = useState(JSON.parse(JSON.stringify(pages)));\n const [bShowCaseTypes, setBShowCaseTypes] = useState(true);\n const [bShowOperatorButtons, setBShowOperatorButtons] = useState(false);\n const [anchorEl, setAnchorEl] = useState(null);\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'AppShell';\n\n const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat(\n 'pzpega-logo-mark.svg'\n );\n const portalOperator = PCore.getEnvironmentInfo().getOperatorName();\n const portalApp = PCore.getEnvironmentInfo().getApplicationLabel();\n\n useEffect(() => {\n setNavPages(JSON.parse(JSON.stringify(pages)));\n }, [pages]);\n\n function navPanelButtonClick(oPageData: any) {\n const { pyClassName, pyRuleName } = oPageData;\n\n pConn\n .getActionsApi()\n .showPage(pyRuleName, pyClassName)\n .then(() => {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('showPage completed', localeCategory)}`);\n });\n }\n\n function navPanelCreateCaseType(sCaseType: string, sFlowType: string) {\n setOpen(false);\n const actionInfo = {\n containerName: 'primary',\n flowType: sFlowType || 'pyStartCase'\n };\n\n pConn\n .getActionsApi()\n .createWork(sCaseType, actionInfo)\n .then(() => {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('createWork completed', localeCategory)}`);\n });\n }\n\n // Toggle showing the Operator buttons\n function navPanelOperatorButtonClick(evt) {\n setBShowOperatorButtons(!bShowOperatorButtons);\n if (!bShowOperatorButtons) setAnchorEl(evt.currentTarget);\n else setAnchorEl(null);\n }\n\n const handleDrawerOpen = () => {\n setOpen(!open);\n };\n\n const handleCaseItemClick = () => {\n if (!open) {\n setOpen(true);\n setBShowCaseTypes(true);\n } else setBShowCaseTypes(!bShowCaseTypes);\n };\n\n useEffect(() => {\n if (!isDesktop) setOpen(false);\n else setOpen(true);\n }, [isDesktop]);\n\n return (\n <Drawer\n variant='permanent'\n classes={{\n paper: clsx(classes.drawerPaper, !open && classes.drawerPaperClose)\n }}\n open={open && isDesktop}\n >\n {open ? (\n <List className={classes.appListItem}>\n <ListItem onClick={handleDrawerOpen}>\n <ListItemIcon>\n <img src={portalLogoImage} className={classes.appListLogo} />\n </ListItemIcon>\n <ListItemText\n primary={\n <Typography variant='h6' className={classes.applicationLabel}>\n {portalApp}\n </Typography>\n }\n />\n <ListItemSecondaryAction>\n <IconButton edge='end' onClick={handleDrawerOpen}>\n <ChevronLeftIcon className={classes.appListIcon} />\n </IconButton>\n </ListItemSecondaryAction>\n </ListItem>\n </List>\n ) : (\n <div className={classes.appListDiv} onClick={handleDrawerOpen}>\n <ChevronRightIcon\n className={classes.appListIcon}\n id='chevron-right-icon'\n fontSize='large'\n />\n </div>\n )}\n <List>\n <ListItem button onClick={handleCaseItemClick}>\n <ListItemIcon>\n {bShowCaseTypes && open ? (\n <ClearOutlinedIcon fontSize='large' />\n ) : (\n <AddIcon fontSize='large' />\n )}\n </ListItemIcon>\n <ListItemText primary='Create' />\n {bShowCaseTypes ? <ExpandLess /> : <ExpandMore />}\n </ListItem>\n </List>\n <Collapse in={bShowCaseTypes && open} timeout='auto' unmountOnExit className='scrollable'>\n <List component='div' disablePadding>\n {caseTypes.map(caseType => (\n <ListItem\n button\n className={classes.nested}\n onClick={() => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)}\n key={caseType.pyLabel}\n >\n <ListItemIcon>\n <WorkOutlineIcon fontSize='large' />\n </ListItemIcon>\n <ListItemText primary={caseType.pyLabel} />\n </ListItem>\n ))}\n </List>\n </Collapse>\n <List>\n {navPages.map(page => (\n <ListItem button onClick={() => navPanelButtonClick(page)} key={page.pyLabel}>\n <ListItemIcon>{iconMap[page.pxPageViewIcon]}</ListItemIcon>\n <ListItemText primary={page.pyLabel} />\n </ListItem>\n ))}\n </List>\n <Divider />\n <List className='marginTopAuto'>\n <>\n <ListItem onClick={navPanelOperatorButtonClick}>\n <ListItemIcon>\n <PersonOutlineIcon fontSize='large' />\n </ListItemIcon>\n <ListItemText primary={portalOperator} />\n {open && (\n <ListItemSecondaryAction>\n <IconButton edge='end' onClick={navPanelOperatorButtonClick}>\n <ChevronRightIcon />\n </IconButton>\n </ListItemSecondaryAction>\n )}\n </ListItem>\n <Menu\n anchorEl={anchorEl}\n keepMounted={bShowOperatorButtons}\n open={bShowOperatorButtons}\n onClick={navPanelOperatorButtonClick}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left'\n }}\n >\n <MenuItem onClick={logout}>\n <ListItemIcon>\n <ArrowBackIcon fontSize='large' />\n </ListItemIcon>\n <Typography variant='inherit'>{localizedVal('Logout', localeCategory)}</Typography>\n </MenuItem>\n </Menu>\n </>\n </List>\n </Dr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,EAAE,2BAA2B;4BACzD,oBAAC,gBAAgB,OAAG,CACT,CACW,CAC3B,CACQ;gBACX,oBAAC,IAAI,IACH,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,oBAAoB,EAC1B,OAAO,EAAE,2BAA2B,EACpC,YAAY,EAAE;wBACZ,QAAQ,EAAE,KAAK;wBACf,UAAU,EAAE,OAAO;qBACpB,EACD,eAAe,EAAE;wBACf,QAAQ,EAAE,KAAK;wBACf,UAAU,EAAE,MAAM;qBACnB;oBAED,oBAAC,QAAQ,IAAC,OAAO,EAAE,MAAM;wBACvB,oBAAC,YAAY;4BACX,oBAAC,aAAa,IAAC,QAAQ,EAAC,OAAO,GAAG,CACrB;wBACf,oBAAC,UAAU,IAAC,OAAO,EAAC,SAAS,IAAE,YAAY,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAc,CAC1E,CACN,CACN,CACE,CACA,CACV,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,YAAY,GAAG;IACpB,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,EAAE;CACd,CAAC;AAEF,MAAM,CAAC,SAAS,GAAG;IACjB,KAAK,EAAE,SAAS,CAAC,MAAM;IACvB,sDAAsD;IACtD,OAAO,EAAE,SAAS,CAAC,MAAM;IACzB,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;IAC1C,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;CAC/C,CAAC","sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { makeStyles, useTheme } from '@material-ui/core/styles';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { Utils } from '../../helpers/utils';\nimport './NavBar.css';\nimport {\n Drawer,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n ListItemSecondaryAction,\n Collapse,\n Divider,\n IconButton,\n Menu,\n MenuItem,\n Typography\n} from '@material-ui/core';\n\nimport PersonOutlineIcon from '@material-ui/icons/PersonOutlineOutlined';\nimport ChevronLeftIcon from '@material-ui/icons/ChevronLeft';\nimport ChevronRightIcon from '@material-ui/icons/ChevronRight';\nimport FlagOutlinedIcon from '@material-ui/icons/FlagOutlined';\nimport HomeOutlinedIcon from '@material-ui/icons/HomeOutlined';\nimport ExpandLess from '@material-ui/icons/ExpandLess';\nimport ExpandMore from '@material-ui/icons/ExpandMore';\nimport AddIcon from '@material-ui/icons/Add';\nimport WorkOutlineIcon from '@material-ui/icons/WorkOutline';\nimport ClearOutlinedIcon from '@material-ui/icons/ClearOutlined';\nimport ArrowBackIcon from '@material-ui/icons/ArrowBack';\nimport useMediaQuery from '@material-ui/core/useMediaQuery';\n\nimport { useNavBar } from '../../helpers/reactContextHelpers';\nimport { logout } from '../../helpers/authManager';\n\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nconst iconMap = {\n 'pi pi-headline': <HomeOutlinedIcon fontSize='large' />,\n 'pi pi-flag-solid': <FlagOutlinedIcon fontSize='large' />\n};\n\nconst drawerWidth = 300;\n\nconst useStyles = makeStyles(theme => ({\n drawerPaper: {\n position: 'relative',\n whiteSpace: 'nowrap',\n width: drawerWidth,\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen\n }),\n height: '100vh'\n },\n drawerPaperClose: {\n overflowX: 'hidden',\n transition: theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen\n }),\n width: theme.spacing(7),\n [theme.breakpoints.up('md')]: {\n width: theme.spacing(9)\n },\n height: '100vh'\n },\n nested: {\n paddingLeft: theme.spacing(4)\n },\n appListItem: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n appListLogo: {\n marginRight: theme.spacing(2),\n width: '3.6rem'\n },\n appListIcon: {\n color: theme.palette.getContrastText(theme.palette.primary.light)\n },\n appListDiv: {\n backgroundColor: theme.palette.primary.light,\n color: theme.palette.getContrastText(theme.palette.primary.light),\n paddingTop: theme.spacing(2),\n paddingBottom: theme.spacing(2),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n applicationLabel: {\n whiteSpace: 'initial'\n }\n}));\n\nexport default function NavBar(props) {\n const { pConn, pages, caseTypes } = props;\n\n const classes = useStyles();\n const theme = useTheme();\n const isDesktop = useMediaQuery(theme.breakpoints.up('md'));\n\n const { open, setOpen } = useNavBar();\n const [navPages, setNavPages] = useState(JSON.parse(JSON.stringify(pages)));\n const [bShowCaseTypes, setBShowCaseTypes] = useState(true);\n const [bShowOperatorButtons, setBShowOperatorButtons] = useState(false);\n const [anchorEl, setAnchorEl] = useState(null);\n\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'AppShell';\n\n const portalLogoImage = Utils.getIconPath(Utils.getSDKStaticConentUrl()).concat(\n 'pzpega-logo-mark.svg'\n );\n const portalOperator = PCore.getEnvironmentInfo().getOperatorName();\n const portalApp = PCore.getEnvironmentInfo().getApplicationLabel();\n\n useEffect(() => {\n setNavPages(JSON.parse(JSON.stringify(pages)));\n }, [pages]);\n\n function navPanelButtonClick(oPageData: any) {\n const { pyClassName, pyRuleName } = oPageData;\n\n pConn\n .getActionsApi()\n .showPage(pyRuleName, pyClassName)\n .then(() => {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('showPage completed', localeCategory)}`);\n });\n }\n\n function navPanelCreateCaseType(sCaseType: string, sFlowType: string) {\n setOpen(false);\n const actionInfo = {\n containerName: 'primary',\n flowType: sFlowType || 'pyStartCase'\n };\n\n pConn\n .getActionsApi()\n .createWork(sCaseType, actionInfo)\n .then(() => {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('createWork completed', localeCategory)}`);\n });\n }\n\n // Toggle showing the Operator buttons\n function navPanelOperatorButtonClick(evt) {\n setBShowOperatorButtons(!bShowOperatorButtons);\n if (!bShowOperatorButtons) setAnchorEl(evt.currentTarget);\n else setAnchorEl(null);\n }\n\n const handleDrawerOpen = () => {\n setOpen(!open);\n };\n\n const handleCaseItemClick = () => {\n if (!open) {\n setOpen(true);\n setBShowCaseTypes(true);\n } else setBShowCaseTypes(!bShowCaseTypes);\n };\n\n useEffect(() => {\n if (!isDesktop) setOpen(false);\n else setOpen(true);\n }, [isDesktop]);\n\n return (\n <Drawer\n variant='permanent'\n classes={{\n paper: clsx(classes.drawerPaper, !open && classes.drawerPaperClose)\n }}\n open={open && isDesktop}\n >\n {open ? (\n <List className={classes.appListItem}>\n <ListItem onClick={handleDrawerOpen}>\n <ListItemIcon>\n <img src={portalLogoImage} className={classes.appListLogo} />\n </ListItemIcon>\n <ListItemText\n primary={\n <Typography variant='h6' className={classes.applicationLabel}>\n {portalApp}\n </Typography>\n }\n />\n <ListItemSecondaryAction>\n <IconButton edge='end' onClick={handleDrawerOpen}>\n <ChevronLeftIcon className={classes.appListIcon} />\n </IconButton>\n </ListItemSecondaryAction>\n </ListItem>\n </List>\n ) : (\n <div className={classes.appListDiv} onClick={handleDrawerOpen}>\n <ChevronRightIcon\n className={classes.appListIcon}\n id='chevron-right-icon'\n fontSize='large'\n />\n </div>\n )}\n <List>\n <ListItem button onClick={handleCaseItemClick}>\n <ListItemIcon>\n {bShowCaseTypes && open ? (\n <ClearOutlinedIcon fontSize='large' />\n ) : (\n <AddIcon fontSize='large' />\n )}\n </ListItemIcon>\n <ListItemText primary='Create' />\n {bShowCaseTypes ? <ExpandLess /> : <ExpandMore />}\n </ListItem>\n </List>\n <Collapse in={bShowCaseTypes && open} timeout='auto' unmountOnExit className='scrollable'>\n <List component='div' disablePadding>\n {caseTypes.map(caseType => (\n <ListItem\n button\n className={classes.nested}\n onClick={() => navPanelCreateCaseType(caseType.pyClassName, caseType.pyFlowType)}\n key={caseType.pyLabel}\n >\n <ListItemIcon>\n <WorkOutlineIcon fontSize='large' />\n </ListItemIcon>\n <ListItemText primary={caseType.pyLabel} />\n </ListItem>\n ))}\n </List>\n </Collapse>\n <List>\n {navPages.map(page => (\n <ListItem button onClick={() => navPanelButtonClick(page)} key={page.pyLabel}>\n <ListItemIcon>{iconMap[page.pxPageViewIcon]}</ListItemIcon>\n <ListItemText primary={page.pyLabel} />\n </ListItem>\n ))}\n </List>\n <Divider />\n <List className='marginTopAuto'>\n <>\n <ListItem onClick={navPanelOperatorButtonClick}>\n <ListItemIcon>\n <PersonOutlineIcon fontSize='large' />\n </ListItemIcon>\n <ListItemText primary={portalOperator} />\n {open && (\n <ListItemSecondaryAction>\n <IconButton edge='end' onClick={navPanelOperatorButtonClick}>\n <ChevronRightIcon />\n </IconButton>\n </ListItemSecondaryAction>\n )}\n </ListItem>\n <Menu\n anchorEl={anchorEl}\n keepMounted={bShowOperatorButtons}\n open={bShowOperatorButtons}\n onClick={navPanelOperatorButtonClick}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'right'\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'left'\n }}\n >\n <MenuItem onClick={logout}>\n <ListItemIcon>\n <ArrowBackIcon fontSize='large' />\n </ListItemIcon>\n <Typography variant='inherit'>{localizedVal('Logout', localeCategory)}</Typography>\n </MenuItem>\n </Menu>\n </>\n </List>\n </Drawer>\n );\n}\n\nNavBar.defaultProps = {\n pConn: null,\n appName: '',\n pages: [],\n caseTypes: []\n};\n\nNavBar.propTypes = {\n pConn: PropTypes.object,\n // eslint-disable-next-line react/no-unused-prop-types\n appName: PropTypes.string,\n pages: PropTypes.arrayOf(PropTypes.object),\n caseTypes: PropTypes.arrayOf(PropTypes.object)\n};\n"]}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
declare function Reference(props: any): JSX.Element | null;
|
|
4
|
+
declare namespace Reference {
|
|
5
|
+
var defaultProps: {
|
|
6
|
+
visibility: boolean;
|
|
7
|
+
context: null;
|
|
8
|
+
readOnly: boolean;
|
|
9
|
+
displayMode: null;
|
|
10
|
+
};
|
|
11
|
+
var propTypes: {
|
|
12
|
+
getPConnect: PropTypes.Validator<(...args: any[]) => any>;
|
|
13
|
+
visibility: PropTypes.Requireable<boolean>;
|
|
14
|
+
context: PropTypes.Requireable<string>;
|
|
15
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
16
|
+
displayMode: PropTypes.Requireable<string>;
|
|
17
|
+
};
|
|
8
18
|
}
|
|
9
|
-
export default
|
|
10
|
-
export {};
|
|
19
|
+
export default Reference;
|
|
11
20
|
//# sourceMappingURL=Reference.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Reference/Reference.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Reference/Reference.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,iBAAwB,SAAS,CAAC,KAAK,KAAA,sBAuCtC;kBAvCuB,SAAS;;;;;;;;;;;;;;;eAAT,SAAS"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
2
3
|
export default function Reference(props) {
|
|
3
|
-
const { visibility
|
|
4
|
+
const { visibility, context, getPConnect, readOnly, displayMode } = props;
|
|
4
5
|
const pConnect = getPConnect();
|
|
5
6
|
const referenceConfig = { ...pConnect.getComponentConfig() } || {};
|
|
6
7
|
delete referenceConfig?.name;
|
|
@@ -31,4 +32,17 @@ export default function Reference(props) {
|
|
|
31
32
|
}
|
|
32
33
|
return null;
|
|
33
34
|
}
|
|
35
|
+
Reference.defaultProps = {
|
|
36
|
+
visibility: true,
|
|
37
|
+
context: null,
|
|
38
|
+
readOnly: false,
|
|
39
|
+
displayMode: null
|
|
40
|
+
};
|
|
41
|
+
Reference.propTypes = {
|
|
42
|
+
getPConnect: PropTypes.func.isRequired,
|
|
43
|
+
visibility: PropTypes.bool,
|
|
44
|
+
context: PropTypes.string,
|
|
45
|
+
readOnly: PropTypes.bool,
|
|
46
|
+
displayMode: PropTypes.string
|
|
47
|
+
};
|
|
34
48
|
//# sourceMappingURL=Reference.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.js","sourceRoot":"","sources":["../../../../src/components/infra/Reference/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Reference.js","sourceRoot":"","sources":["../../../../src/components/infra/Reference/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK;IACrC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAE1E,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,eAAe,GAAG,EAAE,GAAG,QAAQ,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,CAAC;IAEnE,OAAO,eAAe,EAAE,IAAI,CAAC;IAC7B,OAAO,eAAe,EAAE,IAAI,CAAC;IAC7B,OAAO,eAAe,EAAE,UAAU,CAAC;IAEnC,MAAM,YAAY,GAAG,QAAQ,CAAC,iBAAiB,EAAE,CAAC;IAElD,IAAI,CAAC,YAAY,EAAE;QACjB,iEAAiE;QACjE,OAAO,IAAI,CAAC;KACb;IAED,MAAM,UAAU,GAAG;QACjB,GAAG,YAAY;QACf,MAAM,EAAE;YACN,GAAG,YAAY,CAAC,MAAM;YACtB,GAAG,eAAe;SACnB;KACF,CAAC;IAEF,MAAM,aAAa,GAAG,QAAQ,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;QACrE,aAAa,EAAE,OAAO;KACvB,CAAC,CAAC;IAEH,aAAa,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,kBAAkB,CAAC;QACnD,GAAG,eAAe;QAClB,QAAQ;QACR,WAAW;KACZ,CAAC,CAAC;IAEH,IAAI,UAAU,KAAK,KAAK,EAAE;QACxB,OAAO,oBAAC,KAAK,CAAC,QAAQ,QAAE,aAAa,CAAkB,CAAC;KACzD;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,CAAC,YAAY,GAAG;IACvB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,KAAK;IACf,WAAW,EAAE,IAAI;CAClB,CAAC;AAEF,SAAS,CAAC,SAAS,GAAG;IACpB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACtC,UAAU,EAAE,SAAS,CAAC,IAAI;IAC1B,OAAO,EAAE,SAAS,CAAC,MAAM;IACzB,QAAQ,EAAE,SAAS,CAAC,IAAI;IACxB,WAAW,EAAE,SAAS,CAAC,MAAM;CAC9B,CAAC","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nexport default function Reference(props) {\n const { visibility, context, getPConnect, readOnly, displayMode } = props;\n\n const pConnect = getPConnect();\n const referenceConfig = { ...pConnect.getComponentConfig() } || {};\n\n delete referenceConfig?.name;\n delete referenceConfig?.type;\n delete referenceConfig?.visibility;\n\n const viewMetadata = pConnect.getReferencedView();\n\n if (!viewMetadata) {\n // console.log(\"View not found \", pConnect.getComponentConfig());\n return null;\n }\n\n const viewObject = {\n ...viewMetadata,\n config: {\n ...viewMetadata.config,\n ...referenceConfig\n }\n };\n\n const viewComponent = pConnect.createComponent(viewObject, null, null, {\n pageReference: context\n });\n\n viewComponent.props.getPConnect().setInheritedConfig({\n ...referenceConfig,\n readOnly,\n displayMode\n });\n\n if (visibility !== false) {\n return <React.Fragment>{viewComponent}</React.Fragment>;\n }\n return null;\n}\n\nReference.defaultProps = {\n visibility: true,\n context: null,\n readOnly: false,\n displayMode: null\n};\n\nReference.propTypes = {\n getPConnect: PropTypes.func.isRequired,\n visibility: PropTypes.bool,\n context: PropTypes.string,\n readOnly: PropTypes.bool,\n displayMode: PropTypes.string\n};\n"]}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
declare function Region(props: any): JSX.Element;
|
|
4
|
+
declare namespace Region {
|
|
5
|
+
var propTypes: {
|
|
6
|
+
children: PropTypes.Validator<PropTypes.ReactNodeLike[]>;
|
|
7
|
+
};
|
|
4
8
|
}
|
|
5
|
-
export default
|
|
6
|
-
export {};
|
|
9
|
+
export default Region;
|
|
7
10
|
//# sourceMappingURL=Region.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Region.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Region/Region.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Region.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Region/Region.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,iBAAwB,MAAM,CAAC,KAAK,KAAA,eASnC;kBATuB,MAAM;;;;;eAAN,MAAM"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
2
3
|
export default function Region(props) {
|
|
3
4
|
const { children } = props;
|
|
4
5
|
return React.createElement(React.Fragment, null,
|
|
5
6
|
React.createElement(React.Fragment, null, children));
|
|
6
7
|
}
|
|
8
|
+
Region.propTypes = {
|
|
9
|
+
children: PropTypes.arrayOf(PropTypes.node).isRequired
|
|
10
|
+
};
|
|
7
11
|
//# sourceMappingURL=Region.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Region.js","sourceRoot":"","sources":["../../../../src/components/infra/Region/Region.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Region.js","sourceRoot":"","sources":["../../../../src/components/infra/Region/Region.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK;IAClC,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE3B,OAAO,oBAAC,KAAK,CAAC,QAAQ;QACpB,0CAEG,QAAQ,CACR,CACY,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,SAAS,GAAG;IACjB,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,UAAU;CACvD,CAAC","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nexport default function Region(props) {\n const { children } = props;\n\n return <React.Fragment>\n <>\n {/* <div>Region</div> */}\n {children}\n </>\n </React.Fragment>;\n}\n\nRegion.propTypes = {\n children: PropTypes.arrayOf(PropTypes.node).isRequired\n};\n"]}
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
declare const RootContainer: {
|
|
3
|
+
(props: any): any;
|
|
4
|
+
defaultProps: {
|
|
5
|
+
getPConnect: null;
|
|
6
|
+
renderingMode: null;
|
|
7
|
+
children: null;
|
|
8
|
+
routingInfo: PropTypes.Requireable<object>;
|
|
9
|
+
};
|
|
10
|
+
propTypes: {
|
|
11
|
+
getPConnect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
12
|
+
renderingMode: PropTypes.Requireable<string>;
|
|
13
|
+
routingInfo: PropTypes.Requireable<PropTypes.InferProps<{
|
|
14
|
+
type: PropTypes.Requireable<string>;
|
|
15
|
+
accessedOrder: PropTypes.Requireable<any[]>;
|
|
16
|
+
items: PropTypes.Requireable<object>;
|
|
17
|
+
}>>;
|
|
18
|
+
children: PropTypes.Requireable<(NonNullable<string | object | null | undefined> | null | undefined)[]>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default RootContainer;
|
|
2
22
|
//# sourceMappingURL=RootContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/RootContainer/RootContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RootContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/RootContainer/RootContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,SAAqB,MAAM,YAAY,CAAC;AAgD/C,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;CAuNlB,CAAC;AAoBF,eAAe,aAAa,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useMemo, useRef, useState, useEffect, useContext, createElement } from "react";
|
|
2
2
|
// import { Banner, ModalManager } from "@pega/cosmos-react-core";
|
|
3
|
+
import PropTypes, { object } from "prop-types";
|
|
3
4
|
import isEqual from 'lodash.isequal';
|
|
4
5
|
// import ReAuthMessageModal from "../ReAuthenticationModal";
|
|
5
6
|
import { Box, CircularProgress } from "@material-ui/core";
|
|
@@ -35,8 +36,8 @@ function getItemView(routingInfo, renderingMode) {
|
|
|
35
36
|
}
|
|
36
37
|
return viewConfigs;
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
const { getPConnect, renderingMode
|
|
39
|
+
const RootContainer = (props) => {
|
|
40
|
+
const { getPConnect, renderingMode, children, skeleton, httpMessages, routingInfo } = props;
|
|
40
41
|
const { displayOnlyFA } = useContext(StoreContext);
|
|
41
42
|
const pConn = getPConnect();
|
|
42
43
|
const options = { "context": "app" };
|
|
@@ -183,6 +184,22 @@ export default function RootContainer(props /* : RootContainerProps */) {
|
|
|
183
184
|
return (React.createElement("div", { id: "root-container" },
|
|
184
185
|
React.createElement("div", null, localizedVal('RootContainer: Should be ModalManager, etc.', localeCategory))));
|
|
185
186
|
}
|
|
186
|
-
}
|
|
187
|
-
|
|
187
|
+
};
|
|
188
|
+
RootContainer.defaultProps = {
|
|
189
|
+
getPConnect: null,
|
|
190
|
+
renderingMode: null,
|
|
191
|
+
children: null,
|
|
192
|
+
routingInfo: object
|
|
193
|
+
};
|
|
194
|
+
RootContainer.propTypes = {
|
|
195
|
+
getPConnect: PropTypes.func,
|
|
196
|
+
renderingMode: PropTypes.string,
|
|
197
|
+
routingInfo: PropTypes.shape({
|
|
198
|
+
type: PropTypes.string,
|
|
199
|
+
accessedOrder: PropTypes.array,
|
|
200
|
+
items: PropTypes.object
|
|
201
|
+
}),
|
|
202
|
+
children: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.object, PropTypes.string]))
|
|
203
|
+
};
|
|
204
|
+
export default RootContainer;
|
|
188
205
|
//# sourceMappingURL=RootContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RootContainer.js","sourceRoot":"","sources":["../../../../src/components/infra/RootContainer/RootContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC/F,kEAAkE;AAClE,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,6DAA6D;AAC7D,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,YAAY,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,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AAgB,OAAG,CAAM,CAC9C,CACP,CAAC;KACH;SAAM;QACL,OAAO,CACL,6BAAK,EAAE,EAAC,gBAAgB;YACtB,iCAAM,YAAY,CAAC,6CAA6C,EAAE,cAAc,CAAC,CAAO,CACpF,CACP,CAAC;KACH;AACH,CAAC;AAAA,CAAC","sourcesContent":["import React, { useMemo, useRef, useState, useEffect, useContext, createElement } from \"react\";\n// import { Banner, ModalManager } from \"@pega/cosmos-react-core\";\nimport isEqual from 'lodash.isequal';\n// import ReAuthMessageModal from \"../ReAuthenticationModal\";\nimport { Box, CircularProgress } from \"@material-ui/core\";\nimport createPConnectComponent from \"../../../bridge/react_pconnect\";\nimport { LazyMap as LazyComponentMap } from \"../../../components_map\";\nimport StoreContext from \"../../../bridge/Context/StoreContext\";\nimport { isEmptyObject } from '../../helpers/common-utils';\n\n// import type { PConnProps } from '../../../types/PConnProps';\n\n// Can't use RootContainerProps until getChildren() typedef is fixes to not return an array of 'never'\n// interface RootContainerProps extends PConnProps {\n// // If any, enter additional props that only exist on this component\n// renderingMode?: string,\n// routingInfo: { type: string, accessedOrder: Array<any>, items: any },\n// children: Array<any>,\n// skeleton: any,\n// httpMessages: Array<any>\n// }\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 1 error)\ndeclare const PCore: any;\n\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\nconst renderingModes = [\"portal\", \"view\"];\n\nfunction usePrevious(value) {\n const ref = useRef(null);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\nfunction getItemView(routingInfo, renderingMode) {\n const viewConfigs: any = [];\n if (routingInfo && renderingModes.includes(renderingMode)) {\n const { accessedOrder, items }: {accessedOrder: any, items:any } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n if (\n items[key] &&\n items[key].view &&\n !isEmptyObject(items[key].view)\n ) {\n viewConfigs.push(items[key]);\n }\n }\n }\n return viewConfigs;\n}\n\nexport default function RootContainer(props /* : RootContainerProps */) {\n const {\n getPConnect,\n renderingMode = '',\n children = [],\n skeleton,\n httpMessages = [],\n routingInfo\n } = props;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n\n const pConn = getPConnect();\n\n const options = { \"context\": \"app\" };\n\n const [componentName, setComponentName] = useState(\"\");\n\n useEffect( () => {\n // debugging/investigation help\n // console.log(`componentName change: ${componentName} triggering a re-render`);\n }, [componentName] );\n\n // debugging/investigation help\n // console.log(`RootContainer props.routingInfo: ${JSON.stringify(routingInfo)}`);\n\n let hasBanner = false;\n let banners: any = null;\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Messages';\n\n const messages = httpMessages\n ? httpMessages.map((msg) => localizedVal(msg.message, localeCategory))\n : httpMessages;\n\n hasBanner = messages && messages.length > 0;\n banners = hasBanner && (<div>{localizedVal(`RootContainer: trying to emit Banner with ${messages}`, localeCategory)}</div>);\n\n const MemoizedModalViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: \"ModalViewContainer\",\n config: {\n name: \"modal\"\n }\n },\n options\n })\n );\n }, []);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const MemoizedPreviewViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: \"PreviewViewContainer\",\n config: {\n name: \"preview\"\n }\n },\n options\n })\n );\n }, []);\n\n\n //\n function getNoPortalContent() {\n let noPortalContent: any;\n\n switch (componentName) {\n case \"View\":\n noPortalContent = <div>{localizedVal('getNoPortalContent: RootContainer wants to render View in noPortal mode', localeCategory)}</div>\n break;\n\n case \"ViewContainer\": {\n const configProps = pConn.getConfigProps();\n const viewContConfig = {\n \"meta\": {\n \"type\": \"ViewContainer\",\n \"config\": configProps\n },\n options\n };\n const theViewCont = PCore.createPConnect(viewContConfig);\n // Add in displayOnlyFA if prop is on RootContainer\n if (displayOnlyFA) {\n theViewCont[\"displayOnlyFA\"] = true;\n }\n\n const theViewContainerAsReact = createElement(createPConnectComponent(), theViewCont);\n\n noPortalContent = theViewContainerAsReact;\n break;\n }\n\n default:\n noPortalContent = <div>{localizedVal('getNoPortalContent: RootContainer wants to render NO componentName in noPortal mode', localeCategory)}</div>\n break;\n\n }\n\n return noPortalContent;\n }\n\n\n let rootView : any;\n let rootViewConfig: any = null;\n\n useEffect(() => {\n const { containers } = PCore.getStore().getState();\n const items = Object.keys(containers).filter((item) =>\n item.includes(\"root\")\n );\n PCore.getContainerUtils().getContainerAPI().addContainerItems(items);\n }, [routingInfo]);\n\n const items: any = getItemView(routingInfo, renderingMode);\n\n if (items.length > 0) {\n rootViewConfig = {\n meta: items[0].view,\n options: {\n context: items[0].context\n }\n };\n }\n const prevRootConfig = usePrevious(rootViewConfig);\n\n if (\n renderingModes.includes(renderingMode) &&\n messages &&\n routingInfo &&\n routingInfo?.accessedOrder.length === 0\n ) {\n return <div id=\"root-container\">{banners}</div>;\n }\n\n if (items.length > 0) {\n const itemView = items[0].view;\n const currentRootConfig = {\n meta: itemView,\n options: {\n context: items[0].context\n }\n };\n\n if (!isEqual(currentRootConfig, prevRootConfig)) {\n rootView = createElement(\n createPConnectComponent(),\n PCore.createPConnect(currentRootConfig)\n );\n }\n\n // debugging/investigation help\n // console.log(`rootView.props.getPConnect().getComponentName(): ${rootView.props.getPConnect().getComponentName()}`);\n\n return (\n <div id=\"ModalManager\">\n {rootView}\n {MemoizedModalViewContainer}\n <div id=\"MemoizedPreviewViewContainer\"></div>\n <div id=\"ReAuthMessageModal\"></div>\n </div>\n );\n\n }\n else if (renderingMode === \"noPortal\") {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('RootContainer rendering in noPortal mode', localeCategory)}`);\n\n const theChildren = pConn.getChildren();\n if (theChildren && (theChildren.length === 1)) {\n const localPConn = theChildren[0].getPConnect();\n const localCompName = localPConn.getComponentName()\n if (componentName !== localCompName) {\n setComponentName(localCompName);\n }\n }\n\n const noPortalContent = getNoPortalContent();\n\n return noPortalContent;\n }\n else if (children && children.length > 0) {\n return (\n <React.Fragment>\n <div>{localizedVal('RootContainer: Has children. Trying to show ModalManager with children, etc.', localeCategory)}</div>\n {children}\n {MemoizedModalViewContainer}\n </React.Fragment>\n\n );\n } else if (skeleton) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const LoadingComponent = LazyComponentMap[skeleton];\n\n return (\n <div id=\"root-container\">\n {/* <div>RootContainer: Trying to show skeleton</div> */}\n <Box textAlign=\"center\"><CircularProgress /></Box>\n </div>\n );\n } else {\n return (\n <div id=\"root-container\">\n <div>{localizedVal('RootContainer: Should be ModalManager, etc.', localeCategory)}</div>\n </div>\n );\n }\n};\n"]}
|
|
1
|
+
{"version":3,"file":"RootContainer.js","sourceRoot":"","sources":["../../../../src/components/infra/RootContainer/RootContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC/F,kEAAkE;AAClE,OAAO,SAAS,EAAE,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,6DAA6D;AAC7D,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,YAAY,MAAM,sCAAsC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAM3D,EAAE;AACF,qHAAqH;AACrH,uHAAuH;AACvH,+BAA+B;AAC/B,EAAE;AAGF,MAAM,cAAc,GAAG,CAAC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AACH,CAAC,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG;IAC3B,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,MAAM;CACpB,CAAC;AAEF,aAAa,CAAC,SAAS,GAAG;IACxB,WAAW,EAAE,SAAS,CAAC,IAAI;IAC3B,aAAa,EAAE,SAAS,CAAC,MAAM;IAC/B,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC;QAC3B,IAAI,EAAE,SAAS,CAAC,MAAM;QACtB,aAAa,EAAE,SAAS,CAAC,KAAK;QAC9B,KAAK,EAAE,SAAS,CAAC,MAAM;KACxB,CAAC;IACF,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAE,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAE,CAAC,CAAC;CACzF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import React, { useMemo, useRef, useState, useEffect, useContext, createElement } from \"react\";\n// import { Banner, ModalManager } from \"@pega/cosmos-react-core\";\nimport PropTypes, { object } from \"prop-types\";\nimport isEqual from 'lodash.isequal';\n// import ReAuthMessageModal from \"../ReAuthenticationModal\";\nimport { Box, CircularProgress } from \"@material-ui/core\";\nimport createPConnectComponent from \"../../../bridge/react_pconnect\";\nimport { LazyMap as LazyComponentMap } from \"../../../components_map\";\nimport StoreContext from \"../../../bridge/Context/StoreContext\";\nimport { isEmptyObject } from '../../helpers/common-utils';\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 1 error)\ndeclare const PCore: any;\n\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\nconst renderingModes = [\"portal\", \"view\"];\n\nfunction usePrevious(value) {\n const ref = useRef(null);\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n\nfunction getItemView(routingInfo, renderingMode) {\n const viewConfigs: any = [];\n if (routingInfo && renderingModes.includes(renderingMode)) {\n const { accessedOrder, items }: {accessedOrder: any, items:any } = routingInfo;\n if (accessedOrder && items) {\n const key = accessedOrder[accessedOrder.length - 1];\n if (\n items[key] &&\n items[key].view &&\n !isEmptyObject(items[key].view)\n ) {\n viewConfigs.push(items[key]);\n }\n }\n }\n return viewConfigs;\n}\n\nconst RootContainer = (props) => {\n const {\n getPConnect,\n renderingMode,\n children,\n skeleton,\n httpMessages,\n routingInfo\n } = props;\n\n const { displayOnlyFA } = useContext<any>(StoreContext);\n\n\n const pConn = getPConnect();\n\n const options = { \"context\": \"app\" };\n\n const [componentName, setComponentName] = useState(\"\");\n\n useEffect( () => {\n // debugging/investigation help\n // console.log(`componentName change: ${componentName} triggering a re-render`);\n }, [componentName] );\n\n // debugging/investigation help\n // console.log(`RootContainer props.routingInfo: ${JSON.stringify(routingInfo)}`);\n\n let hasBanner = false;\n let banners: any = null;\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Messages';\n\n const messages = httpMessages\n ? httpMessages.map((msg) => localizedVal(msg.message, localeCategory))\n : httpMessages;\n\n hasBanner = messages && messages.length > 0;\n banners = hasBanner && (<div>{localizedVal(`RootContainer: trying to emit Banner with ${messages}`, localeCategory)}</div>);\n\n const MemoizedModalViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: \"ModalViewContainer\",\n config: {\n name: \"modal\"\n }\n },\n options\n })\n );\n }, []);\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const MemoizedPreviewViewContainer = useMemo(() => {\n return createElement(\n createPConnectComponent(),\n PCore.createPConnect({\n meta: {\n type: \"PreviewViewContainer\",\n config: {\n name: \"preview\"\n }\n },\n options\n })\n );\n }, []);\n\n\n //\n function getNoPortalContent() {\n let noPortalContent: any;\n\n switch (componentName) {\n case \"View\":\n noPortalContent = <div>{localizedVal('getNoPortalContent: RootContainer wants to render View in noPortal mode', localeCategory)}</div>\n break;\n\n case \"ViewContainer\": {\n const configProps = pConn.getConfigProps();\n const viewContConfig = {\n \"meta\": {\n \"type\": \"ViewContainer\",\n \"config\": configProps\n },\n options\n };\n const theViewCont = PCore.createPConnect(viewContConfig);\n // Add in displayOnlyFA if prop is on RootContainer\n if (displayOnlyFA) {\n theViewCont[\"displayOnlyFA\"] = true;\n }\n\n const theViewContainerAsReact = createElement(createPConnectComponent(), theViewCont);\n\n noPortalContent = theViewContainerAsReact;\n break;\n }\n\n default:\n noPortalContent = <div>{localizedVal('getNoPortalContent: RootContainer wants to render NO componentName in noPortal mode', localeCategory)}</div>\n break;\n\n }\n\n return noPortalContent;\n }\n\n\n let rootView : any;\n let rootViewConfig: any = null;\n\n useEffect(() => {\n const { containers } = PCore.getStore().getState();\n const items = Object.keys(containers).filter((item) =>\n item.includes(\"root\")\n );\n PCore.getContainerUtils().getContainerAPI().addContainerItems(items);\n }, [routingInfo]);\n\n const items: any = getItemView(routingInfo, renderingMode);\n\n if (items.length > 0) {\n rootViewConfig = {\n meta: items[0].view,\n options: {\n context: items[0].context\n }\n };\n }\n const prevRootConfig = usePrevious(rootViewConfig);\n\n if (\n renderingModes.includes(renderingMode) &&\n messages &&\n routingInfo &&\n routingInfo?.accessedOrder.length === 0\n ) {\n return <div id=\"root-container\">{banners}</div>;\n }\n\n if (items.length > 0) {\n const itemView = items[0].view;\n const currentRootConfig = {\n meta: itemView,\n options: {\n context: items[0].context\n }\n };\n\n if (!isEqual(currentRootConfig, prevRootConfig)) {\n rootView = createElement(\n createPConnectComponent(),\n PCore.createPConnect(currentRootConfig)\n );\n }\n\n // debugging/investigation help\n // console.log(`rootView.props.getPConnect().getComponentName(): ${rootView.props.getPConnect().getComponentName()}`);\n\n return (\n <div id=\"ModalManager\">\n {rootView}\n {MemoizedModalViewContainer}\n <div id=\"MemoizedPreviewViewContainer\"></div>\n <div id=\"ReAuthMessageModal\"></div>\n </div>\n );\n\n }\n else if (renderingMode === \"noPortal\") {\n // eslint-disable-next-line no-console\n console.log(`${localizedVal('RootContainer rendering in noPortal mode', localeCategory)}`);\n\n const theChildren = pConn.getChildren();\n if (theChildren && (theChildren.length === 1)) {\n const localPConn = theChildren[0].getPConnect();\n const localCompName = localPConn.getComponentName()\n if (componentName !== localCompName) {\n setComponentName(localCompName);\n }\n }\n\n const noPortalContent = getNoPortalContent();\n\n return noPortalContent;\n }\n else if (children && children.length > 0) {\n return (\n <React.Fragment>\n <div>{localizedVal('RootContainer: Has children. Trying to show ModalManager with children, etc.', localeCategory)}</div>\n {children}\n {MemoizedModalViewContainer}\n </React.Fragment>\n\n );\n } else if (skeleton) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\n const LoadingComponent = LazyComponentMap[skeleton];\n\n return (\n <div id=\"root-container\">\n {/* <div>RootContainer: Trying to show skeleton</div> */}\n <Box textAlign=\"center\"><CircularProgress /></Box>\n </div>\n );\n } else {\n return (\n <div id=\"root-container\">\n <div>{localizedVal('RootContainer: Should be ModalManager, etc.', localeCategory)}</div>\n </div>\n );\n }\n};\n\nRootContainer.defaultProps = {\n getPConnect: null,\n renderingMode: null,\n children: null,\n routingInfo: object\n};\n\nRootContainer.propTypes = {\n getPConnect: PropTypes.func,\n renderingMode: PropTypes.string,\n routingInfo: PropTypes.shape({\n type: PropTypes.string,\n accessedOrder: PropTypes.array,\n items: PropTypes.object\n }),\n children: PropTypes.arrayOf(PropTypes.oneOfType( [PropTypes.object, PropTypes.string ]))\n};\n\nexport default RootContainer;\n"]}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
declare function Stages(props: any): JSX.Element;
|
|
4
|
+
declare namespace Stages {
|
|
5
|
+
var propTypes: {
|
|
6
|
+
getPConnect: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
|
+
stages: PropTypes.Validator<(object | null | undefined)[]>;
|
|
8
|
+
};
|
|
5
9
|
}
|
|
6
|
-
export default
|
|
7
|
-
export {};
|
|
10
|
+
export default Stages;
|
|
8
11
|
//# sourceMappingURL=Stages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stages.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Stages.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AA0DnC,iBAAwB,MAAM,CAAC,KAAK,KAAA,eA0DnC;kBA1DuB,MAAM;;;;;;eAAN,MAAM"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
2
3
|
import { Breadcrumbs, Card, Typography } from "@material-ui/core";
|
|
3
4
|
import DoubleArrowIcon from '@material-ui/icons/DoubleArrow';
|
|
4
5
|
import DoneIcon from '@material-ui/icons/Done';
|
|
@@ -49,7 +50,7 @@ export default function Stages(props) {
|
|
|
49
50
|
const pConn = getPConnect();
|
|
50
51
|
const key = `${pConn.getCaseInfo().getClassName()}!CASE!${pConn.getCaseInfo().getName()}`.toUpperCase();
|
|
51
52
|
const filteredStages = getFilteredStages(stages);
|
|
52
|
-
const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID
|
|
53
|
+
const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID);
|
|
53
54
|
const stagesObj = filteredStages.map((stage, index, arr) => {
|
|
54
55
|
const theID = stage.ID || stage.id;
|
|
55
56
|
return {
|
|
@@ -86,4 +87,8 @@ export default function Stages(props) {
|
|
|
86
87
|
}
|
|
87
88
|
return (React.createElement(Card, { id: "Stages", className: classes.root }, getStages(stagesObj)));
|
|
88
89
|
}
|
|
90
|
+
Stages.propTypes = {
|
|
91
|
+
getPConnect: PropTypes.func.isRequired,
|
|
92
|
+
stages: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
93
|
+
};
|
|
89
94
|
//# sourceMappingURL=Stages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stages.js","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,eAAe,MAAM,gCAAgC,CAAC;AAC7D,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Stages.js","sourceRoot":"","sources":["../../../../src/components/infra/Stages/Stages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,eAAe,MAAM,gCAAgC,CAAC;AAC7D,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAMtD,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7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;YACvE,oBAAC,UAAU,IAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,EAAC,SAAS,EAAE,QAAQ,IAAG,KAAK,CAAC,IAAI,CAAc,CACpG,CAAC;IACZ,CAAC;IAED,SAAS,SAAS,CAAC,QAAQ;QACzB,OAAO,oBAAC,WAAW,kBAAY,QAAQ,EAAC,SAAS,EAAE,oBAAC,eAAe,IAAC,SAAS,EAAE,OAAO,CAAC,aAAa,GAAI,IACrG,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC7B,OAAO,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC,CACU,CAAA;IAChB,CAAC;IAED,OAAO,CACL,oBAAC,IAAI,IAAC,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,IAItC,SAAS,CAAC,SAAS,CAAC,CAChB,CACR,CAAA;AACH,CAAC;AAED,MAAM,CAAC,SAAS,GAAG;IACjB,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU;IACtC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,UAAU;CACvD,CAAC","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Breadcrumbs, Card, Typography } from \"@material-ui/core\";\nimport DoubleArrowIcon from '@material-ui/icons/DoubleArrow';\nimport DoneIcon from '@material-ui/icons/Done';\nimport { makeStyles } from '@material-ui/core/styles';\n\n// Remove this and use \"real\" PCore type once .d.ts is fixed (currently shows 1 error)\ndeclare const PCore: any;\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n },\n completedStage: {\n color: theme.palette.text.primary,\n },\n currentStage: {\n color: theme.palette.info.dark,\n fontWeight: 600,\n },\n futureStage: {\n color: theme.palette.text.secondary,\n },\n separatorIcon: {\n color: theme.palette.text.disabled,\n }\n\n}));\n\n\n/**\n * API to filter out the alternate stages which are not in active and return all other stages\n * @param {Array} stages - Stages of a case type\n *\n * @returns {Array} - Returns stages which are non alternate stages and alternate stage which is active.\n */\nfunction getFilteredStages(stages) {\n if (!Array.isArray(stages)) {\n return [];\n }\n\n return stages.filter(\n (stage) =>\n stage.type !== \"Alternate\" ||\n (stage.type === \"Alternate\" && stage.visited_status === \"active\")\n );\n}\n\n/* TODO - this component should be refactored and not exposed as top level DX Component -\n the stages should be created as part of the CaseView */\nexport default function Stages(props) {\n const classes = useStyles();\n\n const { getPConnect, stages } = props;\n const pConn = getPConnect();\n const key = `${pConn.getCaseInfo().getClassName()}!CASE!${pConn.getCaseInfo().getName()}`.toUpperCase();\n\n\n const filteredStages = getFilteredStages(stages);\n const currentStageID = pConn.getValue(PCore.getConstants().CASE_INFO.STAGEID);\n const stagesObj = filteredStages.map((stage, index, arr) => {\n const theID = stage.ID || stage.id;\n return {\n name: PCore.getLocaleUtils().getLocaleValue(stage.name, null, key),\n id: theID,\n complete: stage.visited_status === \"completed\",\n current: (theID === currentStageID),\n last: (index === arr.length - 1),\n };\n });\n\n // debugging/investigation help\n // console.log(`Stages: current: ${currentStageID} stagesObj: ${JSON.stringify(stagesObj)}`);\n\n function getStage(stage, index) {\n // Removing nested ternary for lint\n // const theClass = stage.current ? classes.currentStage : (stage.complete ? classes.completedStage : classes.futureStage);\n let theClass;\n if (stage.current) {\n theClass = classes.currentStage;\n } else if (stage.complete) {\n theClass = classes.completedStage;\n } else {\n theClass = classes.futureStage;\n }\n\n return <span key={index}>\n {stage.complete ? <DoneIcon color=\"disabled\" fontSize=\"small\" /> : null}\n <Typography variant=\"h5\" component=\"span\" display=\"inline\" className={theClass}>{stage.name}</Typography>\n </span>;\n }\n\n function getStages(inStages) {\n return <Breadcrumbs aria-label=\"stages\" separator={<DoubleArrowIcon className={classes.separatorIcon} />}>\n {inStages.map((stage, index) => {\n return getStage(stage, index);\n })}\n </Breadcrumbs>\n }\n\n return (\n <Card id=\"Stages\" className={classes.root}>\n {/* Stages<br />\n currentStageID: {currentStageID}<br />\n {JSON.stringify(stagesObj)}<br /><br /> */}\n {getStages(stagesObj)}\n </Card>\n )\n}\n\nStages.propTypes = {\n getPConnect: PropTypes.func.isRequired,\n stages: PropTypes.arrayOf(PropTypes.object).isRequired\n};\n"]}
|
package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeftAlignVerticalTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LeftAlignVerticalTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,qBAAqB,EAAE,GAS2B,CAAC;AAEzD,eAAe,qBAAqB,CAAC"}
|
package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeftAlignVerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EACL,GAAG,EACH,OAAO,GACR,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"LeftAlignVerticalTabs.js","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EACL,GAAG,EACH,OAAO,GACR,MAAM,mBAAmB,CAAC;AAE3B,uEAAuE;AACvE,qDAAqD;AAErD,0EAA0E;AAC1E,gIAAgI;AAEhI,8EAA8E;AAC9E,iEAAiE;AACjE,MAAM,qBAAqB,GAAQ,UAAU,CAAC,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC9D,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,MAAM;KACjB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,MAAM;KAClB;CACF,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;IAAK,oBAAC,GAAG,OAAK,KAAK,GAAI;IAAA,oBAAC,OAAO,OAAG,CAAM,CAAC,CAAC;AAEzD,eAAe,qBAAqB,CAAC","sourcesContent":["import React from \"react\";\nimport { withStyles } from '@material-ui/core/styles'\nimport {\n Tab,\n Divider,\n} from '@material-ui/core';\n\n// LeftAlignVerticalTab is a specialized Tab that has styles to make it\n// left aligned and full width of the container Tabs\n\n// Aligning the Tab labels left (with & .<class name> syntax) inspired by:\n// https://stackoverflow.com/questions/63307723/how-to-modify-the-wrapper-css-rule-of-a-tabs-component-to-make-the-text-aligned\n\n// In this styling, \"root\" is the top-level \"Tab\" object (which is the button)\n// and the button contains spans that will match on the '> span'\nconst LeftAlignVerticalTabs: any = withStyles((/* theme */) => ({\n root: {\n width: '100%',\n maxWidth: '100%',\n },\n wrapper: {\n display: 'block',\n textAlign: 'left',\n },\n}))((props) => <div><Tab {...props} /><Divider /></div>);\n\nexport default LeftAlignVerticalTabs;\n"]}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
declare function VerticalTabs(props: any): JSX.Element;
|
|
4
|
+
declare namespace VerticalTabs {
|
|
5
|
+
var defaultProps: {
|
|
6
|
+
tabconfig: never[];
|
|
7
|
+
};
|
|
8
|
+
var propTypes: {
|
|
9
|
+
tabconfig: PropTypes.Requireable<(object | null | undefined)[]>;
|
|
10
|
+
};
|
|
4
11
|
}
|
|
5
|
-
export default
|
|
6
|
-
export {};
|
|
12
|
+
export default VerticalTabs;
|
|
7
13
|
//# sourceMappingURL=VerticalTabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerticalTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"VerticalTabs.d.ts","sourceRoot":"","sources":["../../../../../src/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAgCnC,iBAAwB,YAAY,CAAC,KAAK,KAAA,eAiCzC;kBAjCuB,YAAY;;;;;;;;eAAZ,YAAY"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect } from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
2
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
3
4
|
import Tabs from '@material-ui/core/Tabs';
|
|
4
|
-
import
|
|
5
|
+
import LeftAlignVerticalTab from '../LeftAlignVerticalTabs';
|
|
5
6
|
// The MuiTabs-indicator class is in a span whose parent is div (under the Tabs root component)
|
|
6
7
|
// So, we're going to make the selected vertical tab indicator use a color from our theme.
|
|
7
8
|
const useStyles = makeStyles((theme) => ({
|
|
@@ -23,10 +24,8 @@ const createCustomEvent = (eventName, additionalData) => {
|
|
|
23
24
|
return null;
|
|
24
25
|
};
|
|
25
26
|
export default function VerticalTabs(props) {
|
|
26
|
-
// Get emitted components from map (so we can get any override that may exist)
|
|
27
|
-
const LeftAlignVerticalTab = getComponentFromMap("LeftAlignVerticalTabs");
|
|
28
27
|
// Get a React warning when we use tabConfig as mixed case. So all lowercase tabconfig
|
|
29
|
-
const { tabconfig
|
|
28
|
+
const { tabconfig } = props;
|
|
30
29
|
const classes = useStyles();
|
|
31
30
|
const [value, setValue] = useState(0);
|
|
32
31
|
useEffect(() => {
|
|
@@ -42,4 +41,10 @@ export default function VerticalTabs(props) {
|
|
|
42
41
|
return (React.createElement("div", { id: "VerticalTabs" },
|
|
43
42
|
React.createElement(Tabs, { className: classes.tabs, orientation: "vertical", value: value, onChange: handleChange }, tabconfig.map((tab) => React.createElement(LeftAlignVerticalTab, { ...props, label: tab.name, key: tab.name })))));
|
|
44
43
|
}
|
|
44
|
+
VerticalTabs.defaultProps = {
|
|
45
|
+
tabconfig: []
|
|
46
|
+
};
|
|
47
|
+
VerticalTabs.propTypes = {
|
|
48
|
+
tabconfig: PropTypes.arrayOf(PropTypes.object)
|
|
49
|
+
};
|
|
45
50
|
//# sourceMappingURL=VerticalTabs.js.map
|