@pega/custom-dx-components 25.1.10-alpha-0.4 → 25.1.10-alpha-0.6

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 (186) hide show
  1. package/README.md +3 -5
  2. package/eslint.config.mjs +233 -0
  3. package/package.json +3 -3
  4. package/src/cli.js +8 -2
  5. package/src/tasks/create/index.js +4 -1
  6. package/src/tasks/create/templates/Constellation/Field/Boolean/create-nonce.ts.mustache +0 -2
  7. package/src/tasks/create/templates/Constellation/Field/Date/create-nonce.ts.mustache +0 -2
  8. package/src/tasks/create/templates/Constellation/Field/DateTime/create-nonce.ts.mustache +0 -2
  9. package/src/tasks/create/templates/Constellation/Field/Decimal/create-nonce.ts.mustache +0 -2
  10. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/create-nonce.ts.mustache +0 -2
  11. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/create-nonce.ts.mustache +0 -2
  12. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/create-nonce.ts.mustache +0 -2
  13. package/src/tasks/create/templates/Constellation/Field/Integer/create-nonce.ts.mustache +0 -2
  14. package/src/tasks/create/templates/Constellation/Field/Picklist/create-nonce.ts.mustache +0 -2
  15. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +0 -1
  16. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/create-nonce.ts.mustache +0 -2
  17. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +1 -1
  18. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +2 -1
  19. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/create-nonce.ts.mustache +0 -2
  20. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +0 -1
  21. package/src/tasks/create/templates/Constellation/Field/Text/create-nonce.ts.mustache +0 -2
  22. package/src/tasks/create/templates/Constellation/Field/Text-Email/create-nonce.ts.mustache +0 -2
  23. package/src/tasks/create/templates/Constellation/Field/Text-Input/{StatusWork.tsx → StatusWork.tsx.mustache} +0 -1
  24. package/src/tasks/create/templates/Constellation/Field/Text-Input/create-nonce.ts.mustache +0 -2
  25. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/create-nonce.ts.mustache +0 -2
  26. package/src/tasks/create/templates/Constellation/Field/Text-Phone/create-nonce.ts.mustache +0 -2
  27. package/src/tasks/create/templates/Constellation/Field/Text-URL/create-nonce.ts.mustache +0 -2
  28. package/src/tasks/create/templates/Constellation/Field/TimeofDay/create-nonce.ts.mustache +0 -2
  29. package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +0 -1
  30. package/src/tasks/create/templates/Constellation/Template/DETAILS/HighlightRender.tsx.mustache +0 -1
  31. package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.tsx.mustache +0 -1
  32. package/src/tasks/create/templates/Constellation/Template/DETAILS/create-nonce.ts.mustache +0 -2
  33. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +0 -1
  34. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/HighlightRender.tsx.mustache +0 -1
  35. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.tsx.mustache +0 -1
  36. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/create-nonce.ts.mustache +0 -2
  37. package/src/tasks/create/templates/Constellation/Template/FORM/create-nonce.ts.mustache +0 -2
  38. package/src/tasks/create/templates/Constellation/Template/FORM-region/create-nonce.ts.mustache +0 -2
  39. package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.tsx.mustache +0 -1
  40. package/src/tasks/create/templates/Constellation/Template/PAGE/create-nonce.ts.mustache +0 -2
  41. package/src/tasks/create/templates/Constellation/Widget/CASE/create-nonce.ts.mustache +0 -2
  42. package/src/tasks/create/templates/Constellation/Widget/PAGE/create-nonce.ts.mustache +0 -2
  43. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +0 -1
  44. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/create-nonce.ts.mustache +0 -2
  45. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/create-nonce.ts.mustache +0 -2
  46. package/src/tasks/create/templates/Launchpad/Widget/CASE/create-nonce.ts.mustache +0 -2
  47. package/src/tasks/create/templates/Launchpad/Widget/PAGE/create-nonce.ts.mustache +0 -2
  48. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.tsx.mustache +0 -1
  49. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/create-nonce.ts.mustache +0 -2
  50. package/src/tasks/create-lib/helper.js +75 -1
  51. package/src/tasks/create-lib/index.js +38 -3
  52. package/src/tasks/create-version/index.js +1 -1
  53. package/src/tasks/delete-lib/index.js +1 -1
  54. package/src/tasks/delete-version/index.js +1 -1
  55. package/src/tasks/dev-server/index.js +43 -0
  56. package/src/tasks/export-archive/index.js +0 -11
  57. package/src/tasks/import-archive/helper.js +38 -39
  58. package/src/tasks/import-archive/index.js +38 -15
  59. package/src/tasks/import-comp/index.js +0 -9
  60. package/src/tasks/index.js +1 -0
  61. package/src/tasks/init/index.js +19 -10
  62. package/src/tasks/init/template/README.md +3 -5
  63. package/src/tasks/init/template/eslint.config.mjs +231 -0
  64. package/src/tasks/init/template/package.json.mustache +20 -18
  65. package/src/tasks/init/template/tasks.config.json +3 -2
  66. package/src/tasks/init/template/tsconfig.build.json +2 -1
  67. package/src/tasks/init/template/tsconfig.json +1 -0
  68. package/src/tasks/list/helper.js +5 -1
  69. package/src/tasks/list-pub/helper.js +0 -3
  70. package/src/tasks/publish/index.js +15 -2
  71. package/src/tasks/publish-all/index.js +4 -1
  72. package/src/tasks/publish-lib/index.js +6 -9
  73. package/src/tasks/restore/index.js +0 -3
  74. package/src/tasks/show-help/index.js +6 -1
  75. package/src/tasks/switch-lib/index.js +1 -1
  76. package/src/tasks/switch-version/index.js +1 -1
  77. package/src/tasks/validator/index.js +8 -0
  78. package/src/util.js +64 -20
  79. package/tests/assets/library/components/create/shared/create-nonce.ts +0 -2
  80. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
  81. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
  82. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
  83. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
  84. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -1
  85. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +0 -1
  86. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/index.tsx +0 -1
  87. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +1 -1
  88. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +2 -1
  89. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
  90. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
  91. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
  92. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
  93. package/tests/assets/library/components/createAll/Constellation/shared/create-nonce.ts +0 -2
  94. package/tests/assets/original/components/create/Pega_DXIL_MyTestText/create-nonce.ts +0 -2
  95. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/create-nonce.ts +0 -2
  96. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/create-nonce.ts +0 -2
  97. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/create-nonce.ts +0 -2
  98. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/create-nonce.ts +0 -2
  99. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/create-nonce.ts +0 -2
  100. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/create-nonce.ts +0 -2
  101. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
  102. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
  103. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
  104. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/create-nonce.ts +0 -2
  105. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/create-nonce.ts +0 -2
  106. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/create-nonce.ts +0 -2
  107. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/create-nonce.ts +0 -2
  108. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/create-nonce.ts +0 -2
  109. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
  110. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/create-nonce.ts +0 -2
  111. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -1
  112. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +0 -2
  113. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/create-nonce.ts +0 -2
  114. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/create-nonce.ts +0 -2
  115. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/create-nonce.ts +0 -2
  116. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/create-nonce.ts +0 -2
  117. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/create-nonce.ts +0 -2
  118. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +0 -1
  119. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/create-nonce.ts +0 -2
  120. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/index.tsx +0 -1
  121. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/create-nonce.ts +0 -2
  122. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +1 -1
  123. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +2 -1
  124. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/create-nonce.ts +0 -2
  125. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
  126. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/create-nonce.ts +0 -2
  127. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/create-nonce.ts +0 -2
  128. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
  129. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
  130. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
  131. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +0 -2
  132. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +0 -2
  133. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/create-nonce.ts +0 -2
  134. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/create-nonce.ts +0 -2
  135. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/create-nonce.ts +0 -2
  136. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/create-nonce.ts +0 -2
  137. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/create-nonce.ts +0 -2
  138. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/create-nonce.ts +0 -2
  139. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/create-nonce.ts +0 -2
  140. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/Avatar.tsx +0 -1
  141. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/HighlightRender.tsx +0 -1
  142. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.tsx +0 -1
  143. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/create-nonce.ts +0 -2
  144. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/create-nonce.ts +0 -2
  145. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/create-nonce.ts +0 -2
  146. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/create-nonce.ts +0 -2
  147. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/create-nonce.ts +0 -2
  148. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.tsx +0 -1
  149. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/create-nonce.ts +0 -2
  150. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +0 -1
  151. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +0 -2
  152. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/create-nonce.ts +0 -2
  153. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/create-nonce.ts +0 -2
  154. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/create-nonce.ts +0 -2
  155. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/create-nonce.ts +0 -2
  156. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/create-nonce.ts +0 -2
  157. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +0 -1
  158. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/create-nonce.ts +0 -2
  159. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/index.tsx +0 -1
  160. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/create-nonce.ts +0 -2
  161. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +1 -1
  162. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts +2 -1
  163. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/create-nonce.ts +0 -2
  164. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.tsx +0 -1
  165. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/create-nonce.ts +0 -2
  166. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/create-nonce.ts +0 -2
  167. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +0 -1
  168. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/HighlightRender.tsx +0 -1
  169. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.tsx +0 -1
  170. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +0 -2
  171. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +0 -2
  172. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/create-nonce.ts +0 -2
  173. package/tests/functional/localLibCreateLibDeleteLib.test.js +1 -1
  174. package/tests/functional/localLibCreateLibExportImportLib.test.js +1 -1
  175. package/.eslintrc.json +0 -18
  176. package/src/tasks/init/template/.eslintignore +0 -14
  177. package/src/tasks/init/template/.eslintrc.json +0 -240
  178. package/tests/assets/original/components/create/shared/PConnProps.d.ts +0 -46
  179. package/tests/assets/original/components/create/shared/create-nonce.ts +0 -7
  180. package/tests/assets/original/components/create/shared/suggestions-handler.ts +0 -9
  181. package/tests/assets/original/components/createAll/Constellation/shared/PConnProps.d.ts +0 -46
  182. package/tests/assets/original/components/createAll/Constellation/shared/create-nonce.ts +0 -7
  183. package/tests/assets/original/components/createAll/Constellation/shared/suggestions-handler.ts +0 -9
  184. package/tests/assets/original/components/createAll/Launchpad/shared/PConnProps.d.ts +0 -46
  185. package/tests/assets/original/components/createAll/Launchpad/shared/create-nonce.ts +0 -7
  186. 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 24.2 or later
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 18, 20
15
+ - System node version >= 22.15.0
16
16
 
17
- - System npm version 8, 10 (9 is not supported)
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.4",
3
+ "version": "25.1.10-alpha-0.6",
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.4",
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": "^8.56.0",
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;
@@ -119,7 +119,7 @@ const compileMustacheTemplates = async (
119
119
  TYPE: type,
120
120
  SUB_TYPE: JSON.stringify(mustacheSubType),
121
121
  SUB_TYPE_LABEL: subTypeLabel,
122
- DESCRIPTION: description,
122
+ DESCRIPTION: description || componentLabel,
123
123
  IS_TEMPLATE: isTemplate,
124
124
  IS_PICKLIST: isPicklist,
125
125
  IS_BOOLEAN: isBool,
@@ -190,6 +190,8 @@ const validateCompile = async (
190
190
  framework = "Constellation";
191
191
  }
192
192
 
193
+
194
+
193
195
  const orgLib = getConfigDefaults();
194
196
  if (isLibraryBased) {
195
197
  // library comes from config
@@ -440,6 +442,7 @@ addDebugLog("create", "", "+");
440
442
  description,
441
443
  allowedApplications
442
444
  } = answers;
445
+
443
446
  await validateCompile(
444
447
  {
445
448
  componentName,
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable react-hooks/exhaustive-deps */
2
1
  import { useState, useEffect, useRef, type Key } from 'react';
3
2
  import { Select, Option, FieldValueList, Text, withConfiguration } from '@pega/cosmos-react-core';
4
3
 
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -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 @typescript-eslint/default-param-last, sonarjs/cognitive-complexity
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
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -78,7 +78,6 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
78
78
  const configProps = pConn.getConfigProps();
79
79
  const className = pConn.getCaseInfo().getClassName();
80
80
 
81
-
82
81
  // @ts-ignore
83
82
  let configProperty = pConn.getRawMetadata()?.config?.value || '';
84
83
  configProperty = configProperty.startsWith('@P') ? configProperty.substring(3) : configProperty;
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import React from 'react';
3
2
  import { Status } from '@pega/cosmos-react-core';
4
3
 
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable react-hooks/rules-of-hooks */
2
1
  import React from 'react';
3
2
  import { useEffect, useState } from 'react';
4
3
  import { Avatar as CosmosAvatar, withConfiguration } from '@pega/cosmos-react-core';
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import React from 'react';
3
2
  import { FieldValueList, Text } from '@pega/cosmos-react-core';
4
3
  import type { PConnProps } from './PConnProps';
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import React from 'react';
3
2
  import { Status } from '@pega/cosmos-react-core';
4
3
 
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable react-hooks/rules-of-hooks */
2
1
  import React from 'react';
3
2
  import { useEffect, useState } from 'react';
4
3
  import { Avatar as CosmosAvatar, withConfiguration } from '@pega/cosmos-react-core';
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import React from 'react';
3
2
  import { FieldValueList, Text } from '@pega/cosmos-react-core';
4
3
  import type { PConnProps } from './PConnProps';
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import React from 'react';
3
2
  import { Status } from '@pega/cosmos-react-core';
4
3
 
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
1
  import React from 'react';
3
2
  import { Button, useToaster } from '@pega/cosmos-react-core';
4
3
 
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }
@@ -1,7 +1,5 @@
1
- /* eslint-disable camelcase */
2
1
  // @ts-ignore
3
2
  if (window?.__webpack_nonce__) {
4
3
  // @ts-ignore
5
- // eslint-disable-next-line no-undef
6
4
  __webpack_nonce__ = window.__webpack_nonce__;
7
5
  }