@pega/dx-component-builder-sdk 0.1.28 → 0.1.29
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
|
@@ -179,12 +179,13 @@ export const validateCompileAll = async (
|
|
|
179
179
|
const type = "Template";
|
|
180
180
|
const subtype = COMPONENT_SCHEMA.subtype.template[templateIdx].value;
|
|
181
181
|
const prefixNoSpace = prefix.replace(/\s+/g, '');
|
|
182
|
+
let templateNameOriginal = COMPONENT_SCHEMA.subtype.template[templateIdx].name;
|
|
182
183
|
let templateName = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.template[templateIdx].name);
|
|
183
184
|
let templateLabel = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.template[templateIdx].name);
|
|
184
|
-
if (
|
|
185
|
-
|
|
186
|
-
templateName = "TwoColumn".concat(
|
|
187
|
-
templateLabel = "Two Column".concat(
|
|
185
|
+
if (templateNameOriginal.indexOf("region") >= 0) {
|
|
186
|
+
let templateNameBase = convertIntoPascalCase(templateNameOriginal.replace(" region", ""));
|
|
187
|
+
templateName = "TwoColumn".concat(templateNameBase);
|
|
188
|
+
templateLabel = "Two Column ".concat(templateNameBase);
|
|
188
189
|
}
|
|
189
190
|
const componentName = "".concat(prefixNoSpace).concat(templateName);
|
|
190
191
|
const componentLabel = "".concat(prefix).concat(" ").concat(templateLabel);
|
|
@@ -211,10 +212,11 @@ export const validateCompileAll = async (
|
|
|
211
212
|
const type = "Widget";
|
|
212
213
|
const subtype = COMPONENT_SCHEMA.subtype.widget[widgetIdx].value;
|
|
213
214
|
const prefixNoSpace = prefix.replace(/\s+/g, '');
|
|
215
|
+
let widgetNameOriginal = COMPONENT_SCHEMA.subtype.template[widgetIdx].name;
|
|
214
216
|
let widgetName = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.widget[widgetIdx].name).concat("Widget");
|
|
215
217
|
let widgetLabel = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.widget[widgetIdx].name).concat(" Widget");
|
|
216
|
-
if (
|
|
217
|
-
widgetName =
|
|
218
|
+
if (widgetNameOriginal.indexOf("&") >= 0) {
|
|
219
|
+
widgetName = convertIntoPascalCase(widgetNameOriginal.replace(" & ", ""));
|
|
218
220
|
}
|
|
219
221
|
const componentName = "".concat(prefixNoSpace).concat(widgetName);
|
|
220
222
|
const componentLabel = "".concat(prefix).concat(" ").concat(widgetLabel);
|
|
@@ -23,7 +23,7 @@ const combinationTypes = ['PAGE', 'CASE'];
|
|
|
23
23
|
const allowedSubtypes = [
|
|
24
24
|
...new Set([
|
|
25
25
|
...COMPONENT_SCHEMA.subtype.field.map(({ value }) => value),
|
|
26
|
-
...COMPONENT_SCHEMA.subtype.template,
|
|
26
|
+
...COMPONENT_SCHEMA.subtype.template.map(({ value }) => value),
|
|
27
27
|
...COMPONENT_SCHEMA.subtype.widget.map(({ value }) => value)
|
|
28
28
|
])
|
|
29
29
|
];
|
|
@@ -32,7 +32,7 @@ const allowedSubtypes = [
|
|
|
32
32
|
const allowedOverrideSubtypes = [
|
|
33
33
|
...new Set([
|
|
34
34
|
...COMPONENT_SCHEMA.subtype.field.map(({ value }) => value),
|
|
35
|
-
...COMPONENT_SCHEMA.subtype.template,
|
|
35
|
+
...COMPONENT_SCHEMA.subtype.template.map(({ value }) => value),
|
|
36
36
|
...COMPONENT_SCHEMA.subtype.widget.map(({ value }) => value)
|
|
37
37
|
]), "ACTION", "DATA_CAPTURE", "SUMMARY", "CASEVIEW", "DATAVIEW", "LIST"
|
|
38
38
|
];
|