@formio/js 5.1.0-dev.6130.1bee057 → 5.1.0-dev.6137.25c880e

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.
@@ -53,7 +53,7 @@ class DayComponent extends Field_1.default {
53
53
  return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.string];
54
54
  }
55
55
  constructor(component, options, data) {
56
- if (options && !options.inFormBuilder && !options.building) {
56
+ if (!options.inFormBuilder && !options.building) {
57
57
  if (component.maxDate && component.maxDate.indexOf('moment(') === -1) {
58
58
  component.maxDate = (0, moment_1.default)(component.maxDate, 'YYYY-MM-DD').toISOString();
59
59
  }
@@ -4,6 +4,11 @@ export default FormioUtils;
4
4
  declare const FormioUtils: {
5
5
  Evaluator: import("./Evaluator").DefaultEvaluator;
6
6
  interpolate: (rawTemplate: any, data: any, _options: any) => any;
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;
@@ -160,4 +165,5 @@ declare const FormioUtils: {
160
165
  };
161
166
  import { Evaluator } from './Evaluator';
162
167
  import { registerEvaluator } from './Evaluator';
168
+ import moment from 'moment';
163
169
  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;
@@ -53,7 +53,7 @@ export default class DayComponent extends Field {
53
53
  // Empty value used before 9.3.x
54
54
  static oldEmptyValue = '00/00/0000';
55
55
  constructor(component, options, data) {
56
- if (options && !options.inFormBuilder && !options.building) {
56
+ if (!options.inFormBuilder && !options.building) {
57
57
  if (component.maxDate && component.maxDate.indexOf('moment(') === -1) {
58
58
  component.maxDate = moment(component.maxDate, 'YYYY-MM-DD').toISOString();
59
59
  }
@@ -4,6 +4,11 @@ export default FormioUtils;
4
4
  declare const FormioUtils: {
5
5
  Evaluator: import("./Evaluator").DefaultEvaluator;
6
6
  interpolate: (rawTemplate: any, data: any, _options: any) => any;
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;
@@ -160,4 +165,5 @@ declare const FormioUtils: {
160
165
  };
161
166
  import { Evaluator } from './Evaluator';
162
167
  import { registerEvaluator } from './Evaluator';
168
+ import moment from 'moment';
163
169
  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.1.0-dev.6130.1bee057",
3
+ "version": "5.1.0-dev.6137.25c880e",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -176,7 +176,8 @@
176
176
  "webpack-bundle-analyzer": "^4.10.2",
177
177
  "webpack-cli": "^5.1.1",
178
178
  "webpack-node-externals": "^3.0.0",
179
- "webpack-stream": "^7.0.0"
179
+ "webpack-stream": "^7.0.0",
180
+ "zx": "^8.5.4"
180
181
  },
181
182
  "nyc": {
182
183
  "check-coverage": true,