@pega/react-sdk-components 23.1.12 → 24.2.10
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/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +137 -140
- package/lib/bridge/react_pconnect.js.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts +1 -2
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js +1 -1
- package/lib/components/designSystemExtension/AlertBanner/AlertBanner.js.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.d.ts +1 -2
- package/lib/components/designSystemExtension/Banner/Banner.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Banner/Banner.js +1 -1
- 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 +1 -2
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +13 -13
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts +1 -2
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.d.ts.map +1 -1
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js +4 -4
- package/lib/components/designSystemExtension/DetailsFields/DetailsFields.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js +4 -4
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.map +1 -1
- package/lib/components/designSystemExtension/FieldGroupList/FieldGroupList.d.ts +1 -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 +1 -2
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.d.ts.map +1 -1
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js +5 -5
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.d.ts +1 -2
- package/lib/components/designSystemExtension/Operator/Operator.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Operator/Operator.js +6 -6
- package/lib/components/designSystemExtension/Operator/Operator.js.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.d.ts.map +1 -1
- package/lib/components/designSystemExtension/Pulse/Pulse.js +2 -2
- package/lib/components/designSystemExtension/Pulse/Pulse.js.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js +3 -2
- package/lib/components/designSystemExtension/RichTextEditor/RichTextEditor.js.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts +1 -2
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.d.ts.map +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.d.ts +1 -2
- package/lib/components/field/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/lib/components/field/AutoComplete/AutoComplete.js +4 -4
- package/lib/components/field/AutoComplete/AutoComplete.js.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.d.ts +1 -2
- package/lib/components/field/CancelAlert/CancelAlert.d.ts.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +4 -2
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.d.ts +1 -2
- package/lib/components/field/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/components/field/Checkbox/Checkbox.js +4 -4
- package/lib/components/field/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/field/Currency/Currency.d.ts +2 -2
- package/lib/components/field/Currency/Currency.d.ts.map +1 -1
- package/lib/components/field/Currency/Currency.js +20 -9
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts +1 -2
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +18 -9
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts +1 -2
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +30 -8
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts +2 -3
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +18 -6
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts +1 -2
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +3 -3
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/field/Email/Email.d.ts +1 -2
- package/lib/components/field/Email/Email.d.ts.map +1 -1
- package/lib/components/field/Email/Email.js +21 -5
- package/lib/components/field/Email/Email.js.map +1 -1
- package/lib/components/field/Group/Group.d.ts +1 -1
- package/lib/components/field/Group/Group.d.ts.map +1 -1
- package/lib/components/field/Group/Group.js +2 -2
- package/lib/components/field/Group/Group.js.map +1 -1
- package/lib/components/field/Integer/Integer.d.ts +1 -2
- package/lib/components/field/Integer/Integer.d.ts.map +1 -1
- package/lib/components/field/Integer/Integer.js +17 -6
- package/lib/components/field/Integer/Integer.js.map +1 -1
- package/lib/components/field/Multiselect/Multiselect.d.ts +2 -0
- package/lib/components/field/Multiselect/Multiselect.d.ts.map +1 -0
- package/lib/components/field/{MultiSelect → Multiselect}/Multiselect.js +12 -8
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -0
- package/lib/components/field/Multiselect/index.d.ts.map +1 -0
- package/lib/components/field/{MultiSelect → Multiselect}/index.js.map +1 -1
- package/lib/components/field/{MultiSelect → Multiselect}/utils.d.ts.map +1 -1
- package/lib/components/field/{MultiSelect → Multiselect}/utils.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts +3 -2
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +18 -9
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts +1 -2
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +16 -10
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts +1 -2
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +3 -3
- package/lib/components/field/RadioButtons/RadioButtons.js.map +1 -1
- package/lib/components/field/RichText/RichText.js +1 -1
- package/lib/components/field/RichText/RichText.js.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.d.ts +1 -2
- package/lib/components/field/ScalarList/ScalarList.d.ts.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +4 -2
- package/lib/components/field/ScalarList/ScalarList.js.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.d.ts +1 -2
- package/lib/components/field/SemanticLink/SemanticLink.d.ts.map +1 -1
- package/lib/components/field/SemanticLink/SemanticLink.js +4 -4
- package/lib/components/field/SemanticLink/SemanticLink.js.map +1 -1
- package/lib/components/field/TextArea/TextArea.d.ts +1 -2
- package/lib/components/field/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/field/TextArea/TextArea.js +20 -4
- package/lib/components/field/TextArea/TextArea.js.map +1 -1
- package/lib/components/field/TextContent/TextContent.d.ts +1 -2
- package/lib/components/field/TextContent/TextContent.d.ts.map +1 -1
- package/lib/components/field/TextContent/TextContent.js +1 -1
- package/lib/components/field/TextContent/TextContent.js.map +1 -1
- package/lib/components/field/TextInput/TextInput.d.ts +1 -2
- package/lib/components/field/TextInput/TextInput.d.ts.map +1 -1
- package/lib/components/field/TextInput/TextInput.js +2 -2
- package/lib/components/field/TextInput/TextInput.js.map +1 -1
- package/lib/components/field/Time/Time.d.ts +1 -2
- package/lib/components/field/Time/Time.d.ts.map +1 -1
- package/lib/components/field/Time/Time.js +30 -7
- package/lib/components/field/Time/Time.js.map +1 -1
- package/lib/components/field/URL/URL.d.ts +1 -2
- package/lib/components/field/URL/URL.d.ts.map +1 -1
- package/lib/components/field/URL/URL.js +19 -4
- package/lib/components/field/URL/URL.js.map +1 -1
- package/lib/components/field/UserReference/UserReference.d.ts +1 -0
- package/lib/components/field/UserReference/UserReference.d.ts.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +9 -2
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +0 -1
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +1 -4
- package/lib/components/helpers/common-utils.js.map +1 -1
- package/lib/components/helpers/field-group-utils.js +2 -2
- package/lib/components/helpers/field-group-utils.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/simpleTableHelpers.js +1 -1
- package/lib/components/helpers/simpleTableHelpers.js.map +1 -1
- package/lib/components/helpers/state-utils.d.ts +1 -2
- package/lib/components/helpers/state-utils.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts +1 -2
- package/lib/components/infra/ActionButtons/ActionButtons.d.ts.map +1 -1
- package/lib/components/infra/ActionButtons/ActionButtons.js +3 -3
- package/lib/components/infra/ActionButtons/ActionButtons.js.map +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts +1 -1
- package/lib/components/infra/Assignment/Assignment.d.ts.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +30 -6
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts +1 -1
- package/lib/components/infra/AssignmentCard/AssignmentCard.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts +2 -2
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +9 -7
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts +1 -2
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +7 -4
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts +1 -2
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js +7 -7
- package/lib/components/infra/Containers/ModalViewContainer/ModalViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts +3 -3
- package/lib/components/infra/Containers/SimpleView/SimpleView.d.ts.map +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.d.ts +3 -3
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts +1 -2
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js +1 -1
- package/lib/components/infra/Containers/ViewContainer/ViewContainer.js.map +1 -1
- package/lib/components/infra/Containers/helpers.d.ts +1 -1
- package/lib/components/infra/Containers/helpers.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +2 -2
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts +1 -2
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +2 -2
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +8 -4
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts +1 -2
- package/lib/components/infra/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.d.ts +2 -2
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +11 -6
- package/lib/components/infra/MultiStep/MultiStep.js.map +1 -1
- package/lib/components/infra/NavBar/NavBar.css +1 -0
- package/lib/components/infra/NavBar/NavBar.d.ts +1 -2
- package/lib/components/infra/NavBar/NavBar.d.ts.map +1 -1
- package/lib/components/infra/NavBar/NavBar.js +24 -16
- package/lib/components/infra/NavBar/NavBar.js.map +1 -1
- package/lib/components/infra/Reference/Reference.d.ts +1 -2
- package/lib/components/infra/Reference/Reference.d.ts.map +1 -1
- package/lib/components/infra/Region/Region.d.ts +1 -1
- package/lib/components/infra/Region/Region.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.d.ts.map +1 -1
- package/lib/components/infra/RootContainer/RootContainer.js +5 -6
- package/lib/components/infra/RootContainer/RootContainer.js.map +1 -1
- package/lib/components/infra/Stages/Stages.d.ts +1 -2
- package/lib/components/infra/Stages/Stages.d.ts.map +1 -1
- package/lib/components/infra/Stages/Stages.js +4 -4
- 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 +4 -3
- package/lib/components/infra/VerticalTabs/LeftAlignVerticalTabs/LeftAlignVerticalTabs.js.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts +1 -2
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.d.ts.map +1 -1
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js +2 -2
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +2 -1
- package/lib/components/infra/View/View.d.ts.map +1 -1
- package/lib/components/infra/View/View.js +32 -2
- package/lib/components/infra/View/View.js.map +1 -1
- package/lib/components/template/AppShell/AppShell.d.ts +3 -1
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +29 -6
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts +1 -1
- package/lib/components/template/BannerPage/BannerPage.d.ts.map +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts +1 -1
- package/lib/components/template/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts.map +1 -1
- package/lib/components/template/CaseView/CaseView.js +7 -7
- package/lib/components/template/CaseView/CaseView.js.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts +1 -2
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.d.ts.map +1 -1
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js +7 -7
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +2 -1
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts +1 -1
- package/lib/components/template/DataReference/DataReference.d.ts.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +3 -3
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.d.ts +1 -1
- package/lib/components/template/DefaultForm/DefaultForm.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.d.ts.map +1 -1
- package/lib/components/template/DefaultForm/utils/index.js +2 -6
- package/lib/components/template/DefaultForm/utils/index.js.map +1 -1
- package/lib/components/template/Details/Details/Details.d.ts +1 -2
- package/lib/components/template/Details/Details/Details.d.ts.map +1 -1
- package/lib/components/template/Details/Details/Details.js +3 -3
- package/lib/components/template/Details/Details/Details.js.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js +3 -3
- package/lib/components/template/Details/DetailsSubTabs/DetailsSubTabs.js.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts +1 -2
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js +3 -3
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts +1 -2
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.d.ts.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +3 -3
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts +1 -2
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +4 -3
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts +1 -2
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +11 -3
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.d.ts.map +1 -1
- package/lib/components/template/InlineDashboard/InlineDashboard.js +2 -2
- package/lib/components/template/InlineDashboard/InlineDashboard.js.map +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts +1 -1
- package/lib/components/template/InlineDashboardPage/InlineDashboardPage.d.ts.map +1 -1
- package/lib/components/template/ListPage/ListPage.d.ts +1 -2
- package/lib/components/template/ListPage/ListPage.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.d.ts +1 -2
- package/lib/components/template/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +62 -67
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/utils.js +1 -1
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts +1 -2
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js +1 -1
- package/lib/components/template/MultiReferenceReadOnly/MultiReferenceReadOnly.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWide/NarrowWide.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts +1 -2
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +3 -3
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWideForm/NarrowWideForm.d.ts.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts +1 -1
- package/lib/components/template/NarrowWide/NarrowWidePage/NarrowWidePage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js +2 -2
- package/lib/components/template/OneColumn/OneColumn/OneColumn.js.map +1 -1
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts +1 -2
- package/lib/components/template/OneColumn/OneColumnPage/OneColumnPage.d.ts.map +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts +1 -1
- package/lib/components/template/OneColumn/OneColumnTab/OneColumnTab.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts +1 -2
- package/lib/components/template/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +2 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts +1 -2
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +36 -24
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts +1 -2
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts +1 -2
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.d.ts.map +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js +1 -1
- package/lib/components/template/SingleReferenceReadOnly/SingleReferenceReadOnly.js.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts +1 -1
- package/lib/components/template/SubTabs/SubTabs.d.ts.map +1 -1
- package/lib/components/template/SubTabs/SubTabs.js +2 -2
- package/lib/components/template/SubTabs/SubTabs.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts +1 -2
- package/lib/components/template/TwoColumn/TwoColumnPage/TwoColumnPage.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.d.ts.map +1 -1
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumnTab/TwoColumnTab.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrow/WideNarrow.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts +1 -2
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js +3 -3
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowForm/WideNarrowForm.d.ts.map +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts +1 -1
- package/lib/components/template/WideNarrow/WideNarrowPage/WideNarrowPage.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.d.ts +1 -2
- package/lib/components/template/WssNavBar/WssNavBar.d.ts.map +1 -1
- package/lib/components/template/WssNavBar/WssNavBar.js +9 -9
- package/lib/components/template/WssNavBar/WssNavBar.js.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts +1 -2
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js +2 -2
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.d.ts +1 -2
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +8 -5
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts +1 -2
- package/lib/components/widget/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/components/widget/CaseHistory/CaseHistory.js +8 -7
- package/lib/components/widget/CaseHistory/CaseHistory.js.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts +1 -2
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts +1 -2
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.d.ts.map +1 -1
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js +4 -4
- package/lib/components/widget/FileUtility/FileUtility/FileUtility.js.map +1 -1
- package/lib/components/widget/Followers/Followers.d.ts +1 -1
- package/lib/components/widget/Followers/Followers.d.ts.map +1 -1
- package/lib/components/widget/Followers/Followers.js +2 -2
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts +1 -2
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +1 -0
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts +1 -2
- package/lib/components/widget/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/widget/SummaryItem/SummaryItem.js +3 -3
- package/lib/components/widget/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/components/widget/SummaryList/SummaryList.d.ts +1 -2
- package/lib/components/widget/SummaryList/SummaryList.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.d.ts +1 -2
- package/lib/components/widget/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +59 -16
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- package/lib/doc/KeyReleaseUpdates.md +19 -7
- package/lib/hooks/index.d.ts +2 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useFocusFirstField.d.ts +7 -0
- package/lib/hooks/useFocusFirstField.d.ts.map +1 -0
- package/lib/hooks/useFocusFirstField.js +20 -0
- package/lib/hooks/useFocusFirstField.js.map +1 -0
- package/lib/hooks/useScrolltoTop.d.ts +7 -0
- package/lib/hooks/useScrolltoTop.d.ts.map +1 -0
- package/lib/hooks/useScrolltoTop.js +13 -0
- package/lib/hooks/useScrolltoTop.js.map +1 -0
- package/lib/sdk-pega-component-map.d.ts +1 -1
- package/lib/sdk-pega-component-map.js +1 -1
- package/lib/sdk-pega-component-map.js.map +1 -1
- package/lib/theme.d.ts +11 -0
- package/lib/theme.d.ts.map +1 -0
- package/lib/theme.js +31 -0
- package/lib/theme.js.map +1 -0
- package/package.json +1 -1
- package/lib/components/field/MultiSelect/Multiselect.d.ts +0 -3
- package/lib/components/field/MultiSelect/Multiselect.d.ts.map +0 -1
- package/lib/components/field/MultiSelect/Multiselect.js.map +0 -1
- package/lib/components/field/MultiSelect/index.d.ts.map +0 -1
- /package/lib/components/field/{MultiSelect → Multiselect}/index.d.ts +0 -0
- /package/lib/components/field/{MultiSelect → Multiselect}/index.js +0 -0
- /package/lib/components/field/{MultiSelect → Multiselect}/utils.d.ts +0 -0
- /package/lib/components/field/{MultiSelect → Multiselect}/utils.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import isDeepEqual from 'fast-deep-equal/react';
|
|
4
|
-
import Grid from '@material
|
|
5
|
-
import TextField from '@material
|
|
4
|
+
import Grid from '@mui/material/Grid';
|
|
5
|
+
import TextField from '@mui/material/TextField';
|
|
6
6
|
import { getDateFormatInfo } from '../../helpers/date-format-utils';
|
|
7
7
|
import { getCurrencyOptions } from '../../field/Currency/currency-utils';
|
|
8
8
|
import { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';
|
|
@@ -24,7 +24,7 @@ export default function CaseSummaryFields(props) {
|
|
|
24
24
|
return _jsx(Operator, { ...field.config });
|
|
25
25
|
break;
|
|
26
26
|
default:
|
|
27
|
-
return (_jsx(TextField, { value: '---', label: field.config.label, InputProps: {
|
|
27
|
+
return (_jsx(TextField, { variant: 'standard', value: '---', label: field.config.label, InputProps: {
|
|
28
28
|
readOnly: true,
|
|
29
29
|
disableUnderline: true
|
|
30
30
|
} }));
|
|
@@ -35,7 +35,7 @@ export default function CaseSummaryFields(props) {
|
|
|
35
35
|
case 'decimal':
|
|
36
36
|
case 'integer':
|
|
37
37
|
case 'dropdown':
|
|
38
|
-
return (_jsx(TextField, { value: field.config.value, label: field.config.label, InputProps: {
|
|
38
|
+
return (_jsx(TextField, { variant: 'standard', value: field.config.value, label: field.config.label, InputProps: {
|
|
39
39
|
readOnly: true,
|
|
40
40
|
disableUnderline: true
|
|
41
41
|
} }));
|
|
@@ -43,29 +43,29 @@ export default function CaseSummaryFields(props) {
|
|
|
43
43
|
const { caption, label, value, trueLabel, falseLabel } = field.config;
|
|
44
44
|
const fieldLabel = label || caption;
|
|
45
45
|
const fieldValue = value ? trueLabel : falseLabel;
|
|
46
|
-
return (_jsx(TextField, { value: fieldValue, label: fieldLabel, InputProps: {
|
|
46
|
+
return (_jsx(TextField, { variant: 'standard', value: fieldValue, label: fieldLabel, InputProps: {
|
|
47
47
|
readOnly: true,
|
|
48
48
|
disableUnderline: true
|
|
49
49
|
} }));
|
|
50
50
|
}
|
|
51
51
|
case 'status':
|
|
52
|
-
return (_jsx(TextField, { className: 'psdk-csf-status-style', value: field.config.value, label: field.config.label, InputProps: {
|
|
52
|
+
return (_jsx(TextField, { variant: 'standard', className: 'psdk-csf-status-style', value: field.config.value, label: field.config.label, InputProps: {
|
|
53
53
|
readOnly: true,
|
|
54
54
|
disableUnderline: true
|
|
55
55
|
} }));
|
|
56
56
|
case 'phone': {
|
|
57
57
|
const displayPhone = field.config.value !== '' ? field.config.value : '---';
|
|
58
|
-
return (_jsx("a", { href: `tel:${displayPhone}`, children: _jsx(TextField, { value: field.config.value, label: field.config.label, InputProps: {
|
|
58
|
+
return (_jsx("a", { href: `tel:${displayPhone}`, children: _jsx(TextField, { variant: 'standard', value: field.config.value, label: field.config.label, InputProps: {
|
|
59
59
|
readOnly: true,
|
|
60
|
-
disableUnderline: true,
|
|
61
60
|
inputProps: {
|
|
62
|
-
style: { cursor: 'pointer' }
|
|
61
|
+
style: { cursor: 'pointer' },
|
|
62
|
+
disableUnderline: true
|
|
63
63
|
}
|
|
64
64
|
} }) }));
|
|
65
65
|
}
|
|
66
66
|
case 'email': {
|
|
67
67
|
const displayEmail = format(field.config.value, field.type);
|
|
68
|
-
return (_jsx("a", { href: `mailto:${displayEmail}`, children: _jsx(TextField, { value: field.config.value, label: field.config.label, InputProps: {
|
|
68
|
+
return (_jsx("a", { href: `mailto:${displayEmail}`, children: _jsx(TextField, { variant: 'standard', value: field.config.value, label: field.config.label, InputProps: {
|
|
69
69
|
readOnly: true,
|
|
70
70
|
disableUnderline: true,
|
|
71
71
|
inputProps: { style: { cursor: 'pointer' } }
|
|
@@ -76,7 +76,7 @@ export default function CaseSummaryFields(props) {
|
|
|
76
76
|
const theDateFormatInfo = getDateFormatInfo();
|
|
77
77
|
// console.log(`theDateFormatInfo: ${theDateFormatInfo}`);
|
|
78
78
|
const theFormat = fieldTypeLower === 'datetime' ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong;
|
|
79
|
-
return (_jsx(TextField, { value: format(field.config.value, field.type, {
|
|
79
|
+
return (_jsx(TextField, { variant: 'standard', value: format(field.config.value, field.type, {
|
|
80
80
|
format: theFormat
|
|
81
81
|
}), label: field.config.label, InputProps: {
|
|
82
82
|
readOnly: true,
|
|
@@ -85,14 +85,14 @@ export default function CaseSummaryFields(props) {
|
|
|
85
85
|
}
|
|
86
86
|
case 'currency': {
|
|
87
87
|
const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);
|
|
88
|
-
return (_jsx(TextField, { value: format(field.config.value, field.type, theCurrencyOptions), label: field.config.label, InputProps: {
|
|
88
|
+
return (_jsx(TextField, { variant: 'standard', value: format(field.config.value, field.type, theCurrencyOptions), label: field.config.label, InputProps: {
|
|
89
89
|
readOnly: true,
|
|
90
90
|
disableUnderline: true
|
|
91
91
|
} }));
|
|
92
92
|
}
|
|
93
93
|
case 'boolean':
|
|
94
94
|
case 'userreference':
|
|
95
|
-
return (_jsx(TextField, { value: format(field.config.value, field.type), label: field.config.label, InputProps: {
|
|
95
|
+
return (_jsx(TextField, { variant: 'standard', value: format(field.config.value, field.type), label: field.config.label, InputProps: {
|
|
96
96
|
readOnly: true,
|
|
97
97
|
disableUnderline: true
|
|
98
98
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSummaryFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAWlD,MAAM,CAAC,OAAO,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AAiB,CAAC,CAAC,CAAC;IAExB,MAAM,mBAAmB,GAAG,SAAS,CAAC;IAEtC,sFAAsF;IACtF,6BAA6B;IAC7B,IAAI,UAAU,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE;QAClD,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE;SAC3C,CAAC;QAEF,MAAM,KAAK,GAAG,mBAAmB,CAAC,MAAM,CAAC;QACzC,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACnC;aAAM;YACL,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;SAC3C;KACF;IAED,0DAA0D;IAC1D,wCAAwC;IACxC,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,EAAE;QACxD,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;KACxC;IAED,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,QAAC,SAAS,EAAC,0BAA0B,YACjD,oBAAoB,GAChB,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport isDeepEqual from 'fast-deep-equal/react';\nimport Grid from '@material-ui/core/Grid';\nimport TextField from '@material-ui/core/TextField';\n\nimport { getDateFormatInfo } from '../../helpers/date-format-utils';\nimport { getCurrencyOptions } from '../../field/Currency/currency-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nimport './CaseSummaryFields.css';\n\nimport { format } from '../../helpers/formatters';\n\n// CaseSummaryFields is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface CaseSummaryFieldsProps {\n // If any, enter additional props that only exist on this component\n status?: string;\n showStatus?: boolean;\n theFields: any[] | any | never;\n}\n\nexport default function CaseSummaryFields(props: CaseSummaryFieldsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const Operator = getComponentFromMap('Operator');\n\n const { status, showStatus, theFields } = props;\n\n const [theFieldsToRender, setFieldsToRender] = useState([]);\n const [theFieldsAsGridItems, setFieldsAsGridItems] = useState<any[]>([]);\n\n function getFieldValue(field: any): any {\n const fieldTypeLower = field.type.toLowerCase();\n\n if (field.config.value === null || field.config.value === '') {\n // Special handling for missing value\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (fieldTypeLower) {\n case 'caseoperator':\n return <Operator {...field.config} />;\n break;\n\n default:\n return (\n <TextField\n value='---'\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n }\n\n switch (fieldTypeLower) {\n case 'textinput':\n case 'decimal':\n case 'integer':\n case 'dropdown':\n return (\n <TextField\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'checkbox': {\n const { caption, label, value, trueLabel, falseLabel } = field.config;\n const fieldLabel = label || caption;\n const fieldValue = value ? trueLabel : falseLabel;\n\n return (\n <TextField\n value={fieldValue}\n label={fieldLabel}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'status':\n return (\n <TextField\n className='psdk-csf-status-style'\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'phone': {\n const displayPhone = field.config.value !== '' ? field.config.value : '---';\n return (\n <a href={`tel:${displayPhone}`}>\n <TextField\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true,\n inputProps: {\n style: { cursor: 'pointer' }\n }\n }}\n />\n </a>\n );\n }\n\n case 'email': {\n const displayEmail = format(field.config.value, field.type);\n return (\n <a href={`mailto:${displayEmail}`}>\n <TextField\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true,\n inputProps: { style: { cursor: 'pointer' } }\n }}\n />\n </a>\n );\n }\n\n case 'date':\n case 'datetime': {\n const theDateFormatInfo = getDateFormatInfo();\n // console.log(`theDateFormatInfo: ${theDateFormatInfo}`);\n const theFormat =\n fieldTypeLower === 'datetime' ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong;\n\n return (\n <TextField\n value={format(field.config.value, field.type, {\n format: theFormat\n })}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'currency': {\n const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);\n return (\n <TextField\n value={format(field.config.value, field.type, theCurrencyOptions)}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'boolean':\n case 'userreference':\n return (\n <TextField\n value={format(field.config.value, field.type)}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'caseoperator':\n return <Operator {...field.config} />;\n\n default:\n return (\n <span>\n {field.type.toLowerCase()} {field.config.value}\n </span>\n );\n }\n }\n\n // Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render\n useEffect(() => {\n const arGridItems = theFieldsToRender.map((field: any) => {\n // display the field when either visibility property doesn't exist or is true(if exists)\n if (field.config.visibility === undefined || field.config.visibility === true) {\n return (\n <Grid item xs={6} key={field.config.label}>\n {getFieldValue(field)}\n </Grid>\n );\n }\n\n return null;\n });\n setFieldsAsGridItems(arGridItems);\n }, [theFieldsToRender]);\n\n const theFieldsModifiable = theFields;\n\n // Special Case: if showStatus is true, splice the status value to be 2nd in theFields\n // if it's not already there\n if (showStatus && theFields?.[1].type !== 'status') {\n const oStatus = {\n type: 'status',\n config: { value: status, label: 'Status' }\n };\n\n const count = theFieldsModifiable.length;\n if (count < 2) {\n theFieldsModifiable.push(oStatus);\n } else {\n theFieldsModifiable.splice(1, 0, oStatus);\n }\n }\n\n // At this point, we know what fields we want to render...\n // So, update our state if it's changed\n if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {\n setFieldsToRender(theFieldsModifiable);\n }\n\n return (\n <Grid container className='psdk-case-summary-fields'>\n {theFieldsAsGridItems}\n </Grid>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CaseSummaryFields.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAWlD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAA6B;IACrE,8EAA8E;IAC9E,MAAM,QAAQ,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAEjD,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEhD,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC5D,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAQ,EAAE,CAAC,CAAC;IAEzE,SAAS,aAAa,CAAC,KAAU;QAC/B,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QAEhD,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,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AE;SAC3C,CAAC;QAEF,MAAM,KAAK,GAAG,mBAAmB,CAAC,MAAM,CAAC;QACzC,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACnC;aAAM;YACL,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;SAC3C;KACF;IAED,0DAA0D;IAC1D,wCAAwC;IACxC,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,EAAE;QACxD,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;KACxC;IAED,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,QAAC,SAAS,EAAC,0BAA0B,YACjD,oBAAoB,GAChB,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { useState, useEffect } from 'react';\nimport isDeepEqual from 'fast-deep-equal/react';\nimport Grid from '@mui/material/Grid';\nimport TextField from '@mui/material/TextField';\n\nimport { getDateFormatInfo } from '../../helpers/date-format-utils';\nimport { getCurrencyOptions } from '../../field/Currency/currency-utils';\nimport { getComponentFromMap } from '../../../bridge/helpers/sdk_component_map';\n\nimport './CaseSummaryFields.css';\n\nimport { format } from '../../helpers/formatters';\n\n// CaseSummaryFields is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface CaseSummaryFieldsProps {\n // If any, enter additional props that only exist on this component\n status?: string;\n showStatus?: boolean;\n theFields: any[] | any | never;\n}\n\nexport default function CaseSummaryFields(props: CaseSummaryFieldsProps) {\n // Get emitted components from map (so we can get any override that may exist)\n const Operator = getComponentFromMap('Operator');\n\n const { status, showStatus, theFields } = props;\n\n const [theFieldsToRender, setFieldsToRender] = useState([]);\n const [theFieldsAsGridItems, setFieldsAsGridItems] = useState<any[]>([]);\n\n function getFieldValue(field: any): any {\n const fieldTypeLower = field.type.toLowerCase();\n\n if (field.config.value === null || field.config.value === '') {\n // Special handling for missing value\n // eslint-disable-next-line sonarjs/no-small-switch\n switch (fieldTypeLower) {\n case 'caseoperator':\n return <Operator {...field.config} />;\n break;\n\n default:\n return (\n <TextField\n variant='standard'\n value='---'\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n }\n\n switch (fieldTypeLower) {\n case 'textinput':\n case 'decimal':\n case 'integer':\n case 'dropdown':\n return (\n <TextField\n variant='standard'\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'checkbox': {\n const { caption, label, value, trueLabel, falseLabel } = field.config;\n const fieldLabel = label || caption;\n const fieldValue = value ? trueLabel : falseLabel;\n\n return (\n <TextField\n variant='standard'\n value={fieldValue}\n label={fieldLabel}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'status':\n return (\n <TextField\n variant='standard'\n className='psdk-csf-status-style'\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'phone': {\n const displayPhone = field.config.value !== '' ? field.config.value : '---';\n return (\n <a href={`tel:${displayPhone}`}>\n <TextField\n variant='standard'\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n inputProps: {\n style: { cursor: 'pointer' },\n disableUnderline: true\n }\n }}\n />\n </a>\n );\n }\n\n case 'email': {\n const displayEmail = format(field.config.value, field.type);\n return (\n <a href={`mailto:${displayEmail}`}>\n <TextField\n variant='standard'\n value={field.config.value}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true,\n inputProps: { style: { cursor: 'pointer' } }\n }}\n />\n </a>\n );\n }\n\n case 'date':\n case 'datetime': {\n const theDateFormatInfo = getDateFormatInfo();\n // console.log(`theDateFormatInfo: ${theDateFormatInfo}`);\n const theFormat =\n fieldTypeLower === 'datetime' ? `${theDateFormatInfo.dateFormatStringLong} hh:mm a` : theDateFormatInfo.dateFormatStringLong;\n\n return (\n <TextField\n variant='standard'\n value={format(field.config.value, field.type, {\n format: theFormat\n })}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'currency': {\n const theCurrencyOptions = getCurrencyOptions(field.config?.currencyISOCode);\n return (\n <TextField\n variant='standard'\n value={format(field.config.value, field.type, theCurrencyOptions)}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n }\n\n case 'boolean':\n case 'userreference':\n return (\n <TextField\n variant='standard'\n value={format(field.config.value, field.type)}\n label={field.config.label}\n InputProps={{\n readOnly: true,\n disableUnderline: true\n }}\n />\n );\n\n case 'caseoperator':\n return <Operator {...field.config} />;\n\n default:\n return (\n <span>\n {field.type.toLowerCase()} {field.config.value}\n </span>\n );\n }\n }\n\n // Whenever theFieldsToRender changes, update theFieldsAsGridItems that's used during render\n useEffect(() => {\n const arGridItems = theFieldsToRender.map((field: any) => {\n // display the field when either visibility property doesn't exist or is true(if exists)\n if (field.config.visibility === undefined || field.config.visibility === true) {\n return (\n <Grid item xs={6} key={field.config.label}>\n {getFieldValue(field)}\n </Grid>\n );\n }\n\n return null;\n });\n setFieldsAsGridItems(arGridItems);\n }, [theFieldsToRender]);\n\n const theFieldsModifiable = theFields;\n\n // Special Case: if showStatus is true, splice the status value to be 2nd in theFields\n // if it's not already there\n if (showStatus && theFields?.[1].type !== 'status') {\n const oStatus = {\n type: 'status',\n config: { value: status, label: 'Status' }\n };\n\n const count = theFieldsModifiable.length;\n if (count < 2) {\n theFieldsModifiable.push(oStatus);\n } else {\n theFieldsModifiable.splice(1, 0, oStatus);\n }\n }\n\n // At this point, we know what fields we want to render...\n // So, update our state if it's changed\n if (!isDeepEqual(theFieldsToRender, theFieldsModifiable)) {\n setFieldsToRender(theFieldsModifiable);\n }\n\n return (\n <Grid container className='psdk-case-summary-fields'>\n {theFieldsAsGridItems}\n </Grid>\n );\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface DetailsFieldsProps {
|
|
3
2
|
fields: any[];
|
|
4
3
|
}
|
|
5
|
-
export default function DetailsFields(props: DetailsFieldsProps): JSX.Element;
|
|
4
|
+
export default function DetailsFields(props: DetailsFieldsProps): import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
export {};
|
|
7
6
|
//# sourceMappingURL=DetailsFields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DetailsFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/DetailsFields/DetailsFields.tsx"],"names":[],"mappings":"AAWA,UAAU,kBAAkB;IAE1B,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAwBD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CAsG9D"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable react/no-array-index-key */
|
|
3
3
|
import React, { createElement, isValidElement } from 'react';
|
|
4
|
-
import Grid from '@material
|
|
5
|
-
import Typography from '@material
|
|
6
|
-
import
|
|
4
|
+
import Grid from '@mui/material/Grid';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
7
7
|
import createPConnectComponent from '../../../bridge/react_pconnect';
|
|
8
8
|
import { format } from '../../helpers/formatters';
|
|
9
9
|
const useStyles = makeStyles(theme => ({
|
|
@@ -38,7 +38,7 @@ export default function DetailsFields(props) {
|
|
|
38
38
|
const { label } = thePConn.getConfigProps();
|
|
39
39
|
const configObj = thePConn?.getReferencedView();
|
|
40
40
|
configObj.config.readOnly = true;
|
|
41
|
-
configObj.config.displayMode = '
|
|
41
|
+
configObj.config.displayMode = 'DISPLAY_ONLY';
|
|
42
42
|
const propToUse = { ...thePConn.getInheritedProps() };
|
|
43
43
|
configObj.config.label = theCompType === 'reference' ? propToUse?.label : label;
|
|
44
44
|
fieldComponents.push({
|
|
@@ -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,IAAI,MAAM,
|
|
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,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AASlD,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,CAAC,CAAC;QAC7B,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,SAAS,EAAE,KAAK,CA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UAAU,YACvE,cAAc,GACJ,IAHQ,MAAM,CAItB,CACR,CAAC;IACJ,CAAC;IAED,SAAS,WAAW,CAAC,KAAU,EAAE,MAAc;QAC7C,OAAO,CACL,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,YACf,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,EAAE,OAAO,CAAC,UAAU,YACvE,KAAK,EAAE,KAAK,GACF,IAHS,MAAM,CAIvB,CACR,CAAC;IACJ,CAAC;IAED,SAAS,YAAY;QACnB,MAAM,SAAS,GAAU,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YAC5D,IAAI,KAAK,EAAE,IAAI,KAAK,WAAW,EAAE;gBAC/B,OAAO,KAAK,EAAE,KAAK,CAAC;aACrB;YACD,IAAI,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;gBAChC,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,YACtD,WAAW,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,IAD0B,KAAK,CAE9D,CACR,CAAC;aACH;YACD,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,aACtD,gBAAgB,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,CAAC,EACzC,gBAAgB,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,CAAC,KAFoB,KAAK,CAG9D,CACR,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,4BAAG,YAAY,EAAE,GAAI,CAAC;AAC/B,CAAC","sourcesContent":["/* eslint-disable react/no-array-index-key */\nimport React, { createElement, isValidElement } from 'react';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport makeStyles from '@mui/styles/makeStyles';\n\nimport createPConnectComponent from '../../../bridge/react_pconnect';\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: any[];\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n paddingRight: theme.spacing(1),\n paddingLeft: theme.spacing(1),\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n 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: 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 = 'DISPLAY_ONLY';\n const propToUse = { ...thePConn.getInheritedProps() };\n configObj.config.label = theCompType === 'reference' ? propToUse?.label : label;\n fieldComponents.push({\n type: theCompType,\n label,\n value: <React.Fragment key={index}>{createElement(createPConnectComponent(), thePConn.getReferencedViewPConnect())}</React.Fragment>\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: any[] = fieldComponents.map((field, index) => {\n if (field?.type === 'reference') {\n return field?.value;\n }\n 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 }\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 return gridItems;\n }\n\n return <>{getGridItems()}</>;\n}\n"]}
|
|
@@ -4,6 +4,6 @@ interface FieldGroupProps {
|
|
|
4
4
|
collapsible?: boolean;
|
|
5
5
|
instructions?: string;
|
|
6
6
|
}
|
|
7
|
-
export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>): JSX.Element;
|
|
7
|
+
export default function FieldGroup(props: PropsWithChildren<FieldGroupProps>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=FieldGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAQpD,UAAU,eAAe;IAEvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4BD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAQpD,UAAU,eAAe;IAEvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA4BD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,2CAsC3E"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import Grid from '@material
|
|
4
|
-
import
|
|
5
|
-
import KeyboardArrowRightIcon from '@
|
|
6
|
-
import KeyboardArrowDownIcon from '@
|
|
3
|
+
import Grid from '@mui/material/Grid';
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
5
|
+
import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
|
|
6
|
+
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
7
7
|
const useStyles = makeStyles(theme => ({
|
|
8
8
|
root: {
|
|
9
9
|
marginRight: theme.spacing(1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroup.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"FieldGroup.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroup/FieldGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,sBAAsB,MAAM,wCAAwC,CAAC;AAC5E,OAAO,qBAAqB,MAAM,uCAAuC,CAAC;AAW1E,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,CAAC;KAC/B;IACD,WAAW,EAAE;QACX,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/B,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KAC5B;IACD,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;KACd;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,KAAK;QACV,MAAM,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;KAC1D;IACD,eAAe,EAAE;QACf,OAAO,EAAE,OAAO;KACjB;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC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AClH,EACA,CAAC,SAAS,IAAI,eAAe,IACzB,GACF,CACR,CAAC;AACJ,CAAC","sourcesContent":["import { PropsWithChildren, useState } from 'react';\nimport Grid from '@mui/material/Grid';\nimport makeStyles from '@mui/styles/makeStyles';\nimport KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';\nimport KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';\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 name?: string;\n collapsible?: boolean;\n instructions?: string;\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 fieldGroupHeader: {\n display: 'flex',\n alignItems: 'center',\n gap: '5px',\n cursor: collapsible => (collapsible ? 'pointer' : 'auto')\n },\n instructionText: {\n padding: '5px 0'\n }\n}));\n\nexport default function FieldGroup(props: PropsWithChildren<FieldGroupProps>) {\n const { children, name, collapsible = false, instructions } = props;\n const classes = useStyles(collapsible);\n const [collapsed, setCollapsed] = useState(false);\n\n const descAndChildren = (\n <Grid container>\n <div className={classes.fullWidth}>{children}</div>\n </Grid>\n );\n\n const headerClickHandler = () => {\n setCollapsed(current => !current);\n };\n\n return (\n <Grid container spacing={4} justifyContent='space-between'>\n <Grid item style={{ width: '100%' }}>\n {name && (\n <div className={classes.fieldMargin}>\n {collapsible ? (\n <span id='field-group-header' className={classes.fieldGroupHeader} onClick={headerClickHandler}>\n {collapsed ? <KeyboardArrowRightIcon /> : <KeyboardArrowDownIcon />}\n <b>{name}</b>\n </span>\n ) : (\n <b>{name}</b>\n )}\n </div>\n )}\n {instructions && instructions !== 'none' && (\n // eslint-disable-next-line react/no-danger\n <div key='instructions' className={classes.instructionText} dangerouslySetInnerHTML={{ __html: instructions }} />\n )}\n {!collapsed && descAndChildren}\n </Grid>\n </Grid>\n );\n}\n"]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface FieldGroupListProps {
|
|
3
2
|
items: any[] | any;
|
|
4
3
|
onDelete: any;
|
|
5
4
|
onAdd: any;
|
|
6
5
|
}
|
|
7
|
-
export default function FieldGroupList(props: FieldGroupListProps): JSX.Element;
|
|
6
|
+
export default function FieldGroupList(props: FieldGroupListProps): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=FieldGroupList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldGroupList.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":"AAQA,UAAU,mBAAmB;IAE3B,KAAK,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CA0ChE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Grid from '@material
|
|
3
|
-
import Divider from '@material
|
|
4
|
-
import Link from '@material
|
|
2
|
+
import Grid from '@mui/material/Grid';
|
|
3
|
+
import Divider from '@mui/material/Divider';
|
|
4
|
+
import Link from '@mui/material/Link';
|
|
5
5
|
import { Utils } from '../../helpers/utils';
|
|
6
6
|
export default function FieldGroupList(props) {
|
|
7
7
|
let menuIconOverride$ = 'trash';
|
|
@@ -10,6 +10,6 @@ export default function FieldGroupList(props) {
|
|
|
10
10
|
}
|
|
11
11
|
return (_jsx(Grid, { container: true, spacing: 4, justifyContent: 'space-between', children: _jsx(Grid, { item: true, style: { width: '100%' }, children: _jsxs(Grid, { container: true, spacing: 1, children: [props.items.map(item => (_jsxs(Grid, { item: true, style: { width: '100%' }, children: [_jsx("b", { children: item.name }), props.onDelete && (_jsx("button", { type: 'button', style: { float: 'right' }, className: 'psdk-utility-button', id: `delete-row-${item.id}`, "aria-label": 'Delete Row', onClick: () => {
|
|
12
12
|
props.onDelete(item.id);
|
|
13
|
-
}, children: _jsx("img", { className: 'psdk-utility-card-action-svg-icon', src: menuIconOverride$ }) })), item.children, _jsx("br", {}), props.onAdd && _jsx(Divider, {}), _jsx("br", {})] }))), props.onAdd && (_jsx(Link, { onClick: props.onAdd, style: { cursor: 'pointer' }, children: "+Add" }))] }) }) }));
|
|
13
|
+
}, children: _jsx("img", { className: 'psdk-utility-card-action-svg-icon', src: menuIconOverride$ }) })), item.children, _jsx("br", {}), props.onAdd && _jsx(Divider, {}), _jsx("br", {})] }))), props.onAdd && (_jsx(Link, { onClick: props.onAdd, style: { cursor: 'pointer' }, underline: 'hover', children: "+Add" }))] }) }) }));
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=FieldGroupList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldGroupList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"FieldGroupList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldGroupList/FieldGroupList.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AAEtC,OAAO,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,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,SAAS,EAAC,OAAO,qBAEpE,CACR,IACI,GACF,GACF,CACR,CAAC;AACJ,CAAC","sourcesContent":["import Grid from '@mui/material/Grid';\nimport Divider from '@mui/material/Divider';\nimport Link from '@mui/material/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: any[] | any;\n onDelete: any;\n onAdd: any;\n}\n\nexport default function FieldGroupList(props: FieldGroupListProps) {\n let menuIconOverride$ = 'trash';\n if (menuIconOverride$) {\n menuIconOverride$ = Utils.getImageSrc(menuIconOverride$, Utils.getSDKStaticConentUrl());\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 aria-label='Delete Row'\n onClick={() => {\n props.onDelete(item.id);\n }}\n >\n <img className='psdk-utility-card-action-svg-icon' src={menuIconOverride$} />\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' }} underline='hover'>\n +Add\n </Link>\n )}\n </Grid>\n </Grid>\n </Grid>\n );\n}\n"]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface FieldValueListProps {
|
|
3
2
|
name?: string;
|
|
4
3
|
value: any;
|
|
5
4
|
variant?: string;
|
|
6
5
|
isHtml?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export default function FieldValueList(props: FieldValueListProps): JSX.Element;
|
|
7
|
+
export default function FieldValueList(props: FieldValueListProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export {};
|
|
10
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":"AAMA,UAAU,mBAAmB;IAE3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAmCD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAqChE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Grid from '@material
|
|
3
|
-
import Typography from '@material
|
|
4
|
-
import
|
|
2
|
+
import Grid from '@mui/material/Grid';
|
|
3
|
+
import Typography from '@mui/material/Typography';
|
|
4
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
5
5
|
const useStyles = makeStyles(theme => ({
|
|
6
6
|
root: {
|
|
7
7
|
marginRight: theme.spacing(1),
|
|
@@ -35,11 +35,11 @@ export default function FieldValueList(props) {
|
|
|
35
35
|
const { name, value, variant = 'inline', isHtml = false } = props;
|
|
36
36
|
const classes = useStyles();
|
|
37
37
|
function getGridItemLabel() {
|
|
38
|
-
return (_jsx(Grid, { item: true, xs: variant === 'stacked' ? 12 :
|
|
38
|
+
return (_jsx(Grid, { item: true, xs: variant === 'stacked' ? 12 : 4, className: variant === 'stacked' ? classes.noPaddingBottom : '', children: _jsx(Typography, { variant: 'body2', component: 'span', className: `${classes.fieldLabel}`, children: name }) }));
|
|
39
39
|
}
|
|
40
40
|
function getGridItemValue() {
|
|
41
41
|
const formattedValue = formatItemValue(value);
|
|
42
|
-
return (_jsx(Grid, { item: true, xs: variant === 'stacked' ? 12 :
|
|
42
|
+
return (_jsx(Grid, { item: true, xs: variant === 'stacked' ? 12 : 8, className: variant === 'stacked' ? classes.noPaddingTop : '', children: isHtml ? (
|
|
43
43
|
// eslint-disable-next-line react/no-danger
|
|
44
44
|
_jsx("div", { dangerouslySetInnerHTML: { __html: formattedValue } })) : (_jsx(Typography, { variant: variant === 'stacked' ? 'h6' : 'body2', component: 'span', className: classes.fieldValue, children: formattedValue })) }));
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"FieldValueList.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/FieldValueList/FieldValueList.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAYhD,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,CAAC;KAC/B;IACD,UAAU,EAAE;QACV,UAAU,EAAE,GAAG;QACf,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS;KACpC;IACD,UAAU,EAAE;QACV,KAAK,EAAE,KA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,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YACxG,MAAM,CAAC,CAAC,CAAC;YACR,2CAA2C;YAC3C,cAAK,uBAAuB,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,GAAI,CAC7D,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAE,OAAO,CAAC,UAAU,YACxG,cAAc,GACJ,CACd,GACI,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,MAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,cAAc,EAAC,eAAe,aACvD,gBAAgB,EAAE,EAClB,gBAAgB,EAAE,IACd,CACR,CAAC;AACJ,CAAC","sourcesContent":["import Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport makeStyles from '@mui/styles/makeStyles';\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 isHtml?: boolean;\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', isHtml = false } = props;\n const classes = useStyles();\n\n function getGridItemLabel() {\n return (\n <Grid item xs={variant === 'stacked' ? 12 : 4} className={variant === 'stacked' ? classes.noPaddingBottom : ''}>\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 item xs={variant === 'stacked' ? 12 : 8} className={variant === 'stacked' ? classes.noPaddingTop : ''}>\n {isHtml ? (\n // eslint-disable-next-line react/no-danger\n <div dangerouslySetInnerHTML={{ __html: formattedValue }} />\n ) : (\n <Typography variant={variant === 'stacked' ? 'h6' : 'body2'} component='span' className={classes.fieldValue}>\n {formattedValue}\n </Typography>\n )}\n </Grid>\n );\n }\n\n return (\n <Grid container spacing={4} justifyContent='space-between'>\n {getGridItemLabel()}\n {getGridItemValue()}\n </Grid>\n );\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PConnProps } from '../../../types/PConnProps';
|
|
3
2
|
interface OperatorProps extends PConnProps {
|
|
4
3
|
label: string;
|
|
@@ -16,6 +15,6 @@ interface OperatorProps extends PConnProps {
|
|
|
16
15
|
};
|
|
17
16
|
displayLabel?: any;
|
|
18
17
|
}
|
|
19
|
-
export default function Operator(props: OperatorProps): JSX.Element;
|
|
18
|
+
export default function Operator(props: OperatorProps): import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
export {};
|
|
21
20
|
//# 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":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAIvD,UAAU,aAAc,SAAQ,UAAU;IAExC,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB;AAaD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAsLpD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
|
-
import TextField from '@material
|
|
4
|
-
import Popover from '@material
|
|
5
|
-
import Grid from '@material
|
|
6
|
-
import Typography from '@material
|
|
7
|
-
import
|
|
3
|
+
import TextField from '@mui/material/TextField';
|
|
4
|
+
import Popover from '@mui/material/Popover';
|
|
5
|
+
import Grid from '@mui/material/Grid';
|
|
6
|
+
import Typography from '@mui/material/Typography';
|
|
7
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
8
8
|
import Utils from '../../helpers/utils';
|
|
9
9
|
const useStyles = makeStyles(theme => ({
|
|
10
10
|
root: {
|
|
@@ -130,7 +130,7 @@ export default function Operator(props) {
|
|
|
130
130
|
})] }));
|
|
131
131
|
}
|
|
132
132
|
// End of popover-related
|
|
133
|
-
return (_jsxs(_Fragment, { children: [_jsx(TextField, { defaultValue: caseOpName, label: caseOpLabel, onClick: showOperatorDetails, InputProps: {
|
|
133
|
+
return (_jsxs(_Fragment, { children: [_jsx(TextField, { variant: 'standard', defaultValue: caseOpName, label: caseOpLabel, onClick: showOperatorDetails, InputProps: {
|
|
134
134
|
readOnly: true,
|
|
135
135
|
disableUnderline: true,
|
|
136
136
|
inputProps: { style: { cursor: 'pointer' } }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operator.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Operator/Operator.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,OAAO,MAAM,2BAA2B,CAAC;AAChD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,UAAU,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAiBxC,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KACzB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KACzB;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;IACnD,oCAAoC;IACpC,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAE5B,MAAM,UAAU,GAAG,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IAC/C,MAAM,YAAY,GAAG,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;IACxD,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,UAAU,GAAG,KAAK,CAAC;IACvB,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,IAAI,QAAQ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EAAE,EAAE;iBAC7C,GACD,EACF,cAAM,EACL,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAEnD,KAAC,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,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
|
+
{"version":3,"file":"Operator.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Operator/Operator.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAiBxC,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KACzB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;KACzB;CACF,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAoB;IACnD,oCAAoC;IACpC,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAE5B,MAAM,UAAU,GAAG,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IAC/C,MAAM,YAAY,GAAG,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;IACxD,IAAI,WAAW,GAAG,KAAK,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,EAAE;oBACV,QAAQ,EAAE,IAAI;oBACd,gBAAgB,EAAE,IAAI;oBACtB,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;iBAC7C,GACD,EACF,cAAM,EACL,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAEnD,KAAC,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,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 '@mui/material/TextField';\nimport Popover from '@mui/material/Popover';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport makeStyles from '@mui/styles/makeStyles';\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 variant='standard'\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,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
interface PulseProps {
|
|
3
3
|
}
|
|
4
|
-
export default function Pulse(props: PropsWithChildren<PulseProps>): JSX.Element;
|
|
4
|
+
export default function Pulse(props: PropsWithChildren<PulseProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
6
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":"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,
|
|
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,2CAajE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Card, CardContent, CardHeader, Typography } from '@material
|
|
3
|
-
import
|
|
2
|
+
import { Card, CardContent, CardHeader, Typography } from '@mui/material';
|
|
3
|
+
import makeStyles from '@mui/styles/makeStyles';
|
|
4
4
|
const useStyles = makeStyles(theme => ({
|
|
5
5
|
root: {
|
|
6
6
|
marginTop: theme.spacing(1),
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,eAAe,CAAC;AAC1E,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAQhD,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 '@mui/material';\nimport makeStyles from '@mui/styles/makeStyles';\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"]}
|