@mintplayer/ng-bootstrap 21.6.0 → 21.8.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/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +34 -73
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +10 -31
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +12 -29
- package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +17 -19
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +14 -41
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +47 -89
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +10 -13
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +294 -383
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +10 -44
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +16 -23
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +24 -74
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +6 -8
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +43 -73
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +8 -12
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +23 -60
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +34 -86
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +9 -12
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +35 -96
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +9 -10
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-font-color.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs +23 -26
- package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +29 -54
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +35 -67
- package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-has-property.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-in-list.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs +75 -114
- package/fesm2022/mintplayer-ng-bootstrap-instance-of.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs +16 -15
- package/fesm2022/mintplayer-ng-bootstrap-let.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-linify.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +17 -44
- package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs +12 -16
- package/fesm2022/mintplayer-ng-bootstrap-markdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +74 -160
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +25 -87
- package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +8 -9
- package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +136 -232
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs +40 -68
- package/fesm2022/mintplayer-ng-bootstrap-navigation-lock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +11 -15
- package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +70 -138
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-ordinal-number.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +5 -5
- package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +16 -39
- package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +8 -9
- package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +40 -70
- package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +28 -97
- package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +30 -58
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +10 -17
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +96 -153
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +26 -41
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +30 -61
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +59 -108
- package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +99 -131
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +63 -106
- package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +15 -33
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +16 -33
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-slugify.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-split-string.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +16 -35
- package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +39 -81
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +4 -4
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +13 -17
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +80 -154
- package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +116 -153
- package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +25 -62
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +16 -33
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-trust-html.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +13 -20
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-uc-first.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +14 -26
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-viewport.mjs +6 -9
- package/fesm2022/mintplayer-ng-bootstrap-viewport.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs +3 -4
- package/fesm2022/mintplayer-ng-bootstrap-word-count.mjs.map +1 -1
- package/package.json +4 -4
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +20 -30
- package/types/mintplayer-ng-bootstrap-alert.d.ts +3 -9
- package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +3 -10
- package/types/mintplayer-ng-bootstrap-button-type.d.ts +4 -4
- package/types/mintplayer-ng-bootstrap-card.d.ts +5 -12
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +6 -14
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +43 -54
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +2 -11
- package/types/mintplayer-ng-bootstrap-copy.d.ts +5 -7
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +7 -18
- package/types/mintplayer-ng-bootstrap-dock.d.ts +18 -31
- package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -1
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +11 -22
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +16 -28
- package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +1 -2
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +16 -27
- package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-for.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-form.d.ts +11 -20
- package/types/mintplayer-ng-bootstrap-grid.d.ts +23 -35
- package/types/mintplayer-ng-bootstrap-instance-of.d.ts +34 -41
- package/types/mintplayer-ng-bootstrap-let.d.ts +3 -2
- package/types/mintplayer-ng-bootstrap-list-group.d.ts +4 -13
- package/types/mintplayer-ng-bootstrap-modal.d.ts +13 -29
- package/types/mintplayer-ng-bootstrap-multiselect.d.ts +8 -21
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +38 -51
- package/types/mintplayer-ng-bootstrap-navigation-lock.d.ts +8 -15
- package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +20 -30
- package/types/mintplayer-ng-bootstrap-placeholder.d.ts +3 -11
- package/types/mintplayer-ng-bootstrap-popover.d.ts +18 -31
- package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +9 -27
- package/types/mintplayer-ng-bootstrap-range.d.ts +14 -22
- package/types/mintplayer-ng-bootstrap-rating.d.ts +0 -2
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +23 -32
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +3 -9
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +7 -16
- package/types/mintplayer-ng-bootstrap-searchbox.d.ts +20 -34
- package/types/mintplayer-ng-bootstrap-select.d.ts +24 -30
- package/types/mintplayer-ng-bootstrap-select2.d.ts +21 -33
- package/types/mintplayer-ng-bootstrap-shell.d.ts +12 -19
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +4 -12
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +9 -21
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-toast.d.ts +12 -20
- package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +20 -29
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +4 -24
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +13 -21
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +3 -3
- package/types/mintplayer-ng-bootstrap-user-agent.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-viewport.d.ts +2 -2
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, TemplateRef, Input, Directive,
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import * as i2 from '@mintplayer/ng-bootstrap/grid';
|
|
6
|
-
import { BsGridModule } from '@mintplayer/ng-bootstrap/grid';
|
|
7
|
-
import * as i3 from '@mintplayer/ng-bootstrap/table';
|
|
2
|
+
import { inject, TemplateRef, Input, Directive, contentChildren, computed, model, ChangeDetectionStrategy, Component, input, effect } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { BsGridComponent, BsGridRowDirective, BsGridColumnDirective } from '@mintplayer/ng-bootstrap/grid';
|
|
8
5
|
import { BsTableComponent } from '@mintplayer/ng-bootstrap/table';
|
|
9
|
-
import * as i4 from '@mintplayer/ng-bootstrap/pagination';
|
|
10
6
|
import { BsPaginationComponent } from '@mintplayer/ng-bootstrap/pagination';
|
|
11
7
|
|
|
12
8
|
class DatatableSettings {
|
|
@@ -52,14 +48,13 @@ class BsDatatableColumnDirective {
|
|
|
52
48
|
this.name = '';
|
|
53
49
|
this.sortable = true;
|
|
54
50
|
}
|
|
55
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
56
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
51
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDatatableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
52
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: BsDatatableColumnDirective, isStandalone: true, selector: "[bsDatatableColumn]", inputs: { name: ["bsDatatableColumn", "name"], sortable: ["bsDatatableColumnSortable", "sortable"] }, ngImport: i0 }); }
|
|
57
53
|
}
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDatatableColumnDirective, decorators: [{
|
|
59
55
|
type: Directive,
|
|
60
56
|
args: [{
|
|
61
57
|
selector: '[bsDatatableColumn]',
|
|
62
|
-
standalone: false,
|
|
63
58
|
}]
|
|
64
59
|
}], propDecorators: { name: [{
|
|
65
60
|
type: Input,
|
|
@@ -71,16 +66,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
71
66
|
|
|
72
67
|
class BsDatatableComponent {
|
|
73
68
|
constructor() {
|
|
74
|
-
this.
|
|
75
|
-
this.numberOfColumns = computed(() => this.
|
|
69
|
+
this.columns = contentChildren(BsDatatableColumnDirective, ...(ngDevMode ? [{ debugName: "columns" }] : []));
|
|
70
|
+
this.numberOfColumns = computed(() => this.columns().length, ...(ngDevMode ? [{ debugName: "numberOfColumns" }] : []));
|
|
76
71
|
this.settings = model(new DatatableSettings(), ...(ngDevMode ? [{ debugName: "settings" }] : []));
|
|
77
72
|
this.data = model(undefined, ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
78
73
|
}
|
|
79
|
-
set columns(value) {
|
|
80
|
-
this._columns.set([...value]);
|
|
81
|
-
}
|
|
82
74
|
get columnsArray() {
|
|
83
|
-
return this.
|
|
75
|
+
return this.columns();
|
|
84
76
|
}
|
|
85
77
|
columnHeaderClicked(column) {
|
|
86
78
|
if (column.sortable) {
|
|
@@ -109,88 +101,46 @@ class BsDatatableComponent {
|
|
|
109
101
|
currentSettings.page.selected = page;
|
|
110
102
|
this.settings.set(new DatatableSettings(currentSettings));
|
|
111
103
|
}
|
|
112
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
113
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDatatableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: BsDatatableComponent, isStandalone: true, selector: "bs-datatable", inputs: { settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { settings: "settingsChange", data: "dataChange" }, queries: [{ propertyName: "columns", predicate: BsDatatableColumnDirective, isSignal: true }], ngImport: i0, template: "<bs-table [isResponsive]=\"true\" [striped]=\"true\" [hover]=\"true\" class=\"mb-3\">\n <thead>\n <tr>\n @for (column of columnsArray; track column) {\n <th class=\"text-nowrap\"\n [class.sort]=\"column.sortable\"\n [class.sort-asc]=\"column.sortable && (settings().sortProperty === column.name) && (settings().sortDirection === 'ascending')\"\n [class.sort-desc]=\"column.sortable && (settings().sortProperty === column.name) && (settings().sortDirection === 'descending')\"\n (click)=\"columnHeaderClicked(column)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @if (!!data() && !!rowTemplate) {\n @for (item of data()!.data; track $index) {\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n }\n }\n </tbody>\n <tfoot>\n <tr>\n <td [colSpan]=\"numberOfColumns()\">\n <bs-grid [stopFullWidthAt]=\"'never'\">\n <div bsRow>\n <div [md]=\"12\">\n <bs-pagination class=\"float-start\" [pageNumbers]=\"settings().perPage.values\"\n [selectedPageNumber]=\"settings().perPage.selected\" (selectedPageNumberChange)=\"onPerPageChange($event)\"\n [showArrows]=\"false\"></bs-pagination>\n <bs-pagination class=\"float-end\" [pageNumbers]=\"settings().page.values\"\n [selectedPageNumber]=\"settings().page.selected\" (selectedPageNumberChange)=\"onPageChange($event)\"\n [showArrows]=\"true\"></bs-pagination>\n </div>\n </div>\n </bs-grid>\n </td>\n </tr>\n </tfoot>\n</bs-table>\n", styles: ["@charset \"UTF-8\";tfoot>tr>td{border-bottom:none}bs-table thead th.sort{position:relative;cursor:pointer;padding-right:2rem}bs-table thead th.sort:before,bs-table thead th.sort:after{position:absolute;display:block;opacity:.3;bottom:.5em}bs-table thead th.sort:before{content:\"\\2191\";right:1em}bs-table thead th.sort:after{content:\"\\2193\";right:.5em}bs-table thead th.sort.sort-asc:after{opacity:1}bs-table thead th.sort.sort-desc:before{opacity:1}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BsGridComponent, selector: "bs-grid", inputs: ["stopFullWidthAt"] }, { kind: "directive", type: BsGridRowDirective, selector: "[bsRow]" }, { kind: "directive", type: BsGridColumnDirective, selector: "[xxs],[xs],[sm],[md],[lg],[xl],[xxl]", inputs: ["xxs", "xs", "sm", "md", "lg", "xl", "xxl"] }, { kind: "component", type: BsTableComponent, selector: "bs-table", inputs: ["isResponsive", "striped", "hover"] }, { kind: "component", type: BsPaginationComponent, selector: "bs-pagination", inputs: ["pageNumbers", "selectedPageNumber", "numberOfBoxes", "showArrows", "size"], outputs: ["selectedPageNumberChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
114
106
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDatatableComponent, decorators: [{
|
|
116
108
|
type: Component,
|
|
117
|
-
args: [{ selector: 'bs-datatable',
|
|
118
|
-
}], propDecorators: { columns: [{
|
|
119
|
-
type: ContentChildren,
|
|
120
|
-
args: [BsDatatableColumnDirective]
|
|
121
|
-
}], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }, { type: i0.Output, args: ["settingsChange"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }, { type: i0.Output, args: ["dataChange"] }] } });
|
|
109
|
+
args: [{ selector: 'bs-datatable', imports: [NgTemplateOutlet, BsGridComponent, BsGridRowDirective, BsGridColumnDirective, BsTableComponent, BsPaginationComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<bs-table [isResponsive]=\"true\" [striped]=\"true\" [hover]=\"true\" class=\"mb-3\">\n <thead>\n <tr>\n @for (column of columnsArray; track column) {\n <th class=\"text-nowrap\"\n [class.sort]=\"column.sortable\"\n [class.sort-asc]=\"column.sortable && (settings().sortProperty === column.name) && (settings().sortDirection === 'ascending')\"\n [class.sort-desc]=\"column.sortable && (settings().sortProperty === column.name) && (settings().sortDirection === 'descending')\"\n (click)=\"columnHeaderClicked(column)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @if (!!data() && !!rowTemplate) {\n @for (item of data()!.data; track $index) {\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n }\n }\n </tbody>\n <tfoot>\n <tr>\n <td [colSpan]=\"numberOfColumns()\">\n <bs-grid [stopFullWidthAt]=\"'never'\">\n <div bsRow>\n <div [md]=\"12\">\n <bs-pagination class=\"float-start\" [pageNumbers]=\"settings().perPage.values\"\n [selectedPageNumber]=\"settings().perPage.selected\" (selectedPageNumberChange)=\"onPerPageChange($event)\"\n [showArrows]=\"false\"></bs-pagination>\n <bs-pagination class=\"float-end\" [pageNumbers]=\"settings().page.values\"\n [selectedPageNumber]=\"settings().page.selected\" (selectedPageNumberChange)=\"onPageChange($event)\"\n [showArrows]=\"true\"></bs-pagination>\n </div>\n </div>\n </bs-grid>\n </td>\n </tr>\n </tfoot>\n</bs-table>\n", styles: ["@charset \"UTF-8\";tfoot>tr>td{border-bottom:none}bs-table thead th.sort{position:relative;cursor:pointer;padding-right:2rem}bs-table thead th.sort:before,bs-table thead th.sort:after{position:absolute;display:block;opacity:.3;bottom:.5em}bs-table thead th.sort:before{content:\"\\2191\";right:1em}bs-table thead th.sort:after{content:\"\\2193\";right:.5em}bs-table thead th.sort.sort-asc:after{opacity:1}bs-table thead th.sort.sort-desc:before{opacity:1}\n"] }]
|
|
110
|
+
}], propDecorators: { columns: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsDatatableColumnDirective), { isSignal: true }] }], settings: [{ type: i0.Input, args: [{ isSignal: true, alias: "settings", required: false }] }, { type: i0.Output, args: ["settingsChange"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }, { type: i0.Output, args: ["dataChange"] }] } });
|
|
122
111
|
|
|
123
112
|
class BsRowTemplateDirective {
|
|
124
113
|
constructor() {
|
|
125
114
|
this.datatableComponent = inject(BsDatatableComponent);
|
|
126
115
|
this.templateRef = inject(TemplateRef);
|
|
116
|
+
this.bsRowTemplateOf = input(undefined, ...(ngDevMode ? [{ debugName: "bsRowTemplateOf" }] : []));
|
|
127
117
|
this.datatableComponent.rowTemplate = this.templateRef;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
effect(() => {
|
|
119
|
+
const value = this.bsRowTemplateOf();
|
|
120
|
+
this.datatableComponent.data.set(value);
|
|
121
|
+
});
|
|
131
122
|
}
|
|
132
123
|
static ngTemplateContextGuard(dir, ctx) {
|
|
133
124
|
return true;
|
|
134
125
|
}
|
|
135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
136
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsRowTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
127
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: BsRowTemplateDirective, isStandalone: true, selector: "[bsRowTemplate]", inputs: { bsRowTemplateOf: { classPropertyName: "bsRowTemplateOf", publicName: "bsRowTemplateOf", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
137
128
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsRowTemplateDirective, decorators: [{
|
|
139
130
|
type: Directive,
|
|
140
131
|
args: [{
|
|
141
132
|
selector: '[bsRowTemplate]',
|
|
142
|
-
standalone: false,
|
|
143
133
|
}]
|
|
144
|
-
}], ctorParameters: () => [], propDecorators: { bsRowTemplateOf: [{
|
|
145
|
-
type: Input
|
|
146
|
-
}] } });
|
|
134
|
+
}], ctorParameters: () => [], propDecorators: { bsRowTemplateOf: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsRowTemplateOf", required: false }] }] } });
|
|
147
135
|
class BsRowTemplateContext {
|
|
148
136
|
constructor() {
|
|
149
137
|
this.$implicit = null;
|
|
150
138
|
}
|
|
151
139
|
}
|
|
152
140
|
|
|
153
|
-
class BsDatatableModule {
|
|
154
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsDatatableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
155
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BsDatatableModule, declarations: [BsDatatableComponent,
|
|
156
|
-
BsDatatableColumnDirective,
|
|
157
|
-
BsRowTemplateDirective], imports: [AsyncPipe,
|
|
158
|
-
NgTemplateOutlet,
|
|
159
|
-
BsGridModule,
|
|
160
|
-
BsTableComponent,
|
|
161
|
-
BsPaginationComponent], exports: [BsDatatableComponent,
|
|
162
|
-
BsDatatableColumnDirective,
|
|
163
|
-
BsRowTemplateDirective] }); }
|
|
164
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsDatatableModule, imports: [BsGridModule,
|
|
165
|
-
BsTableComponent,
|
|
166
|
-
BsPaginationComponent] }); }
|
|
167
|
-
}
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsDatatableModule, decorators: [{
|
|
169
|
-
type: NgModule,
|
|
170
|
-
args: [{
|
|
171
|
-
declarations: [
|
|
172
|
-
BsDatatableComponent,
|
|
173
|
-
BsDatatableColumnDirective,
|
|
174
|
-
BsRowTemplateDirective
|
|
175
|
-
],
|
|
176
|
-
imports: [
|
|
177
|
-
AsyncPipe,
|
|
178
|
-
NgTemplateOutlet,
|
|
179
|
-
BsGridModule,
|
|
180
|
-
BsTableComponent,
|
|
181
|
-
BsPaginationComponent
|
|
182
|
-
],
|
|
183
|
-
exports: [
|
|
184
|
-
BsDatatableComponent,
|
|
185
|
-
BsDatatableColumnDirective,
|
|
186
|
-
BsRowTemplateDirective
|
|
187
|
-
]
|
|
188
|
-
}]
|
|
189
|
-
}] });
|
|
190
|
-
|
|
191
141
|
/**
|
|
192
142
|
* Generated bundle index. Do not edit.
|
|
193
143
|
*/
|
|
194
144
|
|
|
195
|
-
export { BsDatatableColumnDirective, BsDatatableComponent,
|
|
145
|
+
export { BsDatatableColumnDirective, BsDatatableComponent, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings };
|
|
196
146
|
//# sourceMappingURL=mintplayer-ng-bootstrap-datatable.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-datatable.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-settings.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-column/datatable-column.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.html","../../../../libs/mintplayer-ng-bootstrap/datatable/src/row-template/row-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable.module.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/mintplayer-ng-bootstrap-datatable.ts"],"sourcesContent":["import { PaginationRequest } from \"@mintplayer/pagination\";\n\nexport class DatatableSettings {\n constructor(data?: Partial<DatatableSettings>) {\n Object.assign(this, data);\n\n if (data && data.perPage) {\n this.perPage = data.perPage;\n } else {\n // Set default value\n this.perPage = {\n values: [10, 20, 50],\n selected: 20\n };\n }\n \n if (data && data.page) {\n this.page = data.page;\n } else {\n // Set default value\n this.page = {\n values: [1],\n selected: 1\n };\n }\n }\n\n public sortProperty = '';\n public sortDirection: 'ascending' | 'descending' = 'ascending';\n public perPage: { values: number[], selected: number };\n public page: { values: number[], selected: number };\n\n public toPagination() {\n const res = <PaginationRequest>{\n sortProperty: this.sortProperty,\n sortDirection: this.sortDirection,\n perPage: this.perPage.selected,\n page: this.page.selected\n };\n return res;\n }\n}","import { Directive, inject, Input, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[bsDatatableColumn]',\n standalone: false,\n})\nexport class BsDatatableColumnDirective {\n templateRef = inject(TemplateRef);\n @Input('bsDatatableColumn') public name = '';\n @Input('bsDatatableColumnSortable') public sortable = true;\n\n}","import { ChangeDetectionStrategy, Component, computed, ContentChildren, input, model, signal, TemplateRef } from '@angular/core';\nimport { PaginationResponse } from '@mintplayer/pagination';\nimport { DatatableSettings } from '../datatable-settings';\nimport { BsDatatableColumnDirective } from '../datatable-column/datatable-column.directive';\nimport { BsRowTemplateContext } from '../row-template/row-template.directive';\n\n\n@Component({\n selector: 'bs-datatable',\n templateUrl: './datatable.component.html',\n styleUrls: ['./datatable.component.scss'],\n standalone: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsDatatableComponent<TData> {\n\n private _columns = signal<BsDatatableColumnDirective[]>([]);\n numberOfColumns = computed(() => this._columns().length);\n\n @ContentChildren(BsDatatableColumnDirective) set columns(value: BsDatatableColumnDirective[]) {\n this._columns.set([...value]);\n }\n get columnsArray() {\n return this._columns();\n }\n\n settings = model<DatatableSettings>(new DatatableSettings());\n data = model<PaginationResponse<TData> | undefined>(undefined);\n\n rowTemplate?: TemplateRef<BsRowTemplateContext<TData>>;\n\n columnHeaderClicked(column: BsDatatableColumnDirective) {\n if (column.sortable) {\n const currentSettings = this.settings();\n if (currentSettings.sortProperty !== column.name) {\n currentSettings.sortProperty = column.name;\n currentSettings.sortDirection = 'ascending';\n } else if (currentSettings.sortDirection === 'descending') {\n currentSettings.sortDirection = 'ascending';\n } else {\n currentSettings.sortDirection = 'descending';\n }\n this.settings.set(new DatatableSettings(currentSettings));\n }\n }\n\n onPerPageChange(perPage: number) {\n const currentSettings = this.settings();\n currentSettings.perPage.selected = perPage;\n currentSettings.page.selected = 1;\n this.settings.set(new DatatableSettings(currentSettings));\n }\n\n onPageChange(page: number) {\n const currentSettings = this.settings();\n currentSettings.page.selected = page;\n this.settings.set(new DatatableSettings(currentSettings));\n }\n\n}\n","<bs-table [isResponsive]=\"true\" [striped]=\"true\" [hover]=\"true\" class=\"mb-3\">\n <thead>\n <tr>\n @for (column of columnsArray; track column) {\n <th class=\"text-nowrap\"\n [class.sort]=\"column.sortable\"\n [class.sort-asc]=\"column.sortable && (settings().sortProperty === column.name) && (settings().sortDirection === 'ascending')\"\n [class.sort-desc]=\"column.sortable && (settings().sortProperty === column.name) && (settings().sortDirection === 'descending')\"\n (click)=\"columnHeaderClicked(column)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @if (!!data() && !!rowTemplate) {\n @for (item of data()!.data; track $index) {\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n }\n }\n </tbody>\n <tfoot>\n <tr>\n <td [colSpan]=\"numberOfColumns()\">\n <bs-grid [stopFullWidthAt]=\"'never'\">\n <div bsRow>\n <div [md]=\"12\">\n <bs-pagination class=\"float-start\" [pageNumbers]=\"settings().perPage.values\"\n [selectedPageNumber]=\"settings().perPage.selected\" (selectedPageNumberChange)=\"onPerPageChange($event)\"\n [showArrows]=\"false\"></bs-pagination>\n <bs-pagination class=\"float-end\" [pageNumbers]=\"settings().page.values\"\n [selectedPageNumber]=\"settings().page.selected\" (selectedPageNumberChange)=\"onPageChange($event)\"\n [showArrows]=\"true\"></bs-pagination>\n </div>\n </div>\n </bs-grid>\n </td>\n </tr>\n </tfoot>\n</bs-table>\n","import { Directive, inject, Input, TemplateRef } from '@angular/core';\nimport { PaginationResponse } from '@mintplayer/pagination';\nimport { BsDatatableComponent } from '../datatable/datatable.component';\n\n@Directive({\n selector: '[bsRowTemplate]',\n standalone: false,\n})\nexport class BsRowTemplateDirective<TData> {\n\n private datatableComponent = inject<BsDatatableComponent<TData>>(BsDatatableComponent);\n private templateRef = inject<TemplateRef<BsRowTemplateContext<TData>>>(TemplateRef);\n\n constructor() {\n this.datatableComponent.rowTemplate = this.templateRef;\n }\n\n @Input() set bsRowTemplateOf(value: PaginationResponse<TData> | undefined) {\n this.datatableComponent.data.set(value);\n }\n \n public static ngTemplateContextGuard<TData>(\n dir: BsRowTemplateDirective<TData>,\n ctx: any\n ): ctx is BsRowTemplateContext<Exclude<TData, false | 0 | '' | null | undefined>> {\n return true;\n }\n}\n\nexport class BsRowTemplateContext<TData = unknown> {\n public $implicit: TData = null!;\n}","import { NgModule } from '@angular/core';\nimport { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport { BsGridModule } from '@mintplayer/ng-bootstrap/grid';\nimport { BsTableComponent } from '@mintplayer/ng-bootstrap/table';\nimport { BsPaginationComponent } from '@mintplayer/ng-bootstrap/pagination';\nimport { BsDatatableComponent } from './datatable/datatable.component';\nimport { BsDatatableColumnDirective } from './datatable-column/datatable-column.directive';\nimport { BsRowTemplateDirective } from './row-template/row-template.directive';\n\n@NgModule({\n declarations: [\n BsDatatableComponent,\n BsDatatableColumnDirective,\n BsRowTemplateDirective\n ],\n imports: [\n AsyncPipe,\n NgTemplateOutlet,\n BsGridModule,\n BsTableComponent,\n BsPaginationComponent\n ],\n exports: [\n BsDatatableComponent,\n BsDatatableColumnDirective,\n BsRowTemplateDirective\n ]\n})\nexport class BsDatatableModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAEa,iBAAiB,CAAA;AAC1B,IAAA,WAAA,CAAY,IAAiC,EAAA;QAwBtC,IAAA,CAAA,YAAY,GAAG,EAAE;QACjB,IAAA,CAAA,aAAa,GAA+B,WAAW;AAxB1D,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;AAEzB,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE;AACtB,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO;QAC/B;aAAO;;YAEH,IAAI,CAAC,OAAO,GAAG;AACX,gBAAA,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AACpB,gBAAA,QAAQ,EAAE;aACb;QACL;AAEA,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;AACnB,YAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;QACzB;aAAO;;YAEH,IAAI,CAAC,IAAI,GAAG;gBACR,MAAM,EAAE,CAAC,CAAC,CAAC;AACX,gBAAA,QAAQ,EAAE;aACb;QACL;IACJ;IAOO,YAAY,GAAA;AACf,QAAA,MAAM,GAAG,GAAsB;YAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,aAAa,EAAE,IAAI,CAAC,aAAa;AACjC,YAAA,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;AAC9B,YAAA,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;SACnB;AACD,QAA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YAV1B,YAAY;YACZ,gBAAgB;YAChB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;2FAQZ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAnB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;wBACpB,0BAA0B;wBAC1B;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,SAAS;wBACT,gBAAgB;wBAChB,YAAY;wBACZ,gBAAgB;wBAChB;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,0BAA0B;wBAC1B;AACD;AACF,iBAAA;;;AC3BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-datatable.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-settings.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-column/datatable-column.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.html","../../../../libs/mintplayer-ng-bootstrap/datatable/src/row-template/row-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/mintplayer-ng-bootstrap-datatable.ts"],"sourcesContent":["import { PaginationRequest } from \"@mintplayer/pagination\";\n\nexport class DatatableSettings {\n constructor(data?: Partial<DatatableSettings>) {\n Object.assign(this, data);\n\n if (data && data.perPage) {\n this.perPage = data.perPage;\n } else {\n // Set default value\n this.perPage = {\n values: [10, 20, 50],\n selected: 20\n };\n }\n \n if (data && data.page) {\n this.page = data.page;\n } else {\n // Set default value\n this.page = {\n values: [1],\n selected: 1\n };\n }\n }\n\n public sortProperty = '';\n public sortDirection: 'ascending' | 'descending' = 'ascending';\n public perPage: { values: number[], selected: number };\n public page: { values: number[], selected: number };\n\n public toPagination() {\n const res = <PaginationRequest>{\n sortProperty: this.sortProperty,\n sortDirection: this.sortDirection,\n perPage: this.perPage.selected,\n page: this.page.selected\n };\n return res;\n }\n}","import { Directive, inject, Input, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[bsDatatableColumn]',\n})\nexport class BsDatatableColumnDirective {\n templateRef = inject(TemplateRef);\n @Input('bsDatatableColumn') public name = '';\n @Input('bsDatatableColumnSortable') public sortable = true;\n\n}","import { ChangeDetectionStrategy, Component, computed, contentChildren, input, model, TemplateRef } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { PaginationResponse } from '@mintplayer/pagination';\nimport { BsGridComponent, BsGridRowDirective, BsGridColumnDirective } from '@mintplayer/ng-bootstrap/grid';\nimport { BsTableComponent } from '@mintplayer/ng-bootstrap/table';\nimport { BsPaginationComponent } from '@mintplayer/ng-bootstrap/pagination';\nimport { DatatableSettings } from '../datatable-settings';\nimport { BsDatatableColumnDirective } from '../datatable-column/datatable-column.directive';\nimport { BsRowTemplateContext } from '../row-template/row-template.directive';\n\n\n@Component({\n selector: 'bs-datatable',\n templateUrl: './datatable.component.html',\n styleUrls: ['./datatable.component.scss'],\n imports: [NgTemplateOutlet, BsGridComponent, BsGridRowDirective, BsGridColumnDirective, BsTableComponent, BsPaginationComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsDatatableComponent<TData> {\n\n readonly columns = contentChildren(BsDatatableColumnDirective);\n numberOfColumns = computed(() => this.columns().length);\n\n get columnsArray() {\n return this.columns();\n }\n\n settings = model<DatatableSettings>(new DatatableSettings());\n data = model<PaginationResponse<TData> | undefined>(undefined);\n\n rowTemplate?: TemplateRef<BsRowTemplateContext<TData>>;\n\n columnHeaderClicked(column: BsDatatableColumnDirective) {\n if (column.sortable) {\n const currentSettings = this.settings();\n if (currentSettings.sortProperty !== column.name) {\n currentSettings.sortProperty = column.name;\n currentSettings.sortDirection = 'ascending';\n } else if (currentSettings.sortDirection === 'descending') {\n currentSettings.sortDirection = 'ascending';\n } else {\n currentSettings.sortDirection = 'descending';\n }\n this.settings.set(new DatatableSettings(currentSettings));\n }\n }\n\n onPerPageChange(perPage: number) {\n const currentSettings = this.settings();\n currentSettings.perPage.selected = perPage;\n currentSettings.page.selected = 1;\n this.settings.set(new DatatableSettings(currentSettings));\n }\n\n onPageChange(page: number) {\n const currentSettings = this.settings();\n currentSettings.page.selected = page;\n this.settings.set(new DatatableSettings(currentSettings));\n }\n\n}\n","<bs-table [isResponsive]=\"true\" [striped]=\"true\" [hover]=\"true\" class=\"mb-3\">\n <thead>\n <tr>\n @for (column of columnsArray; track column) {\n <th class=\"text-nowrap\"\n [class.sort]=\"column.sortable\"\n [class.sort-asc]=\"column.sortable && (settings().sortProperty === column.name) && (settings().sortDirection === 'ascending')\"\n [class.sort-desc]=\"column.sortable && (settings().sortProperty === column.name) && (settings().sortDirection === 'descending')\"\n (click)=\"columnHeaderClicked(column)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @if (!!data() && !!rowTemplate) {\n @for (item of data()!.data; track $index) {\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n }\n }\n </tbody>\n <tfoot>\n <tr>\n <td [colSpan]=\"numberOfColumns()\">\n <bs-grid [stopFullWidthAt]=\"'never'\">\n <div bsRow>\n <div [md]=\"12\">\n <bs-pagination class=\"float-start\" [pageNumbers]=\"settings().perPage.values\"\n [selectedPageNumber]=\"settings().perPage.selected\" (selectedPageNumberChange)=\"onPerPageChange($event)\"\n [showArrows]=\"false\"></bs-pagination>\n <bs-pagination class=\"float-end\" [pageNumbers]=\"settings().page.values\"\n [selectedPageNumber]=\"settings().page.selected\" (selectedPageNumberChange)=\"onPageChange($event)\"\n [showArrows]=\"true\"></bs-pagination>\n </div>\n </div>\n </bs-grid>\n </td>\n </tr>\n </tfoot>\n</bs-table>\n","import { Directive, effect, inject, input, TemplateRef } from '@angular/core';\nimport { PaginationResponse } from '@mintplayer/pagination';\nimport { BsDatatableComponent } from '../datatable/datatable.component';\n\n@Directive({\n selector: '[bsRowTemplate]',\n})\nexport class BsRowTemplateDirective<TData> {\n\n private datatableComponent = inject<BsDatatableComponent<TData>>(BsDatatableComponent);\n private templateRef = inject<TemplateRef<BsRowTemplateContext<TData>>>(TemplateRef);\n\n constructor() {\n this.datatableComponent.rowTemplate = this.templateRef;\n\n effect(() => {\n const value = this.bsRowTemplateOf();\n this.datatableComponent.data.set(value);\n });\n }\n\n readonly bsRowTemplateOf = input<PaginationResponse<TData> | undefined>(undefined);\n\n public static ngTemplateContextGuard<TData>(\n dir: BsRowTemplateDirective<TData>,\n ctx: any\n ): ctx is BsRowTemplateContext<Exclude<TData, false | 0 | '' | null | undefined>> {\n return true;\n }\n}\n\nexport class BsRowTemplateContext<TData = unknown> {\n public $implicit: TData = null!;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAEa,iBAAiB,CAAA;AAC1B,IAAA,WAAA,CAAY,IAAiC,EAAA;QAwBtC,IAAA,CAAA,YAAY,GAAG,EAAE;QACjB,IAAA,CAAA,aAAa,GAA+B,WAAW;AAxB1D,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;AAEzB,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE;AACtB,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO;QAC/B;aAAO;;YAEH,IAAI,CAAC,OAAO,GAAG;AACX,gBAAA,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AACpB,gBAAA,QAAQ,EAAE;aACb;QACL;AAEA,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE;AACnB,YAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI;QACzB;aAAO;;YAEH,IAAI,CAAC,IAAI,GAAG;gBACR,MAAM,EAAE,CAAC,CAAC,CAAC;AACX,gBAAA,QAAQ,EAAE;a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AAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC5B,iBAAA;;MAyBY,oBAAoB,CAAA;AAAjC,IAAA,WAAA,GAAA;QACS,IAAA,CAAA,SAAS,GAAU,IAAK;IACjC;AAAC;;ACjCD;;AAEG;;;;"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { DatePipe } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { model, input, Component } from '@angular/core';
|
|
3
|
+
import { model, input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { Color } from '@mintplayer/ng-bootstrap';
|
|
5
5
|
import { BsButtonTypeDirective } from '@mintplayer/ng-bootstrap/button-type';
|
|
6
6
|
import { BsCalendarComponent } from '@mintplayer/ng-bootstrap/calendar';
|
|
7
|
-
import
|
|
8
|
-
import { BsDropdownModule } from '@mintplayer/ng-bootstrap/dropdown';
|
|
9
|
-
import * as i2 from '@mintplayer/ng-bootstrap/has-overlay';
|
|
7
|
+
import { BsDropdownDirective, BsDropdownToggleDirective, BsDropdownMenuDirective } from '@mintplayer/ng-bootstrap/dropdown';
|
|
10
8
|
import { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';
|
|
11
9
|
|
|
12
10
|
class BsDatepickerComponent {
|
|
@@ -16,12 +14,12 @@ class BsDatepickerComponent {
|
|
|
16
14
|
this.currentMonth = model(new Date(), ...(ngDevMode ? [{ debugName: "currentMonth" }] : []));
|
|
17
15
|
this.disableDateFn = input(undefined, ...(ngDevMode ? [{ debugName: "disableDateFn" }] : []));
|
|
18
16
|
}
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: BsDatepickerComponent, isStandalone: true, selector: "bs-datepicker", inputs: { selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: false, transformFunction: null }, currentMonth: { classPropertyName: "currentMonth", publicName: "currentMonth", isSignal: true, isRequired: false, transformFunction: null }, disableDateFn: { classPropertyName: "disableDateFn", publicName: "disableDateFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedDate: "selectedDateChange", currentMonth: "currentMonthChange" }, ngImport: i0, template: "<!-- <bs-dropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\"></bs-dropdown> -->\n<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle [color]=\"colors.primary\">{{ selectedDate() | date }}</button>\n <bs-has-overlay></bs-has-overlay>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\" [disableDateFn]=\"disableDateFn()\"></bs-calendar>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "component", type: BsCalendarComponent, selector: "bs-calendar", inputs: ["currentMonth", "selectedDate", "disableDateFn"], outputs: ["currentMonthChange", "selectedDateChange"] }, { kind: "directive", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "sameDropdownWidth", "isOpen"], outputs: ["isOpenChange"] }, { kind: "directive", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { kind: "directive", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { kind: "directive", type: BsButtonTypeDirective, selector: "button[color],input[type=\"button\"][color],input[type=\"submit\"][color],a[color]", inputs: ["color"] }, { kind: "component", type: BsHasOverlayComponent, selector: "bs-has-overlay" }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21
19
|
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDatepickerComponent, decorators: [{
|
|
23
21
|
type: Component,
|
|
24
|
-
args: [{ selector: 'bs-datepicker',
|
|
22
|
+
args: [{ selector: 'bs-datepicker', imports: [DatePipe, BsCalendarComponent, BsDropdownDirective, BsDropdownToggleDirective, BsDropdownMenuDirective, BsButtonTypeDirective, BsHasOverlayComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- <bs-dropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\"></bs-dropdown> -->\n<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle [color]=\"colors.primary\">{{ selectedDate() | date }}</button>\n <bs-has-overlay></bs-has-overlay>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\" [disableDateFn]=\"disableDateFn()\"></bs-calendar>\n </div>\n</div>" }]
|
|
25
23
|
}], propDecorators: { selectedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedDate", required: false }] }, { type: i0.Output, args: ["selectedDateChange"] }], currentMonth: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentMonth", required: false }] }, { type: i0.Output, args: ["currentMonthChange"] }], disableDateFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDateFn", required: false }] }] } });
|
|
26
24
|
|
|
27
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-datepicker.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datepicker/src/datepicker.component.ts","../../../../libs/mintplayer-ng-bootstrap/datepicker/src/datepicker.component.html","../../../../libs/mintplayer-ng-bootstrap/datepicker/mintplayer-ng-bootstrap-datepicker.ts"],"sourcesContent":["import { DatePipe } from '@angular/common';\nimport { Component, input, model } from '@angular/core';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { BsButtonTypeDirective } from '@mintplayer/ng-bootstrap/button-type';\nimport { BsCalendarComponent } from '@mintplayer/ng-bootstrap/calendar';\nimport {
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-datepicker.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datepicker/src/datepicker.component.ts","../../../../libs/mintplayer-ng-bootstrap/datepicker/src/datepicker.component.html","../../../../libs/mintplayer-ng-bootstrap/datepicker/mintplayer-ng-bootstrap-datepicker.ts"],"sourcesContent":["import { DatePipe } from '@angular/common';\nimport { Component, input, model, ChangeDetectionStrategy} from '@angular/core';\nimport { Color } from '@mintplayer/ng-bootstrap';\nimport { BsButtonTypeDirective } from '@mintplayer/ng-bootstrap/button-type';\nimport { BsCalendarComponent } from '@mintplayer/ng-bootstrap/calendar';\nimport { BsDropdownDirective, BsDropdownToggleDirective, BsDropdownMenuDirective } from '@mintplayer/ng-bootstrap/dropdown';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\n\n@Component({\n selector: 'bs-datepicker',\n templateUrl: './datepicker.component.html',\n styleUrls: ['./datepicker.component.scss'],\n imports: [DatePipe, BsCalendarComponent, BsDropdownDirective, BsDropdownToggleDirective, BsDropdownMenuDirective, BsButtonTypeDirective, BsHasOverlayComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsDatepickerComponent {\n\n colors = Color;\n\n selectedDate = model<Date>(new Date());\n currentMonth = model<Date>(new Date());\n disableDateFn = input<((date: Date) => boolean) | undefined>(undefined);\n\n}\n","<!-- <bs-dropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\"></bs-dropdown> -->\n<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle [color]=\"colors.primary\">{{ selectedDate() | date }}</button>\n <bs-has-overlay></bs-has-overlay>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\" [disableDateFn]=\"disableDateFn()\"></bs-calendar>\n </div>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAea,qBAAqB,CAAA;AAPlC,IAAA,WAAA,GAAA;QASE,IAAA,CAAA,MAAM,GAAG,KAAK;AAEd,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAO,IAAI,IAAI,EAAE,wDAAC;AACtC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAO,IAAI,IAAI,EAAE,wDAAC;AACtC,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAwC,SAAS,yDAAC;AAExE,IAAA;8GARY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA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;AAEG;;;;"}
|
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
2
|
+
import { input, viewChild, TemplateRef, ChangeDetectionStrategy, Component, output, signal, contentChildren, inject, effect, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
3
|
+
import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
5
4
|
|
|
6
5
|
class BsDockPaneComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.name = input.required(...(ngDevMode ? [{ debugName: "name" }] : []));
|
|
8
|
+
this.title = input(undefined, ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
9
|
+
this.template = viewChild.required(TemplateRef);
|
|
10
|
+
}
|
|
7
11
|
ngAfterContentInit() {
|
|
8
|
-
if (!this.name) {
|
|
12
|
+
if (!this.name()) {
|
|
9
13
|
throw new Error('bs-dock-pane requires a unique "name" input.');
|
|
10
14
|
}
|
|
11
15
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
13
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDockPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.6", type: BsDockPaneComponent, isStandalone: true, selector: "bs-dock-pane", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `<ng-template><ng-content></ng-content></ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14
18
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDockPaneComponent, decorators: [{
|
|
16
20
|
type: Component,
|
|
17
21
|
args: [{
|
|
18
22
|
selector: 'bs-dock-pane',
|
|
19
23
|
template: `<ng-template><ng-content></ng-content></ng-template>`,
|
|
20
|
-
|
|
24
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
25
|
}]
|
|
22
|
-
}], propDecorators: { name: [{
|
|
23
|
-
type: Input
|
|
24
|
-
}], title: [{
|
|
25
|
-
type: Input
|
|
26
|
-
}], template: [{
|
|
27
|
-
type: ViewChild,
|
|
28
|
-
args: [TemplateRef, { static: true }]
|
|
29
|
-
}] } });
|
|
26
|
+
}], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], template: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
|
|
30
27
|
|
|
31
28
|
const templateHtml = `
|
|
32
29
|
<style>
|
|
@@ -3842,35 +3839,38 @@ if (typeof customElements !== 'undefined' && !customElements.get(tagName)) {
|
|
|
3842
3839
|
}
|
|
3843
3840
|
|
|
3844
3841
|
class BsDockManagerComponent {
|
|
3845
|
-
|
|
3846
|
-
const snapshot = this.cloneLayout(this.ensureSnapshot(value));
|
|
3847
|
-
this._layout = snapshot;
|
|
3848
|
-
this.layoutString = this.stringifyLayout(snapshot);
|
|
3849
|
-
this.applyLayout();
|
|
3850
|
-
}
|
|
3851
|
-
get layout() {
|
|
3842
|
+
get layoutSnapshot() {
|
|
3852
3843
|
if (!this._layout.root && this._layout.floating.length === 0) {
|
|
3853
3844
|
return null;
|
|
3854
3845
|
}
|
|
3855
3846
|
return this.cloneLayout(this._layout);
|
|
3856
3847
|
}
|
|
3857
|
-
constructor(
|
|
3858
|
-
this.
|
|
3859
|
-
this.layoutChange =
|
|
3860
|
-
this.layoutSnapshotChange =
|
|
3861
|
-
this.layoutString = null;
|
|
3862
|
-
this.panes =
|
|
3863
|
-
this.
|
|
3848
|
+
constructor() {
|
|
3849
|
+
this.layout = input(null, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
3850
|
+
this.layoutChange = output();
|
|
3851
|
+
this.layoutSnapshotChange = output();
|
|
3852
|
+
this.layoutString = signal(null, ...(ngDevMode ? [{ debugName: "layoutString" }] : []));
|
|
3853
|
+
this.panes = contentChildren(BsDockPaneComponent, ...(ngDevMode ? [{ debugName: "panes" }] : []));
|
|
3854
|
+
this.managerRef = viewChild('manager', ...(ngDevMode ? [{ debugName: "managerRef" }] : []));
|
|
3855
|
+
this.trackByPane = (_, pane) => pane.name();
|
|
3864
3856
|
this._layout = { root: null, floating: [] };
|
|
3857
|
+
const documentRef = inject(DOCUMENT);
|
|
3865
3858
|
if (documentRef) {
|
|
3866
3859
|
MintDockManagerElement.configureDocument(documentRef);
|
|
3867
3860
|
}
|
|
3861
|
+
effect(() => {
|
|
3862
|
+
const value = this.layout();
|
|
3863
|
+
const snapshot = this.cloneLayout(this.ensureSnapshot(value));
|
|
3864
|
+
this._layout = snapshot;
|
|
3865
|
+
this.layoutString.set(this.stringifyLayout(snapshot));
|
|
3866
|
+
this.applyLayout();
|
|
3867
|
+
});
|
|
3868
3868
|
}
|
|
3869
3869
|
ngAfterViewInit() {
|
|
3870
3870
|
this.applyLayout();
|
|
3871
3871
|
}
|
|
3872
3872
|
captureLayout() {
|
|
3873
|
-
const element = this.managerRef?.nativeElement;
|
|
3873
|
+
const element = this.managerRef()?.nativeElement;
|
|
3874
3874
|
return element?.snapshot ?? { root: null, floating: [] };
|
|
3875
3875
|
}
|
|
3876
3876
|
onLayoutChanged(event) {
|
|
@@ -3879,17 +3879,17 @@ class BsDockManagerComponent {
|
|
|
3879
3879
|
floating: [],
|
|
3880
3880
|
};
|
|
3881
3881
|
this._layout = this.cloneLayout(snapshot);
|
|
3882
|
-
this.layoutString
|
|
3883
|
-
this.layoutChange.emit(this.
|
|
3882
|
+
this.layoutString.set(this.stringifyLayout(this._layout));
|
|
3883
|
+
this.layoutChange.emit(this.layoutSnapshot);
|
|
3884
3884
|
this.layoutSnapshotChange.emit(this.cloneLayout(snapshot));
|
|
3885
|
-
this.changeDetector.markForCheck();
|
|
3886
3885
|
}
|
|
3887
3886
|
applyLayout() {
|
|
3888
|
-
|
|
3887
|
+
const ref = this.managerRef();
|
|
3888
|
+
if (!ref) {
|
|
3889
3889
|
return;
|
|
3890
3890
|
}
|
|
3891
|
-
const element =
|
|
3892
|
-
const layout = this.
|
|
3891
|
+
const element = ref.nativeElement;
|
|
3892
|
+
const layout = this.layoutSnapshot;
|
|
3893
3893
|
element.layout = layout ?? null;
|
|
3894
3894
|
}
|
|
3895
3895
|
ensureSnapshot(value) {
|
|
@@ -3914,47 +3914,17 @@ class BsDockManagerComponent {
|
|
|
3914
3914
|
cloneLayout(layout) {
|
|
3915
3915
|
return JSON.parse(JSON.stringify(layout));
|
|
3916
3916
|
}
|
|
3917
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
3918
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
3917
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDockManagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3918
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: BsDockManagerComponent, isStandalone: true, selector: "bs-dock-manager", inputs: { layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { layoutChange: "layoutChange", layoutSnapshotChange: "layoutSnapshotChange" }, queries: [{ propertyName: "panes", predicate: BsDockPaneComponent, isSignal: true }], viewQueries: [{ propertyName: "managerRef", first: true, predicate: ["manager"], descendants: true, isSignal: true }], ngImport: i0, template: "<mint-dock-manager\n #manager\n class=\"bs-dock-manager\"\n [attr.layout]=\"layoutString()\"\n (dock-layout-changed)=\"onLayoutChanged($event)\"\n >\n @for (pane of panes(); track trackByPane($index, pane)) {\n <div class=\"bs-dock-pane\" [attr.slot]=\"pane.name()\">\n <ng-container *ngTemplateOutlet=\"pane.template()\"></ng-container>\n </div>\n }\n</mint-dock-manager>\n", styles: [":host{display:block;width:100%;height:100%}.bs-dock-manager{display:block;width:100%;height:100%}.bs-dock-pane{display:contents}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3919
3919
|
}
|
|
3920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
3920
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDockManagerComponent, decorators: [{
|
|
3921
3921
|
type: Component,
|
|
3922
|
-
args: [{ selector: 'bs-dock-manager',
|
|
3923
|
-
}], ctorParameters: () => [{ type: i0.
|
|
3924
|
-
type: Inject,
|
|
3925
|
-
args: [DOCUMENT]
|
|
3926
|
-
}] }], propDecorators: { layout: [{
|
|
3927
|
-
type: Input
|
|
3928
|
-
}], layoutChange: [{
|
|
3929
|
-
type: Output
|
|
3930
|
-
}], layoutSnapshotChange: [{
|
|
3931
|
-
type: Output
|
|
3932
|
-
}], panes: [{
|
|
3933
|
-
type: ContentChildren,
|
|
3934
|
-
args: [BsDockPaneComponent]
|
|
3935
|
-
}], managerRef: [{
|
|
3936
|
-
type: ViewChild,
|
|
3937
|
-
args: ['manager', { static: true }]
|
|
3938
|
-
}] } });
|
|
3939
|
-
|
|
3940
|
-
class BsDockModule {
|
|
3941
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsDockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3942
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BsDockModule, declarations: [BsDockManagerComponent, BsDockPaneComponent], imports: [CommonModule], exports: [BsDockManagerComponent, BsDockPaneComponent] }); }
|
|
3943
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsDockModule, imports: [CommonModule] }); }
|
|
3944
|
-
}
|
|
3945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsDockModule, decorators: [{
|
|
3946
|
-
type: NgModule,
|
|
3947
|
-
args: [{
|
|
3948
|
-
declarations: [BsDockManagerComponent, BsDockPaneComponent],
|
|
3949
|
-
imports: [CommonModule],
|
|
3950
|
-
exports: [BsDockManagerComponent, BsDockPaneComponent],
|
|
3951
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
3952
|
-
}]
|
|
3953
|
-
}] });
|
|
3922
|
+
args: [{ selector: 'bs-dock-manager', imports: [NgTemplateOutlet], schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mint-dock-manager\n #manager\n class=\"bs-dock-manager\"\n [attr.layout]=\"layoutString()\"\n (dock-layout-changed)=\"onLayoutChanged($event)\"\n >\n @for (pane of panes(); track trackByPane($index, pane)) {\n <div class=\"bs-dock-pane\" [attr.slot]=\"pane.name()\">\n <ng-container *ngTemplateOutlet=\"pane.template()\"></ng-container>\n </div>\n }\n</mint-dock-manager>\n", styles: [":host{display:block;width:100%;height:100%}.bs-dock-manager{display:block;width:100%;height:100%}.bs-dock-pane{display:contents}\n"] }]
|
|
3923
|
+
}], ctorParameters: () => [], propDecorators: { layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], layoutChange: [{ type: i0.Output, args: ["layoutChange"] }], layoutSnapshotChange: [{ type: i0.Output, args: ["layoutSnapshotChange"] }], panes: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsDockPaneComponent), { isSignal: true }] }], managerRef: [{ type: i0.ViewChild, args: ['manager', { isSignal: true }] }] } });
|
|
3954
3924
|
|
|
3955
3925
|
/**
|
|
3956
3926
|
* Generated bundle index. Do not edit.
|
|
3957
3927
|
*/
|
|
3958
3928
|
|
|
3959
|
-
export { BsDockManagerComponent,
|
|
3929
|
+
export { BsDockManagerComponent, BsDockPaneComponent, MintDockManagerElement };
|
|
3960
3930
|
//# sourceMappingURL=mintplayer-ng-bootstrap-dock.mjs.map
|