@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.
Files changed (59) hide show
  1. package/.vscode/settings.json +2 -2
  2. package/CHANGELOG.md +289 -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,42 +1,48 @@
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 validation_1 = require("../utils/validation");
15
- var ColorPicker = (function (_super) {
16
- __extends(ColorPicker, _super);
17
- function ColorPicker(options) {
18
- var _this = _super.call(this, options) || this;
19
- _this.type = ColorPicker.type;
20
- _this.valueTypeDef = function () {
21
- return "string";
22
- };
23
- _this.description = options.description;
24
- _this.required = options.required;
25
- _this.output = options.output || 'auto';
26
- return _this;
27
- }
28
- ColorPicker.prototype.validateInput = function (value) {
29
- var errors = [];
30
- errors = errors.concat(validation_1.Validator.required(value, this.required));
31
- return errors;
32
- };
33
- ColorPicker.prototype.isValidValue = function (value) {
34
- return typeof value === 'string';
35
- };
36
- ColorPicker.type = 'color-picker';
37
- ColorPicker.fromJSON = function (value) {
38
- return new ColorPicker(value);
39
- };
40
- return ColorPicker;
41
- }(base_1.Input));
42
- exports.ColorPicker = ColorPicker;
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.ColorPicker = void 0;
19
+ var base_1 = require("../base");
20
+ var validation_1 = require("../utils/validation");
21
+ var ColorPicker = /** @class */ (function (_super) {
22
+ __extends(ColorPicker, _super);
23
+ function ColorPicker(options) {
24
+ var _this = _super.call(this, options) || this;
25
+ _this.type = ColorPicker.type;
26
+ _this.valueTypeDef = function () {
27
+ return "string";
28
+ };
29
+ _this.description = options.description;
30
+ _this.required = options.required;
31
+ _this.output = options.output || 'auto';
32
+ return _this;
33
+ }
34
+ ColorPicker.prototype.validateInput = function (value) {
35
+ var errors = [];
36
+ errors = errors.concat(validation_1.Validator.required(value, this.required));
37
+ return errors;
38
+ };
39
+ ColorPicker.prototype.isValidValue = function (value) {
40
+ return typeof value === 'string';
41
+ };
42
+ ColorPicker.type = 'color-picker';
43
+ ColorPicker.fromJSON = function (value) {
44
+ return new ColorPicker(value);
45
+ };
46
+ return ColorPicker;
47
+ }(base_1.Input));
48
+ exports.ColorPicker = ColorPicker;
@@ -1,35 +1,35 @@
1
- import { Input, IInput, Omit } from '../base';
2
- import { DateRangeValue } from '../values';
3
- import { ValueError } from '../errors';
4
- export interface IDateInput extends IInput {
5
- description?: string;
6
- required?: boolean;
7
- range?: DateRangeValue;
8
- mode?: Mode;
9
- displayClass?: DisplayClass;
10
- displayFormat?: string;
11
- }
12
- export declare type Mode = 'date' | 'datetime-local' | 'time';
13
- export declare type DisplayClass = 'fromNow' | 'toNow' | 'default';
14
- export interface DateInputJSON extends Omit<IDateInput, 'range'> {
15
- range?: string;
16
- }
17
- export declare namespace DateInput {
18
- type Error = ValueError.Required | ValueError.Max | ValueError.Min | ValueError.InvalidValue;
19
- type Value = string;
20
- }
21
- export declare class DateInput extends Input<DateInput.Value, DateInput.Error> {
22
- static type: string;
23
- type: string;
24
- readonly description?: string;
25
- readonly required?: boolean;
26
- readonly range?: DateRangeValue | undefined;
27
- readonly mode?: Mode;
28
- readonly displayClass?: DisplayClass;
29
- readonly displayFormat?: string;
30
- constructor(options: IDateInput);
31
- validateInput(value: string): DateInput.Error[];
32
- isValidValue(value: any): value is DateInput.Value;
33
- static fromJSON(value: DateInputJSON): DateInput;
34
- valueTypeDef: () => string;
35
- }
1
+ import { Input, IInput } from '../base';
2
+ import { DateRangeValue } from '../values';
3
+ import { ValueError } from '../errors';
4
+ export interface IDateInput extends IInput {
5
+ description?: string;
6
+ required?: boolean;
7
+ range?: DateRangeValue;
8
+ mode?: Mode;
9
+ displayClass?: DisplayClass;
10
+ displayFormat?: string;
11
+ }
12
+ export declare type Mode = 'date' | 'datetime-local' | 'time';
13
+ export declare type DisplayClass = 'fromNow' | 'toNow' | 'default';
14
+ export interface DateInputJSON extends Omit<IDateInput, 'range'> {
15
+ range?: string;
16
+ }
17
+ export declare namespace DateInput {
18
+ type Error = ValueError.Required | ValueError.Max | ValueError.Min | ValueError.InvalidValue;
19
+ type Value = string;
20
+ }
21
+ export declare class DateInput extends Input<DateInput.Value, DateInput.Error> {
22
+ static type: string;
23
+ type: string;
24
+ readonly description?: string;
25
+ readonly required?: boolean;
26
+ readonly range?: DateRangeValue | undefined;
27
+ readonly mode?: Mode;
28
+ readonly displayClass?: DisplayClass;
29
+ readonly displayFormat?: string;
30
+ constructor(options: IDateInput);
31
+ validateInput(value: string): DateInput.Error[];
32
+ isValidValue(value: any): value is DateInput.Value;
33
+ static fromJSON(value: DateInputJSON): DateInput;
34
+ valueTypeDef: () => string;
35
+ }
@@ -1,78 +1,87 @@
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
- var __assign = (this && this.__assign) || Object.assign || function(t) {
13
- for (var s, i = 1, n = arguments.length; i < n; i++) {
14
- s = arguments[i];
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
16
- t[p] = s[p];
17
- }
18
- return t;
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- var base_1 = require("../base");
22
- var values_1 = require("../values");
23
- var validation_1 = require("../utils/validation");
24
- var DateInput = (function (_super) {
25
- __extends(DateInput, _super);
26
- function DateInput(options) {
27
- var _this = _super.call(this, options) || this;
28
- _this.type = DateInput.type;
29
- _this.valueTypeDef = function () { return 'string'; };
30
- _this.description = options.description;
31
- _this.required = options.required;
32
- _this.range = options.range;
33
- _this.mode = options.mode;
34
- _this.displayClass = options.displayClass;
35
- _this.displayFormat = options.displayFormat;
36
- return _this;
37
- }
38
- DateInput.prototype.validateInput = function (value) {
39
- var errors = [];
40
- errors = errors.concat(validation_1.Validator.required(value, this.required));
41
- if (this.range) {
42
- if (this.mode !== 'time') {
43
- var dateValue = new Date(value);
44
- if (this.range.max) {
45
- var max = new Date(this.range.max);
46
- errors = errors.concat(validation_1.Validator.max(dateValue.getTime(), max.getTime()));
47
- }
48
- if (this.range.min) {
49
- var min = new Date(this.range.min);
50
- errors = errors.concat(validation_1.Validator.min(dateValue.getTime(), min.getTime()));
51
- }
52
- }
53
- else {
54
- var dateValue = value && Number(value.replace(':', ''));
55
- if (typeof dateValue === 'number' && !isNaN(dateValue)) {
56
- var min = this.range.min && Number(this.range.min.replace(':', ''));
57
- if (typeof min === 'number' && !isNaN(min))
58
- errors = errors.concat(validation_1.Validator.min(dateValue, min));
59
- var max = this.range.max && Number(this.range.max.replace(':', ''));
60
- if (typeof max === 'number' && !isNaN(max))
61
- errors = errors.concat(validation_1.Validator.max(dateValue, max));
62
- }
63
- }
64
- }
65
- return errors;
66
- };
67
- DateInput.prototype.isValidValue = function (value) {
68
- return this.mode === 'time'
69
- ? typeof value === 'string'
70
- : !isNaN(Date.parse(value));
71
- };
72
- DateInput.fromJSON = function (value) {
73
- return new DateInput(__assign({}, value, { range: value.range && values_1.DateRangeValue.fromJSON(value.range) || undefined }));
74
- };
75
- DateInput.type = 'date-input';
76
- return DateInput;
77
- }(base_1.Input));
78
- exports.DateInput = DateInput;
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.DateInput = void 0;
30
+ var base_1 = require("../base");
31
+ var values_1 = require("../values");
32
+ var validation_1 = require("../utils/validation");
33
+ var DateInput = /** @class */ (function (_super) {
34
+ __extends(DateInput, _super);
35
+ function DateInput(options) {
36
+ var _this = _super.call(this, options) || this;
37
+ _this.type = DateInput.type;
38
+ _this.valueTypeDef = function () { return 'string'; };
39
+ _this.description = options.description;
40
+ _this.required = options.required;
41
+ _this.range = options.range;
42
+ _this.mode = options.mode;
43
+ _this.displayClass = options.displayClass;
44
+ _this.displayFormat = options.displayFormat;
45
+ return _this;
46
+ }
47
+ DateInput.prototype.validateInput = function (value) {
48
+ var errors = [];
49
+ errors = errors.concat(validation_1.Validator.required(value, this.required));
50
+ if (this.range) {
51
+ if (this.mode !== 'time') {
52
+ var dateValue = new Date(value);
53
+ if (this.range.max) {
54
+ var max = new Date(this.range.max);
55
+ errors = errors.concat(validation_1.Validator.max(dateValue.getTime(), max.getTime()));
56
+ }
57
+ if (this.range.min) {
58
+ var min = new Date(this.range.min);
59
+ errors = errors.concat(validation_1.Validator.min(dateValue.getTime(), min.getTime()));
60
+ }
61
+ }
62
+ else {
63
+ var dateValue = value && Number(value.replace(':', ''));
64
+ if (typeof dateValue === 'number' && !isNaN(dateValue)) {
65
+ var min = this.range.min && Number(this.range.min.replace(':', ''));
66
+ if (typeof min === 'number' && !isNaN(min))
67
+ errors = errors.concat(validation_1.Validator.min(dateValue, min));
68
+ var max = this.range.max && Number(this.range.max.replace(':', ''));
69
+ if (typeof max === 'number' && !isNaN(max))
70
+ errors = errors.concat(validation_1.Validator.max(dateValue, max));
71
+ }
72
+ }
73
+ }
74
+ return errors;
75
+ };
76
+ DateInput.prototype.isValidValue = function (value) {
77
+ return this.mode === 'time'
78
+ ? typeof value === 'string'
79
+ : !isNaN(Date.parse(value));
80
+ };
81
+ DateInput.fromJSON = function (value) {
82
+ return new DateInput(__assign(__assign({}, value), { range: value.range && values_1.DateRangeValue.fromJSON(value.range) || undefined }));
83
+ };
84
+ DateInput.type = 'date-input';
85
+ return DateInput;
86
+ }(base_1.Input));
87
+ exports.DateInput = DateInput;
@@ -1,24 +1,24 @@
1
- import { TextArea } from './text-area';
2
- import { TextFormat } from './text-format';
3
- import { TextInput } from './text-input';
4
- import { Autocomplete } from './autocomplete';
5
- import { SelectInput } from './select-input';
6
- import { Switch } from './switch';
7
- import { NumberInput } from './number-input';
8
- import { ColorPicker } from './color-picker';
9
- import { DateInput } from './date-input';
10
- import { SelectAssetKna } from './select-asset-kna';
11
- import { Slider } from './slider';
12
- import { ServiceInput } from './service-input';
13
- export { TextFormat, TextInput, SelectInput, Switch, TextArea, Autocomplete, NumberInput, ColorPicker, DateInput, SelectAssetKna, Slider, ServiceInput };
14
- export declare type AnyJson = boolean | number | string | null | JsonArray | JsonMap | undefined;
15
- export interface JsonMap {
16
- [key: string]: AnyJson | undefined;
17
- }
18
- export interface JsonArray extends Array<AnyJson> {
19
- }
20
- export declare type InputValue = AnyJson;
21
- export declare type InputComponent = TextInput | TextFormat | SelectInput<string | number> | TextArea | Switch | Autocomplete<string | number> | NumberInput | ColorPicker | DateInput | SelectAssetKna | Slider | ServiceInput;
22
- export declare const allInputs: (typeof TextInput | typeof TextFormat | typeof Autocomplete | typeof Switch | typeof NumberInput | typeof ColorPicker | typeof DateInput | typeof SelectAssetKna | typeof Slider | typeof ServiceInput)[];
23
- export declare const isInput: (arg: any) => arg is InputComponent;
24
- export declare const isInputInstance: <T>(arg: any, type: string | string[]) => arg is T;
1
+ import { TextArea } from './text-area';
2
+ import { TextFormat } from './text-format';
3
+ import { TextInput } from './text-input';
4
+ import { Autocomplete } from './autocomplete';
5
+ import { SelectInput } from './select-input';
6
+ import { Switch } from './switch';
7
+ import { NumberInput } from './number-input';
8
+ import { ColorPicker } from './color-picker';
9
+ import { DateInput } from './date-input';
10
+ import { SelectAssetKna } from './select-asset-kna';
11
+ import { Slider } from './slider';
12
+ import { ServiceInput } from './service-input';
13
+ export { TextFormat, TextInput, SelectInput, Switch, TextArea, Autocomplete, NumberInput, ColorPicker, DateInput, SelectAssetKna, Slider, ServiceInput };
14
+ export declare type AnyJson = boolean | number | string | null | JsonArray | JsonMap | undefined;
15
+ export interface JsonMap {
16
+ [key: string]: AnyJson | undefined;
17
+ }
18
+ export interface JsonArray extends Array<AnyJson> {
19
+ }
20
+ export declare type InputValue = AnyJson;
21
+ export declare type InputComponent = TextInput | TextFormat | SelectInput<string | number> | TextArea | Switch | Autocomplete<string | number> | NumberInput | ColorPicker | DateInput | SelectAssetKna | Slider | ServiceInput;
22
+ export declare const allInputs: (typeof TextInput | typeof TextFormat | typeof Autocomplete | typeof Switch | typeof NumberInput | typeof ColorPicker | typeof DateInput | typeof SelectAssetKna | typeof Slider | typeof ServiceInput)[];
23
+ export declare const isInput: (arg: any) => arg is InputComponent;
24
+ export declare const isInputInstance: <T>(arg: any, type: string | string[]) => arg is T;
@@ -1,49 +1,52 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var text_area_1 = require("./text-area");
4
- exports.TextArea = text_area_1.TextArea;
5
- var text_format_1 = require("./text-format");
6
- exports.TextFormat = text_format_1.TextFormat;
7
- var text_input_1 = require("./text-input");
8
- exports.TextInput = text_input_1.TextInput;
9
- var autocomplete_1 = require("./autocomplete");
10
- exports.Autocomplete = autocomplete_1.Autocomplete;
11
- var select_input_1 = require("./select-input");
12
- exports.SelectInput = select_input_1.SelectInput;
13
- var switch_1 = require("./switch");
14
- exports.Switch = switch_1.Switch;
15
- var number_input_1 = require("./number-input");
16
- exports.NumberInput = number_input_1.NumberInput;
17
- var color_picker_1 = require("./color-picker");
18
- exports.ColorPicker = color_picker_1.ColorPicker;
19
- var date_input_1 = require("./date-input");
20
- exports.DateInput = date_input_1.DateInput;
21
- var select_asset_kna_1 = require("./select-asset-kna");
22
- exports.SelectAssetKna = select_asset_kna_1.SelectAssetKna;
23
- var slider_1 = require("./slider");
24
- exports.Slider = slider_1.Slider;
25
- var service_input_1 = require("./service-input");
26
- exports.ServiceInput = service_input_1.ServiceInput;
27
- exports.allInputs = [
28
- text_format_1.TextFormat,
29
- text_input_1.TextInput,
30
- select_input_1.SelectInput,
31
- switch_1.Switch,
32
- text_area_1.TextArea,
33
- autocomplete_1.Autocomplete,
34
- number_input_1.NumberInput,
35
- color_picker_1.ColorPicker,
36
- date_input_1.DateInput,
37
- select_asset_kna_1.SelectAssetKna,
38
- slider_1.Slider,
39
- service_input_1.ServiceInput
40
- ];
41
- exports.isInput = function (arg) {
42
- return arg && arg.id !== undefined && arg.valueTypeDef !== undefined;
43
- };
44
- exports.isInputInstance = function (arg, type) {
45
- if (typeof type === 'string')
46
- return arg && arg.type === type;
47
- else
48
- return arg && type.indexOf(arg.type) !== -1;
49
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isInputInstance = exports.isInput = exports.allInputs = exports.ServiceInput = exports.Slider = exports.SelectAssetKna = exports.DateInput = exports.ColorPicker = exports.NumberInput = exports.Autocomplete = exports.TextArea = exports.Switch = exports.SelectInput = exports.TextInput = exports.TextFormat = void 0;
4
+ var text_area_1 = require("./text-area");
5
+ Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return text_area_1.TextArea; } });
6
+ var text_format_1 = require("./text-format");
7
+ Object.defineProperty(exports, "TextFormat", { enumerable: true, get: function () { return text_format_1.TextFormat; } });
8
+ var text_input_1 = require("./text-input");
9
+ Object.defineProperty(exports, "TextInput", { enumerable: true, get: function () { return text_input_1.TextInput; } });
10
+ var autocomplete_1 = require("./autocomplete");
11
+ Object.defineProperty(exports, "Autocomplete", { enumerable: true, get: function () { return autocomplete_1.Autocomplete; } });
12
+ var select_input_1 = require("./select-input");
13
+ Object.defineProperty(exports, "SelectInput", { enumerable: true, get: function () { return select_input_1.SelectInput; } });
14
+ var switch_1 = require("./switch");
15
+ Object.defineProperty(exports, "Switch", { enumerable: true, get: function () { return switch_1.Switch; } });
16
+ var number_input_1 = require("./number-input");
17
+ Object.defineProperty(exports, "NumberInput", { enumerable: true, get: function () { return number_input_1.NumberInput; } });
18
+ var color_picker_1 = require("./color-picker");
19
+ Object.defineProperty(exports, "ColorPicker", { enumerable: true, get: function () { return color_picker_1.ColorPicker; } });
20
+ var date_input_1 = require("./date-input");
21
+ Object.defineProperty(exports, "DateInput", { enumerable: true, get: function () { return date_input_1.DateInput; } });
22
+ var select_asset_kna_1 = require("./select-asset-kna");
23
+ Object.defineProperty(exports, "SelectAssetKna", { enumerable: true, get: function () { return select_asset_kna_1.SelectAssetKna; } });
24
+ var slider_1 = require("./slider");
25
+ Object.defineProperty(exports, "Slider", { enumerable: true, get: function () { return slider_1.Slider; } });
26
+ var service_input_1 = require("./service-input");
27
+ Object.defineProperty(exports, "ServiceInput", { enumerable: true, get: function () { return service_input_1.ServiceInput; } });
28
+ exports.allInputs = [
29
+ text_format_1.TextFormat,
30
+ text_input_1.TextInput,
31
+ select_input_1.SelectInput,
32
+ switch_1.Switch,
33
+ text_area_1.TextArea,
34
+ autocomplete_1.Autocomplete,
35
+ number_input_1.NumberInput,
36
+ color_picker_1.ColorPicker,
37
+ date_input_1.DateInput,
38
+ select_asset_kna_1.SelectAssetKna,
39
+ slider_1.Slider,
40
+ service_input_1.ServiceInput
41
+ ];
42
+ var isInput = function (arg) {
43
+ return arg && arg.id !== undefined && arg.valueTypeDef !== undefined;
44
+ };
45
+ exports.isInput = isInput;
46
+ var isInputInstance = function (arg, type) {
47
+ if (typeof type === 'string')
48
+ return arg && arg.type === type;
49
+ else
50
+ return arg && type.indexOf(arg.type) !== -1;
51
+ };
52
+ exports.isInputInstance = isInputInstance;
@@ -1,29 +1,29 @@
1
- import { Omit, Input, IInput } from '../base';
2
- import { NumberRangeValue } from '../values';
3
- import { ValueError } from '../errors';
4
- export interface INumberInput extends IInput {
5
- description?: string;
6
- required?: boolean;
7
- displayFormat?: string;
8
- range?: NumberRangeValue;
9
- }
10
- export interface NumberInputJSON extends Omit<INumberInput, 'range'> {
11
- range?: string;
12
- }
13
- export declare namespace NumberInput {
14
- type Error = ValueError.Required | ValueError.Max | ValueError.Min | ValueError.InvalidValue;
15
- type Value = number | string;
16
- }
17
- export declare class NumberInput extends Input<NumberInput.Value, NumberInput.Error> {
18
- static type: string;
19
- type: string;
20
- readonly range?: NumberRangeValue;
21
- readonly description?: string;
22
- readonly required?: boolean;
23
- readonly displayFormat?: string;
24
- constructor(options: INumberInput);
25
- validateInput(value?: number): NumberInput.Error[];
26
- isValidValue(value: any): value is NumberInput.Value;
27
- static fromJSON(value: NumberInputJSON): NumberInput;
28
- valueTypeDef: () => string;
29
- }
1
+ import { Input, IInput } from '../base';
2
+ import { NumberRangeValue } from '../values';
3
+ import { ValueError } from '../errors';
4
+ export interface INumberInput extends IInput {
5
+ description?: string;
6
+ required?: boolean;
7
+ displayFormat?: string;
8
+ range?: NumberRangeValue;
9
+ }
10
+ export interface NumberInputJSON extends Omit<INumberInput, 'range'> {
11
+ range?: string;
12
+ }
13
+ export declare namespace NumberInput {
14
+ type Error = ValueError.Required | ValueError.Max | ValueError.Min | ValueError.InvalidValue;
15
+ type Value = number | string;
16
+ }
17
+ export declare class NumberInput extends Input<NumberInput.Value, NumberInput.Error> {
18
+ static type: string;
19
+ type: string;
20
+ readonly range?: NumberRangeValue;
21
+ readonly description?: string;
22
+ readonly required?: boolean;
23
+ readonly displayFormat?: string;
24
+ constructor(options: INumberInput);
25
+ validateInput(value?: number): NumberInput.Error[];
26
+ isValidValue(value: any): value is NumberInput.Value;
27
+ static fromJSON(value: NumberInputJSON): NumberInput;
28
+ valueTypeDef: () => string;
29
+ }