@formio/js 5.0.0-dev.5671.e370c98 → 5.0.0-dev.5673.3d062b9

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.
@@ -48,7 +48,7 @@ class NumberComponent extends Input_1.default {
48
48
  var _a, _b;
49
49
  super(...args);
50
50
  const separators = (0, utils_1.getNumberSeparators)(this.options.language || navigator.language);
51
- this.decimalSeparator = this.options.decimalSeparator = this.component.decimalSymbol || this.options.decimalSeparator
51
+ this.decimalSeparator = this.options.decimalSeparator = this.options.decimalSeparator
52
52
  || ((_a = this.options.properties) === null || _a === void 0 ? void 0 : _a.decimalSeparator)
53
53
  || separators.decimalSeparator;
54
54
  if (this.component.delimiter) {
@@ -5,5 +5,4 @@ import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
7
  import comp7 from './comp7';
8
- import comp8 from './comp8';
9
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
8
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
@@ -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.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
6
+ exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
7
7
  const comp1_1 = __importDefault(require("./comp1"));
8
8
  exports.comp1 = comp1_1.default;
9
9
  const comp2_1 = __importDefault(require("./comp2"));
@@ -18,5 +18,3 @@ const comp6_1 = __importDefault(require("./comp6"));
18
18
  exports.comp6 = comp6_1.default;
19
19
  const comp7_1 = __importDefault(require("./comp7"));
20
20
  exports.comp7 = comp7_1.default;
21
- const comp8_1 = __importDefault(require("./comp8"));
22
- exports.comp8 = comp8_1.default;
@@ -19,12 +19,13 @@ class DateGeaterThan extends ConditionOperator_1.default {
19
19
  return { date, comparedDate };
20
20
  }
21
21
  execute(options, functionName = 'isAfter') {
22
+ var _a;
22
23
  const { value, instance, conditionComponentPath } = options;
23
24
  if (!value) {
24
25
  return false;
25
26
  }
26
27
  let conditionTriggerComponent = null;
27
- if (instance && instance.root) {
28
+ if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {
28
29
  conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
29
30
  }
30
31
  if (conditionTriggerComponent && conditionTriggerComponent.isPartialDay && conditionTriggerComponent.isPartialDay(value)) {
@@ -16,8 +16,9 @@ class IsEmptyValue extends ConditionOperator_1.default {
16
16
  return false;
17
17
  }
18
18
  execute({ value, instance, conditionComponentPath }) {
19
+ var _a;
19
20
  const isEmptyValue = lodash_1.default.isEmpty(value);
20
- if (instance && instance.root) {
21
+ if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {
21
22
  const conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
22
23
  return conditionTriggerComponent ? conditionTriggerComponent.isEmpty() : isEmptyValue;
23
24
  }
@@ -14,7 +14,7 @@ class IsEqualTo extends ConditionOperator_1.default {
14
14
  return 'Is Equal To';
15
15
  }
16
16
  execute({ value, comparedValue, instance, conditionComponentPath }) {
17
- var _a;
17
+ var _a, _b;
18
18
  if ((value || value === false) && comparedValue && typeof value !== typeof comparedValue && lodash_1.default.isString(comparedValue)) {
19
19
  try {
20
20
  comparedValue = JSON.parse(comparedValue);
@@ -22,11 +22,11 @@ class IsEqualTo extends ConditionOperator_1.default {
22
22
  // eslint-disable-next-line no-empty
23
23
  catch (e) { }
24
24
  }
25
- if (instance && instance.root) {
25
+ if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {
26
26
  const conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
27
27
  if (conditionTriggerComponent
28
28
  && (0, utils_1.isSelectResourceWithObjectValue)(conditionTriggerComponent.component)
29
- && ((_a = conditionTriggerComponent.component) === null || _a === void 0 ? void 0 : _a.template)) {
29
+ && ((_b = conditionTriggerComponent.component) === null || _b === void 0 ? void 0 : _b.template)) {
30
30
  if (!value || !lodash_1.default.isPlainObject(value)) {
31
31
  return false;
32
32
  }
@@ -46,7 +46,7 @@ export default class NumberComponent extends Input {
46
46
  constructor(...args) {
47
47
  super(...args);
48
48
  const separators = getNumberSeparators(this.options.language || navigator.language);
49
- this.decimalSeparator = this.options.decimalSeparator = this.component.decimalSymbol || this.options.decimalSeparator
49
+ this.decimalSeparator = this.options.decimalSeparator = this.options.decimalSeparator
50
50
  || this.options.properties?.decimalSeparator
51
51
  || separators.decimalSeparator;
52
52
  if (this.component.delimiter) {
@@ -5,5 +5,4 @@ import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
7
  import comp7 from './comp7';
8
- import comp8 from './comp8';
9
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
8
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
@@ -5,5 +5,4 @@ import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
7
  import comp7 from './comp7';
8
- import comp8 from './comp8';
9
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
8
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
@@ -19,7 +19,7 @@ export default class DateGeaterThan extends ConditionOperator {
19
19
  return false;
20
20
  }
21
21
  let conditionTriggerComponent = null;
22
- if (instance && instance.root) {
22
+ if (instance?.root?.getComponent) {
23
23
  conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
24
24
  }
25
25
  if (conditionTriggerComponent && conditionTriggerComponent.isPartialDay && conditionTriggerComponent.isPartialDay(value)) {
@@ -12,7 +12,7 @@ export default class IsEmptyValue extends ConditionOperator {
12
12
  }
13
13
  execute({ value, instance, conditionComponentPath }) {
14
14
  const isEmptyValue = _.isEmpty(value);
15
- if (instance && instance.root) {
15
+ if (instance?.root?.getComponent) {
16
16
  const conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
17
17
  return conditionTriggerComponent ? conditionTriggerComponent.isEmpty() : isEmptyValue;
18
18
  }
@@ -16,7 +16,7 @@ export default class IsEqualTo extends ConditionOperator {
16
16
  // eslint-disable-next-line no-empty
17
17
  catch (e) { }
18
18
  }
19
- if (instance && instance.root) {
19
+ if (instance?.root?.getComponent) {
20
20
  const conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
21
21
  if (conditionTriggerComponent
22
22
  && isSelectResourceWithObjectValue(conditionTriggerComponent.component)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5671.e370c98",
3
+ "version": "5.0.0-dev.5673.3d062b9",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -1,32 +0,0 @@
1
- declare namespace _default {
2
- let components: ({
3
- label: string;
4
- applyMaskOn: string;
5
- mask: boolean;
6
- tableView: boolean;
7
- delimiter: boolean;
8
- requireDecimal: boolean;
9
- inputFormat: string;
10
- truncateMultipleSpaces: boolean;
11
- key: string;
12
- type: string;
13
- input: boolean;
14
- decimalSymbol: string;
15
- disableOnInvalid?: undefined;
16
- } | {
17
- type: string;
18
- label: string;
19
- key: string;
20
- disableOnInvalid: boolean;
21
- input: boolean;
22
- tableView: boolean;
23
- applyMaskOn?: undefined;
24
- mask?: undefined;
25
- delimiter?: undefined;
26
- requireDecimal?: undefined;
27
- inputFormat?: undefined;
28
- truncateMultipleSpaces?: undefined;
29
- decimalSymbol?: undefined;
30
- })[];
31
- }
32
- export default _default;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- components: [
5
- {
6
- "label": "Number",
7
- "applyMaskOn": "change",
8
- "mask": false,
9
- "tableView": false,
10
- "delimiter": false,
11
- "requireDecimal": false,
12
- "inputFormat": "plain",
13
- "truncateMultipleSpaces": false,
14
- "key": "number",
15
- "type": "number",
16
- "input": true,
17
- "decimalSymbol": "-"
18
- },
19
- {
20
- "type": "button",
21
- "label": "Submit",
22
- "key": "submit",
23
- "disableOnInvalid": true,
24
- "input": true,
25
- "tableView": false
26
- }
27
- ]
28
- };
@@ -1,32 +0,0 @@
1
- declare namespace _default {
2
- let components: ({
3
- label: string;
4
- applyMaskOn: string;
5
- mask: boolean;
6
- tableView: boolean;
7
- delimiter: boolean;
8
- requireDecimal: boolean;
9
- inputFormat: string;
10
- truncateMultipleSpaces: boolean;
11
- key: string;
12
- type: string;
13
- input: boolean;
14
- decimalSymbol: string;
15
- disableOnInvalid?: undefined;
16
- } | {
17
- type: string;
18
- label: string;
19
- key: string;
20
- disableOnInvalid: boolean;
21
- input: boolean;
22
- tableView: boolean;
23
- applyMaskOn?: undefined;
24
- mask?: undefined;
25
- delimiter?: undefined;
26
- requireDecimal?: undefined;
27
- inputFormat?: undefined;
28
- truncateMultipleSpaces?: undefined;
29
- decimalSymbol?: undefined;
30
- })[];
31
- }
32
- export default _default;
@@ -1,26 +0,0 @@
1
- export default {
2
- components: [
3
- {
4
- "label": "Number",
5
- "applyMaskOn": "change",
6
- "mask": false,
7
- "tableView": false,
8
- "delimiter": false,
9
- "requireDecimal": false,
10
- "inputFormat": "plain",
11
- "truncateMultipleSpaces": false,
12
- "key": "number",
13
- "type": "number",
14
- "input": true,
15
- "decimalSymbol": "-"
16
- },
17
- {
18
- "type": "button",
19
- "label": "Submit",
20
- "key": "submit",
21
- "disableOnInvalid": true,
22
- "input": true,
23
- "tableView": false
24
- }
25
- ]
26
- };