@bootkit/ng0 0.0.0-alpha.50 → 0.0.0-alpha.51
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.
|
@@ -4,47 +4,6 @@ import { formatString } from '@bootkit/ng0/common';
|
|
|
4
4
|
import { LocalizationService, TableComponentPagingFormatter } from '@bootkit/ng0/localization';
|
|
5
5
|
import { DataResult, DataRequest, DataSource, DataSourceLike } from '@bootkit/ng0/data';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Options for configuring the table's paging behavior.
|
|
9
|
-
*/
|
|
10
|
-
interface TablePagingOptions {
|
|
11
|
-
/**
|
|
12
|
-
* If true, the table will show pagination controls at the bottom.
|
|
13
|
-
* This will allow users to navigate between pages of data.
|
|
14
|
-
* Default is true.
|
|
15
|
-
*/
|
|
16
|
-
showPagingControls?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Initial page index to load when the table is initialized.
|
|
19
|
-
* This is only used if pagable is true.
|
|
20
|
-
* The index starts from 1.
|
|
21
|
-
* Default is 1.
|
|
22
|
-
*/
|
|
23
|
-
pageIndex?: number;
|
|
24
|
-
pageSize?: number;
|
|
25
|
-
/**
|
|
26
|
-
* Array of page size options to display in the page size selector.
|
|
27
|
-
* If not provided, the default page size options will be used.
|
|
28
|
-
*/
|
|
29
|
-
pageSizeOptions?: number[];
|
|
30
|
-
/**
|
|
31
|
-
* If true, the table will show a page size selector.
|
|
32
|
-
*/
|
|
33
|
-
showPageSizeOptions?: boolean;
|
|
34
|
-
showPageSizeSelectorLabel?: boolean;
|
|
35
|
-
showNextPreviousButtons?: boolean;
|
|
36
|
-
showFirstLastButtons?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Maximum number of visible pages.
|
|
39
|
-
* Default is 10.
|
|
40
|
-
*/
|
|
41
|
-
maxVisiblePages?: number;
|
|
42
|
-
/**
|
|
43
|
-
* If true, the table will show paging info at the bottom.
|
|
44
|
-
* This will show the number of records displayed and total records.
|
|
45
|
-
*/
|
|
46
|
-
showPagingInfo?: boolean;
|
|
47
|
-
}
|
|
48
7
|
/**
|
|
49
8
|
* Type of the table cell.
|
|
50
9
|
* This can be a primitive type like 'number', 'currency', 'date', 'time',
|
|
@@ -163,12 +122,12 @@ declare class TableDetailRowDirective {
|
|
|
163
122
|
* It can be used with any data source that implements the DataSource interface.
|
|
164
123
|
*/
|
|
165
124
|
declare class TableComponent implements AfterContentInit, OnDestroy {
|
|
166
|
-
protected _ls: LocalizationService;
|
|
167
|
-
private _destroyRef;
|
|
125
|
+
protected readonly _ls: LocalizationService;
|
|
126
|
+
private readonly _destroyRef;
|
|
168
127
|
private _changeSubscription?;
|
|
169
128
|
protected _columns: QueryList<TableColumnDirective>;
|
|
170
129
|
protected _detailRow?: TableDetailRowDirective;
|
|
171
|
-
protected _dataResult: _angular_core.WritableSignal<DataResult<any> | undefined>;
|
|
130
|
+
protected readonly _dataResult: _angular_core.WritableSignal<DataResult<any> | undefined>;
|
|
172
131
|
protected _lastRequest?: DataRequest;
|
|
173
132
|
protected _loadingRequest?: DataRequest;
|
|
174
133
|
protected _rowStates: Map<any, {
|
|
@@ -200,16 +159,58 @@ declare class TableComponent implements AfterContentInit, OnDestroy {
|
|
|
200
159
|
readonly showHeader: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
201
160
|
/**
|
|
202
161
|
* If true, the table will support pagination.
|
|
203
|
-
* If false, the table will load all records at once.
|
|
204
162
|
*/
|
|
205
|
-
readonly pageable: _angular_core.InputSignalWithTransform<
|
|
163
|
+
readonly pageable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
164
|
+
/**
|
|
165
|
+
* The currently selected page in the table.
|
|
166
|
+
* @default 0
|
|
167
|
+
*/
|
|
168
|
+
readonly pageIndex: _angular_core.ModelSignal<number>;
|
|
169
|
+
/**
|
|
170
|
+
* The number of records to display per page.
|
|
171
|
+
* @default 10
|
|
172
|
+
*/
|
|
173
|
+
readonly pageSize: _angular_core.ModelSignal<number>;
|
|
174
|
+
/**
|
|
175
|
+
* Maximum number of visible pages in the pagination controls.
|
|
176
|
+
* @default 10
|
|
177
|
+
*/
|
|
178
|
+
readonly maxVisiblePages: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
179
|
+
/**
|
|
180
|
+
* If true, the table will show pagination controls at the bottom.
|
|
181
|
+
* This will allow users to navigate between pages of data.
|
|
182
|
+
* @default true
|
|
183
|
+
*/
|
|
184
|
+
readonly showPagingControls: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
185
|
+
/**
|
|
186
|
+
* Whether to show the first and last buttons in the pagination controls.
|
|
187
|
+
* @default true
|
|
188
|
+
*/
|
|
189
|
+
readonly showFirstLastButtons: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
190
|
+
/**
|
|
191
|
+
* Whetheer to show the next and previous buttons in the pagination controls.
|
|
192
|
+
* @default true
|
|
193
|
+
*/
|
|
194
|
+
readonly showNextPreviousButtons: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
195
|
+
/**
|
|
196
|
+
* Array of page size options to display in the page size selector.
|
|
197
|
+
* If not provided, the default page size options will be used.
|
|
198
|
+
* @default true
|
|
199
|
+
*/
|
|
200
|
+
readonly pageSizeOptions: _angular_core.InputSignal<number[] | undefined>;
|
|
201
|
+
/**
|
|
202
|
+
* Whether to show paging info at the bottom of the table.
|
|
203
|
+
* This will show the number of records displayed and total records.
|
|
204
|
+
* @default true
|
|
205
|
+
*/
|
|
206
|
+
readonly showPagingInfo: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
206
207
|
/**
|
|
207
208
|
* If true, the table will support sorting.
|
|
208
209
|
* This will add a sort icon to each column header.
|
|
209
210
|
*/
|
|
210
211
|
readonly sortable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
211
212
|
/**
|
|
212
|
-
* The CSS class to apply to the table element.
|
|
213
|
+
* The CSS class to apply to the internal table element.
|
|
213
214
|
* This can be used to apply custom styles to the table.
|
|
214
215
|
*/
|
|
215
216
|
readonly tableClass: _angular_core.InputSignal<string | string[] | undefined>;
|
|
@@ -243,8 +244,10 @@ declare class TableComponent implements AfterContentInit, OnDestroy {
|
|
|
243
244
|
readonly loadingCover: _angular_core.InputSignalWithTransform<"none" | "simple" | "spinner", boolean | "none" | "simple" | "spinner">;
|
|
244
245
|
ngAfterContentInit(): void;
|
|
245
246
|
/**
|
|
246
|
-
*
|
|
247
|
-
*
|
|
247
|
+
* Loads data from the data source based on the current state of the table (pagination, sorting, filtering).
|
|
248
|
+
* This method can be called manually to refresh the data in the table.
|
|
249
|
+
* It will construct a DataRequest object based on the current pagination, sorting, and filtering settings,
|
|
250
|
+
* and then call the load method of the data source with that request.
|
|
248
251
|
*/
|
|
249
252
|
load(pageIndex?: number): void;
|
|
250
253
|
/**
|
|
@@ -259,7 +262,7 @@ declare class TableComponent implements AfterContentInit, OnDestroy {
|
|
|
259
262
|
protected _onSelectFilterOperator(col: TableColumnDirective, filterOperator: string): void;
|
|
260
263
|
ngOnDestroy(): void;
|
|
261
264
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableComponent, never>;
|
|
262
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableComponent, "ng0-table", ["ng0Table"], { "source": { "alias": "source"; "required": true; "isSignal": true; }; "autoLoad": { "alias": "autoLoad"; "required": false; "isSignal": true; }; "showRowNumbers": { "alias": "showRowNumbers"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "pageable": { "alias": "pageable"; "required": false; "isSignal": true; }; "sortable": { "alias": "sortable"; "required": false; "isSignal": true; }; "tableClass": { "alias": "tableClass"; "required": false; "isSignal": true; }; "headerClass": { "alias": "headerClass"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "loadingIndicator": { "alias": "loadingIndicator"; "required": false; "isSignal": true; }; "loadingCover": { "alias": "loadingCover"; "required": false; "isSignal": true; }; }, {}, ["_detailRow", "_columns"], ["paging-first", "paging-last", "paging-next", "paging-previous", "paging-info"], true, never>;
|
|
265
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableComponent, "ng0-table", ["ng0Table"], { "source": { "alias": "source"; "required": true; "isSignal": true; }; "autoLoad": { "alias": "autoLoad"; "required": false; "isSignal": true; }; "showRowNumbers": { "alias": "showRowNumbers"; "required": false; "isSignal": true; }; "showHeader": { "alias": "showHeader"; "required": false; "isSignal": true; }; "pageable": { "alias": "pageable"; "required": false; "isSignal": true; }; "pageIndex": { "alias": "pageIndex"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "maxVisiblePages": { "alias": "maxVisiblePages"; "required": false; "isSignal": true; }; "showPagingControls": { "alias": "showPagingControls"; "required": false; "isSignal": true; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; "isSignal": true; }; "showNextPreviousButtons": { "alias": "showNextPreviousButtons"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showPagingInfo": { "alias": "showPagingInfo"; "required": false; "isSignal": true; }; "sortable": { "alias": "sortable"; "required": false; "isSignal": true; }; "tableClass": { "alias": "tableClass"; "required": false; "isSignal": true; }; "headerClass": { "alias": "headerClass"; "required": false; "isSignal": true; }; "caption": { "alias": "caption"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "filterable": { "alias": "filterable"; "required": false; "isSignal": true; }; "loadingIndicator": { "alias": "loadingIndicator"; "required": false; "isSignal": true; }; "loadingCover": { "alias": "loadingCover"; "required": false; "isSignal": true; }; }, { "pageIndex": "pageIndexChange"; "pageSize": "pageSizeChange"; }, ["_detailRow", "_columns"], ["paging-first", "paging-last", "paging-next", "paging-previous", "paging-info"], true, never>;
|
|
263
266
|
}
|
|
264
267
|
|
|
265
268
|
declare class TableModule {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute, model, signal, TemplateRef, ContentChild, Directive, Input, inject, DestroyRef, HostBinding, ContentChildren, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
2
|
+
import { input, booleanAttribute, model, signal, TemplateRef, ContentChild, Directive, Input, inject, DestroyRef, numberAttribute, HostBinding, ContentChildren, ChangeDetectionStrategy, 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';
|
|
@@ -199,42 +199,58 @@ class TableComponent {
|
|
|
199
199
|
showHeader = input(true, ...(ngDevMode ? [{ debugName: "showHeader", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
200
200
|
/**
|
|
201
201
|
* If true, the table will support pagination.
|
|
202
|
-
* If false, the table will load all records at once.
|
|
203
202
|
*/
|
|
204
|
-
pageable = input(
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
203
|
+
pageable = input(false, ...(ngDevMode ? [{ debugName: "pageable", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
204
|
+
/**
|
|
205
|
+
* The currently selected page in the table.
|
|
206
|
+
* @default 0
|
|
207
|
+
*/
|
|
208
|
+
pageIndex = model(0, ...(ngDevMode ? [{ debugName: "pageIndex" }] : []));
|
|
209
|
+
/**
|
|
210
|
+
* The number of records to display per page.
|
|
211
|
+
* @default 10
|
|
212
|
+
*/
|
|
213
|
+
pageSize = model(10, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
|
|
214
|
+
/**
|
|
215
|
+
* Maximum number of visible pages in the pagination controls.
|
|
216
|
+
* @default 10
|
|
217
|
+
*/
|
|
218
|
+
maxVisiblePages = input(10, ...(ngDevMode ? [{ debugName: "maxVisiblePages", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
219
|
+
/**
|
|
220
|
+
* If true, the table will show pagination controls at the bottom.
|
|
221
|
+
* This will allow users to navigate between pages of data.
|
|
222
|
+
* @default true
|
|
223
|
+
*/
|
|
224
|
+
showPagingControls = input(true, ...(ngDevMode ? [{ debugName: "showPagingControls", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
225
|
+
/**
|
|
226
|
+
* Whether to show the first and last buttons in the pagination controls.
|
|
227
|
+
* @default true
|
|
228
|
+
*/
|
|
229
|
+
showFirstLastButtons = input(false, ...(ngDevMode ? [{ debugName: "showFirstLastButtons", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
230
|
+
/**
|
|
231
|
+
* Whetheer to show the next and previous buttons in the pagination controls.
|
|
232
|
+
* @default true
|
|
233
|
+
*/
|
|
234
|
+
showNextPreviousButtons = input(false, ...(ngDevMode ? [{ debugName: "showNextPreviousButtons", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
235
|
+
/**
|
|
236
|
+
* Array of page size options to display in the page size selector.
|
|
237
|
+
* If not provided, the default page size options will be used.
|
|
238
|
+
* @default true
|
|
239
|
+
*/
|
|
240
|
+
pageSizeOptions = input([10, 25, 50, 100], ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : []));
|
|
241
|
+
/**
|
|
242
|
+
* Whether to show paging info at the bottom of the table.
|
|
243
|
+
* This will show the number of records displayed and total records.
|
|
244
|
+
* @default true
|
|
245
|
+
*/
|
|
246
|
+
showPagingInfo = input(true, ...(ngDevMode ? [{ debugName: "showPagingInfo", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
231
247
|
/**
|
|
232
248
|
* If true, the table will support sorting.
|
|
233
249
|
* This will add a sort icon to each column header.
|
|
234
250
|
*/
|
|
235
251
|
sortable = input(true, ...(ngDevMode ? [{ debugName: "sortable", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
236
252
|
/**
|
|
237
|
-
* The CSS class to apply to the table element.
|
|
253
|
+
* The CSS class to apply to the internal table element.
|
|
238
254
|
* This can be used to apply custom styles to the table.
|
|
239
255
|
*/
|
|
240
256
|
tableClass = input(...(ngDevMode ? [undefined, { debugName: "tableClass" }] : []));
|
|
@@ -300,12 +316,14 @@ class TableComponent {
|
|
|
300
316
|
// this.reload();
|
|
301
317
|
// });
|
|
302
318
|
if (this.autoLoad()) {
|
|
303
|
-
this.load(
|
|
319
|
+
this.load();
|
|
304
320
|
}
|
|
305
321
|
}
|
|
306
322
|
/**
|
|
307
|
-
*
|
|
308
|
-
*
|
|
323
|
+
* Loads data from the data source based on the current state of the table (pagination, sorting, filtering).
|
|
324
|
+
* This method can be called manually to refresh the data in the table.
|
|
325
|
+
* It will construct a DataRequest object based on the current pagination, sorting, and filtering settings,
|
|
326
|
+
* and then call the load method of the data source with that request.
|
|
309
327
|
*/
|
|
310
328
|
load(pageIndex) {
|
|
311
329
|
let page;
|
|
@@ -319,9 +337,12 @@ class TableComponent {
|
|
|
319
337
|
});
|
|
320
338
|
}
|
|
321
339
|
if (this.pageable()) {
|
|
340
|
+
if (pageIndex != undefined) {
|
|
341
|
+
this.pageIndex.set(pageIndex);
|
|
342
|
+
}
|
|
322
343
|
page = {
|
|
323
|
-
index:
|
|
324
|
-
size: this.
|
|
344
|
+
index: this.pageIndex(),
|
|
345
|
+
size: this.pageSize(),
|
|
325
346
|
};
|
|
326
347
|
}
|
|
327
348
|
if (this.sortable()) {
|
|
@@ -398,7 +419,7 @@ class TableComponent {
|
|
|
398
419
|
this._changeSubscription?.unsubscribe();
|
|
399
420
|
}
|
|
400
421
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
401
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.11", 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 }, pageable: { classPropertyName: "pageable", publicName: "pageable", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", 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 }, loadingIndicator: { classPropertyName: "loadingIndicator", publicName: "loadingIndicator", isSignal: true, isRequired: false, transformFunction: null }, loadingCover: { classPropertyName: "loadingCover", publicName: "loadingCover", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ng0-loading": "this.isLoading" } }, queries: [{ propertyName: "_detailRow", first: true, predicate: TableDetailRowDirective, descendants: true }, { propertyName: "_columns", predicate: TableColumnDirective }], exportAs: ["ng0Table"], ngImport: i0, template: "@let $dataResult = _dataResult();\n@let $pageable = pageable();\n@let $pageIndex = _lastRequest?.page?.index ?? 1;\n@let $data = $dataResult?.data;\n@let $anyRecords = $data && $data.length > 0;\n@let $totalRecordsCount = $dataResult?.total;\n@let $firstRecord = $pageable ? ($pageable.pageSize! * ($pageIndex - 1) + 1) : 1;\n@let $lastRecord = $data ? $firstRecord + $data.length - 1 : 1;\n@let $isLoading = _dataSource.isLoading();\n@let $isFirstLoad = $dataResult == undefined;\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\n@let $tableLocale = _ls.get()?.definition?.components?.table;\n\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\n <table class=\"table\" [ngClass]=\"tableClass()\">\n @if (caption()) {\n <caption>{{caption()}}</caption>\n }\n\n @if (showHeader()) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n\n @if (filterable()) {\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\n }\n\n <tbody>\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\n <tr class=\"ng0-table-loading-row\">\n <td [attr.colspan]=\"$columnsCount\">\n @switch (loadingIndicator()) {\n @case ('spinner') {\n <div class=\"text-center\">\n <div class=\"spinner-border\" role=\"status\"></div>\n </div>\n }\n }\n </td>\n </tr>\n } @else {\n @if ($data) {\n @if ($data.length > 0) {\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\n } @else {\n <tr class=\"ng0-table-no-records-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\n </td>\n </tr>\n }\n } @else if (_lastError) {\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\n }\n }\n </tbody>\n </table>\n</div>\n\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n</div>\n\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\n<div class=\"ng0-table-loading-cover text-center\">\n @if (loadingCover() == 'spinner') {\n <div class=\"spinner-border\" role=\"status\"></div>\n }\n</div>\n}\n\n<ng-template #filtersTemplate>\n <thead>\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th></th>\n }\n\n @for (col of _columns; track $index) {\n <th>\n @if(col.filterable() && (col.field() || col.filterValue())) {\n\n <div class=\"input-group\">\n @switch (col.type()) {\n @case ('text') {\n <input [name]=\"'filter-' + col.field\"\n type=\"search\"\n [maxlength]=\"50\"\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n @case ('number') {\n <input [name]=\"'datatablecol-' + col.field\"\n type=\"search\"\n ng0Number\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n }\n\n <button class=\"btn btn-outline-light\"\n style=\"border-color: var(--bs-border-color);\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"_onToggleFilterOperator(col)\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\n </svg>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\n (detach)=\"col.showFilterOperators.set(false)\">\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\n @for (item of col.getFilterOperators(); track $index) {\n <li>\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\n (click)=\"_onSelectFilterOperator(col, item)\">\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\n </button>\n </li>\n }\n </ul>\n </ng-template>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #headerTemplate>\n <thead [ngClass]=\"headerClass()\">\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th class=\"row-number text-muted\">#</th>\n }\n\n @for (col of _columns; track $index) {\n <th\n (click)=\"col.toggleSortDirection(); load()\"\n [class.sortable]=\"sortable() && col.sortable()\"\n [ngClass]=\"{ \n 'sort-asc': col.sortDirection() == 'asc', \n 'sort-desc': col.sortDirection() == 'desc',\n 'sort-none': col.sortDirection() == 'none'\n }\">\n {{ col.title() }}\n\n @if(sortable() && col.sortable()) {\n <svg class=\"ng0-table-sort-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #dataRowsTemplate>\n @for (row of $data; track $index) {\n <tr [class.table-active]=\"isRowExpanded(row)\">\n @if (_detailRow) {\n <td class=\"detail-row-expander\">\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\n @if (isRowExpanded(row)) {\n <i class=\"far fa-minus\"></i>\n } @else {\n <i class=\"far fa-plus\"></i>\n }\n </button>\n }\n </td>\n }\n\n @if (showRowNumbers()) {\n <td class=\"ng0-table-row-number\">\n {{ $firstRecord + $index }}\n </td>\n }\n\n @for (col of _columns; track $index) {\n <td\n [ngClass]=\"col.cellClass()\"\n [class.shrinked]=\"col.shrink()\"\n [class.fw-bold]=\"col.bold()\">\n @if (col.template) {\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\n </ng-container>\n } @else if (col.field()) {\n @let cellValue = _getCellValue(row, col);\n\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\n {{ col.emptyCellText() }}\n } @else {\n @if (col.type()) {\n @let type = $any(col.type());\n\n @if (type == \"date\") {\n {{ cellValue | ng0Date }}\n } @else if (type == \"number\") {\n {{ cellValue | number }}\n } @else if (type == \"currency\") {\n {{ cellValue | currency }}\n } @else if (type.enum) {\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\n } @else if (type.boolean || type == \"boolean\") {\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\n }@else {\n {{ cellValue }}\n }\n }\n }\n }\n </td>\n }\n </tr>\n\n @if (_detailRow && isRowExpanded(row)) {\n <tr class=\"detail-row\">\n <td\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\n class=\"ps-2 pb-4\">\n <ng-container\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\n </td>\n </tr>\n }\n }\n</ng-template>\n\n<ng-template #footerTemplate>\n @if ($pageable && $pageable.showPagingControls && $anyRecords && $totalRecordsCount! > 0) {\n <div class=\"ng0-table-pagination me-2\">\n <ng0-pagination\n class=\"mb-0 d-inline-block\"\n [showFirstLastButtons]=\"$pageable.showFirstLastButtons == true\"\n [showNextPreviousButtons]=\"$pageable.showNextPreviousButtons == true\"\n [totalRecords]=\"$totalRecordsCount!\"\n [pageSize]=\"$pageable.pageSize!\"\n [selectedPage]=\"$pageIndex\"\n (itemClick)=\"_onPageChange($event)\"\n [maxVisiblePages]=\"$pageable.maxVisiblePages!\">\n <ng-container ngProjectAs=\"first\">\n <ng-content select=\"paging-first\">\n {{ \"first\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"last\">\n <ng-content select=\"paging-last\">\n {{ \"last\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"next\">\n <ng-content select=\"paging-next\">\n {{ \"next\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"previous\">\n <ng-content select=\"paging-previous\">\n {{ \"previous\" | ng0Translate }}\n </ng-content>\n </ng-container>\n </ng0-pagination>\n </div>\n\n @if ($pageable.showPageSizeOptions || $pageable.showPageSizeOptions == undefined) {\n <div class=\"ng0-table-paging-options\">\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\n <option [ngValue]=\"10\" selected>10</option>\n </select>\n </div>\n }\n\n @if ($pageable.showPagingInfo == undefined || $pageable.showPagingInfo) {\n <div class=\"ng0-table-paging-info ms-auto\">\n <ng-content select=\"paging-info\">\n {{\n _pagingFormatter({firstRecord: $firstRecord, lastRecord: $lastRecord, totalRecords: $totalRecordsCount!,\n currentPage: $pageIndex!})\n }}\n </ng-content>\n </div>\n }\n }\n</ng-template>\n\n<ng-template #nowDataTemplate>\n <tr class=\"ng0-table-error-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\n <div class=\"d-flex align-items-baseline\">\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\n {{ \"retry\" | ng0Translate }}\n </button>\n </div>\n </td>\n </tr>\n</ng-template>", styles: [":host{display:flex;flex-direction:column;position:relative}@starting-style{.ng0-table-loading-cover{background-color:#0000}}table{margin-bottom:0}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable .ng0-table-sort-icon{transition:transform .2s;opacity:0}th.sortable.sort-none:hover .ng0-table-sort-icon{opacity:.4}th.sortable.sort-asc .ng0-table-sort-icon{transform:rotate(0);opacity:1;color:var(--bs-danger)}th.sortable.sort-desc .ng0-table-sort-icon{transform:rotate(180deg);opacity:1;color:var(--bs-primary)}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 .2s;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}.ng0-table-footer{margin-top:.5rem}.fade-in{animation:fade-in .5s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.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", "showNextPreviousButtons", "showFirstLastButtons"], outputs: ["itemClick"], exportAs: ["ng0Pagination"] }, { kind: "directive", type: NumberDirective, selector: "[ng0Number]", inputs: ["minFractionDigits", "maxFractionDigits", "useGrouping", "numberType"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i4.TranslatePipe, name: "ng0Translate" }, { kind: "pipe", type: i4.TranslateEnumPipe, name: "ng0TranslateEnum" }, { kind: "pipe", type: i4.DatePipe, name: "ng0Date" }, { kind: "pipe", type: i4.LocalizeBooleanPipe, name: "ng0LocalizeBool" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
422
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.11", 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 }, pageable: { classPropertyName: "pageable", publicName: "pageable", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, maxVisiblePages: { classPropertyName: "maxVisiblePages", publicName: "maxVisiblePages", isSignal: true, isRequired: false, transformFunction: null }, showPagingControls: { classPropertyName: "showPagingControls", publicName: "showPagingControls", isSignal: true, isRequired: false, transformFunction: null }, showFirstLastButtons: { classPropertyName: "showFirstLastButtons", publicName: "showFirstLastButtons", isSignal: true, isRequired: false, transformFunction: null }, showNextPreviousButtons: { classPropertyName: "showNextPreviousButtons", publicName: "showNextPreviousButtons", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showPagingInfo: { classPropertyName: "showPagingInfo", publicName: "showPagingInfo", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", 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 }, loadingIndicator: { classPropertyName: "loadingIndicator", publicName: "loadingIndicator", isSignal: true, isRequired: false, transformFunction: null }, loadingCover: { classPropertyName: "loadingCover", publicName: "loadingCover", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageIndex: "pageIndexChange", pageSize: "pageSizeChange" }, host: { properties: { "class.ng0-loading": "this.isLoading" } }, queries: [{ propertyName: "_detailRow", first: true, predicate: TableDetailRowDirective, descendants: true }, { propertyName: "_columns", predicate: TableColumnDirective }], exportAs: ["ng0Table"], ngImport: i0, template: "@let $dataResult = _dataResult();\n@let $pageable = pageable();\n@let $pageIndex = pageIndex();\n@let $pageSize = pageSize();\n@let $data = $dataResult?.data;\n@let $anyRecords = $data && $data.length > 0;\n@let $totalRecordsCount = $dataResult?.total;\n@let $firstRecordIndex = $pageable ? ($pageSize * $pageIndex) : 0;\n@let $lastRecordIndex = $data ? $firstRecordIndex + $data.length - 1 : 1;\n@let $isLoading = _dataSource.isLoading();\n@let $isFirstLoad = $dataResult == undefined;\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\n@let $tableLocale = _ls.get()?.definition?.components?.table;\n\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\n <table class=\"table\" [ngClass]=\"tableClass()\">\n @if (caption()) {\n <caption>{{caption()}}</caption>\n }\n\n @if (showHeader()) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n\n @if (filterable()) {\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\n }\n\n <tbody>\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\n <tr class=\"ng0-table-loading-row\">\n <td [attr.colspan]=\"$columnsCount\">\n @switch (loadingIndicator()) {\n @case ('spinner') {\n <div class=\"text-center\">\n <div class=\"spinner-border\" role=\"status\"></div>\n </div>\n }\n }\n </td>\n </tr>\n } @else {\n @if ($data) {\n @if ($data.length > 0) {\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\n } @else {\n <tr class=\"ng0-table-no-records-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\n </td>\n </tr>\n }\n } @else if (_lastError) {\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\n }\n }\n </tbody>\n </table>\n</div>\n\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n</div>\n\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\n<div class=\"ng0-table-loading-cover text-center\">\n @if (loadingCover() == 'spinner') {\n <div class=\"spinner-border\" role=\"status\"></div>\n }\n</div>\n}\n\n<ng-template #filtersTemplate>\n <thead>\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th></th>\n }\n\n @for (col of _columns; track $index) {\n <th>\n @if(col.filterable() && (col.field() || col.filterValue())) {\n\n <div class=\"input-group\">\n @switch (col.type()) {\n @case ('text') {\n <input [name]=\"'filter-' + col.field\"\n type=\"search\"\n [maxlength]=\"50\"\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n @case ('number') {\n <input [name]=\"'datatablecol-' + col.field\"\n type=\"search\"\n ng0Number\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n }\n\n <button class=\"btn btn-outline-light\"\n style=\"border-color: var(--bs-border-color);\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"_onToggleFilterOperator(col)\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\n </svg>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\n (detach)=\"col.showFilterOperators.set(false)\">\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\n @for (item of col.getFilterOperators(); track $index) {\n <li>\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\n (click)=\"_onSelectFilterOperator(col, item)\">\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\n </button>\n </li>\n }\n </ul>\n </ng-template>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #headerTemplate>\n <thead [ngClass]=\"headerClass()\">\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th class=\"row-number text-muted\">#</th>\n }\n\n @for (col of _columns; track $index) {\n <th\n (click)=\"col.toggleSortDirection(); load()\"\n [class.sortable]=\"sortable() && col.sortable()\"\n [ngClass]=\"{ \n 'sort-asc': col.sortDirection() == 'asc', \n 'sort-desc': col.sortDirection() == 'desc',\n 'sort-none': col.sortDirection() == 'none'\n }\">\n {{ col.title() }}\n\n @if(sortable() && col.sortable()) {\n <svg class=\"ng0-table-sort-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #dataRowsTemplate>\n @for (row of $data; track $index) {\n <tr [class.table-active]=\"isRowExpanded(row)\">\n @if (_detailRow) {\n <td class=\"detail-row-expander\">\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\n @if (isRowExpanded(row)) {\n <i class=\"far fa-minus\"></i>\n } @else {\n <i class=\"far fa-plus\"></i>\n }\n </button>\n }\n </td>\n }\n\n @if (showRowNumbers()) {\n <td class=\"ng0-table-row-number\">\n {{ $firstRecordIndex + $index + 1}}\n </td>\n }\n\n @for (col of _columns; track $index) {\n <td\n [ngClass]=\"col.cellClass()\"\n [class.shrinked]=\"col.shrink()\"\n [class.fw-bold]=\"col.bold()\">\n @if (col.template) {\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\n </ng-container>\n } @else if (col.field()) {\n @let cellValue = _getCellValue(row, col);\n\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\n {{ col.emptyCellText() }}\n } @else {\n @if (col.type()) {\n @let type = $any(col.type());\n\n @if (type == \"date\") {\n {{ cellValue | ng0Date }}\n } @else if (type == \"number\") {\n {{ cellValue | number }}\n } @else if (type == \"currency\") {\n {{ cellValue | currency }}\n } @else if (type.enum) {\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\n } @else if (type.boolean || type == \"boolean\") {\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\n }@else {\n {{ cellValue }}\n }\n }\n }\n }\n </td>\n }\n </tr>\n\n @if (_detailRow && isRowExpanded(row)) {\n <tr class=\"detail-row\">\n <td\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\n class=\"ps-2 pb-4\">\n <ng-container\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\n </td>\n </tr>\n }\n }\n</ng-template>\n\n<ng-template #footerTemplate>\n @if ($pageable && showPagingControls() && $anyRecords && $totalRecordsCount! > 0) {\n <div class=\"ng0-table-pagination me-2\">\n <ng0-pagination\n class=\"mb-0 d-inline-block\"\n [showFirstLastButtons]=\"showFirstLastButtons()\"\n [showNextPreviousButtons]=\"showNextPreviousButtons()\"\n [totalRecords]=\"$totalRecordsCount!\"\n [pageSize]=\"pageSize()\"\n [selectedPage]=\"pageIndex()\"\n (itemClick)=\"_onPageChange($event)\"\n [maxVisiblePages]=\"maxVisiblePages()\">\n <ng-container ngProjectAs=\"first\">\n <ng-content select=\"paging-first\">\n {{ \"first\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"last\">\n <ng-content select=\"paging-last\">\n {{ \"last\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"next\">\n <ng-content select=\"paging-next\">\n {{ \"next\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"previous\">\n <ng-content select=\"paging-previous\">\n {{ \"previous\" | ng0Translate }}\n </ng-content>\n </ng-container>\n </ng0-pagination>\n </div>\n\n @if (pageSizeOptions()) {\n <div class=\"ng0-table-paging-options\">\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\n <option [ngValue]=\"10\" selected>10</option>\n </select>\n </div>\n }\n\n @if (showPagingInfo()) {\n <div class=\"ng0-table-paging-info ms-auto\">\n <ng-content select=\"paging-info\">\n {{\n _pagingFormatter({firstRecord: $firstRecordIndex, lastRecord: $lastRecordIndex, totalRecords: $totalRecordsCount!,\n currentPage: $pageIndex!})\n }}\n </ng-content>\n </div>\n }\n }\n</ng-template>\n\n<ng-template #nowDataTemplate>\n <tr class=\"ng0-table-error-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\n <div class=\"d-flex align-items-baseline\">\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\n {{ \"retry\" | ng0Translate }}\n </button>\n </div>\n </td>\n </tr>\n</ng-template>", styles: [":host{display:flex;flex-direction:column;position:relative}@starting-style{.ng0-table-loading-cover{background-color:#0000}}table{margin-bottom:0;height:100%}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable .ng0-table-sort-icon{transition:transform .2s;opacity:0}th.sortable.sort-none:hover .ng0-table-sort-icon{opacity:.4}th.sortable.sort-asc .ng0-table-sort-icon{transform:rotate(0);opacity:1;color:var(--bs-danger)}th.sortable.sort-desc .ng0-table-sort-icon{transform:rotate(180deg);opacity:1;color:var(--bs-primary)}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 .2s;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}.ng0-table-footer{margin-top:.5rem}.fade-in{animation:fade-in .5s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.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", "showNextPreviousButtons", "showFirstLastButtons"], outputs: ["itemClick"], exportAs: ["ng0Pagination"] }, { kind: "directive", type: NumberDirective, selector: "[ng0Number]", inputs: ["minFractionDigits", "maxFractionDigits", "useGrouping", "numberType"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i4.TranslatePipe, name: "ng0Translate" }, { kind: "pipe", type: i4.TranslateEnumPipe, name: "ng0TranslateEnum" }, { kind: "pipe", type: i4.DatePipe, name: "ng0Date" }, { kind: "pipe", type: i4.LocalizeBooleanPipe, name: "ng0LocalizeBool" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
402
423
|
}
|
|
403
424
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImport: i0, type: TableComponent, decorators: [{
|
|
404
425
|
type: Component,
|
|
@@ -409,14 +430,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
409
430
|
PaginationComponent,
|
|
410
431
|
NumberDirective,
|
|
411
432
|
OverlayModule
|
|
412
|
-
], template: "@let $dataResult = _dataResult();\n@let $pageable = pageable();\n@let $pageIndex = _lastRequest?.page?.index ?? 1;\n@let $data = $dataResult?.data;\n@let $anyRecords = $data && $data.length > 0;\n@let $totalRecordsCount = $dataResult?.total;\n@let $firstRecord = $pageable ? ($pageable.pageSize! * ($pageIndex - 1) + 1) : 1;\n@let $lastRecord = $data ? $firstRecord + $data.length - 1 : 1;\n@let $isLoading = _dataSource.isLoading();\n@let $isFirstLoad = $dataResult == undefined;\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\n@let $tableLocale = _ls.get()?.definition?.components?.table;\n\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\n <table class=\"table\" [ngClass]=\"tableClass()\">\n @if (caption()) {\n <caption>{{caption()}}</caption>\n }\n\n @if (showHeader()) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n\n @if (filterable()) {\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\n }\n\n <tbody>\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\n <tr class=\"ng0-table-loading-row\">\n <td [attr.colspan]=\"$columnsCount\">\n @switch (loadingIndicator()) {\n @case ('spinner') {\n <div class=\"text-center\">\n <div class=\"spinner-border\" role=\"status\"></div>\n </div>\n }\n }\n </td>\n </tr>\n } @else {\n @if ($data) {\n @if ($data.length > 0) {\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\n } @else {\n <tr class=\"ng0-table-no-records-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\n </td>\n </tr>\n }\n } @else if (_lastError) {\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\n }\n }\n </tbody>\n </table>\n</div>\n\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n</div>\n\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\n<div class=\"ng0-table-loading-cover text-center\">\n @if (loadingCover() == 'spinner') {\n <div class=\"spinner-border\" role=\"status\"></div>\n }\n</div>\n}\n\n<ng-template #filtersTemplate>\n <thead>\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th></th>\n }\n\n @for (col of _columns; track $index) {\n <th>\n @if(col.filterable() && (col.field() || col.filterValue())) {\n\n <div class=\"input-group\">\n @switch (col.type()) {\n @case ('text') {\n <input [name]=\"'filter-' + col.field\"\n type=\"search\"\n [maxlength]=\"50\"\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n @case ('number') {\n <input [name]=\"'datatablecol-' + col.field\"\n type=\"search\"\n ng0Number\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n }\n\n <button class=\"btn btn-outline-light\"\n style=\"border-color: var(--bs-border-color);\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"_onToggleFilterOperator(col)\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\n </svg>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\n (detach)=\"col.showFilterOperators.set(false)\">\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\n @for (item of col.getFilterOperators(); track $index) {\n <li>\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\n (click)=\"_onSelectFilterOperator(col, item)\">\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\n </button>\n </li>\n }\n </ul>\n </ng-template>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #headerTemplate>\n <thead [ngClass]=\"headerClass()\">\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th class=\"row-number text-muted\">#</th>\n }\n\n @for (col of _columns; track $index) {\n <th\n (click)=\"col.toggleSortDirection(); load()\"\n [class.sortable]=\"sortable() && col.sortable()\"\n [ngClass]=\"{ \n 'sort-asc': col.sortDirection() == 'asc', \n 'sort-desc': col.sortDirection() == 'desc',\n 'sort-none': col.sortDirection() == 'none'\n }\">\n {{ col.title() }}\n\n @if(sortable() && col.sortable()) {\n <svg class=\"ng0-table-sort-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #dataRowsTemplate>\n @for (row of $data; track $index) {\n <tr [class.table-active]=\"isRowExpanded(row)\">\n @if (_detailRow) {\n <td class=\"detail-row-expander\">\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\n @if (isRowExpanded(row)) {\n <i class=\"far fa-minus\"></i>\n } @else {\n <i class=\"far fa-plus\"></i>\n }\n </button>\n }\n </td>\n }\n\n @if (showRowNumbers()) {\n <td class=\"ng0-table-row-number\">\n {{ $firstRecord + $index }}\n </td>\n }\n\n @for (col of _columns; track $index) {\n <td\n [ngClass]=\"col.cellClass()\"\n [class.shrinked]=\"col.shrink()\"\n [class.fw-bold]=\"col.bold()\">\n @if (col.template) {\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\n </ng-container>\n } @else if (col.field()) {\n @let cellValue = _getCellValue(row, col);\n\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\n {{ col.emptyCellText() }}\n } @else {\n @if (col.type()) {\n @let type = $any(col.type());\n\n @if (type == \"date\") {\n {{ cellValue | ng0Date }}\n } @else if (type == \"number\") {\n {{ cellValue | number }}\n } @else if (type == \"currency\") {\n {{ cellValue | currency }}\n } @else if (type.enum) {\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\n } @else if (type.boolean || type == \"boolean\") {\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\n }@else {\n {{ cellValue }}\n }\n }\n }\n }\n </td>\n }\n </tr>\n\n @if (_detailRow && isRowExpanded(row)) {\n <tr class=\"detail-row\">\n <td\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\n class=\"ps-2 pb-4\">\n <ng-container\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\n </td>\n </tr>\n }\n }\n</ng-template>\n\n<ng-template #footerTemplate>\n @if ($pageable && $pageable.showPagingControls && $anyRecords && $totalRecordsCount! > 0) {\n <div class=\"ng0-table-pagination me-2\">\n <ng0-pagination\n class=\"mb-0 d-inline-block\"\n [showFirstLastButtons]=\"$pageable.showFirstLastButtons == true\"\n [showNextPreviousButtons]=\"$pageable.showNextPreviousButtons == true\"\n [totalRecords]=\"$totalRecordsCount!\"\n [pageSize]=\"$pageable.pageSize!\"\n [selectedPage]=\"$pageIndex\"\n (itemClick)=\"_onPageChange($event)\"\n [maxVisiblePages]=\"$pageable.maxVisiblePages!\">\n <ng-container ngProjectAs=\"first\">\n <ng-content select=\"paging-first\">\n {{ \"first\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"last\">\n <ng-content select=\"paging-last\">\n {{ \"last\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"next\">\n <ng-content select=\"paging-next\">\n {{ \"next\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"previous\">\n <ng-content select=\"paging-previous\">\n {{ \"previous\" | ng0Translate }}\n </ng-content>\n </ng-container>\n </ng0-pagination>\n </div>\n\n @if ($pageable.showPageSizeOptions || $pageable.showPageSizeOptions == undefined) {\n <div class=\"ng0-table-paging-options\">\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\n <option [ngValue]=\"10\" selected>10</option>\n </select>\n </div>\n }\n\n @if ($pageable.showPagingInfo == undefined || $pageable.showPagingInfo) {\n <div class=\"ng0-table-paging-info ms-auto\">\n <ng-content select=\"paging-info\">\n {{\n _pagingFormatter({firstRecord: $firstRecord, lastRecord: $lastRecord, totalRecords: $totalRecordsCount!,\n currentPage: $pageIndex!})\n }}\n </ng-content>\n </div>\n }\n }\n</ng-template>\n\n<ng-template #nowDataTemplate>\n <tr class=\"ng0-table-error-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\n <div class=\"d-flex align-items-baseline\">\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\n {{ \"retry\" | ng0Translate }}\n </button>\n </div>\n </td>\n </tr>\n</ng-template>", styles: [":host{display:flex;flex-direction:column;position:relative}@starting-style{.ng0-table-loading-cover{background-color:#0000}}table{margin-bottom:0}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable .ng0-table-sort-icon{transition:transform .2s;opacity:0}th.sortable.sort-none:hover .ng0-table-sort-icon{opacity:.4}th.sortable.sort-asc .ng0-table-sort-icon{transform:rotate(0);opacity:1;color:var(--bs-danger)}th.sortable.sort-desc .ng0-table-sort-icon{transform:rotate(180deg);opacity:1;color:var(--bs-primary)}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 .2s;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}.ng0-table-footer{margin-top:.5rem}.fade-in{animation:fade-in .5s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}\n"] }]
|
|
433
|
+
], template: "@let $dataResult = _dataResult();\n@let $pageable = pageable();\n@let $pageIndex = pageIndex();\n@let $pageSize = pageSize();\n@let $data = $dataResult?.data;\n@let $anyRecords = $data && $data.length > 0;\n@let $totalRecordsCount = $dataResult?.total;\n@let $firstRecordIndex = $pageable ? ($pageSize * $pageIndex) : 0;\n@let $lastRecordIndex = $data ? $firstRecordIndex + $data.length - 1 : 1;\n@let $isLoading = _dataSource.isLoading();\n@let $isFirstLoad = $dataResult == undefined;\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\n@let $tableLocale = _ls.get()?.definition?.components?.table;\n\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\n <table class=\"table\" [ngClass]=\"tableClass()\">\n @if (caption()) {\n <caption>{{caption()}}</caption>\n }\n\n @if (showHeader()) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n\n @if (filterable()) {\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\n }\n\n <tbody>\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\n <tr class=\"ng0-table-loading-row\">\n <td [attr.colspan]=\"$columnsCount\">\n @switch (loadingIndicator()) {\n @case ('spinner') {\n <div class=\"text-center\">\n <div class=\"spinner-border\" role=\"status\"></div>\n </div>\n }\n }\n </td>\n </tr>\n } @else {\n @if ($data) {\n @if ($data.length > 0) {\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\n } @else {\n <tr class=\"ng0-table-no-records-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\n </td>\n </tr>\n }\n } @else if (_lastError) {\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\n }\n }\n </tbody>\n </table>\n</div>\n\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n</div>\n\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\n<div class=\"ng0-table-loading-cover text-center\">\n @if (loadingCover() == 'spinner') {\n <div class=\"spinner-border\" role=\"status\"></div>\n }\n</div>\n}\n\n<ng-template #filtersTemplate>\n <thead>\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th></th>\n }\n\n @for (col of _columns; track $index) {\n <th>\n @if(col.filterable() && (col.field() || col.filterValue())) {\n\n <div class=\"input-group\">\n @switch (col.type()) {\n @case ('text') {\n <input [name]=\"'filter-' + col.field\"\n type=\"search\"\n [maxlength]=\"50\"\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n @case ('number') {\n <input [name]=\"'datatablecol-' + col.field\"\n type=\"search\"\n ng0Number\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n }\n\n <button class=\"btn btn-outline-light\"\n style=\"border-color: var(--bs-border-color);\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"_onToggleFilterOperator(col)\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\n </svg>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\n (detach)=\"col.showFilterOperators.set(false)\">\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\n @for (item of col.getFilterOperators(); track $index) {\n <li>\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\n (click)=\"_onSelectFilterOperator(col, item)\">\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\n </button>\n </li>\n }\n </ul>\n </ng-template>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #headerTemplate>\n <thead [ngClass]=\"headerClass()\">\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th class=\"row-number text-muted\">#</th>\n }\n\n @for (col of _columns; track $index) {\n <th\n (click)=\"col.toggleSortDirection(); load()\"\n [class.sortable]=\"sortable() && col.sortable()\"\n [ngClass]=\"{ \n 'sort-asc': col.sortDirection() == 'asc', \n 'sort-desc': col.sortDirection() == 'desc',\n 'sort-none': col.sortDirection() == 'none'\n }\">\n {{ col.title() }}\n\n @if(sortable() && col.sortable()) {\n <svg class=\"ng0-table-sort-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #dataRowsTemplate>\n @for (row of $data; track $index) {\n <tr [class.table-active]=\"isRowExpanded(row)\">\n @if (_detailRow) {\n <td class=\"detail-row-expander\">\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\n @if (isRowExpanded(row)) {\n <i class=\"far fa-minus\"></i>\n } @else {\n <i class=\"far fa-plus\"></i>\n }\n </button>\n }\n </td>\n }\n\n @if (showRowNumbers()) {\n <td class=\"ng0-table-row-number\">\n {{ $firstRecordIndex + $index + 1}}\n </td>\n }\n\n @for (col of _columns; track $index) {\n <td\n [ngClass]=\"col.cellClass()\"\n [class.shrinked]=\"col.shrink()\"\n [class.fw-bold]=\"col.bold()\">\n @if (col.template) {\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\n </ng-container>\n } @else if (col.field()) {\n @let cellValue = _getCellValue(row, col);\n\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\n {{ col.emptyCellText() }}\n } @else {\n @if (col.type()) {\n @let type = $any(col.type());\n\n @if (type == \"date\") {\n {{ cellValue | ng0Date }}\n } @else if (type == \"number\") {\n {{ cellValue | number }}\n } @else if (type == \"currency\") {\n {{ cellValue | currency }}\n } @else if (type.enum) {\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\n } @else if (type.boolean || type == \"boolean\") {\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\n }@else {\n {{ cellValue }}\n }\n }\n }\n }\n </td>\n }\n </tr>\n\n @if (_detailRow && isRowExpanded(row)) {\n <tr class=\"detail-row\">\n <td\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\n class=\"ps-2 pb-4\">\n <ng-container\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\n </td>\n </tr>\n }\n }\n</ng-template>\n\n<ng-template #footerTemplate>\n @if ($pageable && showPagingControls() && $anyRecords && $totalRecordsCount! > 0) {\n <div class=\"ng0-table-pagination me-2\">\n <ng0-pagination\n class=\"mb-0 d-inline-block\"\n [showFirstLastButtons]=\"showFirstLastButtons()\"\n [showNextPreviousButtons]=\"showNextPreviousButtons()\"\n [totalRecords]=\"$totalRecordsCount!\"\n [pageSize]=\"pageSize()\"\n [selectedPage]=\"pageIndex()\"\n (itemClick)=\"_onPageChange($event)\"\n [maxVisiblePages]=\"maxVisiblePages()\">\n <ng-container ngProjectAs=\"first\">\n <ng-content select=\"paging-first\">\n {{ \"first\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"last\">\n <ng-content select=\"paging-last\">\n {{ \"last\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"next\">\n <ng-content select=\"paging-next\">\n {{ \"next\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"previous\">\n <ng-content select=\"paging-previous\">\n {{ \"previous\" | ng0Translate }}\n </ng-content>\n </ng-container>\n </ng0-pagination>\n </div>\n\n @if (pageSizeOptions()) {\n <div class=\"ng0-table-paging-options\">\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\n <option [ngValue]=\"10\" selected>10</option>\n </select>\n </div>\n }\n\n @if (showPagingInfo()) {\n <div class=\"ng0-table-paging-info ms-auto\">\n <ng-content select=\"paging-info\">\n {{\n _pagingFormatter({firstRecord: $firstRecordIndex, lastRecord: $lastRecordIndex, totalRecords: $totalRecordsCount!,\n currentPage: $pageIndex!})\n }}\n </ng-content>\n </div>\n }\n }\n</ng-template>\n\n<ng-template #nowDataTemplate>\n <tr class=\"ng0-table-error-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\n <div class=\"d-flex align-items-baseline\">\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\n {{ \"retry\" | ng0Translate }}\n </button>\n </div>\n </td>\n </tr>\n</ng-template>", styles: [":host{display:flex;flex-direction:column;position:relative}@starting-style{.ng0-table-loading-cover{background-color:#0000}}table{margin-bottom:0;height:100%}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable .ng0-table-sort-icon{transition:transform .2s;opacity:0}th.sortable.sort-none:hover .ng0-table-sort-icon{opacity:.4}th.sortable.sort-asc .ng0-table-sort-icon{transform:rotate(0);opacity:1;color:var(--bs-danger)}th.sortable.sort-desc .ng0-table-sort-icon{transform:rotate(180deg);opacity:1;color:var(--bs-primary)}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 .2s;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}.ng0-table-footer{margin-top:.5rem}.fade-in{animation:fade-in .5s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}\n"] }]
|
|
413
434
|
}], propDecorators: { _columns: [{
|
|
414
435
|
type: ContentChildren,
|
|
415
436
|
args: [TableColumnDirective]
|
|
416
437
|
}], _detailRow: [{
|
|
417
438
|
type: ContentChild,
|
|
418
439
|
args: [TableDetailRowDirective]
|
|
419
|
-
}], source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: true }] }], autoLoad: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoLoad", required: false }] }], showRowNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRowNumbers", required: false }] }], showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], pageable: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageable", required: false }] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortable", required: false }] }], tableClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClass", required: false }] }], headerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerClass", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], loadingIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIndicator", required: false }] }], loadingCover: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingCover", required: false }] }], isLoading: [{
|
|
440
|
+
}], source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: true }] }], autoLoad: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoLoad", required: false }] }], showRowNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRowNumbers", required: false }] }], showHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHeader", required: false }] }], pageable: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageable", required: false }] }], pageIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageIndex", required: false }] }, { type: i0.Output, args: ["pageIndexChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], maxVisiblePages: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxVisiblePages", required: false }] }], showPagingControls: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPagingControls", required: false }] }], showFirstLastButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstLastButtons", required: false }] }], showNextPreviousButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showNextPreviousButtons", required: false }] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showPagingInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPagingInfo", required: false }] }], sortable: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortable", required: false }] }], tableClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableClass", required: false }] }], headerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerClass", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], loadingIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIndicator", required: false }] }], loadingCover: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingCover", required: false }] }], isLoading: [{
|
|
420
441
|
type: HostBinding,
|
|
421
442
|
args: ['class.ng0-loading']
|
|
422
443
|
}] } });
|
|
@@ -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/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 { booleanAttribute, ContentChild, Directive, input, model, OnInit, signal, TemplateRef } from '@angular/core';\nimport { TableCellType } from './types';\n\n@Directive({\n selector: 'ng0-table-col',\n standalone: true,\n})\nexport class TableColumnDirective implements OnInit {\n /**\n * The field in the data source to bind to. If not set, the column will not display any data.\n */\n field = input<string>();\n\n /**\n * The title of the column. This will be displayed in the header row.\n */\n title = input<string>();\n\n /**\n * Text to display in the cell if the value is null or undefined.\n */\n emptyCellText = input<string>();\n\n /**\n * Type of the table cell.\n */\n type = input<TableCellType>('text');\n\n /**\n * CSS class(es) to apply to the table cell.\n */\n cellClass = input<string | string[] | { [klass: string]: any; } | null>();\n\n /** \n * @deprecated Use `cellClass` instead.\n */\n bold = input(false, { transform: booleanAttribute });\n\n /** \n * @deprecated Use `cellClass` instead.\n */\n shrink = input(false, { transform: booleanAttribute });\n\n /**\n * If true, the column will support filtering.\n */\n filterable = input(false, { transform: booleanAttribute });\n\n /**\n * The current filter value of the column.\n */\n filterValue = model<any>();\n\n /**\n * The field to use for filtering. If not set, the `field` property will be used.\n * @deprecated Use `fieldName` instead.\n */\n filterField = input<string>();\n\n /**\n * The current filter operator of the column.\n */\n filterOperator = model<string>();\n\n /**\n * The list of filter operators to show in the filter dropdown. If not set, a default list will be used based on the column type.\n */\n filterOperators = input<string[]>();\n\n /**\n * If true, the filter operators dropdown will be shown.\n */\n showFilterOperators = signal(false);\n\n /**\n * The name of the field in the data source. If not set, the `field` property will be used.\n */\n fieldName = input<string>();\n\n /**\n * If true, the column will support sorting.\n */\n public sortable = input(false, { transform: booleanAttribute });\n\n /**\n * The current sort direction of the column.\n */\n public sortDirection = model<'none' | 'asc' | 'desc'>('none');\n\n @ContentChild(TemplateRef) template?: TemplateRef<any>;\n\n constructor() {\n }\n\n ngOnInit(): void {\n if (this.filterOperator() == undefined) {\n this.filterOperator.set(this.type() == 'text' ? 'contains' : 'eq');\n }\n }\n\n /**\n * Get the list of filter operators to show in the filter dropdown.\n */\n public getFilterOperators(): string[] {\n let op = this.filterOperators();\n if (op && op.length > 0)\n return op;\n\n let type = this.type();\n if (type == 'number' || type == 'currency' || type == 'date' || type == 'time') {\n return ['eq', 'ne', 'gt', 'gte', 'lt', 'lte',]\n } else if (type == 'text') {\n return ['contains', 'startsWith', 'endsWith', 'eq', 'ne']\n } else {\n return []\n }\n }\n\n /**\n * Toggle the sort direction of the column.\n * @returns void\n */\n public toggleSortDirection(): void {\n if (!this.sortable()) {\n return;\n }\n\n let dir = this.sortDirection();\n if (dir === 'none') {\n this.sortDirection.set('asc');\n } else if (dir === 'asc') {\n this.sortDirection.set('desc');\n } else {\n this.sortDirection.set('none');\n }\n }\n}\n","import { Directive, Input, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[ng0-table-detail-row]',\n standalone: true,\n})\nexport class TableDetailRowDirective {\n @Input() showCallback?: (row: any) => boolean;\n\n constructor(public readonly templateRef: TemplateRef<any>) {\n }\n}\n","import { AfterContentInit, booleanAttribute, ChangeDetectionStrategy, Component, computed, ContentChild, ContentChildren, DestroyRef, HostBinding, inject, input, model, OnDestroy, OnInit, QueryList, signal } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { TableColumnDirective } from './table-column.directive';\nimport { TableDetailRowDirective } from './table-detail-row.directive';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { formatString } from '@bootkit/ng0/common';\nimport { LocalizationModule, LocalizationService, TableComponentPagingFormatter } from '@bootkit/ng0/localization';\nimport { DataRequest, DataRequestFilter, DataRequestPage, DataRequestSort, DataResult, DataSource, dataSourceAttribute, DataSourceLike, LogicalOperator } from '@bootkit/ng0/data';\nimport { PaginationComponent } from '@bootkit/ng0/components/pagination';\nimport { TablePagingOptions } from './types';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { NumberDirective } from '@bootkit/ng0/form';\n\n/**\n * A generic table component that can display data in a tabular format.\n * It supports features like pagination, sorting, filtering, and row details.\n * It can be used with any data source that implements the DataSource interface.\n */\n@Component({\n selector: 'ng0-table',\n exportAs: 'ng0Table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n LocalizationModule,\n PaginationComponent,\n NumberDirective,\n OverlayModule\n ]\n})\nexport class TableComponent implements AfterContentInit, OnDestroy {\n protected _ls = inject(LocalizationService);\n private _destroyRef = inject(DestroyRef);\n private _changeSubscription?: Subscription;\n\n @ContentChildren(TableColumnDirective)\n protected _columns!: QueryList<TableColumnDirective>;\n\n @ContentChild(TableDetailRowDirective)\n protected _detailRow?: TableDetailRowDirective;\n\n protected _dataResult = signal<DataResult | undefined>(undefined);\n protected _lastRequest?: DataRequest; // The last data request made to the data source\n protected _loadingRequest?: DataRequest; // The current data request being processed\n protected _rowStates = new Map<any, { expanded: boolean }>();\n protected _formatString = formatString;\n protected _dataSource!: DataSource;\n protected _pagingFormatter!: TableComponentPagingFormatter;\n protected _lastError?: any;\n\n /**\n * The data source for the table.\n * This can be an array of data, a function that returns an observable of data,\n * or an instance of DataSource.\n */\n public readonly source = input.required<DataSourceLike<any>>();\n\n /**\n * If true, the table will automatically load data when initialized.\n * This is useful for tables that need to display data immediately without user interaction.\n */\n public readonly autoLoad = input(true, { transform: booleanAttribute });\n\n /**\n * If true, the table will show row numbers.\n * This will add a column to the left of the table with the row numbers.\n */\n public readonly showRowNumbers = input(false, { transform: booleanAttribute });\n\n /** \n * If true, the table will show the header row.\n */\n public readonly showHeader = input(true, { transform: booleanAttribute });\n\n /**\n * If true, the table will support pagination.\n * If false, the table will load all records at once.\n */\n public readonly pageable = input<TablePagingOptions | undefined, TablePagingOptions | boolean>(undefined, {\n transform: v => {\n if (v === undefined || v === null || v === false) {\n return undefined;\n }\n\n if (v === true) {\n v = {};\n }\n\n v.pageIndex = v.pageIndex ?? 1;\n v.pageSize = v.pageSize ?? 10;\n v.maxVisiblePages = v.maxVisiblePages ?? 10;\n v.showPagingControls = v.showPagingControls ?? true;\n return v;\n }\n });\n\n /**\n * If true, the table will support sorting.\n * This will add a sort icon to each column header.\n */\n public readonly sortable = input(true, { transform: booleanAttribute });\n\n /**\n * The CSS class to apply to the table element.\n * This can be used to apply custom styles to the table.\n */\n public readonly tableClass = input<string | string[]>();\n\n /**\n * The CSS class to apply to the header element.\n */\n public readonly headerClass = input<string>();\n\n /**\n * The caption of the table.\n */\n public readonly caption = input<string>();\n\n /**\n * The height of the table in pixels.\n * This can be used to set a fixed height for the table.\n */\n public readonly height = input<number>();\n\n /**\n * If true, the table will support filtering.\n * This will add a filter input to each column header.\n */\n public readonly filterable = input(false, { transform: booleanAttribute });\n\n /**\n * The indicator to show while the table is loading data for the first time.\n */\n public readonly loadingIndicator = input<'none' | 'simple' | 'spinner', boolean | 'none' | 'simple' | 'spinner'>('spinner', {\n transform: v => {\n if (typeof v === 'boolean') {\n return v ? 'spinner' : 'none';\n }\n return v;\n }\n });\n\n /** If true, the table will show a loading cover while data is being loaded.\n * This can be used to prevent user interaction with the table while loading.\n * This cover is not displayed when the table is loading for the first time.\n * Instead, the table will show a loading based on loadingIndicator settings.\n */\n public readonly loadingCover = input<'none' | 'simple' | 'spinner', boolean | 'none' | 'simple' | 'spinner'>('spinner', {\n transform: v => {\n if (typeof v === 'boolean') {\n return v ? 'spinner' : 'none';\n }\n return v;\n }\n });\n\n // @Input() rowColor?: (row: any) => BootstrapColor;\n\n ngAfterContentInit(): void {\n this._dataSource = dataSourceAttribute(this.source());\n const locale = this._ls.get();\n this._pagingFormatter = locale?.definition.components?.table?.pagingInfo ??\n ((o) => `Showing ${o.firstRecord}-${o.lastRecord} of ${o.totalRecords} records`);\n\n // this._changeSubscription = this.dataSource().change.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(result => {\n // this.reload();\n // });\n\n if (this.autoLoad()) {\n this.load(this.pageable()?.pageIndex);\n }\n }\n\n /**\n * Load data for the specified page index (optional).\n * @param pageIndex The page index to load.\n */\n public load(pageIndex?: number) {\n let page: DataRequestPage | undefined;\n let filters: DataRequestFilter[] = [];\n let sort: DataRequestSort | undefined;\n\n if (this.filterable()) {\n this._columns.forEach(col => {\n if (col.filterable() && col.filterValue() != '' && col.filterValue() != undefined) {\n filters.push({ field: col.fieldName() ?? col.filterField() ?? col.field(), value: col.filterValue(), operator: col.filterOperator() });\n }\n });\n }\n\n if (this.pageable()) {\n page = {\n index: pageIndex || this._lastRequest?.page?.index || 0,\n size: this._lastRequest?.page?.size || 10,\n };\n }\n\n if (this.sortable()) {\n let col = this._columns.find(c => c.sortable() && c.sortDirection() != 'none' && (c.field() != '' || c.fieldName() != ''));\n if (col) {\n sort = {\n field: col.fieldName() ?? col.field()!,\n asc: col.sortDirection() === 'asc'\n }\n }\n }\n\n this._loadingRequest = new DataRequest({ page, filters, sort, select: [], computeTotal: true });\n\n this._dataSource.load(this._loadingRequest)\n .pipe(takeUntilDestroyed(this._destroyRef)).subscribe({\n next: result => {\n this._dataResult.set(result);\n this._lastRequest = this._loadingRequest;\n this._loadingRequest = undefined;\n this._lastError = undefined;\n }, error: err => {\n this._lastError = err;\n this._lastRequest = this._loadingRequest;\n this._loadingRequest = undefined;\n }\n });\n }\n\n /**\n * Determines if the table is currently loading data.\n */\n @HostBinding('class.ng0-loading')\n public get isLoading() {\n return this._dataSource.isLoading;\n }\n\n protected _getCellValue(row: any, col: TableColumnDirective) {\n var subFields = col.field()!.split('.');\n let value = row[subFields[0]];\n for (let i = 1; i < subFields.length; i++) {\n if (value == null) break;\n value = value[subFields[i]];\n }\n\n return value;\n }\n\n protected _onPageChange(pageIndex: number) {\n this.load(pageIndex);\n }\n\n protected _onToggleRowDetailClick(row: any) {\n var state = this._rowStates.get(row)\n if (!state) {\n this._rowStates.set(row, { expanded: true });\n } else {\n state.expanded = !state.expanded;\n }\n }\n\n protected isRowExpanded(row: any) {\n var state = this._rowStates.get(row)\n return state == undefined ? false : state.expanded;\n }\n\n protected _onToggleFilterOperator(col: TableColumnDirective) {\n if (col.showFilterOperators()) {\n col.showFilterOperators.set(false)\n } else {\n this._columns.forEach(x => x.showFilterOperators.set(false));\n col.showFilterOperators.set(true)\n }\n }\n\n protected _onSelectFilterOperator(col: TableColumnDirective, filterOperator: string) {\n col.filterOperator.set(filterOperator);\n this._columns.forEach(x => x.showFilterOperators.set(false));\n this.load(0);\n }\n\n ngOnDestroy(): void {\n this._changeSubscription?.unsubscribe();\n }\n}\n","@let $dataResult = _dataResult();\n@let $pageable = pageable();\n@let $pageIndex = _lastRequest?.page?.index ?? 1;\n@let $data = $dataResult?.data;\n@let $anyRecords = $data && $data.length > 0;\n@let $totalRecordsCount = $dataResult?.total;\n@let $firstRecord = $pageable ? ($pageable.pageSize! * ($pageIndex - 1) + 1) : 1;\n@let $lastRecord = $data ? $firstRecord + $data.length - 1 : 1;\n@let $isLoading = _dataSource.isLoading();\n@let $isFirstLoad = $dataResult == undefined;\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\n@let $tableLocale = _ls.get()?.definition?.components?.table;\n\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\n <table class=\"table\" [ngClass]=\"tableClass()\">\n @if (caption()) {\n <caption>{{caption()}}</caption>\n }\n\n @if (showHeader()) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n\n @if (filterable()) {\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\n }\n\n <tbody>\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\n <tr class=\"ng0-table-loading-row\">\n <td [attr.colspan]=\"$columnsCount\">\n @switch (loadingIndicator()) {\n @case ('spinner') {\n <div class=\"text-center\">\n <div class=\"spinner-border\" role=\"status\"></div>\n </div>\n }\n }\n </td>\n </tr>\n } @else {\n @if ($data) {\n @if ($data.length > 0) {\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\n } @else {\n <tr class=\"ng0-table-no-records-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\n </td>\n </tr>\n }\n } @else if (_lastError) {\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\n }\n }\n </tbody>\n </table>\n</div>\n\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n</div>\n\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\n<div class=\"ng0-table-loading-cover text-center\">\n @if (loadingCover() == 'spinner') {\n <div class=\"spinner-border\" role=\"status\"></div>\n }\n</div>\n}\n\n<ng-template #filtersTemplate>\n <thead>\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th></th>\n }\n\n @for (col of _columns; track $index) {\n <th>\n @if(col.filterable() && (col.field() || col.filterValue())) {\n\n <div class=\"input-group\">\n @switch (col.type()) {\n @case ('text') {\n <input [name]=\"'filter-' + col.field\"\n type=\"search\"\n [maxlength]=\"50\"\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n @case ('number') {\n <input [name]=\"'datatablecol-' + col.field\"\n type=\"search\"\n ng0Number\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n }\n\n <button class=\"btn btn-outline-light\"\n style=\"border-color: var(--bs-border-color);\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"_onToggleFilterOperator(col)\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\n </svg>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\n (detach)=\"col.showFilterOperators.set(false)\">\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\n @for (item of col.getFilterOperators(); track $index) {\n <li>\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\n (click)=\"_onSelectFilterOperator(col, item)\">\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\n </button>\n </li>\n }\n </ul>\n </ng-template>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #headerTemplate>\n <thead [ngClass]=\"headerClass()\">\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th class=\"row-number text-muted\">#</th>\n }\n\n @for (col of _columns; track $index) {\n <th\n (click)=\"col.toggleSortDirection(); load()\"\n [class.sortable]=\"sortable() && col.sortable()\"\n [ngClass]=\"{ \n 'sort-asc': col.sortDirection() == 'asc', \n 'sort-desc': col.sortDirection() == 'desc',\n 'sort-none': col.sortDirection() == 'none'\n }\">\n {{ col.title() }}\n\n @if(sortable() && col.sortable()) {\n <svg class=\"ng0-table-sort-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #dataRowsTemplate>\n @for (row of $data; track $index) {\n <tr [class.table-active]=\"isRowExpanded(row)\">\n @if (_detailRow) {\n <td class=\"detail-row-expander\">\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\n @if (isRowExpanded(row)) {\n <i class=\"far fa-minus\"></i>\n } @else {\n <i class=\"far fa-plus\"></i>\n }\n </button>\n }\n </td>\n }\n\n @if (showRowNumbers()) {\n <td class=\"ng0-table-row-number\">\n {{ $firstRecord + $index }}\n </td>\n }\n\n @for (col of _columns; track $index) {\n <td\n [ngClass]=\"col.cellClass()\"\n [class.shrinked]=\"col.shrink()\"\n [class.fw-bold]=\"col.bold()\">\n @if (col.template) {\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\n </ng-container>\n } @else if (col.field()) {\n @let cellValue = _getCellValue(row, col);\n\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\n {{ col.emptyCellText() }}\n } @else {\n @if (col.type()) {\n @let type = $any(col.type());\n\n @if (type == \"date\") {\n {{ cellValue | ng0Date }}\n } @else if (type == \"number\") {\n {{ cellValue | number }}\n } @else if (type == \"currency\") {\n {{ cellValue | currency }}\n } @else if (type.enum) {\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\n } @else if (type.boolean || type == \"boolean\") {\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\n }@else {\n {{ cellValue }}\n }\n }\n }\n }\n </td>\n }\n </tr>\n\n @if (_detailRow && isRowExpanded(row)) {\n <tr class=\"detail-row\">\n <td\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\n class=\"ps-2 pb-4\">\n <ng-container\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\n </td>\n </tr>\n }\n }\n</ng-template>\n\n<ng-template #footerTemplate>\n @if ($pageable && $pageable.showPagingControls && $anyRecords && $totalRecordsCount! > 0) {\n <div class=\"ng0-table-pagination me-2\">\n <ng0-pagination\n class=\"mb-0 d-inline-block\"\n [showFirstLastButtons]=\"$pageable.showFirstLastButtons == true\"\n [showNextPreviousButtons]=\"$pageable.showNextPreviousButtons == true\"\n [totalRecords]=\"$totalRecordsCount!\"\n [pageSize]=\"$pageable.pageSize!\"\n [selectedPage]=\"$pageIndex\"\n (itemClick)=\"_onPageChange($event)\"\n [maxVisiblePages]=\"$pageable.maxVisiblePages!\">\n <ng-container ngProjectAs=\"first\">\n <ng-content select=\"paging-first\">\n {{ \"first\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"last\">\n <ng-content select=\"paging-last\">\n {{ \"last\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"next\">\n <ng-content select=\"paging-next\">\n {{ \"next\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"previous\">\n <ng-content select=\"paging-previous\">\n {{ \"previous\" | ng0Translate }}\n </ng-content>\n </ng-container>\n </ng0-pagination>\n </div>\n\n @if ($pageable.showPageSizeOptions || $pageable.showPageSizeOptions == undefined) {\n <div class=\"ng0-table-paging-options\">\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\n <option [ngValue]=\"10\" selected>10</option>\n </select>\n </div>\n }\n\n @if ($pageable.showPagingInfo == undefined || $pageable.showPagingInfo) {\n <div class=\"ng0-table-paging-info ms-auto\">\n <ng-content select=\"paging-info\">\n {{\n _pagingFormatter({firstRecord: $firstRecord, lastRecord: $lastRecord, totalRecords: $totalRecordsCount!,\n currentPage: $pageIndex!})\n }}\n </ng-content>\n </div>\n }\n }\n</ng-template>\n\n<ng-template #nowDataTemplate>\n <tr class=\"ng0-table-error-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\n <div class=\"d-flex align-items-baseline\">\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\n {{ \"retry\" | ng0Translate }}\n </button>\n </div>\n </td>\n </tr>\n</ng-template>","import { NgModule } from '@angular/core';\nimport { TableColumnDirective } from './table-column.directive';\nimport { TableComponent } from './table.component';\nimport { TableDetailRowDirective } from './table-detail-row.directive';\n\n@NgModule({\n imports: [\n TableComponent,\n TableColumnDirective,\n TableDetailRowDirective,\n ],\n exports: [\n TableComponent,\n TableColumnDirective,\n TableDetailRowDirective\n ],\n})\nexport class TableModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAOa,oBAAoB,CAAA;AAC/B;;AAEG;IACH,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAEvB;;AAEG;IACH,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAEvB;;AAEG;IACH,aAAa,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,eAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAE/B;;AAEG;AACH,IAAA,IAAI,GAAG,KAAK,CAAgB,MAAM,gDAAC;AAEnC;;AAEG;IACH,SAAS,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAwD;AAEzE;;AAEG;AACH,IAAA,IAAI,GAAG,KAAK,CAAC,KAAK,wCAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA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IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,WAAW;wBACX,kBAAkB;wBAClB,mBAAmB;wBACnB,eAAe;wBACf;AACD,qBAAA,EAAA,QAAA,EAAA,y9WAAA,EAAA,MAAA,EAAA,CAAA,itCAAA,CAAA,EAAA;;sBAOA,eAAe;uBAAC,oBAAoB;;sBAGpC,YAAY;uBAAC,uBAAuB;;sBA6LpC,WAAW;uBAAC,mBAAmB;;;MExNrB,WAAW,CAAA;wGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,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,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAVhB,cAAc,CAAA,EAAA,CAAA;;4FAUT,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 { booleanAttribute, ContentChild, Directive, input, model, OnInit, signal, TemplateRef } from '@angular/core';\nimport { TableCellType } from './types';\n\n@Directive({\n selector: 'ng0-table-col',\n standalone: true,\n})\nexport class TableColumnDirective implements OnInit {\n /**\n * The field in the data source to bind to. If not set, the column will not display any data.\n */\n field = input<string>();\n\n /**\n * The title of the column. This will be displayed in the header row.\n */\n title = input<string>();\n\n /**\n * Text to display in the cell if the value is null or undefined.\n */\n emptyCellText = input<string>();\n\n /**\n * Type of the table cell.\n */\n type = input<TableCellType>('text');\n\n /**\n * CSS class(es) to apply to the table cell.\n */\n cellClass = input<string | string[] | { [klass: string]: any; } | null>();\n\n /** \n * @deprecated Use `cellClass` instead.\n */\n bold = input(false, { transform: booleanAttribute });\n\n /** \n * @deprecated Use `cellClass` instead.\n */\n shrink = input(false, { transform: booleanAttribute });\n\n /**\n * If true, the column will support filtering.\n */\n filterable = input(false, { transform: booleanAttribute });\n\n /**\n * The current filter value of the column.\n */\n filterValue = model<any>();\n\n /**\n * The field to use for filtering. If not set, the `field` property will be used.\n * @deprecated Use `fieldName` instead.\n */\n filterField = input<string>();\n\n /**\n * The current filter operator of the column.\n */\n filterOperator = model<string>();\n\n /**\n * The list of filter operators to show in the filter dropdown. If not set, a default list will be used based on the column type.\n */\n filterOperators = input<string[]>();\n\n /**\n * If true, the filter operators dropdown will be shown.\n */\n showFilterOperators = signal(false);\n\n /**\n * The name of the field in the data source. If not set, the `field` property will be used.\n */\n fieldName = input<string>();\n\n /**\n * If true, the column will support sorting.\n */\n public sortable = input(false, { transform: booleanAttribute });\n\n /**\n * The current sort direction of the column.\n */\n public sortDirection = model<'none' | 'asc' | 'desc'>('none');\n\n @ContentChild(TemplateRef) template?: TemplateRef<any>;\n\n constructor() {\n }\n\n ngOnInit(): void {\n if (this.filterOperator() == undefined) {\n this.filterOperator.set(this.type() == 'text' ? 'contains' : 'eq');\n }\n }\n\n /**\n * Get the list of filter operators to show in the filter dropdown.\n */\n public getFilterOperators(): string[] {\n let op = this.filterOperators();\n if (op && op.length > 0)\n return op;\n\n let type = this.type();\n if (type == 'number' || type == 'currency' || type == 'date' || type == 'time') {\n return ['eq', 'ne', 'gt', 'gte', 'lt', 'lte',]\n } else if (type == 'text') {\n return ['contains', 'startsWith', 'endsWith', 'eq', 'ne']\n } else {\n return []\n }\n }\n\n /**\n * Toggle the sort direction of the column.\n * @returns void\n */\n public toggleSortDirection(): void {\n if (!this.sortable()) {\n return;\n }\n\n let dir = this.sortDirection();\n if (dir === 'none') {\n this.sortDirection.set('asc');\n } else if (dir === 'asc') {\n this.sortDirection.set('desc');\n } else {\n this.sortDirection.set('none');\n }\n }\n}\n","import { Directive, Input, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[ng0-table-detail-row]',\n standalone: true,\n})\nexport class TableDetailRowDirective {\n @Input() showCallback?: (row: any) => boolean;\n\n constructor(public readonly templateRef: TemplateRef<any>) {\n }\n}\n","import { AfterContentInit, booleanAttribute, ChangeDetectionStrategy, Component, ContentChild, ContentChildren, DestroyRef, HostBinding, inject, input, model, numberAttribute, OnDestroy, QueryList, signal } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { TableColumnDirective } from './table-column.directive';\nimport { TableDetailRowDirective } from './table-detail-row.directive';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { formatString } from '@bootkit/ng0/common';\nimport { LocalizationModule, LocalizationService, TableComponentPagingFormatter } from '@bootkit/ng0/localization';\nimport { DataRequest, DataRequestFilter, DataRequestPage, DataRequestSort, DataResult, DataSource, dataSourceAttribute, DataSourceLike } from '@bootkit/ng0/data';\nimport { PaginationComponent } from '@bootkit/ng0/components/pagination';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { NumberDirective } from '@bootkit/ng0/form';\n\n/**\n * A generic table component that can display data in a tabular format.\n * It supports features like pagination, sorting, filtering, and row details.\n * It can be used with any data source that implements the DataSource interface.\n */\n@Component({\n selector: 'ng0-table',\n exportAs: 'ng0Table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n LocalizationModule,\n PaginationComponent,\n NumberDirective,\n OverlayModule\n ]\n})\nexport class TableComponent implements AfterContentInit, OnDestroy {\n protected readonly _ls = inject(LocalizationService);\n private readonly _destroyRef = inject(DestroyRef);\n private _changeSubscription?: Subscription;\n\n @ContentChildren(TableColumnDirective)\n protected _columns!: QueryList<TableColumnDirective>;\n\n @ContentChild(TableDetailRowDirective)\n protected _detailRow?: TableDetailRowDirective;\n\n protected readonly _dataResult = signal<DataResult | undefined>(undefined);\n protected _lastRequest?: DataRequest; // The last data request made to the data source\n protected _loadingRequest?: DataRequest; // The current data request being processed\n protected _rowStates = new Map<any, { expanded: boolean }>();\n protected _formatString = formatString;\n protected _dataSource!: DataSource;\n protected _pagingFormatter!: TableComponentPagingFormatter;\n protected _lastError?: any;\n\n /**\n * The data source for the table.\n * This can be an array of data, a function that returns an observable of data,\n * or an instance of DataSource.\n */\n public readonly source = input.required<DataSourceLike<any>>();\n\n /**\n * If true, the table will automatically load data when initialized.\n * This is useful for tables that need to display data immediately without user interaction.\n */\n public readonly autoLoad = input(true, { transform: booleanAttribute });\n\n /**\n * If true, the table will show row numbers.\n * This will add a column to the left of the table with the row numbers.\n */\n public readonly showRowNumbers = input(false, { transform: booleanAttribute });\n\n /** \n * If true, the table will show the header row.\n */\n public readonly showHeader = input(true, { transform: booleanAttribute });\n\n /**\n * If true, the table will support pagination.\n */\n public readonly pageable = input(false, { transform: booleanAttribute });\n\n /**\n * The currently selected page in the table.\n * @default 0\n */\n public readonly pageIndex = model(0);\n\n /**\n * The number of records to display per page.\n * @default 10\n */\n public readonly pageSize = model(10);\n\n /**\n * Maximum number of visible pages in the pagination controls.\n * @default 10\n */\n public readonly maxVisiblePages = input(10, { transform: numberAttribute });\n\n /**\n * If true, the table will show pagination controls at the bottom.\n * This will allow users to navigate between pages of data.\n * @default true\n */\n public readonly showPagingControls = input(true, { transform: booleanAttribute });\n\n /**\n * Whether to show the first and last buttons in the pagination controls.\n * @default true\n */\n public readonly showFirstLastButtons = input(false, { transform: booleanAttribute });\n\n /**\n * Whetheer to show the next and previous buttons in the pagination controls.\n * @default true\n */\n public readonly showNextPreviousButtons = input(false, { transform: booleanAttribute });\n\n /**\n * Array of page size options to display in the page size selector.\n * If not provided, the default page size options will be used.\n * @default true\n */\n public readonly pageSizeOptions = input<number[] | undefined>([10, 25, 50, 100]);\n\n /**\n * Whether to show paging info at the bottom of the table.\n * This will show the number of records displayed and total records.\n * @default true\n */\n public readonly showPagingInfo = input(true, { transform: booleanAttribute });\n\n /**\n * If true, the table will support sorting.\n * This will add a sort icon to each column header.\n */\n public readonly sortable = input(true, { transform: booleanAttribute });\n\n /**\n * The CSS class to apply to the internal table element.\n * This can be used to apply custom styles to the table.\n */\n public readonly tableClass = input<string | string[]>();\n\n /**\n * The CSS class to apply to the header element.\n */\n public readonly headerClass = input<string>();\n\n /**\n * The caption of the table.\n */\n public readonly caption = input<string>();\n\n /**\n * The height of the table in pixels.\n * This can be used to set a fixed height for the table.\n */\n public readonly height = input<number>();\n\n /**\n * If true, the table will support filtering.\n * This will add a filter input to each column header.\n */\n public readonly filterable = input(false, { transform: booleanAttribute });\n\n /**\n * The indicator to show while the table is loading data for the first time.\n */\n public readonly loadingIndicator = input<'none' | 'simple' | 'spinner', boolean | 'none' | 'simple' | 'spinner'>('spinner', {\n transform: v => {\n if (typeof v === 'boolean') {\n return v ? 'spinner' : 'none';\n }\n return v;\n }\n });\n\n /** If true, the table will show a loading cover while data is being loaded.\n * This can be used to prevent user interaction with the table while loading.\n * This cover is not displayed when the table is loading for the first time.\n * Instead, the table will show a loading based on loadingIndicator settings.\n */\n public readonly loadingCover = input<'none' | 'simple' | 'spinner', boolean | 'none' | 'simple' | 'spinner'>('spinner', {\n transform: v => {\n if (typeof v === 'boolean') {\n return v ? 'spinner' : 'none';\n }\n return v;\n }\n });\n\n // @Input() rowColor?: (row: any) => BootstrapColor;\n\n ngAfterContentInit(): void {\n this._dataSource = dataSourceAttribute(this.source());\n const locale = this._ls.get();\n this._pagingFormatter = locale?.definition.components?.table?.pagingInfo ??\n ((o) => `Showing ${o.firstRecord}-${o.lastRecord} of ${o.totalRecords} records`);\n\n // this._changeSubscription = this.dataSource().change.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(result => {\n // this.reload();\n // });\n\n if (this.autoLoad()) {\n this.load();\n }\n }\n\n /**\n * Loads data from the data source based on the current state of the table (pagination, sorting, filtering).\n * This method can be called manually to refresh the data in the table.\n * It will construct a DataRequest object based on the current pagination, sorting, and filtering settings,\n * and then call the load method of the data source with that request.\n */\n public load(pageIndex?: number) {\n let page: DataRequestPage | undefined;\n let filters: DataRequestFilter[] = [];\n let sort: DataRequestSort | undefined;\n\n if (this.filterable()) {\n this._columns.forEach(col => {\n if (col.filterable() && col.filterValue() != '' && col.filterValue() != undefined) {\n filters.push({ field: col.fieldName() ?? col.filterField() ?? col.field(), value: col.filterValue(), operator: col.filterOperator() });\n }\n });\n }\n\n if (this.pageable()) {\n if (pageIndex != undefined) {\n this.pageIndex.set(pageIndex);\n }\n\n page = {\n index: this.pageIndex(),\n size: this.pageSize(),\n };\n }\n\n if (this.sortable()) {\n let col = this._columns.find(c => c.sortable() && c.sortDirection() != 'none' && (c.field() != '' || c.fieldName() != ''));\n if (col) {\n sort = {\n field: col.fieldName() ?? col.field()!,\n asc: col.sortDirection() === 'asc'\n }\n }\n }\n\n this._loadingRequest = new DataRequest({ page, filters, sort, select: [], computeTotal: true });\n\n this._dataSource.load(this._loadingRequest)\n .pipe(takeUntilDestroyed(this._destroyRef)).subscribe({\n next: result => {\n this._dataResult.set(result);\n this._lastRequest = this._loadingRequest;\n this._loadingRequest = undefined;\n this._lastError = undefined;\n }, error: err => {\n this._lastError = err;\n this._lastRequest = this._loadingRequest;\n this._loadingRequest = undefined;\n }\n });\n }\n\n /**\n * Determines if the table is currently loading data.\n */\n @HostBinding('class.ng0-loading')\n public get isLoading() {\n return this._dataSource.isLoading;\n }\n\n protected _getCellValue(row: any, col: TableColumnDirective) {\n var subFields = col.field()!.split('.');\n let value = row[subFields[0]];\n for (let i = 1; i < subFields.length; i++) {\n if (value == null) break;\n value = value[subFields[i]];\n }\n\n return value;\n }\n\n protected _onPageChange(pageIndex: number) {\n this.load(pageIndex);\n }\n\n protected _onToggleRowDetailClick(row: any) {\n var state = this._rowStates.get(row)\n if (!state) {\n this._rowStates.set(row, { expanded: true });\n } else {\n state.expanded = !state.expanded;\n }\n }\n\n protected isRowExpanded(row: any) {\n var state = this._rowStates.get(row)\n return state == undefined ? false : state.expanded;\n }\n\n protected _onToggleFilterOperator(col: TableColumnDirective) {\n if (col.showFilterOperators()) {\n col.showFilterOperators.set(false)\n } else {\n this._columns.forEach(x => x.showFilterOperators.set(false));\n col.showFilterOperators.set(true)\n }\n }\n\n protected _onSelectFilterOperator(col: TableColumnDirective, filterOperator: string) {\n col.filterOperator.set(filterOperator);\n this._columns.forEach(x => x.showFilterOperators.set(false));\n this.load(0);\n }\n\n ngOnDestroy(): void {\n this._changeSubscription?.unsubscribe();\n }\n}\n","@let $dataResult = _dataResult();\n@let $pageable = pageable();\n@let $pageIndex = pageIndex();\n@let $pageSize = pageSize();\n@let $data = $dataResult?.data;\n@let $anyRecords = $data && $data.length > 0;\n@let $totalRecordsCount = $dataResult?.total;\n@let $firstRecordIndex = $pageable ? ($pageSize * $pageIndex) : 0;\n@let $lastRecordIndex = $data ? $firstRecordIndex + $data.length - 1 : 1;\n@let $isLoading = _dataSource.isLoading();\n@let $isFirstLoad = $dataResult == undefined;\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\n@let $tableLocale = _ls.get()?.definition?.components?.table;\n\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\n <table class=\"table\" [ngClass]=\"tableClass()\">\n @if (caption()) {\n <caption>{{caption()}}</caption>\n }\n\n @if (showHeader()) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n }\n\n @if (filterable()) {\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\n }\n\n <tbody>\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\n <tr class=\"ng0-table-loading-row\">\n <td [attr.colspan]=\"$columnsCount\">\n @switch (loadingIndicator()) {\n @case ('spinner') {\n <div class=\"text-center\">\n <div class=\"spinner-border\" role=\"status\"></div>\n </div>\n }\n }\n </td>\n </tr>\n } @else {\n @if ($data) {\n @if ($data.length > 0) {\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\n } @else {\n <tr class=\"ng0-table-no-records-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\n </td>\n </tr>\n }\n } @else if (_lastError) {\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\n }\n }\n </tbody>\n </table>\n</div>\n\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n</div>\n\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\n<div class=\"ng0-table-loading-cover text-center\">\n @if (loadingCover() == 'spinner') {\n <div class=\"spinner-border\" role=\"status\"></div>\n }\n</div>\n}\n\n<ng-template #filtersTemplate>\n <thead>\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th></th>\n }\n\n @for (col of _columns; track $index) {\n <th>\n @if(col.filterable() && (col.field() || col.filterValue())) {\n\n <div class=\"input-group\">\n @switch (col.type()) {\n @case ('text') {\n <input [name]=\"'filter-' + col.field\"\n type=\"search\"\n [maxlength]=\"50\"\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n @case ('number') {\n <input [name]=\"'datatablecol-' + col.field\"\n type=\"search\"\n ng0Number\n class=\"form-control form-control-sm\"\n [(ngModel)]=\"col.filterValue\"\n (keydown.enter)=\"load(0)\">\n }\n }\n\n <button class=\"btn btn-outline-light\"\n style=\"border-color: var(--bs-border-color);\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"_onToggleFilterOperator(col)\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\n </svg>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\n (detach)=\"col.showFilterOperators.set(false)\">\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\n @for (item of col.getFilterOperators(); track $index) {\n <li>\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\n (click)=\"_onSelectFilterOperator(col, item)\">\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\n </button>\n </li>\n }\n </ul>\n </ng-template>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #headerTemplate>\n <thead [ngClass]=\"headerClass()\">\n <tr>\n @if (_detailRow) {\n <th></th>\n }\n\n @if (showRowNumbers()) {\n <th class=\"row-number text-muted\">#</th>\n }\n\n @for (col of _columns; track $index) {\n <th\n (click)=\"col.toggleSortDirection(); load()\"\n [class.sortable]=\"sortable() && col.sortable()\"\n [ngClass]=\"{ \n 'sort-asc': col.sortDirection() == 'asc', \n 'sort-desc': col.sortDirection() == 'desc',\n 'sort-none': col.sortDirection() == 'none'\n }\">\n {{ col.title() }}\n\n @if(sortable() && col.sortable()) {\n <svg class=\"ng0-table-sort-icon\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n }\n </th>\n }\n </tr>\n </thead>\n</ng-template>\n\n<ng-template #dataRowsTemplate>\n @for (row of $data; track $index) {\n <tr [class.table-active]=\"isRowExpanded(row)\">\n @if (_detailRow) {\n <td class=\"detail-row-expander\">\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\n @if (isRowExpanded(row)) {\n <i class=\"far fa-minus\"></i>\n } @else {\n <i class=\"far fa-plus\"></i>\n }\n </button>\n }\n </td>\n }\n\n @if (showRowNumbers()) {\n <td class=\"ng0-table-row-number\">\n {{ $firstRecordIndex + $index + 1}}\n </td>\n }\n\n @for (col of _columns; track $index) {\n <td\n [ngClass]=\"col.cellClass()\"\n [class.shrinked]=\"col.shrink()\"\n [class.fw-bold]=\"col.bold()\">\n @if (col.template) {\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\n </ng-container>\n } @else if (col.field()) {\n @let cellValue = _getCellValue(row, col);\n\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\n {{ col.emptyCellText() }}\n } @else {\n @if (col.type()) {\n @let type = $any(col.type());\n\n @if (type == \"date\") {\n {{ cellValue | ng0Date }}\n } @else if (type == \"number\") {\n {{ cellValue | number }}\n } @else if (type == \"currency\") {\n {{ cellValue | currency }}\n } @else if (type.enum) {\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\n } @else if (type.boolean || type == \"boolean\") {\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\n }@else {\n {{ cellValue }}\n }\n }\n }\n }\n </td>\n }\n </tr>\n\n @if (_detailRow && isRowExpanded(row)) {\n <tr class=\"detail-row\">\n <td\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\n class=\"ps-2 pb-4\">\n <ng-container\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\n </td>\n </tr>\n }\n }\n</ng-template>\n\n<ng-template #footerTemplate>\n @if ($pageable && showPagingControls() && $anyRecords && $totalRecordsCount! > 0) {\n <div class=\"ng0-table-pagination me-2\">\n <ng0-pagination\n class=\"mb-0 d-inline-block\"\n [showFirstLastButtons]=\"showFirstLastButtons()\"\n [showNextPreviousButtons]=\"showNextPreviousButtons()\"\n [totalRecords]=\"$totalRecordsCount!\"\n [pageSize]=\"pageSize()\"\n [selectedPage]=\"pageIndex()\"\n (itemClick)=\"_onPageChange($event)\"\n [maxVisiblePages]=\"maxVisiblePages()\">\n <ng-container ngProjectAs=\"first\">\n <ng-content select=\"paging-first\">\n {{ \"first\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"last\">\n <ng-content select=\"paging-last\">\n {{ \"last\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"next\">\n <ng-content select=\"paging-next\">\n {{ \"next\" | ng0Translate }}\n </ng-content>\n </ng-container>\n\n <ng-container ngProjectAs=\"previous\">\n <ng-content select=\"paging-previous\">\n {{ \"previous\" | ng0Translate }}\n </ng-content>\n </ng-container>\n </ng0-pagination>\n </div>\n\n @if (pageSizeOptions()) {\n <div class=\"ng0-table-paging-options\">\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\n <option [ngValue]=\"10\" selected>10</option>\n </select>\n </div>\n }\n\n @if (showPagingInfo()) {\n <div class=\"ng0-table-paging-info ms-auto\">\n <ng-content select=\"paging-info\">\n {{\n _pagingFormatter({firstRecord: $firstRecordIndex, lastRecord: $lastRecordIndex, totalRecords: $totalRecordsCount!,\n currentPage: $pageIndex!})\n }}\n </ng-content>\n </div>\n }\n }\n</ng-template>\n\n<ng-template #nowDataTemplate>\n <tr class=\"ng0-table-error-row\">\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\n <div class=\"d-flex align-items-baseline\">\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\n {{ \"retry\" | ng0Translate }}\n </button>\n </div>\n </td>\n </tr>\n</ng-template>","import { NgModule } from '@angular/core';\nimport { TableColumnDirective } from './table-column.directive';\nimport { TableComponent } from './table.component';\nimport { TableDetailRowDirective } from './table-detail-row.directive';\n\n@NgModule({\n imports: [\n TableComponent,\n TableColumnDirective,\n TableDetailRowDirective,\n ],\n exports: [\n TableComponent,\n TableColumnDirective,\n TableDetailRowDirective\n ],\n})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