@den4ik92/ng2-smart-table 19.0.6 → 19.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/den4ik92-ng2-smart-table.mjs +1267 -1433
- 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 +9 -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 +5 -11
- 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 +7 -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);
|
|
@@ -1507,704 +2096,43 @@ class Grid {
|
|
|
1507
2096
|
const storageState = getLocalStorage(this.columnStateStorageKey);
|
|
1508
2097
|
if (!storageState) {
|
|
1509
2098
|
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>
|
|
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,49 @@ 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.editRowButtonContent = "";
|
|
2274
|
-
this.deleteRowButtonContent = "";
|
|
2205
|
+
this.editRowButtonContent = "Edit";
|
|
2206
|
+
this.deleteRowButtonContent = "Delete";
|
|
2207
|
+
effect(() => {
|
|
2208
|
+
const settings = this.grid().settings();
|
|
2209
|
+
const actions = settings.actions;
|
|
2210
|
+
if (!actions)
|
|
2211
|
+
return;
|
|
2212
|
+
this.isActionDelete = !!actions.delete;
|
|
2213
|
+
this.isActionEdit = !!actions.edit;
|
|
2214
|
+
this.editRowButtonContent = settings.edit ? settings.edit.editButtonContent || "Edit" : "Edit";
|
|
2215
|
+
this.deleteRowButtonContent = settings.delete ? settings.delete.deleteButtonContent || "Delete" : "Delete";
|
|
2216
|
+
this.cdr.detectChanges();
|
|
2217
|
+
});
|
|
2275
2218
|
}
|
|
2276
2219
|
onEdit(event) {
|
|
2277
2220
|
event.preventDefault();
|
|
2278
2221
|
event.stopPropagation();
|
|
2279
|
-
this.editRowSelect.emit(this.row);
|
|
2280
2222
|
this.edit.emit({
|
|
2281
|
-
data: this.row.getData(),
|
|
2223
|
+
data: this.row().getData(),
|
|
2282
2224
|
source: this.source,
|
|
2283
2225
|
});
|
|
2284
|
-
|
|
2285
|
-
this.grid.edit(this.row);
|
|
2286
|
-
}
|
|
2226
|
+
this.grid().edit(this.row());
|
|
2287
2227
|
}
|
|
2288
2228
|
onDelete(event) {
|
|
2289
2229
|
event.preventDefault();
|
|
2290
2230
|
event.stopPropagation();
|
|
2291
|
-
|
|
2292
|
-
this.delete.emit({
|
|
2293
|
-
data: this.row.getData(),
|
|
2294
|
-
source: this.source,
|
|
2295
|
-
});
|
|
2296
|
-
}
|
|
2297
|
-
else {
|
|
2298
|
-
this.grid.delete(this.row, this.deleteConfirm);
|
|
2299
|
-
}
|
|
2300
|
-
}
|
|
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");
|
|
2231
|
+
this.grid().delete(this.row(), this.deleteConfirm());
|
|
2306
2232
|
}
|
|
2307
2233
|
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) {
|
|
2234
|
+
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: `
|
|
2235
|
+
@if (!row().pending) { @if (isActionEdit) {
|
|
2310
2236
|
<a
|
|
2311
2237
|
href="#"
|
|
2312
|
-
[id]="'row-' + row.index + '_action-edit-button'"
|
|
2238
|
+
[id]="'row-' + row().index + '_action-edit-button'"
|
|
2313
2239
|
class="ng2-smart-action ng2-smart-action-edit-edit"
|
|
2314
2240
|
[innerHTML]="editRowButtonContent"
|
|
2315
2241
|
(click)="onEdit($event)"
|
|
@@ -2317,7 +2243,7 @@ class TbodyEditDeleteComponent {
|
|
|
2317
2243
|
} @if (isActionDelete) {
|
|
2318
2244
|
<a
|
|
2319
2245
|
href="#"
|
|
2320
|
-
[id]="'row-' + row.index + '_action-delete-button'"
|
|
2246
|
+
[id]="'row-' + row().index + '_action-delete-button'"
|
|
2321
2247
|
class="ng2-smart-action ng2-smart-action-delete-delete"
|
|
2322
2248
|
[innerHTML]="deleteRowButtonContent"
|
|
2323
2249
|
(click)="onDelete($event)"
|
|
@@ -2326,6 +2252,7 @@ class TbodyEditDeleteComponent {
|
|
|
2326
2252
|
<div style="display: flex;">
|
|
2327
2253
|
@if (isActionEdit) {
|
|
2328
2254
|
<svg
|
|
2255
|
+
role="none"
|
|
2329
2256
|
(click)="$event.stopPropagation()"
|
|
2330
2257
|
style="height: 2rem; width: 2rem;"
|
|
2331
2258
|
version="1.1"
|
|
@@ -2355,6 +2282,7 @@ class TbodyEditDeleteComponent {
|
|
|
2355
2282
|
</svg>
|
|
2356
2283
|
} @if (isActionDelete) {
|
|
2357
2284
|
<svg
|
|
2285
|
+
role="none"
|
|
2358
2286
|
(click)="$event.stopPropagation()"
|
|
2359
2287
|
style="height: 2rem; width: 2rem;"
|
|
2360
2288
|
version="1.1"
|
|
@@ -2385,17 +2313,17 @@ class TbodyEditDeleteComponent {
|
|
|
2385
2313
|
}
|
|
2386
2314
|
</div>
|
|
2387
2315
|
}
|
|
2388
|
-
`, isInline: true }); }
|
|
2316
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2389
2317
|
}
|
|
2390
2318
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyEditDeleteComponent, decorators: [{
|
|
2391
2319
|
type: Component,
|
|
2392
2320
|
args: [{
|
|
2393
2321
|
selector: "ng2-st-tbody-edit-delete",
|
|
2394
2322
|
template: `
|
|
2395
|
-
@if (!row.pending) { @if (isActionEdit) {
|
|
2323
|
+
@if (!row().pending) { @if (isActionEdit) {
|
|
2396
2324
|
<a
|
|
2397
2325
|
href="#"
|
|
2398
|
-
[id]="'row-' + row.index + '_action-edit-button'"
|
|
2326
|
+
[id]="'row-' + row().index + '_action-edit-button'"
|
|
2399
2327
|
class="ng2-smart-action ng2-smart-action-edit-edit"
|
|
2400
2328
|
[innerHTML]="editRowButtonContent"
|
|
2401
2329
|
(click)="onEdit($event)"
|
|
@@ -2403,7 +2331,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2403
2331
|
} @if (isActionDelete) {
|
|
2404
2332
|
<a
|
|
2405
2333
|
href="#"
|
|
2406
|
-
[id]="'row-' + row.index + '_action-delete-button'"
|
|
2334
|
+
[id]="'row-' + row().index + '_action-delete-button'"
|
|
2407
2335
|
class="ng2-smart-action ng2-smart-action-delete-delete"
|
|
2408
2336
|
[innerHTML]="deleteRowButtonContent"
|
|
2409
2337
|
(click)="onDelete($event)"
|
|
@@ -2412,6 +2340,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2412
2340
|
<div style="display: flex;">
|
|
2413
2341
|
@if (isActionEdit) {
|
|
2414
2342
|
<svg
|
|
2343
|
+
role="none"
|
|
2415
2344
|
(click)="$event.stopPropagation()"
|
|
2416
2345
|
style="height: 2rem; width: 2rem;"
|
|
2417
2346
|
version="1.1"
|
|
@@ -2441,6 +2370,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2441
2370
|
</svg>
|
|
2442
2371
|
} @if (isActionDelete) {
|
|
2443
2372
|
<svg
|
|
2373
|
+
role="none"
|
|
2444
2374
|
(click)="$event.stopPropagation()"
|
|
2445
2375
|
style="height: 2rem; width: 2rem;"
|
|
2446
2376
|
version="1.1"
|
|
@@ -2473,24 +2403,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2473
2403
|
}
|
|
2474
2404
|
`,
|
|
2475
2405
|
standalone: true,
|
|
2406
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2476
2407
|
}]
|
|
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
|
-
}] } });
|
|
2408
|
+
}], ctorParameters: () => [] });
|
|
2488
2409
|
|
|
2489
2410
|
class Ng2SmartTableTbodyComponent {
|
|
2490
2411
|
constructor() {
|
|
2491
|
-
this.
|
|
2412
|
+
this.grid = input.required();
|
|
2413
|
+
this.source = input.required();
|
|
2414
|
+
this.deleteConfirm = input.required();
|
|
2415
|
+
this.createConfirm = input.required();
|
|
2416
|
+
this.editConfirm = input.required();
|
|
2417
|
+
this.rowClassFunction = input(() => "");
|
|
2492
2418
|
this.save = output();
|
|
2493
|
-
this.cancel = output();
|
|
2494
2419
|
this.edit = output();
|
|
2495
2420
|
this.editCancel = output();
|
|
2496
2421
|
this.delete = output();
|
|
@@ -2498,32 +2423,17 @@ class Ng2SmartTableTbodyComponent {
|
|
|
2498
2423
|
this.edited = output();
|
|
2499
2424
|
this.userSelectRow = output();
|
|
2500
2425
|
this.userClickedRow = output();
|
|
2501
|
-
this.editRowSelect = output();
|
|
2502
2426
|
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");
|
|
2427
|
+
this.editInputClass = computed(() => {
|
|
2428
|
+
const editOptions = this.grid().settings().edit;
|
|
2429
|
+
if (!editOptions) {
|
|
2430
|
+
return '';
|
|
2431
|
+
}
|
|
2432
|
+
return editOptions.inputClass || '';
|
|
2433
|
+
});
|
|
2434
|
+
this.noDataMessage = computed(() => {
|
|
2435
|
+
return this.grid().settings().noDataMessage || "No data found";
|
|
2436
|
+
});
|
|
2527
2437
|
}
|
|
2528
2438
|
getVisibleCells(cells) {
|
|
2529
2439
|
return (cells || []).filter((cell) => !cell.getColumn().hide);
|
|
@@ -2532,7 +2442,7 @@ class Ng2SmartTableTbodyComponent {
|
|
|
2532
2442
|
return item?.id || index;
|
|
2533
2443
|
}
|
|
2534
2444
|
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",
|
|
2445
|
+
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
2446
|
}
|
|
2537
2447
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableTbodyComponent, decorators: [{
|
|
2538
2448
|
type: Component,
|
|
@@ -2541,66 +2451,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2541
2451
|
TbodyCustomComponent,
|
|
2542
2452
|
TbodyEditDeleteComponent,
|
|
2543
2453
|
TbodyCreateCancelComponent,
|
|
2454
|
+
NgTemplateOutlet,
|
|
2544
2455
|
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
|
-
}] } });
|
|
2456
|
+
], 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"] }]
|
|
2457
|
+
}] });
|
|
2557
2458
|
|
|
2558
2459
|
class FilterDefault {
|
|
2559
2460
|
constructor() {
|
|
2560
|
-
this.
|
|
2461
|
+
this.column = input.required();
|
|
2462
|
+
this.source = input.required();
|
|
2463
|
+
this.inputClass = input('');
|
|
2561
2464
|
this.query = '';
|
|
2562
2465
|
this.filter = output();
|
|
2563
2466
|
}
|
|
2564
2467
|
onFilter(query) {
|
|
2565
|
-
this.source.addFilter({
|
|
2566
|
-
field: this.column.id,
|
|
2468
|
+
this.source().addFilter({
|
|
2469
|
+
field: this.column().id,
|
|
2567
2470
|
search: query,
|
|
2568
|
-
filter: this.column.getFilterFunction(),
|
|
2471
|
+
filter: this.column().getFilterFunction(),
|
|
2569
2472
|
});
|
|
2570
2473
|
}
|
|
2571
2474
|
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: "
|
|
2475
|
+
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
2476
|
}
|
|
2574
2477
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FilterDefault, decorators: [{
|
|
2575
2478
|
type: Component,
|
|
2576
2479
|
args: [{ template: '' }]
|
|
2577
|
-
}], propDecorators: {
|
|
2578
|
-
type: Input
|
|
2579
|
-
}], source: [{
|
|
2580
|
-
type: Input
|
|
2581
|
-
}], inputClass: [{
|
|
2582
|
-
type: Input
|
|
2583
|
-
}], query: [{
|
|
2480
|
+
}], propDecorators: { query: [{
|
|
2584
2481
|
type: Input
|
|
2585
2482
|
}] } });
|
|
2586
2483
|
|
|
2587
2484
|
class CustomFilterComponent extends FilterDefault {
|
|
2588
2485
|
ngOnChanges(changes) {
|
|
2589
2486
|
if (this.customComponent) {
|
|
2590
|
-
if (this.customComponent
|
|
2591
|
-
this.customComponent.instance
|
|
2487
|
+
if (this.customComponent?.instance &&
|
|
2488
|
+
"ngOnChanges" in this.customComponent.instance) {
|
|
2489
|
+
const onChanges = this.customComponent.instance.ngOnChanges;
|
|
2490
|
+
onChanges(changes);
|
|
2592
2491
|
}
|
|
2593
2492
|
return;
|
|
2594
2493
|
}
|
|
2595
|
-
|
|
2596
|
-
|
|
2494
|
+
const columnFilter = this.column().filter;
|
|
2495
|
+
if (columnFilter && columnFilter.type === "custom") {
|
|
2496
|
+
this.customComponent = this.dynamicTarget?.createComponent(columnFilter?.component);
|
|
2497
|
+
// set @Inputs and @Outputs of custom component
|
|
2498
|
+
this.customComponent?.setInput("query", this.query);
|
|
2499
|
+
this.customComponent?.setInput("column", this.column());
|
|
2500
|
+
this.customComponent?.setInput("source", this.source());
|
|
2501
|
+
this.customComponent?.setInput("inputClass", this.inputClass());
|
|
2502
|
+
this.customComponent?.instance.filter.subscribe((event) => this.onFilter(event));
|
|
2597
2503
|
}
|
|
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
2504
|
}
|
|
2605
2505
|
ngOnDestroy() {
|
|
2606
2506
|
if (this.customComponent) {
|
|
@@ -2633,11 +2533,11 @@ class CheckboxFilterComponent extends DefaultFilter {
|
|
|
2633
2533
|
.pipe(debounceTime(this.delay))
|
|
2634
2534
|
.subscribe((checked) => {
|
|
2635
2535
|
this.filterActive = true;
|
|
2636
|
-
const trueVal = (this.column.getFilterConfig() &&
|
|
2637
|
-
this.column.getFilterConfig().true) ||
|
|
2536
|
+
const trueVal = (this.column().getFilterConfig() &&
|
|
2537
|
+
this.column().getFilterConfig().true) ||
|
|
2638
2538
|
true;
|
|
2639
|
-
const falseVal = (this.column.getFilterConfig() &&
|
|
2640
|
-
this.column.getFilterConfig().false) ||
|
|
2539
|
+
const falseVal = (this.column().getFilterConfig() &&
|
|
2540
|
+
this.column().getFilterConfig().false) ||
|
|
2641
2541
|
false;
|
|
2642
2542
|
this.query = checked ? trueVal : falseVal;
|
|
2643
2543
|
this.setFilter();
|
|
@@ -2655,12 +2555,12 @@ class CheckboxFilterComponent extends DefaultFilter {
|
|
|
2655
2555
|
<input
|
|
2656
2556
|
type="checkbox"
|
|
2657
2557
|
[formControl]="inputControl"
|
|
2658
|
-
[class]="inputClass"
|
|
2558
|
+
[class]="inputClass()"
|
|
2659
2559
|
class="form-control"
|
|
2660
2560
|
/>
|
|
2661
2561
|
@if (filterActive) {
|
|
2662
2562
|
<a href="#" (click)="resetFilter($event)">{{
|
|
2663
|
-
column.getFilterConfig()?.resetText || "reset"
|
|
2563
|
+
column().getFilterConfig()?.resetText || "reset"
|
|
2664
2564
|
}}</a>
|
|
2665
2565
|
}
|
|
2666
2566
|
`, 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 +2573,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2673
2573
|
<input
|
|
2674
2574
|
type="checkbox"
|
|
2675
2575
|
[formControl]="inputControl"
|
|
2676
|
-
[class]="inputClass"
|
|
2576
|
+
[class]="inputClass()"
|
|
2677
2577
|
class="form-control"
|
|
2678
2578
|
/>
|
|
2679
2579
|
@if (filterActive) {
|
|
2680
2580
|
<a href="#" (click)="resetFilter($event)">{{
|
|
2681
|
-
column.getFilterConfig()?.resetText || "reset"
|
|
2581
|
+
column().getFilterConfig()?.resetText || "reset"
|
|
2682
2582
|
}}</a>
|
|
2683
2583
|
}
|
|
2684
2584
|
`,
|
|
@@ -2711,11 +2611,11 @@ class InputFilterComponent extends DefaultFilter {
|
|
|
2711
2611
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: InputFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2712
2612
|
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
2613
|
<input
|
|
2714
|
-
[class]="inputClass"
|
|
2614
|
+
[class]="inputClass()"
|
|
2715
2615
|
[formControl]="inputControl"
|
|
2716
2616
|
class="form-control"
|
|
2717
2617
|
type="text"
|
|
2718
|
-
placeholder="{{ column.title }}"
|
|
2618
|
+
placeholder="{{ column().title }}"
|
|
2719
2619
|
/>
|
|
2720
2620
|
`, 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
2621
|
}
|
|
@@ -2725,11 +2625,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2725
2625
|
selector: "input-filter",
|
|
2726
2626
|
template: `
|
|
2727
2627
|
<input
|
|
2728
|
-
[class]="inputClass"
|
|
2628
|
+
[class]="inputClass()"
|
|
2729
2629
|
[formControl]="inputControl"
|
|
2730
2630
|
class="form-control"
|
|
2731
2631
|
type="text"
|
|
2732
|
-
placeholder="{{ column.title }}"
|
|
2632
|
+
placeholder="{{ column().title }}"
|
|
2733
2633
|
/>
|
|
2734
2634
|
`,
|
|
2735
2635
|
standalone: true,
|
|
@@ -2750,13 +2650,13 @@ class SelectFilterComponent extends DefaultFilter {
|
|
|
2750
2650
|
}
|
|
2751
2651
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SelectFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2752
2652
|
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"
|
|
2653
|
+
<select [class]="inputClass()"
|
|
2754
2654
|
class="form-control"
|
|
2755
2655
|
#inputControl
|
|
2756
2656
|
[(ngModel)]="query">
|
|
2757
2657
|
|
|
2758
|
-
<option value="">{{ column.getFilterConfig().selectText }}</option>
|
|
2759
|
-
@for (option of column.getFilterConfig().list; track option.value) {
|
|
2658
|
+
<option value="">{{ column().getFilterConfig().selectText }}</option>
|
|
2659
|
+
@for (option of column().getFilterConfig().list; track option.value) {
|
|
2760
2660
|
<option [value]="option.value">
|
|
2761
2661
|
{{ option.title }}
|
|
2762
2662
|
</option>
|
|
@@ -2769,13 +2669,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2769
2669
|
args: [{
|
|
2770
2670
|
selector: 'select-filter',
|
|
2771
2671
|
template: `
|
|
2772
|
-
<select [class]="inputClass"
|
|
2672
|
+
<select [class]="inputClass()"
|
|
2773
2673
|
class="form-control"
|
|
2774
2674
|
#inputControl
|
|
2775
2675
|
[(ngModel)]="query">
|
|
2776
2676
|
|
|
2777
|
-
<option value="">{{ column.getFilterConfig().selectText }}</option>
|
|
2778
|
-
@for (option of column.getFilterConfig().list; track option.value) {
|
|
2677
|
+
<option value="">{{ column().getFilterConfig().selectText }}</option>
|
|
2678
|
+
@for (option of column().getFilterConfig().list; track option.value) {
|
|
2779
2679
|
<option [value]="option.value">
|
|
2780
2680
|
{{ option.title }}
|
|
2781
2681
|
</option>
|
|
@@ -2793,27 +2693,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2793
2693
|
class DefaultFilterComponent extends FilterDefault {
|
|
2794
2694
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2795
2695
|
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') {
|
|
2696
|
+
@switch (column().getFilterType()) { @case ('list') {
|
|
2797
2697
|
<select-filter
|
|
2798
2698
|
[query]="query"
|
|
2799
|
-
[class]="inputClass"
|
|
2800
|
-
[column]="column"
|
|
2699
|
+
[class]="inputClass()"
|
|
2700
|
+
[column]="column()"
|
|
2801
2701
|
(filter)="onFilter($event)"
|
|
2802
2702
|
>
|
|
2803
2703
|
</select-filter>
|
|
2804
2704
|
} @case ('checkbox') {
|
|
2805
2705
|
<checkbox-filter
|
|
2806
2706
|
[query]="query"
|
|
2807
|
-
[class]="inputClass"
|
|
2808
|
-
[column]="column"
|
|
2707
|
+
[class]="inputClass()"
|
|
2708
|
+
[column]="column()"
|
|
2809
2709
|
(filter)="onFilter($event)"
|
|
2810
2710
|
>
|
|
2811
2711
|
</checkbox-filter>
|
|
2812
2712
|
} @default {
|
|
2813
2713
|
<input-filter
|
|
2814
2714
|
[query]="query"
|
|
2815
|
-
[class]="inputClass"
|
|
2816
|
-
[column]="column"
|
|
2715
|
+
[class]="inputClass()"
|
|
2716
|
+
[column]="column()"
|
|
2817
2717
|
(filter)="onFilter($event)"
|
|
2818
2718
|
>
|
|
2819
2719
|
</input-filter>
|
|
@@ -2825,27 +2725,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2825
2725
|
args: [{
|
|
2826
2726
|
selector: "default-table-filter",
|
|
2827
2727
|
template: `
|
|
2828
|
-
@switch (column.getFilterType()) { @case ('list') {
|
|
2728
|
+
@switch (column().getFilterType()) { @case ('list') {
|
|
2829
2729
|
<select-filter
|
|
2830
2730
|
[query]="query"
|
|
2831
|
-
[class]="inputClass"
|
|
2832
|
-
[column]="column"
|
|
2731
|
+
[class]="inputClass()"
|
|
2732
|
+
[column]="column()"
|
|
2833
2733
|
(filter)="onFilter($event)"
|
|
2834
2734
|
>
|
|
2835
2735
|
</select-filter>
|
|
2836
2736
|
} @case ('checkbox') {
|
|
2837
2737
|
<checkbox-filter
|
|
2838
2738
|
[query]="query"
|
|
2839
|
-
[class]="inputClass"
|
|
2840
|
-
[column]="column"
|
|
2739
|
+
[class]="inputClass()"
|
|
2740
|
+
[column]="column()"
|
|
2841
2741
|
(filter)="onFilter($event)"
|
|
2842
2742
|
>
|
|
2843
2743
|
</checkbox-filter>
|
|
2844
2744
|
} @default {
|
|
2845
2745
|
<input-filter
|
|
2846
2746
|
[query]="query"
|
|
2847
|
-
[class]="inputClass"
|
|
2848
|
-
[column]="column"
|
|
2747
|
+
[class]="inputClass()"
|
|
2748
|
+
[column]="column()"
|
|
2849
2749
|
(filter)="onFilter($event)"
|
|
2850
2750
|
>
|
|
2851
2751
|
</input-filter>
|
|
@@ -2866,8 +2766,8 @@ class FilterComponent extends FilterDefault {
|
|
|
2866
2766
|
if (!changes['source'].firstChange && this.dataChangedSub) {
|
|
2867
2767
|
this.dataChangedSub.unsubscribe();
|
|
2868
2768
|
}
|
|
2869
|
-
this.dataChangedSub = this.source.onChanged().subscribe((dataChanges) => {
|
|
2870
|
-
const filterConf = this.source.getFilter();
|
|
2769
|
+
this.dataChangedSub = this.source().onChanged().subscribe((dataChanges) => {
|
|
2770
|
+
const filterConf = this.source().getFilter();
|
|
2871
2771
|
if (filterConf && filterConf.filters && filterConf.filters.length === 0) {
|
|
2872
2772
|
this.query = '';
|
|
2873
2773
|
// add a check for existing filters an set the query if one exists for this column
|
|
@@ -2875,7 +2775,7 @@ class FilterComponent extends FilterDefault {
|
|
|
2875
2775
|
}
|
|
2876
2776
|
else if (filterConf && filterConf.filters && filterConf.filters.length > 0) {
|
|
2877
2777
|
filterConf.filters.forEach((k, v) => {
|
|
2878
|
-
if (k.field == this.column.id) {
|
|
2778
|
+
if (k.field == this.column().id) {
|
|
2879
2779
|
this.query = k.search;
|
|
2880
2780
|
}
|
|
2881
2781
|
});
|
|
@@ -2885,24 +2785,24 @@ class FilterComponent extends FilterDefault {
|
|
|
2885
2785
|
}
|
|
2886
2786
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2887
2787
|
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) {
|
|
2788
|
+
@if (column().isFilterable) {
|
|
2889
2789
|
<div class="ng2-smart-filter">
|
|
2890
|
-
@switch (column.getFilterType()) {
|
|
2790
|
+
@switch (column().getFilterType()) {
|
|
2891
2791
|
@case ('custom') {
|
|
2892
2792
|
<custom-table-filter
|
|
2893
2793
|
[query]="query"
|
|
2894
|
-
[column]="column"
|
|
2895
|
-
[source]="source"
|
|
2896
|
-
[inputClass]="inputClass"
|
|
2794
|
+
[column]="column()"
|
|
2795
|
+
[source]="source()"
|
|
2796
|
+
[inputClass]="inputClass()"
|
|
2897
2797
|
(filter)="onFilter($event)">
|
|
2898
2798
|
</custom-table-filter>
|
|
2899
2799
|
}
|
|
2900
2800
|
@default {
|
|
2901
2801
|
<default-table-filter
|
|
2902
2802
|
[query]="query"
|
|
2903
|
-
[column]="column"
|
|
2904
|
-
[source]="source"
|
|
2905
|
-
[inputClass]="inputClass"
|
|
2803
|
+
[column]="column()"
|
|
2804
|
+
[source]="source()"
|
|
2805
|
+
[inputClass]="inputClass()"
|
|
2906
2806
|
(filter)="onFilter($event)">
|
|
2907
2807
|
</default-table-filter>
|
|
2908
2808
|
}
|
|
@@ -2914,24 +2814,24 @@ class FilterComponent extends FilterDefault {
|
|
|
2914
2814
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: FilterComponent, decorators: [{
|
|
2915
2815
|
type: Component,
|
|
2916
2816
|
args: [{ selector: 'ng2-smart-table-filter', template: `
|
|
2917
|
-
@if (column.isFilterable) {
|
|
2817
|
+
@if (column().isFilterable) {
|
|
2918
2818
|
<div class="ng2-smart-filter">
|
|
2919
|
-
@switch (column.getFilterType()) {
|
|
2819
|
+
@switch (column().getFilterType()) {
|
|
2920
2820
|
@case ('custom') {
|
|
2921
2821
|
<custom-table-filter
|
|
2922
2822
|
[query]="query"
|
|
2923
|
-
[column]="column"
|
|
2924
|
-
[source]="source"
|
|
2925
|
-
[inputClass]="inputClass"
|
|
2823
|
+
[column]="column()"
|
|
2824
|
+
[source]="source()"
|
|
2825
|
+
[inputClass]="inputClass()"
|
|
2926
2826
|
(filter)="onFilter($event)">
|
|
2927
2827
|
</custom-table-filter>
|
|
2928
2828
|
}
|
|
2929
2829
|
@default {
|
|
2930
2830
|
<default-table-filter
|
|
2931
2831
|
[query]="query"
|
|
2932
|
-
[column]="column"
|
|
2933
|
-
[source]="source"
|
|
2934
|
-
[inputClass]="inputClass"
|
|
2832
|
+
[column]="column()"
|
|
2833
|
+
[source]="source()"
|
|
2834
|
+
[inputClass]="inputClass()"
|
|
2935
2835
|
(filter)="onFilter($event)">
|
|
2936
2836
|
</default-table-filter>
|
|
2937
2837
|
}
|
|
@@ -2943,37 +2843,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2943
2843
|
|
|
2944
2844
|
class AddButtonComponent {
|
|
2945
2845
|
constructor() {
|
|
2946
|
-
this.
|
|
2846
|
+
this.grid = input.required();
|
|
2947
2847
|
this.create = output();
|
|
2948
|
-
this.isActionAdd =
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
this.
|
|
2956
|
-
|
|
2848
|
+
this.isActionAdd = computed(() => {
|
|
2849
|
+
const actions = this.grid().settings().actions;
|
|
2850
|
+
if (!actions) {
|
|
2851
|
+
return false;
|
|
2852
|
+
}
|
|
2853
|
+
return !!actions.add;
|
|
2854
|
+
});
|
|
2855
|
+
this.addNewButtonContent = computed(() => {
|
|
2856
|
+
const addParams = this.grid().settings()?.add;
|
|
2857
|
+
if (!addParams) {
|
|
2858
|
+
return "Add New";
|
|
2859
|
+
}
|
|
2860
|
+
return addParams?.addButtonContent || "Add New";
|
|
2861
|
+
});
|
|
2957
2862
|
}
|
|
2958
2863
|
onAdd(event) {
|
|
2959
2864
|
event.preventDefault();
|
|
2960
2865
|
event.stopPropagation();
|
|
2961
|
-
if (this.grid.getSetting("mode") === "external") {
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
}
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
}
|
|
2866
|
+
// if (this.grid.getSetting("mode") === "external") {
|
|
2867
|
+
// this.create.emit({
|
|
2868
|
+
// source: this.source,
|
|
2869
|
+
// });
|
|
2870
|
+
// } else {
|
|
2871
|
+
this.grid().createFormShown = true;
|
|
2872
|
+
// }
|
|
2969
2873
|
}
|
|
2970
2874
|
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",
|
|
2972
|
-
@if (isActionAdd) {
|
|
2875
|
+
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 } }, outputs: { create: "create" }, host: { classAttribute: "ng2-smart-actions-title ng2-smart-actions-title-add" }, ngImport: i0, template: `
|
|
2876
|
+
@if (isActionAdd()) {
|
|
2973
2877
|
<a
|
|
2974
2878
|
href="#"
|
|
2975
2879
|
class="ng2-smart-action ng2-smart-action-add-add"
|
|
2976
|
-
[innerHTML]="addNewButtonContent"
|
|
2880
|
+
[innerHTML]="addNewButtonContent()"
|
|
2977
2881
|
(click)="onAdd($event)"
|
|
2978
2882
|
></a>
|
|
2979
2883
|
}
|
|
@@ -2984,91 +2888,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2984
2888
|
args: [{
|
|
2985
2889
|
selector: "[ng2-st-add-button]",
|
|
2986
2890
|
template: `
|
|
2987
|
-
@if (isActionAdd) {
|
|
2891
|
+
@if (isActionAdd()) {
|
|
2988
2892
|
<a
|
|
2989
2893
|
href="#"
|
|
2990
2894
|
class="ng2-smart-action ng2-smart-action-add-add"
|
|
2991
|
-
[innerHTML]="addNewButtonContent"
|
|
2895
|
+
[innerHTML]="addNewButtonContent()"
|
|
2992
2896
|
(click)="onAdd($event)"
|
|
2993
2897
|
></a>
|
|
2994
2898
|
}
|
|
2995
2899
|
`,
|
|
2900
|
+
host: {
|
|
2901
|
+
class: "ng2-smart-actions-title ng2-smart-actions-title-add",
|
|
2902
|
+
},
|
|
2996
2903
|
standalone: true,
|
|
2997
2904
|
}]
|
|
2998
|
-
}]
|
|
2999
|
-
type: Input
|
|
3000
|
-
}], source: [{
|
|
3001
|
-
type: Input
|
|
3002
|
-
}] } });
|
|
2905
|
+
}] });
|
|
3003
2906
|
|
|
3004
|
-
class
|
|
2907
|
+
class TheadFiltersRowComponent {
|
|
3005
2908
|
constructor() {
|
|
2909
|
+
this.grid = input.required();
|
|
2910
|
+
this.source = input.required();
|
|
3006
2911
|
this.create = output();
|
|
3007
2912
|
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) {
|
|
2913
|
+
this.filterInputClass = computed(() => {
|
|
2914
|
+
const filterOptions = this.grid().settings()?.filter;
|
|
2915
|
+
if (!filterOptions) {
|
|
2916
|
+
return "";
|
|
2917
|
+
}
|
|
2918
|
+
return filterOptions.inputClass || "";
|
|
2919
|
+
});
|
|
2920
|
+
}
|
|
2921
|
+
getVisibleColumns() {
|
|
2922
|
+
return (this.grid().getColumns() || []).filter((column) => !column.hide);
|
|
2923
|
+
}
|
|
2924
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFiltersRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2925
|
+
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: `
|
|
2926
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3025
2927
|
<th></th>
|
|
3026
|
-
} @if (
|
|
3027
|
-
<th ng2-st-add-button [grid]="grid" (create)="create.emit($event)"></th>
|
|
3028
|
-
} @for (column of getVisibleColumns(
|
|
2928
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2929
|
+
<th ng2-st-add-button [grid]="grid()" (create)="create.emit($event)"></th>
|
|
2930
|
+
} @for (column of getVisibleColumns(); track column.id) {
|
|
3029
2931
|
<th class="ng2-smart-th {{ column.id }}">
|
|
3030
2932
|
<ng2-smart-table-filter
|
|
3031
|
-
[source]="source"
|
|
2933
|
+
[source]="source()"
|
|
3032
2934
|
[column]="column"
|
|
3033
|
-
[inputClass]="filterInputClass"
|
|
2935
|
+
[inputClass]="filterInputClass()"
|
|
3034
2936
|
(filter)="filter.emit($event)"
|
|
3035
2937
|
>
|
|
3036
2938
|
</ng2-smart-table-filter>
|
|
3037
2939
|
</th>
|
|
3038
|
-
} @if (
|
|
2940
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3039
2941
|
<th
|
|
3040
2942
|
ng2-st-add-button
|
|
3041
|
-
[grid]="grid"
|
|
3042
|
-
[source]="source"
|
|
2943
|
+
[grid]="grid()"
|
|
3043
2944
|
(create)="create.emit($event)"
|
|
3044
2945
|
></th>
|
|
3045
2946
|
}
|
|
3046
|
-
`, isInline: true, dependencies: [{ kind: "component", type: AddButtonComponent, selector: "[ng2-st-add-button]", inputs: ["grid"
|
|
2947
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AddButtonComponent, selector: "[ng2-st-add-button]", inputs: ["grid"], outputs: ["create"] }, { kind: "component", type: FilterComponent, selector: "ng2-smart-table-filter" }] }); }
|
|
3047
2948
|
}
|
|
3048
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type:
|
|
2949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFiltersRowComponent, decorators: [{
|
|
3049
2950
|
type: Component,
|
|
3050
2951
|
args: [{
|
|
3051
2952
|
selector: "[ng2-st-thead-filters-row]",
|
|
3052
2953
|
template: `
|
|
3053
|
-
@if (isMultiSelectVisible) {
|
|
2954
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3054
2955
|
<th></th>
|
|
3055
|
-
} @if (
|
|
3056
|
-
<th ng2-st-add-button [grid]="grid" (create)="create.emit($event)"></th>
|
|
3057
|
-
} @for (column of getVisibleColumns(
|
|
2956
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2957
|
+
<th ng2-st-add-button [grid]="grid()" (create)="create.emit($event)"></th>
|
|
2958
|
+
} @for (column of getVisibleColumns(); track column.id) {
|
|
3058
2959
|
<th class="ng2-smart-th {{ column.id }}">
|
|
3059
2960
|
<ng2-smart-table-filter
|
|
3060
|
-
[source]="source"
|
|
2961
|
+
[source]="source()"
|
|
3061
2962
|
[column]="column"
|
|
3062
|
-
[inputClass]="filterInputClass"
|
|
2963
|
+
[inputClass]="filterInputClass()"
|
|
3063
2964
|
(filter)="filter.emit($event)"
|
|
3064
2965
|
>
|
|
3065
2966
|
</ng2-smart-table-filter>
|
|
3066
2967
|
</th>
|
|
3067
|
-
} @if (
|
|
2968
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3068
2969
|
<th
|
|
3069
2970
|
ng2-st-add-button
|
|
3070
|
-
[grid]="grid"
|
|
3071
|
-
[source]="source"
|
|
2971
|
+
[grid]="grid()"
|
|
3072
2972
|
(create)="create.emit($event)"
|
|
3073
2973
|
></th>
|
|
3074
2974
|
}
|
|
@@ -3076,35 +2976,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3076
2976
|
standalone: true,
|
|
3077
2977
|
imports: [AddButtonComponent, FilterComponent],
|
|
3078
2978
|
}]
|
|
3079
|
-
}]
|
|
3080
|
-
type: Input
|
|
3081
|
-
}], source: [{
|
|
3082
|
-
type: Input
|
|
3083
|
-
}] } });
|
|
2979
|
+
}] });
|
|
3084
2980
|
|
|
3085
2981
|
class ActionsComponent {
|
|
3086
2982
|
constructor() {
|
|
2983
|
+
this.grid = input.required();
|
|
3087
2984
|
this.create = output();
|
|
3088
|
-
this.createButtonContent =
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
2985
|
+
this.createButtonContent = computed(() => {
|
|
2986
|
+
const addOptions = this.grid().settings().add;
|
|
2987
|
+
if (!addOptions) {
|
|
2988
|
+
return "Create";
|
|
2989
|
+
}
|
|
2990
|
+
return addOptions?.createButtonContent || "Create";
|
|
2991
|
+
});
|
|
2992
|
+
this.cancelButtonContent = computed(() => {
|
|
2993
|
+
const addOptions = this.grid().settings().add;
|
|
2994
|
+
if (!addOptions) {
|
|
2995
|
+
return "Cancel";
|
|
2996
|
+
}
|
|
2997
|
+
return addOptions?.cancelButtonContent || "Cancel";
|
|
2998
|
+
});
|
|
3094
2999
|
}
|
|
3095
3000
|
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: "
|
|
3001
|
+
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
3002
|
<a
|
|
3098
3003
|
href="#"
|
|
3099
3004
|
class="ng2-smart-action ng2-smart-action-add-create"
|
|
3100
|
-
[innerHTML]="createButtonContent"
|
|
3005
|
+
[innerHTML]="createButtonContent()"
|
|
3101
3006
|
(click)="$event.preventDefault(); create.emit($event)"
|
|
3102
3007
|
></a>
|
|
3103
3008
|
<a
|
|
3104
3009
|
href="#"
|
|
3105
3010
|
class="ng2-smart-action ng2-smart-action-add-cancel"
|
|
3106
|
-
[innerHTML]="cancelButtonContent"
|
|
3107
|
-
(click)="$event.preventDefault(); grid.createFormShown = false"
|
|
3011
|
+
[innerHTML]="cancelButtonContent()"
|
|
3012
|
+
(click)="$event.preventDefault(); grid().createFormShown = false"
|
|
3108
3013
|
></a>
|
|
3109
3014
|
`, isInline: true }); }
|
|
3110
3015
|
}
|
|
@@ -3116,110 +3021,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3116
3021
|
<a
|
|
3117
3022
|
href="#"
|
|
3118
3023
|
class="ng2-smart-action ng2-smart-action-add-create"
|
|
3119
|
-
[innerHTML]="createButtonContent"
|
|
3024
|
+
[innerHTML]="createButtonContent()"
|
|
3120
3025
|
(click)="$event.preventDefault(); create.emit($event)"
|
|
3121
3026
|
></a>
|
|
3122
3027
|
<a
|
|
3123
3028
|
href="#"
|
|
3124
3029
|
class="ng2-smart-action ng2-smart-action-add-cancel"
|
|
3125
|
-
[innerHTML]="cancelButtonContent"
|
|
3126
|
-
(click)="$event.preventDefault(); grid.createFormShown = false"
|
|
3030
|
+
[innerHTML]="cancelButtonContent()"
|
|
3031
|
+
(click)="$event.preventDefault(); grid().createFormShown = false"
|
|
3127
3032
|
></a>
|
|
3128
3033
|
`,
|
|
3129
3034
|
standalone: true,
|
|
3130
3035
|
}]
|
|
3131
|
-
}]
|
|
3132
|
-
type: Input
|
|
3133
|
-
}] } });
|
|
3036
|
+
}] });
|
|
3134
3037
|
|
|
3135
3038
|
class TheadFormRowComponent {
|
|
3136
3039
|
constructor() {
|
|
3040
|
+
this.grid = input.required();
|
|
3137
3041
|
this.create = output();
|
|
3138
|
-
this.
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3042
|
+
this.addInputClass = computed(() => {
|
|
3043
|
+
const addOptions = this.grid().settings()?.add;
|
|
3044
|
+
if (!addOptions) {
|
|
3045
|
+
return "";
|
|
3046
|
+
}
|
|
3047
|
+
return addOptions.inputClass || "";
|
|
3048
|
+
});
|
|
3142
3049
|
}
|
|
3143
3050
|
onCreate(event) {
|
|
3144
3051
|
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", "");
|
|
3052
|
+
this.grid().create(this.grid().getNewRow(), this.createConfirm);
|
|
3152
3053
|
}
|
|
3153
|
-
getVisibleCells(
|
|
3154
|
-
return (
|
|
3054
|
+
getVisibleCells() {
|
|
3055
|
+
return (this.grid().getNewRow().getCells() || []).filter((cell) => !cell.getColumn().hide);
|
|
3155
3056
|
}
|
|
3156
3057
|
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()) {
|
|
3058
|
+
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: `
|
|
3059
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3159
3060
|
<td></td>
|
|
3160
|
-
} @if (
|
|
3061
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
3161
3062
|
<td class="ng2-smart-actions">
|
|
3162
3063
|
<ng2-st-actions
|
|
3163
|
-
[grid]="grid"
|
|
3064
|
+
[grid]="grid()"
|
|
3164
3065
|
(create)="onCreate($event)"
|
|
3165
3066
|
></ng2-st-actions>
|
|
3166
3067
|
</td>
|
|
3167
|
-
} @for (cell of getVisibleCells(
|
|
3168
|
-
cell.getId()) {
|
|
3068
|
+
} @for (cell of getVisibleCells(); track cell.getId()) {
|
|
3169
3069
|
<td>
|
|
3170
3070
|
<ng2-smart-table-cell
|
|
3171
3071
|
[cell]="cell"
|
|
3172
|
-
[
|
|
3173
|
-
[
|
|
3174
|
-
[createConfirm]="createConfirm"
|
|
3175
|
-
[inputClass]="addInputClass"
|
|
3176
|
-
[isInEditing]="grid.getNewRow().isInEditing"
|
|
3177
|
-
(edited)="onCreate($event)"
|
|
3072
|
+
[inputClass]="addInputClass()"
|
|
3073
|
+
[isInEditing]="grid().getNewRow().isInEditing"
|
|
3178
3074
|
>
|
|
3179
3075
|
</ng2-smart-table-cell>
|
|
3180
3076
|
</td>
|
|
3181
|
-
} @if (
|
|
3077
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3182
3078
|
<td class="ng2-smart-actions">
|
|
3183
3079
|
<ng2-st-actions
|
|
3184
|
-
[grid]="grid"
|
|
3080
|
+
[grid]="grid()"
|
|
3185
3081
|
(create)="onCreate($event)"
|
|
3186
3082
|
></ng2-st-actions>
|
|
3187
3083
|
</td>
|
|
3188
3084
|
}
|
|
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: ["
|
|
3085
|
+
`, 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
3086
|
}
|
|
3191
3087
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFormRowComponent, decorators: [{
|
|
3192
3088
|
type: Component,
|
|
3193
3089
|
args: [{
|
|
3194
3090
|
selector: "[ng2-st-thead-form-row]",
|
|
3195
3091
|
template: `
|
|
3196
|
-
@if (grid.isMultiSelectVisible()) {
|
|
3092
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3197
3093
|
<td></td>
|
|
3198
|
-
} @if (
|
|
3094
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
3199
3095
|
<td class="ng2-smart-actions">
|
|
3200
3096
|
<ng2-st-actions
|
|
3201
|
-
[grid]="grid"
|
|
3097
|
+
[grid]="grid()"
|
|
3202
3098
|
(create)="onCreate($event)"
|
|
3203
3099
|
></ng2-st-actions>
|
|
3204
3100
|
</td>
|
|
3205
|
-
} @for (cell of getVisibleCells(
|
|
3206
|
-
cell.getId()) {
|
|
3101
|
+
} @for (cell of getVisibleCells(); track cell.getId()) {
|
|
3207
3102
|
<td>
|
|
3208
3103
|
<ng2-smart-table-cell
|
|
3209
3104
|
[cell]="cell"
|
|
3210
|
-
[
|
|
3211
|
-
[
|
|
3212
|
-
[createConfirm]="createConfirm"
|
|
3213
|
-
[inputClass]="addInputClass"
|
|
3214
|
-
[isInEditing]="grid.getNewRow().isInEditing"
|
|
3215
|
-
(edited)="onCreate($event)"
|
|
3105
|
+
[inputClass]="addInputClass()"
|
|
3106
|
+
[isInEditing]="grid().getNewRow().isInEditing"
|
|
3216
3107
|
>
|
|
3217
3108
|
</ng2-smart-table-cell>
|
|
3218
3109
|
</td>
|
|
3219
|
-
} @if (
|
|
3110
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3220
3111
|
<td class="ng2-smart-actions">
|
|
3221
3112
|
<ng2-st-actions
|
|
3222
|
-
[grid]="grid"
|
|
3113
|
+
[grid]="grid()"
|
|
3223
3114
|
(create)="onCreate($event)"
|
|
3224
3115
|
></ng2-st-actions>
|
|
3225
3116
|
</td>
|
|
@@ -3228,38 +3119,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3228
3119
|
standalone: true,
|
|
3229
3120
|
imports: [ActionsComponent, CellComponent],
|
|
3230
3121
|
}]
|
|
3231
|
-
}], propDecorators: {
|
|
3232
|
-
type: Input
|
|
3233
|
-
}], row: [{
|
|
3234
|
-
type: Input
|
|
3235
|
-
}], createConfirm: [{
|
|
3122
|
+
}], propDecorators: { createConfirm: [{
|
|
3236
3123
|
type: Input
|
|
3237
3124
|
}] } });
|
|
3238
3125
|
|
|
3239
3126
|
class ActionsTitleComponent {
|
|
3240
3127
|
constructor() {
|
|
3241
|
-
this.
|
|
3242
|
-
this.actionsColumnTitle =
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3128
|
+
this.grid = input.required();
|
|
3129
|
+
this.actionsColumnTitle = computed(() => {
|
|
3130
|
+
const actions = this.grid().settings().actions;
|
|
3131
|
+
if (!actions) {
|
|
3132
|
+
return "Actions";
|
|
3133
|
+
}
|
|
3134
|
+
return actions.columnTitle || "Actions";
|
|
3135
|
+
});
|
|
3249
3136
|
}
|
|
3250
3137
|
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: "
|
|
3138
|
+
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
3139
|
}
|
|
3253
3140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ActionsTitleComponent, decorators: [{
|
|
3254
3141
|
type: Component,
|
|
3255
3142
|
args: [{
|
|
3256
3143
|
selector: "[ng2-st-actions-title]",
|
|
3257
|
-
template: ` <div class="ng2-smart-title">{{ actionsColumnTitle }}</div> `,
|
|
3144
|
+
template: ` <div class="ng2-smart-title">{{ actionsColumnTitle() }}</div> `,
|
|
3258
3145
|
standalone: true,
|
|
3146
|
+
host: {
|
|
3147
|
+
class: "ng2-smart-actions",
|
|
3148
|
+
},
|
|
3259
3149
|
}]
|
|
3260
|
-
}]
|
|
3261
|
-
type: Input
|
|
3262
|
-
}] } });
|
|
3150
|
+
}] });
|
|
3263
3151
|
|
|
3264
3152
|
class CheckboxSelectAllComponent {
|
|
3265
3153
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CheckboxSelectAllComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -3404,45 +3292,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3404
3292
|
|
|
3405
3293
|
class TheadTitlesRowComponent {
|
|
3406
3294
|
constructor() {
|
|
3295
|
+
this.grid = input.required();
|
|
3296
|
+
this.source = input.required();
|
|
3407
3297
|
this.sort = output();
|
|
3408
3298
|
this.selectAllRows = output();
|
|
3409
|
-
this.isMultiSelectVisible = false;
|
|
3410
|
-
this.showActionColumnLeft = false;
|
|
3411
|
-
this.showActionColumnRight = false;
|
|
3412
3299
|
}
|
|
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);
|
|
3300
|
+
getVisibleColumns() {
|
|
3301
|
+
return (this.grid().getColumns() || []).filter((column) => !column.hide);
|
|
3420
3302
|
}
|
|
3421
3303
|
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) {
|
|
3304
|
+
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: `
|
|
3305
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3424
3306
|
<th
|
|
3425
3307
|
ng2-st-checkbox-select-all
|
|
3426
|
-
[grid]="grid"
|
|
3427
|
-
[source]="source"
|
|
3308
|
+
[grid]="grid()"
|
|
3309
|
+
[source]="source()"
|
|
3428
3310
|
(click)="selectAllRows.emit($event)"
|
|
3429
3311
|
></th>
|
|
3430
|
-
} @if (
|
|
3431
|
-
|
|
3432
|
-
|
|
3312
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
3313
|
+
|
|
3314
|
+
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
3315
|
+
} @for (column of getVisibleColumns(); track column.id) {
|
|
3433
3316
|
<th
|
|
3434
3317
|
class="ng2-smart-th {{ column.id }}"
|
|
3435
3318
|
[class]="column.class"
|
|
3436
3319
|
[style.width]="column.width"
|
|
3437
3320
|
>
|
|
3438
3321
|
<ng2-st-column-title
|
|
3439
|
-
[source]="source"
|
|
3322
|
+
[source]="source()"
|
|
3440
3323
|
[column]="column"
|
|
3441
3324
|
(sort)="sort.emit($event)"
|
|
3442
3325
|
></ng2-st-column-title>
|
|
3443
3326
|
</th>
|
|
3444
|
-
} @if (
|
|
3445
|
-
<th ng2-st-actions-title [grid]="grid"></th>
|
|
3327
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3328
|
+
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
3446
3329
|
}
|
|
3447
3330
|
`, 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
3331
|
}
|
|
@@ -3451,29 +3334,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3451
3334
|
args: [{
|
|
3452
3335
|
selector: "[ng2-st-thead-titles-row]",
|
|
3453
3336
|
template: `
|
|
3454
|
-
@if (isMultiSelectVisible) {
|
|
3337
|
+
@if (grid().isMultiSelectVisible()) {
|
|
3455
3338
|
<th
|
|
3456
3339
|
ng2-st-checkbox-select-all
|
|
3457
|
-
[grid]="grid"
|
|
3458
|
-
[source]="source"
|
|
3340
|
+
[grid]="grid()"
|
|
3341
|
+
[source]="source()"
|
|
3459
3342
|
(click)="selectAllRows.emit($event)"
|
|
3460
3343
|
></th>
|
|
3461
|
-
} @if (
|
|
3462
|
-
|
|
3463
|
-
|
|
3344
|
+
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
3345
|
+
|
|
3346
|
+
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
3347
|
+
} @for (column of getVisibleColumns(); track column.id) {
|
|
3464
3348
|
<th
|
|
3465
3349
|
class="ng2-smart-th {{ column.id }}"
|
|
3466
3350
|
[class]="column.class"
|
|
3467
3351
|
[style.width]="column.width"
|
|
3468
3352
|
>
|
|
3469
3353
|
<ng2-st-column-title
|
|
3470
|
-
[source]="source"
|
|
3354
|
+
[source]="source()"
|
|
3471
3355
|
[column]="column"
|
|
3472
3356
|
(sort)="sort.emit($event)"
|
|
3473
3357
|
></ng2-st-column-title>
|
|
3474
3358
|
</th>
|
|
3475
|
-
} @if (
|
|
3476
|
-
<th ng2-st-actions-title [grid]="grid"></th>
|
|
3359
|
+
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
3360
|
+
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
3477
3361
|
}
|
|
3478
3362
|
`,
|
|
3479
3363
|
standalone: true,
|
|
@@ -3483,36 +3367,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3483
3367
|
ColumnTitleComponent,
|
|
3484
3368
|
],
|
|
3485
3369
|
}]
|
|
3486
|
-
}]
|
|
3487
|
-
type: Input
|
|
3488
|
-
}], source: [{
|
|
3489
|
-
type: Input
|
|
3490
|
-
}] } });
|
|
3370
|
+
}] });
|
|
3491
3371
|
|
|
3492
3372
|
class Ng2SmartTableTheadComponent {
|
|
3493
3373
|
constructor() {
|
|
3374
|
+
this.grid = input.required();
|
|
3375
|
+
this.source = input.required();
|
|
3494
3376
|
this.sort = output();
|
|
3495
3377
|
this.selectAllRows = output();
|
|
3496
3378
|
this.create = output();
|
|
3497
3379
|
this.filter = output();
|
|
3498
|
-
this.isHideHeader =
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3380
|
+
this.isHideHeader = computed(() => {
|
|
3381
|
+
return this.grid().settings()?.hideHeader || false;
|
|
3382
|
+
});
|
|
3383
|
+
this.isHideSubHeader = computed(() => {
|
|
3384
|
+
return this.grid().settings()?.hideSubHeader || false;
|
|
3385
|
+
});
|
|
3504
3386
|
}
|
|
3505
3387
|
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" },
|
|
3388
|
+
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
3389
|
}
|
|
3508
3390
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableTheadComponent, decorators: [{
|
|
3509
3391
|
type: Component,
|
|
3510
|
-
args: [{ selector:
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3392
|
+
args: [{ selector: "[ng2-st-thead]", standalone: true, imports: [
|
|
3393
|
+
TheadTitlesRowComponent,
|
|
3394
|
+
TheadFiltersRowComponent,
|
|
3395
|
+
TheadFormRowComponent,
|
|
3396
|
+
], 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" }]
|
|
3397
|
+
}], propDecorators: { createConfirm: [{
|
|
3516
3398
|
type: Input
|
|
3517
3399
|
}] } });
|
|
3518
3400
|
|
|
@@ -3529,66 +3411,26 @@ class Ng2SmartTableComponent {
|
|
|
3529
3411
|
this.deleteConfirm = output();
|
|
3530
3412
|
this.editConfirm = output();
|
|
3531
3413
|
this.createConfirm = output();
|
|
3532
|
-
this.rowHover = output();
|
|
3533
3414
|
this.tableClass = "";
|
|
3534
3415
|
this.tableId = "";
|
|
3535
3416
|
this.perPageSelect = [];
|
|
3536
|
-
this.isHideHeader = false;
|
|
3537
|
-
this.isHideSubHeader = false;
|
|
3538
3417
|
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
|
-
};
|
|
3418
|
+
this.rowClassFunction = () => '';
|
|
3419
|
+
effect(() => {
|
|
3420
|
+
const settings = this.grid.settings();
|
|
3421
|
+
this.tableId = settings.attr?.id || getRandomId();
|
|
3422
|
+
this.tableClass = settings.attr?.class || '';
|
|
3423
|
+
this.isPagerDisplay = this.grid.getSetting("pager.display", false);
|
|
3424
|
+
this.perPageSelect = this.grid.getSetting("pager.perPageSelect");
|
|
3425
|
+
this.rowClassFunction = settings.rowClassFunction || (() => "");
|
|
3426
|
+
});
|
|
3585
3427
|
}
|
|
3586
|
-
ngOnChanges(
|
|
3428
|
+
ngOnChanges({ settings, source }) {
|
|
3587
3429
|
if (this.grid) {
|
|
3588
|
-
if (
|
|
3589
|
-
this.grid.setSettings(this.
|
|
3430
|
+
if (settings) {
|
|
3431
|
+
this.grid.setSettings(this.settings);
|
|
3590
3432
|
}
|
|
3591
|
-
if (
|
|
3433
|
+
if (source) {
|
|
3592
3434
|
this.source = this.prepareSource();
|
|
3593
3435
|
this.grid.setSource(this.source);
|
|
3594
3436
|
}
|
|
@@ -3596,13 +3438,6 @@ class Ng2SmartTableComponent {
|
|
|
3596
3438
|
else {
|
|
3597
3439
|
this.initGrid();
|
|
3598
3440
|
}
|
|
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
3441
|
}
|
|
3607
3442
|
multipleSelectRow(row) {
|
|
3608
3443
|
this.grid.multipleSelectRow(row);
|
|
@@ -3623,7 +3458,7 @@ class Ng2SmartTableComponent {
|
|
|
3623
3458
|
}
|
|
3624
3459
|
initGrid() {
|
|
3625
3460
|
this.source = this.prepareSource();
|
|
3626
|
-
this.grid = new Grid(this.source, this.
|
|
3461
|
+
this.grid = new Grid(this.source, this.settings);
|
|
3627
3462
|
this.grid.setColumnsSortedEmitter(this.columnsSorted);
|
|
3628
3463
|
}
|
|
3629
3464
|
prepareSource() {
|
|
@@ -3632,9 +3467,6 @@ class Ng2SmartTableComponent {
|
|
|
3632
3467
|
}
|
|
3633
3468
|
return new LocalDataSource();
|
|
3634
3469
|
}
|
|
3635
|
-
prepareSettings() {
|
|
3636
|
-
return deepExtend({}, this.defaultSettings, this.settings);
|
|
3637
|
-
}
|
|
3638
3470
|
emitUserSelectRow(row) {
|
|
3639
3471
|
this.multiRowSelect.emit({
|
|
3640
3472
|
data: row ? row.getData() : null,
|
|
@@ -3644,7 +3476,7 @@ class Ng2SmartTableComponent {
|
|
|
3644
3476
|
});
|
|
3645
3477
|
}
|
|
3646
3478
|
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"
|
|
3479
|
+
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
3480
|
}
|
|
3649
3481
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableComponent, decorators: [{
|
|
3650
3482
|
type: Component,
|
|
@@ -3652,11 +3484,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3652
3484
|
Ng2SmartTableTheadComponent,
|
|
3653
3485
|
Ng2SmartTableTbodyComponent,
|
|
3654
3486
|
PagerComponent,
|
|
3655
|
-
], template: "<table [id]=\"tableId\" [class]=\"tableClass\">\n
|
|
3656
|
-
}], propDecorators: { source: [{
|
|
3657
|
-
type: Input
|
|
3487
|
+
], 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"] }]
|
|
3488
|
+
}], ctorParameters: () => [], propDecorators: { source: [{
|
|
3489
|
+
type: Input,
|
|
3490
|
+
args: [{ required: true }]
|
|
3658
3491
|
}], settings: [{
|
|
3659
|
-
type: Input
|
|
3492
|
+
type: Input,
|
|
3493
|
+
args: [{ required: true }]
|
|
3660
3494
|
}] } });
|
|
3661
3495
|
|
|
3662
3496
|
/**
|