@vixoniccom/modules 2.16.1 → 2.16.2
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.
- package/CHANGELOG.md +16 -0
- package/dist/lib/base.d.ts +0 -1
- package/dist/lib/base.js +1 -1
- package/dist/lib/containers/dynamic-matrix.d.ts +3 -3
- package/dist/lib/containers/dynamic-matrix.js +3 -3
- package/dist/lib/containers/group.js +1 -1
- package/dist/lib/containers/index.d.ts +1 -1
- package/dist/lib/containers/list.d.ts +3 -3
- package/dist/lib/containers/list.js +3 -3
- package/dist/lib/errors.d.ts +2 -2
- package/dist/lib/errors.js +1 -1
- package/dist/lib/index.js +11 -7
- package/dist/lib/inputs/autocomplete.d.ts +1 -1
- package/dist/lib/inputs/autocomplete.js +2 -2
- package/dist/lib/inputs/date-input.d.ts +2 -2
- package/dist/lib/inputs/index.d.ts +3 -3
- package/dist/lib/inputs/select-asset-kna.js +1 -1
- package/dist/lib/inputs/service-input.d.ts +1 -1
- package/dist/lib/ui/index.d.ts +1 -1
- package/dist/lib/utils/index.js +12 -8
- package/dist/lib/utils/typeDefs.d.ts +1 -1
- package/dist/lib/utils/typeDefs.js +2 -2
- package/dist/lib/utils/validation.js +1 -1
- package/dist/lib/values.js +3 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.16.2](https://bitbucket.org/rexmas_cl/modules/compare/v2.16.2-dev.1...v2.16.2) (2024-01-09)
|
|
6
|
+
|
|
7
|
+
### [2.16.2-dev.1](https://bitbucket.org/rexmas_cl/modules/compare/v2.16.2-dev.0...v2.16.2-dev.1) (2023-12-22)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* typescript was upgrated to the lastest version and some errors were fixed ([eade391](https://bitbucket.org/rexmas_cl/modules/commit/eade39149d11163156e594ed3a359c80367d1d68))
|
|
13
|
+
|
|
14
|
+
### [2.16.2-dev.0](https://bitbucket.org/rexmas_cl/modules/compare/v2.16.1...v2.16.2-dev.0) (2023-12-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* several packages were upgrated: standard-version, node, ts-node and jest ([78714f2](https://bitbucket.org/rexmas_cl/modules/commit/78714f20d09f44ad88251db9b0f35c1aa260f14c))
|
|
20
|
+
|
|
5
21
|
### [2.16.1](https://bitbucket.org/rexmas_cl/modules/compare/v2.16.1-dev.1...v2.16.1) (2023-06-07)
|
|
6
22
|
|
|
7
23
|
### [2.16.1-dev.1](https://bitbucket.org/rexmas_cl/modules/compare/v2.16.1-dev.0...v2.16.1-dev.1) (2023-05-15)
|
package/dist/lib/base.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export interface IBaseElement {
|
|
|
9
9
|
export interface IInput extends IBaseElement {
|
|
10
10
|
}
|
|
11
11
|
export declare abstract class ConfigurationElement {
|
|
12
|
-
abstract readonly type: string;
|
|
13
12
|
static readonly type: string;
|
|
14
13
|
protected show?: string;
|
|
15
14
|
shouldShow(values: Configuration.Value): boolean;
|
package/dist/lib/base.js
CHANGED
|
@@ -21,7 +21,7 @@ var ConfigurationElement = /** @class */ (function () {
|
|
|
21
21
|
function ConfigurationElement() {
|
|
22
22
|
}
|
|
23
23
|
ConfigurationElement.prototype.shouldShow = function (values) {
|
|
24
|
-
return visibility_1.shouldBeVisible(this, values);
|
|
24
|
+
return (0, visibility_1.shouldBeVisible)(this, values);
|
|
25
25
|
};
|
|
26
26
|
return ConfigurationElement;
|
|
27
27
|
}());
|
|
@@ -5,8 +5,8 @@ import { UIComponent } from '../ui';
|
|
|
5
5
|
import { TypeDefMap } from '../utils/typeDefs';
|
|
6
6
|
import { ErrorsMap, Errors } from '../errors';
|
|
7
7
|
import { Configuration } from '..';
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type DisplayClass = '2-lines' | '1-line';
|
|
9
|
+
export type DisplayAttributes = {
|
|
10
10
|
title: string;
|
|
11
11
|
subtitle?: string;
|
|
12
12
|
};
|
|
@@ -20,7 +20,7 @@ export interface ListJSON extends Omit<IDynamicMatrix, 'itemSchema'> {
|
|
|
20
20
|
type: string;
|
|
21
21
|
}[];
|
|
22
22
|
}
|
|
23
|
-
export
|
|
23
|
+
export type MatrixItem = {
|
|
24
24
|
[key: string]: any;
|
|
25
25
|
};
|
|
26
26
|
export declare namespace DynamicMatrix {
|
|
@@ -37,10 +37,10 @@ var DynamicMatrix = /** @class */ (function (_super) {
|
|
|
37
37
|
_this.type = DynamicMatrix.type;
|
|
38
38
|
_this.valueTypeDef = function () {
|
|
39
39
|
var declarations = [];
|
|
40
|
-
declarations = declarations.concat(typeDefs_1.getDefsFromInputs(_this.itemSchema.filter(inputs_1.isInput)));
|
|
40
|
+
declarations = declarations.concat((0, typeDefs_1.getDefsFromInputs)(_this.itemSchema.filter(inputs_1.isInput)));
|
|
41
41
|
return {
|
|
42
42
|
id: _this.id,
|
|
43
|
-
typeDef: _this.listIds.map(function (id) { return "{ [key: string]: "; }).join('')
|
|
43
|
+
typeDef: "".concat(_this.listIds.map(function (id) { return "{ [key: string]: "; }).join(''), " {").concat((0, typeDefs_1.defsMapToString)(declarations), "}").concat(_this.listIds.map(function (id) { return ' }'; }).join(''))
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
_this.listIds = options.listIds.map(function (list) { return typeof list === 'string' ? list : list.id; });
|
|
@@ -61,7 +61,7 @@ var DynamicMatrix = /** @class */ (function (_super) {
|
|
|
61
61
|
DynamicMatrix.prototype.validateItem = function (value, ctx) {
|
|
62
62
|
var itemErrors = {};
|
|
63
63
|
this.itemSchema.forEach(function (input) {
|
|
64
|
-
if (inputs_1.isInput(input)) {
|
|
64
|
+
if ((0, inputs_1.isInput)(input)) {
|
|
65
65
|
itemErrors[input.id] = input.validate(value[input.id], ctx);
|
|
66
66
|
}
|
|
67
67
|
});
|
|
@@ -36,7 +36,7 @@ var Group = /** @class */ (function (_super) {
|
|
|
36
36
|
var _this = _super.call(this, options) || this;
|
|
37
37
|
_this.type = Group.type;
|
|
38
38
|
_this.valueTypeDef = function () {
|
|
39
|
-
return typeDefs_1.getDefsFromInputs(_this.items.filter(inputs_1.isInput));
|
|
39
|
+
return (0, typeDefs_1.getDefsFromInputs)(_this.items.filter(inputs_1.isInput));
|
|
40
40
|
};
|
|
41
41
|
_this.items = options.items;
|
|
42
42
|
return _this;
|
|
@@ -2,5 +2,5 @@ import { Group } from './group';
|
|
|
2
2
|
import { List } from './list';
|
|
3
3
|
import { DynamicMatrix } from './dynamic-matrix';
|
|
4
4
|
export { Group, List, DynamicMatrix };
|
|
5
|
-
export
|
|
5
|
+
export type ContainerComponent = Group | List;
|
|
6
6
|
export declare const allContainer: (typeof Group | typeof List | typeof DynamicMatrix)[];
|
|
@@ -5,8 +5,8 @@ import { UIComponent } from '../ui';
|
|
|
5
5
|
import { TypeDefMap } from '../utils/typeDefs';
|
|
6
6
|
import { ErrorsMap, Errors } from '../errors';
|
|
7
7
|
import { Configuration } from '..';
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type DisplayClass = '2-lines' | '1-line';
|
|
9
|
+
export type DisplayAttributes = {
|
|
10
10
|
title: string;
|
|
11
11
|
subtitle?: string;
|
|
12
12
|
expirationDate?: string;
|
|
@@ -28,7 +28,7 @@ export interface ListJSON extends Omit<IList, 'itemSchema' | 'range'> {
|
|
|
28
28
|
type: string;
|
|
29
29
|
}[];
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type ListItem = {
|
|
32
32
|
[key: string]: any;
|
|
33
33
|
__id: string | undefined;
|
|
34
34
|
};
|
|
@@ -38,10 +38,10 @@ var List = /** @class */ (function (_super) {
|
|
|
38
38
|
_this.type = List.type;
|
|
39
39
|
_this.valueTypeDef = function () {
|
|
40
40
|
var declarations = [];
|
|
41
|
-
declarations = declarations.concat(typeDefs_1.getDefsFromInputs(_this.itemSchema.filter(inputs_1.isInput)));
|
|
41
|
+
declarations = declarations.concat((0, typeDefs_1.getDefsFromInputs)(_this.itemSchema.filter(inputs_1.isInput)));
|
|
42
42
|
return {
|
|
43
43
|
id: _this.id,
|
|
44
|
-
typeDef: "{"
|
|
44
|
+
typeDef: "{".concat((0, typeDefs_1.defsMapToString)(declarations), ", __id: string | undefined}[]")
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
_this.itemSchema = options.itemSchema;
|
|
@@ -86,7 +86,7 @@ var List = /** @class */ (function (_super) {
|
|
|
86
86
|
if (value.__id) {
|
|
87
87
|
var itemErrors_1 = {};
|
|
88
88
|
this.itemSchema.forEach(function (input) {
|
|
89
|
-
if (inputs_1.isInput(input)) {
|
|
89
|
+
if ((0, inputs_1.isInput)(input)) {
|
|
90
90
|
itemErrors_1[input.id] = input.validate(value[input.id], ctx);
|
|
91
91
|
}
|
|
92
92
|
});
|
package/dist/lib/errors.d.ts
CHANGED
|
@@ -10,13 +10,13 @@ export interface SimpleValueError<E extends string> {
|
|
|
10
10
|
export interface PayloadValueError<E extends string, P> extends SimpleValueError<E> {
|
|
11
11
|
payload: P;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type ValueError<E extends string = string, P = {}> = SimpleValueError<E> | PayloadValueError<E, P>;
|
|
14
14
|
export declare namespace Errors {
|
|
15
15
|
const isMap: (errors: Errors) => errors is ErrorsMap<ValueError<string, {}>>;
|
|
16
16
|
const isArray: (errors: Errors) => errors is ValueError<string, {}>[];
|
|
17
17
|
const any: (errors: Errors | undefined) => boolean;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
19
|
+
export type Errors<E extends ValueError = ValueError> = E[] | ErrorsMap;
|
|
20
20
|
export interface ErrorsMap<E extends ValueError = ValueError> {
|
|
21
21
|
[id: string]: Errors | undefined;
|
|
22
22
|
}
|
package/dist/lib/errors.js
CHANGED
package/dist/lib/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -32,7 +36,7 @@ var Configuration = /** @class */ (function () {
|
|
|
32
36
|
var groupErrors_1 = {};
|
|
33
37
|
// Validate each input in a group.
|
|
34
38
|
container.items.forEach(function (input) {
|
|
35
|
-
if (inputs_1.isInput(input)) {
|
|
39
|
+
if ((0, inputs_1.isInput)(input)) {
|
|
36
40
|
var inputErrors = input.validate(state[input.id], state);
|
|
37
41
|
groupErrors_1[input.id] = inputErrors;
|
|
38
42
|
}
|
|
@@ -63,7 +67,7 @@ var Configuration = /** @class */ (function () {
|
|
|
63
67
|
});
|
|
64
68
|
var duplicatedIds = allIds.filter(function (e, i, s) { return s.indexOf(e) !== i; });
|
|
65
69
|
if (duplicatedIds.length > 0)
|
|
66
|
-
console.warn("Attention, your configuration has duplicated ids [\""
|
|
70
|
+
console.warn("Attention, your configuration has duplicated ids [\"".concat(duplicatedIds.join('", "'), "\"]. If it is not intentional please check it."));
|
|
67
71
|
return {
|
|
68
72
|
durationFormula: this.durationFormula,
|
|
69
73
|
schema: this.schema
|
|
@@ -81,13 +85,13 @@ var Configuration = /** @class */ (function () {
|
|
|
81
85
|
if (typeof time === 'number') {
|
|
82
86
|
// validate number
|
|
83
87
|
if (isNaN(time) || time < 4 || time >= 86400) {
|
|
84
|
-
console.warn("Computed time error: Number is not valid ["
|
|
88
|
+
console.warn("Computed time error: Number is not valid [".concat(time, "]"));
|
|
85
89
|
return undefined;
|
|
86
90
|
}
|
|
87
91
|
return time;
|
|
88
92
|
}
|
|
89
93
|
else {
|
|
90
|
-
console.warn("Computed time error: Time expression result is not a number [\""
|
|
94
|
+
console.warn("Computed time error: Time expression result is not a number [\"".concat(typeof time, "\"]"));
|
|
91
95
|
return undefined;
|
|
92
96
|
}
|
|
93
97
|
}
|
|
@@ -110,7 +114,7 @@ var Configuration = /** @class */ (function () {
|
|
|
110
114
|
case containers_1.DynamicMatrix.type:
|
|
111
115
|
return containers_1.DynamicMatrix.fromJSON(i);
|
|
112
116
|
}
|
|
113
|
-
throw new Error("Invalid component type \""
|
|
117
|
+
throw new Error("Invalid component type \"".concat(i.type, "\" in root configuration."));
|
|
114
118
|
})
|
|
115
119
|
});
|
|
116
120
|
};
|
|
@@ -120,7 +124,7 @@ var Configuration = /** @class */ (function () {
|
|
|
120
124
|
this.schema.forEach(function (g) {
|
|
121
125
|
declarations = declarations.concat(g.valueTypeDef());
|
|
122
126
|
});
|
|
123
|
-
return "declare type VixonicData = {\n downloadsPath: string\n services: { [key: string]: { data?: any, updatedAt?: number } }\n parameters: VixonicParameters\n}\n\ndeclare type VixonicParameters = Partial<{\n "
|
|
127
|
+
return "declare type VixonicData = {\n downloadsPath: string\n services: { [key: string]: { data?: any, updatedAt?: number } }\n parameters: VixonicParameters\n}\n\ndeclare type VixonicParameters = Partial<{\n ".concat((0, typeDefs_1.defsMapToString)(declarations), "\n}>");
|
|
124
128
|
},
|
|
125
129
|
enumerable: false,
|
|
126
130
|
configurable: true
|
|
@@ -26,11 +26,11 @@ var Autocomplete = /** @class */ (function (_super) {
|
|
|
26
26
|
_this.valueTypeDef = function () {
|
|
27
27
|
var options = _this.items.map(function (i) {
|
|
28
28
|
if (typeof i.value === 'string')
|
|
29
|
-
return "'"
|
|
29
|
+
return "'".concat(i.value, "'");
|
|
30
30
|
else
|
|
31
31
|
return i.value.toString();
|
|
32
32
|
}).join(' | ');
|
|
33
|
-
return _this.multiple ? "("
|
|
33
|
+
return _this.multiple ? "(".concat(options, ")[]") : options;
|
|
34
34
|
};
|
|
35
35
|
_this.description = options.description;
|
|
36
36
|
_this.items = options.items;
|
|
@@ -9,8 +9,8 @@ export interface IDateInput extends IInput {
|
|
|
9
9
|
displayClass?: DisplayClass;
|
|
10
10
|
displayFormat?: string;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type Mode = 'date' | 'datetime-local' | 'time';
|
|
13
|
+
export type DisplayClass = 'fromNow' | 'toNow' | 'default';
|
|
14
14
|
export interface DateInputJSON extends Omit<IDateInput, 'range'> {
|
|
15
15
|
range?: string;
|
|
16
16
|
}
|
|
@@ -12,14 +12,14 @@ import { SelectAssetKna } from './select-asset-kna';
|
|
|
12
12
|
import { Slider } from './slider';
|
|
13
13
|
import { ServiceInput } from './service-input';
|
|
14
14
|
export { BitlyInput, TextFormat, TextInput, SelectInput, Switch, TextArea, Autocomplete, NumberInput, ColorPicker, DateInput, SelectAssetKna, Slider, ServiceInput };
|
|
15
|
-
export
|
|
15
|
+
export type AnyJson = boolean | number | string | null | JsonArray | JsonMap | undefined;
|
|
16
16
|
export interface JsonMap {
|
|
17
17
|
[key: string]: AnyJson | undefined;
|
|
18
18
|
}
|
|
19
19
|
export interface JsonArray extends Array<AnyJson> {
|
|
20
20
|
}
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export type InputValue = AnyJson;
|
|
22
|
+
export type InputComponent = TextInput | TextFormat | BitlyInput | SelectInput<string | number> | TextArea | Switch | Autocomplete<string | number> | NumberInput | ColorPicker | DateInput | SelectAssetKna | Slider | ServiceInput;
|
|
23
23
|
export declare const allInputs: (typeof TextInput | typeof BitlyInput | typeof TextFormat | typeof Autocomplete | typeof Switch | typeof NumberInput | typeof ColorPicker | typeof DateInput | typeof SelectAssetKna | typeof Slider | typeof ServiceInput)[];
|
|
24
24
|
export declare const isInput: (arg: any) => arg is InputComponent;
|
|
25
25
|
export declare const isInputInstance: <T>(arg: any, type: string | string[]) => arg is T;
|
|
@@ -24,7 +24,7 @@ var SelectAssetKna = /** @class */ (function (_super) {
|
|
|
24
24
|
var _this = _super.call(this, options) || this;
|
|
25
25
|
_this.type = SelectAssetKna.type;
|
|
26
26
|
_this.valueTypeDef = function () {
|
|
27
|
-
return "{id?: string, filename?: string, extension?: string}"
|
|
27
|
+
return "{id?: string, filename?: string, extension?: string}".concat(_this.multiple ? '[]' : '');
|
|
28
28
|
};
|
|
29
29
|
_this.description = options.description;
|
|
30
30
|
_this.required = options.required;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Input, IInput } from '../base';
|
|
2
2
|
import { ValueError } from '../errors';
|
|
3
|
-
export
|
|
3
|
+
export type ServiceType = 'RSSService' | 'InstagramMediaService' | 'LinkedInCompanyMediaService' | 'FacebookPageService' | 'WeatherService' | 'VixonicStoriesService' | 'TwitterService' | 'TimezoneService' | 'ColabraService';
|
|
4
4
|
export interface IServiceInput extends IInput {
|
|
5
5
|
serviceType: ServiceType;
|
|
6
6
|
required?: boolean;
|
package/dist/lib/ui/index.d.ts
CHANGED
package/dist/lib/utils/index.js
CHANGED
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
3
|
-
for (var i = 0,
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
6
10
|
};
|
|
7
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
12
|
var ui_1 = require("../ui");
|
|
9
13
|
var inputs_1 = require("../inputs");
|
|
10
14
|
var containers_1 = require("../containers");
|
|
11
|
-
var allComponents = __spreadArray(__spreadArray(__spreadArray([], inputs_1.allInputs), ui_1.allUIComponents), containers_1.allContainer);
|
|
15
|
+
var allComponents = __spreadArray(__spreadArray(__spreadArray([], inputs_1.allInputs, true), ui_1.allUIComponents, true), containers_1.allContainer, true);
|
|
12
16
|
var createComponentFromJSON = function (type, value) {
|
|
13
17
|
var component = allComponents.find(function (i) {
|
|
14
18
|
return (i.type === type);
|
|
15
19
|
});
|
|
16
20
|
if (component) {
|
|
17
|
-
if (value && component.fromJSON) {
|
|
21
|
+
if (value && component.fromJSON(value)) {
|
|
18
22
|
return component.fromJSON(value);
|
|
19
23
|
}
|
|
20
24
|
else {
|
|
21
|
-
throw new Error("Component \""
|
|
25
|
+
throw new Error("Component \"".concat(type, "\" does not implement fromJSON"));
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
else {
|
|
25
|
-
throw new Error("Invalid component \""
|
|
29
|
+
throw new Error("Invalid component \"".concat(type, "\""));
|
|
26
30
|
}
|
|
27
31
|
};
|
|
28
32
|
exports.default = createComponentFromJSON;
|
|
@@ -10,10 +10,10 @@ function defsMapToString(defsMap) {
|
|
|
10
10
|
return defsMap.reduce(function (pV, e) {
|
|
11
11
|
var exist = pV.findIndex(function (iE) { return iE.id === e.id; });
|
|
12
12
|
if (exist !== -1) {
|
|
13
|
-
pV[exist].typeDef = pV[exist].typeDef
|
|
13
|
+
pV[exist].typeDef = "".concat(pV[exist].typeDef, " | ").concat(e.typeDef);
|
|
14
14
|
return pV;
|
|
15
15
|
}
|
|
16
16
|
return pV.concat(e);
|
|
17
|
-
}, reduced).map(function (e) { return e.id
|
|
17
|
+
}, reduced).map(function (e) { return "".concat(e.id, ": ").concat(e.typeDef); }).join(', ');
|
|
18
18
|
}
|
|
19
19
|
exports.defsMapToString = defsMapToString;
|
package/dist/lib/values.js
CHANGED
|
@@ -37,7 +37,7 @@ var RangeValue = /** @class */ (function () {
|
|
|
37
37
|
return p !== undefined && !isNaN(p) ? p : undefined;
|
|
38
38
|
};
|
|
39
39
|
RangeValue.prototype.toJSON = function () {
|
|
40
|
-
return "["
|
|
40
|
+
return "[".concat(this.min !== undefined ? this.min : '', ":").concat(this.max !== undefined ? this.max : '', "]");
|
|
41
41
|
};
|
|
42
42
|
return RangeValue;
|
|
43
43
|
}());
|
|
@@ -63,7 +63,7 @@ var NumberRangeValue = /** @class */ (function (_super) {
|
|
|
63
63
|
return new NumberRangeValue(min, max, step);
|
|
64
64
|
};
|
|
65
65
|
NumberRangeValue.prototype.toJSON = function () {
|
|
66
|
-
return "["
|
|
66
|
+
return "[".concat(this.min !== undefined ? this.min : '', ":").concat(this.max !== undefined ? this.max : '', ":").concat(this.step !== undefined ? this.step : '', "]");
|
|
67
67
|
};
|
|
68
68
|
return NumberRangeValue;
|
|
69
69
|
}(RangeValue));
|
|
@@ -85,7 +85,7 @@ var DateRangeValue = /** @class */ (function () {
|
|
|
85
85
|
return new DateRangeValue(min, max);
|
|
86
86
|
};
|
|
87
87
|
DateRangeValue.prototype.toJSON = function () {
|
|
88
|
-
return "["
|
|
88
|
+
return "[".concat(this.min !== undefined ? this.min : '', ":").concat(this.max !== undefined ? this.max : '', "]");
|
|
89
89
|
};
|
|
90
90
|
return DateRangeValue;
|
|
91
91
|
}());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vixoniccom/modules",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"author": "",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@types/node": "^
|
|
19
|
-
"jest": "^
|
|
20
|
-
"standard-version": "^9.
|
|
21
|
-
"ts-node": "^10.2
|
|
22
|
-
"typescript": "^
|
|
18
|
+
"@types/node": "^20.10.5",
|
|
19
|
+
"jest": "^29.7.0",
|
|
20
|
+
"standard-version": "^9.5.0",
|
|
21
|
+
"ts-node": "^10.9.2",
|
|
22
|
+
"typescript": "^5.3.3"
|
|
23
23
|
}
|
|
24
24
|
}
|