@pega/react-sdk-components 0.23.26 → 8.8.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/Context/StoreContext.d.ts +3 -2
- package/lib/bridge/Context/StoreContext.d.ts.map +1 -1
- package/lib/bridge/Context/StoreContext.js +2 -3
- package/lib/bridge/Context/StoreContext.js.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.d.ts +1 -0
- package/lib/bridge/helpers/sdk_component_map.d.ts.map +1 -1
- package/lib/bridge/helpers/sdk_component_map.js +22 -0
- 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 +2 -14
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +10 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +19 -0
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -0
- package/lib/components/designSystemExtension/AlertBanner/index.d.ts +2 -0
- package/lib/components/designSystemExtension/AlertBanner/index.d.ts.map +1 -0
- package/lib/components/designSystemExtension/AlertBanner/index.js +2 -0
- package/lib/components/designSystemExtension/AlertBanner/index.js.map +1 -0
- package/lib/components/designSystemExtension/Banner/Banner.d.ts +15 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts +6 -9
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +3 -7
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +4 -10
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +1 -8
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +6 -2
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +3 -3
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js +4 -4
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.js.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts +7 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +3 -3
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +17 -7
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +13 -16
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +5 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +3 -6
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts +19 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +77 -0
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.d.ts.map +1 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js +2 -0
- package/lib/components/designSystemExtension/RichTextEditor/index.js.map +1 -0
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +6 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +2 -2
- 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 -15
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +7 -2
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +12 -10
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +19 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +12 -10
- 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 +11 -11
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts +1 -1
- package/lib/components/field/Currency/currency-utils.d.ts.map +1 -1
- package/lib/components/field/Currency/currency-utils.js +1 -1
- package/lib/components/field/Currency/currency-utils.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +5 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +19 -11
- 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 +43 -9
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +10 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +26 -9
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +5 -1
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +7 -5
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +5 -1
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +6 -4
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts +5 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +6 -4
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +5 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +10 -7
- package/lib/components/field/Phone/Phone.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 +24 -11
- 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 +51 -0
- package/lib/components/field/RichText/RichText.js.map +1 -0
- package/lib/components/field/RichText/index.d.ts +2 -0
- package/lib/components/field/RichText/index.d.ts.map +1 -0
- package/lib/components/field/RichText/index.js +2 -0
- package/lib/components/field/RichText/index.js.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts +13 -0
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -0
- package/lib/components/field/ScalarList/ScalarList.js +34 -0
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -0
- package/lib/components/field/ScalarList/index.d.ts +2 -0
- package/lib/components/field/ScalarList/index.d.ts.map +1 -0
- package/lib/components/field/ScalarList/index.js +2 -0
- package/lib/components/field/ScalarList/index.js.map +1 -0
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +5 -9
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +10 -14
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/SemanticLink/utils.d.ts.map +1 -1
- 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 +5 -3
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +7 -1
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +6 -1
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +24 -5
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +5 -1
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +14 -8
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +5 -1
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +11 -5
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +19 -40
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +16 -45
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/helpers/attachmentHelpers.d.ts +6 -6
- package/lib/components/helpers/attachmentHelpers.d.ts.map +1 -1
- package/lib/components/helpers/attachmentHelpers.js +2 -2
- package/lib/components/helpers/attachmentHelpers.js.map +1 -1
- package/lib/components/helpers/auth.d.ts +8 -6
- package/lib/components/helpers/auth.d.ts.map +1 -1
- package/lib/components/helpers/auth.js +642 -327
- package/lib/components/helpers/auth.js.map +1 -1
- package/lib/components/helpers/authManager.d.ts +20 -17
- package/lib/components/helpers/authManager.d.ts.map +1 -1
- package/lib/components/helpers/authManager.js +713 -438
- package/lib/components/helpers/authManager.js.map +1 -1
- package/lib/components/helpers/case-utils.d.ts +20 -0
- package/lib/components/helpers/case-utils.d.ts.map +1 -0
- package/lib/components/helpers/case-utils.js +82 -0
- package/lib/components/helpers/case-utils.js.map +1 -0
- package/lib/components/helpers/common-utils.d.ts +2 -0
- package/lib/components/helpers/common-utils.d.ts.map +1 -0
- package/lib/components/helpers/common-utils.js +5 -0
- package/lib/components/helpers/common-utils.js.map +1 -0
- package/lib/components/helpers/config_access.d.ts.map +1 -1
- package/lib/components/helpers/config_access.js +28 -98
- package/lib/components/helpers/config_access.js.map +1 -1
- package/lib/components/helpers/data_page.d.ts.map +1 -1
- 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 +23 -14
- package/lib/components/helpers/date-format-utils.js.map +1 -1
- package/lib/components/helpers/event-utils.d.ts +1 -1
- package/lib/components/helpers/event-utils.d.ts.map +1 -1
- package/lib/components/helpers/event-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.d.ts +15 -2
- package/lib/components/helpers/field-group-utils.d.ts.map +1 -1
- package/lib/components/helpers/field-group-utils.js +3 -3
- package/lib/components/helpers/field-group-utils.js.map +1 -1
- package/lib/components/helpers/formatters/Boolean.d.ts +3 -3
- package/lib/components/helpers/formatters/Boolean.d.ts.map +1 -1
- 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 +6 -5
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.d.ts +881 -1399
- package/lib/components/helpers/formatters/CurrencyMap.d.ts.map +1 -1
- package/lib/components/helpers/formatters/CurrencyMap.js.map +1 -1
- package/lib/components/helpers/formatters/Date.d.ts +4 -4
- package/lib/components/helpers/formatters/Date.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Date.js +1 -1
- package/lib/components/helpers/formatters/Date.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts +2 -2
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/formatters/common.js +4 -5
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts +11 -11
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/reactContextHelpers.d.ts +3 -2
- package/lib/components/helpers/reactContextHelpers.d.ts.map +1 -1
- package/lib/components/helpers/reactContextHelpers.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +5 -3
- package/lib/components/helpers/simpleTableHelpers.d.ts.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +10 -5
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts +4 -0
- package/lib/components/helpers/state-utils.d.ts.map +1 -0
- package/lib/components/helpers/state-utils.js +36 -0
- package/lib/components/helpers/state-utils.js.map +1 -0
- 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.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 +9 -3
- package/lib/components/helpers/utils.js.map +1 -1
- package/lib/components/helpers/versionHelpers.d.ts.map +1 -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 +5 -15
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +9 -14
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +32 -33
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +8 -14
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.js +3 -16
- package/lib/components/infra/AssignmentCard/AssignmentCard.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +1 -21
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +53 -52
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts +12 -12
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js +17 -16
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- 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 +22 -24
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +9 -22
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +7 -22
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +9 -19
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +2 -16
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -14
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +13 -15
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +5 -12
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js +9 -16
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.d.ts +11 -17
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +6 -20
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.d.ts +8 -16
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +9 -20
- 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 +1 -15
- package/lib/components/infra/Reference/Reference.js.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +4 -7
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.js +0 -4
- package/lib/components/infra/Region/Region.js.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts +1 -21
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +16 -36
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +5 -8
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +3 -7
- package/lib/components/infra/Stages/Stages.js.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +4 -10
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +4 -9
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +13 -16
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +8 -54
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +20 -15
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +17 -29
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +11 -23
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.js +4 -22
- package/lib/components/template/BannerPage/BannerPage.js.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +5 -7
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.js +6 -6
- package/lib/components/template/CaseSummary/CaseSummary.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +10 -22
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +41 -45
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +8 -13
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +9 -16
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +10 -16
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +12 -23
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +1 -31
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +41 -48
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -11
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.js +18 -15
- package/lib/components/template/DefaultForm/DefaultForm.js.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts +3 -0
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -0
- package/lib/components/template/DefaultForm/utils/index.js +27 -0
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -0
- package/lib/components/template/Details/Details/Details.d.ts +1 -16
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +10 -15
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +7 -15
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +1 -13
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +14 -16
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +14 -16
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +12 -19
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +7 -21
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +7 -7
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +0 -5
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +8 -15
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js +5 -14
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.js.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +5 -13
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.js +6 -10
- package/lib/components/template/ListPage/ListPage.js.map +1 -1
- package/lib/components/template/ListView/DefaultViewMeta.d.ts +1 -90
- 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 +1 -9
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +96 -100
- 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 +0 -1
- package/lib/components/template/ListView/hooks.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts +72 -16
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +143 -3
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +9 -13
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +2 -13
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +10 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +14 -16
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +5 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +7 -14
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js +4 -13
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +4 -7
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +0 -5
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +4 -8
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js +3 -6
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +4 -7
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js +0 -5
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.js.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -15
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +17 -13
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +57 -5
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +18 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +5 -5
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -29
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +22 -28
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +14 -26
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +5 -26
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +4 -10
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +1 -8
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.d.ts.map +1 -1
- package/lib/components/template/SubTabs/tabUtils.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +5 -11
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +1 -12
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +4 -8
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js +3 -6
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +5 -11
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +1 -9
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +10 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -16
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +31 -23
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +5 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +7 -14
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js +4 -14
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.js.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +17 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +2 -2
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +8 -17
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +4 -19
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +15 -3
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +44 -32
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +4 -7
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +4 -8
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +8 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +5 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +33 -23
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +4 -5
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +3 -10
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +12 -4
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +7 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +2 -2
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +7 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.js +5 -2
- package/lib/components/widget/SummaryList/SummaryList.js.map +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts +13 -27
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +35 -67
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/components_map.d.ts +3 -3
- package/lib/components_map.d.ts.map +1 -1
- package/lib/components_map.js +819 -818
- package/lib/components_map.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +65 -9
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +4 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useAfterInitialEffect.d.ts +9 -0
- package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -0
- package/lib/hooks/useAfterInitialEffect.js +16 -0
- package/lib/hooks/useAfterInitialEffect.js.map +1 -0
- package/lib/hooks/useConsolidatedRef.d.ts +9 -0
- package/lib/hooks/useConsolidatedRef.d.ts.map +1 -0
- package/lib/hooks/useConsolidatedRef.js +30 -0
- package/lib/hooks/useConsolidatedRef.js.map +1 -0
- package/lib/hooks/useUID.d.ts +8 -0
- package/lib/hooks/useUID.d.ts.map +1 -0
- package/lib/hooks/useUID.js +14 -0
- package/lib/hooks/useUID.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/sdk-pega-component-map.d.ts +15 -1
- package/lib/sdk-pega-component-map.js +15 -1
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/types/PConnProps.d.ts +42 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"DetailsFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAUlD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,C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,CACrC,CACR,CAAC;aACH;QACH,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,oBAAC,KAAK,CAAC,QAAQ,QAAE,YAAY,EAAE,CAAkB,CAAC;AAC3D,CAAC","sourcesContent":["/* eslint-disable react/no-array-index-key */\nimport React, { createElement, isValidElement } from 'react';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport createPConnectComponent from '../../../bridge/react_pconnect';\n\nimport { format } from '../../helpers/formatters';\n\n// DetailsFields is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface DetailsFieldsProps{\n // If any, enter additional props that only exist on this component\n fields: Array<any>\n}\n\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n fieldLabel: {\n display: 'block',\n fontWeight: 400,\n color: theme.palette.text.secondary\n },\n fieldValue: {\n fontWeight: 400,\n color: theme.palette.text.primary\n }\n}));\n\nexport default function DetailsFields(props: DetailsFieldsProps) {\n // const componentName = \"DetailsFields\";\n const { fields = [] } = props;\n const classes = useStyles();\n const fieldComponents: Array<any> = [];\n\n fields?.forEach((field, index) => {\n const thePConn = field.getPConnect();\n const theCompType = thePConn.getComponentName().toLowerCase();\n const { label } = thePConn.getConfigProps();\n const configObj = thePConn?.getReferencedView();\n configObj.config.readOnly = true;\n configObj.config.displayMode = 'LABELS_LEFT';\n const propToUse = { ...thePConn.getInheritedProps() };\n configObj.config.label = theCompType === 'reference' ? propToUse?.label : label;\n fieldComponents.push({\n type: theCompType,\n label,\n value: (\n <React.Fragment key={index}>\n {createElement(createPConnectComponent(), thePConn.getReferencedViewPConnect())}\n </React.Fragment>\n )\n });\n });\n\n function getGridItemLabel(field: any, keyVal: string) {\n const dispValue = field.label;\n\n return (\n <Grid item xs={6} key={keyVal}>\n <Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>\n {dispValue}\n </Typography>\n </Grid>\n );\n }\n\n function formatItemValue(inField: any) {\n const { type, value } = inField;\n let formattedVal = value;\n\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (type) {\n case 'date':\n formattedVal = format(value, type);\n break;\n\n default:\n // No match means we return the value as we received it\n break;\n }\n\n // Finally, if the value is undefined or an empty string, we want to display it as \"---\"\n if (formattedVal === undefined || formattedVal === '') {\n formattedVal = '---';\n }\n\n return formattedVal;\n }\n\n function getGridItemValue(field: any, keyVal: string) {\n const formattedValue = formatItemValue(field);\n\n return (\n <Grid item xs={6} key={keyVal}>\n <Typography variant='body2' component='span' className={classes.fieldValue}>\n {formattedValue}\n </Typography>\n </Grid>\n );\n }\n\n function getGridItem(field: any, keyVal: string) {\n return (\n <Grid item xs={12} key={keyVal}>\n <Typography variant='body2' component='span' className={classes.fieldValue}>\n {field?.value}\n </Typography>\n </Grid>\n );\n }\n\n function getGridItems() {\n const gridItems: Array<any> = fieldComponents.map((field, index) => {\n if (field?.type === 'reference') {\n return field?.value;\n } else if (isValidElement(field?.value)) {\n return (\n <Grid container spacing={1} style={{ padding: '4px 0px' }} key={index}>\n {getGridItem(field, `${index}-item`)}\n </Grid>\n );\n } else {\n return (\n <Grid container spacing={1} style={{ padding: '4px 0px' }} key={index}>\n {getGridItemLabel(field, `${index}-label`)}\n {getGridItemValue(field, `${index}-value`)}\n </Grid>\n );\n }\n });\n return gridItems;\n }\n\n return <React.Fragment>{getGridItems()}</React.Fragment>;\n}\n"]}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
interface FieldGroupProps {
|
|
3
|
+
children: Array<any> | any;
|
|
4
|
+
name: string | object;
|
|
5
|
+
}
|
|
6
|
+
export default function FieldGroup(props: FieldGroupProps): JSX.Element;
|
|
7
|
+
export {};
|
|
4
8
|
//# sourceMappingURL=FieldGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":";AAMA,UAAU,eAAe;IAEvB,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IAC3B,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAoBD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,eAwBxD"}
|
|
@@ -17,7 +17,7 @@ const useStyles = makeStyles(theme => ({
|
|
|
17
17
|
width: '100%'
|
|
18
18
|
}
|
|
19
19
|
}));
|
|
20
|
-
|
|
20
|
+
export default function FieldGroup(props) {
|
|
21
21
|
const { children, name } = props;
|
|
22
22
|
const classes = useStyles();
|
|
23
23
|
const descAndChildren = (React.createElement(Grid, { container: true },
|
|
@@ -28,6 +28,6 @@ const FieldGroup = props => {
|
|
|
28
28
|
name && (React.createElement("div", { className: classes.fieldMargin },
|
|
29
29
|
React.createElement("b", null, props.name))),
|
|
30
30
|
descAndChildren))));
|
|
31
|
-
}
|
|
32
|
-
|
|
31
|
+
}
|
|
32
|
+
;
|
|
33
33
|
//# sourceMappingURL=FieldGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MA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YACxD,oBAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;gBAChC,IAAI,IAAI,CACP,6BAAK,SAAS,EAAE,OAAO,CAAC,WAAW;oBACjC,+BAAI,KAAK,CAAC,IAAI,CAAK,CACf,CACP;gBACA,eAAe,CACX,CACF,CACQ,CAClB,CAAC;AACJ,CAAC;AAAA,CAAC","sourcesContent":["import React from 'react';\nimport Grid from '@material-ui/core/Grid';\nimport { makeStyles } from '@material-ui/core/styles';\n\n// FieldGroupProps is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface FieldGroupProps {\n // If any, enter additional props that only exist on this component\n children: Array<any> | any,\n name: string | object,\n}\n\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n fieldMargin: {\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginTop: theme.spacing(1)\n },\n fullWidth: {\n width: '100%'\n }\n}));\n\nexport default function FieldGroup(props: FieldGroupProps) {\n const { children, name } = props;\n const classes = useStyles();\n\n const descAndChildren = (\n <Grid container>\n <div className={classes.fullWidth}>{children}</div>\n </Grid>\n );\n\n return (\n <React.Fragment>\n <Grid container spacing={4} justifyContent='space-between'>\n <Grid item style={{ width: '100%' }}>\n {name && (\n <div className={classes.fieldMargin}>\n <b>{props.name}</b>\n </div>\n )}\n {descAndChildren}\n </Grid>\n </Grid>\n </React.Fragment>\n );\n};\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
interface FieldGroupListProps {
|
|
3
|
+
items: Array<any> | any;
|
|
4
|
+
onDelete: any;
|
|
5
|
+
onAdd: any;
|
|
6
|
+
}
|
|
7
|
+
export default function FieldGroupList(props: FieldGroupListProps): JSX.Element;
|
|
8
|
+
export {};
|
|
4
9
|
//# sourceMappingURL=FieldGroupList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"FieldGroupList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":";AAUA,UAAU,mBAAmB;IAE3B,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACxB,QAAQ,EAAE,GAAG,CAAC;IACd,KAAK,EAAE,GAAG,CAAA;CACX;AAGD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,eA4ChE"}
|
|
@@ -3,10 +3,10 @@ import Grid from '@material-ui/core/Grid';
|
|
|
3
3
|
import Divider from '@material-ui/core/Divider';
|
|
4
4
|
import Link from '@material-ui/core/Link';
|
|
5
5
|
import { Utils } from '../../helpers/utils';
|
|
6
|
-
|
|
6
|
+
export default function FieldGroupList(props) {
|
|
7
7
|
let menuIconOverride$ = 'trash';
|
|
8
8
|
if (menuIconOverride$) {
|
|
9
|
-
menuIconOverride$ = Utils.getImageSrc(menuIconOverride$,
|
|
9
|
+
menuIconOverride$ = Utils.getImageSrc(menuIconOverride$, Utils.getSDKStaticConentUrl());
|
|
10
10
|
}
|
|
11
11
|
return (React.createElement(Grid, { container: true, spacing: 4, justifyContent: 'space-between' },
|
|
12
12
|
React.createElement(Grid, { item: true, style: { width: '100%' } },
|
|
@@ -22,6 +22,6 @@ const FieldGroupList = props => {
|
|
|
22
22
|
props.onAdd && React.createElement(Divider, null),
|
|
23
23
|
React.createElement("br", null)))),
|
|
24
24
|
props.onAdd && (React.createElement(Link, { onClick: props.onAdd, style: { cursor: 'pointer' } }, "+Add"))))));
|
|
25
|
-
}
|
|
26
|
-
|
|
25
|
+
}
|
|
26
|
+
;
|
|
27
27
|
//# sourceMappingURL=FieldGroupList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,OAAO,MAAM,2BAA2B,CAAC;AAChD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldGroupList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,OAAO,MAAM,2BAA2B,CAAC;AAChD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAY5C,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAA0B;IAC/D,IAAI,iBAAiB,GAAG,OAAO,CAAC;IAChC,IAAI,iBAAiB,EAAE;QACrB,iBAAiB,GAAG,KAAK,CAAC,WAAW,CACnC,iBAAiB,EACjB,KAAK,CAAC,qBAAqB,EAAE,CAC9B,CAAC;KACH;IAED,OAAO,CACL,oBAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,cAAc,EAAC,eAAe;QACxD,oBAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;YACjC,oBAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC;gBACvB,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACvB,oBAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;oBACjC,+BAAI,IAAI,CAAC,IAAI,CAAK;oBACjB,KAAK,CAAC,QAAQ,IAAI,CACjB,gCACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EACzB,SAAS,EAAC,qBAAqB,EAC/B,EAAE,EAAE,cAAc,IAAI,CAAC,EAAE,EAAE,EAC3B,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;wBAC1B,CAAC;wBAED,6BAAK,SAAS,EAAC,mCAAmC,EAAC,GAAG,EAAE,iBAAiB,GAAQ,CAC1E,CACV;oBACA,IAAI,CAAC,QAAQ;oBACd,+BAAM;oBACL,KAAK,CAAC,KAAK,IAAI,oBAAC,OAAO,OAAG;oBAC3B,+BAAM,CACD,CACR,CAAC;gBACD,KAAK,CAAC,KAAK,IAAI,CACd,oBAAC,IAAI,IAAC,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,WAEjD,CACR,CACI,CACF,CACF,CACR,CAAC;AACJ,CAAC;AAAA,CAAC","sourcesContent":["import React from 'react';\n\nimport Grid from '@material-ui/core/Grid';\nimport Divider from '@material-ui/core/Divider';\nimport Link from '@material-ui/core/Link';\n\nimport { Utils } from '../../helpers/utils';\n\n// FieldGroupList is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface FieldGroupListProps {\n // If any, enter additional props that only exist on this component\n items: Array<any> | any,\n onDelete: any,\n onAdd: any\n}\n\n\nexport default function FieldGroupList(props: FieldGroupListProps) {\n let menuIconOverride$ = 'trash';\n if (menuIconOverride$) {\n menuIconOverride$ = Utils.getImageSrc(\n menuIconOverride$,\n Utils.getSDKStaticConentUrl()\n );\n }\n\n return (\n <Grid container spacing={4} justifyContent='space-between'>\n <Grid item style={{ width: '100%' }}>\n <Grid container spacing={1}>\n {props.items.map(item => (\n <Grid item style={{ width: '100%' }}>\n <b>{item.name}</b>\n {props.onDelete && (\n <button\n type='button'\n style={{ float: 'right' }}\n className='psdk-utility-button'\n id={`delete-row-${item.id}`}\n onClick={() => {\n props.onDelete(item.id);\n }}\n >\n <img className='psdk-utility-card-action-svg-icon' src={menuIconOverride$}></img>\n </button>\n )}\n {item.children}\n <br />\n {props.onAdd && <Divider />}\n <br />\n </Grid>\n ))}\n {props.onAdd && (\n <Link onClick={props.onAdd} style={{ cursor: 'pointer' }}>\n +Add\n </Link>\n )}\n </Grid>\n </Grid>\n </Grid>\n );\n};\n"]}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
interface FieldValueListProps {
|
|
3
|
+
name?: string;
|
|
4
|
+
value: any;
|
|
5
|
+
variant?: string;
|
|
6
|
+
}
|
|
7
|
+
export default function FieldValueList(props: FieldValueListProps): JSX.Element;
|
|
8
|
+
export {};
|
|
4
9
|
//# sourceMappingURL=FieldValueList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldValueList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FieldValueList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAQA,UAAU,mBAAmB;IAE3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAoCD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,eA8ChE"}
|
|
@@ -31,7 +31,7 @@ function formatItemValue(value) {
|
|
|
31
31
|
}
|
|
32
32
|
return formattedVal;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
export default function FieldValueList(props) {
|
|
35
35
|
const { name, value, variant = 'inline' } = props;
|
|
36
36
|
const classes = useStyles();
|
|
37
37
|
function getGridItemLabel() {
|
|
@@ -47,6 +47,6 @@ const FieldValueList = props => {
|
|
|
47
47
|
React.createElement(Grid, { container: true, spacing: 4, justifyContent: 'space-between' },
|
|
48
48
|
getGridItemLabel(),
|
|
49
49
|
getGridItemValue())));
|
|
50
|
-
}
|
|
51
|
-
|
|
50
|
+
}
|
|
51
|
+
;
|
|
52
52
|
//# sourceMappingURL=FieldValueList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAYtD,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3B,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC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,QACJ,EAAE,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAClC,SAAS,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE;YAE5D,oBAAC,UAAU,IACT,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAC/C,SAAS,EAAC,MAAM,EAChB,SAAS,EAAE,OAAO,CAAC,UAAU,IAE5B,cAAc,CACJ,CACR,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ;QACb,oBAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,cAAc,EAAC,eAAe;YACvD,gBAAgB,EAAE;YAClB,gBAAgB,EAAE,CACd,CACQ,CAClB,CAAC;AACJ,CAAC;AAAA,CAAC","sourcesContent":["import React from 'react';\n\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport { makeStyles } from '@material-ui/core/styles';\n\n// FieldValueList is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface FieldValueListProps{\n // If any, enter additional props that only exist on this component\n name?: string,\n value: any,\n variant?: string\n}\n\n\nconst useStyles = makeStyles(theme => ({\n root: {\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n fieldLabel: {\n fontWeight: 400,\n color: theme.palette.text.secondary\n },\n fieldValue: {\n color: theme.palette.text.primary\n },\n noPaddingTop: {\n paddingTop: '0 !important'\n },\n noPaddingBottom: {\n paddingBottom: '0 !important'\n }\n}));\n\nfunction formatItemValue(value) {\n let formattedVal = value;\n\n // if the value is undefined or an empty string, we want to display it as \"---\"\n if (formattedVal === undefined || formattedVal === '') {\n formattedVal = '---';\n }\n\n return formattedVal;\n}\n\nexport default function FieldValueList(props: FieldValueListProps) {\n const { name, value, variant = 'inline' } = props;\n const classes = useStyles();\n\n function getGridItemLabel() {\n return (\n <Grid\n item\n xs={variant === 'stacked' ? 12 : 6}\n className={variant === 'stacked' ? classes.noPaddingBottom : ''}\n >\n <Typography variant='body2' component='span' className={`${classes.fieldLabel}`}>\n {name}\n </Typography>\n </Grid>\n );\n }\n\n function getGridItemValue() {\n const formattedValue = formatItemValue(value);\n\n return (\n <Grid\n item\n xs={variant === 'stacked' ? 12 : 6}\n className={variant === 'stacked' ? classes.noPaddingTop : ''}\n >\n <Typography\n variant={variant === 'stacked' ? 'h6' : 'body2'}\n component='span'\n className={classes.fieldValue}\n >\n {formattedValue}\n </Typography>\n </Grid>\n );\n }\n\n return (\n <React.Fragment>\n <Grid container spacing={4} justifyContent='space-between'>\n {getGridItemLabel()}\n {getGridItemValue()}\n </Grid>\n </React.Fragment>\n );\n};\n"]}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
interface OperatorProps {
|
|
3
|
+
caseOpConfig: {
|
|
4
|
+
label: string;
|
|
5
|
+
createDateTime: string;
|
|
6
|
+
createLabel: string;
|
|
7
|
+
createOperator: {
|
|
8
|
+
userName: string;
|
|
9
|
+
userId: string;
|
|
10
|
+
};
|
|
11
|
+
updateDateTime: string;
|
|
12
|
+
updateLabel: string;
|
|
13
|
+
updateOperator: {
|
|
14
|
+
userName: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
};
|
|
8
17
|
};
|
|
9
18
|
}
|
|
10
|
-
export default Operator;
|
|
19
|
+
export default function Operator(props: OperatorProps): JSX.Element;
|
|
20
|
+
export {};
|
|
11
21
|
//# sourceMappingURL=Operator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operator.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Operator/Operator.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Operator.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Operator/Operator.tsx"],"names":[],"mappings":";AAYA,UAAU,aAAa;IAErB,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;QACrD,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,cAAc,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;KACrD,CAAA;CACF;AAeD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,eAsKpD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
2
|
import TextField from '@material-ui/core/TextField';
|
|
4
3
|
import Popover from '@material-ui/core/Popover';
|
|
5
4
|
import Grid from '@material-ui/core/Grid';
|
|
@@ -24,7 +23,7 @@ export default function Operator(props) {
|
|
|
24
23
|
let caseOpLabel = "---";
|
|
25
24
|
let caseOpName = "---";
|
|
26
25
|
let caseOpId = "";
|
|
27
|
-
let caseTime =
|
|
26
|
+
let caseTime = "";
|
|
28
27
|
if (fieldLabel === "create operator") {
|
|
29
28
|
caseOpLabel = caseOpConfig.createLabel;
|
|
30
29
|
caseOpName = caseOpConfig.createOperator.userName;
|
|
@@ -47,6 +46,8 @@ export default function Operator(props) {
|
|
|
47
46
|
});
|
|
48
47
|
function showOperatorDetails(event) {
|
|
49
48
|
const operatorPreviewPromise = PCore.getUserApi().getOperatorDetails(caseOpId);
|
|
49
|
+
const localizedVal = PCore.getLocaleUtils().getLocaleValue;
|
|
50
|
+
const localeCategory = 'Operator';
|
|
50
51
|
operatorPreviewPromise.then((res) => {
|
|
51
52
|
const fillerString = "---";
|
|
52
53
|
let fields = [];
|
|
@@ -56,27 +57,27 @@ export default function Operator(props) {
|
|
|
56
57
|
fields = [
|
|
57
58
|
{
|
|
58
59
|
id: "pyPosition",
|
|
59
|
-
name: "Position",
|
|
60
|
+
name: localizedVal("Position", localeCategory),
|
|
60
61
|
value: res.data.pyOperatorInfo.pyPosition ? res.data.pyOperatorInfo.pyPosition : fillerString
|
|
61
62
|
},
|
|
62
63
|
{
|
|
63
64
|
id: "pyOrganization",
|
|
64
|
-
name: "Organization",
|
|
65
|
+
name: localizedVal("Organization", localeCategory),
|
|
65
66
|
value: res.data.pyOperatorInfo.pyOrganization ? res.data.pyOperatorInfo.pyOrganization : fillerString
|
|
66
67
|
},
|
|
67
68
|
{
|
|
68
69
|
id: "ReportToUserName",
|
|
69
|
-
name:
|
|
70
|
+
name: localizedVal('Reports to', localeCategory),
|
|
70
71
|
value: res.data.pyOperatorInfo.pyReportToUserName ? res.data.pyOperatorInfo.pyReportToUserName : fillerString
|
|
71
72
|
},
|
|
72
73
|
{
|
|
73
74
|
id: "pyTelephone",
|
|
74
|
-
name:
|
|
75
|
+
name: localizedVal('Telephone', localeCategory),
|
|
75
76
|
value: res.data.pyOperatorInfo.pyTelephone ? React.createElement("a", { href: `tel:${res.data.pyOperatorInfo.pyTelephone}` }, res.data.pyOperatorInfo.pyTelephone) : fillerString
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
id: "pyEmailAddress",
|
|
79
|
-
name:
|
|
80
|
+
name: localizedVal('Email address', localeCategory),
|
|
80
81
|
value: res.data.pyOperatorInfo.pyEmailAddress ? React.createElement("a", { href: `mailto:${res.data.pyOperatorInfo.pyEmailAddress}` }, res.data.pyOperatorInfo.pyEmailAddress) : fillerString
|
|
81
82
|
}
|
|
82
83
|
];
|
|
@@ -87,27 +88,27 @@ export default function Operator(props) {
|
|
|
87
88
|
fields = [
|
|
88
89
|
{
|
|
89
90
|
id: "pyPosition",
|
|
90
|
-
name: "Position",
|
|
91
|
+
name: localizedVal("Position", localeCategory),
|
|
91
92
|
value: fillerString
|
|
92
93
|
},
|
|
93
94
|
{
|
|
94
95
|
id: "pyOrganization",
|
|
95
|
-
name: "Organization",
|
|
96
|
+
name: localizedVal("Organization", localeCategory),
|
|
96
97
|
value: fillerString
|
|
97
98
|
},
|
|
98
99
|
{
|
|
99
100
|
id: "ReportToUserName",
|
|
100
|
-
name:
|
|
101
|
+
name: localizedVal('Reports to', localeCategory),
|
|
101
102
|
value: fillerString
|
|
102
103
|
},
|
|
103
104
|
{
|
|
104
105
|
id: "pyTelephone",
|
|
105
|
-
name:
|
|
106
|
+
name: localizedVal('Telephone', localeCategory),
|
|
106
107
|
value: fillerString
|
|
107
108
|
},
|
|
108
109
|
{
|
|
109
110
|
id: "pyEmailAddress",
|
|
110
|
-
name:
|
|
111
|
+
name: localizedVal('Email address', localeCategory),
|
|
111
112
|
value: fillerString
|
|
112
113
|
}
|
|
113
114
|
];
|
|
@@ -148,8 +149,4 @@ export default function Operator(props) {
|
|
|
148
149
|
Utils.generateDateTime(caseTime, "DateTime-Since"),
|
|
149
150
|
React.createElement(Popover, { id: popoverId, open: popoverOpen, anchorEl: popoverAnchorEl, onClose: handlePopoverClose, anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }, PaperProps: { style: { maxWidth: '45ch' } } }, getPopoverGrid()));
|
|
150
151
|
}
|
|
151
|
-
Operator.defaultProps = {};
|
|
152
|
-
Operator.propTypes = {
|
|
153
|
-
caseOpConfig: PropTypes.object.isRequired,
|
|
154
|
-
};
|
|
155
152
|
//# sourceMappingURL=Operator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operator.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Operator/Operator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK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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\ndeclare const PCore: any;\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\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: \"Position\",\n value: res.data.pyOperatorInfo.pyPosition ? res.data.pyOperatorInfo.pyPosition : fillerString\n },\n {\n id: \"pyOrganization\",\n name: \"Organization\",\n value: res.data.pyOperatorInfo.pyOrganization ? res.data.pyOperatorInfo.pyOrganization : fillerString\n },\n {\n id: \"ReportToUserName\",\n name: \"Reports to\",\n value: res.data.pyOperatorInfo.pyReportToUserName ? res.data.pyOperatorInfo.pyReportToUserName : fillerString\n },\n {\n id: \"pyTelephone\",\n name: \"Telephone\",\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: \"Email address\",\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: \"Position\",\n value: fillerString\n },\n {\n id: \"pyOrganization\",\n name: \"Organization\",\n value: fillerString\n },\n {\n id: \"ReportToUserName\",\n name: \"Reports to\",\n value: fillerString\n },\n {\n id: \"pyTelephone\",\n name: \"Telephone\",\n value: fillerString\n },\n {\n id: \"pyEmailAddress\",\n name: \"Email address\",\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","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Operator/Operator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,OAAO,MAAM,2BAA2B,CAAC;AAChD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAmBxC,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,MAAM,EAAE,KAAK,CAAC,O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K,CAAC,IAAI,CAAc,CAAO;wBAChF,oBAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC;4BAAE,oBAAC,UAAU,IAAC,OAAO,EAAC,WAAW,IAAE,KAAK,CAAC,KAAK,CAAc,CAAO,CAC9E,CACQ,CAAA;YACnB,CAAC,CAAC,CACG,CAAA;IAET,CAAC;IAED,yBAAyB;IAEzB,OAAO,oBAAC,KAAK,CAAC,QAAQ;QAClB,oBAAC,SAAS,IACR,YAAY,EAAE,UAAU,EACxB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,mBAAmB,EAC5B,UAAU,EAAE;gBACV,QAAQ,EAAE,IAAI;gBACd,gBAAgB,EAAE,IAAI;gBACtB,UAAU,EAAE,EAAC,KAAK,EAAE,EAAC,MAAM,EAAE,SAAS,EAAC,EAAC;aACzC,GACD;QACF,+BAAM;QACL,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,CAAC;QAEnD,oBAAC,OAAO,IACN,EAAE,EAAE,SAAS,EACb,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,kBAAkB,EAC3B,YAAY,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAC,EACzD,eAAe,EAAE,EAAE,QAAQ,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","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';\n\nimport { makeStyles } from '@material-ui/core/styles';\n\nimport Utils from '../../helpers/utils';\n\n// Operator is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface OperatorProps{\n // If any, enter additional props that only exist on this component\n caseOpConfig: {\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 }\n}\n\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 { 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 = \"\";\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"]}
|
|
@@ -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":";AAMA,UAAU,UAAU;IAElB,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;CACtB;AAYD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,UAAU,eAa9C"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
// import PropTypes from "prop-types";
|
|
3
2
|
import { Card, CardContent, CardHeader, Typography } from "@material-ui/core";
|
|
4
3
|
import { makeStyles } from '@material-ui/core/styles';
|
|
5
4
|
const useStyles = makeStyles((theme) => ({
|
|
@@ -10,15 +9,13 @@ const useStyles = makeStyles((theme) => ({
|
|
|
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 no-unused-vars, @typescript-eslint/no-unused-vars
|
|
14
|
+
const { children } = props;
|
|
15
15
|
const classes = useStyles();
|
|
16
16
|
return (React.createElement(Card, { className: classes.root },
|
|
17
17
|
React.createElement(CardHeader, { title: React.createElement(Typography, { variant: "h6" }, "Pulse") }),
|
|
18
18
|
React.createElement(CardContent, null,
|
|
19
19
|
React.createElement(Typography, null, "Pulse"))));
|
|
20
20
|
}
|
|
21
|
-
// Pulse.propTypes = {
|
|
22
|
-
// children: PropTypes.arrayOf(PropTypes.node).isRequired
|
|
23
|
-
// };
|
|
24
21
|
//# sourceMappingURL=Pulse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pulse.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Pulse/Pulse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,
|
|
1
|
+
{"version":3,"file":"Pulse.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Pulse/Pulse.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAUtD,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,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,KAAiB;IAC7C,6EAA6E;IAC7E,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAE5B,OAAO,CACH,oBAAC,IAAI,IAAC,SAAS,EAAE,OAAO,CAAC,IAAI;QAC3B,oBAAC,UAAU,IAAC,KAAK,EAAE,oBAAC,UAAU,IAAC,OAAO,EAAC,IAAI,YAAmB,GAAI;QAClE,oBAAC,WAAW;YACV,oBAAC,UAAU,gBAAmB,CAClB,CACT,CACR,CAAC;AACN,CAAC","sourcesContent":["import React 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 children?: Array<any>\n}\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: PulseProps) {\n // eslint-disable-next-line no-unused-vars, @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;AAc1C,UAAU,mBAAmB;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;CACnC;AAED,QAAA,MAAM,cAAc,qFAwFlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { Editor } from '@tinymce/tinymce-react';
|
|
3
|
+
import { FormControl, FormHelperText, InputLabel, makeStyles } from '@material-ui/core';
|
|
4
|
+
import { useAfterInitialEffect, useConsolidatedRef, useUID } from '../../../hooks';
|
|
5
|
+
const useStyles = makeStyles((theme) => ({
|
|
6
|
+
fieldLabel: {
|
|
7
|
+
position: 'relative',
|
|
8
|
+
transform: 'translate(0, 0px) scale(1)',
|
|
9
|
+
marginBottom: '5px',
|
|
10
|
+
color: theme.palette.text.secondary
|
|
11
|
+
}
|
|
12
|
+
}));
|
|
13
|
+
const RichTextEditor = forwardRef(function RichTextEditor(props, ref) {
|
|
14
|
+
const classes = useStyles();
|
|
15
|
+
const uid = useUID();
|
|
16
|
+
const { id = uid, defaultValue, label, labelHidden, info, testId, placeholder, disabled, required, readOnly, error, onBlur, onChange } = props;
|
|
17
|
+
const editorRef = useConsolidatedRef(ref);
|
|
18
|
+
let richTextComponent = null;
|
|
19
|
+
useAfterInitialEffect(() => {
|
|
20
|
+
editorRef?.current.mode.set(readOnly || disabled ? 'readonly' : 'design');
|
|
21
|
+
}, [readOnly, disabled]);
|
|
22
|
+
const filePickerCallback = (cb) => {
|
|
23
|
+
const input = document.createElement('input');
|
|
24
|
+
input.setAttribute('type', 'file');
|
|
25
|
+
input.setAttribute('accept', 'image/*');
|
|
26
|
+
input.addEventListener('change', (e) => {
|
|
27
|
+
const file = e.target.files[0];
|
|
28
|
+
const reader = new FileReader();
|
|
29
|
+
reader.addEventListener('load', () => {
|
|
30
|
+
/*
|
|
31
|
+
Note: Now we need to register the blob in TinyMCEs image blob
|
|
32
|
+
registry. In the next release this part hopefully won't be
|
|
33
|
+
necessary, as we are looking to handle it internally.
|
|
34
|
+
*/
|
|
35
|
+
const blobId = `blobid${new Date().getTime()}`;
|
|
36
|
+
const blobCache = editorRef.current.editorUpload.blobCache;
|
|
37
|
+
const base64 = reader.result.split(',')[1];
|
|
38
|
+
const blobInfo = blobCache.create(blobId, file, base64);
|
|
39
|
+
blobCache.add(blobInfo);
|
|
40
|
+
/* call the callback and populate the Title field with the file name */
|
|
41
|
+
cb(blobInfo.blobUri(), { title: file.name });
|
|
42
|
+
});
|
|
43
|
+
reader.readAsDataURL(file);
|
|
44
|
+
});
|
|
45
|
+
input.click();
|
|
46
|
+
};
|
|
47
|
+
if (readOnly) {
|
|
48
|
+
const value = defaultValue || '--';
|
|
49
|
+
// eslint-disable-next-line react/no-danger
|
|
50
|
+
richTextComponent = React.createElement("div", { key: id, id: id, className: "readonly-richtext-editor", dangerouslySetInnerHTML: { __html: value } });
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
richTextComponent = (React.createElement(Editor, { tinymceScriptSrc: "tinymce/tinymce.min.js", onInit: (_evt, editor) => {
|
|
54
|
+
editorRef.current = editor;
|
|
55
|
+
}, id: id, initialValue: defaultValue, disabled: disabled, init: {
|
|
56
|
+
placeholder,
|
|
57
|
+
menubar: false,
|
|
58
|
+
statusbar: false,
|
|
59
|
+
min_height: 130,
|
|
60
|
+
plugins: ['lists', 'advlist', 'autolink', 'image', 'link', 'autoresize'],
|
|
61
|
+
autoresize_bottom_margin: 0,
|
|
62
|
+
toolbar: disabled ? false : 'blocks | bold italic strikethrough | bullist numlist outdent indent | link image',
|
|
63
|
+
toolbar_location: 'bottom',
|
|
64
|
+
content_style: 'body { font-family:Helvetica, Arial,sans-serif; font-size:14px }',
|
|
65
|
+
branding: false,
|
|
66
|
+
paste_data_images: true,
|
|
67
|
+
file_picker_types: 'image',
|
|
68
|
+
file_picker_callback: filePickerCallback
|
|
69
|
+
}, onBlur: onBlur, onEditorChange: onChange }));
|
|
70
|
+
}
|
|
71
|
+
return (React.createElement(FormControl, { "data-test-id": testId, error: error, required: required },
|
|
72
|
+
!labelHidden && (React.createElement(InputLabel, { id: "demo-simple-select-error-label", className: classes.fieldLabel }, label)),
|
|
73
|
+
richTextComponent,
|
|
74
|
+
info && React.createElement(FormHelperText, null, info)));
|
|
75
|
+
});
|
|
76
|
+
export default RichTextEditor;
|
|
77
|
+
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextEditor.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEnF,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvC,UAAU,EAAE;QACV,QAAQ,EAAE,UAAU;QACpB,SAAS,EAAE,4BAA4B;QACvC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS;KACpC;CACF,CAAC,CAAC,CAAC;AAkBJ,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,cAAc,CAAC,KAA0B,EAAE,GAAG;IACvF,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAC5B,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,EAAE,EAAE,GAAG,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE/I,MAAM,SAAS,GAAQ,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC/C,IAAI,iBAAiB,GAAQ,IAAI,CAAC;IAElC,qBAAqB,CAAC,GAAG,EAAE;QACzB,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,Q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QAAQ,EAAE,QAAQ;QAChE,CAAC,WAAW,IAAI,CACf,oBAAC,UAAU,IAAC,EAAE,EAAC,gCAAgC,EAAC,SAAS,EAAE,OAAO,CAAC,UAAU,IAC1E,KAAK,CACK,CACd;QACA,iBAAiB;QACjB,IAAI,IAAI,oBAAC,cAAc,QAAE,IAAI,CAAkB,CACpC,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';\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"}
|