@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,11 +1,11 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
"DateTime-Long": (value: any, options: any) =>
|
|
3
|
-
"DateTime-Short": (value: any, options: any) =>
|
|
4
|
-
"DateTime-Since": (value: any) =>
|
|
2
|
+
"DateTime-Long": (value: any, options: any) => any;
|
|
3
|
+
"DateTime-Short": (value: any, options: any) => any;
|
|
4
|
+
"DateTime-Since": (value: any) => any;
|
|
5
5
|
"Time-Only": (value: any, options: any) => any;
|
|
6
6
|
convertToTimezone: (value: any, options: any) => any;
|
|
7
7
|
convertFromTimezone: (value: any, timezone: any) => any;
|
|
8
|
-
Date: (value: any, options: any) =>
|
|
8
|
+
Date: (value: any, options: any) => any;
|
|
9
9
|
};
|
|
10
10
|
export default _default;
|
|
11
11
|
//# sourceMappingURL=Date.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Date.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/Date.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,GAAG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AG,OAAO,EAAE,CAAC;CAC7D,CAAC","sourcesContent":["import dayjs from \"dayjs\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat\";\nimport utc from \"dayjs/plugin/utc\";\nimport tzone from \"dayjs/plugin/timezone\";\n\ndayjs.extend(relativeTime);\ndayjs.extend(localizedFormat);\ndayjs.extend(utc);\ndayjs.extend(tzone);\n\nconst types = [\"fromNow\", \"customFormat\"];\n\n// value should be in ISO 8601 format.\nfunction DateFormatter(\n value,\n { type = types[1], format = \"DD/MM/YYYY\", timezone = \"America/New_York\" } = {}\n) {\n if (!value) return value;\n switch (type) {\n case types[1]:\n if (timezone) return dayjs(value).tz(timezone).format(format);\n return dayjs(value).format(format);\n case types[0]:\n return dayjs(value).from(dayjs());\n default:\n return value;\n }\n}\n// value should be in hh:mm:ss format (00:00:00 - 23:59:59).\nfunction TimeFormatter(value, options) {\n if (!value) return value;\n const { locale = \"en-US\" } = options;\n const timeOnlyRegex = /^(?:[01]\\d|2[0123]):(?:[012345]\\d):(?:[012345]\\d)$/;\n if (value.length === 8 && timeOnlyRegex.test(value)) {\n const tempDate = new Date();\n const hours = parseInt(value.substr(0, 2), 10);\n const minutes = parseInt(value.substr(3, 2), 10);\n const seconds = parseInt(value.substr(6, 2), 10);\n tempDate.setHours(hours);\n tempDate.setMinutes(minutes);\n tempDate.setSeconds(seconds);\n return tempDate.toLocaleTimeString(locale);\n }\n return DateFormatter(value, options);\n}\n\nexport default {\n \"DateTime-Long\": (value, options) =>\n DateFormatter(value, { ...options, type: \"customFormat\", format: \"LLL\" }),\n \"DateTime-Short\": (value, options) =>\n DateFormatter(value, {\n ...options,\n type: \"customFormat\",\n format: \"MMM DD, YYYY\"\n }),\n \"DateTime-Since\": (value) => DateFormatter(value, { type: \"fromNow\" }),\n \"Time-Only\": (value, options) =>\n TimeFormatter(value, {\n ...options,\n type: \"customFormat\",\n format: \"hh:mm:ss A\"\n }),\n convertToTimezone: (value, options) => {\n return value && options && options.timezone\n ? DateFormatter(value, {\n ...options,\n type: \"customFormat\",\n format: \"YYYY-MM-DDTHH:mm:ss\"\n })\n : value;\n },\n convertFromTimezone: (value, timezone) =>\n value && timezone ? dayjs.tz(value, timezone).utc().format() : value,\n Date: (value, options) =>\n DateFormatter(value, { type: \"customFormat\", ...options })\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/common.ts"],"names":[],"mappings":"AAKA,wBAAgB,SAAS,CAAC,MAAM,SAAG,OAOlC;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,SAAmB,UAG7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/common.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,SAAS,CAAC,MAAM,GAAC,EAAE;IACjC,0BAA0B;IAC1B,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,iDAAiD;IACjD,IAAI,KAAK,CAAC,kBAAkB,EAAE,CAAC,SAAS,EAAE;QAAE,OAAO,KAAK,CAAC,kBAAkB,EAAE,CAAC,SAAS,EAAE,CAAC;IAC1F,WAAW;IACX,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAAQ,GAAC,kBAAkB;IAC5D,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,CAAC,gBAAgB,EAAE,EAAE,CAAC;AACxD,CAAC","sourcesContent":["import PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nexport function getLocale(locale='') {\n // use locale if specified\n if (locale) return locale;\n // otherwise, use operator locale if it's defined\n if (PCore.getEnvironmentInfo().getLocale()) return PCore.getEnvironmentInfo().getLocale();\n // fallback\n return Intl.DateTimeFormat().resolvedOptions().locale;\n}\n\nexport function getCurrentTimezone(timezone=\"America/New_York\") {\n if (timezone) return timezone;\n return PCore?.getLocaleUtils?.().getTimeZoneInUse?.();\n}\n"]}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
"DateTime-Long": (value: any, options: any) =>
|
|
3
|
-
"DateTime-Short": (value: any, options: any) =>
|
|
4
|
-
"DateTime-Since": (value: any) =>
|
|
2
|
+
"DateTime-Long": (value: any, options: any) => any;
|
|
3
|
+
"DateTime-Short": (value: any, options: any) => any;
|
|
4
|
+
"DateTime-Since": (value: any) => any;
|
|
5
5
|
"Time-Only": (value: any, options: any) => any;
|
|
6
6
|
convertToTimezone: (value: any, options: any) => any;
|
|
7
7
|
convertFromTimezone: (value: any, timezone: any) => any;
|
|
8
|
-
Date: (value: any, options: any) =>
|
|
9
|
-
Currency: (value: any, options: any) =>
|
|
10
|
-
"Currency-Code": (value: any, options: any) =>
|
|
11
|
-
Decimal: (value: any, options: any) =>
|
|
12
|
-
"Decimal-Auto": (value: any, options: any) =>
|
|
13
|
-
Integer: (value: any, options: any) =>
|
|
14
|
-
Percentage: (value: any, options: any) =>
|
|
8
|
+
Date: (value: any, options: any) => any;
|
|
9
|
+
Currency: (value: any, options: any) => any;
|
|
10
|
+
"Currency-Code": (value: any, options: any) => any;
|
|
11
|
+
Decimal: (value: any, options: any) => any;
|
|
12
|
+
"Decimal-Auto": (value: any, options: any) => any;
|
|
13
|
+
Integer: (value: any, options: any) => any;
|
|
14
|
+
Percentage: (value: any, options: any) => any;
|
|
15
15
|
TrueFalse: (value: any, options: any) => any;
|
|
16
16
|
};
|
|
17
17
|
export default _default;
|
|
18
|
-
export declare function format(value: any, type: any, options?: {}):
|
|
18
|
+
export declare function format(value: any, type: any, options?: {}): any;
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA,wBAIE;AAmDF,wBAAgB,MAAM,CAAC,KAAK,KAAA,EAAE,IAAI,KAAA,EAAE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA,wBAIE;AAmDF,wBAAgB,MAAM,CAAC,KAAK,KAAA,EAAE,IAAI,KAAA,EAAE,OAAO,KAAK,OAgE/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/helpers/formatters/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,aAAa,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzD,eAAe;IACb,GAAG,OAAO;IACV,GAAG,QAAQ;IACX,GAAG,aAAa;CACjB,CAAC;AAEF,SAAS,aAAa,CAAC,IAAI;IACzB,4FAA4F;IAC5F,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAA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M,CAAC,CAAC;YACnE,MAAM;SACP;QAED,KAAK,SAAS,CAAC;QACf,KAAK,UAAU,CAAC,CAAC;YACf,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;YACjE,MAAM;SACP;QAED,KAAK,eAAe,CAAC,CAAC;YACpB,cAAc,GAAG,KAAK,CAAC,QAAQ,CAAC;YAChC,MAAM;SACP;QAED;YACE,cAAc,GAAG,KAAK,CAAC;KAC1B;IACD,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["import Boolean from \"./Boolean\";\nimport Currency from \"./Currency\";\nimport DateFormatter from \"./Date\";\nimport { getCurrentTimezone, getLocale } from \"./common\";\n\nexport default {\n ...Boolean,\n ...Currency,\n ...DateFormatter\n};\n\nfunction getDateObject(text) {\n // TODO - cleanup formatters util functions as DX APIs are returning values per ISO std now.\n const timeStamp = text.replace(/-/g, \"\");\n const isDateTime = timeStamp.indexOf(\"GMT\") !== -1;\n const year = parseInt(timeStamp.substr(0, 4), 10);\n const month = parseInt(timeStamp.substr(4, 2), 10) - 1;\n const day = parseInt(timeStamp.substr(6, 2), 10);\n\n const date = new Date();\n\n date.setDate(day);\n date.setMonth(month);\n date.setFullYear(year);\n\n if (isDateTime) {\n const hours = parseInt(timeStamp.substr(9, 2), 10);\n const minutes = parseInt(timeStamp.substr(11, 2), 10);\n const seconds = parseInt(timeStamp.substr(13, 2), 10);\n const ms = parseInt(timeStamp.substr(16, 3), 10);\n date.setHours(hours);\n date.setMinutes(minutes);\n date.setSeconds(seconds);\n date.setMilliseconds(ms);\n }\n\n return date;\n}\n\nfunction isIsoDate(str) {\n if (!/\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z/.test(str)) return false;\n const d = new Date(str);\n return d.toISOString() === str;\n}\n\nfunction parseDateInISO(value) {\n const isMilliSeconds = new RegExp(\"^[0-9]+$\").exec(value);\n if (isMilliSeconds) {\n const date = new Date(parseInt(value, 10));\n return date.toISOString();\n }\n\n if (isIsoDate(value)) {\n const date = new Date(value);\n return date.toISOString();\n }\n\n return value ? getDateObject(value).toISOString() : value;\n}\n\nexport function format(value, type, options = {}) {\n let formattedValue;\n\n switch (type?.toLowerCase()) {\n case \"currency\": {\n const defaultOptions = {\n locale: getLocale(),\n position: \"before\",\n decPlaces: 2\n };\n const params = { ...defaultOptions, ...options };\n formattedValue = Currency.Currency(value, params);\n break;\n }\n\n case \"decimal\": {\n const defaultOptions = { locale: getLocale(), decPlaces: 2 };\n const params = { ...defaultOptions, ...options };\n formattedValue = Currency.Decimal(value, params);\n break;\n }\n\n case \"integer\": {\n const defaultOptions = { locale: getLocale() };\n const params = { ...defaultOptions, ...options };\n formattedValue = Currency.Integer(value, params);\n break;\n }\n\n case \"date\": {\n const defaultOptions = {\n format: \"MMM DD, YYYY\",\n timezone: getCurrentTimezone()\n };\n const params = { ...defaultOptions, ...options };\n formattedValue = DateFormatter.Date(parseDateInISO(value), params);\n break;\n }\n\n case \"datetime\": {\n const defaultOptions = {\n format: \"MMM DD, YYYY h:mm A\",\n timezone: getCurrentTimezone()\n };\n const params = { ...defaultOptions, ...options };\n formattedValue = DateFormatter.Date(parseDateInISO(value), params);\n break;\n }\n\n case \"boolean\":\n case \"checkbox\": {\n formattedValue = Boolean.TrueFalse(value, { allowEmpty: false });\n break;\n }\n\n case \"userreference\": {\n formattedValue = value.userName;\n break;\n }\n\n default:\n formattedValue = value;\n }\n return formattedValue;\n}\n"]}
|
|
@@ -11,19 +11,17 @@ export declare const getApiContext: (processedData: any, pConnect: any, reorderC
|
|
|
11
11
|
fetchPersonalizations: () => Promise<{}>;
|
|
12
12
|
applyRowReorder: (sourceKey: any, destinationKey: any) => Promise<any>;
|
|
13
13
|
};
|
|
14
|
-
export declare const buildMetaForListView: (fieldMetadata: any, fields: any, type: any, ruleClass: any, name: any, propertyLabel: any,
|
|
14
|
+
export declare const buildMetaForListView: (fieldMetadata: any, fields: any, type: any, ruleClass: any, name: any, propertyLabel: any, parameters: any) => {
|
|
15
15
|
name: any;
|
|
16
16
|
config: {
|
|
17
17
|
type: any;
|
|
18
18
|
referenceList: any;
|
|
19
19
|
parameters: any;
|
|
20
20
|
personalization: boolean;
|
|
21
|
-
isDataObject: any;
|
|
22
21
|
grouping: boolean;
|
|
23
22
|
globalSearch: boolean;
|
|
24
23
|
reorderFields: boolean;
|
|
25
24
|
toggleFieldVisibility: boolean;
|
|
26
|
-
title: any;
|
|
27
25
|
personalizationId: string;
|
|
28
26
|
template: string;
|
|
29
27
|
presets: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleTableHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/simpleTableHelpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"simpleTableHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/simpleTableHelpers.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,gBAAgB,CAAC;AACxC,eAAO,MAAM,WAAW,eAAe,CAAC;AAwCxC,eAAO,MAAM,UAAU;;;;CAmBtB,CAAC;AAEF,eAAO,MAAM,cAAc,uBAI1B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;CAwBzB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyChC,CAAC;AAEF,eAAO,MAAM,mBAAmB,gEAmC/B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAuB9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,0CAE7B,CAAC;AAEF;;;;;GAKG;AAGH,wBAAgB,cAAc,CAAC,WAAW,KAAA,EAAE,aAAa,KAAA,EAAE,aAAa,KAAA,GAAG,GAAG,CAY7E;AAED,eAAO,MAAM,UAAU,kDA+HtB,CAAA"}
|
|
@@ -41,7 +41,7 @@ function getFieldWidth(field, label) {
|
|
|
41
41
|
export const getContext = (thePConn) => {
|
|
42
42
|
const contextName = thePConn.getContextName();
|
|
43
43
|
const pageReference = thePConn.getPageReference();
|
|
44
|
-
let { referenceList } = thePConn.getStateProps()
|
|
44
|
+
let { referenceList } = thePConn.getStateProps().config;
|
|
45
45
|
const pageReferenceForRows = referenceList.startsWith(".")
|
|
46
46
|
? `${pageReference}.${referenceList.substring(1)}`
|
|
47
47
|
: referenceList;
|
|
@@ -81,7 +81,7 @@ export const getApiContext = (processedData, pConnect, reorderCB) => {
|
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
|
-
export const buildMetaForListView = (fieldMetadata, fields, type, ruleClass, name, propertyLabel,
|
|
84
|
+
export const buildMetaForListView = (fieldMetadata, fields, type, ruleClass, name, propertyLabel, parameters) => {
|
|
85
85
|
return {
|
|
86
86
|
name,
|
|
87
87
|
config: {
|
|
@@ -89,12 +89,10 @@ export const buildMetaForListView = (fieldMetadata, fields, type, ruleClass, nam
|
|
|
89
89
|
referenceList: fieldMetadata.datasource.name,
|
|
90
90
|
parameters: parameters ?? fieldMetadata.datasource.parameters,
|
|
91
91
|
personalization: false,
|
|
92
|
-
isDataObject,
|
|
93
92
|
grouping: true,
|
|
94
93
|
globalSearch: true,
|
|
95
94
|
reorderFields: true,
|
|
96
95
|
toggleFieldVisibility: true,
|
|
97
|
-
title: propertyLabel,
|
|
98
96
|
personalizationId: "" /* TODO */,
|
|
99
97
|
template: "ListView",
|
|
100
98
|
presets: [
|
|
@@ -181,7 +179,7 @@ export const createMetaForTable = (fields, renderMode) => {
|
|
|
181
179
|
* @param {number} index - index of the page list to add
|
|
182
180
|
*/
|
|
183
181
|
export const getAddRowCallback = (pConnect, index) => {
|
|
184
|
-
return () => pConnect.getListActions().insert({}, index
|
|
182
|
+
return () => pConnect.getListActions().insert({}, index);
|
|
185
183
|
};
|
|
186
184
|
/**
|
|
187
185
|
* This method creates a PConnect object with proper options for Add and Delete actions
|
|
@@ -1 +1 @@
|
|
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KAAK,WAAW,EAAE;oCACzB,KAAK,GAAG,KAAK,CAAC;iCACf;gCACD,MAAM;4BAER,KAAK,YAAY;gCACf,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;oCACpC,KAAK,GAAG,KAAK,CAAC;iCACf;gCACD,MAAM;4BAER;gCACE,MAAM;yBACT;wBAED,MAAM;iBACT;aACF;YAED,+BAA+B;YAC/B,IAAI,CAAC,KAAK,EAAE;gBACV,MAAM;aACP;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { Utils } from './utils';\n\n\nexport const TABLE_CELL = \"SdkRenderer\";\nexport const DELETE_ICON = \"DeleteIcon\";\n\n// BUG-615253: Workaround for autosize in table with lazy loading components\n/* istanbul ignore next */\nfunction getFieldWidth(field, label) {\n let width: number;\n switch (field.type) {\n case \"Time\":\n width = 150;\n break;\n case \"Date\":\n width = 160;\n break;\n case \"DateTime\":\n width = 205;\n break;\n case \"AutoComplete\":\n case \"TextArea\":\n width = 190;\n break;\n case \"Currency\":\n case \"TextInput\":\n width = 182;\n break;\n case \"Checkbox\":\n // eslint-disable-next-line no-case-declarations\n const text = document.createElement(\"span\");\n document.body.appendChild(text);\n text.style.fontSize = \"13px\";\n text.style.position = \"absolute\";\n text.innerHTML = label;\n width = Math.ceil(text.clientWidth) + 30;\n document.body.removeChild(text);\n break;\n default:\n width = 180;\n }\n return width;\n}\n\nexport const getContext = (thePConn) => {\n const contextName = thePConn.getContextName();\n const pageReference = thePConn.getPageReference();\n let { referenceList } = thePConn.getStateProps()?.config || thePConn.getStateProps();\n const pageReferenceForRows = referenceList.startsWith(\".\")\n ? `${pageReference}.${referenceList.substring(1)}`\n : referenceList;\n\n // removing \"caseInfo.content\" prefix to avoid setting it as a target while preparing pageInstructions\n referenceList = pageReferenceForRows.replace(\n PCore.getConstants().CASE_INFO.CASE_INFO_CONTENT,\n \"\"\n );\n\n return {\n contextName,\n referenceListStr: referenceList,\n pageReferenceForRows\n };\n};\n\nexport const populateRowKey = (rawData) => {\n return rawData.map((row: any, index: number) => {\n return { ...row, index };\n });\n};\n\nexport const getApiContext = (processedData, pConnect, reorderCB) => {\n return {\n fetchData: () => {\n return new Promise((resolve) => {\n resolve({\n data: processedData,\n filteredRecordCount: processedData.length,\n totalRecordCount: processedData.length\n });\n });\n },\n fetchPersonalizations: () => {\n return Promise.resolve({});\n },\n applyRowReorder: (sourceKey, destinationKey) => {\n // indexes are keys for simple table so, it should work.\n reorderCB();\n return Promise.resolve(\n pConnect\n .getListActions()\n .reorder(parseInt(sourceKey, 10), parseInt(destinationKey, 10))\n );\n }\n };\n};\n\nexport const buildMetaForListView = (\n fieldMetadata,\n fields,\n type,\n ruleClass,\n name,\n propertyLabel,\n isDataObject,\n parameters\n) => {\n return {\n name,\n config: {\n type,\n referenceList: fieldMetadata.datasource.name,\n parameters: parameters ?? fieldMetadata.datasource.parameters,\n personalization: false,\n isDataObject,\n grouping: true,\n globalSearch: true,\n reorderFields: true,\n toggleFieldVisibility: true,\n title: propertyLabel,\n personalizationId: \"\" /* TODO */,\n template: \"ListView\",\n presets: [\n {\n name: \"presets\",\n template: \"Table\",\n config: {},\n children: [\n {\n name: \"Columns\",\n type: \"Region\",\n children: fields\n }\n ],\n label: propertyLabel,\n id: \"P_\" /* TODO */\n }\n ],\n ruleClass\n }\n };\n};\n\nexport const buildFieldsForTable = (configFields, fields, showDeleteButton) => {\n const fieldDefs = configFields.map((field, index) => {\n return {\n type: \"text\",\n label: fields[index].config.label || fields[index].config.caption,\n fillAvailableSpace: !!field.config.fillAvailableSpace,\n id: index,\n name: field.config.value.substr(4),\n cellRenderer: TABLE_CELL,\n sort: false,\n noContextMenu: true,\n showMenu: false,\n meta: {\n ...field\n },\n // BUG-615253: Workaround for autosize in table with lazy loading components\n width: getFieldWidth(field, fields[index].config.label)\n };\n });\n\n // ONLY add DELETE_ICON to fields when the table is requested as EDITABLE\n if (showDeleteButton) {\n fieldDefs.push({\n type: \"text\",\n id: fieldDefs.length,\n cellRenderer: DELETE_ICON,\n sort: false,\n noContextMenu: true,\n showMenu: false,\n // BUG-615253: Workaround for autosize in table with lazy loading components\n width: 46\n });\n }\n\n return fieldDefs;\n};\n\nexport const createMetaForTable = (fields, renderMode) => {\n return {\n height: {\n minHeight: \"auto\",\n fitHeightToElement: \"fitHeightToElement\",\n deltaAdjustment: \"deltaAdjustment\",\n autoSize: true\n },\n fieldDefs: fields,\n itemKey: \"index\",\n grouping: false,\n reorderFields: false,\n reorderItems: renderMode === \"Editable\",\n dragHandle: renderMode === \"Editable\",\n globalSearch: false,\n personalization: false,\n toggleFieldVisibility: false,\n toolbar: false,\n footer: false,\n filterExpression: null,\n editing: false,\n timezone: PCore.getEnvironmentInfo().getTimeZone()\n };\n};\n\n/**\n * This method returns a callBack function for Add action.\n * @param {object} pConnect - PConnect object\n * @param {number} index - index of the page list to add\n */\nexport const getAddRowCallback = (pConnect, index) => {\n return () => pConnect.getListActions().insert({}, index, ''); // 3rd arg null until typedef marked correctly as optional\n};\n\n/**\n * This method creates a PConnect object with proper options for Add and Delete actions\n * @param {string} contextName - contextName\n * @param {string} referenceList - referenceList\n * @param {string} pageReference - pageReference\n */\n// NOTE: use of type \"any\" is required since TypeScript doesn't allow private/protected properties\n// to be exported from a class (TS4094 error)\nexport function createPConnect(contextName, referenceList, pageReference): any {\n const options = {\n context: contextName,\n pageReference,\n referenceList\n };\n\n // create PConnect object\n const config = { meta: {}, options };\n const { getPConnect } = PCore.createPConnect(config);\n\n return getPConnect();\n};\n\nexport const filterData = (filterByColumns) => {\n return function filteringData(item) {\n let bKeep = true;\n for (const filterObj of filterByColumns) {\n if (\n filterObj.containsFilterValue !== '' ||\n filterObj.containsFilter === 'null' ||\n filterObj.containsFilter === 'notnull'\n ) {\n let value: any;\n let filterValue: any;\n\n switch (filterObj.type) {\n case 'Date':\n case 'DateTime':\n case 'Time':\n value =\n item[filterObj.ref] !== null ?? item[filterObj.ref] !== ''\n ? Utils.getSeconds(item[filterObj.ref])\n : null;\n filterValue =\n filterObj.containsFilterValue !== null && filterObj.containsFilterValue !== ''\n ? Utils.getSeconds(filterObj.containsFilterValue)\n : null;\n\n // eslint-disable-next-line sonarjs/no-nested-switch\n switch (filterObj.containsFilter) {\n case 'notequal':\n // becasue filterValue is in minutes, need to have a range of less than 60 secons\n\n if (value !== null && filterValue !== null) {\n // get rid of milliseconds\n value /= 1000;\n filterValue /= 1000;\n\n const diff = value - filterValue;\n if (diff >= 0 && diff < 60) {\n bKeep = false;\n }\n }\n\n break;\n\n case 'equal':\n // becasue filterValue is in minutes, need to have a range of less than 60 secons\n\n if (value !== null && filterValue !== null) {\n // get rid of milliseconds\n value /= 1000;\n filterValue /= 1000;\n\n const diff = value - filterValue;\n if (diff !== 0) {\n bKeep = false;\n }\n }\n\n break;\n\n case 'after':\n if (value < filterValue) {\n bKeep = false;\n }\n break;\n\n case 'before':\n if (value > filterValue) {\n bKeep = false;\n }\n break;\n\n case 'null':\n if (value !== null) {\n bKeep = false;\n }\n break;\n\n case 'notnull':\n if (value === null) {\n bKeep = false;\n }\n break;\n\n default:\n break;\n }\n break;\n\n default:\n value = item[filterObj.ref].toLowerCase();\n filterValue = filterObj.containsFilterValue.toLowerCase();\n\n // eslint-disable-next-line sonarjs/no-nested-switch\n switch (filterObj.containsFilter) {\n case 'contains':\n if (value.indexOf(filterValue) < 0) {\n bKeep = false;\n }\n break;\n\n case 'equals':\n if (value !== filterValue) {\n bKeep = false;\n }\n break;\n\n case 'startswith':\n if (value.indexOf(filterValue) !== 0) {\n bKeep = false;\n }\n break;\n\n default:\n break;\n }\n\n break;\n }\n }\n\n // if don't keep stop filtering\n if (!bKeep) {\n break;\n }\n }\n return bKeep;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"simpleTableHelpers.js","sourceRoot":"","sources":["../../../src/components/helpers/simpleTableHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM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ACT;aACF;YAED,+BAA+B;YAC/B,IAAI,CAAC,KAAK,EAAE;gBACV,MAAM;aACP;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { Utils } from './utils';\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nexport const TABLE_CELL = \"SdkRenderer\";\nexport const DELETE_ICON = \"DeleteIcon\";\n\n// BUG-615253: Workaround for autosize in table with lazy loading components\n/* istanbul ignore next */\nfunction getFieldWidth(field, label) {\n let width;\n switch (field.type) {\n case \"Time\":\n width = 150;\n break;\n case \"Date\":\n width = 160;\n break;\n case \"DateTime\":\n width = 205;\n break;\n case \"AutoComplete\":\n case \"TextArea\":\n width = 190;\n break;\n case \"Currency\":\n case \"TextInput\":\n width = 182;\n break;\n case \"Checkbox\":\n // eslint-disable-next-line no-case-declarations\n const text = document.createElement(\"span\");\n document.body.appendChild(text);\n text.style.fontSize = \"13px\";\n text.style.position = \"absolute\";\n text.innerHTML = label;\n width = Math.ceil(text.clientWidth) + 30;\n document.body.removeChild(text);\n break;\n default:\n width = 180;\n }\n return width;\n}\n\nexport const getContext = (thePConn) => {\n const contextName = thePConn.getContextName();\n const pageReference = thePConn.getPageReference();\n let { referenceList } = thePConn.getStateProps().config;\n const pageReferenceForRows = referenceList.startsWith(\".\")\n ? `${pageReference}.${referenceList.substring(1)}`\n : referenceList;\n\n // removing \"caseInfo.content\" prefix to avoid setting it as a target while preparing pageInstructions\n referenceList = pageReferenceForRows.replace(\n PCore.getConstants().CASE_INFO.CASE_INFO_CONTENT,\n \"\"\n );\n\n return {\n contextName,\n referenceListStr: referenceList,\n pageReferenceForRows\n };\n};\n\nexport const populateRowKey = (rawData) => {\n return rawData.map((row, index) => {\n return { ...row, index };\n });\n};\n\nexport const getApiContext = (processedData, pConnect, reorderCB) => {\n return {\n fetchData: () => {\n return new Promise((resolve) => {\n resolve({\n data: processedData,\n filteredRecordCount: processedData.length,\n totalRecordCount: processedData.length\n });\n });\n },\n fetchPersonalizations: () => {\n return Promise.resolve({});\n },\n applyRowReorder: (sourceKey, destinationKey) => {\n // indexes are keys for simple table so, it should work.\n reorderCB();\n return Promise.resolve(\n pConnect\n .getListActions()\n .reorder(parseInt(sourceKey, 10), parseInt(destinationKey, 10))\n );\n }\n };\n};\n\nexport const buildMetaForListView = (\n fieldMetadata,\n fields,\n type,\n ruleClass,\n name,\n propertyLabel,\n parameters\n) => {\n return {\n name,\n config: {\n type,\n referenceList: fieldMetadata.datasource.name,\n parameters: parameters ?? fieldMetadata.datasource.parameters,\n personalization: false,\n grouping: true,\n globalSearch: true,\n reorderFields: true,\n toggleFieldVisibility: true,\n personalizationId: \"\" /* TODO */,\n template: \"ListView\",\n presets: [\n {\n name: \"presets\",\n template: \"Table\",\n config: {},\n children: [\n {\n name: \"Columns\",\n type: \"Region\",\n children: fields\n }\n ],\n label: propertyLabel,\n id: \"P_\" /* TODO */\n }\n ],\n ruleClass\n }\n };\n};\n\nexport const buildFieldsForTable = (configFields, fields, showDeleteButton) => {\n const fieldDefs = configFields.map((field, index) => {\n return {\n type: \"text\",\n label: fields[index].config.label || fields[index].config.caption,\n fillAvailableSpace: !!field.config.fillAvailableSpace,\n id: index,\n name: field.config.value.substr(4),\n cellRenderer: TABLE_CELL,\n sort: false,\n noContextMenu: true,\n showMenu: false,\n meta: {\n ...field\n },\n // BUG-615253: Workaround for autosize in table with lazy loading components\n width: getFieldWidth(field, fields[index].config.label)\n };\n });\n\n // ONLY add DELETE_ICON to fields when the table is requested as EDITABLE\n if (showDeleteButton) {\n fieldDefs.push({\n type: \"text\",\n id: fieldDefs.length,\n cellRenderer: DELETE_ICON,\n sort: false,\n noContextMenu: true,\n showMenu: false,\n // BUG-615253: Workaround for autosize in table with lazy loading components\n width: 46\n });\n }\n\n return fieldDefs;\n};\n\nexport const createMetaForTable = (fields, renderMode) => {\n return {\n height: {\n minHeight: \"auto\",\n fitHeightToElement: \"fitHeightToElement\",\n deltaAdjustment: \"deltaAdjustment\",\n autoSize: true\n },\n fieldDefs: fields,\n itemKey: \"index\",\n grouping: false,\n reorderFields: false,\n reorderItems: renderMode === \"Editable\",\n dragHandle: renderMode === \"Editable\",\n globalSearch: false,\n personalization: false,\n toggleFieldVisibility: false,\n toolbar: false,\n footer: false,\n filterExpression: null,\n editing: false,\n timezone: PCore.getEnvironmentInfo().getTimeZone()\n };\n};\n\n/**\n * This method returns a callBack function for Add action.\n * @param {object} pConnect - PConnect object\n * @param {number} index - index of the page list to add\n */\nexport const getAddRowCallback = (pConnect, index) => {\n return () => pConnect.getListActions().insert({}, index);\n};\n\n/**\n * This method creates a PConnect object with proper options for Add and Delete actions\n * @param {string} contextName - contextName\n * @param {string} referenceList - referenceList\n * @param {string} pageReference - pageReference\n */\n// NOTE: use of type \"any\" is required since TypeScript doesn't allow private/protected properties\n// to be exported from a class (TS4094 error)\nexport function createPConnect(contextName, referenceList, pageReference): any {\n const options = {\n context: contextName,\n pageReference,\n referenceList\n };\n\n // create PConnect object\n const config = { meta: {}, options };\n const { getPConnect } = PCore.createPConnect(config);\n\n return getPConnect();\n};\n\nexport const filterData = (filterByColumns) => {\n return function filteringData(item) {\n let bKeep = true;\n for (const filterObj of filterByColumns) {\n if (\n filterObj.containsFilterValue !== '' ||\n filterObj.containsFilter === 'null' ||\n filterObj.containsFilter === 'notnull'\n ) {\n let value: any;\n let filterValue: any;\n\n switch (filterObj.type) {\n case 'Date':\n case 'DateTime':\n case 'Time':\n value =\n item[filterObj.ref] !== null ?? item[filterObj.ref] !== ''\n ? Utils.getSeconds(item[filterObj.ref])\n : null;\n filterValue =\n filterObj.containsFilterValue !== null && filterObj.containsFilterValue !== ''\n ? Utils.getSeconds(filterObj.containsFilterValue)\n : null;\n\n // eslint-disable-next-line sonarjs/no-nested-switch\n switch (filterObj.containsFilter) {\n case 'notequal':\n // becasue filterValue is in minutes, need to have a range of less than 60 secons\n\n if (value !== null && filterValue !== null) {\n // get rid of milliseconds\n value /= 1000;\n filterValue /= 1000;\n\n const diff = value - filterValue;\n if (diff >= 0 && diff < 60) {\n bKeep = false;\n }\n }\n\n break;\n\n case 'equal':\n // becasue filterValue is in minutes, need to have a range of less than 60 secons\n\n if (value !== null && filterValue !== null) {\n // get rid of milliseconds\n value /= 1000;\n filterValue /= 1000;\n\n const diff = value - filterValue;\n if (diff !== 0) {\n bKeep = false;\n }\n }\n\n break;\n\n case 'after':\n if (value < filterValue) {\n bKeep = false;\n }\n break;\n\n case 'before':\n if (value > filterValue) {\n bKeep = false;\n }\n break;\n\n case 'null':\n if (value !== null) {\n bKeep = false;\n }\n break;\n\n case 'notnull':\n if (value === null) {\n bKeep = false;\n }\n break;\n\n default:\n break;\n }\n break;\n\n default:\n value = item[filterObj.ref].toLowerCase();\n filterValue = filterObj.containsFilterValue.toLowerCase();\n\n // eslint-disable-next-line sonarjs/no-nested-switch\n switch (filterObj.containsFilter) {\n case 'contains':\n if (value.indexOf(filterValue) < 0) {\n bKeep = false;\n }\n break;\n\n case 'equals':\n if (value !== filterValue) {\n bKeep = false;\n }\n break;\n\n case 'startswith':\n if (value.indexOf(filterValue) !== 0) {\n bKeep = false;\n }\n break;\n\n default:\n break;\n }\n\n break;\n }\n }\n\n // if don't keep stop filtering\n if (!bKeep) {\n break;\n }\n }\n return bKeep;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/state-utils.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"state-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/state-utils.tsx"],"names":[],"mappings":";AAQA,QAAA,MAAM,cAAc,gDACC,GAAG,mCAsCvB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/state-utils.tsx"],"names":[],"mapp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,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAC5E;wBACA,OAAO,KAAK,CAAC;qBACd;iBACF;gBACD,gFAAgF;gBAChF,OAAO,CAAC,CACN,aAAa,IAAI,IAAI;oBACrB,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC;wBAChD,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAC1D,CAAC;YACJ,CAAC;SACF,CAAC,CAAC,SAAS,CAAC,CAAC;QAEd,OAAO,CAAC,QAAQ,GAAG,EAAE,EAAE,EAAE;YACvB,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAM,iBAAiB,CAAC,CAAC;YAErD,OAAO,CACL,oBAAC,QAAQ,IAAC,KAAK,EAAE,KAAK;gBACpB,oBAAC,kBAAkB,OAAK,QAAQ,GAAI,CAC3B,CACZ,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React, { useContext } from 'react';\nimport { connect, Provider, shallowEqual } from 'react-redux';\nimport ReactReduxContext from '../../bridge/Context/StoreContext';\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nconst connectToState = (mapStateToProps = () => {}) => {\n return (Component: any) => {\n const ConnectedComponent = connect(mapStateToProps, null, null, {\n areStatePropsEqual: (next, prev: any) => {\n // Compare visibility\n const prevWasVisible = prev.visibility !== false;\n if (next.visibility !== undefined && next.visibility !== prevWasVisible) {\n return false;\n }\n // Compare start props\n const c11nEnv = next.getPConnect();\n const allStateProps = c11nEnv.getStateProps();\n for (const key in allStateProps) {\n if (\n !shallowEqual(next[key], prev[key]) ||\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo))\n ) {\n return false;\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !(\n 'routingInfo' in next &&\n (!shallowEqual(next.routingInfo, prev.routingInfo) ||\n !PCore.isDeepEqual(next.routingInfo, prev.routingInfo))\n );\n }\n })(Component);\n\n return (ownProps = {}) => {\n const { store } = useContext<any>(ReactReduxContext);\n\n return (\n <Provider store={store}>\n <ConnectedComponent {...ownProps} />\n </Provider>\n );\n };\n };\n};\n\nexport default connectToState;\n"]}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
export declare function getAllFields(pConnect: any):
|
|
2
|
-
export declare function filterForFieldValueList(fields:
|
|
3
|
-
id: any;
|
|
4
|
-
name: any;
|
|
5
|
-
value: any;
|
|
6
|
-
}[];
|
|
1
|
+
export declare function getAllFields(pConnect: any): never[];
|
|
2
|
+
export declare function filterForFieldValueList(fields: any): any;
|
|
7
3
|
/**
|
|
8
4
|
* Determine if the current view is the view of the case step/assignment.
|
|
9
5
|
* @param {Function} pConnect PConnect object for the component
|
|
@@ -14,5 +10,5 @@ export declare function getIsAssignmentView(pConnect: any): boolean;
|
|
|
14
10
|
* @param {Function} pConnect PConnect object for the component
|
|
15
11
|
* @param {string} [instructions="casestep"] 'casestep', 'none', or the html content of a Rule-UI-Paragraph rule (processed via core's paragraph annotation handler)
|
|
16
12
|
*/
|
|
17
|
-
export declare function getInstructions(pConnect: any, instructions?: string):
|
|
13
|
+
export declare function getInstructions(pConnect: any, instructions?: string): any;
|
|
18
14
|
//# sourceMappingURL=template-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/template-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"template-utils.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/template-utils.ts"],"names":[],"mappings":"AAMA,wBAAgB,YAAY,CAAC,QAAQ,EAAE,GAAG,WAUzC;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,GAAG,OAQlD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,KAAA,WAY3C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,KAAA,EAAE,YAAY,SAAa,OA8BlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/template-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"template-utils.js","sourceRoot":"","sources":["../../../src/components/helpers/template-utils.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,YAAY,CAAC,QAAa;IACxC,MAAM,QAAQ,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;IAC3C,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE;QAC9C,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,YAAY,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;YACzE,OAAO,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,MAAW;IACjD,OAAO,MAAM;SACV,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,UAAU,KAAK,KAAK,CAAC;SAChD,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;QAC1B,EAAE,EAAE,KAAK,CAAC,WAAW,EAAE;QACvB,IAAI,EAAE,KAAK;QACX,KAAK;KACN,CAAC,CAAC,CAAC;AACR,CAAC;AAED;;;GAGG;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AAU,IAAI,YAAY,KAAK,MAAM,EAAE;QAC1D,OAAO,YAAY,CAAC;KACrB;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// This file is adapted from React DX components/template/utils.js\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nexport function getAllFields(pConnect: any) {\n const metadata = pConnect.getRawMetadata();\n let allFields = [];\n if (metadata.children && metadata.children.map) {\n allFields = metadata.children.map(fields => {\n const children = fields.children instanceof Array ? fields.children : [];\n return children.map(field => field.config);\n });\n }\n return allFields;\n}\n\nexport function filterForFieldValueList(fields: any) {\n return fields\n .filter(({ visibility }) => visibility !== false)\n .map(({ value, label }) => ({\n id: label.toLowerCase(),\n name: label,\n value\n }));\n}\n\n/**\n * Determine if the current view is the view of the case step/assignment.\n * @param {Function} pConnect PConnect object for the component\n */\nexport function getIsAssignmentView(pConnect) {\n // Get caseInfo content from the store which contains the view info about the current assignment/step\n // TODO To be replaced with pConnect.getCaseInfo().getCurrentAssignmentView when it's available\n const assignmentViewClass = pConnect.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_CLASSID);\n const assignmentViewName = pConnect.getValue(PCore.getConstants().CASE_INFO.ASSIGNMENTACTION_ID);\n\n const assignmentViewId = `${assignmentViewName}!${assignmentViewClass}`;\n\n // Get the info about the current view from pConnect\n const currentViewId = `${pConnect.getCurrentView()}!${pConnect.getCurrentClassID()}`;\n\n return assignmentViewId === currentViewId;\n}\n\n/**\n * A hook that gets the instructions content for a view.\n * @param {Function} pConnect PConnect object for the component\n * @param {string} [instructions=\"casestep\"] 'casestep', 'none', or the html content of a Rule-UI-Paragraph rule (processed via core's paragraph annotation handler)\n */\nexport function getInstructions(pConnect, instructions = 'casestep') {\n const caseStepInstructions =\n PCore.getConstants().CASE_INFO.INSTRUCTIONS &&\n pConnect.getValue(PCore.getConstants().CASE_INFO.INSTRUCTIONS);\n\n // Determine if this view is the current assignment/step view\n const isCurrentAssignmentView = getIsAssignmentView(pConnect);\n\n // Case step instructions\n if (instructions === 'casestep' && isCurrentAssignmentView && caseStepInstructions?.length) {\n return caseStepInstructions;\n }\n\n // No instructions\n if (instructions === 'none') {\n return undefined;\n }\n\n // If the annotation wasn't processed correctly, don't return any instruction text\n if (instructions?.startsWith('@PARAGRAPH')) {\n return undefined;\n }\n\n // Custom instructions from the view\n // The raw metadata for `instructions` will be something like '@PARAGRAPH .SomeParagraphRule' but\n // it is evaluated by core logic to the content\n if (instructions !== 'casestep' && instructions !== 'none') {\n return instructions;\n }\n return undefined;\n}\n"]}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* versionHelpers.ts
|
|
3
|
-
*
|
|
4
|
-
* Container helper functions that can identify which version of
|
|
5
|
-
* PCore/PConnect is being run
|
|
6
|
-
*/
|
|
7
1
|
export declare const sdkVersion = "8.7";
|
|
8
2
|
export declare function compareSdkPCoreVersions(): void;
|
|
9
3
|
//# sourceMappingURL=versionHelpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/versionHelpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"versionHelpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers/versionHelpers.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,UAAU,QAAQ,CAAC;AAEhC,wBAAgB,uBAAuB,SAOtC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* versionHelpers.ts
|
|
3
|
-
*
|
|
4
|
-
* Container helper functions that can identify which version of
|
|
5
|
-
* PCore/PConnect is being run
|
|
6
|
-
*/
|
|
7
1
|
export const sdkVersion = "8.7";
|
|
8
2
|
export function compareSdkPCoreVersions() {
|
|
9
3
|
// const theConstellationVersion = PCore.getPCoreVersion();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionHelpers.js","sourceRoot":"","sources":["../../../src/components/helpers/versionHelpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"versionHelpers.js","sourceRoot":"","sources":["../../../src/components/helpers/versionHelpers.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC;AAEhC,MAAM,UAAU,uBAAuB;IAErC,2DAA2D;IAE3D,sCAAsC;IACtC,OAAO,CAAC,IAAI,CAAC,+BAA+B,KAAK,CAAC,eAAe,EAAE,4DAA4D,CAAC,CAAC;AAEnI,CAAC","sourcesContent":["/**\n * versionHelpers.ts\n *\n * Container helper functions that can identify which version of\n * PCore/PConnect is being run\n */\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nexport const sdkVersion = \"8.7\";\n\nexport function compareSdkPCoreVersions() {\n\n // const theConstellationVersion = PCore.getPCoreVersion();\n\n // eslint-disable-next-line no-console\n console.warn(`Using Constellation version ${PCore.getPCoreVersion()}. Ensure this is the same version as your Infinity server.`);\n\n}\n"]}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
declare function ActionButtons(props: any): JSX.Element;
|
|
4
|
+
declare namespace ActionButtons {
|
|
5
|
+
var propTypes: {
|
|
6
|
+
arMainButtons: PropTypes.Requireable<any[]>;
|
|
7
|
+
arSecondaryButtons: PropTypes.Requireable<any[]>;
|
|
8
|
+
onButtonPress: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
+
};
|
|
10
|
+
var defaultProps: {
|
|
11
|
+
arMainButtons: never[];
|
|
12
|
+
arSecondaryButtons: never[];
|
|
13
|
+
};
|
|
6
14
|
}
|
|
7
|
-
export default
|
|
8
|
-
export {};
|
|
15
|
+
export default ActionButtons;
|
|
9
16
|
//# sourceMappingURL=ActionButtons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ActionButtons.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAsBnC,iBAAwB,aAAa,CAAC,KAAK,KAAA,eAsC1C;kBAtCuB,aAAa;;;;;;;;;;;eAAb,aAAa"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
2
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
3
4
|
import Button from '@material-ui/core/Button';
|
|
4
5
|
import { Grid, Divider } from "@material-ui/core";
|
|
@@ -12,7 +13,7 @@ const useStyles = makeStyles(( /* theme */) => ({
|
|
|
12
13
|
}
|
|
13
14
|
}));
|
|
14
15
|
export default function ActionButtons(props) {
|
|
15
|
-
const { arMainButtons
|
|
16
|
+
const { arMainButtons, arSecondaryButtons, onButtonPress } = props;
|
|
16
17
|
const classes = useStyles();
|
|
17
18
|
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
18
19
|
const localeCategory = 'Assignment';
|
|
@@ -29,4 +30,15 @@ export default function ActionButtons(props) {
|
|
|
29
30
|
React.createElement(Grid, { container: true, spacing: 1 }, arMainButtons.map((mButton) => (React.createElement(Grid, { item: true, key: mButton.name },
|
|
30
31
|
React.createElement(Button, { variant: "contained", color: "primary", onClick: () => { _onButtonPress(mButton.jsAction, "primary"); } }, localizedVal(mButton.name, localeCategory))))))))));
|
|
31
32
|
}
|
|
33
|
+
ActionButtons.propTypes = {
|
|
34
|
+
arMainButtons: PropTypes.array,
|
|
35
|
+
arSecondaryButtons: PropTypes.array,
|
|
36
|
+
onButtonPress: PropTypes.func
|
|
37
|
+
// buildName: PropTypes.string
|
|
38
|
+
};
|
|
39
|
+
ActionButtons.defaultProps = {
|
|
40
|
+
arMainButtons: [],
|
|
41
|
+
arSecondaryButtons: []
|
|
42
|
+
// buildName: null
|
|
43
|
+
};
|
|
32
44
|
//# sourceMappingURL=ActionButtons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButtons.js","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionButtons.js","sourceRoot":"","sources":["../../../../src/components/infra/ActionButtons/ActionButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAOlD,MAAM,SAAS,GAAG,UAAU,CAAC,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC7C,MAAM,EAAE;QACN,OAAO,EAAE,SAAS;KACnB;IACD,OAAO,EAAE;QACP,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,MAAM;KACrB;CACF,CAAC,CAAC,CAAC;AAGJ,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK;IACzC,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IACnE,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAC5B,MAAM,YAAY,GAAG,KAAK,CAAC,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AAC,OAAO,CAAC,IAAI,EAAE,cAAc,CAAC,CAAU,CAC5J,CACR,CAAC,CACD,CACF,CACF,CAEQ,CAElB,CAAA;AACH,CAAC;AAED,aAAa,CAAC,SAAS,GAAG;IACxB,aAAa,EAAE,SAAS,CAAC,KAAK;IAC9B,kBAAkB,EAAE,SAAS,CAAC,KAAK;IACnC,aAAa,EAAE,SAAS,CAAC,IAAI;IAC7B,8BAA8B;CAC/B,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG;IAC3B,aAAa,EAAE,EAAE;IACjB,kBAAkB,EAAE,EAAE;IACtB,kBAAkB;CACnB,CAAC","sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport Button from '@material-ui/core/Button';\nimport { Grid, Divider } from \"@material-ui/core\";\n\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nconst useStyles = makeStyles((/* theme */) => ({\n button: {\n padding: \"0px 5px\",\n },\n divider: {\n marginTop: \"10px\",\n marginBottom: \"10px\"\n }\n}));\n\n\nexport default function ActionButtons(props) {\n const { arMainButtons, arSecondaryButtons, onButtonPress } = props;\n const classes = useStyles();\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Assignment';\n\n function _onButtonPress(sAction: string, sButtonType: string) {\n\n onButtonPress(sAction, sButtonType);\n }\n\n return (\n <React.Fragment>\n <Divider className={classes.divider}/>\n <Grid container spacing={4} justifyContent=\"space-between\">\n <Grid item>\n <Grid container spacing={1}>\n {arSecondaryButtons.map((sButton) => (\n <Grid item key={sButton.name}>\n <Button variant=\"contained\" color=\"secondary\" onClick={() => { _onButtonPress(sButton.jsAction, \"secondary\")}} >{localizedVal(sButton.name, localeCategory)}</Button>\n </Grid>\n ))}\n </Grid>\n </Grid>\n <Grid item>\n <Grid container spacing={1}>\n {arMainButtons.map((mButton) => (\n <Grid item key={mButton.name}>\n <Button variant=\"contained\" color=\"primary\" onClick={() => { _onButtonPress(mButton.jsAction, \"primary\")}} >{localizedVal(mButton.name, localeCategory)}</Button>\n </Grid>\n ))}\n </Grid>\n </Grid>\n </Grid>\n\n </React.Fragment>\n\n )\n}\n\nActionButtons.propTypes = {\n arMainButtons: PropTypes.array,\n arSecondaryButtons: PropTypes.array,\n onButtonPress: PropTypes.func\n // buildName: PropTypes.string\n};\n\nActionButtons.defaultProps = {\n arMainButtons: [],\n arSecondaryButtons: []\n // buildName: null\n};\n"]}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare function Assignment(props: any): JSX.Element;
|
|
4
|
+
declare namespace Assignment {
|
|
5
|
+
var propTypes: {
|
|
6
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
7
|
+
getPConnect: PropTypes.Validator<(...args: any[]) => any>;
|
|
8
|
+
itemKey: PropTypes.Requireable<string>;
|
|
9
|
+
isInModal: PropTypes.Requireable<boolean>;
|
|
10
|
+
banners: PropTypes.Requireable<any>;
|
|
11
|
+
};
|
|
12
|
+
var defaultProps: {
|
|
13
|
+
itemKey: null;
|
|
14
|
+
isInModal: boolean;
|
|
15
|
+
};
|
|
9
16
|
}
|
|
10
|
-
export default
|
|
11
|
-
export {};
|
|
17
|
+
export default Assignment;
|
|
12
18
|
//# sourceMappingURL=Assignment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Assignment.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Assignment/Assignment.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Assignment.d.ts","sourceRoot":"","sources":["../../../../src/components/infra/Assignment/Assignment.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAanC,iBAAwB,UAAU,CAAC,KAAK,KAAA,eAsRvC;kBAtRuB,UAAU;;;;;;;;;;;;;eAAV,UAAU"}
|