@pega/custom-dx-components 2.0.0 → 2.0.4

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.
@@ -4,6 +4,6 @@
4
4
  "esbenp.prettier-vscode",
5
5
  "stylelint.vscode-stylelint",
6
6
  "streetsidesoftware.code-spell-checker",
7
- "jpoissonnier.vscode-styled-components"
7
+ "styled-components.vscode-styled-components"
8
8
  ]
9
9
  }
package/README.md CHANGED
@@ -12,16 +12,19 @@ Ensure you have access to the following in your system:
12
12
 
13
13
  - Git version 2.30 and above
14
14
 
15
- - System node version 14 and above
15
+ - System node version latest 14
16
16
 
17
- - System npm version 6 and above
17
+ - System npm version latest 6
18
18
 
19
19
  ## Initialize a project
20
20
 
21
21
  Initialize the project by performing the following procedure in a terminal:
22
22
 
23
23
  1. Enter the following command to initialize the project.
24
- `npx @pega/custom-ui-components init`
24
+
25
+ Pega 8.7 - `npx @pega/custom-dx-components@1 init`
26
+
27
+ Pega 8.8 - `npx @pega/custom-dx-components@2 init`
25
28
 
26
29
  2. If prompted, enter `y` to install the Custom UI Components package.
27
30
  You will then be asked to set up the project by entering the required details.
@@ -85,7 +88,7 @@ A _src/components_ folder is created and the necessary files required to build t
85
88
 
86
89
  ```sh
87
90
  ├── src
88
-    ├── components
91
+ ├── components
89
92
  ├── <component_name>
90
93
  ├── index.js
91
94
  ├── demo.stories.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/custom-dx-components",
3
- "version": "2.0.0",
3
+ "version": "2.0.4",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -13,44 +13,44 @@
13
13
  "type": "module",
14
14
  "sideEffects": false,
15
15
  "dependencies": {
16
- "@babel/core": "^7.17.4",
16
+ "@babel/core": "^7.17.10",
17
17
  "@babel/plugin-proposal-class-properties": "^7.16.7",
18
- "@babel/preset-env": "^7.16.11",
18
+ "@babel/preset-env": "^7.17.10",
19
19
  "@babel/preset-react": "^7.16.7",
20
20
  "adm-zip": "^0.5.9",
21
- "ajv": "^8.10.0",
21
+ "ajv": "^8.11.0",
22
22
  "arg": "^5.0.1",
23
- "babel-loader": "^8.2.3",
24
- "chalk": "^5.0.0",
23
+ "babel-loader": "^8.2.5",
24
+ "chalk": "^5.0.1",
25
25
  "compression-webpack-plugin": "^9.2.0",
26
- "css-loader": "6.6.0",
26
+ "css-loader": "6.7.1",
27
27
  "css-minimizer-webpack-plugin": "^3.4.1",
28
28
  "execa": "^6.1.0",
29
29
  "file-loader": "6.2.0",
30
- "fs-extra": "^10.0.0",
30
+ "fs-extra": "^10.1.0",
31
31
  "gitignore": "^0.7.0",
32
- "inquirer": "^8.2.0",
32
+ "inquirer": "^8.2.4",
33
33
  "listr": "^0.14.3",
34
- "mini-css-extract-plugin": "2.5.3",
34
+ "mini-css-extract-plugin": "2.6.0",
35
35
  "mustache": "^4.2.0",
36
36
  "ncp": "^2.0.0",
37
- "node-fetch": "^3.2.0",
38
- "ora": "^6.0.1",
37
+ "node-fetch": "^3.2.4",
38
+ "ora": "^6.1.0",
39
39
  "pascalcase": "^2.0.0",
40
- "postcss": "^8.4.6",
40
+ "postcss": "^8.4.13",
41
41
  "postcss-loader": "6.2.1",
42
- "postcss-preset-env": "7.4.0",
42
+ "postcss-preset-env": "7.5.0",
43
43
  "prop-types": "^15.8.1",
44
44
  "react": "^17.0.2",
45
- "react-dev-utils": "^12.0.0",
45
+ "react-dev-utils": "^12.0.1",
46
46
  "resolve": "1.22.0",
47
47
  "resolve-url-loader": "^5.0.0",
48
48
  "sass-loader": "^12.6.0",
49
49
  "terser-webpack-plugin": "5.3.1",
50
- "ts-loader": "^9.2.6",
51
- "typescript": "^4.5.5",
50
+ "ts-loader": "^9.3.0",
51
+ "typescript": "^4.6.4",
52
52
  "url-loader": "4.1.1",
53
- "webpack": "5.69.0"
53
+ "webpack": "5.72.1"
54
54
  },
55
55
  "author": "Custom component dev",
56
56
  "license": "SEE LICENSE IN LICENSE",
@@ -59,9 +59,9 @@
59
59
  "custom-components"
60
60
  ],
61
61
  "devDependencies": {
62
- "@pega/configs": "^0.3.2",
63
- "cspell": "^5.18.5",
64
- "eslint": "^8.9.0",
65
- "prettier": "2.5.1"
62
+ "@pega/configs": "^0.3.3",
63
+ "cspell": "^5.20.0",
64
+ "eslint": "^8.15.0",
65
+ "prettier": "2.6.2"
66
66
  }
67
67
  }
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: ['PAGE', 'CASE']
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: 'checkbox',
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,
@@ -13,11 +13,6 @@
13
13
  "icon": "images/pz-text-input-active.svg",
14
14
  {{/IS_TEMPLATE}}
15
15
  "properties": [
16
- {
17
- "name": "value",
18
- "label": "Property",
19
- "format": "PROPERTY"
20
- },
21
16
  {
22
17
  "name": "label",
23
18
  "label": "Label value",
@@ -4,6 +4,6 @@
4
4
  "esbenp.prettier-vscode",
5
5
  "stylelint.vscode-stylelint",
6
6
  "streetsidesoftware.code-spell-checker",
7
- "jpoissonnier.vscode-styled-components"
7
+ "styled-components.vscode-styled-components"
8
8
  ]
9
9
  }
@@ -12,16 +12,19 @@ Ensure you have access to the following in your system:
12
12
 
13
13
  - Git version 2.30 and above
14
14
 
15
- - System node version 14 and above
15
+ - System node version latest 14
16
16
 
17
- - System npm version 6 and above
17
+ - System npm version latest 6
18
18
 
19
19
  ## Initialize a project
20
20
 
21
21
  Initialize the project by performing the following procedure in a terminal:
22
22
 
23
23
  1. Enter the following command to initialize the project.
24
- `npx @pega/custom-dx-components init`
24
+
25
+ Pega 8.7 - `npx @pega/custom-dx-components@1 init`
26
+
27
+ Pega 8.8 - `npx @pega/custom-dx-components@2 init`
25
28
 
26
29
  2. If prompted, enter `y` to install the Custom UI Components package.
27
30
  You will then be asked to set up the project by entering the required details.
@@ -85,7 +88,7 @@ A _src/components_ folder is created and the necessary files required to build t
85
88
 
86
89
  ```sh
87
90
  ├── src
88
-    ├── components
91
+ ├── components
89
92
  ├── <component_name>
90
93
  ├── index.js
91
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": "^3.0.0-dev.3.0",
39
- "polished": "^4.1.4",
38
+ "@pega/cosmos-react-core": "^3.0.0-dev.16.0",
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.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.2",
50
- "@pega/custom-dx-components": "^2.0.0",
51
- "@storybook/addon-actions": "^6.4.19",
52
- "@storybook/addon-essentials": "^6.4.19",
53
- "@storybook/addon-links": "^6.4.19",
54
- "@storybook/addon-storysource": "^6.4.19",
55
- "@storybook/builder-webpack5": "^6.4.19",
56
- "@storybook/manager-webpack5": "^6.4.19",
57
- "@storybook/react": "^6.4.19",
49
+ "@pega/configs": "^0.3.3",
50
+ "@pega/custom-dx-components": "^2.0.4",
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.22",
63
- "eslint": "^8.9.0",
62
+ "@types/styled-components": "^5.1.25",
63
+ "eslint": "^8.15.0",
64
64
  "npm-run-all": "^4.1.5",
65
- "prettier": "2.5.1",
66
- "stylelint": "^14.5.1",
67
- "typescript": "~4.5.5"
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 : { type: 'array' },
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' }],