@mintplayer/ng-bootstrap 21.9.2 → 21.11.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-datatable.mjs +65 -28
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +13 -4
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs +162 -0
- package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs.map +1 -0
- package/package.json +6 -2
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +17 -10
- package/types/mintplayer-ng-bootstrap-table.d.ts +12 -7
- package/types/mintplayer-ng-bootstrap-virtual-datatable.d.ts +52 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, TemplateRef, Input, Directive, contentChildren,
|
|
2
|
+
import { inject, TemplateRef, Input, Directive, contentChildren, model, computed, ChangeDetectionStrategy, Component, input, effect } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet } from '@angular/common';
|
|
4
4
|
import { BsGridComponent, BsGridRowDirective, BsGridColumnDirective } from '@mintplayer/ng-bootstrap/grid';
|
|
5
5
|
import { BsTableComponent } from '@mintplayer/ng-bootstrap/table';
|
|
@@ -7,8 +7,7 @@ import { BsPaginationComponent } from '@mintplayer/ng-bootstrap/pagination';
|
|
|
7
7
|
|
|
8
8
|
class DatatableSettings {
|
|
9
9
|
constructor(data) {
|
|
10
|
-
this.
|
|
11
|
-
this.sortDirection = 'ascending';
|
|
10
|
+
this.sortColumns = [];
|
|
12
11
|
Object.assign(this, data);
|
|
13
12
|
if (data && data.perPage) {
|
|
14
13
|
this.perPage = data.perPage;
|
|
@@ -33,8 +32,7 @@ class DatatableSettings {
|
|
|
33
32
|
}
|
|
34
33
|
toPagination() {
|
|
35
34
|
const res = {
|
|
36
|
-
|
|
37
|
-
sortDirection: this.sortDirection,
|
|
35
|
+
sortColumns: this.sortColumns,
|
|
38
36
|
perPage: this.perPage.selected,
|
|
39
37
|
page: this.page.selected
|
|
40
38
|
};
|
|
@@ -64,50 +62,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
64
62
|
args: ['bsDatatableColumnSortable']
|
|
65
63
|
}] } });
|
|
66
64
|
|
|
67
|
-
class
|
|
65
|
+
class DatatableSortBase {
|
|
68
66
|
constructor() {
|
|
69
67
|
this.columns = contentChildren(BsDatatableColumnDirective, ...(ngDevMode ? [{ debugName: "columns" }] : []));
|
|
70
|
-
this.numberOfColumns = computed(() => this.columns().length, ...(ngDevMode ? [{ debugName: "numberOfColumns" }] : []));
|
|
71
68
|
this.settings = model(new DatatableSettings(), ...(ngDevMode ? [{ debugName: "settings" }] : []));
|
|
72
|
-
this.data = model(undefined, ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
73
69
|
}
|
|
74
70
|
get columnsArray() {
|
|
75
71
|
return this.columns();
|
|
76
72
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
getSortIndex(columnName) {
|
|
74
|
+
return this.settings().sortColumns.findIndex(c => c.property === columnName);
|
|
75
|
+
}
|
|
76
|
+
getSortDirection(columnName) {
|
|
77
|
+
const col = this.settings().sortColumns.find(c => c.property === columnName);
|
|
78
|
+
return col?.direction ?? null;
|
|
79
|
+
}
|
|
80
|
+
onHeaderMouseDown(event) {
|
|
81
|
+
if (event.shiftKey) {
|
|
82
|
+
event.preventDefault();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
columnHeaderClicked(column, event) {
|
|
86
|
+
if (!column.sortable)
|
|
87
|
+
return;
|
|
88
|
+
const currentSettings = this.settings();
|
|
89
|
+
let sortColumns = currentSettings.sortColumns;
|
|
90
|
+
if (event.shiftKey) {
|
|
91
|
+
// Multi-column: add/toggle/remove
|
|
92
|
+
const existingIndex = sortColumns.findIndex(c => c.property === column.name);
|
|
93
|
+
if (existingIndex === -1) {
|
|
94
|
+
sortColumns = [...sortColumns, { property: column.name, direction: 'ascending' }];
|
|
83
95
|
}
|
|
84
|
-
else if (
|
|
85
|
-
|
|
96
|
+
else if (sortColumns[existingIndex].direction === 'ascending') {
|
|
97
|
+
sortColumns = sortColumns.map((c, i) => i === existingIndex ? { ...c, direction: 'descending' } : c);
|
|
86
98
|
}
|
|
87
99
|
else {
|
|
88
|
-
|
|
100
|
+
sortColumns = sortColumns.filter((_, i) => i !== existingIndex);
|
|
89
101
|
}
|
|
90
|
-
this.settings.set(new DatatableSettings(currentSettings));
|
|
91
102
|
}
|
|
103
|
+
else {
|
|
104
|
+
// Single-column: replace all
|
|
105
|
+
const existingSingle = sortColumns.length === 1 && sortColumns[0].property === column.name;
|
|
106
|
+
sortColumns = [{
|
|
107
|
+
property: column.name,
|
|
108
|
+
direction: existingSingle && sortColumns[0].direction === 'ascending' ? 'descending' : 'ascending'
|
|
109
|
+
}];
|
|
110
|
+
}
|
|
111
|
+
this.settings.set(new DatatableSettings({ ...currentSettings, sortColumns }));
|
|
112
|
+
}
|
|
113
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DatatableSortBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
114
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.6", type: DatatableSortBase, isStandalone: true, inputs: { settings: { classPropertyName: "settings", publicName: "settings", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { settings: "settingsChange" }, queries: [{ propertyName: "columns", predicate: BsDatatableColumnDirective, isSignal: true }], ngImport: i0 }); }
|
|
115
|
+
}
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: DatatableSortBase, decorators: [{
|
|
117
|
+
type: Directive
|
|
118
|
+
}], 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"] }] } });
|
|
119
|
+
|
|
120
|
+
class BsDatatableComponent extends DatatableSortBase {
|
|
121
|
+
constructor() {
|
|
122
|
+
super(...arguments);
|
|
123
|
+
this.numberOfColumns = computed(() => this.columns().length, ...(ngDevMode ? [{ debugName: "numberOfColumns" }] : []));
|
|
124
|
+
this.data = model(undefined, ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
92
125
|
}
|
|
93
126
|
onPerPageChange(perPage) {
|
|
94
127
|
const currentSettings = this.settings();
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
128
|
+
this.settings.set(new DatatableSettings({
|
|
129
|
+
...currentSettings,
|
|
130
|
+
perPage: { ...currentSettings.perPage, selected: perPage },
|
|
131
|
+
page: { ...currentSettings.page, selected: 1 },
|
|
132
|
+
}));
|
|
98
133
|
}
|
|
99
134
|
onPageChange(page) {
|
|
100
135
|
const currentSettings = this.settings();
|
|
101
|
-
|
|
102
|
-
|
|
136
|
+
this.settings.set(new DatatableSettings({
|
|
137
|
+
...currentSettings,
|
|
138
|
+
page: { ...currentSettings.page, selected: page },
|
|
139
|
+
}));
|
|
103
140
|
}
|
|
104
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDatatableComponent, deps:
|
|
105
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: BsDatatableComponent, isStandalone: true, selector: "bs-datatable", inputs: {
|
|
141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDatatableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
142
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: BsDatatableComponent, isStandalone: true, selector: "bs-datatable", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { data: "dataChange" }, usesInheritance: 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 && getSortDirection(column.name) === 'ascending'\"\n [class.sort-desc]=\"column.sortable && getSortDirection(column.name) === 'descending'\"\n (mousedown)=\"onHeaderMouseDown($event)\"\n (click)=\"columnHeaderClicked(column, $event)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n @if (settings().sortColumns.length > 1 && getSortIndex(column.name) >= 0) {\n <span class=\"sort-priority\">{{ getSortIndex(column.name) + 1 }}</span>\n }\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\";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}bs-table thead th.sort .sort-priority{position:absolute;right:.1em;bottom:.3em;font-size:.65em;font-weight:700;opacity:.7}tfoot>tr>td{border-bottom:none}\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 }); }
|
|
106
143
|
}
|
|
107
144
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsDatatableComponent, decorators: [{
|
|
108
145
|
type: Component,
|
|
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 && (
|
|
110
|
-
}], propDecorators: {
|
|
146
|
+
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 && getSortDirection(column.name) === 'ascending'\"\n [class.sort-desc]=\"column.sortable && getSortDirection(column.name) === 'descending'\"\n (mousedown)=\"onHeaderMouseDown($event)\"\n (click)=\"columnHeaderClicked(column, $event)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n @if (settings().sortColumns.length > 1 && getSortIndex(column.name) >= 0) {\n <span class=\"sort-priority\">{{ getSortIndex(column.name) + 1 }}</span>\n }\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\";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}bs-table thead th.sort .sort-priority{position:absolute;right:.1em;bottom:.3em;font-size:.65em;font-weight:700;opacity:.7}tfoot>tr>td{border-bottom:none}\n"] }]
|
|
147
|
+
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }, { type: i0.Output, args: ["dataChange"] }] } });
|
|
111
148
|
|
|
112
149
|
class BsRowTemplateDirective {
|
|
113
150
|
constructor() {
|
|
@@ -142,5 +179,5 @@ class BsRowTemplateContext {
|
|
|
142
179
|
* Generated bundle index. Do not edit.
|
|
143
180
|
*/
|
|
144
181
|
|
|
145
|
-
export { BsDatatableColumnDirective, BsDatatableComponent, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings };
|
|
182
|
+
export { BsDatatableColumnDirective, BsDatatableComponent, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings, DatatableSortBase };
|
|
146
183
|
//# 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/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,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,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,SAAS;AAAC,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
|
+
{"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-sort-base.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, SortColumn } 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 sortColumns: SortColumn[] = [];\n public perPage: { values: number[], selected: number };\n public page: { values: number[], selected: number };\n\n public toPagination() {\n const res = <PaginationRequest>{\n sortColumns: this.sortColumns,\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 { contentChildren, Directive, model } from '@angular/core';\nimport { DatatableSettings } from './datatable-settings';\nimport { BsDatatableColumnDirective } from './datatable-column/datatable-column.directive';\n\n@Directive()\nexport abstract class DatatableSortBase {\n\n readonly columns = contentChildren(BsDatatableColumnDirective);\n\n get columnsArray() {\n return this.columns();\n }\n\n settings = model<DatatableSettings>(new DatatableSettings());\n\n getSortIndex(columnName: string): number {\n return this.settings().sortColumns.findIndex(c => c.property === columnName);\n }\n\n getSortDirection(columnName: string): 'ascending' | 'descending' | null {\n const col = this.settings().sortColumns.find(c => c.property === columnName);\n return col?.direction ?? null;\n }\n\n onHeaderMouseDown(event: MouseEvent) {\n if (event.shiftKey) {\n event.preventDefault();\n }\n }\n\n columnHeaderClicked(column: BsDatatableColumnDirective, event: MouseEvent) {\n if (!column.sortable) return;\n\n const currentSettings = this.settings();\n let sortColumns = currentSettings.sortColumns;\n\n if (event.shiftKey) {\n // Multi-column: add/toggle/remove\n const existingIndex = sortColumns.findIndex(c => c.property === column.name);\n if (existingIndex === -1) {\n sortColumns = [...sortColumns, { property: column.name, direction: 'ascending' as const }];\n } else if (sortColumns[existingIndex].direction === 'ascending') {\n sortColumns = sortColumns.map((c, i) =>\n i === existingIndex ? { ...c, direction: 'descending' as const } : c\n );\n } else {\n sortColumns = sortColumns.filter((_, i) => i !== existingIndex);\n }\n } else {\n // Single-column: replace all\n const existingSingle = sortColumns.length === 1 && sortColumns[0].property === column.name;\n sortColumns = [{\n property: column.name,\n direction: existingSingle && sortColumns[0].direction === 'ascending' ? 'descending' as const : 'ascending' as const\n }];\n }\n\n this.settings.set(new DatatableSettings({ ...currentSettings, sortColumns }));\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, 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 { DatatableSortBase } from '../datatable-sort-base';\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> extends DatatableSortBase {\n\n numberOfColumns = computed(() => this.columns().length);\n\n data = model<PaginationResponse<TData> | undefined>(undefined);\n\n rowTemplate?: TemplateRef<BsRowTemplateContext<TData>>;\n\n onPerPageChange(perPage: number) {\n const currentSettings = this.settings();\n this.settings.set(new DatatableSettings({\n ...currentSettings,\n perPage: { ...currentSettings.perPage, selected: perPage },\n page: { ...currentSettings.page, selected: 1 },\n }));\n }\n\n onPageChange(page: number) {\n const currentSettings = this.settings();\n this.settings.set(new DatatableSettings({\n ...currentSettings,\n page: { ...currentSettings.page, selected: page },\n }));\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 && getSortDirection(column.name) === 'ascending'\"\n [class.sort-desc]=\"column.sortable && getSortDirection(column.name) === 'descending'\"\n (mousedown)=\"onHeaderMouseDown($event)\"\n (click)=\"columnHeaderClicked(column, $event)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n @if (settings().sortColumns.length > 1 && getSortIndex(column.name) >= 0) {\n <span class=\"sort-priority\">{{ getSortIndex(column.name) + 1 }}</span>\n }\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","/**\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,WAAW,GAAiB,EAAE;AAvBjC,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;IAMO,YAAY,GAAA;AACf,QAAA,MAAM,GAAG,GAAsB;YAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;AAC7B,YAAA,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;AAC9B,YAAA,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;SACnB;AACD,QAAA,OAAO,GAAG;IACd;AACH;;M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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,5 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class BsTableStylesComponent {
|
|
5
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTableStylesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.6", type: BsTableStylesComponent, isStandalone: true, selector: "bs-table-styles", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:contents}:host ::ng-deep *,:host ::ng-deep *:before,:host ::ng-deep *:after{box-sizing:border-box}@media(prefers-reduced-motion:no-preference){:host ::ng-deep :root{scroll-behavior:smooth}}:host ::ng-deep body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host ::ng-deep hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:.25}:host ::ng-deep h6,:host ::ng-deep h5,:host ::ng-deep h4,:host ::ng-deep h3,:host ::ng-deep h2,:host ::ng-deep h1{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}:host ::ng-deep h1{font-size:calc(1.375rem + 1.5vw)}@media(min-width:1200px){:host ::ng-deep h1{font-size:2.5rem}}:host ::ng-deep h2{font-size:calc(1.325rem + .9vw)}@media(min-width:1200px){:host ::ng-deep h2{font-size:2rem}}:host ::ng-deep h3{font-size:calc(1.3rem + .6vw)}@media(min-width:1200px){:host ::ng-deep h3{font-size:1.75rem}}:host ::ng-deep h4{font-size:calc(1.275rem + .3vw)}@media(min-width:1200px){:host ::ng-deep h4{font-size:1.5rem}}:host ::ng-deep h5{font-size:1.25rem}:host ::ng-deep h6{font-size:1rem}:host ::ng-deep p{margin-top:0;margin-bottom:1rem}:host ::ng-deep abbr[title]{text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none}:host ::ng-deep address{margin-bottom:1rem;font-style:normal;line-height:inherit}:host ::ng-deep ol,:host ::ng-deep ul{padding-left:2rem}:host ::ng-deep ol,:host ::ng-deep ul,:host ::ng-deep dl{margin-top:0;margin-bottom:1rem}:host ::ng-deep ol ol,:host ::ng-deep ul ul,:host ::ng-deep ol ul,:host ::ng-deep ul ol{margin-bottom:0}:host ::ng-deep dt{font-weight:700}:host ::ng-deep dd{margin-bottom:.5rem;margin-left:0}:host ::ng-deep blockquote{margin:0 0 1rem}:host ::ng-deep b,:host ::ng-deep strong{font-weight:bolder}:host ::ng-deep small{font-size:.875em}:host ::ng-deep mark{padding:.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}:host ::ng-deep sub,:host ::ng-deep sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}:host ::ng-deep sub{bottom:-.25em}:host ::ng-deep sup{top:-.5em}:host ::ng-deep a{color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity, 1));text-decoration:underline}:host ::ng-deep a:hover{--bs-link-color-rgb: var(--bs-link-hover-color-rgb)}:host ::ng-deep a:not([href]):not([class]),:host ::ng-deep a:not([href]):not([class]):hover{color:inherit;text-decoration:none}:host ::ng-deep pre,:host ::ng-deep code,:host ::ng-deep kbd,:host ::ng-deep samp{font-family:var(--bs-font-monospace);font-size:1em}:host ::ng-deep pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}:host ::ng-deep pre code{font-size:inherit;color:inherit;word-break:normal}:host ::ng-deep code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>:host ::ng-deep code{color:inherit}:host ::ng-deep kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}:host ::ng-deep kbd kbd{padding:0;font-size:1em}:host ::ng-deep figure{margin:0 0 1rem}:host ::ng-deep img,:host ::ng-deep svg{vertical-align:middle}:host ::ng-deep table{caption-side:bottom;border-collapse:collapse}:host ::ng-deep caption{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-secondary-color);text-align:left}:host ::ng-deep th{text-align:inherit;text-align:-webkit-match-parent}:host ::ng-deep thead,:host ::ng-deep tbody,:host ::ng-deep tfoot,:host ::ng-deep tr,:host ::ng-deep td,:host ::ng-deep th{border-color:inherit;border-style:solid;border-width:0}:host ::ng-deep label{display:inline-block}:host ::ng-deep button{border-radius:0}:host ::ng-deep button:focus:not(:focus-visible){outline:0}:host ::ng-deep input,:host ::ng-deep button,:host ::ng-deep select,:host ::ng-deep optgroup,:host ::ng-deep textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}:host ::ng-deep button,:host ::ng-deep select{text-transform:none}:host ::ng-deep [role=button]{cursor:pointer}:host ::ng-deep select{word-wrap:normal}:host ::ng-deep select:disabled{opacity:1}:host ::ng-deep [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}:host ::ng-deep button,:host ::ng-deep [type=button],:host ::ng-deep [type=reset],:host ::ng-deep [type=submit]{-webkit-appearance:button}:host ::ng-deep button:not(:disabled),:host ::ng-deep [type=button]:not(:disabled),:host ::ng-deep [type=reset]:not(:disabled),:host ::ng-deep [type=submit]:not(:disabled){cursor:pointer}:host ::ng-deep ::-moz-focus-inner{padding:0;border-style:none}:host ::ng-deep textarea{resize:vertical}:host ::ng-deep fieldset{min-width:0;padding:0;margin:0;border:0}:host ::ng-deep legend{float:left;width:100%;padding:0;margin-bottom:.5rem;line-height:inherit;font-size:calc(1.275rem + .3vw)}@media(min-width:1200px){:host ::ng-deep legend{font-size:1.5rem}}:host ::ng-deep legend+*{clear:left}:host ::ng-deep ::-webkit-datetime-edit-fields-wrapper,:host ::ng-deep ::-webkit-datetime-edit-text,:host ::ng-deep ::-webkit-datetime-edit-minute,:host ::ng-deep ::-webkit-datetime-edit-hour-field,:host ::ng-deep ::-webkit-datetime-edit-day-field,:host ::ng-deep ::-webkit-datetime-edit-month-field,:host ::ng-deep ::-webkit-datetime-edit-year-field{padding:0}:host ::ng-deep ::-webkit-inner-spin-button{height:auto}:host ::ng-deep [type=search]{-webkit-appearance:textfield;outline-offset:-2px}:host ::ng-deep [type=search]::-webkit-search-cancel-button{cursor:pointer;filter:grayscale(1)}:host ::ng-deep ::-webkit-search-decoration{-webkit-appearance:none}:host ::ng-deep ::-webkit-color-swatch-wrapper{padding:0}:host ::ng-deep ::file-selector-button{font:inherit;-webkit-appearance:button}:host ::ng-deep output{display:inline-block}:host ::ng-deep iframe{border:0}:host ::ng-deep summary{display:list-item;cursor:pointer}:host ::ng-deep progress{vertical-align:baseline}:host ::ng-deep [hidden]{display:none!important}:host ::ng-deep .table{--bs-table-color-type: initial;--bs-table-bg-type: initial;--bs-table-color-state: initial;--bs-table-bg-state: initial;--bs-table-color: var(--bs-emphasis-color);--bs-table-bg: var(--bs-body-bg);--bs-table-border-color: var(--bs-border-color);--bs-table-accent-bg: transparent;--bs-table-striped-color: var(--bs-emphasis-color);--bs-table-striped-bg: rgba(var(--bs-emphasis-color-rgb), .05);--bs-table-active-color: var(--bs-emphasis-color);--bs-table-active-bg: rgba(var(--bs-emphasis-color-rgb), .1);--bs-table-hover-color: var(--bs-emphasis-color);--bs-table-hover-bg: rgba(var(--bs-emphasis-color-rgb), .075);width:100%;margin-bottom:1rem;vertical-align:top;border-color:var(--bs-table-border-color)}:host ::ng-deep .table>:not(caption)>*>*{padding:.5rem;color:var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);box-shadow:inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)))}:host ::ng-deep .table>tbody{vertical-align:inherit}:host ::ng-deep .table>thead{vertical-align:bottom}:host ::ng-deep .table-group-divider{border-top:calc(var(--bs-border-width) * 2) solid currentcolor}:host ::ng-deep .caption-top{caption-side:top}:host ::ng-deep .table-sm>:not(caption)>*>*{padding:.25rem}:host ::ng-deep .table-bordered>:not(caption)>*{border-width:var(--bs-border-width) 0}:host ::ng-deep .table-bordered>:not(caption)>*>*{border-width:0 var(--bs-border-width)}:host ::ng-deep .table-borderless>:not(caption)>*>*{border-bottom-width:0}:host ::ng-deep .table-borderless>:not(:first-child){border-top-width:0}:host ::ng-deep .table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-color-type: var(--bs-table-striped-color);--bs-table-bg-type: var(--bs-table-striped-bg)}:host ::ng-deep .table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-color-type: var(--bs-table-striped-color);--bs-table-bg-type: var(--bs-table-striped-bg)}:host ::ng-deep .table-active{--bs-table-color-state: var(--bs-table-active-color);--bs-table-bg-state: var(--bs-table-active-bg)}:host ::ng-deep .table-hover>tbody>tr:hover>*{--bs-table-color-state: var(--bs-table-hover-color);--bs-table-bg-state: var(--bs-table-hover-bg)}:host ::ng-deep .table-primary{--bs-table-color: #000;--bs-table-bg: rgb(206.6, 226, 254.6);--bs-table-border-color: rgb(165.28, 180.8, 203.68);--bs-table-striped-bg: rgb(196.27, 214.7, 241.87);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(185.94, 203.4, 229.14);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(191.105, 209.05, 235.505);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-secondary{--bs-table-color: #000;--bs-table-bg: rgb(225.6, 227.4, 229);--bs-table-border-color: rgb(180.48, 181.92, 183.2);--bs-table-striped-bg: rgb(214.32, 216.03, 217.55);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(203.04, 204.66, 206.1);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(208.68, 210.345, 211.825);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-success{--bs-table-color: #000;--bs-table-bg: rgb(209, 231, 220.8);--bs-table-border-color: rgb(167.2, 184.8, 176.64);--bs-table-striped-bg: rgb(198.55, 219.45, 209.76);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(188.1, 207.9, 198.72);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(193.325, 213.675, 204.24);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-info{--bs-table-color: #000;--bs-table-bg: rgb(206.6, 244.4, 252);--bs-table-border-color: rgb(165.28, 195.52, 201.6);--bs-table-striped-bg: rgb(196.27, 232.18, 239.4);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(185.94, 219.96, 226.8);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(191.105, 226.07, 233.1);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-warning{--bs-table-color: #000;--bs-table-bg: rgb(255, 242.6, 205.4);--bs-table-border-color: rgb(204, 194.08, 164.32);--bs-table-striped-bg: rgb(242.25, 230.47, 195.13);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(229.5, 218.34, 184.86);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(235.875, 224.405, 189.995);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-danger{--bs-table-color: #000;--bs-table-bg: rgb(248, 214.6, 217.8);--bs-table-border-color: rgb(198.4, 171.68, 174.24);--bs-table-striped-bg: rgb(235.6, 203.87, 206.91);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(223.2, 193.14, 196.02);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(229.4, 198.505, 201.465);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-light{--bs-table-color: #000;--bs-table-bg: #f8f9fa;--bs-table-border-color: rgb(198.4, 199.2, 200);--bs-table-striped-bg: rgb(235.6, 236.55, 237.5);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(223.2, 224.1, 225);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(229.4, 230.325, 231.25);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-dark{--bs-table-color: #fff;--bs-table-bg: #212529;--bs-table-border-color: rgb(77.4, 80.6, 83.8);--bs-table-striped-bg: rgb(44.1, 47.9, 51.7);--bs-table-striped-color: #fff;--bs-table-active-bg: rgb(55.2, 58.8, 62.4);--bs-table-active-color: #fff;--bs-table-hover-bg: rgb(49.65, 53.35, 57.05);--bs-table-hover-color: #fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media(max-width:575.98px){:host ::ng-deep .table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:767.98px){:host ::ng-deep .table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:991.98px){:host ::ng-deep .table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:1199.98px){:host ::ng-deep .table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:1399.98px){:host ::ng-deep .table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7
|
+
}
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTableStylesComponent, decorators: [{
|
|
9
|
+
type: Component,
|
|
10
|
+
args: [{ selector: 'bs-table-styles', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:contents}:host ::ng-deep *,:host ::ng-deep *:before,:host ::ng-deep *:after{box-sizing:border-box}@media(prefers-reduced-motion:no-preference){:host ::ng-deep :root{scroll-behavior:smooth}}:host ::ng-deep body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host ::ng-deep hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:.25}:host ::ng-deep h6,:host ::ng-deep h5,:host ::ng-deep h4,:host ::ng-deep h3,:host ::ng-deep h2,:host ::ng-deep h1{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}:host ::ng-deep h1{font-size:calc(1.375rem + 1.5vw)}@media(min-width:1200px){:host ::ng-deep h1{font-size:2.5rem}}:host ::ng-deep h2{font-size:calc(1.325rem + .9vw)}@media(min-width:1200px){:host ::ng-deep h2{font-size:2rem}}:host ::ng-deep h3{font-size:calc(1.3rem + .6vw)}@media(min-width:1200px){:host ::ng-deep h3{font-size:1.75rem}}:host ::ng-deep h4{font-size:calc(1.275rem + .3vw)}@media(min-width:1200px){:host ::ng-deep h4{font-size:1.5rem}}:host ::ng-deep h5{font-size:1.25rem}:host ::ng-deep h6{font-size:1rem}:host ::ng-deep p{margin-top:0;margin-bottom:1rem}:host ::ng-deep abbr[title]{text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none}:host ::ng-deep address{margin-bottom:1rem;font-style:normal;line-height:inherit}:host ::ng-deep ol,:host ::ng-deep ul{padding-left:2rem}:host ::ng-deep ol,:host ::ng-deep ul,:host ::ng-deep dl{margin-top:0;margin-bottom:1rem}:host ::ng-deep ol ol,:host ::ng-deep ul ul,:host ::ng-deep ol ul,:host ::ng-deep ul ol{margin-bottom:0}:host ::ng-deep dt{font-weight:700}:host ::ng-deep dd{margin-bottom:.5rem;margin-left:0}:host ::ng-deep blockquote{margin:0 0 1rem}:host ::ng-deep b,:host ::ng-deep strong{font-weight:bolder}:host ::ng-deep small{font-size:.875em}:host ::ng-deep mark{padding:.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}:host ::ng-deep sub,:host ::ng-deep sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}:host ::ng-deep sub{bottom:-.25em}:host ::ng-deep sup{top:-.5em}:host ::ng-deep a{color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity, 1));text-decoration:underline}:host ::ng-deep a:hover{--bs-link-color-rgb: var(--bs-link-hover-color-rgb)}:host ::ng-deep a:not([href]):not([class]),:host ::ng-deep a:not([href]):not([class]):hover{color:inherit;text-decoration:none}:host ::ng-deep pre,:host ::ng-deep code,:host ::ng-deep kbd,:host ::ng-deep samp{font-family:var(--bs-font-monospace);font-size:1em}:host ::ng-deep pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}:host ::ng-deep pre code{font-size:inherit;color:inherit;word-break:normal}:host ::ng-deep code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>:host ::ng-deep code{color:inherit}:host ::ng-deep kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}:host ::ng-deep kbd kbd{padding:0;font-size:1em}:host ::ng-deep figure{margin:0 0 1rem}:host ::ng-deep img,:host ::ng-deep svg{vertical-align:middle}:host ::ng-deep table{caption-side:bottom;border-collapse:collapse}:host ::ng-deep caption{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-secondary-color);text-align:left}:host ::ng-deep th{text-align:inherit;text-align:-webkit-match-parent}:host ::ng-deep thead,:host ::ng-deep tbody,:host ::ng-deep tfoot,:host ::ng-deep tr,:host ::ng-deep td,:host ::ng-deep th{border-color:inherit;border-style:solid;border-width:0}:host ::ng-deep label{display:inline-block}:host ::ng-deep button{border-radius:0}:host ::ng-deep button:focus:not(:focus-visible){outline:0}:host ::ng-deep input,:host ::ng-deep button,:host ::ng-deep select,:host ::ng-deep optgroup,:host ::ng-deep textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}:host ::ng-deep button,:host ::ng-deep select{text-transform:none}:host ::ng-deep [role=button]{cursor:pointer}:host ::ng-deep select{word-wrap:normal}:host ::ng-deep select:disabled{opacity:1}:host ::ng-deep [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}:host ::ng-deep button,:host ::ng-deep [type=button],:host ::ng-deep [type=reset],:host ::ng-deep [type=submit]{-webkit-appearance:button}:host ::ng-deep button:not(:disabled),:host ::ng-deep [type=button]:not(:disabled),:host ::ng-deep [type=reset]:not(:disabled),:host ::ng-deep [type=submit]:not(:disabled){cursor:pointer}:host ::ng-deep ::-moz-focus-inner{padding:0;border-style:none}:host ::ng-deep textarea{resize:vertical}:host ::ng-deep fieldset{min-width:0;padding:0;margin:0;border:0}:host ::ng-deep legend{float:left;width:100%;padding:0;margin-bottom:.5rem;line-height:inherit;font-size:calc(1.275rem + .3vw)}@media(min-width:1200px){:host ::ng-deep legend{font-size:1.5rem}}:host ::ng-deep legend+*{clear:left}:host ::ng-deep ::-webkit-datetime-edit-fields-wrapper,:host ::ng-deep ::-webkit-datetime-edit-text,:host ::ng-deep ::-webkit-datetime-edit-minute,:host ::ng-deep ::-webkit-datetime-edit-hour-field,:host ::ng-deep ::-webkit-datetime-edit-day-field,:host ::ng-deep ::-webkit-datetime-edit-month-field,:host ::ng-deep ::-webkit-datetime-edit-year-field{padding:0}:host ::ng-deep ::-webkit-inner-spin-button{height:auto}:host ::ng-deep [type=search]{-webkit-appearance:textfield;outline-offset:-2px}:host ::ng-deep [type=search]::-webkit-search-cancel-button{cursor:pointer;filter:grayscale(1)}:host ::ng-deep ::-webkit-search-decoration{-webkit-appearance:none}:host ::ng-deep ::-webkit-color-swatch-wrapper{padding:0}:host ::ng-deep ::file-selector-button{font:inherit;-webkit-appearance:button}:host ::ng-deep output{display:inline-block}:host ::ng-deep iframe{border:0}:host ::ng-deep summary{display:list-item;cursor:pointer}:host ::ng-deep progress{vertical-align:baseline}:host ::ng-deep [hidden]{display:none!important}:host ::ng-deep .table{--bs-table-color-type: initial;--bs-table-bg-type: initial;--bs-table-color-state: initial;--bs-table-bg-state: initial;--bs-table-color: var(--bs-emphasis-color);--bs-table-bg: var(--bs-body-bg);--bs-table-border-color: var(--bs-border-color);--bs-table-accent-bg: transparent;--bs-table-striped-color: var(--bs-emphasis-color);--bs-table-striped-bg: rgba(var(--bs-emphasis-color-rgb), .05);--bs-table-active-color: var(--bs-emphasis-color);--bs-table-active-bg: rgba(var(--bs-emphasis-color-rgb), .1);--bs-table-hover-color: var(--bs-emphasis-color);--bs-table-hover-bg: rgba(var(--bs-emphasis-color-rgb), .075);width:100%;margin-bottom:1rem;vertical-align:top;border-color:var(--bs-table-border-color)}:host ::ng-deep .table>:not(caption)>*>*{padding:.5rem;color:var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);box-shadow:inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)))}:host ::ng-deep .table>tbody{vertical-align:inherit}:host ::ng-deep .table>thead{vertical-align:bottom}:host ::ng-deep .table-group-divider{border-top:calc(var(--bs-border-width) * 2) solid currentcolor}:host ::ng-deep .caption-top{caption-side:top}:host ::ng-deep .table-sm>:not(caption)>*>*{padding:.25rem}:host ::ng-deep .table-bordered>:not(caption)>*{border-width:var(--bs-border-width) 0}:host ::ng-deep .table-bordered>:not(caption)>*>*{border-width:0 var(--bs-border-width)}:host ::ng-deep .table-borderless>:not(caption)>*>*{border-bottom-width:0}:host ::ng-deep .table-borderless>:not(:first-child){border-top-width:0}:host ::ng-deep .table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-color-type: var(--bs-table-striped-color);--bs-table-bg-type: var(--bs-table-striped-bg)}:host ::ng-deep .table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-color-type: var(--bs-table-striped-color);--bs-table-bg-type: var(--bs-table-striped-bg)}:host ::ng-deep .table-active{--bs-table-color-state: var(--bs-table-active-color);--bs-table-bg-state: var(--bs-table-active-bg)}:host ::ng-deep .table-hover>tbody>tr:hover>*{--bs-table-color-state: var(--bs-table-hover-color);--bs-table-bg-state: var(--bs-table-hover-bg)}:host ::ng-deep .table-primary{--bs-table-color: #000;--bs-table-bg: rgb(206.6, 226, 254.6);--bs-table-border-color: rgb(165.28, 180.8, 203.68);--bs-table-striped-bg: rgb(196.27, 214.7, 241.87);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(185.94, 203.4, 229.14);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(191.105, 209.05, 235.505);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-secondary{--bs-table-color: #000;--bs-table-bg: rgb(225.6, 227.4, 229);--bs-table-border-color: rgb(180.48, 181.92, 183.2);--bs-table-striped-bg: rgb(214.32, 216.03, 217.55);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(203.04, 204.66, 206.1);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(208.68, 210.345, 211.825);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-success{--bs-table-color: #000;--bs-table-bg: rgb(209, 231, 220.8);--bs-table-border-color: rgb(167.2, 184.8, 176.64);--bs-table-striped-bg: rgb(198.55, 219.45, 209.76);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(188.1, 207.9, 198.72);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(193.325, 213.675, 204.24);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-info{--bs-table-color: #000;--bs-table-bg: rgb(206.6, 244.4, 252);--bs-table-border-color: rgb(165.28, 195.52, 201.6);--bs-table-striped-bg: rgb(196.27, 232.18, 239.4);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(185.94, 219.96, 226.8);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(191.105, 226.07, 233.1);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-warning{--bs-table-color: #000;--bs-table-bg: rgb(255, 242.6, 205.4);--bs-table-border-color: rgb(204, 194.08, 164.32);--bs-table-striped-bg: rgb(242.25, 230.47, 195.13);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(229.5, 218.34, 184.86);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(235.875, 224.405, 189.995);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-danger{--bs-table-color: #000;--bs-table-bg: rgb(248, 214.6, 217.8);--bs-table-border-color: rgb(198.4, 171.68, 174.24);--bs-table-striped-bg: rgb(235.6, 203.87, 206.91);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(223.2, 193.14, 196.02);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(229.4, 198.505, 201.465);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-light{--bs-table-color: #000;--bs-table-bg: #f8f9fa;--bs-table-border-color: rgb(198.4, 199.2, 200);--bs-table-striped-bg: rgb(235.6, 236.55, 237.5);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(223.2, 224.1, 225);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(229.4, 230.325, 231.25);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-dark{--bs-table-color: #fff;--bs-table-bg: #212529;--bs-table-border-color: rgb(77.4, 80.6, 83.8);--bs-table-striped-bg: rgb(44.1, 47.9, 51.7);--bs-table-striped-color: #fff;--bs-table-active-bg: rgb(55.2, 58.8, 62.4);--bs-table-active-color: #fff;--bs-table-hover-bg: rgb(49.65, 53.35, 57.05);--bs-table-hover-color: #fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media(max-width:575.98px){:host ::ng-deep .table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:767.98px){:host ::ng-deep .table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:991.98px){:host ::ng-deep .table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:1199.98px){:host ::ng-deep .table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:1399.98px){:host ::ng-deep .table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}\n"] }]
|
|
11
|
+
}] });
|
|
3
12
|
|
|
4
13
|
class BsTableComponent {
|
|
5
14
|
constructor() {
|
|
@@ -8,16 +17,16 @@ class BsTableComponent {
|
|
|
8
17
|
this.hover = input(false, ...(ngDevMode ? [{ debugName: "hover" }] : []));
|
|
9
18
|
}
|
|
10
19
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: BsTableComponent, isStandalone: true, selector: "bs-table", inputs: { isResponsive: { classPropertyName: "isResponsive", publicName: "isResponsive", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, hover: { classPropertyName: "hover", publicName: "hover", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"d-block\" [class.table-responsive]=\"isResponsive()\" [class.nowrap]=\"isResponsive()\">\n <table class=\"table\" cellspacing=\"0\" role=\"grid\"\n [class.mb-0]=\"isResponsive()\"\n [class.table-striped]=\"striped()\"\n [class.table-hover]=\"hover()\">\n\n <ng-content></ng-content>\n\n </table>\n</div>\n", styles: [":host ::ng-deep *,:host ::ng-deep *:before,:host ::ng-deep *:after{box-sizing:border-box}@media(prefers-reduced-motion:no-preference){:host ::ng-deep :root{scroll-behavior:smooth}}:host ::ng-deep body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host ::ng-deep hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:.25}:host ::ng-deep h6,:host ::ng-deep h5,:host ::ng-deep h4,:host ::ng-deep h3,:host ::ng-deep h2,:host ::ng-deep h1{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}:host ::ng-deep h1{font-size:calc(1.375rem + 1.5vw)}@media(min-width:1200px){:host ::ng-deep h1{font-size:2.5rem}}:host ::ng-deep h2{font-size:calc(1.325rem + .9vw)}@media(min-width:1200px){:host ::ng-deep h2{font-size:2rem}}:host ::ng-deep h3{font-size:calc(1.3rem + .6vw)}@media(min-width:1200px){:host ::ng-deep h3{font-size:1.75rem}}:host ::ng-deep h4{font-size:calc(1.275rem + .3vw)}@media(min-width:1200px){:host ::ng-deep h4{font-size:1.5rem}}:host ::ng-deep h5{font-size:1.25rem}:host ::ng-deep h6{font-size:1rem}:host ::ng-deep p{margin-top:0;margin-bottom:1rem}:host ::ng-deep abbr[title]{text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none}:host ::ng-deep address{margin-bottom:1rem;font-style:normal;line-height:inherit}:host ::ng-deep ol,:host ::ng-deep ul{padding-left:2rem}:host ::ng-deep ol,:host ::ng-deep ul,:host ::ng-deep dl{margin-top:0;margin-bottom:1rem}:host ::ng-deep ol ol,:host ::ng-deep ul ul,:host ::ng-deep ol ul,:host ::ng-deep ul ol{margin-bottom:0}:host ::ng-deep dt{font-weight:700}:host ::ng-deep dd{margin-bottom:.5rem;margin-left:0}:host ::ng-deep blockquote{margin:0 0 1rem}:host ::ng-deep b,:host ::ng-deep strong{font-weight:bolder}:host ::ng-deep small{font-size:.875em}:host ::ng-deep mark{padding:.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}:host ::ng-deep sub,:host ::ng-deep sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}:host ::ng-deep sub{bottom:-.25em}:host ::ng-deep sup{top:-.5em}:host ::ng-deep a{color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity, 1));text-decoration:underline}:host ::ng-deep a:hover{--bs-link-color-rgb: var(--bs-link-hover-color-rgb)}:host ::ng-deep a:not([href]):not([class]),:host ::ng-deep a:not([href]):not([class]):hover{color:inherit;text-decoration:none}:host ::ng-deep pre,:host ::ng-deep code,:host ::ng-deep kbd,:host ::ng-deep samp{font-family:var(--bs-font-monospace);font-size:1em}:host ::ng-deep pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}:host ::ng-deep pre code{font-size:inherit;color:inherit;word-break:normal}:host ::ng-deep code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>:host ::ng-deep code{color:inherit}:host ::ng-deep kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}:host ::ng-deep kbd kbd{padding:0;font-size:1em}:host ::ng-deep figure{margin:0 0 1rem}:host ::ng-deep img,:host ::ng-deep svg{vertical-align:middle}:host ::ng-deep table{caption-side:bottom;border-collapse:collapse}:host ::ng-deep caption{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-secondary-color);text-align:left}:host ::ng-deep th{text-align:inherit;text-align:-webkit-match-parent}:host ::ng-deep thead,:host ::ng-deep tbody,:host ::ng-deep tfoot,:host ::ng-deep tr,:host ::ng-deep td,:host ::ng-deep th{border-color:inherit;border-style:solid;border-width:0}:host ::ng-deep label{display:inline-block}:host ::ng-deep button{border-radius:0}:host ::ng-deep button:focus:not(:focus-visible){outline:0}:host ::ng-deep input,:host ::ng-deep button,:host ::ng-deep select,:host ::ng-deep optgroup,:host ::ng-deep textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}:host ::ng-deep button,:host ::ng-deep select{text-transform:none}:host ::ng-deep [role=button]{cursor:pointer}:host ::ng-deep select{word-wrap:normal}:host ::ng-deep select:disabled{opacity:1}:host ::ng-deep [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}:host ::ng-deep button,:host ::ng-deep [type=button],:host ::ng-deep [type=reset],:host ::ng-deep [type=submit]{-webkit-appearance:button}:host ::ng-deep button:not(:disabled),:host ::ng-deep [type=button]:not(:disabled),:host ::ng-deep [type=reset]:not(:disabled),:host ::ng-deep [type=submit]:not(:disabled){cursor:pointer}:host ::ng-deep ::-moz-focus-inner{padding:0;border-style:none}:host ::ng-deep textarea{resize:vertical}:host ::ng-deep fieldset{min-width:0;padding:0;margin:0;border:0}:host ::ng-deep legend{float:left;width:100%;padding:0;margin-bottom:.5rem;line-height:inherit;font-size:calc(1.275rem + .3vw)}@media(min-width:1200px){:host ::ng-deep legend{font-size:1.5rem}}:host ::ng-deep legend+*{clear:left}:host ::ng-deep ::-webkit-datetime-edit-fields-wrapper,:host ::ng-deep ::-webkit-datetime-edit-text,:host ::ng-deep ::-webkit-datetime-edit-minute,:host ::ng-deep ::-webkit-datetime-edit-hour-field,:host ::ng-deep ::-webkit-datetime-edit-day-field,:host ::ng-deep ::-webkit-datetime-edit-month-field,:host ::ng-deep ::-webkit-datetime-edit-year-field{padding:0}:host ::ng-deep ::-webkit-inner-spin-button{height:auto}:host ::ng-deep [type=search]{-webkit-appearance:textfield;outline-offset:-2px}:host ::ng-deep [type=search]::-webkit-search-cancel-button{cursor:pointer;filter:grayscale(1)}:host ::ng-deep ::-webkit-search-decoration{-webkit-appearance:none}:host ::ng-deep ::-webkit-color-swatch-wrapper{padding:0}:host ::ng-deep ::file-selector-button{font:inherit;-webkit-appearance:button}:host ::ng-deep output{display:inline-block}:host ::ng-deep iframe{border:0}:host ::ng-deep summary{display:list-item;cursor:pointer}:host ::ng-deep progress{vertical-align:baseline}:host ::ng-deep [hidden]{display:none!important}:host ::ng-deep .table{--bs-table-color-type: initial;--bs-table-bg-type: initial;--bs-table-color-state: initial;--bs-table-bg-state: initial;--bs-table-color: var(--bs-emphasis-color);--bs-table-bg: var(--bs-body-bg);--bs-table-border-color: var(--bs-border-color);--bs-table-accent-bg: transparent;--bs-table-striped-color: var(--bs-emphasis-color);--bs-table-striped-bg: rgba(var(--bs-emphasis-color-rgb), .05);--bs-table-active-color: var(--bs-emphasis-color);--bs-table-active-bg: rgba(var(--bs-emphasis-color-rgb), .1);--bs-table-hover-color: var(--bs-emphasis-color);--bs-table-hover-bg: rgba(var(--bs-emphasis-color-rgb), .075);width:100%;margin-bottom:1rem;vertical-align:top;border-color:var(--bs-table-border-color)}:host ::ng-deep .table>:not(caption)>*>*{padding:.5rem;color:var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);box-shadow:inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)))}:host ::ng-deep .table>tbody{vertical-align:inherit}:host ::ng-deep .table>thead{vertical-align:bottom}:host ::ng-deep .table-group-divider{border-top:calc(var(--bs-border-width) * 2) solid currentcolor}:host ::ng-deep .caption-top{caption-side:top}:host ::ng-deep .table-sm>:not(caption)>*>*{padding:.25rem}:host ::ng-deep .table-bordered>:not(caption)>*{border-width:var(--bs-border-width) 0}:host ::ng-deep .table-bordered>:not(caption)>*>*{border-width:0 var(--bs-border-width)}:host ::ng-deep .table-borderless>:not(caption)>*>*{border-bottom-width:0}:host ::ng-deep .table-borderless>:not(:first-child){border-top-width:0}:host ::ng-deep .table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-color-type: var(--bs-table-striped-color);--bs-table-bg-type: var(--bs-table-striped-bg)}:host ::ng-deep .table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-color-type: var(--bs-table-striped-color);--bs-table-bg-type: var(--bs-table-striped-bg)}:host ::ng-deep .table-active{--bs-table-color-state: var(--bs-table-active-color);--bs-table-bg-state: var(--bs-table-active-bg)}:host ::ng-deep .table-hover>tbody>tr:hover>*{--bs-table-color-state: var(--bs-table-hover-color);--bs-table-bg-state: var(--bs-table-hover-bg)}:host ::ng-deep .table-primary{--bs-table-color: #000;--bs-table-bg: rgb(206.6, 226, 254.6);--bs-table-border-color: rgb(165.28, 180.8, 203.68);--bs-table-striped-bg: rgb(196.27, 214.7, 241.87);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(185.94, 203.4, 229.14);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(191.105, 209.05, 235.505);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-secondary{--bs-table-color: #000;--bs-table-bg: rgb(225.6, 227.4, 229);--bs-table-border-color: rgb(180.48, 181.92, 183.2);--bs-table-striped-bg: rgb(214.32, 216.03, 217.55);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(203.04, 204.66, 206.1);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(208.68, 210.345, 211.825);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-success{--bs-table-color: #000;--bs-table-bg: rgb(209, 231, 220.8);--bs-table-border-color: rgb(167.2, 184.8, 176.64);--bs-table-striped-bg: rgb(198.55, 219.45, 209.76);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(188.1, 207.9, 198.72);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(193.325, 213.675, 204.24);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-info{--bs-table-color: #000;--bs-table-bg: rgb(206.6, 244.4, 252);--bs-table-border-color: rgb(165.28, 195.52, 201.6);--bs-table-striped-bg: rgb(196.27, 232.18, 239.4);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(185.94, 219.96, 226.8);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(191.105, 226.07, 233.1);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-warning{--bs-table-color: #000;--bs-table-bg: rgb(255, 242.6, 205.4);--bs-table-border-color: rgb(204, 194.08, 164.32);--bs-table-striped-bg: rgb(242.25, 230.47, 195.13);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(229.5, 218.34, 184.86);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(235.875, 224.405, 189.995);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-danger{--bs-table-color: #000;--bs-table-bg: rgb(248, 214.6, 217.8);--bs-table-border-color: rgb(198.4, 171.68, 174.24);--bs-table-striped-bg: rgb(235.6, 203.87, 206.91);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(223.2, 193.14, 196.02);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(229.4, 198.505, 201.465);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-light{--bs-table-color: #000;--bs-table-bg: #f8f9fa;--bs-table-border-color: rgb(198.4, 199.2, 200);--bs-table-striped-bg: rgb(235.6, 236.55, 237.5);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(223.2, 224.1, 225);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(229.4, 230.325, 231.25);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-dark{--bs-table-color: #fff;--bs-table-bg: #212529;--bs-table-border-color: rgb(77.4, 80.6, 83.8);--bs-table-striped-bg: rgb(44.1, 47.9, 51.7);--bs-table-striped-color: #fff;--bs-table-active-bg: rgb(55.2, 58.8, 62.4);--bs-table-active-color: #fff;--bs-table-hover-bg: rgb(49.65, 53.35, 57.05);--bs-table-hover-color: #fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media(max-width:575.98px){:host ::ng-deep .table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:767.98px){:host ::ng-deep .table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:991.98px){:host ::ng-deep .table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:1199.98px){:host ::ng-deep .table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:1399.98px){:host ::ng-deep .table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}:host ::ng-deep .nowrap th,:host ::ng-deep td{white-space:nowrap}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.6", type: BsTableComponent, isStandalone: true, selector: "bs-table", inputs: { isResponsive: { classPropertyName: "isResponsive", publicName: "isResponsive", isSignal: true, isRequired: false, transformFunction: null }, striped: { classPropertyName: "striped", publicName: "striped", isSignal: true, isRequired: false, transformFunction: null }, hover: { classPropertyName: "hover", publicName: "hover", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<bs-table-styles>\n <div class=\"d-block\" [class.table-responsive]=\"isResponsive()\" [class.nowrap]=\"isResponsive()\">\n <table class=\"table\" cellspacing=\"0\" role=\"grid\"\n [class.mb-0]=\"isResponsive()\"\n [class.table-striped]=\"striped()\"\n [class.table-hover]=\"hover()\">\n\n <ng-content></ng-content>\n\n </table>\n </div>\n</bs-table-styles>\n", styles: [":host ::ng-deep .nowrap th,:host ::ng-deep td{white-space:nowrap}\n"], dependencies: [{ kind: "component", type: BsTableStylesComponent, selector: "bs-table-styles" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12
21
|
}
|
|
13
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsTableComponent, decorators: [{
|
|
14
23
|
type: Component,
|
|
15
|
-
args: [{ selector: 'bs-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"d-block\" [class.table-responsive]=\"isResponsive()\" [class.nowrap]=\"isResponsive()\">\n <table class=\"table\" cellspacing=\"0\" role=\"grid\"\n [class.mb-0]=\"isResponsive()\"\n [class.table-striped]=\"striped()\"\n [class.table-hover]=\"hover()\">\n\n <ng-content></ng-content>\n\n </table>\n</div>\n", styles: [":host ::ng-deep *,:host ::ng-deep *:before,:host ::ng-deep *:after{box-sizing:border-box}@media(prefers-reduced-motion:no-preference){:host ::ng-deep :root{scroll-behavior:smooth}}:host ::ng-deep body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host ::ng-deep hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:.25}:host ::ng-deep h6,:host ::ng-deep h5,:host ::ng-deep h4,:host ::ng-deep h3,:host ::ng-deep h2,:host ::ng-deep h1{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}:host ::ng-deep h1{font-size:calc(1.375rem + 1.5vw)}@media(min-width:1200px){:host ::ng-deep h1{font-size:2.5rem}}:host ::ng-deep h2{font-size:calc(1.325rem + .9vw)}@media(min-width:1200px){:host ::ng-deep h2{font-size:2rem}}:host ::ng-deep h3{font-size:calc(1.3rem + .6vw)}@media(min-width:1200px){:host ::ng-deep h3{font-size:1.75rem}}:host ::ng-deep h4{font-size:calc(1.275rem + .3vw)}@media(min-width:1200px){:host ::ng-deep h4{font-size:1.5rem}}:host ::ng-deep h5{font-size:1.25rem}:host ::ng-deep h6{font-size:1rem}:host ::ng-deep p{margin-top:0;margin-bottom:1rem}:host ::ng-deep abbr[title]{text-decoration:underline dotted;cursor:help;text-decoration-skip-ink:none}:host ::ng-deep address{margin-bottom:1rem;font-style:normal;line-height:inherit}:host ::ng-deep ol,:host ::ng-deep ul{padding-left:2rem}:host ::ng-deep ol,:host ::ng-deep ul,:host ::ng-deep dl{margin-top:0;margin-bottom:1rem}:host ::ng-deep ol ol,:host ::ng-deep ul ul,:host ::ng-deep ol ul,:host ::ng-deep ul ol{margin-bottom:0}:host ::ng-deep dt{font-weight:700}:host ::ng-deep dd{margin-bottom:.5rem;margin-left:0}:host ::ng-deep blockquote{margin:0 0 1rem}:host ::ng-deep b,:host ::ng-deep strong{font-weight:bolder}:host ::ng-deep small{font-size:.875em}:host ::ng-deep mark{padding:.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}:host ::ng-deep sub,:host ::ng-deep sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}:host ::ng-deep sub{bottom:-.25em}:host ::ng-deep sup{top:-.5em}:host ::ng-deep a{color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity, 1));text-decoration:underline}:host ::ng-deep a:hover{--bs-link-color-rgb: var(--bs-link-hover-color-rgb)}:host ::ng-deep a:not([href]):not([class]),:host ::ng-deep a:not([href]):not([class]):hover{color:inherit;text-decoration:none}:host ::ng-deep pre,:host ::ng-deep code,:host ::ng-deep kbd,:host ::ng-deep samp{font-family:var(--bs-font-monospace);font-size:1em}:host ::ng-deep pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}:host ::ng-deep pre code{font-size:inherit;color:inherit;word-break:normal}:host ::ng-deep code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>:host ::ng-deep code{color:inherit}:host ::ng-deep kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}:host ::ng-deep kbd kbd{padding:0;font-size:1em}:host ::ng-deep figure{margin:0 0 1rem}:host ::ng-deep img,:host ::ng-deep svg{vertical-align:middle}:host ::ng-deep table{caption-side:bottom;border-collapse:collapse}:host ::ng-deep caption{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-secondary-color);text-align:left}:host ::ng-deep th{text-align:inherit;text-align:-webkit-match-parent}:host ::ng-deep thead,:host ::ng-deep tbody,:host ::ng-deep tfoot,:host ::ng-deep tr,:host ::ng-deep td,:host ::ng-deep th{border-color:inherit;border-style:solid;border-width:0}:host ::ng-deep label{display:inline-block}:host ::ng-deep button{border-radius:0}:host ::ng-deep button:focus:not(:focus-visible){outline:0}:host ::ng-deep input,:host ::ng-deep button,:host ::ng-deep select,:host ::ng-deep optgroup,:host ::ng-deep textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}:host ::ng-deep button,:host ::ng-deep select{text-transform:none}:host ::ng-deep [role=button]{cursor:pointer}:host ::ng-deep select{word-wrap:normal}:host ::ng-deep select:disabled{opacity:1}:host ::ng-deep [list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}:host ::ng-deep button,:host ::ng-deep [type=button],:host ::ng-deep [type=reset],:host ::ng-deep [type=submit]{-webkit-appearance:button}:host ::ng-deep button:not(:disabled),:host ::ng-deep [type=button]:not(:disabled),:host ::ng-deep [type=reset]:not(:disabled),:host ::ng-deep [type=submit]:not(:disabled){cursor:pointer}:host ::ng-deep ::-moz-focus-inner{padding:0;border-style:none}:host ::ng-deep textarea{resize:vertical}:host ::ng-deep fieldset{min-width:0;padding:0;margin:0;border:0}:host ::ng-deep legend{float:left;width:100%;padding:0;margin-bottom:.5rem;line-height:inherit;font-size:calc(1.275rem + .3vw)}@media(min-width:1200px){:host ::ng-deep legend{font-size:1.5rem}}:host ::ng-deep legend+*{clear:left}:host ::ng-deep ::-webkit-datetime-edit-fields-wrapper,:host ::ng-deep ::-webkit-datetime-edit-text,:host ::ng-deep ::-webkit-datetime-edit-minute,:host ::ng-deep ::-webkit-datetime-edit-hour-field,:host ::ng-deep ::-webkit-datetime-edit-day-field,:host ::ng-deep ::-webkit-datetime-edit-month-field,:host ::ng-deep ::-webkit-datetime-edit-year-field{padding:0}:host ::ng-deep ::-webkit-inner-spin-button{height:auto}:host ::ng-deep [type=search]{-webkit-appearance:textfield;outline-offset:-2px}:host ::ng-deep [type=search]::-webkit-search-cancel-button{cursor:pointer;filter:grayscale(1)}:host ::ng-deep ::-webkit-search-decoration{-webkit-appearance:none}:host ::ng-deep ::-webkit-color-swatch-wrapper{padding:0}:host ::ng-deep ::file-selector-button{font:inherit;-webkit-appearance:button}:host ::ng-deep output{display:inline-block}:host ::ng-deep iframe{border:0}:host ::ng-deep summary{display:list-item;cursor:pointer}:host ::ng-deep progress{vertical-align:baseline}:host ::ng-deep [hidden]{display:none!important}:host ::ng-deep .table{--bs-table-color-type: initial;--bs-table-bg-type: initial;--bs-table-color-state: initial;--bs-table-bg-state: initial;--bs-table-color: var(--bs-emphasis-color);--bs-table-bg: var(--bs-body-bg);--bs-table-border-color: var(--bs-border-color);--bs-table-accent-bg: transparent;--bs-table-striped-color: var(--bs-emphasis-color);--bs-table-striped-bg: rgba(var(--bs-emphasis-color-rgb), .05);--bs-table-active-color: var(--bs-emphasis-color);--bs-table-active-bg: rgba(var(--bs-emphasis-color-rgb), .1);--bs-table-hover-color: var(--bs-emphasis-color);--bs-table-hover-bg: rgba(var(--bs-emphasis-color-rgb), .075);width:100%;margin-bottom:1rem;vertical-align:top;border-color:var(--bs-table-border-color)}:host ::ng-deep .table>:not(caption)>*>*{padding:.5rem;color:var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);box-shadow:inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)))}:host ::ng-deep .table>tbody{vertical-align:inherit}:host ::ng-deep .table>thead{vertical-align:bottom}:host ::ng-deep .table-group-divider{border-top:calc(var(--bs-border-width) * 2) solid currentcolor}:host ::ng-deep .caption-top{caption-side:top}:host ::ng-deep .table-sm>:not(caption)>*>*{padding:.25rem}:host ::ng-deep .table-bordered>:not(caption)>*{border-width:var(--bs-border-width) 0}:host ::ng-deep .table-bordered>:not(caption)>*>*{border-width:0 var(--bs-border-width)}:host ::ng-deep .table-borderless>:not(caption)>*>*{border-bottom-width:0}:host ::ng-deep .table-borderless>:not(:first-child){border-top-width:0}:host ::ng-deep .table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-color-type: var(--bs-table-striped-color);--bs-table-bg-type: var(--bs-table-striped-bg)}:host ::ng-deep .table-striped-columns>:not(caption)>tr>:nth-child(2n){--bs-table-color-type: var(--bs-table-striped-color);--bs-table-bg-type: var(--bs-table-striped-bg)}:host ::ng-deep .table-active{--bs-table-color-state: var(--bs-table-active-color);--bs-table-bg-state: var(--bs-table-active-bg)}:host ::ng-deep .table-hover>tbody>tr:hover>*{--bs-table-color-state: var(--bs-table-hover-color);--bs-table-bg-state: var(--bs-table-hover-bg)}:host ::ng-deep .table-primary{--bs-table-color: #000;--bs-table-bg: rgb(206.6, 226, 254.6);--bs-table-border-color: rgb(165.28, 180.8, 203.68);--bs-table-striped-bg: rgb(196.27, 214.7, 241.87);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(185.94, 203.4, 229.14);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(191.105, 209.05, 235.505);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-secondary{--bs-table-color: #000;--bs-table-bg: rgb(225.6, 227.4, 229);--bs-table-border-color: rgb(180.48, 181.92, 183.2);--bs-table-striped-bg: rgb(214.32, 216.03, 217.55);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(203.04, 204.66, 206.1);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(208.68, 210.345, 211.825);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-success{--bs-table-color: #000;--bs-table-bg: rgb(209, 231, 220.8);--bs-table-border-color: rgb(167.2, 184.8, 176.64);--bs-table-striped-bg: rgb(198.55, 219.45, 209.76);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(188.1, 207.9, 198.72);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(193.325, 213.675, 204.24);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-info{--bs-table-color: #000;--bs-table-bg: rgb(206.6, 244.4, 252);--bs-table-border-color: rgb(165.28, 195.52, 201.6);--bs-table-striped-bg: rgb(196.27, 232.18, 239.4);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(185.94, 219.96, 226.8);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(191.105, 226.07, 233.1);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-warning{--bs-table-color: #000;--bs-table-bg: rgb(255, 242.6, 205.4);--bs-table-border-color: rgb(204, 194.08, 164.32);--bs-table-striped-bg: rgb(242.25, 230.47, 195.13);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(229.5, 218.34, 184.86);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(235.875, 224.405, 189.995);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-danger{--bs-table-color: #000;--bs-table-bg: rgb(248, 214.6, 217.8);--bs-table-border-color: rgb(198.4, 171.68, 174.24);--bs-table-striped-bg: rgb(235.6, 203.87, 206.91);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(223.2, 193.14, 196.02);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(229.4, 198.505, 201.465);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-light{--bs-table-color: #000;--bs-table-bg: #f8f9fa;--bs-table-border-color: rgb(198.4, 199.2, 200);--bs-table-striped-bg: rgb(235.6, 236.55, 237.5);--bs-table-striped-color: #000;--bs-table-active-bg: rgb(223.2, 224.1, 225);--bs-table-active-color: #000;--bs-table-hover-bg: rgb(229.4, 230.325, 231.25);--bs-table-hover-color: #000;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-dark{--bs-table-color: #fff;--bs-table-bg: #212529;--bs-table-border-color: rgb(77.4, 80.6, 83.8);--bs-table-striped-bg: rgb(44.1, 47.9, 51.7);--bs-table-striped-color: #fff;--bs-table-active-bg: rgb(55.2, 58.8, 62.4);--bs-table-active-color: #fff;--bs-table-hover-bg: rgb(49.65, 53.35, 57.05);--bs-table-hover-color: #fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color)}:host ::ng-deep .table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media(max-width:575.98px){:host ::ng-deep .table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:767.98px){:host ::ng-deep .table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:991.98px){:host ::ng-deep .table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:1199.98px){:host ::ng-deep .table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:1399.98px){:host ::ng-deep .table-responsive-xxl{overflow-x:auto;-webkit-overflow-scrolling:touch}}:host ::ng-deep .nowrap th,:host ::ng-deep td{white-space:nowrap}\n"] }]
|
|
24
|
+
args: [{ selector: 'bs-table', imports: [BsTableStylesComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<bs-table-styles>\n <div class=\"d-block\" [class.table-responsive]=\"isResponsive()\" [class.nowrap]=\"isResponsive()\">\n <table class=\"table\" cellspacing=\"0\" role=\"grid\"\n [class.mb-0]=\"isResponsive()\"\n [class.table-striped]=\"striped()\"\n [class.table-hover]=\"hover()\">\n\n <ng-content></ng-content>\n\n </table>\n </div>\n</bs-table-styles>\n", styles: [":host ::ng-deep .nowrap th,:host ::ng-deep td{white-space:nowrap}\n"] }]
|
|
16
25
|
}], propDecorators: { isResponsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isResponsive", required: false }] }], striped: [{ type: i0.Input, args: [{ isSignal: true, alias: "striped", required: false }] }], hover: [{ type: i0.Input, args: [{ isSignal: true, alias: "hover", required: false }] }] } });
|
|
17
26
|
|
|
18
27
|
/**
|
|
19
28
|
* Generated bundle index. Do not edit.
|
|
20
29
|
*/
|
|
21
30
|
|
|
22
|
-
export { BsTableComponent };
|
|
31
|
+
export { BsTableComponent, BsTableStylesComponent };
|
|
23
32
|
//# sourceMappingURL=mintplayer-ng-bootstrap-table.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-table.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/table/src/component/table.component.ts","../../../../libs/mintplayer-ng-bootstrap/table/src/component/table.component.html","../../../../libs/mintplayer-ng-bootstrap/table/mintplayer-ng-bootstrap-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'bs-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTableComponent {\n isResponsive = input(false);\n striped = input(false);\n hover = input(false);\n}\n","<div class=\"d-block\" [class.table-responsive]=\"isResponsive()\" [class.nowrap]=\"isResponsive()\">\n
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-table.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/table/src/table-styles/table-styles.component.ts","../../../../libs/mintplayer-ng-bootstrap/table/src/component/table.component.ts","../../../../libs/mintplayer-ng-bootstrap/table/src/component/table.component.html","../../../../libs/mintplayer-ng-bootstrap/table/mintplayer-ng-bootstrap-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'bs-table-styles',\n template: '<ng-content></ng-content>',\n styleUrls: ['./table-styles.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTableStylesComponent {}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { BsTableStylesComponent } from '../table-styles/table-styles.component';\n\n@Component({\n selector: 'bs-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n imports: [BsTableStylesComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTableComponent {\n isResponsive = input(false);\n striped = input(false);\n hover = input(false);\n}\n","<bs-table-styles>\n <div class=\"d-block\" [class.table-responsive]=\"isResponsive()\" [class.nowrap]=\"isResponsive()\">\n <table class=\"table\" cellspacing=\"0\" role=\"grid\"\n [class.mb-0]=\"isResponsive()\"\n [class.table-striped]=\"striped()\"\n [class.table-hover]=\"hover()\">\n\n <ng-content></ng-content>\n\n </table>\n </div>\n</bs-table-styles>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAQa,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,2EAJvB,2BAA2B,EA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AAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECV7B,yaAYA,EAAA,MAAA,EAAA,CAAA,qEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDLY,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGrB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,WAGX,CAAC,sBAAsB,CAAC,EAAA,eAAA,EAChB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,yaAAA,EAAA,MAAA,EAAA,CAAA,qEAAA,CAAA,EAAA;;;AERjD;;AAEG;;;;"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, NgZone, input, ChangeDetectionStrategy, Component, TemplateRef, Directive } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/cdk/scrolling';
|
|
5
|
+
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
6
|
+
import { BsTableComponent, BsTableStylesComponent } from '@mintplayer/ng-bootstrap/table';
|
|
7
|
+
import { DatatableSortBase } from '@mintplayer/ng-bootstrap/datatable';
|
|
8
|
+
import { DataSource } from '@angular/cdk/collections';
|
|
9
|
+
import { BehaviorSubject, from, of } from 'rxjs';
|
|
10
|
+
import { startWith, filter, map, distinctUntilChanged, switchMap, catchError } from 'rxjs/operators';
|
|
11
|
+
|
|
12
|
+
class BsVirtualDatatableComponent extends DatatableSortBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.elementRef = inject(ElementRef);
|
|
16
|
+
this.ngZone = inject(NgZone);
|
|
17
|
+
this.dataSource = input.required(...(ngDevMode ? [{ debugName: "dataSource" }] : []));
|
|
18
|
+
this.itemSize = input(48, ...(ngDevMode ? [{ debugName: "itemSize" }] : []));
|
|
19
|
+
}
|
|
20
|
+
ngAfterViewInit() {
|
|
21
|
+
this.setupScrollSync();
|
|
22
|
+
}
|
|
23
|
+
ngOnDestroy() {
|
|
24
|
+
this.scrollCleanup?.();
|
|
25
|
+
}
|
|
26
|
+
setupScrollSync() {
|
|
27
|
+
const el = this.elementRef.nativeElement;
|
|
28
|
+
const headerScrollContainer = el.querySelector('.table-responsive');
|
|
29
|
+
const viewport = el.querySelector('cdk-virtual-scroll-viewport');
|
|
30
|
+
if (!headerScrollContainer || !viewport)
|
|
31
|
+
return;
|
|
32
|
+
let syncing = false;
|
|
33
|
+
const onHeaderScroll = () => {
|
|
34
|
+
if (syncing)
|
|
35
|
+
return;
|
|
36
|
+
syncing = true;
|
|
37
|
+
viewport.scrollLeft = headerScrollContainer.scrollLeft;
|
|
38
|
+
syncing = false;
|
|
39
|
+
};
|
|
40
|
+
const onViewportScroll = () => {
|
|
41
|
+
if (syncing)
|
|
42
|
+
return;
|
|
43
|
+
syncing = true;
|
|
44
|
+
headerScrollContainer.scrollLeft = viewport.scrollLeft;
|
|
45
|
+
syncing = false;
|
|
46
|
+
};
|
|
47
|
+
this.ngZone.runOutsideAngular(() => {
|
|
48
|
+
headerScrollContainer.addEventListener('scroll', onHeaderScroll, { passive: true });
|
|
49
|
+
viewport.addEventListener('scroll', onViewportScroll, { passive: true });
|
|
50
|
+
});
|
|
51
|
+
this.scrollCleanup = () => {
|
|
52
|
+
headerScrollContainer.removeEventListener('scroll', onHeaderScroll);
|
|
53
|
+
viewport.removeEventListener('scroll', onViewportScroll);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsVirtualDatatableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
57
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.6", type: BsVirtualDatatableComponent, isStandalone: true, selector: "bs-virtual-datatable", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<div class=\"virtual-datatable-container\">\n <bs-table [isResponsive]=\"true\" [striped]=\"true\" [hover]=\"true\">\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 && getSortDirection(column.name) === 'ascending'\"\n [class.sort-desc]=\"column.sortable && getSortDirection(column.name) === 'descending'\"\n (mousedown)=\"onHeaderMouseDown($event)\"\n (click)=\"columnHeaderClicked(column, $event)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n @if (settings().sortColumns.length > 1 && getSortIndex(column.name) >= 0) {\n <span class=\"sort-priority\">{{ getSortIndex(column.name) + 1 }}</span>\n }\n </th>\n }\n </tr>\n </thead>\n </bs-table>\n\n <bs-table-styles>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemSize()\" class=\"virtual-scroll-viewport\">\n <table class=\"table table-striped table-hover\">\n <tbody>\n <tr *cdkVirtualFor=\"let item of dataSource()\" class=\"virtual-row\">\n @if (item && rowTemplate) {\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n @for (column of columnsArray; track column) {\n <td> </td>\n }\n }\n </tr>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n </bs-table-styles>\n</div>\n", styles: ["@charset \"UTF-8\";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}bs-table thead th.sort .sort-priority{position:absolute;right:.1em;bottom:.3em;font-size:.65em;font-weight:700;opacity:.7}:host{display:block;height:100%}.virtual-datatable-container{display:flex;flex-direction:column;height:100%}.virtual-datatable-container bs-table{flex-shrink:0}bs-table ::ng-deep table,.virtual-scroll-viewport table{table-layout:fixed}bs-table ::ng-deep .table-responsive{scrollbar-gutter:stable}.virtual-scroll-viewport{flex:1 1 auto;min-height:0;scrollbar-gutter:stable}.virtual-scroll-viewport table{margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: BsTableComponent, selector: "bs-table", inputs: ["isResponsive", "striped", "hover"] }, { kind: "component", type: BsTableStylesComponent, selector: "bs-table-styles" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsVirtualDatatableComponent, decorators: [{
|
|
60
|
+
type: Component,
|
|
61
|
+
args: [{ selector: 'bs-virtual-datatable', imports: [NgTemplateOutlet, ScrollingModule, BsTableComponent, BsTableStylesComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"virtual-datatable-container\">\n <bs-table [isResponsive]=\"true\" [striped]=\"true\" [hover]=\"true\">\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 && getSortDirection(column.name) === 'ascending'\"\n [class.sort-desc]=\"column.sortable && getSortDirection(column.name) === 'descending'\"\n (mousedown)=\"onHeaderMouseDown($event)\"\n (click)=\"columnHeaderClicked(column, $event)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n @if (settings().sortColumns.length > 1 && getSortIndex(column.name) >= 0) {\n <span class=\"sort-priority\">{{ getSortIndex(column.name) + 1 }}</span>\n }\n </th>\n }\n </tr>\n </thead>\n </bs-table>\n\n <bs-table-styles>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemSize()\" class=\"virtual-scroll-viewport\">\n <table class=\"table table-striped table-hover\">\n <tbody>\n <tr *cdkVirtualFor=\"let item of dataSource()\" class=\"virtual-row\">\n @if (item && rowTemplate) {\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n @for (column of columnsArray; track column) {\n <td> </td>\n }\n }\n </tr>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n </bs-table-styles>\n</div>\n", styles: ["@charset \"UTF-8\";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}bs-table thead th.sort .sort-priority{position:absolute;right:.1em;bottom:.3em;font-size:.65em;font-weight:700;opacity:.7}:host{display:block;height:100%}.virtual-datatable-container{display:flex;flex-direction:column;height:100%}.virtual-datatable-container bs-table{flex-shrink:0}bs-table ::ng-deep table,.virtual-scroll-viewport table{table-layout:fixed}bs-table ::ng-deep .table-responsive{scrollbar-gutter:stable}.virtual-scroll-viewport{flex:1 1 auto;min-height:0;scrollbar-gutter:stable}.virtual-scroll-viewport table{margin-bottom:0}\n"] }]
|
|
62
|
+
}], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }] } });
|
|
63
|
+
|
|
64
|
+
class VirtualDatatableDataSource extends DataSource {
|
|
65
|
+
constructor(fetchFn, pageSize = 50) {
|
|
66
|
+
super();
|
|
67
|
+
this.cachedPages = new Map();
|
|
68
|
+
this.totalRecords = 0;
|
|
69
|
+
this.dataStream = new BehaviorSubject([]);
|
|
70
|
+
this.fetchFn = fetchFn;
|
|
71
|
+
this.pageSize = pageSize;
|
|
72
|
+
}
|
|
73
|
+
connect(collectionViewer) {
|
|
74
|
+
// Support reconnection after disconnect (which completes the previous dataStream)
|
|
75
|
+
this.dataStream = new BehaviorSubject([]);
|
|
76
|
+
this.cachedPages.clear();
|
|
77
|
+
this.totalRecords = 0;
|
|
78
|
+
this.subscription = collectionViewer.viewChange.pipe(startWith({ start: 0, end: this.pageSize }), filter(range => range.end > range.start), map(range => this.getPageIndices(range)), distinctUntilChanged((a, b) => a.join() === b.join()), switchMap(pages => from(this.fetchPages(pages)).pipe(catchError(() => of(this.dataStream.value))))).subscribe(data => this.dataStream.next(data));
|
|
79
|
+
return this.dataStream;
|
|
80
|
+
}
|
|
81
|
+
disconnect() {
|
|
82
|
+
this.subscription?.unsubscribe();
|
|
83
|
+
this.dataStream.complete();
|
|
84
|
+
}
|
|
85
|
+
get length() {
|
|
86
|
+
return this.totalRecords;
|
|
87
|
+
}
|
|
88
|
+
reset() {
|
|
89
|
+
this.cachedPages.clear();
|
|
90
|
+
this.totalRecords = 0;
|
|
91
|
+
this.dataStream.next([]);
|
|
92
|
+
}
|
|
93
|
+
getPageIndices(range) {
|
|
94
|
+
const startPage = Math.floor(range.start / this.pageSize);
|
|
95
|
+
const endPage = Math.floor((range.end - 1) / this.pageSize);
|
|
96
|
+
const pages = [];
|
|
97
|
+
for (let i = startPage; i <= endPage; i++) {
|
|
98
|
+
pages.push(i);
|
|
99
|
+
}
|
|
100
|
+
return pages;
|
|
101
|
+
}
|
|
102
|
+
async fetchPages(pageIndices) {
|
|
103
|
+
const uncachedPages = pageIndices.filter(p => !this.cachedPages.has(p));
|
|
104
|
+
const results = await Promise.all(uncachedPages.map(async (pageIndex) => {
|
|
105
|
+
const skip = pageIndex * this.pageSize;
|
|
106
|
+
const result = await this.fetchFn(skip, this.pageSize);
|
|
107
|
+
return { pageIndex, result };
|
|
108
|
+
}));
|
|
109
|
+
for (const { pageIndex, result } of results) {
|
|
110
|
+
this.cachedPages.set(pageIndex, result.data);
|
|
111
|
+
}
|
|
112
|
+
if (results.length > 0) {
|
|
113
|
+
this.totalRecords = results[0].result.totalRecords;
|
|
114
|
+
}
|
|
115
|
+
// Build the full data array with placeholders for unloaded pages
|
|
116
|
+
const totalPages = Math.ceil(this.totalRecords / this.pageSize);
|
|
117
|
+
const data = [];
|
|
118
|
+
for (let i = 0; i < totalPages; i++) {
|
|
119
|
+
const page = this.cachedPages.get(i);
|
|
120
|
+
if (page) {
|
|
121
|
+
data.push(...page);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
// Fill with empty slots to maintain correct virtual scroll positioning
|
|
125
|
+
const remaining = Math.min(this.pageSize, this.totalRecords - i * this.pageSize);
|
|
126
|
+
data.push(...new Array(remaining));
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return data;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
class BsVirtualRowTemplateDirective {
|
|
134
|
+
constructor() {
|
|
135
|
+
this.datatableComponent = inject(BsVirtualDatatableComponent);
|
|
136
|
+
this.templateRef = inject(TemplateRef);
|
|
137
|
+
this.datatableComponent.rowTemplate = this.templateRef;
|
|
138
|
+
}
|
|
139
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsVirtualRowTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
143
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: BsVirtualRowTemplateDirective, isStandalone: true, selector: "[bsVirtualRowTemplate]", ngImport: i0 }); }
|
|
144
|
+
}
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsVirtualRowTemplateDirective, decorators: [{
|
|
146
|
+
type: Directive,
|
|
147
|
+
args: [{
|
|
148
|
+
selector: '[bsVirtualRowTemplate]',
|
|
149
|
+
}]
|
|
150
|
+
}], ctorParameters: () => [] });
|
|
151
|
+
class BsVirtualRowTemplateContext {
|
|
152
|
+
constructor() {
|
|
153
|
+
this.$implicit = null;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Generated bundle index. Do not edit.
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
export { BsVirtualDatatableComponent, BsVirtualRowTemplateContext, BsVirtualRowTemplateDirective, VirtualDatatableDataSource };
|
|
162
|
+
//# sourceMappingURL=mintplayer-ng-bootstrap-virtual-datatable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-virtual-datatable.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/virtual-datatable/src/virtual-datatable/virtual-datatable.component.ts","../../../../libs/mintplayer-ng-bootstrap/virtual-datatable/src/virtual-datatable/virtual-datatable.component.html","../../../../libs/mintplayer-ng-bootstrap/virtual-datatable/src/virtual-datatable-data-source.ts","../../../../libs/mintplayer-ng-bootstrap/virtual-datatable/src/virtual-row-template/virtual-row-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/virtual-datatable/mintplayer-ng-bootstrap-virtual-datatable.ts"],"sourcesContent":["import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, inject, input, NgZone, OnDestroy, TemplateRef } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { BsTableComponent, BsTableStylesComponent } from '@mintplayer/ng-bootstrap/table';\nimport { DatatableSortBase } from '@mintplayer/ng-bootstrap/datatable';\nimport { VirtualDatatableDataSource } from '../virtual-datatable-data-source';\nimport { BsVirtualRowTemplateContext } from '../virtual-row-template/virtual-row-template.directive';\n\n@Component({\n selector: 'bs-virtual-datatable',\n templateUrl: './virtual-datatable.component.html',\n styleUrls: ['./virtual-datatable.component.scss'],\n imports: [NgTemplateOutlet, ScrollingModule, BsTableComponent, BsTableStylesComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsVirtualDatatableComponent<TData> extends DatatableSortBase implements AfterViewInit, OnDestroy {\n\n private readonly elementRef = inject(ElementRef);\n private readonly ngZone = inject(NgZone);\n private scrollCleanup?: () => void;\n\n dataSource = input.required<VirtualDatatableDataSource<TData>>();\n itemSize = input(48);\n\n rowTemplate?: TemplateRef<BsVirtualRowTemplateContext<TData>>;\n\n ngAfterViewInit() {\n this.setupScrollSync();\n }\n\n ngOnDestroy() {\n this.scrollCleanup?.();\n }\n\n private setupScrollSync() {\n const el = this.elementRef.nativeElement as HTMLElement;\n const headerScrollContainer = el.querySelector('.table-responsive') as HTMLElement;\n const viewport = el.querySelector('cdk-virtual-scroll-viewport') as HTMLElement;\n\n if (!headerScrollContainer || !viewport) return;\n\n let syncing = false;\n\n const onHeaderScroll = () => {\n if (syncing) return;\n syncing = true;\n viewport.scrollLeft = headerScrollContainer.scrollLeft;\n syncing = false;\n };\n\n const onViewportScroll = () => {\n if (syncing) return;\n syncing = true;\n headerScrollContainer.scrollLeft = viewport.scrollLeft;\n syncing = false;\n };\n\n this.ngZone.runOutsideAngular(() => {\n headerScrollContainer.addEventListener('scroll', onHeaderScroll, { passive: true });\n viewport.addEventListener('scroll', onViewportScroll, { passive: true });\n });\n\n this.scrollCleanup = () => {\n headerScrollContainer.removeEventListener('scroll', onHeaderScroll);\n viewport.removeEventListener('scroll', onViewportScroll);\n };\n }\n}\n","<div class=\"virtual-datatable-container\">\n <bs-table [isResponsive]=\"true\" [striped]=\"true\" [hover]=\"true\">\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 && getSortDirection(column.name) === 'ascending'\"\n [class.sort-desc]=\"column.sortable && getSortDirection(column.name) === 'descending'\"\n (mousedown)=\"onHeaderMouseDown($event)\"\n (click)=\"columnHeaderClicked(column, $event)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n @if (settings().sortColumns.length > 1 && getSortIndex(column.name) >= 0) {\n <span class=\"sort-priority\">{{ getSortIndex(column.name) + 1 }}</span>\n }\n </th>\n }\n </tr>\n </thead>\n </bs-table>\n\n <bs-table-styles>\n <cdk-virtual-scroll-viewport [itemSize]=\"itemSize()\" class=\"virtual-scroll-viewport\">\n <table class=\"table table-striped table-hover\">\n <tbody>\n <tr *cdkVirtualFor=\"let item of dataSource()\" class=\"virtual-row\">\n @if (item && rowTemplate) {\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n @for (column of columnsArray; track column) {\n <td> </td>\n }\n }\n </tr>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n </bs-table-styles>\n</div>\n","import { CollectionViewer, DataSource } from '@angular/cdk/collections';\nimport { BehaviorSubject, Observable, Subscription, from, of } from 'rxjs';\nimport { catchError, distinctUntilChanged, filter, map, startWith, switchMap } from 'rxjs/operators';\n\nexport class VirtualDatatableDataSource<T> extends DataSource<T> {\n private readonly fetchFn: (skip: number, take: number) => Promise<{ data: T[]; totalRecords: number }>;\n private readonly pageSize: number;\n private readonly cachedPages = new Map<number, T[]>();\n private totalRecords = 0;\n private dataStream = new BehaviorSubject<T[]>([]);\n private subscription?: Subscription;\n\n constructor(\n fetchFn: (skip: number, take: number) => Promise<{ data: T[]; totalRecords: number }>,\n pageSize = 50\n ) {\n super();\n this.fetchFn = fetchFn;\n this.pageSize = pageSize;\n }\n\n connect(collectionViewer: CollectionViewer): Observable<T[]> {\n // Support reconnection after disconnect (which completes the previous dataStream)\n this.dataStream = new BehaviorSubject<T[]>([]);\n this.cachedPages.clear();\n this.totalRecords = 0;\n\n this.subscription = collectionViewer.viewChange.pipe(\n startWith({ start: 0, end: this.pageSize }),\n filter(range => range.end > range.start),\n map(range => this.getPageIndices(range)),\n distinctUntilChanged((a, b) => a.join() === b.join()),\n switchMap(pages => from(this.fetchPages(pages)).pipe(\n catchError(() => of(this.dataStream.value))\n ))\n ).subscribe(data => this.dataStream.next(data));\n\n return this.dataStream;\n }\n\n disconnect(): void {\n this.subscription?.unsubscribe();\n this.dataStream.complete();\n }\n\n get length(): number {\n return this.totalRecords;\n }\n\n reset(): void {\n this.cachedPages.clear();\n this.totalRecords = 0;\n this.dataStream.next([]);\n }\n\n private getPageIndices(range: { start: number; end: number }): number[] {\n const startPage = Math.floor(range.start / this.pageSize);\n const endPage = Math.floor((range.end - 1) / this.pageSize);\n const pages: number[] = [];\n for (let i = startPage; i <= endPage; i++) {\n pages.push(i);\n }\n return pages;\n }\n\n private async fetchPages(pageIndices: number[]): Promise<T[]> {\n const uncachedPages = pageIndices.filter(p => !this.cachedPages.has(p));\n\n const results = await Promise.all(\n uncachedPages.map(async pageIndex => {\n const skip = pageIndex * this.pageSize;\n const result = await this.fetchFn(skip, this.pageSize);\n return { pageIndex, result };\n })\n );\n\n for (const { pageIndex, result } of results) {\n this.cachedPages.set(pageIndex, result.data);\n }\n if (results.length > 0) {\n this.totalRecords = results[0].result.totalRecords;\n }\n\n // Build the full data array with placeholders for unloaded pages\n const totalPages = Math.ceil(this.totalRecords / this.pageSize);\n const data: T[] = [];\n for (let i = 0; i < totalPages; i++) {\n const page = this.cachedPages.get(i);\n if (page) {\n data.push(...page);\n } else {\n // Fill with empty slots to maintain correct virtual scroll positioning\n const remaining = Math.min(this.pageSize, this.totalRecords - i * this.pageSize);\n data.push(...new Array<T>(remaining));\n }\n }\n return data;\n }\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { BsVirtualDatatableComponent } from '../virtual-datatable/virtual-datatable.component';\n\n@Directive({\n selector: '[bsVirtualRowTemplate]',\n})\nexport class BsVirtualRowTemplateDirective<TData> {\n\n private datatableComponent = inject<BsVirtualDatatableComponent<TData>>(BsVirtualDatatableComponent);\n private templateRef = inject<TemplateRef<BsVirtualRowTemplateContext<TData>>>(TemplateRef);\n\n constructor() {\n this.datatableComponent.rowTemplate = this.templateRef;\n }\n\n public static ngTemplateContextGuard<TData>(\n dir: BsVirtualRowTemplateDirective<TData>,\n ctx: any\n ): ctx is BsVirtualRowTemplateContext<Exclude<TData, false | 0 | '' | null | undefined>> {\n return true;\n }\n}\n\nexport class BsVirtualRowTemplateContext<TData = unknown> {\n public $implicit: TData = null!;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAeM,MAAO,2BAAmC,SAAQ,iBAAiB,CAAA;AAPzE,IAAA,WAAA,GAAA;;AASmB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAGxC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,QAAQ,qDAAqC;AAChE,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,EAAE,oDAAC;AA6CrB,IAAA;IAzCC,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A;QACS,IAAA,CAAA,SAAS,GAAU,IAAK;IACjC;AAAC;;ACzBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/ng-bootstrap",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "21.
|
|
4
|
+
"version": "21.11.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/MintPlayer/mintplayer-ng-bootstrap",
|
|
@@ -344,6 +344,10 @@
|
|
|
344
344
|
"types": "./types/mintplayer-ng-bootstrap-viewport.d.ts",
|
|
345
345
|
"default": "./fesm2022/mintplayer-ng-bootstrap-viewport.mjs"
|
|
346
346
|
},
|
|
347
|
+
"./virtual-datatable": {
|
|
348
|
+
"types": "./types/mintplayer-ng-bootstrap-virtual-datatable.d.ts",
|
|
349
|
+
"default": "./fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs"
|
|
350
|
+
},
|
|
347
351
|
"./word-count": {
|
|
348
352
|
"types": "./types/mintplayer-ng-bootstrap-word-count.d.ts",
|
|
349
353
|
"default": "./fesm2022/mintplayer-ng-bootstrap-word-count.mjs"
|
|
@@ -362,7 +366,7 @@
|
|
|
362
366
|
"ngx-highlightjs": "^10.0.0",
|
|
363
367
|
"@mintplayer/ng-click-outside": "^21.2.0",
|
|
364
368
|
"@mintplayer/ng-animations": "^21.1.0",
|
|
365
|
-
"@mintplayer/pagination": "^2.
|
|
369
|
+
"@mintplayer/pagination": "^2.3.0",
|
|
366
370
|
"@mintplayer/ng-focus-on-load": "^21.2.0",
|
|
367
371
|
"@mintplayer/ng-swiper": "^21.3.0",
|
|
368
372
|
"@mintplayer/scheduler-core": "^1.1.0",
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { TemplateRef } from '@angular/core';
|
|
3
|
-
import { PaginationRequest, PaginationResponse } from '@mintplayer/pagination';
|
|
3
|
+
import { SortColumn, PaginationRequest, PaginationResponse } from '@mintplayer/pagination';
|
|
4
4
|
|
|
5
5
|
declare class DatatableSettings {
|
|
6
6
|
constructor(data?: Partial<DatatableSettings>);
|
|
7
|
-
|
|
8
|
-
sortDirection: 'ascending' | 'descending';
|
|
7
|
+
sortColumns: SortColumn[];
|
|
9
8
|
perPage: {
|
|
10
9
|
values: number[];
|
|
11
10
|
selected: number;
|
|
@@ -25,6 +24,18 @@ declare class BsDatatableColumnDirective {
|
|
|
25
24
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BsDatatableColumnDirective, "[bsDatatableColumn]", never, { "name": { "alias": "bsDatatableColumn"; "required": false; }; "sortable": { "alias": "bsDatatableColumnSortable"; "required": false; }; }, {}, never, never, true, never>;
|
|
26
25
|
}
|
|
27
26
|
|
|
27
|
+
declare abstract class DatatableSortBase {
|
|
28
|
+
readonly columns: i0.Signal<readonly BsDatatableColumnDirective[]>;
|
|
29
|
+
get columnsArray(): readonly BsDatatableColumnDirective[];
|
|
30
|
+
settings: i0.ModelSignal<DatatableSettings>;
|
|
31
|
+
getSortIndex(columnName: string): number;
|
|
32
|
+
getSortDirection(columnName: string): 'ascending' | 'descending' | null;
|
|
33
|
+
onHeaderMouseDown(event: MouseEvent): void;
|
|
34
|
+
columnHeaderClicked(column: BsDatatableColumnDirective, event: MouseEvent): void;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatatableSortBase, never>;
|
|
36
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DatatableSortBase, never, never, { "settings": { "alias": "settings"; "required": false; "isSignal": true; }; }, { "settings": "settingsChange"; }, ["columns"], never, true, never>;
|
|
37
|
+
}
|
|
38
|
+
|
|
28
39
|
declare class BsRowTemplateDirective<TData> {
|
|
29
40
|
private datatableComponent;
|
|
30
41
|
private templateRef;
|
|
@@ -38,18 +49,14 @@ declare class BsRowTemplateContext<TData = unknown> {
|
|
|
38
49
|
$implicit: TData;
|
|
39
50
|
}
|
|
40
51
|
|
|
41
|
-
declare class BsDatatableComponent<TData> {
|
|
42
|
-
readonly columns: i0.Signal<readonly BsDatatableColumnDirective[]>;
|
|
52
|
+
declare class BsDatatableComponent<TData> extends DatatableSortBase {
|
|
43
53
|
numberOfColumns: i0.Signal<number>;
|
|
44
|
-
get columnsArray(): readonly BsDatatableColumnDirective[];
|
|
45
|
-
settings: i0.ModelSignal<DatatableSettings>;
|
|
46
54
|
data: i0.ModelSignal<PaginationResponse<TData> | undefined>;
|
|
47
55
|
rowTemplate?: TemplateRef<BsRowTemplateContext<TData>>;
|
|
48
|
-
columnHeaderClicked(column: BsDatatableColumnDirective): void;
|
|
49
56
|
onPerPageChange(perPage: number): void;
|
|
50
57
|
onPageChange(page: number): void;
|
|
51
58
|
static ɵfac: i0.ɵɵFactoryDeclaration<BsDatatableComponent<any>, never>;
|
|
52
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BsDatatableComponent<any>, "bs-datatable", never, { "
|
|
59
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BsDatatableComponent<any>, "bs-datatable", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; }, { "data": "dataChange"; }, never, never, true, never>;
|
|
53
60
|
}
|
|
54
61
|
|
|
55
|
-
export { BsDatatableColumnDirective, BsDatatableComponent, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings };
|
|
62
|
+
export { BsDatatableColumnDirective, BsDatatableComponent, BsRowTemplateContext, BsRowTemplateDirective, DatatableSettings, DatatableSortBase };
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
2
|
|
|
3
3
|
declare class BsTableComponent {
|
|
4
|
-
isResponsive:
|
|
5
|
-
striped:
|
|
6
|
-
hover:
|
|
7
|
-
static ɵfac:
|
|
8
|
-
static ɵcmp:
|
|
4
|
+
isResponsive: i0.InputSignal<boolean>;
|
|
5
|
+
striped: i0.InputSignal<boolean>;
|
|
6
|
+
hover: i0.InputSignal<boolean>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsTableComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BsTableComponent, "bs-table", never, { "isResponsive": { "alias": "isResponsive"; "required": false; "isSignal": true; }; "striped": { "alias": "striped"; "required": false; "isSignal": true; }; "hover": { "alias": "hover"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
declare class BsTableStylesComponent {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsTableStylesComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BsTableStylesComponent, "bs-table-styles", never, {}, {}, never, ["*"], true, never>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { BsTableComponent, BsTableStylesComponent };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnDestroy, TemplateRef } from '@angular/core';
|
|
3
|
+
import { DatatableSortBase } from '@mintplayer/ng-bootstrap/datatable';
|
|
4
|
+
import { DataSource, CollectionViewer } from '@angular/cdk/collections';
|
|
5
|
+
import { Observable } from 'rxjs';
|
|
6
|
+
|
|
7
|
+
declare class VirtualDatatableDataSource<T> extends DataSource<T> {
|
|
8
|
+
private readonly fetchFn;
|
|
9
|
+
private readonly pageSize;
|
|
10
|
+
private readonly cachedPages;
|
|
11
|
+
private totalRecords;
|
|
12
|
+
private dataStream;
|
|
13
|
+
private subscription?;
|
|
14
|
+
constructor(fetchFn: (skip: number, take: number) => Promise<{
|
|
15
|
+
data: T[];
|
|
16
|
+
totalRecords: number;
|
|
17
|
+
}>, pageSize?: number);
|
|
18
|
+
connect(collectionViewer: CollectionViewer): Observable<T[]>;
|
|
19
|
+
disconnect(): void;
|
|
20
|
+
get length(): number;
|
|
21
|
+
reset(): void;
|
|
22
|
+
private getPageIndices;
|
|
23
|
+
private fetchPages;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare class BsVirtualRowTemplateDirective<TData> {
|
|
27
|
+
private datatableComponent;
|
|
28
|
+
private templateRef;
|
|
29
|
+
constructor();
|
|
30
|
+
static ngTemplateContextGuard<TData>(dir: BsVirtualRowTemplateDirective<TData>, ctx: any): ctx is BsVirtualRowTemplateContext<Exclude<TData, false | 0 | '' | null | undefined>>;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsVirtualRowTemplateDirective<any>, never>;
|
|
32
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BsVirtualRowTemplateDirective<any>, "[bsVirtualRowTemplate]", never, {}, {}, never, never, true, never>;
|
|
33
|
+
}
|
|
34
|
+
declare class BsVirtualRowTemplateContext<TData = unknown> {
|
|
35
|
+
$implicit: TData;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class BsVirtualDatatableComponent<TData> extends DatatableSortBase implements AfterViewInit, OnDestroy {
|
|
39
|
+
private readonly elementRef;
|
|
40
|
+
private readonly ngZone;
|
|
41
|
+
private scrollCleanup?;
|
|
42
|
+
dataSource: i0.InputSignal<VirtualDatatableDataSource<TData>>;
|
|
43
|
+
itemSize: i0.InputSignal<number>;
|
|
44
|
+
rowTemplate?: TemplateRef<BsVirtualRowTemplateContext<TData>>;
|
|
45
|
+
ngAfterViewInit(): void;
|
|
46
|
+
ngOnDestroy(): void;
|
|
47
|
+
private setupScrollSync;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsVirtualDatatableComponent<any>, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BsVirtualDatatableComponent<any>, "bs-virtual-datatable", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "itemSize": { "alias": "itemSize"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { BsVirtualDatatableComponent, BsVirtualRowTemplateContext, BsVirtualRowTemplateDirective, VirtualDatatableDataSource };
|