@digipair/skill-web-chatbot 0.4.13 → 0.4.15
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.cjs2.js +13 -11
- package/index.esm2.js +13 -11
- package/package.json +1 -1
package/index.cjs2.js
CHANGED
|
@@ -51882,14 +51882,14 @@ function indent(str, spaces) {
|
|
|
51882
51882
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
51883
51883
|
// match is required
|
|
51884
51884
|
if (!match) {
|
|
51885
|
-
return
|
|
51885
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
51886
51886
|
v: nextMatch1
|
|
51887
51887
|
};
|
|
51888
51888
|
}
|
|
51889
51889
|
var token = match.token, offset = match.offset;
|
|
51890
51890
|
i1 += offset;
|
|
51891
51891
|
if (token === " ") {
|
|
51892
|
-
return
|
|
51892
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
51893
51893
|
}
|
|
51894
51894
|
tokens1 = _to_consumable_array$9(tokens1).concat([
|
|
51895
51895
|
token
|
|
@@ -51908,7 +51908,7 @@ function indent(str, spaces) {
|
|
|
51908
51908
|
if (contextKeys.some(function(el) {
|
|
51909
51909
|
return el.startsWith(name);
|
|
51910
51910
|
})) {
|
|
51911
|
-
return
|
|
51911
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
51912
51912
|
}
|
|
51913
51913
|
if (dateTimeIdentifiers.some(function(el) {
|
|
51914
51914
|
return el === name;
|
|
@@ -51927,9 +51927,9 @@ function indent(str, spaces) {
|
|
|
51927
51927
|
if (dateTimeIdentifiers.some(function(el) {
|
|
51928
51928
|
return el.startsWith(name);
|
|
51929
51929
|
})) {
|
|
51930
|
-
return
|
|
51930
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
51931
51931
|
}
|
|
51932
|
-
return
|
|
51932
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
51933
51933
|
v: nextMatch1
|
|
51934
51934
|
};
|
|
51935
51935
|
};
|
|
@@ -55750,8 +55750,8 @@ const executePins = async (settingsOrigin, context = {}, options = {
|
|
|
55750
55750
|
var _settings_conditions;
|
|
55751
55751
|
const settings = await preparePinsSettings(settingsOrigin, context);
|
|
55752
55752
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
|
55753
|
-
return Promise.all(settings.conditions.each.filter((item)=>typeof item.conditions.if === 'undefined' || item.conditions.if).map((item)=>executePins(_extends({},
|
|
55754
|
-
conditions: _extends({},
|
|
55753
|
+
return Promise.all(settings.conditions.each.filter((item)=>typeof item.conditions.if === 'undefined' || item.conditions.if).map((item)=>executePins(_extends({}, settingsOrigin, {
|
|
55754
|
+
conditions: _extends({}, settingsOrigin.conditions, {
|
|
55755
55755
|
each: undefined
|
|
55756
55756
|
})
|
|
55757
55757
|
}), _extends({}, context, {
|
|
@@ -55806,8 +55806,8 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
|
|
|
55806
55806
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
|
55807
55807
|
for(let i = 0; i < settings.conditions.each.length; i++){
|
|
55808
55808
|
const item = settings.conditions.each[i];
|
|
55809
|
-
await generateElementFromPins(_extends({},
|
|
55810
|
-
conditions: _extends({},
|
|
55809
|
+
await generateElementFromPins(_extends({}, pinsSettings, {
|
|
55810
|
+
conditions: _extends({}, pinsSettings.conditions, {
|
|
55811
55811
|
each: undefined
|
|
55812
55812
|
})
|
|
55813
55813
|
}), parent, _extends({}, context, {
|
|
@@ -55864,15 +55864,17 @@ const preparePinsSettings = async (settings, context)=>{
|
|
|
55864
55864
|
for (const [key, value] of Object.entries(settings.variables || {})){
|
|
55865
55865
|
localContext.variables[key] = applyTemplate(value, localContext);
|
|
55866
55866
|
}
|
|
55867
|
+
const conditions = {};
|
|
55867
55868
|
for (const [key, value] of Object.entries(settings.conditions || {})){
|
|
55868
|
-
|
|
55869
|
+
conditions[key] = await applyTemplate(value, localContext);
|
|
55869
55870
|
}
|
|
55870
55871
|
const properties = {};
|
|
55871
55872
|
for (const [key, value] of Object.entries(settings.properties || {})){
|
|
55872
55873
|
properties[key] = applyTemplate(value, localContext);
|
|
55873
55874
|
}
|
|
55874
55875
|
return _extends({}, settings, {
|
|
55875
|
-
properties
|
|
55876
|
+
properties,
|
|
55877
|
+
conditions
|
|
55876
55878
|
});
|
|
55877
55879
|
};
|
|
55878
55880
|
|
package/index.esm2.js
CHANGED
|
@@ -51862,14 +51862,14 @@ function indent(str, spaces) {
|
|
|
51862
51862
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
51863
51863
|
// match is required
|
|
51864
51864
|
if (!match) {
|
|
51865
|
-
return i = i1,
|
|
51865
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
51866
51866
|
v: nextMatch1
|
|
51867
51867
|
};
|
|
51868
51868
|
}
|
|
51869
51869
|
var token = match.token, offset = match.offset;
|
|
51870
51870
|
i1 += offset;
|
|
51871
51871
|
if (token === " ") {
|
|
51872
|
-
return i = i1,
|
|
51872
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
51873
51873
|
}
|
|
51874
51874
|
tokens1 = _to_consumable_array$9(tokens1).concat([
|
|
51875
51875
|
token
|
|
@@ -51888,7 +51888,7 @@ function indent(str, spaces) {
|
|
|
51888
51888
|
if (contextKeys.some(function(el) {
|
|
51889
51889
|
return el.startsWith(name);
|
|
51890
51890
|
})) {
|
|
51891
|
-
return i = i1,
|
|
51891
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
51892
51892
|
}
|
|
51893
51893
|
if (dateTimeIdentifiers.some(function(el) {
|
|
51894
51894
|
return el === name;
|
|
@@ -51907,9 +51907,9 @@ function indent(str, spaces) {
|
|
|
51907
51907
|
if (dateTimeIdentifiers.some(function(el) {
|
|
51908
51908
|
return el.startsWith(name);
|
|
51909
51909
|
})) {
|
|
51910
|
-
return i = i1,
|
|
51910
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
51911
51911
|
}
|
|
51912
|
-
return i = i1,
|
|
51912
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
51913
51913
|
v: nextMatch1
|
|
51914
51914
|
};
|
|
51915
51915
|
};
|
|
@@ -55730,8 +55730,8 @@ const executePins = async (settingsOrigin, context = {}, options = {
|
|
|
55730
55730
|
var _settings_conditions;
|
|
55731
55731
|
const settings = await preparePinsSettings(settingsOrigin, context);
|
|
55732
55732
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
|
55733
|
-
return Promise.all(settings.conditions.each.filter((item)=>typeof item.conditions.if === 'undefined' || item.conditions.if).map((item)=>executePins(_extends({},
|
|
55734
|
-
conditions: _extends({},
|
|
55733
|
+
return Promise.all(settings.conditions.each.filter((item)=>typeof item.conditions.if === 'undefined' || item.conditions.if).map((item)=>executePins(_extends({}, settingsOrigin, {
|
|
55734
|
+
conditions: _extends({}, settingsOrigin.conditions, {
|
|
55735
55735
|
each: undefined
|
|
55736
55736
|
})
|
|
55737
55737
|
}), _extends({}, context, {
|
|
@@ -55786,8 +55786,8 @@ const generateElementFromPins = async (pinsSettings, parent, context, options =
|
|
|
55786
55786
|
if ((_settings_conditions = settings.conditions) == null ? void 0 : _settings_conditions.each) {
|
|
55787
55787
|
for(let i = 0; i < settings.conditions.each.length; i++){
|
|
55788
55788
|
const item = settings.conditions.each[i];
|
|
55789
|
-
await generateElementFromPins(_extends({},
|
|
55790
|
-
conditions: _extends({},
|
|
55789
|
+
await generateElementFromPins(_extends({}, pinsSettings, {
|
|
55790
|
+
conditions: _extends({}, pinsSettings.conditions, {
|
|
55791
55791
|
each: undefined
|
|
55792
55792
|
})
|
|
55793
55793
|
}), parent, _extends({}, context, {
|
|
@@ -55844,15 +55844,17 @@ const preparePinsSettings = async (settings, context)=>{
|
|
|
55844
55844
|
for (const [key, value] of Object.entries(settings.variables || {})){
|
|
55845
55845
|
localContext.variables[key] = applyTemplate(value, localContext);
|
|
55846
55846
|
}
|
|
55847
|
+
const conditions = {};
|
|
55847
55848
|
for (const [key, value] of Object.entries(settings.conditions || {})){
|
|
55848
|
-
|
|
55849
|
+
conditions[key] = await applyTemplate(value, localContext);
|
|
55849
55850
|
}
|
|
55850
55851
|
const properties = {};
|
|
55851
55852
|
for (const [key, value] of Object.entries(settings.properties || {})){
|
|
55852
55853
|
properties[key] = applyTemplate(value, localContext);
|
|
55853
55854
|
}
|
|
55854
55855
|
return _extends({}, settings, {
|
|
55855
|
-
properties
|
|
55856
|
+
properties,
|
|
55857
|
+
conditions
|
|
55856
55858
|
});
|
|
55857
55859
|
};
|
|
55858
55860
|
|