@jbeche/ng-datatable 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +222 -0
- package/fesm2022/jbeche-ng-datatable.mjs +1422 -0
- package/fesm2022/jbeche-ng-datatable.mjs.map +1 -0
- package/index.d.ts +272 -0
- package/lib/style.css +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,1422 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Directive, EventEmitter, Output, Component, ViewChild, ContentChildren, ChangeDetectionStrategy, ViewEncapsulation, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/forms';
|
|
6
|
+
import { FormsModule } from '@angular/forms';
|
|
7
|
+
import * as i1$1 from '@angular/platform-browser';
|
|
8
|
+
|
|
9
|
+
class colDef {
|
|
10
|
+
isUnique;
|
|
11
|
+
field;
|
|
12
|
+
title;
|
|
13
|
+
value;
|
|
14
|
+
condition;
|
|
15
|
+
type; // string|date|number|bool
|
|
16
|
+
width;
|
|
17
|
+
minWidth;
|
|
18
|
+
maxWidth;
|
|
19
|
+
hide;
|
|
20
|
+
filter; // column filter
|
|
21
|
+
search; // global search
|
|
22
|
+
sort;
|
|
23
|
+
html;
|
|
24
|
+
cellRenderer; // [Function, string]
|
|
25
|
+
headerClass;
|
|
26
|
+
cellClass;
|
|
27
|
+
}
|
|
28
|
+
class Pager {
|
|
29
|
+
totalRows;
|
|
30
|
+
currentPage;
|
|
31
|
+
pageSize;
|
|
32
|
+
maxPage;
|
|
33
|
+
startPage;
|
|
34
|
+
endPage;
|
|
35
|
+
stringFormat;
|
|
36
|
+
pages;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
class SlotDirective {
|
|
40
|
+
templateRef;
|
|
41
|
+
fieldName;
|
|
42
|
+
value;
|
|
43
|
+
constructor(templateRef) {
|
|
44
|
+
this.templateRef = templateRef;
|
|
45
|
+
}
|
|
46
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SlotDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
47
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: SlotDirective, isStandalone: false, selector: "[slot]", inputs: { fieldName: ["slot", "fieldName"], value: ["slotValue", "value"] }, ngImport: i0 });
|
|
48
|
+
}
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SlotDirective, decorators: [{
|
|
50
|
+
type: Directive,
|
|
51
|
+
args: [{
|
|
52
|
+
standalone: false,
|
|
53
|
+
selector: '[slot]',
|
|
54
|
+
}]
|
|
55
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { fieldName: [{
|
|
56
|
+
type: Input,
|
|
57
|
+
args: ['slot']
|
|
58
|
+
}], value: [{
|
|
59
|
+
type: Input,
|
|
60
|
+
args: ['slotValue']
|
|
61
|
+
}] } });
|
|
62
|
+
|
|
63
|
+
class ColumnFilterComponent {
|
|
64
|
+
column;
|
|
65
|
+
close = new EventEmitter();
|
|
66
|
+
filterChange = new EventEmitter();
|
|
67
|
+
constructor() { }
|
|
68
|
+
ngOnInit() {
|
|
69
|
+
document.addEventListener('click', this.closeMethod.bind(this));
|
|
70
|
+
}
|
|
71
|
+
ngOnDestroy() {
|
|
72
|
+
document.removeEventListener('click', this.closeMethod.bind(this));
|
|
73
|
+
}
|
|
74
|
+
closeMethod() {
|
|
75
|
+
this.close.emit();
|
|
76
|
+
}
|
|
77
|
+
select(condition) {
|
|
78
|
+
this.column.condition = condition;
|
|
79
|
+
if (condition === '') {
|
|
80
|
+
this.column.value = '';
|
|
81
|
+
}
|
|
82
|
+
this.filterChange.emit(this.column);
|
|
83
|
+
}
|
|
84
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ColumnFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
85
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ColumnFilterComponent, isStandalone: false, selector: "column-filter", inputs: { column: "column" }, outputs: { close: "close", filterChange: "filterChange" }, ngImport: i0, template: `
|
|
86
|
+
<div class="bh-filter-menu bh-absolute bh-z-[1] bh-bg-white bh-shadow-md bh-rounded-md bh-top-full bh-right-0 bh-w-32 bh-mt-1">
|
|
87
|
+
<div class="bh-text-[13px] bh-font-normal bh-rounded bh-overflow-hidden" (click)="closeMethod(); $event.stopPropagation()">
|
|
88
|
+
<button type="button" [class.active]="column.condition === ''" (click)="select('')">No filter</button>
|
|
89
|
+
<ng-container *ngIf="column.type === 'string'">
|
|
90
|
+
<button type="button" [class.active]="column.condition === 'contain'" (click)="select('contain')">Contain</button>
|
|
91
|
+
<button type="button" [class.active]="column.condition === 'not_contain'" (click)="select('not_contain')">Not contain</button>
|
|
92
|
+
<button type="button" [class.active]="column.condition === 'equal'" (click)="select('equal')">Equal</button>
|
|
93
|
+
<button type="button" [class.active]="column.condition === 'not_equal'" (click)="select('not_equal')">Not equal</button>
|
|
94
|
+
<button type="button" [class.active]="column.condition === 'start_with'" (click)="select('start_with')">Starts with</button>
|
|
95
|
+
<button type="button" [class.active]="column.condition === 'end_with'" (click)="select('end_with')">Ends with</button>
|
|
96
|
+
</ng-container>
|
|
97
|
+
<ng-container *ngIf="column.type === 'number'">
|
|
98
|
+
<button type="button" [class.active]="column.condition === 'equal'" (click)="select('equal')">Equal</button>
|
|
99
|
+
<button type="button" [class.active]="column.condition === 'not_equal'" (click)="select('not_equal')">Not Equal</button>
|
|
100
|
+
<button type="button" [class.active]="column.condition === 'greater_than'" (click)="select('greater_than')">Greater than</button>
|
|
101
|
+
<button type="button" [class.active]="column.condition === 'greater_than_equal'" (click)="select('greater_than_equal')">Greater than or equal</button>
|
|
102
|
+
<button type="button" [class.active]="column.condition === 'less_than'" (click)="select('less_than')">Less than</button>
|
|
103
|
+
<button type="button" [class.active]="column.condition === 'less_than_equal'" (click)="select('less_than_equal')">Less than or equal</button>
|
|
104
|
+
</ng-container>
|
|
105
|
+
<ng-container *ngIf="column.type === 'date'">
|
|
106
|
+
<button type="button" [ngClass]="{ active: column.condition === 'equal' }" (click)="select('equal')">Equal</button>
|
|
107
|
+
<button type="button" [ngClass]="{ active: column.condition === 'not_equal' }" (click)="select('not_equal')">Not equal</button>
|
|
108
|
+
<button type="button" [ngClass]="{ active: column.condition === 'greater_than' }" (click)="select('greater_than')">Greater than</button>
|
|
109
|
+
<button type="button" [ngClass]="{ active: column.condition === 'less_than' }" (click)="select('less_than')">Less than</button>
|
|
110
|
+
</ng-container>
|
|
111
|
+
|
|
112
|
+
<button type="button" [ngClass]="{ active: column.condition === 'is_null' }" (click)="select('is_null')">Is null</button>
|
|
113
|
+
<button type="button" [ngClass]="{ active: column.condition === 'is_not_null' }" (click)="select('is_not_null')">Not null</button>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
117
|
+
}
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ColumnFilterComponent, decorators: [{
|
|
119
|
+
type: Component,
|
|
120
|
+
args: [{
|
|
121
|
+
standalone: false,
|
|
122
|
+
selector: 'column-filter',
|
|
123
|
+
template: `
|
|
124
|
+
<div class="bh-filter-menu bh-absolute bh-z-[1] bh-bg-white bh-shadow-md bh-rounded-md bh-top-full bh-right-0 bh-w-32 bh-mt-1">
|
|
125
|
+
<div class="bh-text-[13px] bh-font-normal bh-rounded bh-overflow-hidden" (click)="closeMethod(); $event.stopPropagation()">
|
|
126
|
+
<button type="button" [class.active]="column.condition === ''" (click)="select('')">No filter</button>
|
|
127
|
+
<ng-container *ngIf="column.type === 'string'">
|
|
128
|
+
<button type="button" [class.active]="column.condition === 'contain'" (click)="select('contain')">Contain</button>
|
|
129
|
+
<button type="button" [class.active]="column.condition === 'not_contain'" (click)="select('not_contain')">Not contain</button>
|
|
130
|
+
<button type="button" [class.active]="column.condition === 'equal'" (click)="select('equal')">Equal</button>
|
|
131
|
+
<button type="button" [class.active]="column.condition === 'not_equal'" (click)="select('not_equal')">Not equal</button>
|
|
132
|
+
<button type="button" [class.active]="column.condition === 'start_with'" (click)="select('start_with')">Starts with</button>
|
|
133
|
+
<button type="button" [class.active]="column.condition === 'end_with'" (click)="select('end_with')">Ends with</button>
|
|
134
|
+
</ng-container>
|
|
135
|
+
<ng-container *ngIf="column.type === 'number'">
|
|
136
|
+
<button type="button" [class.active]="column.condition === 'equal'" (click)="select('equal')">Equal</button>
|
|
137
|
+
<button type="button" [class.active]="column.condition === 'not_equal'" (click)="select('not_equal')">Not Equal</button>
|
|
138
|
+
<button type="button" [class.active]="column.condition === 'greater_than'" (click)="select('greater_than')">Greater than</button>
|
|
139
|
+
<button type="button" [class.active]="column.condition === 'greater_than_equal'" (click)="select('greater_than_equal')">Greater than or equal</button>
|
|
140
|
+
<button type="button" [class.active]="column.condition === 'less_than'" (click)="select('less_than')">Less than</button>
|
|
141
|
+
<button type="button" [class.active]="column.condition === 'less_than_equal'" (click)="select('less_than_equal')">Less than or equal</button>
|
|
142
|
+
</ng-container>
|
|
143
|
+
<ng-container *ngIf="column.type === 'date'">
|
|
144
|
+
<button type="button" [ngClass]="{ active: column.condition === 'equal' }" (click)="select('equal')">Equal</button>
|
|
145
|
+
<button type="button" [ngClass]="{ active: column.condition === 'not_equal' }" (click)="select('not_equal')">Not equal</button>
|
|
146
|
+
<button type="button" [ngClass]="{ active: column.condition === 'greater_than' }" (click)="select('greater_than')">Greater than</button>
|
|
147
|
+
<button type="button" [ngClass]="{ active: column.condition === 'less_than' }" (click)="select('less_than')">Less than</button>
|
|
148
|
+
</ng-container>
|
|
149
|
+
|
|
150
|
+
<button type="button" [ngClass]="{ active: column.condition === 'is_null' }" (click)="select('is_null')">Is null</button>
|
|
151
|
+
<button type="button" [ngClass]="{ active: column.condition === 'is_not_null' }" (click)="select('is_not_null')">Not null</button>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
`,
|
|
155
|
+
}]
|
|
156
|
+
}], ctorParameters: () => [], propDecorators: { column: [{
|
|
157
|
+
type: Input
|
|
158
|
+
}], close: [{
|
|
159
|
+
type: Output,
|
|
160
|
+
args: ['close']
|
|
161
|
+
}], filterChange: [{
|
|
162
|
+
type: Output,
|
|
163
|
+
args: ['filterChange']
|
|
164
|
+
}] } });
|
|
165
|
+
|
|
166
|
+
class IconCheckComponent {
|
|
167
|
+
viewContainerRef;
|
|
168
|
+
template;
|
|
169
|
+
class;
|
|
170
|
+
constructor(viewContainerRef) {
|
|
171
|
+
this.viewContainerRef = viewContainerRef;
|
|
172
|
+
}
|
|
173
|
+
ngOnInit() {
|
|
174
|
+
this.viewContainerRef.createEmbeddedView(this.template);
|
|
175
|
+
}
|
|
176
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: IconCheckComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
177
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: IconCheckComponent, isStandalone: false, selector: "icon-check", inputs: { class: "class" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, static: true }], ngImport: i0, template: `
|
|
178
|
+
<ng-template #template>
|
|
179
|
+
<svg [ngClass]="class" version="1.1" viewBox="0 0 17 12">
|
|
180
|
+
<g fill="none" fill-rule="evenodd">
|
|
181
|
+
<g transform="translate(-9 -11)" fill="currentColor" fill-rule="nonzero">
|
|
182
|
+
<path
|
|
183
|
+
d="m25.576 11.414c0.56558 0.55188 0.56558 1.4439 0 1.9961l-9.404 9.176c-0.28213 0.27529-0.65247 0.41385-1.0228 0.41385-0.37034 0-0.74068-0.13855-1.0228-0.41385l-4.7019-4.588c-0.56584-0.55188-0.56584-1.4442 0-1.9961 0.56558-0.55214 1.4798-0.55214 2.0456 0l3.679 3.5899 8.3812-8.1779c0.56558-0.55214 1.4798-0.55214 2.0456 0z"
|
|
184
|
+
/>
|
|
185
|
+
</g>
|
|
186
|
+
</g>
|
|
187
|
+
</svg>
|
|
188
|
+
</ng-template>
|
|
189
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
190
|
+
}
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: IconCheckComponent, decorators: [{
|
|
192
|
+
type: Component,
|
|
193
|
+
args: [{
|
|
194
|
+
standalone: false,
|
|
195
|
+
selector: 'icon-check',
|
|
196
|
+
template: `
|
|
197
|
+
<ng-template #template>
|
|
198
|
+
<svg [ngClass]="class" version="1.1" viewBox="0 0 17 12">
|
|
199
|
+
<g fill="none" fill-rule="evenodd">
|
|
200
|
+
<g transform="translate(-9 -11)" fill="currentColor" fill-rule="nonzero">
|
|
201
|
+
<path
|
|
202
|
+
d="m25.576 11.414c0.56558 0.55188 0.56558 1.4439 0 1.9961l-9.404 9.176c-0.28213 0.27529-0.65247 0.41385-1.0228 0.41385-0.37034 0-0.74068-0.13855-1.0228-0.41385l-4.7019-4.588c-0.56584-0.55188-0.56584-1.4442 0-1.9961 0.56558-0.55214 1.4798-0.55214 2.0456 0l3.679 3.5899 8.3812-8.1779c0.56558-0.55214 1.4798-0.55214 2.0456 0z"
|
|
203
|
+
/>
|
|
204
|
+
</g>
|
|
205
|
+
</g>
|
|
206
|
+
</svg>
|
|
207
|
+
</ng-template>
|
|
208
|
+
`,
|
|
209
|
+
}]
|
|
210
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { template: [{
|
|
211
|
+
type: ViewChild,
|
|
212
|
+
args: ['template', { static: true }]
|
|
213
|
+
}], class: [{
|
|
214
|
+
type: Input
|
|
215
|
+
}] } });
|
|
216
|
+
|
|
217
|
+
class IconDashComponent {
|
|
218
|
+
viewContainerRef;
|
|
219
|
+
template;
|
|
220
|
+
class;
|
|
221
|
+
constructor(viewContainerRef) {
|
|
222
|
+
this.viewContainerRef = viewContainerRef;
|
|
223
|
+
}
|
|
224
|
+
ngOnInit() {
|
|
225
|
+
this.viewContainerRef.createEmbeddedView(this.template);
|
|
226
|
+
}
|
|
227
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: IconDashComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
228
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: IconDashComponent, isStandalone: false, selector: "icon-dash", inputs: { class: "class" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, static: true }], ngImport: i0, template: `
|
|
229
|
+
<ng-template #template>
|
|
230
|
+
<svg [ngClass]="class" viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
231
|
+
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
232
|
+
</svg>
|
|
233
|
+
</ng-template>
|
|
234
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
235
|
+
}
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: IconDashComponent, decorators: [{
|
|
237
|
+
type: Component,
|
|
238
|
+
args: [{
|
|
239
|
+
standalone: false,
|
|
240
|
+
selector: 'icon-dash',
|
|
241
|
+
template: `
|
|
242
|
+
<ng-template #template>
|
|
243
|
+
<svg [ngClass]="class" viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
244
|
+
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
245
|
+
</svg>
|
|
246
|
+
</ng-template>
|
|
247
|
+
`,
|
|
248
|
+
}]
|
|
249
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { template: [{
|
|
250
|
+
type: ViewChild,
|
|
251
|
+
args: ['template', { static: true }]
|
|
252
|
+
}], class: [{
|
|
253
|
+
type: Input
|
|
254
|
+
}] } });
|
|
255
|
+
|
|
256
|
+
class IconFilterComponent {
|
|
257
|
+
viewContainerRef;
|
|
258
|
+
template;
|
|
259
|
+
class;
|
|
260
|
+
constructor(viewContainerRef) {
|
|
261
|
+
this.viewContainerRef = viewContainerRef;
|
|
262
|
+
}
|
|
263
|
+
ngOnInit() {
|
|
264
|
+
this.viewContainerRef.createEmbeddedView(this.template);
|
|
265
|
+
}
|
|
266
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: IconFilterComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
267
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: IconFilterComponent, isStandalone: false, selector: "icon-filter", inputs: { class: "class" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, static: true }], ngImport: i0, template: `
|
|
268
|
+
<ng-template #template>
|
|
269
|
+
<svg [ngClass]="class" viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
270
|
+
<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>
|
|
271
|
+
</svg>
|
|
272
|
+
</ng-template>
|
|
273
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
274
|
+
}
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: IconFilterComponent, decorators: [{
|
|
276
|
+
type: Component,
|
|
277
|
+
args: [{
|
|
278
|
+
standalone: false,
|
|
279
|
+
selector: 'icon-filter',
|
|
280
|
+
template: `
|
|
281
|
+
<ng-template #template>
|
|
282
|
+
<svg [ngClass]="class" viewBox="0 0 24 24" width="24" height="24" stroke="currentColor" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
283
|
+
<polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"></polygon>
|
|
284
|
+
</svg>
|
|
285
|
+
</ng-template>
|
|
286
|
+
`,
|
|
287
|
+
}]
|
|
288
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { template: [{
|
|
289
|
+
type: ViewChild,
|
|
290
|
+
args: ['template', { static: true }]
|
|
291
|
+
}], class: [{
|
|
292
|
+
type: Input
|
|
293
|
+
}] } });
|
|
294
|
+
|
|
295
|
+
class ColumnHeaderComponent {
|
|
296
|
+
viewContainerRef;
|
|
297
|
+
template;
|
|
298
|
+
selectedAll;
|
|
299
|
+
all;
|
|
300
|
+
isFooter;
|
|
301
|
+
checkAll;
|
|
302
|
+
selectAll = new EventEmitter();
|
|
303
|
+
sortChange = new EventEmitter();
|
|
304
|
+
filterChange = new EventEmitter();
|
|
305
|
+
isOpenFilter = null;
|
|
306
|
+
constructor(viewContainerRef) {
|
|
307
|
+
this.viewContainerRef = viewContainerRef;
|
|
308
|
+
}
|
|
309
|
+
ngOnInit() {
|
|
310
|
+
this.viewContainerRef.createEmbeddedView(this.template);
|
|
311
|
+
this.checkboxChange();
|
|
312
|
+
}
|
|
313
|
+
checkboxChange() {
|
|
314
|
+
if (this.selectedAll) {
|
|
315
|
+
this.selectedAll.nativeElement.indeterminate = this.checkAll !== 0 ? !this.checkAll : false;
|
|
316
|
+
this.selectedAll.nativeElement.checked = this.checkAll;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
toggleFilterMenu(col) {
|
|
320
|
+
if (col) {
|
|
321
|
+
if (this.isOpenFilter === col.field) {
|
|
322
|
+
this.isOpenFilter = null;
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
this.isOpenFilter = col.field;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
this.isOpenFilter = null;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ColumnHeaderComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
333
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ColumnHeaderComponent, isStandalone: false, selector: "column-header", inputs: { all: "all", isFooter: "isFooter", checkAll: "checkAll" }, outputs: { selectAll: "selectAll", sortChange: "sortChange", filterChange: "filterChange" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["template"], descendants: true, static: true }, { propertyName: "selectedAll", first: true, predicate: ["selectedAll"], descendants: true }], ngImport: i0, template: `
|
|
334
|
+
<ng-template #template>
|
|
335
|
+
<tr>
|
|
336
|
+
<th
|
|
337
|
+
*ngIf="all.hasCheckbox"
|
|
338
|
+
[class]="'bh-w-px'"
|
|
339
|
+
[ngClass]="{
|
|
340
|
+
'bh-sticky bh-bg-blue-light bh-z-[1]': all.stickyHeader || all.stickyFirstColumn,
|
|
341
|
+
'bh-top-0': all.stickyHeader,
|
|
342
|
+
'bh-left-0': all.stickyFirstColumn
|
|
343
|
+
}"
|
|
344
|
+
>
|
|
345
|
+
<div class="bh-checkbox">
|
|
346
|
+
<input #selectedAll type="checkbox" (click)="selectAll.emit(selectedAll.checked); $event.stopPropagation()" />
|
|
347
|
+
<div>
|
|
348
|
+
<icon-check class="check"></icon-check>
|
|
349
|
+
<icon-dash class="intermediate"></icon-dash>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
</th>
|
|
353
|
+
|
|
354
|
+
<ng-container *ngFor="let col of all.columns; let j = index">
|
|
355
|
+
<th
|
|
356
|
+
*ngIf="!col.hide"
|
|
357
|
+
[class]="'bh-select-none bh-z-[1]'"
|
|
358
|
+
[ngClass]="[
|
|
359
|
+
all.sortable && col.sort ? 'bh-cursor-pointer' : '',
|
|
360
|
+
j === 0 && all.stickyFirstColumn ? 'bh-sticky bh-left-0 bh-bg-blue-light' : '',
|
|
361
|
+
all.hasCheckbox && j === 0 && all.stickyFirstColumn ? 'bh-left-[52px]' : ''
|
|
362
|
+
]"
|
|
363
|
+
[style]="{ width: col.width, 'min-width': col.minWidth, 'max-width': col.maxWidth }"
|
|
364
|
+
>
|
|
365
|
+
<div class="bh-flex bh-items-center" [ngClass]="[col.headerClass ? col.headerClass : '']" (click)="all.sortable && col.sort && sortChange.emit(col.field)">
|
|
366
|
+
{{ col.title }}
|
|
367
|
+
<span *ngIf="all.sortable && col.sort" class="bh-ml-3 bh-sort bh-flex bh-items-center" [ngClass]="[all.sortColumn, all.sortDirection]">
|
|
368
|
+
<svg width="16" height="16" viewBox="0 0 14 14" fill="none">
|
|
369
|
+
<polygon
|
|
370
|
+
points="3.11,6.25 10.89,6.25 7,1.75"
|
|
371
|
+
fill="currentColor"
|
|
372
|
+
class="bh-text-black/20"
|
|
373
|
+
[ngClass]="[all.sortColumn === col.field && all.sortDirection === 'asc' ? '!bh-text-primary' : '']"
|
|
374
|
+
></polygon>
|
|
375
|
+
<polygon
|
|
376
|
+
points="7,12.25 10.89,7.75 3.11,7.75"
|
|
377
|
+
fill="currentColor"
|
|
378
|
+
class="bh-text-black/20"
|
|
379
|
+
[ngClass]="[all.sortColumn === col.field && all.sortDirection === 'desc' ? '!bh-text-primary' : '']"
|
|
380
|
+
></polygon>
|
|
381
|
+
</svg>
|
|
382
|
+
</span>
|
|
383
|
+
</div>
|
|
384
|
+
|
|
385
|
+
<ng-container *ngIf="all.columnFilter && !isFooter">
|
|
386
|
+
<div *ngIf="col.filter" class="bh-filter bh-relative">
|
|
387
|
+
<input *ngIf="col.type === 'string'" [(ngModel)]="col.value" type="text" class="bh-form-control" (keyup)="filterChange.emit()" />
|
|
388
|
+
<input *ngIf="col.type === 'number'" [(ngModel)]="col.value" type="number" class="bh-form-control" (keyup)="filterChange.emit()" />
|
|
389
|
+
<input *ngIf="col.type === 'date'" [(ngModel)]="col.value" type="date" class="bh-form-control" (change)="filterChange.emit()" />
|
|
390
|
+
<select *ngIf="col.type === 'bool'" [(ngModel)]="col.value" class="bh-form-control" (change)="filterChange.emit()" (click)="isOpenFilter = null">
|
|
391
|
+
<option [ngValue]="undefined">All</option>
|
|
392
|
+
<option [ngValue]="true">True</option>
|
|
393
|
+
<option [ngValue]="false">False</option>
|
|
394
|
+
</select>
|
|
395
|
+
|
|
396
|
+
<button *ngIf="col.type !== 'bool'" type="button" (click)="toggleFilterMenu(col); $event.stopPropagation()">
|
|
397
|
+
<icon-filter class="bh-w-4"></icon-filter>
|
|
398
|
+
</button>
|
|
399
|
+
|
|
400
|
+
<column-filter
|
|
401
|
+
[ngClass]="{ 'bh-hidden': isOpenFilter !== col.field }"
|
|
402
|
+
[column]="col"
|
|
403
|
+
(close)="toggleFilterMenu()"
|
|
404
|
+
(filterChange)="filterChange.emit()"
|
|
405
|
+
></column-filter>
|
|
406
|
+
</div>
|
|
407
|
+
</ng-container>
|
|
408
|
+
</th>
|
|
409
|
+
</ng-container>
|
|
410
|
+
</tr>
|
|
411
|
+
</ng-template>
|
|
412
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["column"], outputs: ["close", "filterChange"] }, { kind: "component", type: IconCheckComponent, selector: "icon-check", inputs: ["class"] }, { kind: "component", type: IconDashComponent, selector: "icon-dash", inputs: ["class"] }, { kind: "component", type: IconFilterComponent, selector: "icon-filter", inputs: ["class"] }] });
|
|
413
|
+
}
|
|
414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ColumnHeaderComponent, decorators: [{
|
|
415
|
+
type: Component,
|
|
416
|
+
args: [{
|
|
417
|
+
standalone: false,
|
|
418
|
+
selector: 'column-header',
|
|
419
|
+
template: `
|
|
420
|
+
<ng-template #template>
|
|
421
|
+
<tr>
|
|
422
|
+
<th
|
|
423
|
+
*ngIf="all.hasCheckbox"
|
|
424
|
+
[class]="'bh-w-px'"
|
|
425
|
+
[ngClass]="{
|
|
426
|
+
'bh-sticky bh-bg-blue-light bh-z-[1]': all.stickyHeader || all.stickyFirstColumn,
|
|
427
|
+
'bh-top-0': all.stickyHeader,
|
|
428
|
+
'bh-left-0': all.stickyFirstColumn
|
|
429
|
+
}"
|
|
430
|
+
>
|
|
431
|
+
<div class="bh-checkbox">
|
|
432
|
+
<input #selectedAll type="checkbox" (click)="selectAll.emit(selectedAll.checked); $event.stopPropagation()" />
|
|
433
|
+
<div>
|
|
434
|
+
<icon-check class="check"></icon-check>
|
|
435
|
+
<icon-dash class="intermediate"></icon-dash>
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
438
|
+
</th>
|
|
439
|
+
|
|
440
|
+
<ng-container *ngFor="let col of all.columns; let j = index">
|
|
441
|
+
<th
|
|
442
|
+
*ngIf="!col.hide"
|
|
443
|
+
[class]="'bh-select-none bh-z-[1]'"
|
|
444
|
+
[ngClass]="[
|
|
445
|
+
all.sortable && col.sort ? 'bh-cursor-pointer' : '',
|
|
446
|
+
j === 0 && all.stickyFirstColumn ? 'bh-sticky bh-left-0 bh-bg-blue-light' : '',
|
|
447
|
+
all.hasCheckbox && j === 0 && all.stickyFirstColumn ? 'bh-left-[52px]' : ''
|
|
448
|
+
]"
|
|
449
|
+
[style]="{ width: col.width, 'min-width': col.minWidth, 'max-width': col.maxWidth }"
|
|
450
|
+
>
|
|
451
|
+
<div class="bh-flex bh-items-center" [ngClass]="[col.headerClass ? col.headerClass : '']" (click)="all.sortable && col.sort && sortChange.emit(col.field)">
|
|
452
|
+
{{ col.title }}
|
|
453
|
+
<span *ngIf="all.sortable && col.sort" class="bh-ml-3 bh-sort bh-flex bh-items-center" [ngClass]="[all.sortColumn, all.sortDirection]">
|
|
454
|
+
<svg width="16" height="16" viewBox="0 0 14 14" fill="none">
|
|
455
|
+
<polygon
|
|
456
|
+
points="3.11,6.25 10.89,6.25 7,1.75"
|
|
457
|
+
fill="currentColor"
|
|
458
|
+
class="bh-text-black/20"
|
|
459
|
+
[ngClass]="[all.sortColumn === col.field && all.sortDirection === 'asc' ? '!bh-text-primary' : '']"
|
|
460
|
+
></polygon>
|
|
461
|
+
<polygon
|
|
462
|
+
points="7,12.25 10.89,7.75 3.11,7.75"
|
|
463
|
+
fill="currentColor"
|
|
464
|
+
class="bh-text-black/20"
|
|
465
|
+
[ngClass]="[all.sortColumn === col.field && all.sortDirection === 'desc' ? '!bh-text-primary' : '']"
|
|
466
|
+
></polygon>
|
|
467
|
+
</svg>
|
|
468
|
+
</span>
|
|
469
|
+
</div>
|
|
470
|
+
|
|
471
|
+
<ng-container *ngIf="all.columnFilter && !isFooter">
|
|
472
|
+
<div *ngIf="col.filter" class="bh-filter bh-relative">
|
|
473
|
+
<input *ngIf="col.type === 'string'" [(ngModel)]="col.value" type="text" class="bh-form-control" (keyup)="filterChange.emit()" />
|
|
474
|
+
<input *ngIf="col.type === 'number'" [(ngModel)]="col.value" type="number" class="bh-form-control" (keyup)="filterChange.emit()" />
|
|
475
|
+
<input *ngIf="col.type === 'date'" [(ngModel)]="col.value" type="date" class="bh-form-control" (change)="filterChange.emit()" />
|
|
476
|
+
<select *ngIf="col.type === 'bool'" [(ngModel)]="col.value" class="bh-form-control" (change)="filterChange.emit()" (click)="isOpenFilter = null">
|
|
477
|
+
<option [ngValue]="undefined">All</option>
|
|
478
|
+
<option [ngValue]="true">True</option>
|
|
479
|
+
<option [ngValue]="false">False</option>
|
|
480
|
+
</select>
|
|
481
|
+
|
|
482
|
+
<button *ngIf="col.type !== 'bool'" type="button" (click)="toggleFilterMenu(col); $event.stopPropagation()">
|
|
483
|
+
<icon-filter class="bh-w-4"></icon-filter>
|
|
484
|
+
</button>
|
|
485
|
+
|
|
486
|
+
<column-filter
|
|
487
|
+
[ngClass]="{ 'bh-hidden': isOpenFilter !== col.field }"
|
|
488
|
+
[column]="col"
|
|
489
|
+
(close)="toggleFilterMenu()"
|
|
490
|
+
(filterChange)="filterChange.emit()"
|
|
491
|
+
></column-filter>
|
|
492
|
+
</div>
|
|
493
|
+
</ng-container>
|
|
494
|
+
</th>
|
|
495
|
+
</ng-container>
|
|
496
|
+
</tr>
|
|
497
|
+
</ng-template>
|
|
498
|
+
`,
|
|
499
|
+
}]
|
|
500
|
+
}], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { template: [{
|
|
501
|
+
type: ViewChild,
|
|
502
|
+
args: ['template', { static: true }]
|
|
503
|
+
}], selectedAll: [{
|
|
504
|
+
type: ViewChild,
|
|
505
|
+
args: ['selectedAll']
|
|
506
|
+
}], all: [{
|
|
507
|
+
type: Input
|
|
508
|
+
}], isFooter: [{
|
|
509
|
+
type: Input
|
|
510
|
+
}], checkAll: [{
|
|
511
|
+
type: Input
|
|
512
|
+
}], selectAll: [{
|
|
513
|
+
type: Output,
|
|
514
|
+
args: ['selectAll']
|
|
515
|
+
}], sortChange: [{
|
|
516
|
+
type: Output,
|
|
517
|
+
args: ['sortChange']
|
|
518
|
+
}], filterChange: [{
|
|
519
|
+
type: Output,
|
|
520
|
+
args: ['filterChange']
|
|
521
|
+
}] } });
|
|
522
|
+
|
|
523
|
+
class IconLoaderComponent {
|
|
524
|
+
constructor() { }
|
|
525
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: IconLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
526
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: IconLoaderComponent, isStandalone: false, selector: "icon-loader", ngImport: i0, template: `
|
|
527
|
+
<svg width="84" height="84" viewBox="0 0 24 24" class="bh-loader bh-text-primary">
|
|
528
|
+
<circle cx="18" cy="12" r="0" fill="currentColor">
|
|
529
|
+
<animate
|
|
530
|
+
attributeName="r"
|
|
531
|
+
begin=".67"
|
|
532
|
+
calcMode="spline"
|
|
533
|
+
dur="1.5s"
|
|
534
|
+
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
|
535
|
+
repeatCount="indefinite"
|
|
536
|
+
values="0;2;0;0"
|
|
537
|
+
/>
|
|
538
|
+
</circle>
|
|
539
|
+
<circle cx="12" cy="12" r="0" fill="currentColor">
|
|
540
|
+
<animate
|
|
541
|
+
attributeName="r"
|
|
542
|
+
begin=".33"
|
|
543
|
+
calcMode="spline"
|
|
544
|
+
dur="1.5s"
|
|
545
|
+
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
|
546
|
+
repeatCount="indefinite"
|
|
547
|
+
values="0;2;0;0"
|
|
548
|
+
/>
|
|
549
|
+
</circle>
|
|
550
|
+
<circle cx="6" cy="12" r="0" fill="currentColor">
|
|
551
|
+
<animate
|
|
552
|
+
attributeName="r"
|
|
553
|
+
begin="0"
|
|
554
|
+
calcMode="spline"
|
|
555
|
+
dur="1.5s"
|
|
556
|
+
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
|
557
|
+
repeatCount="indefinite"
|
|
558
|
+
values="0;2;0;0"
|
|
559
|
+
/>
|
|
560
|
+
</circle>
|
|
561
|
+
</svg>
|
|
562
|
+
`, isInline: true });
|
|
563
|
+
}
|
|
564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: IconLoaderComponent, decorators: [{
|
|
565
|
+
type: Component,
|
|
566
|
+
args: [{
|
|
567
|
+
standalone: false,
|
|
568
|
+
selector: 'icon-loader',
|
|
569
|
+
template: `
|
|
570
|
+
<svg width="84" height="84" viewBox="0 0 24 24" class="bh-loader bh-text-primary">
|
|
571
|
+
<circle cx="18" cy="12" r="0" fill="currentColor">
|
|
572
|
+
<animate
|
|
573
|
+
attributeName="r"
|
|
574
|
+
begin=".67"
|
|
575
|
+
calcMode="spline"
|
|
576
|
+
dur="1.5s"
|
|
577
|
+
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
|
578
|
+
repeatCount="indefinite"
|
|
579
|
+
values="0;2;0;0"
|
|
580
|
+
/>
|
|
581
|
+
</circle>
|
|
582
|
+
<circle cx="12" cy="12" r="0" fill="currentColor">
|
|
583
|
+
<animate
|
|
584
|
+
attributeName="r"
|
|
585
|
+
begin=".33"
|
|
586
|
+
calcMode="spline"
|
|
587
|
+
dur="1.5s"
|
|
588
|
+
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
|
589
|
+
repeatCount="indefinite"
|
|
590
|
+
values="0;2;0;0"
|
|
591
|
+
/>
|
|
592
|
+
</circle>
|
|
593
|
+
<circle cx="6" cy="12" r="0" fill="currentColor">
|
|
594
|
+
<animate
|
|
595
|
+
attributeName="r"
|
|
596
|
+
begin="0"
|
|
597
|
+
calcMode="spline"
|
|
598
|
+
dur="1.5s"
|
|
599
|
+
keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8"
|
|
600
|
+
repeatCount="indefinite"
|
|
601
|
+
values="0;2;0;0"
|
|
602
|
+
/>
|
|
603
|
+
</circle>
|
|
604
|
+
</svg>
|
|
605
|
+
`,
|
|
606
|
+
}]
|
|
607
|
+
}], ctorParameters: () => [] });
|
|
608
|
+
|
|
609
|
+
class NgDataTableComponent {
|
|
610
|
+
sanitizer;
|
|
611
|
+
// props
|
|
612
|
+
loading = false;
|
|
613
|
+
isServerMode = false;
|
|
614
|
+
skin = 'bh-table-striped bh-table-hover';
|
|
615
|
+
totalRows = 0;
|
|
616
|
+
rows = [];
|
|
617
|
+
columns = [];
|
|
618
|
+
hasCheckbox = false;
|
|
619
|
+
search = '';
|
|
620
|
+
page = 1;
|
|
621
|
+
pageSize = 10;
|
|
622
|
+
pageSizeOptions = [10, 20, 30, 50, 100];
|
|
623
|
+
showPageSize = true;
|
|
624
|
+
rowClass = '';
|
|
625
|
+
cellClass = '';
|
|
626
|
+
sortable = false;
|
|
627
|
+
sortColumn = 'id';
|
|
628
|
+
sortDirection = 'asc';
|
|
629
|
+
columnFilter = false;
|
|
630
|
+
pagination = true;
|
|
631
|
+
showNumbers = true;
|
|
632
|
+
showNumbersCount = 5;
|
|
633
|
+
showFirstPage = true;
|
|
634
|
+
showLastPage = true;
|
|
635
|
+
firstArrow = '';
|
|
636
|
+
lastArrow = '';
|
|
637
|
+
nextArrow = '';
|
|
638
|
+
previousArrow = '';
|
|
639
|
+
paginationInfo = 'Showing {0} to {1} of {2} entries';
|
|
640
|
+
noDataContent = 'No data available';
|
|
641
|
+
stickyHeader = false;
|
|
642
|
+
height = '500px';
|
|
643
|
+
stickyFirstColumn = false;
|
|
644
|
+
cloneHeaderInFooter = false;
|
|
645
|
+
selectRowOnClick = false;
|
|
646
|
+
showFooterRow = false;
|
|
647
|
+
// events
|
|
648
|
+
changeServer = new EventEmitter();
|
|
649
|
+
sortChange = new EventEmitter();
|
|
650
|
+
searchChange = new EventEmitter();
|
|
651
|
+
pageChange = new EventEmitter();
|
|
652
|
+
pageSizeChange = new EventEmitter();
|
|
653
|
+
rowSelect = new EventEmitter();
|
|
654
|
+
filterChange = new EventEmitter();
|
|
655
|
+
rowClick = new EventEmitter();
|
|
656
|
+
rowDBClick = new EventEmitter();
|
|
657
|
+
// variables
|
|
658
|
+
filterItems = [];
|
|
659
|
+
currentPage = this.page;
|
|
660
|
+
currentPageSize = this.pagination ? this.pageSize : this.rows.length;
|
|
661
|
+
oldPageSize = this.pageSize;
|
|
662
|
+
currentSortColumn = this.sortColumn;
|
|
663
|
+
oldSortColumn = this.sortColumn;
|
|
664
|
+
currentSortDirection = this.sortDirection;
|
|
665
|
+
oldSortDirection = this.sortDirection;
|
|
666
|
+
filterRowCount = this.totalRows;
|
|
667
|
+
selectedAll = null;
|
|
668
|
+
currentLoader = this.loading;
|
|
669
|
+
currentSearch = this.search;
|
|
670
|
+
oldColumns;
|
|
671
|
+
uniqueKey = '';
|
|
672
|
+
constructor(sanitizer) {
|
|
673
|
+
this.sanitizer = sanitizer;
|
|
674
|
+
}
|
|
675
|
+
ngOnInit() {
|
|
676
|
+
this.initDeafultValues();
|
|
677
|
+
this.changeRows();
|
|
678
|
+
}
|
|
679
|
+
ngOnChanges(changes) {
|
|
680
|
+
// watch loading
|
|
681
|
+
if (changes['loading'] && !changes['loading'].firstChange) {
|
|
682
|
+
this.currentLoader = this.loading;
|
|
683
|
+
}
|
|
684
|
+
// watch rows and columns
|
|
685
|
+
if ((changes['rows'] && !changes['rows'].firstChange) || (changes['columns'] && !changes['columns'].firstChange)) {
|
|
686
|
+
if (!this.isServerMode) {
|
|
687
|
+
this.currentPage = 1;
|
|
688
|
+
this.oldColumns = this.noReact(this.columns);
|
|
689
|
+
}
|
|
690
|
+
this.changeRows();
|
|
691
|
+
}
|
|
692
|
+
// watch page
|
|
693
|
+
if (!this.isServerMode) {
|
|
694
|
+
if (changes['page'] && !changes['page'].firstChange) {
|
|
695
|
+
this.movePage(this.page);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
// watch pagesize
|
|
699
|
+
if (changes['pageSize'] && !changes['pageSize'].firstChange) {
|
|
700
|
+
this.currentPageSize = this.pagination ? this.pageSize : this.rows.length;
|
|
701
|
+
if (!this.isServerMode) {
|
|
702
|
+
this.changePageSize();
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
// watch search
|
|
706
|
+
if (changes['search'] && !changes['search'].firstChange) {
|
|
707
|
+
this.currentSearch = this.search;
|
|
708
|
+
this.changeSearch();
|
|
709
|
+
}
|
|
710
|
+
// watch sort column and direction
|
|
711
|
+
if (!this.isServerMode) {
|
|
712
|
+
if ((changes['sortColumn'] && !changes['sortColumn'].firstChange) || (changes['sortDirection'] && !changes['sortDirection'].firstChange)) {
|
|
713
|
+
this.sortChangeMethod(this.sortColumn, this.sortDirection);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
initDeafultValues() {
|
|
718
|
+
this.currentLoader = this.loading;
|
|
719
|
+
this.currentSearch = this.search;
|
|
720
|
+
this.currentSortColumn = this.sortColumn;
|
|
721
|
+
this.currentSortDirection = this.sortDirection;
|
|
722
|
+
this.filterRowCount = this.totalRows;
|
|
723
|
+
this.currentPage = this.page;
|
|
724
|
+
if (this.pagination) {
|
|
725
|
+
const exists = this.pageSizeOptions.find((d) => d === this.pageSize);
|
|
726
|
+
this.currentPageSize = exists ? this.pageSize : 10;
|
|
727
|
+
}
|
|
728
|
+
else {
|
|
729
|
+
this.currentPageSize = this.rows.length;
|
|
730
|
+
}
|
|
731
|
+
this.oldPageSize = this.pageSize;
|
|
732
|
+
this.oldSortColumn = this.sortColumn;
|
|
733
|
+
this.oldSortDirection = this.sortDirection;
|
|
734
|
+
// set default columns values
|
|
735
|
+
for (const item of this.columns || []) {
|
|
736
|
+
const type = item.type?.toLowerCase() || 'string';
|
|
737
|
+
item.type = type;
|
|
738
|
+
item.isUnique = item.isUnique !== undefined ? item.isUnique : false;
|
|
739
|
+
item.hide = item.hide !== undefined ? item.hide : false;
|
|
740
|
+
item.filter = item.filter !== undefined ? item.filter : true;
|
|
741
|
+
item.search = item.search !== undefined ? item.search : true;
|
|
742
|
+
item.sort = item.sort !== undefined ? item.sort : true;
|
|
743
|
+
item.html = item.html !== undefined ? item.html : false;
|
|
744
|
+
item.condition = !type || type === 'string' ? 'contain' : 'equal';
|
|
745
|
+
}
|
|
746
|
+
this.oldColumns = this.noReact(this.columns);
|
|
747
|
+
this.setUniqueKey();
|
|
748
|
+
}
|
|
749
|
+
props;
|
|
750
|
+
get getProps() {
|
|
751
|
+
return {
|
|
752
|
+
loading: this.currentLoader,
|
|
753
|
+
isServerMode: this.isServerMode,
|
|
754
|
+
skin: this.skin,
|
|
755
|
+
totalRows: this.filterRowCount,
|
|
756
|
+
rows: this.rows,
|
|
757
|
+
columns: this.columns,
|
|
758
|
+
hasCheckbox: this.hasCheckbox,
|
|
759
|
+
search: this.currentSearch,
|
|
760
|
+
page: this.currentPage,
|
|
761
|
+
pageSize: this.currentPageSize,
|
|
762
|
+
pageSizeOptions: this.pageSizeOptions,
|
|
763
|
+
showPageSize: this.showPageSize,
|
|
764
|
+
rowClass: this.rowClass,
|
|
765
|
+
cellClass: this.cellClass,
|
|
766
|
+
sortable: this.sortable,
|
|
767
|
+
sortColumn: this.currentSortColumn,
|
|
768
|
+
sortDirection: this.currentSortDirection,
|
|
769
|
+
columnFilter: this.columnFilter,
|
|
770
|
+
pagination: this.pagination,
|
|
771
|
+
showNumbers: this.showNumbers,
|
|
772
|
+
showNumbersCount: this.showNumbersCount,
|
|
773
|
+
showFirstPage: this.showFirstPage,
|
|
774
|
+
showLastPage: this.showLastPage,
|
|
775
|
+
firstArrow: this.firstArrow,
|
|
776
|
+
lastArrow: this.lastArrow,
|
|
777
|
+
nextArrow: this.nextArrow,
|
|
778
|
+
previousArrow: this.previousArrow,
|
|
779
|
+
paginationInfo: this.paginationInfo,
|
|
780
|
+
noDataContent: this.noDataContent,
|
|
781
|
+
stickyHeader: this.stickyHeader,
|
|
782
|
+
height: this.height,
|
|
783
|
+
stickyFirstColumn: this.stickyFirstColumn,
|
|
784
|
+
cloneHeaderInFooter: this.cloneHeaderInFooter,
|
|
785
|
+
selectRowOnClick: this.selectRowOnClick,
|
|
786
|
+
showFooterRow: this.showFooterRow,
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
isFunction(value) {
|
|
790
|
+
return typeof value === 'function';
|
|
791
|
+
}
|
|
792
|
+
stringFormat() {
|
|
793
|
+
const args = [this.filterRowCount ? this.offset() : 0, this.limit(), this.filterRowCount];
|
|
794
|
+
return this.paginationInfo.replace(/{(\d+)}/g, (match, number) => {
|
|
795
|
+
return typeof args[number] != 'undefined' ? args[number] : match;
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
setUniqueKey() {
|
|
799
|
+
const col = this.columns.find((d) => d.isUnique);
|
|
800
|
+
this.uniqueKey = col?.field || '';
|
|
801
|
+
}
|
|
802
|
+
maxPage() {
|
|
803
|
+
const totalPages = this.currentPageSize < 1 ? 1 : Math.ceil(this.filterRowCount / this.currentPageSize);
|
|
804
|
+
return Math.max(totalPages || 0, 1);
|
|
805
|
+
}
|
|
806
|
+
offset() {
|
|
807
|
+
return (this.currentPage - 1) * this.currentPageSize + 1;
|
|
808
|
+
}
|
|
809
|
+
limit() {
|
|
810
|
+
const limit = this.currentPage * this.currentPageSize;
|
|
811
|
+
return this.filterRowCount >= limit ? limit : this.filterRowCount;
|
|
812
|
+
}
|
|
813
|
+
pager = new Pager();
|
|
814
|
+
getPager() {
|
|
815
|
+
// total pages
|
|
816
|
+
let totalPages = this.maxPage();
|
|
817
|
+
// pages
|
|
818
|
+
let startPage, endPage;
|
|
819
|
+
let isMaxSized = typeof this.showNumbersCount !== 'undefined' && this.showNumbersCount < totalPages;
|
|
820
|
+
// recompute if maxSize
|
|
821
|
+
if (isMaxSized) {
|
|
822
|
+
// Current page is displayed in the middle of the visible ones
|
|
823
|
+
startPage = Math.max(this.currentPage - Math.floor(this.showNumbersCount / 2), 1);
|
|
824
|
+
endPage = startPage + this.showNumbersCount - 1;
|
|
825
|
+
// Adjust if limit is exceeded
|
|
826
|
+
if (endPage > totalPages) {
|
|
827
|
+
endPage = totalPages;
|
|
828
|
+
startPage = endPage - this.showNumbersCount + 1;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
else {
|
|
832
|
+
startPage = 1;
|
|
833
|
+
endPage = totalPages;
|
|
834
|
+
}
|
|
835
|
+
const pages = Array.from(Array(endPage + 1 - startPage).keys()).map((i) => startPage + i);
|
|
836
|
+
return {
|
|
837
|
+
totalRows: this.isServerMode ? this.totalRows : this.filterItems.length,
|
|
838
|
+
currentPage: this.currentPage,
|
|
839
|
+
pageSize: this.pageSize,
|
|
840
|
+
maxPage: totalPages,
|
|
841
|
+
startPage: startPage,
|
|
842
|
+
endPage: endPage,
|
|
843
|
+
stringFormat: this.stringFormat(),
|
|
844
|
+
pages: pages,
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
setPager() {
|
|
848
|
+
this.pager = this.getPager();
|
|
849
|
+
}
|
|
850
|
+
filterRows() {
|
|
851
|
+
let result = [];
|
|
852
|
+
let rows = this.rows || [];
|
|
853
|
+
if (this.isServerMode) {
|
|
854
|
+
this.filterRowCount = this.totalRows || 0;
|
|
855
|
+
result = rows;
|
|
856
|
+
}
|
|
857
|
+
else {
|
|
858
|
+
this.columns?.forEach((d) => {
|
|
859
|
+
if (d.filter && ((d.value !== undefined && d.value !== null && d.value !== '') || d.condition === 'is_null' || d.condition === 'is_not_null')) {
|
|
860
|
+
// string filters
|
|
861
|
+
if (d.type === 'string') {
|
|
862
|
+
if (d.value && !d.condition) {
|
|
863
|
+
d.condition = 'contain';
|
|
864
|
+
}
|
|
865
|
+
if (d.condition === 'contain') {
|
|
866
|
+
rows = rows.filter((item) => {
|
|
867
|
+
return this.cellValue(item, d.field)?.toString().toLowerCase().includes(d.value.toLowerCase());
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
else if (d.condition === 'not_contain') {
|
|
871
|
+
rows = rows.filter((item) => {
|
|
872
|
+
return !this.cellValue(item, d.field)?.toString().toLowerCase().includes(d.value.toLowerCase());
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
else if (d.condition === 'equal') {
|
|
876
|
+
rows = rows.filter((item) => {
|
|
877
|
+
return this.cellValue(item, d.field)?.toString().toLowerCase() === d.value.toLowerCase();
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
else if (d.condition === 'not_equal') {
|
|
881
|
+
rows = rows.filter((item) => {
|
|
882
|
+
return this.cellValue(item, d.field)?.toString().toLowerCase() !== d.value.toLowerCase();
|
|
883
|
+
});
|
|
884
|
+
}
|
|
885
|
+
else if (d.condition === 'start_with') {
|
|
886
|
+
rows = rows.filter((item) => {
|
|
887
|
+
return this.cellValue(item, d.field)?.toString().toLowerCase().indexOf(d.value.toLowerCase()) === 0;
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
else if (d.condition === 'end_with') {
|
|
891
|
+
rows = rows.filter((item) => {
|
|
892
|
+
return (this.cellValue(item, d.field)
|
|
893
|
+
?.toString()
|
|
894
|
+
.toLowerCase()
|
|
895
|
+
.substr(d.value.length * -1) === d.value.toLowerCase());
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
// number filters
|
|
900
|
+
else if (d.type === 'number') {
|
|
901
|
+
if (d.value && !d.condition) {
|
|
902
|
+
d.condition = 'equal';
|
|
903
|
+
}
|
|
904
|
+
if (d.condition === 'equal') {
|
|
905
|
+
rows = rows.filter((item) => {
|
|
906
|
+
return this.cellValue(item, d.field) && parseFloat(this.cellValue(item, d.field)) === parseFloat(d.value);
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
else if (d.condition === 'not_equal') {
|
|
910
|
+
rows = rows.filter((item) => {
|
|
911
|
+
return this.cellValue(item, d.field) && parseFloat(this.cellValue(item, d.field)) !== parseFloat(d.value);
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
else if (d.condition === 'greater_than') {
|
|
915
|
+
rows = rows.filter((item) => {
|
|
916
|
+
return this.cellValue(item, d.field) && parseFloat(this.cellValue(item, d.field)) > parseFloat(d.value);
|
|
917
|
+
});
|
|
918
|
+
}
|
|
919
|
+
else if (d.condition === 'greater_than_equal') {
|
|
920
|
+
rows = rows.filter((item) => {
|
|
921
|
+
return this.cellValue(item, d.field) && parseFloat(this.cellValue(item, d.field)) >= parseFloat(d.value);
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
else if (d.condition === 'less_than') {
|
|
925
|
+
rows = rows.filter((item) => {
|
|
926
|
+
return this.cellValue(item, d.field) && parseFloat(this.cellValue(item, d.field)) < parseFloat(d.value);
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
else if (d.condition === 'less_than_equal') {
|
|
930
|
+
rows = rows.filter((item) => {
|
|
931
|
+
return this.cellValue(item, d.field) && parseFloat(this.cellValue(item, d.field)) <= parseFloat(d.value);
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
// date filters
|
|
936
|
+
if (d.type === 'date') {
|
|
937
|
+
if (d.value && !d.condition) {
|
|
938
|
+
d.condition = 'equal';
|
|
939
|
+
}
|
|
940
|
+
if (d.condition === 'equal') {
|
|
941
|
+
rows = rows.filter((item) => {
|
|
942
|
+
return this.cellValue(item, d.field) && this.dateFormat(this.cellValue(item, d.field)) === d.value;
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
else if (d.condition === 'not_equal') {
|
|
946
|
+
rows = rows.filter((item) => {
|
|
947
|
+
return this.cellValue(item, d.field) && this.dateFormat(this.cellValue(item, d.field)) !== d.value;
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
else if (d.condition === 'greater_than') {
|
|
951
|
+
rows = rows.filter((item) => {
|
|
952
|
+
return this.cellValue(item, d.field) && this.dateFormat(this.cellValue(item, d.field)) > d.value;
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
else if (d.condition === 'less_than') {
|
|
956
|
+
rows = rows.filter((item) => {
|
|
957
|
+
return this.cellValue(item, d.field) && this.dateFormat(this.cellValue(item, d.field)) < d.value;
|
|
958
|
+
});
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
// boolean filters
|
|
962
|
+
else if (d.type === 'bool') {
|
|
963
|
+
rows = rows.filter((item) => {
|
|
964
|
+
return this.cellValue(item, d.field) === d.value;
|
|
965
|
+
});
|
|
966
|
+
}
|
|
967
|
+
if (d.condition === 'is_null') {
|
|
968
|
+
rows = rows.filter((item) => {
|
|
969
|
+
return this.cellValue(item, d.field) == null || this.cellValue(item, d.field) === '';
|
|
970
|
+
});
|
|
971
|
+
d.value = '';
|
|
972
|
+
}
|
|
973
|
+
else if (d.condition === 'is_not_null') {
|
|
974
|
+
d.value = '';
|
|
975
|
+
rows = rows.filter((item) => {
|
|
976
|
+
return this.cellValue(item, d.field);
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
if (this.currentSearch && rows.length) {
|
|
982
|
+
let final = [];
|
|
983
|
+
const keys = (this.columns || [])
|
|
984
|
+
.filter((d) => d.search && !d.hide)
|
|
985
|
+
.map((d) => {
|
|
986
|
+
return d.field;
|
|
987
|
+
});
|
|
988
|
+
for (let j = 0; j < rows.length; j++) {
|
|
989
|
+
for (let i = 0; i < keys.length; i++) {
|
|
990
|
+
if (this.cellValue(rows[j], keys[i])?.toString().toLowerCase().includes(this.currentSearch.toLowerCase())) {
|
|
991
|
+
final.push(rows[j]);
|
|
992
|
+
break;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
rows = final;
|
|
997
|
+
}
|
|
998
|
+
// sort rows
|
|
999
|
+
const collator = new Intl.Collator(undefined, {
|
|
1000
|
+
numeric: true,
|
|
1001
|
+
sensitivity: 'base',
|
|
1002
|
+
});
|
|
1003
|
+
const sortOrder = this.currentSortDirection === 'desc' ? -1 : 1;
|
|
1004
|
+
rows.sort((a, b) => {
|
|
1005
|
+
const valA = this.currentSortColumn?.split('.').reduce((obj, key) => obj?.[key], a);
|
|
1006
|
+
const valB = this.currentSortColumn?.split('.').reduce((obj, key) => obj?.[key], b);
|
|
1007
|
+
return collator.compare(valA, valB) * sortOrder;
|
|
1008
|
+
});
|
|
1009
|
+
this.filterRowCount = rows.length || 0;
|
|
1010
|
+
result = rows.slice(this.offset() - 1, this.limit());
|
|
1011
|
+
}
|
|
1012
|
+
this.filterItems = result || [];
|
|
1013
|
+
this.setPager();
|
|
1014
|
+
}
|
|
1015
|
+
// page change
|
|
1016
|
+
movePage(page = 1) {
|
|
1017
|
+
if (this.currentLoader || page < 1 || page > this.maxPage()) {
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
this.currentPage = page;
|
|
1021
|
+
this.clearSelectedRows();
|
|
1022
|
+
if (this.isServerMode) {
|
|
1023
|
+
this.changeForServer('page');
|
|
1024
|
+
}
|
|
1025
|
+
else {
|
|
1026
|
+
this.filterRows();
|
|
1027
|
+
this.pageChange.emit(this.currentPage);
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
// row update
|
|
1031
|
+
changeRows() {
|
|
1032
|
+
this.clearSelectedRows();
|
|
1033
|
+
this.filterRows();
|
|
1034
|
+
}
|
|
1035
|
+
// pagesize changed
|
|
1036
|
+
changePageSize() {
|
|
1037
|
+
this.currentPage = 1;
|
|
1038
|
+
this.clearSelectedRows();
|
|
1039
|
+
if (this.isServerMode) {
|
|
1040
|
+
this.changeForServer('pagesize', true);
|
|
1041
|
+
}
|
|
1042
|
+
else {
|
|
1043
|
+
this.filterRows();
|
|
1044
|
+
this.pageSizeChange.emit(this.currentPageSize);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
// sorting
|
|
1048
|
+
sortChangeMethod(field, dir = '') {
|
|
1049
|
+
let direction = dir || 'asc';
|
|
1050
|
+
if (field === this.currentSortColumn) {
|
|
1051
|
+
if (this.currentSortDirection === 'asc') {
|
|
1052
|
+
direction = 'desc';
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
const offset = (this.currentPage - 1) * this.currentPageSize;
|
|
1056
|
+
const limit = this.currentPageSize;
|
|
1057
|
+
this.currentSortColumn = field;
|
|
1058
|
+
this.currentSortDirection = direction;
|
|
1059
|
+
this.clearSelectedRows();
|
|
1060
|
+
if (this.isServerMode) {
|
|
1061
|
+
this.changeForServer('sort');
|
|
1062
|
+
}
|
|
1063
|
+
else {
|
|
1064
|
+
this.filterRows();
|
|
1065
|
+
this.sortChange.emit({ offset, limit, field, direction });
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
// checkboax
|
|
1069
|
+
header1;
|
|
1070
|
+
header2;
|
|
1071
|
+
checkboxChange() {
|
|
1072
|
+
this.checkIfAllSelected();
|
|
1073
|
+
const rows = this.getSelectedRows();
|
|
1074
|
+
this.rowSelect.emit(rows);
|
|
1075
|
+
}
|
|
1076
|
+
selectAll(checked, isAll = false) {
|
|
1077
|
+
this.filterItems.map((d) => (d.selected = checked));
|
|
1078
|
+
if (isAll) {
|
|
1079
|
+
this.checkboxChange();
|
|
1080
|
+
}
|
|
1081
|
+
else {
|
|
1082
|
+
this.checkIfAllSelected();
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
checkIfAllSelected() {
|
|
1086
|
+
const cnt = this.filterItems.filter((d) => d.selected);
|
|
1087
|
+
this.selectedAll = cnt.length && cnt.length === this.filterItems.length;
|
|
1088
|
+
setTimeout(() => {
|
|
1089
|
+
this.header1?.checkboxChange();
|
|
1090
|
+
if (this.cloneHeaderInFooter) {
|
|
1091
|
+
this.header2?.checkboxChange();
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
// columns filter
|
|
1096
|
+
filterChangeMethod() {
|
|
1097
|
+
this.currentPage = 1;
|
|
1098
|
+
this.clearSelectedRows();
|
|
1099
|
+
if (this.isServerMode) {
|
|
1100
|
+
this.changeForServer('filter', true);
|
|
1101
|
+
}
|
|
1102
|
+
else {
|
|
1103
|
+
this.filterRows();
|
|
1104
|
+
this.filterChange.emit(this.columns);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
// search
|
|
1108
|
+
changeSearch() {
|
|
1109
|
+
this.currentPage = 1;
|
|
1110
|
+
this.clearSelectedRows();
|
|
1111
|
+
if (this.isServerMode) {
|
|
1112
|
+
this.changeForServer('search', true);
|
|
1113
|
+
}
|
|
1114
|
+
else {
|
|
1115
|
+
this.filterRows();
|
|
1116
|
+
this.searchChange.emit(this.currentSearch);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
cellValue(item, field = '') {
|
|
1120
|
+
return field?.split('.').reduce((obj, key) => obj?.[key], item);
|
|
1121
|
+
}
|
|
1122
|
+
dateFormat(date) {
|
|
1123
|
+
try {
|
|
1124
|
+
if (!date) {
|
|
1125
|
+
return '';
|
|
1126
|
+
}
|
|
1127
|
+
const dt = new Date(date);
|
|
1128
|
+
const day = dt.getDate();
|
|
1129
|
+
const month = dt.getMonth() + 1;
|
|
1130
|
+
const year = dt.getFullYear();
|
|
1131
|
+
return year + '-' + (month > 9 ? month : '0' + month) + '-' + (day > 9 ? day : '0' + day);
|
|
1132
|
+
}
|
|
1133
|
+
catch { }
|
|
1134
|
+
return '';
|
|
1135
|
+
}
|
|
1136
|
+
//row click
|
|
1137
|
+
timer = null;
|
|
1138
|
+
delay = 230;
|
|
1139
|
+
onRowClick(item, index) {
|
|
1140
|
+
clearTimeout(this.timer);
|
|
1141
|
+
this.timer = setTimeout(() => {
|
|
1142
|
+
if (this.selectRowOnClick) {
|
|
1143
|
+
if (this.isRowSelected(index)) {
|
|
1144
|
+
this.unselectRow(index);
|
|
1145
|
+
}
|
|
1146
|
+
else {
|
|
1147
|
+
this.selectRow(index);
|
|
1148
|
+
}
|
|
1149
|
+
this.checkboxChange();
|
|
1150
|
+
}
|
|
1151
|
+
this.rowClick.emit(item);
|
|
1152
|
+
}, this.delay);
|
|
1153
|
+
}
|
|
1154
|
+
onRowDoubleClick(item) {
|
|
1155
|
+
clearTimeout(this.timer);
|
|
1156
|
+
this.rowDBClick.emit(item);
|
|
1157
|
+
}
|
|
1158
|
+
// emit change event for server side pagination
|
|
1159
|
+
changeForServer(changeType, isResetPage = false) {
|
|
1160
|
+
if (this.isServerMode) {
|
|
1161
|
+
if (changeType === 'page') {
|
|
1162
|
+
this.setPager();
|
|
1163
|
+
}
|
|
1164
|
+
this.setDefaultCondition();
|
|
1165
|
+
const res = {
|
|
1166
|
+
current_page: Number(isResetPage ? 1 : this.currentPage),
|
|
1167
|
+
pagesize: Number(this.currentPageSize),
|
|
1168
|
+
offset: Number((this.currentPage - 1) * this.currentPageSize),
|
|
1169
|
+
sort_column: this.currentSortColumn,
|
|
1170
|
+
sort_direction: this.currentSortDirection,
|
|
1171
|
+
search: this.currentSearch,
|
|
1172
|
+
column_filters: this.columns,
|
|
1173
|
+
change_type: changeType,
|
|
1174
|
+
};
|
|
1175
|
+
this.changeServer.emit(res);
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
// set default conditions when values exists and condition empty
|
|
1179
|
+
setDefaultCondition() {
|
|
1180
|
+
for (let i = 0; i < this.columns.length; i++) {
|
|
1181
|
+
let d = this.columns[i];
|
|
1182
|
+
if (d.filter && ((d.value !== undefined && d.value !== null && d.value !== '') || d.condition === 'is_null' || d.condition === 'is_not_null')) {
|
|
1183
|
+
if (d.type === 'string' && d.value && !d.condition) {
|
|
1184
|
+
d.condition = 'contain';
|
|
1185
|
+
}
|
|
1186
|
+
if (d.type === 'number' && d.value && !d.condition) {
|
|
1187
|
+
d.condition = 'equal';
|
|
1188
|
+
}
|
|
1189
|
+
if (d.type === 'date' && d.value && !d.condition) {
|
|
1190
|
+
d.condition = 'equal';
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
// methods
|
|
1196
|
+
reset() {
|
|
1197
|
+
this.columns = this.noReact(this.oldColumns);
|
|
1198
|
+
this.currentSearch = '';
|
|
1199
|
+
this.currentPage = 1;
|
|
1200
|
+
this.currentPageSize = this.oldPageSize;
|
|
1201
|
+
this.currentSortColumn = this.oldSortColumn;
|
|
1202
|
+
this.currentSortDirection = this.oldSortDirection;
|
|
1203
|
+
this.clearSelectedRows();
|
|
1204
|
+
if (this.isServerMode) {
|
|
1205
|
+
this.changeForServer('reset', true);
|
|
1206
|
+
}
|
|
1207
|
+
else {
|
|
1208
|
+
this.filterRows();
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
getSelectedRows() {
|
|
1212
|
+
return this.filterItems.filter((d) => d.selected);
|
|
1213
|
+
}
|
|
1214
|
+
getColumnFilters() {
|
|
1215
|
+
return this.columns;
|
|
1216
|
+
}
|
|
1217
|
+
clearSelectedRows() {
|
|
1218
|
+
if (this.filterItems) {
|
|
1219
|
+
this.selectAll(false);
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
selectRow(index) {
|
|
1223
|
+
if (!this.isRowSelected(index)) {
|
|
1224
|
+
const rows = this.filterItems.find((d, i) => i === index);
|
|
1225
|
+
if (rows) {
|
|
1226
|
+
rows.selected = true;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
unselectRow(index) {
|
|
1231
|
+
if (this.isRowSelected(index)) {
|
|
1232
|
+
const rows = this.filterItems.find((d, i) => i === index);
|
|
1233
|
+
rows.selected = false;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
isRowSelected(index) {
|
|
1237
|
+
const rows = this.filterItems.find((d, i) => i === index);
|
|
1238
|
+
if (rows) {
|
|
1239
|
+
return rows.selected;
|
|
1240
|
+
}
|
|
1241
|
+
return false;
|
|
1242
|
+
}
|
|
1243
|
+
// trackby
|
|
1244
|
+
trackFilterItems(index, item) {
|
|
1245
|
+
return this.uniqueKey ? item[this.uniqueKey] : (this.currentPage - 1) * this.pageSize + index;
|
|
1246
|
+
}
|
|
1247
|
+
// slots
|
|
1248
|
+
slots;
|
|
1249
|
+
defaultTemplate;
|
|
1250
|
+
slotsMap = new Map();
|
|
1251
|
+
ngAfterContentInit() {
|
|
1252
|
+
this.slots.forEach((template) => {
|
|
1253
|
+
const fieldName = template.fieldName;
|
|
1254
|
+
if (fieldName) {
|
|
1255
|
+
this.slotsMap.set(fieldName, template.templateRef);
|
|
1256
|
+
}
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
hasSlot(fieldName = '') {
|
|
1260
|
+
return this.slotsMap.has(fieldName);
|
|
1261
|
+
}
|
|
1262
|
+
getSlot(fieldName = '') {
|
|
1263
|
+
return this.slotsMap.get(fieldName) || this.defaultTemplate;
|
|
1264
|
+
}
|
|
1265
|
+
// Sanitize and trust the HTML content
|
|
1266
|
+
sanitizeHtml(html) {
|
|
1267
|
+
return this.sanitizer.bypassSecurityTrustHtml(html);
|
|
1268
|
+
}
|
|
1269
|
+
noReact(value) {
|
|
1270
|
+
return JSON.parse(JSON.stringify(value));
|
|
1271
|
+
}
|
|
1272
|
+
getRange(size) {
|
|
1273
|
+
return Array.from({ length: size }, (_, index) => index + 1);
|
|
1274
|
+
}
|
|
1275
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NgDataTableComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
1276
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: NgDataTableComponent, isStandalone: false, selector: "ng-datatable", inputs: { loading: "loading", isServerMode: "isServerMode", skin: "skin", totalRows: "totalRows", rows: "rows", columns: "columns", hasCheckbox: "hasCheckbox", search: "search", page: "page", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", showPageSize: "showPageSize", rowClass: "rowClass", cellClass: "cellClass", sortable: "sortable", sortColumn: "sortColumn", sortDirection: "sortDirection", columnFilter: "columnFilter", pagination: "pagination", showNumbers: "showNumbers", showNumbersCount: "showNumbersCount", showFirstPage: "showFirstPage", showLastPage: "showLastPage", firstArrow: "firstArrow", lastArrow: "lastArrow", nextArrow: "nextArrow", previousArrow: "previousArrow", paginationInfo: "paginationInfo", noDataContent: "noDataContent", stickyHeader: "stickyHeader", height: "height", stickyFirstColumn: "stickyFirstColumn", cloneHeaderInFooter: "cloneHeaderInFooter", selectRowOnClick: "selectRowOnClick", showFooterRow: "showFooterRow" }, outputs: { changeServer: "changeServer", sortChange: "sortChange", searchChange: "searchChange", pageChange: "pageChange", pageSizeChange: "pageSizeChange", rowSelect: "rowSelect", filterChange: "filterChange", rowClick: "rowClick", rowDBClick: "rowDBClick" }, queries: [{ propertyName: "slots", predicate: SlotDirective }], viewQueries: [{ propertyName: "header1", first: true, predicate: ["header1"], descendants: true }, { propertyName: "header2", first: true, predicate: ["header2"], descendants: true }, { propertyName: "defaultTemplate", first: true, predicate: ["defaultTemplate"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"bh-datatable bh-antialiased bh-relative bh-text-black bh-text-sm bh-font-normal\">\n <div class=\"bh-table-responsive\" [ngClass]=\"{'bh-min-h-[300px]': currentLoader }\" [style]=\"{ height: stickyHeader && height }\">\n <table [ngClass]=\"[skin]\">\n <thead [ngClass]=\"{ 'bh-sticky bh-top-0 bh-z-10': stickyHeader }\">\n <column-header\n #header1\n [all]=\"getProps\"\n [checkAll]=\"selectedAll\"\n (selectAll)=\"selectAll($event, true)\"\n (sortChange)=\"sortChangeMethod($event)\"\n (filterChange)=\"filterChangeMethod()\"\n ></column-header>\n </thead>\n\n <tbody>\n <ng-container *ngIf=\"filterRowCount\">\n <tr\n *ngFor=\"let item of filterItems; let i = index; trackBy:trackFilterItems.bind(this)\"\n [ngClass]=\"[(isFunction(rowClass) ? rowClass(item) : rowClass), selectRowOnClick? 'bh-cursor-pointer':'']\"\n (click)=\"onRowClick(item, i)\"\n (dblclick)=\"onRowDoubleClick(item)\"\n >\n <td *ngIf=\"hasCheckbox\" [ngClass]=\"{'bh-sticky bh-left-0 bh-bg-blue-light': stickyFirstColumn}\">\n <div class=\"bh-checkbox\" (click)=\"$event.stopPropagation();\">\n <input type=\"checkbox\" value=\"{{item[uniqueKey] ? item[uniqueKey] : i}}\" [(ngModel)]=\"item.selected\" (change)=\"checkboxChange();\" />\n <div>\n <icon-check class=\"check\"></icon-check>\n </div>\n </div>\n </td>\n <ng-container *ngFor=\"let col of columns; let j = index\">\n <td\n *ngIf=\"!col.hide\"\n [ngClass]=\"[\n (isFunction(cellClass) ? cellClass(item) : cellClass),\n j === 0 && stickyFirstColumn ? 'bh-sticky bh-left-0 bh-bg-blue-light' : '',\n hasCheckbox && j === 0 && stickyFirstColumn ? 'bh-left-[52px]' : '',\n col.cellClass ? col.cellClass : ''\n ]\"\n >\n <ng-container *ngIf=\"hasSlot(col.field)\">\n <ng-container [ngTemplateOutlet]=\"getSlot(col.field)\" [ngTemplateOutletContext]=\"{ data: item }\"></ng-container>\n </ng-container>\n <div *ngIf=\"!hasSlot(col.field) && col.cellRenderer\" [innerHTML]=\"sanitizeHtml(col.cellRenderer(item))\"></div>\n <ng-container *ngIf=\"!hasSlot(col.field) && !col.cellRenderer\"> {{ cellValue(item, col.field) }} </ng-container>\n </td>\n </ng-container>\n </tr>\n <!-- Footer row -->\n <tr *ngIf=\"showFooterRow\" class=\"footer-row\">\n <td *ngIf=\"hasCheckbox\"></td>\n <ng-container *ngFor=\"let col of columns; let j = index\">\n <td *ngIf=\"!col.hide\">\n <ng-container *ngIf=\"hasSlot(col.field + '_footer')\">\n <ng-container [ngTemplateOutlet]=\"getSlot(col.field + '_footer')\" [ngTemplateOutletContext]=\"{ data: col }\"></ng-container>\n </ng-container>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n <tr *ngIf=\"!filterRowCount && !currentLoader\">\n <td [attr.colspan]=\"columns.length + 1\">{{ noDataContent }}</td>\n </tr>\n\n <ng-container *ngIf=\"!filterRowCount && currentLoader\">\n <tr *ngFor=\"let k of getRange(pageSize)\" class=\"!bh-bg-white bh-h-11 !bh-border-transparent\">\n <td [attr.colspan]=\"columns.length + 1\" class=\"!bh-p-0 !bh-border-transparent\">\n <div class=\"bh-skeleton-box bh-h-8\"></div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n\n <tfoot *ngIf=\"cloneHeaderInFooter\" [ngClass]=\"{ 'bh-sticky bh-bottom-0': stickyHeader }\">\n <column-header\n #header2\n [all]=\"getProps\"\n [isFooter]=\"true\"\n [checkAll]=\"selectedAll\"\n (selectAll)=\"selectAll($event)\"\n (sortChange)=\"sortChangeMethod($event)\"\n (filterChange)=\"filterChangeMethod()\"\n ></column-header>\n </tfoot>\n </table>\n\n <div *ngIf=\"filterRowCount && currentLoader\" class=\"bh-absolute bh-inset-0 bh-bg-blue-light/50 bh-grid bh-place-content-center\">\n <icon-loader></icon-loader>\n </div>\n </div>\n\n <div *ngIf=\"pagination && filterRowCount\" class=\"bh-pagination bh-py-5\">\n <div class=\"bh-flex bh-items-center bh-flex-wrap bh-flex-col sm:bh-flex-row bh-gap-4\">\n <div class=\"bh-pagination-info bh-flex bh-items-center\">\n <span class=\"bh-mr-2\"> {{ pager.stringFormat }} </span>\n <select *ngIf=\"showPageSize\" [(ngModel)]=\"currentPageSize\" class=\"bh-pagesize\" (ngModelChange)=\"changePageSize()\">\n <option *ngFor=\"let option of pageSizeOptions\" [value]=\"option\">{{ option }}</option>\n </select>\n </div>\n\n <div class=\"bh-pagination-number sm:bh-ml-auto bh-inline-flex bh-items-center bh-space-x-1\">\n <button *ngIf=\"showFirstPage\" type=\"button\" class=\"bh-page-item first-page\" [class.disabled]=\"currentPage <= 1\" (click)=\"movePage(1)\">\n <span *ngIf=\"firstArrow\" [innerHTML]=\"sanitizeHtml(firstArrow)\"></span>\n <svg *ngIf=\"!firstArrow\" aria-hidden=\"true\" width=\"14\" height=\"14\" viewBox=\"0 0 16 16\">\n <g fill=\"currentColor\" fill-rule=\"evenodd\">\n <path d=\"M8.354 1.646a.5.5 0 0 1 0 .708L2.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\" />\n <path d=\"M12.354 1.646a.5.5 0 0 1 0 .708L6.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\" />\n </g>\n </svg>\n </button>\n <button type=\"button\" class=\"bh-page-item previous-page\" [class.disabled]=\"currentPage <= 1\" (click)=\"movePage(currentPage - 1)\">\n <span *ngIf=\"previousArrow\" [innerHTML]=\"sanitizeHtml(previousArrow)\"></span>\n <svg *ngIf=\"!previousArrow\" aria-hidden=\"true\" width=\"14\" height=\"14\" viewBox=\"0 0 16 16\">\n <path\n fill=\"currentColor\"\n fill-rule=\"evenodd\"\n d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\"\n />\n </svg>\n </button>\n\n <ng-container *ngIf=\"showNumbers\">\n <button\n *ngFor=\"let page of pager.pages\"\n type=\"button\"\n class=\"bh-page-item\"\n [class.disabled]=\"currentPage === page\"\n [class.bh-active]=\"page === currentPage\"\n (click)=\"movePage(page)\"\n >\n {{ page }}\n </button>\n </ng-container>\n\n <button type=\"button\" class=\"bh-page-item next-page\" [class.disabled]=\"currentPage >= maxPage()\" (click)=\"movePage(currentPage + 1)\">\n <span *ngIf=\"nextArrow\" [innerHTML]=\"sanitizeHtml(nextArrow)\"> </span>\n <svg *ngIf=\"!nextArrow\" aria-hidden=\"true\" width=\"14\" height=\"14\" viewBox=\"0 0 16 16\">\n <path\n fill=\"currentColor\"\n fill-rule=\"evenodd\"\n d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8L4.646 2.354a.5.5 0 0 1 0-.708z\"\n />\n </svg>\n </button>\n\n <button *ngIf=\"showLastPage\" type=\"button\" class=\"bh-page-item last-page\" [class.disabled]=\"currentPage >= maxPage()\" (click)=\"movePage(maxPage())\">\n <span *ngIf=\"lastArrow\" [innerHTML]=\"sanitizeHtml(lastArrow)\"> </span>\n <svg *ngIf=\"!lastArrow\" aria-hidden=\"true\" width=\"14\" height=\"14\" viewBox=\"0 0 16 16\">\n <g fill=\"currentColor\" fill-rule=\"evenodd\">\n <path d=\"M3.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L9.293 8L3.646 2.354a.5.5 0 0 1 0-.708z\" />\n <path d=\"M7.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L13.293 8L7.646 2.354a.5.5 0 0 1 0-.708z\" />\n </g>\n </svg>\n </button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:after,:before{border:0 solid transparent;box-sizing:border-box}.bh-datatable .bh-table-responsive{position:relative;width:100%;overflow:auto;border-radius:.25rem}.bh-datatable .bh-table-responsive table{width:100%;max-width:100%;border-collapse:collapse!important}.bh-datatable .bh-table-responsive table tfoot tr,.bh-datatable .bh-table-responsive table thead tr{--tw-bg-opacity:1;background-color:rgb(246 247 250/var(--tw-bg-opacity,1))}.bh-datatable .bh-table-responsive table tbody tr td,.bh-datatable .bh-table-responsive table tfoot tr th,.bh-datatable .bh-table-responsive table thead tr th{padding:.75rem 1rem;text-align:left}.bh-datatable .bh-table-responsive table tfoot tr th,.bh-datatable .bh-table-responsive table thead tr th{vertical-align:top;font-weight:700}.bh-datatable .bh-table-responsive table tbody tr{border-bottom-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(246 247 250/var(--tw-border-opacity,1))}.bh-datatable .bh-table-responsive table.bh-table-striped tbody tr:nth-child(odd){background-color:#e0e6ed26}.bh-datatable .bh-table-responsive table.bh-table-hover tbody tr:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bh-datatable .bh-table-responsive table.bh-table-compact tbody tr td,.bh-datatable .bh-table-responsive table.bh-table-compact thead tr th{padding:.5rem .75rem}.bh-datatable .bh-table-responsive table.bh-table-bordered tbody tr td,.bh-datatable .bh-table-responsive table.bh-table-bordered thead tr th{border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(246 247 250/var(--tw-border-opacity,1))}.bh-datatable .bh-pagination .bh-page-item{display:grid;height:2rem;width:2rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;place-content:center;border-radius:9999px;border:1px solid rgba(14,23,38,.3);--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.375rem .625rem;--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1));outline-width:0}.bh-datatable .bh-pagination .bh-page-item:hover{--tw-border-opacity:1;border-color:rgb(67 97 238/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(67 97 238/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.bh-datatable .bh-pagination .bh-page-item{-webkit-appearance:button;background-image:none}.bh-datatable .bh-pagination .bh-page-item.disabled:not(.bh-active){pointer-events:none;opacity:.5}.bh-datatable .bh-pagination .bh-page-item.bh-active{--tw-border-opacity:1;border-color:rgb(67 97 238/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(67 97 238/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.bh-datatable .bh-table-responsive button,.bh-datatable .bh-table-responsive input{outline:2px solid transparent;outline-offset:2px}.bh-datatable .bh-pagination-info .bh-pagesize{box-sizing:border-box;border-radius:.25rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(224 230 237/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.375rem .5rem;font-weight:400;--tw-text-opacity:1;color:rgb(14 23 38/var(--tw-text-opacity,1));outline-width:0}.bh-datatable .bh-pagination-info .bh-pagesize:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(224,230,237,.4)}.bh-datatable .bh-table-responsive table th .bh-filter{margin-top:.125rem;display:flex;height:30px;width:100%;align-items:center}.bh-datatable .bh-table-responsive table th .bh-filter>.bh-form-control{box-sizing:border-box;height:100%;width:100%;min-width:60px;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(224 230 237/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.25rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity:1;color:rgb(14 23 38/var(--tw-text-opacity,1));outline-width:0}.bh-datatable .bh-table-responsive table th .bh-filter>.bh-form-control:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(224,230,237,.4)}.bh-datatable .bh-table-responsive table th .bh-filter>select{border-radius:.25rem}.bh-datatable .bh-table-responsive table th .bh-filter>button{display:grid;height:30px;width:30px;flex-shrink:0;cursor:pointer;place-content:center;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(224 230 237/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(224 230 237/var(--tw-bg-opacity,1));color:#0e1726b3}.bh-datatable .bh-table-responsive table th .bh-filter>button:hover{color:#0e1726e6}.bh-datatable .bh-table-responsive table th .bh-filter>button{-webkit-appearance:button;background-image:none}.bh-datatable .bh-filter-menu button{display:flex;width:100%;cursor:pointer;border:1px solid transparent;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.375rem 1rem;text-align:left}.bh-datatable .bh-filter-menu button:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1));font-weight:700}.bh-datatable .bh-filter-menu button{-webkit-appearance:button;background-image:none}.bh-datatable .bh-filter-menu button.active{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1));font-weight:700}.bh-datatable .bh-table-responsive input[type=checkbox]{position:absolute;height:1.25rem;width:1.25rem;opacity:0}.bh-datatable .bh-table-responsive input[type=checkbox]+div{display:grid;height:1.25rem;width:1.25rem;place-content:center;border-radius:.25rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(224 230 237/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bh-datatable .bh-table-responsive input[type=checkbox]+div svg{pointer-events:none;display:none;height:.75rem;width:.75rem;fill:currentColor;--tw-text-opacity:1;color:rgb(67 97 238/var(--tw-text-opacity,1))}.bh-datatable .bh-table-responsive input[type=checkbox]:checked+div,.bh-datatable .bh-table-responsive input[type=checkbox]:indeterminate+div{--tw-border-opacity:1;border-color:rgb(67 97 238/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(67 97 238/var(--tw-bg-opacity,1))}.bh-datatable .bh-table-responsive input[type=checkbox]:checked+div svg.check,.bh-datatable .bh-table-responsive input[type=checkbox]:indeterminate+div svg.intermediate{display:flex;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.bh-absolute{position:absolute}.bh-relative{position:relative}.bh-sticky{position:sticky}.bh-inset-0{inset:0}.bh-bottom-0{bottom:0}.bh-left-0{left:0}.bh-left-\\[52px\\]{left:52px}.bh-right-0{right:0}.bh-top-0{top:0}.bh-top-full{top:100%}.bh-z-10{z-index:10}.bh-z-\\[1\\]{z-index:1}.bh-mb-2{margin-bottom:.5rem}.bh-ml-3{margin-left:.75rem}.bh-mr-2{margin-right:.5rem}.bh-mt-1{margin-top:.25rem}.bh-flex{display:flex}.bh-inline-flex{display:inline-flex}.bh-grid{display:grid}.bh-hidden{display:none}.bh-h-11{height:2.75rem}.bh-h-8{height:2rem}.bh-min-h-\\[300px\\]{min-height:300px}.bh-w-32{width:8rem}.bh-w-4{width:1rem}.bh-w-px{width:1px}.bh-cursor-pointer{cursor:pointer}.bh-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bh-flex-col{flex-direction:column}.bh-flex-wrap{flex-wrap:wrap}.bh-place-content-center{place-content:center}.bh-items-center{align-items:center}.bh-gap-4{gap:1rem}.bh-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))}.bh-overflow-hidden{overflow:hidden}.bh-rounded{border-radius:.25rem}.bh-rounded-md{border-radius:.375rem}.bh-border{border-width:1px}.bh-border-solid{border-style:solid}.\\!bh-border-transparent{border-color:transparent!important}.bh-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.bh-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.\\!bh-bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bh-bg-blue-light{--tw-bg-opacity:1;background-color:rgb(246 247 250/var(--tw-bg-opacity,1))}.bh-bg-blue-light\\/50{background-color:#f6f7fa80}.bh-bg-gray-200{background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bh-bg-gray-200,.bh-bg-white{--tw-bg-opacity:1}.bh-bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\\!bh-p-0{padding:0!important}.bh-p-10{padding:2.5rem}.bh-p-2{padding:.5rem}.bh-py-5{padding-top:1.25rem;padding-bottom:1.25rem}.bh-text-\\[13px\\]{font-size:13px}.bh-text-sm{font-size:.875rem;line-height:1.25rem}.bh-font-normal{font-weight:400}.\\!bh-text-primary{--tw-text-opacity:1!important;color:rgb(67 97 238/var(--tw-text-opacity,1))!important}.bh-text-black{--tw-text-opacity:1;color:rgb(14 23 38/var(--tw-text-opacity,1))}.bh-text-black\\/20{color:#0e172633}.bh-text-primary{--tw-text-opacity:1;color:rgb(67 97 238/var(--tw-text-opacity,1))}.bh-antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bh-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.bh-outline-0{outline-width:0}.bh-filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.bh-skeleton-box{position:relative;width:100%;overflow:hidden;--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bh-skeleton-box:after{position:absolute;inset:0;--tw-translate-x:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));animation:bhshimmer 2s infinite;background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.025) 20%,rgba(0,0,0,.05) 50%,transparent);--tw-content:\"\";content:var(--tw-content)}@keyframes bhshimmer{to{transform:translate(100%)}}.hover\\:bh-opacity-80:hover{opacity:.8}.focus\\:bh-border-gray-200:focus{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}@media(min-width:640px){.sm\\:bh-ml-auto{margin-left:auto}.sm\\:bh-flex-row{flex-direction:row}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ColumnHeaderComponent, selector: "column-header", inputs: ["all", "isFooter", "checkAll"], outputs: ["selectAll", "sortChange", "filterChange"] }, { kind: "component", type: IconCheckComponent, selector: "icon-check", inputs: ["class"] }, { kind: "component", type: IconLoaderComponent, selector: "icon-loader" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1277
|
+
}
|
|
1278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NgDataTableComponent, decorators: [{
|
|
1279
|
+
type: Component,
|
|
1280
|
+
args: [{ standalone: false, selector: 'ng-datatable', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"bh-datatable bh-antialiased bh-relative bh-text-black bh-text-sm bh-font-normal\">\n <div class=\"bh-table-responsive\" [ngClass]=\"{'bh-min-h-[300px]': currentLoader }\" [style]=\"{ height: stickyHeader && height }\">\n <table [ngClass]=\"[skin]\">\n <thead [ngClass]=\"{ 'bh-sticky bh-top-0 bh-z-10': stickyHeader }\">\n <column-header\n #header1\n [all]=\"getProps\"\n [checkAll]=\"selectedAll\"\n (selectAll)=\"selectAll($event, true)\"\n (sortChange)=\"sortChangeMethod($event)\"\n (filterChange)=\"filterChangeMethod()\"\n ></column-header>\n </thead>\n\n <tbody>\n <ng-container *ngIf=\"filterRowCount\">\n <tr\n *ngFor=\"let item of filterItems; let i = index; trackBy:trackFilterItems.bind(this)\"\n [ngClass]=\"[(isFunction(rowClass) ? rowClass(item) : rowClass), selectRowOnClick? 'bh-cursor-pointer':'']\"\n (click)=\"onRowClick(item, i)\"\n (dblclick)=\"onRowDoubleClick(item)\"\n >\n <td *ngIf=\"hasCheckbox\" [ngClass]=\"{'bh-sticky bh-left-0 bh-bg-blue-light': stickyFirstColumn}\">\n <div class=\"bh-checkbox\" (click)=\"$event.stopPropagation();\">\n <input type=\"checkbox\" value=\"{{item[uniqueKey] ? item[uniqueKey] : i}}\" [(ngModel)]=\"item.selected\" (change)=\"checkboxChange();\" />\n <div>\n <icon-check class=\"check\"></icon-check>\n </div>\n </div>\n </td>\n <ng-container *ngFor=\"let col of columns; let j = index\">\n <td\n *ngIf=\"!col.hide\"\n [ngClass]=\"[\n (isFunction(cellClass) ? cellClass(item) : cellClass),\n j === 0 && stickyFirstColumn ? 'bh-sticky bh-left-0 bh-bg-blue-light' : '',\n hasCheckbox && j === 0 && stickyFirstColumn ? 'bh-left-[52px]' : '',\n col.cellClass ? col.cellClass : ''\n ]\"\n >\n <ng-container *ngIf=\"hasSlot(col.field)\">\n <ng-container [ngTemplateOutlet]=\"getSlot(col.field)\" [ngTemplateOutletContext]=\"{ data: item }\"></ng-container>\n </ng-container>\n <div *ngIf=\"!hasSlot(col.field) && col.cellRenderer\" [innerHTML]=\"sanitizeHtml(col.cellRenderer(item))\"></div>\n <ng-container *ngIf=\"!hasSlot(col.field) && !col.cellRenderer\"> {{ cellValue(item, col.field) }} </ng-container>\n </td>\n </ng-container>\n </tr>\n <!-- Footer row -->\n <tr *ngIf=\"showFooterRow\" class=\"footer-row\">\n <td *ngIf=\"hasCheckbox\"></td>\n <ng-container *ngFor=\"let col of columns; let j = index\">\n <td *ngIf=\"!col.hide\">\n <ng-container *ngIf=\"hasSlot(col.field + '_footer')\">\n <ng-container [ngTemplateOutlet]=\"getSlot(col.field + '_footer')\" [ngTemplateOutletContext]=\"{ data: col }\"></ng-container>\n </ng-container>\n </td>\n </ng-container>\n </tr>\n </ng-container>\n <tr *ngIf=\"!filterRowCount && !currentLoader\">\n <td [attr.colspan]=\"columns.length + 1\">{{ noDataContent }}</td>\n </tr>\n\n <ng-container *ngIf=\"!filterRowCount && currentLoader\">\n <tr *ngFor=\"let k of getRange(pageSize)\" class=\"!bh-bg-white bh-h-11 !bh-border-transparent\">\n <td [attr.colspan]=\"columns.length + 1\" class=\"!bh-p-0 !bh-border-transparent\">\n <div class=\"bh-skeleton-box bh-h-8\"></div>\n </td>\n </tr>\n </ng-container>\n </tbody>\n\n <tfoot *ngIf=\"cloneHeaderInFooter\" [ngClass]=\"{ 'bh-sticky bh-bottom-0': stickyHeader }\">\n <column-header\n #header2\n [all]=\"getProps\"\n [isFooter]=\"true\"\n [checkAll]=\"selectedAll\"\n (selectAll)=\"selectAll($event)\"\n (sortChange)=\"sortChangeMethod($event)\"\n (filterChange)=\"filterChangeMethod()\"\n ></column-header>\n </tfoot>\n </table>\n\n <div *ngIf=\"filterRowCount && currentLoader\" class=\"bh-absolute bh-inset-0 bh-bg-blue-light/50 bh-grid bh-place-content-center\">\n <icon-loader></icon-loader>\n </div>\n </div>\n\n <div *ngIf=\"pagination && filterRowCount\" class=\"bh-pagination bh-py-5\">\n <div class=\"bh-flex bh-items-center bh-flex-wrap bh-flex-col sm:bh-flex-row bh-gap-4\">\n <div class=\"bh-pagination-info bh-flex bh-items-center\">\n <span class=\"bh-mr-2\"> {{ pager.stringFormat }} </span>\n <select *ngIf=\"showPageSize\" [(ngModel)]=\"currentPageSize\" class=\"bh-pagesize\" (ngModelChange)=\"changePageSize()\">\n <option *ngFor=\"let option of pageSizeOptions\" [value]=\"option\">{{ option }}</option>\n </select>\n </div>\n\n <div class=\"bh-pagination-number sm:bh-ml-auto bh-inline-flex bh-items-center bh-space-x-1\">\n <button *ngIf=\"showFirstPage\" type=\"button\" class=\"bh-page-item first-page\" [class.disabled]=\"currentPage <= 1\" (click)=\"movePage(1)\">\n <span *ngIf=\"firstArrow\" [innerHTML]=\"sanitizeHtml(firstArrow)\"></span>\n <svg *ngIf=\"!firstArrow\" aria-hidden=\"true\" width=\"14\" height=\"14\" viewBox=\"0 0 16 16\">\n <g fill=\"currentColor\" fill-rule=\"evenodd\">\n <path d=\"M8.354 1.646a.5.5 0 0 1 0 .708L2.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\" />\n <path d=\"M12.354 1.646a.5.5 0 0 1 0 .708L6.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\" />\n </g>\n </svg>\n </button>\n <button type=\"button\" class=\"bh-page-item previous-page\" [class.disabled]=\"currentPage <= 1\" (click)=\"movePage(currentPage - 1)\">\n <span *ngIf=\"previousArrow\" [innerHTML]=\"sanitizeHtml(previousArrow)\"></span>\n <svg *ngIf=\"!previousArrow\" aria-hidden=\"true\" width=\"14\" height=\"14\" viewBox=\"0 0 16 16\">\n <path\n fill=\"currentColor\"\n fill-rule=\"evenodd\"\n d=\"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z\"\n />\n </svg>\n </button>\n\n <ng-container *ngIf=\"showNumbers\">\n <button\n *ngFor=\"let page of pager.pages\"\n type=\"button\"\n class=\"bh-page-item\"\n [class.disabled]=\"currentPage === page\"\n [class.bh-active]=\"page === currentPage\"\n (click)=\"movePage(page)\"\n >\n {{ page }}\n </button>\n </ng-container>\n\n <button type=\"button\" class=\"bh-page-item next-page\" [class.disabled]=\"currentPage >= maxPage()\" (click)=\"movePage(currentPage + 1)\">\n <span *ngIf=\"nextArrow\" [innerHTML]=\"sanitizeHtml(nextArrow)\"> </span>\n <svg *ngIf=\"!nextArrow\" aria-hidden=\"true\" width=\"14\" height=\"14\" viewBox=\"0 0 16 16\">\n <path\n fill=\"currentColor\"\n fill-rule=\"evenodd\"\n d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8L4.646 2.354a.5.5 0 0 1 0-.708z\"\n />\n </svg>\n </button>\n\n <button *ngIf=\"showLastPage\" type=\"button\" class=\"bh-page-item last-page\" [class.disabled]=\"currentPage >= maxPage()\" (click)=\"movePage(maxPage())\">\n <span *ngIf=\"lastArrow\" [innerHTML]=\"sanitizeHtml(lastArrow)\"> </span>\n <svg *ngIf=\"!lastArrow\" aria-hidden=\"true\" width=\"14\" height=\"14\" viewBox=\"0 0 16 16\">\n <g fill=\"currentColor\" fill-rule=\"evenodd\">\n <path d=\"M3.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L9.293 8L3.646 2.354a.5.5 0 0 1 0-.708z\" />\n <path d=\"M7.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L13.293 8L7.646 2.354a.5.5 0 0 1 0-.708z\" />\n </g>\n </svg>\n </button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:after,:before{border:0 solid transparent;box-sizing:border-box}.bh-datatable .bh-table-responsive{position:relative;width:100%;overflow:auto;border-radius:.25rem}.bh-datatable .bh-table-responsive table{width:100%;max-width:100%;border-collapse:collapse!important}.bh-datatable .bh-table-responsive table tfoot tr,.bh-datatable .bh-table-responsive table thead tr{--tw-bg-opacity:1;background-color:rgb(246 247 250/var(--tw-bg-opacity,1))}.bh-datatable .bh-table-responsive table tbody tr td,.bh-datatable .bh-table-responsive table tfoot tr th,.bh-datatable .bh-table-responsive table thead tr th{padding:.75rem 1rem;text-align:left}.bh-datatable .bh-table-responsive table tfoot tr th,.bh-datatable .bh-table-responsive table thead tr th{vertical-align:top;font-weight:700}.bh-datatable .bh-table-responsive table tbody tr{border-bottom-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(246 247 250/var(--tw-border-opacity,1))}.bh-datatable .bh-table-responsive table.bh-table-striped tbody tr:nth-child(odd){background-color:#e0e6ed26}.bh-datatable .bh-table-responsive table.bh-table-hover tbody tr:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bh-datatable .bh-table-responsive table.bh-table-compact tbody tr td,.bh-datatable .bh-table-responsive table.bh-table-compact thead tr th{padding:.5rem .75rem}.bh-datatable .bh-table-responsive table.bh-table-bordered tbody tr td,.bh-datatable .bh-table-responsive table.bh-table-bordered thead tr th{border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(246 247 250/var(--tw-border-opacity,1))}.bh-datatable .bh-pagination .bh-page-item{display:grid;height:2rem;width:2rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;place-content:center;border-radius:9999px;border:1px solid rgba(14,23,38,.3);--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.375rem .625rem;--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1));outline-width:0}.bh-datatable .bh-pagination .bh-page-item:hover{--tw-border-opacity:1;border-color:rgb(67 97 238/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(67 97 238/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.bh-datatable .bh-pagination .bh-page-item{-webkit-appearance:button;background-image:none}.bh-datatable .bh-pagination .bh-page-item.disabled:not(.bh-active){pointer-events:none;opacity:.5}.bh-datatable .bh-pagination .bh-page-item.bh-active{--tw-border-opacity:1;border-color:rgb(67 97 238/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(67 97 238/var(--tw-bg-opacity,1));--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.bh-datatable .bh-table-responsive button,.bh-datatable .bh-table-responsive input{outline:2px solid transparent;outline-offset:2px}.bh-datatable .bh-pagination-info .bh-pagesize{box-sizing:border-box;border-radius:.25rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(224 230 237/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.375rem .5rem;font-weight:400;--tw-text-opacity:1;color:rgb(14 23 38/var(--tw-text-opacity,1));outline-width:0}.bh-datatable .bh-pagination-info .bh-pagesize:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(224,230,237,.4)}.bh-datatable .bh-table-responsive table th .bh-filter{margin-top:.125rem;display:flex;height:30px;width:100%;align-items:center}.bh-datatable .bh-table-responsive table th .bh-filter>.bh-form-control{box-sizing:border-box;height:100%;width:100%;min-width:60px;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(224 230 237/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.25rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity:1;color:rgb(14 23 38/var(--tw-text-opacity,1));outline-width:0}.bh-datatable .bh-table-responsive table th .bh-filter>.bh-form-control:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-color:rgba(224,230,237,.4)}.bh-datatable .bh-table-responsive table th .bh-filter>select{border-radius:.25rem}.bh-datatable .bh-table-responsive table th .bh-filter>button{display:grid;height:30px;width:30px;flex-shrink:0;cursor:pointer;place-content:center;border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(224 230 237/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(224 230 237/var(--tw-bg-opacity,1));color:#0e1726b3}.bh-datatable .bh-table-responsive table th .bh-filter>button:hover{color:#0e1726e6}.bh-datatable .bh-table-responsive table th .bh-filter>button{-webkit-appearance:button;background-image:none}.bh-datatable .bh-filter-menu button{display:flex;width:100%;cursor:pointer;border:1px solid transparent;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));padding:.375rem 1rem;text-align:left}.bh-datatable .bh-filter-menu button:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1));font-weight:700}.bh-datatable .bh-filter-menu button{-webkit-appearance:button;background-image:none}.bh-datatable .bh-filter-menu button.active{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1));font-weight:700}.bh-datatable .bh-table-responsive input[type=checkbox]{position:absolute;height:1.25rem;width:1.25rem;opacity:0}.bh-datatable .bh-table-responsive input[type=checkbox]+div{display:grid;height:1.25rem;width:1.25rem;place-content:center;border-radius:.25rem;border-width:1px;border-style:solid;--tw-border-opacity:1;border-color:rgb(224 230 237/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bh-datatable .bh-table-responsive input[type=checkbox]+div svg{pointer-events:none;display:none;height:.75rem;width:.75rem;fill:currentColor;--tw-text-opacity:1;color:rgb(67 97 238/var(--tw-text-opacity,1))}.bh-datatable .bh-table-responsive input[type=checkbox]:checked+div,.bh-datatable .bh-table-responsive input[type=checkbox]:indeterminate+div{--tw-border-opacity:1;border-color:rgb(67 97 238/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(67 97 238/var(--tw-bg-opacity,1))}.bh-datatable .bh-table-responsive input[type=checkbox]:checked+div svg.check,.bh-datatable .bh-table-responsive input[type=checkbox]:indeterminate+div svg.intermediate{display:flex;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.bh-absolute{position:absolute}.bh-relative{position:relative}.bh-sticky{position:sticky}.bh-inset-0{inset:0}.bh-bottom-0{bottom:0}.bh-left-0{left:0}.bh-left-\\[52px\\]{left:52px}.bh-right-0{right:0}.bh-top-0{top:0}.bh-top-full{top:100%}.bh-z-10{z-index:10}.bh-z-\\[1\\]{z-index:1}.bh-mb-2{margin-bottom:.5rem}.bh-ml-3{margin-left:.75rem}.bh-mr-2{margin-right:.5rem}.bh-mt-1{margin-top:.25rem}.bh-flex{display:flex}.bh-inline-flex{display:inline-flex}.bh-grid{display:grid}.bh-hidden{display:none}.bh-h-11{height:2.75rem}.bh-h-8{height:2rem}.bh-min-h-\\[300px\\]{min-height:300px}.bh-w-32{width:8rem}.bh-w-4{width:1rem}.bh-w-px{width:1px}.bh-cursor-pointer{cursor:pointer}.bh-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bh-flex-col{flex-direction:column}.bh-flex-wrap{flex-wrap:wrap}.bh-place-content-center{place-content:center}.bh-items-center{align-items:center}.bh-gap-4{gap:1rem}.bh-space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem*var(--tw-space-x-reverse));margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)))}.bh-overflow-hidden{overflow:hidden}.bh-rounded{border-radius:.25rem}.bh-rounded-md{border-radius:.375rem}.bh-border{border-width:1px}.bh-border-solid{border-style:solid}.\\!bh-border-transparent{border-color:transparent!important}.bh-border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.bh-border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.\\!bh-bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.bh-bg-blue-light{--tw-bg-opacity:1;background-color:rgb(246 247 250/var(--tw-bg-opacity,1))}.bh-bg-blue-light\\/50{background-color:#f6f7fa80}.bh-bg-gray-200{background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bh-bg-gray-200,.bh-bg-white{--tw-bg-opacity:1}.bh-bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\\!bh-p-0{padding:0!important}.bh-p-10{padding:2.5rem}.bh-p-2{padding:.5rem}.bh-py-5{padding-top:1.25rem;padding-bottom:1.25rem}.bh-text-\\[13px\\]{font-size:13px}.bh-text-sm{font-size:.875rem;line-height:1.25rem}.bh-font-normal{font-weight:400}.\\!bh-text-primary{--tw-text-opacity:1!important;color:rgb(67 97 238/var(--tw-text-opacity,1))!important}.bh-text-black{--tw-text-opacity:1;color:rgb(14 23 38/var(--tw-text-opacity,1))}.bh-text-black\\/20{color:#0e172633}.bh-text-primary{--tw-text-opacity:1;color:rgb(67 97 238/var(--tw-text-opacity,1))}.bh-antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bh-shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.bh-outline-0{outline-width:0}.bh-filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.bh-skeleton-box{position:relative;width:100%;overflow:hidden;--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bh-skeleton-box:after{position:absolute;inset:0;--tw-translate-x:-100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));animation:bhshimmer 2s infinite;background-image:linear-gradient(90deg,transparent,rgba(0,0,0,.025) 20%,rgba(0,0,0,.05) 50%,transparent);--tw-content:\"\";content:var(--tw-content)}@keyframes bhshimmer{to{transform:translate(100%)}}.hover\\:bh-opacity-80:hover{opacity:.8}.focus\\:bh-border-gray-200:focus{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}@media(min-width:640px){.sm\\:bh-ml-auto{margin-left:auto}.sm\\:bh-flex-row{flex-direction:row}}\n"] }]
|
|
1281
|
+
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }], propDecorators: { loading: [{
|
|
1282
|
+
type: Input
|
|
1283
|
+
}], isServerMode: [{
|
|
1284
|
+
type: Input
|
|
1285
|
+
}], skin: [{
|
|
1286
|
+
type: Input
|
|
1287
|
+
}], totalRows: [{
|
|
1288
|
+
type: Input
|
|
1289
|
+
}], rows: [{
|
|
1290
|
+
type: Input
|
|
1291
|
+
}], columns: [{
|
|
1292
|
+
type: Input
|
|
1293
|
+
}], hasCheckbox: [{
|
|
1294
|
+
type: Input
|
|
1295
|
+
}], search: [{
|
|
1296
|
+
type: Input
|
|
1297
|
+
}], page: [{
|
|
1298
|
+
type: Input
|
|
1299
|
+
}], pageSize: [{
|
|
1300
|
+
type: Input
|
|
1301
|
+
}], pageSizeOptions: [{
|
|
1302
|
+
type: Input
|
|
1303
|
+
}], showPageSize: [{
|
|
1304
|
+
type: Input
|
|
1305
|
+
}], rowClass: [{
|
|
1306
|
+
type: Input
|
|
1307
|
+
}], cellClass: [{
|
|
1308
|
+
type: Input
|
|
1309
|
+
}], sortable: [{
|
|
1310
|
+
type: Input
|
|
1311
|
+
}], sortColumn: [{
|
|
1312
|
+
type: Input
|
|
1313
|
+
}], sortDirection: [{
|
|
1314
|
+
type: Input
|
|
1315
|
+
}], columnFilter: [{
|
|
1316
|
+
type: Input
|
|
1317
|
+
}], pagination: [{
|
|
1318
|
+
type: Input
|
|
1319
|
+
}], showNumbers: [{
|
|
1320
|
+
type: Input
|
|
1321
|
+
}], showNumbersCount: [{
|
|
1322
|
+
type: Input
|
|
1323
|
+
}], showFirstPage: [{
|
|
1324
|
+
type: Input
|
|
1325
|
+
}], showLastPage: [{
|
|
1326
|
+
type: Input
|
|
1327
|
+
}], firstArrow: [{
|
|
1328
|
+
type: Input
|
|
1329
|
+
}], lastArrow: [{
|
|
1330
|
+
type: Input
|
|
1331
|
+
}], nextArrow: [{
|
|
1332
|
+
type: Input
|
|
1333
|
+
}], previousArrow: [{
|
|
1334
|
+
type: Input
|
|
1335
|
+
}], paginationInfo: [{
|
|
1336
|
+
type: Input
|
|
1337
|
+
}], noDataContent: [{
|
|
1338
|
+
type: Input
|
|
1339
|
+
}], stickyHeader: [{
|
|
1340
|
+
type: Input
|
|
1341
|
+
}], height: [{
|
|
1342
|
+
type: Input
|
|
1343
|
+
}], stickyFirstColumn: [{
|
|
1344
|
+
type: Input
|
|
1345
|
+
}], cloneHeaderInFooter: [{
|
|
1346
|
+
type: Input
|
|
1347
|
+
}], selectRowOnClick: [{
|
|
1348
|
+
type: Input
|
|
1349
|
+
}], showFooterRow: [{
|
|
1350
|
+
type: Input
|
|
1351
|
+
}], changeServer: [{
|
|
1352
|
+
type: Output
|
|
1353
|
+
}], sortChange: [{
|
|
1354
|
+
type: Output
|
|
1355
|
+
}], searchChange: [{
|
|
1356
|
+
type: Output
|
|
1357
|
+
}], pageChange: [{
|
|
1358
|
+
type: Output
|
|
1359
|
+
}], pageSizeChange: [{
|
|
1360
|
+
type: Output
|
|
1361
|
+
}], rowSelect: [{
|
|
1362
|
+
type: Output
|
|
1363
|
+
}], filterChange: [{
|
|
1364
|
+
type: Output
|
|
1365
|
+
}], rowClick: [{
|
|
1366
|
+
type: Output
|
|
1367
|
+
}], rowDBClick: [{
|
|
1368
|
+
type: Output
|
|
1369
|
+
}], header1: [{
|
|
1370
|
+
type: ViewChild,
|
|
1371
|
+
args: ['header1']
|
|
1372
|
+
}], header2: [{
|
|
1373
|
+
type: ViewChild,
|
|
1374
|
+
args: ['header2']
|
|
1375
|
+
}], slots: [{
|
|
1376
|
+
type: ContentChildren,
|
|
1377
|
+
args: [SlotDirective]
|
|
1378
|
+
}], defaultTemplate: [{
|
|
1379
|
+
type: ViewChild,
|
|
1380
|
+
args: ['defaultTemplate', { static: true }]
|
|
1381
|
+
}] } });
|
|
1382
|
+
|
|
1383
|
+
class DataTableModule {
|
|
1384
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DataTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1385
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: DataTableModule, declarations: [NgDataTableComponent,
|
|
1386
|
+
ColumnFilterComponent,
|
|
1387
|
+
ColumnHeaderComponent,
|
|
1388
|
+
IconCheckComponent,
|
|
1389
|
+
IconDashComponent,
|
|
1390
|
+
IconFilterComponent,
|
|
1391
|
+
IconLoaderComponent,
|
|
1392
|
+
SlotDirective], imports: [CommonModule, FormsModule], exports: [NgDataTableComponent, ColumnFilterComponent, ColumnHeaderComponent, IconCheckComponent, IconDashComponent, IconFilterComponent, IconLoaderComponent, SlotDirective] });
|
|
1393
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DataTableModule, imports: [CommonModule, FormsModule] });
|
|
1394
|
+
}
|
|
1395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DataTableModule, decorators: [{
|
|
1396
|
+
type: NgModule,
|
|
1397
|
+
args: [{
|
|
1398
|
+
imports: [CommonModule, FormsModule],
|
|
1399
|
+
declarations: [
|
|
1400
|
+
NgDataTableComponent,
|
|
1401
|
+
ColumnFilterComponent,
|
|
1402
|
+
ColumnHeaderComponent,
|
|
1403
|
+
IconCheckComponent,
|
|
1404
|
+
IconDashComponent,
|
|
1405
|
+
IconFilterComponent,
|
|
1406
|
+
IconLoaderComponent,
|
|
1407
|
+
SlotDirective,
|
|
1408
|
+
],
|
|
1409
|
+
exports: [NgDataTableComponent, ColumnFilterComponent, ColumnHeaderComponent, IconCheckComponent, IconDashComponent, IconFilterComponent, IconLoaderComponent, SlotDirective],
|
|
1410
|
+
}]
|
|
1411
|
+
}] });
|
|
1412
|
+
|
|
1413
|
+
/*
|
|
1414
|
+
* Public API Surface of ng-datatable
|
|
1415
|
+
*/
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* Generated bundle index. Do not edit.
|
|
1419
|
+
*/
|
|
1420
|
+
|
|
1421
|
+
export { ColumnFilterComponent, ColumnHeaderComponent, DataTableModule, IconCheckComponent, IconDashComponent, IconFilterComponent, IconLoaderComponent, NgDataTableComponent, Pager, SlotDirective, colDef };
|
|
1422
|
+
//# sourceMappingURL=jbeche-ng-datatable.mjs.map
|