@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,175 +1,72 @@
|
|
|
1
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
2
|
-
import { ComponentPortal } from '@angular/cdk/portal';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { inject, ElementRef, input, booleanAttribute, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
3
|
+
import { useCore, useScopedStyles, MpPropsDirective, anchorElement, useOverlayComponent } from '@mintplayer/ng-bootstrap/machine';
|
|
4
|
+
import { tooltipPanelCore, tooltipScopedStyles, tooltipCore } from '@mintplayer/ui-core/tooltip';
|
|
5
|
+
import { bootstrapTransitions } from '@mintplayer/ui-core/bootstrap/transitions';
|
|
6
|
+
import { bootstrapTooltip } from '@mintplayer/ui-core/bootstrap/tooltip';
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class BsTooltipComponent {
|
|
8
|
+
// GENERATED from the tooltip manifest (tooltip-panel) by @mintplayer/nx-component-compiler. Do not edit.
|
|
9
|
+
/** Bootstrap's tooltip panel, as the tooltip directive renders it; not used on its own. */
|
|
10
|
+
class BsTooltipPanelComponent {
|
|
11
|
+
#core;
|
|
16
12
|
constructor() {
|
|
17
|
-
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
...(ngDevMode ? [{ debugName: "marginClass" }] : /* istanbul ignore next */ []));
|
|
13
|
+
/** The host element. */
|
|
14
|
+
this.elementRef = inject(ElementRef);
|
|
15
|
+
/** The panel's id, which the trigger's `aria-describedby` names. */
|
|
16
|
+
this.overlayId = input('', /* @ts-ignore */
|
|
17
|
+
...(ngDevMode ? [{ debugName: "overlayId" }] : /* istanbul ignore next */ []));
|
|
18
|
+
this.side = input('top', /* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
20
|
+
this.shown = input(false, { ...(ngDevMode ? { debugName: "shown" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
21
|
+
this.#core = useCore(tooltipPanelCore, { inputs: () => ({ overlayId: this.overlayId(), side: this.side(), shown: this.shown() }), idPrefix: 'bs-tooltip-panel', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'tooltip' }) });
|
|
22
|
+
/** The template's props. */
|
|
23
|
+
this.props = this.#core.props;
|
|
24
|
+
useScopedStyles(bootstrapTransitions.key, bootstrapTransitions.css, { order: bootstrapTransitions.order });
|
|
25
|
+
useScopedStyles(bootstrapTooltip.key, bootstrapTooltip.css, { order: bootstrapTooltip.order });
|
|
26
|
+
useScopedStyles('tooltip', tooltipScopedStyles);
|
|
32
27
|
}
|
|
33
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type:
|
|
34
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type:
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTooltipPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsTooltipPanelComponent, isStandalone: true, selector: "bs-tooltip-panel", inputs: { overlayId: { classPropertyName: "overlayId", publicName: "overlayId", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, shown: { classPropertyName: "shown", publicName: "shown", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/tooltip/src/templates/tooltip-panel.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"tooltip\" [mpProps]=\"p_view.arrow\"></div>\n<div data-mps=\"tooltip\" [mpProps]=\"p_view.inner\">\n <ng-content />\n</div>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
35
30
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type:
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTooltipPanelComponent, decorators: [{
|
|
37
32
|
type: Component,
|
|
38
|
-
args: [{ selector: 'bs-tooltip', imports: [
|
|
39
|
-
|
|
40
|
-
}, template: "<bs-has-overlay></bs-has-overlay>\n<div [@fadeInOut] class=\"tooltip position-absolute show\"\n [class]=\"[positionClass(), marginClass()]\"\n [id]=\"tooltipId\"\n role=\"tooltip\">\n <div class=\"tooltip-arrow position-absolute\" aria-hidden=\"true\"></div>\n <div class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n", styles: [":host ::ng-deep .tooltip{--bs-tooltip-zindex: 1080;--bs-tooltip-max-width: 200px;--bs-tooltip-padding-x: .5rem;--bs-tooltip-padding-y: .25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size: .875rem;--bs-tooltip-color: var(--bs-body-bg);--bs-tooltip-bg: var(--bs-emphasis-color);--bs-tooltip-border-radius: var(--bs-border-radius);--bs-tooltip-opacity: .9;--bs-tooltip-arrow-width: .8rem;--bs-tooltip-arrow-height: .4rem;z-index:var(--bs-tooltip-zindex);display:block;margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}:host ::ng-deep .tooltip.show{opacity:var(--bs-tooltip-opacity)}:host ::ng-deep .tooltip .tooltip-arrow{display:block;width:var(--bs-tooltip-arrow-width);height:var(--bs-tooltip-arrow-height)}:host ::ng-deep .tooltip .tooltip-arrow:before{position:absolute;content:\"\";border-color:transparent;border-style:solid}:host ::ng-deep .bs-tooltip-top .tooltip-arrow,:host ::ng-deep .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow{bottom:calc(-1 * var(--bs-tooltip-arrow-height))}:host ::ng-deep .bs-tooltip-top .tooltip-arrow:before,:host ::ng-deep .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow:before{top:-1px;border-width:var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-top-color:var(--bs-tooltip-bg)}:host ::ng-deep .bs-tooltip-end .tooltip-arrow,:host ::ng-deep .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow{left:calc(-1 * var(--bs-tooltip-arrow-height));width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}:host ::ng-deep .bs-tooltip-end .tooltip-arrow:before,:host ::ng-deep .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow:before{right:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height) calc(var(--bs-tooltip-arrow-width) * .5) 0;border-right-color:var(--bs-tooltip-bg)}:host ::ng-deep .bs-tooltip-bottom .tooltip-arrow,:host ::ng-deep .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow{top:calc(-1 * var(--bs-tooltip-arrow-height))}:host ::ng-deep .bs-tooltip-bottom .tooltip-arrow:before,:host ::ng-deep .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow:before{bottom:-1px;border-width:0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-bottom-color:var(--bs-tooltip-bg)}:host ::ng-deep .bs-tooltip-start .tooltip-arrow,:host ::ng-deep .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow{right:calc(-1 * var(--bs-tooltip-arrow-height));width:var(--bs-tooltip-arrow-height);height:var(--bs-tooltip-arrow-width)}:host ::ng-deep .bs-tooltip-start .tooltip-arrow:before,:host ::ng-deep .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow:before{left:-1px;border-width:calc(var(--bs-tooltip-arrow-width) * .5) 0 calc(var(--bs-tooltip-arrow-width) * .5) var(--bs-tooltip-arrow-height);border-left-color:var(--bs-tooltip-bg)}:host ::ng-deep .tooltip-inner{max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);color:var(--bs-tooltip-color);text-align:center;background-color:var(--bs-tooltip-bg);border-radius:var(--bs-tooltip-border-radius)}.tooltip.bs-tooltip-start,:host ::ng-deep .tooltip.bs-tooltip-auto[data-popper-placement^=left]{right:0}.tooltip.bs-tooltip-start,:host ::ng-deep .tooltip.bs-tooltip-auto[data-popper-placement^=left],.tooltip.bs-tooltip-end,:host ::ng-deep .tooltip.bs-tooltip-auto[data-popper-placement^=right]{transform:translateY(-50%)}.tooltip.bs-tooltip-bottom,:host ::ng-deep .tooltip.bs-tooltip-auto[data-popper-placement^=bottom]{transform:translate(-50%)}.tooltip.bs-tooltip-top,:host ::ng-deep .tooltip.bs-tooltip-auto[data-popper-placement^=top]{transform:translate(-50%) translateY(calc(-100% - .3rem))}.tooltip.bs-tooltip-bottom .tooltip-arrow,:host ::ng-deep .tooltip.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow,.tooltip.bs-tooltip-top .tooltip-arrow,:host ::ng-deep .tooltip.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow{left:50%;transform:translate(-50%)}.tooltip.bs-tooltip-start .tooltip-arrow,:host ::ng-deep .tooltip.bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow,.tooltip.bs-tooltip-end .tooltip-arrow,:host ::ng-deep .tooltip.bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow{top:50%;transform:translateY(-50%)}\n"] }]
|
|
41
|
-
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
|
|
33
|
+
args: [{ selector: 'bs-tooltip-panel', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/tooltip/src/templates/tooltip-panel.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"tooltip\" [mpProps]=\"p_view.arrow\"></div>\n<div data-mps=\"tooltip\" [mpProps]=\"p_view.inner\">\n <ng-content />\n</div>\n" }]
|
|
34
|
+
}], ctorParameters: () => [], propDecorators: { overlayId: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayId", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], shown: [{ type: i0.Input, args: [{ isSignal: true, alias: "shown", required: false }] }] } });
|
|
42
35
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
end: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },
|
|
49
|
-
};
|
|
50
|
-
/** How long the pointer may travel from the trigger into the tooltip before it hides. */
|
|
51
|
-
const TOOLTIP_HIDE_DELAY_MS = 150;
|
|
36
|
+
// GENERATED from the tooltip manifest (tooltip) by @mintplayer/nx-component-compiler. Do not edit.
|
|
37
|
+
/**
|
|
38
|
+
* A tooltip on the element: shown on hover and on focus, dismissed by Escape, hoverable (WCAG 1.4.13).
|
|
39
|
+
* While it shows, the element's `aria-describedby` names it.
|
|
40
|
+
*/
|
|
52
41
|
class BsTooltipDirective {
|
|
42
|
+
/** The element the template sits in: the trigger. */
|
|
43
|
+
#anchor;
|
|
53
44
|
constructor() {
|
|
54
|
-
|
|
55
|
-
this.
|
|
56
|
-
/** The element the
|
|
57
|
-
this
|
|
58
|
-
this.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
],
|
|
64
|
-
parent: inject(Injector),
|
|
65
|
-
}));
|
|
66
|
-
this.stackToken = null;
|
|
67
|
-
this.overlayRef = null;
|
|
68
|
-
this.bsTooltip = input('bottom', /* @ts-ignore */
|
|
69
|
-
...(ngDevMode ? [{ debugName: "bsTooltip" }] : /* istanbul ignore next */ []));
|
|
70
|
-
/**
|
|
71
|
-
* WCAG 1.4.13 "hoverable": the pointer must be able to travel INTO the
|
|
72
|
-
* tooltip (to select/zoom its text) without it vanishing. Hide on a short
|
|
73
|
-
* delay; entering the overlay cancels it, leaving the overlay hides.
|
|
74
|
-
*/
|
|
75
|
-
this.hideTimer = null;
|
|
76
|
-
const el = this.parent.nativeElement;
|
|
77
|
-
/* addEventListener rather than the on* properties the old code assigned —
|
|
78
|
-
those silently CLOBBER any handler the consumer set on their own element. */
|
|
79
|
-
// WCAG 1.4.13: content on hover must also appear on FOCUS. A keyboard user
|
|
80
|
-
// could never see these tooltips at all.
|
|
81
|
-
const listeners = [
|
|
82
|
-
['mouseenter', () => this.showTooltip()],
|
|
83
|
-
['mouseleave', () => this.scheduleHide()],
|
|
84
|
-
['focusin', () => this.showTooltip()],
|
|
85
|
-
['focusout', () => this.hideTooltip()],
|
|
86
|
-
];
|
|
87
|
-
listeners.map(([type, fn]) => el.addEventListener(type, fn));
|
|
88
|
-
inject(DestroyRef).onDestroy(() => {
|
|
89
|
-
listeners.map(([type, fn]) => el.removeEventListener(type, fn));
|
|
90
|
-
this.hideTooltip();
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
scheduleHide() {
|
|
94
|
-
this.cancelScheduledHide();
|
|
95
|
-
this.hideTimer = setTimeout(() => this.hideTooltip(), TOOLTIP_HIDE_DELAY_MS);
|
|
96
|
-
}
|
|
97
|
-
cancelScheduledHide() {
|
|
98
|
-
if (this.hideTimer !== null) {
|
|
99
|
-
clearTimeout(this.hideTimer);
|
|
100
|
-
this.hideTimer = null;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
onBlur() {
|
|
104
|
-
this.hideTooltip();
|
|
105
|
-
}
|
|
106
|
-
onEscape() {
|
|
107
|
-
if (this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {
|
|
108
|
-
this.hideTooltip();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
showTooltip() {
|
|
112
|
-
this.cancelScheduledHide();
|
|
113
|
-
if (this.overlayRef)
|
|
114
|
-
return;
|
|
115
|
-
this.overlayRef = this.overlay.create({
|
|
116
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
117
|
-
positionStrategy: this.overlay.position()
|
|
118
|
-
.flexibleConnectedTo(this.parent)
|
|
119
|
-
.withPositions([POSITIONS[this.bsTooltip()]]),
|
|
120
|
-
});
|
|
121
|
-
const component = this.overlayRef.attach(this.portal);
|
|
122
|
-
component.setInput('position', this.bsTooltip());
|
|
123
|
-
// Hoverable half of 1.4.13 — see scheduleHide().
|
|
124
|
-
this.overlayRef.overlayElement.addEventListener('mouseenter', () => this.cancelScheduledHide());
|
|
125
|
-
this.overlayRef.overlayElement.addEventListener('mouseleave', () => this.scheduleHide());
|
|
126
|
-
this.setDescribedBy(true);
|
|
127
|
-
this.stackToken = this.overlayStack.push();
|
|
128
|
-
}
|
|
129
|
-
hideTooltip() {
|
|
130
|
-
this.cancelScheduledHide();
|
|
131
|
-
if (!this.overlayRef)
|
|
132
|
-
return;
|
|
133
|
-
this.overlayRef.dispose();
|
|
134
|
-
this.overlayRef = null;
|
|
135
|
-
this.setDescribedBy(false);
|
|
136
|
-
if (this.stackToken !== null) {
|
|
137
|
-
this.overlayStack.release(this.stackToken);
|
|
138
|
-
this.stackToken = null;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Adds or removes the tooltip's id in the trigger's `aria-describedby` token list, leaving
|
|
143
|
-
* any description the consumer set (a hint, a validation message) in place.
|
|
144
|
-
*/
|
|
145
|
-
setDescribedBy(present) {
|
|
146
|
-
const el = this.parent.nativeElement;
|
|
147
|
-
const others = (el.getAttribute('aria-describedby') ?? '').split(/\s+/).filter((id) => id && id !== this.tooltipId);
|
|
148
|
-
const ids = present ? [...others, this.tooltipId] : others;
|
|
149
|
-
if (ids.length)
|
|
150
|
-
el.setAttribute('aria-describedby', ids.join(' '));
|
|
151
|
-
else
|
|
152
|
-
el.removeAttribute('aria-describedby');
|
|
45
|
+
/** The side of the element it shows on; it flips when it does not fit. */
|
|
46
|
+
this.position = input('top', { ...(ngDevMode ? { debugName: "position" } : /* istanbul ignore next */ {}), transform: (v) => (v === '' ? 'top' : v), alias: 'bsTooltip' });
|
|
47
|
+
/** The element the template sits in: the trigger. */
|
|
48
|
+
this.#anchor = anchorElement();
|
|
49
|
+
this.core = useCore(tooltipCore, { inputs: () => ({ position: this.position() }), idPrefix: 'bs-tooltip', element: this.#anchor, hostBag: (props) => props.anchor });
|
|
50
|
+
useScopedStyles(bootstrapTransitions.key, bootstrapTransitions.css, { order: bootstrapTransitions.order });
|
|
51
|
+
useScopedStyles(bootstrapTooltip.key, bootstrapTooltip.css, { order: bootstrapTooltip.order });
|
|
52
|
+
useScopedStyles('tooltip', tooltipScopedStyles);
|
|
53
|
+
useOverlayComponent(BsTooltipPanelComponent, () => this.core.props().overlay, this.#anchor);
|
|
153
54
|
}
|
|
154
55
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
155
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsTooltipDirective, isStandalone: true, selector: "
|
|
56
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsTooltipDirective, isStandalone: true, selector: "[bsTooltip]", inputs: { position: { classPropertyName: "position", publicName: "bsTooltip", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
156
57
|
}
|
|
157
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTooltipDirective, decorators: [{
|
|
158
59
|
type: Directive,
|
|
159
|
-
args: [{
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
'(document:keydown.escape)': 'onEscape()',
|
|
164
|
-
},
|
|
165
|
-
}]
|
|
166
|
-
}], ctorParameters: () => [], propDecorators: { bsTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsTooltip", required: false }] }] } });
|
|
60
|
+
args: [{ selector: '[bsTooltip]' }]
|
|
61
|
+
}], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsTooltip", required: false }] }] } });
|
|
62
|
+
|
|
63
|
+
// GENERATED from the tooltip manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
167
64
|
|
|
168
|
-
//
|
|
65
|
+
// Generated from @mintplayer/ui-core/tooltip (#458 D10).
|
|
169
66
|
|
|
170
67
|
/**
|
|
171
68
|
* Generated bundle index. Do not edit.
|
|
172
69
|
*/
|
|
173
70
|
|
|
174
|
-
export { BsTooltipDirective,
|
|
71
|
+
export { BsTooltipDirective, BsTooltipPanelComponent };
|
|
175
72
|
//# sourceMappingURL=mintplayer-ng-bootstrap-tooltip.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-tooltip.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tooltip/src/providers/tooltip-content.provider.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/providers/tooltip-id.provider.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/component/tooltip.component.html","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/directive/tooltip.directive.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/mintplayer-ng-bootstrap-tooltip.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from \"@angular/core\";\n\nexport const TOOLTIP_CONTENT = new InjectionToken<TemplateRef<any>>('TooltipContent');","import { InjectionToken } from '@angular/core';\n\n/** The dom id assigned to the rendered tooltip element so the trigger can point at it via aria-describedby. */\nexport const TOOLTIP_ID = new InjectionToken<string>('TOOLTIP_ID');\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, TemplateRef } from '@angular/core';\nimport { FadeInOutAnimation } from '@mintplayer/ng-animations';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\nimport { TOOLTIP_ID } from '../providers/tooltip-id.provider';\n\n@Component({\n selector: 'bs-tooltip',\n templateUrl: './tooltip.component.html',\n styleUrls: ['./tooltip.component.scss'],\n imports: [NgTemplateOutlet, BsHasOverlayComponent],\n animations: [FadeInOutAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.position-relative]': 'true',\n },\n})\nexport class BsTooltipComponent {\n template = inject<TemplateRef<any>>(TOOLTIP_CONTENT);\n tooltipId = inject(TOOLTIP_ID);\n\n position = input<Position>('bottom');\n\n positionClass = computed(() => `bs-tooltip-${this.position()}`);\n\n marginClass = computed(() => {\n switch (this.position()) {\n case 'start': return 'me-1';\n case 'end': return 'ms-1';\n case 'top': return 'mb-1';\n case 'bottom': return 'mt-1';\n }\n });\n}\n","<bs-has-overlay></bs-has-overlay>\n<div [@fadeInOut] class=\"tooltip position-absolute show\"\n [class]=\"[positionClass(), marginClass()]\"\n [id]=\"tooltipId\"\n role=\"tooltip\">\n <div class=\"tooltip-arrow position-absolute\" aria-hidden=\"true\"></div>\n <div class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n","import { ConnectedPosition, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, inject, input, Injector, TemplateRef } from '@angular/core';\nimport { Position } from '@mintplayer/ng-bootstrap';\nimport { BsIdService, BsOverlayStackService } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsTooltipComponent } from '../component/tooltip.component';\nimport { TOOLTIP_CONTENT } from '../providers/tooltip-content.provider';\nimport { TOOLTIP_ID } from '../providers/tooltip-id.provider';\n\n/** Where the tooltip attaches for each side of the trigger. */\nconst POSITIONS: Record<Position, ConnectedPosition> = {\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },\n start: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },\n end: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },\n};\n\n/** How long the pointer may travel from the trigger into the tooltip before it hides. */\nexport const TOOLTIP_HIDE_DELAY_MS = 150;\n\n@Directive({\n selector: '*[bsTooltip]',\n host: {\n '(window:blur)': 'onBlur()',\n '(document:keydown.escape)': 'onEscape()',\n },\n})\nexport class BsTooltipDirective {\n private readonly overlay = inject(Overlay);\n private readonly overlayStack = inject(BsOverlayStackService);\n /** The element the structural directive sits on: the tooltip's trigger. */\n private readonly parent = inject<ElementRef<HTMLElement>>(ElementRef, { host: true, skipSelf: true });\n private readonly tooltipId = inject(BsIdService).next('bs-tooltip');\n private readonly portal = new ComponentPortal(BsTooltipComponent, null, Injector.create({\n providers: [\n { provide: TOOLTIP_CONTENT, useValue: inject(TemplateRef) },\n { provide: TOOLTIP_ID, useValue: this.tooltipId },\n ],\n parent: inject(Injector),\n }));\n\n private stackToken: symbol | null = null;\n private overlayRef: OverlayRef | null = null;\n\n readonly bsTooltip = input<Position>('bottom');\n\n constructor() {\n const el = this.parent.nativeElement;\n /* addEventListener rather than the on* properties the old code assigned —\n those silently CLOBBER any handler the consumer set on their own element. */\n // WCAG 1.4.13: content on hover must also appear on FOCUS. A keyboard user\n // could never see these tooltips at all.\n const listeners: [string, () => void][] = [\n ['mouseenter', () => this.showTooltip()],\n ['mouseleave', () => this.scheduleHide()],\n ['focusin', () => this.showTooltip()],\n ['focusout', () => this.hideTooltip()],\n ];\n listeners.map(([type, fn]) => el.addEventListener(type, fn));\n inject(DestroyRef).onDestroy(() => {\n listeners.map(([type, fn]) => el.removeEventListener(type, fn));\n this.hideTooltip();\n });\n }\n\n /**\n * WCAG 1.4.13 \"hoverable\": the pointer must be able to travel INTO the\n * tooltip (to select/zoom its text) without it vanishing. Hide on a short\n * delay; entering the overlay cancels it, leaving the overlay hides.\n */\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n private scheduleHide(): void {\n this.cancelScheduledHide();\n this.hideTimer = setTimeout(() => this.hideTooltip(), TOOLTIP_HIDE_DELAY_MS);\n }\n\n private cancelScheduledHide(): void {\n if (this.hideTimer !== null) {\n clearTimeout(this.hideTimer);\n this.hideTimer = null;\n }\n }\n\n onBlur() {\n this.hideTooltip();\n }\n\n onEscape() {\n if (this.stackToken !== null && this.overlayStack.isTop(this.stackToken)) {\n this.hideTooltip();\n }\n }\n\n showTooltip() {\n this.cancelScheduledHide();\n if (this.overlayRef) return;\n\n this.overlayRef = this.overlay.create({\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n positionStrategy: this.overlay.position()\n .flexibleConnectedTo(this.parent)\n .withPositions([POSITIONS[this.bsTooltip()]]),\n });\n const component = this.overlayRef.attach<BsTooltipComponent>(this.portal);\n component.setInput('position', this.bsTooltip());\n\n // Hoverable half of 1.4.13 — see scheduleHide().\n this.overlayRef.overlayElement.addEventListener('mouseenter', () => this.cancelScheduledHide());\n this.overlayRef.overlayElement.addEventListener('mouseleave', () => this.scheduleHide());\n\n this.setDescribedBy(true);\n this.stackToken = this.overlayStack.push();\n }\n\n hideTooltip() {\n this.cancelScheduledHide();\n if (!this.overlayRef) return;\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.setDescribedBy(false);\n if (this.stackToken !== null) {\n this.overlayStack.release(this.stackToken);\n this.stackToken = null;\n }\n }\n\n /**\n * Adds or removes the tooltip's id in the trigger's `aria-describedby` token list, leaving\n * any description the consumer set (a hint, a validation message) in place.\n */\n private setDescribedBy(present: boolean) {\n const el = this.parent.nativeElement;\n const others = (el.getAttribute('aria-describedby') ?? '').split(/\\s+/).filter((id) => id && id !== this.tooltipId);\n const ids = present ? [...others, this.tooltipId] : others;\n if (ids.length) el.setAttribute('aria-describedby', ids.join(' '));\n else el.removeAttribute('aria-describedby');\n }\n}\n","export * from './directive/tooltip.directive';\n// export * from './component/tooltip.component';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAEO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAmB,gBAAgB,CAAC;;ACArF;AACO,MAAM,UAAU,GAAG,IAAI,cAAc,CAAS,YAAY,CAAC;;MCgBrD,kBAAkB,CAAA;AAX/B,IAAA,WAAA,GAAA;AAYE,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAmB,eAAe,CAAC;AACpD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC;QAE9B,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAW,QAAQ;qFAAC;QAEpC,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAA,WAAA,EAAc,IAAI,CAAC,QAAQ,EAAE,CAAA,CAAE;0FAAC;AAE/D,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;AAC1B,YAAA,QAAQ,IAAI,CAAC,QAAQ,EAAE;AACrB,gBAAA,KAAK,OAAO,EAAE,OAAO,MAAM;AAC3B,gBAAA,KAAK,KAAK,EAAE,OAAO,MAAM;AACzB,gBAAA,KAAK,KAAK,EAAE,OAAO,MAAM;AACzB,gBAAA,KAAK,QAAQ,EAA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A,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,aAAA,EAAA,UAAA,EAAA,yBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAP9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;AACJ,wBAAA,eAAe,EAAE,UAAU;AAC3B,wBAAA,2BAA2B,EAAE,YAAY;AAC1C,qBAAA;AACF,iBAAA;;;ACzBD;;ACDA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-tooltip.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tooltip/src/generated/tooltip-panel.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/generated/tooltip-panel.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/generated/tooltip.directive.generated.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/tooltip/mintplayer-ng-bootstrap-tooltip.ts"],"sourcesContent":["// GENERATED from the tooltip manifest (tooltip-panel) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, booleanAttribute, inject, input } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { tooltipPanelCore, type TooltipPanelInputs, tooltipScopedStyles } from '@mintplayer/ui-core/tooltip';\nimport { bootstrapTransitions } from '@mintplayer/ui-core/bootstrap/transitions';\nimport { bootstrapTooltip } from '@mintplayer/ui-core/bootstrap/tooltip';\n\n/** Bootstrap's tooltip panel, as the tooltip directive renders it; not used on its own. */\n@Component({\n selector: 'bs-tooltip-panel',\n templateUrl: './tooltip-panel.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTooltipPanelComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The panel's id, which the trigger's `aria-describedby` names. */\n readonly overlayId = input<TooltipPanelInputs['overlayId']>('');\n readonly side = input<TooltipPanelInputs['side']>('top');\n readonly shown = input<TooltipPanelInputs['shown'], unknown>(false, { transform: booleanAttribute });\n\n readonly #core = useCore(tooltipPanelCore, { inputs: () => ({ overlayId: this.overlayId(), side: this.side(), shown: this.shown() }), idPrefix: 'bs-tooltip-panel', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'tooltip' }) });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles(bootstrapTransitions.key, bootstrapTransitions.css, { order: bootstrapTransitions.order }); useScopedStyles(bootstrapTooltip.key, bootstrapTooltip.css, { order: bootstrapTooltip.order }); useScopedStyles('tooltip', tooltipScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/tooltip/src/templates/tooltip-panel.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"tooltip\" [mpProps]=\"p_view.arrow\"></div>\n<div data-mps=\"tooltip\" [mpProps]=\"p_view.inner\">\n <ng-content />\n</div>\n","// GENERATED from the tooltip manifest (tooltip) by @mintplayer/nx-component-compiler. Do not edit.\nimport { Directive, input } from '@angular/core';\nimport { anchorElement, useCore, useOverlayComponent, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { tooltipCore, type TooltipInputs, tooltipScopedStyles } from '@mintplayer/ui-core/tooltip';\nimport { bootstrapTransitions } from '@mintplayer/ui-core/bootstrap/transitions';\nimport { bootstrapTooltip } from '@mintplayer/ui-core/bootstrap/tooltip';\nimport { BsTooltipPanelComponent } from './tooltip-panel.component.generated';\n\n/**\n * A tooltip on the element: shown on hover and on focus, dismissed by Escape, hoverable (WCAG 1.4.13).\n * While it shows, the element's `aria-describedby` names it.\n */\n@Directive({ selector: '[bsTooltip]' })\nexport class BsTooltipDirective {\n /** The side of the element it shows on; it flips when it does not fit. */\n readonly position = input<TooltipInputs['position'], TooltipInputs['position'] | ''>('top', { transform: (v: TooltipInputs['position'] | '') => (v === '' ? 'top' : v), alias: 'bsTooltip' });\n\n /** The element the template sits in: the trigger. */\n readonly #anchor = anchorElement();\n protected readonly core = useCore(tooltipCore, { inputs: () => ({ position: this.position() }), idPrefix: 'bs-tooltip', element: this.#anchor, hostBag: (props) => props.anchor });\n\n constructor() {\n useScopedStyles(bootstrapTransitions.key, bootstrapTransitions.css, { order: bootstrapTransitions.order }); useScopedStyles(bootstrapTooltip.key, bootstrapTooltip.css, { order: bootstrapTooltip.order }); useScopedStyles('tooltip', tooltipScopedStyles);\n useOverlayComponent(BsTooltipPanelComponent, () => this.core.props().overlay, this.#anchor);\n }\n}\n","// GENERATED from the tooltip manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsTooltipPanelComponent } from './tooltip-panel.component.generated';\nexport { BsTooltipDirective } from './tooltip.directive.generated';\n","// Generated from @mintplayer/ui-core/tooltip (#458 D10).\nexport * from './generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AAOA;MAOa,uBAAuB,CAAA;AASzB,IAAA,KAAK;AAId,IAAA,WAAA,GAAA;;AAXS,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;;QAGxD,IAAA,CAAA,SAAS,GAAG,KAAK,CAAkC,EAAE;sFAAC;QACtD,IAAA,CAAA,IAAI,GAAG,KAAK,CAA6B,KAAK;iFAAC;QAC/C,IAAA,CAAA,KAAK,GAAG,KAAK,CAAuC,KAAK,6EAAI,SA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OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;AAGhL,QAAA,eAAe,CAAC,oBAAoB,CAAC,GAAG,EAAE,oBAAoB,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC;AAAE,QAAA,eAAe,CAAC,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC;AAAE,QAAA,eAAe,CAAC,SAAS,EAAE,mBAAmB,CAAC;AAC3P,QAAA,mBAAmB,CAAC,uBAAuB,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;IAC7F;8GAXW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,SAAS;mBAAC,EAAE,QAAQ,EAAE,aAAa,EAAE;;;ACZtC;;ACAA;;ACAA;;AAEG;;;;"}
|
|
@@ -29,7 +29,7 @@ class BsTreeSelectValueAccessor {
|
|
|
29
29
|
ngOnInit() {
|
|
30
30
|
// The component is created after its host directives, so it is looked up here.
|
|
31
31
|
const component = this.injector.get(BsTreeSelectComponent);
|
|
32
|
-
const sub = component.
|
|
32
|
+
const sub = component.value.subscribe((value) => {
|
|
33
33
|
if (!this.bound() || value === this.viewValue())
|
|
34
34
|
return;
|
|
35
35
|
this.viewValue.set(value);
|
|
@@ -210,16 +210,14 @@ class BsTreeSelectComponent {
|
|
|
210
210
|
...(ngDevMode ? [{ debugName: "inputLabel" }] : /* istanbul ignore next */ []));
|
|
211
211
|
this.labels = input(null, /* @ts-ignore */
|
|
212
212
|
...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
213
|
-
/** The value, after the user changed it. */
|
|
214
|
-
this.valuechange = output();
|
|
215
213
|
/** The node added or removed (neither for a clear), with the value. */
|
|
216
|
-
this.
|
|
214
|
+
this.selectionChanged = output();
|
|
217
215
|
/** The panel opened (true) or closed (false). */
|
|
218
|
-
this.
|
|
216
|
+
this.openChange = output();
|
|
219
217
|
/** A search started (an empty query restores the browse tree). */
|
|
220
|
-
this.
|
|
218
|
+
this.searchStart = output();
|
|
221
219
|
/** A provider call rejected. */
|
|
222
|
-
this.
|
|
220
|
+
this.loadError = output();
|
|
223
221
|
this.itemSlot = contentChild(BsTreeSelectItemDirective, /* @ts-ignore */
|
|
224
222
|
...(ngDevMode ? [{ debugName: "itemSlot" }] : /* istanbul ignore next */ []));
|
|
225
223
|
this.suggestionSlot = contentChild(BsTreeSelectSuggestionDirective, /* @ts-ignore */
|
|
@@ -237,7 +235,7 @@ class BsTreeSelectComponent {
|
|
|
237
235
|
/** The template's named slots. */
|
|
238
236
|
this.slots = computed(() => ({ item: this.itemSlot()?.templateRef, suggestion: this.suggestionSlot()?.templateRef, button: this.buttonSlot()?.templateRef, header: this.headerSlot()?.templateRef, footer: this.footerSlot()?.templateRef, noResults: this.noResultsSlot()?.templateRef, enterSearchTerm: this.enterSearchTermSlot()?.templateRef }), /* @ts-ignore */
|
|
239
237
|
...(ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []));
|
|
240
|
-
this.#core = useCore(treeSelectCore, { inputs: extendInputs(() => ({ provider: this.provider(), value: this.value(), mode: this.mode(), variant: this.variant(), cascadeSelect: this.cascadeSelect(), placeholder: this.placeholder(), showClear: this.showClear(), panelScrollHeight: this.panelScrollHeight(), disabled: this.disabled(), searchDebounceMs: this.searchDebounceMs(), inputLabel: this.inputLabel(), labels: this.labels() })), idPrefix: 'bs-tree-select', outputs: {
|
|
238
|
+
this.#core = useCore(treeSelectCore, { inputs: extendInputs(() => ({ provider: this.provider(), value: this.value(), mode: this.mode(), variant: this.variant(), cascadeSelect: this.cascadeSelect(), placeholder: this.placeholder(), showClear: this.showClear(), panelScrollHeight: this.panelScrollHeight(), disabled: this.disabled(), searchDebounceMs: this.searchDebounceMs(), inputLabel: this.inputLabel(), labels: this.labels() })), idPrefix: 'bs-tree-select', outputs: { selectionChanged: this.selectionChanged, openChange: this.openChange, searchStart: this.searchStart, loadError: this.loadError }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'tree-select' }), models: { value: this.value } });
|
|
241
239
|
/** The template's props. */
|
|
242
240
|
this.props = this.#core.props;
|
|
243
241
|
useScopedStyles('tree-select', treeSelectScopedStyles);
|
|
@@ -251,12 +249,12 @@ class BsTreeSelectComponent {
|
|
|
251
249
|
return this.#core.call('close', args);
|
|
252
250
|
}
|
|
253
251
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTreeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
254
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTreeSelectComponent, isStandalone: true, selector: "bs-tree-select", inputs: { provider: { classPropertyName: "provider", publicName: "provider", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, cascadeSelect: { classPropertyName: "cascadeSelect", publicName: "cascadeSelect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, panelScrollHeight: { classPropertyName: "panelScrollHeight", publicName: "panelScrollHeight", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceMs: { classPropertyName: "searchDebounceMs", publicName: "searchDebounceMs", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valuechange: "valuechange", selectionchanged: "selectionchanged", openchange: "openchange", searchstart: "searchstart", loaderror: "loaderror" }, queries: [{ propertyName: "itemSlot", first: true, predicate: BsTreeSelectItemDirective, descendants: true, isSignal: true }, { propertyName: "suggestionSlot", first: true, predicate: BsTreeSelectSuggestionDirective, descendants: true, isSignal: true }, { propertyName: "buttonSlot", first: true, predicate: BsTreeSelectButtonDirective, descendants: true, isSignal: true }, { propertyName: "headerSlot", first: true, predicate: BsTreeSelectHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerSlot", first: true, predicate: BsTreeSelectFooterDirective, descendants: true, isSignal: true }, { propertyName: "noResultsSlot", first: true, predicate: BsTreeSelectNoResultsDirective, descendants: true, isSignal: true }, { propertyName: "enterSearchTermSlot", first: true, predicate: BsTreeSelectEnterSearchTermDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: BsTreeSelectValueAccessor }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/tree-select/src/templates/tree-select.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"tree-select\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n</div>\n@if (p_view.textbox) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.control\">\n @for (chip of p_view.chips; track chip.key) {\n <span data-mps=\"tree-select\" [mpProps]=\"chip.bag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.chipLabel\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: { node: chip.node, query: p_view.query }, node: chip.node, query: p_view.query }\" />\n } @else {\n {{ chip.node.label }}\n }\n </span>\n @if (chip.remove) {\n <button data-mps=\"tree-select\" [mpProps]=\"chip.remove\">\n \u00D7\n </button>\n }\n </span>\n }\n @if (p_view.single) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.singleBag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: { node: p_view.single, query: p_view.query }, node: p_view.single, query: p_view.query }\" />\n } @else {\n {{ p_view.single.label }}\n }\n </span>\n }\n <input data-mps=\"tree-select\" [mpProps]=\"p_view.input\" [value]=\"p_view.query\">\n @if (p_view.clear) {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.clear\">\n \u00D7\n </button>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.caret\"></span>\n </div>\n} @else {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.button\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.buttonBody\">\n @if (slots().button; as slot_button) {\n <ng-container [ngTemplateOutlet]=\"slot_button\" [ngTemplateOutletContext]=\"{ $implicit: { value: p_view.value }, value: p_view.value }\" />\n } @else {\n @if (p_view.showPlaceholder) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.placeholder\">\n {{ p_view.placeholderText }}\n </span>\n }\n @for (chip of p_view.chips; track chip.key) {\n <span data-mps=\"tree-select\" [mpProps]=\"chip.bag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.chipLabel\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: { node: chip.node, query: p_view.query }, node: chip.node, query: p_view.query }\" />\n } @else {\n {{ chip.node.label }}\n }\n </span>\n </span>\n }\n @if (p_view.single) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.singleBag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: { node: p_view.single, query: p_view.query }, node: p_view.single, query: p_view.query }\" />\n } @else {\n {{ p_view.single.label }}\n }\n </span>\n }\n }\n </span>\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.caret\"></span>\n </button>\n}\n<div data-mps=\"tree-select\" [mpProps]=\"p_view.panel\">\n @if (slots().header) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.header\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" />\n }\n </div>\n }\n @if (p_view.panelSearch) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.header\">\n <input data-mps=\"tree-select\" [mpProps]=\"p_view.panelSearch\" [value]=\"p_view.query\">\n </div>\n }\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.body\" [style]=\"p_view.bodyStyle\">\n @if (p_view.noProvider) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n {{ p_view.labels.noProvider }}\n </div>\n } @else if (p_view.busy) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.spinner\"></span>\n </div>\n } @else if (p_view.noResults) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n @if (slots().noResults; as slot_noResults) {\n <ng-container [ngTemplateOutlet]=\"slot_noResults\" />\n } @else {\n {{ p_view.labels.noResults }}\n }\n </div>\n } @else if (p_view.noItems) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n @if (slots().enterSearchTerm; as slot_enterSearchTerm) {\n <ng-container [ngTemplateOutlet]=\"slot_enterSearchTerm\" />\n } @else {\n {{ p_view.labels.noItems }}\n }\n </div>\n }\n @if (p_view.showTree) {\n <ul data-mps=\"tree-select\" [mpProps]=\"p_view.tree.tree\">\n @for (row of p_view.rows; track row.key) {\n <li data-mps=\"tree-select\" [mpProps]=\"row.item\" [style]=\"row.style\">\n @if (row.error) {\n <span data-mps=\"tree-select\" [mpProps]=\"row.errorBag\">\n {{ row.error }}\n </span>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"row.chevron\">\n @if (row.loading) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.spinner\"></span>\n }\n </span>\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.body\">\n @if (row.check) {\n <span data-mps=\"tree-select\" [mpProps]=\"row.check\"></span>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.label\">\n @if (slots().suggestion; as slot_suggestion) {\n <ng-container [ngTemplateOutlet]=\"slot_suggestion\" [ngTemplateOutletContext]=\"{ $implicit: { node: row.node, query: p_view.query }, node: row.node, query: p_view.query }\" />\n } @else {\n {{ row.node.label }}\n }\n </span>\n </span>\n </li>\n }\n </ul>\n }\n </div>\n @if (p_view.loadMore) {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.loadMore\">\n @if (p_view.loadMoreBusy) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.spinner\"></span>\n } @else {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.loadMoreLabel\">\n {{ p_view.labels.loadMore }}\n </span>\n }\n </button>\n }\n @if (slots().footer) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.footer\">\n @if (slots().footer; as slot_footer) {\n <ng-container [ngTemplateOutlet]=\"slot_footer\" />\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
252
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTreeSelectComponent, isStandalone: true, selector: "bs-tree-select", inputs: { provider: { classPropertyName: "provider", publicName: "provider", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, cascadeSelect: { classPropertyName: "cascadeSelect", publicName: "cascadeSelect", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, panelScrollHeight: { classPropertyName: "panelScrollHeight", publicName: "panelScrollHeight", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, searchDebounceMs: { classPropertyName: "searchDebounceMs", publicName: "searchDebounceMs", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", selectionChanged: "selectionChanged", openChange: "openChange", searchStart: "searchStart", loadError: "loadError" }, queries: [{ propertyName: "itemSlot", first: true, predicate: BsTreeSelectItemDirective, descendants: true, isSignal: true }, { propertyName: "suggestionSlot", first: true, predicate: BsTreeSelectSuggestionDirective, descendants: true, isSignal: true }, { propertyName: "buttonSlot", first: true, predicate: BsTreeSelectButtonDirective, descendants: true, isSignal: true }, { propertyName: "headerSlot", first: true, predicate: BsTreeSelectHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerSlot", first: true, predicate: BsTreeSelectFooterDirective, descendants: true, isSignal: true }, { propertyName: "noResultsSlot", first: true, predicate: BsTreeSelectNoResultsDirective, descendants: true, isSignal: true }, { propertyName: "enterSearchTermSlot", first: true, predicate: BsTreeSelectEnterSearchTermDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: BsTreeSelectValueAccessor }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/tree-select/src/templates/tree-select.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"tree-select\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n</div>\n@if (p_view.textbox) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.control\">\n @for (chip of p_view.chips; track chip.key) {\n <span data-mps=\"tree-select\" [mpProps]=\"chip.bag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.chipLabel\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: chip.node, node: chip.node, query: p_view.query }\" />\n } @else {\n {{ chip.node.label }}\n }\n </span>\n @if (chip.remove) {\n <button data-mps=\"tree-select\" [mpProps]=\"chip.remove\">\n \u00D7\n </button>\n }\n </span>\n }\n @if (p_view.single) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.singleBag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: p_view.single, node: p_view.single, query: p_view.query }\" />\n } @else {\n {{ p_view.single.label }}\n }\n </span>\n }\n <input data-mps=\"tree-select\" [mpProps]=\"p_view.input\" [value]=\"p_view.query\">\n @if (p_view.clear) {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.clear\">\n \u00D7\n </button>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.caret\"></span>\n </div>\n} @else {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.button\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.buttonBody\">\n @if (slots().button; as slot_button) {\n <ng-container [ngTemplateOutlet]=\"slot_button\" [ngTemplateOutletContext]=\"{ $implicit: p_view.value, value: p_view.value }\" />\n } @else {\n @if (p_view.showPlaceholder) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.placeholder\">\n {{ p_view.placeholderText }}\n </span>\n }\n @for (chip of p_view.chips; track chip.key) {\n <span data-mps=\"tree-select\" [mpProps]=\"chip.bag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.chipLabel\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: chip.node, node: chip.node, query: p_view.query }\" />\n } @else {\n {{ chip.node.label }}\n }\n </span>\n </span>\n }\n @if (p_view.single) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.singleBag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: p_view.single, node: p_view.single, query: p_view.query }\" />\n } @else {\n {{ p_view.single.label }}\n }\n </span>\n }\n }\n </span>\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.caret\"></span>\n </button>\n}\n<div data-mps=\"tree-select\" [mpProps]=\"p_view.panel\">\n @if (slots().header) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.header\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" />\n }\n </div>\n }\n @if (p_view.panelSearch) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.header\">\n <input data-mps=\"tree-select\" [mpProps]=\"p_view.panelSearch\" [value]=\"p_view.query\">\n </div>\n }\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.body\" [style]=\"p_view.bodyStyle\">\n @if (p_view.noProvider) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n {{ p_view.labels.noProvider }}\n </div>\n } @else if (p_view.busy) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.spinner\"></span>\n </div>\n } @else if (p_view.noResults) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n @if (slots().noResults; as slot_noResults) {\n <ng-container [ngTemplateOutlet]=\"slot_noResults\" />\n } @else {\n {{ p_view.labels.noResults }}\n }\n </div>\n } @else if (p_view.noItems) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n @if (slots().enterSearchTerm; as slot_enterSearchTerm) {\n <ng-container [ngTemplateOutlet]=\"slot_enterSearchTerm\" />\n } @else {\n {{ p_view.labels.noItems }}\n }\n </div>\n }\n @if (p_view.showTree) {\n <ul data-mps=\"tree-select\" [mpProps]=\"p_view.tree.tree\">\n @for (row of p_view.rows; track row.key) {\n <li data-mps=\"tree-select\" [mpProps]=\"row.item\" [style]=\"row.style\">\n @if (row.error) {\n <span data-mps=\"tree-select\" [mpProps]=\"row.errorBag\">\n {{ row.error }}\n </span>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"row.chevron\">\n @if (row.loading) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.spinner\"></span>\n }\n </span>\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.body\">\n @if (row.check) {\n <span data-mps=\"tree-select\" [mpProps]=\"row.check\"></span>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.label\">\n @if (slots().suggestion; as slot_suggestion) {\n <ng-container [ngTemplateOutlet]=\"slot_suggestion\" [ngTemplateOutletContext]=\"{ $implicit: row.node, node: row.node, query: p_view.query }\" />\n } @else {\n {{ row.node.label }}\n }\n </span>\n </span>\n </li>\n }\n </ul>\n }\n </div>\n @if (p_view.loadMore) {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.loadMore\">\n @if (p_view.loadMoreBusy) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.spinner\"></span>\n } @else {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.loadMoreLabel\">\n {{ p_view.labels.loadMore }}\n </span>\n }\n </button>\n }\n @if (slots().footer) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.footer\">\n @if (slots().footer; as slot_footer) {\n <ng-container [ngTemplateOutlet]=\"slot_footer\" />\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
255
253
|
}
|
|
256
254
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTreeSelectComponent, decorators: [{
|
|
257
255
|
type: Component,
|
|
258
|
-
args: [{ selector: 'bs-tree-select', imports: [MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: hostDirectives, template: "<!-- GENERATED from libs/mintplayer-ui-core/tree-select/src/templates/tree-select.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"tree-select\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n</div>\n@if (p_view.textbox) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.control\">\n @for (chip of p_view.chips; track chip.key) {\n <span data-mps=\"tree-select\" [mpProps]=\"chip.bag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.chipLabel\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit:
|
|
259
|
-
}], ctorParameters: () => [], propDecorators: { provider: [{ type: i0.Input, args: [{ isSignal: true, alias: "provider", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], cascadeSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "cascadeSelect", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], panelScrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelScrollHeight", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], searchDebounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchDebounceMs", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }],
|
|
256
|
+
args: [{ selector: 'bs-tree-select', imports: [MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: hostDirectives, template: "<!-- GENERATED from libs/mintplayer-ui-core/tree-select/src/templates/tree-select.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"tree-select\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n</div>\n@if (p_view.textbox) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.control\">\n @for (chip of p_view.chips; track chip.key) {\n <span data-mps=\"tree-select\" [mpProps]=\"chip.bag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.chipLabel\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: chip.node, node: chip.node, query: p_view.query }\" />\n } @else {\n {{ chip.node.label }}\n }\n </span>\n @if (chip.remove) {\n <button data-mps=\"tree-select\" [mpProps]=\"chip.remove\">\n \u00D7\n </button>\n }\n </span>\n }\n @if (p_view.single) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.singleBag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: p_view.single, node: p_view.single, query: p_view.query }\" />\n } @else {\n {{ p_view.single.label }}\n }\n </span>\n }\n <input data-mps=\"tree-select\" [mpProps]=\"p_view.input\" [value]=\"p_view.query\">\n @if (p_view.clear) {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.clear\">\n \u00D7\n </button>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.caret\"></span>\n </div>\n} @else {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.button\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.buttonBody\">\n @if (slots().button; as slot_button) {\n <ng-container [ngTemplateOutlet]=\"slot_button\" [ngTemplateOutletContext]=\"{ $implicit: p_view.value, value: p_view.value }\" />\n } @else {\n @if (p_view.showPlaceholder) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.placeholder\">\n {{ p_view.placeholderText }}\n </span>\n }\n @for (chip of p_view.chips; track chip.key) {\n <span data-mps=\"tree-select\" [mpProps]=\"chip.bag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.chipLabel\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: chip.node, node: chip.node, query: p_view.query }\" />\n } @else {\n {{ chip.node.label }}\n }\n </span>\n </span>\n }\n @if (p_view.single) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.singleBag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: p_view.single, node: p_view.single, query: p_view.query }\" />\n } @else {\n {{ p_view.single.label }}\n }\n </span>\n }\n }\n </span>\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.caret\"></span>\n </button>\n}\n<div data-mps=\"tree-select\" [mpProps]=\"p_view.panel\">\n @if (slots().header) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.header\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" />\n }\n </div>\n }\n @if (p_view.panelSearch) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.header\">\n <input data-mps=\"tree-select\" [mpProps]=\"p_view.panelSearch\" [value]=\"p_view.query\">\n </div>\n }\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.body\" [style]=\"p_view.bodyStyle\">\n @if (p_view.noProvider) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n {{ p_view.labels.noProvider }}\n </div>\n } @else if (p_view.busy) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.spinner\"></span>\n </div>\n } @else if (p_view.noResults) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n @if (slots().noResults; as slot_noResults) {\n <ng-container [ngTemplateOutlet]=\"slot_noResults\" />\n } @else {\n {{ p_view.labels.noResults }}\n }\n </div>\n } @else if (p_view.noItems) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n @if (slots().enterSearchTerm; as slot_enterSearchTerm) {\n <ng-container [ngTemplateOutlet]=\"slot_enterSearchTerm\" />\n } @else {\n {{ p_view.labels.noItems }}\n }\n </div>\n }\n @if (p_view.showTree) {\n <ul data-mps=\"tree-select\" [mpProps]=\"p_view.tree.tree\">\n @for (row of p_view.rows; track row.key) {\n <li data-mps=\"tree-select\" [mpProps]=\"row.item\" [style]=\"row.style\">\n @if (row.error) {\n <span data-mps=\"tree-select\" [mpProps]=\"row.errorBag\">\n {{ row.error }}\n </span>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"row.chevron\">\n @if (row.loading) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.spinner\"></span>\n }\n </span>\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.body\">\n @if (row.check) {\n <span data-mps=\"tree-select\" [mpProps]=\"row.check\"></span>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.label\">\n @if (slots().suggestion; as slot_suggestion) {\n <ng-container [ngTemplateOutlet]=\"slot_suggestion\" [ngTemplateOutletContext]=\"{ $implicit: row.node, node: row.node, query: p_view.query }\" />\n } @else {\n {{ row.node.label }}\n }\n </span>\n </span>\n </li>\n }\n </ul>\n }\n </div>\n @if (p_view.loadMore) {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.loadMore\">\n @if (p_view.loadMoreBusy) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.spinner\"></span>\n } @else {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.loadMoreLabel\">\n {{ p_view.labels.loadMore }}\n </span>\n }\n </button>\n }\n @if (slots().footer) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.footer\">\n @if (slots().footer; as slot_footer) {\n <ng-container [ngTemplateOutlet]=\"slot_footer\" />\n }\n </div>\n }\n</div>\n" }]
|
|
257
|
+
}], ctorParameters: () => [], propDecorators: { provider: [{ type: i0.Input, args: [{ isSignal: true, alias: "provider", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], cascadeSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "cascadeSelect", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], panelScrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelScrollHeight", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], searchDebounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchDebounceMs", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], selectionChanged: [{ type: i0.Output, args: ["selectionChanged"] }], openChange: [{ type: i0.Output, args: ["openChange"] }], searchStart: [{ type: i0.Output, args: ["searchStart"] }], loadError: [{ type: i0.Output, args: ["loadError"] }], itemSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTreeSelectItemDirective), { isSignal: true }] }], suggestionSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTreeSelectSuggestionDirective), { isSignal: true }] }], buttonSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTreeSelectButtonDirective), { isSignal: true }] }], headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTreeSelectHeaderDirective), { isSignal: true }] }], footerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTreeSelectFooterDirective), { isSignal: true }] }], noResultsSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTreeSelectNoResultsDirective), { isSignal: true }] }], enterSearchTermSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTreeSelectEnterSearchTermDirective), { isSignal: true }] }] } });
|
|
260
258
|
|
|
261
259
|
// GENERATED from the tree-select manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
262
260
|
|