@pega/react-sdk-overrides 24.2.11 → 25.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/lib/designSystemExtension/Banner/Banner.css +1 -1
  2. package/lib/designSystemExtension/Banner/Banner.tsx +10 -7
  3. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.css +0 -1
  4. package/lib/designSystemExtension/CaseSummaryFields/CaseSummaryFields.tsx +53 -37
  5. package/lib/designSystemExtension/DetailsFields/DetailsFields.tsx +11 -13
  6. package/lib/designSystemExtension/FieldGroup/FieldGroup.tsx +8 -9
  7. package/lib/designSystemExtension/FieldGroupList/FieldGroupList.tsx +9 -9
  8. package/lib/designSystemExtension/FieldValueList/FieldValueList.tsx +7 -8
  9. package/lib/designSystemExtension/Operator/Operator.tsx +21 -19
  10. package/lib/designSystemExtension/Pulse/Pulse.tsx +1 -1
  11. package/lib/designSystemExtension/RichTextEditor/RichTextEditor.tsx +32 -4
  12. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.css +7 -14
  13. package/lib/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx +13 -2
  14. package/lib/field/AutoComplete/AutoComplete.tsx +1 -1
  15. package/lib/field/CancelAlert/CancelAlert.css +4 -4
  16. package/lib/field/CancelAlert/CancelAlert.tsx +6 -6
  17. package/lib/field/Checkbox/Checkbox.tsx +97 -4
  18. package/lib/field/Currency/Currency.tsx +3 -3
  19. package/lib/field/Currency/currency-utils.ts +1 -2
  20. package/lib/field/Date/Date.tsx +3 -7
  21. package/lib/field/DateTime/DateTime.tsx +3 -8
  22. package/lib/field/Decimal/Decimal.tsx +3 -5
  23. package/lib/field/Dropdown/Dropdown.tsx +5 -7
  24. package/lib/field/Email/Email.tsx +11 -13
  25. package/lib/field/Group/Group.tsx +10 -8
  26. package/lib/field/Integer/Integer.tsx +5 -7
  27. package/lib/field/Location/Location.css +4 -0
  28. package/lib/field/Location/Location.tsx +258 -0
  29. package/lib/field/Location/config-ext.json +8 -0
  30. package/lib/field/Location/index.tsx +1 -0
  31. package/lib/field/Multiselect/utils.ts +1 -1
  32. package/lib/field/ObjectReference/ObjectReference.tsx +235 -0
  33. package/lib/field/ObjectReference/index.tsx +1 -0
  34. package/lib/field/ObjectReference/utils.ts +111 -0
  35. package/lib/field/Percentage/Percentage.tsx +3 -7
  36. package/lib/field/Phone/Phone.tsx +7 -5
  37. package/lib/field/RadioButtons/RadioButtons.tsx +47 -2
  38. package/lib/field/RichText/RichText.css +79 -0
  39. package/lib/field/RichText/RichText.tsx +3 -1
  40. package/lib/field/ScalarList/ScalarList.tsx +2 -3
  41. package/lib/field/SelectableCard/SelectableCard.tsx +175 -0
  42. package/lib/field/SelectableCard/index.tsx +1 -0
  43. package/lib/field/SelectableCard/utils.tsx +223 -0
  44. package/lib/field/SemanticLink/SemanticLink.tsx +160 -28
  45. package/lib/field/SemanticLink/utils.ts +1 -1
  46. package/lib/field/TextArea/TextArea.tsx +5 -7
  47. package/lib/field/TextContent/TextContent.tsx +1 -2
  48. package/lib/field/TextInput/TextInput.tsx +5 -7
  49. package/lib/field/Time/Time.tsx +3 -7
  50. package/lib/field/URL/URL.tsx +5 -7
  51. package/lib/field/UserReference/UserReference.tsx +2 -3
  52. package/lib/helpers/attachmentShared.ts +6 -0
  53. package/lib/helpers/common-utils.ts +3 -4
  54. package/lib/helpers/data_page.ts +0 -1
  55. package/lib/helpers/field-group-utils.ts +1 -1
  56. package/lib/helpers/formatters/Currency.ts +9 -4
  57. package/lib/helpers/formatters/CurrencyMap.ts +0 -2
  58. package/lib/helpers/object-utils.ts +10 -0
  59. package/lib/helpers/simpleTableHelpers.ts +118 -6
  60. package/lib/helpers/utils.ts +8 -1
  61. package/lib/helpers/versionHelpers.ts +0 -1
  62. package/lib/infra/ActionButtons/ActionButtons.tsx +28 -21
  63. package/lib/infra/Assignment/Assignment.tsx +37 -30
  64. package/lib/infra/AssignmentCard/AssignmentCard.tsx +2 -2
  65. package/lib/infra/Containers/FlowContainer/FlowContainer.tsx +17 -96
  66. package/lib/infra/Containers/ModalViewContainer/ListViewActionButtons/ListViewActionButtons.tsx +1 -2
  67. package/lib/infra/Containers/ModalViewContainer/ModalViewContainer.tsx +7 -6
  68. package/lib/infra/Containers/ViewContainer/ViewContainer.tsx +4 -5
  69. package/lib/infra/Containers/container-helpers.ts +47 -1
  70. package/lib/infra/DashboardFilter/DashboardFilter.tsx +3 -6
  71. package/lib/infra/DashboardFilter/filterUtils.tsx +3 -4
  72. package/lib/infra/DeferLoad/DeferLoad.tsx +2 -4
  73. package/lib/infra/ErrorBoundary/ErrorBoundary.tsx +1 -3
  74. package/lib/infra/MultiStep/MultiStep.css +48 -70
  75. package/lib/infra/MultiStep/MultiStep.tsx +27 -53
  76. package/lib/infra/NavBar/NavBar.css +1 -1
  77. package/lib/infra/NavBar/NavBar.tsx +43 -32
  78. package/lib/infra/Reference/Reference.tsx +3 -4
  79. package/lib/infra/Region/Region.tsx +1 -1
  80. package/lib/infra/RootContainer/RootContainer.tsx +2 -3
  81. package/lib/infra/Stages/Stages.tsx +3 -4
  82. package/lib/infra/View/View.tsx +4 -3
  83. package/lib/template/AdvancedSearch/AdvancedSearch.tsx +86 -0
  84. package/lib/template/AdvancedSearch/SearchGroup/persistUtils.ts +52 -0
  85. package/lib/template/AdvancedSearch/SearchGroups/SearchGroups.tsx +244 -0
  86. package/lib/template/AdvancedSearch/SearchGroups/hooks.ts +37 -0
  87. package/lib/template/AdvancedSearch/SearchGroups/index.tsx +1 -0
  88. package/lib/template/AdvancedSearch/SearchGroups/utils.ts +29 -0
  89. package/lib/template/AdvancedSearch/TemplateContext.ts +11 -0
  90. package/lib/template/AdvancedSearch/config-ext.json +9 -0
  91. package/lib/template/AdvancedSearch/index.tsx +1 -0
  92. package/lib/template/AppShell/AppShell.css +1 -1
  93. package/lib/template/AppShell/AppShell.tsx +16 -17
  94. package/lib/template/BannerPage/BannerPage.tsx +2 -2
  95. package/lib/template/CaseSummary/CaseSummary.tsx +28 -41
  96. package/lib/template/CaseView/CaseView.tsx +28 -35
  97. package/lib/template/CaseViewActionsMenu/CaseViewActionsMenu.tsx +1 -1
  98. package/lib/template/Confirmation/Confirmation.tsx +2 -3
  99. package/lib/template/DataReference/DataReference.tsx +312 -106
  100. package/lib/template/DataReference/DataReferenceAdvancedSearchContext.ts +10 -0
  101. package/lib/template/DataReference/SearchForm.tsx +149 -0
  102. package/lib/template/DataReference/utils.ts +90 -0
  103. package/lib/template/DefaultForm/DefaultForm.tsx +3 -3
  104. package/lib/template/DefaultForm/utils/index.ts +1 -3
  105. package/lib/template/DefaultPage/DefaultPage.tsx +108 -0
  106. package/lib/template/DefaultPage/index.tsx +1 -0
  107. package/lib/template/Details/Details/Details.tsx +11 -11
  108. package/lib/template/Details/DetailsSubTabs/DetailsSubTabs.tsx +2 -2
  109. package/lib/template/Details/DetailsThreeColumn/DetailsThreeColumn.tsx +11 -11
  110. package/lib/template/Details/DetailsTwoColumn/DetailsTwoColumn.tsx +11 -11
  111. package/lib/template/Details/DynamicTabs/DynamicTabs.tsx +1 -1
  112. package/lib/template/FieldGroupTemplate/FieldGroupTemplate.tsx +2 -3
  113. package/lib/template/InlineDashboard/InlineDashboard.tsx +14 -16
  114. package/lib/template/InlineDashboardPage/InlineDashboardPage.tsx +2 -2
  115. package/lib/template/ListPage/ListPage.tsx +1 -1
  116. package/lib/template/ListView/ListView.tsx +278 -198
  117. package/lib/template/ListView/hooks.ts +1 -5
  118. package/lib/template/ListView/utils.ts +38 -5
  119. package/lib/template/MultiReferenceReadOnly/MultiReferenceReadOnly.tsx +1 -1
  120. package/lib/template/NarrowWide/NarrowWide/NarrowWide.tsx +5 -5
  121. package/lib/template/NarrowWide/NarrowWideDetails/NarrowWideDetails.tsx +11 -11
  122. package/lib/template/NarrowWide/NarrowWideForm/NarrowWideForm.tsx +2 -2
  123. package/lib/template/NarrowWide/NarrowWidePage/NarrowWidePage.tsx +2 -2
  124. package/lib/template/OneColumn/OneColumn/OneColumn.tsx +7 -7
  125. package/lib/template/OneColumn/OneColumnPage/OneColumnPage.tsx +1 -1
  126. package/lib/template/OneColumn/OneColumnTab/OneColumnTab.tsx +2 -2
  127. package/lib/template/PromotedFilters/PromotedFilters.tsx +1 -2
  128. package/lib/template/SelfServiceCaseView/SelfServiceCaseView.tsx +145 -0
  129. package/lib/template/SelfServiceCaseView/index.tsx +1 -0
  130. package/lib/template/SimpleTable/SimpleTable/SimpleTable.tsx +2 -3
  131. package/lib/template/SimpleTable/SimpleTableManual/SimpleTableManual.tsx +36 -33
  132. package/lib/template/SimpleTable/SimpleTableSelect/SimpleTableSelect.tsx +1 -1
  133. package/lib/template/SingleReferenceReadOnly/SingleReferenceReadOnly.tsx +10 -2
  134. package/lib/template/SubTabs/SubTabs.tsx +2 -2
  135. package/lib/template/SubTabs/tabUtils.ts +118 -1
  136. package/lib/template/TwoColumn/TwoColumn/TwoColumn.tsx +9 -10
  137. package/lib/template/TwoColumn/TwoColumnPage/TwoColumnPage.tsx +1 -1
  138. package/lib/template/TwoColumn/TwoColumnTab/TwoColumnTab.tsx +9 -10
  139. package/lib/template/WideNarrow/WideNarrow/WideNarrow.tsx +5 -5
  140. package/lib/template/WideNarrow/WideNarrowDetails/WideNarrowDetails.tsx +11 -11
  141. package/lib/template/WideNarrow/WideNarrowForm/WideNarrowForm.tsx +2 -2
  142. package/lib/template/WideNarrow/WideNarrowPage/WideNarrowPage.tsx +2 -2
  143. package/lib/template/WssNavBar/WssNavBar.css +1 -1
  144. package/lib/template/WssNavBar/WssNavBar.tsx +6 -6
  145. package/lib/template/utils.tsx +58 -0
  146. package/lib/widget/AppAnnouncement/AppAnnouncement.tsx +1 -1
  147. package/lib/widget/Attachment/Attachment.css +6 -8
  148. package/lib/widget/Attachment/Attachment.tsx +303 -225
  149. package/lib/widget/Attachment/Attachment.types.ts +96 -0
  150. package/lib/widget/Attachment/AttachmentUtils.ts +316 -0
  151. package/lib/widget/CaseHistory/CaseHistory.tsx +5 -5
  152. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.css +0 -14
  153. package/lib/widget/FileUtility/ActionButtonsForFileUtil/ActionButtonsForFileUtil.tsx +3 -3
  154. package/lib/widget/FileUtility/FileUtility/FileUtility.css +7 -6
  155. package/lib/widget/FileUtility/FileUtility/FileUtility.tsx +29 -22
  156. package/lib/widget/Followers/Followers.tsx +2 -4
  157. package/lib/widget/QuickCreate/QuickCreate.tsx +1 -2
  158. package/lib/widget/SummaryItem/SummaryItem.css +9 -11
  159. package/lib/widget/SummaryItem/SummaryItem.tsx +2 -2
  160. package/lib/widget/SummaryList/SummaryList.tsx +1 -1
  161. package/lib/widget/ToDo/ToDo.css +1 -13
  162. package/lib/widget/ToDo/ToDo.tsx +37 -36
  163. package/package.json +1 -1
  164. package/lib/helpers/attachmentHelpers.ts +0 -76
@@ -1,4 +1,5 @@
1
1
  import { Button } from '@mui/material';
2
+ import { makeStyles } from '@mui/styles';
2
3
  import './WssQuickCreate.css';
3
4
 
4
5
  // WssQuickCreate is one of the few components that does NOT have getPConnect.
@@ -9,19 +10,29 @@ interface WssQuickCreateProps {
9
10
  actions?: any[];
10
11
  }
11
12
 
13
+ const useStyles = makeStyles(theme => ({
14
+ quickLinkList: {
15
+ backgroundColor: theme.palette.mode === 'dark' ? 'var(--app-background-color)' : 'var(--link-button-color)',
16
+ color: 'var(--app-text-color)',
17
+ borderRadius: '16px',
18
+ border: '1px solid var(--app-primary-color)'
19
+ }
20
+ }));
21
+
12
22
  export default function WssQuickCreate(props: WssQuickCreateProps) {
13
23
  const { heading, actions } = props;
24
+ const classes = useStyles();
14
25
 
15
26
  return (
16
27
  <div>
17
- <h1 id='quick-links-heading' className='quick-link-heading'>
28
+ <h1 id='quick-links-heading' className='quick-links-heading'>
18
29
  {heading}
19
30
  </h1>
20
31
  <ul id='quick-links' className='quick-link-ul-list'>
21
32
  {actions &&
22
33
  actions.map(element => {
23
34
  return (
24
- <li className='quick-link-list' key={element.label}>
35
+ <li className={classes.quickLinkList} key={element.label}>
25
36
  <Button className='quick-link-button' onClick={element.onClick}>
26
37
  <span className='quick-link-button-span'>
27
38
  {element.icon && <img className='quick-link-icon' src={element.icon} />}
@@ -7,7 +7,7 @@ import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
7
7
  import { getDataPage } from '@pega/react-sdk-components/lib/components/helpers/data_page';
8
8
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
9
9
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
10
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
11
11
 
12
12
  interface IOption {
13
13
  key: string;
@@ -5,7 +5,7 @@
5
5
  align-items: center;
6
6
  height: 100%;
7
7
  width: 100%;
8
- background-color: rgba(100, 100, 100, 0.4);
8
+ background-color: var(--modal-background-color);
9
9
  position: fixed;
10
10
  z-index: 9999;
11
11
  top: 0px;
@@ -16,9 +16,9 @@
16
16
  display: table;
17
17
  margin: auto;
18
18
  min-width: 550px;
19
- background-color: white;
20
- border: 1px solid black;
19
+ background-color: var(--modal-top-color);
20
+ border: 1px solid var(--modal-border-color);
21
21
  border-radius: 10px;
22
22
  padding: 20px;
23
- box-shadow: 0 0 10px 3px #777;
23
+ box-shadow: 0 0 10px 3px var(--modal-box-shadow-color);
24
24
  }
@@ -1,8 +1,8 @@
1
1
  import React, { useState } from 'react';
2
- import { Button, Grid, IconButton, Snackbar } from '@mui/material';
2
+ import { Button, Grid2, IconButton, Snackbar } from '@mui/material';
3
3
  import CloseIcon from '@mui/icons-material/Close';
4
4
 
5
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
  import './CancelAlert.css';
7
7
 
8
8
  interface CancelAlertProps extends PConnFieldProps {
@@ -125,10 +125,10 @@ export default function CancelAlert(props: CancelAlertProps) {
125
125
  <p>{localizedVal(content, localeCategory)}</p>
126
126
  </div>
127
127
  <div className='action-controls'>
128
- <Grid container spacing={4} justifyContent='space-between'>
129
- <Grid item>{leftButton}</Grid>
130
- <Grid item>{rightButton}</Grid>
131
- </Grid>
128
+ <Grid2 container spacing={4} justifyContent='space-between'>
129
+ <Grid2>{leftButton}</Grid2>
130
+ <Grid2>{rightButton}</Grid2>
131
+ </Grid2>
132
132
  </div>
133
133
  </div>
134
134
  </div>
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/no-array-index-key */
2
1
  import { useState, useEffect } from 'react';
3
2
  import { Checkbox, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel } from '@mui/material';
4
3
  import makeStyles from '@mui/styles/makeStyles';
@@ -6,7 +5,7 @@ import makeStyles from '@mui/styles/makeStyles';
6
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
7
6
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
8
7
  import { insertInstruction, deleteInstruction, updateNewInstuctions } from '@pega/react-sdk-components/lib/components/helpers/instructions-utils';
9
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
8
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
9
 
11
10
  interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
12
11
  // If any, enter additional props that only exist on Checkbox here
@@ -21,18 +20,33 @@ interface CheckboxProps extends Omit<PConnFieldProps, 'value'> {
21
20
  primaryField: string;
22
21
  readonlyContextList: any;
23
22
  referenceList: string;
23
+ variant?: string;
24
+ hideFieldLabels: boolean;
25
+ additionalProps: any;
26
+ imagePosition: string;
27
+ imageSize: string;
28
+ showImageDescription: string;
29
+ renderMode: string;
30
+ image: string;
24
31
  }
25
32
 
26
33
  const useStyles = makeStyles(() => ({
27
34
  checkbox: {
28
35
  display: 'flex',
29
36
  flexDirection: 'column'
37
+ },
38
+ selectableCard: {
39
+ display: 'grid',
40
+ gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 40ch), 1fr))',
41
+ gridAutoRows: '1fr',
42
+ gap: '0.5rem'
30
43
  }
31
44
  }));
32
45
 
33
46
  export default function CheckboxComponent(props: CheckboxProps) {
34
47
  // Get emitted components from map (so we can get any override that may exist)
35
48
  const FieldValueList = getComponentFromMap('FieldValueList');
49
+ const SelectableCard = getComponentFromMap('SelectableCard');
36
50
 
37
51
  const {
38
52
  getPConnect,
@@ -56,8 +70,20 @@ export default function CheckboxComponent(props: CheckboxProps) {
56
70
  selectionList,
57
71
  primaryField,
58
72
  referenceList,
59
- readonlyContextList: selectedvalues
73
+ readonlyContextList: selectedvalues,
74
+ variant,
75
+ hideFieldLabels,
76
+ additionalProps,
77
+ imagePosition,
78
+ imageSize,
79
+ showImageDescription,
80
+ renderMode,
81
+ image
60
82
  } = props;
83
+ const readOnlyMode = renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly;
84
+
85
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
86
+ const [theSelectedButton, setSelectedButton] = useState(value);
61
87
  const classes = useStyles();
62
88
  const helperTextToDisplay = validatemessage || helperText;
63
89
  const thePConn = getPConnect();
@@ -71,12 +97,17 @@ export default function CheckboxComponent(props: CheckboxProps) {
71
97
  }, [value]);
72
98
 
73
99
  useEffect(() => {
74
- if (referenceList?.length > 0) {
100
+ if (referenceList?.length > 0 && !readOnlyMode) {
75
101
  thePConn.setReferenceList(selectionList);
76
102
  updateNewInstuctions(thePConn, selectionList);
77
103
  }
78
104
  }, [thePConn]);
79
105
 
106
+ useEffect(() => {
107
+ // This update theSelectedButton which will update the UI to show the selected button correctly
108
+ setSelectedButton(value);
109
+ }, [value]);
110
+
80
111
  if (displayMode === 'DISPLAY_ONLY') {
81
112
  return <FieldValueList name={hideLabel ? '' : caption} value={value ? trueLabel : falseLabel} />;
82
113
  }
@@ -93,6 +124,68 @@ export default function CheckboxComponent(props: CheckboxProps) {
93
124
  thePConn.getValidationApi().validate(event.target.checked);
94
125
  };
95
126
 
127
+ const handleCheckboxChange = (event, item) => {
128
+ if (event.target.checked) {
129
+ insertInstruction(thePConn, selectionList, selectionKey, primaryField, item);
130
+ } else {
131
+ deleteInstruction(thePConn, selectionList, selectionKey, item);
132
+ }
133
+ thePConn.clearErrorMessages({ property: selectionList });
134
+ };
135
+
136
+ const actions = thePConn.getActionsApi();
137
+
138
+ const commonProps = {
139
+ ...additionalProps,
140
+ className: 'standard',
141
+ disabled,
142
+ readOnly,
143
+ onClick: (actions as any).onClick
144
+ };
145
+
146
+ if (variant === 'card') {
147
+ return (
148
+ <div>
149
+ <h4 style={{ marginTop: 0, marginBottom: 0 }}>{label}</h4>
150
+ <div className={classes.selectableCard}>
151
+ <SelectableCard
152
+ {...commonProps}
153
+ testId={testId}
154
+ displayMode={displayMode}
155
+ dataSource={datasource}
156
+ getPConnect={getPConnect}
157
+ readOnly={renderMode === 'ReadOnly' || displayMode === 'DISPLAY_ONLY' || readOnly}
158
+ onChange={e => {
159
+ e.stopPropagation();
160
+ const recordKey = selectionKey?.split('.').pop();
161
+ const selectedItem = datasource?.source?.find(item => item[recordKey as any] === e.target.id) ?? {};
162
+ handleCheckboxChange(e, {
163
+ id: selectedItem[recordKey as any],
164
+ primary: selectedItem[recordKey as any]
165
+ });
166
+ }}
167
+ onBlur={() => {
168
+ thePConn.getValidationApi().validate(selectedvalues, selectionList);
169
+ }}
170
+ hideFieldLabels={hideFieldLabels}
171
+ recordKey={selectionKey?.split('.').pop()}
172
+ cardLabel={primaryField.split('.').pop()}
173
+ image={{
174
+ imagePosition,
175
+ imageSize,
176
+ showImageDescription,
177
+ imageField: image?.split('.').pop(),
178
+ imageDescription: (thePConn?.getRawMetadata()?.config as any).imageDescription?.split('.').pop()
179
+ }}
180
+ readOnlyList={selectedvalues}
181
+ type='checkbox'
182
+ showNoValue={(renderMode === 'ReadOnly' || readOnly || displayMode === 'DISPLAY_ONLY') && selectedvalues.length === 0}
183
+ />
184
+ </div>
185
+ </div>
186
+ );
187
+ }
188
+
96
189
  const handleChangeMultiMode = (event, element) => {
97
190
  if (event.target.checked) {
98
191
  insertInstruction(thePConn, selectionList, selectionKey, primaryField, {
@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';
2
2
  import { NumericFormat } from 'react-number-format';
3
3
  import { TextField } from '@mui/material';
4
4
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
5
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
6
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
7
7
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
8
8
  import { getCurrencyCharacters, getCurrencyOptions } from './currency-utils';
@@ -45,7 +45,7 @@ export default function Currency(props: CurrrencyProps) {
45
45
  const helperTextToDisplay = validatemessage || helperText;
46
46
  const [values, setValues] = useState(value.toString());
47
47
 
48
- const testProp = { 'data-test-id': testId };
48
+ const testProps: any = { 'data-test-id': testId };
49
49
 
50
50
  useEffect(() => {
51
51
  setValues(value.toString());
@@ -104,7 +104,7 @@ export default function Currency(props: CurrrencyProps) {
104
104
  {...currencyProp}
105
105
  decimalScale={allowDecimals !== false ? 2 : 0}
106
106
  fixedDecimalScale={allowDecimals}
107
- InputProps={{ ...readOnlyProp, inputProps: { ...testProp } }}
107
+ slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}
108
108
  customInput={TextField}
109
109
  />
110
110
  );
@@ -1,6 +1,5 @@
1
- // eslint-disable-next-line import/no-named-default
2
1
  import { default as CurrencyAlias } from '@pega/react-sdk-components/lib/components/helpers/formatters/Currency';
3
- // eslint-disable-next-line import/no-named-default
2
+
4
3
  import { default as CurrencyMapAlias } from '@pega/react-sdk-components/lib/components/helpers/formatters/CurrencyMap';
5
4
 
6
5
  export const getCurrencyOptions = (inISOCode: string) => {
@@ -6,7 +6,7 @@ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event
6
6
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
7
7
  import { dateFormatInfoDefault, getDateFormatInfo } from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
8
8
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
9
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
10
 
11
11
  // Will return the date string in YYYY-MM-DD format which we'll be POSTing to the server
12
12
  function getFormattedDate(date) {
@@ -62,11 +62,7 @@ export default function Date(props: DateProps) {
62
62
  return <TextInput {...props} />;
63
63
  }
64
64
 
65
- let testProp = {};
66
-
67
- testProp = {
68
- 'data-test-id': testId
69
- };
65
+ const testProps: any = { 'data-test-id': testId };
70
66
 
71
67
  const handleChange = date => {
72
68
  if (date && date.isValid()) {
@@ -89,7 +85,7 @@ export default function Date(props: DateProps) {
89
85
  error: status === 'error',
90
86
  helperText: helperTextToDisplay,
91
87
  size: 'small',
92
- InputProps: { ...testProp }
88
+ InputProps: { ...testProps }
93
89
  }
94
90
  }}
95
91
  onChange={handleChange}
@@ -6,7 +6,7 @@ import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event
6
6
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
7
7
  import { dateFormatInfoDefault, getDateFormatInfo } from '@pega/react-sdk-components/lib/components/helpers/date-format-utils';
8
8
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
9
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
10
 
11
11
  interface DateTimeProps extends PConnFieldProps {
12
12
  // If any, enter additional props that only exist on DateTime here
@@ -60,11 +60,7 @@ export default function DateTime(props: DateTimeProps) {
60
60
  return <TextInput {...props} value={formattedDateTime} />;
61
61
  }
62
62
 
63
- let testProp = {};
64
-
65
- testProp = {
66
- 'data-test-id': testId
67
- };
63
+ const testProps: any = { 'data-test-id': testId };
68
64
 
69
65
  const handleChange = date => {
70
66
  const timeZoneDateTime = (dayjs as any).tz(date.format('YYYY-MM-DDTHH:mm:ss'), timezone);
@@ -89,7 +85,6 @@ export default function DateTime(props: DateTimeProps) {
89
85
  label={label}
90
86
  value={dateValue}
91
87
  onChange={handleChange}
92
- data-test-id={testId}
93
88
  slotProps={{
94
89
  textField: {
95
90
  variant: 'outlined',
@@ -98,7 +93,7 @@ export default function DateTime(props: DateTimeProps) {
98
93
  error: status === 'error',
99
94
  helperText: helperTextToDisplay,
100
95
  size: 'small',
101
- InputProps: { ...testProp }
96
+ InputProps: { ...testProps }
102
97
  }
103
98
  }}
104
99
  />
@@ -5,7 +5,7 @@ import { getCurrencyCharacters, getCurrencyOptions } from '@pega/react-sdk-compo
5
5
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
6
6
  import { format } from '@pega/react-sdk-components/lib/components/helpers/formatters';
7
7
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
8
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
8
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
9
 
10
10
  /* Using react-number-format component here, since it allows formatting decimal values,
11
11
  as per the locale.
@@ -83,9 +83,7 @@ export default function Decimal(props: DecimalProps) {
83
83
  return <FieldValueList name={hideLabel ? '' : label} value={formattedValue} variant='stacked' />;
84
84
  }
85
85
 
86
- const testProp = {
87
- 'data-test-id': testId
88
- };
86
+ const testProps: any = { 'data-test-id': testId };
89
87
 
90
88
  function decimalOnBlur() {
91
89
  handleEvent(actions, 'changeNblur', propName, values);
@@ -117,7 +115,7 @@ export default function Decimal(props: DecimalProps) {
117
115
  decimalSeparator={theCurrDec}
118
116
  thousandSeparator={showGroupSeparators ? theCurrSep : ''}
119
117
  decimalScale={readOnly && formatter === 'Currency' ? undefined : decimalPrecision}
120
- InputProps={{ ...readOnlyProp, inputProps: { ...testProp } }}
118
+ slotProps={{ input: { ...readOnlyProp, inputProps: { ...testProps } } }}
121
119
  customInput={TextField}
122
120
  />
123
121
  );
@@ -6,7 +6,7 @@ import Utils from '@pega/react-sdk-components/lib/components/helpers/utils';
6
6
  import { getDataPage } from '@pega/react-sdk-components/lib/components/helpers/data_page';
7
7
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
8
8
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
9
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
9
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
10
10
 
11
11
  interface IOption {
12
12
  key: string;
@@ -170,7 +170,6 @@ export default function Dropdown(props: DropdownProps) {
170
170
  return (
171
171
  <FieldValueList
172
172
  name={hideLabel ? '' : label}
173
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
174
173
  value={thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
175
174
  />
176
175
  );
@@ -180,7 +179,6 @@ export default function Dropdown(props: DropdownProps) {
180
179
  return (
181
180
  <FieldValueList
182
181
  name={hideLabel ? '' : label}
183
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
184
182
  value={thePConn.getLocalizedValue(val, localePath, thePConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName))}
185
183
  variant='stacked'
186
184
  />
@@ -198,9 +196,7 @@ export default function Dropdown(props: DropdownProps) {
198
196
  readOnlyProp = { readOnly: true };
199
197
  }
200
198
 
201
- let testProp = {};
202
-
203
- testProp = {
199
+ const testProps: any = {
204
200
  'data-test-id': testId
205
201
  };
206
202
 
@@ -228,7 +224,9 @@ export default function Dropdown(props: DropdownProps) {
228
224
  label={label}
229
225
  value={value === '' && !readOnly ? placeholder : value}
230
226
  select
231
- InputProps={{ ...readOnlyProp, ...testProp }}
227
+ slotProps={{
228
+ input: { ...readOnlyProp, ...testProps }
229
+ }}
232
230
  >
233
231
  {options.map((option: any) => (
234
232
  <MenuItem key={option.key} value={option.key}>
@@ -3,7 +3,7 @@ import { InputAdornment, TextField } from '@mui/material';
3
3
  import MailOutlineIcon from '@mui/icons-material/MailOutline';
4
4
 
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
7
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
8
8
 
9
9
  interface EmailProps extends PConnFieldProps {
@@ -55,11 +55,7 @@ export default function Email(props: EmailProps) {
55
55
  return <TextInput {...props} />;
56
56
  }
57
57
 
58
- let testProp = {};
59
-
60
- testProp = {
61
- 'data-test-id': testId
62
- };
58
+ const testProps: any = { 'data-test-id': testId };
63
59
 
64
60
  function handleChange(event) {
65
61
  // update internal value
@@ -85,13 +81,15 @@ export default function Email(props: EmailProps) {
85
81
  label={label}
86
82
  value={inputValue}
87
83
  type='email'
88
- InputProps={{
89
- startAdornment: (
90
- <InputAdornment position='start'>
91
- <MailOutlineIcon />
92
- </InputAdornment>
93
- ),
94
- inputProps: { ...testProp }
84
+ slotProps={{
85
+ input: {
86
+ startAdornment: (
87
+ <InputAdornment position='start'>
88
+ <MailOutlineIcon />
89
+ </InputAdornment>
90
+ ),
91
+ inputProps: { ...testProps }
92
+ }
95
93
  }}
96
94
  />
97
95
  );
@@ -1,7 +1,7 @@
1
- import { ReactElement, useMemo } from 'react';
2
- import { Grid } from '@mui/material';
3
- import FieldGroup from '@pega/react-sdk-components/lib/components/designSystemExtension/FieldGroup';
4
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
1
+ import { type ReactElement, useMemo } from 'react';
2
+ import Grid2 from '@mui/material/Grid2';
3
+ import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
4
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
5
5
 
6
6
  interface GroupProps extends PConnFieldProps {
7
7
  children: ReactElement[];
@@ -13,19 +13,21 @@ interface GroupProps extends PConnFieldProps {
13
13
  }
14
14
 
15
15
  export default function Group(props: GroupProps) {
16
+ const FieldGroup = getComponentFromMap('FieldGroup');
17
+
16
18
  const { children, heading, showHeading, instructions, collapsible, displayMode, type } = props;
17
19
 
18
20
  const isReadOnly = displayMode === 'DISPLAY_ONLY';
19
21
 
20
22
  const content = useMemo(() => {
21
23
  return (
22
- <Grid container spacing={2}>
24
+ <Grid2 container spacing={2}>
23
25
  {children?.map(child => (
24
- <Grid item xs={12} key={child.key}>
26
+ <Grid2 size={{ xs: 12 }} key={child.key}>
25
27
  {child}
26
- </Grid>
28
+ </Grid2>
27
29
  ))}
28
- </Grid>
30
+ </Grid2>
29
31
  );
30
32
  }, [children, type, isReadOnly]);
31
33
 
@@ -3,7 +3,7 @@ import { TextField } from '@mui/material';
3
3
 
4
4
  import handleEvent from '@pega/react-sdk-components/lib/components/helpers/event-utils';
5
5
  import { getComponentFromMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';
6
- import { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
6
+ import type { PConnFieldProps } from '@pega/react-sdk-components/lib/types/PConnProps';
7
7
 
8
8
  interface IntegerProps extends PConnFieldProps {
9
9
  // If any, enter additional props that only exist on Integer here
@@ -54,11 +54,7 @@ export default function Integer(props: IntegerProps) {
54
54
  return <TextInput {...props} />;
55
55
  }
56
56
 
57
- let testProp = {};
58
-
59
- testProp = {
60
- 'data-test-id': testId
61
- };
57
+ const testProps: any = { 'data-test-id': testId };
62
58
 
63
59
  function intOnChange(event) {
64
60
  // console.log(`Integer intOnChange inValue: ${event.target.value}`);
@@ -96,7 +92,9 @@ export default function Integer(props: IntegerProps) {
96
92
  label={label}
97
93
  value={inputValue}
98
94
  type='text'
99
- inputProps={{ inputMode: 'numeric', pattern: '[0-9]*', ...testProp }}
95
+ slotProps={{
96
+ htmlInput: { inputMode: 'numeric', pattern: '[0-9]*', ...testProps }
97
+ }}
100
98
  />
101
99
  );
102
100
  }
@@ -0,0 +1,4 @@
1
+ /* Support for google map autocomplete */
2
+ .pac-container {
3
+ z-index: 2147483647;
4
+ }