@mintplayer/ng-bootstrap 21.12.12 → 21.13.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.
@@ -0,0 +1,235 @@
1
+ import { isPlatformServer, NgClass, NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, TemplateRef, input, Directive, PLATFORM_ID, ElementRef, output, contentChildren, viewChildren, viewChild, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { BsNoNoscriptDirective } from '@mintplayer/ng-bootstrap/no-noscript';
5
+ import { BsObserveSizeDirective } from '@mintplayer/ng-swiper/observe-size';
6
+
7
+ class BsPriorityNavItemDirective {
8
+ constructor() {
9
+ this.templateRef = inject(TemplateRef);
10
+ this.priority = input(null, { ...(ngDevMode ? { debugName: "priority" } : {}), alias: 'bsPriorityNavItem' });
11
+ this.hideBelow = input(null, { ...(ngDevMode ? { debugName: "hideBelow" } : {}), alias: 'bsPriorityNavItemHideBelow' });
12
+ this.id = ++BsPriorityNavItemDirective.idCounter;
13
+ }
14
+ static { this.idCounter = 0; }
15
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsPriorityNavItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
16
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: BsPriorityNavItemDirective, isStandalone: true, selector: "[bsPriorityNavItem]", inputs: { priority: { classPropertyName: "priority", publicName: "bsPriorityNavItem", isSignal: true, isRequired: false, transformFunction: null }, hideBelow: { classPropertyName: "hideBelow", publicName: "bsPriorityNavItemHideBelow", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
17
+ }
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsPriorityNavItemDirective, decorators: [{
19
+ type: Directive,
20
+ args: [{
21
+ selector: '[bsPriorityNavItem]',
22
+ }]
23
+ }], propDecorators: { priority: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsPriorityNavItem", required: false }] }], hideBelow: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsPriorityNavItemHideBelow", required: false }] }] } });
24
+
25
+ class BsPriorityNavComponent {
26
+ static { this.counter = 0; }
27
+ constructor() {
28
+ this.platformId = inject(PLATFORM_ID);
29
+ this.element = inject(ElementRef);
30
+ this.isServerSide = isPlatformServer(this.platformId);
31
+ this.uid = `pn-${++BsPriorityNavComponent.counter}`;
32
+ // Inputs
33
+ this.moreLabel = input('More', ...(ngDevMode ? [{ debugName: "moreLabel" }] : []));
34
+ this.moreLabelTemplate = input(null, ...(ngDevMode ? [{ debugName: "moreLabelTemplate" }] : []));
35
+ this.collapseAt = input(null, ...(ngDevMode ? [{ debugName: "collapseAt" }] : []));
36
+ this.overflowFrom = input('end', ...(ngDevMode ? [{ debugName: "overflowFrom" }] : []));
37
+ this.hideEmptyMore = input(true, ...(ngDevMode ? [{ debugName: "hideEmptyMore" }] : []));
38
+ // Outputs
39
+ this.overflowChange = output();
40
+ // Children
41
+ this.items = contentChildren(BsPriorityNavItemDirective, ...(ngDevMode ? [{ debugName: "items" }] : []));
42
+ // Per-item width measurements (from the off-screen measure strip)
43
+ this.measureSizers = viewChildren('measureItem', ...(ngDevMode ? [{ debugName: "measureSizers" }] : []));
44
+ // Visible strip width and its element (for reading computed `column-gap`)
45
+ this.stripSizer = viewChild('stripSize', ...(ngDevMode ? [{ debugName: "stripSizer" }] : []));
46
+ this.stripElement = viewChild('stripSize', { ...(ngDevMode ? { debugName: "stripElement" } : {}), read: ElementRef });
47
+ // More button width
48
+ this.moreSizer = viewChild('moreSize', ...(ngDevMode ? [{ debugName: "moreSizer" }] : []));
49
+ // Open/closed state for the More menu (JS path)
50
+ this.isMoreOpen = signal(false, ...(ngDevMode ? [{ debugName: "isMoreOpen" }] : []));
51
+ this.windowWidth = signal(0, ...(ngDevMode ? [{ debugName: "windowWidth" }] : []));
52
+ this.collapseAtPx = computed(() => {
53
+ switch (this.collapseAt()) {
54
+ case 'xxl': return 1400;
55
+ case 'xl': return 1200;
56
+ case 'lg': return 992;
57
+ case 'md': return 768;
58
+ case 'sm': return 576;
59
+ case 'xs': return 0;
60
+ default: return null;
61
+ }
62
+ }, ...(ngDevMode ? [{ debugName: "collapseAtPx" }] : []));
63
+ this.forceCollapse = computed(() => {
64
+ const bp = this.collapseAtPx();
65
+ if (bp === null)
66
+ return false;
67
+ const w = this.windowWidth();
68
+ return w > 0 && w < bp;
69
+ }, ...(ngDevMode ? [{ debugName: "forceCollapse" }] : []));
70
+ // Items in overflow order. Convention: a LOWER priority number means MORE
71
+ // important (priority: 1 stays visible longest). Items without a priority
72
+ // are treated as least important and overflow before any prioritized item.
73
+ // Tiebreaker uses declaration order (last-declared overflows first when
74
+ // overflowFrom='end').
75
+ this.overflowOrder = computed(() => {
76
+ const items = this.items();
77
+ const fromEnd = this.overflowFrom() === 'end';
78
+ return [...items]
79
+ .map((item, index) => ({ item, index, priority: item.priority() }))
80
+ .sort((a, b) => {
81
+ // Unprioritized items overflow first
82
+ if (a.priority === null && b.priority !== null)
83
+ return -1;
84
+ if (a.priority !== null && b.priority === null)
85
+ return 1;
86
+ // Both prioritized: higher number overflows first (less important)
87
+ if (a.priority !== null && b.priority !== null && a.priority !== b.priority) {
88
+ return b.priority - a.priority;
89
+ }
90
+ // Tiebreaker by declaration order
91
+ return fromEnd ? b.index - a.index : a.index - b.index;
92
+ })
93
+ .map(x => x.item);
94
+ }, ...(ngDevMode ? [{ debugName: "overflowOrder" }] : []));
95
+ // Per-item width map (from measure strip, indexed by item id, in items() order)
96
+ this.itemWidths = computed(() => {
97
+ if (this.isServerSide)
98
+ return new Map();
99
+ const sizers = this.measureSizers();
100
+ const items = this.items();
101
+ const map = new Map();
102
+ items.forEach((item, i) => {
103
+ const sizer = sizers[i];
104
+ if (!sizer)
105
+ return;
106
+ const w = sizer.width();
107
+ if (w !== undefined)
108
+ map.set(item.id, w);
109
+ });
110
+ return map;
111
+ }, ...(ngDevMode ? [{ debugName: "itemWidths" }] : []));
112
+ // The strip's `column-gap` (or `gap`) value in pixels. Read from computed
113
+ // style so consumers' `gap` declarations get factored into the overflow math
114
+ // — without this, items overflow late or layout-shift when a gap is set.
115
+ // Re-read whenever the strip width changes (covers media-query gap changes
116
+ // that piggy-back on the same breakpoint).
117
+ this.itemGap = computed(() => {
118
+ if (this.isServerSide)
119
+ return 0;
120
+ this.stripSizer()?.width();
121
+ const el = this.stripElement()?.nativeElement;
122
+ if (!el)
123
+ return 0;
124
+ const cs = getComputedStyle(el);
125
+ const raw = parseFloat(cs.columnGap || cs.gap || '0');
126
+ return Number.isFinite(raw) ? raw : 0;
127
+ }, ...(ngDevMode ? [{ debugName: "itemGap" }] : []));
128
+ this.overflowingIds = computed(() => {
129
+ if (this.isServerSide)
130
+ return new Set();
131
+ if (this.forceCollapse()) {
132
+ return new Set(this.items().map(i => i.id));
133
+ }
134
+ const stripWidth = this.stripSizer()?.width() ?? 0;
135
+ const moreWidth = this.moreSizer()?.width() ?? 0;
136
+ const widths = this.itemWidths();
137
+ const gap = this.itemGap();
138
+ if (stripWidth === 0 || widths.size === 0)
139
+ return new Set();
140
+ // Layout when all items fit (no More toggle): N items separated by N-1 gaps
141
+ const sumWidths = Array.from(widths.values()).reduce((a, b) => a + b, 0);
142
+ const allVisibleWidth = sumWidths + gap * Math.max(0, widths.size - 1);
143
+ if (allVisibleWidth <= stripWidth)
144
+ return new Set();
145
+ // Need overflow → More toggle is shown. Layout when K items are kicked:
146
+ // (N - K) items + 1 More toggle = (N - K + 1) elements with (N - K) gaps
147
+ const overflowing = new Set();
148
+ let visibleSum = sumWidths;
149
+ let visibleCount = widths.size;
150
+ for (const item of this.overflowOrder()) {
151
+ const totalWithMore = visibleSum + moreWidth + gap * visibleCount;
152
+ if (totalWithMore <= stripWidth)
153
+ break;
154
+ visibleSum -= widths.get(item.id) ?? 0;
155
+ visibleCount -= 1;
156
+ overflowing.add(item.id);
157
+ }
158
+ return overflowing;
159
+ }, ...(ngDevMode ? [{ debugName: "overflowingIds" }] : []));
160
+ this.hasAnyOverflow = computed(() => this.overflowingIds().size > 0, ...(ngDevMode ? [{ debugName: "hasAnyOverflow" }] : []));
161
+ this.showMoreButton = computed(() => !this.hideEmptyMore() || this.hasAnyOverflow(), ...(ngDevMode ? [{ debugName: "showMoreButton" }] : []));
162
+ // When every item is overflowing the toggle ends up at the start edge of
163
+ // the strip (no inline items push it). Anchor the dropdown to that side
164
+ // so it stays visually attached to the toggle.
165
+ this.fullyCollapsed = computed(() => {
166
+ const items = this.items();
167
+ return items.length > 0 && this.overflowingIds().size === items.length;
168
+ }, ...(ngDevMode ? [{ debugName: "fullyCollapsed" }] : []));
169
+ // Derived per-item view used by all three rendering passes (measure strip,
170
+ // inline strip, overflow menu). Pre-computes the breakpoint class string and
171
+ // the JS-mode-only hide flags so the template can stay purely declarative —
172
+ // no method calls, no inline `!isServerSide` guards. The SSR/noscript path
173
+ // relies on CSS media queries instead of these flags, so both `hideInline`
174
+ // and `hideInOverflow` are forced to false on the server.
175
+ this.itemsWithMeta = computed(() => {
176
+ const items = this.items();
177
+ const overflowing = this.overflowingIds();
178
+ const ssr = this.isServerSide;
179
+ return items.map(item => {
180
+ const bp = item.hideBelow();
181
+ const isOverflowing = overflowing.has(item.id);
182
+ return {
183
+ item,
184
+ hideBelowClass: bp ? `priority-nav-item-hide-below-${bp}` : '',
185
+ hideInline: !ssr && isOverflowing,
186
+ hideInOverflow: !ssr && !isOverflowing,
187
+ };
188
+ });
189
+ }, ...(ngDevMode ? [{ debugName: "itemsWithMeta" }] : []));
190
+ if (!this.isServerSide) {
191
+ this.windowWidth.set(window.innerWidth);
192
+ }
193
+ effect(() => {
194
+ const overflowing = this.overflowingIds();
195
+ const overflowingItems = this.items().filter(i => overflowing.has(i.id));
196
+ this.overflowChange.emit(overflowingItems);
197
+ });
198
+ }
199
+ onWindowResize() {
200
+ if (!this.isServerSide) {
201
+ this.windowWidth.set(window.innerWidth);
202
+ }
203
+ }
204
+ toggleMore() {
205
+ this.isMoreOpen.update(v => !v);
206
+ }
207
+ onEscape() {
208
+ if (this.isMoreOpen())
209
+ this.isMoreOpen.set(false);
210
+ }
211
+ onDocumentClick(event) {
212
+ if (event.button !== 0 || !this.isMoreOpen())
213
+ return;
214
+ if (!this.element.nativeElement.contains(event.target)) {
215
+ this.isMoreOpen.set(false);
216
+ }
217
+ }
218
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsPriorityNavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
219
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: BsPriorityNavComponent, isStandalone: true, selector: "bs-priority-nav", inputs: { moreLabel: { classPropertyName: "moreLabel", publicName: "moreLabel", isSignal: true, isRequired: false, transformFunction: null }, moreLabelTemplate: { classPropertyName: "moreLabelTemplate", publicName: "moreLabelTemplate", isSignal: true, isRequired: false, transformFunction: null }, collapseAt: { classPropertyName: "collapseAt", publicName: "collapseAt", isSignal: true, isRequired: false, transformFunction: null }, overflowFrom: { classPropertyName: "overflowFrom", publicName: "overflowFrom", isSignal: true, isRequired: false, transformFunction: null }, hideEmptyMore: { classPropertyName: "hideEmptyMore", publicName: "hideEmptyMore", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { overflowChange: "overflowChange" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscape()", "window:resize": "onWindowResize()" } }, queries: [{ propertyName: "items", predicate: BsPriorityNavItemDirective, isSignal: true }], viewQueries: [{ propertyName: "measureSizers", predicate: ["measureItem"], descendants: true, isSignal: true }, { propertyName: "stripSizer", first: true, predicate: ["stripSize"], descendants: true, isSignal: true }, { propertyName: "stripElement", first: true, predicate: ["stripSize"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "moreSizer", first: true, predicate: ["moreSize"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"priority-nav\" [class.noscript]=\"isServerSide\" bsNoNoscript>\n @if (isServerSide) {\n <input type=\"checkbox\" [id]=\"uid + '-more'\" class=\"priority-nav-more-checkbox d-none\" bsNoNoscript>\n }\n\n @if (!isServerSide) {\n <div class=\"priority-nav-measure-wrapper\" aria-hidden=\"true\">\n <div class=\"priority-nav-measure\">\n @for (entry of itemsWithMeta(); track entry.item.id) {\n <span #measureItem=\"bsObserveSize\" bsObserveSize class=\"priority-nav-measure-item\">\n <ng-container *ngTemplateOutlet=\"entry.item.templateRef\"></ng-container>\n </span>\n }\n </div>\n </div>\n }\n\n <div bsObserveSize #stripSize=\"bsObserveSize\" class=\"priority-nav-strip\">\n @for (entry of itemsWithMeta(); track entry.item.id) {\n <span class=\"priority-nav-item\"\n [class.priority-nav-hidden]=\"entry.hideInline\"\n [ngClass]=\"entry.hideBelowClass\">\n <ng-container *ngTemplateOutlet=\"entry.item.templateRef\"></ng-container>\n </span>\n }\n\n @if (isServerSide) {\n <label [for]=\"uid + '-more'\" class=\"priority-nav-more-toggle priority-nav-more-toggle-noscript\"\n role=\"button\" tabindex=\"0\"\n aria-haspopup=\"true\"\n [attr.aria-controls]=\"uid + '-overflow'\">\n <ng-container *ngTemplateOutlet=\"moreLabelTemplate() ?? defaultMoreLabel; context: { $implicit: false }\"></ng-container>\n </label>\n } @else {\n <button bsObserveSize #moreSize=\"bsObserveSize\" type=\"button\"\n class=\"priority-nav-more-toggle\"\n [class.priority-nav-hidden]=\"!showMoreButton()\"\n (click)=\"toggleMore()\"\n aria-haspopup=\"true\"\n [attr.aria-controls]=\"uid + '-overflow'\"\n [attr.aria-expanded]=\"isMoreOpen()\">\n <ng-container *ngTemplateOutlet=\"moreLabelTemplate() ?? defaultMoreLabel; context: { $implicit: isMoreOpen() }\"></ng-container>\n </button>\n }\n </div>\n\n <div [id]=\"uid + '-overflow'\"\n class=\"priority-nav-overflow\"\n role=\"menu\"\n [class.priority-nav-overflow-open]=\"!isServerSide && isMoreOpen()\"\n [class.priority-nav-overflow-align-start]=\"!isServerSide && fullyCollapsed()\">\n @for (entry of itemsWithMeta(); track entry.item.id) {\n <span class=\"priority-nav-overflow-item\"\n role=\"menuitem\"\n [class.priority-nav-overflow-hidden]=\"entry.hideInOverflow\"\n [ngClass]=\"entry.hideBelowClass\">\n <ng-container *ngTemplateOutlet=\"entry.item.templateRef\"></ng-container>\n </span>\n }\n </div>\n</div>\n\n<ng-template #defaultMoreLabel let-isOpen>\n <span class=\"priority-nav-more-label\">{{ moreLabel() }}</span>\n <span class=\"priority-nav-caret\" aria-hidden=\"true\">&#9662;</span>\n</ng-template>\n", styles: [":host{display:block}.priority-nav{position:relative}.priority-nav-measure-wrapper{position:absolute;top:0;left:0;width:0;height:0;overflow:hidden;pointer-events:none}.priority-nav-measure{visibility:hidden;display:flex;flex-wrap:nowrap;align-items:center}.priority-nav-measure .priority-nav-measure-item{display:inline-flex;align-items:center;flex-shrink:0}.priority-nav-strip{display:flex;flex-wrap:nowrap;align-items:center;overflow:hidden}.priority-nav-strip .priority-nav-item{display:inline-flex;align-items:center;flex-shrink:0}.priority-nav-hidden,.priority-nav-overflow-hidden{display:none!important}.priority-nav-more-toggle{flex-shrink:0;display:inline-flex;align-items:center;gap:.25rem;padding:.5rem .75rem;border:none;background:transparent;cursor:pointer;color:inherit;font:inherit}.priority-nav-more-toggle:focus-visible{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:2px}.priority-nav-more-toggle .priority-nav-caret{font-size:.75em;line-height:1}.priority-nav-overflow{display:none;position:absolute;top:100%;right:0;z-index:1000;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;background-color:var(--bs-body-bg, #fff);border:var(--bs-border-width, 1px) solid var(--bs-border-color, rgba(0, 0, 0, .175));border-radius:var(--bs-border-radius, .375rem);box-shadow:0 .5rem 1rem #00000026}.priority-nav-overflow .priority-nav-overflow-item{display:block;padding:.25rem 1rem}.priority-nav-overflow-open{display:block}.priority-nav-overflow-align-start{left:0;right:auto}@media(max-width:575.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-sm{display:none}}@media(max-width:767.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-md{display:none}}@media(max-width:991.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-lg{display:none}}@media(max-width:1199.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-xl{display:none}}@media(max-width:1399.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-xxl{display:none}}.priority-nav.noscript .priority-nav-overflow .priority-nav-overflow-item{display:none}@media(max-width:575.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-sm{display:block}}@media(max-width:767.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-md{display:block}}@media(max-width:991.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-lg{display:block}}@media(max-width:1199.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-xl{display:block}}@media(max-width:1399.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-xxl{display:block}}.priority-nav.noscript>input.priority-nav-more-checkbox.noscript:checked~.priority-nav-overflow{display:block}.priority-nav.noscript .priority-nav-more-toggle-noscript{cursor:pointer;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BsNoNoscriptDirective, selector: "[bsNoNoscript]" }, { kind: "directive", type: BsObserveSizeDirective, selector: "[bsObserveSize]", exportAs: ["bsObserveSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
220
+ }
221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsPriorityNavComponent, decorators: [{
222
+ type: Component,
223
+ args: [{ selector: 'bs-priority-nav', imports: [NgClass, NgTemplateOutlet, BsNoNoscriptDirective, BsObserveSizeDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: {
224
+ '(document:click)': 'onDocumentClick($event)',
225
+ '(document:keydown.escape)': 'onEscape()',
226
+ '(window:resize)': 'onWindowResize()',
227
+ }, template: "<div class=\"priority-nav\" [class.noscript]=\"isServerSide\" bsNoNoscript>\n @if (isServerSide) {\n <input type=\"checkbox\" [id]=\"uid + '-more'\" class=\"priority-nav-more-checkbox d-none\" bsNoNoscript>\n }\n\n @if (!isServerSide) {\n <div class=\"priority-nav-measure-wrapper\" aria-hidden=\"true\">\n <div class=\"priority-nav-measure\">\n @for (entry of itemsWithMeta(); track entry.item.id) {\n <span #measureItem=\"bsObserveSize\" bsObserveSize class=\"priority-nav-measure-item\">\n <ng-container *ngTemplateOutlet=\"entry.item.templateRef\"></ng-container>\n </span>\n }\n </div>\n </div>\n }\n\n <div bsObserveSize #stripSize=\"bsObserveSize\" class=\"priority-nav-strip\">\n @for (entry of itemsWithMeta(); track entry.item.id) {\n <span class=\"priority-nav-item\"\n [class.priority-nav-hidden]=\"entry.hideInline\"\n [ngClass]=\"entry.hideBelowClass\">\n <ng-container *ngTemplateOutlet=\"entry.item.templateRef\"></ng-container>\n </span>\n }\n\n @if (isServerSide) {\n <label [for]=\"uid + '-more'\" class=\"priority-nav-more-toggle priority-nav-more-toggle-noscript\"\n role=\"button\" tabindex=\"0\"\n aria-haspopup=\"true\"\n [attr.aria-controls]=\"uid + '-overflow'\">\n <ng-container *ngTemplateOutlet=\"moreLabelTemplate() ?? defaultMoreLabel; context: { $implicit: false }\"></ng-container>\n </label>\n } @else {\n <button bsObserveSize #moreSize=\"bsObserveSize\" type=\"button\"\n class=\"priority-nav-more-toggle\"\n [class.priority-nav-hidden]=\"!showMoreButton()\"\n (click)=\"toggleMore()\"\n aria-haspopup=\"true\"\n [attr.aria-controls]=\"uid + '-overflow'\"\n [attr.aria-expanded]=\"isMoreOpen()\">\n <ng-container *ngTemplateOutlet=\"moreLabelTemplate() ?? defaultMoreLabel; context: { $implicit: isMoreOpen() }\"></ng-container>\n </button>\n }\n </div>\n\n <div [id]=\"uid + '-overflow'\"\n class=\"priority-nav-overflow\"\n role=\"menu\"\n [class.priority-nav-overflow-open]=\"!isServerSide && isMoreOpen()\"\n [class.priority-nav-overflow-align-start]=\"!isServerSide && fullyCollapsed()\">\n @for (entry of itemsWithMeta(); track entry.item.id) {\n <span class=\"priority-nav-overflow-item\"\n role=\"menuitem\"\n [class.priority-nav-overflow-hidden]=\"entry.hideInOverflow\"\n [ngClass]=\"entry.hideBelowClass\">\n <ng-container *ngTemplateOutlet=\"entry.item.templateRef\"></ng-container>\n </span>\n }\n </div>\n</div>\n\n<ng-template #defaultMoreLabel let-isOpen>\n <span class=\"priority-nav-more-label\">{{ moreLabel() }}</span>\n <span class=\"priority-nav-caret\" aria-hidden=\"true\">&#9662;</span>\n</ng-template>\n", styles: [":host{display:block}.priority-nav{position:relative}.priority-nav-measure-wrapper{position:absolute;top:0;left:0;width:0;height:0;overflow:hidden;pointer-events:none}.priority-nav-measure{visibility:hidden;display:flex;flex-wrap:nowrap;align-items:center}.priority-nav-measure .priority-nav-measure-item{display:inline-flex;align-items:center;flex-shrink:0}.priority-nav-strip{display:flex;flex-wrap:nowrap;align-items:center;overflow:hidden}.priority-nav-strip .priority-nav-item{display:inline-flex;align-items:center;flex-shrink:0}.priority-nav-hidden,.priority-nav-overflow-hidden{display:none!important}.priority-nav-more-toggle{flex-shrink:0;display:inline-flex;align-items:center;gap:.25rem;padding:.5rem .75rem;border:none;background:transparent;cursor:pointer;color:inherit;font:inherit}.priority-nav-more-toggle:focus-visible{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:2px}.priority-nav-more-toggle .priority-nav-caret{font-size:.75em;line-height:1}.priority-nav-overflow{display:none;position:absolute;top:100%;right:0;z-index:1000;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;background-color:var(--bs-body-bg, #fff);border:var(--bs-border-width, 1px) solid var(--bs-border-color, rgba(0, 0, 0, .175));border-radius:var(--bs-border-radius, .375rem);box-shadow:0 .5rem 1rem #00000026}.priority-nav-overflow .priority-nav-overflow-item{display:block;padding:.25rem 1rem}.priority-nav-overflow-open{display:block}.priority-nav-overflow-align-start{left:0;right:auto}@media(max-width:575.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-sm{display:none}}@media(max-width:767.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-md{display:none}}@media(max-width:991.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-lg{display:none}}@media(max-width:1199.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-xl{display:none}}@media(max-width:1399.98px){.priority-nav.noscript .priority-nav-strip .priority-nav-item-hide-below-xxl{display:none}}.priority-nav.noscript .priority-nav-overflow .priority-nav-overflow-item{display:none}@media(max-width:575.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-sm{display:block}}@media(max-width:767.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-md{display:block}}@media(max-width:991.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-lg{display:block}}@media(max-width:1199.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-xl{display:block}}@media(max-width:1399.98px){.priority-nav.noscript .priority-nav-overflow .priority-nav-item-hide-below-xxl{display:block}}.priority-nav.noscript>input.priority-nav-more-checkbox.noscript:checked~.priority-nav-overflow{display:block}.priority-nav.noscript .priority-nav-more-toggle-noscript{cursor:pointer;-webkit-user-select:none;user-select:none}\n"] }]
228
+ }], ctorParameters: () => [], propDecorators: { moreLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "moreLabel", required: false }] }], moreLabelTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "moreLabelTemplate", required: false }] }], collapseAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseAt", required: false }] }], overflowFrom: [{ type: i0.Input, args: [{ isSignal: true, alias: "overflowFrom", required: false }] }], hideEmptyMore: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideEmptyMore", required: false }] }], overflowChange: [{ type: i0.Output, args: ["overflowChange"] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsPriorityNavItemDirective), { isSignal: true }] }], measureSizers: [{ type: i0.ViewChildren, args: ['measureItem', { isSignal: true }] }], stripSizer: [{ type: i0.ViewChild, args: ['stripSize', { isSignal: true }] }], stripElement: [{ type: i0.ViewChild, args: ['stripSize', { ...{ read: ElementRef }, isSignal: true }] }], moreSizer: [{ type: i0.ViewChild, args: ['moreSize', { isSignal: true }] }] } });
229
+
230
+ /**
231
+ * Generated bundle index. Do not edit.
232
+ */
233
+
234
+ export { BsPriorityNavComponent, BsPriorityNavItemDirective };
235
+ //# sourceMappingURL=mintplayer-ng-bootstrap-priority-nav.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-priority-nav.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/priority-nav/src/priority-nav-item/priority-nav-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/priority-nav/src/priority-nav/priority-nav.component.ts","../../../../libs/mintplayer-ng-bootstrap/priority-nav/src/priority-nav/priority-nav.component.html","../../../../libs/mintplayer-ng-bootstrap/priority-nav/mintplayer-ng-bootstrap-priority-nav.ts"],"sourcesContent":["import { Directive, inject, input, TemplateRef } from '@angular/core';\nimport { Breakpoint } from '@mintplayer/ng-bootstrap';\n\n@Directive({\n selector: '[bsPriorityNavItem]',\n})\nexport class BsPriorityNavItemDirective {\n templateRef = inject(TemplateRef);\n\n priority = input<number | null>(null, { alias: 'bsPriorityNavItem' });\n hideBelow = input<Breakpoint | null>(null, { alias: 'bsPriorityNavItemHideBelow' });\n\n readonly id: number = ++BsPriorityNavItemDirective.idCounter;\n private static idCounter = 0;\n}\n","import { isPlatformServer, NgClass, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy, Component, computed, contentChildren, effect, ElementRef,\n inject, input, output, PLATFORM_ID, signal, TemplateRef, viewChild, viewChildren\n} from '@angular/core';\nimport { Breakpoint } from '@mintplayer/ng-bootstrap';\nimport { BsNoNoscriptDirective } from '@mintplayer/ng-bootstrap/no-noscript';\nimport { BsObserveSizeDirective } from '@mintplayer/ng-swiper/observe-size';\nimport { BsPriorityNavItemDirective } from '../priority-nav-item/priority-nav-item.directive';\n\n@Component({\n selector: 'bs-priority-nav',\n templateUrl: './priority-nav.component.html',\n styleUrls: ['./priority-nav.component.scss'],\n imports: [NgClass, NgTemplateOutlet, BsNoNoscriptDirective, BsObserveSizeDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(document:click)': 'onDocumentClick($event)',\n '(document:keydown.escape)': 'onEscape()',\n '(window:resize)': 'onWindowResize()',\n },\n})\nexport class BsPriorityNavComponent {\n private platformId = inject(PLATFORM_ID);\n private element = inject(ElementRef);\n\n isServerSide = isPlatformServer(this.platformId);\n\n private static counter = 0;\n uid = `pn-${++BsPriorityNavComponent.counter}`;\n\n // Inputs\n moreLabel = input('More');\n moreLabelTemplate = input<TemplateRef<{ $implicit: boolean }> | null>(null);\n collapseAt = input<Breakpoint | null>(null);\n overflowFrom = input<'start' | 'end'>('end');\n hideEmptyMore = input(true);\n\n // Outputs\n overflowChange = output<BsPriorityNavItemDirective[]>();\n\n // Children\n readonly items = contentChildren(BsPriorityNavItemDirective);\n\n // Per-item width measurements (from the off-screen measure strip)\n private measureSizers = viewChildren<BsObserveSizeDirective>('measureItem');\n // Visible strip width and its element (for reading computed `column-gap`)\n stripSizer = viewChild<BsObserveSizeDirective>('stripSize');\n private stripElement = viewChild('stripSize', { read: ElementRef });\n // More button width\n moreSizer = viewChild<BsObserveSizeDirective>('moreSize');\n\n // Open/closed state for the More menu (JS path)\n isMoreOpen = signal(false);\n windowWidth = signal<number>(0);\n\n collapseAtPx = computed(() => {\n switch (this.collapseAt()) {\n case 'xxl': return 1400;\n case 'xl': return 1200;\n case 'lg': return 992;\n case 'md': return 768;\n case 'sm': return 576;\n case 'xs': return 0;\n default: return null;\n }\n });\n\n forceCollapse = computed(() => {\n const bp = this.collapseAtPx();\n if (bp === null) return false;\n const w = this.windowWidth();\n return w > 0 && w < bp;\n });\n\n // Items in overflow order. Convention: a LOWER priority number means MORE\n // important (priority: 1 stays visible longest). Items without a priority\n // are treated as least important and overflow before any prioritized item.\n // Tiebreaker uses declaration order (last-declared overflows first when\n // overflowFrom='end').\n overflowOrder = computed(() => {\n const items = this.items();\n const fromEnd = this.overflowFrom() === 'end';\n return [...items]\n .map((item, index) => ({ item, index, priority: item.priority() }))\n .sort((a, b) => {\n // Unprioritized items overflow first\n if (a.priority === null && b.priority !== null) return -1;\n if (a.priority !== null && b.priority === null) return 1;\n // Both prioritized: higher number overflows first (less important)\n if (a.priority !== null && b.priority !== null && a.priority !== b.priority) {\n return b.priority - a.priority;\n }\n // Tiebreaker by declaration order\n return fromEnd ? b.index - a.index : a.index - b.index;\n })\n .map(x => x.item);\n });\n\n // Per-item width map (from measure strip, indexed by item id, in items() order)\n itemWidths = computed<Map<number, number>>(() => {\n if (this.isServerSide) return new Map();\n const sizers = this.measureSizers();\n const items = this.items();\n const map = new Map<number, number>();\n items.forEach((item, i) => {\n const sizer = sizers[i];\n if (!sizer) return;\n const w = sizer.width();\n if (w !== undefined) map.set(item.id, w);\n });\n return map;\n });\n\n // The strip's `column-gap` (or `gap`) value in pixels. Read from computed\n // style so consumers' `gap` declarations get factored into the overflow math\n // — without this, items overflow late or layout-shift when a gap is set.\n // Re-read whenever the strip width changes (covers media-query gap changes\n // that piggy-back on the same breakpoint).\n itemGap = computed(() => {\n if (this.isServerSide) return 0;\n this.stripSizer()?.width();\n const el = this.stripElement()?.nativeElement as HTMLElement | undefined;\n if (!el) return 0;\n const cs = getComputedStyle(el);\n const raw = parseFloat(cs.columnGap || cs.gap || '0');\n return Number.isFinite(raw) ? raw : 0;\n });\n\n overflowingIds = computed<Set<number>>(() => {\n if (this.isServerSide) return new Set();\n if (this.forceCollapse()) {\n return new Set(this.items().map(i => i.id));\n }\n\n const stripWidth = this.stripSizer()?.width() ?? 0;\n const moreWidth = this.moreSizer()?.width() ?? 0;\n const widths = this.itemWidths();\n const gap = this.itemGap();\n\n if (stripWidth === 0 || widths.size === 0) return new Set();\n\n // Layout when all items fit (no More toggle): N items separated by N-1 gaps\n const sumWidths = Array.from(widths.values()).reduce((a, b) => a + b, 0);\n const allVisibleWidth = sumWidths + gap * Math.max(0, widths.size - 1);\n if (allVisibleWidth <= stripWidth) return new Set();\n\n // Need overflow → More toggle is shown. Layout when K items are kicked:\n // (N - K) items + 1 More toggle = (N - K + 1) elements with (N - K) gaps\n const overflowing = new Set<number>();\n let visibleSum = sumWidths;\n let visibleCount = widths.size;\n\n for (const item of this.overflowOrder()) {\n const totalWithMore = visibleSum + moreWidth + gap * visibleCount;\n if (totalWithMore <= stripWidth) break;\n visibleSum -= widths.get(item.id) ?? 0;\n visibleCount -= 1;\n overflowing.add(item.id);\n }\n return overflowing;\n });\n\n hasAnyOverflow = computed(() => this.overflowingIds().size > 0);\n showMoreButton = computed(() => !this.hideEmptyMore() || this.hasAnyOverflow());\n\n // When every item is overflowing the toggle ends up at the start edge of\n // the strip (no inline items push it). Anchor the dropdown to that side\n // so it stays visually attached to the toggle.\n fullyCollapsed = computed(() => {\n const items = this.items();\n return items.length > 0 && this.overflowingIds().size === items.length;\n });\n\n // Derived per-item view used by all three rendering passes (measure strip,\n // inline strip, overflow menu). Pre-computes the breakpoint class string and\n // the JS-mode-only hide flags so the template can stay purely declarative —\n // no method calls, no inline `!isServerSide` guards. The SSR/noscript path\n // relies on CSS media queries instead of these flags, so both `hideInline`\n // and `hideInOverflow` are forced to false on the server.\n itemsWithMeta = computed(() => {\n const items = this.items();\n const overflowing = this.overflowingIds();\n const ssr = this.isServerSide;\n return items.map(item => {\n const bp = item.hideBelow();\n const isOverflowing = overflowing.has(item.id);\n return {\n item,\n hideBelowClass: bp ? `priority-nav-item-hide-below-${bp}` : '',\n hideInline: !ssr && isOverflowing,\n hideInOverflow: !ssr && !isOverflowing,\n };\n });\n });\n\n constructor() {\n if (!this.isServerSide) {\n this.windowWidth.set(window.innerWidth);\n }\n\n effect(() => {\n const overflowing = this.overflowingIds();\n const overflowingItems = this.items().filter(i => overflowing.has(i.id));\n this.overflowChange.emit(overflowingItems);\n });\n }\n\n onWindowResize() {\n if (!this.isServerSide) {\n this.windowWidth.set(window.innerWidth);\n }\n }\n\n toggleMore() {\n this.isMoreOpen.update(v => !v);\n }\n\n onEscape() {\n if (this.isMoreOpen()) this.isMoreOpen.set(false);\n }\n\n onDocumentClick(event: MouseEvent) {\n if (event.button !== 0 || !this.isMoreOpen()) return;\n if (!this.element.nativeElement.contains(event.target as Node)) {\n this.isMoreOpen.set(false);\n }\n }\n\n}\n","<div class=\"priority-nav\" [class.noscript]=\"isServerSide\" bsNoNoscript>\n @if (isServerSide) {\n <input type=\"checkbox\" [id]=\"uid + '-more'\" class=\"priority-nav-more-checkbox d-none\" bsNoNoscript>\n }\n\n @if (!isServerSide) {\n <div class=\"priority-nav-measure-wrapper\" aria-hidden=\"true\">\n <div class=\"priority-nav-measure\">\n @for (entry of itemsWithMeta(); track entry.item.id) {\n <span #measureItem=\"bsObserveSize\" bsObserveSize class=\"priority-nav-measure-item\">\n <ng-container *ngTemplateOutlet=\"entry.item.templateRef\"></ng-container>\n </span>\n }\n </div>\n </div>\n }\n\n <div bsObserveSize #stripSize=\"bsObserveSize\" class=\"priority-nav-strip\">\n @for (entry of itemsWithMeta(); track entry.item.id) {\n <span class=\"priority-nav-item\"\n [class.priority-nav-hidden]=\"entry.hideInline\"\n [ngClass]=\"entry.hideBelowClass\">\n <ng-container *ngTemplateOutlet=\"entry.item.templateRef\"></ng-container>\n </span>\n }\n\n @if (isServerSide) {\n <label [for]=\"uid + '-more'\" class=\"priority-nav-more-toggle priority-nav-more-toggle-noscript\"\n role=\"button\" tabindex=\"0\"\n aria-haspopup=\"true\"\n [attr.aria-controls]=\"uid + '-overflow'\">\n <ng-container *ngTemplateOutlet=\"moreLabelTemplate() ?? defaultMoreLabel; context: { $implicit: false }\"></ng-container>\n </label>\n } @else {\n <button bsObserveSize #moreSize=\"bsObserveSize\" type=\"button\"\n class=\"priority-nav-more-toggle\"\n [class.priority-nav-hidden]=\"!showMoreButton()\"\n (click)=\"toggleMore()\"\n aria-haspopup=\"true\"\n [attr.aria-controls]=\"uid + '-overflow'\"\n [attr.aria-expanded]=\"isMoreOpen()\">\n <ng-container *ngTemplateOutlet=\"moreLabelTemplate() ?? defaultMoreLabel; context: { $implicit: isMoreOpen() }\"></ng-container>\n </button>\n }\n </div>\n\n <div [id]=\"uid + '-overflow'\"\n class=\"priority-nav-overflow\"\n role=\"menu\"\n [class.priority-nav-overflow-open]=\"!isServerSide && isMoreOpen()\"\n [class.priority-nav-overflow-align-start]=\"!isServerSide && fullyCollapsed()\">\n @for (entry of itemsWithMeta(); track entry.item.id) {\n <span class=\"priority-nav-overflow-item\"\n role=\"menuitem\"\n [class.priority-nav-overflow-hidden]=\"entry.hideInOverflow\"\n [ngClass]=\"entry.hideBelowClass\">\n <ng-container *ngTemplateOutlet=\"entry.item.templateRef\"></ng-container>\n </span>\n }\n </div>\n</div>\n\n<ng-template #defaultMoreLabel let-isOpen>\n <span class=\"priority-nav-more-label\">{{ moreLabel() }}</span>\n <span class=\"priority-nav-caret\" aria-hidden=\"true\">&#9662;</span>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAMa,0BAA0B,CAAA;AAHvC,IAAA,WAAA,GAAA;AAIE,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QAEjC,IAAA,CAAA,QAAQ,GAAG,KAAK,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W,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,UAAU,EAAE,iEAEpB,UAAU,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AElD1D;;AAEG;;;;"}
@@ -104,75 +104,88 @@ class BsResizeGlyphDirective {
104
104
  if (this.resizable.resizeAction && !this.isBusy) {
105
105
  ev.preventDefault();
106
106
  this.isBusy = true;
107
- const rct = this.resizable.element.nativeElement.getBoundingClientRect();
108
- if (this.resizable.resizeAction.start && this.positions()?.includes('end')) {
109
- // Right glyph
110
- const x = (ev.clientX < rct.left + 10) ? rct.left + 10 : ev.clientX;
107
+ const action = this.resizable.resizeAction;
108
+ // Note: the live bounding rect must NOT be used in the size/margin math.
109
+ // Reading it per-frame creates a feedback loop when content inside the
110
+ // host changes layout during the drag (e.g. a child component that
111
+ // shows/hides items in response to width). Use the captured `action`
112
+ // values from pointer-down — they're stable for the duration of the drag.
113
+ if (action.start && this.positions()?.includes('end')) {
114
+ // Right glyph — fixed left edge
115
+ const initialLeft = action.start.edge;
116
+ const initialRight = action.start.edge + action.start.size;
117
+ const x = (ev.clientX < initialLeft + 10) ? initialLeft + 10 : ev.clientX;
111
118
  switch (this.resizable.positioning()) {
112
119
  case 'inline':
113
120
  {
114
- const initalMargin = this.resizable.marginRight() ?? 0;
115
- this.resizable.marginRight.set(initalMargin - (x - rct.right));
121
+ const initialMargin = action.start.dragMargin ?? 0;
122
+ this.resizable.marginRight.set(initialMargin + (initialRight - x));
116
123
  }
117
124
  break;
118
125
  case 'absolute':
119
126
  {
120
- this.resizable.width.set(x - rct.left);
127
+ this.resizable.width.set(x - initialLeft);
121
128
  }
122
129
  break;
123
130
  }
124
131
  }
125
- else if (this.resizable.resizeAction.end && this.positions()?.includes('start')) {
126
- // Left glyph
127
- const x = (ev.clientX > rct.right - 10) ? rct.right - 10 : ev.clientX;
132
+ else if (action.end && this.positions()?.includes('start')) {
133
+ // Left glyph — fixed right edge
134
+ const initialRight = action.end.edge;
135
+ const initialLeft = action.end.edge - action.end.size;
136
+ const x = (ev.clientX > initialRight - 10) ? initialRight - 10 : ev.clientX;
128
137
  switch (this.resizable.positioning()) {
129
138
  case 'inline':
130
139
  {
131
- const initalMargin = this.resizable.marginLeft() ?? 0;
132
- this.resizable.marginLeft.set(initalMargin + x - rct.left);
140
+ const initialMargin = action.end.dragMargin ?? 0;
141
+ this.resizable.marginLeft.set(initialMargin + (x - initialLeft));
133
142
  }
134
143
  break;
135
144
  case 'absolute':
136
145
  {
137
146
  this.resizable.left.set(x);
138
- this.resizable.width.set(this.resizable.resizeAction.end.edge - x);
147
+ this.resizable.width.set(initialRight - x);
139
148
  }
140
149
  break;
141
150
  }
142
151
  }
143
- if (this.resizable.resizeAction.top && this.positions()?.includes('bottom')) {
144
- // Bottom glyph
145
- const y = (ev.clientY < rct.top + 10) ? rct.top + 10 : ev.clientY;
152
+ if (action.top && this.positions()?.includes('bottom')) {
153
+ // Bottom glyph — fixed top edge. action.top.edge = captured rect.top
154
+ const initialTop = action.top.edge;
155
+ const initialBottom = action.top.edge + action.top.size;
156
+ const y = (ev.clientY < initialTop + 10) ? initialTop + 10 : ev.clientY;
146
157
  switch (this.resizable.positioning()) {
147
158
  case 'inline':
148
159
  {
149
- const initalMargin = this.resizable.marginBottom() ?? 0;
150
- this.resizable.height.set(y - rct.top);
151
- this.resizable.marginBottom.set(initalMargin - (y - rct.bottom));
160
+ const initialMargin = action.top.dragMargin ?? 0;
161
+ this.resizable.height.set(y - initialTop);
162
+ this.resizable.marginBottom.set(initialMargin + (initialBottom - y));
152
163
  }
153
164
  break;
154
165
  case 'absolute':
155
166
  {
156
- this.resizable.height.set(y - rct.top);
167
+ this.resizable.height.set(y - initialTop);
157
168
  }
158
169
  break;
159
170
  }
160
171
  }
161
- else if (this.resizable.resizeAction.bottom && this.positions()?.includes('top')) {
162
- // Top glyph
163
- const y = (ev.clientY > rct.bottom - 10) ? rct.bottom - 10 : ev.clientY;
172
+ else if (action.bottom && this.positions()?.includes('top')) {
173
+ // Top glyph — fixed bottom edge. action.bottom.edge = captured rect.bottom
174
+ const initialBottom = action.bottom.edge;
175
+ const initialTop = action.bottom.edge - action.bottom.size;
176
+ const y = (ev.clientY > initialBottom - 10) ? initialBottom - 10 : ev.clientY;
164
177
  switch (this.resizable.positioning()) {
165
178
  case 'inline':
166
179
  {
167
- const initalMargin = this.resizable.marginTop() ?? 0;
168
- this.resizable.height.set(rct.bottom - y);
169
- this.resizable.marginTop.set(initalMargin + y - rct.top);
180
+ const initialMargin = action.bottom.dragMargin ?? 0;
181
+ this.resizable.height.set(initialBottom - y);
182
+ this.resizable.marginTop.set(initialMargin + (y - initialTop));
170
183
  }
171
184
  break;
172
185
  case 'absolute':
173
186
  {
174
187
  this.resizable.top.set(y);
175
- this.resizable.height.set(this.resizable.resizeAction.bottom.edge - y);
188
+ this.resizable.height.set(initialBottom - y);
176
189
  }
177
190
  break;
178
191
  }
@@ -209,6 +222,10 @@ class BsResizableComponent {
209
222
  constructor() {
210
223
  this.element = inject((ElementRef));
211
224
  this.positioning = input('inline', ...(ngDevMode ? [{ debugName: "positioning" }] : []));
225
+ this.horizontal = input(true, ...(ngDevMode ? [{ debugName: "horizontal" }] : []));
226
+ this.vertical = input(true, ...(ngDevMode ? [{ debugName: "vertical" }] : []));
227
+ this.corners = input(true, ...(ngDevMode ? [{ debugName: "corners" }] : []));
228
+ this.showCorners = computed(() => this.horizontal() && this.vertical() && this.corners(), ...(ngDevMode ? [{ debugName: "showCorners" }] : []));
212
229
  this.hostPosition = computed(() => {
213
230
  const positioning = this.positioning();
214
231
  switch (positioning) {
@@ -250,9 +267,9 @@ class BsResizableComponent {
250
267
  });
251
268
  }
252
269
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsResizableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
253
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: BsResizableComponent, isStandalone: true, selector: "bs-resizable", inputs: { positioning: { classPropertyName: "positioning", publicName: "positioning", 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: [
270
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", 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: [
254
271
  { provide: RESIZABLE, useExisting: forwardRef(() => BsResizableComponent) }
255
- ], ngImport: i0, template: "<div [class]=\"wrapperPosition()\" class=\"h-100\">\n <div class=\"cursor-nw-resize\" [bsResizeGlyph]=\"['top', 'start']\"></div>\n <div class=\"cursor-n-resize\" [bsResizeGlyph]=\"['top']\"></div>\n <div class=\"cursor-ne-resize\" [bsResizeGlyph]=\"['top', 'end']\"></div>\n <div class=\"cursor-e-resize\" [bsResizeGlyph]=\"['end']\"></div>\n <div class=\"cursor-se-resize\" [bsResizeGlyph]=\"['bottom', 'end']\"></div>\n <div class=\"cursor-s-resize\" [bsResizeGlyph]=\"['bottom']\"></div>\n <div class=\"cursor-sw-resize\" [bsResizeGlyph]=\"['bottom', 'start']\"></div>\n <div class=\"cursor-w-resize\" [bsResizeGlyph]=\"['start']\"></div>\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.start{left:-7px}.glyph.bottom{bottom:-7px}.glyph.end{right:-7px}.glyph.start:not(.top):not(.bottom),.glyph.end:not(.top):not(.bottom){top:4px;height:calc(100% - 8px)}.glyph.start:not(.top):not(.bottom):before,.glyph.end:not(.top):not(.bottom):before{display:block;height:100%}.glyph.start:before,.glyph.end:before{margin-left:3px;margin-right:3px}.glyph.top:not(.start):not(.end),.glyph.bottom:not(.start):not(.end){left:4px;width:calc(100% - 8px)}.glyph.top:not(.start):not(.end):before,.glyph.bottom:not(.start):not(.end):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:#1389fd}:host{min-width:2rem;min-height:2rem}\n"], dependencies: [{ kind: "directive", type: BsResizeGlyphDirective, selector: "[bsResizeGlyph]", inputs: ["bsResizeGlyph"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
272
+ ], ngImport: i0, template: "<div [class]=\"wrapperPosition()\" class=\"h-100\">\n @if (showCorners()) {\n <div class=\"cursor-nw-resize\" [bsResizeGlyph]=\"['top', 'start']\"></div>\n <div class=\"cursor-ne-resize\" [bsResizeGlyph]=\"['top', 'end']\"></div>\n <div class=\"cursor-se-resize\" [bsResizeGlyph]=\"['bottom', 'end']\"></div>\n <div class=\"cursor-sw-resize\" [bsResizeGlyph]=\"['bottom', 'start']\"></div>\n }\n @if (vertical()) {\n <div class=\"cursor-n-resize\" [bsResizeGlyph]=\"['top']\"></div>\n <div class=\"cursor-s-resize\" [bsResizeGlyph]=\"['bottom']\"></div>\n }\n @if (horizontal()) {\n <div class=\"cursor-e-resize\" [bsResizeGlyph]=\"['end']\"></div>\n <div class=\"cursor-w-resize\" [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.start{left:-7px}.glyph.bottom{bottom:-7px}.glyph.end{right:-7px}.glyph.start:not(.top):not(.bottom),.glyph.end:not(.top):not(.bottom){top:4px;height:calc(100% - 8px)}.glyph.start:not(.top):not(.bottom):before,.glyph.end:not(.top):not(.bottom):before{display:block;height:100%}.glyph.start:before,.glyph.end:before{margin-left:3px;margin-right:3px}.glyph.top:not(.start):not(.end),.glyph.bottom:not(.start):not(.end){left:4px;width:calc(100% - 8px)}.glyph.top:not(.start):not(.end):before,.glyph.bottom:not(.start):not(.end):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:#1389fd}:host{min-width:2rem;min-height:2rem}\n"], dependencies: [{ kind: "directive", type: BsResizeGlyphDirective, selector: "[bsResizeGlyph]", inputs: ["bsResizeGlyph"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
256
273
  }
257
274
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsResizableComponent, decorators: [{
258
275
  type: Component,
@@ -270,8 +287,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
270
287
  '[class.d-block]': 'true',
271
288
  '[class.border]': 'true',
272
289
  '[class]': 'hostPosition()',
273
- }, template: "<div [class]=\"wrapperPosition()\" class=\"h-100\">\n <div class=\"cursor-nw-resize\" [bsResizeGlyph]=\"['top', 'start']\"></div>\n <div class=\"cursor-n-resize\" [bsResizeGlyph]=\"['top']\"></div>\n <div class=\"cursor-ne-resize\" [bsResizeGlyph]=\"['top', 'end']\"></div>\n <div class=\"cursor-e-resize\" [bsResizeGlyph]=\"['end']\"></div>\n <div class=\"cursor-se-resize\" [bsResizeGlyph]=\"['bottom', 'end']\"></div>\n <div class=\"cursor-s-resize\" [bsResizeGlyph]=\"['bottom']\"></div>\n <div class=\"cursor-sw-resize\" [bsResizeGlyph]=\"['bottom', 'start']\"></div>\n <div class=\"cursor-w-resize\" [bsResizeGlyph]=\"['start']\"></div>\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.start{left:-7px}.glyph.bottom{bottom:-7px}.glyph.end{right:-7px}.glyph.start:not(.top):not(.bottom),.glyph.end:not(.top):not(.bottom){top:4px;height:calc(100% - 8px)}.glyph.start:not(.top):not(.bottom):before,.glyph.end:not(.top):not(.bottom):before{display:block;height:100%}.glyph.start:before,.glyph.end:before{margin-left:3px;margin-right:3px}.glyph.top:not(.start):not(.end),.glyph.bottom:not(.start):not(.end){left:4px;width:calc(100% - 8px)}.glyph.top:not(.start):not(.end):before,.glyph.bottom:not(.start):not(.end):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:#1389fd}:host{min-width:2rem;min-height:2rem}\n"] }]
274
- }], ctorParameters: () => [], propDecorators: { positioning: [{ type: i0.Input, args: [{ isSignal: true, alias: "positioning", required: false }] }], presetPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "presetPosition", required: false }] }] } });
290
+ }, template: "<div [class]=\"wrapperPosition()\" class=\"h-100\">\n @if (showCorners()) {\n <div class=\"cursor-nw-resize\" [bsResizeGlyph]=\"['top', 'start']\"></div>\n <div class=\"cursor-ne-resize\" [bsResizeGlyph]=\"['top', 'end']\"></div>\n <div class=\"cursor-se-resize\" [bsResizeGlyph]=\"['bottom', 'end']\"></div>\n <div class=\"cursor-sw-resize\" [bsResizeGlyph]=\"['bottom', 'start']\"></div>\n }\n @if (vertical()) {\n <div class=\"cursor-n-resize\" [bsResizeGlyph]=\"['top']\"></div>\n <div class=\"cursor-s-resize\" [bsResizeGlyph]=\"['bottom']\"></div>\n }\n @if (horizontal()) {\n <div class=\"cursor-e-resize\" [bsResizeGlyph]=\"['end']\"></div>\n <div class=\"cursor-w-resize\" [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.start{left:-7px}.glyph.bottom{bottom:-7px}.glyph.end{right:-7px}.glyph.start:not(.top):not(.bottom),.glyph.end:not(.top):not(.bottom){top:4px;height:calc(100% - 8px)}.glyph.start:not(.top):not(.bottom):before,.glyph.end:not(.top):not(.bottom):before{display:block;height:100%}.glyph.start:before,.glyph.end:before{margin-left:3px;margin-right:3px}.glyph.top:not(.start):not(.end),.glyph.bottom:not(.start):not(.end){left:4px;width:calc(100% - 8px)}.glyph.top:not(.start):not(.end):before,.glyph.bottom:not(.start):not(.end):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:#1389fd}:host{min-width:2rem;min-height:2rem}\n"] }]
291
+ }], 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 }] }] } });
275
292
 
276
293
  /**
277
294
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-resizable.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/resizable/src/providers/resizable.provider.ts","../../../../libs/mintplayer-ng-bootstrap/resizable/src/resize-glyph/resize-glyph.directive.ts","../../../../libs/mintplayer-ng-bootstrap/resizable/src/resizable/resizable.component.ts","../../../../libs/mintplayer-ng-bootstrap/resizable/src/resizable/resizable.component.html","../../../../libs/mintplayer-ng-bootstrap/resizable/mintplayer-ng-bootstrap-resizable.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\nimport type { BsResizableComponent } from \"../resizable/resizable.component\";\n\nexport const RESIZABLE = new InjectionToken<BsResizableComponent>('Resizable');","import { Directive, effect, inject, input, signal, forwardRef } from '@angular/core';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport type { BsResizableComponent } from '../resizable/resizable.component';\nimport { ResizeAction } from '../interfaces/resize-action';\nimport { PointerData } from '../interfaces/pointer-data';\nimport { RESIZABLE } from '../providers/resizable.provider';\n\n@Directive({\n selector: '[bsResizeGlyph]',\n host: {\n '[class]': 'positions()',\n '[class.glyph]': 'true',\n '[class.active]': 'activeClass()',\n '(mousedown)': 'onMouseDown($event)',\n '(touchstart)': 'onTouchStart($event)',\n '(document:mousemove)': 'onMouseMove($event)',\n '(touchmove)': 'onTouchMove($event)',\n '(document:mouseup)': 'onMouseUp($event)',\n '(touchend)': 'onTouchEnd($event)',\n },\n})\nexport class BsResizeGlyphDirective {\n\n // Can't use typed DI because of the `import type`\n private readonly resizable: BsResizableComponent = inject(RESIZABLE);\n\n constructor() {\n effect(() => {\n const value = this.bsResizeGlyph();\n this.positions.set(value.join(' '));\n });\n }\n\n positions = signal('');\n activeClass = signal(false);\n\n readonly bsResizeGlyph = input<Position[]>([]);\n\n onMouseDown(ev: MouseEvent) {\n ev.preventDefault();\n this.onPointerDown()\n }\n\n onTouchStart(ev: TouchEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n this.onPointerDown();\n }\n\n onMouseMove(ev: MouseEvent) {\n this.onPointerMove({ clientX: ev.clientX, clientY: ev.clientY, preventDefault: () => ev.preventDefault() });\n }\n\n onTouchMove(ev: TouchEvent) {\n if (ev.touches.length === 1) {\n ev.preventDefault();\n ev.stopPropagation();\n this.onPointerMove({ clientX: ev.touches[0].clientX, clientY: ev.touches[0].clientY, preventDefault: () => ev.preventDefault() });\n }\n }\n\n onMouseUp(ev: Event) {\n this.onPointerUp();\n }\n\n onTouchEnd(ev: TouchEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n this.onPointerUp();\n }\n\n onPointerDown() {\n let action: ResizeAction = {\n positioning: this.resizable.positioning()\n };\n const rect = this.resizable.element.nativeElement.getBoundingClientRect();\n const styles = window.getComputedStyle(this.resizable.element.nativeElement);\n\n const marginLeft = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginLeft.slice(0, -2));\n const marginRight = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginRight.slice(0, -2));\n const marginTop = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginTop.slice(0, -2));\n const marginBottom = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginBottom.slice(0, -2));\n\n\n if (this.positions()?.includes('start')) {\n action = {\n ...action,\n end: {\n edge: rect.right,\n size: rect.width,\n margin: marginRight,\n dragMargin: marginLeft\n },\n };\n }\n if (this.positions()?.includes('end')) {\n action = {\n ...action,\n start: {\n edge: rect.left,\n size: rect.width,\n margin: marginLeft,\n dragMargin: marginRight\n },\n };\n }\n if (this.positions()?.includes('top')) {\n action = {\n ...action,\n bottom: {\n edge: rect.bottom,\n size: rect.height,\n margin: marginBottom,\n dragMargin: marginTop\n },\n };\n }\n if (this.positions()?.includes('bottom')) {\n action = {\n ...action,\n top: {\n edge: rect.top,\n size: rect.height,\n margin: marginTop,\n dragMargin: marginBottom\n },\n };\n }\n\n this.resizable.resizeAction = action;\n this.activeClass.set(true);\n }\n\n private isBusy = false;\n onPointerMove(ev: PointerData) {\n if (this.resizable.resizeAction && !this.isBusy) {\n ev.preventDefault();\n this.isBusy = true;\n const rct = this.resizable.element.nativeElement.getBoundingClientRect();\n if (this.resizable.resizeAction.start && this.positions()?.includes('end')) {\n // Right glyph\n const x = (ev.clientX < rct.left + 10) ? rct.left + 10 : ev.clientX;\n switch (this.resizable.positioning()) {\n case 'inline': {\n const initalMargin = this.resizable.marginRight() ?? 0;\n this.resizable.marginRight.set(initalMargin - (x - rct.right));\n } break;\n case 'absolute': {\n this.resizable.width.set(x - rct.left);\n } break;\n }\n } else if (this.resizable.resizeAction.end && this.positions()?.includes('start')) {\n // Left glyph\n const x = (ev.clientX > rct.right - 10) ? rct.right - 10 : ev.clientX;\n switch (this.resizable.positioning()) {\n case 'inline': {\n const initalMargin = this.resizable.marginLeft() ?? 0;\n this.resizable.marginLeft.set(initalMargin + x - rct.left);\n } break;\n case 'absolute': {\n this.resizable.left.set(x);\n this.resizable.width.set(this.resizable.resizeAction.end.edge - x);\n } break;\n }\n }\n\n if (this.resizable.resizeAction.top && this.positions()?.includes('bottom')) {\n // Bottom glyph\n const y = (ev.clientY < rct.top + 10) ? rct.top + 10 : ev.clientY;\n switch (this.resizable.positioning()) {\n case 'inline': {\n const initalMargin = this.resizable.marginBottom() ?? 0;\n this.resizable.height.set(y - rct.top);\n this.resizable.marginBottom.set(initalMargin - (y - rct.bottom));\n } break;\n case 'absolute': {\n this.resizable.height.set(y - rct.top);\n } break;\n }\n } else if (this.resizable.resizeAction.bottom && this.positions()?.includes('top')) {\n // Top glyph\n const y = (ev.clientY > rct.bottom - 10) ? rct.bottom - 10 : ev.clientY;\n switch (this.resizable.positioning()) {\n case 'inline': {\n const initalMargin = this.resizable.marginTop() ?? 0;\n this.resizable.height.set(rct.bottom - y);\n this.resizable.marginTop.set(initalMargin + y - rct.top);\n } break;\n case 'absolute': {\n this.resizable.top.set(y);\n this.resizable.height.set(this.resizable.resizeAction.bottom.edge - y);\n } break;\n }\n }\n this.isBusy = false;\n }\n }\n \n onPointerUp() {\n this.resizable.resizeAction = undefined;\n this.activeClass.set(false);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, forwardRef, signal } from '@angular/core';\nimport { ResizeAction } from '../interfaces/resize-action';\nimport { RESIZABLE } from '../providers/resizable.provider';\nimport { ResizablePositioning } from '../types/positioning';\nimport { PresetPosition } from '../interfaces/preset-position';\nimport { BsResizeGlyphDirective } from '../resize-glyph/resize-glyph.directive';\n\n@Component({\n selector: 'bs-resizable',\n templateUrl: './resizable.component.html',\n styleUrls: ['./resizable.component.scss'],\n imports: [BsResizeGlyphDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: RESIZABLE, useExisting: forwardRef(() => BsResizableComponent) }\n ],\n host: {\n '[style.margin-left.px]': 'marginLeft()',\n '[style.margin-right.px]': 'marginRight()',\n '[style.margin-top.px]': 'marginTop()',\n '[style.margin-bottom.px]': 'marginBottom()',\n '[style.width.px]': 'width()',\n '[style.height.px]': 'height()',\n '[style.left.px]': 'left()',\n '[style.top.px]': 'top()',\n '[class.d-block]': 'true',\n '[class.border]': 'true',\n '[class]': 'hostPosition()',\n },\n})\nexport class BsResizableComponent {\n element = inject(ElementRef<HTMLElement>);\n\n resizeAction?: ResizeAction;\n positioning = input<ResizablePositioning>('inline');\n\n hostPosition = computed(() => {\n const positioning = this.positioning();\n switch (positioning) {\n case 'absolute': return 'position-absolute';\n case 'inline': return 'position-relative';\n }\n });\n\n wrapperPosition = computed(() => {\n const positioning = this.positioning();\n switch (positioning) {\n case 'absolute': return ['position-relative', 'h-100'];\n case 'inline': return [];\n }\n });\n\n readonly presetPosition = input<PresetPosition | undefined>(undefined);\n\n constructor() {\n effect(() => {\n const value = this.presetPosition();\n if (value) {\n if (this.positioning() === 'inline') {\n throw 'presetPosition currently only supported in absolute positioning';\n }\n this.width.set(value.width);\n this.height.set(value.height);\n this.left.set(value.left);\n this.top.set(value.top);\n this.marginTop.set(undefined);\n this.marginBottom.set(undefined);\n this.marginLeft.set(undefined);\n this.marginRight.set(undefined);\n }\n });\n }\n\n marginLeft = signal<number | undefined>(undefined);\n marginRight = signal<number | undefined>(undefined);\n marginTop = signal<number | undefined>(undefined);\n marginBottom = signal<number | undefined>(undefined);\n width = signal<number | undefined>(undefined);\n height = signal<number | undefined>(undefined);\n left = signal<number | undefined>(undefined);\n top = signal<number | undefined>(undefined);\n}\n","<div [class]=\"wrapperPosition()\" class=\"h-100\">\n <div class=\"cursor-nw-resize\" [bsResizeGlyph]=\"['top', 'start']\"></div>\n <div class=\"cursor-n-resize\" [bsResizeGlyph]=\"['top']\"></div>\n <div class=\"cursor-ne-resize\" [bsResizeGlyph]=\"['top', 'end']\"></div>\n <div class=\"cursor-e-resize\" [bsResizeGlyph]=\"['end']\"></div>\n <div class=\"cursor-se-resize\" [bsResizeGlyph]=\"['bottom', 'end']\"></div>\n <div class=\"cursor-s-resize\" [bsResizeGlyph]=\"['bottom']\"></div>\n <div class=\"cursor-sw-resize\" [bsResizeGlyph]=\"['bottom', 'start']\"></div>\n <div class=\"cursor-w-resize\" [bsResizeGlyph]=\"['start']\"></div>\n <ng-content></ng-content>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGa,SAAS,GAAG,IAAI,cAAc,CAAuB,WAAW;;MCkBhE,sBAAsB,CAAA;AAKjC,IAAA,WAAA,GAAA;;AAFiB,QAAA,IAAA,CAAA,SAAS,GAAyB,MAAM,CAAC,SAAS,CAAC;AASpE,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,EAAE,qDAAC;AACtB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK,uDAAC;AA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BAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,iBAAiB,EAAE,QAAQ;AAC3B,wBAAA,gBAAgB,EAAE,OAAO;AACzB,wBAAA,iBAAiB,EAAE,MAAM;AACzB,wBAAA,gBAAgB,EAAE,MAAM;AACxB,wBAAA,SAAS,EAAE,gBAAgB;AAC5B,qBAAA,EAAA,QAAA,EAAA,msBAAA,EAAA,MAAA,EAAA,CAAA,i7BAAA,CAAA,EAAA;;;AE5BH;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-resizable.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/resizable/src/providers/resizable.provider.ts","../../../../libs/mintplayer-ng-bootstrap/resizable/src/resize-glyph/resize-glyph.directive.ts","../../../../libs/mintplayer-ng-bootstrap/resizable/src/resizable/resizable.component.ts","../../../../libs/mintplayer-ng-bootstrap/resizable/src/resizable/resizable.component.html","../../../../libs/mintplayer-ng-bootstrap/resizable/mintplayer-ng-bootstrap-resizable.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\nimport type { BsResizableComponent } from \"../resizable/resizable.component\";\n\nexport const RESIZABLE = new InjectionToken<BsResizableComponent>('Resizable');","import { Directive, effect, inject, input, signal, forwardRef } from '@angular/core';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport type { BsResizableComponent } from '../resizable/resizable.component';\nimport { ResizeAction } from '../interfaces/resize-action';\nimport { PointerData } from '../interfaces/pointer-data';\nimport { RESIZABLE } from '../providers/resizable.provider';\n\n@Directive({\n selector: '[bsResizeGlyph]',\n host: {\n '[class]': 'positions()',\n '[class.glyph]': 'true',\n '[class.active]': 'activeClass()',\n '(mousedown)': 'onMouseDown($event)',\n '(touchstart)': 'onTouchStart($event)',\n '(document:mousemove)': 'onMouseMove($event)',\n '(touchmove)': 'onTouchMove($event)',\n '(document:mouseup)': 'onMouseUp($event)',\n '(touchend)': 'onTouchEnd($event)',\n },\n})\nexport class BsResizeGlyphDirective {\n\n // Can't use typed DI because of the `import type`\n private readonly resizable: BsResizableComponent = inject(RESIZABLE);\n\n constructor() {\n effect(() => {\n const value = this.bsResizeGlyph();\n this.positions.set(value.join(' '));\n });\n }\n\n positions = signal('');\n activeClass = signal(false);\n\n readonly bsResizeGlyph = input<Position[]>([]);\n\n onMouseDown(ev: MouseEvent) {\n ev.preventDefault();\n this.onPointerDown()\n }\n\n onTouchStart(ev: TouchEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n this.onPointerDown();\n }\n\n onMouseMove(ev: MouseEvent) {\n this.onPointerMove({ clientX: ev.clientX, clientY: ev.clientY, preventDefault: () => ev.preventDefault() });\n }\n\n onTouchMove(ev: TouchEvent) {\n if (ev.touches.length === 1) {\n ev.preventDefault();\n ev.stopPropagation();\n this.onPointerMove({ clientX: ev.touches[0].clientX, clientY: ev.touches[0].clientY, preventDefault: () => ev.preventDefault() });\n }\n }\n\n onMouseUp(ev: Event) {\n this.onPointerUp();\n }\n\n onTouchEnd(ev: TouchEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n this.onPointerUp();\n }\n\n onPointerDown() {\n let action: ResizeAction = {\n positioning: this.resizable.positioning()\n };\n const rect = this.resizable.element.nativeElement.getBoundingClientRect();\n const styles = window.getComputedStyle(this.resizable.element.nativeElement);\n\n const marginLeft = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginLeft.slice(0, -2));\n const marginRight = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginRight.slice(0, -2));\n const marginTop = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginTop.slice(0, -2));\n const marginBottom = (this.resizable.positioning() === 'absolute') ? undefined : parseFloat(styles.marginBottom.slice(0, -2));\n\n\n if (this.positions()?.includes('start')) {\n action = {\n ...action,\n end: {\n edge: rect.right,\n size: rect.width,\n margin: marginRight,\n dragMargin: marginLeft\n },\n };\n }\n if (this.positions()?.includes('end')) {\n action = {\n ...action,\n start: {\n edge: rect.left,\n size: rect.width,\n margin: marginLeft,\n dragMargin: marginRight\n },\n };\n }\n if (this.positions()?.includes('top')) {\n action = {\n ...action,\n bottom: {\n edge: rect.bottom,\n size: rect.height,\n margin: marginBottom,\n dragMargin: marginTop\n },\n };\n }\n if (this.positions()?.includes('bottom')) {\n action = {\n ...action,\n top: {\n edge: rect.top,\n size: rect.height,\n margin: marginTop,\n dragMargin: marginBottom\n },\n };\n }\n\n this.resizable.resizeAction = action;\n this.activeClass.set(true);\n }\n\n private isBusy = false;\n onPointerMove(ev: PointerData) {\n if (this.resizable.resizeAction && !this.isBusy) {\n ev.preventDefault();\n this.isBusy = true;\n const action = this.resizable.resizeAction;\n // Note: the live bounding rect must NOT be used in the size/margin math.\n // Reading it per-frame creates a feedback loop when content inside the\n // host changes layout during the drag (e.g. a child component that\n // shows/hides items in response to width). Use the captured `action`\n // values from pointer-down — they're stable for the duration of the drag.\n\n if (action.start && this.positions()?.includes('end')) {\n // Right glyph — fixed left edge\n const initialLeft = action.start.edge;\n const initialRight = action.start.edge + action.start.size;\n const x = (ev.clientX < initialLeft + 10) ? initialLeft + 10 : ev.clientX;\n switch (this.resizable.positioning()) {\n case 'inline': {\n const initialMargin = action.start.dragMargin ?? 0;\n this.resizable.marginRight.set(initialMargin + (initialRight - x));\n } break;\n case 'absolute': {\n this.resizable.width.set(x - initialLeft);\n } break;\n }\n } else if (action.end && this.positions()?.includes('start')) {\n // Left glyph — fixed right edge\n const initialRight = action.end.edge;\n const initialLeft = action.end.edge - action.end.size;\n const x = (ev.clientX > initialRight - 10) ? initialRight - 10 : ev.clientX;\n switch (this.resizable.positioning()) {\n case 'inline': {\n const initialMargin = action.end.dragMargin ?? 0;\n this.resizable.marginLeft.set(initialMargin + (x - initialLeft));\n } break;\n case 'absolute': {\n this.resizable.left.set(x);\n this.resizable.width.set(initialRight - x);\n } break;\n }\n }\n\n if (action.top && this.positions()?.includes('bottom')) {\n // Bottom glyph — fixed top edge. action.top.edge = captured rect.top\n const initialTop = action.top.edge;\n const initialBottom = action.top.edge + action.top.size;\n const y = (ev.clientY < initialTop + 10) ? initialTop + 10 : ev.clientY;\n switch (this.resizable.positioning()) {\n case 'inline': {\n const initialMargin = action.top.dragMargin ?? 0;\n this.resizable.height.set(y - initialTop);\n this.resizable.marginBottom.set(initialMargin + (initialBottom - y));\n } break;\n case 'absolute': {\n this.resizable.height.set(y - initialTop);\n } break;\n }\n } else if (action.bottom && this.positions()?.includes('top')) {\n // Top glyph — fixed bottom edge. action.bottom.edge = captured rect.bottom\n const initialBottom = action.bottom.edge;\n const initialTop = action.bottom.edge - action.bottom.size;\n const y = (ev.clientY > initialBottom - 10) ? initialBottom - 10 : ev.clientY;\n switch (this.resizable.positioning()) {\n case 'inline': {\n const initialMargin = action.bottom.dragMargin ?? 0;\n this.resizable.height.set(initialBottom - y);\n this.resizable.marginTop.set(initialMargin + (y - initialTop));\n } break;\n case 'absolute': {\n this.resizable.top.set(y);\n this.resizable.height.set(initialBottom - y);\n } break;\n }\n }\n this.isBusy = false;\n }\n }\n \n onPointerUp() {\n this.resizable.resizeAction = undefined;\n this.activeClass.set(false);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, forwardRef, signal } from '@angular/core';\nimport { ResizeAction } from '../interfaces/resize-action';\nimport { RESIZABLE } from '../providers/resizable.provider';\nimport { ResizablePositioning } from '../types/positioning';\nimport { PresetPosition } from '../interfaces/preset-position';\nimport { BsResizeGlyphDirective } from '../resize-glyph/resize-glyph.directive';\n\n@Component({\n selector: 'bs-resizable',\n templateUrl: './resizable.component.html',\n styleUrls: ['./resizable.component.scss'],\n imports: [BsResizeGlyphDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: RESIZABLE, useExisting: forwardRef(() => BsResizableComponent) }\n ],\n host: {\n '[style.margin-left.px]': 'marginLeft()',\n '[style.margin-right.px]': 'marginRight()',\n '[style.margin-top.px]': 'marginTop()',\n '[style.margin-bottom.px]': 'marginBottom()',\n '[style.width.px]': 'width()',\n '[style.height.px]': 'height()',\n '[style.left.px]': 'left()',\n '[style.top.px]': 'top()',\n '[class.d-block]': 'true',\n '[class.border]': 'true',\n '[class]': 'hostPosition()',\n },\n})\nexport class BsResizableComponent {\n element = inject(ElementRef<HTMLElement>);\n\n resizeAction?: ResizeAction;\n positioning = input<ResizablePositioning>('inline');\n horizontal = input(true);\n vertical = input(true);\n corners = input(true);\n\n showCorners = computed(() => this.horizontal() && this.vertical() && this.corners());\n\n hostPosition = computed(() => {\n const positioning = this.positioning();\n switch (positioning) {\n case 'absolute': return 'position-absolute';\n case 'inline': return 'position-relative';\n }\n });\n\n wrapperPosition = computed(() => {\n const positioning = this.positioning();\n switch (positioning) {\n case 'absolute': return ['position-relative', 'h-100'];\n case 'inline': return [];\n }\n });\n\n readonly presetPosition = input<PresetPosition | undefined>(undefined);\n\n constructor() {\n effect(() => {\n const value = this.presetPosition();\n if (value) {\n if (this.positioning() === 'inline') {\n throw 'presetPosition currently only supported in absolute positioning';\n }\n this.width.set(value.width);\n this.height.set(value.height);\n this.left.set(value.left);\n this.top.set(value.top);\n this.marginTop.set(undefined);\n this.marginBottom.set(undefined);\n this.marginLeft.set(undefined);\n this.marginRight.set(undefined);\n }\n });\n }\n\n marginLeft = signal<number | undefined>(undefined);\n marginRight = signal<number | undefined>(undefined);\n marginTop = signal<number | undefined>(undefined);\n marginBottom = signal<number | undefined>(undefined);\n width = signal<number | undefined>(undefined);\n height = signal<number | undefined>(undefined);\n left = signal<number | undefined>(undefined);\n top = signal<number | undefined>(undefined);\n}\n","<div [class]=\"wrapperPosition()\" class=\"h-100\">\n @if (showCorners()) {\n <div class=\"cursor-nw-resize\" [bsResizeGlyph]=\"['top', 'start']\"></div>\n <div class=\"cursor-ne-resize\" [bsResizeGlyph]=\"['top', 'end']\"></div>\n <div class=\"cursor-se-resize\" [bsResizeGlyph]=\"['bottom', 'end']\"></div>\n <div class=\"cursor-sw-resize\" [bsResizeGlyph]=\"['bottom', 'start']\"></div>\n }\n @if (vertical()) {\n <div class=\"cursor-n-resize\" [bsResizeGlyph]=\"['top']\"></div>\n <div class=\"cursor-s-resize\" [bsResizeGlyph]=\"['bottom']\"></div>\n }\n @if (horizontal()) {\n <div class=\"cursor-e-resize\" [bsResizeGlyph]=\"['end']\"></div>\n <div class=\"cursor-w-resize\" [bsResizeGlyph]=\"['start']\"></div>\n }\n <ng-content></ng-content>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGa,SAAS,GAAG,IAAI,cAAc,CAAuB,WAAW;;MCkBhE,sBAAsB,CAAA;AAKjC,IAAA,WAAA,GAAA;;AAFiB,QAAA,IAAA,CAAA,SAAS,GAAyB,MAAM,CAAC,SAAS,CAAC;AASpE,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,EAAE,qDAAC;AACtB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK,uDAAC;AAElB,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAa,EAAE,yDAAC;QAiGtC,IAAA,CAAA,MAAM,GAAG,KAAK;QA1GpB,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,EAAE;AAClC,YAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrC,QAAA,CAAC,CAAC;IACJ;AAOA,IAAA,WAAW,CAAC,EAAc,EAAA;QACxB,EAAE,CAAC,cAAc,EAAE;QACnB,IAAI,CAAC,aAAa,EAAE;IACtB;AAEA,IAAA,YAAY,CAAC,EAAc,EAAA;QACzB,EAAE,CAAC,cAAc,EAAE;QACnB,EAAE,CAAC,eAAe,EAAE;QACpB,IAAI,CAAC,aAAa,EAAE;IACtB;AAEA,IAAA,WAAW,CAAC,EAAc,EAAA;QACxB,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,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ACE,cAAc,EAAA,OAAA,EAGf,CAAC,sBAAsB,CAAC,mBAChB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAC,MAAK,oBAAqB,CAAC;qBAC1E,EAAA,IAAA,EACK;AACJ,wBAAA,wBAAwB,EAAE,cAAc;AACxC,wBAAA,yBAAyB,EAAE,eAAe;AAC1C,wBAAA,uBAAuB,EAAE,aAAa;AACtC,wBAAA,0BAA0B,EAAE,gBAAgB;AAC5C,wBAAA,kBAAkB,EAAE,SAAS;AAC7B,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,iBAAiB,EAAE,QAAQ;AAC3B,wBAAA,gBAAgB,EAAE,OAAO;AACzB,wBAAA,iBAAiB,EAAE,MAAM;AACzB,wBAAA,gBAAgB,EAAE,MAAM;AACxB,wBAAA,SAAS,EAAE,gBAAgB;AAC5B,qBAAA,EAAA,QAAA,EAAA,q0BAAA,EAAA,MAAA,EAAA,CAAA,i7BAAA,CAAA,EAAA;;;AE5BH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mintplayer/ng-bootstrap",
3
3
  "private": false,
4
- "version": "21.12.12",
4
+ "version": "21.13.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/MintPlayer/mintplayer-ng-bootstrap",
@@ -236,6 +236,10 @@
236
236
  "types": "./types/mintplayer-ng-bootstrap-popover.d.ts",
237
237
  "default": "./fesm2022/mintplayer-ng-bootstrap-popover.mjs"
238
238
  },
239
+ "./priority-nav": {
240
+ "types": "./types/mintplayer-ng-bootstrap-priority-nav.d.ts",
241
+ "default": "./fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs"
242
+ },
239
243
  "./progress-bar": {
240
244
  "types": "./types/mintplayer-ng-bootstrap-progress-bar.d.ts",
241
245
  "default": "./fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs"
@@ -0,0 +1,61 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
+ import { Breakpoint } from '@mintplayer/ng-bootstrap';
4
+ import { BsObserveSizeDirective } from '@mintplayer/ng-swiper/observe-size';
5
+
6
+ declare class BsPriorityNavItemDirective {
7
+ templateRef: TemplateRef<any>;
8
+ priority: _angular_core.InputSignal<number | null>;
9
+ hideBelow: _angular_core.InputSignal<Breakpoint | null>;
10
+ readonly id: number;
11
+ private static idCounter;
12
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsPriorityNavItemDirective, never>;
13
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsPriorityNavItemDirective, "[bsPriorityNavItem]", never, { "priority": { "alias": "bsPriorityNavItem"; "required": false; "isSignal": true; }; "hideBelow": { "alias": "bsPriorityNavItemHideBelow"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
14
+ }
15
+
16
+ declare class BsPriorityNavComponent {
17
+ private platformId;
18
+ private element;
19
+ isServerSide: boolean;
20
+ private static counter;
21
+ uid: string;
22
+ moreLabel: _angular_core.InputSignal<string>;
23
+ moreLabelTemplate: _angular_core.InputSignal<TemplateRef<{
24
+ $implicit: boolean;
25
+ }> | null>;
26
+ collapseAt: _angular_core.InputSignal<Breakpoint | null>;
27
+ overflowFrom: _angular_core.InputSignal<"start" | "end">;
28
+ hideEmptyMore: _angular_core.InputSignal<boolean>;
29
+ overflowChange: _angular_core.OutputEmitterRef<BsPriorityNavItemDirective[]>;
30
+ readonly items: _angular_core.Signal<readonly BsPriorityNavItemDirective[]>;
31
+ private measureSizers;
32
+ stripSizer: _angular_core.Signal<BsObserveSizeDirective | undefined>;
33
+ private stripElement;
34
+ moreSizer: _angular_core.Signal<BsObserveSizeDirective | undefined>;
35
+ isMoreOpen: _angular_core.WritableSignal<boolean>;
36
+ windowWidth: _angular_core.WritableSignal<number>;
37
+ collapseAtPx: _angular_core.Signal<0 | 1400 | 1200 | 992 | 768 | 576 | null>;
38
+ forceCollapse: _angular_core.Signal<boolean>;
39
+ overflowOrder: _angular_core.Signal<BsPriorityNavItemDirective[]>;
40
+ itemWidths: _angular_core.Signal<Map<number, number>>;
41
+ itemGap: _angular_core.Signal<number>;
42
+ overflowingIds: _angular_core.Signal<Set<number>>;
43
+ hasAnyOverflow: _angular_core.Signal<boolean>;
44
+ showMoreButton: _angular_core.Signal<boolean>;
45
+ fullyCollapsed: _angular_core.Signal<boolean>;
46
+ itemsWithMeta: _angular_core.Signal<{
47
+ item: BsPriorityNavItemDirective;
48
+ hideBelowClass: string;
49
+ hideInline: boolean;
50
+ hideInOverflow: boolean;
51
+ }[]>;
52
+ constructor();
53
+ onWindowResize(): void;
54
+ toggleMore(): void;
55
+ onEscape(): void;
56
+ onDocumentClick(event: MouseEvent): void;
57
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsPriorityNavComponent, never>;
58
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsPriorityNavComponent, "bs-priority-nav", never, { "moreLabel": { "alias": "moreLabel"; "required": false; "isSignal": true; }; "moreLabelTemplate": { "alias": "moreLabelTemplate"; "required": false; "isSignal": true; }; "collapseAt": { "alias": "collapseAt"; "required": false; "isSignal": true; }; "overflowFrom": { "alias": "overflowFrom"; "required": false; "isSignal": true; }; "hideEmptyMore": { "alias": "hideEmptyMore"; "required": false; "isSignal": true; }; }, { "overflowChange": "overflowChange"; }, ["items"], never, true, never>;
59
+ }
60
+
61
+ export { BsPriorityNavComponent, BsPriorityNavItemDirective };
@@ -33,6 +33,10 @@ declare class BsResizableComponent {
33
33
  element: ElementRef<any>;
34
34
  resizeAction?: ResizeAction;
35
35
  positioning: _angular_core.InputSignal<ResizablePositioning>;
36
+ horizontal: _angular_core.InputSignal<boolean>;
37
+ vertical: _angular_core.InputSignal<boolean>;
38
+ corners: _angular_core.InputSignal<boolean>;
39
+ showCorners: _angular_core.Signal<boolean>;
36
40
  hostPosition: _angular_core.Signal<"position-absolute" | "position-relative">;
37
41
  wrapperPosition: _angular_core.Signal<string[]>;
38
42
  readonly presetPosition: _angular_core.InputSignal<PresetPosition | undefined>;
@@ -46,7 +50,7 @@ declare class BsResizableComponent {
46
50
  left: _angular_core.WritableSignal<number | undefined>;
47
51
  top: _angular_core.WritableSignal<number | undefined>;
48
52
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsResizableComponent, never>;
49
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsResizableComponent, "bs-resizable", never, { "positioning": { "alias": "positioning"; "required": false; "isSignal": true; }; "presetPosition": { "alias": "presetPosition"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
53
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsResizableComponent, "bs-resizable", never, { "positioning": { "alias": "positioning"; "required": false; "isSignal": true; }; "horizontal": { "alias": "horizontal"; "required": false; "isSignal": true; }; "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "corners": { "alias": "corners"; "required": false; "isSignal": true; }; "presetPosition": { "alias": "presetPosition"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
50
54
  }
51
55
 
52
56
  interface PointerData {