@pega/react-sdk-components 24.1.10 → 24.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bridge/react_pconnect.d.ts.map +1 -1
- package/lib/bridge/react_pconnect.js +2 -1
- package/lib/bridge/react_pconnect.js.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.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.map +1 -1
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js +11 -11
- package/lib/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.js.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.js +4 -4
- package/lib/components/designSystemExtension/FieldGroup/FieldGroup.js.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.js +6 -6
- package/lib/components/designSystemExtension/FieldValueList/FieldValueList.js.map +1 -1
- 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.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.js +1 -1
- package/lib/components/designSystemExtension/WssQuickCreate/WssQuickCreate.js.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.map +1 -1
- package/lib/components/field/CancelAlert/CancelAlert.js +3 -6
- package/lib/components/field/CancelAlert/CancelAlert.js.map +1 -1
- 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.map +1 -1
- package/lib/components/field/Currency/Currency.js +9 -8
- package/lib/components/field/Currency/Currency.js.map +1 -1
- package/lib/components/field/Date/Date.d.ts.map +1 -1
- package/lib/components/field/Date/Date.js +21 -9
- package/lib/components/field/Date/Date.js.map +1 -1
- package/lib/components/field/DateTime/DateTime.d.ts.map +1 -1
- package/lib/components/field/DateTime/DateTime.js +38 -9
- package/lib/components/field/DateTime/DateTime.js.map +1 -1
- package/lib/components/field/Decimal/Decimal.d.ts.map +1 -1
- package/lib/components/field/Decimal/Decimal.js +8 -5
- package/lib/components/field/Decimal/Decimal.js.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.d.ts.map +1 -1
- package/lib/components/field/Dropdown/Dropdown.js +18 -12
- package/lib/components/field/Dropdown/Dropdown.js.map +1 -1
- 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.js +2 -2
- package/lib/components/field/Group/Group.js.map +1 -1
- 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.map +1 -1
- package/lib/components/field/Multiselect/Multiselect.js +12 -8
- package/lib/components/field/Multiselect/Multiselect.js.map +1 -1
- package/lib/components/field/Percentage/Percentage.d.ts.map +1 -1
- package/lib/components/field/Percentage/Percentage.js +7 -4
- package/lib/components/field/Percentage/Percentage.js.map +1 -1
- package/lib/components/field/Phone/Phone.d.ts.map +1 -1
- package/lib/components/field/Phone/Phone.js +4 -4
- package/lib/components/field/Phone/Phone.js.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.d.ts.map +1 -1
- package/lib/components/field/RadioButtons/RadioButtons.js +6 -12
- 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.map +1 -1
- package/lib/components/field/ScalarList/ScalarList.js +5 -5
- package/lib/components/field/ScalarList/ScalarList.js.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.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.js +1 -1
- package/lib/components/field/TextContent/TextContent.js.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.map +1 -1
- package/lib/components/field/Time/Time.js +31 -8
- package/lib/components/field/Time/Time.js.map +1 -1
- 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.map +1 -1
- package/lib/components/field/UserReference/UserReference.js +3 -5
- package/lib/components/field/UserReference/UserReference.js.map +1 -1
- package/lib/components/helpers/common-utils.d.ts +7 -0
- package/lib/components/helpers/common-utils.d.ts.map +1 -1
- package/lib/components/helpers/common-utils.js +21 -1
- 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/Currency.d.ts.map +1 -1
- package/lib/components/helpers/formatters/Currency.js +12 -15
- package/lib/components/helpers/formatters/Currency.js.map +1 -1
- package/lib/components/helpers/formatters/common.d.ts +2 -2
- package/lib/components/helpers/formatters/common.d.ts.map +1 -1
- package/lib/components/helpers/formatters/common.js +2 -1
- package/lib/components/helpers/formatters/common.js.map +1 -1
- package/lib/components/helpers/formatters/index.d.ts.map +1 -1
- package/lib/components/helpers/formatters/index.js +2 -3
- package/lib/components/helpers/formatters/index.js.map +1 -1
- package/lib/components/helpers/simpleTableHelpers.d.ts +1 -1
- package/lib/components/helpers/simpleTableHelpers.js +1 -1
- package/lib/components/helpers/simpleTableHelpers.js.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.map +1 -1
- package/lib/components/infra/Assignment/Assignment.js +11 -13
- package/lib/components/infra/Assignment/Assignment.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js +12 -22
- package/lib/components/infra/Containers/FlowContainer/FlowContainer.js.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.d.ts.map +1 -1
- package/lib/components/infra/Containers/FlowContainer/helpers.js +1 -5
- package/lib/components/infra/Containers/FlowContainer/helpers.js.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.d.ts.map +1 -1
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js +9 -4
- package/lib/components/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.js.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/helper.js +1 -1
- package/lib/components/infra/Containers/SimpleView/helper.js.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/container-helpers.d.ts +2 -0
- package/lib/components/infra/Containers/container-helpers.d.ts.map +1 -0
- package/lib/components/infra/Containers/{helpers.js → container-helpers.js} +1 -1
- package/lib/components/infra/Containers/container-helpers.js.map +1 -0
- package/lib/components/infra/DashboardFilter/DashboardFilter.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/DashboardFilter.js +3 -4
- package/lib/components/infra/DashboardFilter/DashboardFilter.js.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.d.ts.map +1 -1
- package/lib/components/infra/DashboardFilter/filterUtils.js +3 -5
- package/lib/components/infra/DashboardFilter/filterUtils.js.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts +1 -0
- package/lib/components/infra/DeferLoad/DeferLoad.d.ts.map +1 -1
- package/lib/components/infra/DeferLoad/DeferLoad.js +7 -8
- package/lib/components/infra/DeferLoad/DeferLoad.js.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.d.ts +1 -1
- package/lib/components/infra/MultiStep/MultiStep.d.ts.map +1 -1
- package/lib/components/infra/MultiStep/MultiStep.js +12 -11
- 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.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/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.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.js +2 -2
- package/lib/components/infra/VerticalTabs/VerticalTabs/VerticalTabs.js.map +1 -1
- package/lib/components/infra/View/View.d.ts +1 -0
- 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 +2 -0
- package/lib/components/template/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/template/AppShell/AppShell.js +33 -10
- package/lib/components/template/AppShell/AppShell.js.map +1 -1
- package/lib/components/template/CaseView/CaseView.d.ts +1 -0
- 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.js +6 -6
- package/lib/components/template/CaseViewActionsMenu/CaseViewActionsMenu.js.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.d.ts.map +1 -1
- package/lib/components/template/Confirmation/Confirmation.js +3 -2
- package/lib/components/template/Confirmation/Confirmation.js.map +1 -1
- package/lib/components/template/DataReference/DataReference.js +2 -2
- package/lib/components/template/DataReference/DataReference.js.map +1 -1
- package/lib/components/template/Details/Details/Details.js +2 -2
- package/lib/components/template/Details/Details/Details.js.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.js +2 -2
- package/lib/components/template/Details/DetailsThreeColumn/DetailsThreeColumn.js.map +1 -1
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js +2 -2
- package/lib/components/template/Details/DetailsTwoColumn/DetailsTwoColumn.js.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.d.ts.map +1 -1
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js +4 -4
- package/lib/components/template/Details/DynamicTabs/DynamicTabs.js.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.d.ts.map +1 -1
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js +9 -5
- package/lib/components/template/FieldGroupTemplate/FieldGroupTemplate.js.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/ListView/ListView.d.ts.map +1 -1
- package/lib/components/template/ListView/ListView.js +45 -45
- package/lib/components/template/ListView/ListView.js.map +1 -1
- package/lib/components/template/ListView/utils.d.ts.map +1 -1
- package/lib/components/template/ListView/utils.js +1 -2
- package/lib/components/template/ListView/utils.js.map +1 -1
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js +2 -2
- package/lib/components/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.js.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/PromotedFilters/PromotedFilters.d.ts.map +1 -1
- package/lib/components/template/PromotedFilters/PromotedFilters.js +1 -2
- package/lib/components/template/PromotedFilters/PromotedFilters.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js +0 -2
- package/lib/components/template/SimpleTable/SimpleTable/SimpleTable.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts +2 -0
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js +67 -44
- package/lib/components/template/SimpleTable/SimpleTableManual/SimpleTableManual.js.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.d.ts.map +1 -1
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js +2 -4
- package/lib/components/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.js.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.js +2 -2
- package/lib/components/template/TwoColumn/TwoColumn/TwoColumn.js.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/WideNarrowDetails/WideNarrowDetails.js +2 -2
- package/lib/components/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.js.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.js +2 -2
- package/lib/components/widget/AppAnnouncement/AppAnnouncement.js.map +1 -1
- package/lib/components/widget/Attachment/Attachment.css +1 -0
- package/lib/components/widget/Attachment/Attachment.d.ts.map +1 -1
- package/lib/components/widget/Attachment/Attachment.js +7 -10
- package/lib/components/widget/Attachment/Attachment.js.map +1 -1
- 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.js +1 -1
- package/lib/components/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.js.map +1 -1
- 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.js +2 -2
- package/lib/components/widget/Followers/Followers.js.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js +0 -1
- package/lib/components/widget/QuickCreate/QuickCreate.js.map +1 -1
- 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/ToDo/ToDo.d.ts.map +1 -1
- package/lib/components/widget/ToDo/ToDo.js +60 -17
- package/lib/components/widget/ToDo/ToDo.js.map +1 -1
- 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/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/infra/Containers/helpers.d.ts +0 -2
- package/lib/components/infra/Containers/helpers.d.ts.map +0 -1
- package/lib/components/infra/Containers/helpers.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react_pconnect.d.ts","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":"AA+BO,0EAMN;;
|
|
1
|
+
{"version":3,"file":"react_pconnect.d.ts","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":"AA+BO,0EAMN;;AAgUD;;;;;GAKG;AACH,2EAEC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
/* eslint-disable max-classes-per-file */
|
|
3
4
|
import { Component, createElement } from 'react';
|
|
@@ -239,7 +240,7 @@ class PConnect extends Component {
|
|
|
239
240
|
};
|
|
240
241
|
// If the new component is a reference node then mark with a unique key
|
|
241
242
|
if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {
|
|
242
|
-
finalProps
|
|
243
|
+
return (_createElement(this.Control, { ...finalProps, key: this.getKey() }, this.createChildren()));
|
|
243
244
|
}
|
|
244
245
|
// console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);
|
|
245
246
|
return _jsx(this.Control, { ...finalProps, children: this.createChildren() });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react_pconnect.js","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":";AAAA,yCAAyC;AACzC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,YAAY,EAAE,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC,CAAC,2CAA2C;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GAKG;AACH,MAAM,uBAAuB,GAAG,GAAG,EAAE;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, shallowEqual } from 'react-redux';\n\nimport ComponentMap, { LazyMap as LazyComponentMap } from '../components_map'; // was '../../../../../src/components_map';\nimport ErrorBoundary from '../components/infra/ErrorBoundary';\n\nimport StoreContext from './Context/StoreContext';\n\n// const pathToComponents = \"../../../../../src/components\"; /* When bridge was local, it was \"../components\" */\n\n// For now, NOT doing lazy loading - needs some work on the loader to work with TypeScript\n// As we add components, we'll need to import them here and add to the switch statement\n// below in getComponent!\n\nimport { SdkComponentMap } from './helpers/sdk_component_map';\n\nconst isClassIDCompare = (key, prev, next) => {\n return !(key === 'classID' && (!prev[key] || !next[key]));\n};\n\nconst routingInfoCompare = (next, prev) => {\n return 'routingInfo' in next && (!shallowEqual(next.routingInfo, prev.routingInfo) || !PCore.isDeepEqual(next.routingInfo, prev.routingInfo));\n};\n\n/** Generate unique id for elements */\nconst createUID = () => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) || (renderMode === 'Editable' && referenceList)) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nfunction withVisibility(WrappedComponent) {\n // eslint-disable-next-line react/prefer-stateless-function\n return class extends Component {\n render() {\n const { visibility } = this.props;\n\n if (visibility === false) {\n return null;\n }\n return <WrappedComponent {...this.props} />;\n }\n };\n}\n\nconst connectRedux = (component, c11nEnv) => {\n return connect(\n (state, ownProps) => {\n let addProps = {};\n const obj = {};\n // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render\n if (!ownProps.getPConnect) {\n // eslint-disable-next-line no-console\n console.error('connectRedux ownProps are not defined');\n } else {\n c11nEnv = ownProps.getPConnect();\n }\n\n if (typeof component.additionalProps === 'object') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps);\n } else if (typeof component.additionalProps === 'function') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps(state, ownProps.getPConnect));\n }\n\n c11nEnv.getConfigProps(obj);\n\n // populate additional props which are component specific and not present in configurations\n // This block can be removed once all these props will be added as part of configs\n c11nEnv.populateAdditionalProps(obj);\n\n return {\n ...obj,\n ...addProps\n };\n },\n null,\n null,\n {\n context: StoreContext,\n areStatePropsEqual: (next, prev) => {\n const allStateProps = c11nEnv.getStateProps();\n for (const key of Object.keys(allStateProps)) {\n if (Object.prototype.hasOwnProperty.call(allStateProps, key)) {\n if (key === 'inheritedProps' && next.inheritedProps && !PCore.isDeepEqual(next.inheritedProps, prev.inheritedProps)) {\n return false;\n }\n if (\n key !== 'inheritedProps' &&\n ((isClassIDCompare(key, prev, next) && !shallowEqual(next[key], prev[key])) ||\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo)))\n ) {\n return false;\n }\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !routingInfoCompare(next, prev);\n }\n }\n )(component);\n};\n\nconst getComponent = c11nEnv => {\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n const ComponentsRegistry = PCore.getComponentsRegistry();\n const type = c11nEnv.getComponentName();\n\n const componentObj = ComponentsRegistry.getComponent(type);\n const componentType = (componentObj && componentObj.component) || type;\n\n // JEA - modifying logic before bailing to RootContainer logic to work around async loading problem\n let component = LazyComponentMap[componentType]; /* || window[componentType] */\n\n // NOTE: Until we get lazy loading working, maintain this for each component we add\n if (component === undefined) {\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`react_pconnect getComponent found ${componentType}: Local`);\n component = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[componentType];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`react_pconnect getComponent found ${componentType}: Pega-provided`);\n component = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);\n component = ErrorBoundary;\n }\n }\n } else {\n // We no longer handle the \"old\" switch statement that was here in the original packaging.\n // All components seen here need to be in the SdkComponentMap\n // eslint-disable-next-line no-console\n console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);\n }\n } else {\n // eslint-disable-next-line no-console\n console.log(`getComponent doesn't have an entry for component ${component}`);\n component = ErrorBoundary;\n }\n\n if (c11nEnv.isConditionExist()) {\n return connectRedux(withVisibility(component), c11nEnv);\n }\n\n return connectRedux(component, c11nEnv);\n};\n\n/**\n * JEA - add Type info via JSdoc syntax...\n * @extends {React.Components<Props, State>}\n * createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object\n * to pre-process meta data of each componnet.\n * - Wraps each child in a component with PConnect\n * - Process all actions and make them avaiable in props\n * - Filters all properties in metadata and keeps them\n * __internal for re-render process through connect\n */\nclass PConnect extends Component {\n constructor(props) {\n super(props);\n const { getPConnect } = this.props;\n this.state = {\n hasError: false\n };\n\n this.eventHandler = this.eventHandler.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n\n this.c11nEnv = getPConnect();\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.Control = getComponent(this.c11nEnv);\n this.actionsAPI = this.c11nEnv.getActionsApi();\n\n this.processActions(this.c11nEnv);\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidMount() {\n this.c11nEnv.addFormField();\n setVisibilityForList(this.c11nEnv, true);\n }\n\n componentDidCatch(error, info) {\n // eslint-disable-next-line no-console\n console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);\n }\n\n componentWillUnmount() {\n if (this.c11nEnv.removeFormField) {\n this.c11nEnv.removeFormField();\n setVisibilityForList(this.c11nEnv, false);\n }\n }\n\n /*\n * processActions to see all actions in meta and adds event in props.\n * Attaches common handler (eventHandler) for all actions.\n */\n processActions() {\n if (this.c11nEnv.isEditable()) {\n this.c11nEnv.setAction('onChange', this.changeHandler);\n this.c11nEnv.setAction('onBlur', this.eventHandler);\n }\n }\n\n // Using separate handle for change as in case of dropdown, native click is mapped to react change\n changeHandler(event) {\n this.actionsAPI.changeHandler(this.c11nEnv, event);\n // getActionProcessor().changeHandler(this.c11nEnv, event);\n }\n\n eventHandler(event) {\n this.actionsAPI.eventHandler(this.c11nEnv, event);\n // getActionProcessor().eventHandler(this.c11nEnv, event);\n }\n\n createChildren() {\n const { getPConnect } = this.props;\n if (getPConnect().hasChildren() && getPConnect().getChildren()) {\n return (\n getPConnect()\n .getChildren()\n // eslint-disable-next-line react/no-array-index-key\n .map((childProps, index) => <PConnect key={`${this.getKey(childProps)}_${index}`} {...childProps} />)\n );\n }\n return null;\n }\n\n getKey(props = this.props) {\n const { getPConnect } = props;\n const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();\n let key = !viewName ? createUID() : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;\n\n // In the case of pyDetails the key must be unique for each instance\n if (viewName && viewName.toUpperCase() === 'PYDETAILS') {\n key += `!${getPConnect().getCaseInfo().getID()}`;\n }\n\n return key.toUpperCase();\n }\n\n render() {\n const { hasError } = this.state;\n const { getPConnect, additionalProps, ...otherProps } = this.props;\n\n if (hasError) {\n // You can render any custom fallback UI\n // console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);\n return <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />;\n }\n\n const props = this.c11nEnv.getConfigProps();\n const actions = this.c11nEnv.getActions();\n const finalProps = {\n ...props,\n getPConnect,\n ...actions,\n additionalProps,\n ...otherProps\n };\n\n // If the new component is a reference node then mark with a unique key\n if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {\n finalProps.key = this.getKey();\n }\n\n // console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);\n\n return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;\n }\n}\n// eslint-disable-next-line react/static-property-placement\nPConnect.propTypes = {\n // __internal: PropTypes.object.isRequired,\n // meta: PropTypes.object.isRequired,\n // configObject: PropTypes.object.isRequired,\n getPConnect: PropTypes.func.isRequired,\n additionalProps: PropTypes.shape({\n noLabel: PropTypes.bool,\n readOnly: PropTypes.bool\n }),\n validatemessage: PropTypes.string\n};\n\n// eslint-disable-next-line react/static-property-placement\nPConnect.defaultProps = {\n additionalProps: {},\n validatemessage: ''\n};\n\n// Move these into SdkConstellationReady so PCore is available\ndocument.addEventListener('SdkConstellationReady', () => {\n PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {\n return createElement(PConnect, {\n ...c11nEnv,\n ...c11nEnv.getPConnect().getConfigProps(),\n ...c11nEnv.getPConnect().getActions(),\n ...{ additionalProps }\n });\n });\n\n PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {\n const promises = [];\n componentNames.forEach(comp => {\n if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {\n if (!ComponentMap[comp]) {\n const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;\n promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));\n } else {\n if (ComponentMap[comp].modules && ComponentMap[comp].modules.length) {\n ComponentMap[comp].modules.forEach(module => {\n LazyComponentMap[comp] = module;\n });\n }\n if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {\n ComponentMap[comp].scripts.forEach(script => {\n promises.push(PCore.getAssetLoader().getLoader()(script, 'script'));\n });\n }\n }\n }\n });\n /* Promise.all rejects or accepts all or none. This causes entire component loader to fail\n in case there is a single failure.\n Using allSettled to allow Promise to be resolved even if there are failed components\n Note : This is a liberty taken at component loader and unwise to be used at\n asset loader which will still use Promise.all\n */\n await Promise.allSettled(promises);\n });\n});\n\n/**\n *\n * @param {*} declarative\n * @returns {React.Components<Props, State>}\n\n */\nconst createPConnectComponent = () => {\n return PConnect;\n};\n\nexport default createPConnectComponent;\n\n/* These APIs need to be exposed for authoring bridge\nWill be removed when pxbootstrap and constellation_bridge is cleaned up\nto use single bootstrap file from constellation */\n// window.authoringUtils = {\n// createElement,\n// render,\n// unmountComponentAtNode,\n// LazyComponentMap\n// };\n"]}
|
|
1
|
+
{"version":3,"file":"react_pconnect.js","sourceRoot":"","sources":["../../src/bridge/react_pconnect.jsx"],"names":[],"mappings":";;AAAA,yCAAyC;AACzC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,YAAY,EAAE,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC,CAAC,2CAA2C;AAC1H,OAAO,aAAa,MAAM,mCAAmC,CAAC;AAE9D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,iHAAiH;AAEjH,0FAA0F;AAC1F,uFAAuF;AACvF,4BAA4B;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAC3C,OAAO,CAAC,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE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SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;iBACrE;qBAAM;oBACL,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;wBACnE,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BAC1C,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;wBAClC,CAAC,CAAC,CAAC;qBACJ;oBACD,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE;wBACnE,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;4BAC1C,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;wBACtE,CAAC,CAAC,CAAC;qBACJ;iBACF;aACF;QACH,CAAC,CAAC,CAAC;QACH;;;;;YAKI;QACJ,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG,GAAG,EAAE;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport { Component, createElement } from 'react';\nimport PropTypes from 'prop-types';\nimport { connect, shallowEqual } from 'react-redux';\n\nimport ComponentMap, { LazyMap as LazyComponentMap } from '../components_map'; // was '../../../../../src/components_map';\nimport ErrorBoundary from '../components/infra/ErrorBoundary';\n\nimport StoreContext from './Context/StoreContext';\n\n// const pathToComponents = \"../../../../../src/components\"; /* When bridge was local, it was \"../components\" */\n\n// For now, NOT doing lazy loading - needs some work on the loader to work with TypeScript\n// As we add components, we'll need to import them here and add to the switch statement\n// below in getComponent!\n\nimport { SdkComponentMap } from './helpers/sdk_component_map';\n\nconst isClassIDCompare = (key, prev, next) => {\n return !(key === 'classID' && (!prev[key] || !next[key]));\n};\n\nconst routingInfoCompare = (next, prev) => {\n return 'routingInfo' in next && (!shallowEqual(next.routingInfo, prev.routingInfo) || !PCore.isDeepEqual(next.routingInfo, prev.routingInfo));\n};\n\n/** Generate unique id for elements */\nconst createUID = () => {\n return `_${Math.random().toString(36).slice(2, 11)}`;\n};\n\nexport const setVisibilityForList = (c11nEnv, visibility) => {\n const { selectionMode, selectionList, renderMode, referenceList } = c11nEnv.getComponentConfig();\n // usecase:multiselect, fieldgroup, editable table\n if ((selectionMode === PCore.getConstants().LIST_SELECTION_MODE.MULTI && selectionList) || (renderMode === 'Editable' && referenceList)) {\n c11nEnv.getListActions().setVisibility(visibility);\n }\n};\n\nfunction withVisibility(WrappedComponent) {\n // eslint-disable-next-line react/prefer-stateless-function\n return class extends Component {\n render() {\n const { visibility } = this.props;\n\n if (visibility === false) {\n return null;\n }\n return <WrappedComponent {...this.props} />;\n }\n };\n}\n\nconst connectRedux = (component, c11nEnv) => {\n return connect(\n (state, ownProps) => {\n let addProps = {};\n const obj = {};\n // Need to use ownProps pconnect since c11nEnv is stale and prior to re-render\n if (!ownProps.getPConnect) {\n // eslint-disable-next-line no-console\n console.error('connectRedux ownProps are not defined');\n } else {\n c11nEnv = ownProps.getPConnect();\n }\n\n if (typeof component.additionalProps === 'object') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps);\n } else if (typeof component.additionalProps === 'function') {\n addProps = c11nEnv.resolveConfigProps(component.additionalProps(state, ownProps.getPConnect));\n }\n\n c11nEnv.getConfigProps(obj);\n\n // populate additional props which are component specific and not present in configurations\n // This block can be removed once all these props will be added as part of configs\n c11nEnv.populateAdditionalProps(obj);\n\n return {\n ...obj,\n ...addProps\n };\n },\n null,\n null,\n {\n context: StoreContext,\n areStatePropsEqual: (next, prev) => {\n const allStateProps = c11nEnv.getStateProps();\n for (const key of Object.keys(allStateProps)) {\n if (Object.prototype.hasOwnProperty.call(allStateProps, key)) {\n if (key === 'inheritedProps' && next.inheritedProps && !PCore.isDeepEqual(next.inheritedProps, prev.inheritedProps)) {\n return false;\n }\n if (\n key !== 'inheritedProps' &&\n ((isClassIDCompare(key, prev, next) && !shallowEqual(next[key], prev[key])) ||\n (next.routingInfo && !PCore.isDeepEqual(next.routingInfo, prev.routingInfo)))\n ) {\n return false;\n }\n }\n }\n /* TODO For some rawConfig we are not getting routingInfo under allStateProps */\n return !routingInfoCompare(next, prev);\n }\n }\n )(component);\n};\n\nconst getComponent = c11nEnv => {\n // PCore is defined in pxBootstrapShell - eventually will be exported in place of constellationCore\n const ComponentsRegistry = PCore.getComponentsRegistry();\n const type = c11nEnv.getComponentName();\n\n const componentObj = ComponentsRegistry.getComponent(type);\n const componentType = (componentObj && componentObj.component) || type;\n\n // JEA - modifying logic before bailing to RootContainer logic to work around async loading problem\n let component = LazyComponentMap[componentType]; /* || window[componentType] */\n\n // NOTE: Until we get lazy loading working, maintain this for each component we add\n if (component === undefined) {\n if (SdkComponentMap) {\n // This is the node_modules version of react_pconnect!\n const theLocalComponent = SdkComponentMap.getLocalComponentMap()[componentType];\n if (theLocalComponent !== undefined) {\n // eslint-disable-next-line no-console\n console.log(`react_pconnect getComponent found ${componentType}: Local`);\n component = theLocalComponent;\n } else {\n const thePegaProvidedComponent = SdkComponentMap.getPegaProvidedComponentMap()[componentType];\n if (thePegaProvidedComponent !== undefined) {\n // console.log(`react_pconnect getComponent found ${componentType}: Pega-provided`);\n component = thePegaProvidedComponent;\n } else {\n // eslint-disable-next-line no-console\n console.error(`react_pconnect: getComponent doesn't have an entry for type ${type}`);\n component = ErrorBoundary;\n }\n }\n } else {\n // We no longer handle the \"old\" switch statement that was here in the original packaging.\n // All components seen here need to be in the SdkComponentMap\n // eslint-disable-next-line no-console\n console.error(`SdkComponentMap not defined! Unable to process component: ${componentType}`);\n }\n } else {\n // eslint-disable-next-line no-console\n console.log(`getComponent doesn't have an entry for component ${component}`);\n component = ErrorBoundary;\n }\n\n if (c11nEnv.isConditionExist()) {\n return connectRedux(withVisibility(component), c11nEnv);\n }\n\n return connectRedux(component, c11nEnv);\n};\n\n/**\n * JEA - add Type info via JSdoc syntax...\n * @extends {React.Components<Props, State>}\n * createPConnectComponent - Class to create/initialize a PConnect (c11nEnv) object\n * to pre-process meta data of each componnet.\n * - Wraps each child in a component with PConnect\n * - Process all actions and make them avaiable in props\n * - Filters all properties in metadata and keeps them\n * __internal for re-render process through connect\n */\nclass PConnect extends Component {\n constructor(props) {\n super(props);\n const { getPConnect } = this.props;\n this.state = {\n hasError: false\n };\n\n this.eventHandler = this.eventHandler.bind(this);\n this.changeHandler = this.changeHandler.bind(this);\n\n this.c11nEnv = getPConnect();\n // eslint-disable-next-line react/no-unused-class-component-methods\n this.Control = getComponent(this.c11nEnv);\n this.actionsAPI = this.c11nEnv.getActionsApi();\n\n this.processActions(this.c11nEnv);\n }\n\n static getDerivedStateFromError(error) {\n // Update state so the next render will show the fallback UI.\n return {\n hasError: true,\n error\n };\n }\n\n componentDidMount() {\n this.c11nEnv.addFormField();\n setVisibilityForList(this.c11nEnv, true);\n }\n\n componentDidCatch(error, info) {\n // eslint-disable-next-line no-console\n console.error(`Error while Rendering the component ${this.componentName} : `, error, info.componentStack);\n }\n\n componentWillUnmount() {\n if (this.c11nEnv.removeFormField) {\n this.c11nEnv.removeFormField();\n setVisibilityForList(this.c11nEnv, false);\n }\n }\n\n /*\n * processActions to see all actions in meta and adds event in props.\n * Attaches common handler (eventHandler) for all actions.\n */\n processActions() {\n if (this.c11nEnv.isEditable()) {\n this.c11nEnv.setAction('onChange', this.changeHandler);\n this.c11nEnv.setAction('onBlur', this.eventHandler);\n }\n }\n\n // Using separate handle for change as in case of dropdown, native click is mapped to react change\n changeHandler(event) {\n this.actionsAPI.changeHandler(this.c11nEnv, event);\n // getActionProcessor().changeHandler(this.c11nEnv, event);\n }\n\n eventHandler(event) {\n this.actionsAPI.eventHandler(this.c11nEnv, event);\n // getActionProcessor().eventHandler(this.c11nEnv, event);\n }\n\n createChildren() {\n const { getPConnect } = this.props;\n if (getPConnect().hasChildren() && getPConnect().getChildren()) {\n return (\n getPConnect()\n .getChildren()\n // eslint-disable-next-line react/no-array-index-key\n .map((childProps, index) => <PConnect key={`${this.getKey(childProps)}_${index}`} {...childProps} />)\n );\n }\n return null;\n }\n\n getKey(props = this.props) {\n const { getPConnect } = props;\n const viewName = getPConnect().getConfigProps().name || getPConnect().getCurrentView();\n let key = !viewName ? createUID() : `${viewName}!${getPConnect().getCurrentClassID() || createUID()}`;\n\n // In the case of pyDetails the key must be unique for each instance\n if (viewName && viewName.toUpperCase() === 'PYDETAILS') {\n key += `!${getPConnect().getCaseInfo().getID()}`;\n }\n\n return key.toUpperCase();\n }\n\n render() {\n const { hasError } = this.state;\n const { getPConnect, additionalProps, ...otherProps } = this.props;\n\n if (hasError) {\n // You can render any custom fallback UI\n // console.log(`react_pconnect error: used to return: <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />`);\n return <ErrorBoundary getPConnect={() => this.c11nEnv} isInternalError />;\n }\n\n const props = this.c11nEnv.getConfigProps();\n const actions = this.c11nEnv.getActions();\n const finalProps = {\n ...props,\n getPConnect,\n ...actions,\n additionalProps,\n ...otherProps\n };\n\n // If the new component is a reference node then mark with a unique key\n if (['reference', 'View'].includes(getPConnect().getComponentName()) && !finalProps.key) {\n return (\n <this.Control {...finalProps} key={this.getKey()}>\n {this.createChildren()}\n </this.Control>\n );\n }\n\n // console.log(`react_pconnect: used to return: <this.Control {...finalProps} />`);\n\n return <this.Control {...finalProps}>{this.createChildren()}</this.Control>;\n }\n}\n// eslint-disable-next-line react/static-property-placement\nPConnect.propTypes = {\n // __internal: PropTypes.object.isRequired,\n // meta: PropTypes.object.isRequired,\n // configObject: PropTypes.object.isRequired,\n getPConnect: PropTypes.func.isRequired,\n additionalProps: PropTypes.shape({\n noLabel: PropTypes.bool,\n readOnly: PropTypes.bool\n }),\n validatemessage: PropTypes.string\n};\n\n// eslint-disable-next-line react/static-property-placement\nPConnect.defaultProps = {\n additionalProps: {},\n validatemessage: ''\n};\n\n// Move these into SdkConstellationReady so PCore is available\ndocument.addEventListener('SdkConstellationReady', () => {\n PCore.registerComponentCreator((c11nEnv, additionalProps = {}) => {\n return createElement(PConnect, {\n ...c11nEnv,\n ...c11nEnv.getPConnect().getConfigProps(),\n ...c11nEnv.getPConnect().getActions(),\n ...{ additionalProps }\n });\n });\n\n PCore.getAssetLoader().register('component-loader', async (componentNames = []) => {\n const promises = [];\n componentNames.forEach(comp => {\n if (/^[A-Z]/.test(comp) && !LazyComponentMap[comp]) {\n if (!ComponentMap[comp]) {\n const srcUrl = `${PCore.getAssetLoader().getConstellationServiceUrl()}/v860/${PCore.getAssetLoader().getAppAlias()}/component/${comp}.js`;\n promises.push(PCore.getAssetLoader().getLoader()(srcUrl, 'script'));\n } else {\n if (ComponentMap[comp].modules && ComponentMap[comp].modules.length) {\n ComponentMap[comp].modules.forEach(module => {\n LazyComponentMap[comp] = module;\n });\n }\n if (ComponentMap[comp].scripts && ComponentMap[comp].scripts.length) {\n ComponentMap[comp].scripts.forEach(script => {\n promises.push(PCore.getAssetLoader().getLoader()(script, 'script'));\n });\n }\n }\n }\n });\n /* Promise.all rejects or accepts all or none. This causes entire component loader to fail\n in case there is a single failure.\n Using allSettled to allow Promise to be resolved even if there are failed components\n Note : This is a liberty taken at component loader and unwise to be used at\n asset loader which will still use Promise.all\n */\n await Promise.allSettled(promises);\n });\n});\n\n/**\n *\n * @param {*} declarative\n * @returns {React.Components<Props, State>}\n\n */\nconst createPConnectComponent = () => {\n return PConnect;\n};\n\nexport default createPConnectComponent;\n\n/* These APIs need to be exposed for authoring bridge\nWill be removed when pxbootstrap and constellation_bridge is cleaned up\nto use single bootstrap file from constellation */\n// window.authoringUtils = {\n// createElement,\n// render,\n// unmountComponentAtNode,\n// LazyComponentMap\n// };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertBanner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AlertBanner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/AlertBanner/AlertBanner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAYtC,MAAM,YAAY,GAAG;IACnB,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IACzD,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACnD,IAAI,eAAe,GAAG,EAAE,CAAC;IAEzB,IAAI,SAAS,EAAE;QACb,eAAe,GAAG;YAChB,OAAO,EAAE,SAAS;SACnB,CAAC;KACH;IAED,OAAO,CACL,cAAK,EAAE,EAAE,EAAE,YACR,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CACvB,KAAC,KAAK,IAAe,OAAO,EAAC,UAAU,EAAC,QAAQ,EAAE,YAAY,CAAC,OAAO,CAAC,KAAM,eAAe,YACzF,OAAO,IADE,OAAO,CAEX,CACT,CAAC,GACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { Alert } from '@mui/material';\n\n// AlertBanner is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\ninterface AlertBannerProps {\n // If any, enter additional props that only exist on Date here\n id: string;\n variant: string;\n messages: string[];\n onDismiss?: any;\n}\n\nconst SEVERITY_MAP = {\n urgent: 'error',\n warning: 'warning',\n success: 'success',\n info: 'info'\n};\n\nexport default function AlertBanner(props: AlertBannerProps) {\n const { id, variant, messages, onDismiss } = props;\n let additionalProps = {};\n\n if (onDismiss) {\n additionalProps = {\n onClose: onDismiss\n };\n }\n\n return (\n <div id={id}>\n {messages.map(message => (\n <Alert key={message} variant='outlined' severity={SEVERITY_MAP[variant]} {...additionalProps}>\n {message}\n </Alert>\n ))}\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/Banner/Banner.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,cAAc,CAAC;AAoBtB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAkB;IAC/C,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IACnD,MAAM,UAAU,GAAG;QACjB,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACpB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACrB,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;KACtB,CAAC;IACF,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,aAClC,cAAK,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,eAAe,GAAG,EAAE,YAC3F,cAAK,SAAS,EAAC,0BAA0B,YACvC,0BACE,aAAI,SAAS,EAAC,OAAO,YAAE,KAAK,GAAM,EAClC,YAAG,SAAS,EAAC,SAAS,YAAE,OAAO,GAAK,IAChC,GACF,GACF,EACN,MAAC,IAAI,IAAC,SAAS,QAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,CAAC,aAC/D,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAC7D,CAAC,GACG,EACP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAC7D,CAAC,GACG,IACF,IACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["import Grid from '@mui/material/Grid';\nimport './Banner.css';\n\n// AlertBanner is one of the few components that does NOT have getPConnect.\n// So, no need to extend PConnProps\n\ninterface BannerProps {\n // If any, enter additional props that only exist on this component\n a: any;\n b: any;\n banner: {\n variant: any;\n backgroundColor: any;\n title: any;\n message: any;\n backgroundImage: any;\n tintImage: any;\n };\n variant: any;\n}\n\nexport default function Banner(props: BannerProps) {\n const { a, b, banner, variant } = props;\n const { title, message, backgroundImage } = banner;\n const variantMap = {\n 'two-column': [6, 6],\n 'narrow-wide': [4, 8],\n 'wide-narrow': [8, 4]\n };\n return (\n <div style={{ marginBottom: '2rem' }}>\n <div className='background-image-style' style={{ backgroundImage: `url(${backgroundImage})` }}>\n <div className='background-style content'>\n <div>\n <h1 className='title'>{title}</h1>\n <p className='message'>{message}</p>\n </div>\n </div>\n </div>\n <Grid container item xs={12} className='banner-layout' spacing={1}>\n <Grid item xs={variantMap[variant][0]} style={{ padding: '1em' }}>\n {a}\n </Grid>\n <Grid item xs={variantMap[variant][1]} style={{ padding: '1em' }}>\n {b}\n </Grid>\n </Grid>\n </div>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":"AASA,OAAO,yBAAyB,CAAC;AAMjC,UAAU,sBAAsB;IAE9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,KAAK,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"CaseSummaryFields.d.ts","sourceRoot":"","sources":["../../../../src/components/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx"],"names":[],"mappings":"AASA,OAAO,yBAAyB,CAAC;AAMjC,UAAU,sBAAsB;IAE9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,KAAK,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAuOtE"}
|
|
@@ -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,19 +43,19 @@ 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
60
|
inputProps: {
|
|
61
61
|
style: { cursor: 'pointer' },
|
|
@@ -65,7 +65,7 @@ export default function CaseSummaryFields(props) {
|
|
|
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,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,QAA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,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 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 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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AAE,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,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;QAC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,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"]}
|
|
@@ -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;Q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,CAAC,gBAAgB,EAAE,OAAO,EAAE,kBAAkB,aAC3F,SAAS,CAAC,CAAC,CAAC,KAAC,sBAAsB,KAAG,CAAC,CAAC,CAAC,KAAC,qBAAqB,KAAG,EACnE,sBAAI,IAAI,GAAK,IACR,CACR,CAAC,CAAC,CAAC,CACF,sBAAI,IAAI,GAAK,CACd,GACG,CACP,EACA,YAAY,IAAI,YAAY,KAAK,MAAM,IAAI;gBAC1C,2CAA2C;gBAC3C,cAAwB,SAAS,EAAE,OAAO,CAAC,eAAe,EAAE,uBAAuB,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,IAApG,cAAc,CAA0F,CAClH,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,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,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAW5C,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAA0B;IAC/D,IAAI,iBAAiB,GAAG,OAAO,CAAC;IAChC,IAAI,iBAAiB,EAAE;QACrB,iBAAiB,GAAG,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,KAAK,CAAC,qBAAqB,EAAE,CAAC,CAAC;KACzF;IAED,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAE,cAAc,EAAC,eAAe,YACxD,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YACjC,MAAC,IAAI,IAAC,SAAS,QAAC,OAAO,EAAE,CAAC,aACvB,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACvB,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,aACjC,sBAAI,IAAI,CAAC,IAAI,GAAK,EACjB,KAAK,CAAC,QAAQ,IAAI,CACjB,iBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EACzB,SAAS,EAAC,qBAAqB,EAC/B,EAAE,EAAE,cAAc,IAAI,CAAC,EAAE,EAAE,gBAChB,YAAY,EACvB,OAAO,EAAE,GAAG,EAAE;oCACZ,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gCAC1B,CAAC,YAED,cAAK,SAAS,EAAC,mCAAmC,EAAC,GAAG,EAAE,iBAAiB,GAAI,GACtE,CACV,EACA,IAAI,CAAC,QAAQ,EACd,cAAM,EACL,KAAK,CAAC,KAAK,IAAI,KAAC,OAAO,KAAG,EAC3B,cAAM,IACD,CACR,CAAC,EACD,KAAK,CAAC,KAAK,IAAI,CACd,KAAC,IAAI,IAAC,OAAO,EAAE,KAAK,CAAC,KAAK,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,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,14 +35,14 @@ 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' || !name ? 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
|
}
|
|
46
|
-
return (_jsxs(Grid, { container: true, spacing: 4, justifyContent: 'space-between', children: [getGridItemLabel(), getGridItemValue()] }));
|
|
46
|
+
return (_jsxs(Grid, { container: true, spacing: 4, justifyContent: 'space-between', children: [name ? getGridItemLabel() : null, getGridItemValue()] }));
|
|
47
47
|
}
|
|
48
48
|
//# sourceMappingURL=FieldValueList.js.map
|
|
@@ -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,SA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C;IAED,SAAS,gBAAgB;QACvB,MAAM,cAAc,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;QAE9C,OAAO,CACL,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,OAAO,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YACjH,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,IAAI,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,IAAI,EAChC,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' || !name ? 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 {name ? getGridItemLabel() : null}\n {getGridItemValue()}\n </Grid>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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"}
|