@tectra-ng/ui 0.1.3 → 0.1.4
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/accordion/README.md +61 -0
- package/breadcrumb/README.md +57 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs +980 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs +382 -0
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-file-upload.mjs +1452 -0
- package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-group.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
- package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-menubar.mjs +742 -0
- package/fesm2022/tectra-ng-ui-menubar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel-menu.mjs +610 -0
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs +319 -0
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-splitter.mjs +750 -0
- package/fesm2022/tectra-ng-ui-splitter.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-stepper.mjs +1166 -0
- package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-table.mjs +194 -50
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tabs.mjs +1218 -0
- package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-textarea.mjs +4 -1
- package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toolbar.mjs +348 -0
- package/fesm2022/tectra-ng-ui-toolbar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tree-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +80 -2
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/field/README.md +1 -1
- package/file-upload/README.md +85 -0
- package/menubar/README.md +51 -0
- package/package.json +44 -4
- package/panel-menu/README.md +45 -0
- package/scroll-panel/README.md +35 -0
- package/splitter/README.md +62 -0
- package/stepper/README.md +66 -0
- package/table/README.md +1 -1
- package/tabs/README.md +69 -0
- package/toolbar/README.md +35 -0
- package/types/tectra-ng-ui-accordion.d.ts +304 -0
- package/types/tectra-ng-ui-accordion.d.ts.map +1 -0
- package/types/tectra-ng-ui-breadcrumb.d.ts +157 -0
- package/types/tectra-ng-ui-breadcrumb.d.ts.map +1 -0
- package/types/tectra-ng-ui-file-upload.d.ts +527 -0
- package/types/tectra-ng-ui-file-upload.d.ts.map +1 -0
- package/types/tectra-ng-ui-menubar.d.ts +201 -0
- package/types/tectra-ng-ui-menubar.d.ts.map +1 -0
- package/types/tectra-ng-ui-panel-menu.d.ts +244 -0
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -0
- package/types/tectra-ng-ui-scroll-panel.d.ts +94 -0
- package/types/tectra-ng-ui-scroll-panel.d.ts.map +1 -0
- package/types/tectra-ng-ui-splitter.d.ts +226 -0
- package/types/tectra-ng-ui-splitter.d.ts.map +1 -0
- package/types/tectra-ng-ui-stepper.d.ts +446 -0
- package/types/tectra-ng-ui-stepper.d.ts.map +1 -0
- package/types/tectra-ng-ui-table.d.ts +2 -4
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tabs.d.ts +420 -0
- package/types/tectra-ng-ui-tabs.d.ts.map +1 -0
- package/types/tectra-ng-ui-textarea.d.ts +1 -0
- package/types/tectra-ng-ui-textarea.d.ts.map +1 -1
- package/types/tectra-ng-ui-toolbar.d.ts +85 -0
- package/types/tectra-ng-ui-toolbar.d.ts.map +1 -0
- package/types/tectra-ng-ui-tree-table.d.ts.map +1 -1
|
@@ -0,0 +1,750 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DOCUMENT, ElementRef, booleanAttribute, computed, contentChildren, effect, inject, input, numberAttribute, output, signal, untracked, viewChild, viewChildren } from "@angular/core";
|
|
3
|
+
import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
|
|
4
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
5
|
+
import { uniqueId } from "@tectra-ng/core/a11y";
|
|
6
|
+
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
7
|
+
import { injectTranslations } from "@tectra-ng/core/i18n";
|
|
8
|
+
import { toStyleObject } from "@tectra-ng/themes";
|
|
9
|
+
var TxSplitterPanel = class TxSplitterPanel {
|
|
10
|
+
size = input(void 0, {
|
|
11
|
+
...ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {},
|
|
12
|
+
transform: optionalNumber
|
|
13
|
+
});
|
|
14
|
+
minSize = input(void 0, {
|
|
15
|
+
...ngDevMode ? { debugName: "minSize" } : /* istanbul ignore next */ {},
|
|
16
|
+
transform: optionalNumber
|
|
17
|
+
});
|
|
18
|
+
maxSize = input(100, {
|
|
19
|
+
...ngDevMode ? { debugName: "maxSize" } : /* istanbul ignore next */ {},
|
|
20
|
+
transform: numberAttribute
|
|
21
|
+
});
|
|
22
|
+
collapsible = input(false, {
|
|
23
|
+
...ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {},
|
|
24
|
+
transform: booleanAttribute
|
|
25
|
+
});
|
|
26
|
+
collapsedSize = input(0, {
|
|
27
|
+
...ngDevMode ? { debugName: "collapsedSize" } : /* istanbul ignore next */ {},
|
|
28
|
+
transform: numberAttribute
|
|
29
|
+
});
|
|
30
|
+
content = viewChild.required("content", ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
32
|
+
minVersion: "12.0.0",
|
|
33
|
+
version: "22.2.3",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
type: TxSplitterPanel,
|
|
36
|
+
deps: [],
|
|
37
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
38
|
+
});
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
40
|
+
minVersion: "17.2.0",
|
|
41
|
+
version: "22.2.3",
|
|
42
|
+
type: TxSplitterPanel,
|
|
43
|
+
isStandalone: true,
|
|
44
|
+
selector: "tx-splitter-panel",
|
|
45
|
+
inputs: {
|
|
46
|
+
size: {
|
|
47
|
+
classPropertyName: "size",
|
|
48
|
+
publicName: "size",
|
|
49
|
+
isSignal: true,
|
|
50
|
+
isRequired: false,
|
|
51
|
+
transformFunction: null
|
|
52
|
+
},
|
|
53
|
+
minSize: {
|
|
54
|
+
classPropertyName: "minSize",
|
|
55
|
+
publicName: "minSize",
|
|
56
|
+
isSignal: true,
|
|
57
|
+
isRequired: false,
|
|
58
|
+
transformFunction: null
|
|
59
|
+
},
|
|
60
|
+
maxSize: {
|
|
61
|
+
classPropertyName: "maxSize",
|
|
62
|
+
publicName: "maxSize",
|
|
63
|
+
isSignal: true,
|
|
64
|
+
isRequired: false,
|
|
65
|
+
transformFunction: null
|
|
66
|
+
},
|
|
67
|
+
collapsible: {
|
|
68
|
+
classPropertyName: "collapsible",
|
|
69
|
+
publicName: "collapsible",
|
|
70
|
+
isSignal: true,
|
|
71
|
+
isRequired: false,
|
|
72
|
+
transformFunction: null
|
|
73
|
+
},
|
|
74
|
+
collapsedSize: {
|
|
75
|
+
classPropertyName: "collapsedSize",
|
|
76
|
+
publicName: "collapsedSize",
|
|
77
|
+
isSignal: true,
|
|
78
|
+
isRequired: false,
|
|
79
|
+
transformFunction: null
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
viewQueries: [{
|
|
83
|
+
propertyName: "content",
|
|
84
|
+
first: true,
|
|
85
|
+
predicate: ["content"],
|
|
86
|
+
descendants: true,
|
|
87
|
+
isSignal: true
|
|
88
|
+
}],
|
|
89
|
+
ngImport: i0,
|
|
90
|
+
template: "<ng-template #content><ng-content /></ng-template>",
|
|
91
|
+
isInline: true,
|
|
92
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
96
|
+
minVersion: "12.0.0",
|
|
97
|
+
version: "22.2.3",
|
|
98
|
+
ngImport: i0,
|
|
99
|
+
type: TxSplitterPanel,
|
|
100
|
+
decorators: [{
|
|
101
|
+
type: Component,
|
|
102
|
+
args: [{
|
|
103
|
+
selector: "tx-splitter-panel",
|
|
104
|
+
template: "<ng-template #content><ng-content /></ng-template>",
|
|
105
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
106
|
+
}]
|
|
107
|
+
}],
|
|
108
|
+
propDecorators: {
|
|
109
|
+
size: [{
|
|
110
|
+
type: i0.Input,
|
|
111
|
+
args: [{
|
|
112
|
+
isSignal: true,
|
|
113
|
+
alias: "size",
|
|
114
|
+
required: false
|
|
115
|
+
}]
|
|
116
|
+
}],
|
|
117
|
+
minSize: [{
|
|
118
|
+
type: i0.Input,
|
|
119
|
+
args: [{
|
|
120
|
+
isSignal: true,
|
|
121
|
+
alias: "minSize",
|
|
122
|
+
required: false
|
|
123
|
+
}]
|
|
124
|
+
}],
|
|
125
|
+
maxSize: [{
|
|
126
|
+
type: i0.Input,
|
|
127
|
+
args: [{
|
|
128
|
+
isSignal: true,
|
|
129
|
+
alias: "maxSize",
|
|
130
|
+
required: false
|
|
131
|
+
}]
|
|
132
|
+
}],
|
|
133
|
+
collapsible: [{
|
|
134
|
+
type: i0.Input,
|
|
135
|
+
args: [{
|
|
136
|
+
isSignal: true,
|
|
137
|
+
alias: "collapsible",
|
|
138
|
+
required: false
|
|
139
|
+
}]
|
|
140
|
+
}],
|
|
141
|
+
collapsedSize: [{
|
|
142
|
+
type: i0.Input,
|
|
143
|
+
args: [{
|
|
144
|
+
isSignal: true,
|
|
145
|
+
alias: "collapsedSize",
|
|
146
|
+
required: false
|
|
147
|
+
}]
|
|
148
|
+
}],
|
|
149
|
+
content: [{
|
|
150
|
+
type: i0.ViewChild,
|
|
151
|
+
args: ["content", { isSignal: true }]
|
|
152
|
+
}]
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
function moveGutter(state, limits, gutter, delta) {
|
|
156
|
+
const next = {
|
|
157
|
+
sizes: [...state.sizes],
|
|
158
|
+
collapsed: [...state.collapsed]
|
|
159
|
+
};
|
|
160
|
+
if (delta > 0) grow(next, limits, gutter, delta, 1);
|
|
161
|
+
else if (delta < 0) grow(next, limits, gutter + 1, -delta, -1);
|
|
162
|
+
return next;
|
|
163
|
+
}
|
|
164
|
+
function grow(state, limits, index, requested, direction) {
|
|
165
|
+
const { sizes, collapsed } = state;
|
|
166
|
+
const own = limits[index];
|
|
167
|
+
const room = Math.max(0, own.maxSize - sizes[index]);
|
|
168
|
+
let wanted = Math.min(requested, room);
|
|
169
|
+
if (own.collapsible && collapsed[index]) wanted = Math.min(Math.max(wanted, own.minSize - own.collapsedSize), room);
|
|
170
|
+
let taken = 0;
|
|
171
|
+
for (let i = index + direction; i >= 0 && i < sizes.length && taken < wanted; i += direction) {
|
|
172
|
+
const other = limits[i];
|
|
173
|
+
if (collapsed[i]) continue;
|
|
174
|
+
const floor = other.collapsible ? other.collapsedSize : other.minSize;
|
|
175
|
+
const amount = Math.min(wanted - taken, Math.max(0, sizes[i] - floor));
|
|
176
|
+
const raw = sizes[i] - amount;
|
|
177
|
+
const snaps = other.collapsible && raw < other.minSize;
|
|
178
|
+
const size = snaps ? other.collapsedSize : Math.max(raw, other.minSize);
|
|
179
|
+
taken += sizes[i] - size;
|
|
180
|
+
sizes[i] = size;
|
|
181
|
+
collapsed[i] = snaps;
|
|
182
|
+
}
|
|
183
|
+
sizes[index] += taken;
|
|
184
|
+
if (own.collapsible && collapsed[index] && sizes[index] >= own.minSize) collapsed[index] = false;
|
|
185
|
+
}
|
|
186
|
+
var TxSplitter = class TxSplitter {
|
|
187
|
+
host = inject(ElementRef);
|
|
188
|
+
document = inject(DOCUMENT);
|
|
189
|
+
nested = inject(TxSplitter, {
|
|
190
|
+
optional: true,
|
|
191
|
+
skipSelf: true
|
|
192
|
+
}) !== null;
|
|
193
|
+
layout = input("horizontal", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
|
|
194
|
+
panelSizes = input([], ...ngDevMode ? [{ debugName: "panelSizes" }] : /* istanbul ignore next */ []);
|
|
195
|
+
minSizes = input([], ...ngDevMode ? [{ debugName: "minSizes" }] : /* istanbul ignore next */ []);
|
|
196
|
+
gutterSize = input(1, {
|
|
197
|
+
...ngDevMode ? { debugName: "gutterSize" } : /* istanbul ignore next */ {},
|
|
198
|
+
transform: numberAttribute
|
|
199
|
+
});
|
|
200
|
+
step = input(5, {
|
|
201
|
+
...ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {},
|
|
202
|
+
transform: numberAttribute
|
|
203
|
+
});
|
|
204
|
+
disabled = input(false, {
|
|
205
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
206
|
+
transform: booleanAttribute
|
|
207
|
+
});
|
|
208
|
+
stateKey = input(void 0, ...ngDevMode ? [{ debugName: "stateKey" }] : /* istanbul ignore next */ []);
|
|
209
|
+
stateStorage = input("session", ...ngDevMode ? [{ debugName: "stateStorage" }] : /* istanbul ignore next */ []);
|
|
210
|
+
gutterAriaLabel = input(void 0, ...ngDevMode ? [{ debugName: "gutterAriaLabel" }] : /* istanbul ignore next */ []);
|
|
211
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
212
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
213
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
214
|
+
unstyled = input(void 0, {
|
|
215
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
216
|
+
transform: optionalBoolean
|
|
217
|
+
});
|
|
218
|
+
resizeStart = output();
|
|
219
|
+
resizing = output();
|
|
220
|
+
resizeEnd = output();
|
|
221
|
+
collapsedChange = output();
|
|
222
|
+
translations = injectTranslations();
|
|
223
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
224
|
+
passThrough = injectPassThrough("splitter", this, this.pt, this.ptOptions);
|
|
225
|
+
panels = contentChildren(TxSplitterPanel, ...ngDevMode ? [{ debugName: "panels" }] : /* istanbul ignore next */ []);
|
|
226
|
+
panelElements = viewChildren("panelElement", ...ngDevMode ? [{ debugName: "panelElements" }] : /* istanbul ignore next */ []);
|
|
227
|
+
state = signal({
|
|
228
|
+
sizes: [],
|
|
229
|
+
collapsed: []
|
|
230
|
+
}, ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
|
|
231
|
+
sizes = computed(() => this.state().sizes, ...ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []);
|
|
232
|
+
collapsed = computed(() => this.state().collapsed, ...ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []);
|
|
233
|
+
resizingGutter = signal(null, ...ngDevMode ? [{ debugName: "resizingGutter" }] : /* istanbul ignore next */ []);
|
|
234
|
+
id = uniqueId("tx-splitter");
|
|
235
|
+
limits = computed(() => {
|
|
236
|
+
const minSizes = this.minSizes();
|
|
237
|
+
return this.panels().map((panel, index) => ({
|
|
238
|
+
minSize: panel.minSize() ?? minSizes[index] ?? 0,
|
|
239
|
+
maxSize: panel.maxSize(),
|
|
240
|
+
collapsible: panel.collapsible(),
|
|
241
|
+
collapsedSize: panel.collapsedSize()
|
|
242
|
+
}));
|
|
243
|
+
}, ...ngDevMode ? [{ debugName: "limits" }] : /* istanbul ignore next */ []);
|
|
244
|
+
initialSizes = computed(() => {
|
|
245
|
+
const panels = this.panels();
|
|
246
|
+
const panelSizes = this.panelSizes();
|
|
247
|
+
return panels.map((panel, index) => panelSizes[index] ?? panel.size() ?? 100 / panels.length);
|
|
248
|
+
}, ...ngDevMode ? [{ debugName: "initialSizes" }] : /* istanbul ignore next */ []);
|
|
249
|
+
signature = computed(() => `${this.initialSizes().join(",")}|${this.limits().map((limit) => `${limit.minSize}:${limit.maxSize}:${limit.collapsible}:${limit.collapsedSize}`).join(",")}|${this.stateKey() ?? ""}`, ...ngDevMode ? [{ debugName: "signature" }] : /* istanbul ignore next */ []);
|
|
250
|
+
flex = computed(() => this.sizes().map((size) => `${size} 1 0px`), ...ngDevMode ? [{ debugName: "flex" }] : /* istanbul ignore next */ []);
|
|
251
|
+
gutterLabel = computed(() => this.gutterAriaLabel() ?? this.translations().resizePanels, ...ngDevMode ? [{ debugName: "gutterLabel" }] : /* istanbul ignore next */ []);
|
|
252
|
+
gutterRanges = computed(() => {
|
|
253
|
+
const { sizes } = this.state();
|
|
254
|
+
const limits = this.limits();
|
|
255
|
+
return sizes.slice(0, -1).map((size, index) => {
|
|
256
|
+
const spare = sizes.slice(index + 1).reduce((sum, next, offset) => sum + Math.max(0, next - this.floorOf(limits[index + 1 + offset])), 0);
|
|
257
|
+
return {
|
|
258
|
+
now: Math.round(size),
|
|
259
|
+
min: Math.round(this.floorOf(limits[index])),
|
|
260
|
+
max: Math.round(Math.min(limits[index].maxSize, size + spare))
|
|
261
|
+
};
|
|
262
|
+
});
|
|
263
|
+
}, ...ngDevMode ? [{ debugName: "gutterRanges" }] : /* istanbul ignore next */ []);
|
|
264
|
+
hostStyle = computed(() => ({
|
|
265
|
+
...toStyleObject(this.dt(), "--tx-splitter"),
|
|
266
|
+
...this.passThrough().root?.style
|
|
267
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
268
|
+
drag = null;
|
|
269
|
+
keyboardGutter = null;
|
|
270
|
+
reportedCollapsed = [];
|
|
271
|
+
openSizes = /* @__PURE__ */ new Map();
|
|
272
|
+
constructor() {
|
|
273
|
+
effect(() => {
|
|
274
|
+
this.signature();
|
|
275
|
+
if (untracked(() => this.resizingGutter()) === null) untracked(() => this.resetState());
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
resetState() {
|
|
279
|
+
const limits = this.limits();
|
|
280
|
+
const sizes = this.restoreState(limits.length) ?? this.initialSizes();
|
|
281
|
+
const collapsed = sizes.map((size, index) => limits[index].collapsible && size <= limits[index].collapsedSize);
|
|
282
|
+
this.reportedCollapsed = collapsed;
|
|
283
|
+
this.state.set({
|
|
284
|
+
sizes: [...sizes],
|
|
285
|
+
collapsed
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
panelId(index) {
|
|
289
|
+
return `${this.id}-panel-${index}`;
|
|
290
|
+
}
|
|
291
|
+
onPointerDown(event, gutter) {
|
|
292
|
+
if (this.disabled() || event.button !== 0) return;
|
|
293
|
+
event.preventDefault();
|
|
294
|
+
const target = event.currentTarget;
|
|
295
|
+
target.setPointerCapture?.(event.pointerId);
|
|
296
|
+
target.focus({ preventScroll: true });
|
|
297
|
+
this.drag = {
|
|
298
|
+
gutter,
|
|
299
|
+
start: this.pointerPosition(event),
|
|
300
|
+
pixels: this.panelPixels(),
|
|
301
|
+
initial: this.state()
|
|
302
|
+
};
|
|
303
|
+
this.resizingGutter.set(gutter);
|
|
304
|
+
this.resizeStart.emit({
|
|
305
|
+
originalEvent: event,
|
|
306
|
+
sizes: [...this.sizes()]
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
onPointerMove(event) {
|
|
310
|
+
const drag = this.drag;
|
|
311
|
+
if (!drag || drag.pixels === 0) return;
|
|
312
|
+
const offset = this.pointerPosition(event) - drag.start;
|
|
313
|
+
const direction = this.layout() === "horizontal" && this.isRtl() ? -1 : 1;
|
|
314
|
+
this.apply(event, drag.initial, drag.gutter, offset * direction * this.total(drag.initial) / drag.pixels);
|
|
315
|
+
}
|
|
316
|
+
onPointerUp(event) {
|
|
317
|
+
if (!this.drag) return;
|
|
318
|
+
this.drag = null;
|
|
319
|
+
const target = event.currentTarget;
|
|
320
|
+
if (target.hasPointerCapture?.(event.pointerId)) target.releasePointerCapture(event.pointerId);
|
|
321
|
+
this.finish(event);
|
|
322
|
+
}
|
|
323
|
+
onKeyDown(event, gutter) {
|
|
324
|
+
if (this.disabled()) return;
|
|
325
|
+
const delta = this.keyDelta(event, gutter);
|
|
326
|
+
if (delta === null) return;
|
|
327
|
+
event.preventDefault();
|
|
328
|
+
if (this.keyboardGutter === null) {
|
|
329
|
+
this.keyboardGutter = gutter;
|
|
330
|
+
this.resizeStart.emit({
|
|
331
|
+
originalEvent: event,
|
|
332
|
+
sizes: [...this.sizes()]
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
this.apply(event, this.state(), gutter, delta);
|
|
336
|
+
}
|
|
337
|
+
onKeyUp(event) {
|
|
338
|
+
if (this.keyboardGutter !== null) {
|
|
339
|
+
this.keyboardGutter = null;
|
|
340
|
+
this.finish(event);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
keyDelta(event, gutter) {
|
|
344
|
+
const horizontal = this.layout() === "horizontal";
|
|
345
|
+
const stepPercent = this.step() * this.total(this.state()) / (this.panelPixels() || 1);
|
|
346
|
+
const forward = horizontal && this.isRtl() ? -stepPercent : stepPercent;
|
|
347
|
+
switch (event.key) {
|
|
348
|
+
case "ArrowRight": return horizontal ? forward : null;
|
|
349
|
+
case "ArrowLeft": return horizontal ? -forward : null;
|
|
350
|
+
case "ArrowDown": return horizontal ? null : stepPercent;
|
|
351
|
+
case "ArrowUp": return horizontal ? null : -stepPercent;
|
|
352
|
+
case "Home": return -this.sizes()[gutter];
|
|
353
|
+
case "End": return this.total(this.state());
|
|
354
|
+
case "Enter": return this.collapseDelta(gutter);
|
|
355
|
+
default: return null;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
collapseDelta(gutter) {
|
|
359
|
+
const limits = this.limits();
|
|
360
|
+
const { sizes, collapsed } = this.state();
|
|
361
|
+
const index = limits[gutter].collapsible ? gutter : limits[gutter + 1].collapsible ? gutter + 1 : null;
|
|
362
|
+
if (index === null) return null;
|
|
363
|
+
const sign = index === gutter ? 1 : -1;
|
|
364
|
+
if (collapsed[index]) return sign * (Math.max(this.openSizes.get(index) ?? limits[index].minSize, limits[index].minSize) - sizes[index]);
|
|
365
|
+
this.openSizes.set(index, sizes[index]);
|
|
366
|
+
return sign * (limits[index].collapsedSize - sizes[index]);
|
|
367
|
+
}
|
|
368
|
+
apply(event, from, gutter, delta) {
|
|
369
|
+
const next = moveGutter(from, this.limits(), gutter, delta);
|
|
370
|
+
this.state.set(next);
|
|
371
|
+
next.collapsed.forEach((collapsed, index) => {
|
|
372
|
+
if (collapsed !== this.reportedCollapsed[index]) this.collapsedChange.emit({
|
|
373
|
+
index,
|
|
374
|
+
collapsed,
|
|
375
|
+
sizes: [...next.sizes]
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
this.reportedCollapsed = [...next.collapsed];
|
|
379
|
+
this.resizing.emit({
|
|
380
|
+
originalEvent: event,
|
|
381
|
+
sizes: [...next.sizes]
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
finish(event) {
|
|
385
|
+
this.saveState();
|
|
386
|
+
this.resizingGutter.set(null);
|
|
387
|
+
this.resizeEnd.emit({
|
|
388
|
+
originalEvent: event,
|
|
389
|
+
sizes: [...this.sizes()]
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
floorOf(limit) {
|
|
393
|
+
if (!limit) return 0;
|
|
394
|
+
return limit.collapsible ? limit.collapsedSize : limit.minSize;
|
|
395
|
+
}
|
|
396
|
+
total(state) {
|
|
397
|
+
return state.sizes.reduce((sum, size) => sum + size, 0) || 100;
|
|
398
|
+
}
|
|
399
|
+
pointerPosition(event) {
|
|
400
|
+
return this.layout() === "horizontal" ? event.clientX : event.clientY;
|
|
401
|
+
}
|
|
402
|
+
panelPixels() {
|
|
403
|
+
const horizontal = this.layout() === "horizontal";
|
|
404
|
+
return this.panelElements().reduce((sum, panel) => {
|
|
405
|
+
const rect = panel.nativeElement.getBoundingClientRect();
|
|
406
|
+
return sum + (horizontal ? rect.width : rect.height);
|
|
407
|
+
}, 0);
|
|
408
|
+
}
|
|
409
|
+
isRtl() {
|
|
410
|
+
return this.document.defaultView?.getComputedStyle(this.host.nativeElement).direction === "rtl";
|
|
411
|
+
}
|
|
412
|
+
storage() {
|
|
413
|
+
try {
|
|
414
|
+
const view = this.document.defaultView;
|
|
415
|
+
return (this.stateStorage() === "local" ? view?.localStorage : view?.sessionStorage) ?? null;
|
|
416
|
+
} catch {
|
|
417
|
+
return null;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
saveState() {
|
|
421
|
+
const key = this.stateKey();
|
|
422
|
+
if (!key) return;
|
|
423
|
+
try {
|
|
424
|
+
this.storage()?.setItem(key, JSON.stringify(this.sizes()));
|
|
425
|
+
} catch {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
restoreState(count) {
|
|
430
|
+
const key = this.stateKey();
|
|
431
|
+
if (!key || count === 0) return null;
|
|
432
|
+
try {
|
|
433
|
+
const stored = JSON.parse(this.storage()?.getItem(key) ?? "null");
|
|
434
|
+
return Array.isArray(stored) && stored.length === count && stored.every((size) => typeof size === "number" && Number.isFinite(size)) ? stored : null;
|
|
435
|
+
} catch {
|
|
436
|
+
return null;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
440
|
+
minVersion: "12.0.0",
|
|
441
|
+
version: "22.2.3",
|
|
442
|
+
ngImport: i0,
|
|
443
|
+
type: TxSplitter,
|
|
444
|
+
deps: [],
|
|
445
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
446
|
+
});
|
|
447
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
448
|
+
minVersion: "17.0.0",
|
|
449
|
+
version: "22.2.3",
|
|
450
|
+
type: TxSplitter,
|
|
451
|
+
isStandalone: true,
|
|
452
|
+
selector: "tx-splitter",
|
|
453
|
+
inputs: {
|
|
454
|
+
layout: {
|
|
455
|
+
classPropertyName: "layout",
|
|
456
|
+
publicName: "layout",
|
|
457
|
+
isSignal: true,
|
|
458
|
+
isRequired: false,
|
|
459
|
+
transformFunction: null
|
|
460
|
+
},
|
|
461
|
+
panelSizes: {
|
|
462
|
+
classPropertyName: "panelSizes",
|
|
463
|
+
publicName: "panelSizes",
|
|
464
|
+
isSignal: true,
|
|
465
|
+
isRequired: false,
|
|
466
|
+
transformFunction: null
|
|
467
|
+
},
|
|
468
|
+
minSizes: {
|
|
469
|
+
classPropertyName: "minSizes",
|
|
470
|
+
publicName: "minSizes",
|
|
471
|
+
isSignal: true,
|
|
472
|
+
isRequired: false,
|
|
473
|
+
transformFunction: null
|
|
474
|
+
},
|
|
475
|
+
gutterSize: {
|
|
476
|
+
classPropertyName: "gutterSize",
|
|
477
|
+
publicName: "gutterSize",
|
|
478
|
+
isSignal: true,
|
|
479
|
+
isRequired: false,
|
|
480
|
+
transformFunction: null
|
|
481
|
+
},
|
|
482
|
+
step: {
|
|
483
|
+
classPropertyName: "step",
|
|
484
|
+
publicName: "step",
|
|
485
|
+
isSignal: true,
|
|
486
|
+
isRequired: false,
|
|
487
|
+
transformFunction: null
|
|
488
|
+
},
|
|
489
|
+
disabled: {
|
|
490
|
+
classPropertyName: "disabled",
|
|
491
|
+
publicName: "disabled",
|
|
492
|
+
isSignal: true,
|
|
493
|
+
isRequired: false,
|
|
494
|
+
transformFunction: null
|
|
495
|
+
},
|
|
496
|
+
stateKey: {
|
|
497
|
+
classPropertyName: "stateKey",
|
|
498
|
+
publicName: "stateKey",
|
|
499
|
+
isSignal: true,
|
|
500
|
+
isRequired: false,
|
|
501
|
+
transformFunction: null
|
|
502
|
+
},
|
|
503
|
+
stateStorage: {
|
|
504
|
+
classPropertyName: "stateStorage",
|
|
505
|
+
publicName: "stateStorage",
|
|
506
|
+
isSignal: true,
|
|
507
|
+
isRequired: false,
|
|
508
|
+
transformFunction: null
|
|
509
|
+
},
|
|
510
|
+
gutterAriaLabel: {
|
|
511
|
+
classPropertyName: "gutterAriaLabel",
|
|
512
|
+
publicName: "gutterAriaLabel",
|
|
513
|
+
isSignal: true,
|
|
514
|
+
isRequired: false,
|
|
515
|
+
transformFunction: null
|
|
516
|
+
},
|
|
517
|
+
dt: {
|
|
518
|
+
classPropertyName: "dt",
|
|
519
|
+
publicName: "dt",
|
|
520
|
+
isSignal: true,
|
|
521
|
+
isRequired: false,
|
|
522
|
+
transformFunction: null
|
|
523
|
+
},
|
|
524
|
+
pt: {
|
|
525
|
+
classPropertyName: "pt",
|
|
526
|
+
publicName: "pt",
|
|
527
|
+
isSignal: true,
|
|
528
|
+
isRequired: false,
|
|
529
|
+
transformFunction: null
|
|
530
|
+
},
|
|
531
|
+
ptOptions: {
|
|
532
|
+
classPropertyName: "ptOptions",
|
|
533
|
+
publicName: "ptOptions",
|
|
534
|
+
isSignal: true,
|
|
535
|
+
isRequired: false,
|
|
536
|
+
transformFunction: null
|
|
537
|
+
},
|
|
538
|
+
unstyled: {
|
|
539
|
+
classPropertyName: "unstyled",
|
|
540
|
+
publicName: "unstyled",
|
|
541
|
+
isSignal: true,
|
|
542
|
+
isRequired: false,
|
|
543
|
+
transformFunction: null
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
outputs: {
|
|
547
|
+
resizeStart: "resizeStart",
|
|
548
|
+
resizing: "resizing",
|
|
549
|
+
resizeEnd: "resizeEnd",
|
|
550
|
+
collapsedChange: "collapsedChange"
|
|
551
|
+
},
|
|
552
|
+
host: {
|
|
553
|
+
properties: {
|
|
554
|
+
"class": "passThrough().root?.class",
|
|
555
|
+
"style": "hostStyle()",
|
|
556
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
557
|
+
"attr.data-layout": "layout()",
|
|
558
|
+
"attr.data-resizing": "resizingGutter() !== null || null",
|
|
559
|
+
"class.tx-splitter--nested": "nested",
|
|
560
|
+
"class.tx-splitter--disabled": "disabled()"
|
|
561
|
+
},
|
|
562
|
+
classAttribute: "tx-splitter"
|
|
563
|
+
},
|
|
564
|
+
queries: [{
|
|
565
|
+
propertyName: "panels",
|
|
566
|
+
predicate: TxSplitterPanel,
|
|
567
|
+
isSignal: true
|
|
568
|
+
}],
|
|
569
|
+
viewQueries: [{
|
|
570
|
+
propertyName: "panelElements",
|
|
571
|
+
predicate: ["panelElement"],
|
|
572
|
+
descendants: true,
|
|
573
|
+
isSignal: true
|
|
574
|
+
}],
|
|
575
|
+
ngImport: i0,
|
|
576
|
+
template: "@for (panel of panels(); track panel; let index = $index, last = $last) {\n <div\n #panelElement\n class=\"tx-splitter__panel\"\n [id]=\"panelId(index)\"\n [attr.data-index]=\"index\"\n [attr.data-collapsed]=\"collapsed()[index] || null\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"passThrough().panel?.style\"\n [style.flex]=\"flex()[index]\"\n >\n <ng-container [ngTemplateOutlet]=\"panel.content()\" />\n </div>\n @if (!last) {\n <div\n class=\"tx-splitter__gutter\"\n role=\"separator\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-orientation]=\"layout() === 'horizontal' ? 'vertical' : 'horizontal'\"\n [attr.aria-valuenow]=\"gutterRanges()[index]?.now\"\n [attr.aria-valuemin]=\"gutterRanges()[index]?.min\"\n [attr.aria-valuemax]=\"gutterRanges()[index]?.max\"\n [attr.aria-controls]=\"panelId(index)\"\n [attr.aria-label]=\"gutterLabel()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.data-resizing]=\"resizingGutter() === index || null\"\n [class]=\"passThrough().gutter?.class\"\n [style]=\"passThrough().gutter?.style\"\n [style.width.px]=\"layout() === 'horizontal' ? gutterSize() : null\"\n [style.height.px]=\"layout() === 'vertical' ? gutterSize() : null\"\n (pointerdown)=\"onPointerDown($event, index)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (lostpointercapture)=\"onPointerUp($event)\"\n (keydown)=\"onKeyDown($event, index)\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onKeyUp($event)\"\n >\n <div class=\"tx-splitter__handle\" [class]=\"passThrough().handle?.class\" [style]=\"passThrough().handle?.style\"></div>\n </div>\n }\n}\n",
|
|
577
|
+
styles: [":host{display:flex;flex-wrap:nowrap;min-width:0;min-height:0}:host([data-layout=vertical]){flex-direction:column}:host(.tx-splitter--nested){width:100%;height:100%}:host([data-resizing]){-webkit-user-select:none;user-select:none}:host([data-layout=horizontal][data-resizing]){cursor:col-resize}:host([data-layout=vertical][data-resizing]){cursor:row-resize}.tx-splitter__panel{overflow:hidden}:host([data-layout=horizontal])>.tx-splitter__panel{min-width:0}:host([data-layout=vertical])>.tx-splitter__panel{min-height:0}.tx-splitter__gutter{position:relative;z-index:1;display:flex;flex:0 0 auto;align-items:center;justify-content:center;touch-action:none;-webkit-user-select:none;user-select:none}.tx-splitter__gutter:before{position:absolute;content:\"\"}.tx-splitter__gutter:focus-visible{outline:none}:host([data-layout=horizontal])>.tx-splitter__gutter{cursor:col-resize}:host([data-layout=horizontal])>.tx-splitter__gutter:before{top:0;bottom:0;left:50%;transform:translate(-50%)}:host([data-layout=vertical])>.tx-splitter__gutter{cursor:row-resize}:host([data-layout=vertical])>.tx-splitter__gutter:before{right:0;left:0;top:50%;transform:translateY(-50%)}:host(.tx-splitter--disabled)>.tx-splitter__gutter{cursor:default;pointer-events:none}:host([data-styled]){overflow:hidden;border:1px solid var(--tx-splitter-border-color);border-radius:var(--tx-splitter-border-radius);background:var(--tx-splitter-background);color:var(--tx-splitter-color);font-family:var(--tx-font-family)}:host([data-styled].tx-splitter--nested){border:0;border-radius:0}:host([data-styled])>.tx-splitter__gutter{background:var(--tx-splitter-gutter-background)}:host([data-styled][data-layout=horizontal])>.tx-splitter__gutter:before{width:var(--tx-splitter-gutter-hit-area)}:host([data-styled][data-layout=vertical])>.tx-splitter__gutter:before{height:var(--tx-splitter-gutter-hit-area)}:host([data-styled].tx-splitter--disabled)>.tx-splitter__gutter{opacity:var(--tx-splitter-gutter-disabled-opacity)}:host([data-styled]) .tx-splitter__handle{border-radius:var(--tx-splitter-handle-border-radius);outline:var(--tx-splitter-handle-focus-ring-width) solid transparent;outline-offset:var(--tx-splitter-handle-focus-ring-offset);background:var(--tx-splitter-handle-background);transition:outline-color var(--tx-splitter-transition-duration)}:host([data-styled][data-layout=horizontal])>.tx-splitter__gutter>.tx-splitter__handle{width:100%;height:var(--tx-splitter-handle-size)}:host([data-styled][data-layout=vertical])>.tx-splitter__gutter>.tx-splitter__handle{width:var(--tx-splitter-handle-size);height:100%}:host([data-styled])>.tx-splitter__gutter:focus-visible>.tx-splitter__handle{outline-color:var(--tx-splitter-handle-focus-ring-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-splitter__handle{transition:none}}\n"],
|
|
578
|
+
dependencies: [{
|
|
579
|
+
kind: "directive",
|
|
580
|
+
type: NgTemplateOutlet,
|
|
581
|
+
selector: "[ngTemplateOutlet]",
|
|
582
|
+
inputs: [
|
|
583
|
+
"ngTemplateOutletContext",
|
|
584
|
+
"ngTemplateOutlet",
|
|
585
|
+
"ngTemplateOutletInjector"
|
|
586
|
+
]
|
|
587
|
+
}],
|
|
588
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
589
|
+
});
|
|
590
|
+
};
|
|
591
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
592
|
+
minVersion: "12.0.0",
|
|
593
|
+
version: "22.2.3",
|
|
594
|
+
ngImport: i0,
|
|
595
|
+
type: TxSplitter,
|
|
596
|
+
decorators: [{
|
|
597
|
+
type: Component,
|
|
598
|
+
args: [{
|
|
599
|
+
selector: "tx-splitter",
|
|
600
|
+
imports: [NgTemplateOutlet],
|
|
601
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
602
|
+
host: {
|
|
603
|
+
class: "tx-splitter",
|
|
604
|
+
"[class]": "passThrough().root?.class",
|
|
605
|
+
"[style]": "hostStyle()",
|
|
606
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
607
|
+
"[attr.data-layout]": "layout()",
|
|
608
|
+
"[attr.data-resizing]": "resizingGutter() !== null || null",
|
|
609
|
+
"[class.tx-splitter--nested]": "nested",
|
|
610
|
+
"[class.tx-splitter--disabled]": "disabled()"
|
|
611
|
+
},
|
|
612
|
+
template: "@for (panel of panels(); track panel; let index = $index, last = $last) {\n <div\n #panelElement\n class=\"tx-splitter__panel\"\n [id]=\"panelId(index)\"\n [attr.data-index]=\"index\"\n [attr.data-collapsed]=\"collapsed()[index] || null\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"passThrough().panel?.style\"\n [style.flex]=\"flex()[index]\"\n >\n <ng-container [ngTemplateOutlet]=\"panel.content()\" />\n </div>\n @if (!last) {\n <div\n class=\"tx-splitter__gutter\"\n role=\"separator\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-orientation]=\"layout() === 'horizontal' ? 'vertical' : 'horizontal'\"\n [attr.aria-valuenow]=\"gutterRanges()[index]?.now\"\n [attr.aria-valuemin]=\"gutterRanges()[index]?.min\"\n [attr.aria-valuemax]=\"gutterRanges()[index]?.max\"\n [attr.aria-controls]=\"panelId(index)\"\n [attr.aria-label]=\"gutterLabel()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.data-resizing]=\"resizingGutter() === index || null\"\n [class]=\"passThrough().gutter?.class\"\n [style]=\"passThrough().gutter?.style\"\n [style.width.px]=\"layout() === 'horizontal' ? gutterSize() : null\"\n [style.height.px]=\"layout() === 'vertical' ? gutterSize() : null\"\n (pointerdown)=\"onPointerDown($event, index)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (lostpointercapture)=\"onPointerUp($event)\"\n (keydown)=\"onKeyDown($event, index)\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onKeyUp($event)\"\n >\n <div class=\"tx-splitter__handle\" [class]=\"passThrough().handle?.class\" [style]=\"passThrough().handle?.style\"></div>\n </div>\n }\n}\n",
|
|
613
|
+
styles: [":host{display:flex;flex-wrap:nowrap;min-width:0;min-height:0}:host([data-layout=vertical]){flex-direction:column}:host(.tx-splitter--nested){width:100%;height:100%}:host([data-resizing]){-webkit-user-select:none;user-select:none}:host([data-layout=horizontal][data-resizing]){cursor:col-resize}:host([data-layout=vertical][data-resizing]){cursor:row-resize}.tx-splitter__panel{overflow:hidden}:host([data-layout=horizontal])>.tx-splitter__panel{min-width:0}:host([data-layout=vertical])>.tx-splitter__panel{min-height:0}.tx-splitter__gutter{position:relative;z-index:1;display:flex;flex:0 0 auto;align-items:center;justify-content:center;touch-action:none;-webkit-user-select:none;user-select:none}.tx-splitter__gutter:before{position:absolute;content:\"\"}.tx-splitter__gutter:focus-visible{outline:none}:host([data-layout=horizontal])>.tx-splitter__gutter{cursor:col-resize}:host([data-layout=horizontal])>.tx-splitter__gutter:before{top:0;bottom:0;left:50%;transform:translate(-50%)}:host([data-layout=vertical])>.tx-splitter__gutter{cursor:row-resize}:host([data-layout=vertical])>.tx-splitter__gutter:before{right:0;left:0;top:50%;transform:translateY(-50%)}:host(.tx-splitter--disabled)>.tx-splitter__gutter{cursor:default;pointer-events:none}:host([data-styled]){overflow:hidden;border:1px solid var(--tx-splitter-border-color);border-radius:var(--tx-splitter-border-radius);background:var(--tx-splitter-background);color:var(--tx-splitter-color);font-family:var(--tx-font-family)}:host([data-styled].tx-splitter--nested){border:0;border-radius:0}:host([data-styled])>.tx-splitter__gutter{background:var(--tx-splitter-gutter-background)}:host([data-styled][data-layout=horizontal])>.tx-splitter__gutter:before{width:var(--tx-splitter-gutter-hit-area)}:host([data-styled][data-layout=vertical])>.tx-splitter__gutter:before{height:var(--tx-splitter-gutter-hit-area)}:host([data-styled].tx-splitter--disabled)>.tx-splitter__gutter{opacity:var(--tx-splitter-gutter-disabled-opacity)}:host([data-styled]) .tx-splitter__handle{border-radius:var(--tx-splitter-handle-border-radius);outline:var(--tx-splitter-handle-focus-ring-width) solid transparent;outline-offset:var(--tx-splitter-handle-focus-ring-offset);background:var(--tx-splitter-handle-background);transition:outline-color var(--tx-splitter-transition-duration)}:host([data-styled][data-layout=horizontal])>.tx-splitter__gutter>.tx-splitter__handle{width:100%;height:var(--tx-splitter-handle-size)}:host([data-styled][data-layout=vertical])>.tx-splitter__gutter>.tx-splitter__handle{width:var(--tx-splitter-handle-size);height:100%}:host([data-styled])>.tx-splitter__gutter:focus-visible>.tx-splitter__handle{outline-color:var(--tx-splitter-handle-focus-ring-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-splitter__handle{transition:none}}\n"]
|
|
614
|
+
}]
|
|
615
|
+
}],
|
|
616
|
+
ctorParameters: () => [],
|
|
617
|
+
propDecorators: {
|
|
618
|
+
layout: [{
|
|
619
|
+
type: i0.Input,
|
|
620
|
+
args: [{
|
|
621
|
+
isSignal: true,
|
|
622
|
+
alias: "layout",
|
|
623
|
+
required: false
|
|
624
|
+
}]
|
|
625
|
+
}],
|
|
626
|
+
panelSizes: [{
|
|
627
|
+
type: i0.Input,
|
|
628
|
+
args: [{
|
|
629
|
+
isSignal: true,
|
|
630
|
+
alias: "panelSizes",
|
|
631
|
+
required: false
|
|
632
|
+
}]
|
|
633
|
+
}],
|
|
634
|
+
minSizes: [{
|
|
635
|
+
type: i0.Input,
|
|
636
|
+
args: [{
|
|
637
|
+
isSignal: true,
|
|
638
|
+
alias: "minSizes",
|
|
639
|
+
required: false
|
|
640
|
+
}]
|
|
641
|
+
}],
|
|
642
|
+
gutterSize: [{
|
|
643
|
+
type: i0.Input,
|
|
644
|
+
args: [{
|
|
645
|
+
isSignal: true,
|
|
646
|
+
alias: "gutterSize",
|
|
647
|
+
required: false
|
|
648
|
+
}]
|
|
649
|
+
}],
|
|
650
|
+
step: [{
|
|
651
|
+
type: i0.Input,
|
|
652
|
+
args: [{
|
|
653
|
+
isSignal: true,
|
|
654
|
+
alias: "step",
|
|
655
|
+
required: false
|
|
656
|
+
}]
|
|
657
|
+
}],
|
|
658
|
+
disabled: [{
|
|
659
|
+
type: i0.Input,
|
|
660
|
+
args: [{
|
|
661
|
+
isSignal: true,
|
|
662
|
+
alias: "disabled",
|
|
663
|
+
required: false
|
|
664
|
+
}]
|
|
665
|
+
}],
|
|
666
|
+
stateKey: [{
|
|
667
|
+
type: i0.Input,
|
|
668
|
+
args: [{
|
|
669
|
+
isSignal: true,
|
|
670
|
+
alias: "stateKey",
|
|
671
|
+
required: false
|
|
672
|
+
}]
|
|
673
|
+
}],
|
|
674
|
+
stateStorage: [{
|
|
675
|
+
type: i0.Input,
|
|
676
|
+
args: [{
|
|
677
|
+
isSignal: true,
|
|
678
|
+
alias: "stateStorage",
|
|
679
|
+
required: false
|
|
680
|
+
}]
|
|
681
|
+
}],
|
|
682
|
+
gutterAriaLabel: [{
|
|
683
|
+
type: i0.Input,
|
|
684
|
+
args: [{
|
|
685
|
+
isSignal: true,
|
|
686
|
+
alias: "gutterAriaLabel",
|
|
687
|
+
required: false
|
|
688
|
+
}]
|
|
689
|
+
}],
|
|
690
|
+
dt: [{
|
|
691
|
+
type: i0.Input,
|
|
692
|
+
args: [{
|
|
693
|
+
isSignal: true,
|
|
694
|
+
alias: "dt",
|
|
695
|
+
required: false
|
|
696
|
+
}]
|
|
697
|
+
}],
|
|
698
|
+
pt: [{
|
|
699
|
+
type: i0.Input,
|
|
700
|
+
args: [{
|
|
701
|
+
isSignal: true,
|
|
702
|
+
alias: "pt",
|
|
703
|
+
required: false
|
|
704
|
+
}]
|
|
705
|
+
}],
|
|
706
|
+
ptOptions: [{
|
|
707
|
+
type: i0.Input,
|
|
708
|
+
args: [{
|
|
709
|
+
isSignal: true,
|
|
710
|
+
alias: "ptOptions",
|
|
711
|
+
required: false
|
|
712
|
+
}]
|
|
713
|
+
}],
|
|
714
|
+
unstyled: [{
|
|
715
|
+
type: i0.Input,
|
|
716
|
+
args: [{
|
|
717
|
+
isSignal: true,
|
|
718
|
+
alias: "unstyled",
|
|
719
|
+
required: false
|
|
720
|
+
}]
|
|
721
|
+
}],
|
|
722
|
+
resizeStart: [{
|
|
723
|
+
type: i0.Output,
|
|
724
|
+
args: ["resizeStart"]
|
|
725
|
+
}],
|
|
726
|
+
resizing: [{
|
|
727
|
+
type: i0.Output,
|
|
728
|
+
args: ["resizing"]
|
|
729
|
+
}],
|
|
730
|
+
resizeEnd: [{
|
|
731
|
+
type: i0.Output,
|
|
732
|
+
args: ["resizeEnd"]
|
|
733
|
+
}],
|
|
734
|
+
collapsedChange: [{
|
|
735
|
+
type: i0.Output,
|
|
736
|
+
args: ["collapsedChange"]
|
|
737
|
+
}],
|
|
738
|
+
panels: [{
|
|
739
|
+
type: i0.ContentChildren,
|
|
740
|
+
args: [i0.forwardRef(() => TxSplitterPanel), { isSignal: true }]
|
|
741
|
+
}],
|
|
742
|
+
panelElements: [{
|
|
743
|
+
type: i0.ViewChildren,
|
|
744
|
+
args: ["panelElement", { isSignal: true }]
|
|
745
|
+
}]
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
export { TxSplitter, TxSplitterPanel };
|
|
749
|
+
|
|
750
|
+
//# sourceMappingURL=tectra-ng-ui-splitter.mjs.map
|