@formio/js 5.2.0-rc.4 → 5.2.0-rc.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.
@@ -20,7 +20,7 @@
20
20
 
21
21
  /*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
22
22
 
23
- /*! formiojs v5.2.0-rc.4 | https://unpkg.com/formiojs@5.2.0-rc.4/LICENSE.txt */
23
+ /*! formiojs v5.2.0-rc.5 | https://unpkg.com/formiojs@5.2.0-rc.5/LICENSE.txt */
24
24
 
25
25
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
26
26
 
package/lib/cjs/Embed.js CHANGED
@@ -418,7 +418,7 @@ Formio.formioReady = new Promise((ready, reject) => {
418
418
  _a._formioReady = ready;
419
419
  _a._formioReadyReject = reject;
420
420
  });
421
- Formio.version = '5.2.0-rc.4';
421
+ Formio.version = '5.2.0-rc.5';
422
422
  // Create a report.
423
423
  Formio.Report = {
424
424
  create: (element, submission, options = {}) => __awaiter(void 0, void 0, void 0, function* () {
package/lib/cjs/Formio.js CHANGED
@@ -11,7 +11,7 @@ const CDN_1 = __importDefault(require("./CDN"));
11
11
  const providers_1 = __importDefault(require("./providers"));
12
12
  sdk_1.Formio.cdn = new CDN_1.default();
13
13
  sdk_1.Formio.Providers = providers_1.default;
14
- sdk_1.Formio.version = '5.2.0-rc.4';
14
+ sdk_1.Formio.version = '5.2.0-rc.5';
15
15
  CDN_1.default.defaultCDN = sdk_1.Formio.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';
16
16
  const isNil = (val) => val === null || val === undefined;
17
17
  sdk_1.Formio.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {
@@ -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
@@ -14,7 +14,7 @@ export class Formio {
14
14
  Formio._formioReady = ready;
15
15
  Formio._formioReadyReject = reject;
16
16
  });
17
- static version = '5.2.0-rc.4';
17
+ static version = '5.2.0-rc.5';
18
18
  static setLicense(license, norecurse = false) {
19
19
  Formio.license = license;
20
20
  if (!norecurse && Formio.FormioClass) {
package/lib/mjs/Formio.js CHANGED
@@ -4,7 +4,7 @@ import CDN from './CDN';
4
4
  import Providers from './providers';
5
5
  FormioCore.cdn = new CDN();
6
6
  FormioCore.Providers = Providers;
7
- FormioCore.version = '5.2.0-rc.4';
7
+ FormioCore.version = '5.2.0-rc.5';
8
8
  CDN.defaultCDN = FormioCore.version.includes('rc') ? 'https://cdn.test-form.io' : 'https://cdn.form.io';
9
9
  const isNil = (val) => val === null || val === undefined;
10
10
  FormioCore.prototype.uploadFile = function (storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback, multipartOptions) {
@@ -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.2.0-rc.4",
3
+ "version": "5.2.0-rc.5",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {