@digipair/skill-web-chatbot 0.48.1 → 0.48.3

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 CHANGED
@@ -37752,14 +37752,14 @@ function indent(str, spaces) {
37752
37752
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
37753
37753
  // match is required
37754
37754
  if (!match) {
37755
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
37755
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
37756
37756
  v: nextMatch1
37757
37757
  };
37758
37758
  }
37759
37759
  var token = match.token, offset = match.offset;
37760
37760
  i1 += offset;
37761
37761
  if (token === " ") {
37762
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
37762
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
37763
37763
  }
37764
37764
  tokens1 = _to_consumable_array$c(tokens1).concat([
37765
37765
  token
@@ -37778,7 +37778,7 @@ function indent(str, spaces) {
37778
37778
  if (contextKeys.some(function(el) {
37779
37779
  return el.startsWith(name);
37780
37780
  })) {
37781
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
37781
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
37782
37782
  }
37783
37783
  if (dateTimeIdentifiers.some(function(el) {
37784
37784
  return el === name;
@@ -37797,9 +37797,9 @@ function indent(str, spaces) {
37797
37797
  if (dateTimeIdentifiers.some(function(el) {
37798
37798
  return el.startsWith(name);
37799
37799
  })) {
37800
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
37800
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
37801
37801
  }
37802
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
37802
+ return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
37803
37803
  v: nextMatch1
37804
37804
  };
37805
37805
  };
@@ -41792,7 +41792,9 @@ const executePinsList = async (pinsSettingsList, context)=>{
41792
41792
  }
41793
41793
  return previous;
41794
41794
  };
41795
- const generateElementFromPins = async (pinsSettings, parent, context)=>{
41795
+ const generateElementFromPins = async (pinsSettings, parent, context, document = typeof window !== 'undefined' ? window.document : global.document, options = {
41796
+ import: true
41797
+ })=>{
41796
41798
  var _settings_conditions, _settings_conditions1;
41797
41799
  let settings = await preparePinsSettings(pinsSettings, context);
41798
41800
  const alias = _config$1.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
@@ -41816,7 +41818,7 @@ const generateElementFromPins = async (pinsSettings, parent, context)=>{
41816
41818
  index: context.index,
41817
41819
  parent: context.parent
41818
41820
  }
41819
- }));
41821
+ }), document, options);
41820
41822
  }
41821
41823
  return;
41822
41824
  }
@@ -41826,7 +41828,7 @@ const generateElementFromPins = async (pinsSettings, parent, context)=>{
41826
41828
  const element = document.createElement(pinsSettings.element);
41827
41829
  element.setAttribute('data-digipair-pins', '');
41828
41830
  const library = pinsSettings.library;
41829
- if (library !== 'web' && !_config$1.LIBRARIES[library]) {
41831
+ if (options.import && library !== 'web' && !_config$1.LIBRARIES[library]) {
41830
41832
  const config = context.config || {};
41831
41833
  const version = (config.VERSIONS || {})[library] || 'latest';
41832
41834
  (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(isRemoteVersion.test(version) ? `${version}` : `${_config$1.BASE_URL}/${library}@${version}/index.esm.js`);
@@ -41853,7 +41855,7 @@ const generateElementFromPins = async (pinsSettings, parent, context)=>{
41853
41855
  const pinsList = settings.pins || [];
41854
41856
  for(let i = 0; i < pinsList.length; i++){
41855
41857
  const item = pinsList[i];
41856
- await generateElementFromPins(item, element, context);
41858
+ await generateElementFromPins(item, element, context, document, options);
41857
41859
  }
41858
41860
  parent == null ? void 0 : parent.appendChild(element);
41859
41861
  return element;
package/index.esm2.js CHANGED
@@ -41772,7 +41772,9 @@ const executePinsList = async (pinsSettingsList, context)=>{
41772
41772
  }
41773
41773
  return previous;
41774
41774
  };
41775
- const generateElementFromPins = async (pinsSettings, parent, context)=>{
41775
+ const generateElementFromPins = async (pinsSettings, parent, context, document = typeof window !== 'undefined' ? window.document : global.document, options = {
41776
+ import: true
41777
+ })=>{
41776
41778
  var _settings_conditions, _settings_conditions1;
41777
41779
  let settings = await preparePinsSettings(pinsSettings, context);
41778
41780
  const alias = _config$1.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
@@ -41796,7 +41798,7 @@ const generateElementFromPins = async (pinsSettings, parent, context)=>{
41796
41798
  index: context.index,
41797
41799
  parent: context.parent
41798
41800
  }
41799
- }));
41801
+ }), document, options);
41800
41802
  }
41801
41803
  return;
41802
41804
  }
@@ -41806,7 +41808,7 @@ const generateElementFromPins = async (pinsSettings, parent, context)=>{
41806
41808
  const element = document.createElement(pinsSettings.element);
41807
41809
  element.setAttribute('data-digipair-pins', '');
41808
41810
  const library = pinsSettings.library;
41809
- if (library !== 'web' && !_config$1.LIBRARIES[library]) {
41811
+ if (options.import && library !== 'web' && !_config$1.LIBRARIES[library]) {
41810
41812
  const config = context.config || {};
41811
41813
  const version = (config.VERSIONS || {})[library] || 'latest';
41812
41814
  import(isRemoteVersion.test(version) ? `${version}` : `${_config$1.BASE_URL}/${library}@${version}/index.esm.js`);
@@ -41833,7 +41835,7 @@ const generateElementFromPins = async (pinsSettings, parent, context)=>{
41833
41835
  const pinsList = settings.pins || [];
41834
41836
  for(let i = 0; i < pinsList.length; i++){
41835
41837
  const item = pinsList[i];
41836
- await generateElementFromPins(item, element, context);
41838
+ await generateElementFromPins(item, element, context, document, options);
41837
41839
  }
41838
41840
  parent == null ? void 0 : parent.appendChild(element);
41839
41841
  return element;
@@ -5,6 +5,8 @@ export declare const config: {
5
5
  };
6
6
  export declare const applyTemplate: (value: any, context: any) => any;
7
7
  export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
8
- export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any) => Promise<Element | void>;
8
+ export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any, document?: Document, options?: {
9
+ import: boolean;
10
+ }) => Promise<Element | void>;
9
11
  export declare const preparePinsSettings: (settings: PinsSettings, context: any) => Promise<PinsSettings>;
10
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-chatbot",
3
- "version": "0.48.1",
3
+ "version": "0.48.3",
4
4
  "dependencies": {},
5
5
  "typings": "./index.d.ts",
6
6
  "main": "./index.cjs.js",