@formio/js 5.1.0-dev.6126.7fb6eb6 → 5.1.0-dev.6128.3d38003

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/lib/cjs/Embed.js CHANGED
@@ -282,7 +282,7 @@ class Formio {
282
282
  src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),
283
283
  url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");
284
284
  }`
285
- },
285
+ }
286
286
  };
287
287
  // Add all bootswatch templates.
288
288
  ['cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti'].forEach((template) => {
@@ -350,14 +350,6 @@ class Formio {
350
350
  }
351
351
  }
352
352
  yield _a.addStyles(libWrapper, _a.formioScript(_a.config.style || `${_a.cdn.js}/${renderer}.css`, builder));
353
- // In some cases (dropdown list of autocomplete or confirmation popup of skethpad) we render elements outside of shadow dom
354
- // and as result we can't get access to this styles outside of shadow dom. Here i added needed styles to work it properly
355
- if (useShadowDom) {
356
- yield _a.addStyles(document.body, _a.formioScript(_a.config.style || `${_a.cdn.js}/${renderer}.css`, builder));
357
- const toGlobalStyleLibs = ["bootstrap", "bootstrap4", "bootstrap-icons"];
358
- const libHrefs = toGlobalStyleLibs.map(key => _a.config.libs[key]).filter(Boolean).map(href => href.css);
359
- yield _a.addStyles(document.body, libHrefs, builder);
360
- }
361
353
  if (_a.config.before) {
362
354
  yield _a.config.before(_a.FormioClass, element, _a.config);
363
355
  }
@@ -11,4 +11,5 @@ export class DefaultEvaluator extends CoreEvaluator {
11
11
  interpolate(rawTemplate: any, data: any, _options: any): any;
12
12
  }
13
13
  export let Evaluator: DefaultEvaluator;
14
+ export function interpolate(rawTemplate: any, data: any, _options: any): any;
14
15
  import { DefaultEvaluator as CoreEvaluator } from '@formio/core';
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.registerEvaluator = exports.Evaluator = exports.DefaultEvaluator = void 0;
6
+ exports.registerEvaluator = exports.interpolate = exports.Evaluator = exports.DefaultEvaluator = void 0;
7
7
  const lodash_1 = __importDefault(require("lodash"));
8
8
  const string_hash_1 = __importDefault(require("string-hash"));
9
9
  const core_1 = require("@formio/core");
@@ -61,6 +61,8 @@ class DefaultEvaluator extends core_1.DefaultEvaluator {
61
61
  }
62
62
  exports.DefaultEvaluator = DefaultEvaluator;
63
63
  exports.Evaluator = new DefaultEvaluator();
64
+ // preserve the standalone interpolate function for backwards compatibility
65
+ exports.interpolate = exports.Evaluator.interpolate;
64
66
  /**
65
67
  * Set the evaluator to use for evaluating expressions.
66
68
  * @param {CoreEvaluator} override - The new evaluator instance to use.
@@ -3,6 +3,7 @@ export * from "./formUtils";
3
3
  export default FormioUtils;
4
4
  declare const FormioUtils: {
5
5
  Evaluator: import("./Evaluator").DefaultEvaluator;
6
+ interpolate: (rawTemplate: any, data: any, _options: any) => any;
6
7
  flattenComponents: typeof import("@formio/core/lib/utils/formUtil").flattenComponents;
7
8
  guid: typeof import("@formio/core/lib/utils/formUtil").guid;
8
9
  uniqueName: typeof import("@formio/core/lib/utils/formUtil").uniqueName;
@@ -32,7 +32,8 @@ const formUtils = __importStar(require("./formUtils"));
32
32
  const Evaluator_1 = require("./Evaluator");
33
33
  Object.defineProperty(exports, "Evaluator", { enumerable: true, get: function () { return Evaluator_1.Evaluator; } });
34
34
  Object.defineProperty(exports, "registerEvaluator", { enumerable: true, get: function () { return Evaluator_1.registerEvaluator; } });
35
- const FormioUtils = Object.assign(Object.assign(Object.assign({}, utils), formUtils), { Evaluator: Evaluator_1.Evaluator });
35
+ const FormioUtils = Object.assign(Object.assign(Object.assign({}, utils), formUtils), { Evaluator: Evaluator_1.Evaluator,
36
+ interpolate: Evaluator_1.interpolate });
36
37
  exports.Utils = FormioUtils;
37
38
  if (typeof global === 'object') {
38
39
  global.FormioUtils = FormioUtils;
package/lib/mjs/Embed.js CHANGED
@@ -270,7 +270,7 @@ export class Formio {
270
270
  src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),
271
271
  url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");
272
272
  }`
273
- },
273
+ }
274
274
  };
275
275
  // Add all bootswatch templates.
276
276
  ['cerulean', 'cosmo', 'cyborg', 'darkly', 'flatly', 'journal', 'litera', 'lumen', 'lux', 'materia', 'minty', 'pulse', 'sandstone', 'simplex', 'sketchy', 'slate', 'solar', 'spacelab', 'superhero', 'united', 'yeti'].forEach((template) => {
@@ -338,14 +338,6 @@ export class Formio {
338
338
  }
339
339
  }
340
340
  await Formio.addStyles(libWrapper, Formio.formioScript(Formio.config.style || `${Formio.cdn.js}/${renderer}.css`, builder));
341
- // In some cases (dropdown list of autocomplete or confirmation popup of skethpad) we render elements outside of shadow dom
342
- // and as result we can't get access to this styles outside of shadow dom. Here i added needed styles to work it properly
343
- if (useShadowDom) {
344
- await Formio.addStyles(document.body, Formio.formioScript(Formio.config.style || `${Formio.cdn.js}/${renderer}.css`, builder));
345
- const toGlobalStyleLibs = ["bootstrap", "bootstrap4", "bootstrap-icons"];
346
- const libHrefs = toGlobalStyleLibs.map(key => Formio.config.libs[key]).filter(Boolean).map(href => href.css);
347
- await Formio.addStyles(document.body, libHrefs, builder);
348
- }
349
341
  if (Formio.config.before) {
350
342
  await Formio.config.before(Formio.FormioClass, element, Formio.config);
351
343
  }
@@ -11,4 +11,5 @@ export class DefaultEvaluator extends CoreEvaluator {
11
11
  interpolate(rawTemplate: any, data: any, _options: any): any;
12
12
  }
13
13
  export let Evaluator: DefaultEvaluator;
14
+ export function interpolate(rawTemplate: any, data: any, _options: any): any;
14
15
  import { DefaultEvaluator as CoreEvaluator } from '@formio/core';
@@ -51,6 +51,8 @@ export class DefaultEvaluator extends CoreEvaluator {
51
51
  }
52
52
  }
53
53
  export let Evaluator = new DefaultEvaluator();
54
+ // preserve the standalone interpolate function for backwards compatibility
55
+ export const interpolate = Evaluator.interpolate;
54
56
  /**
55
57
  * Set the evaluator to use for evaluating expressions.
56
58
  * @param {CoreEvaluator} override - The new evaluator instance to use.
@@ -3,6 +3,7 @@ export * from "./formUtils";
3
3
  export default FormioUtils;
4
4
  declare const FormioUtils: {
5
5
  Evaluator: import("./Evaluator").DefaultEvaluator;
6
+ interpolate: (rawTemplate: any, data: any, _options: any) => any;
6
7
  flattenComponents: typeof import("@formio/core/lib/utils/formUtil").flattenComponents;
7
8
  guid: typeof import("@formio/core/lib/utils/formUtil").guid;
8
9
  uniqueName: typeof import("@formio/core/lib/utils/formUtil").uniqueName;
@@ -1,10 +1,11 @@
1
1
  import * as utils from './utils';
2
2
  import * as formUtils from './formUtils';
3
- import { Evaluator, registerEvaluator } from './Evaluator';
3
+ import { Evaluator, registerEvaluator, interpolate } from './Evaluator';
4
4
  const FormioUtils = {
5
5
  ...utils,
6
6
  ...formUtils,
7
7
  Evaluator,
8
+ interpolate
8
9
  };
9
10
  if (typeof global === 'object') {
10
11
  global.FormioUtils = FormioUtils;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.6126.7fb6eb6",
3
+ "version": "5.1.0-dev.6128.3d38003",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {