@bootkit/ng0 0.0.0-alpha.7 → 0.0.0-alpha.9
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/components/nav/index.d.ts +23 -19
- package/components/pagination/index.d.ts +38 -3
- package/components/table/index.d.ts +35 -14
- package/data/index.d.ts +17 -5
- package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-accordion.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-backdrop.mjs +3 -3
- package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-button.mjs +11 -11
- package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-card.mjs +11 -11
- package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-code.mjs +9 -9
- package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-collapse.mjs +14 -14
- package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-confirmation.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-form-field.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-modal.mjs +12 -12
- package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-nav.mjs +58 -59
- package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs +9 -9
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-overlay.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-pagination.mjs +61 -23
- package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-popover.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-popover.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-sidenav.mjs +18 -18
- package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-stepper.mjs +12 -12
- package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-table.mjs +87 -90
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-toast.mjs +6 -6
- package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-tooltip.mjs +8 -8
- package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +24 -24
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-data.mjs +25 -6
- package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-file.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-form.mjs +30 -52
- package/fesm2022/bootkit-ng0-form.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-http.mjs +38 -3
- package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization-locales.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization.mjs +202 -91
- package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-platform-browser.mjs +51 -0
- package/fesm2022/bootkit-ng0-platform-browser.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-script.mjs +3 -3
- package/fesm2022/bootkit-ng0-script.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-security.mjs +15 -15
- package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
- package/form/index.d.ts +5 -9
- package/http/index.d.ts +35 -0
- package/localization/index.d.ts +88 -28
- package/package.json +27 -23
- package/platform/browser/index.d.ts +22 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { TemplateRef, Input, ContentChild, Directive, input,
|
|
2
|
+
import { TemplateRef, Input, ContentChild, Directive, input, HostBinding, ContentChildren, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
7
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
|
+
import { formatString } from '@bootkit/ng0/common';
|
|
8
9
|
import * as i3 from '@bootkit/ng0/localization';
|
|
9
10
|
import { LocalizationModule } from '@bootkit/ng0/localization';
|
|
10
|
-
import { formatString } from '@bootkit/ng0/common';
|
|
11
11
|
import { ArrayDataSource, AsyncDataSource, DataSource, DataRequest } from '@bootkit/ng0/data';
|
|
12
|
+
import { PaginationComponent } from '@bootkit/ng0/components/pagination';
|
|
12
13
|
|
|
13
14
|
class TableColumnDirective {
|
|
14
15
|
field;
|
|
@@ -26,10 +27,10 @@ class TableColumnDirective {
|
|
|
26
27
|
filterField;
|
|
27
28
|
constructor() {
|
|
28
29
|
}
|
|
29
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
30
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.3", type: TableColumnDirective, isStandalone: true, selector: "ng0-table-col", inputs: { field: "field", title: "title", emptyCellText: "emptyCellText", type: "type", cellClass: "cellClass", shrink: "shrink", bold: "bold", badge: "badge", filterable: "filterable", filterValue: "filterValue", filterField: "filterField" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 });
|
|
31
32
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TableColumnDirective, decorators: [{
|
|
33
34
|
type: Directive,
|
|
34
35
|
args: [{
|
|
35
36
|
selector: 'ng0-table-col',
|
|
@@ -68,10 +69,10 @@ class TableDetailRowDirective {
|
|
|
68
69
|
constructor(templateRef) {
|
|
69
70
|
this.templateRef = templateRef;
|
|
70
71
|
}
|
|
71
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
72
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
72
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TableDetailRowDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
73
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.3", type: TableDetailRowDirective, isStandalone: true, selector: "[ng0-table-detail-row]", inputs: { showCallback: "showCallback" }, ngImport: i0 });
|
|
73
74
|
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TableDetailRowDirective, decorators: [{
|
|
75
76
|
type: Directive,
|
|
76
77
|
args: [{
|
|
77
78
|
selector: '[ng0-table-detail-row]',
|
|
@@ -81,37 +82,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
|
|
|
81
82
|
type: Input
|
|
82
83
|
}] } });
|
|
83
84
|
|
|
84
|
-
class TablePagingComponent {
|
|
85
|
-
_destroyRef;
|
|
86
|
-
// @Input() dataSource!: DataSource;
|
|
87
|
-
autoLoad = true;
|
|
88
|
-
rowNumber = input(false);
|
|
89
|
-
constructor(_destroyRef) {
|
|
90
|
-
this._destroyRef = _destroyRef;
|
|
91
|
-
}
|
|
92
|
-
ngOnInit() {
|
|
93
|
-
}
|
|
94
|
-
// ngAfterContentInit(): void {
|
|
95
|
-
// }
|
|
96
|
-
ngOnDestroy() {
|
|
97
|
-
}
|
|
98
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: TablePagingComponent, deps: [{ token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
99
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: TablePagingComponent, isStandalone: true, selector: "ng0-table-paging", inputs: { autoLoad: { classPropertyName: "autoLoad", publicName: "autoLoad", isSignal: false, isRequired: false, transformFunction: null }, rowNumber: { classPropertyName: "rowNumber", publicName: "rowNumber", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type:
|
|
100
|
-
// DateModule,
|
|
101
|
-
LocalizationModule }] });
|
|
102
|
-
}
|
|
103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: TablePagingComponent, decorators: [{
|
|
104
|
-
type: Component,
|
|
105
|
-
args: [{ selector: 'ng0-table-paging', standalone: true, imports: [
|
|
106
|
-
CommonModule,
|
|
107
|
-
FormsModule,
|
|
108
|
-
// DateModule,
|
|
109
|
-
LocalizationModule
|
|
110
|
-
], template: "" }]
|
|
111
|
-
}], ctorParameters: () => [{ type: i0.DestroyRef }], propDecorators: { autoLoad: [{
|
|
112
|
-
type: Input
|
|
113
|
-
}] } });
|
|
114
|
-
|
|
115
85
|
class TableComponent {
|
|
116
86
|
_destroyRef;
|
|
117
87
|
/**
|
|
@@ -119,66 +89,81 @@ class TableComponent {
|
|
|
119
89
|
* This can be an array of data, a function that returns an observable of data,
|
|
120
90
|
* or an instance of DataSource.
|
|
121
91
|
*/
|
|
122
|
-
source = input.required();
|
|
92
|
+
source = input.required(...(ngDevMode ? [{ debugName: "source" }] : []));
|
|
123
93
|
/**
|
|
124
94
|
* If true, the table will automatically load data when initialized.
|
|
125
95
|
* This is useful for tables that need to display data immediately without user interaction.
|
|
126
96
|
*/
|
|
127
|
-
autoLoad = input(true);
|
|
97
|
+
autoLoad = input(true, ...(ngDevMode ? [{ debugName: "autoLoad" }] : []));
|
|
128
98
|
/**
|
|
129
99
|
* If true, the table will show row numbers.
|
|
130
100
|
* This will add a column to the left of the table with the row numbers.
|
|
131
101
|
*/
|
|
132
|
-
showRowNumbers = input(false);
|
|
102
|
+
showRowNumbers = input(false, ...(ngDevMode ? [{ debugName: "showRowNumbers" }] : []));
|
|
133
103
|
/**
|
|
134
104
|
* If true, the table will show the header row.
|
|
135
105
|
*/
|
|
136
|
-
showHeader = input(true);
|
|
106
|
+
showHeader = input(true, ...(ngDevMode ? [{ debugName: "showHeader" }] : []));
|
|
137
107
|
/**
|
|
138
108
|
* If true, the table will support pagination.
|
|
139
109
|
* If false, the table will load all records at once.
|
|
140
110
|
*/
|
|
141
|
-
|
|
111
|
+
paging = input(true, ...(ngDevMode ? [{ debugName: "paging" }] : []));
|
|
112
|
+
/**
|
|
113
|
+
* If true, the table will support sorting.
|
|
114
|
+
* This will add a sort icon to each column header.
|
|
115
|
+
*/
|
|
116
|
+
sortable = input(true, ...(ngDevMode ? [{ debugName: "sortable" }] : []));
|
|
142
117
|
/**
|
|
143
|
-
* If true, the table will show
|
|
118
|
+
* If true, the table will show pagination controls at the bottom.
|
|
144
119
|
*/
|
|
145
|
-
showPagination = input(true);
|
|
120
|
+
showPagination = input(true, ...(ngDevMode ? [{ debugName: "showPagination" }] : []));
|
|
146
121
|
/**
|
|
147
122
|
* The number of records to show per page.
|
|
148
123
|
* This is only used if pagable is true.
|
|
149
124
|
*/
|
|
150
|
-
pageSize = input(10);
|
|
125
|
+
pageSize = input(10, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
|
|
151
126
|
/**
|
|
152
|
-
* The
|
|
127
|
+
* The initial page index to load when the table is initialized.
|
|
153
128
|
* This is only used if pagable is true.
|
|
154
|
-
* The
|
|
129
|
+
* The index starts from 1.
|
|
130
|
+
* Default is 1.
|
|
155
131
|
*/
|
|
156
|
-
|
|
132
|
+
initialPageIndex = input(1, ...(ngDevMode ? [{ debugName: "initialPageIndex" }] : []));
|
|
133
|
+
/**
|
|
134
|
+
* Maximum number of visible pages.
|
|
135
|
+
* Default is 10.
|
|
136
|
+
*/
|
|
137
|
+
maxVisiblePages = input(10, ...(ngDevMode ? [{ debugName: "maxVisiblePages" }] : []));
|
|
157
138
|
/**
|
|
158
139
|
* The CSS class to apply to the table element.
|
|
159
140
|
* This can be used to apply custom styles to the table.
|
|
160
141
|
*/
|
|
161
|
-
tableClass = input();
|
|
142
|
+
tableClass = input(...(ngDevMode ? [undefined, { debugName: "tableClass" }] : []));
|
|
162
143
|
/**
|
|
163
144
|
* The CSS class to apply to the header element.
|
|
164
145
|
*/
|
|
165
|
-
headerClass = input();
|
|
146
|
+
headerClass = input(...(ngDevMode ? [undefined, { debugName: "headerClass" }] : []));
|
|
166
147
|
/**
|
|
167
148
|
* The caption of the table.
|
|
168
149
|
*/
|
|
169
|
-
caption = input();
|
|
170
|
-
|
|
150
|
+
caption = input(...(ngDevMode ? [undefined, { debugName: "caption" }] : []));
|
|
151
|
+
/**
|
|
152
|
+
* The height of the table in pixels.
|
|
153
|
+
* This can be used to set a fixed height for the table.
|
|
154
|
+
*/
|
|
155
|
+
height = input(...(ngDevMode ? [undefined, { debugName: "height" }] : []));
|
|
171
156
|
/**
|
|
172
157
|
* If true, the table will support filtering.
|
|
173
158
|
* This will add a filter input to each column header.
|
|
174
159
|
*/
|
|
175
|
-
filterable = input(false);
|
|
160
|
+
filterable = input(false, ...(ngDevMode ? [{ debugName: "filterable" }] : []));
|
|
176
161
|
// @Input() rowColor?: (row: any) => BootstrapColor;
|
|
177
162
|
_columns;
|
|
178
163
|
_detailRow;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
164
|
+
_dataResult;
|
|
165
|
+
_lastRequest; // The last data request made to the data source
|
|
166
|
+
_loadingRequest; // The current data request being processed
|
|
182
167
|
_rowStates = new Map();
|
|
183
168
|
_formatString = formatString;
|
|
184
169
|
_changeSubscription;
|
|
@@ -208,26 +193,40 @@ class TableComponent {
|
|
|
208
193
|
}
|
|
209
194
|
ngAfterContentInit() {
|
|
210
195
|
if (this.autoLoad()) {
|
|
211
|
-
this.
|
|
196
|
+
this.load(this.initialPageIndex());
|
|
212
197
|
}
|
|
213
198
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
let
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
199
|
+
/**
|
|
200
|
+
* Load data for the specified page index (optional).
|
|
201
|
+
* @param pageIndex The page index to load.
|
|
202
|
+
*/
|
|
203
|
+
load(pageIndex) {
|
|
204
|
+
let page;
|
|
205
|
+
let filters = [];
|
|
206
|
+
let sort;
|
|
207
|
+
if (this.filterable()) {
|
|
208
|
+
this._columns.forEach(col => {
|
|
209
|
+
if (col.filterable && col.filterValue != '' && col.filterValue != undefined) {
|
|
210
|
+
filters.push({ field: col.filterField ?? col.field, value: col.filterValue, operator: 'EQ' });
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
if (this.paging()) {
|
|
215
|
+
page = { index: pageIndex || this._lastRequest?.page?.index || 1, size: this.pageSize(), zeroBased: false };
|
|
216
|
+
}
|
|
217
|
+
if (this.sortable()) {
|
|
218
|
+
// sort = ...
|
|
223
219
|
}
|
|
224
|
-
|
|
225
|
-
this._dataSource.load(
|
|
226
|
-
this.
|
|
227
|
-
this.
|
|
228
|
-
this.
|
|
220
|
+
this._loadingRequest = new DataRequest({ page, filters, sort, select: [], computeTotal: true });
|
|
221
|
+
this._dataSource.load(this._loadingRequest).pipe(takeUntilDestroyed(this._destroyRef)).subscribe(result => {
|
|
222
|
+
this._dataResult = result;
|
|
223
|
+
this._lastRequest = this._loadingRequest;
|
|
224
|
+
this._loadingRequest = undefined;
|
|
229
225
|
});
|
|
230
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Determines if the table is currently loading data.
|
|
229
|
+
*/
|
|
231
230
|
get loading() {
|
|
232
231
|
return this._dataSource.loading;
|
|
233
232
|
}
|
|
@@ -241,15 +240,10 @@ class TableComponent {
|
|
|
241
240
|
}
|
|
242
241
|
return value;
|
|
243
242
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
this.reload();
|
|
247
|
-
}
|
|
248
|
-
onPreviousPageClick() {
|
|
249
|
-
// --this.pageIndex
|
|
250
|
-
this.reload();
|
|
243
|
+
_onPageChange(pageIndex) {
|
|
244
|
+
this.load(pageIndex);
|
|
251
245
|
}
|
|
252
|
-
|
|
246
|
+
_onToggleRowDetailClick(row) {
|
|
253
247
|
var state = this._rowStates.get(row);
|
|
254
248
|
if (!state) {
|
|
255
249
|
this._rowStates.set(row, { expanded: true });
|
|
@@ -265,35 +259,38 @@ class TableComponent {
|
|
|
265
259
|
ngOnDestroy() {
|
|
266
260
|
this._changeSubscription?.unsubscribe();
|
|
267
261
|
}
|
|
268
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
269
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: TableComponent, isStandalone: true, selector: "ng0-table", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, autoLoad: { classPropertyName: "autoLoad", publicName: "autoLoad", isSignal: true, isRequired: false, transformFunction: null }, showRowNumbers: { classPropertyName: "showRowNumbers", publicName: "showRowNumbers", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, pagable: { classPropertyName: "pagable", publicName: "pagable", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, tableClass: { classPropertyName: "tableClass", publicName: "tableClass", isSignal: true, isRequired: false, transformFunction: null }, headerClass: { classPropertyName: "headerClass", publicName: "headerClass", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_detailRow", first: true, predicate: TableDetailRowDirective, descendants: true }, { propertyName: "_columns", predicate: TableColumnDirective }], exportAs: ["ng0Table"], ngImport: i0, template: "<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if(caption()) {\r\n <caption>{{caption()}}</caption>\r\n }\r\n\r\n <thead *ngIf=\"showHeader\" [ngClass]=\"headerClass()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n <th *ngIf=\"showRowNumbers()\" class=\"row-number text-muted\">#</th>\r\n <th *ngFor=\"let col of _columns\">{{col.title}}</th>\r\n </tr>\r\n </thead>\r\n <thead *ngIf=\"filterable()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n\r\n @if(showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n <th *ngFor=\"let col of _columns\">\r\n @if(col.filterable) {\r\n @if(col.type == 'text') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"text\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"reload()\">\r\n }@else if(col.type == 'number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"number\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"reload()\">\r\n }\r\n }\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngIf=\"_data && _data.length! > 0\">\r\n <ng-container *ngFor=\"let row of _data; let i=index\">\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n <td class=\"detail-row-expander\" *ngIf=\"_detailRow\">\r\n <button class=\"btn\" (click)=\"onToggleRowDetailClick(row)\"\r\n *ngIf=\"_detailRow.showCallback == null || _detailRow.showCallback(row)\">\r\n <ng-template [ngIf]=\"isRowExpanded(row)\" [ngIfElse]=\"collapse\"><i\r\n class=\"far fa-minus\"></i></ng-template>\r\n <ng-template #collapse><i class=\"far fa-plus\"></i> </ng-template>\r\n </button>\r\n </td>\r\n\r\n <td class=\"row-number text-muted\" *ngIf=\"showRowNumbers()\">{{pageSize() * pageIndex() + i + 1}}</td>\r\n\r\n <td *ngFor=\"let col of _columns\" [ngClass]=\"col.cellClass\" [class.shrinked]=\"col.shrink\"\r\n [class.fw-bold]=\"col.bold\">\r\n @if(col.template){\r\n <ng-template [ngIf]=\"col.template\">\r\n <ng-container\r\n *ngTemplateOutlet=\"col.template; context: {$implicit: row}\"></ng-container>\r\n </ng-template>\r\n }@else if(col.field){\r\n @let cellValue = _getCellValue(row, col);\r\n <div\r\n [class.badge]=\"col.badge\"\r\n [class.text-bg-primary]=\"col.badge?.primary && cellValue === col.badge?.primary\"\r\n [class.text-bg-secondary]=\"col.badge?.secondary && cellValue === col.badge?.secondary\"\r\n [class.text-bg-success]=\"col.badge?.success && cellValue === col.badge?.success\"\r\n [class.text-bg-light]=\"col.badge && cellValue !== col.badge.success && cellValue !== col.badge.secondary && cellValue !== col.badge.success \">\r\n\r\n <ng-container *ngIf=\"col.type=='text'\">\r\n {{cellValue}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='date'\">\r\n <span class=\"date-time\">{{cellValue | ng0Date}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='number'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='currency'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"$any(col?.type)?.enum\">\r\n {{cellValue | ng0Enum:$any(col.type).enum}}\r\n </ng-container>\r\n <!-- <ng-container *ngIf=\"$any(col?.type)?.boolean\">\r\n {{cellValue | ng0Bool:$any(col.type).boolean}}\r\n </ng-container> -->\r\n <ng-container *ngIf=\"$any(col?.type)?.currency\">\r\n {{cellValue | currency:$any(col?.type)?.currency}}\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"cellValue == null && col.emptyCellText\">\r\n {{col.emptyCellText}}\r\n </ng-container>\r\n\r\n\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n\r\n <tr class=\"detail-row\" *ngIf=\"_detailRow && isRowExpanded(row)\">\r\n <td [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\" class=\"ps-2 pb-4\">\r\n <ng-container\r\n *ngTemplateOutlet=\"_detailRow.templateRef; context: {$implicit: row}\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <tr *ngIf=\"_data?.length === 0\">\r\n <td [colSpan]=\"_columns.length + (showRowNumbers() ? 1 : 0)\" class=\"text-center text-muted small p-2\">\r\n {{'noRecords' | ng0Translate}}\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"_dataSource.loading\" class=\"loading-row\">\r\n <td [colSpan]=\"_columns.length + (showRowNumbers() ? 1 : 0)\" class=\"text-center\">\r\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<!-- <ng0-table-paging></ng0-table-paging> -->\r\n\r\n<!-- <div class=\"mt-auto\" *ngIf=\"pagination()\">\r\n <div class=\"btn-group me-2\" role=\"group\">\r\n <button type=\"button\"\r\n class=\"btn btn-outline-primary\"\r\n (click)=\"onPreviousPageClick()\"\r\n [disabled]=\"loading || pageIndex() == 0\">\r\n {{'previous' | ng0Translate}}\r\n </button>\r\n <button type=\"button\"\r\n class=\"btn btn-outline-primary\"\r\n (click)=\"onNextPageClick()\"\r\n [disabled]=\"loading || !_totalPages || (pageIndex() == _totalPages-1)\">\r\n {{'next' | ng0Translate}}\r\n </button>\r\n </div>\r\n\r\n <span *ngIf=\"_totalPages\">\r\n {{_formatString( 'dataTablePagination' | ng0Translate, pageIndex()+1, _totalPages) }}\r\n </span>\r\n</div> -->", styles: [":host{display:flex;flex-direction:column;position:relative}td.row-number{width:0}td.shrinked{width:0;white-space:nowrap}tr.loading-row{position:absolute;inset:0;background-color:#00000014;transition:background-color 1s;z-index:1000}tr.loading-row td{border:none;height:100%;display:flex;justify-content:center;align-items:center}.table-scrollable{overflow-y:auto;direction:ltr;scroll-padding:20px}.table-scrollable::-webkit-scrollbar{width:8px}.table-scrollable::-webkit-scrollbar-track{background-color:#00000008}.table-scrollable::-webkit-scrollbar-thumb{background-color:var(--bs-secondary)}.table-scrollable thead th{position:sticky;top:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i3.TranslatePipe, name: "ng0Translate" }, { kind: "pipe", type: i3.EnumPipe, name: "ng0Enum" }, { kind: "pipe", type: i3.DatePipe, name: "ng0Date" }] });
|
|
262
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TableComponent, deps: [{ token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
263
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: TableComponent, isStandalone: true, selector: "ng0-table", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, autoLoad: { classPropertyName: "autoLoad", publicName: "autoLoad", isSignal: true, isRequired: false, transformFunction: null }, showRowNumbers: { classPropertyName: "showRowNumbers", publicName: "showRowNumbers", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, paging: { classPropertyName: "paging", publicName: "paging", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, showPagination: { classPropertyName: "showPagination", publicName: "showPagination", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, initialPageIndex: { classPropertyName: "initialPageIndex", publicName: "initialPageIndex", isSignal: true, isRequired: false, transformFunction: null }, maxVisiblePages: { classPropertyName: "maxVisiblePages", publicName: "maxVisiblePages", isSignal: true, isRequired: false, transformFunction: null }, tableClass: { classPropertyName: "tableClass", publicName: "tableClass", isSignal: true, isRequired: false, transformFunction: null }, headerClass: { classPropertyName: "headerClass", publicName: "headerClass", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ng0-loading": "this.loading" } }, queries: [{ propertyName: "_detailRow", first: true, predicate: TableDetailRowDirective, descendants: true }, { propertyName: "_columns", predicate: TableColumnDirective }], exportAs: ["ng0Table"], ngImport: i0, template: "@let data = _dataResult?.data;\r\n@let pageIndex = _lastRequest?.page?.index;\r\n\r\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if(caption()) {\r\n <!-- <caption>{{caption()}}</caption> -->\r\n }\r\n\r\n <thead *ngIf=\"showHeader\" [ngClass]=\"headerClass()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n <th *ngIf=\"showRowNumbers()\" class=\"row-number text-muted\">#</th>\r\n <th *ngFor=\"let col of _columns\">{{col.title}}</th>\r\n </tr>\r\n </thead>\r\n <thead *ngIf=\"filterable()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n\r\n @if(showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n <th *ngFor=\"let col of _columns\">\r\n @if(col.filterable) {\r\n @if(col.type == 'text') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"text\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load()\">\r\n }@else if(col.type == 'number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"number\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load()\">\r\n }\r\n }\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngIf=\"data && data.length! > 0\">\r\n <ng-container *ngFor=\"let row of data; let i=index\">\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n <td class=\"detail-row-expander\" *ngIf=\"_detailRow\">\r\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\"\r\n *ngIf=\"_detailRow.showCallback == null || _detailRow.showCallback(row)\">\r\n <ng-template [ngIf]=\"isRowExpanded(row)\" [ngIfElse]=\"collapse\"><i\r\n class=\"far fa-minus\"></i></ng-template>\r\n <ng-template #collapse><i class=\"far fa-plus\"></i> </ng-template>\r\n </button>\r\n </td>\r\n\r\n <td class=\"row-number text-muted\" *ngIf=\"showRowNumbers()\">\r\n @if(pageIndex != undefined) {\r\n {{pageSize() * pageIndex + i + 1}}\r\n }@else {\r\n }\r\n </td>\r\n\r\n <td *ngFor=\"let col of _columns\" [ngClass]=\"col.cellClass\" [class.shrinked]=\"col.shrink\"\r\n [class.fw-bold]=\"col.bold\">\r\n @if(col.template){\r\n <ng-template [ngIf]=\"col.template\">\r\n <ng-container\r\n *ngTemplateOutlet=\"col.template; context: {$implicit: row}\"></ng-container>\r\n </ng-template>\r\n }@else if(col.field){\r\n @let cellValue = _getCellValue(row, col);\r\n <div\r\n [class.badge]=\"col.badge\"\r\n [class.text-bg-primary]=\"col.badge?.primary && cellValue === col.badge?.primary\"\r\n [class.text-bg-secondary]=\"col.badge?.secondary && cellValue === col.badge?.secondary\"\r\n [class.text-bg-success]=\"col.badge?.success && cellValue === col.badge?.success\"\r\n [class.text-bg-light]=\"col.badge && cellValue !== col.badge.success && cellValue !== col.badge.secondary && cellValue !== col.badge.success \">\r\n\r\n <ng-container *ngIf=\"col.type=='text'\">\r\n {{cellValue}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='date'\">\r\n <span class=\"date-time\">{{cellValue | ng0Date}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='number'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='currency'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"$any(col?.type)?.enum\">\r\n {{cellValue | ng0TranslateEnum:$any(col.type).enum}}\r\n </ng-container>\r\n <!-- <ng-container *ngIf=\"$any(col?.type)?.boolean\">\r\n {{cellValue | ng0Bool:$any(col.type).boolean}}\r\n </ng-container> -->\r\n <ng-container *ngIf=\"$any(col?.type)?.currency\">\r\n {{cellValue | currency:$any(col?.type)?.currency}}\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"cellValue == null && col.emptyCellText\">\r\n {{col.emptyCellText}}\r\n </ng-container>\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n\r\n <tr class=\"detail-row\" *ngIf=\"_detailRow && isRowExpanded(row)\">\r\n <td [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\" class=\"ps-2 pb-4\">\r\n <ng-container *ngTemplateOutlet=\"_detailRow.templateRef; context: {$implicit: row}\">\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <tr *ngIf=\"data?.length === 0\">\r\n <td [colSpan]=\"_columns.length + (showRowNumbers() ? 1 : 0)\" class=\"text-center text-muted small p-2\">\r\n {{'noRecords' | ng0Translate}}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\r\n @if(paging() && showPagination() && data) {\r\n @let firstItem = pageSize() * (pageIndex! - 1) + 1;\r\n @let lastItem = firstItem + data.length - 1;\r\n @let totalItems = _dataResult?.total!;\r\n\r\n <div class=\"ng0-paging-options\">\r\n <select name=\"pageSizeOptions\" class=\" form-select w-auto d-inline-block\">\r\n <option [ngValue]=\"10\" selected>10</option>\r\n </select>\r\n </div>\r\n\r\n <div class=\"ng0-paging-controls ms-2\">\r\n <ng0-pagination class=\"mb-0 d-inline-block\"\r\n [showFirstButton]=\"false\"\r\n [showLastButton]=\"false\"\r\n [showNextButton]=\"false\"\r\n [showPreviousButton]=\"false\"\r\n [totalRecords]=\"_dataResult?.total!\"\r\n [pageSize]=\"pageSize()\"\r\n [selectedPage]=\"pageIndex\"\r\n (itemClick)=\"_onPageChange($event)\"\r\n [maxVisiblePages]=\"maxVisiblePages()\">\r\n\r\n <ng-container ngProjectAs=\"first\">\r\n <ng-content select=\"paging-first\">\r\n {{'first' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"last\">\r\n <ng-content select=\"paging-last\">\r\n {{'last' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"next\">\r\n <ng-content select=\"paging-next\">\r\n {{'next' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"previous\">\r\n <ng-content select=\"paging-previous\">\r\n {{'previous' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n </ng0-pagination>\r\n </div>\r\n\r\n <div class=\"ng0-paging-info ms-auto\">\r\n <ng-content select=\"paging-info\">\r\n {{'showing' | ng0Translate}} {{firstItem}}-{{lastItem}} {{'of' | ng0Translate}} {{totalItems}} {{'records' |\r\n ng0Translate}}\r\n </ng-content>\r\n </div>\r\n }\r\n</div>\r\n\r\n\r\n<div *ngIf=\"_dataSource.loading\" class=\"ng0-table-loading-cover text-center\">\r\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\r\n</div>", styles: [":host{display:flex;flex-direction:column;position:relative;min-height:300px}tbody{position:relative}td.row-number{width:0}td.shrinked{width:0;white-space:nowrap}.ng0-table-loading-cover{position:absolute;inset:0;background-color:#0000000d;transition:background-color 1s;z-index:1000;display:flex;align-items:center;justify-content:center}.table-scrollable{overflow-y:auto;direction:ltr;scroll-padding:20px}.table-scrollable::-webkit-scrollbar{width:8px}.table-scrollable::-webkit-scrollbar-track{background-color:#00000008}.table-scrollable::-webkit-scrollbar-thumb{background-color:var(--bs-secondary)}.table-scrollable thead th{position:sticky;top:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: LocalizationModule }, { kind: "component", type: PaginationComponent, selector: "ng0-pagination", inputs: ["totalRecords", "pageSize", "selectedPage", "maxVisiblePages", "showNextButton", "showPreviousButton", "showFirstButton", "showLastButton"], outputs: ["itemClick"], exportAs: ["ng0Pagination"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i3.TranslatePipe, name: "ng0Translate" }, { kind: "pipe", type: i3.TranslateEnumPipe, name: "ng0TranslateEnum" }, { kind: "pipe", type: i3.DatePipe, name: "ng0Date" }] });
|
|
270
264
|
}
|
|
271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TableComponent, decorators: [{
|
|
272
266
|
type: Component,
|
|
273
267
|
args: [{ selector: 'ng0-table', exportAs: 'ng0Table', standalone: true, imports: [
|
|
274
268
|
CommonModule,
|
|
275
269
|
FormsModule,
|
|
276
270
|
LocalizationModule,
|
|
277
|
-
|
|
278
|
-
], template: "<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if(caption()) {\r\n <caption>{{caption()}}</caption>\r\n }\r\n\r\n <thead *ngIf=\"showHeader\" [ngClass]=\"headerClass()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n <th *ngIf=\"showRowNumbers()\" class=\"row-number text-muted\">#</th>\r\n <th *ngFor=\"let col of _columns\">{{col.title}}</th>\r\n </tr>\r\n </thead>\r\n <thead *ngIf=\"filterable()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n\r\n @if(showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n <th *ngFor=\"let col of _columns\">\r\n @if(col.filterable) {\r\n @if(col.type == 'text') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"text\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"reload()\">\r\n }@else if(col.type == 'number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"number\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"reload()\">\r\n }\r\n }\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngIf=\"_data && _data.length! > 0\">\r\n <ng-container *ngFor=\"let row of _data; let i=index\">\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n <td class=\"detail-row-expander\" *ngIf=\"_detailRow\">\r\n <button class=\"btn\" (click)=\"onToggleRowDetailClick(row)\"\r\n *ngIf=\"_detailRow.showCallback == null || _detailRow.showCallback(row)\">\r\n <ng-template [ngIf]=\"isRowExpanded(row)\" [ngIfElse]=\"collapse\"><i\r\n class=\"far fa-minus\"></i></ng-template>\r\n <ng-template #collapse><i class=\"far fa-plus\"></i> </ng-template>\r\n </button>\r\n </td>\r\n\r\n <td class=\"row-number text-muted\" *ngIf=\"showRowNumbers()\">{{pageSize() * pageIndex() + i + 1}}</td>\r\n\r\n <td *ngFor=\"let col of _columns\" [ngClass]=\"col.cellClass\" [class.shrinked]=\"col.shrink\"\r\n [class.fw-bold]=\"col.bold\">\r\n @if(col.template){\r\n <ng-template [ngIf]=\"col.template\">\r\n <ng-container\r\n *ngTemplateOutlet=\"col.template; context: {$implicit: row}\"></ng-container>\r\n </ng-template>\r\n }@else if(col.field){\r\n @let cellValue = _getCellValue(row, col);\r\n <div\r\n [class.badge]=\"col.badge\"\r\n [class.text-bg-primary]=\"col.badge?.primary && cellValue === col.badge?.primary\"\r\n [class.text-bg-secondary]=\"col.badge?.secondary && cellValue === col.badge?.secondary\"\r\n [class.text-bg-success]=\"col.badge?.success && cellValue === col.badge?.success\"\r\n [class.text-bg-light]=\"col.badge && cellValue !== col.badge.success && cellValue !== col.badge.secondary && cellValue !== col.badge.success \">\r\n\r\n <ng-container *ngIf=\"col.type=='text'\">\r\n {{cellValue}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='date'\">\r\n <span class=\"date-time\">{{cellValue | ng0Date}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='number'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='currency'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"$any(col?.type)?.enum\">\r\n {{cellValue | ng0Enum:$any(col.type).enum}}\r\n </ng-container>\r\n <!-- <ng-container *ngIf=\"$any(col?.type)?.boolean\">\r\n {{cellValue | ng0Bool:$any(col.type).boolean}}\r\n </ng-container> -->\r\n <ng-container *ngIf=\"$any(col?.type)?.currency\">\r\n {{cellValue | currency:$any(col?.type)?.currency}}\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"cellValue == null && col.emptyCellText\">\r\n {{col.emptyCellText}}\r\n </ng-container>\r\n\r\n\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n\r\n <tr class=\"detail-row\" *ngIf=\"_detailRow && isRowExpanded(row)\">\r\n <td [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\" class=\"ps-2 pb-4\">\r\n <ng-container\r\n *ngTemplateOutlet=\"_detailRow.templateRef; context: {$implicit: row}\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <tr *ngIf=\"_data?.length === 0\">\r\n <td [colSpan]=\"_columns.length + (showRowNumbers() ? 1 : 0)\" class=\"text-center text-muted small p-2\">\r\n {{'noRecords' | ng0Translate}}\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"_dataSource.loading\" class=\"loading-row\">\r\n <td [colSpan]=\"_columns.length + (showRowNumbers() ? 1 : 0)\" class=\"text-center\">\r\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<!-- <ng0-table-paging></ng0-table-paging> -->\r\n\r\n<!-- <div class=\"mt-auto\" *ngIf=\"pagination()\">\r\n <div class=\"btn-group me-2\" role=\"group\">\r\n <button type=\"button\"\r\n class=\"btn btn-outline-primary\"\r\n (click)=\"onPreviousPageClick()\"\r\n [disabled]=\"loading || pageIndex() == 0\">\r\n {{'previous' | ng0Translate}}\r\n </button>\r\n <button type=\"button\"\r\n class=\"btn btn-outline-primary\"\r\n (click)=\"onNextPageClick()\"\r\n [disabled]=\"loading || !_totalPages || (pageIndex() == _totalPages-1)\">\r\n {{'next' | ng0Translate}}\r\n </button>\r\n </div>\r\n\r\n <span *ngIf=\"_totalPages\">\r\n {{_formatString( 'dataTablePagination' | ng0Translate, pageIndex()+1, _totalPages) }}\r\n </span>\r\n</div> -->", styles: [":host{display:flex;flex-direction:column;position:relative}td.row-number{width:0}td.shrinked{width:0;white-space:nowrap}tr.loading-row{position:absolute;inset:0;background-color:#00000014;transition:background-color 1s;z-index:1000}tr.loading-row td{border:none;height:100%;display:flex;justify-content:center;align-items:center}.table-scrollable{overflow-y:auto;direction:ltr;scroll-padding:20px}.table-scrollable::-webkit-scrollbar{width:8px}.table-scrollable::-webkit-scrollbar-track{background-color:#00000008}.table-scrollable::-webkit-scrollbar-thumb{background-color:var(--bs-secondary)}.table-scrollable thead th{position:sticky;top:0}\n"] }]
|
|
271
|
+
PaginationComponent
|
|
272
|
+
], template: "@let data = _dataResult?.data;\r\n@let pageIndex = _lastRequest?.page?.index;\r\n\r\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if(caption()) {\r\n <!-- <caption>{{caption()}}</caption> -->\r\n }\r\n\r\n <thead *ngIf=\"showHeader\" [ngClass]=\"headerClass()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n <th *ngIf=\"showRowNumbers()\" class=\"row-number text-muted\">#</th>\r\n <th *ngFor=\"let col of _columns\">{{col.title}}</th>\r\n </tr>\r\n </thead>\r\n <thead *ngIf=\"filterable()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n\r\n @if(showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n <th *ngFor=\"let col of _columns\">\r\n @if(col.filterable) {\r\n @if(col.type == 'text') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"text\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load()\">\r\n }@else if(col.type == 'number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"number\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load()\">\r\n }\r\n }\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngIf=\"data && data.length! > 0\">\r\n <ng-container *ngFor=\"let row of data; let i=index\">\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n <td class=\"detail-row-expander\" *ngIf=\"_detailRow\">\r\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\"\r\n *ngIf=\"_detailRow.showCallback == null || _detailRow.showCallback(row)\">\r\n <ng-template [ngIf]=\"isRowExpanded(row)\" [ngIfElse]=\"collapse\"><i\r\n class=\"far fa-minus\"></i></ng-template>\r\n <ng-template #collapse><i class=\"far fa-plus\"></i> </ng-template>\r\n </button>\r\n </td>\r\n\r\n <td class=\"row-number text-muted\" *ngIf=\"showRowNumbers()\">\r\n @if(pageIndex != undefined) {\r\n {{pageSize() * pageIndex + i + 1}}\r\n }@else {\r\n }\r\n </td>\r\n\r\n <td *ngFor=\"let col of _columns\" [ngClass]=\"col.cellClass\" [class.shrinked]=\"col.shrink\"\r\n [class.fw-bold]=\"col.bold\">\r\n @if(col.template){\r\n <ng-template [ngIf]=\"col.template\">\r\n <ng-container\r\n *ngTemplateOutlet=\"col.template; context: {$implicit: row}\"></ng-container>\r\n </ng-template>\r\n }@else if(col.field){\r\n @let cellValue = _getCellValue(row, col);\r\n <div\r\n [class.badge]=\"col.badge\"\r\n [class.text-bg-primary]=\"col.badge?.primary && cellValue === col.badge?.primary\"\r\n [class.text-bg-secondary]=\"col.badge?.secondary && cellValue === col.badge?.secondary\"\r\n [class.text-bg-success]=\"col.badge?.success && cellValue === col.badge?.success\"\r\n [class.text-bg-light]=\"col.badge && cellValue !== col.badge.success && cellValue !== col.badge.secondary && cellValue !== col.badge.success \">\r\n\r\n <ng-container *ngIf=\"col.type=='text'\">\r\n {{cellValue}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='date'\">\r\n <span class=\"date-time\">{{cellValue | ng0Date}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='number'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='currency'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"$any(col?.type)?.enum\">\r\n {{cellValue | ng0TranslateEnum:$any(col.type).enum}}\r\n </ng-container>\r\n <!-- <ng-container *ngIf=\"$any(col?.type)?.boolean\">\r\n {{cellValue | ng0Bool:$any(col.type).boolean}}\r\n </ng-container> -->\r\n <ng-container *ngIf=\"$any(col?.type)?.currency\">\r\n {{cellValue | currency:$any(col?.type)?.currency}}\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"cellValue == null && col.emptyCellText\">\r\n {{col.emptyCellText}}\r\n </ng-container>\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n\r\n <tr class=\"detail-row\" *ngIf=\"_detailRow && isRowExpanded(row)\">\r\n <td [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\" class=\"ps-2 pb-4\">\r\n <ng-container *ngTemplateOutlet=\"_detailRow.templateRef; context: {$implicit: row}\">\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <tr *ngIf=\"data?.length === 0\">\r\n <td [colSpan]=\"_columns.length + (showRowNumbers() ? 1 : 0)\" class=\"text-center text-muted small p-2\">\r\n {{'noRecords' | ng0Translate}}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\r\n @if(paging() && showPagination() && data) {\r\n @let firstItem = pageSize() * (pageIndex! - 1) + 1;\r\n @let lastItem = firstItem + data.length - 1;\r\n @let totalItems = _dataResult?.total!;\r\n\r\n <div class=\"ng0-paging-options\">\r\n <select name=\"pageSizeOptions\" class=\" form-select w-auto d-inline-block\">\r\n <option [ngValue]=\"10\" selected>10</option>\r\n </select>\r\n </div>\r\n\r\n <div class=\"ng0-paging-controls ms-2\">\r\n <ng0-pagination class=\"mb-0 d-inline-block\"\r\n [showFirstButton]=\"false\"\r\n [showLastButton]=\"false\"\r\n [showNextButton]=\"false\"\r\n [showPreviousButton]=\"false\"\r\n [totalRecords]=\"_dataResult?.total!\"\r\n [pageSize]=\"pageSize()\"\r\n [selectedPage]=\"pageIndex\"\r\n (itemClick)=\"_onPageChange($event)\"\r\n [maxVisiblePages]=\"maxVisiblePages()\">\r\n\r\n <ng-container ngProjectAs=\"first\">\r\n <ng-content select=\"paging-first\">\r\n {{'first' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"last\">\r\n <ng-content select=\"paging-last\">\r\n {{'last' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"next\">\r\n <ng-content select=\"paging-next\">\r\n {{'next' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"previous\">\r\n <ng-content select=\"paging-previous\">\r\n {{'previous' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n </ng0-pagination>\r\n </div>\r\n\r\n <div class=\"ng0-paging-info ms-auto\">\r\n <ng-content select=\"paging-info\">\r\n {{'showing' | ng0Translate}} {{firstItem}}-{{lastItem}} {{'of' | ng0Translate}} {{totalItems}} {{'records' |\r\n ng0Translate}}\r\n </ng-content>\r\n </div>\r\n }\r\n</div>\r\n\r\n\r\n<div *ngIf=\"_dataSource.loading\" class=\"ng0-table-loading-cover text-center\">\r\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\r\n</div>", styles: [":host{display:flex;flex-direction:column;position:relative;min-height:300px}tbody{position:relative}td.row-number{width:0}td.shrinked{width:0;white-space:nowrap}.ng0-table-loading-cover{position:absolute;inset:0;background-color:#0000000d;transition:background-color 1s;z-index:1000;display:flex;align-items:center;justify-content:center}.table-scrollable{overflow-y:auto;direction:ltr;scroll-padding:20px}.table-scrollable::-webkit-scrollbar{width:8px}.table-scrollable::-webkit-scrollbar-track{background-color:#00000008}.table-scrollable::-webkit-scrollbar-thumb{background-color:var(--bs-secondary)}.table-scrollable thead th{position:sticky;top:0}\n"] }]
|
|
279
273
|
}], ctorParameters: () => [{ type: i0.DestroyRef }], propDecorators: { _columns: [{
|
|
280
274
|
type: ContentChildren,
|
|
281
275
|
args: [TableColumnDirective]
|
|
282
276
|
}], _detailRow: [{
|
|
283
277
|
type: ContentChild,
|
|
284
278
|
args: [TableDetailRowDirective]
|
|
279
|
+
}], loading: [{
|
|
280
|
+
type: HostBinding,
|
|
281
|
+
args: ['class.ng0-loading']
|
|
285
282
|
}] } });
|
|
286
283
|
|
|
287
284
|
class TableModule {
|
|
288
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
289
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
285
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
286
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: TableModule, imports: [TableComponent,
|
|
290
287
|
TableColumnDirective,
|
|
291
288
|
TableDetailRowDirective], exports: [TableComponent,
|
|
292
289
|
TableColumnDirective,
|
|
293
290
|
TableDetailRowDirective] });
|
|
294
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
291
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TableModule, imports: [TableComponent] });
|
|
295
292
|
}
|
|
296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TableModule, decorators: [{
|
|
297
294
|
type: NgModule,
|
|
298
295
|
args: [{
|
|
299
296
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-table.mjs","sources":["../../../projects/ng0/components/table/table-column.directive.ts","../../../projects/ng0/components/table/table-detail-row.directive.ts","../../../projects/ng0/components/table/paging/paging.component.ts","../../../projects/ng0/components/table/paging/paging.component.html","../../../projects/ng0/components/table/table.component.ts","../../../projects/ng0/components/table/table.component.html","../../../projects/ng0/components/table/table.module.ts","../../../projects/ng0/components/table/bootkit-ng0-components-table.ts"],"sourcesContent":["import { ContentChild, Directive, Input, TemplateRef } from '@angular/core';\r\n\r\nexport type DataTableColumnBadgeValueType = string | number | boolean;\r\n\r\n@Directive({\r\n selector: 'ng0-table-col',\r\n standalone: true,\r\n})\r\nexport class TableColumnDirective {\r\n @Input() field?: string;\r\n @Input() title?: string;\r\n @Input() emptyCellText?: string;\r\n\r\n /** Column type */\r\n @Input() type: 'text' | 'number' | 'currency' | 'date' | 'time' | {\r\n enum?: string,\r\n boolean?: {falseKey?: string, trueKey?: string},\r\n currency?: string,\r\n } = 'text';\r\n @ContentChild(TemplateRef) template?: TemplateRef<any>;\r\n @Input() cellClass?: string | string[] | { [klass: string]: any; } | null | undefined;\r\n @Input() shrink = false;\r\n @Input() bold = false;\r\n @Input() badge?: { primary?: DataTableColumnBadgeValueType, secondary?: DataTableColumnBadgeValueType, success?: DataTableColumnBadgeValueType };\r\n @Input() filterable = false;\r\n @Input() filterValue?: string;\r\n @Input() filterField?: string;\r\n\r\n constructor() {\r\n }\r\n}\r\n","import { Directive, Input, TemplateRef } from '@angular/core';\r\n\r\n\r\n@Directive({\r\n selector: '[ng0-table-detail-row]',\r\n standalone: true,\r\n})\r\nexport class TableDetailRowDirective {\r\n @Input() showCallback?: (row: any) => boolean;\r\n\r\n constructor(public readonly templateRef: TemplateRef<any>) {\r\n }\r\n}\r\n","import { AfterContentInit, Component, DestroyRef, input, Input, OnDestroy, OnInit } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { LocalizationModule } from '@bootkit/ng0/localization';\r\n\r\n@Component({\r\n selector: 'ng0-table-paging',\r\n templateUrl: './paging.component.html',\r\n // styleUrls: ['./paging.component.scss'],\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n // DateModule,\r\n LocalizationModule\r\n ]\r\n})\r\nexport class TablePagingComponent implements OnInit, OnDestroy {\r\n // @Input() dataSource!: DataSource;\r\n @Input() autoLoad = true;\r\n rowNumber = input<boolean>(false);\r\n\r\n\r\n constructor(private _destroyRef: DestroyRef) {\r\n }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n // ngAfterContentInit(): void {\r\n // }\r\n\r\n ngOnDestroy(): void {\r\n }\r\n}\r\n","","import { AfterContentInit, Component, ContentChild, ContentChildren, DestroyRef, input, OnDestroy, OnInit, QueryList } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { TableColumnDirective } from './table-column.directive';\r\nimport { TableDetailRowDirective } from './table-detail-row.directive';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { TablePagingComponent } from './paging/paging.component';\r\nimport { formatString } from '@bootkit/ng0/common';\r\nimport { LocalizationModule } from '@bootkit/ng0/localization';\r\nimport { ArrayDataSource, AsyncDataSource, DataLoader, DataRequest, DataRequestFilter, DataSource } from '@bootkit/ng0/data';\r\n\r\n@Component({\r\n selector: 'ng0-table',\r\n exportAs: 'ng0Table',\r\n templateUrl: './table.component.html',\r\n styleUrls: ['./table.component.scss'],\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n LocalizationModule,\r\n TablePagingComponent\r\n ]\r\n})\r\nexport class TableComponent implements OnInit, AfterContentInit, OnDestroy {\r\n /**\r\n * The data source for the table.\r\n * This can be an array of data, a function that returns an observable of data,\r\n * or an instance of DataSource.\r\n */\r\n public source = input.required<Array<any> | DataLoader | DataSource | undefined | null>();\r\n\r\n /**\r\n * If true, the table will automatically load data when initialized.\r\n * This is useful for tables that need to display data immediately without user interaction.\r\n */\r\n public autoLoad = input(true);\r\n\r\n /**\r\n * If true, the table will show row numbers.\r\n * This will add a column to the left of the table with the row numbers.\r\n */\r\n public showRowNumbers = input(false);\r\n\r\n /** \r\n * If true, the table will show the header row.\r\n */\r\n public showHeader = input(true);\r\n\r\n /**\r\n * If true, the table will support pagination.\r\n * If false, the table will load all records at once.\r\n */\r\n public pagable = input(true);\r\n\r\n /**\r\n * If true, the table will show a pagination controls at the bottom.\r\n */\r\n public showPagination = input(true);\r\n\r\n /** \r\n * The number of records to show per page.\r\n * This is only used if pagable is true.\r\n */\r\n public pageSize = input(10);\r\n\r\n /**\r\n * The current page index.\r\n * This is only used if pagable is true.\r\n * The first page is 0.\r\n */\r\n public pageIndex = input(0);\r\n\r\n /**\r\n * The CSS class to apply to the table element.\r\n * This can be used to apply custom styles to the table.\r\n */\r\n public tableClass = input<string | string[]>();\r\n\r\n /**\r\n * The CSS class to apply to the header element.\r\n */\r\n public headerClass = input<string>();\r\n\r\n /**\r\n * The caption of the table.\r\n */\r\n public caption = input<string>();\r\n public height = input<number>();\r\n\r\n /**\r\n * If true, the table will support filtering.\r\n * This will add a filter input to each column header.\r\n */\r\n public filterable = input(false);\r\n\r\n // @Input() rowColor?: (row: any) => BootstrapColor;\r\n\r\n @ContentChildren(TableColumnDirective)\r\n protected _columns!: QueryList<TableColumnDirective>;\r\n\r\n @ContentChild(TableDetailRowDirective)\r\n protected _detailRow?: TableDetailRowDirective;\r\n\r\n protected _data?: any[];\r\n protected _totalRecords?: number;\r\n protected _totalPages?: number;\r\n protected _rowStates = new Map<any, { expanded: boolean }>();\r\n protected _formatString = formatString;\r\n private _changeSubscription?: Subscription;\r\n protected _dataSource!: DataSource;\r\n\r\n constructor(private _destroyRef: DestroyRef) {\r\n }\r\n\r\n ngOnInit(): void {\r\n if (Array.isArray(this.source())) {\r\n this._dataSource = new ArrayDataSource(this.source() as Array<any>);\r\n } else if (typeof this.source() == 'function') {\r\n this._dataSource = new AsyncDataSource(this.source() as DataLoader);\r\n } else if (this.source() instanceof DataSource) {\r\n this._dataSource = this.source() as DataSource;\r\n } else if (this.source() == undefined) {\r\n this._dataSource = new ArrayDataSource([]);\r\n } else {\r\n throw new Error('Invalid data source provided to ng0-table.');\r\n }\r\n\r\n // this._changeSubscription = this.dataSource().change.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(result => {\r\n // this.reload();\r\n // });\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n if (this.autoLoad()) {\r\n this.reload();\r\n }\r\n }\r\n\r\n reload() {\r\n const filters = this._columns\r\n .filter(x => x.filterable && x.filterValue != '' && x.filterValue != undefined)\r\n .map(col => ({ field: col.filterField ?? col.field!, value: col.filterValue, operator: 'EQ' }));\r\n let pageIndex: number | undefined;\r\n let pageSize: number | undefined;\r\n\r\n if (this.pagable()) {\r\n pageIndex = this.pageIndex();\r\n pageSize = this.pageSize();\r\n }\r\n\r\n var dr = new DataRequest({ pageIndex, pageSize, filters })\r\n this._dataSource.load(dr).pipe(takeUntilDestroyed(this._destroyRef)).subscribe(result => {\r\n this._data = result.data;\r\n this._totalRecords = result.total;\r\n this._totalPages = Math.ceil(result.total! / this.pageSize());\r\n });\r\n }\r\n\r\n get loading() {\r\n return this._dataSource.loading;\r\n }\r\n\r\n protected _getCellValue(row: any, col: TableColumnDirective) {\r\n var subFields = col.field!.split('.');\r\n let value = row[subFields[0]];\r\n for (let i = 1; i < subFields.length; i++) {\r\n if (value == null) break;\r\n value = value[subFields[i]];\r\n }\r\n\r\n return value;\r\n }\r\n\r\n protected onNextPageClick() {\r\n // ++this.pageIndex()\r\n this.reload();\r\n }\r\n\r\n protected onPreviousPageClick() {\r\n // --this.pageIndex\r\n this.reload();\r\n }\r\n\r\n protected onToggleRowDetailClick(row: any) {\r\n var state = this._rowStates.get(row)\r\n if (!state) {\r\n this._rowStates.set(row, { expanded: true });\r\n } else {\r\n state.expanded = !state.expanded;\r\n }\r\n }\r\n\r\n protected isRowExpanded(row: any) {\r\n var state = this._rowStates.get(row)\r\n return state == undefined ? false : state.expanded;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._changeSubscription?.unsubscribe();\r\n }\r\n}\r\n","<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if(caption()) {\r\n <caption>{{caption()}}</caption>\r\n }\r\n\r\n <thead *ngIf=\"showHeader\" [ngClass]=\"headerClass()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n <th *ngIf=\"showRowNumbers()\" class=\"row-number text-muted\">#</th>\r\n <th *ngFor=\"let col of _columns\">{{col.title}}</th>\r\n </tr>\r\n </thead>\r\n <thead *ngIf=\"filterable()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n\r\n @if(showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n <th *ngFor=\"let col of _columns\">\r\n @if(col.filterable) {\r\n @if(col.type == 'text') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"text\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"reload()\">\r\n }@else if(col.type == 'number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"number\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"reload()\">\r\n }\r\n }\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngIf=\"_data && _data.length! > 0\">\r\n <ng-container *ngFor=\"let row of _data; let i=index\">\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n <td class=\"detail-row-expander\" *ngIf=\"_detailRow\">\r\n <button class=\"btn\" (click)=\"onToggleRowDetailClick(row)\"\r\n *ngIf=\"_detailRow.showCallback == null || _detailRow.showCallback(row)\">\r\n <ng-template [ngIf]=\"isRowExpanded(row)\" [ngIfElse]=\"collapse\"><i\r\n class=\"far fa-minus\"></i></ng-template>\r\n <ng-template #collapse><i class=\"far fa-plus\"></i> </ng-template>\r\n </button>\r\n </td>\r\n\r\n <td class=\"row-number text-muted\" *ngIf=\"showRowNumbers()\">{{pageSize() * pageIndex() + i + 1}}</td>\r\n\r\n <td *ngFor=\"let col of _columns\" [ngClass]=\"col.cellClass\" [class.shrinked]=\"col.shrink\"\r\n [class.fw-bold]=\"col.bold\">\r\n @if(col.template){\r\n <ng-template [ngIf]=\"col.template\">\r\n <ng-container\r\n *ngTemplateOutlet=\"col.template; context: {$implicit: row}\"></ng-container>\r\n </ng-template>\r\n }@else if(col.field){\r\n @let cellValue = _getCellValue(row, col);\r\n <div\r\n [class.badge]=\"col.badge\"\r\n [class.text-bg-primary]=\"col.badge?.primary && cellValue === col.badge?.primary\"\r\n [class.text-bg-secondary]=\"col.badge?.secondary && cellValue === col.badge?.secondary\"\r\n [class.text-bg-success]=\"col.badge?.success && cellValue === col.badge?.success\"\r\n [class.text-bg-light]=\"col.badge && cellValue !== col.badge.success && cellValue !== col.badge.secondary && cellValue !== col.badge.success \">\r\n\r\n <ng-container *ngIf=\"col.type=='text'\">\r\n {{cellValue}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='date'\">\r\n <span class=\"date-time\">{{cellValue | ng0Date}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='number'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='currency'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"$any(col?.type)?.enum\">\r\n {{cellValue | ng0Enum:$any(col.type).enum}}\r\n </ng-container>\r\n <!-- <ng-container *ngIf=\"$any(col?.type)?.boolean\">\r\n {{cellValue | ng0Bool:$any(col.type).boolean}}\r\n </ng-container> -->\r\n <ng-container *ngIf=\"$any(col?.type)?.currency\">\r\n {{cellValue | currency:$any(col?.type)?.currency}}\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"cellValue == null && col.emptyCellText\">\r\n {{col.emptyCellText}}\r\n </ng-container>\r\n\r\n\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n\r\n <tr class=\"detail-row\" *ngIf=\"_detailRow && isRowExpanded(row)\">\r\n <td [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\" class=\"ps-2 pb-4\">\r\n <ng-container\r\n *ngTemplateOutlet=\"_detailRow.templateRef; context: {$implicit: row}\"></ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <tr *ngIf=\"_data?.length === 0\">\r\n <td [colSpan]=\"_columns.length + (showRowNumbers() ? 1 : 0)\" class=\"text-center text-muted small p-2\">\r\n {{'noRecords' | ng0Translate}}\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"_dataSource.loading\" class=\"loading-row\">\r\n <td [colSpan]=\"_columns.length + (showRowNumbers() ? 1 : 0)\" class=\"text-center\">\r\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<!-- <ng0-table-paging></ng0-table-paging> -->\r\n\r\n<!-- <div class=\"mt-auto\" *ngIf=\"pagination()\">\r\n <div class=\"btn-group me-2\" role=\"group\">\r\n <button type=\"button\"\r\n class=\"btn btn-outline-primary\"\r\n (click)=\"onPreviousPageClick()\"\r\n [disabled]=\"loading || pageIndex() == 0\">\r\n {{'previous' | ng0Translate}}\r\n </button>\r\n <button type=\"button\"\r\n class=\"btn btn-outline-primary\"\r\n (click)=\"onNextPageClick()\"\r\n [disabled]=\"loading || !_totalPages || (pageIndex() == _totalPages-1)\">\r\n {{'next' | ng0Translate}}\r\n </button>\r\n </div>\r\n\r\n <span *ngIf=\"_totalPages\">\r\n {{_formatString( 'dataTablePagination' | ng0Translate, pageIndex()+1, _totalPages) }}\r\n </span>\r\n</div> -->","import { NgModule } from '@angular/core';\r\nimport { TableColumnDirective } from './table-column.directive';\r\nimport { TableComponent } from './table.component';\r\nimport { TableDetailRowDirective } from './table-detail-row.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n TableComponent,\r\n TableColumnDirective,\r\n TableDetailRowDirective,\r\n ],\r\n exports: [\r\n TableComponent,\r\n TableColumnDirective,\r\n TableDetailRowDirective\r\n ],\r\n})\r\nexport class TableModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAQa,oBAAoB,CAAA;AACtB,IAAA,KAAK;AACL,IAAA,KAAK;AACL,IAAA,aAAa;;IAGb,IAAI,GAIT,MAAM;AACiB,IAAA,QAAQ;AAC1B,IAAA,SAAS;IACT,MAAM,GAAG,KAAK;IACd,IAAI,GAAG,KAAK;AACZ,IAAA,KAAK;IACL,UAAU,GAAG,KAAK;AAClB,IAAA,WAAW;AACX,IAAA,WAAW;AAEpB,IAAA,WAAA,GAAA;;uGApBW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,mWAWjB,WAAW,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAXd,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;wDAEU,KAAK,EAAA,CAAA;sBAAb;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,aAAa,EAAA,CAAA;sBAArB;gBAGQ,IAAI,EAAA,CAAA;sBAAZ;gBAK0B,QAAQ,EAAA,CAAA;sBAAlC,YAAY;uBAAC,WAAW;gBAChB,SAAS,EAAA,CAAA;sBAAjB;gBACQ,MAAM,EAAA,CAAA;sBAAd;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,UAAU,EAAA,CAAA;sBAAl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AAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAVhB,cAAc;YACd,oBAAoB;AACpB,YAAA,uBAAuB,aAGvB,cAAc;YACd,oBAAoB;YACpB,uBAAuB,CAAA,EAAA,CAAA;AAGlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAVhB,cAAc,CAAA,EAAA,CAAA;;2FAUT,WAAW,EAAA,UAAA,EAAA,CAAA;kBAZvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,cAAc;wBACd,oBAAoB;wBACpB,uBAAuB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,cAAc;wBACd,oBAAoB;wBACpB;AACH,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-table.mjs","sources":["../../../projects/ng0/components/table/table-column.directive.ts","../../../projects/ng0/components/table/table-detail-row.directive.ts","../../../projects/ng0/components/table/table.component.ts","../../../projects/ng0/components/table/table.component.html","../../../projects/ng0/components/table/table.module.ts","../../../projects/ng0/components/table/bootkit-ng0-components-table.ts"],"sourcesContent":["import { ContentChild, Directive, Input, TemplateRef } from '@angular/core';\r\n\r\nexport type DataTableColumnBadgeValueType = string | number | boolean;\r\n\r\n@Directive({\r\n selector: 'ng0-table-col',\r\n standalone: true,\r\n})\r\nexport class TableColumnDirective {\r\n @Input() field?: string;\r\n @Input() title?: string;\r\n @Input() emptyCellText?: string;\r\n\r\n /** Column type */\r\n @Input() type: 'text' | 'number' | 'currency' | 'date' | 'time' | {\r\n enum?: string,\r\n boolean?: {falseKey?: string, trueKey?: string},\r\n currency?: string,\r\n } = 'text';\r\n @ContentChild(TemplateRef) template?: TemplateRef<any>;\r\n @Input() cellClass?: string | string[] | { [klass: string]: any; } | null | undefined;\r\n @Input() shrink = false;\r\n @Input() bold = false;\r\n @Input() badge?: { primary?: DataTableColumnBadgeValueType, secondary?: DataTableColumnBadgeValueType, success?: DataTableColumnBadgeValueType };\r\n @Input() filterable = false;\r\n @Input() filterValue?: string;\r\n @Input() filterField?: string;\r\n\r\n constructor() {\r\n }\r\n}\r\n","import { Directive, Input, TemplateRef } from '@angular/core';\r\n\r\n\r\n@Directive({\r\n selector: '[ng0-table-detail-row]',\r\n standalone: true,\r\n})\r\nexport class TableDetailRowDirective {\r\n @Input() showCallback?: (row: any) => boolean;\r\n\r\n constructor(public readonly templateRef: TemplateRef<any>) {\r\n }\r\n}\r\n","import { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, ContentChildren, DestroyRef, Host, HostBinding, input, model, OnDestroy, OnInit, QueryList } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { TableColumnDirective } from './table-column.directive';\r\nimport { TableDetailRowDirective } from './table-detail-row.directive';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { formatString } from '@bootkit/ng0/common';\r\nimport { LocalizationModule } from '@bootkit/ng0/localization';\r\nimport { ArrayDataSource, AsyncDataSource, DataLoader, DataRequest, DataRequestFilter, DataRequestPage, DataRequestSort, DataResult, DataSource } from '@bootkit/ng0/data';\r\nimport { PaginationComponent } from '@bootkit/ng0/components/pagination';\r\n\r\n@Component({\r\n selector: 'ng0-table',\r\n exportAs: 'ng0Table',\r\n templateUrl: './table.component.html',\r\n styleUrls: ['./table.component.scss'],\r\n // changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n LocalizationModule,\r\n PaginationComponent\r\n ]\r\n})\r\nexport class TableComponent implements OnInit, AfterContentInit, OnDestroy {\r\n\r\n /**\r\n * The data source for the table.\r\n * This can be an array of data, a function that returns an observable of data,\r\n * or an instance of DataSource.\r\n */\r\n public source = input.required<Array<any> | DataLoader | DataSource | undefined | null>();\r\n\r\n /**\r\n * If true, the table will automatically load data when initialized.\r\n * This is useful for tables that need to display data immediately without user interaction.\r\n */\r\n public autoLoad = input(true);\r\n\r\n /**\r\n * If true, the table will show row numbers.\r\n * This will add a column to the left of the table with the row numbers.\r\n */\r\n public showRowNumbers = input(false);\r\n\r\n /** \r\n * If true, the table will show the header row.\r\n */\r\n public showHeader = input(true);\r\n\r\n /**\r\n * If true, the table will support pagination.\r\n * If false, the table will load all records at once.\r\n */\r\n public paging = input(true);\r\n\r\n /**\r\n * If true, the table will support sorting.\r\n * This will add a sort icon to each column header.\r\n */\r\n public sortable = input(true);\r\n\r\n /**\r\n * If true, the table will show pagination controls at the bottom.\r\n */\r\n public showPagination = input(true);\r\n\r\n /** \r\n * The number of records to show per page.\r\n * This is only used if pagable is true.\r\n */\r\n public pageSize = input(10);\r\n\r\n /**\r\n * The initial page index to load when the table is initialized.\r\n * This is only used if pagable is true.\r\n * The index starts from 1.\r\n * Default is 1.\r\n */\r\n public initialPageIndex = input(1);\r\n\r\n /**\r\n * Maximum number of visible pages.\r\n * Default is 10.\r\n */\r\n public maxVisiblePages = input<number>(10);\r\n\r\n /**\r\n * The CSS class to apply to the table element.\r\n * This can be used to apply custom styles to the table.\r\n */\r\n public tableClass = input<string | string[]>();\r\n\r\n /**\r\n * The CSS class to apply to the header element.\r\n */\r\n public headerClass = input<string>();\r\n\r\n /**\r\n * The caption of the table.\r\n */\r\n public caption = input<string>();\r\n\r\n /**\r\n * The height of the table in pixels.\r\n * This can be used to set a fixed height for the table.\r\n */\r\n public height = input<number>();\r\n\r\n /**\r\n * If true, the table will support filtering.\r\n * This will add a filter input to each column header.\r\n */\r\n public filterable = input(false);\r\n\r\n // @Input() rowColor?: (row: any) => BootstrapColor;\r\n\r\n @ContentChildren(TableColumnDirective)\r\n protected _columns!: QueryList<TableColumnDirective>;\r\n\r\n @ContentChild(TableDetailRowDirective)\r\n protected _detailRow?: TableDetailRowDirective;\r\n\r\n protected _dataResult?: DataResult;\r\n protected _lastRequest?: DataRequest; // The last data request made to the data source\r\n protected _loadingRequest?: DataRequest; // The current data request being processed\r\n protected _rowStates = new Map<any, { expanded: boolean }>();\r\n protected _formatString = formatString;\r\n private _changeSubscription?: Subscription;\r\n protected _dataSource!: DataSource;\r\n\r\n constructor(private _destroyRef: DestroyRef) {\r\n }\r\n\r\n ngOnInit(): void {\r\n if (Array.isArray(this.source())) {\r\n this._dataSource = new ArrayDataSource(this.source() as Array<any>);\r\n } else if (typeof this.source() == 'function') {\r\n this._dataSource = new AsyncDataSource(this.source() as DataLoader);\r\n } else if (this.source() instanceof DataSource) {\r\n this._dataSource = this.source() as DataSource;\r\n } else if (this.source() == undefined) {\r\n this._dataSource = new ArrayDataSource([]);\r\n } else {\r\n throw new Error('Invalid data source provided to ng0-table.');\r\n }\r\n\r\n // this._changeSubscription = this.dataSource().change.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(result => {\r\n // this.reload();\r\n // });\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n if (this.autoLoad()) {\r\n this.load(this.initialPageIndex());\r\n }\r\n }\r\n\r\n /**\r\n * Load data for the specified page index (optional).\r\n * @param pageIndex The page index to load.\r\n */\r\n load(pageIndex?: number) {\r\n let page: DataRequestPage | undefined;\r\n let filters: DataRequestFilter[] = [];\r\n let sort: DataRequestSort | undefined;\r\n\r\n if (this.filterable()) {\r\n this._columns.forEach(col => {\r\n if (col.filterable && col.filterValue != '' && col.filterValue != undefined) {\r\n filters.push({ field: col.filterField ?? col.field!, value: col.filterValue, operator: 'EQ' });\r\n }\r\n });\r\n }\r\n\r\n if (this.paging()) {\r\n page = { index: pageIndex || this._lastRequest?.page?.index || 1, size: this.pageSize(), zeroBased: false };\r\n }\r\n\r\n if (this.sortable()) {\r\n // sort = ...\r\n }\r\n\r\n this._loadingRequest = new DataRequest({ page, filters, sort, select: [], computeTotal: true });\r\n\r\n this._dataSource.load(this._loadingRequest).pipe(takeUntilDestroyed(this._destroyRef)).subscribe(result => {\r\n this._dataResult = result;\r\n this._lastRequest = this._loadingRequest;\r\n this._loadingRequest = undefined;\r\n });\r\n }\r\n\r\n /**\r\n * Determines if the table is currently loading data.\r\n */\r\n @HostBinding('class.ng0-loading')\r\n public get loading() {\r\n return this._dataSource.loading;\r\n }\r\n\r\n protected _getCellValue(row: any, col: TableColumnDirective) {\r\n var subFields = col.field!.split('.');\r\n let value = row[subFields[0]];\r\n for (let i = 1; i < subFields.length; i++) {\r\n if (value == null) break;\r\n value = value[subFields[i]];\r\n }\r\n\r\n return value;\r\n }\r\n\r\n\r\n protected _onPageChange(pageIndex: number) {\r\n this.load(pageIndex);\r\n }\r\n\r\n protected _onToggleRowDetailClick(row: any) {\r\n var state = this._rowStates.get(row)\r\n if (!state) {\r\n this._rowStates.set(row, { expanded: true });\r\n } else {\r\n state.expanded = !state.expanded;\r\n }\r\n }\r\n\r\n protected isRowExpanded(row: any) {\r\n var state = this._rowStates.get(row)\r\n return state == undefined ? false : state.expanded;\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._changeSubscription?.unsubscribe();\r\n }\r\n}\r\n","@let data = _dataResult?.data;\r\n@let pageIndex = _lastRequest?.page?.index;\r\n\r\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if(caption()) {\r\n <!-- <caption>{{caption()}}</caption> -->\r\n }\r\n\r\n <thead *ngIf=\"showHeader\" [ngClass]=\"headerClass()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n <th *ngIf=\"showRowNumbers()\" class=\"row-number text-muted\">#</th>\r\n <th *ngFor=\"let col of _columns\">{{col.title}}</th>\r\n </tr>\r\n </thead>\r\n <thead *ngIf=\"filterable()\">\r\n <tr>\r\n <th *ngIf=\"_detailRow\"></th>\r\n\r\n @if(showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n <th *ngFor=\"let col of _columns\">\r\n @if(col.filterable) {\r\n @if(col.type == 'text') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"text\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load()\">\r\n }@else if(col.type == 'number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"number\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load()\">\r\n }\r\n }\r\n </th>\r\n </tr>\r\n </thead>\r\n\r\n <tbody>\r\n <ng-container *ngIf=\"data && data.length! > 0\">\r\n <ng-container *ngFor=\"let row of data; let i=index\">\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n <td class=\"detail-row-expander\" *ngIf=\"_detailRow\">\r\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\"\r\n *ngIf=\"_detailRow.showCallback == null || _detailRow.showCallback(row)\">\r\n <ng-template [ngIf]=\"isRowExpanded(row)\" [ngIfElse]=\"collapse\"><i\r\n class=\"far fa-minus\"></i></ng-template>\r\n <ng-template #collapse><i class=\"far fa-plus\"></i> </ng-template>\r\n </button>\r\n </td>\r\n\r\n <td class=\"row-number text-muted\" *ngIf=\"showRowNumbers()\">\r\n @if(pageIndex != undefined) {\r\n {{pageSize() * pageIndex + i + 1}}\r\n }@else {\r\n }\r\n </td>\r\n\r\n <td *ngFor=\"let col of _columns\" [ngClass]=\"col.cellClass\" [class.shrinked]=\"col.shrink\"\r\n [class.fw-bold]=\"col.bold\">\r\n @if(col.template){\r\n <ng-template [ngIf]=\"col.template\">\r\n <ng-container\r\n *ngTemplateOutlet=\"col.template; context: {$implicit: row}\"></ng-container>\r\n </ng-template>\r\n }@else if(col.field){\r\n @let cellValue = _getCellValue(row, col);\r\n <div\r\n [class.badge]=\"col.badge\"\r\n [class.text-bg-primary]=\"col.badge?.primary && cellValue === col.badge?.primary\"\r\n [class.text-bg-secondary]=\"col.badge?.secondary && cellValue === col.badge?.secondary\"\r\n [class.text-bg-success]=\"col.badge?.success && cellValue === col.badge?.success\"\r\n [class.text-bg-light]=\"col.badge && cellValue !== col.badge.success && cellValue !== col.badge.secondary && cellValue !== col.badge.success \">\r\n\r\n <ng-container *ngIf=\"col.type=='text'\">\r\n {{cellValue}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='date'\">\r\n <span class=\"date-time\">{{cellValue | ng0Date}}</span>\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='number'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"col.type=='currency'\">\r\n {{cellValue | number}}\r\n </ng-container>\r\n <ng-container *ngIf=\"$any(col?.type)?.enum\">\r\n {{cellValue | ng0TranslateEnum:$any(col.type).enum}}\r\n </ng-container>\r\n <!-- <ng-container *ngIf=\"$any(col?.type)?.boolean\">\r\n {{cellValue | ng0Bool:$any(col.type).boolean}}\r\n </ng-container> -->\r\n <ng-container *ngIf=\"$any(col?.type)?.currency\">\r\n {{cellValue | currency:$any(col?.type)?.currency}}\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"cellValue == null && col.emptyCellText\">\r\n {{col.emptyCellText}}\r\n </ng-container>\r\n </div>\r\n }\r\n </td>\r\n </tr>\r\n\r\n <tr class=\"detail-row\" *ngIf=\"_detailRow && isRowExpanded(row)\">\r\n <td [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\" class=\"ps-2 pb-4\">\r\n <ng-container *ngTemplateOutlet=\"_detailRow.templateRef; context: {$implicit: row}\">\r\n </ng-container>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n\r\n </ng-container>\r\n\r\n <tr *ngIf=\"data?.length === 0\">\r\n <td [colSpan]=\"_columns.length + (showRowNumbers() ? 1 : 0)\" class=\"text-center text-muted small p-2\">\r\n {{'noRecords' | ng0Translate}}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\r\n @if(paging() && showPagination() && data) {\r\n @let firstItem = pageSize() * (pageIndex! - 1) + 1;\r\n @let lastItem = firstItem + data.length - 1;\r\n @let totalItems = _dataResult?.total!;\r\n\r\n <div class=\"ng0-paging-options\">\r\n <select name=\"pageSizeOptions\" class=\" form-select w-auto d-inline-block\">\r\n <option [ngValue]=\"10\" selected>10</option>\r\n </select>\r\n </div>\r\n\r\n <div class=\"ng0-paging-controls ms-2\">\r\n <ng0-pagination class=\"mb-0 d-inline-block\"\r\n [showFirstButton]=\"false\"\r\n [showLastButton]=\"false\"\r\n [showNextButton]=\"false\"\r\n [showPreviousButton]=\"false\"\r\n [totalRecords]=\"_dataResult?.total!\"\r\n [pageSize]=\"pageSize()\"\r\n [selectedPage]=\"pageIndex\"\r\n (itemClick)=\"_onPageChange($event)\"\r\n [maxVisiblePages]=\"maxVisiblePages()\">\r\n\r\n <ng-container ngProjectAs=\"first\">\r\n <ng-content select=\"paging-first\">\r\n {{'first' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"last\">\r\n <ng-content select=\"paging-last\">\r\n {{'last' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"next\">\r\n <ng-content select=\"paging-next\">\r\n {{'next' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"previous\">\r\n <ng-content select=\"paging-previous\">\r\n {{'previous' | ng0Translate}}\r\n </ng-content>\r\n </ng-container>\r\n </ng0-pagination>\r\n </div>\r\n\r\n <div class=\"ng0-paging-info ms-auto\">\r\n <ng-content select=\"paging-info\">\r\n {{'showing' | ng0Translate}} {{firstItem}}-{{lastItem}} {{'of' | ng0Translate}} {{totalItems}} {{'records' |\r\n ng0Translate}}\r\n </ng-content>\r\n </div>\r\n }\r\n</div>\r\n\r\n\r\n<div *ngIf=\"_dataSource.loading\" class=\"ng0-table-loading-cover text-center\">\r\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { TableColumnDirective } from './table-column.directive';\r\nimport { TableComponent } from './table.component';\r\nimport { TableDetailRowDirective } from './table-detail-row.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n TableComponent,\r\n TableColumnDirective,\r\n TableDetailRowDirective,\r\n ],\r\n exports: [\r\n TableComponent,\r\n TableColumnDirective,\r\n TableDetailRowDirective\r\n ],\r\n})\r\nexport class TableModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAQa,oBAAoB,CAAA;AACtB,IAAA,KAAK;AACL,IAAA,KAAK;AACL,IAAA,aAAa;;IAGb,IAAI,GAIT,MAAM;AACiB,IAAA,QAAQ;AAC1B,IAAA,SAAS;IACT,MAAM,GAAG,KAAK;IACd,IAAI,GAAG,KAAK;AACZ,IAAA,KAAK;IACL,UAAU,GAAG,KAAK;AAClB,IAAA,WAAW;AACX,IAAA,WAAW;AAEpB,IAAA,WAAA,GAAA;;uGApBW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,mWAWjB,WAAW,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAXd,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;AAC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