@node-projects/web-component-designer 0.0.182 → 0.0.183
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.
|
@@ -50,7 +50,8 @@ export class WebcomponentManifestParserService extends AbstractPropertiesService
|
|
|
50
50
|
let pType = PropertyType.property;
|
|
51
51
|
if (declaration.attributes)
|
|
52
52
|
pType = declaration.attributes.find(x => x.fieldName == d.name) != null ? PropertyType.propertyAndAttribute : PropertyType.property;
|
|
53
|
-
|
|
53
|
+
const p = this.manifestClassPropertyTypeToEditorPropertyType(d.type?.text);
|
|
54
|
+
properties.push({ name: d.name, service: this, propertyType: pType, type: p[0], values: p[1] });
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
this._propertiesList[e.name] = properties;
|
|
@@ -66,11 +67,17 @@ export class WebcomponentManifestParserService extends AbstractPropertiesService
|
|
|
66
67
|
manifestClassPropertyTypeToEditorPropertyType(type) {
|
|
67
68
|
if (type) {
|
|
68
69
|
if (type.toLowerCase() === 'boolean')
|
|
69
|
-
return 'boolean';
|
|
70
|
+
return ['boolean'];
|
|
70
71
|
if (type.toLowerCase() === 'number')
|
|
71
|
-
return 'number';
|
|
72
|
+
return ['number'];
|
|
73
|
+
if (type.toLowerCase() === 'string')
|
|
74
|
+
return ['string'];
|
|
75
|
+
if (type.startsWith("'") && type.includes("|")) {
|
|
76
|
+
const values = type.split("|").map(x => x.trim()).map(x => x.substring(1, x.length - 1));
|
|
77
|
+
return ['list', values];
|
|
78
|
+
}
|
|
72
79
|
}
|
|
73
|
-
return type;
|
|
80
|
+
return [type];
|
|
74
81
|
}
|
|
75
82
|
async getElements() {
|
|
76
83
|
if (this._packageData)
|
package/dist/elements/services/propertiesService/services/WebcomponentManifestPropertiesService.js
CHANGED
|
@@ -33,7 +33,8 @@ export class WebcomponentManifestPropertiesService extends AbstractPropertiesSer
|
|
|
33
33
|
let pType = PropertyType.property;
|
|
34
34
|
if (declaration.attributes)
|
|
35
35
|
pType = declaration.attributes.find(x => x.fieldName == d.name) != null ? PropertyType.propertyAndAttribute : PropertyType.property;
|
|
36
|
-
|
|
36
|
+
const p = this.manifestClassPropertyTypeToEditorPropertyType(d.type?.text);
|
|
37
|
+
properties.push({ name: d.name, service: this, propertyType: pType, type: p[0], values: p[1] });
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
this._propertiesList[e.name] = properties;
|
|
@@ -49,11 +50,17 @@ export class WebcomponentManifestPropertiesService extends AbstractPropertiesSer
|
|
|
49
50
|
manifestClassPropertyTypeToEditorPropertyType(type) {
|
|
50
51
|
if (type) {
|
|
51
52
|
if (type.toLowerCase() === 'boolean')
|
|
52
|
-
return 'boolean';
|
|
53
|
+
return ['boolean'];
|
|
53
54
|
if (type.toLowerCase() === 'number')
|
|
54
|
-
return 'number';
|
|
55
|
+
return ['number'];
|
|
56
|
+
if (type.toLowerCase() === 'string')
|
|
57
|
+
return ['string'];
|
|
58
|
+
if (type.startsWith("'") && type.includes("|")) {
|
|
59
|
+
const values = type.split("|").map(x => x.trim()).map(x => x.substring(1, x.length - 1));
|
|
60
|
+
return ['list', values];
|
|
61
|
+
}
|
|
55
62
|
}
|
|
56
|
-
return type;
|
|
63
|
+
return [type];
|
|
57
64
|
}
|
|
58
65
|
isHandledElement(designItem) {
|
|
59
66
|
return this._propertiesList[designItem.name] != null;
|