@pega/custom-dx-components 0.23.26 → 0.23.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +2 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache +3 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.js.mustache +8 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.jsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.jsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +1 -2
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.js.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +3 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +3 -1
- package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.tsx.mustache +0 -1
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +2 -2
- package/src/tasks/init/template/.eslintrc.json +38 -7
- package/src/tasks/init/template/package.json.mustache +4 -3
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/date.js +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/embed-utils.js +3 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-utils.js +8 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/boolean-format.ts +0 -2
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js +2 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-time.js +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/utils.js +3 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/utils.js +4 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.tsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +0 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/time-of-day.js +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js +3 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.jsx +1 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/date.js +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/embed-utils.js +3 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-utils.js +8 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/boolean-format.ts +0 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.js +2 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.js +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date.js +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/utils.js +3 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js +4 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +5 -3
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.tsx +0 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +2 -2
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js +3 -1
- 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.
|
|
3
|
+
"version": "0.23.28",
|
|
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.
|
|
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,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
|
|
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,4 +1,5 @@
|
|
|
1
|
-
|
|
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
|
|
|
@@ -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,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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":
|
|
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,6 @@
|
|
|
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",
|
|
52
50
|
|
|
53
51
|
"no-else-return": "off",
|
|
54
52
|
"no-restricted-syntax": "off",
|
|
@@ -60,7 +58,7 @@
|
|
|
60
58
|
"jsx-a11y/label-has-associated-control": "off",
|
|
61
59
|
"jsx-a11y/no-static-element-interactions": "off",
|
|
62
60
|
|
|
63
|
-
"react/jsx-fragments": "
|
|
61
|
+
"react/jsx-fragments": "off",
|
|
64
62
|
"react/jsx-no-bind": "off",
|
|
65
63
|
"react/self-closing-comp": "off",
|
|
66
64
|
|
|
@@ -75,9 +73,9 @@
|
|
|
75
73
|
"@typescript-eslint/no-inferrable-types": "error",
|
|
76
74
|
"eqeqeq": "off",
|
|
77
75
|
"no-alert": "off",
|
|
78
|
-
"no-console": "
|
|
76
|
+
"no-console": "error",
|
|
79
77
|
"no-fallthrough": "error",
|
|
80
|
-
"no-undef": "
|
|
78
|
+
"no-undef": "error",
|
|
81
79
|
"no-unused-vars": "off",
|
|
82
80
|
"no-var": "off",
|
|
83
81
|
"yoda": "error",
|
|
@@ -169,13 +167,46 @@
|
|
|
169
167
|
"react/react-in-jsx-scope": "off",
|
|
170
168
|
// Set up configuration for future sweep
|
|
171
169
|
"react-hooks/exhaustive-deps": [
|
|
172
|
-
"
|
|
170
|
+
"off",
|
|
173
171
|
{
|
|
174
172
|
"additionalHooks": "useAfterInitialEffect"
|
|
175
173
|
}
|
|
176
174
|
]
|
|
177
175
|
}
|
|
178
176
|
},
|
|
177
|
+
{
|
|
178
|
+
// rules for typescript (keeping old rules for js)
|
|
179
|
+
"files": "*.@(ts|tsx)",
|
|
180
|
+
"rules": {
|
|
181
|
+
"no-undef": "off",
|
|
182
|
+
"no-console": "off",
|
|
183
|
+
"import/prefer-default-export": "off",
|
|
184
|
+
"import/no-relative-packages": "off",
|
|
185
|
+
"react/jsx-fragments": "off",
|
|
186
|
+
"react/react-in-jsx-scope": "off",
|
|
187
|
+
// Set up configuration for future sweep
|
|
188
|
+
"react-hooks/exhaustive-deps": [
|
|
189
|
+
"error",
|
|
190
|
+
{
|
|
191
|
+
"additionalHooks": "useAfterInitialEffect"
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"sonarjs/cognitive-complexity": ["warn", 45]
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
// {
|
|
198
|
+
// "files": "*.@(tsx)",
|
|
199
|
+
// "rules": {
|
|
200
|
+
// "react/react-in-jsx-scope": "off",
|
|
201
|
+
// // Set up configuration for future sweep
|
|
202
|
+
// "react-hooks/exhaustive-deps": [
|
|
203
|
+
// "error",
|
|
204
|
+
// {
|
|
205
|
+
// "additionalHooks": "useAfterInitialEffect"
|
|
206
|
+
// }
|
|
207
|
+
// ]
|
|
208
|
+
// }
|
|
209
|
+
// },
|
|
179
210
|
{
|
|
180
211
|
"files": "*.@(js|jsx|ts|tsx|mdx)",
|
|
181
212
|
"rules": {}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"author": "",
|
|
51
51
|
"license": "Enter License",
|
|
52
52
|
"sideEffects": false,
|
|
53
|
-
|
|
53
|
+
"dependencies": {
|
|
54
54
|
"@pega/cosmos-react-condition-builder": "^4.1.2",
|
|
55
55
|
"@pega/cosmos-react-core": "^4.1.2",
|
|
56
56
|
"@pega/cosmos-react-work": "4.1.2",
|
|
@@ -64,11 +64,12 @@
|
|
|
64
64
|
"react-is": "^18.2.0",
|
|
65
65
|
"react-player": "^2.10.1",
|
|
66
66
|
"react-redux": "^7.2.6",
|
|
67
|
-
"styled-components": "^5.3.5"
|
|
67
|
+
"styled-components": "^5.3.5",
|
|
68
|
+
"ts-loader": "^9.5.1"
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
71
|
"@pega/configs": "^0.6.0",
|
|
71
|
-
"@pega/custom-dx-components": "0.23.
|
|
72
|
+
"@pega/custom-dx-components": "0.23.28",
|
|
72
73
|
"@pega/pcore-pconnect-typedefs": "2.0.0",
|
|
73
74
|
"@storybook/addon-actions": "^7.6.7",
|
|
74
75
|
"@storybook/addon-essentials": "^7.6.7",
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-utils.js
CHANGED
|
@@ -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
|
|
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,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
|
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx
CHANGED
|
@@ -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';
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/time-of-day.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
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';
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js
CHANGED
|
@@ -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
|
|
package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-utils.js
CHANGED
|
@@ -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
|
|
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,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
|
-
}, [
|
|
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,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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,4 +1,5 @@
|
|
|
1
|
-
|
|
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
|
|