@pega/custom-dx-components 0.23.30 → 0.23.31

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 (45) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +0 -1
  3. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +0 -1
  4. package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +0 -2
  5. package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +0 -1
  6. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +0 -1
  7. package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +0 -1
  8. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache +0 -1
  9. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache +0 -1
  10. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.js.mustache +0 -1
  11. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.jsx.mustache +0 -1
  12. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.jsx.mustache +0 -1
  13. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +0 -1
  14. package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.js.mustache +0 -1
  15. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +0 -1
  16. package/src/tasks/init/template/.eslintrc.json +10 -1
  17. package/src/tasks/init/template/package.json.mustache +1 -1
  18. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/date.js +0 -1
  19. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/embed-utils.js +22 -12
  20. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-utils.js +0 -1
  21. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +0 -1
  22. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.js +0 -1
  23. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +0 -1
  24. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js +0 -2
  25. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-time.js +0 -1
  26. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js +41 -48
  27. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js +54 -68
  28. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/utils.js +12 -10
  29. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +0 -1
  30. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/time-of-day.js +41 -48
  31. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.jsx +0 -1
  32. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/date.js +0 -1
  33. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/embed-utils.js +22 -12
  34. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-utils.js +0 -1
  35. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +0 -1
  36. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js +0 -1
  37. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +0 -1
  38. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.js +0 -2
  39. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.js +0 -1
  40. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +41 -48
  41. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date.js +54 -68
  42. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js +12 -10
  43. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +0 -1
  44. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +41 -48
  45. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.jsx +0 -1
@@ -1,5 +1,4 @@
1
- /* eslint-disable import/no-relative-packages */
2
- import dayjs from "dayjs";
1
+ import dayjs from 'dayjs';
3
2
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
3
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
5
4
  import utc from 'dayjs/plugin/utc.js';
@@ -17,11 +16,11 @@ dayjs.extend(timezone);
17
16
  * @param {string} text datetime
18
17
  * @returns {object} datetime as a dayjs object
19
18
  */
20
- export const getDayJSObject = (text) => {
19
+ export const getDayJSObject = text => {
21
20
  const momObj = dayjs(text);
22
21
  if (momObj.isValid()) return momObj;
23
22
  const timeStamp = text;
24
- const isDateTime = timeStamp.indexOf("GMT") !== -1;
23
+ const isDateTime = timeStamp.indexOf('GMT') !== -1;
25
24
  const year = parseInt(timeStamp.substr(0, 4), 10);
26
25
  const month = parseInt(timeStamp.substr(4, 2), 10) - 1;
27
26
  const day = parseInt(timeStamp.substr(6, 2), 10);
@@ -47,7 +46,7 @@ export const getDayJSObject = (text) => {
47
46
  }
48
47
 
49
48
  mom = dayjs(
50
- mom.toLocaleString("en-US", {
49
+ mom.toLocaleString('en-US', {
51
50
  timeZone: CurrentTz
52
51
  })
53
52
  );
@@ -61,8 +60,8 @@ export const getDayJSObject = (text) => {
61
60
  * @param {string} time datetime
62
61
  * @returns {object} relative time from now
63
62
  */
64
- export const getRelativeTime = (time) => {
65
- let relativetime = "";
63
+ export const getRelativeTime = time => {
64
+ let relativetime = '';
66
65
  if (dayjs(time).isUTC()) {
67
66
  relativetime = dayjs(time).fromNow();
68
67
  } else {
@@ -78,7 +77,7 @@ export const getRelativeTime = (time) => {
78
77
  * @param {string} value from which Year needs to be taken out
79
78
  * @returns {number} year for the date passed
80
79
  */
81
- export const getFullYear = (value) =>
80
+ export const getFullYear = value =>
82
81
  value ? new Date(value).getFullYear() : new Date().getFullYear();
83
82
 
84
83
  /**
@@ -128,8 +127,8 @@ export const getMinDate = (previousYears, currentYear, yearFromValue) => {
128
127
  *
129
128
  * @returns {number} clockFormat
130
129
  */
131
- export const parseClockFormat = (clockFormat) =>
132
- typeof clockFormat === "string" ? parseInt(clockFormat, 10) : clockFormat;
130
+ export const parseClockFormat = clockFormat =>
131
+ typeof clockFormat === 'string' ? parseInt(clockFormat, 10) : clockFormat;
133
132
 
134
133
  /**
135
134
  * Return datetime value string off to seconds
@@ -141,9 +140,9 @@ export const parseClockFormat = (clockFormat) =>
141
140
  */
142
141
  export const correctDateTimeToSeconds = (datetime, withSeconds) => {
143
142
  if (withSeconds) {
144
- return `${datetime.substring(0, datetime.indexOf("Z"))}.000Z`;
143
+ return `${datetime.substring(0, datetime.indexOf('Z'))}.000Z`;
145
144
  }
146
- return `${datetime.substring(0, datetime.lastIndexOf(":"))}:00.000Z`;
145
+ return `${datetime.substring(0, datetime.lastIndexOf(':'))}:00.000Z`;
147
146
  };
148
147
 
149
148
  /**
@@ -156,12 +155,9 @@ export const correctDateTimeToSeconds = (datetime, withSeconds) => {
156
155
  */
157
156
  export const timeCorrectedToSeconds = (datetime, withSeconds) => {
158
157
  if (withSeconds) {
159
- return datetime.substring(datetime.indexOf("T") + 1, datetime.indexOf("."));
158
+ return datetime.substring(datetime.indexOf('T') + 1, datetime.indexOf('.'));
160
159
  }
161
- return `${datetime.substring(
162
- datetime.indexOf("T") + 1,
163
- datetime.lastIndexOf(":")
164
- )}:00`;
160
+ return `${datetime.substring(datetime.indexOf('T') + 1, datetime.lastIndexOf(':'))}:00`;
165
161
  };
166
162
 
167
163
  /**
@@ -184,14 +180,13 @@ export const datetimeFireChangeBlurEvents = (
184
180
  propName,
185
181
  pConn
186
182
  ) => {
187
-
188
183
  // TODO - clean up, we should not rely on timestamp from cosmos to check InComplete validation
189
184
  // above triggerFieldChange should have validated this
190
185
  if (errorState) {
191
186
  pConn.getValidationApi().validate(errorState);
192
187
  }
193
188
  // BUG-640834 In errorState presist old values avoiding store update & re-render.
194
- else{
189
+ else {
195
190
  if (formattedValue !== actualValue) {
196
191
  actions.updateFieldValue(propName, formattedValue);
197
192
  }
@@ -212,27 +207,27 @@ export const getDateFormat = (locale, options) => {
212
207
  .formatToParts()
213
208
  .map(({ type, value }) => {
214
209
  switch (type) {
215
- case "day":
216
- return "DD";
217
- case "month":
218
- return "MM";
219
- case "year":
220
- return "YYYY";
221
- case "hour":
222
- return "hh";
223
- case "minute":
224
- return "mm";
225
- case "second":
226
- return "ss";
227
- case "dayPeriod":
228
- return "A";
229
- case "literal":
210
+ case 'day':
211
+ return 'DD';
212
+ case 'month':
213
+ return 'MM';
214
+ case 'year':
215
+ return 'YYYY';
216
+ case 'hour':
217
+ return 'hh';
218
+ case 'minute':
219
+ return 'mm';
220
+ case 'second':
221
+ return 'ss';
222
+ case 'dayPeriod':
223
+ return 'A';
224
+ case 'literal':
230
225
  return value;
231
226
  default:
232
- return "";
227
+ return '';
233
228
  }
234
229
  })
235
- .join("");
230
+ .join('');
236
231
  };
237
232
 
238
233
  /**
@@ -242,15 +237,13 @@ export const getDateFormat = (locale, options) => {
242
237
  * @returns {boolean} True or False for the locale
243
238
  * Example : getDateFormat("pl-PL") returns false
244
239
  */
245
- export const is12HClockFormat = (locale) => {
240
+ export const is12HClockFormat = locale => {
246
241
  const meridiem = new Intl.DateTimeFormat(locale, {
247
- hour: "numeric"
242
+ hour: 'numeric'
248
243
  })
249
244
  .formatToParts()
250
- .find(({ type }) => type === "dayPeriod");
251
- return !!(meridiem === null || meridiem === undefined
252
- ? undefined
253
- : meridiem.value);
245
+ .find(({ type }) => type === 'dayPeriod');
246
+ return !!(meridiem === null || meridiem === undefined ? undefined : meridiem.value);
254
247
  };
255
248
 
256
249
  /**
@@ -263,9 +256,9 @@ export const is12HClockFormat = (locale) => {
263
256
  */
264
257
  export const getTimeOptions = (withSeconds, is12h = false) => {
265
258
  return {
266
- hour: "numeric",
267
- minute: "numeric",
268
- ...(withSeconds && { second: "numeric" }),
259
+ hour: 'numeric',
260
+ minute: 'numeric',
261
+ ...(withSeconds && { second: 'numeric' }),
269
262
  hour12: is12h
270
263
  };
271
264
  };
@@ -280,9 +273,9 @@ export const getTimeOptions = (withSeconds, is12h = false) => {
280
273
  */
281
274
  export const getDateTimeOptions = (withSeconds, is12h = false) => {
282
275
  return {
283
- year: "numeric",
284
- month: "numeric",
285
- day: "numeric",
276
+ year: 'numeric',
277
+ month: 'numeric',
278
+ day: 'numeric',
286
279
  ...getTimeOptions(withSeconds, is12h)
287
280
  };
288
281
  };
@@ -1,4 +1,3 @@
1
- /* eslint-disable import/no-relative-packages */
2
1
  import dayjs from 'dayjs';
3
2
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
3
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -10,26 +9,26 @@ dayjs.extend(localizedFormat);
10
9
  dayjs.extend(utc);
11
10
  dayjs.extend(timezone);
12
11
 
13
- export const datetimedisplayformatter = (formatter) => {
12
+ export const datetimedisplayformatter = formatter => {
14
13
  const objectvalues = {};
15
14
  switch (formatter) {
16
- case "DateTime-Long": {
17
- objectvalues.variantVal = "datetime";
18
- objectvalues.formatVal = "long";
15
+ case 'DateTime-Long': {
16
+ objectvalues.variantVal = 'datetime';
17
+ objectvalues.formatVal = 'long';
19
18
  break;
20
19
  }
21
- case "DateTime-Short": {
22
- objectvalues.variantVal = "date";
23
- objectvalues.formatVal = "short";
20
+ case 'DateTime-Short': {
21
+ objectvalues.variantVal = 'date';
22
+ objectvalues.formatVal = 'short';
24
23
  break;
25
24
  }
26
- case "DateTime-Since": {
27
- objectvalues.variantVal = "relative";
25
+ case 'DateTime-Since': {
26
+ objectvalues.variantVal = 'relative';
28
27
  break;
29
28
  }
30
- case "Time-Only": {
31
- objectvalues.variantVal = "time";
32
- objectvalues.formatVal = "short";
29
+ case 'Time-Only': {
30
+ objectvalues.variantVal = 'time';
31
+ objectvalues.formatVal = 'short';
33
32
  break;
34
33
  }
35
34
  // no default
@@ -37,13 +36,8 @@ export const datetimedisplayformatter = (formatter) => {
37
36
  return objectvalues;
38
37
  };
39
38
 
40
- export const formatExists = (formatterVal) => {
41
- const formatterValues = [
42
- "DateTime-Long",
43
- "DateTime-Short",
44
- "DateTime-Since",
45
- "Time-Only"
46
- ];
39
+ export const formatExists = formatterVal => {
40
+ const formatterValues = ['DateTime-Long', 'DateTime-Short', 'DateTime-Since', 'Time-Only'];
47
41
  let isformatter = false;
48
42
  if (formatterValues.includes(formatterVal)) {
49
43
  isformatter = true;
@@ -51,8 +45,6 @@ export const formatExists = (formatterVal) => {
51
45
  return isformatter;
52
46
  };
53
47
 
54
-
55
-
56
48
  /**
57
49
  * Return relative time in fromNow for the given datetime
58
50
  * @description Convert and return the given datetime in dayJSObject
@@ -60,11 +52,11 @@ export const formatExists = (formatterVal) => {
60
52
  * @param {string} text datetime
61
53
  * @returns {object} datetime as a dayjs object
62
54
  */
63
- export const getDayJSObject = (text) => {
55
+ export const getDayJSObject = text => {
64
56
  const momObj = dayjs(text);
65
57
  if (momObj.isValid()) return momObj;
66
58
  const timeStamp = text;
67
- const isDateTime = timeStamp.indexOf("GMT") !== -1;
59
+ const isDateTime = timeStamp.indexOf('GMT') !== -1;
68
60
  const year = parseInt(timeStamp.substr(0, 4), 10);
69
61
  const month = parseInt(timeStamp.substr(4, 2), 10) - 1;
70
62
  const day = parseInt(timeStamp.substr(6, 2), 10);
@@ -90,7 +82,7 @@ export const getDayJSObject = (text) => {
90
82
  }
91
83
 
92
84
  mom = dayjs(
93
- mom.toLocaleString("en-US", {
85
+ mom.toLocaleString('en-US', {
94
86
  timeZone: CurrentTz
95
87
  })
96
88
  );
@@ -104,8 +96,8 @@ export const getDayJSObject = (text) => {
104
96
  * @param {string} time datetime
105
97
  * @returns {object} relative time from now
106
98
  */
107
- export const getRelativeTime = (time) => {
108
- let relativetime = "";
99
+ export const getRelativeTime = time => {
100
+ let relativetime = '';
109
101
  if (dayjs(time).isUTC()) {
110
102
  relativetime = dayjs(time).fromNow();
111
103
  } else {
@@ -121,7 +113,7 @@ export const getRelativeTime = (time) => {
121
113
  * @param {string} value from which Year needs to be taken out
122
114
  * @returns {number} year for the date passed
123
115
  */
124
- export const getFullYear = (value) =>
116
+ export const getFullYear = value =>
125
117
  value ? new Date(value).getFullYear() : new Date().getFullYear();
126
118
 
127
119
  /**
@@ -171,8 +163,8 @@ export const getMinDate = (previousYears, currentYear, yearFromValue) => {
171
163
  *
172
164
  * @returns {number} clockFormat
173
165
  */
174
- export const parseClockFormat = (clockFormat) =>
175
- typeof clockFormat === "string" ? parseInt(clockFormat, 10) : clockFormat;
166
+ export const parseClockFormat = clockFormat =>
167
+ typeof clockFormat === 'string' ? parseInt(clockFormat, 10) : clockFormat;
176
168
 
177
169
  /**
178
170
  * Return datetime value string off to seconds
@@ -184,9 +176,9 @@ export const parseClockFormat = (clockFormat) =>
184
176
  */
185
177
  export const correctDateTimeToSeconds = (datetime, withSeconds) => {
186
178
  if (withSeconds) {
187
- return `${datetime.substring(0, datetime.indexOf("Z"))}.000Z`;
179
+ return `${datetime.substring(0, datetime.indexOf('Z'))}.000Z`;
188
180
  }
189
- return `${datetime.substring(0, datetime.lastIndexOf(":"))}:00.000Z`;
181
+ return `${datetime.substring(0, datetime.lastIndexOf(':'))}:00.000Z`;
190
182
  };
191
183
 
192
184
  /**
@@ -199,12 +191,9 @@ export const correctDateTimeToSeconds = (datetime, withSeconds) => {
199
191
  */
200
192
  export const timeCorrectedToSeconds = (datetime, withSeconds) => {
201
193
  if (withSeconds) {
202
- return datetime.substring(datetime.indexOf("T") + 1, datetime.indexOf("."));
194
+ return datetime.substring(datetime.indexOf('T') + 1, datetime.indexOf('.'));
203
195
  }
204
- return `${datetime.substring(
205
- datetime.indexOf("T") + 1,
206
- datetime.lastIndexOf(":")
207
- )}:00`;
196
+ return `${datetime.substring(datetime.indexOf('T') + 1, datetime.lastIndexOf(':'))}:00`;
208
197
  };
209
198
 
210
199
  /**
@@ -227,14 +216,13 @@ export const datetimeFireChangeBlurEvents = (
227
216
  propName,
228
217
  pConn
229
218
  ) => {
230
-
231
219
  // TODO - clean up, we should not rely on timestamp from cosmos to check InComplete validation
232
220
  // above triggerFieldChange should have validated this
233
221
  if (errorState) {
234
222
  pConn.getValidationApi().validate(errorState);
235
223
  }
236
224
  // BUG-640834 In errorState presist old values avoiding store update & re-render.
237
- else{
225
+ else {
238
226
  if (formattedValue !== actualValue) {
239
227
  actions.updateFieldValue(propName, formattedValue);
240
228
  }
@@ -255,27 +243,27 @@ export const getDateFormat = (locale, options) => {
255
243
  .formatToParts()
256
244
  .map(({ type, value }) => {
257
245
  switch (type) {
258
- case "day":
259
- return "DD";
260
- case "month":
261
- return "MM";
262
- case "year":
263
- return "YYYY";
264
- case "hour":
265
- return "hh";
266
- case "minute":
267
- return "mm";
268
- case "second":
269
- return "ss";
270
- case "dayPeriod":
271
- return "A";
272
- case "literal":
246
+ case 'day':
247
+ return 'DD';
248
+ case 'month':
249
+ return 'MM';
250
+ case 'year':
251
+ return 'YYYY';
252
+ case 'hour':
253
+ return 'hh';
254
+ case 'minute':
255
+ return 'mm';
256
+ case 'second':
257
+ return 'ss';
258
+ case 'dayPeriod':
259
+ return 'A';
260
+ case 'literal':
273
261
  return value;
274
262
  default:
275
- return "";
263
+ return '';
276
264
  }
277
265
  })
278
- .join("");
266
+ .join('');
279
267
  };
280
268
 
281
269
  /**
@@ -285,15 +273,13 @@ export const getDateFormat = (locale, options) => {
285
273
  * @returns {boolean} True or False for the locale
286
274
  * Example : getDateFormat("pl-PL") returns false
287
275
  */
288
- export const is12HClockFormat = (locale) => {
276
+ export const is12HClockFormat = locale => {
289
277
  const meridiem = new Intl.DateTimeFormat(locale, {
290
- hour: "numeric"
278
+ hour: 'numeric'
291
279
  })
292
280
  .formatToParts()
293
- .find(({ type }) => type === "dayPeriod");
294
- return !!(meridiem === null || meridiem === undefined
295
- ? undefined
296
- : meridiem.value);
281
+ .find(({ type }) => type === 'dayPeriod');
282
+ return !!(meridiem === null || meridiem === undefined ? undefined : meridiem.value);
297
283
  };
298
284
 
299
285
  /**
@@ -306,9 +292,9 @@ export const is12HClockFormat = (locale) => {
306
292
  */
307
293
  export const getTimeOptions = (withSeconds, is12h = false) => {
308
294
  return {
309
- hour: "numeric",
310
- minute: "numeric",
311
- ...(withSeconds && { second: "numeric" }),
295
+ hour: 'numeric',
296
+ minute: 'numeric',
297
+ ...(withSeconds && { second: 'numeric' }),
312
298
  hour12: is12h
313
299
  };
314
300
  };
@@ -323,9 +309,9 @@ export const getTimeOptions = (withSeconds, is12h = false) => {
323
309
  */
324
310
  export const getDateTimeOptions = (withSeconds, is12h = false) => {
325
311
  return {
326
- year: "numeric",
327
- month: "numeric",
328
- day: "numeric",
312
+ year: 'numeric',
313
+ month: 'numeric',
314
+ day: 'numeric',
329
315
  ...getTimeOptions(withSeconds, is12h)
330
316
  };
331
317
  };
@@ -1,4 +1,3 @@
1
- /* eslint-disable import/no-relative-packages */
2
1
  import { createUID } from '@pega/cosmos-react-core';
3
2
 
4
3
  // import { LazyMap as LazyComponentMap } from '../../components_map';
@@ -18,15 +17,15 @@ export function getAllFields(pConnect) {
18
17
 
19
18
  let allFields = [];
20
19
 
21
- const makeField = (f) => ({
20
+ const makeField = f => ({
22
21
  ...pConnect().resolveConfigProps(f.config),
23
22
  type: f.type
24
23
  });
25
24
 
26
25
  const hasRegions = !!metadata.children[0]?.children;
27
26
  if (hasRegions) {
28
- allFields = metadata.children.map((region) =>
29
- region.children.map((field) => {
27
+ allFields = metadata.children.map(region =>
28
+ region.children.map(field => {
30
29
  // Do not resolve the config props if is status work, instead create component here as status badge and mark as status display
31
30
  if (field.config?.value === '@P .pyStatusWork') {
32
31
  field.type = 'TextInput';
@@ -111,7 +110,9 @@ export function prepareComponentInCaseSummary(configObject, getPConnect, display
111
110
  // createdComponent.props.getPConnect().setInheritedProp("hideLabel", true);
112
111
  caseSummaryComponentObject.value = createdComponent;
113
112
  if (type === 'reference') {
114
- caseSummaryComponentObject.name = createdComponent.props.getPConnect().getInheritedProps().label;
113
+ caseSummaryComponentObject.name = createdComponent.props
114
+ .getPConnect()
115
+ .getInheritedProps().label;
115
116
  }
116
117
 
117
118
  return caseSummaryComponentObject;
@@ -130,12 +131,12 @@ export function getFilteredFields(getPConnect) {
130
131
  }
131
132
 
132
133
  // Filter out fields that are not visible and unsupported types for primary fields (for CaseSummary)
133
- primaryFieldsRaw = primaryFieldsRaw.filter((item) => {
134
+ primaryFieldsRaw = primaryFieldsRaw.filter(item => {
134
135
  const resolvedItem = getPConnect().resolveConfigProps(item.config);
135
136
  return resolvedItem.visibility !== false && item.type !== 'TextContent';
136
137
  });
137
138
 
138
- secondaryFieldsRaw = secondaryFieldsRaw.filter((item) => {
139
+ secondaryFieldsRaw = secondaryFieldsRaw.filter(item => {
139
140
  const resolvedItem = getPConnect().resolveConfigProps(item.config);
140
141
  return resolvedItem.visibility !== false && item.type !== 'TextContent';
141
142
  });
@@ -162,7 +163,9 @@ export function getLayoutDataFromRegion(regionData) {
162
163
  const itemPConnect = item?.getPConnect();
163
164
 
164
165
  return {
165
- id: itemPConnect?.getComponentName() ? `${itemPConnect.getComponentName()}--${index}` : `item--${index}`,
166
+ id: itemPConnect?.getComponentName()
167
+ ? `${itemPConnect.getComponentName()}--${index}`
168
+ : `item--${index}`,
166
169
  content: itemPConnect?.getComponent(),
167
170
  layoutConfig: {
168
171
  ...defaultLayoutConfig,
@@ -213,9 +216,8 @@ export function getInstructions(pConnect, instructions = 'casestep') {
213
216
 
214
217
  // If the annotation wasn't processed correctly, don't return any instruction text
215
218
  if (instructions?.startsWith('@PARAGRAPH')) {
216
- /* eslint-disable no-console */
217
219
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
218
- /* eslint-enable no-console */
220
+
219
221
  return undefined;
220
222
  }
221
223
 
@@ -1,4 +1,3 @@
1
- /* eslint-disable import/no-relative-packages */
2
1
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
3
2
  import { useRef, useState } from 'react';
4
3