@mintplayer/ng-bootstrap 22.18.0 → 22.20.0
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/_bootstrap.scss +10 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +6 -3
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +36 -56
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +10 -18
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +13 -24
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +6 -15
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +17 -6
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +47 -50
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +265 -62
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +21 -7
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +19 -14
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +15 -12
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +16 -6
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +21 -4
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +26 -10
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -11
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +73 -67
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -16
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +11 -22
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +188 -249
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +64 -146
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +37 -30
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -25
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +150 -83
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +46 -44
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +63 -89
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +6 -14
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +25 -56
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +47 -58
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -1
- package/package.json +2 -2
- package/types/mintplayer-ng-bootstrap-alert.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-button-type.d.ts +6 -6
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +0 -1
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +9 -3
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +8 -10
- package/types/mintplayer-ng-bootstrap-copy.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +155 -11
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +6 -1
- package/types/mintplayer-ng-bootstrap-enum.d.ts +17 -4
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +7 -1
- package/types/mintplayer-ng-bootstrap-modal.d.ts +9 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +10 -1
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +65 -31
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +27 -21
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +18 -2
- package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +2 -2
- package/types/mintplayer-ng-bootstrap-theming.d.ts +86 -54
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +27 -5
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +18 -17
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +3 -4
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +4 -4
- package/types/mintplayer-ng-bootstrap-user-agent.d.ts +13 -4
|
@@ -1,49 +1,148 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject,
|
|
2
|
+
import { InjectionToken, inject, input, signal, computed, Directive, ElementRef, effect, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
3
4
|
|
|
4
5
|
const RESIZABLE = new InjectionToken('Resizable');
|
|
5
6
|
|
|
7
|
+
const DEFAULT_RESIZABLE_LABELS = {
|
|
8
|
+
top: 'Resize from top edge',
|
|
9
|
+
bottom: 'Resize from bottom edge',
|
|
10
|
+
left: 'Resize from left edge',
|
|
11
|
+
right: 'Resize from right edge',
|
|
12
|
+
topLeft: 'Resize from top-left corner',
|
|
13
|
+
topRight: 'Resize from top-right corner',
|
|
14
|
+
bottomLeft: 'Resize from bottom-left corner',
|
|
15
|
+
bottomRight: 'Resize from bottom-right corner',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** Smallest size, in px, a drag or a key press can shrink the box to. */
|
|
19
|
+
const MIN_RESIZE_SIZE = 10;
|
|
20
|
+
/**
|
|
21
|
+
* Maps a glyph's logical positions onto the physical sides of the box. In a right-to-left
|
|
22
|
+
* document the start edge is the right one, so a `start` glyph sits on, drags and is
|
|
23
|
+
* announced as the right edge.
|
|
24
|
+
*/
|
|
25
|
+
function toPhysicalSides(positions, rtl) {
|
|
26
|
+
return positions.map((p) => {
|
|
27
|
+
switch (p) {
|
|
28
|
+
case 'start': return rtl ? 'right' : 'left';
|
|
29
|
+
case 'end': return rtl ? 'left' : 'right';
|
|
30
|
+
default: return p;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The size and margin changes for a pointer at (x, y), given the geometry captured when the
|
|
36
|
+
* resize began. The captured values are used rather than the live rect: reading the rect on
|
|
37
|
+
* every move feeds back when content inside the box relayouts in response to its width.
|
|
38
|
+
*
|
|
39
|
+
* - Inline positioning keeps the surrounding layout still: the box grows horizontally by
|
|
40
|
+
* giving back margin, and vertically by trading height for margin.
|
|
41
|
+
* - Absolute positioning writes the box itself. `left`/`top` are in the containing block's
|
|
42
|
+
* coordinates, so the pointer delta is applied to the captured offset, never the viewport
|
|
43
|
+
* coordinate itself (which is off by the page scroll and the containing block's position).
|
|
44
|
+
*/
|
|
45
|
+
function dragResize(action, x, y) {
|
|
46
|
+
const { rect, offset, margin, sides, positioning } = action;
|
|
47
|
+
const right = rect.left + rect.width;
|
|
48
|
+
const bottom = rect.top + rect.height;
|
|
49
|
+
const inline = positioning === 'inline';
|
|
50
|
+
const horizontal = (() => {
|
|
51
|
+
if (sides.includes('right')) {
|
|
52
|
+
const px = Math.max(x, rect.left + MIN_RESIZE_SIZE);
|
|
53
|
+
return inline
|
|
54
|
+
? { marginRight: margin.right + (right - px) }
|
|
55
|
+
: { width: px - rect.left };
|
|
56
|
+
}
|
|
57
|
+
if (sides.includes('left')) {
|
|
58
|
+
const px = Math.min(x, right - MIN_RESIZE_SIZE);
|
|
59
|
+
return inline
|
|
60
|
+
? { marginLeft: margin.left + (px - rect.left) }
|
|
61
|
+
: { left: offset.left + (px - rect.left), width: right - px };
|
|
62
|
+
}
|
|
63
|
+
return {};
|
|
64
|
+
})();
|
|
65
|
+
const vertical = (() => {
|
|
66
|
+
if (sides.includes('bottom')) {
|
|
67
|
+
const py = Math.max(y, rect.top + MIN_RESIZE_SIZE);
|
|
68
|
+
return inline
|
|
69
|
+
? { height: py - rect.top, marginBottom: margin.bottom + (bottom - py) }
|
|
70
|
+
: { height: py - rect.top };
|
|
71
|
+
}
|
|
72
|
+
if (sides.includes('top')) {
|
|
73
|
+
const py = Math.min(y, bottom - MIN_RESIZE_SIZE);
|
|
74
|
+
return inline
|
|
75
|
+
? { height: bottom - py, marginTop: margin.top + (py - rect.top) }
|
|
76
|
+
: { top: offset.top + (py - rect.top), height: bottom - py };
|
|
77
|
+
}
|
|
78
|
+
return {};
|
|
79
|
+
})();
|
|
80
|
+
return { ...horizontal, ...vertical };
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The pointer position a key press is equivalent to: the dragged edge moved by `step` in the
|
|
84
|
+
* arrow's direction. A key press is then exactly a one-step drag, so it moves the same edge a
|
|
85
|
+
* drag would (never the opposite one) and writes the same signals in both positioning modes.
|
|
86
|
+
* Returns null for a key the glyph does not handle.
|
|
87
|
+
*/
|
|
88
|
+
function keyboardResizePoint(action, key, step) {
|
|
89
|
+
const { rect, sides } = action;
|
|
90
|
+
const hEdge = sides.includes('right') ? rect.left + rect.width
|
|
91
|
+
: sides.includes('left') ? rect.left
|
|
92
|
+
: null;
|
|
93
|
+
const vEdge = sides.includes('bottom') ? rect.top + rect.height
|
|
94
|
+
: sides.includes('top') ? rect.top
|
|
95
|
+
: null;
|
|
96
|
+
// A coordinate on an axis the glyph does not resize is ignored by dragResize.
|
|
97
|
+
const x = hEdge ?? 0;
|
|
98
|
+
const y = vEdge ?? 0;
|
|
99
|
+
switch (key) {
|
|
100
|
+
case 'ArrowRight': return hEdge === null ? null : { x: x + step, y };
|
|
101
|
+
case 'ArrowLeft': return hEdge === null ? null : { x: x - step, y };
|
|
102
|
+
case 'ArrowDown': return vEdge === null ? null : { x, y: y + step };
|
|
103
|
+
case 'ArrowUp': return vEdge === null ? null : { x, y: y - step };
|
|
104
|
+
default: return null;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* One drag handle of `bs-resizable`. Its logical positions (`start`/`end`) are resolved to
|
|
110
|
+
* physical sides once, from the document direction, and that one value drives the glyph's
|
|
111
|
+
* placement class, its drag and keyboard math and its accessible name, so the three can never
|
|
112
|
+
* disagree.
|
|
113
|
+
*/
|
|
6
114
|
class BsResizeGlyphDirective {
|
|
7
115
|
constructor() {
|
|
8
116
|
// Can't use typed DI because of the `import type`
|
|
9
117
|
this.resizable = inject(RESIZABLE);
|
|
10
|
-
this.
|
|
11
|
-
...(ngDevMode ? [{ debugName: "positions" }] : /* istanbul ignore next */ []));
|
|
12
|
-
this.activeClass = signal(false, /* @ts-ignore */
|
|
13
|
-
...(ngDevMode ? [{ debugName: "activeClass" }] : /* istanbul ignore next */ []));
|
|
118
|
+
this.dir = inject(Directionality);
|
|
14
119
|
this.bsResizeGlyph = input([], /* @ts-ignore */
|
|
15
120
|
...(ngDevMode ? [{ debugName: "bsResizeGlyph" }] : /* istanbul ignore next */ []));
|
|
121
|
+
this.activeClass = signal(false, /* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [{ debugName: "activeClass" }] : /* istanbul ignore next */ []));
|
|
123
|
+
this.sides = computed(() => toPhysicalSides(this.bsResizeGlyph(), this.dir.valueSignal() === 'rtl'), /* @ts-ignore */
|
|
124
|
+
...(ngDevMode ? [{ debugName: "sides" }] : /* istanbul ignore next */ []));
|
|
125
|
+
this.sideClasses = computed(() => this.sides().join(' '), /* @ts-ignore */
|
|
126
|
+
...(ngDevMode ? [{ debugName: "sideClasses" }] : /* istanbul ignore next */ []));
|
|
16
127
|
this.ariaOrientation = computed(() => {
|
|
17
|
-
const
|
|
18
|
-
if (
|
|
128
|
+
const s = this.sides();
|
|
129
|
+
if (s.length !== 1)
|
|
19
130
|
return null;
|
|
20
|
-
|
|
21
|
-
return 'horizontal';
|
|
22
|
-
if (p[0] === 'start' || p[0] === 'end')
|
|
23
|
-
return 'vertical';
|
|
24
|
-
return null;
|
|
131
|
+
return (s[0] === 'top' || s[0] === 'bottom') ? 'horizontal' : 'vertical';
|
|
25
132
|
}, /* @ts-ignore */
|
|
26
133
|
...(ngDevMode ? [{ debugName: "ariaOrientation" }] : /* istanbul ignore next */ []));
|
|
27
134
|
this.ariaLabel = computed(() => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
case 'end top': return 'Resize from top-right corner';
|
|
36
|
-
case 'bottom start': return 'Resize from bottom-left corner';
|
|
37
|
-
case 'bottom end': return 'Resize from bottom-right corner';
|
|
38
|
-
default: return 'Resize';
|
|
135
|
+
const labels = { ...DEFAULT_RESIZABLE_LABELS, ...this.resizable.labels() };
|
|
136
|
+
const s = this.sides();
|
|
137
|
+
const v = s.find((side) => side === 'top' || side === 'bottom');
|
|
138
|
+
const h = s.find((side) => side === 'left' || side === 'right');
|
|
139
|
+
if (v && h) {
|
|
140
|
+
const key = `${v}${h === 'left' ? 'Left' : 'Right'}`;
|
|
141
|
+
return labels[key];
|
|
39
142
|
}
|
|
143
|
+
return (v ?? h) ? labels[(v ?? h)] : null;
|
|
40
144
|
}, /* @ts-ignore */
|
|
41
145
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
42
|
-
this.isBusy = false;
|
|
43
|
-
effect(() => {
|
|
44
|
-
const value = this.bsResizeGlyph();
|
|
45
|
-
this.positions.set(value.join(' '));
|
|
46
|
-
});
|
|
47
146
|
}
|
|
48
147
|
onMouseDown(ev) {
|
|
49
148
|
ev.preventDefault();
|
|
@@ -55,17 +154,18 @@ class BsResizeGlyphDirective {
|
|
|
55
154
|
this.onPointerDown();
|
|
56
155
|
}
|
|
57
156
|
onMouseMove(ev) {
|
|
58
|
-
|
|
157
|
+
// Registered on the document by every glyph: only the one that started the drag applies it.
|
|
158
|
+
if (!this.activeClass() || !this.resizable.resizeAction)
|
|
159
|
+
return;
|
|
160
|
+
ev.preventDefault();
|
|
161
|
+
this.apply(dragResize(this.resizable.resizeAction, ev.clientX, ev.clientY));
|
|
59
162
|
}
|
|
60
163
|
onTouchMove(ev) {
|
|
61
|
-
if (ev.touches.length
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
onMouseUp(ev) {
|
|
68
|
-
this.onPointerUp();
|
|
164
|
+
if (ev.touches.length !== 1 || !this.activeClass() || !this.resizable.resizeAction)
|
|
165
|
+
return;
|
|
166
|
+
ev.preventDefault();
|
|
167
|
+
ev.stopPropagation();
|
|
168
|
+
this.apply(dragResize(this.resizable.resizeAction, ev.touches[0].clientX, ev.touches[0].clientY));
|
|
69
169
|
}
|
|
70
170
|
onTouchEnd(ev) {
|
|
71
171
|
ev.preventDefault();
|
|
@@ -73,228 +173,64 @@ class BsResizeGlyphDirective {
|
|
|
73
173
|
this.onPointerUp();
|
|
74
174
|
}
|
|
75
175
|
onPointerDown() {
|
|
76
|
-
|
|
77
|
-
positioning: this.resizable.positioning()
|
|
78
|
-
};
|
|
79
|
-
const rect = this.resizable.element.nativeElement.getBoundingClientRect();
|
|
80
|
-
const styles = window.getComputedStyle(this.resizable.element.nativeElement);
|
|
81
|
-
const marginLeft = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginLeft.slice(0, -2));
|
|
82
|
-
const marginRight = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginRight.slice(0, -2));
|
|
83
|
-
const marginTop = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginTop.slice(0, -2));
|
|
84
|
-
const marginBottom = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginBottom.slice(0, -2));
|
|
85
|
-
if (this.positions()?.includes('start')) {
|
|
86
|
-
action = {
|
|
87
|
-
...action,
|
|
88
|
-
end: {
|
|
89
|
-
edge: rect.right,
|
|
90
|
-
size: rect.width,
|
|
91
|
-
margin: marginRight,
|
|
92
|
-
dragMargin: marginLeft
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
if (this.positions()?.includes('end')) {
|
|
97
|
-
action = {
|
|
98
|
-
...action,
|
|
99
|
-
start: {
|
|
100
|
-
edge: rect.left,
|
|
101
|
-
size: rect.width,
|
|
102
|
-
margin: marginLeft,
|
|
103
|
-
dragMargin: marginRight
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
if (this.positions()?.includes('top')) {
|
|
108
|
-
action = {
|
|
109
|
-
...action,
|
|
110
|
-
bottom: {
|
|
111
|
-
edge: rect.bottom,
|
|
112
|
-
size: rect.height,
|
|
113
|
-
margin: marginBottom,
|
|
114
|
-
dragMargin: marginTop
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
if (this.positions()?.includes('bottom')) {
|
|
119
|
-
action = {
|
|
120
|
-
...action,
|
|
121
|
-
top: {
|
|
122
|
-
edge: rect.top,
|
|
123
|
-
size: rect.height,
|
|
124
|
-
margin: marginTop,
|
|
125
|
-
dragMargin: marginBottom
|
|
126
|
-
},
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
this.resizable.resizeAction = action;
|
|
176
|
+
this.resizable.resizeAction = this.captureAction();
|
|
130
177
|
this.activeClass.set(true);
|
|
131
178
|
}
|
|
132
|
-
onPointerMove(ev) {
|
|
133
|
-
if (this.resizable.resizeAction && !this.isBusy) {
|
|
134
|
-
ev.preventDefault();
|
|
135
|
-
this.isBusy = true;
|
|
136
|
-
const action = this.resizable.resizeAction;
|
|
137
|
-
// Note: the live bounding rect must NOT be used in the size/margin math.
|
|
138
|
-
// Reading it per-frame creates a feedback loop when content inside the
|
|
139
|
-
// host changes layout during the drag (e.g. a child component that
|
|
140
|
-
// shows/hides items in response to width). Use the captured `action`
|
|
141
|
-
// values from pointer-down — they're stable for the duration of the drag.
|
|
142
|
-
if (action.start && this.positions()?.includes('end')) {
|
|
143
|
-
// Right glyph — fixed left edge
|
|
144
|
-
const initialLeft = action.start.edge;
|
|
145
|
-
const initialRight = action.start.edge + action.start.size;
|
|
146
|
-
const x = (ev.clientX < initialLeft + 10) ? initialLeft + 10 : ev.clientX;
|
|
147
|
-
switch (this.resizable.positioning()) {
|
|
148
|
-
case 'inline':
|
|
149
|
-
{
|
|
150
|
-
const initialMargin = action.start.dragMargin ?? 0;
|
|
151
|
-
this.resizable.marginRight.set(initialMargin + (initialRight - x));
|
|
152
|
-
}
|
|
153
|
-
break;
|
|
154
|
-
case 'absolute':
|
|
155
|
-
{
|
|
156
|
-
this.resizable.width.set(x - initialLeft);
|
|
157
|
-
}
|
|
158
|
-
break;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
else if (action.end && this.positions()?.includes('start')) {
|
|
162
|
-
// Left glyph — fixed right edge
|
|
163
|
-
const initialRight = action.end.edge;
|
|
164
|
-
const initialLeft = action.end.edge - action.end.size;
|
|
165
|
-
const x = (ev.clientX > initialRight - 10) ? initialRight - 10 : ev.clientX;
|
|
166
|
-
switch (this.resizable.positioning()) {
|
|
167
|
-
case 'inline':
|
|
168
|
-
{
|
|
169
|
-
const initialMargin = action.end.dragMargin ?? 0;
|
|
170
|
-
this.resizable.marginLeft.set(initialMargin + (x - initialLeft));
|
|
171
|
-
}
|
|
172
|
-
break;
|
|
173
|
-
case 'absolute':
|
|
174
|
-
{
|
|
175
|
-
this.resizable.left.set(x);
|
|
176
|
-
this.resizable.width.set(initialRight - x);
|
|
177
|
-
}
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
if (action.top && this.positions()?.includes('bottom')) {
|
|
182
|
-
// Bottom glyph — fixed top edge. action.top.edge = captured rect.top
|
|
183
|
-
const initialTop = action.top.edge;
|
|
184
|
-
const initialBottom = action.top.edge + action.top.size;
|
|
185
|
-
const y = (ev.clientY < initialTop + 10) ? initialTop + 10 : ev.clientY;
|
|
186
|
-
switch (this.resizable.positioning()) {
|
|
187
|
-
case 'inline':
|
|
188
|
-
{
|
|
189
|
-
const initialMargin = action.top.dragMargin ?? 0;
|
|
190
|
-
this.resizable.height.set(y - initialTop);
|
|
191
|
-
this.resizable.marginBottom.set(initialMargin + (initialBottom - y));
|
|
192
|
-
}
|
|
193
|
-
break;
|
|
194
|
-
case 'absolute':
|
|
195
|
-
{
|
|
196
|
-
this.resizable.height.set(y - initialTop);
|
|
197
|
-
}
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
else if (action.bottom && this.positions()?.includes('top')) {
|
|
202
|
-
// Top glyph — fixed bottom edge. action.bottom.edge = captured rect.bottom
|
|
203
|
-
const initialBottom = action.bottom.edge;
|
|
204
|
-
const initialTop = action.bottom.edge - action.bottom.size;
|
|
205
|
-
const y = (ev.clientY > initialBottom - 10) ? initialBottom - 10 : ev.clientY;
|
|
206
|
-
switch (this.resizable.positioning()) {
|
|
207
|
-
case 'inline':
|
|
208
|
-
{
|
|
209
|
-
const initialMargin = action.bottom.dragMargin ?? 0;
|
|
210
|
-
this.resizable.height.set(initialBottom - y);
|
|
211
|
-
this.resizable.marginTop.set(initialMargin + (y - initialTop));
|
|
212
|
-
}
|
|
213
|
-
break;
|
|
214
|
-
case 'absolute':
|
|
215
|
-
{
|
|
216
|
-
this.resizable.top.set(y);
|
|
217
|
-
this.resizable.height.set(initialBottom - y);
|
|
218
|
-
}
|
|
219
|
-
break;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
this.isBusy = false;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
179
|
onPointerUp() {
|
|
180
|
+
if (!this.activeClass())
|
|
181
|
+
return;
|
|
226
182
|
this.resizable.resizeAction = undefined;
|
|
227
183
|
this.activeClass.set(false);
|
|
228
184
|
}
|
|
229
|
-
/**
|
|
185
|
+
/**
|
|
186
|
+
* Keyboard alternative to drag: an arrow key moves the glyph's own edge by 10px (1px with
|
|
187
|
+
* Shift). It is computed as a one-step drag, so it moves the same edge and writes the same
|
|
188
|
+
* signals as dragging would, in both positioning modes.
|
|
189
|
+
*/
|
|
230
190
|
onKeydown(event) {
|
|
231
|
-
const
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
191
|
+
const action = this.captureAction();
|
|
192
|
+
const point = keyboardResizePoint(action, event.key, event.shiftKey ? 1 : 10);
|
|
193
|
+
if (!point)
|
|
194
|
+
return;
|
|
195
|
+
event.preventDefault();
|
|
196
|
+
this.apply(dragResize(action, point.x, point.y));
|
|
197
|
+
}
|
|
198
|
+
captureAction() {
|
|
199
|
+
const el = this.resizable.element.nativeElement;
|
|
200
|
+
const rect = el.getBoundingClientRect();
|
|
201
|
+
const styles = window.getComputedStyle(el);
|
|
202
|
+
// An unset margin computes to '' in some engines: treat it as 0, never NaN.
|
|
203
|
+
const px = (value) => parseFloat(value) || 0;
|
|
204
|
+
return {
|
|
205
|
+
positioning: this.resizable.positioning(),
|
|
206
|
+
sides: this.sides(),
|
|
207
|
+
rect: { left: rect.left, top: rect.top, width: rect.width, height: rect.height },
|
|
208
|
+
offset: { left: el.offsetLeft, top: el.offsetTop },
|
|
209
|
+
margin: {
|
|
210
|
+
left: px(styles.marginLeft),
|
|
211
|
+
right: px(styles.marginRight),
|
|
212
|
+
top: px(styles.marginTop),
|
|
213
|
+
bottom: px(styles.marginBottom),
|
|
214
|
+
},
|
|
238
215
|
};
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
216
|
+
}
|
|
217
|
+
apply(update) {
|
|
218
|
+
const r = this.resizable;
|
|
219
|
+
const targets = {
|
|
220
|
+
width: r.width, height: r.height, left: r.left, top: r.top,
|
|
221
|
+
marginLeft: r.marginLeft, marginRight: r.marginRight, marginTop: r.marginTop, marginBottom: r.marginBottom,
|
|
243
222
|
};
|
|
244
|
-
|
|
245
|
-
case 'ArrowRight':
|
|
246
|
-
if (positions.includes('end')) {
|
|
247
|
-
adjustWidth(step);
|
|
248
|
-
consumed = true;
|
|
249
|
-
}
|
|
250
|
-
else if (positions.includes('start')) {
|
|
251
|
-
adjustWidth(-step);
|
|
252
|
-
consumed = true;
|
|
253
|
-
}
|
|
254
|
-
break;
|
|
255
|
-
case 'ArrowLeft':
|
|
256
|
-
if (positions.includes('end')) {
|
|
257
|
-
adjustWidth(-step);
|
|
258
|
-
consumed = true;
|
|
259
|
-
}
|
|
260
|
-
else if (positions.includes('start')) {
|
|
261
|
-
adjustWidth(step);
|
|
262
|
-
consumed = true;
|
|
263
|
-
}
|
|
264
|
-
break;
|
|
265
|
-
case 'ArrowDown':
|
|
266
|
-
if (positions.includes('bottom')) {
|
|
267
|
-
adjustHeight(step);
|
|
268
|
-
consumed = true;
|
|
269
|
-
}
|
|
270
|
-
else if (positions.includes('top')) {
|
|
271
|
-
adjustHeight(-step);
|
|
272
|
-
consumed = true;
|
|
273
|
-
}
|
|
274
|
-
break;
|
|
275
|
-
case 'ArrowUp':
|
|
276
|
-
if (positions.includes('bottom')) {
|
|
277
|
-
adjustHeight(-step);
|
|
278
|
-
consumed = true;
|
|
279
|
-
}
|
|
280
|
-
else if (positions.includes('top')) {
|
|
281
|
-
adjustHeight(step);
|
|
282
|
-
consumed = true;
|
|
283
|
-
}
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
if (consumed)
|
|
287
|
-
event.preventDefault();
|
|
223
|
+
Object.keys(update).map((key) => targets[key].set(update[key]));
|
|
288
224
|
}
|
|
289
225
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsResizeGlyphDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
290
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsResizeGlyphDirective, isStandalone: true, selector: "[bsResizeGlyph]", inputs: { bsResizeGlyph: { classPropertyName: "bsResizeGlyph", publicName: "bsResizeGlyph", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "onMouseDown($event)", "touchstart": "onTouchStart($event)", "document:mousemove": "onMouseMove($event)", "touchmove": "onTouchMove($event)", "document:mouseup": "
|
|
226
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsResizeGlyphDirective, isStandalone: true, selector: "[bsResizeGlyph]", inputs: { bsResizeGlyph: { classPropertyName: "bsResizeGlyph", publicName: "bsResizeGlyph", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "onMouseDown($event)", "touchstart": "onTouchStart($event)", "document:mousemove": "onMouseMove($event)", "touchmove": "onTouchMove($event)", "document:mouseup": "onPointerUp()", "touchend": "onTouchEnd($event)", "keydown": "onKeydown($event)" }, properties: { "class": "sideClasses()", "class.glyph": "true", "class.active": "activeClass()", "attr.role": "\"separator\"", "attr.aria-label": "ariaLabel()", "attr.aria-orientation": "ariaOrientation()", "attr.tabindex": "\"0\"" } }, ngImport: i0 }); }
|
|
291
227
|
}
|
|
292
228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsResizeGlyphDirective, decorators: [{
|
|
293
229
|
type: Directive,
|
|
294
230
|
args: [{
|
|
295
231
|
selector: '[bsResizeGlyph]',
|
|
296
232
|
host: {
|
|
297
|
-
'[class]': '
|
|
233
|
+
'[class]': 'sideClasses()',
|
|
298
234
|
'[class.glyph]': 'true',
|
|
299
235
|
'[class.active]': 'activeClass()',
|
|
300
236
|
'[attr.role]': '"separator"',
|
|
@@ -305,12 +241,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
305
241
|
'(touchstart)': 'onTouchStart($event)',
|
|
306
242
|
'(document:mousemove)': 'onMouseMove($event)',
|
|
307
243
|
'(touchmove)': 'onTouchMove($event)',
|
|
308
|
-
'(document:mouseup)': '
|
|
244
|
+
'(document:mouseup)': 'onPointerUp()',
|
|
309
245
|
'(touchend)': 'onTouchEnd($event)',
|
|
310
246
|
'(keydown)': 'onKeydown($event)',
|
|
311
247
|
},
|
|
312
248
|
}]
|
|
313
|
-
}],
|
|
249
|
+
}], propDecorators: { bsResizeGlyph: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsResizeGlyph", required: false }] }] } });
|
|
314
250
|
|
|
315
251
|
class BsResizableComponent {
|
|
316
252
|
constructor() {
|
|
@@ -323,6 +259,9 @@ class BsResizableComponent {
|
|
|
323
259
|
...(ngDevMode ? [{ debugName: "vertical" }] : /* istanbul ignore next */ []));
|
|
324
260
|
this.corners = input(true, /* @ts-ignore */
|
|
325
261
|
...(ngDevMode ? [{ debugName: "corners" }] : /* istanbul ignore next */ []));
|
|
262
|
+
/** Translations of the glyphs' accessible names; missing keys keep the English default. */
|
|
263
|
+
this.labels = input({}, /* @ts-ignore */
|
|
264
|
+
...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
326
265
|
this.showCorners = computed(() => this.horizontal() && this.vertical() && this.corners(), /* @ts-ignore */
|
|
327
266
|
...(ngDevMode ? [{ debugName: "showCorners" }] : /* istanbul ignore next */ []));
|
|
328
267
|
this.hostPosition = computed(() => {
|
|
@@ -377,9 +316,9 @@ class BsResizableComponent {
|
|
|
377
316
|
});
|
|
378
317
|
}
|
|
379
318
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsResizableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
380
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsResizableComponent, isStandalone: true, selector: "bs-resizable", inputs: { positioning: { classPropertyName: "positioning", publicName: "positioning", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, corners: { classPropertyName: "corners", publicName: "corners", isSignal: true, isRequired: false, transformFunction: null }, presetPosition: { classPropertyName: "presetPosition", publicName: "presetPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.margin-left.px": "marginLeft()", "style.margin-right.px": "marginRight()", "style.margin-top.px": "marginTop()", "style.margin-bottom.px": "marginBottom()", "style.width.px": "width()", "style.height.px": "height()", "style.left.px": "left()", "style.top.px": "top()", "class.d-block": "true", "class.border": "true", "class": "hostPosition()" } }, providers: [
|
|
319
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsResizableComponent, isStandalone: true, selector: "bs-resizable", inputs: { positioning: { classPropertyName: "positioning", publicName: "positioning", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, corners: { classPropertyName: "corners", publicName: "corners", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, presetPosition: { classPropertyName: "presetPosition", publicName: "presetPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.margin-left.px": "marginLeft()", "style.margin-right.px": "marginRight()", "style.margin-top.px": "marginTop()", "style.margin-bottom.px": "marginBottom()", "style.width.px": "width()", "style.height.px": "height()", "style.left.px": "left()", "style.top.px": "top()", "class.d-block": "true", "class.border": "true", "class": "hostPosition()" } }, providers: [
|
|
381
320
|
{ provide: RESIZABLE, useExisting: forwardRef(() => BsResizableComponent) }
|
|
382
|
-
], ngImport: i0, template: "<div [class]=\"wrapperPosition()\" class=\"h-100\">\n @if (showCorners()) {\n <div
|
|
321
|
+
], ngImport: i0, template: "<div [class]=\"wrapperPosition()\" class=\"h-100\">\n @if (showCorners()) {\n <div [bsResizeGlyph]=\"['top', 'start']\"></div>\n <div [bsResizeGlyph]=\"['top', 'end']\"></div>\n <div [bsResizeGlyph]=\"['bottom', 'end']\"></div>\n <div [bsResizeGlyph]=\"['bottom', 'start']\"></div>\n }\n @if (vertical()) {\n <div [bsResizeGlyph]=\"['top']\"></div>\n <div [bsResizeGlyph]=\"['bottom']\"></div>\n }\n @if (horizontal()) {\n <div [bsResizeGlyph]=\"['end']\"></div>\n <div [bsResizeGlyph]=\"['start']\"></div>\n }\n <ng-content></ng-content>\n</div>", styles: [".glyph:before{content:\"\";width:8px;height:8px;display:block;border-radius:4px;transition:background-color .2s ease-in-out}.glyph{position:absolute;width:14px;height:14px;z-index:20}.glyph.top{top:-7px}.glyph.left{left:-7px}.glyph.bottom{bottom:-7px}.glyph.right{right:-7px}.glyph.top,.glyph.bottom{cursor:ns-resize}.glyph.left,.glyph.right{cursor:ew-resize}.glyph.top.left,.glyph.bottom.right{cursor:nwse-resize}.glyph.top.right,.glyph.bottom.left{cursor:nesw-resize}.glyph:focus-visible{outline:2px solid var(--bs-primary);outline-offset:1px}.glyph.left:not(.top):not(.bottom),.glyph.right:not(.top):not(.bottom){top:4px;height:calc(100% - 8px)}.glyph.left:not(.top):not(.bottom):before,.glyph.right:not(.top):not(.bottom):before{display:block;height:100%}.glyph.left:before,.glyph.right:before{margin-left:3px;margin-right:3px}.glyph.top:not(.left):not(.right),.glyph.bottom:not(.left):not(.right){left:4px;width:calc(100% - 8px)}.glyph.top:not(.left):not(.right):before,.glyph.bottom:not(.left):not(.right):before{display:block;width:100%}.glyph.top:before,.glyph.bottom:before{margin-top:3px;margin-bottom:3px}.glyph:hover:before,.glyph.active:before{background-color:var(--bs-primary)}:host{min-width:2rem;min-height:2rem}\n"], dependencies: [{ kind: "directive", type: BsResizeGlyphDirective, selector: "[bsResizeGlyph]", inputs: ["bsResizeGlyph"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
383
322
|
}
|
|
384
323
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsResizableComponent, decorators: [{
|
|
385
324
|
type: Component,
|
|
@@ -397,12 +336,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
397
336
|
'[class.d-block]': 'true',
|
|
398
337
|
'[class.border]': 'true',
|
|
399
338
|
'[class]': 'hostPosition()',
|
|
400
|
-
}, template: "<div [class]=\"wrapperPosition()\" class=\"h-100\">\n @if (showCorners()) {\n <div
|
|
401
|
-
}], ctorParameters: () => [], propDecorators: { positioning: [{ type: i0.Input, args: [{ isSignal: true, alias: "positioning", required: false }] }], horizontal: [{ type: i0.Input, args: [{ isSignal: true, alias: "horizontal", required: false }] }], vertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", required: false }] }], corners: [{ type: i0.Input, args: [{ isSignal: true, alias: "corners", required: false }] }], presetPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "presetPosition", required: false }] }] } });
|
|
339
|
+
}, template: "<div [class]=\"wrapperPosition()\" class=\"h-100\">\n @if (showCorners()) {\n <div [bsResizeGlyph]=\"['top', 'start']\"></div>\n <div [bsResizeGlyph]=\"['top', 'end']\"></div>\n <div [bsResizeGlyph]=\"['bottom', 'end']\"></div>\n <div [bsResizeGlyph]=\"['bottom', 'start']\"></div>\n }\n @if (vertical()) {\n <div [bsResizeGlyph]=\"['top']\"></div>\n <div [bsResizeGlyph]=\"['bottom']\"></div>\n }\n @if (horizontal()) {\n <div [bsResizeGlyph]=\"['end']\"></div>\n <div [bsResizeGlyph]=\"['start']\"></div>\n }\n <ng-content></ng-content>\n</div>", styles: [".glyph:before{content:\"\";width:8px;height:8px;display:block;border-radius:4px;transition:background-color .2s ease-in-out}.glyph{position:absolute;width:14px;height:14px;z-index:20}.glyph.top{top:-7px}.glyph.left{left:-7px}.glyph.bottom{bottom:-7px}.glyph.right{right:-7px}.glyph.top,.glyph.bottom{cursor:ns-resize}.glyph.left,.glyph.right{cursor:ew-resize}.glyph.top.left,.glyph.bottom.right{cursor:nwse-resize}.glyph.top.right,.glyph.bottom.left{cursor:nesw-resize}.glyph:focus-visible{outline:2px solid var(--bs-primary);outline-offset:1px}.glyph.left:not(.top):not(.bottom),.glyph.right:not(.top):not(.bottom){top:4px;height:calc(100% - 8px)}.glyph.left:not(.top):not(.bottom):before,.glyph.right:not(.top):not(.bottom):before{display:block;height:100%}.glyph.left:before,.glyph.right:before{margin-left:3px;margin-right:3px}.glyph.top:not(.left):not(.right),.glyph.bottom:not(.left):not(.right){left:4px;width:calc(100% - 8px)}.glyph.top:not(.left):not(.right):before,.glyph.bottom:not(.left):not(.right):before{display:block;width:100%}.glyph.top:before,.glyph.bottom:before{margin-top:3px;margin-bottom:3px}.glyph:hover:before,.glyph.active:before{background-color:var(--bs-primary)}:host{min-width:2rem;min-height:2rem}\n"] }]
|
|
340
|
+
}], ctorParameters: () => [], propDecorators: { positioning: [{ type: i0.Input, args: [{ isSignal: true, alias: "positioning", required: false }] }], horizontal: [{ type: i0.Input, args: [{ isSignal: true, alias: "horizontal", required: false }] }], vertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", required: false }] }], corners: [{ type: i0.Input, args: [{ isSignal: true, alias: "corners", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], presetPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "presetPosition", required: false }] }] } });
|
|
402
341
|
|
|
403
342
|
/**
|
|
404
343
|
* Generated bundle index. Do not edit.
|
|
405
344
|
*/
|
|
406
345
|
|
|
407
|
-
export { BsResizableComponent, BsResizeGlyphDirective, RESIZABLE };
|
|
346
|
+
export { BsResizableComponent, BsResizeGlyphDirective, DEFAULT_RESIZABLE_LABELS, RESIZABLE };
|
|
408
347
|
//# sourceMappingURL=mintplayer-ng-bootstrap-resizable.mjs.map
|