@pega/custom-dx-components 25.1.10-alpha-0.3 → 25.1.10-alpha-0.5
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/README.md +3 -5
- package/eslint.config.mjs +233 -0
- package/package.json +3 -3
- package/src/cli.js +8 -2
- package/src/tasks/create/templates/Constellation/Field/Boolean/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Date/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Integer/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Field/Text/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Email/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Input/{StatusWork.tsx → StatusWork.tsx.mustache} +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Input/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Text-URL/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/HighlightRender.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/HighlightRender.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/FORM/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/FORM-region/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/PAGE/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Widget/CASE/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Launchpad/Widget/CASE/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/create-nonce.ts.mustache +0 -2
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.tsx.mustache +0 -1
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/create-nonce.ts.mustache +0 -2
- package/src/tasks/create-lib/helper.js +75 -1
- package/src/tasks/create-lib/index.js +38 -3
- package/src/tasks/create-version/index.js +1 -1
- package/src/tasks/delete-lib/index.js +1 -1
- package/src/tasks/delete-version/index.js +1 -1
- package/src/tasks/dev-server/index.js +43 -0
- package/src/tasks/import-archive/index.js +36 -6
- package/src/tasks/index.js +1 -0
- package/src/tasks/init/index.js +19 -10
- package/src/tasks/init/template/README.md +3 -5
- package/src/tasks/init/template/eslint.config.mjs +231 -0
- package/src/tasks/init/template/package.json.mustache +20 -18
- package/src/tasks/init/template/tasks.config.json +3 -2
- package/src/tasks/init/template/tsconfig.build.json +2 -1
- package/src/tasks/init/template/tsconfig.json +1 -0
- package/src/tasks/list/helper.js +5 -1
- package/src/tasks/publish/index.js +15 -2
- package/src/tasks/publish-all/index.js +4 -1
- package/src/tasks/publish-lib/index.js +6 -2
- package/src/tasks/show-help/index.js +6 -1
- package/src/tasks/switch-lib/index.js +1 -1
- package/src/tasks/switch-version/index.js +1 -1
- package/src/util.js +45 -10
- package/tests/assets/library/components/create/shared/create-nonce.ts +0 -2
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/index.tsx +2 -3
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
- package/tests/assets/library/components/createAll/Constellation/shared/create-nonce.ts +0 -2
- package/tests/assets/original/components/create/Pega_DXIL_MyTestText/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/index.tsx +2 -3
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +1 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +2 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/index.tsx +2 -3
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +1 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts +2 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +0 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/create-nonce.ts +0 -2
- package/tests/functional/localLibCreateLibDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibExportImportLib.test.js +1 -1
- package/.eslintrc.json +0 -18
- package/src/tasks/init/template/.eslintignore +0 -14
- package/src/tasks/init/template/.eslintrc.json +0 -240
- package/tests/assets/original/components/create/shared/PConnProps.d.ts +0 -46
- package/tests/assets/original/components/create/shared/create-nonce.ts +0 -7
- package/tests/assets/original/components/create/shared/suggestions-handler.ts +0 -9
- package/tests/assets/original/components/createAll/Constellation/shared/PConnProps.d.ts +0 -46
- package/tests/assets/original/components/createAll/Constellation/shared/create-nonce.ts +0 -7
- package/tests/assets/original/components/createAll/Constellation/shared/suggestions-handler.ts +0 -9
- package/tests/assets/original/components/createAll/Launchpad/shared/PConnProps.d.ts +0 -46
- package/tests/assets/original/components/createAll/Launchpad/shared/create-nonce.ts +0 -7
- package/tests/assets/original/components/createAll/Launchpad/shared/suggestions-handler.ts +0 -9
package/README.md
CHANGED
|
@@ -8,15 +8,13 @@ This project provides you with an environment to extend Constellation by giving
|
|
|
8
8
|
|
|
9
9
|
Ensure you have access to the following in your system:
|
|
10
10
|
|
|
11
|
-
- Pega Infinity Server version
|
|
11
|
+
- Pega Infinity Server version 25.1 or later
|
|
12
12
|
|
|
13
13
|
- Git version 2.30 or later
|
|
14
14
|
|
|
15
|
-
- System node version
|
|
15
|
+
- System node version >= 22.15.0
|
|
16
16
|
|
|
17
|
-
- System npm version
|
|
18
|
-
|
|
19
|
-
- Recommended (node 20, npm 10)
|
|
17
|
+
- System npm version 10
|
|
20
18
|
|
|
21
19
|
## Latest Documentation
|
|
22
20
|
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { globalIgnores } from 'eslint/config';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import js from '@eslint/js';
|
|
5
|
+
import { FlatCompat } from '@eslint/eslintrc';
|
|
6
|
+
import tseslint from 'typescript-eslint';
|
|
7
|
+
import sonarjs from 'eslint-plugin-sonarjs';
|
|
8
|
+
import importPlugin from 'eslint-plugin-import';
|
|
9
|
+
import react from 'eslint-plugin-react';
|
|
10
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
11
|
+
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = path.dirname(__filename);
|
|
14
|
+
const compat = new FlatCompat({
|
|
15
|
+
baseDirectory: __dirname,
|
|
16
|
+
recommendedConfig: js.configs.recommended,
|
|
17
|
+
sonarjs: sonarjs.configs.recommended,
|
|
18
|
+
importPlugin: importPlugin.configs.recommended,
|
|
19
|
+
react: react.configs.recommended,
|
|
20
|
+
reactHooks: reactHooks.configs.recommended,
|
|
21
|
+
allConfig: js.configs.all
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export default tseslint.config(
|
|
25
|
+
tseslint.configs.recommended,
|
|
26
|
+
globalIgnores([
|
|
27
|
+
'**/node_modules',
|
|
28
|
+
'packages/*/lib',
|
|
29
|
+
'!**/.storybook',
|
|
30
|
+
'.storybook/public',
|
|
31
|
+
'**/demo.stories.jsx',
|
|
32
|
+
'**/mock.stories.js',
|
|
33
|
+
'**/demo.stories.tsx',
|
|
34
|
+
'**/demo.test.tsx',
|
|
35
|
+
'**/mock.stories.ts',
|
|
36
|
+
'**/*.mdx',
|
|
37
|
+
'**/webpack.config.js',
|
|
38
|
+
'src/helpers/config_access.js',
|
|
39
|
+
'**/*.html',
|
|
40
|
+
'**/*.css',
|
|
41
|
+
'**/*.json',
|
|
42
|
+
'**/*.md',
|
|
43
|
+
'**/*.svg',
|
|
44
|
+
'**/*.zip',
|
|
45
|
+
'**/*.d.ts',
|
|
46
|
+
'*.storybook/*',
|
|
47
|
+
'**/*.cjs',
|
|
48
|
+
'**/*.mjs',
|
|
49
|
+
'**/paths.js',
|
|
50
|
+
'dist/*',
|
|
51
|
+
'lib/*'
|
|
52
|
+
]),
|
|
53
|
+
{
|
|
54
|
+
languageOptions: {
|
|
55
|
+
globals: {
|
|
56
|
+
PCore: 'readonly',
|
|
57
|
+
window: true,
|
|
58
|
+
console: true,
|
|
59
|
+
document: true,
|
|
60
|
+
fetch: true
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
ecmaVersion: 13,
|
|
64
|
+
sourceType: 'script',
|
|
65
|
+
|
|
66
|
+
parserOptions: {
|
|
67
|
+
project: 'tsconfig.json',
|
|
68
|
+
ecmaFeatures: {
|
|
69
|
+
jsx: true
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
settings: {
|
|
75
|
+
'import/resolver': {
|
|
76
|
+
typescript: {},
|
|
77
|
+
react: {
|
|
78
|
+
version: 'detect'
|
|
79
|
+
},
|
|
80
|
+
node: {
|
|
81
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx']
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
react: {
|
|
86
|
+
version: 'detect'
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
plugins: { sonarjs, import: importPlugin, react, 'react-hooks': reactHooks },
|
|
91
|
+
rules: {
|
|
92
|
+
'prettier/prettier': 'off',
|
|
93
|
+
'sonarjs/cognitive-complexity': 'off',
|
|
94
|
+
'sonarjs/no-identical-functions': 'off',
|
|
95
|
+
'sonarjs/no-duplicate-string': 'off',
|
|
96
|
+
'sonarjs/no-nested-template-literals': 'off',
|
|
97
|
+
'@typescript-eslint/array-type': 'off',
|
|
98
|
+
'@typescript-eslint/no-wrapper-object-types': 'off',
|
|
99
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
100
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
101
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
102
|
+
'@typescript-eslint/no-unsafe-function-type': 'off',
|
|
103
|
+
'@typescript-eslint/no-inferrable-types': 'off',
|
|
104
|
+
'import/extensions': ['off', 'never'],
|
|
105
|
+
'import/named': 'off',
|
|
106
|
+
'import/no-cycle': 'off',
|
|
107
|
+
'import/no-duplicates': 'off',
|
|
108
|
+
'import/no-extraneous-dependencies': 'off',
|
|
109
|
+
'import/no-named-as-default': 'off',
|
|
110
|
+
'import/no-named-as-default-member': 'off',
|
|
111
|
+
'import/no-self-import': 'off',
|
|
112
|
+
'import/no-unresolved': 'off',
|
|
113
|
+
'import/no-useless-path-segments': 'off',
|
|
114
|
+
'import/order': 'off',
|
|
115
|
+
'no-else-return': 'off',
|
|
116
|
+
'no-restricted-syntax': 'off',
|
|
117
|
+
'no-underscore-dangle': 'off',
|
|
118
|
+
'jsx-a11y/alt-text': 'off',
|
|
119
|
+
'jsx-a11y/anchor-is-valid': 'off',
|
|
120
|
+
'jsx-a11y/click-events-have-key-events': 'off',
|
|
121
|
+
'jsx-a11y/label-has-associated-control': 'off',
|
|
122
|
+
'jsx-a11y/no-static-element-interactions': 'off',
|
|
123
|
+
'react/jsx-fragments': 'off',
|
|
124
|
+
'react/jsx-no-bind': 'off',
|
|
125
|
+
'react/self-closing-comp': 'off',
|
|
126
|
+
'sonarjs/prefer-immediate-return': 'off',
|
|
127
|
+
'@typescript-eslint/dot-notation': 'off',
|
|
128
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
129
|
+
'@typescript-eslint/ban-types': 'off',
|
|
130
|
+
eqeqeq: 'off',
|
|
131
|
+
'no-alert': 'off',
|
|
132
|
+
'no-console': 'error',
|
|
133
|
+
'no-fallthrough': 'error',
|
|
134
|
+
'no-undef': 'error',
|
|
135
|
+
'no-unused-vars': 'off',
|
|
136
|
+
'no-var': 'off',
|
|
137
|
+
yoda: 'error',
|
|
138
|
+
'no-irregular-whitespace': 'off',
|
|
139
|
+
'no-empty': 'off',
|
|
140
|
+
'no-new-object': 'off',
|
|
141
|
+
'import/no-relative-packages': 'off',
|
|
142
|
+
'import/no-mutable-exports': 'error',
|
|
143
|
+
'sonarjs/max-switch-cases': 'error',
|
|
144
|
+
'sonarjs/no-collapsible-if': 'error',
|
|
145
|
+
'sonarjs/no-all-duplicated-branches': 'error',
|
|
146
|
+
'sonarjs/no-duplicated-branches': 'error',
|
|
147
|
+
'sonarjs/no-gratuitous-expressions': 'off',
|
|
148
|
+
'sonarjs/no-ignored-return': 'error',
|
|
149
|
+
'sonarjs/no-small-switch': 'error',
|
|
150
|
+
'sonarjs/prefer-object-literal': 'error',
|
|
151
|
+
'sonarjs/prefer-single-boolean-return': 'error',
|
|
152
|
+
'@typescript-eslint/no-shadow': 'error',
|
|
153
|
+
'react/default-props-match-prop-types': 'error',
|
|
154
|
+
'react/no-unescaped-entities': 'error',
|
|
155
|
+
'react/no-unused-prop-types': 'error',
|
|
156
|
+
'react/static-property-placement': 'error',
|
|
157
|
+
'array-callback-return': 'error',
|
|
158
|
+
camelcase: 'error',
|
|
159
|
+
'func-names': 'error',
|
|
160
|
+
'no-case-declarations': 'error',
|
|
161
|
+
'no-lonely-if': 'error',
|
|
162
|
+
'no-nested-ternary': 'error',
|
|
163
|
+
'no-plusplus': 'error',
|
|
164
|
+
'no-restricted-globals': 'error',
|
|
165
|
+
'no-restricted-properties': 'error',
|
|
166
|
+
'no-shadow': 'error',
|
|
167
|
+
radix: 'error',
|
|
168
|
+
'spaced-comment': 'error',
|
|
169
|
+
'import/newline-after-import': 'error',
|
|
170
|
+
'sonarjs/no-nested-switch': 'error',
|
|
171
|
+
'@typescript-eslint/no-array-constructor': 'error',
|
|
172
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
173
|
+
'@typescript-eslint/no-useless-constructor': 'error',
|
|
174
|
+
'react/button-has-type': 'error',
|
|
175
|
+
'react/jsx-curly-brace-presence': 'error',
|
|
176
|
+
'react/jsx-boolean-value': 'error',
|
|
177
|
+
'react/no-array-index-key': 'error',
|
|
178
|
+
'class-methods-use-this': 'error',
|
|
179
|
+
'guard-for-in': 'error',
|
|
180
|
+
'no-unneeded-ternary': 'error',
|
|
181
|
+
'no-unused-expressions': 'error',
|
|
182
|
+
'operator-assignment': 'error',
|
|
183
|
+
'prefer-template': 'error',
|
|
184
|
+
'vars-on-top': 'error',
|
|
185
|
+
'prefer-regex-literals': 'off',
|
|
186
|
+
'no-use-before-define': 'off',
|
|
187
|
+
'@typescript-eslint/no-use-before-define': 'error'
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
files: ['**/*.@(ts|tsx)'],
|
|
192
|
+
|
|
193
|
+
rules: {
|
|
194
|
+
'@typescript-eslint/method-signature-style': ['error', 'property'],
|
|
195
|
+
quotes: 'off',
|
|
196
|
+
'@typescript-eslint/quotes': 'off'
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
files: ['**/*.@(jsx|tsx|mdx)'],
|
|
201
|
+
|
|
202
|
+
rules: {
|
|
203
|
+
'react/react-in-jsx-scope': 'off',
|
|
204
|
+
'react-hooks/rules-of-hooks': 'off',
|
|
205
|
+
'react-hooks/exhaustive-deps': 'off'
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
files: ['**/*.@(ts|tsx)'],
|
|
210
|
+
rules: {
|
|
211
|
+
'no-undef': 'error',
|
|
212
|
+
'no-console': 'off',
|
|
213
|
+
'import/prefer-default-export': 'off',
|
|
214
|
+
'import/no-relative-packages': 'off',
|
|
215
|
+
'react/jsx-fragments': 'off',
|
|
216
|
+
'react/react-in-jsx-scope': 'off',
|
|
217
|
+
'react-hooks/exhaustive-deps': 'off',
|
|
218
|
+
'sonarjs/cognitive-complexity': ['warn', 45]
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
files: ['**/*.@(js|jsx|ts|tsx|mdx)'],
|
|
223
|
+
rules: {}
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
{
|
|
227
|
+
files: ['*/**/mocks/**.@(mocks|styles).@(tsx|ts)'],
|
|
228
|
+
|
|
229
|
+
rules: {
|
|
230
|
+
'import/prefer-default-export': ['off']
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/custom-dx-components",
|
|
3
|
-
"version": "25.1.10-alpha-0.
|
|
3
|
+
"version": "25.1.10-alpha-0.5",
|
|
4
4
|
"description": "Utility for building custom UI components",
|
|
5
5
|
"bin": "./bin/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@babel/plugin-transform-class-properties": "^7.27.1",
|
|
20
20
|
"@babel/preset-react": "^7.27.1",
|
|
21
21
|
"@pega/auth": "^0.2.24",
|
|
22
|
-
"@pega/constellation-dx-components-build-utils": "^2.0.
|
|
22
|
+
"@pega/constellation-dx-components-build-utils": "^2.0.6",
|
|
23
23
|
"@pega/inquirer-fuzzy-path": "^3.0.0",
|
|
24
24
|
"ajv": "^8.17.1",
|
|
25
25
|
"ajv-keywords": "^5.1.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"compression-webpack-plugin": "^11.1.0",
|
|
32
32
|
"css-loader": "7.1.2",
|
|
33
33
|
"css-minimizer-webpack-plugin": "^7.0.2",
|
|
34
|
-
"eslint": "^
|
|
34
|
+
"eslint": "^9.27.0",
|
|
35
35
|
"execa": "^9.5.2",
|
|
36
36
|
"file-loader": "6.2.0",
|
|
37
37
|
"fs-extra": "^11.3.0",
|
package/src/cli.js
CHANGED
|
@@ -42,7 +42,8 @@ import {
|
|
|
42
42
|
updateComponent,
|
|
43
43
|
validate,
|
|
44
44
|
upgrade,
|
|
45
|
-
buildJestAssets
|
|
45
|
+
buildJestAssets,
|
|
46
|
+
startDevServer
|
|
46
47
|
} from './tasks/index.js';
|
|
47
48
|
|
|
48
49
|
const TASKS = {
|
|
@@ -86,7 +87,8 @@ const TASKS = {
|
|
|
86
87
|
IMPORT_COMP: 'importComponent',
|
|
87
88
|
AUTHENTICATE: 'authenticate',
|
|
88
89
|
UPGRADE: 'upgrade',
|
|
89
|
-
BUILD_JEST_ASSETS: 'buildJestAssets'
|
|
90
|
+
BUILD_JEST_ASSETS: 'buildJestAssets',
|
|
91
|
+
START_DEV_SERVER: 'startDevServer'
|
|
90
92
|
};
|
|
91
93
|
|
|
92
94
|
const parseArgumentsIntoOptions = rawArgs => {
|
|
@@ -276,6 +278,10 @@ export default async (args = []) => {
|
|
|
276
278
|
buildJestAssets(options);
|
|
277
279
|
break;
|
|
278
280
|
}
|
|
281
|
+
case TASKS.START_DEV_SERVER: {
|
|
282
|
+
startDevServer(options);
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
279
285
|
default: {
|
|
280
286
|
console.log(chalk.red(`No task matched with ${task}`));
|
|
281
287
|
break;
|
package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
1
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
3
2
|
import { useEffect, useRef, useState, useMemo, type MutableRefObject, type SetStateAction } from 'react';
|
|
4
3
|
import { ComboBox, menuHelpers, debounce, throttle, Button, Icon, withConfiguration, type MenuGroupProps, type MenuItemProps } from '@pega/cosmos-react-core';
|
|
@@ -414,6 +413,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
414
413
|
const { isSearchableOnKey } = props;
|
|
415
414
|
|
|
416
415
|
const [items, setItems] = useState(() => []);
|
|
416
|
+
// eslint-disable-next-line prefer-const
|
|
417
417
|
let selectItem: ((id: string, ev?: any) => void) | ((arg0: never) => void);
|
|
418
418
|
|
|
419
419
|
// convert associated to datapage listtype and transform props
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* eslint-disable sonarjs/no-collapsible-if */
|
|
2
|
+
/* eslint-disable sonarjs/cognitive-complexity */
|
|
2
3
|
/* eslint-disable func-names */
|
|
3
4
|
// @ts-nocheck
|
|
4
5
|
import { splitConditionTree } from '@pega/cosmos-react-condition-builder';
|
|
@@ -267,7 +268,7 @@ export function getDescriptorsFieldName(property, pageClass) {
|
|
|
267
268
|
return property;
|
|
268
269
|
}
|
|
269
270
|
|
|
270
|
-
// eslint-disable-next-line
|
|
271
|
+
// eslint-disable-next-line, sonarjs/cognitive-complexity
|
|
271
272
|
export function preparePatchQueryFields(fields, isDataObject = false, classID = '', getPConnect) {
|
|
272
273
|
const queryFields = [];
|
|
273
274
|
// Descriptors can be configured only for single selectionMode properties
|
package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache
CHANGED
|
@@ -77,7 +77,6 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
77
77
|
const propName: string = stateProps.value;
|
|
78
78
|
const configProps = pConn.getConfigProps();
|
|
79
79
|
const className = pConn.getCaseInfo().getClassName();
|
|
80
|
-
const { getLocaleRuleNameFromKeys, getLocalizedValue } = pConn;
|
|
81
80
|
|
|
82
81
|
// @ts-ignore
|
|
83
82
|
let configProperty = pConn.getRawMetadata()?.config?.value || '';
|
|
@@ -139,10 +138,10 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
139
138
|
id={`${fullReference}.${item.key}`}
|
|
140
139
|
value={item.key}
|
|
141
140
|
key={`${fullReference}.${item.key}`}
|
|
142
|
-
label={getLocalizedValue(
|
|
141
|
+
label={pConn.getLocalizedValue(
|
|
143
142
|
isDatapage ? item.text : item.value,
|
|
144
143
|
localePath,
|
|
145
|
-
getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
144
|
+
pConn.getLocaleRuleNameFromKeys(localeClass, localeContext, localeName)
|
|
146
145
|
)}
|
|
147
146
|
name={fullReference}
|
|
148
147
|
/>
|