@den4ik92/ng2-smart-table 19.0.6 → 19.1.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/fesm2022/den4ik92-ng2-smart-table.mjs +1286 -1422
- package/fesm2022/den4ik92-ng2-smart-table.mjs.map +1 -1
- package/lib/components/cell/cell-edit-mode/custom-edit.component.d.ts +5 -5
- package/lib/components/cell/cell-edit-mode/default-edit.component.d.ts +2 -2
- package/lib/components/cell/cell-edit-mode/edit-cell-default.d.ts +5 -9
- package/lib/components/cell/cell-edit-mode/edit-cell.component.d.ts +3 -5
- package/lib/components/cell/cell-editors/checkbox-editor.component.d.ts +2 -0
- package/lib/components/cell/cell-editors/default-editor.d.ts +7 -13
- package/lib/components/cell/cell-view-mode/custom-view.component.d.ts +2 -2
- package/lib/components/cell/cell-view-mode/view-cell.component.d.ts +2 -2
- package/lib/components/cell/cell.component.d.ts +4 -15
- package/lib/components/filter/custom-filter.component.d.ts +4 -3
- package/lib/components/filter/filter-default.d.ts +4 -4
- package/lib/components/filter/filter-types/default-filter.d.ts +6 -6
- package/lib/components/table-columns-editor/column-editor.directive.d.ts +1 -1
- package/lib/components/tbody/cells/create-cancel.component.d.ts +9 -10
- package/lib/components/tbody/cells/edit-delete.component.d.ts +10 -10
- package/lib/components/tbody/tbody.component.d.ts +9 -19
- package/lib/components/thead/cells/actions-title.component.d.ts +4 -8
- package/lib/components/thead/cells/actions.component.d.ts +5 -7
- package/lib/components/thead/cells/add-button.component.d.ts +6 -10
- package/lib/components/thead/rows/thead-filters-row.component.d.ts +7 -12
- package/lib/components/thead/rows/thead-form-row.component.d.ts +6 -12
- package/lib/components/thead/rows/thead-titles-row.component.d.ts +5 -10
- package/lib/components/thead/thead.component.d.ts +9 -10
- package/lib/lib/data-set/data-set.d.ts +10 -10
- package/lib/lib/data-set/row.d.ts +1 -1
- package/lib/lib/data-source/local/local.data-source.d.ts +1 -1
- package/lib/lib/grid.d.ts +5 -5
- package/lib/lib/helpers.d.ts +1 -0
- package/lib/lib/interfaces/smart-table.models.d.ts +8 -5
- package/lib/ng2-smart-table.component.d.ts +4 -8
- package/package.json +1 -1
- package/public-api.d.ts +0 -1
- package/lib/components/cell/cell-view-mode/view-cell.d.ts +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, Component, output, Input, signal, effect, computed, inject, ElementRef, Directive, ViewContainerRef, ViewChild, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
|
|
3
3
|
import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
|
|
4
4
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
@@ -7,149 +7,27 @@ import { takeUntil, debounceTime, distinctUntilChanged, skip } from 'rxjs/operat
|
|
|
7
7
|
import { moveItemInArray, CdkDropList, CdkDrag, CdkDragPlaceholder } from '@angular/cdk/drag-drop';
|
|
8
8
|
import * as i1 from '@angular/forms';
|
|
9
9
|
import { FormsModule, UntypedFormControl, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
10
|
-
import { NgComponentOutlet } from '@angular/common';
|
|
11
|
-
|
|
12
|
-
function prepareValue(value) { return value; }
|
|
13
|
-
class Cell {
|
|
14
|
-
static { this.PREPARE = prepareValue; }
|
|
15
|
-
constructor(value, row, column, dataSet) {
|
|
16
|
-
this.value = value;
|
|
17
|
-
this.row = row;
|
|
18
|
-
this.column = column;
|
|
19
|
-
this.dataSet = dataSet;
|
|
20
|
-
this.newValue = '';
|
|
21
|
-
this.newValue = value;
|
|
22
|
-
}
|
|
23
|
-
getColumn() {
|
|
24
|
-
return this.column;
|
|
25
|
-
}
|
|
26
|
-
getColumnClass() {
|
|
27
|
-
return this.column.class;
|
|
28
|
-
}
|
|
29
|
-
getRow() {
|
|
30
|
-
return this.row;
|
|
31
|
-
}
|
|
32
|
-
getValue() {
|
|
33
|
-
const prepare = this.column.getValuePrepareFunction() || Cell.PREPARE;
|
|
34
|
-
return prepare.call(null, this.value, this.row.getData(), this);
|
|
35
|
-
}
|
|
36
|
-
setValue(value) {
|
|
37
|
-
this.newValue = value;
|
|
38
|
-
}
|
|
39
|
-
getId() {
|
|
40
|
-
return this.getColumn().id;
|
|
41
|
-
}
|
|
42
|
-
getTitle() {
|
|
43
|
-
return this.getColumn().title;
|
|
44
|
-
}
|
|
45
|
-
isEditable() {
|
|
46
|
-
if (this.getRow().index === -1) {
|
|
47
|
-
return this.getColumn().isAddable;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
return this.getColumn().isEditable;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
10
|
+
import { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';
|
|
54
11
|
|
|
55
12
|
class DefaultEditor {
|
|
56
13
|
constructor() {
|
|
57
|
-
this.
|
|
58
|
-
this.
|
|
59
|
-
this.onEdited = output();
|
|
60
|
-
this.onClick = output();
|
|
14
|
+
this.cell = input.required();
|
|
15
|
+
this.inputClass = input("");
|
|
61
16
|
}
|
|
62
17
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultEditor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
63
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: DefaultEditor, isStandalone: true, selector: "ng-component", inputs: { cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: true, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "", isInline: true }); }
|
|
64
19
|
}
|
|
65
20
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultEditor, decorators: [{
|
|
66
21
|
type: Component,
|
|
67
|
-
args: [{ template:
|
|
68
|
-
}]
|
|
69
|
-
type: Input
|
|
70
|
-
}], inputClass: [{
|
|
71
|
-
type: Input
|
|
72
|
-
}] } });
|
|
73
|
-
|
|
74
|
-
class Column {
|
|
75
|
-
constructor(id, settings, dataSet) {
|
|
76
|
-
this.id = id;
|
|
77
|
-
this.settings = settings;
|
|
78
|
-
this.dataSet = dataSet;
|
|
79
|
-
this.title = '';
|
|
80
|
-
this.type = 'text';
|
|
81
|
-
this.class = '';
|
|
82
|
-
this.width = '';
|
|
83
|
-
this.hide = false;
|
|
84
|
-
this.isSortable = false;
|
|
85
|
-
this.isEditable = true;
|
|
86
|
-
this.isAddable = true;
|
|
87
|
-
this.isFilterable = false;
|
|
88
|
-
this.sortDirection = 'asc';
|
|
89
|
-
this.defaultSortDirection = false;
|
|
90
|
-
this.editor = false;
|
|
91
|
-
this.filter = false;
|
|
92
|
-
this.process(this.settings);
|
|
93
|
-
}
|
|
94
|
-
getCompareFunction() {
|
|
95
|
-
return this.compareFunction;
|
|
96
|
-
}
|
|
97
|
-
getValuePrepareFunction() {
|
|
98
|
-
return this.valuePrepareFunction;
|
|
99
|
-
}
|
|
100
|
-
getFilterFunction() {
|
|
101
|
-
return this.filterFunction;
|
|
102
|
-
}
|
|
103
|
-
getConfig() {
|
|
104
|
-
if (this.editor && (this.editor.type === 'checkbox' || this.editor.type === 'custom' || this.editor.type === 'list')) {
|
|
105
|
-
return this.editor?.config;
|
|
106
|
-
}
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
getFilterType() {
|
|
110
|
-
return this.filter && this.filter.type;
|
|
111
|
-
}
|
|
112
|
-
getFilterConfig() {
|
|
113
|
-
if (this.filter && (this.filter.type === 'checkbox' || this.filter.type === 'custom' || this.filter.type === 'list')) {
|
|
114
|
-
return this.filter?.config;
|
|
115
|
-
}
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
process(settings) {
|
|
119
|
-
this.title = settings.title;
|
|
120
|
-
this.class = settings.class || '';
|
|
121
|
-
this.width = settings.width || '';
|
|
122
|
-
this.hide = !!settings.hide;
|
|
123
|
-
this.type = settings.type;
|
|
124
|
-
if (settings?.editor) {
|
|
125
|
-
this.editor = settings.editor;
|
|
126
|
-
}
|
|
127
|
-
if (settings?.filter) {
|
|
128
|
-
this.filter = settings.filter;
|
|
129
|
-
}
|
|
130
|
-
if (settings.type === 'custom' && settings.renderComponent) {
|
|
131
|
-
this.renderComponent = settings.renderComponent;
|
|
132
|
-
}
|
|
133
|
-
this.isFilterable = typeof settings.filter === 'undefined' ? true : !!settings['filter'];
|
|
134
|
-
this.defaultSortDirection = settings?.sortDirection || false;
|
|
135
|
-
this.isSortable = typeof settings.sort === 'undefined' ? true : settings.sort;
|
|
136
|
-
this.isEditable = typeof settings.editable === 'undefined' ? true : settings.editable;
|
|
137
|
-
this.isAddable = typeof settings.addable === 'undefined' ? true : settings.addable;
|
|
138
|
-
this.sortDirection = this.prepareSortDirection();
|
|
139
|
-
this.compareFunction = settings.compareFunction;
|
|
140
|
-
this.valuePrepareFunction = settings.valuePrepareFunction;
|
|
141
|
-
this.filterFunction = settings.filterFunction;
|
|
142
|
-
}
|
|
143
|
-
prepareSortDirection() {
|
|
144
|
-
return this.defaultSortDirection === 'desc' ? 'desc' : 'asc';
|
|
145
|
-
}
|
|
146
|
-
}
|
|
22
|
+
args: [{ template: "" }]
|
|
23
|
+
}] });
|
|
147
24
|
|
|
148
25
|
class DefaultFilter {
|
|
149
26
|
constructor() {
|
|
150
27
|
this.delay = 300;
|
|
151
28
|
this.query = '';
|
|
152
|
-
this.inputClass = '';
|
|
29
|
+
this.inputClass = input('');
|
|
30
|
+
this.column = input.required();
|
|
153
31
|
this.filter = output();
|
|
154
32
|
}
|
|
155
33
|
ngOnDestroy() {
|
|
@@ -161,17 +39,13 @@ class DefaultFilter {
|
|
|
161
39
|
this.filter.emit(this.query);
|
|
162
40
|
}
|
|
163
41
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultFilter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
164
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: DefaultFilter, isStandalone: true, selector: "ng-component", inputs: { query: { classPropertyName: "query", publicName: "query", isSignal: false, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { filter: "filter" }, ngImport: i0, template: '', isInline: true }); }
|
|
165
43
|
}
|
|
166
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultFilter, decorators: [{
|
|
167
45
|
type: Component,
|
|
168
46
|
args: [{ template: '' }]
|
|
169
47
|
}], propDecorators: { query: [{
|
|
170
48
|
type: Input
|
|
171
|
-
}], inputClass: [{
|
|
172
|
-
type: Input
|
|
173
|
-
}], column: [{
|
|
174
|
-
type: Input
|
|
175
49
|
}] } });
|
|
176
50
|
|
|
177
51
|
/**
|
|
@@ -184,15 +58,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
184
58
|
* deepExtend({}, yourObj_1, [yourObj_N]);
|
|
185
59
|
*/
|
|
186
60
|
const deepExtend = function (...objects) {
|
|
187
|
-
if (
|
|
61
|
+
if (objects.length < 1 || typeof objects[0] !== 'object') {
|
|
188
62
|
return false;
|
|
189
63
|
}
|
|
190
|
-
if (
|
|
191
|
-
return
|
|
64
|
+
if (objects.length < 2) {
|
|
65
|
+
return objects[0];
|
|
192
66
|
}
|
|
193
|
-
const target =
|
|
67
|
+
const target = objects[0];
|
|
194
68
|
// convert arguments to array and cut off target object
|
|
195
|
-
const args = Array.prototype.slice.call(
|
|
69
|
+
const args = Array.prototype.slice.call(objects, 1);
|
|
196
70
|
let val, src;
|
|
197
71
|
args.forEach((obj) => {
|
|
198
72
|
// skip argument if it is array or isn't object
|
|
@@ -253,7 +127,11 @@ function getDeepFromObject(object = {}, name, defaultValue = null) {
|
|
|
253
127
|
if (level && typeof level[k] !== 'undefined') {
|
|
254
128
|
level = level[k];
|
|
255
129
|
}
|
|
130
|
+
else {
|
|
131
|
+
level = defaultValue;
|
|
132
|
+
}
|
|
256
133
|
});
|
|
134
|
+
return level ?? defaultValue;
|
|
257
135
|
}
|
|
258
136
|
catch {
|
|
259
137
|
return defaultValue;
|
|
@@ -266,6 +144,9 @@ function getPageForRowIndex(index, perPage) {
|
|
|
266
144
|
function cloneArrayOfObject(array) {
|
|
267
145
|
return array.map((obj) => Object.assign({}, obj));
|
|
268
146
|
}
|
|
147
|
+
function getRandomId(prefix = '', suffix = '') {
|
|
148
|
+
return `${prefix ? `${prefix}-` : ''}${Math.random().toString(16).slice(2)}${suffix ? `-${suffix}` : ''}`;
|
|
149
|
+
}
|
|
269
150
|
function setLocalStorage(key, value) {
|
|
270
151
|
localStorage.setItem(key, JSON.stringify(value));
|
|
271
152
|
}
|
|
@@ -349,7 +230,7 @@ class SmartTableColumnEditorDirective {
|
|
|
349
230
|
this.overlayRef?.dispose();
|
|
350
231
|
this.destroy$.next();
|
|
351
232
|
}
|
|
352
|
-
|
|
233
|
+
buttclicked() {
|
|
353
234
|
this.showDropdown();
|
|
354
235
|
}
|
|
355
236
|
getOverlayConfig() {
|
|
@@ -402,18 +283,135 @@ class SmartTableColumnEditorDirective {
|
|
|
402
283
|
});
|
|
403
284
|
}
|
|
404
285
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SmartTableColumnEditorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
405
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.3", type: SmartTableColumnEditorDirective, isStandalone: true, selector: "[smartTableColumnEditor]", inputs: { tableComponent: { classPropertyName: "tableComponent", publicName: "tableComponent", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "
|
|
286
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.3", type: SmartTableColumnEditorDirective, isStandalone: true, selector: "[smartTableColumnEditor]", inputs: { tableComponent: { classPropertyName: "tableComponent", publicName: "tableComponent", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "buttclicked()" } }, ngImport: i0 }); }
|
|
406
287
|
}
|
|
407
288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SmartTableColumnEditorDirective, decorators: [{
|
|
408
289
|
type: Directive,
|
|
409
290
|
args: [{
|
|
410
291
|
selector: "[smartTableColumnEditor]",
|
|
411
292
|
host: {
|
|
412
|
-
"(click)": "
|
|
293
|
+
"(click)": "buttclicked()",
|
|
413
294
|
},
|
|
414
295
|
}]
|
|
415
296
|
}] });
|
|
416
297
|
|
|
298
|
+
function prepareValue(value) { return value; }
|
|
299
|
+
class Cell {
|
|
300
|
+
static { this.PREPARE = prepareValue; }
|
|
301
|
+
constructor(value, row, column, dataSet) {
|
|
302
|
+
this.value = value;
|
|
303
|
+
this.row = row;
|
|
304
|
+
this.column = column;
|
|
305
|
+
this.dataSet = dataSet;
|
|
306
|
+
this.newValue = '';
|
|
307
|
+
this.newValue = value;
|
|
308
|
+
}
|
|
309
|
+
getColumn() {
|
|
310
|
+
return this.column;
|
|
311
|
+
}
|
|
312
|
+
getColumnClass() {
|
|
313
|
+
return this.column.class;
|
|
314
|
+
}
|
|
315
|
+
getRow() {
|
|
316
|
+
return this.row;
|
|
317
|
+
}
|
|
318
|
+
getValue() {
|
|
319
|
+
const prepare = this.column.getValuePrepareFunction() || Cell.PREPARE;
|
|
320
|
+
return prepare.call(null, this.value, this.row.getData(), this);
|
|
321
|
+
}
|
|
322
|
+
setValue(value) {
|
|
323
|
+
this.newValue = value;
|
|
324
|
+
}
|
|
325
|
+
getId() {
|
|
326
|
+
return this.getColumn().id;
|
|
327
|
+
}
|
|
328
|
+
getTitle() {
|
|
329
|
+
return this.getColumn().title;
|
|
330
|
+
}
|
|
331
|
+
isEditable() {
|
|
332
|
+
if (this.getRow().index === -1) {
|
|
333
|
+
return this.getColumn().isAddable;
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
return this.getColumn().isEditable;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
class Column {
|
|
342
|
+
constructor(id, settings, dataSet) {
|
|
343
|
+
this.id = id;
|
|
344
|
+
this.settings = settings;
|
|
345
|
+
this.dataSet = dataSet;
|
|
346
|
+
this.title = '';
|
|
347
|
+
this.type = 'text';
|
|
348
|
+
this.class = '';
|
|
349
|
+
this.width = '';
|
|
350
|
+
this.hide = false;
|
|
351
|
+
this.isSortable = false;
|
|
352
|
+
this.isEditable = true;
|
|
353
|
+
this.isAddable = true;
|
|
354
|
+
this.isFilterable = false;
|
|
355
|
+
this.sortDirection = 'asc';
|
|
356
|
+
this.defaultSortDirection = false;
|
|
357
|
+
this.editor = false;
|
|
358
|
+
this.filter = false;
|
|
359
|
+
this.process(this.settings);
|
|
360
|
+
}
|
|
361
|
+
getCompareFunction() {
|
|
362
|
+
return this.compareFunction;
|
|
363
|
+
}
|
|
364
|
+
getValuePrepareFunction() {
|
|
365
|
+
return this.valuePrepareFunction;
|
|
366
|
+
}
|
|
367
|
+
getFilterFunction() {
|
|
368
|
+
return this.filterFunction;
|
|
369
|
+
}
|
|
370
|
+
getConfig() {
|
|
371
|
+
if (this.editor && (this.editor.type === 'checkbox' || this.editor.type === 'custom' || this.editor.type === 'list')) {
|
|
372
|
+
return this.editor?.config;
|
|
373
|
+
}
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
getFilterType() {
|
|
377
|
+
return this.filter && this.filter.type;
|
|
378
|
+
}
|
|
379
|
+
getFilterConfig() {
|
|
380
|
+
if (this.filter && (this.filter.type === 'checkbox' || this.filter.type === 'custom' || this.filter.type === 'list')) {
|
|
381
|
+
return this.filter?.config;
|
|
382
|
+
}
|
|
383
|
+
return false;
|
|
384
|
+
}
|
|
385
|
+
process(settings) {
|
|
386
|
+
this.title = settings.title;
|
|
387
|
+
this.class = settings.class || '';
|
|
388
|
+
this.width = settings.width || '';
|
|
389
|
+
this.hide = !!settings.hide;
|
|
390
|
+
this.type = settings.type;
|
|
391
|
+
if (settings?.editor) {
|
|
392
|
+
this.editor = settings.editor;
|
|
393
|
+
}
|
|
394
|
+
if (settings?.filter) {
|
|
395
|
+
this.filter = settings.filter;
|
|
396
|
+
}
|
|
397
|
+
if (settings.type === 'custom' && settings.renderComponent) {
|
|
398
|
+
this.renderComponent = settings.renderComponent;
|
|
399
|
+
}
|
|
400
|
+
this.isFilterable = typeof settings.filter === 'undefined' ? true : !!settings['filter'];
|
|
401
|
+
this.defaultSortDirection = settings?.sortDirection || false;
|
|
402
|
+
this.isSortable = typeof settings.sort === 'undefined' ? true : settings.sort;
|
|
403
|
+
this.isEditable = typeof settings.editable === 'undefined' ? true : settings.editable;
|
|
404
|
+
this.isAddable = typeof settings.addable === 'undefined' ? true : settings.addable;
|
|
405
|
+
this.sortDirection = this.prepareSortDirection();
|
|
406
|
+
this.compareFunction = settings.compareFunction;
|
|
407
|
+
this.valuePrepareFunction = settings.valuePrepareFunction;
|
|
408
|
+
this.filterFunction = settings.filterFunction;
|
|
409
|
+
}
|
|
410
|
+
prepareSortDirection() {
|
|
411
|
+
return this.defaultSortDirection === 'desc' ? 'desc' : 'asc';
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
417
415
|
class Row {
|
|
418
416
|
constructor(index, data, _dataSet) {
|
|
419
417
|
this.index = index;
|
|
@@ -566,27 +564,8 @@ class DataSource {
|
|
|
566
564
|
}
|
|
567
565
|
}
|
|
568
566
|
|
|
569
|
-
function
|
|
570
|
-
|
|
571
|
-
return -1 * direction;
|
|
572
|
-
}
|
|
573
|
-
if (a > b) {
|
|
574
|
-
return direction;
|
|
575
|
-
}
|
|
576
|
-
return 0;
|
|
577
|
-
}
|
|
578
|
-
class LocalSorter {
|
|
579
|
-
static sort(data, field, direction, customCompare) {
|
|
580
|
-
const dir = (direction === 'asc') ? 1 : -1;
|
|
581
|
-
const compare = customCompare ? customCompare : compareValues;
|
|
582
|
-
return data.sort((a, b) => {
|
|
583
|
-
return compare.call(null, dir, a[field], b[field]);
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
function filterValues(value, search) {
|
|
589
|
-
return value.toString().toLowerCase().includes(search.toString().toLowerCase());
|
|
567
|
+
function filterValues(value, search) {
|
|
568
|
+
return value.toString().toLowerCase().includes(search.toString().toLowerCase());
|
|
590
569
|
}
|
|
591
570
|
class LocalFilter {
|
|
592
571
|
static filter(data, field, search, customFilter) {
|
|
@@ -604,6 +583,25 @@ class LocalPager {
|
|
|
604
583
|
}
|
|
605
584
|
}
|
|
606
585
|
|
|
586
|
+
function compareValues(direction, a, b) {
|
|
587
|
+
if (a < b) {
|
|
588
|
+
return -1 * direction;
|
|
589
|
+
}
|
|
590
|
+
if (a > b) {
|
|
591
|
+
return direction;
|
|
592
|
+
}
|
|
593
|
+
return 0;
|
|
594
|
+
}
|
|
595
|
+
class LocalSorter {
|
|
596
|
+
static sort(data, field, direction, customCompare) {
|
|
597
|
+
const dir = (direction === 'asc') ? 1 : -1;
|
|
598
|
+
const compare = customCompare ? customCompare : compareValues;
|
|
599
|
+
return data.sort((a, b) => {
|
|
600
|
+
return compare.call(null, dir, a[field], b[field]);
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
607
605
|
class LocalDataSource extends DataSource {
|
|
608
606
|
constructor(data = []) {
|
|
609
607
|
super();
|
|
@@ -664,7 +662,7 @@ class LocalDataSource extends DataSource {
|
|
|
664
662
|
return Promise.resolve(this.prepareData(data));
|
|
665
663
|
}
|
|
666
664
|
getFilteredAndSorted() {
|
|
667
|
-
|
|
665
|
+
const data = this.data.slice(0);
|
|
668
666
|
this.prepareData(data);
|
|
669
667
|
return Promise.resolve(this.filteredAndSorted);
|
|
670
668
|
}
|
|
@@ -1160,183 +1158,774 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1160
1158
|
type: Input
|
|
1161
1159
|
}] } });
|
|
1162
1160
|
|
|
1163
|
-
class
|
|
1164
|
-
constructor(
|
|
1165
|
-
this.
|
|
1166
|
-
this.
|
|
1167
|
-
this.columns = [];
|
|
1168
|
-
this.rows = [];
|
|
1169
|
-
this.selectedRows = new Set();
|
|
1170
|
-
this.createColumns(columnSettings);
|
|
1171
|
-
this.setData(data);
|
|
1172
|
-
this.createNewRow();
|
|
1173
|
-
}
|
|
1174
|
-
setData(data) {
|
|
1175
|
-
this.data = data;
|
|
1176
|
-
this.createRows();
|
|
1177
|
-
}
|
|
1178
|
-
getColumns() {
|
|
1179
|
-
return this.columns;
|
|
1180
|
-
}
|
|
1181
|
-
getRows() {
|
|
1182
|
-
return this.rows;
|
|
1183
|
-
}
|
|
1184
|
-
getFirstRow() {
|
|
1185
|
-
return this.rows[0];
|
|
1161
|
+
class EditCellDefaultComponent {
|
|
1162
|
+
constructor() {
|
|
1163
|
+
this.cell = input.required();
|
|
1164
|
+
this.inputClass = input('');
|
|
1186
1165
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1166
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: EditCellDefaultComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1167
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: EditCellDefaultComponent, isStandalone: true, selector: "ng-component", inputs: { cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: true, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true }); }
|
|
1168
|
+
}
|
|
1169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: EditCellDefaultComponent, decorators: [{
|
|
1170
|
+
type: Component,
|
|
1171
|
+
args: [{ template: '' }]
|
|
1172
|
+
}] });
|
|
1173
|
+
|
|
1174
|
+
class CustomEditComponent extends EditCellDefaultComponent {
|
|
1175
|
+
ngOnChanges(changes) {
|
|
1176
|
+
const editor = this.cell().getColumn().editor;
|
|
1177
|
+
if (this.customComponent) {
|
|
1178
|
+
if (this.customComponent?.instance && 'ngOnChanges' in this.customComponent.instance) {
|
|
1179
|
+
const onChanges = this.customComponent.instance.ngOnChanges;
|
|
1180
|
+
onChanges(changes);
|
|
1181
|
+
}
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
if (this.cell() &&
|
|
1185
|
+
!this.customComponent &&
|
|
1186
|
+
editor &&
|
|
1187
|
+
editor.type == "custom") {
|
|
1188
|
+
this.customComponent = this.dynamicTarget?.createComponent(editor.component);
|
|
1189
|
+
this.customComponent?.setInput('cell', this.cell());
|
|
1190
|
+
this.customComponent?.setInput('inputClass', this.inputClass());
|
|
1191
|
+
}
|
|
1189
1192
|
}
|
|
1190
|
-
|
|
1191
|
-
|
|
1193
|
+
ngOnDestroy() {
|
|
1194
|
+
if (this.customComponent) {
|
|
1195
|
+
this.customComponent.destroy();
|
|
1196
|
+
}
|
|
1192
1197
|
}
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1198
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CustomEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1199
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: CustomEditComponent, isStandalone: true, selector: "table-cell-custom-editor", viewQueries: [{ propertyName: "dynamicTarget", first: true, predicate: ["dynamicTarget"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: ` <ng-template #dynamicTarget></ng-template> `, isInline: true }); }
|
|
1200
|
+
}
|
|
1201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CustomEditComponent, decorators: [{
|
|
1202
|
+
type: Component,
|
|
1203
|
+
args: [{
|
|
1204
|
+
selector: "table-cell-custom-editor",
|
|
1205
|
+
template: ` <ng-template #dynamicTarget></ng-template> `,
|
|
1206
|
+
standalone: true,
|
|
1207
|
+
}]
|
|
1208
|
+
}], propDecorators: { dynamicTarget: [{
|
|
1209
|
+
type: ViewChild,
|
|
1210
|
+
args: ["dynamicTarget", { read: ViewContainerRef, static: true }]
|
|
1211
|
+
}] } });
|
|
1212
|
+
|
|
1213
|
+
class CheckboxEditorComponent extends DefaultEditor {
|
|
1214
|
+
constructor() {
|
|
1215
|
+
super();
|
|
1216
|
+
this.trueVal = computed(() => {
|
|
1217
|
+
return this.cell().getColumn().getConfig()?.true || true;
|
|
1197
1218
|
});
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
this.rows.forEach((row) => {
|
|
1201
|
-
row.isSelected = false;
|
|
1219
|
+
this.falseVal = computed(() => {
|
|
1220
|
+
return this.cell().getColumn().getConfig()?.false || false;
|
|
1202
1221
|
});
|
|
1203
|
-
// we need to clear selectedRow field because no one row selected
|
|
1204
|
-
this.selectedRows.clear();
|
|
1205
|
-
}
|
|
1206
|
-
selectRow(row, state) {
|
|
1207
|
-
row.isSelected = state;
|
|
1208
|
-
this.storeSelectedRow(row);
|
|
1209
|
-
}
|
|
1210
|
-
multipleSelectRow(row) {
|
|
1211
|
-
row.isSelected = !row.isSelected;
|
|
1212
|
-
this.storeSelectedRow(row);
|
|
1213
|
-
return row;
|
|
1214
1222
|
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1223
|
+
onChange(event) {
|
|
1224
|
+
this.cell().newValue = event.target.checked ? this.trueVal() : this.falseVal();
|
|
1217
1225
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1226
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CheckboxEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1227
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: CheckboxEditorComponent, isStandalone: true, selector: "checkbox-editor", usesInheritance: true, ngImport: i0, template: `
|
|
1228
|
+
<input
|
|
1229
|
+
[class]="inputClass()"
|
|
1230
|
+
type="checkbox"
|
|
1231
|
+
class="form-control"
|
|
1232
|
+
[name]="cell().getId()"
|
|
1233
|
+
[disabled]="!cell().isEditable()"
|
|
1234
|
+
(change)="onChange($event)"
|
|
1235
|
+
[checked]="
|
|
1236
|
+
cell().getValue() === trueVal()
|
|
1237
|
+
"
|
|
1238
|
+
/>
|
|
1239
|
+
`, isInline: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"] }); }
|
|
1240
|
+
}
|
|
1241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CheckboxEditorComponent, decorators: [{
|
|
1242
|
+
type: Component,
|
|
1243
|
+
args: [{ selector: "checkbox-editor", template: `
|
|
1244
|
+
<input
|
|
1245
|
+
[class]="inputClass()"
|
|
1246
|
+
type="checkbox"
|
|
1247
|
+
class="form-control"
|
|
1248
|
+
[name]="cell().getId()"
|
|
1249
|
+
[disabled]="!cell().isEditable()"
|
|
1250
|
+
(change)="onChange($event)"
|
|
1251
|
+
[checked]="
|
|
1252
|
+
cell().getValue() === trueVal()
|
|
1253
|
+
"
|
|
1254
|
+
/>
|
|
1255
|
+
`, standalone: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"] }]
|
|
1256
|
+
}], ctorParameters: () => [] });
|
|
1257
|
+
|
|
1258
|
+
class InputEditorComponent extends DefaultEditor {
|
|
1259
|
+
constructor() {
|
|
1260
|
+
super();
|
|
1221
1261
|
}
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1262
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: InputEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1263
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: InputEditorComponent, isStandalone: true, selector: "input-editor", usesInheritance: true, ngImport: i0, template: `
|
|
1264
|
+
<input
|
|
1265
|
+
[class]="inputClass()"
|
|
1266
|
+
class="form-control"
|
|
1267
|
+
[(ngModel)]="cell().newValue"
|
|
1268
|
+
[name]="cell().getId()"
|
|
1269
|
+
[placeholder]="cell().getTitle()"
|
|
1270
|
+
[disabled]="!cell().isEditable()"
|
|
1271
|
+
/>
|
|
1272
|
+
`, isInline: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
1273
|
+
}
|
|
1274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: InputEditorComponent, decorators: [{
|
|
1275
|
+
type: Component,
|
|
1276
|
+
args: [{ selector: "input-editor", template: `
|
|
1277
|
+
<input
|
|
1278
|
+
[class]="inputClass()"
|
|
1279
|
+
class="form-control"
|
|
1280
|
+
[(ngModel)]="cell().newValue"
|
|
1281
|
+
[name]="cell().getId()"
|
|
1282
|
+
[placeholder]="cell().getTitle()"
|
|
1283
|
+
[disabled]="!cell().isEditable()"
|
|
1284
|
+
/>
|
|
1285
|
+
`, standalone: true, imports: [FormsModule], styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"] }]
|
|
1286
|
+
}], ctorParameters: () => [] });
|
|
1287
|
+
|
|
1288
|
+
class SelectEditorComponent extends DefaultEditor {
|
|
1289
|
+
constructor() {
|
|
1290
|
+
super();
|
|
1231
1291
|
}
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1292
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SelectEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1293
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: SelectEditorComponent, isStandalone: true, selector: "select-editor", usesInheritance: true, ngImport: i0, template: `
|
|
1294
|
+
<select
|
|
1295
|
+
[class]="inputClass()"
|
|
1296
|
+
class="form-control"
|
|
1297
|
+
[(ngModel)]="cell().newValue"
|
|
1298
|
+
[name]="cell().getId()"
|
|
1299
|
+
[disabled]="!cell().isEditable()"
|
|
1300
|
+
>
|
|
1301
|
+
@for (option of cell().getColumn().getConfig()?.list; track option.value) {
|
|
1302
|
+
<option
|
|
1303
|
+
[value]="option.value"
|
|
1304
|
+
[selected]="option.value === cell().getValue()"
|
|
1305
|
+
>
|
|
1306
|
+
{{ option.title }}
|
|
1307
|
+
</option>
|
|
1308
|
+
}
|
|
1309
|
+
</select>
|
|
1310
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
1311
|
+
}
|
|
1312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SelectEditorComponent, decorators: [{
|
|
1313
|
+
type: Component,
|
|
1314
|
+
args: [{
|
|
1315
|
+
selector: "select-editor",
|
|
1316
|
+
template: `
|
|
1317
|
+
<select
|
|
1318
|
+
[class]="inputClass()"
|
|
1319
|
+
class="form-control"
|
|
1320
|
+
[(ngModel)]="cell().newValue"
|
|
1321
|
+
[name]="cell().getId()"
|
|
1322
|
+
[disabled]="!cell().isEditable()"
|
|
1323
|
+
>
|
|
1324
|
+
@for (option of cell().getColumn().getConfig()?.list; track option.value) {
|
|
1325
|
+
<option
|
|
1326
|
+
[value]="option.value"
|
|
1327
|
+
[selected]="option.value === cell().getValue()"
|
|
1328
|
+
>
|
|
1329
|
+
{{ option.title }}
|
|
1330
|
+
</option>
|
|
1331
|
+
}
|
|
1332
|
+
</select>
|
|
1333
|
+
`,
|
|
1334
|
+
standalone: true,
|
|
1335
|
+
imports: [FormsModule],
|
|
1336
|
+
}]
|
|
1337
|
+
}], ctorParameters: () => [] });
|
|
1338
|
+
|
|
1339
|
+
class TextareaEditorComponent extends DefaultEditor {
|
|
1340
|
+
constructor() {
|
|
1341
|
+
super();
|
|
1243
1342
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1343
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TextareaEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1344
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: TextareaEditorComponent, isStandalone: true, selector: "textarea-editor", usesInheritance: true, ngImport: i0, template: `
|
|
1345
|
+
<textarea
|
|
1346
|
+
[class]="inputClass()"
|
|
1347
|
+
class="form-control"
|
|
1348
|
+
[(ngModel)]="cell().newValue"
|
|
1349
|
+
[name]="cell().getId()"
|
|
1350
|
+
[disabled]="!cell().isEditable()"
|
|
1351
|
+
[placeholder]="cell().getTitle()"
|
|
1352
|
+
>
|
|
1353
|
+
</textarea>
|
|
1354
|
+
`, isInline: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
1355
|
+
}
|
|
1356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TextareaEditorComponent, decorators: [{
|
|
1357
|
+
type: Component,
|
|
1358
|
+
args: [{ selector: "textarea-editor", template: `
|
|
1359
|
+
<textarea
|
|
1360
|
+
[class]="inputClass()"
|
|
1361
|
+
class="form-control"
|
|
1362
|
+
[(ngModel)]="cell().newValue"
|
|
1363
|
+
[name]="cell().getId()"
|
|
1364
|
+
[disabled]="!cell().isEditable()"
|
|
1365
|
+
[placeholder]="cell().getTitle()"
|
|
1366
|
+
>
|
|
1367
|
+
</textarea>
|
|
1368
|
+
`, standalone: true, imports: [FormsModule], styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"] }]
|
|
1369
|
+
}], ctorParameters: () => [] });
|
|
1370
|
+
|
|
1371
|
+
class DefaultEditComponent extends EditCellDefaultComponent {
|
|
1372
|
+
constructor() {
|
|
1373
|
+
super();
|
|
1246
1374
|
}
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
else {
|
|
1252
|
-
this.selectedRows.delete(row.getData());
|
|
1375
|
+
getEditorType() {
|
|
1376
|
+
const editor = this.cell().getColumn().editor;
|
|
1377
|
+
if (editor) {
|
|
1378
|
+
return editor.type || "text";
|
|
1253
1379
|
}
|
|
1380
|
+
return "text";
|
|
1254
1381
|
}
|
|
1382
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1383
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: DefaultEditComponent, isStandalone: true, selector: "table-cell-default-editor", usesInheritance: true, ngImport: i0, template: "<div role=\"none\" (click)=\"$event.stopPropagation()\">\n @switch (getEditorType()) {\n @case ('list') {\n <select-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </select-editor>\n }\n @case ('textarea') {\n <textarea-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </textarea-editor>\n }\n @case ('checkbox') {\n <checkbox-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </checkbox-editor>\n }\n @default {\n <input-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </input-editor>\n }\n}\n</div>", dependencies: [{ kind: "component", type: SelectEditorComponent, selector: "select-editor" }, { kind: "component", type: TextareaEditorComponent, selector: "textarea-editor" }, { kind: "component", type: CheckboxEditorComponent, selector: "checkbox-editor" }, { kind: "component", type: InputEditorComponent, selector: "input-editor" }] }); }
|
|
1255
1384
|
}
|
|
1385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultEditComponent, decorators: [{
|
|
1386
|
+
type: Component,
|
|
1387
|
+
args: [{ selector: "table-cell-default-editor", imports: [
|
|
1388
|
+
SelectEditorComponent,
|
|
1389
|
+
TextareaEditorComponent,
|
|
1390
|
+
CheckboxEditorComponent,
|
|
1391
|
+
InputEditorComponent,
|
|
1392
|
+
], standalone: true, template: "<div role=\"none\" (click)=\"$event.stopPropagation()\">\n @switch (getEditorType()) {\n @case ('list') {\n <select-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </select-editor>\n }\n @case ('textarea') {\n <textarea-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </textarea-editor>\n }\n @case ('checkbox') {\n <checkbox-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </checkbox-editor>\n }\n @default {\n <input-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </input-editor>\n }\n}\n</div>" }]
|
|
1393
|
+
}], ctorParameters: () => [] });
|
|
1256
1394
|
|
|
1257
|
-
class
|
|
1258
|
-
constructor(
|
|
1259
|
-
this.
|
|
1260
|
-
this.
|
|
1261
|
-
this.onDeselectRowSource = new Subject();
|
|
1262
|
-
this.currentColumnsSortState = [];
|
|
1263
|
-
this.setSettings(settings);
|
|
1264
|
-
this.setSource(source);
|
|
1265
|
-
}
|
|
1266
|
-
setColumnsSortedEmitter(emitter) {
|
|
1267
|
-
this.columnsSortedEmitter = emitter;
|
|
1395
|
+
class EditCellComponent {
|
|
1396
|
+
constructor() {
|
|
1397
|
+
this.cell = input.required();
|
|
1398
|
+
this.inputClass = input("");
|
|
1268
1399
|
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
if (this.sourceOnUpdatedSubscription) {
|
|
1274
|
-
this.sourceOnUpdatedSubscription.unsubscribe();
|
|
1400
|
+
getEditorType() {
|
|
1401
|
+
const editor = this.cell().getColumn().editor;
|
|
1402
|
+
if (editor) {
|
|
1403
|
+
return editor.type;
|
|
1275
1404
|
}
|
|
1405
|
+
return "text";
|
|
1276
1406
|
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1407
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: EditCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1408
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: EditCellComponent, isStandalone: true, selector: "table-cell-edit-mode", inputs: { cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: true, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1409
|
+
<div>
|
|
1410
|
+
@switch (getEditorType()) { @case ('custom') {
|
|
1411
|
+
<table-cell-custom-editor
|
|
1412
|
+
[cell]="cell()"
|
|
1413
|
+
[inputClass]="inputClass()"
|
|
1414
|
+
>
|
|
1415
|
+
</table-cell-custom-editor>
|
|
1416
|
+
} @default {
|
|
1417
|
+
<table-cell-default-editor
|
|
1418
|
+
[cell]="cell()"
|
|
1419
|
+
[inputClass]="inputClass()"
|
|
1420
|
+
>
|
|
1421
|
+
</table-cell-default-editor>
|
|
1422
|
+
} }
|
|
1423
|
+
</div>
|
|
1424
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CustomEditComponent, selector: "table-cell-custom-editor" }, { kind: "component", type: DefaultEditComponent, selector: "table-cell-default-editor" }] }); }
|
|
1425
|
+
}
|
|
1426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: EditCellComponent, decorators: [{
|
|
1427
|
+
type: Component,
|
|
1428
|
+
args: [{
|
|
1429
|
+
selector: "table-cell-edit-mode",
|
|
1430
|
+
template: `
|
|
1431
|
+
<div>
|
|
1432
|
+
@switch (getEditorType()) { @case ('custom') {
|
|
1433
|
+
<table-cell-custom-editor
|
|
1434
|
+
[cell]="cell()"
|
|
1435
|
+
[inputClass]="inputClass()"
|
|
1436
|
+
>
|
|
1437
|
+
</table-cell-custom-editor>
|
|
1438
|
+
} @default {
|
|
1439
|
+
<table-cell-default-editor
|
|
1440
|
+
[cell]="cell()"
|
|
1441
|
+
[inputClass]="inputClass()"
|
|
1442
|
+
>
|
|
1443
|
+
</table-cell-default-editor>
|
|
1444
|
+
} }
|
|
1445
|
+
</div>
|
|
1446
|
+
`,
|
|
1447
|
+
standalone: true,
|
|
1448
|
+
imports: [CustomEditComponent, DefaultEditComponent],
|
|
1449
|
+
}]
|
|
1450
|
+
}] });
|
|
1451
|
+
|
|
1452
|
+
class CustomViewComponent {
|
|
1453
|
+
constructor() {
|
|
1454
|
+
this.cell = input.required();
|
|
1291
1455
|
}
|
|
1292
|
-
|
|
1293
|
-
|
|
1456
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CustomViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1457
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: CustomViewComponent, isStandalone: true, selector: "custom-view-component", inputs: { cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<ng-template
|
|
1458
|
+
*ngComponentOutlet="
|
|
1459
|
+
cell().getColumn().renderComponent;
|
|
1460
|
+
inputs: { rowData: cell().getRow().getData(), value: cell().getValue() }
|
|
1461
|
+
"
|
|
1462
|
+
></ng-template>`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }] }); }
|
|
1463
|
+
}
|
|
1464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CustomViewComponent, decorators: [{
|
|
1465
|
+
type: Component,
|
|
1466
|
+
args: [{
|
|
1467
|
+
selector: "custom-view-component",
|
|
1468
|
+
template: `<ng-template
|
|
1469
|
+
*ngComponentOutlet="
|
|
1470
|
+
cell().getColumn().renderComponent;
|
|
1471
|
+
inputs: { rowData: cell().getRow().getData(), value: cell().getValue() }
|
|
1472
|
+
"
|
|
1473
|
+
></ng-template>`,
|
|
1474
|
+
imports: [NgComponentOutlet],
|
|
1475
|
+
standalone: true,
|
|
1476
|
+
}]
|
|
1477
|
+
}] });
|
|
1478
|
+
|
|
1479
|
+
class ViewCellComponent {
|
|
1480
|
+
constructor() {
|
|
1481
|
+
this.cell = input.required();
|
|
1294
1482
|
}
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1483
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ViewCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1484
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: ViewCellComponent, isStandalone: true, selector: "table-cell-view-mode", inputs: { cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1485
|
+
<div>
|
|
1486
|
+
@switch (cell().getColumn().type) { @case ('custom') {
|
|
1487
|
+
<custom-view-component [cell]="cell()"></custom-view-component>
|
|
1488
|
+
} @case ('html') {
|
|
1489
|
+
<div [innerHTML]="cell().getValue()"></div>
|
|
1490
|
+
} @default {
|
|
1491
|
+
<div>{{ cell().getValue() }}</div>
|
|
1492
|
+
} }
|
|
1493
|
+
</div>
|
|
1494
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CustomViewComponent, selector: "custom-view-component", inputs: ["cell"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1495
|
+
}
|
|
1496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ViewCellComponent, decorators: [{
|
|
1497
|
+
type: Component,
|
|
1498
|
+
args: [{
|
|
1499
|
+
selector: "table-cell-view-mode",
|
|
1500
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1501
|
+
template: `
|
|
1502
|
+
<div>
|
|
1503
|
+
@switch (cell().getColumn().type) { @case ('custom') {
|
|
1504
|
+
<custom-view-component [cell]="cell()"></custom-view-component>
|
|
1505
|
+
} @case ('html') {
|
|
1506
|
+
<div [innerHTML]="cell().getValue()"></div>
|
|
1507
|
+
} @default {
|
|
1508
|
+
<div>{{ cell().getValue() }}</div>
|
|
1509
|
+
} }
|
|
1510
|
+
</div>
|
|
1511
|
+
`,
|
|
1512
|
+
standalone: true,
|
|
1513
|
+
imports: [CustomViewComponent],
|
|
1514
|
+
}]
|
|
1515
|
+
}] });
|
|
1516
|
+
|
|
1517
|
+
class CellComponent {
|
|
1518
|
+
constructor() {
|
|
1519
|
+
this.cell = input.required();
|
|
1520
|
+
this.inputClass = input('');
|
|
1521
|
+
this.isInEditing = input(false);
|
|
1300
1522
|
}
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1523
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1524
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CellComponent, isStandalone: true, selector: "ng2-smart-table-cell", inputs: { cell: { classPropertyName: "cell", publicName: "cell", isSignal: true, isRequired: true, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, isInEditing: { classPropertyName: "isInEditing", publicName: "isInEditing", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1525
|
+
@if (!isInEditing()) {
|
|
1526
|
+
<table-cell-view-mode [cell]="cell()"></table-cell-view-mode>
|
|
1527
|
+
} @else {
|
|
1528
|
+
<table-cell-edit-mode
|
|
1529
|
+
[cell]="cell()"
|
|
1530
|
+
[inputClass]="inputClass()"
|
|
1531
|
+
>
|
|
1532
|
+
</table-cell-edit-mode>
|
|
1307
1533
|
}
|
|
1308
|
-
|
|
1309
|
-
|
|
1534
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ViewCellComponent, selector: "table-cell-view-mode", inputs: ["cell"] }, { kind: "component", type: EditCellComponent, selector: "table-cell-edit-mode", inputs: ["cell", "inputClass"] }] }); }
|
|
1535
|
+
}
|
|
1536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CellComponent, decorators: [{
|
|
1537
|
+
type: Component,
|
|
1538
|
+
args: [{
|
|
1539
|
+
selector: "ng2-smart-table-cell",
|
|
1540
|
+
template: `
|
|
1541
|
+
@if (!isInEditing()) {
|
|
1542
|
+
<table-cell-view-mode [cell]="cell()"></table-cell-view-mode>
|
|
1543
|
+
} @else {
|
|
1544
|
+
<table-cell-edit-mode
|
|
1545
|
+
[cell]="cell()"
|
|
1546
|
+
[inputClass]="inputClass()"
|
|
1547
|
+
>
|
|
1548
|
+
</table-cell-edit-mode>
|
|
1310
1549
|
}
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1550
|
+
`,
|
|
1551
|
+
standalone: true,
|
|
1552
|
+
imports: [ViewCellComponent, EditCellComponent],
|
|
1553
|
+
}]
|
|
1554
|
+
}] });
|
|
1555
|
+
|
|
1556
|
+
class TbodyCreateCancelComponent {
|
|
1557
|
+
constructor() {
|
|
1558
|
+
this.grid = input.required();
|
|
1559
|
+
this.row = input.required();
|
|
1560
|
+
this.editConfirm = input.required();
|
|
1561
|
+
this.editCancel = input.required();
|
|
1562
|
+
this.cancelButtonContent = computed(() => {
|
|
1563
|
+
const edit = this.grid().settings().edit;
|
|
1564
|
+
return edit ? edit.cancelButtonContent || "Cancel" : "Cancel";
|
|
1565
|
+
});
|
|
1566
|
+
this.saveButtonContent = computed(() => {
|
|
1567
|
+
const edit = this.grid().settings().edit;
|
|
1568
|
+
return edit ? edit.saveButtonContent || "Update" : "Update";
|
|
1324
1569
|
});
|
|
1325
1570
|
}
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
return this.dataSet.getColumns();
|
|
1331
|
-
}
|
|
1332
|
-
getRows() {
|
|
1333
|
-
return this.dataSet.getRows();
|
|
1571
|
+
onSave(event) {
|
|
1572
|
+
event.preventDefault();
|
|
1573
|
+
event.stopPropagation();
|
|
1574
|
+
this.grid().save(this.row(), this.editConfirm());
|
|
1334
1575
|
}
|
|
1335
|
-
|
|
1336
|
-
|
|
1576
|
+
onCancelEdit(event) {
|
|
1577
|
+
event.preventDefault();
|
|
1578
|
+
event.stopPropagation();
|
|
1579
|
+
this.editCancel().emit(true);
|
|
1580
|
+
this.row().isInEditing = false;
|
|
1337
1581
|
}
|
|
1338
|
-
|
|
1339
|
-
|
|
1582
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyCreateCancelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1583
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TbodyCreateCancelComponent, isStandalone: true, selector: "ng2-st-tbody-create-cancel", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null }, editConfirm: { classPropertyName: "editConfirm", publicName: "editConfirm", isSignal: true, isRequired: true, transformFunction: null }, editCancel: { classPropertyName: "editCancel", publicName: "editCancel", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
1584
|
+
@if (!row().pending) {
|
|
1585
|
+
<a
|
|
1586
|
+
href="#"
|
|
1587
|
+
[id]="'row-' + row().index + '_editing-confirm-button'"
|
|
1588
|
+
class="ng2-smart-action ng2-smart-action-edit-save"
|
|
1589
|
+
[innerHTML]="saveButtonContent()"
|
|
1590
|
+
(click)="onSave($event)"
|
|
1591
|
+
></a>
|
|
1592
|
+
<a
|
|
1593
|
+
href="#"
|
|
1594
|
+
[id]="'row-' + row().index + '_editing-cancel-button'"
|
|
1595
|
+
class="ng2-smart-action ng2-smart-action-edit-cancel"
|
|
1596
|
+
[innerHTML]="cancelButtonContent()"
|
|
1597
|
+
(click)="onCancelEdit($event)"
|
|
1598
|
+
></a>
|
|
1599
|
+
} @else {
|
|
1600
|
+
<div style="display: flex;">
|
|
1601
|
+
<svg
|
|
1602
|
+
role="none"
|
|
1603
|
+
(click)="$event.stopPropagation()"
|
|
1604
|
+
style="height: 2rem; width: 2rem;"
|
|
1605
|
+
version="1.1"
|
|
1606
|
+
id="L9"
|
|
1607
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1608
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
1609
|
+
x="0px"
|
|
1610
|
+
y="0px"
|
|
1611
|
+
viewBox="0 0 100 100"
|
|
1612
|
+
enable-background="new 0 0 0 0"
|
|
1613
|
+
xml:space="preserve"
|
|
1614
|
+
>
|
|
1615
|
+
<path
|
|
1616
|
+
fill="#e9e9e9"
|
|
1617
|
+
d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
1618
|
+
>
|
|
1619
|
+
<animateTransform
|
|
1620
|
+
attributeName="transform"
|
|
1621
|
+
attributeType="XML"
|
|
1622
|
+
type="rotate"
|
|
1623
|
+
dur="1s"
|
|
1624
|
+
from="0 50 50"
|
|
1625
|
+
to="360 50 50"
|
|
1626
|
+
repeatCount="indefinite"
|
|
1627
|
+
/>
|
|
1628
|
+
</path>
|
|
1629
|
+
</svg>
|
|
1630
|
+
<svg
|
|
1631
|
+
role="none"
|
|
1632
|
+
(click)="$event.stopPropagation()"
|
|
1633
|
+
style="height: 2rem; width: 2rem; "
|
|
1634
|
+
version="1.1"
|
|
1635
|
+
id="L9"
|
|
1636
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1637
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
1638
|
+
x="0px"
|
|
1639
|
+
y="0px"
|
|
1640
|
+
viewBox="0 0 100 100"
|
|
1641
|
+
enable-background="new 0 0 0 0"
|
|
1642
|
+
xml:space="preserve"
|
|
1643
|
+
>
|
|
1644
|
+
<path
|
|
1645
|
+
fill="#e9e9e9"
|
|
1646
|
+
d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
1647
|
+
>
|
|
1648
|
+
<animateTransform
|
|
1649
|
+
attributeName="transform"
|
|
1650
|
+
attributeType="XML"
|
|
1651
|
+
type="rotate"
|
|
1652
|
+
dur="1s"
|
|
1653
|
+
from="0 50 50"
|
|
1654
|
+
to="360 50 50"
|
|
1655
|
+
repeatCount="indefinite"
|
|
1656
|
+
/>
|
|
1657
|
+
</path>
|
|
1658
|
+
</svg>
|
|
1659
|
+
</div>
|
|
1660
|
+
}
|
|
1661
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1662
|
+
}
|
|
1663
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyCreateCancelComponent, decorators: [{
|
|
1664
|
+
type: Component,
|
|
1665
|
+
args: [{
|
|
1666
|
+
selector: "ng2-st-tbody-create-cancel",
|
|
1667
|
+
template: `
|
|
1668
|
+
@if (!row().pending) {
|
|
1669
|
+
<a
|
|
1670
|
+
href="#"
|
|
1671
|
+
[id]="'row-' + row().index + '_editing-confirm-button'"
|
|
1672
|
+
class="ng2-smart-action ng2-smart-action-edit-save"
|
|
1673
|
+
[innerHTML]="saveButtonContent()"
|
|
1674
|
+
(click)="onSave($event)"
|
|
1675
|
+
></a>
|
|
1676
|
+
<a
|
|
1677
|
+
href="#"
|
|
1678
|
+
[id]="'row-' + row().index + '_editing-cancel-button'"
|
|
1679
|
+
class="ng2-smart-action ng2-smart-action-edit-cancel"
|
|
1680
|
+
[innerHTML]="cancelButtonContent()"
|
|
1681
|
+
(click)="onCancelEdit($event)"
|
|
1682
|
+
></a>
|
|
1683
|
+
} @else {
|
|
1684
|
+
<div style="display: flex;">
|
|
1685
|
+
<svg
|
|
1686
|
+
role="none"
|
|
1687
|
+
(click)="$event.stopPropagation()"
|
|
1688
|
+
style="height: 2rem; width: 2rem;"
|
|
1689
|
+
version="1.1"
|
|
1690
|
+
id="L9"
|
|
1691
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1692
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
1693
|
+
x="0px"
|
|
1694
|
+
y="0px"
|
|
1695
|
+
viewBox="0 0 100 100"
|
|
1696
|
+
enable-background="new 0 0 0 0"
|
|
1697
|
+
xml:space="preserve"
|
|
1698
|
+
>
|
|
1699
|
+
<path
|
|
1700
|
+
fill="#e9e9e9"
|
|
1701
|
+
d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
1702
|
+
>
|
|
1703
|
+
<animateTransform
|
|
1704
|
+
attributeName="transform"
|
|
1705
|
+
attributeType="XML"
|
|
1706
|
+
type="rotate"
|
|
1707
|
+
dur="1s"
|
|
1708
|
+
from="0 50 50"
|
|
1709
|
+
to="360 50 50"
|
|
1710
|
+
repeatCount="indefinite"
|
|
1711
|
+
/>
|
|
1712
|
+
</path>
|
|
1713
|
+
</svg>
|
|
1714
|
+
<svg
|
|
1715
|
+
role="none"
|
|
1716
|
+
(click)="$event.stopPropagation()"
|
|
1717
|
+
style="height: 2rem; width: 2rem; "
|
|
1718
|
+
version="1.1"
|
|
1719
|
+
id="L9"
|
|
1720
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1721
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
1722
|
+
x="0px"
|
|
1723
|
+
y="0px"
|
|
1724
|
+
viewBox="0 0 100 100"
|
|
1725
|
+
enable-background="new 0 0 0 0"
|
|
1726
|
+
xml:space="preserve"
|
|
1727
|
+
>
|
|
1728
|
+
<path
|
|
1729
|
+
fill="#e9e9e9"
|
|
1730
|
+
d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
1731
|
+
>
|
|
1732
|
+
<animateTransform
|
|
1733
|
+
attributeName="transform"
|
|
1734
|
+
attributeType="XML"
|
|
1735
|
+
type="rotate"
|
|
1736
|
+
dur="1s"
|
|
1737
|
+
from="0 50 50"
|
|
1738
|
+
to="360 50 50"
|
|
1739
|
+
repeatCount="indefinite"
|
|
1740
|
+
/>
|
|
1741
|
+
</path>
|
|
1742
|
+
</svg>
|
|
1743
|
+
</div>
|
|
1744
|
+
}
|
|
1745
|
+
`,
|
|
1746
|
+
standalone: true,
|
|
1747
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1748
|
+
}]
|
|
1749
|
+
}] });
|
|
1750
|
+
|
|
1751
|
+
class DataSet {
|
|
1752
|
+
constructor(data = [], columnSettings) {
|
|
1753
|
+
this.columnSettings = columnSettings;
|
|
1754
|
+
this.data = [];
|
|
1755
|
+
this.columns = [];
|
|
1756
|
+
this.rows = [];
|
|
1757
|
+
this.selectedRows = new Set();
|
|
1758
|
+
this.createColumns(columnSettings);
|
|
1759
|
+
this.setData(data);
|
|
1760
|
+
this.createNewRow();
|
|
1761
|
+
}
|
|
1762
|
+
setData(data) {
|
|
1763
|
+
this.data = data;
|
|
1764
|
+
this.createRows();
|
|
1765
|
+
}
|
|
1766
|
+
getColumns() {
|
|
1767
|
+
return this.columns;
|
|
1768
|
+
}
|
|
1769
|
+
getRows() {
|
|
1770
|
+
return this.rows;
|
|
1771
|
+
}
|
|
1772
|
+
getFirstRow() {
|
|
1773
|
+
return this.rows[0];
|
|
1774
|
+
}
|
|
1775
|
+
getLastRow() {
|
|
1776
|
+
return this.rows[this.rows.length - 1];
|
|
1777
|
+
}
|
|
1778
|
+
findRowByData(data) {
|
|
1779
|
+
return this.rows.find((row) => row.getData() === data);
|
|
1780
|
+
}
|
|
1781
|
+
setSelectAll(state) {
|
|
1782
|
+
this.rows.forEach((row) => {
|
|
1783
|
+
row.isSelected = state;
|
|
1784
|
+
this.storeSelectedRow(row);
|
|
1785
|
+
});
|
|
1786
|
+
}
|
|
1787
|
+
deselectAll() {
|
|
1788
|
+
this.rows.forEach((row) => {
|
|
1789
|
+
row.isSelected = false;
|
|
1790
|
+
});
|
|
1791
|
+
// we need to clear selectedRow field because no one row selected
|
|
1792
|
+
this.selectedRows.clear();
|
|
1793
|
+
}
|
|
1794
|
+
selectRow(row, state) {
|
|
1795
|
+
row.isSelected = state;
|
|
1796
|
+
this.storeSelectedRow(row);
|
|
1797
|
+
}
|
|
1798
|
+
multipleSelectRow(row) {
|
|
1799
|
+
row.isSelected = !row.isSelected;
|
|
1800
|
+
this.storeSelectedRow(row);
|
|
1801
|
+
return row;
|
|
1802
|
+
}
|
|
1803
|
+
getSelectedRowsData() {
|
|
1804
|
+
return [...this.selectedRows];
|
|
1805
|
+
}
|
|
1806
|
+
createNewRow() {
|
|
1807
|
+
this.newRow = new Row(-1, {}, this);
|
|
1808
|
+
this.newRow.isInEditing = true;
|
|
1809
|
+
}
|
|
1810
|
+
/**
|
|
1811
|
+
* Create columns by mapping from the settings
|
|
1812
|
+
* @param settings
|
|
1813
|
+
* @private
|
|
1814
|
+
*/
|
|
1815
|
+
createColumns(settings) {
|
|
1816
|
+
settings.forEach((columnSettings) => {
|
|
1817
|
+
this.columns.push(new Column(columnSettings.key, columnSettings, this));
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
* Create rows based on current data prepared in data source
|
|
1822
|
+
* @private
|
|
1823
|
+
*/
|
|
1824
|
+
createRows() {
|
|
1825
|
+
this.rows = [];
|
|
1826
|
+
this.data.forEach((el, index) => {
|
|
1827
|
+
const row = new Row(index, el, this);
|
|
1828
|
+
row.isSelected = this.selectedRows.has(row.getData());
|
|
1829
|
+
this.rows.push(row);
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
get isAllSelected() {
|
|
1833
|
+
return this.rows.every((row) => row.isSelected);
|
|
1834
|
+
}
|
|
1835
|
+
storeSelectedRow(row) {
|
|
1836
|
+
if (row.isSelected) {
|
|
1837
|
+
this.selectedRows.add(row.getData());
|
|
1838
|
+
}
|
|
1839
|
+
else {
|
|
1840
|
+
this.selectedRows.delete(row.getData());
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
class Grid {
|
|
1846
|
+
constructor(source, settings) {
|
|
1847
|
+
this.createFormShown = false;
|
|
1848
|
+
this.onSelectRowSource = new Subject();
|
|
1849
|
+
this.onDeselectRowSource = new Subject();
|
|
1850
|
+
this.currentColumnsSortState = [];
|
|
1851
|
+
this.settings = signal({});
|
|
1852
|
+
this.isMultiSelectVisible = computed(() => {
|
|
1853
|
+
return this.settings().selectMode === "multi";
|
|
1854
|
+
});
|
|
1855
|
+
this.isActionsVisible = computed(() => {
|
|
1856
|
+
const actions = this.settings().actions;
|
|
1857
|
+
if (!actions)
|
|
1858
|
+
return false;
|
|
1859
|
+
return actions.add || actions.edit || actions.delete || !!actions?.custom?.length;
|
|
1860
|
+
});
|
|
1861
|
+
this.actionIsOnLeft = computed(() => {
|
|
1862
|
+
return (this.settings().actionsPosition || 'left') === 'left';
|
|
1863
|
+
});
|
|
1864
|
+
this.actionIsOnRight = computed(() => {
|
|
1865
|
+
return this.settings().actionsPosition === 'right';
|
|
1866
|
+
});
|
|
1867
|
+
this.setSettings(settings);
|
|
1868
|
+
this.setSource(source);
|
|
1869
|
+
}
|
|
1870
|
+
setColumnsSortedEmitter(emitter) {
|
|
1871
|
+
this.columnsSortedEmitter = emitter;
|
|
1872
|
+
}
|
|
1873
|
+
detach() {
|
|
1874
|
+
if (this.sourceOnChangedSubscription) {
|
|
1875
|
+
this.sourceOnChangedSubscription.unsubscribe();
|
|
1876
|
+
}
|
|
1877
|
+
if (this.sourceOnUpdatedSubscription) {
|
|
1878
|
+
this.sourceOnUpdatedSubscription.unsubscribe();
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
getNewRow() {
|
|
1882
|
+
return this.dataSet.newRow;
|
|
1883
|
+
}
|
|
1884
|
+
setSettings(settings) {
|
|
1885
|
+
this.updateSettingsAndDataSet(settings);
|
|
1886
|
+
if (this.getSetting('columnSort', false)) {
|
|
1887
|
+
this.setColumnsSortState(settings.columns);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
updateSettingsAndDataSet(settings) {
|
|
1891
|
+
this.settings.set(settings);
|
|
1892
|
+
this.dataSet = new DataSet([], settings.columns);
|
|
1893
|
+
if (this.source) {
|
|
1894
|
+
this.source.refresh();
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
getDataSet() {
|
|
1898
|
+
return this.dataSet;
|
|
1899
|
+
}
|
|
1900
|
+
setSource(source) {
|
|
1901
|
+
this.source = this.prepareSource(source);
|
|
1902
|
+
this.detach();
|
|
1903
|
+
this.sourceOnChangedSubscription = this.source
|
|
1904
|
+
.onChanged()
|
|
1905
|
+
.subscribe((changes) => this.processDataChange(changes));
|
|
1906
|
+
this.sourceOnUpdatedSubscription = this.source
|
|
1907
|
+
.onUpdated()
|
|
1908
|
+
.subscribe((data) => {
|
|
1909
|
+
const changedRow = this.dataSet.findRowByData(data);
|
|
1910
|
+
if (changedRow) {
|
|
1911
|
+
changedRow.setData(data);
|
|
1912
|
+
}
|
|
1913
|
+
});
|
|
1914
|
+
}
|
|
1915
|
+
getSetting(name, defaultValue) {
|
|
1916
|
+
return getDeepFromObject(this.settings(), name, defaultValue);
|
|
1917
|
+
}
|
|
1918
|
+
getColumns() {
|
|
1919
|
+
return this.dataSet.getColumns();
|
|
1920
|
+
}
|
|
1921
|
+
getRows() {
|
|
1922
|
+
return this.dataSet.getRows();
|
|
1923
|
+
}
|
|
1924
|
+
selectRow(row, state) {
|
|
1925
|
+
this.dataSet.selectRow(row, state);
|
|
1926
|
+
}
|
|
1927
|
+
multipleSelectRow(row) {
|
|
1928
|
+
this.dataSet.multipleSelectRow(row);
|
|
1340
1929
|
}
|
|
1341
1930
|
onSelectRow() {
|
|
1342
1931
|
return this.onSelectRowSource.asObservable();
|
|
@@ -1353,7 +1942,7 @@ class Grid {
|
|
|
1353
1942
|
deferred.promise
|
|
1354
1943
|
.then((newData) => {
|
|
1355
1944
|
row.pending = false;
|
|
1356
|
-
newData = newData
|
|
1945
|
+
newData = newData || row.getNewData();
|
|
1357
1946
|
this.source.prepend(newData).then(() => {
|
|
1358
1947
|
this.createFormShown = false;
|
|
1359
1948
|
this.dataSet.createNewRow();
|
|
@@ -1379,7 +1968,7 @@ class Grid {
|
|
|
1379
1968
|
deferred.promise
|
|
1380
1969
|
.then((newData) => {
|
|
1381
1970
|
row.pending = false;
|
|
1382
|
-
newData = newData
|
|
1971
|
+
newData = newData || row.getNewData();
|
|
1383
1972
|
this.source.update(row.getData(), newData).then(() => {
|
|
1384
1973
|
row.isInEditing = false;
|
|
1385
1974
|
});
|
|
@@ -1387,7 +1976,7 @@ class Grid {
|
|
|
1387
1976
|
.catch((err) => {
|
|
1388
1977
|
row.pending = false;
|
|
1389
1978
|
});
|
|
1390
|
-
if (this.getSetting("edit.confirmSave")) {
|
|
1979
|
+
if (this.getSetting("edit.confirmSave", false)) {
|
|
1391
1980
|
confirmEmitter.emit({
|
|
1392
1981
|
data: row.getData(),
|
|
1393
1982
|
newData: row.getNewData(),
|
|
@@ -1491,8 +2080,8 @@ class Grid {
|
|
|
1491
2080
|
async applyColumnsSortState(state, emitEvent = true) {
|
|
1492
2081
|
this.currentColumnsSortState = this.getMergedColumnStates(state);
|
|
1493
2082
|
this.updateSettingsAndDataSet({
|
|
1494
|
-
...this.settings,
|
|
1495
|
-
columns: await this.getSortedTableColumns(this.currentColumnsSortState, this.settings?.columns),
|
|
2083
|
+
...this.settings(),
|
|
2084
|
+
columns: await this.getSortedTableColumns(this.currentColumnsSortState, this.settings()?.columns),
|
|
1496
2085
|
});
|
|
1497
2086
|
if (this.columnStateStorageKey) {
|
|
1498
2087
|
setLocalStorage(this.columnStateStorageKey, this.currentColumnsSortState);
|
|
@@ -1506,705 +2095,44 @@ class Grid {
|
|
|
1506
2095
|
if (this.columnStateStorageKey) {
|
|
1507
2096
|
const storageState = getLocalStorage(this.columnStateStorageKey);
|
|
1508
2097
|
if (!storageState) {
|
|
1509
|
-
this.currentColumnsSortState = columnsState;
|
|
1510
|
-
setLocalStorage(this.columnStateStorageKey, columnsState);
|
|
1511
|
-
return;
|
|
1512
|
-
}
|
|
1513
|
-
const merged = this.getMergedColumnStates(storageState, columnsState);
|
|
1514
|
-
this.applyColumnsSortState(merged, false);
|
|
1515
|
-
return;
|
|
1516
|
-
}
|
|
1517
|
-
this.applyColumnsSortState(columnsState, false);
|
|
1518
|
-
}
|
|
1519
|
-
getColumnsStateFromSettings(columns) {
|
|
1520
|
-
return (columns || this.settings.columns || []).map((column) => ({
|
|
1521
|
-
key: column.key,
|
|
1522
|
-
title: column.title,
|
|
1523
|
-
hide: !!column.hide,
|
|
1524
|
-
moveDisabled: !!column.moveDisabled,
|
|
1525
|
-
}));
|
|
1526
|
-
}
|
|
1527
|
-
getMergedColumnStates(newState, columnsState) {
|
|
1528
|
-
const columnsSettings = columnsState || this.getColumnsStateFromSettings();
|
|
1529
|
-
// merge new columns state with state from storage
|
|
1530
|
-
const filtered = [];
|
|
1531
|
-
newState.forEach((state) => {
|
|
1532
|
-
const fined = columnsSettings.find((column) => column.title === state.title && column.key === state.key);
|
|
1533
|
-
if (fined) {
|
|
1534
|
-
filtered.push({ ...fined, hide: fined.moveDisabled ? fined.hide : state.hide });
|
|
1535
|
-
}
|
|
1536
|
-
});
|
|
1537
|
-
// find new columns witch not exist in storage state
|
|
1538
|
-
const newColumns = columnsSettings.filter((state) => {
|
|
1539
|
-
return !filtered.some((column) => column.title === state.title && column.key === state.key);
|
|
1540
|
-
});
|
|
1541
|
-
return [...filtered, ...newColumns];
|
|
1542
|
-
}
|
|
1543
|
-
get columnStateStorageKey() {
|
|
1544
|
-
return this.settings.columnSortStorageKey;
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
class EditCellDefault {
|
|
1549
|
-
constructor() {
|
|
1550
|
-
this.inputClass = '';
|
|
1551
|
-
this.edited = output();
|
|
1552
|
-
}
|
|
1553
|
-
onEdited(event) {
|
|
1554
|
-
this.edited.emit(event);
|
|
1555
|
-
return false;
|
|
1556
|
-
}
|
|
1557
|
-
onStopEditing() {
|
|
1558
|
-
this.cell.getRow().isInEditing = false;
|
|
1559
|
-
return false;
|
|
1560
|
-
}
|
|
1561
|
-
onClick(event) {
|
|
1562
|
-
event.stopPropagation();
|
|
1563
|
-
}
|
|
1564
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: EditCellDefault, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1565
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: EditCellDefault, isStandalone: true, selector: "ng-component", inputs: { cell: "cell", inputClass: "inputClass" }, outputs: { edited: "edited" }, ngImport: i0, template: '', isInline: true }); }
|
|
1566
|
-
}
|
|
1567
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: EditCellDefault, decorators: [{
|
|
1568
|
-
type: Component,
|
|
1569
|
-
args: [{ template: '' }]
|
|
1570
|
-
}], propDecorators: { cell: [{
|
|
1571
|
-
type: Input
|
|
1572
|
-
}], inputClass: [{
|
|
1573
|
-
type: Input
|
|
1574
|
-
}] } });
|
|
1575
|
-
|
|
1576
|
-
class CustomEditComponent extends EditCellDefault {
|
|
1577
|
-
ngOnChanges(changes) {
|
|
1578
|
-
const editor = this.cell.getColumn().editor;
|
|
1579
|
-
if (this.customComponent) {
|
|
1580
|
-
if (this.customComponent.instance?.ngOnChanges) {
|
|
1581
|
-
this.customComponent.instance.ngOnChanges(changes);
|
|
1582
|
-
}
|
|
1583
|
-
return;
|
|
1584
|
-
}
|
|
1585
|
-
if (this.cell &&
|
|
1586
|
-
!this.customComponent &&
|
|
1587
|
-
editor &&
|
|
1588
|
-
editor.type == "custom") {
|
|
1589
|
-
this.customComponent = this.dynamicTarget.createComponent(editor.component);
|
|
1590
|
-
// set @Inputs and @Outputs of custom component
|
|
1591
|
-
this.customComponent.instance.cell = this.cell;
|
|
1592
|
-
this.customComponent.instance.inputClass = this.inputClass;
|
|
1593
|
-
this.customComponent.instance.onStopEditing.subscribe(() => this.onStopEditing());
|
|
1594
|
-
this.customComponent.instance.onEdited.subscribe((event) => this.onEdited(event));
|
|
1595
|
-
this.customComponent.instance.onClick.subscribe((event) => this.onClick(event));
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
ngOnDestroy() {
|
|
1599
|
-
if (this.customComponent) {
|
|
1600
|
-
this.customComponent.destroy();
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CustomEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1604
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: CustomEditComponent, isStandalone: true, selector: "table-cell-custom-editor", viewQueries: [{ propertyName: "dynamicTarget", first: true, predicate: ["dynamicTarget"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: ` <ng-template #dynamicTarget></ng-template> `, isInline: true }); }
|
|
1605
|
-
}
|
|
1606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CustomEditComponent, decorators: [{
|
|
1607
|
-
type: Component,
|
|
1608
|
-
args: [{
|
|
1609
|
-
selector: "table-cell-custom-editor",
|
|
1610
|
-
template: ` <ng-template #dynamicTarget></ng-template> `,
|
|
1611
|
-
standalone: true,
|
|
1612
|
-
}]
|
|
1613
|
-
}], propDecorators: { dynamicTarget: [{
|
|
1614
|
-
type: ViewChild,
|
|
1615
|
-
args: ["dynamicTarget", { read: ViewContainerRef, static: true }]
|
|
1616
|
-
}] } });
|
|
1617
|
-
|
|
1618
|
-
class CheckboxEditorComponent extends DefaultEditor {
|
|
1619
|
-
constructor() {
|
|
1620
|
-
super();
|
|
1621
|
-
}
|
|
1622
|
-
onChange(event) {
|
|
1623
|
-
const config = this.cell.getColumn().getConfig();
|
|
1624
|
-
const trueVal = (config && config?.true) || true;
|
|
1625
|
-
const falseVal = (config && config?.false) || false;
|
|
1626
|
-
this.cell.newValue = event.target.checked ? trueVal : falseVal;
|
|
1627
|
-
}
|
|
1628
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CheckboxEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1629
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: CheckboxEditorComponent, isStandalone: true, selector: "checkbox-editor", usesInheritance: true, ngImport: i0, template: `
|
|
1630
|
-
<input
|
|
1631
|
-
[class]="inputClass"
|
|
1632
|
-
type="checkbox"
|
|
1633
|
-
class="form-control"
|
|
1634
|
-
[name]="cell.getId()"
|
|
1635
|
-
[disabled]="!cell.isEditable()"
|
|
1636
|
-
[checked]="
|
|
1637
|
-
cell.getValue() === (cell.getColumn().getConfig()?.true || true)
|
|
1638
|
-
"
|
|
1639
|
-
(click)="onClick.emit($event)"
|
|
1640
|
-
(change)="onChange($event)"
|
|
1641
|
-
/>
|
|
1642
|
-
`, isInline: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"] }); }
|
|
1643
|
-
}
|
|
1644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CheckboxEditorComponent, decorators: [{
|
|
1645
|
-
type: Component,
|
|
1646
|
-
args: [{ selector: "checkbox-editor", template: `
|
|
1647
|
-
<input
|
|
1648
|
-
[class]="inputClass"
|
|
1649
|
-
type="checkbox"
|
|
1650
|
-
class="form-control"
|
|
1651
|
-
[name]="cell.getId()"
|
|
1652
|
-
[disabled]="!cell.isEditable()"
|
|
1653
|
-
[checked]="
|
|
1654
|
-
cell.getValue() === (cell.getColumn().getConfig()?.true || true)
|
|
1655
|
-
"
|
|
1656
|
-
(click)="onClick.emit($event)"
|
|
1657
|
-
(change)="onChange($event)"
|
|
1658
|
-
/>
|
|
1659
|
-
`, standalone: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"] }]
|
|
1660
|
-
}], ctorParameters: () => [] });
|
|
1661
|
-
|
|
1662
|
-
class InputEditorComponent extends DefaultEditor {
|
|
1663
|
-
constructor() {
|
|
1664
|
-
super();
|
|
1665
|
-
}
|
|
1666
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: InputEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1667
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: InputEditorComponent, isStandalone: true, selector: "input-editor", usesInheritance: true, ngImport: i0, template: `
|
|
1668
|
-
<input
|
|
1669
|
-
[class]="inputClass"
|
|
1670
|
-
class="form-control"
|
|
1671
|
-
[(ngModel)]="cell.newValue"
|
|
1672
|
-
[name]="cell.getId()"
|
|
1673
|
-
[placeholder]="cell.getTitle()"
|
|
1674
|
-
[disabled]="!cell.isEditable()"
|
|
1675
|
-
(click)="onClick.emit($event)"
|
|
1676
|
-
(keydown.enter)="onEdited.emit($event)"
|
|
1677
|
-
(keydown.esc)="onStopEditing.emit('')"
|
|
1678
|
-
/>
|
|
1679
|
-
`, isInline: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
1680
|
-
}
|
|
1681
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: InputEditorComponent, decorators: [{
|
|
1682
|
-
type: Component,
|
|
1683
|
-
args: [{ selector: "input-editor", template: `
|
|
1684
|
-
<input
|
|
1685
|
-
[class]="inputClass"
|
|
1686
|
-
class="form-control"
|
|
1687
|
-
[(ngModel)]="cell.newValue"
|
|
1688
|
-
[name]="cell.getId()"
|
|
1689
|
-
[placeholder]="cell.getTitle()"
|
|
1690
|
-
[disabled]="!cell.isEditable()"
|
|
1691
|
-
(click)="onClick.emit($event)"
|
|
1692
|
-
(keydown.enter)="onEdited.emit($event)"
|
|
1693
|
-
(keydown.esc)="onStopEditing.emit('')"
|
|
1694
|
-
/>
|
|
1695
|
-
`, standalone: true, imports: [FormsModule], styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"] }]
|
|
1696
|
-
}], ctorParameters: () => [] });
|
|
1697
|
-
|
|
1698
|
-
class SelectEditorComponent extends DefaultEditor {
|
|
1699
|
-
constructor() {
|
|
1700
|
-
super();
|
|
1701
|
-
}
|
|
1702
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SelectEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1703
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: SelectEditorComponent, isStandalone: true, selector: "select-editor", usesInheritance: true, ngImport: i0, template: `
|
|
1704
|
-
<select
|
|
1705
|
-
[class]="inputClass"
|
|
1706
|
-
class="form-control"
|
|
1707
|
-
[(ngModel)]="cell.newValue"
|
|
1708
|
-
[name]="cell.getId()"
|
|
1709
|
-
[disabled]="!cell.isEditable()"
|
|
1710
|
-
(click)="onClick.emit($event)"
|
|
1711
|
-
(keydown.enter)="onEdited.emit($event)"
|
|
1712
|
-
(keydown.esc)="onStopEditing.emit('')"
|
|
1713
|
-
>
|
|
1714
|
-
@for (option of cell.getColumn().getConfig()?.list; track option.value) {
|
|
1715
|
-
<option
|
|
1716
|
-
[value]="option.value"
|
|
1717
|
-
[selected]="option.value === cell.getValue()"
|
|
1718
|
-
>
|
|
1719
|
-
{{ option.title }}
|
|
1720
|
-
</option>
|
|
1721
|
-
}
|
|
1722
|
-
</select>
|
|
1723
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
1724
|
-
}
|
|
1725
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SelectEditorComponent, decorators: [{
|
|
1726
|
-
type: Component,
|
|
1727
|
-
args: [{
|
|
1728
|
-
selector: "select-editor",
|
|
1729
|
-
template: `
|
|
1730
|
-
<select
|
|
1731
|
-
[class]="inputClass"
|
|
1732
|
-
class="form-control"
|
|
1733
|
-
[(ngModel)]="cell.newValue"
|
|
1734
|
-
[name]="cell.getId()"
|
|
1735
|
-
[disabled]="!cell.isEditable()"
|
|
1736
|
-
(click)="onClick.emit($event)"
|
|
1737
|
-
(keydown.enter)="onEdited.emit($event)"
|
|
1738
|
-
(keydown.esc)="onStopEditing.emit('')"
|
|
1739
|
-
>
|
|
1740
|
-
@for (option of cell.getColumn().getConfig()?.list; track option.value) {
|
|
1741
|
-
<option
|
|
1742
|
-
[value]="option.value"
|
|
1743
|
-
[selected]="option.value === cell.getValue()"
|
|
1744
|
-
>
|
|
1745
|
-
{{ option.title }}
|
|
1746
|
-
</option>
|
|
1747
|
-
}
|
|
1748
|
-
</select>
|
|
1749
|
-
`,
|
|
1750
|
-
standalone: true,
|
|
1751
|
-
imports: [FormsModule],
|
|
1752
|
-
}]
|
|
1753
|
-
}], ctorParameters: () => [] });
|
|
1754
|
-
|
|
1755
|
-
class TextareaEditorComponent extends DefaultEditor {
|
|
1756
|
-
constructor() {
|
|
1757
|
-
super();
|
|
1758
|
-
}
|
|
1759
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TextareaEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1760
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: TextareaEditorComponent, isStandalone: true, selector: "textarea-editor", usesInheritance: true, ngImport: i0, template: `
|
|
1761
|
-
<textarea
|
|
1762
|
-
[class]="inputClass"
|
|
1763
|
-
class="form-control"
|
|
1764
|
-
[(ngModel)]="cell.newValue"
|
|
1765
|
-
[name]="cell.getId()"
|
|
1766
|
-
[disabled]="!cell.isEditable()"
|
|
1767
|
-
[placeholder]="cell.getTitle()"
|
|
1768
|
-
(click)="onClick.emit($event)"
|
|
1769
|
-
(keydown.enter)="onEdited.emit($event)"
|
|
1770
|
-
(keydown.esc)="onStopEditing.emit('')"
|
|
1771
|
-
>
|
|
1772
|
-
</textarea>
|
|
1773
|
-
`, isInline: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
1774
|
-
}
|
|
1775
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TextareaEditorComponent, decorators: [{
|
|
1776
|
-
type: Component,
|
|
1777
|
-
args: [{ selector: "textarea-editor", template: `
|
|
1778
|
-
<textarea
|
|
1779
|
-
[class]="inputClass"
|
|
1780
|
-
class="form-control"
|
|
1781
|
-
[(ngModel)]="cell.newValue"
|
|
1782
|
-
[name]="cell.getId()"
|
|
1783
|
-
[disabled]="!cell.isEditable()"
|
|
1784
|
-
[placeholder]="cell.getTitle()"
|
|
1785
|
-
(click)="onClick.emit($event)"
|
|
1786
|
-
(keydown.enter)="onEdited.emit($event)"
|
|
1787
|
-
(keydown.esc)="onStopEditing.emit('')"
|
|
1788
|
-
>
|
|
1789
|
-
</textarea>
|
|
1790
|
-
`, standalone: true, imports: [FormsModule], styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"] }]
|
|
1791
|
-
}], ctorParameters: () => [] });
|
|
1792
|
-
|
|
1793
|
-
class DefaultEditComponent extends EditCellDefault {
|
|
1794
|
-
constructor() {
|
|
1795
|
-
super();
|
|
1796
|
-
}
|
|
1797
|
-
getEditorType() {
|
|
1798
|
-
const editor = this.cell.getColumn().editor;
|
|
1799
|
-
if (editor) {
|
|
1800
|
-
return editor.type;
|
|
1801
|
-
}
|
|
1802
|
-
return "text";
|
|
1803
|
-
}
|
|
1804
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1805
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: DefaultEditComponent, isStandalone: true, selector: "table-cell-default-editor", usesInheritance: true, ngImport: i0, template: "<div>\n @switch (getEditorType()) {\n @case ('list') {\n <select-editor\n [cell]=\"cell\"\n [inputClass]=\"inputClass\"\n (onClick)=\"onClick($event)\"\n (onEdited)=\"onEdited($event)\"\n (onStopEditing)=\"onStopEditing()\">\n </select-editor>\n }\n @case ('textarea') {\n <textarea-editor\n [cell]=\"cell\"\n [inputClass]=\"inputClass\"\n (onClick)=\"onClick($event)\"\n (onEdited)=\"onEdited($event)\"\n (onStopEditing)=\"onStopEditing()\">\n </textarea-editor>\n }\n @case ('checkbox') {\n <checkbox-editor\n [cell]=\"cell\"\n [inputClass]=\"inputClass\"\n (onClick)=\"onClick($event)\">\n </checkbox-editor>\n }\n @default {\n <input-editor\n [cell]=\"cell\"\n [inputClass]=\"inputClass\"\n (onClick)=\"onClick($event)\"\n (onEdited)=\"onEdited($event)\"\n (onStopEditing)=\"onStopEditing()\">\n </input-editor>\n }\n}\n</div>", dependencies: [{ kind: "component", type: SelectEditorComponent, selector: "select-editor" }, { kind: "component", type: TextareaEditorComponent, selector: "textarea-editor" }, { kind: "component", type: CheckboxEditorComponent, selector: "checkbox-editor" }, { kind: "component", type: InputEditorComponent, selector: "input-editor" }] }); }
|
|
1806
|
-
}
|
|
1807
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultEditComponent, decorators: [{
|
|
1808
|
-
type: Component,
|
|
1809
|
-
args: [{ selector: "table-cell-default-editor", imports: [
|
|
1810
|
-
SelectEditorComponent,
|
|
1811
|
-
TextareaEditorComponent,
|
|
1812
|
-
CheckboxEditorComponent,
|
|
1813
|
-
InputEditorComponent,
|
|
1814
|
-
], standalone: true, template: "<div>\n @switch (getEditorType()) {\n @case ('list') {\n <select-editor\n [cell]=\"cell\"\n [inputClass]=\"inputClass\"\n (onClick)=\"onClick($event)\"\n (onEdited)=\"onEdited($event)\"\n (onStopEditing)=\"onStopEditing()\">\n </select-editor>\n }\n @case ('textarea') {\n <textarea-editor\n [cell]=\"cell\"\n [inputClass]=\"inputClass\"\n (onClick)=\"onClick($event)\"\n (onEdited)=\"onEdited($event)\"\n (onStopEditing)=\"onStopEditing()\">\n </textarea-editor>\n }\n @case ('checkbox') {\n <checkbox-editor\n [cell]=\"cell\"\n [inputClass]=\"inputClass\"\n (onClick)=\"onClick($event)\">\n </checkbox-editor>\n }\n @default {\n <input-editor\n [cell]=\"cell\"\n [inputClass]=\"inputClass\"\n (onClick)=\"onClick($event)\"\n (onEdited)=\"onEdited($event)\"\n (onStopEditing)=\"onStopEditing()\">\n </input-editor>\n }\n}\n</div>" }]
|
|
1815
|
-
}], ctorParameters: () => [] });
|
|
1816
|
-
|
|
1817
|
-
class EditCellComponent {
|
|
1818
|
-
constructor() {
|
|
1819
|
-
this.inputClass = "";
|
|
1820
|
-
this.edited = output();
|
|
1821
|
-
}
|
|
1822
|
-
onEdited(event) {
|
|
1823
|
-
this.edited.emit(event);
|
|
1824
|
-
return false;
|
|
1825
|
-
}
|
|
1826
|
-
getEditorType() {
|
|
1827
|
-
const editor = this.cell.getColumn().editor;
|
|
1828
|
-
if (editor) {
|
|
1829
|
-
return editor.type;
|
|
1830
|
-
}
|
|
1831
|
-
return "text";
|
|
1832
|
-
}
|
|
1833
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: EditCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1834
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: EditCellComponent, isStandalone: true, selector: "table-cell-edit-mode", inputs: { cell: "cell", inputClass: "inputClass" }, outputs: { edited: "edited" }, ngImport: i0, template: `
|
|
1835
|
-
<div>
|
|
1836
|
-
@switch (getEditorType()) { @case ('custom') {
|
|
1837
|
-
<table-cell-custom-editor
|
|
1838
|
-
[cell]="cell"
|
|
1839
|
-
[inputClass]="inputClass"
|
|
1840
|
-
(edited)="onEdited($event)"
|
|
1841
|
-
>
|
|
1842
|
-
</table-cell-custom-editor>
|
|
1843
|
-
} @default {
|
|
1844
|
-
<table-cell-default-editor
|
|
1845
|
-
[cell]="cell"
|
|
1846
|
-
[inputClass]="inputClass"
|
|
1847
|
-
(edited)="onEdited($event)"
|
|
1848
|
-
>
|
|
1849
|
-
</table-cell-default-editor>
|
|
1850
|
-
} }
|
|
1851
|
-
</div>
|
|
1852
|
-
`, isInline: true, dependencies: [{ kind: "component", type: CustomEditComponent, selector: "table-cell-custom-editor" }, { kind: "component", type: DefaultEditComponent, selector: "table-cell-default-editor" }] }); }
|
|
1853
|
-
}
|
|
1854
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: EditCellComponent, decorators: [{
|
|
1855
|
-
type: Component,
|
|
1856
|
-
args: [{
|
|
1857
|
-
selector: "table-cell-edit-mode",
|
|
1858
|
-
template: `
|
|
1859
|
-
<div>
|
|
1860
|
-
@switch (getEditorType()) { @case ('custom') {
|
|
1861
|
-
<table-cell-custom-editor
|
|
1862
|
-
[cell]="cell"
|
|
1863
|
-
[inputClass]="inputClass"
|
|
1864
|
-
(edited)="onEdited($event)"
|
|
1865
|
-
>
|
|
1866
|
-
</table-cell-custom-editor>
|
|
1867
|
-
} @default {
|
|
1868
|
-
<table-cell-default-editor
|
|
1869
|
-
[cell]="cell"
|
|
1870
|
-
[inputClass]="inputClass"
|
|
1871
|
-
(edited)="onEdited($event)"
|
|
1872
|
-
>
|
|
1873
|
-
</table-cell-default-editor>
|
|
1874
|
-
} }
|
|
1875
|
-
</div>
|
|
1876
|
-
`,
|
|
1877
|
-
standalone: true,
|
|
1878
|
-
imports: [CustomEditComponent, DefaultEditComponent],
|
|
1879
|
-
}]
|
|
1880
|
-
}], propDecorators: { cell: [{
|
|
1881
|
-
type: Input
|
|
1882
|
-
}], inputClass: [{
|
|
1883
|
-
type: Input
|
|
1884
|
-
}] } });
|
|
1885
|
-
|
|
1886
|
-
class CustomViewComponent {
|
|
1887
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CustomViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1888
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: CustomViewComponent, isStandalone: true, selector: "custom-view-component", inputs: { cell: "cell" }, ngImport: i0, template: `<ng-template
|
|
1889
|
-
*ngComponentOutlet="
|
|
1890
|
-
cell.getColumn().renderComponent;
|
|
1891
|
-
inputs: { rowData: cell.getRow().getData(), value: cell.getValue() }
|
|
1892
|
-
"
|
|
1893
|
-
></ng-template>`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }] }); }
|
|
1894
|
-
}
|
|
1895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CustomViewComponent, decorators: [{
|
|
1896
|
-
type: Component,
|
|
1897
|
-
args: [{
|
|
1898
|
-
selector: "custom-view-component",
|
|
1899
|
-
template: `<ng-template
|
|
1900
|
-
*ngComponentOutlet="
|
|
1901
|
-
cell.getColumn().renderComponent;
|
|
1902
|
-
inputs: { rowData: cell.getRow().getData(), value: cell.getValue() }
|
|
1903
|
-
"
|
|
1904
|
-
></ng-template>`,
|
|
1905
|
-
imports: [NgComponentOutlet],
|
|
1906
|
-
standalone: true,
|
|
1907
|
-
}]
|
|
1908
|
-
}], propDecorators: { cell: [{
|
|
1909
|
-
type: Input
|
|
1910
|
-
}] } });
|
|
1911
|
-
|
|
1912
|
-
class ViewCellComponent {
|
|
1913
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ViewCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1914
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: ViewCellComponent, isStandalone: true, selector: "table-cell-view-mode", inputs: { cell: "cell" }, ngImport: i0, template: `
|
|
1915
|
-
<div>
|
|
1916
|
-
@switch (cell.getColumn().type) { @case ('custom') {
|
|
1917
|
-
<custom-view-component [cell]="cell"></custom-view-component>
|
|
1918
|
-
} @case ('html') {
|
|
1919
|
-
<div [innerHTML]="cell.getValue()"></div>
|
|
1920
|
-
} @default {
|
|
1921
|
-
<div>{{ cell.getValue() }}</div>
|
|
1922
|
-
} }
|
|
1923
|
-
</div>
|
|
1924
|
-
`, isInline: true, dependencies: [{ kind: "component", type: CustomViewComponent, selector: "custom-view-component", inputs: ["cell"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1925
|
-
}
|
|
1926
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ViewCellComponent, decorators: [{
|
|
1927
|
-
type: Component,
|
|
1928
|
-
args: [{
|
|
1929
|
-
selector: "table-cell-view-mode",
|
|
1930
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1931
|
-
template: `
|
|
1932
|
-
<div>
|
|
1933
|
-
@switch (cell.getColumn().type) { @case ('custom') {
|
|
1934
|
-
<custom-view-component [cell]="cell"></custom-view-component>
|
|
1935
|
-
} @case ('html') {
|
|
1936
|
-
<div [innerHTML]="cell.getValue()"></div>
|
|
1937
|
-
} @default {
|
|
1938
|
-
<div>{{ cell.getValue() }}</div>
|
|
1939
|
-
} }
|
|
1940
|
-
</div>
|
|
1941
|
-
`,
|
|
1942
|
-
standalone: true,
|
|
1943
|
-
imports: [CustomViewComponent],
|
|
1944
|
-
}]
|
|
1945
|
-
}], propDecorators: { cell: [{
|
|
1946
|
-
type: Input
|
|
1947
|
-
}] } });
|
|
1948
|
-
|
|
1949
|
-
class CellComponent {
|
|
1950
|
-
constructor() {
|
|
1951
|
-
this.inputClass = "";
|
|
1952
|
-
this.mode = "inline";
|
|
1953
|
-
this.isInEditing = false;
|
|
1954
|
-
this.edited = output();
|
|
1955
|
-
}
|
|
1956
|
-
onEdited(event) {
|
|
1957
|
-
if (this.isNew) {
|
|
1958
|
-
this.grid.create(this.grid.getNewRow(), this.createConfirm);
|
|
1959
|
-
}
|
|
1960
|
-
else {
|
|
1961
|
-
this.grid.save(this.row, this.editConfirm);
|
|
1962
|
-
}
|
|
1963
|
-
}
|
|
1964
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1965
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: CellComponent, isStandalone: true, selector: "ng2-smart-table-cell", inputs: { grid: "grid", row: "row", editConfirm: "editConfirm", createConfirm: "createConfirm", isNew: "isNew", cell: "cell", inputClass: "inputClass", mode: "mode", isInEditing: "isInEditing" }, outputs: { edited: "edited" }, ngImport: i0, template: `
|
|
1966
|
-
@if (!isInEditing) {
|
|
1967
|
-
<table-cell-view-mode [cell]="cell"></table-cell-view-mode>
|
|
1968
|
-
} @else {
|
|
1969
|
-
<table-cell-edit-mode
|
|
1970
|
-
[cell]="cell"
|
|
1971
|
-
[inputClass]="inputClass"
|
|
1972
|
-
(edited)="onEdited($event)"
|
|
1973
|
-
>
|
|
1974
|
-
</table-cell-edit-mode>
|
|
1975
|
-
}
|
|
1976
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ViewCellComponent, selector: "table-cell-view-mode", inputs: ["cell"] }, { kind: "component", type: EditCellComponent, selector: "table-cell-edit-mode", inputs: ["cell", "inputClass"], outputs: ["edited"] }] }); }
|
|
1977
|
-
}
|
|
1978
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CellComponent, decorators: [{
|
|
1979
|
-
type: Component,
|
|
1980
|
-
args: [{
|
|
1981
|
-
selector: "ng2-smart-table-cell",
|
|
1982
|
-
template: `
|
|
1983
|
-
@if (!isInEditing) {
|
|
1984
|
-
<table-cell-view-mode [cell]="cell"></table-cell-view-mode>
|
|
1985
|
-
} @else {
|
|
1986
|
-
<table-cell-edit-mode
|
|
1987
|
-
[cell]="cell"
|
|
1988
|
-
[inputClass]="inputClass"
|
|
1989
|
-
(edited)="onEdited($event)"
|
|
1990
|
-
>
|
|
1991
|
-
</table-cell-edit-mode>
|
|
1992
|
-
}
|
|
1993
|
-
`,
|
|
1994
|
-
standalone: true,
|
|
1995
|
-
imports: [ViewCellComponent, EditCellComponent],
|
|
1996
|
-
}]
|
|
1997
|
-
}], propDecorators: { grid: [{
|
|
1998
|
-
type: Input
|
|
1999
|
-
}], row: [{
|
|
2000
|
-
type: Input
|
|
2001
|
-
}], editConfirm: [{
|
|
2002
|
-
type: Input
|
|
2003
|
-
}], createConfirm: [{
|
|
2004
|
-
type: Input
|
|
2005
|
-
}], isNew: [{
|
|
2006
|
-
type: Input
|
|
2007
|
-
}], cell: [{
|
|
2008
|
-
type: Input
|
|
2009
|
-
}], inputClass: [{
|
|
2010
|
-
type: Input
|
|
2011
|
-
}], mode: [{
|
|
2012
|
-
type: Input
|
|
2013
|
-
}], isInEditing: [{
|
|
2014
|
-
type: Input
|
|
2015
|
-
}] } });
|
|
2016
|
-
|
|
2017
|
-
class TbodyCreateCancelComponent {
|
|
2018
|
-
constructor() {
|
|
2019
|
-
this.cancelButtonContent = "";
|
|
2020
|
-
this.saveButtonContent = "";
|
|
2021
|
-
}
|
|
2022
|
-
onSave(event) {
|
|
2023
|
-
event.preventDefault();
|
|
2024
|
-
event.stopPropagation();
|
|
2025
|
-
this.grid.save(this.row, this.editConfirm);
|
|
2026
|
-
}
|
|
2027
|
-
onCancelEdit(event) {
|
|
2028
|
-
event.preventDefault();
|
|
2029
|
-
event.stopPropagation();
|
|
2030
|
-
this.editCancel.emit(true);
|
|
2031
|
-
this.row.isInEditing = false;
|
|
2032
|
-
}
|
|
2033
|
-
ngOnChanges() {
|
|
2034
|
-
this.saveButtonContent = this.grid.getSetting("edit.saveButtonContent", "save");
|
|
2035
|
-
this.cancelButtonContent = this.grid.getSetting("edit.cancelButtonContent", "cancel");
|
|
2036
|
-
}
|
|
2037
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyCreateCancelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2038
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TbodyCreateCancelComponent, isStandalone: true, selector: "ng2-st-tbody-create-cancel", inputs: { grid: "grid", row: "row", editConfirm: "editConfirm", editCancel: "editCancel" }, usesOnChanges: true, ngImport: i0, template: `
|
|
2039
|
-
@if (!row.pending) {
|
|
2040
|
-
<a
|
|
2041
|
-
href="#"
|
|
2042
|
-
[id]="'row-' + row.index + '_editing-confirm-button'"
|
|
2043
|
-
class="ng2-smart-action ng2-smart-action-edit-save"
|
|
2044
|
-
[innerHTML]="saveButtonContent"
|
|
2045
|
-
(click)="onSave($event)"
|
|
2046
|
-
></a>
|
|
2047
|
-
<a
|
|
2048
|
-
href="#"
|
|
2049
|
-
[id]="'row-' + row.index + '_editing-cancel-button'"
|
|
2050
|
-
class="ng2-smart-action ng2-smart-action-edit-cancel"
|
|
2051
|
-
[innerHTML]="cancelButtonContent"
|
|
2052
|
-
(click)="onCancelEdit($event)"
|
|
2053
|
-
></a>
|
|
2054
|
-
} @else {
|
|
2055
|
-
<div style="display: flex;">
|
|
2056
|
-
<svg
|
|
2057
|
-
(click)="$event.stopPropagation()"
|
|
2058
|
-
style="height: 2rem; width: 2rem;"
|
|
2059
|
-
version="1.1"
|
|
2060
|
-
id="L9"
|
|
2061
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2062
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
2063
|
-
x="0px"
|
|
2064
|
-
y="0px"
|
|
2065
|
-
viewBox="0 0 100 100"
|
|
2066
|
-
enable-background="new 0 0 0 0"
|
|
2067
|
-
xml:space="preserve"
|
|
2068
|
-
>
|
|
2069
|
-
<path
|
|
2070
|
-
fill="#e9e9e9"
|
|
2071
|
-
d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
2072
|
-
>
|
|
2073
|
-
<animateTransform
|
|
2074
|
-
attributeName="transform"
|
|
2075
|
-
attributeType="XML"
|
|
2076
|
-
type="rotate"
|
|
2077
|
-
dur="1s"
|
|
2078
|
-
from="0 50 50"
|
|
2079
|
-
to="360 50 50"
|
|
2080
|
-
repeatCount="indefinite"
|
|
2081
|
-
/>
|
|
2082
|
-
</path>
|
|
2083
|
-
</svg>
|
|
2084
|
-
<svg
|
|
2085
|
-
(click)="$event.stopPropagation()"
|
|
2086
|
-
style="height: 2rem; width: 2rem; "
|
|
2087
|
-
version="1.1"
|
|
2088
|
-
id="L9"
|
|
2089
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2090
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
2091
|
-
x="0px"
|
|
2092
|
-
y="0px"
|
|
2093
|
-
viewBox="0 0 100 100"
|
|
2094
|
-
enable-background="new 0 0 0 0"
|
|
2095
|
-
xml:space="preserve"
|
|
2096
|
-
>
|
|
2097
|
-
<path
|
|
2098
|
-
fill="#e9e9e9"
|
|
2099
|
-
d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
2100
|
-
>
|
|
2101
|
-
<animateTransform
|
|
2102
|
-
attributeName="transform"
|
|
2103
|
-
attributeType="XML"
|
|
2104
|
-
type="rotate"
|
|
2105
|
-
dur="1s"
|
|
2106
|
-
from="0 50 50"
|
|
2107
|
-
to="360 50 50"
|
|
2108
|
-
repeatCount="indefinite"
|
|
2109
|
-
/>
|
|
2110
|
-
</path>
|
|
2111
|
-
</svg>
|
|
2112
|
-
</div>
|
|
2098
|
+
this.currentColumnsSortState = columnsState;
|
|
2099
|
+
setLocalStorage(this.columnStateStorageKey, columnsState);
|
|
2100
|
+
return;
|
|
2101
|
+
}
|
|
2102
|
+
const merged = this.getMergedColumnStates(storageState, columnsState);
|
|
2103
|
+
this.applyColumnsSortState(merged, false);
|
|
2104
|
+
return;
|
|
2105
|
+
}
|
|
2106
|
+
this.applyColumnsSortState(columnsState, false);
|
|
2113
2107
|
}
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
@if (!row.pending) {
|
|
2122
|
-
<a
|
|
2123
|
-
href="#"
|
|
2124
|
-
[id]="'row-' + row.index + '_editing-confirm-button'"
|
|
2125
|
-
class="ng2-smart-action ng2-smart-action-edit-save"
|
|
2126
|
-
[innerHTML]="saveButtonContent"
|
|
2127
|
-
(click)="onSave($event)"
|
|
2128
|
-
></a>
|
|
2129
|
-
<a
|
|
2130
|
-
href="#"
|
|
2131
|
-
[id]="'row-' + row.index + '_editing-cancel-button'"
|
|
2132
|
-
class="ng2-smart-action ng2-smart-action-edit-cancel"
|
|
2133
|
-
[innerHTML]="cancelButtonContent"
|
|
2134
|
-
(click)="onCancelEdit($event)"
|
|
2135
|
-
></a>
|
|
2136
|
-
} @else {
|
|
2137
|
-
<div style="display: flex;">
|
|
2138
|
-
<svg
|
|
2139
|
-
(click)="$event.stopPropagation()"
|
|
2140
|
-
style="height: 2rem; width: 2rem;"
|
|
2141
|
-
version="1.1"
|
|
2142
|
-
id="L9"
|
|
2143
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2144
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
2145
|
-
x="0px"
|
|
2146
|
-
y="0px"
|
|
2147
|
-
viewBox="0 0 100 100"
|
|
2148
|
-
enable-background="new 0 0 0 0"
|
|
2149
|
-
xml:space="preserve"
|
|
2150
|
-
>
|
|
2151
|
-
<path
|
|
2152
|
-
fill="#e9e9e9"
|
|
2153
|
-
d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
2154
|
-
>
|
|
2155
|
-
<animateTransform
|
|
2156
|
-
attributeName="transform"
|
|
2157
|
-
attributeType="XML"
|
|
2158
|
-
type="rotate"
|
|
2159
|
-
dur="1s"
|
|
2160
|
-
from="0 50 50"
|
|
2161
|
-
to="360 50 50"
|
|
2162
|
-
repeatCount="indefinite"
|
|
2163
|
-
/>
|
|
2164
|
-
</path>
|
|
2165
|
-
</svg>
|
|
2166
|
-
<svg
|
|
2167
|
-
(click)="$event.stopPropagation()"
|
|
2168
|
-
style="height: 2rem; width: 2rem; "
|
|
2169
|
-
version="1.1"
|
|
2170
|
-
id="L9"
|
|
2171
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2172
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
2173
|
-
x="0px"
|
|
2174
|
-
y="0px"
|
|
2175
|
-
viewBox="0 0 100 100"
|
|
2176
|
-
enable-background="new 0 0 0 0"
|
|
2177
|
-
xml:space="preserve"
|
|
2178
|
-
>
|
|
2179
|
-
<path
|
|
2180
|
-
fill="#e9e9e9"
|
|
2181
|
-
d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
2182
|
-
>
|
|
2183
|
-
<animateTransform
|
|
2184
|
-
attributeName="transform"
|
|
2185
|
-
attributeType="XML"
|
|
2186
|
-
type="rotate"
|
|
2187
|
-
dur="1s"
|
|
2188
|
-
from="0 50 50"
|
|
2189
|
-
to="360 50 50"
|
|
2190
|
-
repeatCount="indefinite"
|
|
2191
|
-
/>
|
|
2192
|
-
</path>
|
|
2193
|
-
</svg>
|
|
2194
|
-
</div>
|
|
2108
|
+
getColumnsStateFromSettings(columns) {
|
|
2109
|
+
return (columns || this.settings().columns || []).map((column) => ({
|
|
2110
|
+
key: column.key,
|
|
2111
|
+
title: column.title,
|
|
2112
|
+
hide: !!column.hide,
|
|
2113
|
+
moveDisabled: !!column.moveDisabled,
|
|
2114
|
+
}));
|
|
2195
2115
|
}
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2116
|
+
getMergedColumnStates(newState, columnsState) {
|
|
2117
|
+
const columnsSettings = columnsState || this.getColumnsStateFromSettings();
|
|
2118
|
+
// merge new columns state with state from storage
|
|
2119
|
+
const filtered = [];
|
|
2120
|
+
newState.forEach((state) => {
|
|
2121
|
+
const fined = columnsSettings.find((column) => column.title === state.title && column.key === state.key);
|
|
2122
|
+
if (fined) {
|
|
2123
|
+
filtered.push({ ...fined, hide: fined.moveDisabled ? fined.hide : state.hide });
|
|
2124
|
+
}
|
|
2125
|
+
});
|
|
2126
|
+
// find new columns witch not exist in storage state
|
|
2127
|
+
const newColumns = columnsSettings.filter((state) => {
|
|
2128
|
+
return !filtered.some((column) => column.title === state.title && column.key === state.key);
|
|
2129
|
+
});
|
|
2130
|
+
return [...filtered, ...newColumns];
|
|
2131
|
+
}
|
|
2132
|
+
get columnStateStorageKey() {
|
|
2133
|
+
return this.settings().columnSortStorageKey;
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2208
2136
|
|
|
2209
2137
|
class TbodyCustomComponent {
|
|
2210
2138
|
constructor() {
|
|
@@ -2265,51 +2193,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2265
2193
|
|
|
2266
2194
|
class TbodyEditDeleteComponent {
|
|
2267
2195
|
constructor() {
|
|
2196
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
2197
|
+
this.grid = input.required();
|
|
2198
|
+
this.row = input.required();
|
|
2199
|
+
this.source = input.required();
|
|
2200
|
+
this.deleteConfirm = input.required();
|
|
2268
2201
|
this.edit = output();
|
|
2269
2202
|
this.delete = output();
|
|
2270
|
-
this.editRowSelect = output();
|
|
2271
2203
|
this.isActionEdit = false;
|
|
2272
2204
|
this.isActionDelete = false;
|
|
2273
|
-
this.
|
|
2274
|
-
this.
|
|
2205
|
+
this.isExternalMode = false;
|
|
2206
|
+
this.editRowButtonContent = "Edit";
|
|
2207
|
+
this.deleteRowButtonContent = "Delete";
|
|
2208
|
+
effect(() => {
|
|
2209
|
+
const settings = this.grid().settings();
|
|
2210
|
+
const actions = settings.actions;
|
|
2211
|
+
if (actions) {
|
|
2212
|
+
this.isActionDelete = !!actions.delete;
|
|
2213
|
+
this.isActionEdit = !!actions.edit;
|
|
2214
|
+
}
|
|
2215
|
+
this.isExternalMode = settings.mode === 'external';
|
|
2216
|
+
this.editRowButtonContent = settings.edit
|
|
2217
|
+
? settings.edit.editButtonContent || "Edit"
|
|
2218
|
+
: "Edit";
|
|
2219
|
+
this.deleteRowButtonContent = settings.delete
|
|
2220
|
+
? settings.delete.deleteButtonContent || "Delete"
|
|
2221
|
+
: "Delete";
|
|
2222
|
+
this.cdr.detectChanges();
|
|
2223
|
+
});
|
|
2275
2224
|
}
|
|
2276
2225
|
onEdit(event) {
|
|
2277
2226
|
event.preventDefault();
|
|
2278
2227
|
event.stopPropagation();
|
|
2279
|
-
this.editRowSelect.emit(this.row);
|
|
2280
2228
|
this.edit.emit({
|
|
2281
|
-
data: this.row.getData(),
|
|
2229
|
+
data: this.row().getData(),
|
|
2282
2230
|
source: this.source,
|
|
2283
2231
|
});
|
|
2284
|
-
if (this.
|
|
2285
|
-
this.grid.edit(this.row);
|
|
2232
|
+
if (!this.isExternalMode) {
|
|
2233
|
+
this.grid().edit(this.row());
|
|
2286
2234
|
}
|
|
2287
2235
|
}
|
|
2288
2236
|
onDelete(event) {
|
|
2289
2237
|
event.preventDefault();
|
|
2290
2238
|
event.stopPropagation();
|
|
2291
|
-
if (this.
|
|
2239
|
+
if (this.isExternalMode) {
|
|
2292
2240
|
this.delete.emit({
|
|
2293
|
-
data: this.row.getData(),
|
|
2294
|
-
source: this.source,
|
|
2241
|
+
data: this.row().getData(),
|
|
2242
|
+
source: this.source(),
|
|
2295
2243
|
});
|
|
2296
2244
|
}
|
|
2297
2245
|
else {
|
|
2298
|
-
this.grid.delete(this.row, this.deleteConfirm);
|
|
2246
|
+
this.grid().delete(this.row(), this.deleteConfirm());
|
|
2299
2247
|
}
|
|
2300
2248
|
}
|
|
2301
|
-
ngOnChanges() {
|
|
2302
|
-
this.isActionEdit = this.grid.getSetting("actions.edit");
|
|
2303
|
-
this.isActionDelete = this.grid.getSetting("actions.delete");
|
|
2304
|
-
this.editRowButtonContent = this.grid.getSetting("edit.editButtonContent");
|
|
2305
|
-
this.deleteRowButtonContent = this.grid.getSetting("delete.deleteButtonContent");
|
|
2306
|
-
}
|
|
2307
2249
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyEditDeleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2308
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TbodyEditDeleteComponent, isStandalone: true, selector: "ng2-st-tbody-edit-delete", inputs: { grid: "grid", row: "row", source: "source", deleteConfirm: "deleteConfirm",
|
|
2309
|
-
@if (!row.pending) { @if (isActionEdit) {
|
|
2250
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TbodyEditDeleteComponent, isStandalone: true, selector: "ng2-st-tbody-edit-delete", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, deleteConfirm: { classPropertyName: "deleteConfirm", publicName: "deleteConfirm", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { edit: "edit", delete: "delete" }, ngImport: i0, template: `
|
|
2251
|
+
@if (!row().pending) { @if (isActionEdit) {
|
|
2310
2252
|
<a
|
|
2311
2253
|
href="#"
|
|
2312
|
-
[id]="'row-' + row.index + '_action-edit-button'"
|
|
2254
|
+
[id]="'row-' + row().index + '_action-edit-button'"
|
|
2313
2255
|
class="ng2-smart-action ng2-smart-action-edit-edit"
|
|
2314
2256
|
[innerHTML]="editRowButtonContent"
|
|
2315
2257
|
(click)="onEdit($event)"
|
|
@@ -2317,7 +2259,7 @@ class TbodyEditDeleteComponent {
|
|
|
2317
2259
|
} @if (isActionDelete) {
|
|
2318
2260
|
<a
|
|
2319
2261
|
href="#"
|
|
2320
|
-
[id]="'row-' + row.index + '_action-delete-button'"
|
|
2262
|
+
[id]="'row-' + row().index + '_action-delete-button'"
|
|
2321
2263
|
class="ng2-smart-action ng2-smart-action-delete-delete"
|
|
2322
2264
|
[innerHTML]="deleteRowButtonContent"
|
|
2323
2265
|
(click)="onDelete($event)"
|
|
@@ -2326,6 +2268,7 @@ class TbodyEditDeleteComponent {
|
|
|
2326
2268
|
<div style="display: flex;">
|
|
2327
2269
|
@if (isActionEdit) {
|
|
2328
2270
|
<svg
|
|
2271
|
+
role="none"
|
|
2329
2272
|
(click)="$event.stopPropagation()"
|
|
2330
2273
|
style="height: 2rem; width: 2rem;"
|
|
2331
2274
|
version="1.1"
|
|
@@ -2355,6 +2298,7 @@ class TbodyEditDeleteComponent {
|
|
|
2355
2298
|
</svg>
|
|
2356
2299
|
} @if (isActionDelete) {
|
|
2357
2300
|
<svg
|
|
2301
|
+
role="none"
|
|
2358
2302
|
(click)="$event.stopPropagation()"
|
|
2359
2303
|
style="height: 2rem; width: 2rem;"
|
|
2360
2304
|
version="1.1"
|
|
@@ -2385,17 +2329,17 @@ class TbodyEditDeleteComponent {
|
|
|
2385
2329
|
}
|
|
2386
2330
|
</div>
|
|
2387
2331
|
}
|
|
2388
|
-
`, isInline: true }); }
|
|
2332
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2389
2333
|
}
|
|
2390
2334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyEditDeleteComponent, decorators: [{
|
|
2391
2335
|
type: Component,
|
|
2392
2336
|
args: [{
|
|
2393
2337
|
selector: "ng2-st-tbody-edit-delete",
|
|
2394
2338
|
template: `
|
|
2395
|
-
@if (!row.pending) { @if (isActionEdit) {
|
|
2339
|
+
@if (!row().pending) { @if (isActionEdit) {
|
|
2396
2340
|
<a
|
|
2397
2341
|
href="#"
|
|
2398
|
-
[id]="'row-' + row.index + '_action-edit-button'"
|
|
2342
|
+
[id]="'row-' + row().index + '_action-edit-button'"
|
|
2399
2343
|
class="ng2-smart-action ng2-smart-action-edit-edit"
|
|
2400
2344
|
[innerHTML]="editRowButtonContent"
|
|
2401
2345
|
(click)="onEdit($event)"
|
|
@@ -2403,7 +2347,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2403
2347
|
} @if (isActionDelete) {
|
|
2404
2348
|
<a
|
|
2405
2349
|
href="#"
|
|
2406
|
-
[id]="'row-' + row.index + '_action-delete-button'"
|
|
2350
|
+
[id]="'row-' + row().index + '_action-delete-button'"
|
|
2407
2351
|
class="ng2-smart-action ng2-smart-action-delete-delete"
|
|
2408
2352
|
[innerHTML]="deleteRowButtonContent"
|
|
2409
2353
|
(click)="onDelete($event)"
|
|
@@ -2412,6 +2356,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2412
2356
|
<div style="display: flex;">
|
|
2413
2357
|
@if (isActionEdit) {
|
|
2414
2358
|
<svg
|
|
2359
|
+
role="none"
|
|
2415
2360
|
(click)="$event.stopPropagation()"
|
|
2416
2361
|
style="height: 2rem; width: 2rem;"
|
|
2417
2362
|
version="1.1"
|
|
@@ -2441,6 +2386,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2441
2386
|
</svg>
|
|
2442
2387
|
} @if (isActionDelete) {
|
|
2443
2388
|
<svg
|
|
2389
|
+
role="none"
|
|
2444
2390
|
(click)="$event.stopPropagation()"
|
|
2445
2391
|
style="height: 2rem; width: 2rem;"
|
|
2446
2392
|
version="1.1"
|
|
@@ -2473,24 +2419,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2473
2419
|
}
|
|
2474
2420
|
`,
|
|
2475
2421
|
standalone: true,
|
|
2422
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2476
2423
|
}]
|
|
2477
|
-
}],
|
|
2478
|
-
type: Input
|
|
2479
|
-
}], row: [{
|
|
2480
|
-
type: Input
|
|
2481
|
-
}], source: [{
|
|
2482
|
-
type: Input
|
|
2483
|
-
}], deleteConfirm: [{
|
|
2484
|
-
type: Input
|
|
2485
|
-
}], editConfirm: [{
|
|
2486
|
-
type: Input
|
|
2487
|
-
}] } });
|
|
2424
|
+
}], ctorParameters: () => [] });
|
|
2488
2425
|
|
|
2489
2426
|
class Ng2SmartTableTbodyComponent {
|
|
2490
2427
|
constructor() {
|
|
2491
|
-
this.
|
|
2428
|
+
this.grid = input.required();
|
|
2429
|
+
this.source = input.required();
|
|
2430
|
+
this.deleteConfirm = input.required();
|
|
2431
|
+
this.createConfirm = input.required();
|
|
2432
|
+
this.editConfirm = input.required();
|
|
2433
|
+
this.rowClassFunction = input(() => "");
|
|
2492
2434
|
this.save = output();
|
|
2493
|
-
this.cancel = output();
|
|
2494
2435
|
this.edit = output();
|
|
2495
2436
|
this.editCancel = output();
|
|
2496
2437
|
this.delete = output();
|
|
@@ -2498,32 +2439,17 @@ class Ng2SmartTableTbodyComponent {
|
|
|
2498
2439
|
this.edited = output();
|
|
2499
2440
|
this.userSelectRow = output();
|
|
2500
2441
|
this.userClickedRow = output();
|
|
2501
|
-
this.editRowSelect = output();
|
|
2502
2442
|
this.multipleSelectRow = output();
|
|
2503
|
-
this.
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
this.
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
get tableColumnsCount() {
|
|
2514
|
-
const actionColumns = this.isActionAdd || this.isActionEdit || this.isActionDelete ? 1 : 0;
|
|
2515
|
-
return this.grid.getColumns().length + actionColumns;
|
|
2516
|
-
}
|
|
2517
|
-
ngOnChanges() {
|
|
2518
|
-
this.isMultiSelectVisible = this.grid.isMultiSelectVisible();
|
|
2519
|
-
this.showActionColumnLeft = this.grid.showActionColumn("left");
|
|
2520
|
-
this.mode = this.grid.getSetting("mode", "inline");
|
|
2521
|
-
this.editInputClass = this.grid.getSetting("edit.inputClass", "");
|
|
2522
|
-
this.showActionColumnRight = this.grid.showActionColumn("right");
|
|
2523
|
-
this.isActionAdd = this.grid.getSetting("actions.add", false);
|
|
2524
|
-
this.isActionEdit = this.grid.getSetting("actions.edit", false);
|
|
2525
|
-
this.isActionDelete = this.grid.getSetting("actions.delete", false);
|
|
2526
|
-
this.noDataMessage = this.grid.getSetting("noDataMessage");
|
|
2443
|
+
this.editInputClass = computed(() => {
|
|
2444
|
+
const editOptions = this.grid().settings().edit;
|
|
2445
|
+
if (!editOptions) {
|
|
2446
|
+
return '';
|
|
2447
|
+
}
|
|
2448
|
+
return editOptions.inputClass || '';
|
|
2449
|
+
});
|
|
2450
|
+
this.noDataMessage = computed(() => {
|
|
2451
|
+
return this.grid().settings().noDataMessage || "No data found";
|
|
2452
|
+
});
|
|
2527
2453
|
}
|
|
2528
2454
|
getVisibleCells(cells) {
|
|
2529
2455
|
return (cells || []).filter((cell) => !cell.getColumn().hide);
|
|
@@ -2532,7 +2458,7 @@ class Ng2SmartTableTbodyComponent {
|
|
|
2532
2458
|
return item?.id || index;
|
|
2533
2459
|
}
|
|
2534
2460
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableTbodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2535
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: Ng2SmartTableTbodyComponent, isStandalone: true, selector: "[ng2-st-tbody]", inputs: { grid: "grid", source: "source", deleteConfirm: "deleteConfirm", editConfirm: "editConfirm",
|
|
2461
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: Ng2SmartTableTbodyComponent, isStandalone: true, selector: "[ng2-st-tbody]", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, deleteConfirm: { classPropertyName: "deleteConfirm", publicName: "deleteConfirm", isSignal: true, isRequired: true, transformFunction: null }, createConfirm: { classPropertyName: "createConfirm", publicName: "createConfirm", isSignal: true, isRequired: true, transformFunction: null }, editConfirm: { classPropertyName: "editConfirm", publicName: "editConfirm", isSignal: true, isRequired: true, transformFunction: null }, rowClassFunction: { classPropertyName: "rowClassFunction", publicName: "rowClassFunction", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { save: "save", edit: "edit", editCancel: "editCancel", delete: "delete", custom: "custom", edited: "edited", userSelectRow: "userSelectRow", userClickedRow: "userClickedRow", multipleSelectRow: "multipleSelectRow" }, ngImport: i0, template: "@for (row of grid().getRows(); track trackByIdOrIndex($index, row)) {\n<tr\n (click)=\"userClickedRow.emit(row)\"\n class=\"ng2-smart-row\"\n [class]=\"rowClassFunction()(row)\"\n [class.selected]=\"row.isSelected\"\n>\n @if (grid().isMultiSelectVisible()) {\n <td\n class=\"ng2-smart-actions ng2-smart-action-multiple-select\"\n (click)=\"$event.stopPropagation(); multipleSelectRow.emit(row)\"\n >\n <input\n type=\"checkbox\"\n [id]=\"'row-' + row.index + '_select-checkbox'\"\n class=\"form-control\"\n [ngModel]=\"row.isSelected\"\n />\n </td>\n } @if (grid().actionIsOnLeft()) {\n <ng-container [ngTemplateOutlet]=\"actions\"></ng-container>\n } @for (cell of getVisibleCells(row.cells); track cell.getId()) {\n <td [class]=\"cell.getColumnClass()\">\n <ng2-smart-table-cell\n [cell]=\"cell\"\n [inputClass]=\"editInputClass()\"\n [isInEditing]=\"row.isInEditing\"\n >\n </ng2-smart-table-cell>\n </td>\n } @if (grid().actionIsOnRight()) {\n <ng-container [ngTemplateOutlet]=\"actions\"></ng-container>\n }\n</tr>\n\n<ng-template #actions>\n @if (row.isInEditing) {\n <td class=\"ng2-smart-actions\">\n <ng2-st-tbody-create-cancel\n [grid]=\"grid()\"\n [row]=\"row\"\n [editConfirm]=\"editConfirm()\"\n [editCancel]=\"editCancel\"\n ></ng2-st-tbody-create-cancel>\n </td>\n } @if (!row.isInEditing && grid().isActionsVisible() ) {\n <td class=\"ng2-smart-actions\" (click)=\"$event.stopPropagation()\">\n <ng2-st-tbody-custom\n [grid]=\"grid()\"\n (custom)=\"custom.emit($event)\"\n [row]=\"row\"\n [source]=\"source()\"\n ></ng2-st-tbody-custom>\n <ng2-st-tbody-edit-delete\n [grid]=\"grid()\"\n [deleteConfirm]=\"deleteConfirm()\"\n (edit)=\"edit.emit(row)\"\n (delete)=\"delete.emit(row)\"\n [row]=\"row\"\n [source]=\"source()\"\n >\n </ng2-st-tbody-edit-delete>\n </td>\n }\n</ng-template>\n} @empty {\n<tr>\n <td colspan=\"50\">\n {{ noDataMessage() }}\n </td>\n</tr>\n}\n", styles: [":host .ng2-smart-row.selected{background:#0000000d}:host .ng2-smart-row .ng2-smart-actions.ng2-smart-action-multiple-select{text-align:center}:host ::ng-deep ng2-st-tbody-edit-delete a:first-child,:host ::ng-deep ng2-st-tbody-create-cancel a:first-child{margin-right:.25rem}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TbodyCustomComponent, selector: "ng2-st-tbody-custom", inputs: ["grid", "row", "source"], outputs: ["custom"] }, { kind: "component", type: TbodyEditDeleteComponent, selector: "ng2-st-tbody-edit-delete", inputs: ["grid", "row", "source", "deleteConfirm"], outputs: ["edit", "delete"] }, { kind: "component", type: TbodyCreateCancelComponent, selector: "ng2-st-tbody-create-cancel", inputs: ["grid", "row", "editConfirm", "editCancel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: CellComponent, selector: "ng2-smart-table-cell", inputs: ["cell", "inputClass", "isInEditing"] }] }); }
|
|
2536
2462
|
}
|
|
2537
2463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableTbodyComponent, decorators: [{
|
|
2538
2464
|
type: Component,
|
|
@@ -2541,66 +2467,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2541
2467
|
TbodyCustomComponent,
|
|
2542
2468
|
TbodyEditDeleteComponent,
|
|
2543
2469
|
TbodyCreateCancelComponent,
|
|
2470
|
+
NgTemplateOutlet,
|
|
2544
2471
|
CellComponent,
|
|
2545
|
-
], template: "@
|
|
2546
|
-
}]
|
|
2547
|
-
type: Input
|
|
2548
|
-
}], source: [{
|
|
2549
|
-
type: Input
|
|
2550
|
-
}], deleteConfirm: [{
|
|
2551
|
-
type: Input
|
|
2552
|
-
}], editConfirm: [{
|
|
2553
|
-
type: Input
|
|
2554
|
-
}], rowClassFunction: [{
|
|
2555
|
-
type: Input
|
|
2556
|
-
}] } });
|
|
2472
|
+
], template: "@for (row of grid().getRows(); track trackByIdOrIndex($index, row)) {\n<tr\n (click)=\"userClickedRow.emit(row)\"\n class=\"ng2-smart-row\"\n [class]=\"rowClassFunction()(row)\"\n [class.selected]=\"row.isSelected\"\n>\n @if (grid().isMultiSelectVisible()) {\n <td\n class=\"ng2-smart-actions ng2-smart-action-multiple-select\"\n (click)=\"$event.stopPropagation(); multipleSelectRow.emit(row)\"\n >\n <input\n type=\"checkbox\"\n [id]=\"'row-' + row.index + '_select-checkbox'\"\n class=\"form-control\"\n [ngModel]=\"row.isSelected\"\n />\n </td>\n } @if (grid().actionIsOnLeft()) {\n <ng-container [ngTemplateOutlet]=\"actions\"></ng-container>\n } @for (cell of getVisibleCells(row.cells); track cell.getId()) {\n <td [class]=\"cell.getColumnClass()\">\n <ng2-smart-table-cell\n [cell]=\"cell\"\n [inputClass]=\"editInputClass()\"\n [isInEditing]=\"row.isInEditing\"\n >\n </ng2-smart-table-cell>\n </td>\n } @if (grid().actionIsOnRight()) {\n <ng-container [ngTemplateOutlet]=\"actions\"></ng-container>\n }\n</tr>\n\n<ng-template #actions>\n @if (row.isInEditing) {\n <td class=\"ng2-smart-actions\">\n <ng2-st-tbody-create-cancel\n [grid]=\"grid()\"\n [row]=\"row\"\n [editConfirm]=\"editConfirm()\"\n [editCancel]=\"editCancel\"\n ></ng2-st-tbody-create-cancel>\n </td>\n } @if (!row.isInEditing && grid().isActionsVisible() ) {\n <td class=\"ng2-smart-actions\" (click)=\"$event.stopPropagation()\">\n <ng2-st-tbody-custom\n [grid]=\"grid()\"\n (custom)=\"custom.emit($event)\"\n [row]=\"row\"\n [source]=\"source()\"\n ></ng2-st-tbody-custom>\n <ng2-st-tbody-edit-delete\n [grid]=\"grid()\"\n [deleteConfirm]=\"deleteConfirm()\"\n (edit)=\"edit.emit(row)\"\n (delete)=\"delete.emit(row)\"\n [row]=\"row\"\n [source]=\"source()\"\n >\n </ng2-st-tbody-edit-delete>\n </td>\n }\n</ng-template>\n} @empty {\n<tr>\n <td colspan=\"50\">\n {{ noDataMessage() }}\n </td>\n</tr>\n}\n", styles: [":host .ng2-smart-row.selected{background:#0000000d}:host .ng2-smart-row .ng2-smart-actions.ng2-smart-action-multiple-select{text-align:center}:host ::ng-deep ng2-st-tbody-edit-delete a:first-child,:host ::ng-deep ng2-st-tbody-create-cancel a:first-child{margin-right:.25rem}\n"] }]
|
|
2473
|
+
}] });
|
|
2557
2474
|
|
|
2558
2475
|
class FilterDefault {
|
|
2559
2476
|
constructor() {
|
|
2560
|
-
this.
|
|
2477
|
+
this.column = input.required();
|
|
2478
|
+
this.source = input.required();
|
|
2479
|
+
this.inputClass = input('');
|
|
2561
2480
|
this.query = '';
|
|
2562
2481
|
this.filter = output();
|
|
2563
2482
|
}
|
|
2564
2483
|
onFilter(query) {
|
|
2565
|
-
this.source.addFilter({
|
|
2566
|
-
field: this.column.id,
|
|
2484
|
+
this.source().addFilter({
|
|
2485
|
+
field: this.column().id,
|
|
2567
2486
|
search: query,
|
|
2568
|
-
filter: this.column.getFilterFunction(),
|
|
2487
|
+
filter: this.column().getFilterFunction(),
|
|
2569
2488
|
});
|
|
2570
2489
|
}
|
|
2571
2490
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FilterDefault, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2572
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2491
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: FilterDefault, isStandalone: true, selector: "ng-component", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { filter: "filter" }, ngImport: i0, template: '', isInline: true }); }
|
|
2573
2492
|
}
|
|
2574
2493
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FilterDefault, decorators: [{
|
|
2575
2494
|
type: Component,
|
|
2576
2495
|
args: [{ template: '' }]
|
|
2577
|
-
}], propDecorators: {
|
|
2578
|
-
type: Input
|
|
2579
|
-
}], source: [{
|
|
2580
|
-
type: Input
|
|
2581
|
-
}], inputClass: [{
|
|
2582
|
-
type: Input
|
|
2583
|
-
}], query: [{
|
|
2496
|
+
}], propDecorators: { query: [{
|
|
2584
2497
|
type: Input
|
|
2585
2498
|
}] } });
|
|
2586
2499
|
|
|
2587
2500
|
class CustomFilterComponent extends FilterDefault {
|
|
2588
2501
|
ngOnChanges(changes) {
|
|
2589
2502
|
if (this.customComponent) {
|
|
2590
|
-
if (this.customComponent
|
|
2591
|
-
this.customComponent.instance
|
|
2503
|
+
if (this.customComponent?.instance &&
|
|
2504
|
+
"ngOnChanges" in this.customComponent.instance) {
|
|
2505
|
+
const onChanges = this.customComponent.instance.ngOnChanges;
|
|
2506
|
+
onChanges(changes);
|
|
2592
2507
|
}
|
|
2593
2508
|
return;
|
|
2594
2509
|
}
|
|
2595
|
-
|
|
2596
|
-
|
|
2510
|
+
const columnFilter = this.column().filter;
|
|
2511
|
+
if (columnFilter && columnFilter.type === "custom") {
|
|
2512
|
+
this.customComponent = this.dynamicTarget?.createComponent(columnFilter?.component);
|
|
2513
|
+
// set @Inputs and @Outputs of custom component
|
|
2514
|
+
this.customComponent?.setInput("query", this.query);
|
|
2515
|
+
this.customComponent?.setInput("column", this.column());
|
|
2516
|
+
this.customComponent?.setInput("source", this.source());
|
|
2517
|
+
this.customComponent?.setInput("inputClass", this.inputClass());
|
|
2518
|
+
this.customComponent?.instance.filter.subscribe((event) => this.onFilter(event));
|
|
2597
2519
|
}
|
|
2598
|
-
// set @Inputs and @Outputs of custom component
|
|
2599
|
-
this.customComponent.instance.query = this.query;
|
|
2600
|
-
this.customComponent.instance.column = this.column;
|
|
2601
|
-
this.customComponent.instance.source = this.source;
|
|
2602
|
-
this.customComponent.instance.inputClass = this.inputClass;
|
|
2603
|
-
this.customComponent.instance.filter.subscribe((event) => this.onFilter(event));
|
|
2604
2520
|
}
|
|
2605
2521
|
ngOnDestroy() {
|
|
2606
2522
|
if (this.customComponent) {
|
|
@@ -2633,11 +2549,11 @@ class CheckboxFilterComponent extends DefaultFilter {
|
|
|
2633
2549
|
.pipe(debounceTime(this.delay))
|
|
2634
2550
|
.subscribe((checked) => {
|
|
2635
2551
|
this.filterActive = true;
|
|
2636
|
-
const trueVal = (this.column.getFilterConfig() &&
|
|
2637
|
-
this.column.getFilterConfig().true) ||
|
|
2552
|
+
const trueVal = (this.column().getFilterConfig() &&
|
|
2553
|
+
this.column().getFilterConfig().true) ||
|
|
2638
2554
|
true;
|
|
2639
|
-
const falseVal = (this.column.getFilterConfig() &&
|
|
2640
|
-
this.column.getFilterConfig().false) ||
|
|
2555
|
+
const falseVal = (this.column().getFilterConfig() &&
|
|
2556
|
+
this.column().getFilterConfig().false) ||
|
|
2641
2557
|
false;
|
|
2642
2558
|
this.query = checked ? trueVal : falseVal;
|
|
2643
2559
|
this.setFilter();
|
|
@@ -2655,12 +2571,12 @@ class CheckboxFilterComponent extends DefaultFilter {
|
|
|
2655
2571
|
<input
|
|
2656
2572
|
type="checkbox"
|
|
2657
2573
|
[formControl]="inputControl"
|
|
2658
|
-
[class]="inputClass"
|
|
2574
|
+
[class]="inputClass()"
|
|
2659
2575
|
class="form-control"
|
|
2660
2576
|
/>
|
|
2661
2577
|
@if (filterActive) {
|
|
2662
2578
|
<a href="#" (click)="resetFilter($event)">{{
|
|
2663
|
-
column.getFilterConfig()?.resetText || "reset"
|
|
2579
|
+
column().getFilterConfig()?.resetText || "reset"
|
|
2664
2580
|
}}</a>
|
|
2665
2581
|
}
|
|
2666
2582
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
@@ -2673,12 +2589,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2673
2589
|
<input
|
|
2674
2590
|
type="checkbox"
|
|
2675
2591
|
[formControl]="inputControl"
|
|
2676
|
-
[class]="inputClass"
|
|
2592
|
+
[class]="inputClass()"
|
|
2677
2593
|
class="form-control"
|
|
2678
2594
|
/>
|
|
2679
2595
|
@if (filterActive) {
|
|
2680
2596
|
<a href="#" (click)="resetFilter($event)">{{
|
|
2681
|
-
column.getFilterConfig()?.resetText || "reset"
|
|
2597
|
+
column().getFilterConfig()?.resetText || "reset"
|
|
2682
2598
|
}}</a>
|
|
2683
2599
|
}
|
|
2684
2600
|
`,
|
|
@@ -2711,11 +2627,11 @@ class InputFilterComponent extends DefaultFilter {
|
|
|
2711
2627
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: InputFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2712
2628
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: InputFilterComponent, isStandalone: true, selector: "input-filter", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
2713
2629
|
<input
|
|
2714
|
-
[class]="inputClass"
|
|
2630
|
+
[class]="inputClass()"
|
|
2715
2631
|
[formControl]="inputControl"
|
|
2716
2632
|
class="form-control"
|
|
2717
2633
|
type="text"
|
|
2718
|
-
placeholder="{{ column.title }}"
|
|
2634
|
+
placeholder="{{ column().title }}"
|
|
2719
2635
|
/>
|
|
2720
2636
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
|
|
2721
2637
|
}
|
|
@@ -2725,11 +2641,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2725
2641
|
selector: "input-filter",
|
|
2726
2642
|
template: `
|
|
2727
2643
|
<input
|
|
2728
|
-
[class]="inputClass"
|
|
2644
|
+
[class]="inputClass()"
|
|
2729
2645
|
[formControl]="inputControl"
|
|
2730
2646
|
class="form-control"
|
|
2731
2647
|
type="text"
|
|
2732
|
-
placeholder="{{ column.title }}"
|
|
2648
|
+
placeholder="{{ column().title }}"
|
|
2733
2649
|
/>
|
|
2734
2650
|
`,
|
|
2735
2651
|
standalone: true,
|
|
@@ -2750,13 +2666,13 @@ class SelectFilterComponent extends DefaultFilter {
|
|
|
2750
2666
|
}
|
|
2751
2667
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SelectFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2752
2668
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: SelectFilterComponent, isStandalone: true, selector: "select-filter", viewQueries: [{ propertyName: "inputControl", first: true, predicate: ["inputControl"], descendants: true, read: NgControl, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
2753
|
-
<select [class]="inputClass"
|
|
2669
|
+
<select [class]="inputClass()"
|
|
2754
2670
|
class="form-control"
|
|
2755
2671
|
#inputControl
|
|
2756
2672
|
[(ngModel)]="query">
|
|
2757
2673
|
|
|
2758
|
-
<option value="">{{ column.getFilterConfig().selectText }}</option>
|
|
2759
|
-
@for (option of column.getFilterConfig().list; track option.value) {
|
|
2674
|
+
<option value="">{{ column().getFilterConfig().selectText }}</option>
|
|
2675
|
+
@for (option of column().getFilterConfig().list; track option.value) {
|
|
2760
2676
|
<option [value]="option.value">
|
|
2761
2677
|
{{ option.title }}
|
|
2762
2678
|
</option>
|
|
@@ -2769,13 +2685,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2769
2685
|
args: [{
|
|
2770
2686
|
selector: 'select-filter',
|
|
2771
2687
|
template: `
|
|
2772
|
-
<select [class]="inputClass"
|
|
2688
|
+
<select [class]="inputClass()"
|
|
2773
2689
|
class="form-control"
|
|
2774
2690
|
#inputControl
|
|
2775
2691
|
[(ngModel)]="query">
|
|
2776
2692
|
|
|
2777
|
-
<option value="">{{ column.getFilterConfig().selectText }}</option>
|
|
2778
|
-
@for (option of column.getFilterConfig().list; track option.value) {
|
|
2693
|
+
<option value="">{{ column().getFilterConfig().selectText }}</option>
|
|
2694
|
+
@for (option of column().getFilterConfig().list; track option.value) {
|
|
2779
2695
|
<option [value]="option.value">
|
|
2780
2696
|
{{ option.title }}
|
|
2781
2697
|
</option>
|
|
@@ -2793,27 +2709,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2793
2709
|
class DefaultFilterComponent extends FilterDefault {
|
|
2794
2710
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2795
2711
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: DefaultFilterComponent, isStandalone: true, selector: "default-table-filter", usesInheritance: true, ngImport: i0, template: `
|
|
2796
|
-
@switch (column.getFilterType()) { @case ('list') {
|
|
2712
|
+
@switch (column().getFilterType()) { @case ('list') {
|
|
2797
2713
|
<select-filter
|
|
2798
2714
|
[query]="query"
|
|
2799
|
-
[class]="inputClass"
|
|
2800
|
-
[column]="column"
|
|
2715
|
+
[class]="inputClass()"
|
|
2716
|
+
[column]="column()"
|
|
2801
2717
|
(filter)="onFilter($event)"
|
|
2802
2718
|
>
|
|
2803
2719
|
</select-filter>
|
|
2804
2720
|
} @case ('checkbox') {
|
|
2805
2721
|
<checkbox-filter
|
|
2806
2722
|
[query]="query"
|
|
2807
|
-
[class]="inputClass"
|
|
2808
|
-
[column]="column"
|
|
2723
|
+
[class]="inputClass()"
|
|
2724
|
+
[column]="column()"
|
|
2809
2725
|
(filter)="onFilter($event)"
|
|
2810
2726
|
>
|
|
2811
2727
|
</checkbox-filter>
|
|
2812
2728
|
} @default {
|
|
2813
2729
|
<input-filter
|
|
2814
2730
|
[query]="query"
|
|
2815
|
-
[class]="inputClass"
|
|
2816
|
-
[column]="column"
|
|
2731
|
+
[class]="inputClass()"
|
|
2732
|
+
[column]="column()"
|
|
2817
2733
|
(filter)="onFilter($event)"
|
|
2818
2734
|
>
|
|
2819
2735
|
</input-filter>
|
|
@@ -2825,27 +2741,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2825
2741
|
args: [{
|
|
2826
2742
|
selector: "default-table-filter",
|
|
2827
2743
|
template: `
|
|
2828
|
-
@switch (column.getFilterType()) { @case ('list') {
|
|
2744
|
+
@switch (column().getFilterType()) { @case ('list') {
|
|
2829
2745
|
<select-filter
|
|
2830
2746
|
[query]="query"
|
|
2831
|
-
[class]="inputClass"
|
|
2832
|
-
[column]="column"
|
|
2747
|
+
[class]="inputClass()"
|
|
2748
|
+
[column]="column()"
|
|
2833
2749
|
(filter)="onFilter($event)"
|
|
2834
2750
|
>
|
|
2835
2751
|
</select-filter>
|
|
2836
2752
|
} @case ('checkbox') {
|
|
2837
2753
|
<checkbox-filter
|
|
2838
2754
|
[query]="query"
|
|
2839
|
-
[class]="inputClass"
|
|
2840
|
-
[column]="column"
|
|
2755
|
+
[class]="inputClass()"
|
|
2756
|
+
[column]="column()"
|
|
2841
2757
|
(filter)="onFilter($event)"
|
|
2842
2758
|
>
|
|
2843
2759
|
</checkbox-filter>
|
|
2844
2760
|
} @default {
|
|
2845
2761
|
<input-filter
|
|
2846
2762
|
[query]="query"
|
|
2847
|
-
[class]="inputClass"
|
|
2848
|
-
[column]="column"
|
|
2763
|
+
[class]="inputClass()"
|
|
2764
|
+
[column]="column()"
|
|
2849
2765
|
(filter)="onFilter($event)"
|
|
2850
2766
|
>
|
|
2851
2767
|
</input-filter>
|
|
@@ -2866,8 +2782,8 @@ class FilterComponent extends FilterDefault {
|
|
|
2866
2782
|
if (!changes['source'].firstChange && this.dataChangedSub) {
|
|
2867
2783
|
this.dataChangedSub.unsubscribe();
|
|
2868
2784
|
}
|
|
2869
|
-
this.dataChangedSub = this.source.onChanged().subscribe((dataChanges) => {
|
|
2870
|
-
const filterConf = this.source.getFilter();
|
|
2785
|
+
this.dataChangedSub = this.source().onChanged().subscribe((dataChanges) => {
|
|
2786
|
+
const filterConf = this.source().getFilter();
|
|
2871
2787
|
if (filterConf && filterConf.filters && filterConf.filters.length === 0) {
|
|
2872
2788
|
this.query = '';
|
|
2873
2789
|
// add a check for existing filters an set the query if one exists for this column
|
|
@@ -2875,7 +2791,7 @@ class FilterComponent extends FilterDefault {
|
|
|
2875
2791
|
}
|
|
2876
2792
|
else if (filterConf && filterConf.filters && filterConf.filters.length > 0) {
|
|
2877
2793
|
filterConf.filters.forEach((k, v) => {
|
|
2878
|
-
if (k.field == this.column.id) {
|
|
2794
|
+
if (k.field == this.column().id) {
|
|
2879
2795
|
this.query = k.search;
|
|
2880
2796
|
}
|
|
2881
2797
|
});
|
|
@@ -2885,24 +2801,24 @@ class FilterComponent extends FilterDefault {
|
|
|
2885
2801
|
}
|
|
2886
2802
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2887
2803
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: FilterComponent, isStandalone: true, selector: "ng2-smart-table-filter", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
2888
|
-
@if (column.isFilterable) {
|
|
2804
|
+
@if (column().isFilterable) {
|
|
2889
2805
|
<div class="ng2-smart-filter">
|
|
2890
|
-
@switch (column.getFilterType()) {
|
|
2806
|
+
@switch (column().getFilterType()) {
|
|
2891
2807
|
@case ('custom') {
|
|
2892
2808
|
<custom-table-filter
|
|
2893
2809
|
[query]="query"
|
|
2894
|
-
[column]="column"
|
|
2895
|
-
[source]="source"
|
|
2896
|
-
[inputClass]="inputClass"
|
|
2810
|
+
[column]="column()"
|
|
2811
|
+
[source]="source()"
|
|
2812
|
+
[inputClass]="inputClass()"
|
|
2897
2813
|
(filter)="onFilter($event)">
|
|
2898
2814
|
</custom-table-filter>
|
|
2899
2815
|
}
|
|
2900
2816
|
@default {
|
|
2901
2817
|
<default-table-filter
|
|
2902
2818
|
[query]="query"
|
|
2903
|
-
[column]="column"
|
|
2904
|
-
[source]="source"
|
|
2905
|
-
[inputClass]="inputClass"
|
|
2819
|
+
[column]="column()"
|
|
2820
|
+
[source]="source()"
|
|
2821
|
+
[inputClass]="inputClass()"
|
|
2906
2822
|
(filter)="onFilter($event)">
|
|
2907
2823
|
</default-table-filter>
|
|
2908
2824
|
}
|
|
@@ -2914,24 +2830,24 @@ class FilterComponent extends FilterDefault {
|
|
|
2914
2830
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FilterComponent, decorators: [{
|
|
2915
2831
|
type: Component,
|
|
2916
2832
|
args: [{ selector: 'ng2-smart-table-filter', template: `
|
|
2917
|
-
@if (column.isFilterable) {
|
|
2833
|
+
@if (column().isFilterable) {
|
|
2918
2834
|
<div class="ng2-smart-filter">
|
|
2919
|
-
@switch (column.getFilterType()) {
|
|
2835
|
+
@switch (column().getFilterType()) {
|
|
2920
2836
|
@case ('custom') {
|
|
2921
2837
|
<custom-table-filter
|
|
2922
2838
|
[query]="query"
|
|
2923
|
-
[column]="column"
|
|
2924
|
-
[source]="source"
|
|
2925
|
-
[inputClass]="inputClass"
|
|
2839
|
+
[column]="column()"
|
|
2840
|
+
[source]="source()"
|
|
2841
|
+
[inputClass]="inputClass()"
|
|
2926
2842
|
(filter)="onFilter($event)">
|
|
2927
2843
|
</custom-table-filter>
|
|
2928
2844
|
}
|
|
2929
2845
|
@default {
|
|
2930
2846
|
<default-table-filter
|
|
2931
2847
|
[query]="query"
|
|
2932
|
-
[column]="column"
|
|
2933
|
-
[source]="source"
|
|
2934
|
-
[inputClass]="inputClass"
|
|
2848
|
+
[column]="column()"
|
|
2849
|
+
[source]="source()"
|
|
2850
|
+
[inputClass]="inputClass()"
|
|
2935
2851
|
(filter)="onFilter($event)">
|
|
2936
2852
|
</default-table-filter>
|
|
2937
2853
|
}
|
|
@@ -2943,37 +2859,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2943
2859
|
|
|
2944
2860
|
class AddButtonComponent {
|
|
2945
2861
|
constructor() {
|
|
2946
|
-
this.
|
|
2862
|
+
this.grid = input.required();
|
|
2863
|
+
this.source = input.required();
|
|
2947
2864
|
this.create = output();
|
|
2948
|
-
this.isActionAdd =
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
this.
|
|
2956
|
-
|
|
2865
|
+
this.isActionAdd = computed(() => {
|
|
2866
|
+
const actions = this.grid().settings().actions;
|
|
2867
|
+
if (!actions) {
|
|
2868
|
+
return false;
|
|
2869
|
+
}
|
|
2870
|
+
return !!actions.add;
|
|
2871
|
+
});
|
|
2872
|
+
this.addNewButtonContent = computed(() => {
|
|
2873
|
+
const addParams = this.grid().settings()?.add;
|
|
2874
|
+
if (!addParams) {
|
|
2875
|
+
return "Add New";
|
|
2876
|
+
}
|
|
2877
|
+
return addParams?.addButtonContent || "Add New";
|
|
2878
|
+
});
|
|
2957
2879
|
}
|
|
2958
2880
|
onAdd(event) {
|
|
2959
2881
|
event.preventDefault();
|
|
2960
2882
|
event.stopPropagation();
|
|
2961
|
-
if (this.grid.getSetting("mode") === "external") {
|
|
2883
|
+
if (this.grid().getSetting("mode") === "external") {
|
|
2962
2884
|
this.create.emit({
|
|
2963
|
-
source: this.source,
|
|
2885
|
+
source: this.source(),
|
|
2964
2886
|
});
|
|
2965
2887
|
}
|
|
2966
2888
|
else {
|
|
2967
|
-
this.grid.createFormShown = true;
|
|
2889
|
+
this.grid().createFormShown = true;
|
|
2968
2890
|
}
|
|
2969
2891
|
}
|
|
2970
2892
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AddButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2971
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AddButtonComponent, isStandalone: true, selector: "[ng2-st-add-button]", inputs: { grid: "grid", source: "source" }, outputs: { create: "create" },
|
|
2972
|
-
@if (isActionAdd) {
|
|
2893
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AddButtonComponent, isStandalone: true, selector: "[ng2-st-add-button]", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { create: "create" }, host: { classAttribute: "ng2-smart-actions-title ng2-smart-actions-title-add" }, ngImport: i0, template: `
|
|
2894
|
+
@if (isActionAdd()) {
|
|
2973
2895
|
<a
|
|
2974
2896
|
href="#"
|
|
2975
2897
|
class="ng2-smart-action ng2-smart-action-add-add"
|
|
2976
|
-
[innerHTML]="addNewButtonContent"
|
|
2898
|
+
[innerHTML]="addNewButtonContent()"
|
|
2977
2899
|
(click)="onAdd($event)"
|
|
2978
2900
|
></a>
|
|
2979
2901
|
}
|
|
@@ -2984,91 +2906,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2984
2906
|
args: [{
|
|
2985
2907
|
selector: "[ng2-st-add-button]",
|
|
2986
2908
|
template: `
|
|
2987
|
-
@if (isActionAdd) {
|
|
2909
|
+
@if (isActionAdd()) {
|
|
2988
2910
|
<a
|
|
2989
2911
|
href="#"
|
|
2990
2912
|
class="ng2-smart-action ng2-smart-action-add-add"
|
|
2991
|
-
[innerHTML]="addNewButtonContent"
|
|
2913
|
+
[innerHTML]="addNewButtonContent()"
|
|
2992
2914
|
(click)="onAdd($event)"
|
|
2993
2915
|
></a>
|
|
2994
2916
|
}
|
|
2995
2917
|
`,
|
|
2918
|
+
host: {
|
|
2919
|
+
class: "ng2-smart-actions-title ng2-smart-actions-title-add",
|
|
2920
|
+
},
|
|
2996
2921
|
standalone: true,
|
|
2997
2922
|
}]
|
|
2998
|
-
}]
|
|
2999
|
-
type: Input
|
|
3000
|
-
}], source: [{
|
|
3001
|
-
type: Input
|
|
3002
|
-
}] } });
|
|
2923
|
+
}] });
|
|
3003
2924
|
|
|
3004
|
-
class
|
|
2925
|
+
class TheadFiltersRowComponent {
|
|
3005
2926
|
constructor() {
|
|
2927
|
+
this.grid = input.required();
|
|
2928
|
+
this.source = input.required();
|
|
3006
2929
|
this.create = output();
|
|
3007
2930
|
this.filter = output();
|
|
3008
|
-
this.
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
}
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFitlersRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3023
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TheadFitlersRowComponent, isStandalone: true, selector: "[ng2-st-thead-filters-row]", inputs: { grid: "grid", source: "source" }, outputs: { create: "create", filter: "filter" }, usesOnChanges: true, ngImport: i0, template: `
|
|
3024
|
-
@if (isMultiSelectVisible) {
|
|
2931
|
+
this.filterInputClass = computed(() => {
|
|
2932
|
+
const filterOptions = this.grid().settings()?.filter;
|
|
2933
|
+
if (!filterOptions) {
|
|
2934
|
+
return "";
|
|
2935
|
+
}
|
|
2936
|
+
return filterOptions.inputClass || "";
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
getVisibleColumns() {
|
|
2940
|
+
return (this.grid().getColumns() || []).filter((column) => !column.hide);
|
|
2941
|
+
}
|
|
2942
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFiltersRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2943
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TheadFiltersRowComponent, isStandalone: true, selector: "[ng2-st-thead-filters-row]", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { create: "create", filter: "filter" }, ngImport: i0, template: `
|
|
2944
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3025
2945
|
<th></th>
|
|
3026
|
-
} @if (
|
|
3027
|
-
<th
|
|
3028
|
-
|
|
2946
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2947
|
+
<th
|
|
2948
|
+
ng2-st-add-button
|
|
2949
|
+
[source]="source()"
|
|
2950
|
+
[grid]="grid()"
|
|
2951
|
+
(create)="create.emit($event)"
|
|
2952
|
+
></th>
|
|
2953
|
+
} @for (column of getVisibleColumns(); track column.id) {
|
|
3029
2954
|
<th class="ng2-smart-th {{ column.id }}">
|
|
3030
2955
|
<ng2-smart-table-filter
|
|
3031
|
-
[source]="source"
|
|
2956
|
+
[source]="source()"
|
|
3032
2957
|
[column]="column"
|
|
3033
|
-
[inputClass]="filterInputClass"
|
|
2958
|
+
[inputClass]="filterInputClass()"
|
|
3034
2959
|
(filter)="filter.emit($event)"
|
|
3035
2960
|
>
|
|
3036
2961
|
</ng2-smart-table-filter>
|
|
3037
2962
|
</th>
|
|
3038
|
-
} @if (
|
|
2963
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3039
2964
|
<th
|
|
3040
2965
|
ng2-st-add-button
|
|
3041
|
-
[grid]="grid"
|
|
3042
|
-
[source]="source"
|
|
2966
|
+
[grid]="grid()"
|
|
2967
|
+
[source]="source()"
|
|
3043
2968
|
(create)="create.emit($event)"
|
|
3044
2969
|
></th>
|
|
3045
2970
|
}
|
|
3046
2971
|
`, isInline: true, dependencies: [{ kind: "component", type: AddButtonComponent, selector: "[ng2-st-add-button]", inputs: ["grid", "source"], outputs: ["create"] }, { kind: "component", type: FilterComponent, selector: "ng2-smart-table-filter" }] }); }
|
|
3047
2972
|
}
|
|
3048
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
|
2973
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFiltersRowComponent, decorators: [{
|
|
3049
2974
|
type: Component,
|
|
3050
2975
|
args: [{
|
|
3051
2976
|
selector: "[ng2-st-thead-filters-row]",
|
|
3052
2977
|
template: `
|
|
3053
|
-
@if (isMultiSelectVisible) {
|
|
2978
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3054
2979
|
<th></th>
|
|
3055
|
-
} @if (
|
|
3056
|
-
<th
|
|
3057
|
-
|
|
2980
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2981
|
+
<th
|
|
2982
|
+
ng2-st-add-button
|
|
2983
|
+
[source]="source()"
|
|
2984
|
+
[grid]="grid()"
|
|
2985
|
+
(create)="create.emit($event)"
|
|
2986
|
+
></th>
|
|
2987
|
+
} @for (column of getVisibleColumns(); track column.id) {
|
|
3058
2988
|
<th class="ng2-smart-th {{ column.id }}">
|
|
3059
2989
|
<ng2-smart-table-filter
|
|
3060
|
-
[source]="source"
|
|
2990
|
+
[source]="source()"
|
|
3061
2991
|
[column]="column"
|
|
3062
|
-
[inputClass]="filterInputClass"
|
|
2992
|
+
[inputClass]="filterInputClass()"
|
|
3063
2993
|
(filter)="filter.emit($event)"
|
|
3064
2994
|
>
|
|
3065
2995
|
</ng2-smart-table-filter>
|
|
3066
2996
|
</th>
|
|
3067
|
-
} @if (
|
|
2997
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3068
2998
|
<th
|
|
3069
2999
|
ng2-st-add-button
|
|
3070
|
-
[grid]="grid"
|
|
3071
|
-
[source]="source"
|
|
3000
|
+
[grid]="grid()"
|
|
3001
|
+
[source]="source()"
|
|
3072
3002
|
(create)="create.emit($event)"
|
|
3073
3003
|
></th>
|
|
3074
3004
|
}
|
|
@@ -3076,35 +3006,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3076
3006
|
standalone: true,
|
|
3077
3007
|
imports: [AddButtonComponent, FilterComponent],
|
|
3078
3008
|
}]
|
|
3079
|
-
}]
|
|
3080
|
-
type: Input
|
|
3081
|
-
}], source: [{
|
|
3082
|
-
type: Input
|
|
3083
|
-
}] } });
|
|
3009
|
+
}] });
|
|
3084
3010
|
|
|
3085
3011
|
class ActionsComponent {
|
|
3086
3012
|
constructor() {
|
|
3013
|
+
this.grid = input.required();
|
|
3087
3014
|
this.create = output();
|
|
3088
|
-
this.createButtonContent =
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3015
|
+
this.createButtonContent = computed(() => {
|
|
3016
|
+
const addOptions = this.grid().settings().add;
|
|
3017
|
+
if (!addOptions) {
|
|
3018
|
+
return "Create";
|
|
3019
|
+
}
|
|
3020
|
+
return addOptions?.createButtonContent || "Create";
|
|
3021
|
+
});
|
|
3022
|
+
this.cancelButtonContent = computed(() => {
|
|
3023
|
+
const addOptions = this.grid().settings().add;
|
|
3024
|
+
if (!addOptions) {
|
|
3025
|
+
return "Cancel";
|
|
3026
|
+
}
|
|
3027
|
+
return addOptions?.cancelButtonContent || "Cancel";
|
|
3028
|
+
});
|
|
3094
3029
|
}
|
|
3095
3030
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3096
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3031
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: ActionsComponent, isStandalone: true, selector: "ng2-st-actions", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { create: "create" }, ngImport: i0, template: `
|
|
3097
3032
|
<a
|
|
3098
3033
|
href="#"
|
|
3099
3034
|
class="ng2-smart-action ng2-smart-action-add-create"
|
|
3100
|
-
[innerHTML]="createButtonContent"
|
|
3035
|
+
[innerHTML]="createButtonContent()"
|
|
3101
3036
|
(click)="$event.preventDefault(); create.emit($event)"
|
|
3102
3037
|
></a>
|
|
3103
3038
|
<a
|
|
3104
3039
|
href="#"
|
|
3105
3040
|
class="ng2-smart-action ng2-smart-action-add-cancel"
|
|
3106
|
-
[innerHTML]="cancelButtonContent"
|
|
3107
|
-
(click)="$event.preventDefault(); grid.createFormShown = false"
|
|
3041
|
+
[innerHTML]="cancelButtonContent()"
|
|
3042
|
+
(click)="$event.preventDefault(); grid().createFormShown = false"
|
|
3108
3043
|
></a>
|
|
3109
3044
|
`, isInline: true }); }
|
|
3110
3045
|
}
|
|
@@ -3116,110 +3051,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3116
3051
|
<a
|
|
3117
3052
|
href="#"
|
|
3118
3053
|
class="ng2-smart-action ng2-smart-action-add-create"
|
|
3119
|
-
[innerHTML]="createButtonContent"
|
|
3054
|
+
[innerHTML]="createButtonContent()"
|
|
3120
3055
|
(click)="$event.preventDefault(); create.emit($event)"
|
|
3121
3056
|
></a>
|
|
3122
3057
|
<a
|
|
3123
3058
|
href="#"
|
|
3124
3059
|
class="ng2-smart-action ng2-smart-action-add-cancel"
|
|
3125
|
-
[innerHTML]="cancelButtonContent"
|
|
3126
|
-
(click)="$event.preventDefault(); grid.createFormShown = false"
|
|
3060
|
+
[innerHTML]="cancelButtonContent()"
|
|
3061
|
+
(click)="$event.preventDefault(); grid().createFormShown = false"
|
|
3127
3062
|
></a>
|
|
3128
3063
|
`,
|
|
3129
3064
|
standalone: true,
|
|
3130
3065
|
}]
|
|
3131
|
-
}]
|
|
3132
|
-
type: Input
|
|
3133
|
-
}] } });
|
|
3066
|
+
}] });
|
|
3134
3067
|
|
|
3135
3068
|
class TheadFormRowComponent {
|
|
3136
3069
|
constructor() {
|
|
3070
|
+
this.grid = input.required();
|
|
3137
3071
|
this.create = output();
|
|
3138
|
-
this.
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3072
|
+
this.addInputClass = computed(() => {
|
|
3073
|
+
const addOptions = this.grid().settings()?.add;
|
|
3074
|
+
if (!addOptions) {
|
|
3075
|
+
return "";
|
|
3076
|
+
}
|
|
3077
|
+
return addOptions.inputClass || "";
|
|
3078
|
+
});
|
|
3142
3079
|
}
|
|
3143
3080
|
onCreate(event) {
|
|
3144
3081
|
event.stopPropagation();
|
|
3145
|
-
this.grid.create(this.grid.getNewRow(), this.createConfirm);
|
|
3146
|
-
}
|
|
3147
|
-
ngOnChanges() {
|
|
3148
|
-
this.isMultiSelectVisible = this.grid.isMultiSelectVisible();
|
|
3149
|
-
this.showActionColumnLeft = this.grid.showActionColumn("left");
|
|
3150
|
-
this.showActionColumnRight = this.grid.showActionColumn("right");
|
|
3151
|
-
this.addInputClass = this.grid.getSetting("add.inputClass", "");
|
|
3082
|
+
this.grid().create(this.grid().getNewRow(), this.createConfirm);
|
|
3152
3083
|
}
|
|
3153
|
-
getVisibleCells(
|
|
3154
|
-
return (
|
|
3084
|
+
getVisibleCells() {
|
|
3085
|
+
return (this.grid().getNewRow().getCells() || []).filter((cell) => !cell.getColumn().hide);
|
|
3155
3086
|
}
|
|
3156
3087
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFormRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3157
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TheadFormRowComponent, isStandalone: true, selector: "[ng2-st-thead-form-row]", inputs: { grid: "grid",
|
|
3158
|
-
@if (grid.isMultiSelectVisible()) {
|
|
3088
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TheadFormRowComponent, isStandalone: true, selector: "[ng2-st-thead-form-row]", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null }, createConfirm: { classPropertyName: "createConfirm", publicName: "createConfirm", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { create: "create" }, ngImport: i0, template: `
|
|
3089
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3159
3090
|
<td></td>
|
|
3160
|
-
} @if (
|
|
3091
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
3161
3092
|
<td class="ng2-smart-actions">
|
|
3162
3093
|
<ng2-st-actions
|
|
3163
|
-
[grid]="grid"
|
|
3094
|
+
[grid]="grid()"
|
|
3164
3095
|
(create)="onCreate($event)"
|
|
3165
3096
|
></ng2-st-actions>
|
|
3166
3097
|
</td>
|
|
3167
|
-
} @for (cell of getVisibleCells(
|
|
3168
|
-
cell.getId()) {
|
|
3098
|
+
} @for (cell of getVisibleCells(); track cell.getId()) {
|
|
3169
3099
|
<td>
|
|
3170
3100
|
<ng2-smart-table-cell
|
|
3171
3101
|
[cell]="cell"
|
|
3172
|
-
[
|
|
3173
|
-
[
|
|
3174
|
-
[createConfirm]="createConfirm"
|
|
3175
|
-
[inputClass]="addInputClass"
|
|
3176
|
-
[isInEditing]="grid.getNewRow().isInEditing"
|
|
3177
|
-
(edited)="onCreate($event)"
|
|
3102
|
+
[inputClass]="addInputClass()"
|
|
3103
|
+
[isInEditing]="grid().getNewRow().isInEditing"
|
|
3178
3104
|
>
|
|
3179
3105
|
</ng2-smart-table-cell>
|
|
3180
3106
|
</td>
|
|
3181
|
-
} @if (
|
|
3107
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3182
3108
|
<td class="ng2-smart-actions">
|
|
3183
3109
|
<ng2-st-actions
|
|
3184
|
-
[grid]="grid"
|
|
3110
|
+
[grid]="grid()"
|
|
3185
3111
|
(create)="onCreate($event)"
|
|
3186
3112
|
></ng2-st-actions>
|
|
3187
3113
|
</td>
|
|
3188
3114
|
}
|
|
3189
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ActionsComponent, selector: "ng2-st-actions", inputs: ["grid"], outputs: ["create"] }, { kind: "component", type: CellComponent, selector: "ng2-smart-table-cell", inputs: ["
|
|
3115
|
+
`, isInline: true, dependencies: [{ kind: "component", type: ActionsComponent, selector: "ng2-st-actions", inputs: ["grid"], outputs: ["create"] }, { kind: "component", type: CellComponent, selector: "ng2-smart-table-cell", inputs: ["cell", "inputClass", "isInEditing"] }] }); }
|
|
3190
3116
|
}
|
|
3191
3117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFormRowComponent, decorators: [{
|
|
3192
3118
|
type: Component,
|
|
3193
3119
|
args: [{
|
|
3194
3120
|
selector: "[ng2-st-thead-form-row]",
|
|
3195
3121
|
template: `
|
|
3196
|
-
@if (grid.isMultiSelectVisible()) {
|
|
3122
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3197
3123
|
<td></td>
|
|
3198
|
-
} @if (
|
|
3124
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
3199
3125
|
<td class="ng2-smart-actions">
|
|
3200
3126
|
<ng2-st-actions
|
|
3201
|
-
[grid]="grid"
|
|
3127
|
+
[grid]="grid()"
|
|
3202
3128
|
(create)="onCreate($event)"
|
|
3203
3129
|
></ng2-st-actions>
|
|
3204
3130
|
</td>
|
|
3205
|
-
} @for (cell of getVisibleCells(
|
|
3206
|
-
cell.getId()) {
|
|
3131
|
+
} @for (cell of getVisibleCells(); track cell.getId()) {
|
|
3207
3132
|
<td>
|
|
3208
3133
|
<ng2-smart-table-cell
|
|
3209
3134
|
[cell]="cell"
|
|
3210
|
-
[
|
|
3211
|
-
[
|
|
3212
|
-
[createConfirm]="createConfirm"
|
|
3213
|
-
[inputClass]="addInputClass"
|
|
3214
|
-
[isInEditing]="grid.getNewRow().isInEditing"
|
|
3215
|
-
(edited)="onCreate($event)"
|
|
3135
|
+
[inputClass]="addInputClass()"
|
|
3136
|
+
[isInEditing]="grid().getNewRow().isInEditing"
|
|
3216
3137
|
>
|
|
3217
3138
|
</ng2-smart-table-cell>
|
|
3218
3139
|
</td>
|
|
3219
|
-
} @if (
|
|
3140
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3220
3141
|
<td class="ng2-smart-actions">
|
|
3221
3142
|
<ng2-st-actions
|
|
3222
|
-
[grid]="grid"
|
|
3143
|
+
[grid]="grid()"
|
|
3223
3144
|
(create)="onCreate($event)"
|
|
3224
3145
|
></ng2-st-actions>
|
|
3225
3146
|
</td>
|
|
@@ -3228,38 +3149,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3228
3149
|
standalone: true,
|
|
3229
3150
|
imports: [ActionsComponent, CellComponent],
|
|
3230
3151
|
}]
|
|
3231
|
-
}], propDecorators: {
|
|
3232
|
-
type: Input
|
|
3233
|
-
}], row: [{
|
|
3234
|
-
type: Input
|
|
3235
|
-
}], createConfirm: [{
|
|
3152
|
+
}], propDecorators: { createConfirm: [{
|
|
3236
3153
|
type: Input
|
|
3237
3154
|
}] } });
|
|
3238
3155
|
|
|
3239
3156
|
class ActionsTitleComponent {
|
|
3240
3157
|
constructor() {
|
|
3241
|
-
this.
|
|
3242
|
-
this.actionsColumnTitle =
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3158
|
+
this.grid = input.required();
|
|
3159
|
+
this.actionsColumnTitle = computed(() => {
|
|
3160
|
+
const actions = this.grid().settings().actions;
|
|
3161
|
+
if (!actions) {
|
|
3162
|
+
return "Actions";
|
|
3163
|
+
}
|
|
3164
|
+
return actions.columnTitle || "Actions";
|
|
3165
|
+
});
|
|
3249
3166
|
}
|
|
3250
3167
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ActionsTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3251
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3168
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: ActionsTitleComponent, isStandalone: true, selector: "[ng2-st-actions-title]", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "ng2-smart-actions" }, ngImport: i0, template: ` <div class="ng2-smart-title">{{ actionsColumnTitle() }}</div> `, isInline: true }); }
|
|
3252
3169
|
}
|
|
3253
3170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ActionsTitleComponent, decorators: [{
|
|
3254
3171
|
type: Component,
|
|
3255
3172
|
args: [{
|
|
3256
3173
|
selector: "[ng2-st-actions-title]",
|
|
3257
|
-
template: ` <div class="ng2-smart-title">{{ actionsColumnTitle }}</div> `,
|
|
3174
|
+
template: ` <div class="ng2-smart-title">{{ actionsColumnTitle() }}</div> `,
|
|
3258
3175
|
standalone: true,
|
|
3176
|
+
host: {
|
|
3177
|
+
class: "ng2-smart-actions",
|
|
3178
|
+
},
|
|
3259
3179
|
}]
|
|
3260
|
-
}]
|
|
3261
|
-
type: Input
|
|
3262
|
-
}] } });
|
|
3180
|
+
}] });
|
|
3263
3181
|
|
|
3264
3182
|
class CheckboxSelectAllComponent {
|
|
3265
3183
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CheckboxSelectAllComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -3404,45 +3322,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3404
3322
|
|
|
3405
3323
|
class TheadTitlesRowComponent {
|
|
3406
3324
|
constructor() {
|
|
3325
|
+
this.grid = input.required();
|
|
3326
|
+
this.source = input.required();
|
|
3407
3327
|
this.sort = output();
|
|
3408
3328
|
this.selectAllRows = output();
|
|
3409
|
-
this.isMultiSelectVisible = false;
|
|
3410
|
-
this.showActionColumnLeft = false;
|
|
3411
|
-
this.showActionColumnRight = false;
|
|
3412
3329
|
}
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
this.showActionColumnLeft = this.grid.showActionColumn("left");
|
|
3416
|
-
this.showActionColumnRight = this.grid.showActionColumn("right");
|
|
3417
|
-
}
|
|
3418
|
-
getVisibleColumns(columns) {
|
|
3419
|
-
return (columns || []).filter((column) => !column.hide);
|
|
3330
|
+
getVisibleColumns() {
|
|
3331
|
+
return (this.grid().getColumns() || []).filter((column) => !column.hide);
|
|
3420
3332
|
}
|
|
3421
3333
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadTitlesRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3422
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TheadTitlesRowComponent, isStandalone: true, selector: "[ng2-st-thead-titles-row]", inputs: { grid: "grid", source: "source" }, outputs: { sort: "sort", selectAllRows: "selectAllRows" },
|
|
3423
|
-
@if (isMultiSelectVisible) {
|
|
3334
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TheadTitlesRowComponent, isStandalone: true, selector: "[ng2-st-thead-titles-row]", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { sort: "sort", selectAllRows: "selectAllRows" }, ngImport: i0, template: `
|
|
3335
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3424
3336
|
<th
|
|
3425
3337
|
ng2-st-checkbox-select-all
|
|
3426
|
-
[grid]="grid"
|
|
3427
|
-
[source]="source"
|
|
3338
|
+
[grid]="grid()"
|
|
3339
|
+
[source]="source()"
|
|
3428
3340
|
(click)="selectAllRows.emit($event)"
|
|
3429
3341
|
></th>
|
|
3430
|
-
} @if (
|
|
3431
|
-
|
|
3432
|
-
|
|
3342
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
3343
|
+
|
|
3344
|
+
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
3345
|
+
} @for (column of getVisibleColumns(); track column.id) {
|
|
3433
3346
|
<th
|
|
3434
3347
|
class="ng2-smart-th {{ column.id }}"
|
|
3435
3348
|
[class]="column.class"
|
|
3436
3349
|
[style.width]="column.width"
|
|
3437
3350
|
>
|
|
3438
3351
|
<ng2-st-column-title
|
|
3439
|
-
[source]="source"
|
|
3352
|
+
[source]="source()"
|
|
3440
3353
|
[column]="column"
|
|
3441
3354
|
(sort)="sort.emit($event)"
|
|
3442
3355
|
></ng2-st-column-title>
|
|
3443
3356
|
</th>
|
|
3444
|
-
} @if (
|
|
3445
|
-
<th ng2-st-actions-title [grid]="grid"></th>
|
|
3357
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3358
|
+
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
3446
3359
|
}
|
|
3447
3360
|
`, isInline: true, dependencies: [{ kind: "component", type: CheckboxSelectAllComponent, selector: "[ng2-st-checkbox-select-all]", inputs: ["grid", "source"] }, { kind: "component", type: ActionsTitleComponent, selector: "[ng2-st-actions-title]", inputs: ["grid"] }, { kind: "component", type: ColumnTitleComponent, selector: "ng2-st-column-title", inputs: ["column", "source"], outputs: ["sort"] }] }); }
|
|
3448
3361
|
}
|
|
@@ -3451,29 +3364,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3451
3364
|
args: [{
|
|
3452
3365
|
selector: "[ng2-st-thead-titles-row]",
|
|
3453
3366
|
template: `
|
|
3454
|
-
@if (isMultiSelectVisible) {
|
|
3367
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3455
3368
|
<th
|
|
3456
3369
|
ng2-st-checkbox-select-all
|
|
3457
|
-
[grid]="grid"
|
|
3458
|
-
[source]="source"
|
|
3370
|
+
[grid]="grid()"
|
|
3371
|
+
[source]="source()"
|
|
3459
3372
|
(click)="selectAllRows.emit($event)"
|
|
3460
3373
|
></th>
|
|
3461
|
-
} @if (
|
|
3462
|
-
|
|
3463
|
-
|
|
3374
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
3375
|
+
|
|
3376
|
+
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
3377
|
+
} @for (column of getVisibleColumns(); track column.id) {
|
|
3464
3378
|
<th
|
|
3465
3379
|
class="ng2-smart-th {{ column.id }}"
|
|
3466
3380
|
[class]="column.class"
|
|
3467
3381
|
[style.width]="column.width"
|
|
3468
3382
|
>
|
|
3469
3383
|
<ng2-st-column-title
|
|
3470
|
-
[source]="source"
|
|
3384
|
+
[source]="source()"
|
|
3471
3385
|
[column]="column"
|
|
3472
3386
|
(sort)="sort.emit($event)"
|
|
3473
3387
|
></ng2-st-column-title>
|
|
3474
3388
|
</th>
|
|
3475
|
-
} @if (
|
|
3476
|
-
<th ng2-st-actions-title [grid]="grid"></th>
|
|
3389
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3390
|
+
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
3477
3391
|
}
|
|
3478
3392
|
`,
|
|
3479
3393
|
standalone: true,
|
|
@@ -3483,36 +3397,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3483
3397
|
ColumnTitleComponent,
|
|
3484
3398
|
],
|
|
3485
3399
|
}]
|
|
3486
|
-
}]
|
|
3487
|
-
type: Input
|
|
3488
|
-
}], source: [{
|
|
3489
|
-
type: Input
|
|
3490
|
-
}] } });
|
|
3400
|
+
}] });
|
|
3491
3401
|
|
|
3492
3402
|
class Ng2SmartTableTheadComponent {
|
|
3493
3403
|
constructor() {
|
|
3404
|
+
this.grid = input.required();
|
|
3405
|
+
this.source = input.required();
|
|
3494
3406
|
this.sort = output();
|
|
3495
3407
|
this.selectAllRows = output();
|
|
3496
3408
|
this.create = output();
|
|
3497
3409
|
this.filter = output();
|
|
3498
|
-
this.isHideHeader =
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3410
|
+
this.isHideHeader = computed(() => {
|
|
3411
|
+
return this.grid().settings()?.hideHeader || false;
|
|
3412
|
+
});
|
|
3413
|
+
this.isHideSubHeader = computed(() => {
|
|
3414
|
+
return this.grid().settings()?.hideSubHeader || false;
|
|
3415
|
+
});
|
|
3504
3416
|
}
|
|
3505
3417
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableTheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3506
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: Ng2SmartTableTheadComponent, isStandalone: true, selector: "[ng2-st-thead]", inputs: { grid: "grid", source: "source", createConfirm: "createConfirm" }, outputs: { sort: "sort", selectAllRows: "selectAllRows", create: "create", filter: "filter" },
|
|
3418
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: Ng2SmartTableTheadComponent, isStandalone: true, selector: "[ng2-st-thead]", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, createConfirm: { classPropertyName: "createConfirm", publicName: "createConfirm", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { sort: "sort", selectAllRows: "selectAllRows", create: "create", filter: "filter" }, ngImport: i0, template: "@if (!isHideHeader()) {\n <tr ng2-st-thead-titles-row\n class=\"ng2-smart-titles\"\n [grid]=\"grid()\"\n [source]=\"source()\"\n (sort)=\"sort.emit($event)\"\n (selectAllRows)=\"selectAllRows.emit($event)\">\n </tr>\n}\n\n@if (!isHideSubHeader()) {\n <tr ng2-st-thead-filters-row\n class=\"ng2-smart-filters\"\n [grid]=\"grid()\"\n [source]=\"source()\"\n (create)=\"create.emit($event)\"\n (filter)=\"filter.emit($event)\">\n </tr>\n}\n\n@if (grid().createFormShown) {\n <tr ng2-st-thead-form-row\n [grid]=\"grid()\"\n [createConfirm]=\"createConfirm\">\n </tr>\n}\n", dependencies: [{ kind: "component", type: TheadTitlesRowComponent, selector: "[ng2-st-thead-titles-row]", inputs: ["grid", "source"], outputs: ["sort", "selectAllRows"] }, { kind: "component", type: TheadFiltersRowComponent, selector: "[ng2-st-thead-filters-row]", inputs: ["grid", "source"], outputs: ["create", "filter"] }, { kind: "component", type: TheadFormRowComponent, selector: "[ng2-st-thead-form-row]", inputs: ["grid", "createConfirm"], outputs: ["create"] }] }); }
|
|
3507
3419
|
}
|
|
3508
3420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableTheadComponent, decorators: [{
|
|
3509
3421
|
type: Component,
|
|
3510
|
-
args: [{ selector:
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3422
|
+
args: [{ selector: "[ng2-st-thead]", standalone: true, imports: [
|
|
3423
|
+
TheadTitlesRowComponent,
|
|
3424
|
+
TheadFiltersRowComponent,
|
|
3425
|
+
TheadFormRowComponent,
|
|
3426
|
+
], template: "@if (!isHideHeader()) {\n <tr ng2-st-thead-titles-row\n class=\"ng2-smart-titles\"\n [grid]=\"grid()\"\n [source]=\"source()\"\n (sort)=\"sort.emit($event)\"\n (selectAllRows)=\"selectAllRows.emit($event)\">\n </tr>\n}\n\n@if (!isHideSubHeader()) {\n <tr ng2-st-thead-filters-row\n class=\"ng2-smart-filters\"\n [grid]=\"grid()\"\n [source]=\"source()\"\n (create)=\"create.emit($event)\"\n (filter)=\"filter.emit($event)\">\n </tr>\n}\n\n@if (grid().createFormShown) {\n <tr ng2-st-thead-form-row\n [grid]=\"grid()\"\n [createConfirm]=\"createConfirm\">\n </tr>\n}\n" }]
|
|
3427
|
+
}], propDecorators: { createConfirm: [{
|
|
3516
3428
|
type: Input
|
|
3517
3429
|
}] } });
|
|
3518
3430
|
|
|
@@ -3529,66 +3441,26 @@ class Ng2SmartTableComponent {
|
|
|
3529
3441
|
this.deleteConfirm = output();
|
|
3530
3442
|
this.editConfirm = output();
|
|
3531
3443
|
this.createConfirm = output();
|
|
3532
|
-
this.rowHover = output();
|
|
3533
3444
|
this.tableClass = "";
|
|
3534
3445
|
this.tableId = "";
|
|
3535
3446
|
this.perPageSelect = [];
|
|
3536
|
-
this.isHideHeader = false;
|
|
3537
|
-
this.isHideSubHeader = false;
|
|
3538
3447
|
this.isPagerDisplay = false;
|
|
3539
|
-
this.rowClassFunction = () =>
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
columnTitle: "Actions",
|
|
3549
|
-
add: true,
|
|
3550
|
-
edit: true,
|
|
3551
|
-
delete: true,
|
|
3552
|
-
custom: [],
|
|
3553
|
-
position: "left", // left|right
|
|
3554
|
-
},
|
|
3555
|
-
filter: {
|
|
3556
|
-
inputClass: "",
|
|
3557
|
-
},
|
|
3558
|
-
edit: {
|
|
3559
|
-
inputClass: "",
|
|
3560
|
-
editButtonContent: "Edit",
|
|
3561
|
-
saveButtonContent: "Update",
|
|
3562
|
-
cancelButtonContent: "Cancel",
|
|
3563
|
-
confirmSave: false,
|
|
3564
|
-
},
|
|
3565
|
-
add: {
|
|
3566
|
-
inputClass: "",
|
|
3567
|
-
addButtonContent: "Add New",
|
|
3568
|
-
createButtonContent: "Create",
|
|
3569
|
-
cancelButtonContent: "Cancel",
|
|
3570
|
-
confirmCreate: false,
|
|
3571
|
-
},
|
|
3572
|
-
delete: {
|
|
3573
|
-
deleteButtonContent: "Delete",
|
|
3574
|
-
confirmDelete: false,
|
|
3575
|
-
},
|
|
3576
|
-
attr: {
|
|
3577
|
-
id: "",
|
|
3578
|
-
class: "",
|
|
3579
|
-
},
|
|
3580
|
-
noDataMessage: "No data found",
|
|
3581
|
-
columns: [],
|
|
3582
|
-
pager: false,
|
|
3583
|
-
rowClassFunction: () => "",
|
|
3584
|
-
};
|
|
3448
|
+
this.rowClassFunction = () => '';
|
|
3449
|
+
effect(() => {
|
|
3450
|
+
const settings = this.grid.settings();
|
|
3451
|
+
this.tableId = settings.attr?.id || getRandomId();
|
|
3452
|
+
this.tableClass = settings.attr?.class || '';
|
|
3453
|
+
this.isPagerDisplay = this.grid.getSetting("pager.display", false);
|
|
3454
|
+
this.perPageSelect = this.grid.getSetting("pager.perPageSelect");
|
|
3455
|
+
this.rowClassFunction = settings.rowClassFunction || (() => "");
|
|
3456
|
+
});
|
|
3585
3457
|
}
|
|
3586
|
-
ngOnChanges(
|
|
3458
|
+
ngOnChanges({ settings, source }) {
|
|
3587
3459
|
if (this.grid) {
|
|
3588
|
-
if (
|
|
3589
|
-
this.grid.setSettings(this.
|
|
3460
|
+
if (settings) {
|
|
3461
|
+
this.grid.setSettings(this.settings);
|
|
3590
3462
|
}
|
|
3591
|
-
if (
|
|
3463
|
+
if (source) {
|
|
3592
3464
|
this.source = this.prepareSource();
|
|
3593
3465
|
this.grid.setSource(this.source);
|
|
3594
3466
|
}
|
|
@@ -3596,13 +3468,6 @@ class Ng2SmartTableComponent {
|
|
|
3596
3468
|
else {
|
|
3597
3469
|
this.initGrid();
|
|
3598
3470
|
}
|
|
3599
|
-
this.tableId = this.grid.getSetting("attr.id");
|
|
3600
|
-
this.tableClass = this.grid.getSetting("attr.class");
|
|
3601
|
-
this.isHideHeader = this.grid.getSetting("hideHeader");
|
|
3602
|
-
this.isHideSubHeader = this.grid.getSetting("hideSubHeader");
|
|
3603
|
-
this.isPagerDisplay = this.grid.getSetting("pager.display", false);
|
|
3604
|
-
this.perPageSelect = this.grid.getSetting("pager.perPageSelect");
|
|
3605
|
-
this.rowClassFunction = this.grid.getSetting("rowClassFunction", () => "");
|
|
3606
3471
|
}
|
|
3607
3472
|
multipleSelectRow(row) {
|
|
3608
3473
|
this.grid.multipleSelectRow(row);
|
|
@@ -3623,7 +3488,7 @@ class Ng2SmartTableComponent {
|
|
|
3623
3488
|
}
|
|
3624
3489
|
initGrid() {
|
|
3625
3490
|
this.source = this.prepareSource();
|
|
3626
|
-
this.grid = new Grid(this.source, this.
|
|
3491
|
+
this.grid = new Grid(this.source, this.settings);
|
|
3627
3492
|
this.grid.setColumnsSortedEmitter(this.columnsSorted);
|
|
3628
3493
|
}
|
|
3629
3494
|
prepareSource() {
|
|
@@ -3632,9 +3497,6 @@ class Ng2SmartTableComponent {
|
|
|
3632
3497
|
}
|
|
3633
3498
|
return new LocalDataSource();
|
|
3634
3499
|
}
|
|
3635
|
-
prepareSettings() {
|
|
3636
|
-
return deepExtend({}, this.defaultSettings, this.settings);
|
|
3637
|
-
}
|
|
3638
3500
|
emitUserSelectRow(row) {
|
|
3639
3501
|
this.multiRowSelect.emit({
|
|
3640
3502
|
data: row ? row.getData() : null,
|
|
@@ -3644,7 +3506,7 @@ class Ng2SmartTableComponent {
|
|
|
3644
3506
|
});
|
|
3645
3507
|
}
|
|
3646
3508
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3647
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: Ng2SmartTableComponent, isStandalone: true, selector: "ng2-smart-table", inputs: { source: "source", settings: "settings" }, outputs: { multiRowSelect: "multiRowSelect", rowClicked: "rowClicked", columnsSorted: "columnsSorted", delete: "delete", edit: "edit", editCancel: "editCancel", create: "create", custom: "custom", deleteConfirm: "deleteConfirm", editConfirm: "editConfirm", createConfirm: "createConfirm"
|
|
3509
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: Ng2SmartTableComponent, isStandalone: true, selector: "ng2-smart-table", inputs: { source: "source", settings: "settings" }, outputs: { multiRowSelect: "multiRowSelect", rowClicked: "rowClicked", columnsSorted: "columnsSorted", delete: "delete", edit: "edit", editCancel: "editCancel", create: "create", custom: "custom", deleteConfirm: "deleteConfirm", editConfirm: "editConfirm", createConfirm: "createConfirm" }, usesOnChanges: true, ngImport: i0, template: "<table [id]=\"tableId\" [class]=\"tableClass\">\n <thead\n ng2-st-thead\n [grid]=\"grid\"\n [source]=\"source\"\n [createConfirm]=\"createConfirm\"\n (create)=\"create.emit($event)\"\n (selectAllRows)=\"onSelectAllRows()\"\n ></thead>\n\n <tbody\n ng2-st-tbody\n [grid]=\"grid\"\n [source]=\"source\"\n [deleteConfirm]=\"deleteConfirm\"\n [editConfirm]=\"editConfirm\"\n [createConfirm]=\"createConfirm\"\n [rowClassFunction]=\"rowClassFunction\"\n (edit)=\"edit.emit($event)\"\n (editCancel)=\"editCancel.emit($event)\"\n (delete)=\"delete.emit($event)\"\n (custom)=\"custom.emit($event)\"\n (userClickedRow)=\"emitUserRowClicked($event)\"\n (multipleSelectRow)=\"multipleSelectRow($event)\"\n ></tbody>\n</table>\n\n@if (isPagerDisplay) {\n<ng2-smart-table-pager [source]=\"source\" [perPageSelect]=\"perPageSelect\">\n</ng2-smart-table-pager>\n}\n", styles: [":host{font-size:1rem}:host ::ng-deep *{box-sizing:border-box}:host ::ng-deep button,:host ::ng-deep input,:host ::ng-deep optgroup,:host ::ng-deep select,:host ::ng-deep textarea{color:inherit;font:inherit;margin:0}:host ::ng-deep table{line-height:1.5em;border-collapse:collapse;border-spacing:0;display:table;width:100%;max-width:100%;word-break:normal;word-break:keep-all;overflow:auto}:host ::ng-deep table tr th{font-weight:700}:host ::ng-deep table tr section{font-size:.75em;font-weight:700}:host ::ng-deep table tr td,:host ::ng-deep table tr th{font-size:.875em;margin:0;padding:.5em 1em}:host ::ng-deep a{color:#1e6bb8;text-decoration:none}:host ::ng-deep a:hover{text-decoration:underline}\n"], dependencies: [{ kind: "component", type: Ng2SmartTableTheadComponent, selector: "[ng2-st-thead]", inputs: ["grid", "source", "createConfirm"], outputs: ["sort", "selectAllRows", "create", "filter"] }, { kind: "component", type: Ng2SmartTableTbodyComponent, selector: "[ng2-st-tbody]", inputs: ["grid", "source", "deleteConfirm", "createConfirm", "editConfirm", "rowClassFunction"], outputs: ["save", "edit", "editCancel", "delete", "custom", "edited", "userSelectRow", "userClickedRow", "multipleSelectRow"] }, { kind: "component", type: PagerComponent, selector: "ng2-smart-table-pager", inputs: ["source", "perPageSelect"], outputs: ["changePage"] }] }); }
|
|
3648
3510
|
}
|
|
3649
3511
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableComponent, decorators: [{
|
|
3650
3512
|
type: Component,
|
|
@@ -3652,11 +3514,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3652
3514
|
Ng2SmartTableTheadComponent,
|
|
3653
3515
|
Ng2SmartTableTbodyComponent,
|
|
3654
3516
|
PagerComponent,
|
|
3655
|
-
], template: "<table [id]=\"tableId\" [class]=\"tableClass\">\n
|
|
3656
|
-
}], propDecorators: { source: [{
|
|
3657
|
-
type: Input
|
|
3517
|
+
], template: "<table [id]=\"tableId\" [class]=\"tableClass\">\n <thead\n ng2-st-thead\n [grid]=\"grid\"\n [source]=\"source\"\n [createConfirm]=\"createConfirm\"\n (create)=\"create.emit($event)\"\n (selectAllRows)=\"onSelectAllRows()\"\n ></thead>\n\n <tbody\n ng2-st-tbody\n [grid]=\"grid\"\n [source]=\"source\"\n [deleteConfirm]=\"deleteConfirm\"\n [editConfirm]=\"editConfirm\"\n [createConfirm]=\"createConfirm\"\n [rowClassFunction]=\"rowClassFunction\"\n (edit)=\"edit.emit($event)\"\n (editCancel)=\"editCancel.emit($event)\"\n (delete)=\"delete.emit($event)\"\n (custom)=\"custom.emit($event)\"\n (userClickedRow)=\"emitUserRowClicked($event)\"\n (multipleSelectRow)=\"multipleSelectRow($event)\"\n ></tbody>\n</table>\n\n@if (isPagerDisplay) {\n<ng2-smart-table-pager [source]=\"source\" [perPageSelect]=\"perPageSelect\">\n</ng2-smart-table-pager>\n}\n", styles: [":host{font-size:1rem}:host ::ng-deep *{box-sizing:border-box}:host ::ng-deep button,:host ::ng-deep input,:host ::ng-deep optgroup,:host ::ng-deep select,:host ::ng-deep textarea{color:inherit;font:inherit;margin:0}:host ::ng-deep table{line-height:1.5em;border-collapse:collapse;border-spacing:0;display:table;width:100%;max-width:100%;word-break:normal;word-break:keep-all;overflow:auto}:host ::ng-deep table tr th{font-weight:700}:host ::ng-deep table tr section{font-size:.75em;font-weight:700}:host ::ng-deep table tr td,:host ::ng-deep table tr th{font-size:.875em;margin:0;padding:.5em 1em}:host ::ng-deep a{color:#1e6bb8;text-decoration:none}:host ::ng-deep a:hover{text-decoration:underline}\n"] }]
|
|
3518
|
+
}], ctorParameters: () => [], propDecorators: { source: [{
|
|
3519
|
+
type: Input,
|
|
3520
|
+
args: [{ required: true }]
|
|
3658
3521
|
}], settings: [{
|
|
3659
|
-
type: Input
|
|
3522
|
+
type: Input,
|
|
3523
|
+
args: [{ required: true }]
|
|
3660
3524
|
}] } });
|
|
3661
3525
|
|
|
3662
3526
|
/**
|