@pega/custom-dx-components 8.8.20 → 23.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 (97) hide show
  1. package/.prettierrc.json +1 -7
  2. package/package.json +5 -5
  3. package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +3 -3
  4. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +5 -1
  5. package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +2 -1
  6. package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +1 -1
  7. package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +3 -3
  8. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +3 -3
  9. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +6 -5
  10. package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +4 -3
  11. package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +2 -1
  12. package/src/tasks/create/templates/Constellation/Field/Text/index.jsx.mustache +5 -4
  13. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +2 -1
  14. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +1 -1
  15. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +1 -2
  16. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +1 -1
  17. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +1 -1
  18. package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/index.jsx.mustache +5 -4
  19. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +3 -0
  20. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +2 -2
  21. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +3 -0
  22. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +2 -2
  23. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +5 -2
  24. package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +18 -12
  25. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +5 -2
  26. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +14 -11
  27. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +1 -1
  28. package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +2 -2
  29. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.jsx.mustache +2 -2
  30. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +2 -2
  31. package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +1 -1
  32. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.jsx.mustache +2 -2
  33. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.jsx.mustache +2 -2
  34. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.jsx.mustache +2 -2
  35. package/src/tasks/create-all/index.js +105 -98
  36. package/src/tasks/delete/helper.js +32 -24
  37. package/src/tasks/delete-all/helper.js +15 -12
  38. package/src/tasks/init/template/jest.config.cjs +21 -0
  39. package/src/tasks/init/template/package.json.mustache +9 -4
  40. package/src/tasks/list/helper.js +14 -19
  41. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.jsx +5 -4
  42. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.jsx +3 -3
  43. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -1
  44. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.jsx +1 -1
  45. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +5 -1
  46. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.jsx +2 -1
  47. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.jsx +1 -1
  48. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.jsx +1 -1
  49. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.jsx +3 -0
  50. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.jsx +2 -1
  51. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.jsx +3 -0
  52. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.jsx +15 -9
  53. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.jsx +2 -1
  54. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.jsx +1 -2
  55. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.jsx +2 -1
  56. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.jsx +1 -1
  57. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.jsx +2 -1
  58. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.jsx +5 -4
  59. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.jsx +1 -1
  60. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.jsx +5 -4
  61. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +3 -0
  62. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +3 -0
  63. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.jsx +12 -9
  64. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.jsx +1 -1
  65. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.jsx +3 -3
  66. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +1 -1
  67. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.jsx +1 -1
  68. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +5 -1
  69. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.jsx +2 -1
  70. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.jsx +1 -1
  71. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.jsx +1 -1
  72. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.jsx +3 -0
  73. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.jsx +2 -1
  74. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.jsx +3 -0
  75. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.jsx +15 -9
  76. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.jsx +2 -1
  77. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.jsx +1 -2
  78. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.jsx +2 -1
  79. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.jsx +1 -1
  80. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.jsx +2 -1
  81. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.jsx +5 -4
  82. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.jsx +1 -1
  83. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.jsx +5 -4
  84. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +3 -0
  85. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +3 -0
  86. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.jsx +12 -9
  87. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.jsx +1 -1
  88. package/tests/functional/localCreateBuildAllDeleteAll.test.js +15 -6
  89. package/tests/functional/localCreateBuildDelete.test.js +1 -1
  90. package/tests/functional/localCreatePublishAllDeleteAll.test.js +15 -6
  91. package/tests/functional/localCreatePublishDelete.test.js +2 -1
  92. /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/config.json.mustache +0 -0
  93. /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/demo.stories.jsx.mustache +0 -0
  94. /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/mock.stories.js.mustache +0 -0
  95. /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/styles.js.mustache +0 -0
  96. /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/suggestions-handler.js +0 -0
  97. /package/src/tasks/create/templates/Constellation/Field/{TimeOfDay → TimeofDay}/time-of-day.js.mustache +0 -0
package/.prettierrc.json CHANGED
@@ -1,7 +1 @@
1
- {
2
- "$schema": "http://json.schemastore.org/prettierrc",
3
- "extends": "@pega/prettier-config",
4
- "printWidth": 150,
5
- "singleQuote": true,
6
- "trailingComma": "none"
7
- }
1
+ "@pega/prettier-config"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "8.8.20",
3
+ "version": "23.1.10",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -15,9 +15,9 @@
15
15
  "type": "module",
16
16
  "sideEffects": false,
17
17
  "dependencies": {
18
- "@babel/core": "^7.22.5",
19
- "@babel/plugin-proposal-class-properties": "^7.18.6",
20
- "@babel/preset-react": "^7.22.5",
18
+ "@babel/core": "^7.23.3",
19
+ "@babel/plugin-transform-class-properties": "^7.23.3",
20
+ "@babel/preset-react": "^7.23.3",
21
21
  "adm-zip": "^0.5.9",
22
22
  "ajv": "^8.12.0",
23
23
  "ajv-keywords": "^5.1.0",
@@ -64,7 +64,7 @@
64
64
  "custom-components"
65
65
  ],
66
66
  "devDependencies": {
67
- "@babel/preset-env": "^7.22.9",
67
+ "@babel/preset-env": "^7.23.3",
68
68
  "@pega/configs": "^0.4.0",
69
69
  "@pega/prettier-config": "^0.5.3",
70
70
  "@types/jest": "^29.5.3",
@@ -65,7 +65,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
65
65
  />
66
66
  );
67
67
 
68
- const parentTestId = testId ? `${testId}-parent` : testId;
68
+ const parentTestId = testId === '' ? `${testId}-parent` : testId;
69
69
 
70
70
  let displayComponent;
71
71
  if (displayMode) {
@@ -138,13 +138,13 @@ const {{COMPONENT_CLASS_NAME}} = props => {
138
138
  disabled: false,
139
139
  readOnly: false,
140
140
  required: false,
141
- testId: null,
141
+ testId: '',
142
142
  additionalProps: {},
143
143
  displayMode: null,
144
144
  variant: 'inline',
145
145
  displayValue: 'Yes/No',
146
146
  trueLabel: '',
147
- falseLabel: ''
147
+ falseLabel: '',
148
148
  };
149
149
 
150
150
  {{COMPONENT_CLASS_NAME}}.propTypes = {
@@ -141,7 +141,11 @@
141
141
  },
142
142
  {
143
143
  "key": "DateTime-Long",
144
- "value": "Date Time"
144
+ "value": "Date (Long)"
145
+ },
146
+ {
147
+ "key": "DateTime-Short",
148
+ "value": "Date (Short)"
145
149
  },
146
150
  {
147
151
  "key": "DateTime-Since",
@@ -182,6 +182,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
182
182
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
183
183
  );
184
184
  } else {
185
+
185
186
  dateComponent = (
186
187
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
187
188
  <DateInput
@@ -222,7 +223,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
222
223
  showWeekNumber: false,
223
224
  nextYearRange: "",
224
225
  previousYearRange: "",
225
- testId: null,
226
+ testId: "",
226
227
  showAsFormattedText: false,
227
228
  additionalProps: {},
228
229
  displayMode: null,
@@ -218,7 +218,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
218
218
  showWeekNumber: false,
219
219
  nextYearRange: "",
220
220
  previousYearRange: "",
221
- testId: null,
221
+ testId: "",
222
222
  additionalProps: {},
223
223
  displayMode: null,
224
224
  variant: "inline",
@@ -100,7 +100,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
100
100
  }
101
101
 
102
102
 
103
- {{! pick new delimiteres for mustache }}
103
+ {{! pick new delimiters for mustache }}
104
104
  {{=<% %>=}}
105
105
 
106
106
  const displayComp =
@@ -128,7 +128,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
128
128
  />
129
129
  );
130
130
 
131
- <%={{ }}=%> {{! revert delimiteres for mustache }}
131
+ <%={{ }}=%> {{! revert delimiters for mustache }}
132
132
 
133
133
  switch (displayMode) {
134
134
  case 'DISPLAY_ONLY': {
@@ -225,7 +225,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
225
225
  disabled: false,
226
226
  readOnly: false,
227
227
  required: false,
228
- testId: null,
228
+ testId: "",
229
229
  decimalPrecision: '',
230
230
  showGroupSeparators: false,
231
231
  displayMode: null,
@@ -95,7 +95,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
95
95
 
96
96
  const displayValue = !value && value !== 0 ? undefined : Number(currencyValue);
97
97
 
98
- {{! pick new delimiteres for mustache }}
98
+ {{! pick new delimiters for mustache }}
99
99
  {{=<% %>=}}
100
100
 
101
101
  displayComp = (
@@ -151,7 +151,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
151
151
  );
152
152
  }
153
153
 
154
- <%={{ }}=%> {{! revert delimiteres for mustache }}
154
+ <%={{ }}=%> {{! revert delimiters for mustache }}
155
155
 
156
156
  switch (displayMode) {
157
157
  case 'DISPLAY_ONLY': {
@@ -251,7 +251,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
251
251
  allowDecimals: true,
252
252
  currencyISOCode: 'USD',
253
253
  isoCodeSelection: 'constant',
254
- testId: null,
254
+ testId: '',
255
255
  displayMode: null,
256
256
  additionalProps: {},
257
257
  variant: 'inline',
@@ -42,6 +42,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
42
42
  const actions = pConn.getActionsApi();
43
43
  const propName = pConn.getStateProps().value;
44
44
  const [percentageValue, setPercentageValue] = useState(value?.toString());
45
+
45
46
  const hasValueChange = useRef(false);
46
47
 
47
48
  let { readOnly, required, disabled } = props;
@@ -101,7 +102,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
101
102
  }
102
103
  }
103
104
 
104
- {{! pick new delimiteres for mustache }}
105
+ {{! pick new delimiters for mustache }}
105
106
  {{=<% %>=}}
106
107
 
107
108
  displayComp = (
@@ -132,7 +133,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
132
133
  );
133
134
  }
134
135
 
135
- <%={{ }}=%> {{! revert delimiteres for mustache }}
136
+ <%={{ }}=%> {{! revert delimiters for mustache }}
136
137
 
137
138
  return displayMode === 'DISPLAY_ONLY' ? (
138
139
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
@@ -149,7 +150,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
149
150
  );
150
151
  }
151
152
 
152
- {{! pick new delimiteres for mustache }}
153
+ {{! pick new delimiters for mustache }}
153
154
  {{=<% %>=}}
154
155
 
155
156
  if (displayMode === 'STACKED_LARGE_VAL') {
@@ -164,7 +165,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
164
165
  />
165
166
  );
166
167
 
167
- <%={{ }}=%> {{! revert delimiteres for mustache }}
168
+ <%={{ }}=%> {{! revert delimiters for mustache }}
168
169
 
169
170
  return (
170
171
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
@@ -243,7 +244,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
243
244
  disabled: false,
244
245
  readOnly: false,
245
246
  required: false,
246
- testId: null,
247
+ testId: '',
247
248
  decimalPrecision: '',
248
249
  showGroupSeparators: false,
249
250
  additionalProps: {},
@@ -46,6 +46,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
46
46
  const propName = pConn.getStateProps().value;
47
47
  const [integerValue, setIntegerValue] = useState(value?.toString());
48
48
  const sliderDefaultValue = !defaultValue && defaultValue !== 0 ? max : defaultValue;
49
+
49
50
  const hasValueChange = useRef(false);
50
51
 
51
52
 
@@ -112,7 +113,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
112
113
  }
113
114
  }
114
115
 
115
- {{! pick new delimiteres for mustache }}
116
+ {{! pick new delimiters for mustache }}
116
117
  {{=<% %>=}}
117
118
 
118
119
  const displayComp =
@@ -141,7 +142,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
141
142
  />
142
143
  );
143
144
 
144
- <%={{ }}=%> {{! revert delimiteres for mustache }}
145
+ <%={{ }}=%> {{! revert delimiters for mustache }}
145
146
 
146
147
  switch (displayMode) {
147
148
  case 'DISPLAY_ONLY': {
@@ -275,7 +276,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
275
276
  disabled: false,
276
277
  readOnly: false,
277
278
  required: false,
278
- testId: null,
279
+ testId: '',
279
280
  showGroupSeparators: false,
280
281
  displayMode: null,
281
282
  displayAs: 'input',
@@ -262,6 +262,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
262
262
  suggestionsHandler(accepted, pConnect, setStatus);
263
263
  };
264
264
 
265
+
265
266
  return (
266
267
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
267
268
  <Select
@@ -305,7 +306,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
305
306
  disabled: false,
306
307
  readOnly: false,
307
308
  required: false,
308
- testId: null,
309
+ testId: '',
309
310
  helperText: '',
310
311
  datasource: [],
311
312
  listType: '',
@@ -1,5 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
- import { Input, Label } from '@pega/cosmos-react-core';
2
+ import { Input } from '@pega/cosmos-react-core';
3
3
 
4
4
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
5
5
 
@@ -9,7 +9,7 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
9
9
  // props passed in combination of props from property panel (config.json) and run time props from Constellation
10
10
  // any default values in config.pros should be set in defaultProps at bottom of this file
11
11
  const {{COMPONENT_CLASS_NAME}} = props => {
12
- const { getPConnect, value, placeholder, disabled, readOnly, required, label, testId } = props;
12
+ const { getPConnect, value, placeholder, disabled, readOnly, required, label, hideLabel, testId } = props;
13
13
 
14
14
  const pConn = getPConnect();
15
15
  const actions = pConn.getActionsApi();
@@ -22,10 +22,11 @@ const {{COMPONENT_CLASS_NAME}} = props => {
22
22
 
23
23
  return (
24
24
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
25
- <Label>{label}</Label>
26
25
  <Input
27
26
  type='text'
28
27
  value={value}
28
+ label={label}
29
+ labelHidden={hideLabel}
29
30
  placeholder={placeholder}
30
31
  disabled={disabled}
31
32
  readOnly={readOnly}
@@ -43,7 +44,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
43
44
  disabled: false,
44
45
  readOnly: false,
45
46
  required: false,
46
- testId: null
47
+ testId: ''
47
48
  };
48
49
 
49
50
  {{COMPONENT_CLASS_NAME}}.propTypes = {
@@ -76,6 +76,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
76
76
  const pConn = getPConnect();
77
77
  const actions = pConn.getActionsApi();
78
78
  const propName = pConn.getStateProps().value;
79
+
79
80
  const hasValueChange = useRef(false);
80
81
 
81
82
 
@@ -199,7 +200,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
199
200
  disabled: false,
200
201
  readOnly: false,
201
202
  required: false,
202
- testId: null,
203
+ testId: '',
203
204
  displayMode: null,
204
205
  additionalProps: {},
205
206
  variant: 'inline',
@@ -204,7 +204,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
204
204
  disabled: false,
205
205
  readOnly: false,
206
206
  required: false,
207
- testId: null,
207
+ testId: '',
208
208
  fieldMetadata: {},
209
209
  additionalProps: {},
210
210
  displayMode: null,
@@ -80,7 +80,6 @@ const {{COMPONENT_CLASS_NAME}} = props => {
80
80
  const maxLength = fieldMetadata?.maxLength;
81
81
  const hasValueChange = useRef(false);
82
82
 
83
-
84
83
  // BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
85
84
  let { readOnly, required, disabled } = props;
86
85
  [readOnly, required, disabled] = [readOnly, required, disabled].map(
@@ -197,7 +196,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
197
196
  disabled: false,
198
197
  readOnly: false,
199
198
  required: false,
200
- testId: null,
199
+ testId: '',
201
200
  displayMode: null,
202
201
  fieldMetadata: {},
203
202
  additionalProps: {},
@@ -232,7 +232,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
232
232
  readOnly: false,
233
233
  required: false,
234
234
  showCountryCode: true,
235
- testId: null,
235
+ testId: '',
236
236
  displayMode: null,
237
237
  additionalProps: {},
238
238
  variant: 'inline',
@@ -180,7 +180,7 @@ const {{COMPONENT_CLASS_NAME}} = props => {
180
180
  disabled: false,
181
181
  readOnly: false,
182
182
  required: false,
183
- testId: null,
183
+ testId: '',
184
184
  displayMode: null,
185
185
  additionalProps: {},
186
186
  variant: 'inline',
@@ -38,7 +38,6 @@ const {{COMPONENT_CLASS_NAME}} = props => {
38
38
  const actions = pConn.getActionsApi();
39
39
  const propName = pConn.getStateProps().value;
40
40
 
41
-
42
41
  // BUG-547602: Temporary type coercion for 8.5 until DXAPIs are enhanced to pass original pxViewMetadata JSON, respecting boolean primitives
43
42
  let { readOnly, required, disabled } = props;
44
43
  [readOnly, required, disabled] = [readOnly, required, disabled].map(
@@ -183,11 +182,12 @@ const {{COMPONENT_CLASS_NAME}} = props => {
183
182
  required: false,
184
183
  pickerInterval: "30",
185
184
  clockFormat: 0,
186
- testId: null,
185
+ testId: '',
187
186
  additionalProps: {},
188
187
  displayMode: null,
189
188
  variant: "inline",
190
- formatter:"defaultTime"
189
+ formatter:"defaultTime",
190
+ hasSuggestions: false
191
191
  };
192
192
 
193
193
  {{COMPONENT_CLASS_NAME}}.propTypes = {
@@ -207,7 +207,8 @@ const {{COMPONENT_CLASS_NAME}} = props => {
207
207
  additionalProps: PropTypes.objectOf(PropTypes.any),
208
208
  displayMode: PropTypes.string,
209
209
  variant: PropTypes.string,
210
- formatter : PropTypes.string
210
+ formatter : PropTypes.string,
211
+ hasSuggestions: PropTypes.bool
211
212
  };
212
213
 
213
214
  export default {{COMPONENT_CLASS_NAME}};
@@ -88,6 +88,9 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
88
88
  getRawMetadata: () => {
89
89
  return pyReviewRaw;
90
90
  },
91
+ getContextName: () => {
92
+ return 'app/primary_1';
93
+ },
91
94
  getInheritedProps: () => {
92
95
  return pyReviewRaw.config.inheritedProps;
93
96
  },
@@ -46,7 +46,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
46
46
 
47
47
  return (
48
48
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
49
- {{! pick new delimiteres for mustache }}
49
+ {{! pick new delimiters for mustache }}
50
50
  {{=<% %>=}}
51
51
  <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
52
52
  {showHighlightedData && highlightedDataArr.length > 0 && (
@@ -65,7 +65,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
65
65
  ))}
66
66
  </Grid>
67
67
  </FieldGroup>
68
- <%={{ }}=%> {{! revert delimiteres for mustache }}
68
+ <%={{ }}=%> {{! revert delimiters for mustache }}
69
69
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
70
70
  );
71
71
 
@@ -88,6 +88,9 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
88
88
  getRawMetadata: () => {
89
89
  return pyReviewRaw;
90
90
  },
91
+ getContextName: () => {
92
+ return 'app/primary_1';
93
+ },
91
94
  getInheritedProps: () => {
92
95
  return pyReviewRaw.config.inheritedProps;
93
96
  },
@@ -46,7 +46,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
46
46
 
47
47
  return (
48
48
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
49
- {{! pick new delimiteres for mustache }}
49
+ {{! pick new delimiters for mustache }}
50
50
  {{=<% %>=}}
51
51
  <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
52
52
  {showHighlightedData && highlightedDataArr.length > 0 && (
@@ -65,7 +65,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
65
65
  ))}
66
66
  </Grid>
67
67
  </FieldGroup>
68
- <%={{ }}=%> {{! revert delimiteres for mustache }}
68
+ <%={{ }}=%> {{! revert delimiters for mustache }}
69
69
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
70
70
  );
71
71
 
@@ -37,7 +37,7 @@ const renderField = resolvedProps => {
37
37
  ''
38
38
  );
39
39
 
40
- {{! pick new delimiteres for mustache }}
40
+ {{! pick new delimiters for mustache }}
41
41
  {{=<% %>=}}
42
42
 
43
43
  if (label === 'Service Date')
@@ -91,7 +91,7 @@ const renderField = resolvedProps => {
91
91
  ></CosmosPhone>
92
92
  );
93
93
 
94
- <%={{ }}=%> {{! revert delimiteres for mustache }}
94
+ <%={{ }}=%> {{! revert delimiters for mustache }}
95
95
 
96
96
  if (variant === 'inline') {
97
97
  val = value || (
@@ -136,6 +136,9 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
136
136
  getChildren: () => {
137
137
  return pyReviewRaw.children;
138
138
  },
139
+ getInheritedProps: () => {
140
+ return pyReviewRaw.config.inheritedProps;
141
+ },
139
142
  createComponent: config => {
140
143
  // eslint-disable-next-line default-case
141
144
  switch (config.config.value) {
@@ -1,4 +1,4 @@
1
- import { Grid } from '@pega/cosmos-react-core';
1
+ import { Grid, FieldGroup } from '@pega/cosmos-react-core';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
4
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
@@ -11,27 +11,33 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
11
11
  export default function {{COMPONENT_CLASS_NAME}}(props) {
12
12
 
13
13
 
14
- const { children, NumCols } = props;
14
+ const { children, NumCols, label, showLabel, getPConnect } = props;
15
+ const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
15
16
 
16
17
  const nCols = parseInt(NumCols, 10);
17
18
 
18
19
  // console.log(`Rendering ${getPConnect()?.getComponentName()} with ${template} with ${children?.length} Region(s)`);
19
20
 
21
+
22
+
20
23
  return (
21
24
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
22
- {{! pick new delimiteres for mustache }}
23
- {{=<% %>=}}
24
- <Grid container={{
25
- cols: `repeat(${nCols}, minmax(0, 1fr))`,
26
- gap: 2,
27
- wrap: `wrap`
28
- }}>
29
- {children}
30
- </Grid>
31
- <%={{ }}=%> {{! revert delimiteres for mustache }}
25
+ {{! pick new delimiters for mustache }}
26
+ {{=<% %>=}}
27
+ <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
28
+ <Grid container={{
29
+ cols: `repeat(${nCols}, minmax(0, 1fr))`,
30
+ gap: 2,
31
+ wrap: `wrap`
32
+ }}>
33
+ {children}
34
+ </Grid>
35
+ </FieldGroup>
36
+ <%={{ }}=%> {{! revert delimiters for mustache }}
32
37
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
33
38
  );
34
39
 
40
+
35
41
  }
36
42
 
37
43
  {{COMPONENT_CLASS_NAME}}.defaultProps = {
@@ -38,7 +38,7 @@ const renderField = resolvedProps => {
38
38
  ''
39
39
  );
40
40
 
41
- {{! pick new delimiteres for mustache }}
41
+ {{! pick new delimiters for mustache }}
42
42
  {{=<% %>=}}
43
43
 
44
44
  if (label === 'Service Date')
@@ -93,7 +93,7 @@ const renderField = resolvedProps => {
93
93
  ></CosmosPhone>
94
94
  );
95
95
 
96
- <%={{ }}=%> {{! revert delimiteres for mustache }}
96
+ <%={{ }}=%> {{! revert delimiters for mustache }}
97
97
 
98
98
  if (variant === 'inline') {
99
99
  val = value || (
@@ -141,6 +141,9 @@ export const base{{COMPONENT_CLASS_NAME}} = () => {
141
141
  getChildren: () => {
142
142
  return pyReviewRaw.children;
143
143
  },
144
+ getInheritedProps: () => {
145
+ return pyReviewRaw.config.inheritedProps;
146
+ },
144
147
  createComponent: config => {
145
148
  // eslint-disable-next-line default-case
146
149
  switch (config.config.value) {
@@ -1,4 +1,4 @@
1
- import { Grid, Flex } from '@pega/cosmos-react-core';
1
+ import { Grid, Flex, FieldGroup } from '@pega/cosmos-react-core';
2
2
  import PropTypes from 'prop-types';
3
3
 
4
4
  import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
@@ -11,7 +11,8 @@ import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
11
11
  export default function {{COMPONENT_CLASS_NAME}}(props) {
12
12
 
13
13
 
14
- const { children } = props;
14
+ const { children, label, showLabel, getPConnect } = props;
15
+ const propsToUse = { label, showLabel, ...getPConnect().getInheritedProps() };
15
16
 
16
17
  const numRegions = children?.length;
17
18
  const gridRepeat = "repeat(".concat(numRegions).concat(", 1fr)");
@@ -24,16 +25,18 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
24
25
 
25
26
  return (
26
27
  <Styled{{COMPONENT_CLASS_NAME}}Wrapper>
27
- {{! pick new delimiteres for mustache }}
28
+ {{! pick new delimiters for mustache }}
28
29
  {{=<% %>=}}
29
- <Grid container={gridContainer}>
30
- {children.map((child, i) => (
31
- <Flex container={flexContainer} key={`r-${i + 1}`}>
32
- {child}
33
- </Flex>
34
- ))}
35
- </Grid>
36
- <%={{ }}=%> {{! revert delimiteres for mustache }}
30
+ <FieldGroup name={propsToUse.showLabel ? propsToUse.label : ''}>
31
+ <Grid container={gridContainer}>
32
+ {children.map((child, i) => (
33
+ <Flex container={flexContainer} key={`r-${i + 1}`}>
34
+ {child}
35
+ </Flex>
36
+ ))}
37
+ </Grid>
38
+ </FieldGroup>
39
+ <%={{ }}=%> {{! revert delimiters for mustache }}
37
40
  </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
38
41
  );
39
42
 
@@ -18,6 +18,6 @@
18
18
  }
19
19
  ],
20
20
  "defaultConfig": {
21
- "label": "@L $this.label"
21
+ "label": "@L {{COMPONENT_LABEL}}"
22
22
  }
23
23
  }
@@ -33,7 +33,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
33
33
  if (response.data.data !== null) {
34
34
  setHistory(
35
35
  response.data.data.map((entry, index) => {
36
- {{! pick new delimiteres for mustache }}
36
+ {{! pick new delimiters for mustache }}
37
37
  {{=<% %>=}}
38
38
  return {
39
39
  date: new Date(entry.pxTimeCreated).toLocaleString(),
@@ -41,7 +41,7 @@ export default function {{COMPONENT_CLASS_NAME}}(props) {
41
41
  user: entry.pyPerformer,
42
42
  id: index
43
43
  };
44
- <%={{ }}=%> {{! revert delimiteres for mustache }}
44
+ <%={{ }}=%> {{! revert delimiters for mustache }}
45
45
  })
46
46
  );
47
47
  } else {
@@ -31,7 +31,7 @@ const Operator = (props) => {
31
31
  }, [id]);
32
32
 
33
33
 
34
- {{! pick new delimiteres for mustache }}
34
+ {{! pick new delimiters for mustache }}
35
35
  {{=<% %>=}}
36
36
 
37
37
  const OperatorPreview = () => {
@@ -145,7 +145,7 @@ const Operator = (props) => {
145
145
  }
146
146
  };
147
147
 
148
- <%={{ }}=%> {{! revert delimiteres for mustache }}
148
+ <%={{ }}=%> {{! revert delimiters for mustache }}
149
149
 
150
150
  const clickAction = (e) => {
151
151
  setPopoverTarget(e.currentTarget);