@digipair/skill-web 0.8.4 → 0.8.6

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 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 i = i1, tokens = tokens1, nextMatch = nextMatch1, {
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 i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
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 i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
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 i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23558
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23559
23559
  }
23560
- return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23560
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23561
23561
  v: nextMatch1
23562
23562
  };
23563
23563
  };
@@ -27495,6 +27495,10 @@ let WebService = class WebService {
27495
27495
  });
27496
27496
  return pinsSettings.properties.execute;
27497
27497
  }
27498
+ prepareBrowserPinsSettings(name, pinsSettings) {
27499
+ const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
27500
+ return preparedPinsSettings;
27501
+ }
27498
27502
  async page(params, _pinsSettingsList, context) {
27499
27503
  var _context_request_body;
27500
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;
@@ -27505,7 +27509,6 @@ let WebService = class WebService {
27505
27509
  return await executePinsList(pinsSettingsList, _extends({}, context.request.body.context, context));
27506
27510
  }
27507
27511
  await executePinsList(factoryInitialize, context);
27508
- const preparedBody = body.map((item, index)=>this.filteredWebPinsSettings(item, `body[${index}]`));
27509
27512
  const html = `
27510
27513
  <!DOCTYPE html>
27511
27514
  <html style="${styleHtml}">
@@ -27543,16 +27546,16 @@ let WebService = class WebService {
27543
27546
  libraries: {},
27544
27547
  };
27545
27548
 
27546
- await executePinsList(${JSON.stringify(browserInitialize)}, context);
27549
+ await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserInitialize', browserInitialize))}, context);
27547
27550
 
27548
- const pinsList = ${JSON.stringify(preparedBody)};
27551
+ const pinsList = ${JSON.stringify(this.prepareBrowserPinsSettings('body', body))};
27549
27552
  for (let i = 0; i < pinsList.length; i++) {
27550
27553
  const item = pinsList[i];
27551
27554
  await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} }, options);
27552
27555
  }
27553
27556
 
27554
27557
  setTimeout(async () => {
27555
- await executePinsList(${JSON.stringify(browserLoad)}, context);
27558
+ await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserLoad', browserLoad))}, context);
27556
27559
  }, 1);
27557
27560
  </script>
27558
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 tokens = tokens1, i = i1, nextMatch = nextMatch1, {
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 tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
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 tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
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 tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23536
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23537
23537
  }
23538
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23538
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23539
23539
  v: nextMatch1
23540
23540
  };
23541
23541
  };
@@ -27473,6 +27473,10 @@ let WebService = class WebService {
27473
27473
  });
27474
27474
  return pinsSettings.properties.execute;
27475
27475
  }
27476
+ prepareBrowserPinsSettings(name, pinsSettings) {
27477
+ const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
27478
+ return preparedPinsSettings;
27479
+ }
27476
27480
  async page(params, _pinsSettingsList, context) {
27477
27481
  var _context_request_body;
27478
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;
@@ -27483,7 +27487,6 @@ let WebService = class WebService {
27483
27487
  return await executePinsList(pinsSettingsList, _extends({}, context.request.body.context, context));
27484
27488
  }
27485
27489
  await executePinsList(factoryInitialize, context);
27486
- const preparedBody = body.map((item, index)=>this.filteredWebPinsSettings(item, `body[${index}]`));
27487
27490
  const html = `
27488
27491
  <!DOCTYPE html>
27489
27492
  <html style="${styleHtml}">
@@ -27521,16 +27524,16 @@ let WebService = class WebService {
27521
27524
  libraries: {},
27522
27525
  };
27523
27526
 
27524
- await executePinsList(${JSON.stringify(browserInitialize)}, context);
27527
+ await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserInitialize', browserInitialize))}, context);
27525
27528
 
27526
- const pinsList = ${JSON.stringify(preparedBody)};
27529
+ const pinsList = ${JSON.stringify(this.prepareBrowserPinsSettings('body', body))};
27527
27530
  for (let i = 0; i < pinsList.length; i++) {
27528
27531
  const item = pinsList[i];
27529
27532
  await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} }, options);
27530
27533
  }
27531
27534
 
27532
27535
  setTimeout(async () => {
27533
- await executePinsList(${JSON.stringify(browserLoad)}, context);
27536
+ await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserLoad', browserLoad))}, context);
27534
27537
  }, 1);
27535
27538
  </script>
27536
27539
  </body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web",
3
- "version": "0.8.4",
3
+ "version": "0.8.6",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"