@digipair/skill-web 0.11.3 → 0.11.5
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 +7 -4
- package/index.esm.js +12 -9
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -27348,6 +27348,9 @@ const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR
|
|
|
27348
27348
|
LIBRARIES: {},
|
|
27349
27349
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27350
27350
|
};
|
|
27351
|
+
const isPinsSettings = (value)=>{
|
|
27352
|
+
return typeof value === 'object' && value !== null && typeof value.element === 'string' && typeof value.library === 'string';
|
|
27353
|
+
};
|
|
27351
27354
|
const applyTemplate = (value, context)=>{
|
|
27352
27355
|
let result = value;
|
|
27353
27356
|
if (typeof value === 'string') {
|
|
@@ -27360,7 +27363,7 @@ const applyTemplate = (value, context)=>{
|
|
|
27360
27363
|
result = evaluate(path, context);
|
|
27361
27364
|
}
|
|
27362
27365
|
} else if (typeof value === 'object' && Array.isArray(value)) {
|
|
27363
|
-
result = value;
|
|
27366
|
+
result = value.map((item)=>isPinsSettings(item) ? item : applyTemplate(item, context));
|
|
27364
27367
|
} else if (typeof value === 'object') {
|
|
27365
27368
|
result = {};
|
|
27366
27369
|
Object.entries(value || {}).forEach(([key, attributeValue])=>{
|
|
@@ -27513,8 +27516,8 @@ let WebService = class WebService {
|
|
|
27513
27516
|
}
|
|
27514
27517
|
async page(params, _pinsSettingsList, context) {
|
|
27515
27518
|
var _context_request_body;
|
|
27516
|
-
const { body, title = 'Digipair', favicon = 'https://res.cloudinary.com/do87nxq3l/image/upload/fl_preserve_transparency/v1717769492/logo-digipair_oyvvxz.png?_s=public-apps', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm',
|
|
27517
|
-
const engineVersion =
|
|
27519
|
+
const { body, title = 'Digipair', favicon = 'https://res.cloudinary.com/do87nxq3l/image/upload/fl_preserve_transparency/v1717769492/logo-digipair_oyvvxz.png?_s=public-apps', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', factoryInitialize = [], browserInitialize = [], browserLoad = [] } = params;
|
|
27520
|
+
const engineVersion = context.config.VERSIONS['@digipair/engine'] || 'latest';
|
|
27518
27521
|
const preparedData = {};
|
|
27519
27522
|
if (context.request.method === 'POST' && ((_context_request_body = context.request.body) == null ? void 0 : _context_request_body.type) === 'DIGIPAIR_EXECUTE_FACTORY') {
|
|
27520
27523
|
const param = context.request.body.params.path.split('[')[0];
|
|
@@ -27549,7 +27552,7 @@ let WebService = class WebService {
|
|
|
27549
27552
|
},
|
|
27550
27553
|
};
|
|
27551
27554
|
|
|
27552
|
-
config.set('LIBRARIES', { '@digipair/skill-web': skillWeb
|
|
27555
|
+
config.set('LIBRARIES', { '@digipair/skill-web': skillWeb });
|
|
27553
27556
|
config.set('BASE_URL', '${baseUrl}');
|
|
27554
27557
|
|
|
27555
27558
|
const context = {
|
package/index.esm.js
CHANGED
|
@@ -23488,14 +23488,14 @@ function indent(str, spaces) {
|
|
|
23488
23488
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23489
23489
|
// match is required
|
|
23490
23490
|
if (!match) {
|
|
23491
|
-
return
|
|
23491
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23492
23492
|
v: nextMatch1
|
|
23493
23493
|
};
|
|
23494
23494
|
}
|
|
23495
23495
|
var token = match.token, offset = match.offset;
|
|
23496
23496
|
i1 += offset;
|
|
23497
23497
|
if (token === " ") {
|
|
23498
|
-
return
|
|
23498
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23499
23499
|
}
|
|
23500
23500
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23501
23501
|
token
|
|
@@ -23514,7 +23514,7 @@ function indent(str, spaces) {
|
|
|
23514
23514
|
if (contextKeys.some(function(el) {
|
|
23515
23515
|
return el.startsWith(name);
|
|
23516
23516
|
})) {
|
|
23517
|
-
return
|
|
23517
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23518
23518
|
}
|
|
23519
23519
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23520
23520
|
return el === name;
|
|
@@ -23533,9 +23533,9 @@ function indent(str, spaces) {
|
|
|
23533
23533
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23534
23534
|
return el.startsWith(name);
|
|
23535
23535
|
})) {
|
|
23536
|
-
return
|
|
23536
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23537
23537
|
}
|
|
23538
|
-
return
|
|
23538
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23539
23539
|
v: nextMatch1
|
|
23540
23540
|
};
|
|
23541
23541
|
};
|
|
@@ -27326,6 +27326,9 @@ const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR
|
|
|
27326
27326
|
LIBRARIES: {},
|
|
27327
27327
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27328
27328
|
};
|
|
27329
|
+
const isPinsSettings = (value)=>{
|
|
27330
|
+
return typeof value === 'object' && value !== null && typeof value.element === 'string' && typeof value.library === 'string';
|
|
27331
|
+
};
|
|
27329
27332
|
const applyTemplate = (value, context)=>{
|
|
27330
27333
|
let result = value;
|
|
27331
27334
|
if (typeof value === 'string') {
|
|
@@ -27338,7 +27341,7 @@ const applyTemplate = (value, context)=>{
|
|
|
27338
27341
|
result = evaluate(path, context);
|
|
27339
27342
|
}
|
|
27340
27343
|
} else if (typeof value === 'object' && Array.isArray(value)) {
|
|
27341
|
-
result = value;
|
|
27344
|
+
result = value.map((item)=>isPinsSettings(item) ? item : applyTemplate(item, context));
|
|
27342
27345
|
} else if (typeof value === 'object') {
|
|
27343
27346
|
result = {};
|
|
27344
27347
|
Object.entries(value || {}).forEach(([key, attributeValue])=>{
|
|
@@ -27491,8 +27494,8 @@ let WebService = class WebService {
|
|
|
27491
27494
|
}
|
|
27492
27495
|
async page(params, _pinsSettingsList, context) {
|
|
27493
27496
|
var _context_request_body;
|
|
27494
|
-
const { body, title = 'Digipair', favicon = 'https://res.cloudinary.com/do87nxq3l/image/upload/fl_preserve_transparency/v1717769492/logo-digipair_oyvvxz.png?_s=public-apps', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm',
|
|
27495
|
-
const engineVersion =
|
|
27497
|
+
const { body, title = 'Digipair', favicon = 'https://res.cloudinary.com/do87nxq3l/image/upload/fl_preserve_transparency/v1717769492/logo-digipair_oyvvxz.png?_s=public-apps', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', factoryInitialize = [], browserInitialize = [], browserLoad = [] } = params;
|
|
27498
|
+
const engineVersion = context.config.VERSIONS['@digipair/engine'] || 'latest';
|
|
27496
27499
|
const preparedData = {};
|
|
27497
27500
|
if (context.request.method === 'POST' && ((_context_request_body = context.request.body) == null ? void 0 : _context_request_body.type) === 'DIGIPAIR_EXECUTE_FACTORY') {
|
|
27498
27501
|
const param = context.request.body.params.path.split('[')[0];
|
|
@@ -27527,7 +27530,7 @@ let WebService = class WebService {
|
|
|
27527
27530
|
},
|
|
27528
27531
|
};
|
|
27529
27532
|
|
|
27530
|
-
config.set('LIBRARIES', { '@digipair/skill-web': skillWeb
|
|
27533
|
+
config.set('LIBRARIES', { '@digipair/skill-web': skillWeb });
|
|
27531
27534
|
config.set('BASE_URL', '${baseUrl}');
|
|
27532
27535
|
|
|
27533
27536
|
const context = {
|