@vixoniccom/modules 2.11.0 → 2.12.0-dev.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/.vscode/settings.json +2 -2
- package/CHANGELOG.md +289 -264
- package/dist/index.d.ts +6 -6
- package/dist/index.js +32 -31
- package/dist/lib/base.d.ts +28 -36
- package/dist/lib/base.js +63 -58
- package/dist/lib/containers/dynamic-matrix.d.ts +48 -48
- package/dist/lib/containers/dynamic-matrix.js +85 -76
- package/dist/lib/containers/group.d.ts +21 -21
- package/dist/lib/containers/group.js +56 -47
- package/dist/lib/containers/index.d.ts +6 -6
- package/dist/lib/containers/index.js +14 -13
- package/dist/lib/containers/list.d.ts +66 -66
- package/dist/lib/containers/list.js +114 -105
- package/dist/lib/errors.d.ts +22 -22
- package/dist/lib/errors.js +24 -23
- package/dist/lib/index.d.ts +29 -29
- package/dist/lib/index.js +136 -128
- package/dist/lib/inputs/autocomplete.d.ts +31 -31
- package/dist/lib/inputs/autocomplete.js +55 -49
- package/dist/lib/inputs/color-picker.d.ts +23 -23
- package/dist/lib/inputs/color-picker.js +48 -42
- package/dist/lib/inputs/date-input.d.ts +35 -35
- package/dist/lib/inputs/date-input.js +87 -78
- package/dist/lib/inputs/index.d.ts +24 -24
- package/dist/lib/inputs/index.js +52 -49
- package/dist/lib/inputs/number-input.d.ts +29 -29
- package/dist/lib/inputs/number-input.js +62 -53
- package/dist/lib/inputs/select-asset-kna.d.ts +34 -34
- package/dist/lib/inputs/select-asset-kna.js +56 -50
- package/dist/lib/inputs/select-input.d.ts +18 -18
- package/dist/lib/inputs/select-input.js +35 -29
- package/dist/lib/inputs/service-input.d.ts +27 -27
- package/dist/lib/inputs/service-input.js +47 -41
- package/dist/lib/inputs/slider.d.ts +33 -33
- package/dist/lib/inputs/slider.js +57 -51
- package/dist/lib/inputs/switch.d.ts +21 -21
- package/dist/lib/inputs/switch.js +45 -39
- package/dist/lib/inputs/text-area.d.ts +20 -20
- package/dist/lib/inputs/text-area.js +46 -37
- package/dist/lib/inputs/text-format.d.ts +28 -28
- package/dist/lib/inputs/text-format.js +43 -37
- package/dist/lib/inputs/text-input.d.ts +34 -34
- package/dist/lib/inputs/text-input.js +73 -64
- package/dist/lib/ui/index.d.ts +4 -4
- package/dist/lib/ui/index.js +6 -5
- package/dist/lib/ui/label.d.ts +18 -18
- package/dist/lib/ui/label.js +36 -30
- package/dist/lib/utils/index.d.ts +2 -1
- package/dist/lib/utils/index.js +28 -22
- package/dist/lib/utils/typeDefs.d.ts +7 -7
- package/dist/lib/utils/typeDefs.js +19 -18
- package/dist/lib/utils/validation.d.ts +7 -7
- package/dist/lib/utils/validation.js +27 -26
- package/dist/lib/values.d.ts +21 -21
- package/dist/lib/values.js +92 -86
- package/dist/lib/visibility.d.ts +2 -2
- package/dist/lib/visibility.js +21 -20
- package/package.json +23 -22
|
@@ -1,53 +1,62 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
extendStatics(d, b);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
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
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.NumberInput = void 0;
|
|
30
|
+
var base_1 = require("../base");
|
|
31
|
+
var values_1 = require("../values");
|
|
32
|
+
var validation_1 = require("../utils/validation");
|
|
33
|
+
var NumberInput = /** @class */ (function (_super) {
|
|
34
|
+
__extends(NumberInput, _super);
|
|
35
|
+
function NumberInput(options) {
|
|
36
|
+
var _this = _super.call(this, options) || this;
|
|
37
|
+
_this.type = NumberInput.type;
|
|
38
|
+
_this.valueTypeDef = function () { return 'number'; };
|
|
39
|
+
_this.range = options.range;
|
|
40
|
+
_this.description = options.description;
|
|
41
|
+
_this.required = options.required;
|
|
42
|
+
_this.displayFormat = options.displayFormat;
|
|
43
|
+
return _this;
|
|
44
|
+
}
|
|
45
|
+
NumberInput.prototype.validateInput = function (value) {
|
|
46
|
+
var errors = [];
|
|
47
|
+
errors = errors.concat(validation_1.Validator.required(value, this.required));
|
|
48
|
+
if (this.range && value) {
|
|
49
|
+
errors = errors.concat(validation_1.Validator.max(value, this.range.max), validation_1.Validator.min(value, this.range.min));
|
|
50
|
+
}
|
|
51
|
+
return errors;
|
|
52
|
+
};
|
|
53
|
+
NumberInput.prototype.isValidValue = function (value) {
|
|
54
|
+
return isNaN(value) === false;
|
|
55
|
+
};
|
|
56
|
+
NumberInput.fromJSON = function (value) {
|
|
57
|
+
return new NumberInput(__assign(__assign({}, value), { range: value.range && values_1.NumberRangeValue.fromJSON(value.range) || undefined }));
|
|
58
|
+
};
|
|
59
|
+
NumberInput.type = 'number-input';
|
|
60
|
+
return NumberInput;
|
|
61
|
+
}(base_1.Input));
|
|
62
|
+
exports.NumberInput = NumberInput;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { Input, IInput } from '../base';
|
|
2
|
-
import { ValueError } from '../errors';
|
|
3
|
-
export interface ISelectAssetKna extends IInput {
|
|
4
|
-
description?: string;
|
|
5
|
-
required?: boolean;
|
|
6
|
-
extensions?: string[];
|
|
7
|
-
multiple?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare namespace SelectAssetKna {
|
|
10
|
-
type Error = ValueError.Required | {
|
|
11
|
-
type: 'NotFound';
|
|
12
|
-
};
|
|
13
|
-
type Value = AssetValue | AssetValue[];
|
|
14
|
-
type AssetValue = {
|
|
15
|
-
id: string;
|
|
16
|
-
filename: string;
|
|
17
|
-
extension?: string;
|
|
18
|
-
__isAsset: true;
|
|
19
|
-
__notFound?: boolean;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export declare class SelectAssetKna extends Input<SelectAssetKna.Value, SelectAssetKna.Error> {
|
|
23
|
-
static type: string;
|
|
24
|
-
type: string;
|
|
25
|
-
readonly description?: string;
|
|
26
|
-
readonly required?: boolean;
|
|
27
|
-
readonly extensions?: string[];
|
|
28
|
-
readonly multiple: boolean;
|
|
29
|
-
constructor(options: ISelectAssetKna);
|
|
30
|
-
validateInput(value: SelectAssetKna.Value): SelectAssetKna.Error[];
|
|
31
|
-
isValidValue(v: any): v is SelectAssetKna.Value;
|
|
32
|
-
static fromJSON: (value: ISelectAssetKna) => SelectAssetKna;
|
|
33
|
-
valueTypeDef: () => string;
|
|
34
|
-
}
|
|
1
|
+
import { Input, IInput } from '../base';
|
|
2
|
+
import { ValueError } from '../errors';
|
|
3
|
+
export interface ISelectAssetKna extends IInput {
|
|
4
|
+
description?: string;
|
|
5
|
+
required?: boolean;
|
|
6
|
+
extensions?: string[];
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare namespace SelectAssetKna {
|
|
10
|
+
type Error = ValueError.Required | {
|
|
11
|
+
type: 'NotFound';
|
|
12
|
+
};
|
|
13
|
+
type Value = AssetValue | AssetValue[];
|
|
14
|
+
type AssetValue = {
|
|
15
|
+
id: string;
|
|
16
|
+
filename: string;
|
|
17
|
+
extension?: string;
|
|
18
|
+
__isAsset: true;
|
|
19
|
+
__notFound?: boolean;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare class SelectAssetKna extends Input<SelectAssetKna.Value, SelectAssetKna.Error> {
|
|
23
|
+
static type: string;
|
|
24
|
+
type: string;
|
|
25
|
+
readonly description?: string;
|
|
26
|
+
readonly required?: boolean;
|
|
27
|
+
readonly extensions?: string[];
|
|
28
|
+
readonly multiple: boolean;
|
|
29
|
+
constructor(options: ISelectAssetKna);
|
|
30
|
+
validateInput(value: SelectAssetKna.Value): SelectAssetKna.Error[];
|
|
31
|
+
isValidValue(v: any): v is SelectAssetKna.Value;
|
|
32
|
+
static fromJSON: (value: ISelectAssetKna) => SelectAssetKna;
|
|
33
|
+
valueTypeDef: () => string;
|
|
34
|
+
}
|
|
@@ -1,50 +1,56 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
extendStatics(d, b);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_this
|
|
25
|
-
_this.
|
|
26
|
-
_this.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
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.SelectAssetKna = void 0;
|
|
19
|
+
var base_1 = require("../base");
|
|
20
|
+
var validation_1 = require("../utils/validation");
|
|
21
|
+
var SelectAssetKna = /** @class */ (function (_super) {
|
|
22
|
+
__extends(SelectAssetKna, _super);
|
|
23
|
+
function SelectAssetKna(options) {
|
|
24
|
+
var _this = _super.call(this, options) || this;
|
|
25
|
+
_this.type = SelectAssetKna.type;
|
|
26
|
+
_this.valueTypeDef = function () {
|
|
27
|
+
return "{id?: string, filename?: string, extension?: string}" + (_this.multiple ? '[]' : '');
|
|
28
|
+
};
|
|
29
|
+
_this.description = options.description;
|
|
30
|
+
_this.required = options.required;
|
|
31
|
+
_this.extensions = options.extensions;
|
|
32
|
+
_this.multiple = options.multiple === true;
|
|
33
|
+
return _this;
|
|
34
|
+
}
|
|
35
|
+
SelectAssetKna.prototype.validateInput = function (value) {
|
|
36
|
+
var errors = [];
|
|
37
|
+
errors = errors.concat(validation_1.Validator.required(value, this.required));
|
|
38
|
+
if (value) {
|
|
39
|
+
var values = Array.isArray(value) ? value : [value];
|
|
40
|
+
if (values.some(function (x) { return x.__notFound === true; })) {
|
|
41
|
+
errors = errors.concat({ type: 'NotFound' });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return errors;
|
|
45
|
+
};
|
|
46
|
+
SelectAssetKna.prototype.isValidValue = function (v) {
|
|
47
|
+
var values = Array.isArray(v) ? v : [v];
|
|
48
|
+
return values.some(function (x) { return x.__isAsset !== true; }) === false;
|
|
49
|
+
};
|
|
50
|
+
SelectAssetKna.type = 'select-asset-kna-input';
|
|
51
|
+
SelectAssetKna.fromJSON = function (value) {
|
|
52
|
+
return new SelectAssetKna(value);
|
|
53
|
+
};
|
|
54
|
+
return SelectAssetKna;
|
|
55
|
+
}(base_1.Input));
|
|
56
|
+
exports.SelectAssetKna = SelectAssetKna;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Autocomplete, IAutocomplete } from './autocomplete';
|
|
2
|
-
import { ValueError } from '../errors';
|
|
3
|
-
export interface ISelectInput<T extends number | string> extends IAutocomplete<T> {
|
|
4
|
-
multiple?: boolean;
|
|
5
|
-
searchEnabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare namespace SelectInput {
|
|
8
|
-
type Error = ValueError.Required;
|
|
9
|
-
type Value = number | string | number[] | string[];
|
|
10
|
-
}
|
|
11
|
-
export declare class SelectInput<T extends number | string> extends Autocomplete<T> {
|
|
12
|
-
static type: string;
|
|
13
|
-
type: string;
|
|
14
|
-
readonly multiple?: boolean;
|
|
15
|
-
readonly searchEnabled?: boolean;
|
|
16
|
-
constructor(options: ISelectInput<T>);
|
|
17
|
-
static fromJSON(value: ISelectInput<any>): SelectInput<any>;
|
|
18
|
-
}
|
|
1
|
+
import { Autocomplete, IAutocomplete } from './autocomplete';
|
|
2
|
+
import { ValueError } from '../errors';
|
|
3
|
+
export interface ISelectInput<T extends number | string> extends IAutocomplete<T> {
|
|
4
|
+
multiple?: boolean;
|
|
5
|
+
searchEnabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace SelectInput {
|
|
8
|
+
type Error = ValueError.Required;
|
|
9
|
+
type Value = number | string | number[] | string[];
|
|
10
|
+
}
|
|
11
|
+
export declare class SelectInput<T extends number | string> extends Autocomplete<T> {
|
|
12
|
+
static type: string;
|
|
13
|
+
type: string;
|
|
14
|
+
readonly multiple?: boolean;
|
|
15
|
+
readonly searchEnabled?: boolean;
|
|
16
|
+
constructor(options: ISelectInput<T>);
|
|
17
|
+
static fromJSON(value: ISelectInput<any>): SelectInput<any>;
|
|
18
|
+
}
|
|
@@ -1,29 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
extendStatics(d, b);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
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.SelectInput = void 0;
|
|
19
|
+
var autocomplete_1 = require("./autocomplete");
|
|
20
|
+
var SelectInput = /** @class */ (function (_super) {
|
|
21
|
+
__extends(SelectInput, _super);
|
|
22
|
+
function SelectInput(options) {
|
|
23
|
+
var _this = _super.call(this, options) || this;
|
|
24
|
+
_this.type = SelectInput.type;
|
|
25
|
+
_this.multiple = options.multiple;
|
|
26
|
+
_this.searchEnabled = options.searchEnabled;
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
SelectInput.fromJSON = function (value) {
|
|
30
|
+
return new SelectInput(value);
|
|
31
|
+
};
|
|
32
|
+
SelectInput.type = 'select-input';
|
|
33
|
+
return SelectInput;
|
|
34
|
+
}(autocomplete_1.Autocomplete));
|
|
35
|
+
exports.SelectInput = SelectInput;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { Input, IInput } from '../base';
|
|
2
|
-
import { ValueError } from '../errors';
|
|
3
|
-
export declare type ServiceType = 'RSSService' | 'InstagramMediaService' | 'LinkedInCompanyMediaService' | 'FacebookPageService' | 'WeatherService';
|
|
4
|
-
export interface IServiceInput extends IInput {
|
|
5
|
-
serviceType: ServiceType;
|
|
6
|
-
required?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare namespace ServiceInput {
|
|
9
|
-
type Error = ValueError.Required;
|
|
10
|
-
type Value = {
|
|
11
|
-
id: string;
|
|
12
|
-
__isService: true;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export declare class ServiceInput extends Input<ServiceInput.Value, ServiceInput.Error> {
|
|
16
|
-
static type: string;
|
|
17
|
-
type: string;
|
|
18
|
-
readonly serviceType: ServiceType;
|
|
19
|
-
readonly required?: boolean;
|
|
20
|
-
constructor(options: IServiceInput);
|
|
21
|
-
validateInput(value?: {
|
|
22
|
-
id: string;
|
|
23
|
-
}): ServiceInput.Error[];
|
|
24
|
-
isValidValue(v: any): v is ServiceInput.Value;
|
|
25
|
-
static fromJSON: (value: IServiceInput) => ServiceInput;
|
|
26
|
-
valueTypeDef: () => string;
|
|
27
|
-
}
|
|
1
|
+
import { Input, IInput } from '../base';
|
|
2
|
+
import { ValueError } from '../errors';
|
|
3
|
+
export declare type ServiceType = 'RSSService' | 'InstagramMediaService' | 'LinkedInCompanyMediaService' | 'FacebookPageService' | 'WeatherService';
|
|
4
|
+
export interface IServiceInput extends IInput {
|
|
5
|
+
serviceType: ServiceType;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace ServiceInput {
|
|
9
|
+
type Error = ValueError.Required;
|
|
10
|
+
type Value = {
|
|
11
|
+
id: string;
|
|
12
|
+
__isService: true;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare class ServiceInput extends Input<ServiceInput.Value, ServiceInput.Error> {
|
|
16
|
+
static type: string;
|
|
17
|
+
type: string;
|
|
18
|
+
readonly serviceType: ServiceType;
|
|
19
|
+
readonly required?: boolean;
|
|
20
|
+
constructor(options: IServiceInput);
|
|
21
|
+
validateInput(value?: {
|
|
22
|
+
id: string;
|
|
23
|
+
}): ServiceInput.Error[];
|
|
24
|
+
isValidValue(v: any): v is ServiceInput.Value;
|
|
25
|
+
static fromJSON: (value: IServiceInput) => ServiceInput;
|
|
26
|
+
valueTypeDef: () => string;
|
|
27
|
+
}
|
|
@@ -1,41 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
extendStatics(d, b);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_this
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
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.ServiceInput = void 0;
|
|
19
|
+
var base_1 = require("../base");
|
|
20
|
+
var validation_1 = require("../utils/validation");
|
|
21
|
+
var ServiceInput = /** @class */ (function (_super) {
|
|
22
|
+
__extends(ServiceInput, _super);
|
|
23
|
+
function ServiceInput(options) {
|
|
24
|
+
var _this = _super.call(this, options) || this;
|
|
25
|
+
_this.type = ServiceInput.type;
|
|
26
|
+
_this.valueTypeDef = function () {
|
|
27
|
+
return "{ id: string }";
|
|
28
|
+
};
|
|
29
|
+
_this.serviceType = options.serviceType;
|
|
30
|
+
_this.required = options.required;
|
|
31
|
+
return _this;
|
|
32
|
+
}
|
|
33
|
+
ServiceInput.prototype.validateInput = function (value) {
|
|
34
|
+
var errors = [];
|
|
35
|
+
errors = errors.concat(validation_1.Validator.required(value, this.required));
|
|
36
|
+
return errors;
|
|
37
|
+
};
|
|
38
|
+
ServiceInput.prototype.isValidValue = function (v) {
|
|
39
|
+
return v && v.__isService;
|
|
40
|
+
};
|
|
41
|
+
ServiceInput.type = 'service-input';
|
|
42
|
+
ServiceInput.fromJSON = function (value) {
|
|
43
|
+
return new ServiceInput(value);
|
|
44
|
+
};
|
|
45
|
+
return ServiceInput;
|
|
46
|
+
}(base_1.Input));
|
|
47
|
+
exports.ServiceInput = ServiceInput;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { Input, IInput } from '../base';
|
|
2
|
-
import { ValueError } from '../errors';
|
|
3
|
-
export interface ISlider extends IInput {
|
|
4
|
-
required?: boolean;
|
|
5
|
-
min: number;
|
|
6
|
-
max: number;
|
|
7
|
-
step?: number;
|
|
8
|
-
defaultValue?: number;
|
|
9
|
-
description?: string;
|
|
10
|
-
leftTip?: string;
|
|
11
|
-
rightTip?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare namespace Slider {
|
|
14
|
-
type Error = ValueError.Required | ValueError.Max | ValueError.Min;
|
|
15
|
-
type Value = number;
|
|
16
|
-
}
|
|
17
|
-
export declare class Slider extends Input<Slider.Value, Slider.Error> {
|
|
18
|
-
static type: string;
|
|
19
|
-
type: string;
|
|
20
|
-
readonly required?: boolean;
|
|
21
|
-
readonly min: number;
|
|
22
|
-
readonly max: number;
|
|
23
|
-
readonly step?: number;
|
|
24
|
-
readonly defaultValue?: number;
|
|
25
|
-
readonly leftTip?: string;
|
|
26
|
-
readonly rightTip?: string;
|
|
27
|
-
readonly description?: string;
|
|
28
|
-
constructor(options: ISlider);
|
|
29
|
-
validateInput(value: Slider.Value): Slider.Error[];
|
|
30
|
-
isValidValue(v: any): v is Slider.Value;
|
|
31
|
-
static fromJSON: (value: ISlider) => Slider;
|
|
32
|
-
valueTypeDef: () => string;
|
|
33
|
-
}
|
|
1
|
+
import { Input, IInput } from '../base';
|
|
2
|
+
import { ValueError } from '../errors';
|
|
3
|
+
export interface ISlider extends IInput {
|
|
4
|
+
required?: boolean;
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
defaultValue?: number;
|
|
9
|
+
description?: string;
|
|
10
|
+
leftTip?: string;
|
|
11
|
+
rightTip?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace Slider {
|
|
14
|
+
type Error = ValueError.Required | ValueError.Max | ValueError.Min;
|
|
15
|
+
type Value = number;
|
|
16
|
+
}
|
|
17
|
+
export declare class Slider extends Input<Slider.Value, Slider.Error> {
|
|
18
|
+
static type: string;
|
|
19
|
+
type: string;
|
|
20
|
+
readonly required?: boolean;
|
|
21
|
+
readonly min: number;
|
|
22
|
+
readonly max: number;
|
|
23
|
+
readonly step?: number;
|
|
24
|
+
readonly defaultValue?: number;
|
|
25
|
+
readonly leftTip?: string;
|
|
26
|
+
readonly rightTip?: string;
|
|
27
|
+
readonly description?: string;
|
|
28
|
+
constructor(options: ISlider);
|
|
29
|
+
validateInput(value: Slider.Value): Slider.Error[];
|
|
30
|
+
isValidValue(v: any): v is Slider.Value;
|
|
31
|
+
static fromJSON: (value: ISlider) => Slider;
|
|
32
|
+
valueTypeDef: () => string;
|
|
33
|
+
}
|