verstak 0.24.132 → 0.24.134
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/build/dist/source/html/El.d.ts +27 -32
- package/build/dist/source/html/El.js +44 -42
- package/package.json +1 -1
|
@@ -8,12 +8,12 @@ export type El<T = any, M = any> = {
|
|
|
8
8
|
model: M;
|
|
9
9
|
kind: ElKind;
|
|
10
10
|
area: ElArea;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
width: Range;
|
|
12
|
+
widthOnlyMin: string;
|
|
13
|
+
widthOnlyGrowth: number;
|
|
14
|
+
height: Range;
|
|
15
|
+
heightOnlyMin: string;
|
|
16
|
+
heightOnlyGrowth: number;
|
|
17
17
|
contentAlignment: Align;
|
|
18
18
|
elementAlignment: Align;
|
|
19
19
|
contentWrapping: boolean;
|
|
@@ -47,14 +47,13 @@ export declare enum Align {
|
|
|
47
47
|
bottom = 12,
|
|
48
48
|
center = 10
|
|
49
49
|
}
|
|
50
|
-
export type
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
growth?: number;
|
|
50
|
+
export type Range = {
|
|
51
|
+
readonly min?: string;
|
|
52
|
+
readonly max?: string;
|
|
53
|
+
readonly growth?: number;
|
|
55
54
|
};
|
|
56
|
-
export type
|
|
57
|
-
|
|
55
|
+
export type MarkedRange = Range & {
|
|
56
|
+
readonly marker?: string;
|
|
58
57
|
};
|
|
59
58
|
export type ElArea = undefined | string | {
|
|
60
59
|
cellsOverWidth?: number;
|
|
@@ -70,12 +69,8 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
70
69
|
private _kind;
|
|
71
70
|
private _area;
|
|
72
71
|
private _coords;
|
|
73
|
-
private
|
|
74
|
-
private
|
|
75
|
-
private _maxWidth;
|
|
76
|
-
private _heightGrowth;
|
|
77
|
-
private _minHeight;
|
|
78
|
-
private _maxHeight;
|
|
72
|
+
private _width;
|
|
73
|
+
private _height;
|
|
79
74
|
private _contentAlignment;
|
|
80
75
|
private _elementAlignment;
|
|
81
76
|
private _contentWrapping;
|
|
@@ -90,18 +85,18 @@ export declare class ElImpl<T extends Element = any, M = any> implements El<T, M
|
|
|
90
85
|
set kind(value: ElKind);
|
|
91
86
|
get area(): ElArea;
|
|
92
87
|
set area(value: ElArea);
|
|
93
|
-
get
|
|
94
|
-
set
|
|
95
|
-
get
|
|
96
|
-
set
|
|
97
|
-
get
|
|
98
|
-
set
|
|
99
|
-
get
|
|
100
|
-
set
|
|
101
|
-
get
|
|
102
|
-
set
|
|
103
|
-
get
|
|
104
|
-
set
|
|
88
|
+
get width(): Range;
|
|
89
|
+
set width(value: Range);
|
|
90
|
+
get widthOnlyMin(): string;
|
|
91
|
+
set widthOnlyMin(value: string);
|
|
92
|
+
get widthOnlyGrowth(): number;
|
|
93
|
+
set widthOnlyGrowth(value: number);
|
|
94
|
+
get height(): Range;
|
|
95
|
+
set height(value: Range);
|
|
96
|
+
get heightOnlyMin(): string;
|
|
97
|
+
set heightOnlyMin(value: string);
|
|
98
|
+
get heightOnlyGrowth(): number;
|
|
99
|
+
set heightOnlyGrowth(value: number);
|
|
105
100
|
get contentAlignment(): Align;
|
|
106
101
|
set contentAlignment(value: Align);
|
|
107
102
|
get elementAlignment(): Align;
|
|
@@ -141,7 +136,7 @@ export declare class Apply {
|
|
|
141
136
|
static coords<T extends Element>(element: El<T, any>, value: ElCoords | undefined): void;
|
|
142
137
|
static widthGrowth<T extends Element>(element: El<T, any>, value: number): void;
|
|
143
138
|
static minWidth<T extends Element>(element: El<T, any>, value: string): void;
|
|
144
|
-
static
|
|
139
|
+
static maxWidth<T extends Element>(element: El<T, any>, value: string): void;
|
|
145
140
|
static heightGrowth<T extends Element>(element: El<T, any>, value: number): void;
|
|
146
141
|
static minHeight<T extends Element>(element: El<T, any>, value: string): void;
|
|
147
142
|
static maxHeight<T extends Element>(element: El<T, any>, value: string): void;
|
|
@@ -38,12 +38,8 @@ export class ElImpl {
|
|
|
38
38
|
this._kind = ElKind.part;
|
|
39
39
|
this._area = undefined;
|
|
40
40
|
this._coords = UndefinedElCoords;
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
43
|
-
this._maxWidth = "";
|
|
44
|
-
this._heightGrowth = 0;
|
|
45
|
-
this._minHeight = "";
|
|
46
|
-
this._maxHeight = "";
|
|
41
|
+
this._width = { min: "", max: "", growth: 0 };
|
|
42
|
+
this._height = { min: "", max: "", growth: 0 };
|
|
47
43
|
this._contentAlignment = Align.default;
|
|
48
44
|
this._elementAlignment = Align.default;
|
|
49
45
|
this._contentWrapping = true;
|
|
@@ -88,48 +84,54 @@ export class ElImpl {
|
|
|
88
84
|
else
|
|
89
85
|
this.rowBreak();
|
|
90
86
|
}
|
|
91
|
-
get
|
|
92
|
-
set
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
get width() { return this._width; }
|
|
88
|
+
set width(value) {
|
|
89
|
+
var _a, _b, _c;
|
|
90
|
+
const w = this._width;
|
|
91
|
+
let updated = false;
|
|
92
|
+
if (value.min !== w.min) {
|
|
93
|
+
Apply.minWidth(this, (_a = value.min) !== null && _a !== void 0 ? _a : "");
|
|
94
|
+
updated = true;
|
|
96
95
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (value !== this._minWidth) {
|
|
101
|
-
Apply.minWidth(this, value);
|
|
102
|
-
this._minWidth = value;
|
|
96
|
+
if (value.max !== w.max) {
|
|
97
|
+
Apply.maxWidth(this, (_b = value.max) !== null && _b !== void 0 ? _b : "");
|
|
98
|
+
updated = true;
|
|
103
99
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (value !== this._maxWidth) {
|
|
108
|
-
Apply.applyMaxWidth(this, value);
|
|
109
|
-
this._maxWidth = value;
|
|
100
|
+
if (value.growth !== w.growth) {
|
|
101
|
+
Apply.widthGrowth(this, (_c = value.growth) !== null && _c !== void 0 ? _c : 0);
|
|
102
|
+
updated = true;
|
|
110
103
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
104
|
+
if (updated)
|
|
105
|
+
this._width = value;
|
|
106
|
+
}
|
|
107
|
+
get widthOnlyMin() { var _a; return (_a = this._width.min) !== null && _a !== void 0 ? _a : ""; }
|
|
108
|
+
set widthOnlyMin(value) { this.width = { min: value }; }
|
|
109
|
+
get widthOnlyGrowth() { var _a; return (_a = this._width.growth) !== null && _a !== void 0 ? _a : 0; }
|
|
110
|
+
set widthOnlyGrowth(value) { this.width = { growth: value }; }
|
|
111
|
+
get height() { return this._height; }
|
|
112
|
+
set height(value) {
|
|
113
|
+
var _a, _b, _c;
|
|
114
|
+
const w = this._height;
|
|
115
|
+
let updated = false;
|
|
116
|
+
if (value.min !== w.min) {
|
|
117
|
+
Apply.minHeight(this, (_a = value.min) !== null && _a !== void 0 ? _a : "");
|
|
118
|
+
updated = true;
|
|
117
119
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if (value !== this._minHeight) {
|
|
122
|
-
Apply.minHeight(this, value);
|
|
123
|
-
this._minHeight = value;
|
|
120
|
+
if (value.max !== w.max) {
|
|
121
|
+
Apply.maxHeight(this, (_b = value.max) !== null && _b !== void 0 ? _b : "");
|
|
122
|
+
updated = true;
|
|
124
123
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (value !== this._maxHeight) {
|
|
129
|
-
Apply.maxHeight(this, value);
|
|
130
|
-
this._maxHeight = value;
|
|
124
|
+
if (value.growth !== w.growth) {
|
|
125
|
+
Apply.heightGrowth(this, (_c = value.growth) !== null && _c !== void 0 ? _c : 0);
|
|
126
|
+
updated = true;
|
|
131
127
|
}
|
|
128
|
+
if (updated)
|
|
129
|
+
this._height = value;
|
|
132
130
|
}
|
|
131
|
+
get heightOnlyMin() { var _a; return (_a = this._height.min) !== null && _a !== void 0 ? _a : ""; }
|
|
132
|
+
set heightOnlyMin(value) { this.height = { min: value }; }
|
|
133
|
+
get heightOnlyGrowth() { var _a; return (_a = this._height.growth) !== null && _a !== void 0 ? _a : 0; }
|
|
134
|
+
set heightOnlyGrowth(value) { this.height = { growth: value }; }
|
|
133
135
|
get contentAlignment() { return this._contentAlignment; }
|
|
134
136
|
set contentAlignment(value) {
|
|
135
137
|
if (value !== this._contentAlignment) {
|
|
@@ -336,7 +338,7 @@ export class Apply {
|
|
|
336
338
|
if (element.native instanceof HTMLElement)
|
|
337
339
|
element.native.style.minWidth = `${value}`;
|
|
338
340
|
}
|
|
339
|
-
static
|
|
341
|
+
static maxWidth(element, value) {
|
|
340
342
|
if (element.native instanceof HTMLElement)
|
|
341
343
|
element.native.style.maxWidth = `${value}`;
|
|
342
344
|
}
|