@digipair/skill-web 0.8.3 → 0.8.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 +15 -10
- package/index.esm.js +15 -10
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -23510,14 +23510,14 @@ function indent(str, spaces) {
|
|
|
23510
23510
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23511
23511
|
// match is required
|
|
23512
23512
|
if (!match) {
|
|
23513
|
-
return
|
|
23513
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
23514
23514
|
v: nextMatch1
|
|
23515
23515
|
};
|
|
23516
23516
|
}
|
|
23517
23517
|
var token = match.token, offset = match.offset;
|
|
23518
23518
|
i1 += offset;
|
|
23519
23519
|
if (token === " ") {
|
|
23520
|
-
return
|
|
23520
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
23521
23521
|
}
|
|
23522
23522
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23523
23523
|
token
|
|
@@ -23536,7 +23536,7 @@ function indent(str, spaces) {
|
|
|
23536
23536
|
if (contextKeys.some(function(el) {
|
|
23537
23537
|
return el.startsWith(name);
|
|
23538
23538
|
})) {
|
|
23539
|
-
return
|
|
23539
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
23540
23540
|
}
|
|
23541
23541
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23542
23542
|
return el === name;
|
|
@@ -23555,9 +23555,9 @@ function indent(str, spaces) {
|
|
|
23555
23555
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23556
23556
|
return el.startsWith(name);
|
|
23557
23557
|
})) {
|
|
23558
|
-
return
|
|
23558
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
|
|
23559
23559
|
}
|
|
23560
|
-
return
|
|
23560
|
+
return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
|
|
23561
23561
|
v: nextMatch1
|
|
23562
23562
|
};
|
|
23563
23563
|
};
|
|
@@ -27342,7 +27342,9 @@ function findNext(nodeRef) {
|
|
|
27342
27342
|
handlebars_min.exports.registerHelper('JSONstringify', function(value) {
|
|
27343
27343
|
return JSON.stringify(value);
|
|
27344
27344
|
});
|
|
27345
|
-
const
|
|
27345
|
+
const globalInstance = typeof window === 'undefined' ? global : window;
|
|
27346
|
+
var _globalInstance___DIGIPAIR_CONFIG__;
|
|
27347
|
+
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
|
27346
27348
|
LIBRARIES: {},
|
|
27347
27349
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27348
27350
|
};
|
|
@@ -27493,6 +27495,10 @@ let WebService = class WebService {
|
|
|
27493
27495
|
});
|
|
27494
27496
|
return pinsSettings.properties.execute;
|
|
27495
27497
|
}
|
|
27498
|
+
async prepareBrowserPinsSettings(name, pinsSettings) {
|
|
27499
|
+
const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
|
|
27500
|
+
return preparedPinsSettings;
|
|
27501
|
+
}
|
|
27496
27502
|
async page(params, _pinsSettingsList, context) {
|
|
27497
27503
|
var _context_request_body;
|
|
27498
27504
|
const { body, title = 'Digipair', favicon = 'https://www.digipair.ai/assets/images/favicon.ico', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', libraries = {}, factoryInitialize = [], browserInitialize = [], browserLoad = [] } = params;
|
|
@@ -27503,7 +27509,6 @@ let WebService = class WebService {
|
|
|
27503
27509
|
return await executePinsList(pinsSettingsList, _extends({}, context.request.body.context, context));
|
|
27504
27510
|
}
|
|
27505
27511
|
await executePinsList(factoryInitialize, context);
|
|
27506
|
-
const preparedBody = body.map((item, index)=>this.filteredWebPinsSettings(item, `body[${index}]`));
|
|
27507
27512
|
const html = `
|
|
27508
27513
|
<!DOCTYPE html>
|
|
27509
27514
|
<html style="${styleHtml}">
|
|
@@ -27541,16 +27546,16 @@ let WebService = class WebService {
|
|
|
27541
27546
|
libraries: {},
|
|
27542
27547
|
};
|
|
27543
27548
|
|
|
27544
|
-
await executePinsList(${JSON.stringify(browserInitialize)}, context);
|
|
27549
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserInitialize', browserInitialize))}, context);
|
|
27545
27550
|
|
|
27546
|
-
const pinsList = ${JSON.stringify(
|
|
27551
|
+
const pinsList = ${JSON.stringify(this.prepareBrowserPinsSettings('body', body))};
|
|
27547
27552
|
for (let i = 0; i < pinsList.length; i++) {
|
|
27548
27553
|
const item = pinsList[i];
|
|
27549
27554
|
await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} }, options);
|
|
27550
27555
|
}
|
|
27551
27556
|
|
|
27552
27557
|
setTimeout(async () => {
|
|
27553
|
-
await executePinsList(${JSON.stringify(browserLoad)}, context);
|
|
27558
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserLoad', browserLoad))}, context);
|
|
27554
27559
|
}, 1);
|
|
27555
27560
|
</script>
|
|
27556
27561
|
</body>
|
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 nextMatch = nextMatch1,
|
|
23491
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
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 nextMatch = nextMatch1,
|
|
23498
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "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 nextMatch = nextMatch1,
|
|
23517
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "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 nextMatch = nextMatch1,
|
|
23536
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
23537
23537
|
}
|
|
23538
|
-
return nextMatch = nextMatch1,
|
|
23538
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
23539
23539
|
v: nextMatch1
|
|
23540
23540
|
};
|
|
23541
23541
|
};
|
|
@@ -27320,7 +27320,9 @@ function findNext(nodeRef) {
|
|
|
27320
27320
|
handlebars_min.exports.registerHelper('JSONstringify', function(value) {
|
|
27321
27321
|
return JSON.stringify(value);
|
|
27322
27322
|
});
|
|
27323
|
-
const
|
|
27323
|
+
const globalInstance = typeof window === 'undefined' ? global : window;
|
|
27324
|
+
var _globalInstance___DIGIPAIR_CONFIG__;
|
|
27325
|
+
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
|
27324
27326
|
LIBRARIES: {},
|
|
27325
27327
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27326
27328
|
};
|
|
@@ -27471,6 +27473,10 @@ let WebService = class WebService {
|
|
|
27471
27473
|
});
|
|
27472
27474
|
return pinsSettings.properties.execute;
|
|
27473
27475
|
}
|
|
27476
|
+
async prepareBrowserPinsSettings(name, pinsSettings) {
|
|
27477
|
+
const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
|
|
27478
|
+
return preparedPinsSettings;
|
|
27479
|
+
}
|
|
27474
27480
|
async page(params, _pinsSettingsList, context) {
|
|
27475
27481
|
var _context_request_body;
|
|
27476
27482
|
const { body, title = 'Digipair', favicon = 'https://www.digipair.ai/assets/images/favicon.ico', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', libraries = {}, factoryInitialize = [], browserInitialize = [], browserLoad = [] } = params;
|
|
@@ -27481,7 +27487,6 @@ let WebService = class WebService {
|
|
|
27481
27487
|
return await executePinsList(pinsSettingsList, _extends({}, context.request.body.context, context));
|
|
27482
27488
|
}
|
|
27483
27489
|
await executePinsList(factoryInitialize, context);
|
|
27484
|
-
const preparedBody = body.map((item, index)=>this.filteredWebPinsSettings(item, `body[${index}]`));
|
|
27485
27490
|
const html = `
|
|
27486
27491
|
<!DOCTYPE html>
|
|
27487
27492
|
<html style="${styleHtml}">
|
|
@@ -27519,16 +27524,16 @@ let WebService = class WebService {
|
|
|
27519
27524
|
libraries: {},
|
|
27520
27525
|
};
|
|
27521
27526
|
|
|
27522
|
-
await executePinsList(${JSON.stringify(browserInitialize)}, context);
|
|
27527
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserInitialize', browserInitialize))}, context);
|
|
27523
27528
|
|
|
27524
|
-
const pinsList = ${JSON.stringify(
|
|
27529
|
+
const pinsList = ${JSON.stringify(this.prepareBrowserPinsSettings('body', body))};
|
|
27525
27530
|
for (let i = 0; i < pinsList.length; i++) {
|
|
27526
27531
|
const item = pinsList[i];
|
|
27527
27532
|
await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} }, options);
|
|
27528
27533
|
}
|
|
27529
27534
|
|
|
27530
27535
|
setTimeout(async () => {
|
|
27531
|
-
await executePinsList(${JSON.stringify(browserLoad)}, context);
|
|
27536
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserLoad', browserLoad))}, context);
|
|
27532
27537
|
}, 1);
|
|
27533
27538
|
</script>
|
|
27534
27539
|
</body>
|