@mintplayer/ng-bootstrap 22.31.0 → 22.33.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/README.md +12 -11
- package/_bootstrap.scss +2 -4
- package/a11y/forms/package.json +4 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs +120 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +3 -273
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +72 -139
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +34 -60
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +24 -27
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +39 -17
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +26 -6
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +4 -8
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +169 -240
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +9 -8
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +6 -8
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -40
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +316 -211
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +26 -12
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +87 -676
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +52 -119
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +16 -24
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +9 -9
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +201 -197
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +11 -19
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +64 -123
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +19 -29
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +8 -4
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +54 -35
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +72 -99
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +23 -36
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +45 -28
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +214 -19
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +27 -12
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +61 -245
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +92 -0
- package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +31 -15
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +49 -77
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +53 -393
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +11 -9
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +29 -49
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +21 -12
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +12 -12
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +27 -49
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +29 -15
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +57 -253
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +60 -335
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +48 -57
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +11 -15
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +235 -168
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +86 -44
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +80 -137
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +29 -326
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +47 -63
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -22
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +48 -171
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +12 -10
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +52 -108
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +9 -9
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +25 -11
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +37 -32
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -99
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +31 -30
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +67 -306
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +7 -9
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +14 -15
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +109 -143
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +51 -154
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +11 -13
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +160 -232
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/nav/package.json +4 -0
- package/package.json +11 -28
- package/types/mintplayer-ng-bootstrap-a11y-forms.d.ts +64 -0
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +3 -142
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +51 -86
- package/types/mintplayer-ng-bootstrap-alert.d.ts +21 -28
- package/types/mintplayer-ng-bootstrap-badge.d.ts +13 -12
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +31 -8
- package/types/mintplayer-ng-bootstrap-button-group.d.ts +15 -4
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -5
- package/types/mintplayer-ng-bootstrap-card.d.ts +102 -76
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +24 -17
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +144 -92
- package/types/mintplayer-ng-bootstrap-close.d.ts +17 -5
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +42 -226
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +35 -17
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +23 -35
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +3 -7
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +3 -5
- package/types/mintplayer-ng-bootstrap-dock.d.ts +6 -8
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +122 -54
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +10 -20
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +62 -44
- package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +12 -15
- package/types/mintplayer-ng-bootstrap-for.d.ts +5 -5
- package/types/mintplayer-ng-bootstrap-form.d.ts +33 -11
- package/types/mintplayer-ng-bootstrap-grid.d.ts +42 -21
- package/types/mintplayer-ng-bootstrap-input-group.d.ts +11 -22
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +31 -10
- package/types/mintplayer-ng-bootstrap-machine.d.ts +107 -5
- package/types/mintplayer-ng-bootstrap-marquee.d.ts +18 -5
- package/types/mintplayer-ng-bootstrap-modal.d.ts +43 -84
- package/types/mintplayer-ng-bootstrap-multi-range.d.ts +4 -6
- package/types/mintplayer-ng-bootstrap-nav.d.ts +52 -0
- package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +22 -6
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +27 -38
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +35 -112
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +5 -4
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +22 -34
- package/types/mintplayer-ng-bootstrap-parallax.d.ts +14 -4
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +6 -7
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +19 -18
- package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +22 -6
- package/types/mintplayer-ng-bootstrap-popover.d.ts +36 -59
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +80 -68
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +35 -18
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +12 -20
- package/types/mintplayer-ng-bootstrap-radio.d.ts +112 -84
- package/types/mintplayer-ng-bootstrap-range.d.ts +36 -13
- package/types/mintplayer-ng-bootstrap-rating.d.ts +33 -42
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +24 -114
- package/types/mintplayer-ng-bootstrap-ribbon.d.ts +21 -37
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +19 -27
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +26 -50
- package/types/mintplayer-ng-bootstrap-select.d.ts +9 -8
- package/types/mintplayer-ng-bootstrap-shell.d.ts +40 -63
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +5 -7
- package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -7
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +23 -13
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +61 -57
- package/types/mintplayer-ng-bootstrap-table.d.ts +23 -18
- package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +94 -154
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +23 -25
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +4 -8
- package/types/mintplayer-ng-bootstrap-toast.d.ts +94 -55
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +34 -33
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +14 -16
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -13
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +109 -133
- package/calendar-month/package.json +0 -4
- package/container/package.json +0 -4
- package/dropdown-divider/package.json +0 -4
- package/dropdown-menu/package.json +0 -4
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +0 -136
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +0 -18
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +0 -23
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +0 -161
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +0 -32
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +0 -1
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +0 -31
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +0 -1
- package/has-overlay/package.json +0 -4
- package/no-noscript/package.json +0 -4
- package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +0 -54
- package/types/mintplayer-ng-bootstrap-container.d.ts +0 -8
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -8
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +0 -94
- package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +0 -22
- package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +0 -11
|
@@ -1,362 +1,123 @@
|
|
|
1
|
-
import { isPlatformServer, DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { DEFAULT_MIN_COLUMN_WIDTH, DEFAULT_GAP, TileManagerMachine, connect, TileFlip, TILE_MANAGER_SCOPE, tileManagerScopedStyles, breakpointCss, gridPointer, readCellMetrics } from '@mintplayer/ui-core/tile-manager';
|
|
2
|
+
import { inject, TemplateRef, Directive, ElementRef, input, model, numberAttribute, booleanAttribute, output, contentChild, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { useCore, useScopedStyles, MpInstanceStyleDirective, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
5
|
+
import { tileManagerCore, tileManagerScopedStyles } from '@mintplayer/ui-core/tile-manager';
|
|
8
6
|
export { withoutNarrowerLayouts } from '@mintplayer/ui-core/tile-manager';
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* their template here, and the manager renders them into the tile's header and body. Kept per
|
|
14
|
-
* tile id, so a new tile object (a locked panel, say) updates the view instead of rebuilding it.
|
|
15
|
-
*/
|
|
16
|
-
class BsTileSlots {
|
|
17
|
-
constructor(parent) {
|
|
18
|
-
this.header = null;
|
|
19
|
-
this.content = null;
|
|
20
|
-
this.injector = Injector.create({ providers: [{ provide: BsTileSlots, useValue: this }], parent });
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Declares the markup of every tile, once, inside `<bs-tile-manager>`. The header and body are
|
|
25
|
-
* its direct `*bsTileHeader` / `*bsTileContent` children, and both see the tile variable.
|
|
26
|
-
*
|
|
27
|
-
* ```html
|
|
28
|
-
* <bs-tile-manager [(layouts)]="layouts">
|
|
29
|
-
* <ng-container *bsTile="let tile of tiles()">
|
|
30
|
-
* <span *bsTileHeader>{{ tile.title }}</span>
|
|
31
|
-
* <div *bsTileContent>{{ tile.body }}</div>
|
|
32
|
-
* </ng-container>
|
|
33
|
-
* </bs-tile-manager>
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* `of` is the manager's tile list, like `ngFor`'s: the manager reads it from here.
|
|
37
|
-
*/
|
|
38
|
-
class BsTileDirective {
|
|
8
|
+
// GENERATED from the tile-manager manifest (tile-manager) by @mintplayer/nx-component-compiler. Do not edit.
|
|
9
|
+
/** The `header` slot of `<bs-tile-manager>`: `<ng-template bsTileManagerHeader>` or `*bsTileManagerHeader`. */
|
|
10
|
+
class BsTileManagerHeaderDirective {
|
|
39
11
|
constructor() {
|
|
40
12
|
this.templateRef = inject(TemplateRef);
|
|
41
|
-
/** The visible tiles, in DOM order. */
|
|
42
|
-
this.bsTileOf = input(undefined, /* @ts-ignore */
|
|
43
|
-
...(ngDevMode ? [{ debugName: "bsTileOf" }] : /* istanbul ignore next */ []));
|
|
44
13
|
}
|
|
45
14
|
static ngTemplateContextGuard(_dir, ctx) {
|
|
46
15
|
return true;
|
|
47
16
|
}
|
|
48
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type:
|
|
49
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
18
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsTileManagerHeaderDirective, isStandalone: true, selector: "[bsTileManagerHeader]", ngImport: i0 }); }
|
|
50
19
|
}
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type:
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerHeaderDirective, decorators: [{
|
|
52
21
|
type: Directive,
|
|
53
|
-
args: [{ selector: '[
|
|
54
|
-
}]
|
|
55
|
-
/**
|
|
56
|
-
class
|
|
22
|
+
args: [{ selector: '[bsTileManagerHeader]' }]
|
|
23
|
+
}] });
|
|
24
|
+
/** The `content` slot of `<bs-tile-manager>`: `<ng-template bsTileManagerContent>` or `*bsTileManagerContent`. */
|
|
25
|
+
class BsTileManagerContentDirective {
|
|
57
26
|
constructor() {
|
|
58
|
-
|
|
27
|
+
this.templateRef = inject(TemplateRef);
|
|
59
28
|
}
|
|
60
|
-
static
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileHeaderDirective, decorators: [{
|
|
64
|
-
type: Directive,
|
|
65
|
-
args: [{ selector: '[bsTileHeader]' }]
|
|
66
|
-
}], ctorParameters: () => [] });
|
|
67
|
-
/** A tile's body. Only valid inside `*bsTile`. */
|
|
68
|
-
class BsTileContentDirective {
|
|
69
|
-
constructor() {
|
|
70
|
-
register('content');
|
|
29
|
+
static ngTemplateContextGuard(_dir, ctx) {
|
|
30
|
+
return true;
|
|
71
31
|
}
|
|
72
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type:
|
|
73
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type:
|
|
32
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
33
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsTileManagerContentDirective, isStandalone: true, selector: "[bsTileManagerContent]", ngImport: i0 }); }
|
|
74
34
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type:
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerContentDirective, decorators: [{
|
|
76
36
|
type: Directive,
|
|
77
|
-
args: [{ selector: '[
|
|
78
|
-
}]
|
|
79
|
-
function register(slot) {
|
|
80
|
-
const slots = inject(BsTileSlots);
|
|
81
|
-
const template = inject(TemplateRef);
|
|
82
|
-
slots[slot] = template;
|
|
83
|
-
inject(DestroyRef).onDestroy(() => {
|
|
84
|
-
if (slots[slot] === template)
|
|
85
|
-
slots[slot] = null;
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
|
|
37
|
+
args: [{ selector: '[bsTileManagerContent]' }]
|
|
38
|
+
}] });
|
|
89
39
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
40
|
+
* A dashboard of tiles that reflow with the board width (#440): one layout per column count,
|
|
41
|
+
* drag to move, grips to resize, and the keyboard for both (M to move, R to resize, arrows, Enter
|
|
42
|
+
* or Escape). `layouts` is two-way: a commit writes the full next record. The `header` and
|
|
43
|
+
* `content` slots render each tile; they receive the tile.
|
|
92
44
|
*
|
|
93
|
-
* The
|
|
94
|
-
*
|
|
95
|
-
* its own template from `connect()`'s bags with `[mpProps]`, measures the grid, owns pointer
|
|
96
|
-
* capture and the FLIP animation, and turns the machine's events into outputs. Tile header and
|
|
97
|
-
* body come from the `*bsTileHeader` / `*bsTileContent` templates inside one `*bsTile` block.
|
|
98
|
-
*
|
|
99
|
-
* SSR: the whole tree is rendered, plus a `<style>` in `<head>` holding the `@container` rules
|
|
100
|
-
* that place every tile at every column count (D14), so the server HTML paints the right layout
|
|
101
|
-
* with no JS. No-JS tier 2: before the first measure the tiles are named groups with no tab stop
|
|
102
|
-
* or grips.
|
|
45
|
+
* The server-rendered page places every tile at every width through container queries, with
|
|
46
|
+
* JavaScript off; editing starts once the board has measured itself.
|
|
103
47
|
*/
|
|
104
48
|
class BsTileManagerComponent {
|
|
49
|
+
#core;
|
|
105
50
|
constructor() {
|
|
106
|
-
/** The
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* The visible tiles, in DOM order: `*bsTile="let tile of tiles()"`. Read from the directive
|
|
111
|
-
* rather than pushed by it: its input is not set yet when its constructor runs, and a signal
|
|
112
|
-
* write while the view renders is NG0600.
|
|
113
|
-
*/
|
|
114
|
-
this.tiles = computed(() => this.tileTemplate()?.bsTileOf() ?? [], /* @ts-ignore */
|
|
51
|
+
/** The host element. */
|
|
52
|
+
this.elementRef = inject(ElementRef);
|
|
53
|
+
this.tiles = input([], /* @ts-ignore */
|
|
115
54
|
...(ngDevMode ? [{ debugName: "tiles" }] : /* istanbul ignore next */ []));
|
|
116
|
-
/** One layout per column count. Two-way: a commit writes the full next record. */
|
|
117
55
|
this.layouts = model({}, /* @ts-ignore */
|
|
118
56
|
...(ngDevMode ? [{ debugName: "layouts" }] : /* istanbul ignore next */ []));
|
|
119
|
-
/** Explicit `{ minWidth, columns }` map. Wins over `stackBelow` and the generated map. */
|
|
120
57
|
this.breakpoints = input(null, /* @ts-ignore */
|
|
121
58
|
...(ngDevMode ? [{ debugName: "breakpoints" }] : /* istanbul ignore next */ []));
|
|
122
|
-
|
|
123
|
-
this.
|
|
124
|
-
...(ngDevMode ?
|
|
125
|
-
/** Upper bound of the generated map when `layouts` is empty. */
|
|
126
|
-
this.maxColumns = input(6, /* @ts-ignore */
|
|
127
|
-
...(ngDevMode ? [{ debugName: "maxColumns" }] : /* istanbul ignore next */ []));
|
|
128
|
-
/** px. No column is narrower than this, except at one column. */
|
|
129
|
-
this.minColumnWidth = input(DEFAULT_MIN_COLUMN_WIDTH, /* @ts-ignore */
|
|
130
|
-
...(ngDevMode ? [{ debugName: "minColumnWidth" }] : /* istanbul ignore next */ []));
|
|
131
|
-
/** CSS length of one grid row. */
|
|
59
|
+
this.stackBelow = input(null, { ...(ngDevMode ? { debugName: "stackBelow" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
60
|
+
this.maxColumns = input(6, { ...(ngDevMode ? { debugName: "maxColumns" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
61
|
+
this.minColumnWidth = input(200, { ...(ngDevMode ? { debugName: "minColumnWidth" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
132
62
|
this.minRowHeight = input('8rem', /* @ts-ignore */
|
|
133
63
|
...(ngDevMode ? [{ debugName: "minRowHeight" }] : /* istanbul ignore next */ []));
|
|
134
|
-
|
|
135
|
-
this.gap = input(DEFAULT_GAP, /* @ts-ignore */
|
|
136
|
-
...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
|
|
64
|
+
this.gap = input(8, { ...(ngDevMode ? { debugName: "gap" } : /* istanbul ignore next */ {}), transform: (v) => numberAttribute(v) });
|
|
137
65
|
this.dragMode = input('header', /* @ts-ignore */
|
|
138
66
|
...(ngDevMode ? [{ debugName: "dragMode" }] : /* istanbul ignore next */ []));
|
|
139
67
|
this.resizeMode = input('hover', /* @ts-ignore */
|
|
140
68
|
...(ngDevMode ? [{ debugName: "resizeMode" }] : /* istanbul ignore next */ []));
|
|
141
|
-
|
|
142
|
-
this.animateReflow = input(true, /* @ts-ignore */
|
|
143
|
-
...(ngDevMode ? [{ debugName: "animateReflow" }] : /* istanbul ignore next */ []));
|
|
144
|
-
/** Accessible name of the board. A host `aria-label` / `aria-labelledby` wins. */
|
|
69
|
+
this.animateReflow = input(true, { ...(ngDevMode ? { debugName: "animateReflow" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
145
70
|
this.label = input(null, /* @ts-ignore */
|
|
146
71
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
147
|
-
/** Localized strings for the board's descriptions and announcements. */
|
|
148
72
|
this.messages = input({}, /* @ts-ignore */
|
|
149
73
|
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
150
74
|
/** Each step of a gesture or keyboard move: the layout as it would be committed. */
|
|
151
75
|
this.layoutPreview = output();
|
|
152
|
-
/** A commit
|
|
76
|
+
/** A commit: the full layouts record and the stale narrower counts. */
|
|
153
77
|
this.layoutChange = output();
|
|
78
|
+
/** The resolved column count changed. */
|
|
154
79
|
this.columnCountChange = output();
|
|
80
|
+
/** A move or resize was refused (no room, or the tile is locked). */
|
|
155
81
|
this.gestureBlocked = output();
|
|
156
|
-
this.
|
|
157
|
-
|
|
158
|
-
this.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
this.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
|
|
168
|
-
/** The `*bsTile` context per tile id, stable across change detection. */
|
|
169
|
-
this.tileContext = computed(() => new Map(this.tiles().map((t) => [t.id, { $implicit: t }])), /* @ts-ignore */
|
|
170
|
-
...(ngDevMode ? [{ debugName: "tileContext" }] : /* istanbul ignore next */ []));
|
|
171
|
-
/** Slots per tile id, kept while the id stays so the tile's view is reused, not rebuilt. */
|
|
172
|
-
this.tileSlots = linkedSignal({ ...(ngDevMode ? { debugName: "tileSlots" } : /* istanbul ignore next */ {}), source: this.tiles,
|
|
173
|
-
computation: (tiles, previous) => new Map(tiles.map((t) => [t.id, previous?.value.get(t.id) ?? new BsTileSlots(this.injector)])) });
|
|
174
|
-
// Not `.required`: the machine notifies (onChange) while effects configure it, before the view exists.
|
|
175
|
-
this.grid = viewChild('grid', /* @ts-ignore */
|
|
176
|
-
...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
|
|
177
|
-
this.host = inject(ElementRef).nativeElement;
|
|
178
|
-
this.injector = inject(Injector);
|
|
179
|
-
this.flip = new TileFlip();
|
|
180
|
-
this.lastRendered = null;
|
|
181
|
-
this.focusSeq = 0;
|
|
182
|
-
this.resizeObserver = null;
|
|
183
|
-
this.measureFrame = 0;
|
|
184
|
-
this.width = 0;
|
|
185
|
-
useScopedStyles(TILE_MANAGER_SCOPE, tileManagerScopedStyles);
|
|
186
|
-
// Inputs → machine. One effect per input, so an unrelated input change never re-pushes a
|
|
187
|
-
// stale controlled `layouts` over the layout the machine just committed (S3).
|
|
188
|
-
const forward = (key, read) => effect(() => {
|
|
189
|
-
const value = read();
|
|
190
|
-
untracked(() => this.machine.setInputs({ [key]: value }));
|
|
191
|
-
});
|
|
192
|
-
forward('tiles', this.tiles);
|
|
193
|
-
forward('breakpoints', this.breakpoints);
|
|
194
|
-
forward('stackBelow', this.stackBelow);
|
|
195
|
-
forward('maxColumns', this.maxColumns);
|
|
196
|
-
forward('minColumnWidth', this.minColumnWidth);
|
|
197
|
-
forward('minRowHeight', this.minRowHeight);
|
|
198
|
-
forward('gap', this.gap);
|
|
199
|
-
forward('dragMode', this.dragMode);
|
|
200
|
-
forward('resizeMode', this.resizeMode);
|
|
201
|
-
forward('label', this.label);
|
|
202
|
-
forward('messages', this.messages);
|
|
203
|
-
// A consumer write to [(layouts)], not the echo of our own commit.
|
|
204
|
-
effect(() => {
|
|
205
|
-
const layouts = this.layouts();
|
|
206
|
-
if (layouts !== untracked(() => this.machine.snapshot.layouts))
|
|
207
|
-
untracked(() => this.machine.setInputs({ layouts }));
|
|
208
|
-
});
|
|
209
|
-
const offEvents = this.machine.onEvent((e) => {
|
|
210
|
-
switch (e.type) {
|
|
211
|
-
case 'layoutchange': {
|
|
212
|
-
const { type: _, ...change } = e;
|
|
213
|
-
this.layouts.set(change.layouts);
|
|
214
|
-
this.layoutChange.emit(change);
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
case 'layoutpreview': {
|
|
218
|
-
const { type: _, ...change } = e;
|
|
219
|
-
this.layoutPreview.emit(change);
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
case 'columncountchange':
|
|
223
|
-
this.columnCountChange.emit({ columnCount: e.columnCount, previous: e.previous });
|
|
224
|
-
break;
|
|
225
|
-
case 'gestureblocked': {
|
|
226
|
-
const { type: _, ...blocked } = e;
|
|
227
|
-
this.gestureBlocked.emit(blocked);
|
|
228
|
-
break;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
if (isPlatformServer(inject(PLATFORM_ID))) {
|
|
233
|
-
// D14: Angular strips <style> from templates, so the container rules go into <head>.
|
|
234
|
-
const doc = inject(DOCUMENT);
|
|
235
|
-
effect(() => {
|
|
236
|
-
const css = breakpointCss(this.layouts(), this.tiles(), { breakpoints: this.breakpoints(), stackBelow: this.stackBelow(), minColumnWidth: this.minColumnWidth(), gap: this.gap(), maxColumns: this.maxColumns(), layouts: this.layouts() }, this.id);
|
|
237
|
-
writeScopedStyleTag(doc, `${TILE_MANAGER_SCOPE}-layout-${this.id}`, css);
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
// FLIP "first" runs in the store notification, before change detection writes the new positions.
|
|
241
|
-
const unsubscribe = this.machine.subscribe(() => this.onChange());
|
|
242
|
-
const onVisibilityChange = () => {
|
|
243
|
-
if (document.visibilityState === 'hidden')
|
|
244
|
-
this.machine.cancelGesture();
|
|
245
|
-
};
|
|
246
|
-
afterNextRender(() => {
|
|
247
|
-
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
248
|
-
this.observe();
|
|
249
|
-
});
|
|
250
|
-
inject(DestroyRef).onDestroy(() => {
|
|
251
|
-
unsubscribe();
|
|
252
|
-
offEvents();
|
|
253
|
-
this.resizeObserver?.disconnect();
|
|
254
|
-
if (typeof cancelAnimationFrame === 'function')
|
|
255
|
-
cancelAnimationFrame(this.measureFrame);
|
|
256
|
-
if (typeof document !== 'undefined')
|
|
257
|
-
document.removeEventListener('visibilitychange', onVisibilityChange);
|
|
258
|
-
this.machine.destroy();
|
|
259
|
-
});
|
|
82
|
+
this.headerSlot = contentChild(BsTileManagerHeaderDirective, /* @ts-ignore */
|
|
83
|
+
...(ngDevMode ? [{ debugName: "headerSlot" }] : /* istanbul ignore next */ []));
|
|
84
|
+
this.contentSlot = contentChild(BsTileManagerContentDirective, /* @ts-ignore */
|
|
85
|
+
...(ngDevMode ? [{ debugName: "contentSlot" }] : /* istanbul ignore next */ []));
|
|
86
|
+
/** The template's named slots. */
|
|
87
|
+
this.slots = computed(() => ({ header: this.headerSlot()?.templateRef, content: this.contentSlot()?.templateRef }), /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []));
|
|
89
|
+
this.#core = useCore(tileManagerCore, { inputs: () => ({ tiles: this.tiles(), layouts: this.layouts(), breakpoints: this.breakpoints(), stackBelow: this.stackBelow(), maxColumns: this.maxColumns(), minColumnWidth: this.minColumnWidth(), minRowHeight: this.minRowHeight(), gap: this.gap(), dragMode: this.dragMode(), resizeMode: this.resizeMode(), animateReflow: this.animateReflow(), label: this.label(), messages: this.messages() }), idPrefix: 'bs-tile-manager', outputs: { layoutPreview: this.layoutPreview, layoutChange: this.layoutChange, columnCountChange: this.columnCountChange, gestureBlocked: this.gestureBlocked }, hostBag: (props) => ({ ...props.view.board, 'data-mps': 'tile-manager' }), models: { layouts: this.layouts } });
|
|
90
|
+
/** The template's props. */
|
|
91
|
+
this.props = this.#core.props;
|
|
92
|
+
useScopedStyles('tile-manager', tileManagerScopedStyles);
|
|
260
93
|
}
|
|
261
|
-
/**
|
|
262
|
-
captureLayout() {
|
|
263
|
-
return
|
|
94
|
+
/** The rendered column count and its layout (the preview while editing). */
|
|
95
|
+
captureLayout(...args) {
|
|
96
|
+
return this.#core.call('captureLayout', args);
|
|
264
97
|
}
|
|
265
|
-
/**
|
|
266
|
-
resetLayout(
|
|
267
|
-
this.
|
|
98
|
+
/** Drop the stored layout of a column count, so it derives again. */
|
|
99
|
+
resetLayout(...args) {
|
|
100
|
+
return this.#core.call('resetLayout', args);
|
|
268
101
|
}
|
|
269
102
|
/** True while a pointer drag or resize is in flight. */
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
return kind === 'drag' || kind === 'resize';
|
|
273
|
-
}
|
|
274
|
-
// ---- template handlers --------------------------------------------------
|
|
275
|
-
down(e, id, part) {
|
|
276
|
-
const grid = this.grid()?.nativeElement;
|
|
277
|
-
if (!grid)
|
|
278
|
-
return;
|
|
279
|
-
const verdict = this.machine.pointerDown(id, part, gridPointer(e, grid), readCellMetrics(grid, this.machine.snapshot.columnCount));
|
|
280
|
-
if (verdict === 'capture') {
|
|
281
|
-
e.preventDefault();
|
|
282
|
-
e.currentTarget.closest('[data-tile-id]')?.setPointerCapture(e.pointerId);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
move(e) {
|
|
286
|
-
const grid = this.grid()?.nativeElement;
|
|
287
|
-
if (grid && this.machine.pointerMove(gridPointer(e, grid)) === 'capture')
|
|
288
|
-
e.currentTarget.setPointerCapture(e.pointerId);
|
|
289
|
-
}
|
|
290
|
-
key(e, id) {
|
|
291
|
-
if (this.machine.keydown(id, e.key, { shift: e.shiftKey }))
|
|
292
|
-
e.preventDefault();
|
|
293
|
-
}
|
|
294
|
-
// ---- internals ----------------------------------------------------------
|
|
295
|
-
// One observer on the grid; `measure` runs in the next frame, never inside the callback (S2).
|
|
296
|
-
observe() {
|
|
297
|
-
const grid = this.grid()?.nativeElement;
|
|
298
|
-
if (!grid || this.resizeObserver || typeof ResizeObserver === 'undefined')
|
|
299
|
-
return;
|
|
300
|
-
this.resizeObserver = new ResizeObserver((entries) => {
|
|
301
|
-
const entry = entries[entries.length - 1];
|
|
302
|
-
this.width = entry.contentBoxSize?.[0]?.inlineSize ?? entry.contentRect.width;
|
|
303
|
-
if (this.measureFrame)
|
|
304
|
-
return;
|
|
305
|
-
this.measureFrame = requestAnimationFrame(() => {
|
|
306
|
-
this.measureFrame = 0;
|
|
307
|
-
this.machine.measure(this.width);
|
|
308
|
-
});
|
|
309
|
-
});
|
|
310
|
-
this.resizeObserver.observe(grid);
|
|
311
|
-
}
|
|
312
|
-
onChange() {
|
|
313
|
-
const s = this.machine.snapshot;
|
|
314
|
-
const rendered = this.machine.rendered;
|
|
315
|
-
const grid = this.grid()?.nativeElement;
|
|
316
|
-
const reflow = rendered !== this.lastRendered && !!grid && untracked(this.animateReflow) && s.measured;
|
|
317
|
-
this.lastRendered = rendered;
|
|
318
|
-
if (reflow && grid)
|
|
319
|
-
this.flip.first(grid);
|
|
320
|
-
const wantsFocus = !!s.focusRequest && s.focusRequest.seq !== this.focusSeq;
|
|
321
|
-
if (!reflow && !wantsFocus)
|
|
322
|
-
return;
|
|
323
|
-
afterNextRender(() => {
|
|
324
|
-
const now = this.machine.snapshot;
|
|
325
|
-
if (reflow && grid)
|
|
326
|
-
this.flip.play(grid, now.gesture.kind === 'drag' ? now.gesture.tileId : null);
|
|
327
|
-
if (now.focusRequest && now.focusRequest.seq !== this.focusSeq) {
|
|
328
|
-
this.focusSeq = now.focusRequest.seq;
|
|
329
|
-
const tileId = now.focusRequest.tileId;
|
|
330
|
-
Array.from(this.host.querySelectorAll('[data-tile-id]')).find((el) => el.dataset['tileId'] === tileId)?.focus();
|
|
331
|
-
}
|
|
332
|
-
}, { injector: this.injector });
|
|
103
|
+
isGestureActive(...args) {
|
|
104
|
+
return this.#core.call('isGestureActive', args);
|
|
333
105
|
}
|
|
334
106
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
335
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTileManagerComponent, isStandalone: true, selector: "bs-tile-manager", inputs: { layouts: { classPropertyName: "layouts", publicName: "layouts", isSignal: true, isRequired: false, transformFunction: null }, breakpoints: { classPropertyName: "breakpoints", publicName: "breakpoints", isSignal: true, isRequired: false, transformFunction: null }, stackBelow: { classPropertyName: "stackBelow", publicName: "stackBelow", isSignal: true, isRequired: false, transformFunction: null }, maxColumns: { classPropertyName: "maxColumns", publicName: "maxColumns", isSignal: true, isRequired: false, transformFunction: null }, minColumnWidth: { classPropertyName: "minColumnWidth", publicName: "minColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, minRowHeight: { classPropertyName: "minRowHeight", publicName: "minRowHeight", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, dragMode: { classPropertyName: "dragMode", publicName: "dragMode", isSignal: true, isRequired: false, transformFunction: null }, resizeMode: { classPropertyName: "resizeMode", publicName: "resizeMode", isSignal: true, isRequired: false, transformFunction: null }, animateReflow: { classPropertyName: "animateReflow", publicName: "animateReflow", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { layouts: "layoutsChange", layoutPreview: "layoutPreview", layoutChange: "layoutChange", columnCountChange: "columnCountChange", gestureBlocked: "gestureBlocked" },
|
|
107
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTileManagerComponent, isStandalone: true, selector: "bs-tile-manager", inputs: { tiles: { classPropertyName: "tiles", publicName: "tiles", isSignal: true, isRequired: false, transformFunction: null }, layouts: { classPropertyName: "layouts", publicName: "layouts", isSignal: true, isRequired: false, transformFunction: null }, breakpoints: { classPropertyName: "breakpoints", publicName: "breakpoints", isSignal: true, isRequired: false, transformFunction: null }, stackBelow: { classPropertyName: "stackBelow", publicName: "stackBelow", isSignal: true, isRequired: false, transformFunction: null }, maxColumns: { classPropertyName: "maxColumns", publicName: "maxColumns", isSignal: true, isRequired: false, transformFunction: null }, minColumnWidth: { classPropertyName: "minColumnWidth", publicName: "minColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, minRowHeight: { classPropertyName: "minRowHeight", publicName: "minRowHeight", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, dragMode: { classPropertyName: "dragMode", publicName: "dragMode", isSignal: true, isRequired: false, transformFunction: null }, resizeMode: { classPropertyName: "resizeMode", publicName: "resizeMode", isSignal: true, isRequired: false, transformFunction: null }, animateReflow: { classPropertyName: "animateReflow", publicName: "animateReflow", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { layouts: "layoutsChange", layoutPreview: "layoutPreview", layoutChange: "layoutChange", columnCountChange: "columnCountChange", gestureBlocked: "gestureBlocked" }, queries: [{ propertyName: "headerSlot", first: true, predicate: BsTileManagerHeaderDirective, descendants: true, isSignal: true }, { propertyName: "contentSlot", first: true, predicate: BsTileManagerContentDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/tile-manager/src/templates/tile-manager.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<ng-container [mpInstanceStyle]=\"p_view.layoutCss\" [mpInstanceStyleName]=\"p_view.layoutCssName\" />\n<div data-mps=\"tile-manager\" [mpProps]=\"p_view.container\" [style]=\"p_view.containerStyle\">\n <div data-mps=\"tile-manager\" [mpProps]=\"p_view.grid\" [style]=\"p_view.gridStyle\">\n @for (t of p_view.tiles; track t.id) {\n <div data-mps=\"tile-manager\" [mpProps]=\"t.attrs\" [style]=\"t.style\">\n <div data-mps=\"tile-manager\" [mpProps]=\"t.header\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" [ngTemplateOutletContext]=\"{ $implicit: t.tile, tile: t.tile }\" />\n }\n </div>\n <div data-mps=\"tile-manager\" [mpProps]=\"t.content\">\n @if (slots().content; as slot_content) {\n <ng-container [ngTemplateOutlet]=\"slot_content\" [ngTemplateOutletContext]=\"{ $implicit: t.tile, tile: t.tile }\" />\n }\n </div>\n @for (g of t.grips; track g.handle) {\n <span data-mps=\"tile-manager\" [mpProps]=\"g.attrs\"></span>\n }\n </div>\n }\n </div>\n</div>\n@for (n of p_view.descriptions; track n.key) {\n <div data-mps=\"tile-manager\" [mpProps]=\"n.attrs\">\n {{ n.text }}\n </div>\n}\n<span data-mps=\"tile-manager\" [mpProps]=\"p_view.live.attrs\">\n {{ p_view.live.text }}\n</span>\n", dependencies: [{ kind: "directive", type: MpInstanceStyleDirective, selector: "ng-container[mpInstanceStyle]", inputs: ["mpInstanceStyle", "mpInstanceStyleName"] }, { kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
336
108
|
}
|
|
337
109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerComponent, decorators: [{
|
|
338
110
|
type: Component,
|
|
339
|
-
args: [{ selector: 'bs-tile-manager', imports: [
|
|
340
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
* copy on the roleless host is removed so nothing is announced twice.
|
|
346
|
-
*/
|
|
347
|
-
function takeHostAria() {
|
|
348
|
-
const host = inject(ElementRef).nativeElement;
|
|
349
|
-
const bag = Object.fromEntries(HOST_ARIA.flatMap((name) => {
|
|
350
|
-
const value = inject(new HostAttributeToken(name), { optional: true });
|
|
351
|
-
return value === null ? [] : [[name, value]];
|
|
352
|
-
}));
|
|
353
|
-
Object.keys(bag).forEach((name) => host.removeAttribute(name));
|
|
354
|
-
return bag;
|
|
355
|
-
}
|
|
111
|
+
args: [{ selector: 'bs-tile-manager', imports: [MpInstanceStyleDirective, MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/tile-manager/src/templates/tile-manager.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<ng-container [mpInstanceStyle]=\"p_view.layoutCss\" [mpInstanceStyleName]=\"p_view.layoutCssName\" />\n<div data-mps=\"tile-manager\" [mpProps]=\"p_view.container\" [style]=\"p_view.containerStyle\">\n <div data-mps=\"tile-manager\" [mpProps]=\"p_view.grid\" [style]=\"p_view.gridStyle\">\n @for (t of p_view.tiles; track t.id) {\n <div data-mps=\"tile-manager\" [mpProps]=\"t.attrs\" [style]=\"t.style\">\n <div data-mps=\"tile-manager\" [mpProps]=\"t.header\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" [ngTemplateOutletContext]=\"{ $implicit: t.tile, tile: t.tile }\" />\n }\n </div>\n <div data-mps=\"tile-manager\" [mpProps]=\"t.content\">\n @if (slots().content; as slot_content) {\n <ng-container [ngTemplateOutlet]=\"slot_content\" [ngTemplateOutletContext]=\"{ $implicit: t.tile, tile: t.tile }\" />\n }\n </div>\n @for (g of t.grips; track g.handle) {\n <span data-mps=\"tile-manager\" [mpProps]=\"g.attrs\"></span>\n }\n </div>\n }\n </div>\n</div>\n@for (n of p_view.descriptions; track n.key) {\n <div data-mps=\"tile-manager\" [mpProps]=\"n.attrs\">\n {{ n.text }}\n </div>\n}\n<span data-mps=\"tile-manager\" [mpProps]=\"p_view.live.attrs\">\n {{ p_view.live.text }}\n</span>\n" }]
|
|
112
|
+
}], ctorParameters: () => [], propDecorators: { tiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "tiles", required: false }] }], layouts: [{ type: i0.Input, args: [{ isSignal: true, alias: "layouts", required: false }] }, { type: i0.Output, args: ["layoutsChange"] }], breakpoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoints", required: false }] }], stackBelow: [{ type: i0.Input, args: [{ isSignal: true, alias: "stackBelow", required: false }] }], maxColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxColumns", required: false }] }], minColumnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minColumnWidth", required: false }] }], minRowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minRowHeight", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], dragMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragMode", required: false }] }], resizeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeMode", required: false }] }], animateReflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateReflow", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], layoutPreview: [{ type: i0.Output, args: ["layoutPreview"] }], layoutChange: [{ type: i0.Output, args: ["layoutChange"] }], columnCountChange: [{ type: i0.Output, args: ["columnCountChange"] }], gestureBlocked: [{ type: i0.Output, args: ["gestureBlocked"] }], headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTileManagerHeaderDirective), { isSignal: true }] }], contentSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTileManagerContentDirective), { isSignal: true }] }] } });
|
|
113
|
+
|
|
114
|
+
// GENERATED from the tile-manager manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
115
|
+
|
|
116
|
+
// Generated from @mintplayer/ui-core/tile-manager (#458 M4, D10).
|
|
356
117
|
|
|
357
118
|
/**
|
|
358
119
|
* Generated bundle index. Do not edit.
|
|
359
120
|
*/
|
|
360
121
|
|
|
361
|
-
export {
|
|
122
|
+
export { BsTileManagerComponent, BsTileManagerContentDirective, BsTileManagerHeaderDirective };
|
|
362
123
|
//# sourceMappingURL=mintplayer-ng-bootstrap-tile-manager.mjs.map
|