@pega/custom-dx-components 1.0.2 → 1.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.
- package/.vscode/extensions.json +1 -1
- package/README.md +2 -2
- package/package.json +22 -22
- package/src/constants.js +17 -4
- package/src/tasks/create/index.js +1 -1
- package/src/tasks/create/template/config.json.mustache +0 -5
- package/src/tasks/init/template/.vscode/extensions.json +1 -1
- package/src/tasks/init/template/README.md +2 -2
- package/src/tasks/init/template/package.json.mustache +17 -17
- package/src/tasks/validator/index.js +2 -3
package/.vscode/extensions.json
CHANGED
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Initialize the project by performing the following procedure in a terminal:
|
|
|
24
24
|
|
|
25
25
|
Pega 8.7 - `npx @pega/custom-dx-components@1 init`
|
|
26
26
|
|
|
27
|
-
Pega 8.8 - `npx @pega/custom-dx-components init`
|
|
27
|
+
Pega 8.8 - `npx @pega/custom-dx-components@2 init`
|
|
28
28
|
|
|
29
29
|
2. If prompted, enter `y` to install the Custom UI Components package.
|
|
30
30
|
You will then be asked to set up the project by entering the required details.
|
|
@@ -88,7 +88,7 @@ A _src/components_ folder is created and the necessary files required to build t
|
|
|
88
88
|
|
|
89
89
|
```sh
|
|
90
90
|
├── src
|
|
91
|
-
|
|
91
|
+
├── components
|
|
92
92
|
├── <component_name>
|
|
93
93
|
├── index.js
|
|
94
94
|
├── demo.stories.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/custom-dx-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Utility for building custom UI components",
|
|
5
5
|
"bin": "./bin/index.js",
|
|
6
6
|
"repository": {},
|
|
@@ -14,44 +14,44 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@babel/core": "^7.17.
|
|
17
|
+
"@babel/core": "^7.17.10",
|
|
18
18
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
19
|
-
"@babel/preset-env": "^7.
|
|
19
|
+
"@babel/preset-env": "^7.17.10",
|
|
20
20
|
"@babel/preset-react": "^7.16.7",
|
|
21
21
|
"adm-zip": "^0.5.9",
|
|
22
|
-
"ajv": "^8.
|
|
22
|
+
"ajv": "^8.11.0",
|
|
23
23
|
"arg": "^5.0.1",
|
|
24
|
-
"babel-loader": "^8.2.
|
|
25
|
-
"chalk": "^5.0.
|
|
24
|
+
"babel-loader": "^8.2.5",
|
|
25
|
+
"chalk": "^5.0.1",
|
|
26
26
|
"compression-webpack-plugin": "^9.2.0",
|
|
27
|
-
"css-loader": "6.
|
|
27
|
+
"css-loader": "6.7.1",
|
|
28
28
|
"css-minimizer-webpack-plugin": "^3.4.1",
|
|
29
29
|
"execa": "^6.1.0",
|
|
30
30
|
"file-loader": "6.2.0",
|
|
31
|
-
"fs-extra": "^10.
|
|
31
|
+
"fs-extra": "^10.1.0",
|
|
32
32
|
"gitignore": "^0.7.0",
|
|
33
|
-
"inquirer": "^8.2.
|
|
33
|
+
"inquirer": "^8.2.4",
|
|
34
34
|
"listr": "^0.14.3",
|
|
35
|
-
"mini-css-extract-plugin": "2.
|
|
35
|
+
"mini-css-extract-plugin": "2.6.0",
|
|
36
36
|
"mustache": "^4.2.0",
|
|
37
37
|
"ncp": "^2.0.0",
|
|
38
|
-
"node-fetch": "^3.2.
|
|
39
|
-
"ora": "^6.0
|
|
38
|
+
"node-fetch": "^3.2.4",
|
|
39
|
+
"ora": "^6.1.0",
|
|
40
40
|
"pascalcase": "^2.0.0",
|
|
41
|
-
"postcss": "^8.4.
|
|
41
|
+
"postcss": "^8.4.13",
|
|
42
42
|
"postcss-loader": "6.2.1",
|
|
43
|
-
"postcss-preset-env": "7.
|
|
43
|
+
"postcss-preset-env": "7.5.0",
|
|
44
44
|
"prop-types": "^15.8.1",
|
|
45
45
|
"react": "^17.0.2",
|
|
46
|
-
"react-dev-utils": "^12.0.
|
|
46
|
+
"react-dev-utils": "^12.0.1",
|
|
47
47
|
"resolve": "1.22.0",
|
|
48
48
|
"resolve-url-loader": "^5.0.0",
|
|
49
49
|
"sass-loader": "^12.6.0",
|
|
50
50
|
"terser-webpack-plugin": "5.3.1",
|
|
51
|
-
"ts-loader": "^9.
|
|
52
|
-
"typescript": "^4.
|
|
51
|
+
"ts-loader": "^9.3.0",
|
|
52
|
+
"typescript": "^4.6.4",
|
|
53
53
|
"url-loader": "4.1.1",
|
|
54
|
-
"webpack": "5.
|
|
54
|
+
"webpack": "5.72.1"
|
|
55
55
|
},
|
|
56
56
|
"author": "Custom component dev",
|
|
57
57
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"custom-components"
|
|
61
61
|
],
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@pega/configs": "^0.3.
|
|
64
|
-
"cspell": "^5.
|
|
65
|
-
"eslint": "^8.
|
|
66
|
-
"prettier": "2.
|
|
63
|
+
"@pega/configs": "^0.3.3",
|
|
64
|
+
"cspell": "^5.20.0",
|
|
65
|
+
"eslint": "^8.15.0",
|
|
66
|
+
"prettier": "2.6.2"
|
|
67
67
|
}
|
|
68
68
|
}
|
package/src/constants.js
CHANGED
|
@@ -39,15 +39,15 @@ export const COMPONENT_SCHEMA = {
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
name: 'Email',
|
|
42
|
-
value: 'Email'
|
|
42
|
+
value: 'Text-Email'
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
name: 'Phone',
|
|
46
|
-
value: 'Phone'
|
|
46
|
+
value: 'Text-Phone'
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
name: 'URL',
|
|
50
|
-
value: 'URL'
|
|
50
|
+
value: 'Text-URL'
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
name: 'Integer',
|
|
@@ -87,6 +87,19 @@ export const COMPONENT_SCHEMA = {
|
|
|
87
87
|
}
|
|
88
88
|
],
|
|
89
89
|
template: ['DETAILS', 'FORM', 'PAGE'],
|
|
90
|
-
widget: [
|
|
90
|
+
widget: [
|
|
91
|
+
{
|
|
92
|
+
name: 'PAGE',
|
|
93
|
+
value: 'PAGE'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'CASE',
|
|
97
|
+
value: 'CASE'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'PAGE & CASE',
|
|
101
|
+
value: ['PAGE', 'CASE']
|
|
102
|
+
}
|
|
103
|
+
]
|
|
91
104
|
}
|
|
92
105
|
};
|
|
@@ -254,7 +254,7 @@ export default async options => {
|
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
name: 'subtype',
|
|
257
|
-
type: '
|
|
257
|
+
type: 'rawlist',
|
|
258
258
|
message: 'Enter subtype of component',
|
|
259
259
|
default: [componentDefaults.subtype || COMPONENT_SCHEMA.subtype.widget[0]],
|
|
260
260
|
choices: COMPONENT_SCHEMA.subtype.widget,
|
|
@@ -24,7 +24,7 @@ Initialize the project by performing the following procedure in a terminal:
|
|
|
24
24
|
|
|
25
25
|
Pega 8.7 - `npx @pega/custom-dx-components@1 init`
|
|
26
26
|
|
|
27
|
-
Pega 8.8 - `npx @pega/custom-dx-components init`
|
|
27
|
+
Pega 8.8 - `npx @pega/custom-dx-components@2 init`
|
|
28
28
|
|
|
29
29
|
2. If prompted, enter `y` to install the Custom UI Components package.
|
|
30
30
|
You will then be asked to set up the project by entering the required details.
|
|
@@ -88,7 +88,7 @@ A _src/components_ folder is created and the necessary files required to build t
|
|
|
88
88
|
|
|
89
89
|
```sh
|
|
90
90
|
├── src
|
|
91
|
-
|
|
91
|
+
├── components
|
|
92
92
|
├── <component_name>
|
|
93
93
|
├── index.js
|
|
94
94
|
├── demo.stories.js
|
|
@@ -35,35 +35,35 @@
|
|
|
35
35
|
"license": "Enter License",
|
|
36
36
|
"sideEffects": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@pega/cosmos-react-core": "^2.
|
|
39
|
-
"polished": "^4.
|
|
38
|
+
"@pega/cosmos-react-core": "^2.2.3",
|
|
39
|
+
"polished": "^4.2.2",
|
|
40
40
|
"react": "^17.0.2",
|
|
41
41
|
"react-autosuggest": "^10.1.0",
|
|
42
42
|
"react-dom": "^17.0.2",
|
|
43
43
|
"react-player": "^2.9.0",
|
|
44
|
-
"styled-components": "^5.3.
|
|
44
|
+
"styled-components": "^5.3.5",
|
|
45
45
|
"prop-types": "^15.8.1",
|
|
46
46
|
"@storybook/addon-knobs": "^6.3.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@pega/configs": "^0.3.
|
|
50
|
-
"@pega/custom-dx-components": "^1.0.
|
|
51
|
-
"@storybook/addon-actions": "^6.4.
|
|
52
|
-
"@storybook/addon-essentials": "^6.4.
|
|
53
|
-
"@storybook/addon-links": "^6.4.
|
|
54
|
-
"@storybook/addon-storysource": "^6.4.
|
|
55
|
-
"@storybook/builder-webpack5": "^6.4.
|
|
56
|
-
"@storybook/manager-webpack5": "^6.4.
|
|
57
|
-
"@storybook/react": "^6.4.
|
|
49
|
+
"@pega/configs": "^0.3.3",
|
|
50
|
+
"@pega/custom-dx-components": "^1.0.6",
|
|
51
|
+
"@storybook/addon-actions": "^6.4.22",
|
|
52
|
+
"@storybook/addon-essentials": "^6.4.22",
|
|
53
|
+
"@storybook/addon-links": "^6.4.22",
|
|
54
|
+
"@storybook/addon-storysource": "^6.4.22",
|
|
55
|
+
"@storybook/builder-webpack5": "^6.4.22",
|
|
56
|
+
"@storybook/manager-webpack5": "^6.4.22",
|
|
57
|
+
"@storybook/react": "^6.4.22",
|
|
58
58
|
"@types/emoji-mart": "^3.0.9",
|
|
59
59
|
"@types/react": "^17.0.39",
|
|
60
60
|
"@types/react-color": "^3.0.6",
|
|
61
61
|
"@types/react-dom": "^17.0.11",
|
|
62
|
-
"@types/styled-components": "^5.1.
|
|
63
|
-
"eslint": "^8.
|
|
62
|
+
"@types/styled-components": "^5.1.25",
|
|
63
|
+
"eslint": "^8.15.0",
|
|
64
64
|
"npm-run-all": "^4.1.5",
|
|
65
|
-
"prettier": "2.
|
|
66
|
-
"stylelint": "^14.
|
|
67
|
-
"typescript": "~4.
|
|
65
|
+
"prettier": "2.6.2",
|
|
66
|
+
"stylelint": "^14.8.2",
|
|
67
|
+
"typescript": "~4.6.4"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -16,8 +16,7 @@ const allowedSubtypes = [
|
|
|
16
16
|
...new Set([
|
|
17
17
|
...COMPONENT_SCHEMA.subtype.field.map(({ value }) => value),
|
|
18
18
|
...COMPONENT_SCHEMA.subtype.template,
|
|
19
|
-
...COMPONENT_SCHEMA.subtype.widget
|
|
20
|
-
combinationTypes
|
|
19
|
+
...COMPONENT_SCHEMA.subtype.widget.map(({ value }) => value)
|
|
21
20
|
])
|
|
22
21
|
];
|
|
23
22
|
|
|
@@ -32,7 +31,7 @@ const schema = {
|
|
|
32
31
|
organization: { type: 'string' },
|
|
33
32
|
version: { type: 'string' },
|
|
34
33
|
library: { type: 'string' },
|
|
35
|
-
allowedApplications
|
|
34
|
+
allowedApplications: { type: 'array' },
|
|
36
35
|
type: { type: 'string', enum: COMPONENT_SCHEMA.type.map(({ value }) => value) },
|
|
37
36
|
subtype: {
|
|
38
37
|
anyOf: [{ type: 'string' }, { type: 'array' }],
|