@formio/js 5.2.0-rc.5 → 5.2.0-rc.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.
@@ -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.5 | https://unpkg.com/formiojs@5.2.0-rc.5/LICENSE.txt */
23
+ /*! formiojs v5.2.0-rc.6 | https://unpkg.com/formiojs@5.2.0-rc.6/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.5';
421
+ Formio.version = '5.2.0-rc.6';
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.5';
14
+ sdk_1.Formio.version = '5.2.0-rc.6';
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) {
@@ -1,3 +1,10 @@
1
+ /**
2
+ * For backwards compatibility we a standalone interpolate function. This merely calls the
3
+ * global mutable Evaluator instance's interpolate function.
4
+ * @param {...any} args - interpolate arguments, typically "rawTemplate", "data", and "options"
5
+ * @returns {any} the interpolation result.
6
+ */
7
+ export function interpolate(...args: any[]): any;
1
8
  /**
2
9
  * Set the evaluator to use for evaluating expressions.
3
10
  * @param {CoreEvaluator} override - The new evaluator instance to use.
@@ -11,5 +18,4 @@ export class DefaultEvaluator extends CoreEvaluator {
11
18
  interpolate(rawTemplate: any, data: any, _options: any): any;
12
19
  }
13
20
  export let Evaluator: DefaultEvaluator;
14
- export function interpolate(rawTemplate: any, data: any, _options: any): any;
15
21
  import { DefaultEvaluator as CoreEvaluator } from '@formio/core';
@@ -62,7 +62,16 @@ class DefaultEvaluator extends core_1.DefaultEvaluator {
62
62
  exports.DefaultEvaluator = DefaultEvaluator;
63
63
  exports.Evaluator = new DefaultEvaluator();
64
64
  // preserve the standalone interpolate function for backwards compatibility
65
- exports.interpolate = exports.Evaluator.interpolate;
65
+ /**
66
+ * For backwards compatibility we a standalone interpolate function. This merely calls the
67
+ * global mutable Evaluator instance's interpolate function.
68
+ * @param {...any} args - interpolate arguments, typically "rawTemplate", "data", and "options"
69
+ * @returns {any} the interpolation result.
70
+ */
71
+ function interpolate(...args) {
72
+ return exports.Evaluator.interpolate(...args);
73
+ }
74
+ exports.interpolate = interpolate;
66
75
  /**
67
76
  * Set the evaluator to use for evaluating expressions.
68
77
  * @param {CoreEvaluator} override - The new evaluator instance to use.
@@ -3,7 +3,12 @@ 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
+ interpolate: typeof interpolate;
7
+ ConditionOperators: {
8
+ [x: string]: typeof import("./conditionOperators/IsEqualTo").default | typeof import("./conditionOperators/DateGreaterThan").default;
9
+ };
10
+ _: any;
11
+ moment: typeof moment;
7
12
  flattenComponents: typeof import("@formio/core/lib/utils/formUtil").flattenComponents;
8
13
  guid: typeof import("@formio/core/lib/utils/formUtil").guid;
9
14
  uniqueName: typeof import("@formio/core/lib/utils/formUtil").uniqueName;
@@ -158,4 +163,6 @@ declare const FormioUtils: {
158
163
  };
159
164
  import { Evaluator } from './Evaluator';
160
165
  import { registerEvaluator } from './Evaluator';
166
+ import { interpolate } from './Evaluator';
167
+ import moment from 'moment';
161
168
  export { FormioUtils as Utils, Evaluator, registerEvaluator };
@@ -25,6 +25,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
28
31
  Object.defineProperty(exports, "__esModule", { value: true });
29
32
  exports.registerEvaluator = exports.Evaluator = exports.Utils = void 0;
30
33
  const utils = __importStar(require("./utils"));
@@ -32,8 +35,14 @@ const formUtils = __importStar(require("./formUtils"));
32
35
  const Evaluator_1 = require("./Evaluator");
33
36
  Object.defineProperty(exports, "Evaluator", { enumerable: true, get: function () { return Evaluator_1.Evaluator; } });
34
37
  Object.defineProperty(exports, "registerEvaluator", { enumerable: true, get: function () { return Evaluator_1.registerEvaluator; } });
38
+ const conditionOperators_1 = __importDefault(require("./conditionOperators"));
39
+ const lodash_1 = __importDefault(require("lodash"));
40
+ const moment_1 = __importDefault(require("moment"));
35
41
  const FormioUtils = Object.assign(Object.assign(Object.assign({}, utils), formUtils), { Evaluator: Evaluator_1.Evaluator,
36
- interpolate: Evaluator_1.interpolate });
42
+ interpolate: Evaluator_1.interpolate,
43
+ ConditionOperators: conditionOperators_1.default,
44
+ _: lodash_1.default,
45
+ moment: moment_1.default });
37
46
  exports.Utils = FormioUtils;
38
47
  if (typeof global === 'object') {
39
48
  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.5';
17
+ static version = '5.2.0-rc.6';
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.5';
7
+ FormioCore.version = '5.2.0-rc.6';
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) {
@@ -1,3 +1,10 @@
1
+ /**
2
+ * For backwards compatibility we a standalone interpolate function. This merely calls the
3
+ * global mutable Evaluator instance's interpolate function.
4
+ * @param {...any} args - interpolate arguments, typically "rawTemplate", "data", and "options"
5
+ * @returns {any} the interpolation result.
6
+ */
7
+ export function interpolate(...args: any[]): any;
1
8
  /**
2
9
  * Set the evaluator to use for evaluating expressions.
3
10
  * @param {CoreEvaluator} override - The new evaluator instance to use.
@@ -11,5 +18,4 @@ export class DefaultEvaluator extends CoreEvaluator {
11
18
  interpolate(rawTemplate: any, data: any, _options: any): any;
12
19
  }
13
20
  export let Evaluator: DefaultEvaluator;
14
- export function interpolate(rawTemplate: any, data: any, _options: any): any;
15
21
  import { DefaultEvaluator as CoreEvaluator } from '@formio/core';
@@ -52,7 +52,15 @@ export class DefaultEvaluator extends CoreEvaluator {
52
52
  }
53
53
  export let Evaluator = new DefaultEvaluator();
54
54
  // preserve the standalone interpolate function for backwards compatibility
55
- export const interpolate = Evaluator.interpolate;
55
+ /**
56
+ * For backwards compatibility we a standalone interpolate function. This merely calls the
57
+ * global mutable Evaluator instance's interpolate function.
58
+ * @param {...any} args - interpolate arguments, typically "rawTemplate", "data", and "options"
59
+ * @returns {any} the interpolation result.
60
+ */
61
+ export function interpolate(...args) {
62
+ return Evaluator.interpolate(...args);
63
+ }
56
64
  /**
57
65
  * Set the evaluator to use for evaluating expressions.
58
66
  * @param {CoreEvaluator} override - The new evaluator instance to use.
@@ -3,7 +3,12 @@ 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
+ interpolate: typeof interpolate;
7
+ ConditionOperators: {
8
+ [x: string]: typeof import("./conditionOperators/IsEqualTo").default | typeof import("./conditionOperators/DateGreaterThan").default;
9
+ };
10
+ _: any;
11
+ moment: typeof moment;
7
12
  flattenComponents: typeof import("@formio/core/lib/utils/formUtil").flattenComponents;
8
13
  guid: typeof import("@formio/core/lib/utils/formUtil").guid;
9
14
  uniqueName: typeof import("@formio/core/lib/utils/formUtil").uniqueName;
@@ -158,4 +163,6 @@ declare const FormioUtils: {
158
163
  };
159
164
  import { Evaluator } from './Evaluator';
160
165
  import { registerEvaluator } from './Evaluator';
166
+ import { interpolate } from './Evaluator';
167
+ import moment from 'moment';
161
168
  export { FormioUtils as Utils, Evaluator, registerEvaluator };
@@ -1,11 +1,17 @@
1
1
  import * as utils from './utils';
2
2
  import * as formUtils from './formUtils';
3
3
  import { Evaluator, registerEvaluator, interpolate } from './Evaluator';
4
+ import ConditionOperators from './conditionOperators';
5
+ import _ from 'lodash';
6
+ import moment from 'moment';
4
7
  const FormioUtils = {
5
8
  ...utils,
6
9
  ...formUtils,
7
10
  Evaluator,
8
- interpolate
11
+ interpolate,
12
+ ConditionOperators,
13
+ _,
14
+ moment
9
15
  };
10
16
  if (typeof global === 'object') {
11
17
  global.FormioUtils = FormioUtils;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.2.0-rc.5",
3
+ "version": "5.2.0-rc.6",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {