@vixoniccom/modules 2.11.0 → 2.12.0-dev.1

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.
Files changed (59) hide show
  1. package/.vscode/settings.json +2 -2
  2. package/CHANGELOG.md +282 -264
  3. package/dist/index.d.ts +6 -6
  4. package/dist/index.js +32 -31
  5. package/dist/lib/base.d.ts +28 -36
  6. package/dist/lib/base.js +63 -58
  7. package/dist/lib/containers/dynamic-matrix.d.ts +48 -48
  8. package/dist/lib/containers/dynamic-matrix.js +85 -76
  9. package/dist/lib/containers/group.d.ts +21 -21
  10. package/dist/lib/containers/group.js +56 -47
  11. package/dist/lib/containers/index.d.ts +6 -6
  12. package/dist/lib/containers/index.js +14 -13
  13. package/dist/lib/containers/list.d.ts +66 -66
  14. package/dist/lib/containers/list.js +114 -105
  15. package/dist/lib/errors.d.ts +22 -22
  16. package/dist/lib/errors.js +24 -23
  17. package/dist/lib/index.d.ts +29 -29
  18. package/dist/lib/index.js +136 -128
  19. package/dist/lib/inputs/autocomplete.d.ts +31 -31
  20. package/dist/lib/inputs/autocomplete.js +55 -49
  21. package/dist/lib/inputs/color-picker.d.ts +23 -23
  22. package/dist/lib/inputs/color-picker.js +48 -42
  23. package/dist/lib/inputs/date-input.d.ts +35 -35
  24. package/dist/lib/inputs/date-input.js +87 -78
  25. package/dist/lib/inputs/index.d.ts +24 -24
  26. package/dist/lib/inputs/index.js +52 -49
  27. package/dist/lib/inputs/number-input.d.ts +29 -29
  28. package/dist/lib/inputs/number-input.js +62 -53
  29. package/dist/lib/inputs/select-asset-kna.d.ts +34 -34
  30. package/dist/lib/inputs/select-asset-kna.js +56 -50
  31. package/dist/lib/inputs/select-input.d.ts +18 -18
  32. package/dist/lib/inputs/select-input.js +35 -29
  33. package/dist/lib/inputs/service-input.d.ts +27 -27
  34. package/dist/lib/inputs/service-input.js +47 -41
  35. package/dist/lib/inputs/slider.d.ts +33 -33
  36. package/dist/lib/inputs/slider.js +57 -51
  37. package/dist/lib/inputs/switch.d.ts +21 -21
  38. package/dist/lib/inputs/switch.js +45 -39
  39. package/dist/lib/inputs/text-area.d.ts +20 -20
  40. package/dist/lib/inputs/text-area.js +46 -37
  41. package/dist/lib/inputs/text-format.d.ts +28 -28
  42. package/dist/lib/inputs/text-format.js +43 -37
  43. package/dist/lib/inputs/text-input.d.ts +34 -34
  44. package/dist/lib/inputs/text-input.js +73 -64
  45. package/dist/lib/ui/index.d.ts +4 -4
  46. package/dist/lib/ui/index.js +6 -5
  47. package/dist/lib/ui/label.d.ts +18 -18
  48. package/dist/lib/ui/label.js +36 -30
  49. package/dist/lib/utils/index.d.ts +2 -1
  50. package/dist/lib/utils/index.js +28 -22
  51. package/dist/lib/utils/typeDefs.d.ts +7 -7
  52. package/dist/lib/utils/typeDefs.js +19 -18
  53. package/dist/lib/utils/validation.d.ts +7 -7
  54. package/dist/lib/utils/validation.js +27 -26
  55. package/dist/lib/values.d.ts +21 -21
  56. package/dist/lib/values.js +92 -86
  57. package/dist/lib/visibility.d.ts +2 -2
  58. package/dist/lib/visibility.js +21 -20
  59. package/package.json +23 -22
@@ -1,18 +1,18 @@
1
- import { ConfigurationElement } from '../base';
2
- export declare class Label extends ConfigurationElement {
3
- static type: string;
4
- type: string;
5
- readonly label: string;
6
- readonly description?: string;
7
- readonly show?: string;
8
- constructor(options: {
9
- label: string;
10
- description?: string;
11
- show?: string;
12
- });
13
- static fromJSON(value: {
14
- label: string;
15
- description?: string;
16
- show?: string;
17
- }): Label;
18
- }
1
+ import { ConfigurationElement } from '../base';
2
+ export declare class Label extends ConfigurationElement {
3
+ static type: string;
4
+ type: string;
5
+ readonly label: string;
6
+ readonly description?: string;
7
+ readonly show?: string;
8
+ constructor(options: {
9
+ label: string;
10
+ description?: string;
11
+ show?: string;
12
+ });
13
+ static fromJSON(value: {
14
+ label: string;
15
+ description?: string;
16
+ show?: string;
17
+ }): Label;
18
+ }
@@ -1,30 +1,36 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
- return function (d, b) {
7
- extendStatics(d, b);
8
- function __() { this.constructor = d; }
9
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
- };
11
- })();
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- var base_1 = require("../base");
14
- var Label = (function (_super) {
15
- __extends(Label, _super);
16
- function Label(options) {
17
- var _this = _super.call(this) || this;
18
- _this.type = Label.type;
19
- _this.label = options.label;
20
- _this.description = options.description;
21
- _this.show = options.show;
22
- return _this;
23
- }
24
- Label.fromJSON = function (value) {
25
- return new Label(value);
26
- };
27
- Label.type = 'label';
28
- return Label;
29
- }(base_1.ConfigurationElement));
30
- exports.Label = Label;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.Label = void 0;
19
+ var base_1 = require("../base");
20
+ var Label = /** @class */ (function (_super) {
21
+ __extends(Label, _super);
22
+ function Label(options) {
23
+ var _this = _super.call(this) || this;
24
+ _this.type = Label.type;
25
+ _this.label = options.label;
26
+ _this.description = options.description;
27
+ _this.show = options.show;
28
+ return _this;
29
+ }
30
+ Label.fromJSON = function (value) {
31
+ return new Label(value);
32
+ };
33
+ Label.type = 'label';
34
+ return Label;
35
+ }(base_1.ConfigurationElement));
36
+ exports.Label = Label;
@@ -1 +1,2 @@
1
- export declare const createComponentFromJSON: (type: string, value: any) => any;
1
+ declare const createComponentFromJSON: (type: string, value: any) => any | undefined;
2
+ export default createComponentFromJSON;
@@ -1,22 +1,28 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var ui_1 = require("../ui");
4
- var inputs_1 = require("../inputs");
5
- var containers_1 = require("../containers");
6
- var allComponents = inputs_1.allInputs.concat(ui_1.allUIComponents, containers_1.allContainer);
7
- exports.createComponentFromJSON = function (type, value) {
8
- var component = allComponents.find(function (i) {
9
- return (i.type === type);
10
- });
11
- if (component) {
12
- if (component.fromJSON) {
13
- return component.fromJSON(value);
14
- }
15
- else {
16
- throw new Error("Component \"" + type + "\" does not implement fromJSON");
17
- }
18
- }
19
- else {
20
- throw new Error("Invalid component \"" + type + "\"");
21
- }
22
- };
1
+ "use strict";
2
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
3
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
4
+ to[j] = from[i];
5
+ return to;
6
+ };
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ var ui_1 = require("../ui");
9
+ var inputs_1 = require("../inputs");
10
+ var containers_1 = require("../containers");
11
+ var allComponents = __spreadArray(__spreadArray(__spreadArray([], inputs_1.allInputs), ui_1.allUIComponents), containers_1.allContainer);
12
+ var createComponentFromJSON = function (type, value) {
13
+ var component = allComponents.find(function (i) {
14
+ return (i.type === type);
15
+ });
16
+ if (component) {
17
+ if (value && component.fromJSON) {
18
+ return component.fromJSON(value);
19
+ }
20
+ else {
21
+ throw new Error("Component \"" + type + "\" does not implement fromJSON");
22
+ }
23
+ }
24
+ else {
25
+ throw new Error("Invalid component \"" + type + "\"");
26
+ }
27
+ };
28
+ exports.default = createComponentFromJSON;
@@ -1,7 +1,7 @@
1
- import { InputComponent } from "../index";
2
- export declare type TypeDefMap = {
3
- id: string;
4
- typeDef: string;
5
- };
6
- export declare function getDefsFromInputs(inputs: InputComponent[]): TypeDefMap[];
7
- export declare function defsMapToString(defsMap: TypeDefMap[]): string;
1
+ import { InputComponent } from "../index";
2
+ export declare type TypeDefMap = {
3
+ id: string;
4
+ typeDef: string;
5
+ };
6
+ export declare function getDefsFromInputs(inputs: InputComponent[]): TypeDefMap[];
7
+ export declare function defsMapToString(defsMap: TypeDefMap[]): string;
@@ -1,18 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function getDefsFromInputs(inputs) {
4
- return inputs.map(function (i) { return ({ id: i.id, typeDef: i.valueTypeDef() }); });
5
- }
6
- exports.getDefsFromInputs = getDefsFromInputs;
7
- function defsMapToString(defsMap) {
8
- var reduced = [];
9
- return defsMap.reduce(function (pV, e) {
10
- var exist = pV.findIndex(function (iE) { return iE.id === e.id; });
11
- if (exist !== -1) {
12
- pV[exist].typeDef = pV[exist].typeDef + " | " + e.typeDef;
13
- return pV;
14
- }
15
- return pV.concat(e);
16
- }, reduced).map(function (e) { return e.id + ": " + e.typeDef; }).join(', ');
17
- }
18
- exports.defsMapToString = defsMapToString;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defsMapToString = exports.getDefsFromInputs = void 0;
4
+ function getDefsFromInputs(inputs) {
5
+ return inputs.map(function (i) { return ({ id: i.id, typeDef: i.valueTypeDef() }); });
6
+ }
7
+ exports.getDefsFromInputs = getDefsFromInputs;
8
+ function defsMapToString(defsMap) {
9
+ var reduced = [];
10
+ return defsMap.reduce(function (pV, e) {
11
+ var exist = pV.findIndex(function (iE) { return iE.id === e.id; });
12
+ if (exist !== -1) {
13
+ pV[exist].typeDef = pV[exist].typeDef + " | " + e.typeDef;
14
+ return pV;
15
+ }
16
+ return pV.concat(e);
17
+ }, reduced).map(function (e) { return e.id + ": " + e.typeDef; }).join(', ');
18
+ }
19
+ exports.defsMapToString = defsMapToString;
@@ -1,7 +1,7 @@
1
- import { SimpleValueError, PayloadValueError } from "../errors";
2
- export declare namespace Validator {
3
- const required: (value: any, required: boolean | undefined, onlyUndefined?: boolean) => SimpleValueError<"required">[];
4
- const min: (value: number, min: number | undefined) => PayloadValueError<"min", number>[];
5
- const max: (value: number, max: number | undefined) => PayloadValueError<"max", number>[];
6
- const invalidValue: () => SimpleValueError<"invalidValue">[];
7
- }
1
+ import { ValueError } from "../errors";
2
+ export declare namespace Validator {
3
+ const required: (value: any, required: boolean | undefined, onlyUndefined?: boolean) => Array<ValueError.Required>;
4
+ const min: (value: number, min: number | undefined) => Array<ValueError.Min>;
5
+ const max: (value: number, max: number | undefined) => Array<ValueError.Max>;
6
+ const invalidValue: () => Array<ValueError.InvalidValue>;
7
+ }
@@ -1,26 +1,27 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var Validator;
4
- (function (Validator) {
5
- Validator.required = function (value, required, onlyUndefined) {
6
- if (onlyUndefined === void 0) { onlyUndefined = false; }
7
- if ((value === undefined
8
- || (!onlyUndefined && (typeof value === 'string' && value === '')))
9
- && required)
10
- return [{ type: 'required' }];
11
- return [];
12
- };
13
- Validator.min = function (value, min) {
14
- if (min && value < min)
15
- return [{ type: 'min', payload: min }];
16
- return [];
17
- };
18
- Validator.max = function (value, max) {
19
- if (max && value > max)
20
- return [{ type: 'max', payload: max }];
21
- return [];
22
- };
23
- Validator.invalidValue = function () {
24
- return [{ type: 'invalidValue' }];
25
- };
26
- })(Validator = exports.Validator || (exports.Validator = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Validator = void 0;
4
+ var Validator;
5
+ (function (Validator) {
6
+ Validator.required = function (value, required, onlyUndefined) {
7
+ if (onlyUndefined === void 0) { onlyUndefined = false; }
8
+ if ((value === undefined
9
+ || (!onlyUndefined && (typeof value === 'string' && value === '')))
10
+ && required)
11
+ return [{ type: 'required' }];
12
+ return [];
13
+ };
14
+ Validator.min = function (value, min) {
15
+ if (min && value < min)
16
+ return [{ type: 'min', payload: min }];
17
+ return [];
18
+ };
19
+ Validator.max = function (value, max) {
20
+ if (max && value > max)
21
+ return [{ type: 'max', payload: max }];
22
+ return [];
23
+ };
24
+ Validator.invalidValue = function () {
25
+ return [{ type: 'invalidValue' }];
26
+ };
27
+ })(Validator = exports.Validator || (exports.Validator = {}));
@@ -1,21 +1,21 @@
1
- export declare class RangeValue {
2
- readonly min: number | undefined;
3
- readonly max: number | undefined;
4
- constructor(min?: number | undefined, max?: number | undefined);
5
- static fromJSON(value: string): RangeValue;
6
- protected static parseNumber(value: string): number | undefined;
7
- toJSON(): string;
8
- }
9
- export declare class NumberRangeValue extends RangeValue {
10
- readonly step: number | undefined;
11
- constructor(min?: number, max?: number, step?: number | undefined);
12
- static fromJSON(value: string): NumberRangeValue;
13
- toJSON(): string;
14
- }
15
- export declare class DateRangeValue {
16
- readonly min: string | undefined;
17
- readonly max: string | undefined;
18
- constructor(min?: string | undefined, max?: string | undefined);
19
- static fromJSON(value: string): DateRangeValue;
20
- toJSON(): string;
21
- }
1
+ export declare class RangeValue {
2
+ readonly min?: number | undefined;
3
+ readonly max?: number | undefined;
4
+ constructor(min?: number | undefined, max?: number | undefined);
5
+ static fromJSON(value: string): RangeValue;
6
+ protected static parseNumber(value: string): number | undefined;
7
+ toJSON(): string;
8
+ }
9
+ export declare class NumberRangeValue extends RangeValue {
10
+ readonly step?: number | undefined;
11
+ constructor(min?: number, max?: number, step?: number | undefined);
12
+ static fromJSON(value: string): NumberRangeValue;
13
+ toJSON(): string;
14
+ }
15
+ export declare class DateRangeValue {
16
+ readonly min?: string | undefined;
17
+ readonly max?: string | undefined;
18
+ constructor(min?: string | undefined, max?: string | undefined);
19
+ static fromJSON(value: string): DateRangeValue;
20
+ toJSON(): string;
21
+ }
@@ -1,86 +1,92 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
- return function (d, b) {
7
- extendStatics(d, b);
8
- function __() { this.constructor = d; }
9
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
10
- };
11
- })();
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- var RangeValue = (function () {
14
- function RangeValue(min, max) {
15
- this.min = min;
16
- this.max = max;
17
- }
18
- RangeValue.fromJSON = function (value) {
19
- var reg = new RegExp(/\[(.*):(.*)]/g);
20
- var match = reg.exec(value);
21
- var min;
22
- var max;
23
- if (match && match.length > 1) {
24
- min = this.parseNumber(match[1]);
25
- max = this.parseNumber(match[2]);
26
- }
27
- return new RangeValue(min, max);
28
- };
29
- RangeValue.parseNumber = function (value) {
30
- var p = value !== '' ? Number(value) : undefined;
31
- return p !== undefined && !isNaN(p) ? p : undefined;
32
- };
33
- RangeValue.prototype.toJSON = function () {
34
- return "[" + (this.min !== undefined ? this.min : '') + ":" + (this.max !== undefined ? this.max : '') + "]";
35
- };
36
- return RangeValue;
37
- }());
38
- exports.RangeValue = RangeValue;
39
- var NumberRangeValue = (function (_super) {
40
- __extends(NumberRangeValue, _super);
41
- function NumberRangeValue(min, max, step) {
42
- var _this = _super.call(this, min, max) || this;
43
- _this.step = step;
44
- return _this;
45
- }
46
- NumberRangeValue.fromJSON = function (value) {
47
- var reg = new RegExp(/\[(.*):(.*):(.*)]/g);
48
- var match = reg.exec(value);
49
- var min;
50
- var max;
51
- var step;
52
- if (match && match.length > 2) {
53
- min = this.parseNumber(match[1]);
54
- max = this.parseNumber(match[2]);
55
- step = this.parseNumber(match[3]);
56
- }
57
- return new NumberRangeValue(min, max, step);
58
- };
59
- NumberRangeValue.prototype.toJSON = function () {
60
- return "[" + (this.min !== undefined ? this.min : '') + ":" + (this.max !== undefined ? this.max : '') + ":" + (this.step !== undefined ? this.step : '') + "]";
61
- };
62
- return NumberRangeValue;
63
- }(RangeValue));
64
- exports.NumberRangeValue = NumberRangeValue;
65
- var DateRangeValue = (function () {
66
- function DateRangeValue(min, max) {
67
- this.min = min;
68
- this.max = max;
69
- }
70
- DateRangeValue.fromJSON = function (value) {
71
- var reg = new RegExp(/\[(.*):(.*)]/g);
72
- var match = reg.exec(value);
73
- var min;
74
- var max;
75
- if (match && match.length > 2) {
76
- min = match[1];
77
- max = match[2];
78
- }
79
- return new DateRangeValue(min, max);
80
- };
81
- DateRangeValue.prototype.toJSON = function () {
82
- return "[" + (this.min !== undefined ? this.min : '') + ":" + (this.max !== undefined ? this.max : '') + "]";
83
- };
84
- return DateRangeValue;
85
- }());
86
- exports.DateRangeValue = DateRangeValue;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.DateRangeValue = exports.NumberRangeValue = exports.RangeValue = void 0;
19
+ var RangeValue = /** @class */ (function () {
20
+ function RangeValue(min, max) {
21
+ this.min = min;
22
+ this.max = max;
23
+ }
24
+ RangeValue.fromJSON = function (value) {
25
+ var reg = new RegExp(/\[(.*):(.*)]/g);
26
+ var match = reg.exec(value);
27
+ var min;
28
+ var max;
29
+ if (match && match.length > 1) {
30
+ min = this.parseNumber(match[1]);
31
+ max = this.parseNumber(match[2]);
32
+ }
33
+ return new RangeValue(min, max);
34
+ };
35
+ RangeValue.parseNumber = function (value) {
36
+ var p = value !== '' ? Number(value) : undefined;
37
+ return p !== undefined && !isNaN(p) ? p : undefined;
38
+ };
39
+ RangeValue.prototype.toJSON = function () {
40
+ return "[" + (this.min !== undefined ? this.min : '') + ":" + (this.max !== undefined ? this.max : '') + "]";
41
+ };
42
+ return RangeValue;
43
+ }());
44
+ exports.RangeValue = RangeValue;
45
+ var NumberRangeValue = /** @class */ (function (_super) {
46
+ __extends(NumberRangeValue, _super);
47
+ function NumberRangeValue(min, max, step) {
48
+ var _this = _super.call(this, min, max) || this;
49
+ _this.step = step;
50
+ return _this;
51
+ }
52
+ NumberRangeValue.fromJSON = function (value) {
53
+ var reg = new RegExp(/\[(.*):(.*):(.*)]/g);
54
+ var match = reg.exec(value);
55
+ var min;
56
+ var max;
57
+ var step;
58
+ if (match && match.length > 2) {
59
+ min = this.parseNumber(match[1]);
60
+ max = this.parseNumber(match[2]);
61
+ step = this.parseNumber(match[3]);
62
+ }
63
+ return new NumberRangeValue(min, max, step);
64
+ };
65
+ NumberRangeValue.prototype.toJSON = function () {
66
+ return "[" + (this.min !== undefined ? this.min : '') + ":" + (this.max !== undefined ? this.max : '') + ":" + (this.step !== undefined ? this.step : '') + "]";
67
+ };
68
+ return NumberRangeValue;
69
+ }(RangeValue));
70
+ exports.NumberRangeValue = NumberRangeValue;
71
+ var DateRangeValue = /** @class */ (function () {
72
+ function DateRangeValue(min, max) {
73
+ this.min = min;
74
+ this.max = max;
75
+ }
76
+ DateRangeValue.fromJSON = function (value) {
77
+ var reg = new RegExp(/\[(.*):(.*)]/g);
78
+ var match = reg.exec(value);
79
+ var min;
80
+ var max;
81
+ if (match && match.length > 2) {
82
+ min = match[1];
83
+ max = match[2];
84
+ }
85
+ return new DateRangeValue(min, max);
86
+ };
87
+ DateRangeValue.prototype.toJSON = function () {
88
+ return "[" + (this.min !== undefined ? this.min : '') + ":" + (this.max !== undefined ? this.max : '') + "]";
89
+ };
90
+ return DateRangeValue;
91
+ }());
92
+ exports.DateRangeValue = DateRangeValue;
@@ -1,2 +1,2 @@
1
- import { Configuration } from ".";
2
- export declare function shouldBeVisible(item: any, _values: Configuration.Value): boolean;
1
+ import { Configuration } from ".";
2
+ export declare function shouldBeVisible(item: any, _values: Configuration.Value): boolean;
@@ -1,20 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- function shouldBeVisible(item, _values) {
4
- if (!item.show)
5
- return true;
6
- var jsEval = item.show;
7
- try {
8
- var regexp = new RegExp('{{(.*?)}}', 'ig');
9
- jsEval = jsEval.replace(regexp, "_values.$1");
10
- // tslint:disable-next-line
11
- var show = eval(jsEval);
12
- return show === true;
13
- }
14
- catch (e) {
15
- console.warn('Unable to parse expression:', jsEval);
16
- console.warn(e);
17
- return true;
18
- }
19
- }
20
- exports.shouldBeVisible = shouldBeVisible;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shouldBeVisible = void 0;
4
+ function shouldBeVisible(item, _values) {
5
+ if (!item.show)
6
+ return true;
7
+ var jsEval = item.show;
8
+ try {
9
+ var regexp = new RegExp('{{(.*?)}}', 'ig');
10
+ jsEval = jsEval.replace(regexp, "_values.$1");
11
+ // tslint:disable-next-line
12
+ var show = eval(jsEval);
13
+ return show === true;
14
+ }
15
+ catch (e) {
16
+ console.warn('Unable to parse expression:', jsEval);
17
+ console.warn(e);
18
+ return true;
19
+ }
20
+ }
21
+ exports.shouldBeVisible = shouldBeVisible;
package/package.json CHANGED
@@ -1,22 +1,23 @@
1
- {
2
- "name": "@vixoniccom/modules",
3
- "version": "2.11.0",
4
- "description": "",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "scripts": {
8
- "prepublishOnly": "npm run build",
9
- "build": "tsc",
10
- "release": "standard-version",
11
- "test": "ts-node ./test/index.ts"
12
- },
13
- "author": "",
14
- "license": "ISC",
15
- "devDependencies": {
16
- "@types/node": "^8.0.51",
17
- "jest": "^23.6.0",
18
- "standard-version": "^4.4.0",
19
- "ts-node": "^7.0.1",
20
- "typescript": "^2.4.2"
21
- }
22
- }
1
+ {
2
+ "name": "@vixoniccom/modules",
3
+ "version": "2.12.0-dev.1",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "prepublishOnly": "npm run build",
9
+ "build": "tsc",
10
+ "release": "standard-version",
11
+ "prerelease-dev": "standard-version --prerelease dev",
12
+ "test": "ts-node ./test/index.ts"
13
+ },
14
+ "author": "",
15
+ "license": "ISC",
16
+ "devDependencies": {
17
+ "@types/node": "^12.20.19",
18
+ "jest": "^27.0.6",
19
+ "standard-version": "^9.3.1",
20
+ "ts-node": "^10.2.1",
21
+ "typescript": "^4.3.5"
22
+ }
23
+ }