@kontur.candy/generator 4.261.0-readonly-candy.0 → 4.262.0-readonly-candy.2
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/dist/index.js +18 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -122221,17 +122221,31 @@ class EvaluateTemplateVisitor {
|
|
|
122221
122221
|
|
|
122222
122222
|
visitXmlNode(node) {
|
|
122223
122223
|
for (const attributeName of Object.keys(node.attributes)) {
|
|
122224
|
-
const
|
|
122224
|
+
const attribute = node.attributes[attributeName];
|
|
122225
|
+
const stringParameters = this.parameterValues.filter(x => x.parameterInfo.type === _SugarTemplateInfo__WEBPACK_IMPORTED_MODULE_5__.SugarTemplateParameterType.String);
|
|
122225
122226
|
|
|
122226
|
-
if (typeof
|
|
122227
|
-
|
|
122228
|
-
let updatedValue = value;
|
|
122227
|
+
if (typeof attribute === "string") {
|
|
122228
|
+
let updatedValue = attribute;
|
|
122229
122229
|
|
|
122230
122230
|
for (const parameter of stringParameters) {
|
|
122231
122231
|
updatedValue = this.applyStringParameter(parameter, updatedValue);
|
|
122232
122232
|
}
|
|
122233
122233
|
|
|
122234
122234
|
node.attributes[attributeName] = updatedValue;
|
|
122235
|
+
} else if (typeof attribute === "object") {
|
|
122236
|
+
Object.keys(attribute).forEach(key => {
|
|
122237
|
+
const value = attribute[key];
|
|
122238
|
+
|
|
122239
|
+
if (typeof value === "string") {
|
|
122240
|
+
let updatedValue = value;
|
|
122241
|
+
|
|
122242
|
+
for (const parameter of stringParameters) {
|
|
122243
|
+
updatedValue = this.applyStringParameter(parameter, updatedValue);
|
|
122244
|
+
}
|
|
122245
|
+
|
|
122246
|
+
attribute[key] = updatedValue;
|
|
122247
|
+
}
|
|
122248
|
+
});
|
|
122235
122249
|
}
|
|
122236
122250
|
}
|
|
122237
122251
|
|