@digipair/engine 0.84.7 → 0.85.0
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/index.cjs.js +6 -7
- package/index.esm.js +11 -12
- package/package.json +1 -1
package/index.cjs.js
CHANGED
@@ -8174,13 +8174,7 @@ const applyTemplate = (value, context)=>{
|
|
8174
8174
|
if (typeof value === 'string') {
|
8175
8175
|
if (result.startsWith('NOEVAL:')) {
|
8176
8176
|
result = value.substring(7);
|
8177
|
-
} else {
|
8178
|
-
const template = handlebars_min.exports.compile(value, {
|
8179
|
-
noEscape: true
|
8180
|
-
});
|
8181
|
-
result = template(context);
|
8182
|
-
}
|
8183
|
-
if (result.startsWith('EVALUATE:')) {
|
8177
|
+
} else if (result.startsWith('EVALUATE:')) {
|
8184
8178
|
const path = result.replace(/^EVALUATE:/, '');
|
8185
8179
|
result = feelin.evaluate(path, _extends({}, context, {
|
8186
8180
|
getTime: (time)=>new Date(time).getTime(),
|
@@ -8191,6 +8185,11 @@ const applyTemplate = (value, context)=>{
|
|
8191
8185
|
decodeURIComponent: (value)=>decodeURIComponent(value),
|
8192
8186
|
JSONparse: (value)=>JSON.parse(value)
|
8193
8187
|
}));
|
8188
|
+
} else {
|
8189
|
+
const template = handlebars_min.exports.compile(value, {
|
8190
|
+
noEscape: true
|
8191
|
+
});
|
8192
|
+
result = template(context);
|
8194
8193
|
}
|
8195
8194
|
} else if (typeof value === 'object' && Array.isArray(value)) {
|
8196
8195
|
result = value.map((item)=>isPinsSettings(item) ? item : applyTemplate(item, context));
|
package/index.esm.js
CHANGED
@@ -23899,14 +23899,14 @@ function indent(str, spaces) {
|
|
23899
23899
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23900
23900
|
// match is required
|
23901
23901
|
if (!match) {
|
23902
|
-
return
|
23902
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
23903
23903
|
v: nextMatch1
|
23904
23904
|
};
|
23905
23905
|
}
|
23906
23906
|
var token = match.token, offset = match.offset;
|
23907
23907
|
i1 += offset;
|
23908
23908
|
if (token === " ") {
|
23909
|
-
return
|
23909
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
23910
23910
|
}
|
23911
23911
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
23912
23912
|
token
|
@@ -23925,7 +23925,7 @@ function indent(str, spaces) {
|
|
23925
23925
|
if (contextKeys.some(function(el) {
|
23926
23926
|
return el.startsWith(name);
|
23927
23927
|
})) {
|
23928
|
-
return
|
23928
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
23929
23929
|
}
|
23930
23930
|
if (dateTimeIdentifiers.some(function(el) {
|
23931
23931
|
return el === name;
|
@@ -23944,9 +23944,9 @@ function indent(str, spaces) {
|
|
23944
23944
|
if (dateTimeIdentifiers.some(function(el) {
|
23945
23945
|
return el.startsWith(name);
|
23946
23946
|
})) {
|
23947
|
-
return
|
23947
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
23948
23948
|
}
|
23949
|
-
return
|
23949
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
23950
23950
|
v: nextMatch1
|
23951
23951
|
};
|
23952
23952
|
};
|
@@ -27853,13 +27853,7 @@ const applyTemplate = (value, context)=>{
|
|
27853
27853
|
if (typeof value === 'string') {
|
27854
27854
|
if (result.startsWith('NOEVAL:')) {
|
27855
27855
|
result = value.substring(7);
|
27856
|
-
} else {
|
27857
|
-
const template = handlebars_min.exports.compile(value, {
|
27858
|
-
noEscape: true
|
27859
|
-
});
|
27860
|
-
result = template(context);
|
27861
|
-
}
|
27862
|
-
if (result.startsWith('EVALUATE:')) {
|
27856
|
+
} else if (result.startsWith('EVALUATE:')) {
|
27863
27857
|
const path = result.replace(/^EVALUATE:/, '');
|
27864
27858
|
result = evaluate(path, _extends({}, context, {
|
27865
27859
|
getTime: (time)=>new Date(time).getTime(),
|
@@ -27870,6 +27864,11 @@ const applyTemplate = (value, context)=>{
|
|
27870
27864
|
decodeURIComponent: (value)=>decodeURIComponent(value),
|
27871
27865
|
JSONparse: (value)=>JSON.parse(value)
|
27872
27866
|
}));
|
27867
|
+
} else {
|
27868
|
+
const template = handlebars_min.exports.compile(value, {
|
27869
|
+
noEscape: true
|
27870
|
+
});
|
27871
|
+
result = template(context);
|
27873
27872
|
}
|
27874
27873
|
} else if (typeof value === 'object' && Array.isArray(value)) {
|
27875
27874
|
result = value.map((item)=>isPinsSettings(item) ? item : applyTemplate(item, context));
|