@pega/custom-dx-components 0.23.26 → 0.23.27

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 (63) hide show
  1. package/package.json +2 -2
  2. package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.ts.mustache +0 -2
  3. package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +1 -1
  4. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +1 -1
  5. package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +2 -0
  6. package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +1 -1
  7. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +2 -1
  8. package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +2 -1
  9. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache +1 -0
  10. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache +3 -0
  11. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.js.mustache +8 -1
  12. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.jsx.mustache +1 -0
  13. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.jsx.mustache +1 -0
  14. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +1 -2
  15. package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.js.mustache +2 -1
  16. package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +3 -1
  17. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +3 -1
  18. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +4 -1
  19. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +0 -1
  20. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +0 -1
  21. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.tsx.mustache +0 -1
  22. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +2 -2
  23. package/src/tasks/init/template/.eslintrc.json +40 -7
  24. package/src/tasks/init/template/package.json.mustache +2 -2
  25. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/date.js +1 -0
  26. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/embed-utils.js +3 -0
  27. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-utils.js +8 -1
  28. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +1 -0
  29. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/boolean-format.ts +0 -2
  30. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.js +1 -1
  31. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +1 -1
  32. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js +2 -0
  33. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-time.js +1 -1
  34. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js +2 -1
  35. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js +2 -1
  36. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/utils.js +3 -1
  37. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/utils.js +4 -1
  38. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.tsx +0 -1
  39. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -1
  40. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +1 -0
  41. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/time-of-day.js +2 -1
  42. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js +3 -1
  43. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.jsx +1 -2
  44. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/date.js +1 -0
  45. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/embed-utils.js +3 -0
  46. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-utils.js +8 -1
  47. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +1 -0
  48. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/boolean-format.ts +0 -2
  49. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js +1 -1
  50. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +1 -1
  51. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.js +2 -0
  52. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.js +1 -1
  53. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +2 -1
  54. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date.js +2 -1
  55. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/utils.js +3 -1
  56. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js +4 -1
  57. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +5 -3
  58. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.tsx +0 -1
  59. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +2 -2
  60. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +1 -0
  61. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +2 -1
  62. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js +3 -1
  63. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.jsx +1 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "0.23.26",
3
+ "version": "0.23.27",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -65,7 +65,7 @@
65
65
  ],
66
66
  "devDependencies": {
67
67
  "@babel/preset-env": "^7.23.7",
68
- "@pega/configs": "^0.6.0",
68
+ "@pega/configs": "^0.7.1",
69
69
  "@pega/prettier-config": "^0.7.1",
70
70
  "@types/jest": "^29.5.11",
71
71
  "babel-jest": "^29.7.0",
@@ -1,7 +1,5 @@
1
-
2
1
  import Boolean from "./Boolean";
3
2
 
4
-
5
3
  export default {
6
4
  ...Boolean
7
5
  };
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
2
  import dayjs from 'dayjs';
3
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
2
  import { FieldValueList } from '@pega/cosmos-react-core';
3
3
  import PropTypes from 'prop-types';
4
4
 
@@ -1,3 +1,5 @@
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
1
3
  /* eslint-disable prefer-regex-literals */
2
4
  import dayjs from 'dayjs';
3
5
  import DateFormatter from './DateFormatter.js';
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
2
  import dayjs from "dayjs";
3
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,5 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
2
3
  import dayjs from "dayjs";
3
4
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
5
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,5 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
2
3
  import dayjs from 'dayjs';
3
4
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
5
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  import dayjs from 'dayjs';
2
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
3
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,3 +1,6 @@
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
3
+
1
4
  import { isEmbeddedField, isPageListInPath, PAGE, PAGELIST, buildAggOrCalcId } from './repeat-utils.js';
2
5
 
3
6
  export const AT_FILTEREDLIST = '@FILTERED_LIST';
@@ -1,7 +1,8 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  /* eslint-disable sonarjs/no-collapsible-if */
2
3
  /* eslint-disable default-param-last */
3
4
  /* eslint-disable func-names */
4
- /* eslint-disable sonarjs/cognitive-complexity */
5
+ /* eslint-disable no-undef */
5
6
  import { splitConditionTree } from '@pega/cosmos-react-condition-builder';
6
7
  import cloneDeep from 'lodash/cloneDeep.js';
7
8
 
@@ -65,8 +66,10 @@ export function launchLocalAction(getPConnect, rowContext, action, cb) {
65
66
  name: action.name,
66
67
  callbacks: {
67
68
  submit: (response) => {
69
+ /* eslint-disable no-console */
68
70
  console.log('callback for modal submit');
69
71
  console.log(response);
72
+ /* eslint-enable no-console */
70
73
  cb();
71
74
  },
72
75
  cancel: () => {
@@ -95,14 +98,18 @@ export function launchBulkAction(getPConnect, selectedList, action, caseTypeID,
95
98
  bulkContextType,
96
99
  callbacks: {
97
100
  submit: (response) => {
101
+ /* eslint-disable no-console */
98
102
  console.log(response);
99
103
  console.log('callback for modal submit 1');
104
+ /* eslint-enable no-console */
100
105
  if (typeof cb === 'function') {
101
106
  cb();
102
107
  }
103
108
  },
104
109
  cancel: () => {
110
+ /* eslint-disable no-console */
105
111
  console.log('callback for modal submit 2');
112
+ /* eslint-enable no-console */
106
113
  }
107
114
  },
108
115
  showProgress: true,
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
2
3
  import { useRef, useState } from 'react';
3
4
 
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
2
3
  import { useRef, useState } from 'react';
3
4
 
@@ -1,5 +1,4 @@
1
-
2
- /* eslint-disable react/jsx-fragments */
1
+ /* eslint-disable import/no-relative-packages */
3
2
  import { useState, useRef, React} from "react";
4
3
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
5
4
 
@@ -1,4 +1,5 @@
1
- import dayjs from "dayjs";
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */import dayjs from "dayjs";
2
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
3
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
4
5
  import utc from 'dayjs/plugin/utc.js';
@@ -1,4 +1,5 @@
1
1
 
2
+ /* eslint-disable no-undef */
2
3
  /**
3
4
  * Given the PConnect object of a Template component, retrieve the children
4
5
  * metadata of all regions.
@@ -136,8 +137,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
136
137
 
137
138
  // If the annotation wasn't processed correctly, don't return any instruction text
138
139
  if (instructions?.startsWith('@PARAGRAPH')) {
139
-
140
+ /* eslint-disable no-console */
140
141
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
142
+ /* eslint-enable no-console */
141
143
  return undefined;
142
144
  }
143
145
 
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable no-undef */
2
2
 
3
3
  /**
4
4
  * Given the PConnect object of a Template component, retrieve the children
@@ -137,7 +137,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
137
137
 
138
138
  // If the annotation wasn't processed correctly, don't return any instruction text
139
139
  if (instructions?.startsWith('@PARAGRAPH')) {
140
+ /* eslint-disable no-console */
140
141
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
142
+ /* eslint-enable no-console */
141
143
  return undefined;
142
144
  }
143
145
 
@@ -1,4 +1,5 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
2
3
  import { createUID } from '@pega/cosmos-react-core';
3
4
 
4
5
  // import { LazyMap as LazyComponentMap } from '../../components_map';
@@ -213,7 +214,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
213
214
 
214
215
  // If the annotation wasn't processed correctly, don't return any instruction text
215
216
  if (instructions?.startsWith('@PARAGRAPH')) {
217
+ /* eslint-disable no-console */
216
218
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
219
+ /* eslint-enable no-console */
217
220
  return undefined;
218
221
  }
219
222
 
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/jsx-fragments */
2
1
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
2
  import React from 'react';
4
3
  import { useState, useEffect, Fragment } from 'react';
@@ -2,7 +2,6 @@
2
2
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
3
  import React from 'react';
4
4
  /* eslint-disable no-nested-ternary */
5
- /* eslint-disable react/jsx-fragments */
6
5
  import { Fragment } from 'react';
7
6
  import { DateTimeDisplay, Card, CardHeader, CardContent, Flex } from '@pega/cosmos-react-core';
8
7
  import PropTypes from 'prop-types';
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/jsx-fragments */
2
1
  import { useState, useEffect, Fragment } from 'react';
3
2
  import {
4
3
  Link,
@@ -1,5 +1,5 @@
1
-
2
- /* eslint-disable react/jsx-fragments */
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import React from 'react';
3
3
  import { Fragment } from 'react';
4
4
  import { DateTimeDisplay, Card, CardHeader, CardContent, Flex } from '@pega/cosmos-react-core';
5
5
  import PropTypes from 'prop-types';
@@ -23,7 +23,7 @@
23
23
  "prettier/prettier": "off",
24
24
 
25
25
  // Disable rules from shared configs we're not ready for yet.
26
- "sonarjs/cognitive-complexity": ["warn", 45],
26
+ "sonarjs/cognitive-complexity": "off",
27
27
  "sonarjs/no-identical-functions": "off",
28
28
  "sonarjs/no-duplicate-string": "off",
29
29
  "sonarjs/no-nested-template-literals": "off",
@@ -47,8 +47,8 @@
47
47
  "import/no-unresolved": "off",
48
48
  "import/no-useless-path-segments": "off",
49
49
  "import/order": "off",
50
- "import/prefer-default-export": "off",
51
- "import/no-relative-packages": "off",
50
+ // "import/prefer-default-export": "off",
51
+ // "import/no-relative-packages": "off",
52
52
 
53
53
  "no-else-return": "off",
54
54
  "no-restricted-syntax": "off",
@@ -60,7 +60,7 @@
60
60
  "jsx-a11y/label-has-associated-control": "off",
61
61
  "jsx-a11y/no-static-element-interactions": "off",
62
62
 
63
- "react/jsx-fragments": "error",
63
+ "react/jsx-fragments": "off",
64
64
  "react/jsx-no-bind": "off",
65
65
  "react/self-closing-comp": "off",
66
66
 
@@ -75,9 +75,9 @@
75
75
  "@typescript-eslint/no-inferrable-types": "error",
76
76
  "eqeqeq": "off",
77
77
  "no-alert": "off",
78
- "no-console": "off",
78
+ "no-console": "error",
79
79
  "no-fallthrough": "error",
80
- "no-undef": "off",
80
+ "no-undef": "error",
81
81
  "no-unused-vars": "off",
82
82
  "no-var": "off",
83
83
  "yoda": "error",
@@ -169,13 +169,46 @@
169
169
  "react/react-in-jsx-scope": "off",
170
170
  // Set up configuration for future sweep
171
171
  "react-hooks/exhaustive-deps": [
172
- "error",
172
+ "off",
173
173
  {
174
174
  "additionalHooks": "useAfterInitialEffect"
175
175
  }
176
176
  ]
177
177
  }
178
178
  },
179
+ {
180
+ // rules for typescript (keeping old rules for js)
181
+ "files": "*.@(ts|tsx)",
182
+ "rules": {
183
+ "no-undef": "off",
184
+ "no-console": "off",
185
+ "import/prefer-default-export": "off",
186
+ "import/no-relative-packages": "off",
187
+ "react/jsx-fragments": "off",
188
+ "react/react-in-jsx-scope": "off",
189
+ // Set up configuration for future sweep
190
+ "react-hooks/exhaustive-deps": [
191
+ "error",
192
+ {
193
+ "additionalHooks": "useAfterInitialEffect"
194
+ }
195
+ ],
196
+ "sonarjs/cognitive-complexity": ["warn", 45]
197
+ }
198
+ },
199
+ // {
200
+ // "files": "*.@(tsx)",
201
+ // "rules": {
202
+ // "react/react-in-jsx-scope": "off",
203
+ // // Set up configuration for future sweep
204
+ // "react-hooks/exhaustive-deps": [
205
+ // "error",
206
+ // {
207
+ // "additionalHooks": "useAfterInitialEffect"
208
+ // }
209
+ // ]
210
+ // }
211
+ // },
179
212
  {
180
213
  "files": "*.@(js|jsx|ts|tsx|mdx)",
181
214
  "rules": {}
@@ -67,8 +67,8 @@
67
67
  "styled-components": "^5.3.5"
68
68
  },
69
69
  "devDependencies": {
70
- "@pega/configs": "^0.6.0",
71
- "@pega/custom-dx-components": "0.23.26",
70
+ "@pega/configs": "^0.7.1",
71
+ "@pega/custom-dx-components": "0.23.27",
72
72
  "@pega/pcore-pconnect-typedefs": "2.0.0",
73
73
  "@storybook/addon-actions": "^7.6.7",
74
74
  "@storybook/addon-essentials": "^7.6.7",
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  import dayjs from 'dayjs';
2
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
3
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,3 +1,6 @@
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
3
+
1
4
  import { isEmbeddedField, isPageListInPath, PAGE, PAGELIST, buildAggOrCalcId } from './repeat-utils.js';
2
5
 
3
6
  export const AT_FILTEREDLIST = '@FILTERED_LIST';
@@ -1,7 +1,8 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  /* eslint-disable sonarjs/no-collapsible-if */
2
3
  /* eslint-disable default-param-last */
3
4
  /* eslint-disable func-names */
4
- /* eslint-disable sonarjs/cognitive-complexity */
5
+ /* eslint-disable no-undef */
5
6
  import { splitConditionTree } from '@pega/cosmos-react-condition-builder';
6
7
  import cloneDeep from 'lodash/cloneDeep.js';
7
8
 
@@ -65,8 +66,10 @@ export function launchLocalAction(getPConnect, rowContext, action, cb) {
65
66
  name: action.name,
66
67
  callbacks: {
67
68
  submit: (response) => {
69
+ /* eslint-disable no-console */
68
70
  console.log('callback for modal submit');
69
71
  console.log(response);
72
+ /* eslint-enable no-console */
70
73
  cb();
71
74
  },
72
75
  cancel: () => {
@@ -95,14 +98,18 @@ export function launchBulkAction(getPConnect, selectedList, action, caseTypeID,
95
98
  bulkContextType,
96
99
  callbacks: {
97
100
  submit: (response) => {
101
+ /* eslint-disable no-console */
98
102
  console.log(response);
99
103
  console.log('callback for modal submit 1');
104
+ /* eslint-enable no-console */
100
105
  if (typeof cb === 'function') {
101
106
  cb();
102
107
  }
103
108
  },
104
109
  cancel: () => {
110
+ /* eslint-disable no-console */
105
111
  console.log('callback for modal submit 2');
112
+ /* eslint-enable no-console */
106
113
  }
107
114
  },
108
115
  showProgress: true,
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
2
3
  import { useRef, useState } from 'react';
3
4
 
@@ -1,7 +1,5 @@
1
-
2
1
  import Boolean from "./Boolean";
3
2
 
4
-
5
3
  export default {
6
4
  ...Boolean
7
5
  };
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
2
  import dayjs from 'dayjs';
3
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
2
  import { FieldValueList } from '@pega/cosmos-react-core';
3
3
  import PropTypes from 'prop-types';
4
4
 
@@ -1,3 +1,5 @@
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
1
3
  /* eslint-disable prefer-regex-literals */
2
4
  import dayjs from 'dayjs';
3
5
  import DateFormatter from './DateFormatter.js';
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
2
  import dayjs from "dayjs";
3
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,5 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
2
3
  import dayjs from "dayjs";
3
4
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
5
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,5 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
2
3
  import dayjs from 'dayjs';
3
4
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
5
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,5 @@
1
1
 
2
+ /* eslint-disable no-undef */
2
3
  /**
3
4
  * Given the PConnect object of a Template component, retrieve the children
4
5
  * metadata of all regions.
@@ -136,8 +137,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
136
137
 
137
138
  // If the annotation wasn't processed correctly, don't return any instruction text
138
139
  if (instructions?.startsWith('@PARAGRAPH')) {
139
-
140
+ /* eslint-disable no-console */
140
141
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
142
+ /* eslint-enable no-console */
141
143
  return undefined;
142
144
  }
143
145
 
@@ -1,4 +1,5 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
2
3
  import { createUID } from '@pega/cosmos-react-core';
3
4
 
4
5
  // import { LazyMap as LazyComponentMap } from '../../components_map';
@@ -213,7 +214,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
213
214
 
214
215
  // If the annotation wasn't processed correctly, don't return any instruction text
215
216
  if (instructions?.startsWith('@PARAGRAPH')) {
217
+ /* eslint-disable no-console */
216
218
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
219
+ /* eslint-enable no-console */
217
220
  return undefined;
218
221
  }
219
222
 
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/jsx-fragments */
2
1
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
2
  import React from 'react';
4
3
  import { useState, useEffect, Fragment } from 'react';
@@ -2,7 +2,6 @@
2
2
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3
3
  import React from 'react';
4
4
  /* eslint-disable no-nested-ternary */
5
- /* eslint-disable react/jsx-fragments */
6
5
  import { Fragment } from 'react';
7
6
  import { DateTimeDisplay, Card, CardHeader, CardContent, Flex } from '@pega/cosmos-react-core';
8
7
  import PropTypes from 'prop-types';
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
2
3
  import { useRef, useState } from 'react';
3
4
 
@@ -1,4 +1,5 @@
1
- import dayjs from "dayjs";
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */import dayjs from "dayjs";
2
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
3
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
4
5
  import utc from 'dayjs/plugin/utc.js';
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable no-undef */
2
2
 
3
3
  /**
4
4
  * Given the PConnect object of a Template component, retrieve the children
@@ -137,7 +137,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
137
137
 
138
138
  // If the annotation wasn't processed correctly, don't return any instruction text
139
139
  if (instructions?.startsWith('@PARAGRAPH')) {
140
+ /* eslint-disable no-console */
140
141
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
142
+ /* eslint-enable no-console */
141
143
  return undefined;
142
144
  }
143
145
 
@@ -1,5 +1,4 @@
1
-
2
- /* eslint-disable react/jsx-fragments */
1
+ /* eslint-disable import/no-relative-packages */
3
2
  import { useState, useRef, React} from "react";
4
3
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
5
4
 
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  import dayjs from 'dayjs';
2
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
3
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,3 +1,6 @@
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
3
+
1
4
  import { isEmbeddedField, isPageListInPath, PAGE, PAGELIST, buildAggOrCalcId } from './repeat-utils.js';
2
5
 
3
6
  export const AT_FILTEREDLIST = '@FILTERED_LIST';
@@ -1,7 +1,8 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  /* eslint-disable sonarjs/no-collapsible-if */
2
3
  /* eslint-disable default-param-last */
3
4
  /* eslint-disable func-names */
4
- /* eslint-disable sonarjs/cognitive-complexity */
5
+ /* eslint-disable no-undef */
5
6
  import { splitConditionTree } from '@pega/cosmos-react-condition-builder';
6
7
  import cloneDeep from 'lodash/cloneDeep.js';
7
8
 
@@ -65,8 +66,10 @@ export function launchLocalAction(getPConnect, rowContext, action, cb) {
65
66
  name: action.name,
66
67
  callbacks: {
67
68
  submit: (response) => {
69
+ /* eslint-disable no-console */
68
70
  console.log('callback for modal submit');
69
71
  console.log(response);
72
+ /* eslint-enable no-console */
70
73
  cb();
71
74
  },
72
75
  cancel: () => {
@@ -95,14 +98,18 @@ export function launchBulkAction(getPConnect, selectedList, action, caseTypeID,
95
98
  bulkContextType,
96
99
  callbacks: {
97
100
  submit: (response) => {
101
+ /* eslint-disable no-console */
98
102
  console.log(response);
99
103
  console.log('callback for modal submit 1');
104
+ /* eslint-enable no-console */
100
105
  if (typeof cb === 'function') {
101
106
  cb();
102
107
  }
103
108
  },
104
109
  cancel: () => {
110
+ /* eslint-disable no-console */
105
111
  console.log('callback for modal submit 2');
112
+ /* eslint-enable no-console */
106
113
  }
107
114
  },
108
115
  showProgress: true,
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
2
3
  import { useRef, useState } from 'react';
3
4
 
@@ -1,7 +1,5 @@
1
-
2
1
  import Boolean from "./Boolean";
3
2
 
4
-
5
3
  export default {
6
4
  ...Boolean
7
5
  };
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
2
  import dayjs from 'dayjs';
3
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
2
  import { FieldValueList } from '@pega/cosmos-react-core';
3
3
  import PropTypes from 'prop-types';
4
4
 
@@ -1,3 +1,5 @@
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
1
3
  /* eslint-disable prefer-regex-literals */
2
4
  import dayjs from 'dayjs';
3
5
  import DateFormatter from './DateFormatter.js';
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
2
  import dayjs from "dayjs";
3
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,5 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
2
3
  import dayjs from "dayjs";
3
4
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
5
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,5 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
2
3
  import dayjs from 'dayjs';
3
4
  import relativeTime from 'dayjs/plugin/relativeTime.js';
4
5
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
@@ -1,4 +1,5 @@
1
1
 
2
+ /* eslint-disable no-undef */
2
3
  /**
3
4
  * Given the PConnect object of a Template component, retrieve the children
4
5
  * metadata of all regions.
@@ -136,8 +137,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
136
137
 
137
138
  // If the annotation wasn't processed correctly, don't return any instruction text
138
139
  if (instructions?.startsWith('@PARAGRAPH')) {
139
-
140
+ /* eslint-disable no-console */
140
141
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
142
+ /* eslint-enable no-console */
141
143
  return undefined;
142
144
  }
143
145
 
@@ -1,4 +1,5 @@
1
-
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */
2
3
  import { createUID } from '@pega/cosmos-react-core';
3
4
 
4
5
  // import { LazyMap as LazyComponentMap } from '../../components_map';
@@ -213,7 +214,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
213
214
 
214
215
  // If the annotation wasn't processed correctly, don't return any instruction text
215
216
  if (instructions?.startsWith('@PARAGRAPH')) {
217
+ /* eslint-disable no-console */
216
218
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
219
+ /* eslint-enable no-console */
217
220
  return undefined;
218
221
  }
219
222
 
@@ -1,9 +1,11 @@
1
1
  /* eslint-disable react-hooks/rules-of-hooks */
2
+ import type React from 'react';
2
3
  import { useEffect, useState } from 'react';
3
4
  import PropTypes from 'prop-types';
4
5
  import { Avatar as CosmosAvatar } from '@pega/cosmos-react-core';
5
6
  import type { PConnFieldProps } from './PConnProps';
6
7
 
8
+
7
9
  // interface for props
8
10
  interface PegaDxilMyPageCaseWidgetAvatarProps extends PConnFieldProps {
9
11
  // If any, enter additional props that only exist on TextInput here
@@ -43,7 +45,7 @@ function Avatar(props: PegaDxilMyPageCaseWidgetAvatarProps) {
43
45
 
44
46
  if (showStatus) {
45
47
  const currentState = PCore.getMessagingServiceManager().getUserPresence().getUserState(userIdentifier);
46
- const [userState, setUserState] = useState(currentState === 'online' ? 'active' : 'inactive');
48
+ const [userState, setUserState]: any = useState(currentState === 'online' ? 'active' : 'inactive');
47
49
 
48
50
  // @ts-ignore
49
51
  const handleUserStateChange = ({ state }) => {
@@ -59,9 +61,9 @@ function Avatar(props: PegaDxilMyPageCaseWidgetAvatarProps) {
59
61
  return function cleanup() {
60
62
  PCore.getMessagingServiceManager().getUserPresence().unsubscribe(userIdentifier, subId);
61
63
  };
62
- }, [handleUserStateChange, userIdentifier]);
64
+ }, [userIdentifier, handleUserStateChange]);
63
65
  // @ts-ignore
64
- return <CosmosAvatar name={userName} imageSrc={imageBlobUrl} status={userState} />;
66
+ return <CosmosAvatar name={userName} imageSrc={imageBlobUrl as React.SetStateAction<any>} status={userState} />;
65
67
  }
66
68
 
67
69
  // Do not render when userName does not exists
@@ -1,4 +1,3 @@
1
- /* eslint-disable react/jsx-fragments */
2
1
  import { useState, useEffect, Fragment } from 'react';
3
2
  import {
4
3
  Link,
@@ -1,5 +1,5 @@
1
-
2
- /* eslint-disable react/jsx-fragments */
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import React from 'react';
3
3
  import { Fragment } from 'react';
4
4
  import { DateTimeDisplay, Card, CardHeader, CardContent, Flex } from '@pega/cosmos-react-core';
5
5
  import PropTypes from 'prop-types';
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-relative-packages */
1
2
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
2
3
  import { useRef, useState } from 'react';
3
4
 
@@ -1,4 +1,5 @@
1
- import dayjs from "dayjs";
1
+ /* eslint-disable import/no-relative-packages */
2
+ /* eslint-disable no-undef */import dayjs from "dayjs";
2
3
  import relativeTime from 'dayjs/plugin/relativeTime.js';
3
4
  import localizedFormat from 'dayjs/plugin/localizedFormat.js';
4
5
  import utc from 'dayjs/plugin/utc.js';
@@ -1,4 +1,4 @@
1
-
1
+ /* eslint-disable no-undef */
2
2
 
3
3
  /**
4
4
  * Given the PConnect object of a Template component, retrieve the children
@@ -137,7 +137,9 @@ export function getInstructions(pConnect, instructions = 'casestep') {
137
137
 
138
138
  // If the annotation wasn't processed correctly, don't return any instruction text
139
139
  if (instructions?.startsWith('@PARAGRAPH')) {
140
+ /* eslint-disable no-console */
140
141
  console.error('@PARAGRAPH annotation was not processed. Hiding custom instructions.');
142
+ /* eslint-enable no-console */
141
143
  return undefined;
142
144
  }
143
145
 
@@ -1,5 +1,4 @@
1
-
2
- /* eslint-disable react/jsx-fragments */
1
+ /* eslint-disable import/no-relative-packages */
3
2
  import { useState, useRef, React} from "react";
4
3
  import { EmailDisplay, PhoneDisplay, URLDisplay, Image, Button, Lightbox } from '@pega/cosmos-react-core';
5
4