@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,51 +1,57 @@
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 Slider = (function (_super) {
15
- __extends(Slider, _super);
16
- function Slider(options) {
17
- var _this = _super.call(this, options) || this;
18
- _this.type = Slider.type;
19
- _this.valueTypeDef = function () {
20
- return "number";
21
- };
22
- _this.required = options.required;
23
- _this.min = options.min;
24
- _this.max = options.max;
25
- _this.step = options.step;
26
- _this.defaultValue = options.defaultValue;
27
- _this.leftTip = options.leftTip;
28
- _this.rightTip = options.rightTip;
29
- _this.description = options.description;
30
- return _this;
31
- }
32
- Slider.prototype.validateInput = function (value) {
33
- var errors = [];
34
- if (value === undefined && this.required)
35
- errors.push({ type: 'required' });
36
- if (value > this.max)
37
- errors.push({ type: 'max', payload: this.max });
38
- if (value < this.min)
39
- errors.push({ type: 'min', payload: this.min });
40
- return errors;
41
- };
42
- Slider.prototype.isValidValue = function (v) {
43
- return typeof v === 'number';
44
- };
45
- Slider.type = 'slider';
46
- Slider.fromJSON = function (value) {
47
- return new Slider(value);
48
- };
49
- return Slider;
50
- }(base_1.Input));
51
- exports.Slider = Slider;
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.Slider = void 0;
19
+ var base_1 = require("../base");
20
+ var Slider = /** @class */ (function (_super) {
21
+ __extends(Slider, _super);
22
+ function Slider(options) {
23
+ var _this = _super.call(this, options) || this;
24
+ _this.type = Slider.type;
25
+ _this.valueTypeDef = function () {
26
+ return "number";
27
+ };
28
+ _this.required = options.required;
29
+ _this.min = options.min;
30
+ _this.max = options.max;
31
+ _this.step = options.step;
32
+ _this.defaultValue = options.defaultValue;
33
+ _this.leftTip = options.leftTip;
34
+ _this.rightTip = options.rightTip;
35
+ _this.description = options.description;
36
+ return _this;
37
+ }
38
+ Slider.prototype.validateInput = function (value) {
39
+ var errors = [];
40
+ if (value === undefined && this.required)
41
+ errors.push({ type: 'required' });
42
+ if (value > this.max)
43
+ errors.push({ type: 'max', payload: this.max });
44
+ if (value < this.min)
45
+ errors.push({ type: 'min', payload: this.min });
46
+ return errors;
47
+ };
48
+ Slider.prototype.isValidValue = function (v) {
49
+ return typeof v === 'number';
50
+ };
51
+ Slider.type = 'slider';
52
+ Slider.fromJSON = function (value) {
53
+ return new Slider(value);
54
+ };
55
+ return Slider;
56
+ }(base_1.Input));
57
+ exports.Slider = Slider;
@@ -1,21 +1,21 @@
1
- import { Input, IInput } from '../base';
2
- export interface ISwitch extends IInput {
3
- defaultValue?: boolean;
4
- displayOnTrue?: string;
5
- displayOnFalse?: string;
6
- }
7
- export declare namespace Switch {
8
- type Value = boolean;
9
- }
10
- export declare class Switch extends Input<Switch.Value> {
11
- static type: string;
12
- type: string;
13
- readonly defaultValue?: boolean;
14
- readonly displayOnTrue?: string;
15
- readonly displayOnFalse?: string;
16
- constructor(options: ISwitch);
17
- validateInput(): never[];
18
- isValidValue(v: any): v is Switch.Value;
19
- static fromJSON: (value: ISwitch) => Switch;
20
- valueTypeDef: () => string;
21
- }
1
+ import { Input, IInput } from '../base';
2
+ export interface ISwitch extends IInput {
3
+ defaultValue?: boolean;
4
+ displayOnTrue?: string;
5
+ displayOnFalse?: string;
6
+ }
7
+ export declare namespace Switch {
8
+ type Value = boolean;
9
+ }
10
+ export declare class Switch extends Input<Switch.Value> {
11
+ static type: string;
12
+ type: string;
13
+ readonly defaultValue?: boolean;
14
+ readonly displayOnTrue?: string;
15
+ readonly displayOnFalse?: string;
16
+ constructor(options: ISwitch);
17
+ validateInput(): never[];
18
+ isValidValue(v: any): v is Switch.Value;
19
+ static fromJSON: (value: ISwitch) => Switch;
20
+ valueTypeDef: () => string;
21
+ }
@@ -1,39 +1,45 @@
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 Switch = (function (_super) {
15
- __extends(Switch, _super);
16
- function Switch(options) {
17
- var _this = _super.call(this, options) || this;
18
- _this.type = Switch.type;
19
- _this.valueTypeDef = function () {
20
- return "boolean";
21
- };
22
- _this.defaultValue = options.defaultValue;
23
- _this.displayOnTrue = options.displayOnTrue;
24
- _this.displayOnFalse = options.displayOnFalse;
25
- return _this;
26
- }
27
- Switch.prototype.validateInput = function () {
28
- return [];
29
- };
30
- Switch.prototype.isValidValue = function (v) {
31
- return typeof v === 'boolean';
32
- };
33
- Switch.type = 'switch';
34
- Switch.fromJSON = function (value) {
35
- return new Switch(value);
36
- };
37
- return Switch;
38
- }(base_1.Input));
39
- exports.Switch = Switch;
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.Switch = void 0;
19
+ var base_1 = require("../base");
20
+ var Switch = /** @class */ (function (_super) {
21
+ __extends(Switch, _super);
22
+ function Switch(options) {
23
+ var _this = _super.call(this, options) || this;
24
+ _this.type = Switch.type;
25
+ _this.valueTypeDef = function () {
26
+ return "boolean";
27
+ };
28
+ _this.defaultValue = options.defaultValue;
29
+ _this.displayOnTrue = options.displayOnTrue;
30
+ _this.displayOnFalse = options.displayOnFalse;
31
+ return _this;
32
+ }
33
+ Switch.prototype.validateInput = function () {
34
+ return [];
35
+ };
36
+ Switch.prototype.isValidValue = function (v) {
37
+ return typeof v === 'boolean';
38
+ };
39
+ Switch.type = 'switch';
40
+ Switch.fromJSON = function (value) {
41
+ return new Switch(value);
42
+ };
43
+ return Switch;
44
+ }(base_1.Input));
45
+ exports.Switch = Switch;
@@ -1,20 +1,20 @@
1
- import { TextInput, ITextInput, TextInputJSON } from './text-input';
2
- import { ValueError } from '../errors';
3
- export interface ITextArea {
4
- rows?: number;
5
- }
6
- export interface TextAreaJSON extends ITextArea, TextInputJSON {
7
- }
8
- export declare namespace TextArea {
9
- type Error = ValueError.Required | ValueError.Max | ValueError.Min | {
10
- type: 'pattern';
11
- };
12
- type Value = string;
13
- }
14
- export declare class TextArea extends TextInput {
15
- static type: string;
16
- type: string;
17
- readonly rows?: number;
18
- constructor(options: ITextArea & ITextInput);
19
- static fromJSON(value: TextAreaJSON): TextArea;
20
- }
1
+ import { TextInput, ITextInput, TextInputJSON } from './text-input';
2
+ import { ValueError } from '../errors';
3
+ export interface ITextArea {
4
+ rows?: number;
5
+ }
6
+ export interface TextAreaJSON extends ITextArea, TextInputJSON {
7
+ }
8
+ export declare namespace TextArea {
9
+ type Error = ValueError.Required | ValueError.Max | ValueError.Min | {
10
+ type: 'pattern';
11
+ };
12
+ type Value = string;
13
+ }
14
+ export declare class TextArea extends TextInput {
15
+ static type: string;
16
+ type: string;
17
+ readonly rows?: number;
18
+ constructor(options: ITextArea & ITextInput);
19
+ static fromJSON(value: TextAreaJSON): TextArea;
20
+ }
@@ -1,37 +1,46 @@
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 text_input_1 = require("./text-input");
22
- var TextArea = (function (_super) {
23
- __extends(TextArea, _super);
24
- function TextArea(options) {
25
- var _this = _super.call(this, options) || this;
26
- _this.type = TextArea.type;
27
- _this.rows = options.rows;
28
- return _this;
29
- }
30
- TextArea.fromJSON = function (value) {
31
- var parsed = text_input_1.TextInput.parseJSON(value);
32
- return new TextArea(__assign({}, parsed, { rows: value.rows }));
33
- };
34
- TextArea.type = 'text-area';
35
- return TextArea;
36
- }(text_input_1.TextInput));
37
- exports.TextArea = TextArea;
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.TextArea = void 0;
30
+ var text_input_1 = require("./text-input");
31
+ var TextArea = /** @class */ (function (_super) {
32
+ __extends(TextArea, _super);
33
+ function TextArea(options) {
34
+ var _this = _super.call(this, options) || this;
35
+ _this.type = TextArea.type;
36
+ _this.rows = options.rows;
37
+ return _this;
38
+ }
39
+ TextArea.fromJSON = function (value) {
40
+ var parsed = text_input_1.TextInput.parseJSON(value);
41
+ return new TextArea(__assign(__assign({}, parsed), { rows: value.rows }));
42
+ };
43
+ TextArea.type = 'text-area';
44
+ return TextArea;
45
+ }(text_input_1.TextInput));
46
+ exports.TextArea = TextArea;
@@ -1,28 +1,28 @@
1
- import { Input, IInput } from '../base';
2
- export interface ITextFormat extends IInput {
3
- description?: string;
4
- }
5
- export declare namespace TextFormat {
6
- type Value = {
7
- fontSize?: number;
8
- fontColor?: string;
9
- alignment?: {
10
- horizontal?: 'left' | 'right' | 'center';
11
- };
12
- font?: {
13
- filename: string;
14
- id: string;
15
- __isAsset: true;
16
- };
17
- };
18
- }
19
- export declare class TextFormat extends Input<TextFormat.Value> {
20
- static type: string;
21
- type: string;
22
- readonly description?: string;
23
- constructor(options: ITextFormat);
24
- validateInput(): never[];
25
- isValidValue(v: any): v is TextFormat.Value;
26
- static fromJSON: (value: ITextFormat) => TextFormat;
27
- valueTypeDef: () => string;
28
- }
1
+ import { Input, IInput } from '../base';
2
+ export interface ITextFormat extends IInput {
3
+ description?: string;
4
+ }
5
+ export declare namespace TextFormat {
6
+ type Value = {
7
+ fontSize?: number;
8
+ fontColor?: string;
9
+ alignment?: {
10
+ horizontal?: 'left' | 'right' | 'center';
11
+ };
12
+ font?: {
13
+ filename: string;
14
+ id: string;
15
+ __isAsset: true;
16
+ };
17
+ };
18
+ }
19
+ export declare class TextFormat extends Input<TextFormat.Value> {
20
+ static type: string;
21
+ type: string;
22
+ readonly description?: string;
23
+ constructor(options: ITextFormat);
24
+ validateInput(): never[];
25
+ isValidValue(v: any): v is TextFormat.Value;
26
+ static fromJSON: (value: ITextFormat) => TextFormat;
27
+ valueTypeDef: () => string;
28
+ }
@@ -1,37 +1,43 @@
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 TextFormat = (function (_super) {
15
- __extends(TextFormat, _super);
16
- function TextFormat(options) {
17
- var _this = _super.call(this, options) || this;
18
- _this.type = TextFormat.type;
19
- _this.valueTypeDef = function () {
20
- return "{ fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }";
21
- };
22
- _this.description = options.description;
23
- return _this;
24
- }
25
- TextFormat.prototype.validateInput = function () {
26
- return [];
27
- };
28
- TextFormat.prototype.isValidValue = function (v) {
29
- return typeof v === 'object';
30
- };
31
- TextFormat.type = 'text-format';
32
- TextFormat.fromJSON = function (value) {
33
- return new TextFormat(value);
34
- };
35
- return TextFormat;
36
- }(base_1.Input));
37
- exports.TextFormat = TextFormat;
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.TextFormat = void 0;
19
+ var base_1 = require("../base");
20
+ var TextFormat = /** @class */ (function (_super) {
21
+ __extends(TextFormat, _super);
22
+ function TextFormat(options) {
23
+ var _this = _super.call(this, options) || this;
24
+ _this.type = TextFormat.type;
25
+ _this.valueTypeDef = function () {
26
+ return "{ fontSize?: number, fontColor?: string, alignment?: { horizontal?: 'left' | 'right' | 'center' }, font?: { filename: string, id: string, __isAsset: true } }";
27
+ };
28
+ _this.description = options.description;
29
+ return _this;
30
+ }
31
+ TextFormat.prototype.validateInput = function () {
32
+ return [];
33
+ };
34
+ TextFormat.prototype.isValidValue = function (v) {
35
+ return typeof v === 'object';
36
+ };
37
+ TextFormat.type = 'text-format';
38
+ TextFormat.fromJSON = function (value) {
39
+ return new TextFormat(value);
40
+ };
41
+ return TextFormat;
42
+ }(base_1.Input));
43
+ exports.TextFormat = TextFormat;
@@ -1,34 +1,34 @@
1
- import { Input, IInput, Omit } from '../base';
2
- import { RangeValue } from '../values';
3
- import { ValueError } from '../errors';
4
- export interface ITextInput extends IInput {
5
- description?: string;
6
- required?: boolean;
7
- pattern?: string;
8
- displayFormat?: string;
9
- range?: RangeValue;
10
- }
11
- export interface TextInputJSON extends Omit<ITextInput, 'range'> {
12
- range?: string;
13
- }
14
- export declare namespace TextInput {
15
- type Error = ValueError.Required | ValueError.Max | ValueError.Min | {
16
- type: 'pattern';
17
- };
18
- type Value = string;
19
- }
20
- export declare class TextInput extends Input<TextInput.Value, TextInput.Error> {
21
- static type: string;
22
- type: string;
23
- readonly description?: string;
24
- readonly required?: boolean;
25
- readonly pattern?: string;
26
- readonly displayFormat?: string;
27
- readonly range?: RangeValue | undefined;
28
- constructor(options: ITextInput);
29
- validateInput(value?: string): TextInput.Error[];
30
- isValidValue(v: any): v is TextInput.Value;
31
- static fromJSON(value: TextInputJSON): TextInput;
32
- protected static parseJSON(value: TextInputJSON): ITextInput;
33
- valueTypeDef: () => string;
34
- }
1
+ import { Input, IInput } from '../base';
2
+ import { RangeValue } from '../values';
3
+ import { ValueError } from '../errors';
4
+ export interface ITextInput extends IInput {
5
+ description?: string;
6
+ required?: boolean;
7
+ pattern?: string;
8
+ displayFormat?: string;
9
+ range?: RangeValue;
10
+ }
11
+ export interface TextInputJSON extends Omit<ITextInput, 'range'> {
12
+ range?: string;
13
+ }
14
+ export declare namespace TextInput {
15
+ type Error = ValueError.Required | ValueError.Max | ValueError.Min | {
16
+ type: 'pattern';
17
+ };
18
+ type Value = string;
19
+ }
20
+ export declare class TextInput extends Input<TextInput.Value, TextInput.Error> {
21
+ static type: string;
22
+ type: string;
23
+ readonly description?: string;
24
+ readonly required?: boolean;
25
+ readonly pattern?: string;
26
+ readonly displayFormat?: string;
27
+ readonly range?: RangeValue | undefined;
28
+ constructor(options: ITextInput);
29
+ validateInput(value?: string): TextInput.Error[];
30
+ isValidValue(v: any): v is TextInput.Value;
31
+ static fromJSON(value: TextInputJSON): TextInput;
32
+ protected static parseJSON(value: TextInputJSON): ITextInput;
33
+ valueTypeDef: () => string;
34
+ }