@pega/react-sdk-components 8.23.11 → 23.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +17 -0
- package/SECURITY.md +10 -0
- package/lib/bridge/Context/StoreContext.js +3 -3
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +24 -47
- package/lib/bridge/helpers/sdk_component_map.js.map +1 -1
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +17 -28
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +7 -10
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +2 -9
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +2 -10
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +6 -9
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +32 -33
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +10 -23
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/index.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +8 -3
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +25 -14
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +6 -18
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +6 -12
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +49 -67
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -2
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +9 -15
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +75 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +5 -11
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +15 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +17 -17
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +12 -2
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +78 -70
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/CancelAlert/index.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +9 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +13 -13
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +6 -1
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +15 -36
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +5 -6
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +5 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +15 -9
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +5 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +15 -9
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +8 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +13 -29
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Decimal/index.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +13 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +105 -15
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +5 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +12 -11
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Email/index.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +13 -0
- package/lib/components/field/Group/Group.d.ts.map +1 -0
- package/lib/components/field/Group/Group.js +15 -0
- package/lib/components/field/Group/Group.js.map +1 -0
- package/lib/components/field/Group/index.d.ts +2 -0
- package/lib/components/field/Group/index.d.ts.map +1 -0
- package/lib/components/field/Group/index.js +2 -0
- package/lib/components/field/Group/index.js.map +1 -0
- package/lib/components/field/Integer/Integer.d.ts +5 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +10 -8
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts +6 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +28 -29
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +5 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +10 -9
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/Phone/index.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +7 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +19 -15
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.d.ts +7 -0
- package/lib/components/field/RichText/RichText.d.ts.map +1 -0
- package/lib/components/field/RichText/RichText.js +54 -0
- package/lib/components/field/RichText/RichText.js.map +1 -0
- package/lib/components/field/RichText/index.d.ts +2 -0
- package/lib/components/field/RichText/index.d.ts.map +1 -0
- package/lib/components/field/RichText/index.js +2 -0
- package/lib/components/field/RichText/index.js.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.js +32 -0
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
- package/lib/components/field/ScalarList/index.d.ts +2 -0
- package/lib/components/field/ScalarList/index.d.ts.map +1 -0
- package/lib/components/field/ScalarList/index.js +2 -0
- package/lib/components/field/ScalarList/index.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +11 -19
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/utils.js +8 -8
- package/lib/components/field/SemanticLink/utils.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +6 -1
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +8 -6
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +7 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +2 -2
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +6 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +10 -7
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/TextInput/index.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +5 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +11 -9
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +5 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +10 -8
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/URL/index.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +20 -41
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +17 -46
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/field/UserReference/UserReferenceUtils.js +2 -2
- package/lib/components/field/UserReference/UserReferenceUtils.js.map +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +3 -3
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js +6 -6
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- package/lib/components/helpers/case-utils.d.ts.map +1 -1
- package/lib/components/helpers/case-utils.js +5 -4
- package/lib/components/helpers/case-utils.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +2 -1
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +4 -1
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- package/lib/components/helpers/data_page.js +2 -3
- package/lib/components/helpers/data_page.js.map +1 -1
- package/lib/components/helpers/date-format-utils.d.ts +1 -6
- package/lib/components/helpers/date-format-utils.d.ts.map +1 -1
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.d.ts +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js +3 -3
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js +3 -7
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Boolean.js +9 -20
- package/lib/components/helpers/formatters/Boolean.js.map +1 -1
- package/lib/components/helpers/formatters/Currency.d.ts +6 -6
- package/lib/components/helpers/formatters/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +13 -14
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts +69 -320
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js +500 -500
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.d.ts +5 -5
- package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Date.js +20 -20
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts +1 -1
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/formatters/common.js +1 -1
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +12 -12
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js +25 -19
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/reactContextHelpers.js +1 -1
- package/lib/components/helpers/reactContextHelpers.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +3 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +48 -54
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/helpers/state-utils.js +6 -8
- package/lib/components/helpers/state-utils.js.map +1 -1
- package/lib/components/helpers/template-utils.d.ts +7 -3
- package/lib/components/helpers/template-utils.d.ts.map +1 -1
- package/lib/components/helpers/template-utils.js +2 -2
- package/lib/components/helpers/template-utils.js.map +1 -1
- package/lib/components/helpers/utils.d.ts +1 -1
- package/lib/components/helpers/utils.d.ts.map +1 -1
- package/lib/components/helpers/utils.js +3 -8
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts +6 -0
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -1
- package/lib/components/helpers/versionHelpers.js +7 -1
- package/lib/components/helpers/versionHelpers.js.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +6 -13
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +11 -27
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/ActionButtons/index.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +9 -16
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +71 -74
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Assignment/index.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +7 -15
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +6 -20
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/AssignmentCard/index.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +10 -20
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +63 -192
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js +30 -30
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +9 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +36 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js +2 -0
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/index.js.map +1 -0
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +8 -17
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +179 -172
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/index.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +9 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js +29 -0
- package/lib/components/infra/Containers/SimpleView/SimpleView.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +10 -0
- package/lib/components/infra/Containers/SimpleView/helper.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/helper.js +102 -0
- package/lib/components/infra/Containers/SimpleView/helper.js.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts +2 -0
- package/lib/components/infra/Containers/SimpleView/index.d.ts.map +1 -0
- package/lib/components/infra/Containers/SimpleView/index.js +2 -0
- package/lib/components/infra/Containers/SimpleView/index.js.map +1 -0
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +24 -44
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/helpers.d.ts +2 -0
- package/lib/components/infra/Containers/helpers.d.ts.map +1 -0
- package/lib/components/infra/Containers/helpers.js +7 -0
- package/lib/components/infra/Containers/helpers.js.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -20
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +15 -33
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +10 -12
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +8 -13
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +11 -22
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/DeferLoad/index.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +17 -26
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.css +11 -15
- package/lib/components/infra/MultiStep/MultiStep.d.ts +10 -18
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +32 -97
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/MultiStep/index.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +103 -105
- package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +19 -66
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +8 -17
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Reference/Reference.js +5 -17
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +4 -8
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +2 -7
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +13 -20
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +41 -80
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/RootContainer/index.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +5 -8
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +19 -27
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js +6 -8
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +13 -17
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +13 -17
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +10 -32
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.css +22 -23
- package/lib/components/template/AppShell/AppShell.d.ts +20 -16
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +27 -45
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +12 -24
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +7 -25
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -8
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +48 -12
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +10 -23
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +22 -58
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -15
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +37 -19
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +10 -17
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +10 -28
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +15 -30
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +35 -72
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.css +7 -3
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +7 -11
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +5 -15
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +7 -15
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +8 -21
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -16
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +6 -23
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +7 -15
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +9 -22
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +7 -15
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +9 -22
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/index.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +10 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +45 -0
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -0
- package/lib/components/template/Details/DynamicTabs/index.d.ts +2 -0
- package/lib/components/template/Details/DynamicTabs/index.d.ts.map +1 -0
- package/lib/components/template/Details/DynamicTabs/index.js +2 -0
- package/lib/components/template/Details/DynamicTabs/index.js.map +1 -0
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +11 -26
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -8
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +3 -14
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -16
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +9 -17
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +5 -13
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +7 -11
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.d.ts.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.js.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +15 -8
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +168 -258
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/hooks.d.ts.map +1 -1
- package/lib/components/template/ListView/hooks.js +4 -6
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +45 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +165 -32
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +5 -16
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +11 -2
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js +2 -10
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +7 -15
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +9 -22
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.css +0 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +6 -2
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js +2 -5
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +8 -15
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +7 -18
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +5 -8
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +9 -13
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +5 -8
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +5 -8
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +2 -7
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.css +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +9 -14
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +14 -27
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +19 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +62 -13
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +24 -2
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +120 -130
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +14 -29
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +15 -33
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +8 -29
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +5 -11
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +7 -17
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js +2 -4
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.css +0 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +6 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +15 -24
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +5 -8
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +6 -12
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +15 -21
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +11 -2
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +3 -11
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +7 -15
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +23 -26
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.css +0 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +6 -2
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js +2 -5
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +8 -15
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +7 -17
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/index.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +18 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +20 -37
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +9 -17
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +13 -37
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +60 -1
- package/lib/components/widget/Attachment/Attachment.d.ts +8 -1
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +277 -343
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/Attachment/index.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +38 -36
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/CaseHistory/index.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +9 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +2 -4
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.css +2 -2
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +121 -140
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +5 -6
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +10 -25
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +8 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +59 -29
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.css +9 -9
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +8 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +8 -23
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryItem/index.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +8 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +6 -3
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.css +4 -4
- package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +26 -98
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/components_map.d.ts +2 -2
- package/lib/components_map.d.ts.map +1 -1
- package/lib/components_map.js +4 -2
- package/lib/components_map.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +39 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +4 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
- package/lib/hooks/useAfterInitialEffect.js +16 -0
- package/lib/hooks/useAfterInitialEffect.js.map +1 -0
- package/lib/hooks/useConsolidatedRef.d.ts +9 -0
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
- package/lib/hooks/useConsolidatedRef.js +30 -0
- package/lib/hooks/useConsolidatedRef.js.map +1 -0
- package/lib/hooks/useUID.d.ts +8 -0
- package/lib/hooks/useUID.d.ts.map +1 -0
- package/lib/hooks/useUID.js +14 -0
- package/lib/hooks/useUID.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/sdk-local-component-map.js +2 -2
- package/lib/sdk-pega-component-map.d.ts +21 -1
- package/lib/sdk-pega-component-map.js +112 -92
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +41 -0
- package/package.json +5 -2
- package/lib/components/helpers/auth.d.ts +0 -16
- package/lib/components/helpers/auth.d.ts.map +0 -1
- package/lib/components/helpers/auth.js +0 -437
- package/lib/components/helpers/auth.js.map +0 -1
- package/lib/components/helpers/authManager.d.ts +0 -18
- package/lib/components/helpers/authManager.d.ts.map +0 -1
- package/lib/components/helpers/authManager.js +0 -592
- package/lib/components/helpers/authManager.js.map +0 -1
- package/lib/components/helpers/config_access.d.ts +0 -3
- package/lib/components/helpers/config_access.d.ts.map +0 -1
- package/lib/components/helpers/config_access.js +0 -261
- package/lib/components/helpers/config_access.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operator.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Operator/Operator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO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,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAC,EACzD,UAAU,EAAE,EAAE,KAAK,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,EAAC,IAEvC,cAAc,EAAE,CACT,CACK,CAAC;AAEtB,CAAC;AAED,QAAQ,CAAC,YAAY,GAAG,EACvB,CAAA;AAED,QAAQ,CAAC,SAAS,GAAG;IACnB,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;CAC1C,CAAC","sourcesContent":["import React, {useState} from \"react\";\nimport PropTypes from \"prop-types\";\nimport TextField from '@material-ui/core/TextField';\nimport Popover from '@material-ui/core/Popover';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\n\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport Utils from '../../helpers/utils';\n\nimport PCoreType from '@pega/pcore-pconnect-typedefs/types/pcore';\n\ndeclare const PCore: typeof PCoreType;\n\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n padding: theme.spacing(1),\n margin: theme.spacing(1),\n },\n popover: {\n padding: theme.spacing(1),\n margin: theme.spacing(1),\n }\n}));\n\nexport default function Operator(props) {\n // const componentName = \"Operator\";\n const { caseOpConfig } = props;\n const classes = useStyles();\n\n const fieldLabel = caseOpConfig.label.toLowerCase();\n let caseOpLabel = \"---\";\n let caseOpName = \"---\";\n let caseOpId = \"\";\n let caseTime = null;\n\n if (fieldLabel === \"create operator\") {\n caseOpLabel = caseOpConfig.createLabel;\n caseOpName = caseOpConfig.createOperator.userName;\n caseTime = caseOpConfig.createDateTime;\n caseOpId = caseOpConfig.createOperator.userId;\n } else if (fieldLabel === \"update operator\") {\n caseOpLabel = caseOpConfig.updateLabel;\n caseOpName = caseOpConfig.updateOperator.userName;\n caseTime = caseOpConfig.updateDateTime;\n caseOpId = caseOpConfig.updateOperator.userId;\n }\n\n // Popover-related\n const [popoverAnchorEl, setPopoverAnchorEl] = useState(null);\n const [popoverFields, setPopoverFields] = useState<Array<any>>([]);\n\n const popoverOpen = Boolean(popoverAnchorEl);\n const popoverId = popoverOpen ? 'operator-details-popover' : undefined;\n\n const handlePopoverClose = (() => {\n setPopoverAnchorEl(null);\n })\n\n function showOperatorDetails(event) {\n\n const operatorPreviewPromise = PCore.getUserApi().getOperatorDetails(caseOpId);\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Operator';\n\n operatorPreviewPromise.then((res) => {\n const fillerString = \"---\";\n let fields: any = [];\n if (\n res.data &&\n res.data.pyOperatorInfo &&\n res.data.pyOperatorInfo.pyUserName\n ) {\n fields = [\n {\n id: \"pyPosition\",\n name: localizedVal(\"Position\", localeCategory),\n value: res.data.pyOperatorInfo.pyPosition ? res.data.pyOperatorInfo.pyPosition : fillerString\n },\n {\n id: \"pyOrganization\",\n name: localizedVal(\"Organization\", localeCategory),\n value: res.data.pyOperatorInfo.pyOrganization ? res.data.pyOperatorInfo.pyOrganization : fillerString\n },\n {\n id: \"ReportToUserName\",\n name: localizedVal('Reports to', localeCategory),\n value: res.data.pyOperatorInfo.pyReportToUserName ? res.data.pyOperatorInfo.pyReportToUserName : fillerString\n },\n {\n id: \"pyTelephone\",\n name: localizedVal('Telephone', localeCategory),\n value: res.data.pyOperatorInfo.pyTelephone ? <a href={`tel:${res.data.pyOperatorInfo.pyTelephone}`}>{res.data.pyOperatorInfo.pyTelephone}</a> : fillerString\n },\n {\n id: \"pyEmailAddress\",\n name: localizedVal('Email address', localeCategory),\n value: res.data.pyOperatorInfo.pyEmailAddress ? <a href={`mailto:${res.data.pyOperatorInfo.pyEmailAddress}`}>{res.data.pyOperatorInfo.pyEmailAddress}</a> : fillerString\n }\n ];\n } else {\n // eslint-disable-next-line no-console\n console.log(`Operator: PCore.getUserApi().getOperatorDetails(${caseOpId}); returned empty res.data.pyOperatorInfo.pyUserName - adding default`);\n fields = [\n {\n id: \"pyPosition\",\n name: localizedVal(\"Position\", localeCategory),\n value: fillerString\n },\n {\n id: \"pyOrganization\",\n name: localizedVal(\"Organization\", localeCategory),\n value: fillerString\n },\n {\n id: \"ReportToUserName\",\n name: localizedVal('Reports to', localeCategory),\n value: fillerString\n },\n {\n id: \"pyTelephone\",\n name: localizedVal('Telephone', localeCategory),\n value: fillerString\n },\n {\n id: \"pyEmailAddress\",\n name: localizedVal('Email address', localeCategory),\n value: fillerString\n }\n ];\n }\n // Whatever the fields are, update the component's popoverFields\n setPopoverFields(fields);\n });\n\n setPopoverAnchorEl(event.currentTarget);\n }\n\n function getPopoverGrid() {\n // return popoverFields.map((field) => {\n // return <div className={classes.popover}>{field.name}: {field.value}</div>\n // })\n\n if (popoverFields.length === 0) {\n return;\n }\n\n // There are fields, so build the grid.\n return <Grid container className={classes.popover} spacing={1}>\n <Grid item xs={12}><Typography variant=\"h6\">{caseOpName}</Typography></Grid>\n {popoverFields.map((field) => {\n return <React.Fragment key={field.id}>\n <Grid container item xs={12} spacing={1}>\n <Grid item xs={6}><Typography variant=\"caption\">{field.name}</Typography></Grid>\n <Grid item xs={6}><Typography variant=\"subtitle2\">{field.value}</Typography></Grid>\n </Grid>\n </React.Fragment>\n })}\n </Grid>\n\n }\n\n // End of popover-related\n\n return <React.Fragment>\n <TextField\n defaultValue={caseOpName}\n label={caseOpLabel}\n onClick={showOperatorDetails}\n InputProps={{\n readOnly: true,\n disableUnderline: true,\n inputProps: {style: {cursor: 'pointer'}}\n }}\n />\n <br />\n {Utils.generateDateTime(caseTime, \"DateTime-Since\")}\n\n <Popover\n id={popoverId}\n open={popoverOpen}\n anchorEl={popoverAnchorEl}\n onClose={handlePopoverClose}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'center'}}\n transformOrigin={{ vertical: 'top', horizontal: 'center'}}\n PaperProps={{ style: {maxWidth: '45ch'}}}\n >\n {getPopoverGrid()}\n </Popover>\n </React.Fragment>;\n\n}\n\nOperator.defaultProps = {\n}\n\nOperator.propTypes = {\n caseOpConfig: PropTypes.object.isRequired,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Operator.js","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ACb,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,kBAAkB,EAC3B,YAAY,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAC1D,eAAe,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,EAC1D,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,YAE1C,cAAc,EAAE,GACT,IACT,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport TextField from '@material-ui/core/TextField';\nimport Popover from '@material-ui/core/Popover';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport Utils from '../../helpers/utils';\nimport { PConnProps } from '../../../types/PConnProps';\n\n// Operator is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface OperatorProps extends PConnProps {\n // If any, enter additional props that only exist on this component\n label: string;\n createDateTime: string;\n createLabel: string;\n createOperator: { userName: string; userId: string };\n updateDateTime: string;\n updateLabel: string;\n updateOperator: { userName: string; userId: string };\n displayLabel?: any;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n padding: theme.spacing(1),\n margin: theme.spacing(1)\n },\n popover: {\n padding: theme.spacing(1),\n margin: theme.spacing(1)\n }\n}));\n\nexport default function Operator(props: OperatorProps) {\n // const componentName = \"Operator\";\n const classes = useStyles();\n\n const fieldLabel = props?.label?.toLowerCase();\n const displayLabel = props?.displayLabel?.toLowerCase();\n let caseOpLabel = '---';\n let caseOpName = '---';\n let caseOpId = '';\n let caseTime = '';\n\n if (fieldLabel === 'create operator' || displayLabel === 'create operator') {\n caseOpLabel = props.createLabel;\n caseOpName = props.createOperator.userName;\n caseTime = props.createDateTime;\n caseOpId = props.createOperator.userId;\n } else if (fieldLabel === 'update operator' || displayLabel === 'update operator') {\n caseOpLabel = props.updateLabel;\n caseOpName = props.updateOperator.userName;\n caseTime = props.updateDateTime;\n caseOpId = props.updateOperator.userId;\n }\n\n // Popover-related\n const [popoverAnchorEl, setPopoverAnchorEl] = useState(null);\n const [popoverFields, setPopoverFields] = useState<any[]>([]);\n\n const popoverOpen = Boolean(popoverAnchorEl);\n const popoverId = popoverOpen ? 'operator-details-popover' : undefined;\n\n const handlePopoverClose = () => {\n setPopoverAnchorEl(null);\n };\n\n function showOperatorDetails(event) {\n const operatorPreviewPromise = PCore.getUserApi().getOperatorDetails(caseOpId);\n const localizedVal = PCore.getLocaleUtils().getLocaleValue;\n const localeCategory = 'Operator';\n\n operatorPreviewPromise.then((res: any) => {\n const fillerString = '---';\n let fields: any = [];\n if (res.data && res.data.pyOperatorInfo && res.data.pyOperatorInfo.pyUserName) {\n fields = [\n {\n id: 'pyPosition',\n name: localizedVal('Position', localeCategory),\n value: res.data.pyOperatorInfo.pyPosition ? res.data.pyOperatorInfo.pyPosition : fillerString\n },\n {\n id: 'pyOrganization',\n name: localizedVal('Organization', localeCategory),\n value: res.data.pyOperatorInfo.pyOrganization ? res.data.pyOperatorInfo.pyOrganization : fillerString\n },\n {\n id: 'ReportToUserName',\n name: localizedVal('Reports to', localeCategory),\n value: res.data.pyOperatorInfo.pyReportToUserName ? res.data.pyOperatorInfo.pyReportToUserName : fillerString\n },\n {\n id: 'pyTelephone',\n name: localizedVal('Telephone', localeCategory),\n value: res.data.pyOperatorInfo.pyTelephone ? (\n <a href={`tel:${res.data.pyOperatorInfo.pyTelephone}`}>{res.data.pyOperatorInfo.pyTelephone}</a>\n ) : (\n fillerString\n )\n },\n {\n id: 'pyEmailAddress',\n name: localizedVal('Email address', localeCategory),\n value: res.data.pyOperatorInfo.pyEmailAddress ? (\n <a href={`mailto:${res.data.pyOperatorInfo.pyEmailAddress}`}>{res.data.pyOperatorInfo.pyEmailAddress}</a>\n ) : (\n fillerString\n )\n }\n ];\n } else {\n // eslint-disable-next-line no-console\n console.log(\n `Operator: PCore.getUserApi().getOperatorDetails(${caseOpId}); returned empty res.data.pyOperatorInfo.pyUserName - adding default`\n );\n fields = [\n {\n id: 'pyPosition',\n name: localizedVal('Position', localeCategory),\n value: fillerString\n },\n {\n id: 'pyOrganization',\n name: localizedVal('Organization', localeCategory),\n value: fillerString\n },\n {\n id: 'ReportToUserName',\n name: localizedVal('Reports to', localeCategory),\n value: fillerString\n },\n {\n id: 'pyTelephone',\n name: localizedVal('Telephone', localeCategory),\n value: fillerString\n },\n {\n id: 'pyEmailAddress',\n name: localizedVal('Email address', localeCategory),\n value: fillerString\n }\n ];\n }\n // Whatever the fields are, update the component's popoverFields\n setPopoverFields(fields);\n });\n\n setPopoverAnchorEl(event.currentTarget);\n }\n\n function getPopoverGrid() {\n // return popoverFields.map((field) => {\n // return <div className={classes.popover}>{field.name}: {field.value}</div>\n // })\n\n if (popoverFields.length === 0) {\n return;\n }\n\n // There are fields, so build the grid.\n return (\n <Grid container className={classes.popover} spacing={1}>\n <Grid item xs={12}>\n <Typography variant='h6'>{caseOpName}</Typography>\n </Grid>\n {popoverFields.map(field => {\n return (\n <React.Fragment key={field.id}>\n <Grid container item xs={12} spacing={1}>\n <Grid item xs={6}>\n <Typography variant='caption'>{field.name}</Typography>\n </Grid>\n <Grid item xs={6}>\n <Typography variant='subtitle2'>{field.value}</Typography>\n </Grid>\n </Grid>\n </React.Fragment>\n );\n })}\n </Grid>\n );\n }\n\n // End of popover-related\n\n return (\n <>\n <TextField\n defaultValue={caseOpName}\n label={caseOpLabel}\n onClick={showOperatorDetails}\n InputProps={{\n readOnly: true,\n disableUnderline: true,\n inputProps: { style: { cursor: 'pointer' } }\n }}\n />\n <br />\n {Utils.generateDateTime(caseTime, 'DateTime-Since')}\n\n <Popover\n id={popoverId}\n open={popoverOpen}\n anchorEl={popoverAnchorEl}\n onClose={handlePopoverClose}\n anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}\n transformOrigin={{ vertical: 'top', horizontal: 'center' }}\n PaperProps={{ style: { maxWidth: '45ch' } }}\n >\n {getPopoverGrid()}\n </Popover>\n </>\n );\n}\n"]}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
interface PulseProps {
|
|
3
|
+
}
|
|
4
|
+
export default function Pulse(props: PropsWithChildren<PulseProps>): JSX.Element;
|
|
5
|
+
export {};
|
|
3
6
|
//# sourceMappingURL=Pulse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pulse.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Pulse/Pulse.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Pulse.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Pulse/Pulse.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM1C,UAAU,UAAU;CAEnB;AAWD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC,UAAU,CAAC,eAajE"}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Card, CardContent, CardHeader, Typography } from "@material-ui/core";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Card, CardContent, CardHeader, Typography } from '@material-ui/core';
|
|
4
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
5
|
-
const useStyles = makeStyles(
|
|
4
|
+
const useStyles = makeStyles(theme => ({
|
|
6
5
|
root: {
|
|
7
6
|
marginTop: theme.spacing(1),
|
|
8
7
|
marginBottom: theme.spacing(1),
|
|
9
|
-
borderLeft:
|
|
8
|
+
borderLeft: '6px solid',
|
|
10
9
|
borderLeftColor: theme.palette.primary.light
|
|
11
|
-
}
|
|
10
|
+
}
|
|
12
11
|
}));
|
|
13
|
-
export default function Pulse(
|
|
14
|
-
//
|
|
12
|
+
export default function Pulse(props) {
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14
|
+
const { children } = props;
|
|
15
15
|
const classes = useStyles();
|
|
16
|
-
return (
|
|
17
|
-
React.createElement(CardHeader, { title: React.createElement(Typography, { variant: "h6" }, "Pulse") }),
|
|
18
|
-
React.createElement(CardContent, null,
|
|
19
|
-
React.createElement(Typography, null, "Pulse"))));
|
|
16
|
+
return (_jsxs(Card, { className: classes.root, children: [_jsx(CardHeader, { title: _jsx(Typography, { variant: 'h6', children: "Pulse" }) }), _jsx(CardContent, { children: _jsx(Typography, { children: "Pulse" }) })] }));
|
|
20
17
|
}
|
|
21
|
-
// Pulse.propTypes = {
|
|
22
|
-
// children: PropTypes.arrayOf(PropTypes.node).isRequired
|
|
23
|
-
// };
|
|
24
18
|
//# sourceMappingURL=Pulse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pulse.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Pulse/Pulse.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pulse.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Pulse/Pulse.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAQtD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,UAAU,EAAE,WAAW;QACvB,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK;KAC7C;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAoC;IAChE,6DAA6D;IAC7D,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAE5B,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,IAAI,aAC3B,KAAC,UAAU,IAAC,KAAK,EAAE,KAAC,UAAU,IAAC,OAAO,EAAC,IAAI,sBAAmB,GAAI,EAClE,KAAC,WAAW,cACV,KAAC,UAAU,wBAAmB,GAClB,IACT,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren } from 'react';\nimport { Card, CardContent, CardHeader, Typography } from '@material-ui/core';\nimport { makeStyles } from '@material-ui/core/styles';\n\n// Pulse is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface PulseProps {\n // If any, enter additional props that only exist on this component\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n borderLeft: '6px solid',\n borderLeftColor: theme.palette.primary.light\n }\n}));\n\nexport default function Pulse(props: PropsWithChildren<PulseProps>) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children } = props;\n const classes = useStyles();\n\n return (\n <Card className={classes.root}>\n <CardHeader title={<Typography variant='h6'>Pulse</Typography>} />\n <CardContent>\n <Typography>Pulse</Typography>\n </CardContent>\n </Card>\n );\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAe1C,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"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Editor } from '@tinymce/tinymce-react';
|
|
4
|
+
import { FormControl, FormHelperText, InputLabel, makeStyles } from '@material-ui/core';
|
|
5
|
+
import { useAfterInitialEffect, useConsolidatedRef, useUID } from '../../../hooks';
|
|
6
|
+
const useStyles = makeStyles(theme => ({
|
|
7
|
+
fieldLabel: {
|
|
8
|
+
position: 'relative',
|
|
9
|
+
transform: 'translate(0, 0px) scale(1)',
|
|
10
|
+
marginBottom: '5px',
|
|
11
|
+
color: theme.palette.text.secondary
|
|
12
|
+
}
|
|
13
|
+
}));
|
|
14
|
+
const RichTextEditor = forwardRef(function RichTextEditor(props, ref) {
|
|
15
|
+
const classes = useStyles();
|
|
16
|
+
const uid = useUID();
|
|
17
|
+
const { id = uid, defaultValue, label, labelHidden, info, testId, placeholder, disabled, required, readOnly, error, onBlur, onChange } = props;
|
|
18
|
+
const editorRef = useConsolidatedRef(ref);
|
|
19
|
+
let richTextComponent = null;
|
|
20
|
+
useAfterInitialEffect(() => {
|
|
21
|
+
editorRef?.current.mode.set(readOnly || disabled ? 'readonly' : 'design');
|
|
22
|
+
}, [readOnly, disabled]);
|
|
23
|
+
const filePickerCallback = cb => {
|
|
24
|
+
const input = document.createElement('input');
|
|
25
|
+
input.setAttribute('type', 'file');
|
|
26
|
+
input.setAttribute('accept', 'image/*');
|
|
27
|
+
input.addEventListener('change', (e) => {
|
|
28
|
+
const file = e.target.files[0];
|
|
29
|
+
const reader = new FileReader();
|
|
30
|
+
reader.addEventListener('load', () => {
|
|
31
|
+
/*
|
|
32
|
+
Note: Now we need to register the blob in TinyMCEs image blob
|
|
33
|
+
registry. In the next release this part hopefully won't be
|
|
34
|
+
necessary, as we are looking to handle it internally.
|
|
35
|
+
*/
|
|
36
|
+
const blobId = `blobid${new Date().getTime()}`;
|
|
37
|
+
const blobCache = editorRef.current.editorUpload.blobCache;
|
|
38
|
+
const base64 = reader.result.split(',')[1];
|
|
39
|
+
const blobInfo = blobCache.create(blobId, file, base64);
|
|
40
|
+
blobCache.add(blobInfo);
|
|
41
|
+
/* call the callback and populate the Title field with the file name */
|
|
42
|
+
cb(blobInfo.blobUri(), { title: file.name });
|
|
43
|
+
});
|
|
44
|
+
reader.readAsDataURL(file);
|
|
45
|
+
});
|
|
46
|
+
input.click();
|
|
47
|
+
};
|
|
48
|
+
if (readOnly) {
|
|
49
|
+
const value = defaultValue || '--';
|
|
50
|
+
// eslint-disable-next-line react/no-danger
|
|
51
|
+
richTextComponent = _jsx("div", { id: id, className: 'readonly-richtext-editor', dangerouslySetInnerHTML: { __html: value } }, id);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
richTextComponent = (_jsx(Editor, { tinymceScriptSrc: 'tinymce/tinymce.min.js', onInit: (_evt, editor) => {
|
|
55
|
+
editorRef.current = editor;
|
|
56
|
+
}, id: id, initialValue: defaultValue, disabled: disabled, init: {
|
|
57
|
+
placeholder,
|
|
58
|
+
menubar: false,
|
|
59
|
+
statusbar: false,
|
|
60
|
+
min_height: 130,
|
|
61
|
+
plugins: ['lists', 'advlist', 'autolink', 'image', 'link', 'autoresize'],
|
|
62
|
+
autoresize_bottom_margin: 0,
|
|
63
|
+
toolbar: disabled ? false : 'blocks | bold italic strikethrough | bullist numlist outdent indent | link image',
|
|
64
|
+
toolbar_location: 'bottom',
|
|
65
|
+
content_style: 'body { font-family:Helvetica, Arial,sans-serif; font-size:14px }',
|
|
66
|
+
branding: false,
|
|
67
|
+
paste_data_images: true,
|
|
68
|
+
file_picker_types: 'image',
|
|
69
|
+
file_picker_callback: filePickerCallback
|
|
70
|
+
}, onBlur: onBlur, onEditorChange: onChange }));
|
|
71
|
+
}
|
|
72
|
+
return (_jsxs(FormControl, { "data-test-id": testId, error: error, required: required, children: [!labelHidden && (_jsx(InputLabel, { id: 'demo-simple-select-error-label', className: classes.fieldLabel, children: label })), richTextComponent, info && _jsx(FormHelperText, { children: info })] }));
|
|
73
|
+
});
|
|
74
|
+
export default RichTextEditor;
|
|
75
|
+
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,M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,IACpC,CACf,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,cAAc,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\nimport { Editor } from '@tinymce/tinymce-react';\nimport { FormControl, FormHelperText, InputLabel, makeStyles } from '@material-ui/core';\n\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"]}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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,4 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './WssQuickCreate.css';
|
|
3
|
-
|
|
3
|
+
interface WssQuickCreateProps {
|
|
4
|
+
heading: string;
|
|
5
|
+
actions?: any[];
|
|
6
|
+
}
|
|
7
|
+
export default function WssQuickCreate(props: WssQuickCreateProps): JSX.Element;
|
|
8
|
+
export {};
|
|
4
9
|
//# sourceMappingURL=WssQuickCreate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WssQuickCreate.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"WssQuickCreate.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx"],"names":[],"mappings":";AACA,OAAO,sBAAsB,CAAC;AAI9B,UAAU,mBAAmB;IAE3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,eAyBhE"}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from '@material-ui/core';
|
|
3
3
|
import './WssQuickCreate.css';
|
|
4
4
|
export default function WssQuickCreate(props) {
|
|
5
5
|
const { heading, actions } = props;
|
|
6
|
-
return (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return (React.createElement("li", { className: 'quick-link-list', key: element.label },
|
|
11
|
-
React.createElement(Button, { className: 'quick-link-button', onClick: element.onClick },
|
|
12
|
-
React.createElement("span", { className: 'quick-link-button-span' },
|
|
13
|
-
element.icon && React.createElement("img", { className: 'quick-link-icon', src: element.icon }),
|
|
14
|
-
React.createElement("span", null, element.label)))));
|
|
15
|
-
}))));
|
|
6
|
+
return (_jsxs("div", { children: [_jsx("h1", { id: 'quick-links-heading', className: 'quick-link-heading', children: heading }), _jsx("ul", { id: 'quick-links', className: 'quick-link-ul-list', children: actions &&
|
|
7
|
+
actions.map(element => {
|
|
8
|
+
return (_jsx("li", { className: 'quick-link-list', children: _jsx(Button, { className: 'quick-link-button', onClick: element.onClick, children: _jsxs("span", { className: 'quick-link-button-span', children: [element.icon && _jsx("img", { className: 'quick-link-icon', src: element.icon }), _jsx("span", { children: element.label })] }) }) }, element.label));
|
|
9
|
+
}) })] }));
|
|
16
10
|
}
|
|
17
11
|
//# sourceMappingURL=WssQuickCreate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WssQuickCreate.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"WssQuickCreate.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,sBAAsB,CAAC;AAU9B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAA0B;IAC/D,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEnC,OAAO,CACL,0BACE,aAAI,EAAE,EAAC,qBAAqB,EAAC,SAAS,EAAC,oBAAoB,YACxD,OAAO,GACL,EACL,aAAI,EAAE,EAAC,aAAa,EAAC,SAAS,EAAC,oBAAoB,YAChD,OAAO;oBACN,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;wBACpB,OAAO,CACL,aAAI,SAAS,EAAC,iBAAiB,YAC7B,KAAC,MAAM,IAAC,SAAS,EAAC,mBAAmB,EAAC,OAAO,EAAE,OAAO,CAAC,OAAO,YAC5D,gBAAM,SAAS,EAAC,wBAAwB,aACrC,OAAO,CAAC,IAAI,IAAI,cAAK,SAAS,EAAC,iBAAiB,EAAC,GAAG,EAAE,OAAO,CAAC,IAAI,GAAI,EACvE,yBAAO,OAAO,CAAC,KAAK,GAAQ,IACvB,GACA,IAN0B,OAAO,CAAC,KAAK,CAO7C,CACN,CAAC;oBACJ,CAAC,CAAC,GACD,IACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { Button } from '@material-ui/core';\nimport './WssQuickCreate.css';\n\n// WssQuickCreate is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface WssQuickCreateProps {\n // If any, enter additional props that only exist on this component\n heading: string;\n actions?: any[];\n}\n\nexport default function WssQuickCreate(props: WssQuickCreateProps) {\n const { heading, actions } = props;\n\n return (\n <div>\n <h1 id='quick-links-heading' className='quick-link-heading'>\n {heading}\n </h1>\n <ul id='quick-links' className='quick-link-ul-list'>\n {actions &&\n actions.map(element => {\n return (\n <li className='quick-link-list' key={element.label}>\n <Button className='quick-link-button' onClick={element.onClick}>\n <span className='quick-link-button-span'>\n {element.icon && <img className='quick-link-icon' src={element.icon} />}\n <span>{element.label}</span>\n </span>\n </Button>\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n"]}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
3
|
+
interface AutoCompleteProps extends PConnFieldProps {
|
|
4
|
+
displayMode?: string;
|
|
5
|
+
deferDatasource?: boolean;
|
|
6
|
+
datasourceMetadata?: any;
|
|
7
|
+
status?: string;
|
|
8
|
+
onRecordChange?: any;
|
|
9
|
+
additionalProps?: object;
|
|
10
|
+
listType: string;
|
|
11
|
+
parameters?: any;
|
|
12
|
+
datasource: any;
|
|
13
|
+
columns: any[];
|
|
14
|
+
}
|
|
15
|
+
export default function AutoComplete(props: AutoCompleteProps): JSX.Element;
|
|
16
|
+
export {};
|
|
3
17
|
//# sourceMappingURL=AutoComplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/field/AutoComplete/AutoComplete.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/field/AutoComplete/AutoComplete.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA8B5D,UAAU,iBAAkB,SAAQ,eAAe;IAEjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,UAAU,EAAE,GAAG,CAAC;IAChB,OAAO,EAAE,GAAG,EAAE,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,eAoK5D"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
2
3
|
import { TextField } from '@material-ui/core';
|
|
3
4
|
import Autocomplete from '@material-ui/lab/Autocomplete';
|
|
4
|
-
import Utils from '../../helpers/utils';
|
|
5
|
-
import TextInput from '../TextInput';
|
|
6
5
|
import isDeepEqual from 'fast-deep-equal/react';
|
|
6
|
+
import Utils from '../../helpers/utils';
|
|
7
7
|
import { getDataPage } from '../../helpers/data_page';
|
|
8
8
|
import handleEvent from '../../helpers/event-utils';
|
|
9
|
-
import
|
|
9
|
+
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
10
10
|
const preProcessColumns = columnList => {
|
|
11
11
|
return columnList.map(col => {
|
|
12
12
|
const tempColObj = { ...col };
|
|
@@ -30,6 +30,9 @@ const getDisplayFieldsMetaData = columnList => {
|
|
|
30
30
|
return metaDataObj;
|
|
31
31
|
};
|
|
32
32
|
export default function AutoComplete(props) {
|
|
33
|
+
// Get emitted components from map (so we can get any override that may exist)
|
|
34
|
+
const TextInput = getComponentFromMap('TextInput');
|
|
35
|
+
const FieldValueList = getComponentFromMap('FieldValueList');
|
|
33
36
|
const { getPConnect, label, required, placeholder, value = '', validatemessage, readOnly, testId, displayMode, deferDatasource, datasourceMetadata, status, helperText, hideLabel, onRecordChange } = props;
|
|
34
37
|
const context = getPConnect().getContextName();
|
|
35
38
|
let { listType, parameters, datasource = [], columns = [] } = props;
|
|
@@ -58,13 +61,10 @@ export default function AutoComplete(props) {
|
|
|
58
61
|
if (deferDatasource && datasourceMetadata?.datasource?.name) {
|
|
59
62
|
listType = 'datapage';
|
|
60
63
|
datasource = datasourceMetadata.datasource.name;
|
|
61
|
-
parameters =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const valueProp = datasourceMetadata.datasource.propertyForValue.startsWith('@P')
|
|
66
|
-
? datasourceMetadata.datasource.propertyForValue.substring(3)
|
|
67
|
-
: datasourceMetadata.datasource.propertyForValue;
|
|
64
|
+
const { parameters: dataSourceParameters, propertyForDisplayText, propertyForValue } = datasourceMetadata.datasource;
|
|
65
|
+
parameters = flattenParameters(dataSourceParameters);
|
|
66
|
+
const displayProp = propertyForDisplayText.startsWith('@P') ? propertyForDisplayText.substring(3) : propertyForDisplayText;
|
|
67
|
+
const valueProp = propertyForValue.startsWith('@P') ? propertyForValue.substring(3) : propertyForValue;
|
|
68
68
|
columns = [
|
|
69
69
|
{
|
|
70
70
|
key: 'true',
|
|
@@ -82,7 +82,7 @@ export default function AutoComplete(props) {
|
|
|
82
82
|
columns = preProcessColumns(columns);
|
|
83
83
|
useEffect(() => {
|
|
84
84
|
if (listType === 'associated') {
|
|
85
|
-
setOptions(Utils.getOptionList(props, getPConnect().getDataObject()));
|
|
85
|
+
setOptions(Utils.getOptionList(props, getPConnect().getDataObject('')));
|
|
86
86
|
}
|
|
87
87
|
}, [theDatasource]);
|
|
88
88
|
useEffect(() => {
|
|
@@ -103,10 +103,10 @@ export default function AutoComplete(props) {
|
|
|
103
103
|
}
|
|
104
104
|
}, []);
|
|
105
105
|
if (displayMode === 'LABELS_LEFT') {
|
|
106
|
-
return
|
|
106
|
+
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value });
|
|
107
107
|
}
|
|
108
108
|
if (displayMode === 'STACKED_LARGE_VAL') {
|
|
109
|
-
return
|
|
109
|
+
return _jsx(FieldValueList, { name: hideLabel ? '' : label, value: value, variant: 'stacked' });
|
|
110
110
|
}
|
|
111
111
|
if (value) {
|
|
112
112
|
const index = options?.findIndex(element => element.key === value);
|
|
@@ -129,14 +129,14 @@ export default function AutoComplete(props) {
|
|
|
129
129
|
};
|
|
130
130
|
if (readOnly) {
|
|
131
131
|
const theValAsString = options?.find(opt => opt.key === value)?.value;
|
|
132
|
-
return
|
|
132
|
+
return _jsx(TextInput, { ...props, value: theValAsString });
|
|
133
133
|
}
|
|
134
134
|
// Need to use both getOptionLabel and getOptionSelected to map our
|
|
135
135
|
// key/value structure to what Autocomplete expects
|
|
136
|
-
return (
|
|
136
|
+
return (_jsx(Autocomplete, { options: options, getOptionLabel: (option) => {
|
|
137
137
|
return option.value ? option.value : '';
|
|
138
138
|
}, getOptionSelected: (option) => {
|
|
139
139
|
return option.value ? option.value : '';
|
|
140
|
-
}, fullWidth: true, onChange: handleChange, value: selectedValue, inputValue: inputValue || selectedValue, onInputChange: handleInputValue, renderInput: params => (
|
|
140
|
+
}, fullWidth: true, onChange: handleChange, value: selectedValue, inputValue: inputValue || selectedValue, onInputChange: handleInputValue, renderInput: params => (_jsx(TextField, { ...params, fullWidth: true, variant: 'outlined', helperText: helperTextToDisplay, placeholder: placeholder, size: 'small', required: required, error: status === 'error', label: label, "data-test-id": testId })) }));
|
|
141
141
|
}
|
|
142
142
|
//# sourceMappingURL=AutoComplete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoComplete.js","sourceRoot":"","sources":["../../../../src/components/field/AutoComplete/AutoComplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,YAAY,MAAM,+BAA+B,CAAC;AACzD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,cAAc,MAAM,4CAA4C,CAAC;AAOxE,MAAM,iBAAiB,GAAG,UAAU,CAAC,EAAE;IACrC,OAAO,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QAC1B,MAAM,UAAU,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;QAC9B,UAAU,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;QAC/F,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,UAAU,CAAC,EAAE;IAC5C,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC;IACxE,MAAM,WAAW,GAAQ,EAAE,GAAG,EAAE,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Q,EAClB,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,kBACE,MAAM,GACpB,CACH,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { TextField } from '@material-ui/core';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport Utils from '../../helpers/utils';\nimport TextInput from '../TextInput';\nimport isDeepEqual from 'fast-deep-equal/react';\nimport { getDataPage } from '../../helpers/data_page';\nimport handleEvent from '../../helpers/event-utils';\nimport FieldValueList from '../../designSystemExtension/FieldValueList';\n\ninterface IOption {\n key: string;\n value: string;\n}\n\nconst preProcessColumns = columnList => {\n return columnList.map(col => {\n const tempColObj = { ...col };\n tempColObj.value = col.value && col.value.startsWith('.') ? col.value.substring(1) : col.value;\n return tempColObj;\n });\n};\n\nconst getDisplayFieldsMetaData = columnList => {\n const displayColumns = columnList.filter(col => col.display === 'true');\n const metaDataObj: any = { key: '', primary: '', secondary: [] };\n const keyCol = columnList.filter(col => col.key === 'true');\n metaDataObj.key = keyCol.length > 0 ? keyCol[0].value : 'auto';\n for (let index = 0; index < displayColumns.length; index += 1) {\n if (displayColumns[index].primary === 'true') {\n metaDataObj.primary = displayColumns[index].value;\n } else {\n metaDataObj.secondary.push(displayColumns[index].value);\n }\n }\n return metaDataObj;\n};\n\nexport default function AutoComplete(props) {\n const {\n getPConnect,\n label,\n required,\n placeholder,\n value = '',\n validatemessage,\n readOnly,\n testId,\n displayMode,\n deferDatasource,\n datasourceMetadata,\n status,\n helperText,\n hideLabel,\n onRecordChange\n } = props;\n const context = getPConnect().getContextName();\n let { listType, parameters, datasource = [], columns = [] } = props;\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState<Array<IOption>>([]);\n const [theDatasource, setDatasource] = useState(null);\n let selectedValue: any = '';\n const helperTextToDisplay = validatemessage || helperText;\n\n const thePConn = getPConnect();\n const actionsApi = thePConn.getActionsApi();\n const propName = thePConn.getStateProps().value;\n\n if (!isDeepEqual(datasource, theDatasource)) {\n // inbound datasource is different, so update theDatasource (to trigger useEffect)\n setDatasource(datasource);\n }\n\n const flattenParameters = (params = {}) => {\n const flatParams = {};\n Object.keys(params).forEach(key => {\n const { name, value: theVal } = params[key];\n flatParams[name] = theVal;\n });\n\n return flatParams;\n };\n\n // convert associated to datapage listtype and transform props\n // Process deferDatasource when datapage name is present. WHhen tableType is promptList / localList\n if (deferDatasource && datasourceMetadata?.datasource?.name) {\n listType = 'datapage';\n datasource = datasourceMetadata.datasource.name;\n parameters = flattenParameters(datasourceMetadata?.datasource?.parameters);\n const displayProp = datasourceMetadata.datasource.propertyForDisplayText.startsWith('@P')\n ? datasourceMetadata.datasource.propertyForDisplayText.substring(3)\n : datasourceMetadata.datasource.propertyForDisplayText;\n const valueProp = datasourceMetadata.datasource.propertyForValue.startsWith('@P')\n ? datasourceMetadata.datasource.propertyForValue.substring(3)\n : datasourceMetadata.datasource.propertyForValue;\n columns = [\n {\n key: 'true',\n setProperty: 'Associated property',\n value: valueProp\n },\n {\n display: 'true',\n primary: 'true',\n useForSearch: true,\n value: displayProp\n }\n ];\n }\n columns = preProcessColumns(columns);\n\n useEffect(() => {\n if (listType === 'associated') {\n setOptions(Utils.getOptionList(props, getPConnect().getDataObject()));\n }\n }, [theDatasource]);\n\n useEffect(() => {\n if (!displayMode && listType !== 'associated') {\n getDataPage(datasource, parameters, context).then((results: any) => {\n const optionsData: Array<any> = [];\n const displayColumn = getDisplayFieldsMetaData(columns);\n results?.forEach(element => {\n const val = element[displayColumn.primary]?.toString();\n const obj = {\n key: element[displayColumn.key] || element.pyGUID,\n value: val\n };\n optionsData.push(obj);\n });\n setOptions(optionsData);\n });\n }\n }, []);\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 if (value) {\n const index = options?.findIndex(element => element.key === value);\n if (index > -1) {\n selectedValue = options[index].value;\n } else {\n selectedValue = value;\n }\n }\n\n const handleChange = (event: object, newValue) => {\n const val = newValue ? newValue.key : '';\n handleEvent(actionsApi, 'changeNblur', propName, val);\n if (onRecordChange) {\n onRecordChange(event);\n }\n };\n\n const handleInputValue = (event, newInputValue) => {\n setInputValue(newInputValue);\n };\n\n if (readOnly) {\n const theValAsString = options?.find(opt => opt.key === value)?.value;\n return <TextInput {...props} value={theValAsString} />;\n }\n // Need to use both getOptionLabel and getOptionSelected to map our\n // key/value structure to what Autocomplete expects\n return (\n <Autocomplete\n options={options}\n getOptionLabel={(option: IOption) => {\n return option.value ? option.value : '';\n }}\n getOptionSelected={(option: any) => {\n return option.value ? option.value : '';\n }}\n fullWidth\n onChange={handleChange}\n value={selectedValue}\n inputValue={inputValue || selectedValue}\n onInputChange={handleInputValue}\n renderInput={params => (\n <TextField\n {...params}\n fullWidth\n variant='outlined'\n helperText={helperTextToDisplay}\n placeholder={placeholder}\n size='small'\n required={required}\n error={status === 'error'}\n label={label}\n data-test-id={testId}\n />\n )}\n />\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AutoComplete.js","sourceRoot":"","sources":["../../../../src/components/field/AutoComplete/AutoComplete.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,YAAY,MAAM,+BAA+B,CAAC;AACzD,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAEhD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAQhF,MAAM,iBAAiB,GAAG,UAAU,CAAC,EAAE;IACrC,OAAO,UAAU,C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O,EAChB,cAAc,EAAE,CAAC,MAAe,EAAE,EAAE;YAClC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,CAAC,EACD,iBAAiB,EAAE,CAAC,MAAW,EAAE,EAAE;YACjC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,CAAC,EACD,SAAS,QACT,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,aAAa,EACpB,UAAU,EAAE,UAAU,IAAI,aAAa,EACvC,aAAa,EAAE,gBAAgB,EAC/B,WAAW,EAAE,MAAM,CAAC,EAAE,CAAC,CACrB,KAAC,SAAS,OACJ,MAAM,EACV,SAAS,QACT,OAAO,EAAC,UAAU,EAClB,UAAU,EAAE,mBAAmB,EAC/B,WAAW,EAAE,WAAW,EACxB,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,KAAK,OAAO,EACzB,KAAK,EAAE,KAAK,kBACE,MAAM,GACpB,CACH,GACD,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useEffect, useState } from 'react';\nimport { TextField } from '@material-ui/core';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport isDeepEqual from 'fast-deep-equal/react';\n\nimport Utils from '../../helpers/utils';\nimport { getDataPage } from '../../helpers/data_page';\nimport handleEvent from '../../helpers/event-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\nimport { PConnFieldProps } from '../../../types/PConnProps';\n\ninterface IOption {\n key: string;\n value: string;\n}\n\nconst preProcessColumns = columnList => {\n return columnList.map(col => {\n const tempColObj = { ...col };\n tempColObj.value = col.value && col.value.startsWith('.') ? col.value.substring(1) : col.value;\n return tempColObj;\n });\n};\n\nconst getDisplayFieldsMetaData = columnList => {\n const displayColumns = columnList.filter(col => col.display === 'true');\n const metaDataObj: any = { key: '', primary: '', secondary: [] };\n const keyCol = columnList.filter(col => col.key === 'true');\n metaDataObj.key = keyCol.length > 0 ? keyCol[0].value : 'auto';\n for (let index = 0; index < displayColumns.length; index += 1) {\n if (displayColumns[index].primary === 'true') {\n metaDataObj.primary = displayColumns[index].value;\n } else {\n metaDataObj.secondary.push(displayColumns[index].value);\n }\n }\n return metaDataObj;\n};\n\ninterface AutoCompleteProps extends PConnFieldProps {\n // If any, enter additional props that only exist on AutoComplete here'\n displayMode?: string;\n deferDatasource?: boolean;\n datasourceMetadata?: any;\n status?: string;\n onRecordChange?: any;\n additionalProps?: object;\n listType: string;\n parameters?: any;\n datasource: any;\n columns: any[];\n}\n\nexport default function AutoComplete(props: AutoCompleteProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const TextInput = getComponentFromMap('TextInput');\n const FieldValueList = getComponentFromMap('FieldValueList');\n\n const {\n getPConnect,\n label,\n required,\n placeholder,\n value = '',\n validatemessage,\n readOnly,\n testId,\n displayMode,\n deferDatasource,\n datasourceMetadata,\n status,\n helperText,\n hideLabel,\n onRecordChange\n } = props;\n\n const context = getPConnect().getContextName();\n let { listType, parameters, datasource = [], columns = [] } = props;\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState<IOption[]>([]);\n const [theDatasource, setDatasource] = useState(null);\n let selectedValue: any = '';\n const helperTextToDisplay = validatemessage || helperText;\n\n const thePConn = getPConnect();\n const actionsApi = thePConn.getActionsApi();\n const propName = (thePConn.getStateProps() as any).value;\n\n if (!isDeepEqual(datasource, theDatasource)) {\n // inbound datasource is different, so update theDatasource (to trigger useEffect)\n setDatasource(datasource);\n }\n\n const flattenParameters = (params = {}) => {\n const flatParams = {};\n Object.keys(params).forEach(key => {\n const { name, value: theVal } = params[key];\n flatParams[name] = theVal;\n });\n\n return flatParams;\n };\n\n // convert associated to datapage listtype and transform props\n // Process deferDatasource when datapage name is present. WHhen tableType is promptList / localList\n if (deferDatasource && datasourceMetadata?.datasource?.name) {\n listType = 'datapage';\n datasource = datasourceMetadata.datasource.name;\n const { parameters: dataSourceParameters, propertyForDisplayText, propertyForValue } = datasourceMetadata.datasource;\n parameters = flattenParameters(dataSourceParameters);\n const displayProp = propertyForDisplayText.startsWith('@P') ? propertyForDisplayText.substring(3) : propertyForDisplayText;\n const valueProp = propertyForValue.startsWith('@P') ? propertyForValue.substring(3) : propertyForValue;\n columns = [\n {\n key: 'true',\n setProperty: 'Associated property',\n value: valueProp\n },\n {\n display: 'true',\n primary: 'true',\n useForSearch: true,\n value: displayProp\n }\n ];\n }\n columns = preProcessColumns(columns);\n\n useEffect(() => {\n if (listType === 'associated') {\n setOptions(Utils.getOptionList(props, getPConnect().getDataObject('')));\n }\n }, [theDatasource]);\n\n useEffect(() => {\n if (!displayMode && listType !== 'associated') {\n getDataPage(datasource, parameters, context).then((results: any) => {\n const optionsData: any[] = [];\n const displayColumn = getDisplayFieldsMetaData(columns);\n results?.forEach(element => {\n const val = element[displayColumn.primary]?.toString();\n const obj = {\n key: element[displayColumn.key] || element.pyGUID,\n value: val\n };\n optionsData.push(obj);\n });\n setOptions(optionsData);\n });\n }\n }, []);\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 if (value) {\n const index = options?.findIndex(element => element.key === value);\n if (index > -1) {\n selectedValue = options[index].value;\n } else {\n selectedValue = value;\n }\n }\n\n const handleChange = (event: object, newValue) => {\n const val = newValue ? newValue.key : '';\n handleEvent(actionsApi, 'changeNblur', propName, val);\n if (onRecordChange) {\n onRecordChange(event);\n }\n };\n\n const handleInputValue = (event, newInputValue) => {\n setInputValue(newInputValue);\n };\n\n if (readOnly) {\n const theValAsString = options?.find(opt => opt.key === value)?.value;\n return <TextInput {...props} value={theValAsString} />;\n }\n // Need to use both getOptionLabel and getOptionSelected to map our\n // key/value structure to what Autocomplete expects\n return (\n <Autocomplete\n options={options}\n getOptionLabel={(option: IOption) => {\n return option.value ? option.value : '';\n }}\n getOptionSelected={(option: any) => {\n return option.value ? option.value : '';\n }}\n fullWidth\n onChange={handleChange}\n value={selectedValue}\n inputValue={inputValue || selectedValue}\n onInputChange={handleInputValue}\n renderInput={params => (\n <TextField\n {...params}\n fullWidth\n variant='outlined'\n helperText={helperTextToDisplay}\n placeholder={placeholder}\n size='small'\n required={required}\n error={status === 'error'}\n label={label}\n data-test-id={testId}\n />\n )}\n />\n );\n}\n"]}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { PConnFieldProps } from '../../../types/PConnProps';
|
|
2
3
|
import './CancelAlert.css';
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
interface CancelAlertProps extends PConnFieldProps {
|
|
5
|
+
heading: string;
|
|
6
|
+
content: string;
|
|
7
|
+
itemKey: string;
|
|
8
|
+
hideDelete: boolean;
|
|
9
|
+
isDataObject: boolean;
|
|
10
|
+
skipReleaseLockRequest: any;
|
|
11
|
+
dismiss: Function;
|
|
12
|
+
}
|
|
13
|
+
export default function CancelAlert(props: CancelAlertProps): JSX.Element;
|
|
14
|
+
export {};
|
|
5
15
|
//# sourceMappingURL=CancelAlert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancelAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/CancelAlert.tsx"],"names":[],"mappings":";AAIA,OAAO,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"CancelAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/field/CancelAlert/CancelAlert.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAiB,SAAQ,eAAe;IAEhD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,sBAAsB,EAAE,GAAG,CAAC;IAC5B,OAAO,EAAE,QAAQ,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAkI1D"}
|