@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,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface RichTextEditorProps {
|
|
3
|
-
id?: string;
|
|
4
|
-
defaultValue: string;
|
|
5
|
-
label: string;
|
|
6
|
-
labelHidden: boolean;
|
|
7
|
-
info: string;
|
|
8
|
-
testId: string;
|
|
9
|
-
placeholder: string;
|
|
10
|
-
disabled: boolean;
|
|
11
|
-
required: boolean;
|
|
12
|
-
readOnly: boolean;
|
|
13
|
-
error: boolean;
|
|
14
|
-
onBlur: React.EventHandler<any>;
|
|
15
|
-
onChange: React.EventHandler<any>;
|
|
16
|
-
}
|
|
17
|
-
declare const RichTextEditor: React.ForwardRefExoticComponent<RichTextEditorProps & React.RefAttributes<unknown>>;
|
|
18
|
-
export default RichTextEditor;
|
|
19
|
-
//# sourceMappingURL=RichTextEditor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAc1C,UAAU,mBAAmB;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;CACnC;AAED,QAAA,MAAM,cAAc,qFAwFlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
import { Editor } from '@tinymce/tinymce-react';
|
|
3
|
-
import { FormControl, FormHelperText, InputLabel, makeStyles } from '@material-ui/core';
|
|
4
|
-
import { useAfterInitialEffect, useConsolidatedRef, useUID } from '../../../hooks';
|
|
5
|
-
const useStyles = makeStyles((theme) => ({
|
|
6
|
-
fieldLabel: {
|
|
7
|
-
position: 'relative',
|
|
8
|
-
transform: 'translate(0, 0px) scale(1)',
|
|
9
|
-
marginBottom: '5px',
|
|
10
|
-
color: theme.palette.text.secondary
|
|
11
|
-
}
|
|
12
|
-
}));
|
|
13
|
-
const RichTextEditor = forwardRef(function RichTextEditor(props, ref) {
|
|
14
|
-
const classes = useStyles();
|
|
15
|
-
const uid = useUID();
|
|
16
|
-
const { id = uid, defaultValue, label, labelHidden, info, testId, placeholder, disabled, required, readOnly, error, onBlur, onChange } = props;
|
|
17
|
-
const editorRef = useConsolidatedRef(ref);
|
|
18
|
-
let richTextComponent = null;
|
|
19
|
-
useAfterInitialEffect(() => {
|
|
20
|
-
editorRef?.current.mode.set(readOnly || disabled ? 'readonly' : 'design');
|
|
21
|
-
}, [readOnly, disabled]);
|
|
22
|
-
const filePickerCallback = (cb) => {
|
|
23
|
-
const input = document.createElement('input');
|
|
24
|
-
input.setAttribute('type', 'file');
|
|
25
|
-
input.setAttribute('accept', 'image/*');
|
|
26
|
-
input.addEventListener('change', (e) => {
|
|
27
|
-
const file = e.target.files[0];
|
|
28
|
-
const reader = new FileReader();
|
|
29
|
-
reader.addEventListener('load', () => {
|
|
30
|
-
/*
|
|
31
|
-
Note: Now we need to register the blob in TinyMCEs image blob
|
|
32
|
-
registry. In the next release this part hopefully won't be
|
|
33
|
-
necessary, as we are looking to handle it internally.
|
|
34
|
-
*/
|
|
35
|
-
const blobId = `blobid${new Date().getTime()}`;
|
|
36
|
-
const blobCache = editorRef.current.editorUpload.blobCache;
|
|
37
|
-
const base64 = reader.result.split(',')[1];
|
|
38
|
-
const blobInfo = blobCache.create(blobId, file, base64);
|
|
39
|
-
blobCache.add(blobInfo);
|
|
40
|
-
/* call the callback and populate the Title field with the file name */
|
|
41
|
-
cb(blobInfo.blobUri(), { title: file.name });
|
|
42
|
-
});
|
|
43
|
-
reader.readAsDataURL(file);
|
|
44
|
-
});
|
|
45
|
-
input.click();
|
|
46
|
-
};
|
|
47
|
-
if (readOnly) {
|
|
48
|
-
const value = defaultValue || '--';
|
|
49
|
-
// eslint-disable-next-line react/no-danger
|
|
50
|
-
richTextComponent = React.createElement("div", { key: id, id: id, className: "readonly-richtext-editor", dangerouslySetInnerHTML: { __html: value } });
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
richTextComponent = (React.createElement(Editor, { tinymceScriptSrc: "tinymce/tinymce.min.js", onInit: (_evt, editor) => {
|
|
54
|
-
editorRef.current = editor;
|
|
55
|
-
}, id: id, initialValue: defaultValue, disabled: disabled, init: {
|
|
56
|
-
placeholder,
|
|
57
|
-
menubar: false,
|
|
58
|
-
statusbar: false,
|
|
59
|
-
min_height: 130,
|
|
60
|
-
plugins: ['lists', 'advlist', 'autolink', 'image', 'link', 'autoresize'],
|
|
61
|
-
autoresize_bottom_margin: 0,
|
|
62
|
-
toolbar: disabled ? false : 'blocks | bold italic strikethrough | bullist numlist outdent indent | link image',
|
|
63
|
-
toolbar_location: 'bottom',
|
|
64
|
-
content_style: 'body { font-family:Helvetica, Arial,sans-serif; font-size:14px }',
|
|
65
|
-
branding: false,
|
|
66
|
-
paste_data_images: true,
|
|
67
|
-
file_picker_types: 'image',
|
|
68
|
-
file_picker_callback: filePickerCallback
|
|
69
|
-
}, onBlur: onBlur, onEditorChange: onChange }));
|
|
70
|
-
}
|
|
71
|
-
return (React.createElement(FormControl, { "data-test-id": testId, error: error, required: required },
|
|
72
|
-
!labelHidden && (React.createElement(InputLabel, { id: "demo-simple-select-error-label", className: classes.fieldLabel }, label)),
|
|
73
|
-
richTextComponent,
|
|
74
|
-
info && React.createElement(FormHelperText, null, info)));
|
|
75
|
-
});
|
|
76
|
-
export default RichTextEditor;
|
|
77
|
-
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"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","sourcesContent":["import React, { forwardRef } from 'react';\nimport { Editor } from '@tinymce/tinymce-react';\nimport { FormControl, FormHelperText, InputLabel, makeStyles } from '@material-ui/core';\nimport { useAfterInitialEffect, useConsolidatedRef, useUID } from '../../../hooks';\n\nconst useStyles = makeStyles((theme) => ({\n fieldLabel: {\n position: 'relative',\n transform: 'translate(0, 0px) scale(1)',\n marginBottom: '5px',\n color: theme.palette.text.secondary\n }\n}));\n\ninterface RichTextEditorProps {\n id?: string;\n defaultValue: string;\n label: string;\n labelHidden: boolean;\n info: string;\n testId: string;\n placeholder: string;\n disabled: boolean;\n required: boolean;\n readOnly: boolean;\n error: boolean;\n onBlur: React.EventHandler<any>;\n onChange: React.EventHandler<any>;\n}\n\nconst RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorProps, ref) {\n const classes = useStyles();\n const uid = useUID();\n const { id = uid, defaultValue, label, labelHidden, info, testId, placeholder, disabled, required, readOnly, error, onBlur, onChange } = props;\n\n const editorRef: any = useConsolidatedRef(ref);\n let richTextComponent: any = null;\n\n useAfterInitialEffect(() => {\n editorRef?.current.mode.set(readOnly || disabled ? 'readonly' : 'design');\n }, [readOnly, disabled]);\n\n const filePickerCallback = (cb) => {\n const input = document.createElement('input');\n input.setAttribute('type', 'file');\n input.setAttribute('accept', 'image/*');\n\n input.addEventListener('change', (e: any) => {\n const file = e.target.files[0];\n\n const reader: any = new FileReader();\n reader.addEventListener('load', () => {\n /*\n Note: Now we need to register the blob in TinyMCEs image blob\n registry. In the next release this part hopefully won't be\n necessary, as we are looking to handle it internally.\n */\n const blobId = `blobid${new Date().getTime()}`;\n const blobCache = editorRef.current.editorUpload.blobCache;\n const base64 = reader.result.split(',')[1];\n const blobInfo = blobCache.create(blobId, file, base64);\n blobCache.add(blobInfo);\n\n /* call the callback and populate the Title field with the file name */\n cb(blobInfo.blobUri(), { title: file.name });\n });\n reader.readAsDataURL(file);\n });\n\n input.click();\n };\n\n if (readOnly) {\n const value = defaultValue || '--';\n // eslint-disable-next-line react/no-danger\n richTextComponent = <div key={id} id={id} className=\"readonly-richtext-editor\" dangerouslySetInnerHTML={{ __html: value }} />;\n } else {\n richTextComponent = (\n <Editor\n tinymceScriptSrc=\"tinymce/tinymce.min.js\"\n onInit={(_evt, editor) => {\n editorRef.current = editor;\n }}\n id={id}\n initialValue={defaultValue}\n disabled={disabled}\n init={{\n placeholder,\n menubar: false,\n statusbar: false,\n min_height: 130,\n plugins: ['lists', 'advlist', 'autolink', 'image', 'link', 'autoresize'],\n autoresize_bottom_margin: 0,\n toolbar: disabled ? false : 'blocks | bold italic strikethrough | bullist numlist outdent indent | link image',\n toolbar_location: 'bottom',\n content_style: 'body { font-family:Helvetica, Arial,sans-serif; font-size:14px }',\n branding: false,\n paste_data_images: true,\n file_picker_types: 'image',\n file_picker_callback: filePickerCallback\n }}\n onBlur={onBlur}\n onEditorChange={onChange}\n />\n );\n }\n\n return (\n <FormControl data-test-id={testId} error={error} required={required}>\n {!labelHidden && (\n <InputLabel id=\"demo-simple-select-error-label\" className={classes.fieldLabel}>\n {label}\n </InputLabel>\n )}\n {richTextComponent}\n {info && <FormHelperText>{info}</FormHelperText>}\n </FormControl>\n );\n});\n\nexport default RichTextEditor;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/RichTextEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/RichTextEditor/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { default } from './RichTextEditor';\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RichText/RichText.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,aAAc,SAAQ,eAAe;IAE7C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,OAkFpD"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
2
|
-
import handleEvent from '../../helpers/event-utils';
|
|
3
|
-
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
4
|
-
export default function RichText(props) {
|
|
5
|
-
// Get emitted components from map (so we can get any override that may exist)
|
|
6
|
-
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
7
|
-
const RichTextEditor = getComponentFromMap('RichTextEditor');
|
|
8
|
-
const { getPConnect, value, placeholder, validatemessage, label, hideLabel, helperText, testId, displayMode, additionalProps } = props;
|
|
9
|
-
const pConn = getPConnect();
|
|
10
|
-
const editorRef = useRef(null);
|
|
11
|
-
let { readOnly, required, disabled } = props;
|
|
12
|
-
[readOnly, required, disabled] = [readOnly, required, disabled].map((prop) => prop === true || (typeof prop === 'string' && prop === 'true'));
|
|
13
|
-
const helperTextToDisplay = validatemessage || helperText;
|
|
14
|
-
if (displayMode === 'LABELS_LEFT') {
|
|
15
|
-
return React.createElement(FieldValueList, { name: hideLabel ? '' : label, value: value });
|
|
16
|
-
}
|
|
17
|
-
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
18
|
-
return React.createElement(FieldValueList, { name: hideLabel ? '' : label, value: value, variant: "stacked" });
|
|
19
|
-
}
|
|
20
|
-
let richTextComponent;
|
|
21
|
-
if (readOnly) {
|
|
22
|
-
// Rich Text read-only component
|
|
23
|
-
richTextComponent = (React.createElement(RichTextEditor, { ...additionalProps, label: label, labelHidden: hideLabel, defaultValue: value, testId: testId, info: helperTextToDisplay, ref: editorRef, readOnly: true }));
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
// Rich Text editable component
|
|
27
|
-
const actionsApi = pConn.getActionsApi();
|
|
28
|
-
let status = '';
|
|
29
|
-
if (validatemessage !== '') {
|
|
30
|
-
status = 'error';
|
|
31
|
-
}
|
|
32
|
-
const handleChange = () => {
|
|
33
|
-
if (status === 'error') {
|
|
34
|
-
const property = pConn.getStateProps().value;
|
|
35
|
-
pConn.clearErrorMessages({
|
|
36
|
-
property
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
const handleBlur = () => {
|
|
41
|
-
if (editorRef.current) {
|
|
42
|
-
const editorValue = editorRef.current.getContent({ format: 'html' });
|
|
43
|
-
const property = pConn.getStateProps().value;
|
|
44
|
-
handleEvent(actionsApi, 'changeNblur', property, editorValue);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
richTextComponent = (React.createElement(RichTextEditor, { ...additionalProps, label: label, labelHidden: hideLabel, info: helperTextToDisplay, defaultValue: value, placeholder: placeholder, disabled: disabled, required: required, testId: testId, ref: editorRef, error: status === 'error', onBlur: handleBlur, onChange: handleChange }));
|
|
48
|
-
}
|
|
49
|
-
return richTextComponent;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=RichText.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RichText.js","sourceRoot":"","sources":["../../../../src/components/field/RichText/RichText.tsx"],"names":[],"mappings":"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","sourcesContent":["import React, { useRef } from 'react';\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface RichTextProps extends PConnFieldProps {\n // If any, enter additional props that only exist on TextArea here\n additionalProps?: object;\n}\n\nexport default function RichText(props: RichTextProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n const RichTextEditor = getComponentFromMap('RichTextEditor');\n\n const { getPConnect, value, placeholder, validatemessage, label, hideLabel, helperText, testId, displayMode, additionalProps } = props;\n const pConn = getPConnect();\n const editorRef: any = useRef(null);\n\n let { readOnly, required, disabled } = props;\n [readOnly, required, disabled] = [readOnly, required, disabled].map((prop) => prop === true || (typeof prop === 'string' && prop === 'true'));\n\n const helperTextToDisplay = validatemessage || helperText;\n\n if (displayMode === 'LABELS_LEFT') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} />;\n }\n\n if (displayMode === 'STACKED_LARGE_VAL') {\n return <FieldValueList name={hideLabel ? '' : label} value={value} variant=\"stacked\" />;\n }\n\n let richTextComponent;\n\n if (readOnly) {\n // Rich Text read-only component\n richTextComponent = (\n <RichTextEditor\n {...additionalProps}\n label={label}\n labelHidden={hideLabel}\n defaultValue={value}\n testId={testId}\n info={helperTextToDisplay}\n ref={editorRef}\n readOnly\n />\n );\n } else {\n // Rich Text editable component\n const actionsApi = pConn.getActionsApi();\n let status = '';\n if (validatemessage !== '') {\n status = 'error';\n }\n const handleChange = () => {\n if (status === 'error') {\n const property = pConn.getStateProps().value;\n pConn.clearErrorMessages({\n property\n });\n }\n };\n\n const handleBlur = () => {\n if (editorRef.current) {\n const editorValue = editorRef.current.getContent({ format: 'html' });\n const property = pConn.getStateProps().value;\n handleEvent(actionsApi, 'changeNblur', property, editorValue);\n }\n };\n\n richTextComponent = (\n <RichTextEditor\n {...additionalProps}\n label={label}\n labelHidden={hideLabel}\n info={helperTextToDisplay}\n defaultValue={value}\n placeholder={placeholder}\n disabled={disabled}\n required={required}\n testId={testId}\n ref={editorRef}\n error={status === 'error'}\n onBlur={handleBlur}\n onChange={handleChange}\n />\n );\n }\n\n return richTextComponent;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/field/RichText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/field/RichText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC","sourcesContent":["export { default } from './RichText';\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { PConnProps } from '../../../types/PConnProps';
|
|
3
|
-
interface ScalarListProps extends PConnProps {
|
|
4
|
-
displayInModal: boolean;
|
|
5
|
-
hideLabel: boolean;
|
|
6
|
-
value: Array<any>;
|
|
7
|
-
componentType: string;
|
|
8
|
-
label: string;
|
|
9
|
-
displayMode: string;
|
|
10
|
-
}
|
|
11
|
-
export default function ScalarList(props: ScalarListProps): JSX.Element;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=ScalarList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarList.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/ScalarList.tsx"],"names":[],"mappings":";AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,UAAU,eAAgB,SAAQ,UAAU;IAE1C,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAcD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,eAmCxD"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/no-array-index-key */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
4
|
-
function CommaSeparatedList(props) {
|
|
5
|
-
const { items } = props;
|
|
6
|
-
return (React.createElement("ul", { style: { padding: '0', margin: '0' } }, items.map((value, index) => {
|
|
7
|
-
return React.createElement("span", { key: index }, value);
|
|
8
|
-
})));
|
|
9
|
-
}
|
|
10
|
-
export default function ScalarList(props) {
|
|
11
|
-
// Get emitted components from map (so we can get any override that may exist)
|
|
12
|
-
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
13
|
-
const { label, getPConnect, componentType, value: scalarValues, displayMode, hideLabel, ...restProps } = props;
|
|
14
|
-
const items = scalarValues?.map((scalarValue) => {
|
|
15
|
-
return getPConnect().createComponent({
|
|
16
|
-
type: componentType,
|
|
17
|
-
config: {
|
|
18
|
-
value: scalarValue,
|
|
19
|
-
displayMode: 'LABELS_LEFT',
|
|
20
|
-
label,
|
|
21
|
-
...restProps,
|
|
22
|
-
readOnly: 'true'
|
|
23
|
-
}
|
|
24
|
-
}, null, null, {}); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;
|
|
25
|
-
});
|
|
26
|
-
if (['LABELS_LEFT', 'STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode)) {
|
|
27
|
-
const displayComp = (React.createElement("div", null,
|
|
28
|
-
React.createElement(CommaSeparatedList, { items: items })));
|
|
29
|
-
return displayComp;
|
|
30
|
-
}
|
|
31
|
-
const displayComp = React.createElement(CommaSeparatedList, { items: items });
|
|
32
|
-
return React.createElement(FieldValueList, { name: hideLabel ? '' : label, value: displayComp, variant: "stacked" });
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=ScalarList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarList.js","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/ScalarList.tsx"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAchF,SAAS,kBAAkB,CAAC,KAAK;IAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAExB,OAAO,CACL,4BAAI,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,IACrC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QAC1B,OAAO,8BAAM,GAAG,EAAE,KAAK,IAAG,KAAK,CAAQ,CAAC;IAC1C,CAAC,CAAC,CACC,CACN,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,8EAA8E;IAC9E,MAAM,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE/G,MAAM,KAAK,GAAG,YAAY,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;QAC9C,OAAO,WAAW,EAAE,CAAC,eAAe,CAClC;YACE,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE;gBACN,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,aAAa;gBAC1B,KAAK;gBACL,GAAG,SAAS;gBACZ,QAAQ,EAAE,MAAM;aACjB;SACF,EACD,IAAI,EACJ,IAAI,EACJ,EAAE,CACH,CAAC,CAAC,8FAA8F;IACnG,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,aAAa,EAAE,mBAAmB,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QAC9E,MAAM,WAAW,GAAG,CAClB;YACE,oBAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI,CAChC,CACP,CAAC;QACF,OAAO,WAAW,CAAC;KACpB;IAED,MAAM,WAAW,GAAG,oBAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC;IAEzD,OAAO,oBAAC,cAAc,IAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAC,SAAS,GAAG,CAAC;AAChG,CAAC","sourcesContent":["/* eslint-disable react/no-array-index-key */\nimport React from 'react';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport type { PConnProps } from '../../../types/PConnProps';\n\n// ScalarListProps can't extend PConnFieldProps because its 'value' has a different type\ninterface ScalarListProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n displayInModal: boolean;\n hideLabel: boolean;\n value: Array<any>;\n componentType: string;\n label: string;\n displayMode: string;\n}\n\nfunction CommaSeparatedList(props) {\n const { items } = props;\n\n return (\n <ul style={{ padding: '0', margin: '0' }}>\n {items.map((value, index) => {\n return <span key={index}>{value}</span>;\n })}\n </ul>\n );\n}\n\nexport default function ScalarList(props: ScalarListProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const FieldValueList = getComponentFromMap('FieldValueList');\n const { label, getPConnect, componentType, value: scalarValues, displayMode, hideLabel, ...restProps } = props;\n\n const items = scalarValues?.map((scalarValue) => {\n return getPConnect().createComponent(\n {\n type: componentType,\n config: {\n value: scalarValue,\n displayMode: 'LABELS_LEFT',\n label,\n ...restProps,\n readOnly: 'true'\n }\n },\n null,\n null,\n {}\n ); // 2nd, 3rd, and 4th args empty string/object/null until typedef marked correctly as optional;\n });\n\n if (['LABELS_LEFT', 'STACKED_LARGE_VAL', 'DISPLAY_ONLY'].includes(displayMode)) {\n const displayComp = (\n <div>\n <CommaSeparatedList items={items} />\n </div>\n );\n return displayComp;\n }\n\n const displayComp = <CommaSeparatedList items={items} />;\n\n return <FieldValueList name={hideLabel ? '' : label} value={displayComp} variant=\"stacked\" />;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/field/ScalarList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { default } from './ScalarList';\n"]}
|
package/lib/hooks/index.d.ts
DELETED
package/lib/hooks/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
package/lib/hooks/index.js
DELETED
package/lib/hooks/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { default as useAfterInitialEffect } from './useAfterInitialEffect';\nexport { default as useConsolidatedRef } from './useConsolidatedRef';\nexport { default as useUID } from './useUID';\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EffectCallback, DependencyList } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @example useAfterInitialEffect(cb, dependencies);
|
|
4
|
-
* @param cb The function that should be executed whenever this hook is called. [React EffectCallback](https://reactjs.org/docs/hooks-reference.html#useeffect)
|
|
5
|
-
* @param dependencies A list of variables or functions that will initiate this hook when they are updated.
|
|
6
|
-
*/
|
|
7
|
-
declare const useAfterInitialEffect: (cb: EffectCallback, dependencies: DependencyList) => void;
|
|
8
|
-
export default useAfterInitialEffect;
|
|
9
|
-
//# sourceMappingURL=useAfterInitialEffect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAfterInitialEffect.d.ts","sourceRoot":"","sources":["../../src/hooks/useAfterInitialEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE1E;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,OAAQ,cAAc,uCAOhD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @example useAfterInitialEffect(cb, dependencies);
|
|
4
|
-
* @param cb The function that should be executed whenever this hook is called. [React EffectCallback](https://reactjs.org/docs/hooks-reference.html#useeffect)
|
|
5
|
-
* @param dependencies A list of variables or functions that will initiate this hook when they are updated.
|
|
6
|
-
*/
|
|
7
|
-
const useAfterInitialEffect = (cb, dependencies) => {
|
|
8
|
-
const ref = useRef(false);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
if (ref.current)
|
|
11
|
-
return cb();
|
|
12
|
-
ref.current = true;
|
|
13
|
-
}, dependencies);
|
|
14
|
-
};
|
|
15
|
-
export default useAfterInitialEffect;
|
|
16
|
-
//# sourceMappingURL=useAfterInitialEffect.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAfterInitialEffect.js","sourceRoot":"","sources":["../../src/hooks/useAfterInitialEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAkC,MAAM,OAAO,CAAC;AAE1E;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,CAAC,EAAkB,EAAE,YAA4B,EAAE,EAAE;IACjF,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE1B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,GAAG,CAAC,OAAO;YAAE,OAAO,EAAE,EAAE,CAAC;QAC7B,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACrB,CAAC,EAAE,YAAY,CAAC,CAAC;AACnB,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import { useEffect, useRef, EffectCallback, DependencyList } from 'react';\n\n/**\n * @example useAfterInitialEffect(cb, dependencies);\n * @param cb The function that should be executed whenever this hook is called. [React EffectCallback](https://reactjs.org/docs/hooks-reference.html#useeffect)\n * @param dependencies A list of variables or functions that will initiate this hook when they are updated.\n */\nconst useAfterInitialEffect = (cb: EffectCallback, dependencies: DependencyList) => {\n const ref = useRef(false);\n\n useEffect(() => {\n if (ref.current) return cb();\n ref.current = true;\n }, dependencies);\n};\n\nexport default useAfterInitialEffect;\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Ref, RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @example const ref = useConsolidatedRefs(refs);
|
|
4
|
-
* @param refs The ref or refs to consolidate.
|
|
5
|
-
* @returns ref:: The consolidated ref.
|
|
6
|
-
*/
|
|
7
|
-
declare const useConsolidatedRef: <T>(...refs: (Ref<T> | undefined)[]) => RefObject<T>;
|
|
8
|
-
export default useConsolidatedRef;
|
|
9
|
-
//# sourceMappingURL=useConsolidatedRef.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useConsolidatedRef.d.ts","sourceRoot":"","sources":["../../src/hooks/useConsolidatedRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,GAAG,EAAoB,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3E;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,sDAwBvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { useRef, useState } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @example const ref = useConsolidatedRefs(refs);
|
|
4
|
-
* @param refs The ref or refs to consolidate.
|
|
5
|
-
* @returns ref:: The consolidated ref.
|
|
6
|
-
*/
|
|
7
|
-
const useConsolidatedRef = (...refs) => {
|
|
8
|
-
const targetRef = useRef(null);
|
|
9
|
-
const [refProxy] = useState(() => Object.defineProperty({ current: null }, 'current', {
|
|
10
|
-
configurable: true,
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: () => targetRef.current,
|
|
13
|
-
set: (value) => {
|
|
14
|
-
targetRef.current = value;
|
|
15
|
-
refs.forEach((ref) => {
|
|
16
|
-
if (!ref)
|
|
17
|
-
return;
|
|
18
|
-
if (typeof ref === 'function') {
|
|
19
|
-
ref(targetRef.current);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
ref.current = targetRef.current;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}));
|
|
27
|
-
return refProxy;
|
|
28
|
-
};
|
|
29
|
-
export default useConsolidatedRef;
|
|
30
|
-
//# sourceMappingURL=useConsolidatedRef.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useConsolidatedRef.js","sourceRoot":"","sources":["../../src/hooks/useConsolidatedRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAoC,MAAM,OAAO,CAAC;AAE3E;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,CAAI,GAAG,IAA+B,EAAgB,EAAE;IACjF,MAAM,SAAS,GAA+B,MAAM,CAAI,IAAI,CAAC,CAAC;IAE9D,MAAM,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAC/B,MAAM,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE;QAClD,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;QAChB,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO;QAC5B,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE;YACb,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;YAC1B,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACnB,IAAI,CAAC,GAAG;oBAAE,OAAO;gBAEjB,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;oBAC7B,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;iBACxB;qBAAM;oBACJ,GAAkC,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;iBACjE;YACH,CAAC,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CACH,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { useRef, useState, Ref, MutableRefObject, RefObject } from 'react';\n\n/**\n * @example const ref = useConsolidatedRefs(refs);\n * @param refs The ref or refs to consolidate.\n * @returns ref:: The consolidated ref.\n */\nconst useConsolidatedRef = <T>(...refs: Array<Ref<T> | undefined>): RefObject<T> => {\n const targetRef: MutableRefObject<T | null> = useRef<T>(null);\n\n const [refProxy] = useState(() =>\n Object.defineProperty({ current: null }, 'current', {\n configurable: true,\n enumerable: true,\n get: () => targetRef.current,\n set: (value) => {\n targetRef.current = value;\n refs.forEach((ref) => {\n if (!ref) return;\n\n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n (ref as MutableRefObject<T | null>).current = targetRef.current;\n }\n });\n }\n })\n );\n\n return refProxy;\n};\n\nexport default useConsolidatedRef;\n"]}
|
package/lib/hooks/useUID.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generate unique identifier that is stable across renders.
|
|
3
|
-
* @example const stableUID = useUID();
|
|
4
|
-
* @returns uid:: The same autogenerated UID between renders.
|
|
5
|
-
*/
|
|
6
|
-
declare const useUID: () => string;
|
|
7
|
-
export default useUID;
|
|
8
|
-
//# sourceMappingURL=useUID.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUID.d.ts","sourceRoot":"","sources":["../../src/hooks/useUID.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,QAAA,MAAM,MAAM,QAAO,MAElB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/lib/hooks/useUID.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useRef } from 'react';
|
|
2
|
-
const createUID = () => {
|
|
3
|
-
return `_${Math.random().toString(36).slice(2, 11)}`;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Generate unique identifier that is stable across renders.
|
|
7
|
-
* @example const stableUID = useUID();
|
|
8
|
-
* @returns uid:: The same autogenerated UID between renders.
|
|
9
|
-
*/
|
|
10
|
-
const useUID = () => {
|
|
11
|
-
return useRef(createUID()).current;
|
|
12
|
-
};
|
|
13
|
-
export default useUID;
|
|
14
|
-
//# sourceMappingURL=useUID.js.map
|
package/lib/hooks/useUID.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUID.js","sourceRoot":"","sources":["../../src/hooks/useUID.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,MAAM,SAAS,GAAG,GAAW,EAAE;IAC7B,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;AACvD,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,GAAG,GAAW,EAAE;IAC1B,OAAO,MAAM,CAAS,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC;AAC7C,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { useRef } from 'react';\n\nconst createUID = (): string => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\n/**\n * Generate unique identifier that is stable across renders.\n * @example const stableUID = useUID();\n * @returns uid:: The same autogenerated UID between renders.\n */\nconst useUID = (): string => {\n return useRef<string>(createUID()).current;\n};\n\nexport default useUID;\n"]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// PConnProps.d.ts
|
|
2
|
-
// This gives us a place to have each component (which is most DX Components) that is
|
|
3
|
-
// expected to have a getPConnect extend its props (from BaseProps)
|
|
4
|
-
// such that every component will be expected to have a getPConnect() function
|
|
5
|
-
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
6
|
-
// This PConnProps can be extended to include other props that we know are in every component
|
|
7
|
-
export interface PConnProps {
|
|
8
|
-
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
9
|
-
getPConnect: () => typeof PConnect;
|
|
10
|
-
|
|
11
|
-
// Allow any/all other key/value pairs in the BaseProps for now
|
|
12
|
-
// TODO: refine which other props are always expected for various component
|
|
13
|
-
// types and consider further interface "subclassing". For example, we may
|
|
14
|
-
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
15
|
-
// and any other props that every Form component expects.
|
|
16
|
-
// For example, see the PConnFieldProps below.
|
|
17
|
-
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
18
|
-
// otherwise undefined types to appear. This can be helpful for debugging
|
|
19
|
-
// or when adding new components whose types aren't yet known.
|
|
20
|
-
// [key: string]: any;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
25
|
-
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
26
|
-
// components/field directory
|
|
27
|
-
export interface PConnFieldProps extends PConnProps {
|
|
28
|
-
label: string,
|
|
29
|
-
required: boolean,
|
|
30
|
-
disabled: boolean,
|
|
31
|
-
value?: string,
|
|
32
|
-
validatemessage: string,
|
|
33
|
-
status?: string,
|
|
34
|
-
onChange: any,
|
|
35
|
-
onBlur?: any,
|
|
36
|
-
readOnly: boolean,
|
|
37
|
-
testId: string,
|
|
38
|
-
helperText: string,
|
|
39
|
-
displayMode?: string,
|
|
40
|
-
hideLabel: boolean,
|
|
41
|
-
placeholder?: string
|
|
42
|
-
}
|