@acorex/cdk 22.1.0-next.32 → 22.1.0-next.33
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.
|
@@ -12,39 +12,45 @@ class AXResizableDirective {
|
|
|
12
12
|
this.zone = inject(NgZone);
|
|
13
13
|
this.document = inject(DOCUMENT);
|
|
14
14
|
this.platformID = inject(PLATFORM_ID);
|
|
15
|
+
this.resizeHandles = new Map();
|
|
15
16
|
this.isResizing = signal(false, /* @ts-ignore */
|
|
16
17
|
...(ngDevMode ? [{ debugName: "isResizing" }] : /* istanbul ignore next */ []));
|
|
18
|
+
this.activeHandle = null;
|
|
17
19
|
this.initialElementWidth = 0;
|
|
18
|
-
this.
|
|
20
|
+
this.initialElementHeight = 0;
|
|
21
|
+
this.startX = 0;
|
|
22
|
+
this.startY = 0;
|
|
23
|
+
this.startWidth = 0;
|
|
24
|
+
this.startHeight = 0;
|
|
25
|
+
this.startRatio = 1;
|
|
19
26
|
this.subscriptions = new Subscription();
|
|
20
|
-
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.boundMouseLeave = this.onMouseLeave.bind(this);
|
|
27
|
+
this.boundPointerDown = this.onPointerDown.bind(this);
|
|
28
|
+
this.boundPointerMove = this.onPointerMove.bind(this);
|
|
29
|
+
this.boundPointerUp = this.onPointerUp.bind(this);
|
|
30
|
+
this.boundPointerEnter = this.onPointerEnter.bind(this);
|
|
31
|
+
this.boundPointerLeave = this.onPointerLeave.bind(this);
|
|
26
32
|
this.boundDoubleClick = this.onDoubleClick.bind(this);
|
|
27
|
-
this.
|
|
28
|
-
|
|
29
|
-
if (!parentElement)
|
|
30
|
-
return;
|
|
31
|
-
for (const entry of entries) {
|
|
32
|
-
if (entry.target === parentElement && this.maxWidth() === Infinity) {
|
|
33
|
-
this.maxWidth.set(entry.contentRect.width);
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
33
|
+
this.isRTL = signal(false, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "isRTL" }] : /* istanbul ignore next */ []));
|
|
38
35
|
/** Define if directive is active or not */
|
|
39
36
|
this.axResizable = model(true, /* @ts-ignore */
|
|
40
37
|
...(ngDevMode ? [{ debugName: "axResizable" }] : /* istanbul ignore next */ []));
|
|
38
|
+
/** Logical handles to render. Defaults to the inline-end edge. */
|
|
39
|
+
this.handles = model(['end'], /* @ts-ignore */
|
|
40
|
+
...(ngDevMode ? [{ debugName: "handles" }] : /* istanbul ignore next */ []));
|
|
41
41
|
/** Minimum width for the resizable element. */
|
|
42
42
|
this.minWidth = model(100, /* @ts-ignore */
|
|
43
43
|
...(ngDevMode ? [{ debugName: "minWidth" }] : /* istanbul ignore next */ []));
|
|
44
44
|
/** Maximum width for the resizable element. Defaults to parent width if not provided. */
|
|
45
45
|
this.maxWidth = model(Infinity, /* @ts-ignore */
|
|
46
46
|
...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
|
|
47
|
-
/**
|
|
47
|
+
/** Minimum height for the resizable element. */
|
|
48
|
+
this.minHeight = model(100, /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "minHeight" }] : /* istanbul ignore next */ []));
|
|
50
|
+
/** Maximum height for the resizable element. Defaults to parent height if not provided. */
|
|
51
|
+
this.maxHeight = model(Infinity, /* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
|
|
53
|
+
/** Behavior on double-click: 'reset', 'maximize', or 'fit'. */
|
|
48
54
|
this.dblClickAction = model('reset', /* @ts-ignore */
|
|
49
55
|
...(ngDevMode ? [{ debugName: "dblClickAction" }] : /* istanbul ignore next */ []));
|
|
50
56
|
/** Define initial width for the element. */
|
|
@@ -53,227 +59,365 @@ class AXResizableDirective {
|
|
|
53
59
|
/** Define reset width for the element. */
|
|
54
60
|
this.defaultWidth = model(null, /* @ts-ignore */
|
|
55
61
|
...(ngDevMode ? [{ debugName: "defaultWidth" }] : /* istanbul ignore next */ []));
|
|
62
|
+
/** Define initial height for the element. */
|
|
63
|
+
this.height = model(null, /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
65
|
+
/** Define reset height for the element. */
|
|
66
|
+
this.defaultHeight = model(null, /* @ts-ignore */
|
|
67
|
+
...(ngDevMode ? [{ debugName: "defaultHeight" }] : /* istanbul ignore next */ []));
|
|
68
|
+
/** Lock the element's aspect ratio from the size captured at pointer-down. */
|
|
69
|
+
this.lockAspectRatio = model(false, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "lockAspectRatio" }] : /* istanbul ignore next */ []));
|
|
56
71
|
/** Event emitted when resizing starts. */
|
|
57
72
|
this.onResizingStarted = output();
|
|
58
73
|
/** Event emitted when resizing ends. */
|
|
59
74
|
this.onResizingEnded = output();
|
|
60
75
|
/** Event emitted on double-click. */
|
|
61
76
|
this.onResizingDblClick = output();
|
|
62
|
-
this.isRTL = signal(AXHtmlUtil.isRtl(this.document.documentElement), /* @ts-ignore */
|
|
63
|
-
...(ngDevMode ? [{ debugName: "isRTL" }] : /* istanbul ignore next */ []));
|
|
64
77
|
this.isBrowser = isPlatformBrowser(this.platformID);
|
|
65
78
|
this.hostElement = this.el.nativeElement;
|
|
79
|
+
this.isRTL.set(AXHtmlUtil.isRtl(this.document.documentElement));
|
|
66
80
|
this.subscriptions.add(this.platformService.directionChange.subscribe((i) => {
|
|
67
81
|
this.isRTL.set(i.data === 'rtl');
|
|
68
|
-
if (this.resizeHandle) {
|
|
69
|
-
this.updateHandlePosition();
|
|
70
|
-
}
|
|
71
82
|
}));
|
|
72
|
-
if (this.isBrowser) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
if (!this.isBrowser) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this.resizeObserver = new ResizeObserver((entries) => {
|
|
87
|
+
const parentElement = this.hostElement.parentElement;
|
|
88
|
+
if (!parentElement) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
for (const entry of entries) {
|
|
92
|
+
if (entry.target !== parentElement) {
|
|
93
|
+
continue;
|
|
76
94
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
this.applyElementWidth(resolvedWidth);
|
|
95
|
+
if (this.maxWidth() === Infinity) {
|
|
96
|
+
this.maxWidth.set(entry.contentRect.width);
|
|
80
97
|
}
|
|
81
|
-
|
|
82
|
-
|
|
98
|
+
if (this.maxHeight() === Infinity) {
|
|
99
|
+
this.maxHeight.set(entry.contentRect.height);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
effect(() => {
|
|
104
|
+
const isActive = this.axResizable();
|
|
105
|
+
const handles = this.handles();
|
|
106
|
+
this.reconcileHandles(isActive, handles);
|
|
107
|
+
});
|
|
108
|
+
effect(() => {
|
|
109
|
+
this.isRTL();
|
|
110
|
+
this.updateAllHandlePositions();
|
|
111
|
+
});
|
|
112
|
+
effect(() => {
|
|
113
|
+
if (this.isResizing()) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
this.applySizeFromModel();
|
|
117
|
+
});
|
|
83
118
|
}
|
|
84
119
|
ngAfterViewInit() {
|
|
85
|
-
if (!this.isBrowser)
|
|
120
|
+
if (!this.isBrowser) {
|
|
86
121
|
return;
|
|
122
|
+
}
|
|
87
123
|
this.initialElementWidth = this.hostElement.offsetWidth;
|
|
88
|
-
this.
|
|
124
|
+
this.initialElementHeight = this.hostElement.offsetHeight;
|
|
125
|
+
this.applySizeFromModel();
|
|
126
|
+
const parentElement = this.hostElement.parentElement;
|
|
89
127
|
if (this.maxWidth() === Infinity) {
|
|
90
|
-
const parentWidth =
|
|
128
|
+
const parentWidth = parentElement?.offsetWidth;
|
|
91
129
|
if (parentWidth) {
|
|
92
130
|
this.maxWidth.set(parentWidth);
|
|
93
131
|
}
|
|
94
132
|
}
|
|
95
|
-
|
|
133
|
+
if (this.maxHeight() === Infinity) {
|
|
134
|
+
const parentHeight = parentElement?.offsetHeight;
|
|
135
|
+
if (parentHeight) {
|
|
136
|
+
this.maxHeight.set(parentHeight);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
96
139
|
if (parentElement) {
|
|
97
|
-
this.resizeObserver
|
|
140
|
+
this.resizeObserver?.observe(parentElement);
|
|
98
141
|
}
|
|
99
|
-
this.createResizeHandle();
|
|
100
|
-
this.setupResizableState();
|
|
101
142
|
}
|
|
102
143
|
ngOnDestroy() {
|
|
103
144
|
this.subscriptions.unsubscribe();
|
|
104
|
-
this.resizeObserver
|
|
105
|
-
this.
|
|
106
|
-
|
|
107
|
-
setupResizableState() {
|
|
108
|
-
this.subscriptions.add(this.axResizable.subscribe((isActive) => {
|
|
109
|
-
if (!isActive) {
|
|
110
|
-
this.applyWidthFromModel();
|
|
111
|
-
this.cleanupEventListeners();
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
this.applyWidthFromModel();
|
|
115
|
-
this.createResizeHandle();
|
|
116
|
-
}
|
|
117
|
-
}));
|
|
145
|
+
this.resizeObserver?.disconnect();
|
|
146
|
+
this.destroyAllHandles();
|
|
147
|
+
this.document.body.style.cursor = '';
|
|
118
148
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if (width !== null) {
|
|
122
|
-
this.applyElementWidth(width);
|
|
149
|
+
reconcileHandles(isActive, handles) {
|
|
150
|
+
if (!this.isBrowser) {
|
|
123
151
|
return;
|
|
124
152
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
this.
|
|
153
|
+
if (!isActive) {
|
|
154
|
+
this.stopResizing();
|
|
155
|
+
this.destroyAllHandles();
|
|
156
|
+
this.applySizeFromModel();
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this.hostElement.style.position = 'relative';
|
|
160
|
+
const unique = [...new Set(handles)];
|
|
161
|
+
const desired = new Set(unique);
|
|
162
|
+
for (const [type, element] of this.resizeHandles) {
|
|
163
|
+
if (!desired.has(type)) {
|
|
164
|
+
this.destroyHandle(type, element);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
for (const type of unique) {
|
|
168
|
+
if (!this.resizeHandles.has(type)) {
|
|
169
|
+
this.createHandle(type);
|
|
170
|
+
}
|
|
128
171
|
}
|
|
129
172
|
}
|
|
130
|
-
|
|
131
|
-
this.
|
|
173
|
+
createHandle(type) {
|
|
174
|
+
const handle = this.document.createElement('div');
|
|
175
|
+
handle.classList.add('ax-resizable-handler', `ax-resizable-handler--${type}`);
|
|
176
|
+
handle.dataset['axResizeHandle'] = type;
|
|
177
|
+
this.hostElement.appendChild(handle);
|
|
178
|
+
this.applyHandleStyles(handle, type);
|
|
179
|
+
this.attachHandleListeners(handle);
|
|
180
|
+
this.resizeHandles.set(type, handle);
|
|
132
181
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
182
|
+
attachHandleListeners(handle) {
|
|
183
|
+
this.zone.runOutsideAngular(() => {
|
|
184
|
+
handle.addEventListener('pointerdown', this.boundPointerDown);
|
|
185
|
+
handle.addEventListener('pointermove', this.boundPointerMove);
|
|
186
|
+
handle.addEventListener('pointerup', this.boundPointerUp);
|
|
187
|
+
handle.addEventListener('pointercancel', this.boundPointerUp);
|
|
188
|
+
handle.addEventListener('pointerenter', this.boundPointerEnter);
|
|
189
|
+
handle.addEventListener('pointerleave', this.boundPointerLeave);
|
|
190
|
+
handle.addEventListener('dblclick', this.boundDoubleClick);
|
|
191
|
+
});
|
|
142
192
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
193
|
+
destroyHandle(type, handle) {
|
|
194
|
+
handle.removeEventListener('pointerdown', this.boundPointerDown);
|
|
195
|
+
handle.removeEventListener('pointermove', this.boundPointerMove);
|
|
196
|
+
handle.removeEventListener('pointerup', this.boundPointerUp);
|
|
197
|
+
handle.removeEventListener('pointercancel', this.boundPointerUp);
|
|
198
|
+
handle.removeEventListener('pointerenter', this.boundPointerEnter);
|
|
199
|
+
handle.removeEventListener('pointerleave', this.boundPointerLeave);
|
|
200
|
+
handle.removeEventListener('dblclick', this.boundDoubleClick);
|
|
201
|
+
handle.remove();
|
|
202
|
+
this.resizeHandles.delete(type);
|
|
203
|
+
}
|
|
204
|
+
destroyAllHandles() {
|
|
205
|
+
for (const [type, handle] of [...this.resizeHandles]) {
|
|
206
|
+
this.destroyHandle(type, handle);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
applyHandleStyles(handle, type) {
|
|
210
|
+
const isCorner = type.includes('-');
|
|
211
|
+
Object.assign(handle.style, {
|
|
149
212
|
position: 'absolute',
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
cursor: STYLES.cursor,
|
|
153
|
-
zIndex: STYLES.zIndex,
|
|
213
|
+
backgroundColor: STYLES.backgroundColor,
|
|
214
|
+
zIndex: isCorner ? STYLES.zIndexCorner : STYLES.zIndex,
|
|
154
215
|
transition: STYLES.transition,
|
|
155
216
|
borderRadius: STYLES.borderRadius,
|
|
156
217
|
userSelect: 'none',
|
|
218
|
+
touchAction: 'none',
|
|
219
|
+
cursor: this.getCursorForHandle(type),
|
|
220
|
+
left: '',
|
|
221
|
+
right: '',
|
|
222
|
+
top: '',
|
|
223
|
+
bottom: '',
|
|
224
|
+
width: '',
|
|
225
|
+
height: '',
|
|
157
226
|
});
|
|
158
|
-
this.
|
|
227
|
+
this.positionHandle(handle, type);
|
|
159
228
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
229
|
+
updateAllHandlePositions() {
|
|
230
|
+
for (const [type, handle] of this.resizeHandles) {
|
|
231
|
+
handle.style.cursor = this.getCursorForHandle(type);
|
|
232
|
+
this.positionHandle(handle, type);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
positionHandle(handle, type) {
|
|
236
|
+
const rtl = this.isRTL();
|
|
237
|
+
switch (type) {
|
|
238
|
+
case 'start':
|
|
239
|
+
case 'end':
|
|
240
|
+
handle.style.top = '0';
|
|
241
|
+
handle.style.bottom = '0';
|
|
242
|
+
handle.style.width = STYLES.handlerWidth;
|
|
243
|
+
this.applyInlineSide(handle, type, rtl);
|
|
244
|
+
break;
|
|
245
|
+
case 'top':
|
|
246
|
+
case 'bottom':
|
|
247
|
+
handle.style.left = '0';
|
|
248
|
+
handle.style.right = '0';
|
|
249
|
+
handle.style.height = STYLES.handlerHeight;
|
|
250
|
+
if (type === 'top') {
|
|
251
|
+
handle.style.top = '0';
|
|
252
|
+
handle.style.bottom = '';
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
handle.style.bottom = '0';
|
|
256
|
+
handle.style.top = '';
|
|
257
|
+
}
|
|
258
|
+
break;
|
|
259
|
+
default: {
|
|
260
|
+
const [vertical, horizontal] = type.split('-');
|
|
261
|
+
handle.style.width = STYLES.cornerSize;
|
|
262
|
+
handle.style.height = STYLES.cornerSize;
|
|
263
|
+
if (vertical === 'top') {
|
|
264
|
+
handle.style.top = '0';
|
|
265
|
+
handle.style.bottom = '';
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
handle.style.bottom = '0';
|
|
269
|
+
handle.style.top = '';
|
|
270
|
+
}
|
|
271
|
+
this.applyInlineSide(handle, horizontal, rtl);
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
applyInlineSide(element, side, rtl) {
|
|
277
|
+
const physicalLeft = (side === 'start' && !rtl) || (side === 'end' && rtl);
|
|
278
|
+
if (physicalLeft) {
|
|
279
|
+
element.style.left = '0';
|
|
280
|
+
element.style.right = '';
|
|
167
281
|
}
|
|
168
282
|
else {
|
|
169
|
-
|
|
170
|
-
|
|
283
|
+
element.style.right = '0';
|
|
284
|
+
element.style.left = '';
|
|
171
285
|
}
|
|
172
286
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
this.zone.runOutsideAngular(() => {
|
|
178
|
-
handle.addEventListener('mousedown', this.boundMouseDown);
|
|
179
|
-
handle.addEventListener('mouseenter', this.boundMouseEnter);
|
|
180
|
-
handle.addEventListener('mouseleave', this.boundMouseLeave);
|
|
181
|
-
handle.addEventListener('dblclick', this.boundDoubleClick);
|
|
182
|
-
this.document.addEventListener('mousemove', this.boundMouseMove);
|
|
183
|
-
this.document.addEventListener('mouseup', this.boundMouseUp);
|
|
184
|
-
});
|
|
287
|
+
applySizeFromModel() {
|
|
288
|
+
const width = this.width() ?? this.defaultWidth();
|
|
289
|
+
const height = this.height() ?? this.defaultHeight();
|
|
290
|
+
this.applySize(width, height);
|
|
185
291
|
}
|
|
186
|
-
|
|
187
|
-
if (
|
|
188
|
-
this.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
this.
|
|
192
|
-
|
|
193
|
-
this.resizeHandle = undefined;
|
|
194
|
-
}
|
|
195
|
-
this.document.removeEventListener('mousemove', this.boundMouseMove);
|
|
196
|
-
this.document.removeEventListener('mouseup', this.boundMouseUp);
|
|
197
|
-
this.document.body.style.cursor = '';
|
|
292
|
+
applySize(width, height) {
|
|
293
|
+
if (width !== null) {
|
|
294
|
+
this.hostElement.style.width = `${width}px`;
|
|
295
|
+
}
|
|
296
|
+
if (height !== null) {
|
|
297
|
+
this.hostElement.style.height = `${height}px`;
|
|
298
|
+
}
|
|
198
299
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
if (event.clientX < handleRect.left || event.clientX > handleRect.right)
|
|
300
|
+
onPointerDown(event) {
|
|
301
|
+
const handleType = this.getHandleType(event);
|
|
302
|
+
const handle = event.currentTarget;
|
|
303
|
+
if (!handleType || !handle) {
|
|
204
304
|
return;
|
|
305
|
+
}
|
|
205
306
|
event.preventDefault();
|
|
307
|
+
event.stopPropagation();
|
|
308
|
+
try {
|
|
309
|
+
handle.setPointerCapture?.(event.pointerId);
|
|
310
|
+
}
|
|
311
|
+
catch {
|
|
312
|
+
// Pointer capture can throw for synthetic or inactive pointers.
|
|
313
|
+
}
|
|
314
|
+
this.activeHandle = handleType;
|
|
206
315
|
this.isResizing.set(true);
|
|
207
|
-
this.
|
|
208
|
-
this.
|
|
209
|
-
this.
|
|
316
|
+
this.startX = event.clientX;
|
|
317
|
+
this.startY = event.clientY;
|
|
318
|
+
this.startWidth = this.hostElement.offsetWidth;
|
|
319
|
+
this.startHeight = this.hostElement.offsetHeight;
|
|
320
|
+
this.startRatio = this.startHeight > 0 ? this.startWidth / this.startHeight : 1;
|
|
321
|
+
this.document.body.style.cursor = this.getActiveCursor(handleType);
|
|
322
|
+
handle.style.backgroundColor = STYLES.backgroundColorActive;
|
|
323
|
+
const size = { width: this.startWidth, height: this.startHeight };
|
|
210
324
|
this.zone.run(() => {
|
|
211
325
|
this.onResizingStarted.emit({
|
|
212
326
|
component: this,
|
|
213
327
|
htmlElement: this.hostElement,
|
|
214
328
|
isUserInteraction: true,
|
|
215
329
|
name: 'resizingStarted',
|
|
216
|
-
value:
|
|
217
|
-
oldValue:
|
|
330
|
+
value: size,
|
|
331
|
+
oldValue: size,
|
|
218
332
|
});
|
|
219
333
|
});
|
|
220
334
|
}
|
|
221
|
-
|
|
222
|
-
if (!this.isResizing())
|
|
335
|
+
onPointerMove(event) {
|
|
336
|
+
if (!this.isResizing() || !this.activeHandle) {
|
|
223
337
|
return;
|
|
224
|
-
const rect = this.hostElement.getBoundingClientRect();
|
|
225
|
-
const isRTL = this.isRTL();
|
|
226
|
-
let newWidth = isRTL ? rect.right - event.clientX : event.clientX - rect.left;
|
|
227
|
-
newWidth = Math.max(this.minWidth(), Math.min(newWidth, this.maxWidth()));
|
|
228
|
-
if (newWidth !== this.hostElement.offsetWidth) {
|
|
229
|
-
this.hostElement.style.width = `${newWidth}px`;
|
|
230
338
|
}
|
|
339
|
+
const axes = getHandleAxes(this.activeHandle);
|
|
340
|
+
const lock = this.lockAspectRatio();
|
|
341
|
+
const next = this.computeSize(event, this.activeHandle);
|
|
342
|
+
event.preventDefault();
|
|
343
|
+
this.applySize(axes.horizontal || lock ? next.width : null, axes.vertical || lock ? next.height : null);
|
|
231
344
|
}
|
|
232
|
-
|
|
233
|
-
if (!this.isResizing()
|
|
345
|
+
onPointerUp(event) {
|
|
346
|
+
if (!this.isResizing()) {
|
|
234
347
|
return;
|
|
348
|
+
}
|
|
349
|
+
const handle = event.currentTarget;
|
|
350
|
+
try {
|
|
351
|
+
handle?.releasePointerCapture?.(event.pointerId);
|
|
352
|
+
}
|
|
353
|
+
catch {
|
|
354
|
+
// Pointer capture may already have been released.
|
|
355
|
+
}
|
|
356
|
+
const axes = this.activeHandle ? getHandleAxes(this.activeHandle) : null;
|
|
357
|
+
const current = this.getCurrentSize();
|
|
358
|
+
const oldValue = { width: this.startWidth, height: this.startHeight };
|
|
235
359
|
this.document.body.style.cursor = '';
|
|
236
|
-
|
|
237
|
-
|
|
360
|
+
if (handle) {
|
|
361
|
+
handle.style.backgroundColor = STYLES.backgroundColor;
|
|
362
|
+
}
|
|
238
363
|
this.zone.run(() => {
|
|
239
|
-
|
|
364
|
+
if (axes?.horizontal) {
|
|
365
|
+
this.width.set(current.width);
|
|
366
|
+
}
|
|
367
|
+
if (axes?.vertical) {
|
|
368
|
+
this.height.set(current.height);
|
|
369
|
+
}
|
|
240
370
|
this.onResizingEnded.emit({
|
|
241
371
|
component: this,
|
|
242
372
|
htmlElement: this.hostElement,
|
|
243
373
|
isUserInteraction: true,
|
|
244
374
|
name: 'resizingEnded',
|
|
245
|
-
value:
|
|
246
|
-
oldValue
|
|
375
|
+
value: current,
|
|
376
|
+
oldValue,
|
|
247
377
|
});
|
|
248
378
|
});
|
|
249
|
-
this.
|
|
379
|
+
this.stopResizing();
|
|
250
380
|
}
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
|
|
381
|
+
onPointerEnter(event) {
|
|
382
|
+
if (this.isResizing()) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const handle = event.currentTarget;
|
|
386
|
+
if (handle) {
|
|
387
|
+
handle.style.backgroundColor = STYLES.backgroundColorHover;
|
|
254
388
|
}
|
|
255
389
|
}
|
|
256
|
-
|
|
257
|
-
if (
|
|
258
|
-
|
|
390
|
+
onPointerLeave(event) {
|
|
391
|
+
if (this.isResizing()) {
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
const handle = event.currentTarget;
|
|
395
|
+
if (handle) {
|
|
396
|
+
handle.style.backgroundColor = STYLES.backgroundColor;
|
|
259
397
|
}
|
|
260
398
|
}
|
|
261
|
-
onDoubleClick() {
|
|
262
|
-
const
|
|
399
|
+
onDoubleClick(event) {
|
|
400
|
+
const handleType = this.getHandleType(event);
|
|
401
|
+
if (!handleType) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
event.preventDefault();
|
|
405
|
+
const axes = getHandleAxes(handleType);
|
|
406
|
+
const oldValue = this.getCurrentSize();
|
|
263
407
|
const action = this.dblClickAction();
|
|
264
|
-
let
|
|
408
|
+
let value;
|
|
265
409
|
switch (action) {
|
|
266
410
|
case 'reset':
|
|
267
|
-
|
|
411
|
+
value = this.resetToInitialSize(axes);
|
|
268
412
|
break;
|
|
269
413
|
case 'maximize':
|
|
270
|
-
|
|
414
|
+
value = this.maximizeToMaxSize(axes);
|
|
271
415
|
break;
|
|
272
416
|
case 'fit':
|
|
273
|
-
|
|
417
|
+
value = this.fitToContent(axes);
|
|
274
418
|
break;
|
|
275
419
|
default:
|
|
276
|
-
|
|
420
|
+
value = oldValue;
|
|
277
421
|
}
|
|
278
422
|
this.zone.run(() => {
|
|
279
423
|
this.onResizingDblClick.emit({
|
|
@@ -281,53 +425,201 @@ class AXResizableDirective {
|
|
|
281
425
|
htmlElement: this.hostElement,
|
|
282
426
|
isUserInteraction: true,
|
|
283
427
|
name: 'onResizingDblClick',
|
|
284
|
-
oldValue
|
|
285
|
-
value
|
|
428
|
+
oldValue,
|
|
429
|
+
value,
|
|
286
430
|
});
|
|
287
431
|
});
|
|
288
432
|
}
|
|
289
|
-
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
433
|
+
computeSize(event, handle) {
|
|
434
|
+
const dx = event.clientX - this.startX;
|
|
435
|
+
const dy = event.clientY - this.startY;
|
|
436
|
+
const rtl = this.isRTL();
|
|
437
|
+
const axes = getHandleAxes(handle);
|
|
438
|
+
const lock = this.lockAspectRatio();
|
|
439
|
+
let width = this.startWidth;
|
|
440
|
+
let height = this.startHeight;
|
|
441
|
+
if (axes.horizontal === 'end') {
|
|
442
|
+
width = this.startWidth + (rtl ? -dx : dx);
|
|
443
|
+
}
|
|
444
|
+
else if (axes.horizontal === 'start') {
|
|
445
|
+
width = this.startWidth + (rtl ? dx : -dx);
|
|
446
|
+
}
|
|
447
|
+
if (axes.vertical === 'bottom') {
|
|
448
|
+
height = this.startHeight + dy;
|
|
449
|
+
}
|
|
450
|
+
else if (axes.vertical === 'top') {
|
|
451
|
+
height = this.startHeight - dy;
|
|
452
|
+
}
|
|
453
|
+
if (lock) {
|
|
454
|
+
const ratio = this.startRatio > 0 ? this.startRatio : 1;
|
|
455
|
+
if (axes.horizontal && axes.vertical) {
|
|
456
|
+
const widthDelta = Math.abs(width - this.startWidth);
|
|
457
|
+
const heightDelta = Math.abs(height - this.startHeight);
|
|
458
|
+
if (widthDelta >= heightDelta) {
|
|
459
|
+
height = width / ratio;
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
width = height * ratio;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
else if (axes.horizontal) {
|
|
466
|
+
height = width / ratio;
|
|
467
|
+
}
|
|
468
|
+
else if (axes.vertical) {
|
|
469
|
+
width = height * ratio;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
return this.clampSize(width, height, lock);
|
|
473
|
+
}
|
|
474
|
+
clampSize(width, height, lock) {
|
|
475
|
+
const minW = this.minWidth();
|
|
476
|
+
const maxW = this.maxWidth();
|
|
477
|
+
const minH = this.minHeight();
|
|
478
|
+
const maxH = this.maxHeight();
|
|
479
|
+
if (!lock) {
|
|
480
|
+
return {
|
|
481
|
+
width: Math.max(minW, Math.min(width, maxW)),
|
|
482
|
+
height: Math.max(minH, Math.min(height, maxH)),
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
const ratio = this.startRatio > 0 ? this.startRatio : 1;
|
|
486
|
+
width = Math.max(minW, width);
|
|
487
|
+
height = width / ratio;
|
|
488
|
+
if (height < minH) {
|
|
489
|
+
height = minH;
|
|
490
|
+
width = height * ratio;
|
|
491
|
+
}
|
|
492
|
+
if (width > maxW) {
|
|
493
|
+
width = maxW;
|
|
494
|
+
height = width / ratio;
|
|
495
|
+
}
|
|
496
|
+
if (height > maxH) {
|
|
497
|
+
height = maxH;
|
|
498
|
+
width = height * ratio;
|
|
499
|
+
}
|
|
500
|
+
if (width < minW) {
|
|
501
|
+
width = minW;
|
|
502
|
+
height = width / ratio;
|
|
503
|
+
}
|
|
504
|
+
if (height < minH) {
|
|
505
|
+
height = minH;
|
|
506
|
+
width = height * ratio;
|
|
507
|
+
}
|
|
508
|
+
return {
|
|
509
|
+
width: Math.max(minW, Math.min(width, maxW)),
|
|
510
|
+
height: Math.max(minH, Math.min(height, maxH)),
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
resetToInitialSize(axes) {
|
|
514
|
+
const size = this.getCurrentSize();
|
|
515
|
+
if (axes.horizontal) {
|
|
516
|
+
const next = this.defaultWidth() ?? this.width() ?? this.initialElementWidth;
|
|
517
|
+
this.applySize(next, null);
|
|
518
|
+
size.width = next;
|
|
519
|
+
}
|
|
520
|
+
if (axes.vertical) {
|
|
521
|
+
const next = this.defaultHeight() ?? this.height() ?? this.initialElementHeight;
|
|
522
|
+
this.applySize(null, next);
|
|
523
|
+
size.height = next;
|
|
524
|
+
}
|
|
525
|
+
return size;
|
|
526
|
+
}
|
|
527
|
+
maximizeToMaxSize(axes) {
|
|
528
|
+
const size = this.getCurrentSize();
|
|
529
|
+
if (axes.horizontal && this.maxWidth() !== Infinity) {
|
|
530
|
+
this.applySize(this.maxWidth(), null);
|
|
531
|
+
size.width = this.maxWidth();
|
|
532
|
+
}
|
|
533
|
+
if (axes.vertical && this.maxHeight() !== Infinity) {
|
|
534
|
+
this.applySize(null, this.maxHeight());
|
|
535
|
+
size.height = this.maxHeight();
|
|
536
|
+
}
|
|
537
|
+
return size;
|
|
538
|
+
}
|
|
539
|
+
fitToContent(axes) {
|
|
540
|
+
if (axes.horizontal) {
|
|
541
|
+
this.hostElement.style.width = 'fit-content';
|
|
542
|
+
}
|
|
543
|
+
if (axes.vertical) {
|
|
544
|
+
this.hostElement.style.height = 'fit-content';
|
|
545
|
+
}
|
|
546
|
+
return this.getCurrentSize();
|
|
302
547
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
this.
|
|
548
|
+
getCurrentSize() {
|
|
549
|
+
return {
|
|
550
|
+
width: this.hostElement.offsetWidth,
|
|
551
|
+
height: this.hostElement.offsetHeight,
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
getHandleType(event) {
|
|
555
|
+
const target = event.currentTarget;
|
|
556
|
+
const value = target?.dataset['axResizeHandle'];
|
|
557
|
+
return value ?? null;
|
|
558
|
+
}
|
|
559
|
+
getCursorForHandle(type) {
|
|
560
|
+
if (type === 'start' || type === 'end') {
|
|
561
|
+
return STYLES.cursorHorizontal;
|
|
562
|
+
}
|
|
563
|
+
if (type === 'top' || type === 'bottom') {
|
|
564
|
+
return STYLES.cursorVertical;
|
|
565
|
+
}
|
|
566
|
+
const nwseInLtr = type === 'bottom-end' || type === 'top-start';
|
|
567
|
+
const useNwse = this.isRTL() ? !nwseInLtr : nwseInLtr;
|
|
568
|
+
return useNwse ? STYLES.cursorCorner : STYLES.cursorCornerAlt;
|
|
569
|
+
}
|
|
570
|
+
getActiveCursor(type) {
|
|
571
|
+
if (type === 'start' || type === 'end') {
|
|
572
|
+
return STYLES.cursorActive;
|
|
307
573
|
}
|
|
308
|
-
return
|
|
574
|
+
return this.getCursorForHandle(type);
|
|
309
575
|
}
|
|
310
|
-
|
|
311
|
-
this.
|
|
312
|
-
|
|
576
|
+
stopResizing() {
|
|
577
|
+
this.activeHandle = null;
|
|
578
|
+
this.isResizing.set(false);
|
|
313
579
|
}
|
|
314
580
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXResizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
315
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: AXResizableDirective, isStandalone: true, selector: "[axResizable]", inputs: { axResizable: { classPropertyName: "axResizable", publicName: "axResizable", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, dblClickAction: { classPropertyName: "dblClickAction", publicName: "dblClickAction", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, defaultWidth: { classPropertyName: "defaultWidth", publicName: "defaultWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { axResizable: "axResizableChange", minWidth: "minWidthChange", maxWidth: "maxWidthChange", dblClickAction: "dblClickActionChange", width: "widthChange", defaultWidth: "defaultWidthChange", onResizingStarted: "onResizingStarted", onResizingEnded: "onResizingEnded", onResizingDblClick: "onResizingDblClick" }, ngImport: i0 }); }
|
|
581
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: AXResizableDirective, isStandalone: true, selector: "[axResizable]", inputs: { axResizable: { classPropertyName: "axResizable", publicName: "axResizable", isSignal: true, isRequired: false, transformFunction: null }, handles: { classPropertyName: "handles", publicName: "handles", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, dblClickAction: { classPropertyName: "dblClickAction", publicName: "dblClickAction", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, defaultWidth: { classPropertyName: "defaultWidth", publicName: "defaultWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, defaultHeight: { classPropertyName: "defaultHeight", publicName: "defaultHeight", isSignal: true, isRequired: false, transformFunction: null }, lockAspectRatio: { classPropertyName: "lockAspectRatio", publicName: "lockAspectRatio", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { axResizable: "axResizableChange", handles: "handlesChange", minWidth: "minWidthChange", maxWidth: "maxWidthChange", minHeight: "minHeightChange", maxHeight: "maxHeightChange", dblClickAction: "dblClickActionChange", width: "widthChange", defaultWidth: "defaultWidthChange", height: "heightChange", defaultHeight: "defaultHeightChange", lockAspectRatio: "lockAspectRatioChange", onResizingStarted: "onResizingStarted", onResizingEnded: "onResizingEnded", onResizingDblClick: "onResizingDblClick" }, ngImport: i0 }); }
|
|
316
582
|
}
|
|
317
583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXResizableDirective, decorators: [{
|
|
318
584
|
type: Directive,
|
|
319
585
|
args: [{
|
|
320
586
|
selector: '[axResizable]',
|
|
321
587
|
}]
|
|
322
|
-
}], ctorParameters: () => [], propDecorators: { axResizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "axResizable", required: false }] }, { type: i0.Output, args: ["axResizableChange"] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }, { type: i0.Output, args: ["minWidthChange"] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }, { type: i0.Output, args: ["maxWidthChange"] }], dblClickAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "dblClickAction", required: false }] }, { type: i0.Output, args: ["dblClickActionChange"] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }, { type: i0.Output, args: ["widthChange"] }], defaultWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultWidth", required: false }] }, { type: i0.Output, args: ["defaultWidthChange"] }], onResizingStarted: [{ type: i0.Output, args: ["onResizingStarted"] }], onResizingEnded: [{ type: i0.Output, args: ["onResizingEnded"] }], onResizingDblClick: [{ type: i0.Output, args: ["onResizingDblClick"] }] } });
|
|
588
|
+
}], ctorParameters: () => [], propDecorators: { axResizable: [{ type: i0.Input, args: [{ isSignal: true, alias: "axResizable", required: false }] }, { type: i0.Output, args: ["axResizableChange"] }], handles: [{ type: i0.Input, args: [{ isSignal: true, alias: "handles", required: false }] }, { type: i0.Output, args: ["handlesChange"] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }, { type: i0.Output, args: ["minWidthChange"] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }, { type: i0.Output, args: ["maxWidthChange"] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }, { type: i0.Output, args: ["minHeightChange"] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }, { type: i0.Output, args: ["maxHeightChange"] }], dblClickAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "dblClickAction", required: false }] }, { type: i0.Output, args: ["dblClickActionChange"] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }, { type: i0.Output, args: ["widthChange"] }], defaultWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultWidth", required: false }] }, { type: i0.Output, args: ["defaultWidthChange"] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }, { type: i0.Output, args: ["heightChange"] }], defaultHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultHeight", required: false }] }, { type: i0.Output, args: ["defaultHeightChange"] }], lockAspectRatio: [{ type: i0.Input, args: [{ isSignal: true, alias: "lockAspectRatio", required: false }] }, { type: i0.Output, args: ["lockAspectRatioChange"] }], onResizingStarted: [{ type: i0.Output, args: ["onResizingStarted"] }], onResizingEnded: [{ type: i0.Output, args: ["onResizingEnded"] }], onResizingDblClick: [{ type: i0.Output, args: ["onResizingDblClick"] }] } });
|
|
589
|
+
function getHandleAxes(handle) {
|
|
590
|
+
switch (handle) {
|
|
591
|
+
case 'start':
|
|
592
|
+
return { horizontal: 'start', vertical: null };
|
|
593
|
+
case 'end':
|
|
594
|
+
return { horizontal: 'end', vertical: null };
|
|
595
|
+
case 'top':
|
|
596
|
+
return { horizontal: null, vertical: 'top' };
|
|
597
|
+
case 'bottom':
|
|
598
|
+
return { horizontal: null, vertical: 'bottom' };
|
|
599
|
+
case 'top-start':
|
|
600
|
+
return { horizontal: 'start', vertical: 'top' };
|
|
601
|
+
case 'top-end':
|
|
602
|
+
return { horizontal: 'end', vertical: 'top' };
|
|
603
|
+
case 'bottom-start':
|
|
604
|
+
return { horizontal: 'start', vertical: 'bottom' };
|
|
605
|
+
case 'bottom-end':
|
|
606
|
+
return { horizontal: 'end', vertical: 'bottom' };
|
|
607
|
+
}
|
|
608
|
+
}
|
|
323
609
|
const STYLES = {
|
|
324
610
|
handlerWidth: 'var(--ax-comp-resizable-handler-width, 4px)',
|
|
611
|
+
handlerHeight: 'var(--ax-comp-resizable-handler-height, 4px)',
|
|
612
|
+
cornerSize: 'var(--ax-comp-resizable-corner-size, 10px)',
|
|
325
613
|
backgroundColor: 'rgba(var(--ax-comp-resizable-background-color))',
|
|
326
614
|
backgroundColorActive: 'rgba(var(--ax-comp-resizable-background-color-active, var(--ax-sys-color-primary-surface)))',
|
|
327
615
|
backgroundColorHover: 'rgba(var(--ax-comp-resizable-background-color-hover, var(--ax-sys-color-primary-light-surface)))',
|
|
328
|
-
|
|
616
|
+
cursorHorizontal: 'var(--ax-comp-resizable-cursor, ew-resize)',
|
|
617
|
+
cursorVertical: 'var(--ax-comp-resizable-cursor-vertical, ns-resize)',
|
|
618
|
+
cursorCorner: 'var(--ax-comp-resizable-cursor-corner, nwse-resize)',
|
|
619
|
+
cursorCornerAlt: 'var(--ax-comp-resizable-cursor-corner-alt, nesw-resize)',
|
|
329
620
|
cursorActive: 'var(--ax-comp-resizable-cursor-active, ew-resize)',
|
|
330
621
|
zIndex: 'var(--ax-comp-resizable-z-index, 999)',
|
|
622
|
+
zIndexCorner: 'var(--ax-comp-resizable-z-index-corner, 1000)',
|
|
331
623
|
transition: 'var(--ax-comp-resizable-transition, background-color --ax-sys-transition-duration --ax-sys-transition-timing-function)',
|
|
332
624
|
borderRadius: 'var(--ax-comp-resizable-border-radius, --ax-sys-border-radius)',
|
|
333
625
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-cdk-resizable.mjs","sources":["../../../../packages/cdk/resizable/src/lib/resize.directive.ts","../../../../packages/cdk/resizable/src/acorex-cdk-resizable.ts"],"sourcesContent":["import { AXPlatform } from '@acorex/core/platform';\nimport { AXHtmlUtil } from '@acorex/core/utils';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n AfterViewInit,\n Directive,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n model,\n NgZone,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\n@Directive({\n selector: '[axResizable]',\n})\nexport class AXResizableDirective implements AfterViewInit, OnDestroy {\n private readonly el = inject(ElementRef);\n private readonly platformService = inject(AXPlatform);\n private readonly zone = inject(NgZone);\n private readonly document = inject(DOCUMENT);\n private readonly platformID = inject(PLATFORM_ID);\n private readonly isBrowser: boolean;\n \n private hostElement!: HTMLElement;\n private resizeHandle?: HTMLElement;\n private isResizing: WritableSignal<boolean> = signal(false);\n private initialElementWidth = 0;\n private startMoveWidth = 0;\n private subscriptions = new Subscription();\n \n // Bound event handlers to maintain reference for cleanup\n private readonly boundMouseDown = this.onMouseDown.bind(this);\n private readonly boundMouseMove = this.onMouseMove.bind(this);\n private readonly boundMouseUp = this.onMouseUp.bind(this);\n private readonly boundMouseEnter = this.onMouseEnter.bind(this);\n private readonly boundMouseLeave = this.onMouseLeave.bind(this);\n private readonly boundDoubleClick = this.onDoubleClick.bind(this);\n \n private readonly resizeObserver = new ResizeObserver((entries) => {\n const parentElement = this.hostElement.parentElement;\n if (!parentElement) return;\n \n for (const entry of entries) {\n if (entry.target === parentElement && this.maxWidth() === Infinity) {\n this.maxWidth.set(entry.contentRect.width);\n break;\n }\n }\n });\n\n /** Define if directive is active or not */\n axResizable = model(true);\n\n /** Minimum width for the resizable element. */\n minWidth = model(100);\n\n /** Maximum width for the resizable element. Defaults to parent width if not provided. */\n maxWidth = model(Infinity);\n\n /** Behavior on double-click: 'reset' or 'maximize'. */\n dblClickAction = model<'reset' | 'maximize' | 'fit'>('reset');\n\n /** Define initial width for the element. */\n width = model<null | number>(null);\n\n /** Define reset width for the element. */\n defaultWidth = model<null | number>(null);\n\n /** Event emitted when resizing starts. */\n onResizingStarted = output<AXValueChangedEvent<number>>();\n\n /** Event emitted when resizing ends. */\n onResizingEnded = output<AXValueChangedEvent<number>>();\n\n /** Event emitted on double-click. */\n onResizingDblClick = output<AXValueChangedEvent<number>>();\n\n constructor() {\n this.isBrowser = isPlatformBrowser(this.platformID);\n this.hostElement = this.el.nativeElement as HTMLElement;\n \n this.subscriptions.add(\n this.platformService.directionChange.subscribe((i) => {\n this.isRTL.set(i.data === 'rtl');\n if (this.resizeHandle) {\n this.updateHandlePosition();\n }\n })\n );\n\n if (this.isBrowser) {\n effect(() => {\n if (this.isResizing()) {\n return;\n }\n const resolvedWidth = this.width() ?? this.defaultWidth();\n if (resolvedWidth !== null) {\n this.applyElementWidth(resolvedWidth);\n }\n });\n }\n }\n\n ngAfterViewInit(): void {\n if (!this.isBrowser) return;\n \n this.initialElementWidth = this.hostElement.offsetWidth;\n\n this.applyWidthFromModel();\n\n if (this.maxWidth() === Infinity) {\n const parentWidth = this.hostElement.parentElement?.offsetWidth;\n if (parentWidth) {\n this.maxWidth.set(parentWidth);\n }\n }\n \n const parentElement = this.hostElement.parentElement;\n if (parentElement) {\n this.resizeObserver.observe(parentElement);\n }\n \n this.createResizeHandle();\n this.setupResizableState();\n }\n\n ngOnDestroy(): void {\n this.subscriptions.unsubscribe();\n this.resizeObserver.disconnect();\n this.cleanupEventListeners();\n }\n\n private setupResizableState(): void {\n this.subscriptions.add(\n this.axResizable.subscribe((isActive) => {\n if (!isActive) {\n this.applyWidthFromModel();\n this.cleanupEventListeners();\n } else {\n this.applyWidthFromModel();\n this.createResizeHandle();\n }\n })\n );\n }\n\n private applyWidthFromModel(): void {\n const width = this.width();\n if (width !== null) {\n this.applyElementWidth(width);\n return;\n }\n const defaultWidth = this.defaultWidth();\n if (defaultWidth !== null) {\n this.applyElementWidth(defaultWidth);\n }\n }\n\n private applyElementWidth(width: number): void {\n this.hostElement.style.width = `${width}px`;\n }\n\n private createResizeHandle(): void {\n if (!this.axResizable() || this.resizeHandle) return;\n\n this.hostElement.style.position = 'relative';\n\n this.resizeHandle = this.document.createElement('div');\n this.resizeHandle.classList.add('ax-resizable-handler');\n this.hostElement.appendChild(this.resizeHandle);\n\n this.applyHandleStyles();\n this.attachEventListeners();\n }\n \n private applyHandleStyles(): void {\n if (!this.resizeHandle) return;\n \n Object.assign(this.resizeHandle.style, {\n width: STYLES.handlerWidth,\n backgroundColor: STYLES.backgroundColor,\n position: 'absolute',\n top: '0',\n bottom: '0',\n cursor: STYLES.cursor,\n zIndex: STYLES.zIndex,\n transition: STYLES.transition,\n borderRadius: STYLES.borderRadius,\n userSelect: 'none',\n });\n \n this.updateHandlePosition();\n }\n \n private updateHandlePosition(): void {\n if (!this.resizeHandle) return;\n \n const isRTL = this.isRTL();\n if (isRTL) {\n this.resizeHandle.style.left = '0';\n this.resizeHandle.style.right = '';\n } else {\n this.resizeHandle.style.right = '0';\n this.resizeHandle.style.left = '';\n }\n }\n \n private attachEventListeners(): void {\n if (!this.resizeHandle) return;\n \n const handle = this.resizeHandle;\n this.zone.runOutsideAngular(() => {\n handle.addEventListener('mousedown', this.boundMouseDown);\n handle.addEventListener('mouseenter', this.boundMouseEnter);\n handle.addEventListener('mouseleave', this.boundMouseLeave);\n handle.addEventListener('dblclick', this.boundDoubleClick);\n this.document.addEventListener('mousemove', this.boundMouseMove);\n this.document.addEventListener('mouseup', this.boundMouseUp);\n });\n }\n\n private cleanupEventListeners(): void {\n if (this.resizeHandle) {\n this.resizeHandle.removeEventListener('mousedown', this.boundMouseDown);\n this.resizeHandle.removeEventListener('mouseenter', this.boundMouseEnter);\n this.resizeHandle.removeEventListener('mouseleave', this.boundMouseLeave);\n this.resizeHandle.removeEventListener('dblclick', this.boundDoubleClick);\n this.resizeHandle.remove();\n this.resizeHandle = undefined;\n }\n\n this.document.removeEventListener('mousemove', this.boundMouseMove);\n this.document.removeEventListener('mouseup', this.boundMouseUp);\n this.document.body.style.cursor = '';\n }\n\n private isRTL = signal(AXHtmlUtil.isRtl(this.document.documentElement));\n\n private onMouseDown(event: MouseEvent): void {\n if (!this.resizeHandle) return;\n \n const handleRect = this.resizeHandle.getBoundingClientRect();\n if (event.clientX < handleRect.left || event.clientX > handleRect.right) return;\n \n event.preventDefault();\n \n this.isResizing.set(true);\n this.document.body.style.cursor = STYLES.cursorActive;\n this.resizeHandle.style.backgroundColor = STYLES.backgroundColorActive;\n this.startMoveWidth = this.hostElement.offsetWidth;\n \n this.zone.run(() => {\n this.onResizingStarted.emit({\n component: this,\n htmlElement: this.hostElement,\n isUserInteraction: true,\n name: 'resizingStarted',\n value: this.startMoveWidth,\n oldValue: this.startMoveWidth,\n });\n });\n }\n\n private onMouseMove(event: MouseEvent): void {\n if (!this.isResizing()) return;\n \n const rect = this.hostElement.getBoundingClientRect();\n const isRTL = this.isRTL();\n \n let newWidth = isRTL ? rect.right - event.clientX : event.clientX - rect.left;\n newWidth = Math.max(this.minWidth(), Math.min(newWidth, this.maxWidth()));\n\n if (newWidth !== this.hostElement.offsetWidth) {\n this.hostElement.style.width = `${newWidth}px`;\n }\n }\n\n private onMouseUp(): void {\n if (!this.isResizing() || !this.resizeHandle) return;\n\n this.document.body.style.cursor = '';\n this.resizeHandle.style.backgroundColor = STYLES.backgroundColor;\n\n const currentWidth = this.hostElement.offsetWidth;\n\n this.zone.run(() => {\n this.width.set(currentWidth);\n this.onResizingEnded.emit({\n component: this,\n htmlElement: this.hostElement,\n isUserInteraction: true,\n name: 'resizingEnded',\n value: currentWidth,\n oldValue: this.startMoveWidth,\n });\n });\n\n this.isResizing.set(false);\n }\n\n private onMouseEnter(): void {\n if (!this.isResizing() && this.resizeHandle) {\n this.resizeHandle.style.backgroundColor = STYLES.backgroundColorHover;\n }\n }\n\n private onMouseLeave(): void {\n if (!this.isResizing() && this.resizeHandle) {\n this.resizeHandle.style.backgroundColor = STYLES.backgroundColor;\n }\n }\n\n private onDoubleClick(): void {\n const elementWidth = this.hostElement.offsetWidth;\n const action = this.dblClickAction();\n \n let newWidth: number;\n switch (action) {\n case 'reset':\n newWidth = this.resetToInitialWidth();\n break;\n case 'maximize':\n newWidth = this.maximizeToMaxWidth();\n break;\n case 'fit':\n newWidth = this.fitToContent();\n break;\n default:\n newWidth = elementWidth;\n }\n\n this.zone.run(() => {\n this.onResizingDblClick.emit({\n component: this,\n htmlElement: this.hostElement,\n isUserInteraction: true,\n name: 'onResizingDblClick',\n oldValue: elementWidth,\n value: newWidth,\n });\n });\n }\n\n private resetToInitialWidth(): number {\n const defaultWidth = this.defaultWidth();\n if (defaultWidth !== null) {\n this.applyElementWidth(defaultWidth);\n return defaultWidth;\n }\n\n const initialWidth = this.width();\n if (initialWidth !== null) {\n this.applyElementWidth(initialWidth);\n return initialWidth;\n }\n\n this.applyElementWidth(this.initialElementWidth);\n return this.initialElementWidth;\n }\n\n private maximizeToMaxWidth(): number {\n const maxWidth = this.maxWidth();\n if (maxWidth !== Infinity) {\n this.applyElementWidth(maxWidth);\n }\n return maxWidth;\n }\n\n private fitToContent(): number {\n this.hostElement.style.width = 'fit-content';\n return this.hostElement.clientWidth;\n }\n}\n\ninterface AXValueChangedEvent<T> {\n component: unknown;\n htmlElement?: HTMLElement;\n isUserInteraction?: boolean;\n name?: string;\n value?: T;\n oldValue?: T;\n}\n\nconst STYLES = {\n handlerWidth: 'var(--ax-comp-resizable-handler-width, 4px)',\n backgroundColor: 'rgba(var(--ax-comp-resizable-background-color))',\n backgroundColorActive: 'rgba(var(--ax-comp-resizable-background-color-active, var(--ax-sys-color-primary-surface)))',\n backgroundColorHover:\n 'rgba(var(--ax-comp-resizable-background-color-hover, var(--ax-sys-color-primary-light-surface)))',\n cursor: 'var(--ax-comp-resizable-cursor, ew-resize)',\n cursorActive: 'var(--ax-comp-resizable-cursor-active, ew-resize)',\n zIndex: 'var(--ax-comp-resizable-z-index, 999)',\n transition:\n 'var(--ax-comp-resizable-transition, background-color --ax-sys-transition-duration --ax-sys-transition-timing-function)',\n borderRadius: 'var(--ax-comp-resizable-border-radius, --ax-sys-border-radius)',\n};\n","/**\n *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.directive.ts","../../../../packages/cdk/resizable/src/acorex-cdk-resizable.ts"],"sourcesContent":["import { AXPlatform } from '@acorex/core/platform';\nimport { AXHtmlUtil } from '@acorex/core/utils';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n AfterViewInit,\n Directive,\n DOCUMENT,\n effect,\n ElementRef,\n inject,\n model,\n NgZone,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n WritableSignal,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nexport type AXResizeHandle =\n | 'start'\n | 'end'\n | 'top'\n | 'bottom'\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end';\n\nexport interface AXResizeSize {\n width: number;\n height: number;\n}\n\ntype AXResizeAxis = {\n horizontal: 'start' | 'end' | null;\n vertical: 'top' | 'bottom' | null;\n};\n\n@Directive({\n selector: '[axResizable]',\n})\nexport class AXResizableDirective implements AfterViewInit, OnDestroy {\n private readonly el = inject(ElementRef);\n private readonly platformService = inject(AXPlatform);\n private readonly zone = inject(NgZone);\n private readonly document = inject(DOCUMENT);\n private readonly platformID = inject(PLATFORM_ID);\n private readonly isBrowser: boolean;\n\n private hostElement!: HTMLElement;\n private readonly resizeHandles = new Map<AXResizeHandle, HTMLElement>();\n private readonly isResizing: WritableSignal<boolean> = signal(false);\n private activeHandle: AXResizeHandle | null = null;\n private initialElementWidth = 0;\n private initialElementHeight = 0;\n private startX = 0;\n private startY = 0;\n private startWidth = 0;\n private startHeight = 0;\n private startRatio = 1;\n private readonly subscriptions = new Subscription();\n private resizeObserver?: ResizeObserver;\n\n private readonly boundPointerDown = this.onPointerDown.bind(this);\n private readonly boundPointerMove = this.onPointerMove.bind(this);\n private readonly boundPointerUp = this.onPointerUp.bind(this);\n private readonly boundPointerEnter = this.onPointerEnter.bind(this);\n private readonly boundPointerLeave = this.onPointerLeave.bind(this);\n private readonly boundDoubleClick = this.onDoubleClick.bind(this);\n\n private readonly isRTL = signal(false);\n\n /** Define if directive is active or not */\n axResizable = model(true);\n\n /** Logical handles to render. Defaults to the inline-end edge. */\n handles = model<AXResizeHandle[]>(['end']);\n\n /** Minimum width for the resizable element. */\n minWidth = model(100);\n\n /** Maximum width for the resizable element. Defaults to parent width if not provided. */\n maxWidth = model(Infinity);\n\n /** Minimum height for the resizable element. */\n minHeight = model(100);\n\n /** Maximum height for the resizable element. Defaults to parent height if not provided. */\n maxHeight = model(Infinity);\n\n /** Behavior on double-click: 'reset', 'maximize', or 'fit'. */\n dblClickAction = model<'reset' | 'maximize' | 'fit'>('reset');\n\n /** Define initial width for the element. */\n width = model<null | number>(null);\n\n /** Define reset width for the element. */\n defaultWidth = model<null | number>(null);\n\n /** Define initial height for the element. */\n height = model<null | number>(null);\n\n /** Define reset height for the element. */\n defaultHeight = model<null | number>(null);\n\n /** Lock the element's aspect ratio from the size captured at pointer-down. */\n lockAspectRatio = model(false);\n\n /** Event emitted when resizing starts. */\n onResizingStarted = output<AXValueChangedEvent<AXResizeSize>>();\n\n /** Event emitted when resizing ends. */\n onResizingEnded = output<AXValueChangedEvent<AXResizeSize>>();\n\n /** Event emitted on double-click. */\n onResizingDblClick = output<AXValueChangedEvent<AXResizeSize>>();\n\n constructor() {\n this.isBrowser = isPlatformBrowser(this.platformID);\n this.hostElement = this.el.nativeElement as HTMLElement;\n this.isRTL.set(AXHtmlUtil.isRtl(this.document.documentElement));\n\n this.subscriptions.add(\n this.platformService.directionChange.subscribe((i) => {\n this.isRTL.set(i.data === 'rtl');\n }),\n );\n\n if (!this.isBrowser) {\n return;\n }\n\n this.resizeObserver = new ResizeObserver((entries) => {\n const parentElement = this.hostElement.parentElement;\n if (!parentElement) {\n return;\n }\n\n for (const entry of entries) {\n if (entry.target !== parentElement) {\n continue;\n }\n if (this.maxWidth() === Infinity) {\n this.maxWidth.set(entry.contentRect.width);\n }\n if (this.maxHeight() === Infinity) {\n this.maxHeight.set(entry.contentRect.height);\n }\n }\n });\n\n effect(() => {\n const isActive = this.axResizable();\n const handles = this.handles();\n this.reconcileHandles(isActive, handles);\n });\n\n effect(() => {\n this.isRTL();\n this.updateAllHandlePositions();\n });\n\n effect(() => {\n if (this.isResizing()) {\n return;\n }\n this.applySizeFromModel();\n });\n }\n\n ngAfterViewInit(): void {\n if (!this.isBrowser) {\n return;\n }\n\n this.initialElementWidth = this.hostElement.offsetWidth;\n this.initialElementHeight = this.hostElement.offsetHeight;\n this.applySizeFromModel();\n\n const parentElement = this.hostElement.parentElement;\n if (this.maxWidth() === Infinity) {\n const parentWidth = parentElement?.offsetWidth;\n if (parentWidth) {\n this.maxWidth.set(parentWidth);\n }\n }\n if (this.maxHeight() === Infinity) {\n const parentHeight = parentElement?.offsetHeight;\n if (parentHeight) {\n this.maxHeight.set(parentHeight);\n }\n }\n\n if (parentElement) {\n this.resizeObserver?.observe(parentElement);\n }\n }\n\n ngOnDestroy(): void {\n this.subscriptions.unsubscribe();\n this.resizeObserver?.disconnect();\n this.destroyAllHandles();\n this.document.body.style.cursor = '';\n }\n\n private reconcileHandles(isActive: boolean, handles: AXResizeHandle[]): void {\n if (!this.isBrowser) {\n return;\n }\n\n if (!isActive) {\n this.stopResizing();\n this.destroyAllHandles();\n this.applySizeFromModel();\n return;\n }\n\n this.hostElement.style.position = 'relative';\n\n const unique = [...new Set(handles)];\n const desired = new Set(unique);\n\n for (const [type, element] of this.resizeHandles) {\n if (!desired.has(type)) {\n this.destroyHandle(type, element);\n }\n }\n\n for (const type of unique) {\n if (!this.resizeHandles.has(type)) {\n this.createHandle(type);\n }\n }\n }\n\n private createHandle(type: AXResizeHandle): void {\n const handle = this.document.createElement('div');\n handle.classList.add('ax-resizable-handler', `ax-resizable-handler--${type}`);\n handle.dataset['axResizeHandle'] = type;\n this.hostElement.appendChild(handle);\n this.applyHandleStyles(handle, type);\n this.attachHandleListeners(handle);\n this.resizeHandles.set(type, handle);\n }\n\n private attachHandleListeners(handle: HTMLElement): void {\n this.zone.runOutsideAngular(() => {\n handle.addEventListener('pointerdown', this.boundPointerDown);\n handle.addEventListener('pointermove', this.boundPointerMove);\n handle.addEventListener('pointerup', this.boundPointerUp);\n handle.addEventListener('pointercancel', this.boundPointerUp);\n handle.addEventListener('pointerenter', this.boundPointerEnter);\n handle.addEventListener('pointerleave', this.boundPointerLeave);\n handle.addEventListener('dblclick', this.boundDoubleClick);\n });\n }\n\n private destroyHandle(type: AXResizeHandle, handle: HTMLElement): void {\n handle.removeEventListener('pointerdown', this.boundPointerDown);\n handle.removeEventListener('pointermove', this.boundPointerMove);\n handle.removeEventListener('pointerup', this.boundPointerUp);\n handle.removeEventListener('pointercancel', this.boundPointerUp);\n handle.removeEventListener('pointerenter', this.boundPointerEnter);\n handle.removeEventListener('pointerleave', this.boundPointerLeave);\n handle.removeEventListener('dblclick', this.boundDoubleClick);\n handle.remove();\n this.resizeHandles.delete(type);\n }\n\n private destroyAllHandles(): void {\n for (const [type, handle] of [...this.resizeHandles]) {\n this.destroyHandle(type, handle);\n }\n }\n\n private applyHandleStyles(handle: HTMLElement, type: AXResizeHandle): void {\n const isCorner = type.includes('-');\n\n Object.assign(handle.style, {\n position: 'absolute',\n backgroundColor: STYLES.backgroundColor,\n zIndex: isCorner ? STYLES.zIndexCorner : STYLES.zIndex,\n transition: STYLES.transition,\n borderRadius: STYLES.borderRadius,\n userSelect: 'none',\n touchAction: 'none',\n cursor: this.getCursorForHandle(type),\n left: '',\n right: '',\n top: '',\n bottom: '',\n width: '',\n height: '',\n });\n\n this.positionHandle(handle, type);\n }\n\n private updateAllHandlePositions(): void {\n for (const [type, handle] of this.resizeHandles) {\n handle.style.cursor = this.getCursorForHandle(type);\n this.positionHandle(handle, type);\n }\n }\n\n private positionHandle(handle: HTMLElement, type: AXResizeHandle): void {\n const rtl = this.isRTL();\n\n switch (type) {\n case 'start':\n case 'end':\n handle.style.top = '0';\n handle.style.bottom = '0';\n handle.style.width = STYLES.handlerWidth;\n this.applyInlineSide(handle, type, rtl);\n break;\n case 'top':\n case 'bottom':\n handle.style.left = '0';\n handle.style.right = '0';\n handle.style.height = STYLES.handlerHeight;\n if (type === 'top') {\n handle.style.top = '0';\n handle.style.bottom = '';\n } else {\n handle.style.bottom = '0';\n handle.style.top = '';\n }\n break;\n default: {\n const [vertical, horizontal] = type.split('-') as ['top' | 'bottom', 'start' | 'end'];\n handle.style.width = STYLES.cornerSize;\n handle.style.height = STYLES.cornerSize;\n if (vertical === 'top') {\n handle.style.top = '0';\n handle.style.bottom = '';\n } else {\n handle.style.bottom = '0';\n handle.style.top = '';\n }\n this.applyInlineSide(handle, horizontal, rtl);\n break;\n }\n }\n }\n\n private applyInlineSide(element: HTMLElement, side: 'start' | 'end', rtl: boolean): void {\n const physicalLeft = (side === 'start' && !rtl) || (side === 'end' && rtl);\n if (physicalLeft) {\n element.style.left = '0';\n element.style.right = '';\n } else {\n element.style.right = '0';\n element.style.left = '';\n }\n }\n\n private applySizeFromModel(): void {\n const width = this.width() ?? this.defaultWidth();\n const height = this.height() ?? this.defaultHeight();\n this.applySize(width, height);\n }\n\n private applySize(width: number | null, height: number | null): void {\n if (width !== null) {\n this.hostElement.style.width = `${width}px`;\n }\n if (height !== null) {\n this.hostElement.style.height = `${height}px`;\n }\n }\n\n private onPointerDown(event: PointerEvent): void {\n const handleType = this.getHandleType(event);\n const handle = event.currentTarget as HTMLElement | null;\n if (!handleType || !handle) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n\n try {\n handle.setPointerCapture?.(event.pointerId);\n } catch {\n // Pointer capture can throw for synthetic or inactive pointers.\n }\n\n this.activeHandle = handleType;\n this.isResizing.set(true);\n this.startX = event.clientX;\n this.startY = event.clientY;\n this.startWidth = this.hostElement.offsetWidth;\n this.startHeight = this.hostElement.offsetHeight;\n this.startRatio = this.startHeight > 0 ? this.startWidth / this.startHeight : 1;\n\n this.document.body.style.cursor = this.getActiveCursor(handleType);\n handle.style.backgroundColor = STYLES.backgroundColorActive;\n\n const size: AXResizeSize = { width: this.startWidth, height: this.startHeight };\n this.zone.run(() => {\n this.onResizingStarted.emit({\n component: this,\n htmlElement: this.hostElement,\n isUserInteraction: true,\n name: 'resizingStarted',\n value: size,\n oldValue: size,\n });\n });\n }\n\n private onPointerMove(event: PointerEvent): void {\n if (!this.isResizing() || !this.activeHandle) {\n return;\n }\n\n const axes = getHandleAxes(this.activeHandle);\n const lock = this.lockAspectRatio();\n const next = this.computeSize(event, this.activeHandle);\n event.preventDefault();\n this.applySize(\n axes.horizontal || lock ? next.width : null,\n axes.vertical || lock ? next.height : null,\n );\n }\n\n private onPointerUp(event: PointerEvent): void {\n if (!this.isResizing()) {\n return;\n }\n\n const handle = event.currentTarget as HTMLElement | null;\n try {\n handle?.releasePointerCapture?.(event.pointerId);\n } catch {\n // Pointer capture may already have been released.\n }\n\n const axes = this.activeHandle ? getHandleAxes(this.activeHandle) : null;\n const current = this.getCurrentSize();\n const oldValue: AXResizeSize = { width: this.startWidth, height: this.startHeight };\n\n this.document.body.style.cursor = '';\n if (handle) {\n handle.style.backgroundColor = STYLES.backgroundColor;\n }\n\n this.zone.run(() => {\n if (axes?.horizontal) {\n this.width.set(current.width);\n }\n if (axes?.vertical) {\n this.height.set(current.height);\n }\n this.onResizingEnded.emit({\n component: this,\n htmlElement: this.hostElement,\n isUserInteraction: true,\n name: 'resizingEnded',\n value: current,\n oldValue,\n });\n });\n\n this.stopResizing();\n }\n\n private onPointerEnter(event: PointerEvent): void {\n if (this.isResizing()) {\n return;\n }\n const handle = event.currentTarget as HTMLElement | null;\n if (handle) {\n handle.style.backgroundColor = STYLES.backgroundColorHover;\n }\n }\n\n private onPointerLeave(event: PointerEvent): void {\n if (this.isResizing()) {\n return;\n }\n const handle = event.currentTarget as HTMLElement | null;\n if (handle) {\n handle.style.backgroundColor = STYLES.backgroundColor;\n }\n }\n\n private onDoubleClick(event: MouseEvent): void {\n const handleType = this.getHandleType(event);\n if (!handleType) {\n return;\n }\n\n event.preventDefault();\n\n const axes = getHandleAxes(handleType);\n const oldValue = this.getCurrentSize();\n const action = this.dblClickAction();\n\n let value: AXResizeSize;\n switch (action) {\n case 'reset':\n value = this.resetToInitialSize(axes);\n break;\n case 'maximize':\n value = this.maximizeToMaxSize(axes);\n break;\n case 'fit':\n value = this.fitToContent(axes);\n break;\n default:\n value = oldValue;\n }\n\n this.zone.run(() => {\n this.onResizingDblClick.emit({\n component: this,\n htmlElement: this.hostElement,\n isUserInteraction: true,\n name: 'onResizingDblClick',\n oldValue,\n value,\n });\n });\n }\n\n private computeSize(event: PointerEvent, handle: AXResizeHandle): AXResizeSize {\n const dx = event.clientX - this.startX;\n const dy = event.clientY - this.startY;\n const rtl = this.isRTL();\n const axes = getHandleAxes(handle);\n const lock = this.lockAspectRatio();\n\n let width = this.startWidth;\n let height = this.startHeight;\n\n if (axes.horizontal === 'end') {\n width = this.startWidth + (rtl ? -dx : dx);\n } else if (axes.horizontal === 'start') {\n width = this.startWidth + (rtl ? dx : -dx);\n }\n\n if (axes.vertical === 'bottom') {\n height = this.startHeight + dy;\n } else if (axes.vertical === 'top') {\n height = this.startHeight - dy;\n }\n\n if (lock) {\n const ratio = this.startRatio > 0 ? this.startRatio : 1;\n if (axes.horizontal && axes.vertical) {\n const widthDelta = Math.abs(width - this.startWidth);\n const heightDelta = Math.abs(height - this.startHeight);\n if (widthDelta >= heightDelta) {\n height = width / ratio;\n } else {\n width = height * ratio;\n }\n } else if (axes.horizontal) {\n height = width / ratio;\n } else if (axes.vertical) {\n width = height * ratio;\n }\n }\n\n return this.clampSize(width, height, lock);\n }\n\n private clampSize(width: number, height: number, lock: boolean): AXResizeSize {\n const minW = this.minWidth();\n const maxW = this.maxWidth();\n const minH = this.minHeight();\n const maxH = this.maxHeight();\n\n if (!lock) {\n return {\n width: Math.max(minW, Math.min(width, maxW)),\n height: Math.max(minH, Math.min(height, maxH)),\n };\n }\n\n const ratio = this.startRatio > 0 ? this.startRatio : 1;\n width = Math.max(minW, width);\n height = width / ratio;\n\n if (height < minH) {\n height = minH;\n width = height * ratio;\n }\n if (width > maxW) {\n width = maxW;\n height = width / ratio;\n }\n if (height > maxH) {\n height = maxH;\n width = height * ratio;\n }\n if (width < minW) {\n width = minW;\n height = width / ratio;\n }\n if (height < minH) {\n height = minH;\n width = height * ratio;\n }\n\n return {\n width: Math.max(minW, Math.min(width, maxW)),\n height: Math.max(minH, Math.min(height, maxH)),\n };\n }\n\n private resetToInitialSize(axes: AXResizeAxis): AXResizeSize {\n const size = this.getCurrentSize();\n\n if (axes.horizontal) {\n const next = this.defaultWidth() ?? this.width() ?? this.initialElementWidth;\n this.applySize(next, null);\n size.width = next;\n }\n if (axes.vertical) {\n const next = this.defaultHeight() ?? this.height() ?? this.initialElementHeight;\n this.applySize(null, next);\n size.height = next;\n }\n\n return size;\n }\n\n private maximizeToMaxSize(axes: AXResizeAxis): AXResizeSize {\n const size = this.getCurrentSize();\n\n if (axes.horizontal && this.maxWidth() !== Infinity) {\n this.applySize(this.maxWidth(), null);\n size.width = this.maxWidth();\n }\n if (axes.vertical && this.maxHeight() !== Infinity) {\n this.applySize(null, this.maxHeight());\n size.height = this.maxHeight();\n }\n\n return size;\n }\n\n private fitToContent(axes: AXResizeAxis): AXResizeSize {\n if (axes.horizontal) {\n this.hostElement.style.width = 'fit-content';\n }\n if (axes.vertical) {\n this.hostElement.style.height = 'fit-content';\n }\n return this.getCurrentSize();\n }\n\n private getCurrentSize(): AXResizeSize {\n return {\n width: this.hostElement.offsetWidth,\n height: this.hostElement.offsetHeight,\n };\n }\n\n private getHandleType(event: Event): AXResizeHandle | null {\n const target = event.currentTarget as HTMLElement | null;\n const value = target?.dataset['axResizeHandle'] as AXResizeHandle | undefined;\n return value ?? null;\n }\n\n private getCursorForHandle(type: AXResizeHandle): string {\n if (type === 'start' || type === 'end') {\n return STYLES.cursorHorizontal;\n }\n if (type === 'top' || type === 'bottom') {\n return STYLES.cursorVertical;\n }\n\n const nwseInLtr = type === 'bottom-end' || type === 'top-start';\n const useNwse = this.isRTL() ? !nwseInLtr : nwseInLtr;\n return useNwse ? STYLES.cursorCorner : STYLES.cursorCornerAlt;\n }\n\n private getActiveCursor(type: AXResizeHandle): string {\n if (type === 'start' || type === 'end') {\n return STYLES.cursorActive;\n }\n return this.getCursorForHandle(type);\n }\n\n private stopResizing(): void {\n this.activeHandle = null;\n this.isResizing.set(false);\n }\n}\n\nfunction getHandleAxes(handle: AXResizeHandle): AXResizeAxis {\n switch (handle) {\n case 'start':\n return { horizontal: 'start', vertical: null };\n case 'end':\n return { horizontal: 'end', vertical: null };\n case 'top':\n return { horizontal: null, vertical: 'top' };\n case 'bottom':\n return { horizontal: null, vertical: 'bottom' };\n case 'top-start':\n return { horizontal: 'start', vertical: 'top' };\n case 'top-end':\n return { horizontal: 'end', vertical: 'top' };\n case 'bottom-start':\n return { horizontal: 'start', vertical: 'bottom' };\n case 'bottom-end':\n return { horizontal: 'end', vertical: 'bottom' };\n }\n}\n\ninterface AXValueChangedEvent<T> {\n component: unknown;\n htmlElement?: HTMLElement;\n isUserInteraction?: boolean;\n name?: string;\n value?: T;\n oldValue?: T;\n}\n\nconst STYLES = {\n handlerWidth: 'var(--ax-comp-resizable-handler-width, 4px)',\n handlerHeight: 'var(--ax-comp-resizable-handler-height, 4px)',\n cornerSize: 'var(--ax-comp-resizable-corner-size, 10px)',\n backgroundColor: 'rgba(var(--ax-comp-resizable-background-color))',\n backgroundColorActive: 'rgba(var(--ax-comp-resizable-background-color-active, var(--ax-sys-color-primary-surface)))',\n backgroundColorHover:\n 'rgba(var(--ax-comp-resizable-background-color-hover, var(--ax-sys-color-primary-light-surface)))',\n cursorHorizontal: 'var(--ax-comp-resizable-cursor, ew-resize)',\n cursorVertical: 'var(--ax-comp-resizable-cursor-vertical, ns-resize)',\n cursorCorner: 'var(--ax-comp-resizable-cursor-corner, nwse-resize)',\n cursorCornerAlt: 'var(--ax-comp-resizable-cursor-corner-alt, nesw-resize)',\n cursorActive: 'var(--ax-comp-resizable-cursor-active, ew-resize)',\n zIndex: 'var(--ax-comp-resizable-z-index, 999)',\n zIndexCorner: 'var(--ax-comp-resizable-z-index-corner, 1000)',\n transition:\n 'var(--ax-comp-resizable-transition, background-color --ax-sys-transition-duration --ax-sys-transition-timing-function)',\n borderRadius: 'var(--ax-comp-resizable-border-radius, --ax-sys-border-radius)',\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MA2Ca,oBAAoB,CAAA;AA4E/B,IAAA,WAAA,GAAA;AA3EiB,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;AACvB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC;AACpC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AACrB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAIhC,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,GAAG,EAA+B;QACtD,IAAA,CAAA,UAAU,GAA4B,MAAM,CAAC,KAAK;uFAAC;QAC5D,IAAA,CAAA,YAAY,GAA0B,IAAI;QAC1C,IAAA,CAAA,mBAAmB,GAAG,CAAC;QACvB,IAAA,CAAA,oBAAoB,GAAG,CAAC;QACxB,IAAA,CAAA,MAAM,GAAG,CAAC;QACV,IAAA,CAAA,MAAM,GAAG,CAAC;QACV,IAAA,CAAA,UAAU,GAAG,CAAC;QACd,IAAA,CAAA,WAAW,GAAG,CAAC;QACf,IAAA,CAAA,UAAU,GAAG,CAAC;AACL,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAE;QAGlC,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;QAChD,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;QAChD,IAAA,CAAA,cAAc,GAAG,IAAI,CAAC,WA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4CAA4C;AAC9D,IAAA,cAAc,EAAE,qDAAqD;AACrE,IAAA,YAAY,EAAE,qDAAqD;AACnE,IAAA,eAAe,EAAE,yDAAyD;AAC1E,IAAA,YAAY,EAAE,mDAAmD;AACjE,IAAA,MAAM,EAAE,uCAAuC;AAC/C,IAAA,YAAY,EAAE,+CAA+C;AAC7D,IAAA,UAAU,EACR,wHAAwH;AAC1H,IAAA,YAAY,EAAE,gEAAgE;CAC/E;;ACxuBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
3
|
|
|
4
|
+
type AXResizeHandle = 'start' | 'end' | 'top' | 'bottom' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
|
|
5
|
+
interface AXResizeSize {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
4
9
|
declare class AXResizableDirective implements AfterViewInit, OnDestroy {
|
|
5
10
|
private readonly el;
|
|
6
11
|
private readonly platformService;
|
|
@@ -9,59 +14,87 @@ declare class AXResizableDirective implements AfterViewInit, OnDestroy {
|
|
|
9
14
|
private readonly platformID;
|
|
10
15
|
private readonly isBrowser;
|
|
11
16
|
private hostElement;
|
|
12
|
-
private
|
|
13
|
-
private isResizing;
|
|
17
|
+
private readonly resizeHandles;
|
|
18
|
+
private readonly isResizing;
|
|
19
|
+
private activeHandle;
|
|
14
20
|
private initialElementWidth;
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private readonly
|
|
21
|
+
private initialElementHeight;
|
|
22
|
+
private startX;
|
|
23
|
+
private startY;
|
|
24
|
+
private startWidth;
|
|
25
|
+
private startHeight;
|
|
26
|
+
private startRatio;
|
|
27
|
+
private readonly subscriptions;
|
|
28
|
+
private resizeObserver?;
|
|
29
|
+
private readonly boundPointerDown;
|
|
30
|
+
private readonly boundPointerMove;
|
|
31
|
+
private readonly boundPointerUp;
|
|
32
|
+
private readonly boundPointerEnter;
|
|
33
|
+
private readonly boundPointerLeave;
|
|
22
34
|
private readonly boundDoubleClick;
|
|
23
|
-
private readonly
|
|
35
|
+
private readonly isRTL;
|
|
24
36
|
/** Define if directive is active or not */
|
|
25
37
|
axResizable: _angular_core.ModelSignal<boolean>;
|
|
38
|
+
/** Logical handles to render. Defaults to the inline-end edge. */
|
|
39
|
+
handles: _angular_core.ModelSignal<AXResizeHandle[]>;
|
|
26
40
|
/** Minimum width for the resizable element. */
|
|
27
41
|
minWidth: _angular_core.ModelSignal<number>;
|
|
28
42
|
/** Maximum width for the resizable element. Defaults to parent width if not provided. */
|
|
29
43
|
maxWidth: _angular_core.ModelSignal<number>;
|
|
30
|
-
/**
|
|
44
|
+
/** Minimum height for the resizable element. */
|
|
45
|
+
minHeight: _angular_core.ModelSignal<number>;
|
|
46
|
+
/** Maximum height for the resizable element. Defaults to parent height if not provided. */
|
|
47
|
+
maxHeight: _angular_core.ModelSignal<number>;
|
|
48
|
+
/** Behavior on double-click: 'reset', 'maximize', or 'fit'. */
|
|
31
49
|
dblClickAction: _angular_core.ModelSignal<"reset" | "maximize" | "fit">;
|
|
32
50
|
/** Define initial width for the element. */
|
|
33
51
|
width: _angular_core.ModelSignal<number>;
|
|
34
52
|
/** Define reset width for the element. */
|
|
35
53
|
defaultWidth: _angular_core.ModelSignal<number>;
|
|
54
|
+
/** Define initial height for the element. */
|
|
55
|
+
height: _angular_core.ModelSignal<number>;
|
|
56
|
+
/** Define reset height for the element. */
|
|
57
|
+
defaultHeight: _angular_core.ModelSignal<number>;
|
|
58
|
+
/** Lock the element's aspect ratio from the size captured at pointer-down. */
|
|
59
|
+
lockAspectRatio: _angular_core.ModelSignal<boolean>;
|
|
36
60
|
/** Event emitted when resizing starts. */
|
|
37
|
-
onResizingStarted: _angular_core.OutputEmitterRef<AXValueChangedEvent<
|
|
61
|
+
onResizingStarted: _angular_core.OutputEmitterRef<AXValueChangedEvent<AXResizeSize>>;
|
|
38
62
|
/** Event emitted when resizing ends. */
|
|
39
|
-
onResizingEnded: _angular_core.OutputEmitterRef<AXValueChangedEvent<
|
|
63
|
+
onResizingEnded: _angular_core.OutputEmitterRef<AXValueChangedEvent<AXResizeSize>>;
|
|
40
64
|
/** Event emitted on double-click. */
|
|
41
|
-
onResizingDblClick: _angular_core.OutputEmitterRef<AXValueChangedEvent<
|
|
65
|
+
onResizingDblClick: _angular_core.OutputEmitterRef<AXValueChangedEvent<AXResizeSize>>;
|
|
42
66
|
constructor();
|
|
43
67
|
ngAfterViewInit(): void;
|
|
44
68
|
ngOnDestroy(): void;
|
|
45
|
-
private
|
|
46
|
-
private
|
|
47
|
-
private
|
|
48
|
-
private
|
|
69
|
+
private reconcileHandles;
|
|
70
|
+
private createHandle;
|
|
71
|
+
private attachHandleListeners;
|
|
72
|
+
private destroyHandle;
|
|
73
|
+
private destroyAllHandles;
|
|
49
74
|
private applyHandleStyles;
|
|
50
|
-
private
|
|
51
|
-
private
|
|
52
|
-
private
|
|
53
|
-
private
|
|
54
|
-
private
|
|
55
|
-
private
|
|
56
|
-
private
|
|
57
|
-
private
|
|
58
|
-
private
|
|
75
|
+
private updateAllHandlePositions;
|
|
76
|
+
private positionHandle;
|
|
77
|
+
private applyInlineSide;
|
|
78
|
+
private applySizeFromModel;
|
|
79
|
+
private applySize;
|
|
80
|
+
private onPointerDown;
|
|
81
|
+
private onPointerMove;
|
|
82
|
+
private onPointerUp;
|
|
83
|
+
private onPointerEnter;
|
|
84
|
+
private onPointerLeave;
|
|
59
85
|
private onDoubleClick;
|
|
60
|
-
private
|
|
61
|
-
private
|
|
86
|
+
private computeSize;
|
|
87
|
+
private clampSize;
|
|
88
|
+
private resetToInitialSize;
|
|
89
|
+
private maximizeToMaxSize;
|
|
62
90
|
private fitToContent;
|
|
91
|
+
private getCurrentSize;
|
|
92
|
+
private getHandleType;
|
|
93
|
+
private getCursorForHandle;
|
|
94
|
+
private getActiveCursor;
|
|
95
|
+
private stopResizing;
|
|
63
96
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXResizableDirective, never>;
|
|
64
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXResizableDirective, "[axResizable]", never, { "axResizable": { "alias": "axResizable"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "dblClickAction": { "alias": "dblClickAction"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "defaultWidth": { "alias": "defaultWidth"; "required": false; "isSignal": true; }; }, { "axResizable": "axResizableChange"; "minWidth": "minWidthChange"; "maxWidth": "maxWidthChange"; "dblClickAction": "dblClickActionChange"; "width": "widthChange"; "defaultWidth": "defaultWidthChange"; "onResizingStarted": "onResizingStarted"; "onResizingEnded": "onResizingEnded"; "onResizingDblClick": "onResizingDblClick"; }, never, never, true, never>;
|
|
97
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXResizableDirective, "[axResizable]", never, { "axResizable": { "alias": "axResizable"; "required": false; "isSignal": true; }; "handles": { "alias": "handles"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "dblClickAction": { "alias": "dblClickAction"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "defaultWidth": { "alias": "defaultWidth"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "defaultHeight": { "alias": "defaultHeight"; "required": false; "isSignal": true; }; "lockAspectRatio": { "alias": "lockAspectRatio"; "required": false; "isSignal": true; }; }, { "axResizable": "axResizableChange"; "handles": "handlesChange"; "minWidth": "minWidthChange"; "maxWidth": "maxWidthChange"; "minHeight": "minHeightChange"; "maxHeight": "maxHeightChange"; "dblClickAction": "dblClickActionChange"; "width": "widthChange"; "defaultWidth": "defaultWidthChange"; "height": "heightChange"; "defaultHeight": "defaultHeightChange"; "lockAspectRatio": "lockAspectRatioChange"; "onResizingStarted": "onResizingStarted"; "onResizingEnded": "onResizingEnded"; "onResizingDblClick": "onResizingDblClick"; }, never, never, true, never>;
|
|
65
98
|
}
|
|
66
99
|
interface AXValueChangedEvent<T> {
|
|
67
100
|
component: unknown;
|
|
@@ -73,3 +106,4 @@ interface AXValueChangedEvent<T> {
|
|
|
73
106
|
}
|
|
74
107
|
|
|
75
108
|
export { AXResizableDirective };
|
|
109
|
+
export type { AXResizeHandle, AXResizeSize };
|