@pega/custom-dx-components 1.0.1 → 1.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 CHANGED
@@ -21,7 +21,10 @@ Ensure you have access to the following in your system:
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@1 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": "1.0.1",
3
+ "version": "1.0.5",
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.4",
17
+ "@babel/core": "^7.17.9",
18
18
  "@babel/plugin-proposal-class-properties": "^7.16.7",
19
19
  "@babel/preset-env": "^7.16.11",
20
20
  "@babel/preset-react": "^7.16.7",
21
21
  "adm-zip": "^0.5.9",
22
- "ajv": "^8.10.0",
22
+ "ajv": "^8.11.0",
23
23
  "arg": "^5.0.1",
24
- "babel-loader": "^8.2.3",
25
- "chalk": "^5.0.0",
24
+ "babel-loader": "^8.2.5",
25
+ "chalk": "^5.0.1",
26
26
  "compression-webpack-plugin": "^9.2.0",
27
- "css-loader": "6.6.0",
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.0.0",
31
+ "fs-extra": "^10.1.0",
32
32
  "gitignore": "^0.7.0",
33
- "inquirer": "^8.2.0",
33
+ "inquirer": "^8.2.3",
34
34
  "listr": "^0.14.3",
35
- "mini-css-extract-plugin": "2.5.3",
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.0",
39
- "ora": "^6.0.1",
38
+ "node-fetch": "^3.2.3",
39
+ "ora": "^6.1.0",
40
40
  "pascalcase": "^2.0.0",
41
- "postcss": "^8.4.6",
41
+ "postcss": "^8.4.12",
42
42
  "postcss-loader": "6.2.1",
43
- "postcss-preset-env": "7.4.0",
43
+ "postcss-preset-env": "7.4.4",
44
44
  "prop-types": "^15.8.1",
45
45
  "react": "^17.0.2",
46
- "react-dev-utils": "^12.0.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.2.6",
52
- "typescript": "^4.5.5",
51
+ "ts-loader": "^9.2.9",
52
+ "typescript": "^4.6.3",
53
53
  "url-loader": "4.1.1",
54
- "webpack": "5.69.0"
54
+ "webpack": "5.72.0"
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.2",
64
- "cspell": "^5.18.5",
65
- "eslint": "^8.9.0",
66
- "prettier": "2.5.1"
63
+ "@pega/configs": "^0.3.3",
64
+ "cspell": "^5.19.7",
65
+ "eslint": "^8.14.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: ['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",
@@ -21,7 +21,10 @@ Ensure you have access to the following in your system:
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@1 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": "^2.1.5",
39
- "polished": "^4.1.4",
38
+ "@pega/cosmos-react-core": "^2.2.2",
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": "^1.0.1",
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": "^1.0.5",
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.14.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.0",
67
+ "typescript": "~4.6.3"
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' }],