@pega/custom-dx-components 2.0.19 → 2.0.20
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/package.json
CHANGED
|
@@ -175,15 +175,15 @@ const validateCompile = async (
|
|
|
175
175
|
export default async options => {
|
|
176
176
|
showVersion();
|
|
177
177
|
|
|
178
|
-
if (options.params[
|
|
179
|
-
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
const description = options.params[
|
|
178
|
+
if (options.params[9]) {
|
|
179
|
+
|
|
180
|
+
const type = options.params[3];
|
|
181
|
+
const subtype = options.params[4];
|
|
182
|
+
const componentName = options.params[5];
|
|
183
|
+
const componentLabel = options.params[6];
|
|
184
|
+
const library = options.params[7];
|
|
185
|
+
const version = options.params[9];
|
|
186
|
+
const description = options.params[9];
|
|
187
187
|
|
|
188
188
|
await validateCompile(
|
|
189
189
|
{
|
|
@@ -201,6 +201,50 @@ export default async options => {
|
|
|
201
201
|
} else {
|
|
202
202
|
const componentDefaults = await getComponentDefaults();
|
|
203
203
|
const questions = [
|
|
204
|
+
{
|
|
205
|
+
name: 'type',
|
|
206
|
+
type: 'rawlist',
|
|
207
|
+
message: 'Enter type of component',
|
|
208
|
+
default: componentDefaults.type,
|
|
209
|
+
choices: COMPONENT_SCHEMA.type
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: 'subtype',
|
|
213
|
+
type: 'rawlist',
|
|
214
|
+
message: 'Enter subtype of component',
|
|
215
|
+
default: componentDefaults.subtype,
|
|
216
|
+
choices: COMPONENT_SCHEMA.subtype.field,
|
|
217
|
+
when(answers) {
|
|
218
|
+
return answers.type === 'Field';
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'subtype',
|
|
223
|
+
type: 'rawlist',
|
|
224
|
+
message: 'Enter subtype of component',
|
|
225
|
+
default: componentDefaults.subtype,
|
|
226
|
+
choices: COMPONENT_SCHEMA.subtype.template,
|
|
227
|
+
when(answers) {
|
|
228
|
+
return answers.type === 'Template';
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: 'subtype',
|
|
233
|
+
type: 'rawlist',
|
|
234
|
+
message: 'Enter subtype of component',
|
|
235
|
+
default: [componentDefaults.subtype || COMPONENT_SCHEMA.subtype.widget[0]],
|
|
236
|
+
choices: COMPONENT_SCHEMA.subtype.widget,
|
|
237
|
+
when(answers) {
|
|
238
|
+
return answers.type === 'Widget';
|
|
239
|
+
},
|
|
240
|
+
validate: value => {
|
|
241
|
+
/* value should not be empty */
|
|
242
|
+
if (Array.isArray(value) && value.length) {
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
return 'Please select subtype';
|
|
246
|
+
}
|
|
247
|
+
},
|
|
204
248
|
{
|
|
205
249
|
name: 'componentName',
|
|
206
250
|
message: 'Enter component name (required)',
|
|
@@ -258,57 +302,6 @@ export default async options => {
|
|
|
258
302
|
message: 'Please enter the application names to be supported (comma-separated). ',
|
|
259
303
|
suffix: 'Keep empty for all applications'
|
|
260
304
|
},
|
|
261
|
-
// {
|
|
262
|
-
// name: 'framework',
|
|
263
|
-
// type: 'rawlist',
|
|
264
|
-
// message: 'Enter framework a',
|
|
265
|
-
// default: 'COSMOS_React',
|
|
266
|
-
// choices: COMPONENT_SCHEMA.framework
|
|
267
|
-
// },
|
|
268
|
-
{
|
|
269
|
-
name: 'type',
|
|
270
|
-
type: 'rawlist',
|
|
271
|
-
message: 'Enter type of component',
|
|
272
|
-
default: componentDefaults.type,
|
|
273
|
-
choices: COMPONENT_SCHEMA.type
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
name: 'subtype',
|
|
277
|
-
type: 'rawlist',
|
|
278
|
-
message: 'Enter subtype of component',
|
|
279
|
-
default: componentDefaults.subtype,
|
|
280
|
-
choices: COMPONENT_SCHEMA.subtype.field,
|
|
281
|
-
when(answers) {
|
|
282
|
-
return answers.type === 'Field';
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
name: 'subtype',
|
|
287
|
-
type: 'rawlist',
|
|
288
|
-
message: 'Enter subtype of component',
|
|
289
|
-
default: componentDefaults.subtype,
|
|
290
|
-
choices: COMPONENT_SCHEMA.subtype.template,
|
|
291
|
-
when(answers) {
|
|
292
|
-
return answers.type === 'Template';
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
name: 'subtype',
|
|
297
|
-
type: 'rawlist',
|
|
298
|
-
message: 'Enter subtype of component',
|
|
299
|
-
default: [componentDefaults.subtype || COMPONENT_SCHEMA.subtype.widget[0]],
|
|
300
|
-
choices: COMPONENT_SCHEMA.subtype.widget,
|
|
301
|
-
when(answers) {
|
|
302
|
-
return answers.type === 'Widget';
|
|
303
|
-
},
|
|
304
|
-
validate: value => {
|
|
305
|
-
/* value should not be empty */
|
|
306
|
-
if (Array.isArray(value) && value.length) {
|
|
307
|
-
return true;
|
|
308
|
-
}
|
|
309
|
-
return 'Please select subtype';
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
305
|
{
|
|
313
306
|
name: 'description',
|
|
314
307
|
message: 'Enter description for the component',
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@pega/configs": "^0.3.4",
|
|
57
|
-
"@pega/custom-dx-components": "^2.0.
|
|
57
|
+
"@pega/custom-dx-components": "^2.0.20",
|
|
58
58
|
"@pega/eslint-config": "^0.3.2",
|
|
59
59
|
"@storybook/addon-actions": "^6.5.12",
|
|
60
60
|
"@storybook/addon-essentials": "^6.5.12",
|