@den4ik92/ng2-smart-table 19.2.0 → 19.2.2
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 +126 -223
- package/fesm2022/den4ik92-ng2-smart-table.mjs.map +1 -1
- package/lib/components/cell/cell-edit-mode/build-in-editor.component.d.ts +1 -1
- package/lib/components/cell/cell-edit-mode/custom-edit.component.d.ts +2 -2
- package/lib/components/filter/build-in-filter.component.d.ts +2 -1
- package/lib/components/filter/custom-filter.component.d.ts +2 -1
- package/lib/components/filter/filter-types/base-filter.component.d.ts +1 -1
- package/lib/components/pager/pager.component.d.ts +2 -2
- package/lib/components/table-columns-editor/column-editor.directive.d.ts +3 -3
- package/lib/components/table-columns-editor/table-columns-editor.component.d.ts +3 -3
- package/lib/components/tbody/cells/custom.component.d.ts +4 -4
- package/lib/components/tbody/cells/edit-delete.component.d.ts +4 -4
- package/lib/components/tbody/tbody.component.d.ts +3 -3
- package/lib/components/thead/cells/add-button.component.d.ts +2 -2
- package/lib/components/thead/cells/column-title.component.d.ts +2 -2
- package/lib/components/thead/cells/title/title.component.d.ts +2 -2
- package/lib/components/thead/rows/thead-filters-row.component.d.ts +2 -2
- package/lib/components/thead/rows/thead-form-row.component.d.ts +3 -3
- package/lib/components/thead/rows/thead-titles-row.component.d.ts +2 -2
- package/lib/components/thead/thead.component.d.ts +3 -3
- package/lib/lib/data-source/local/local.filter.d.ts +1 -1
- package/lib/lib/data-source/server/server.data-source.d.ts +1 -1
- package/lib/lib/grid.d.ts +1 -1
- package/lib/lib/interfaces/smart-table.models.d.ts +1 -1
- package/lib/ng2-smart-table.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,6 @@ import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
|
|
|
7
7
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
8
8
|
import { Subject } from 'rxjs';
|
|
9
9
|
import { moveItemInArray, CdkDropList, CdkDrag, CdkDragPlaceholder } from '@angular/cdk/drag-drop';
|
|
10
|
-
import { SmartTableOnChangedEventName as SmartTableOnChangedEventName$1, BaseEditorComponent as BaseEditorComponent$1 } from 'ng2-smart-table';
|
|
11
10
|
import { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';
|
|
12
11
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
12
|
|
|
@@ -48,7 +47,7 @@ class BaseFilterComponent {
|
|
|
48
47
|
}
|
|
49
48
|
ngOnChanges({ query }) {
|
|
50
49
|
if (query) {
|
|
51
|
-
this.inputControl
|
|
50
|
+
this.inputControl?.setValue(query.currentValue, { emitEvent: false });
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
setFilter(query) {
|
|
@@ -179,7 +178,7 @@ function getLocalStorage(key) {
|
|
|
179
178
|
|
|
180
179
|
class TableColumnsEditorComponent {
|
|
181
180
|
constructor() {
|
|
182
|
-
this.infoText =
|
|
181
|
+
this.infoText = 'You can drag and drop columns as you wish and also disable unnecessary ones.';
|
|
183
182
|
this.grid = input();
|
|
184
183
|
this.close = input.required();
|
|
185
184
|
this.currentState = [];
|
|
@@ -213,7 +212,7 @@ class TableColumnsEditorComponent {
|
|
|
213
212
|
}
|
|
214
213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TableColumnsEditorComponent, decorators: [{
|
|
215
214
|
type: Component,
|
|
216
|
-
args: [{ selector:
|
|
215
|
+
args: [{ selector: 'ng2-table-columns-editor', imports: [CdkDropList, CdkDrag, CdkDragPlaceholder], template: "<div class=\"sort-card\">\n <div class=\"sort-card-header\">\n <h6>Table columns setup</h6>\n </div>\n <div class=\"sort-card-body\">\n <div\n class=\"list\"\n cdkDropList\n [cdkDropListData]=\"currentState\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @for (column of currentState; track column.key + i; let i = $index) {\n\n <div\n cdkDrag\n [cdkDragLockAxis]=\"'y'\"\n [cdkDragStartDelay]=\"300\"\n [cdkDragDisabled]=\"column.moveDisabled\"\n class=\"drag-row\"\n #dragRow\n [style.--drag-row-height]=\"50\"\n >\n <div class=\"drag-placeholder\" *cdkDragPlaceholder></div>\n <div class=\"index-cell\">\n {{ i + 1 }}\n </div>\n <label class=\"sort-column-checkbox-wrap\" [for]=\"'sort-column-checkbox-' + i\">\n <span></span>\n <input\n [disabled]=\"column.moveDisabled\"\n [id]=\"'sort-column-checkbox-' + i\"\n title=\"Active state. If checked the column will be displayed\"\n type=\"checkbox\"\n class=\"sort-column-checkbox-input\"\n [checked]=\"!column.hide\"\n (change)=\"setVisibility(i)\"\n />\n <span></span>\n </label>\n {{ column.title }}\n </div>\n }\n </div>\n </div>\n @if (stateHasChanged()) {\n <div class=\"sort-card-footer\">\n <button class=\"reset-button\" (click)=\"resetChanges()\">reset</button>\n <button class=\"update-button\" (click)=\"setAndUpdate()\">Update</button>\n </div>\n }\n</div>\n", styles: [".list{overflow:auto;display:flex;flex-direction:column;gap:.3rem;max-height:100%}.drag-row{border:solid 1px var(--drag-row-border-color, #ccc);border-radius:.3rem;display:flex;align-items:center;box-sizing:border-box;cursor:grab;background:var(--drag-row-background, #ffffff);box-shadow:0 0 6px 1px #ebebeb33}.drag-row.cdk-drag-disabled{filter:opacity(.5);cursor:not-allowed}.drag-row .index-cell{min-width:2.2rem;border-right:1px solid var(--drag-row-border-color, #ccc)}.drag-row>div{padding:.3rem}.drag-row .sort-column-checkbox-wrap{margin:0 .5rem}.cdk-drag-preview{box-sizing:border-box;border-radius:.3rem;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.list.cdk-drop-list-dragging .drag-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.drag-placeholder{background:var(--drag-placeholder-background, #ccc);border:dotted 3px #999;min-height:var(--drag-row-heightpx, 2.5rem);transition:transform .25s cubic-bezier(0,0,.2,1)}.overlay-card nb-card-body{padding:.25rem;max-height:100%}.sort-card{box-shadow:0 0 6px 1px #0003;min-width:18rem;padding:.25rem;max-height:80dvh;background:var(--sort-card-background, #ffffff);border-radius:.5rem}.sort-card .sort-card-header{display:flex;align-items:center;gap:1rem;padding:1rem;border-bottom:1px solid var(--sort-card-header-divider-color, #edf1f7)}.sort-card .sort-card-header h6{margin:0}.sort-card .sort-card-body{padding:.5rem 0}.sort-card .sort-card-footer{border-top:1px solid var(--sort-card-header-divider-color, #edf1f7);display:flex;align-items:center;justify-content:end;gap:1rem;padding:1rem}.sort-card .sort-card-footer .update-button,.sort-card .sort-card-footer .reset-button{border-radius:.3rem;padding:.4rem 1rem;border:none;color:#fff;font-size:.875rem;font-weight:700;text-transform:uppercase}.sort-card .sort-card-footer .update-button{background-color:#36f}.sort-card .sort-card-footer .update-button:hover{background-color:#598bff}.sort-card .sort-card-footer .reset-button{background-color:#ff3d71}.sort-card .sort-card-footer .reset-button:hover{background-color:#ff708d}\n"] }]
|
|
217
216
|
}], ctorParameters: () => [] });
|
|
218
217
|
|
|
219
218
|
class SmartTableColumnEditorDirective {
|
|
@@ -235,9 +234,12 @@ class SmartTableColumnEditorDirective {
|
|
|
235
234
|
this.overlayRef = this.overlay.create(this.getOverlayConfig());
|
|
236
235
|
const componentPortal = new ComponentPortal(TableColumnsEditorComponent);
|
|
237
236
|
const dropdownRef = this.overlayRef.attach(componentPortal);
|
|
238
|
-
dropdownRef.setInput(
|
|
239
|
-
dropdownRef.setInput(
|
|
240
|
-
this.overlayRef
|
|
237
|
+
dropdownRef.setInput('grid', this.grid());
|
|
238
|
+
dropdownRef.setInput('close', this.hide.bind(this));
|
|
239
|
+
this.overlayRef
|
|
240
|
+
?.backdropClick()
|
|
241
|
+
.pipe(takeUntil(this.destroy$))
|
|
242
|
+
.subscribe(() => this.hide());
|
|
241
243
|
}
|
|
242
244
|
hide() {
|
|
243
245
|
this.overlayRef?.detach();
|
|
@@ -254,46 +256,46 @@ class SmartTableColumnEditorDirective {
|
|
|
254
256
|
.withPush(false)
|
|
255
257
|
.withPositions([
|
|
256
258
|
{
|
|
257
|
-
originX:
|
|
258
|
-
originY:
|
|
259
|
-
overlayX:
|
|
260
|
-
overlayY:
|
|
259
|
+
originX: 'center',
|
|
260
|
+
originY: 'bottom',
|
|
261
|
+
overlayX: 'end',
|
|
262
|
+
overlayY: 'top',
|
|
261
263
|
},
|
|
262
264
|
{
|
|
263
|
-
originX:
|
|
264
|
-
originY:
|
|
265
|
-
overlayX:
|
|
266
|
-
overlayY:
|
|
265
|
+
originX: 'center',
|
|
266
|
+
originY: 'bottom',
|
|
267
|
+
overlayX: 'center',
|
|
268
|
+
overlayY: 'top',
|
|
267
269
|
},
|
|
268
270
|
{
|
|
269
|
-
originX:
|
|
270
|
-
originY:
|
|
271
|
-
overlayX:
|
|
272
|
-
overlayY:
|
|
271
|
+
originX: 'center',
|
|
272
|
+
originY: 'bottom',
|
|
273
|
+
overlayX: 'start',
|
|
274
|
+
overlayY: 'top',
|
|
273
275
|
},
|
|
274
276
|
{
|
|
275
|
-
originX:
|
|
276
|
-
originY:
|
|
277
|
-
overlayX:
|
|
278
|
-
overlayY:
|
|
277
|
+
originX: 'center',
|
|
278
|
+
originY: 'top',
|
|
279
|
+
overlayX: 'start',
|
|
280
|
+
overlayY: 'bottom',
|
|
279
281
|
},
|
|
280
282
|
{
|
|
281
|
-
originX:
|
|
282
|
-
originY:
|
|
283
|
-
overlayX:
|
|
284
|
-
overlayY:
|
|
283
|
+
originX: 'center',
|
|
284
|
+
originY: 'top',
|
|
285
|
+
overlayX: 'center',
|
|
286
|
+
overlayY: 'bottom',
|
|
285
287
|
},
|
|
286
288
|
{
|
|
287
|
-
originX:
|
|
288
|
-
originY:
|
|
289
|
-
overlayX:
|
|
290
|
-
overlayY:
|
|
289
|
+
originX: 'center',
|
|
290
|
+
originY: 'top',
|
|
291
|
+
overlayX: 'start',
|
|
292
|
+
overlayY: 'bottom',
|
|
291
293
|
},
|
|
292
294
|
]);
|
|
293
295
|
return new OverlayConfig({
|
|
294
296
|
positionStrategy: positionStrategy,
|
|
295
297
|
hasBackdrop: true,
|
|
296
|
-
backdropClass:
|
|
298
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
297
299
|
});
|
|
298
300
|
}
|
|
299
301
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SmartTableColumnEditorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -302,9 +304,9 @@ class SmartTableColumnEditorDirective {
|
|
|
302
304
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SmartTableColumnEditorDirective, decorators: [{
|
|
303
305
|
type: Directive,
|
|
304
306
|
args: [{
|
|
305
|
-
selector:
|
|
307
|
+
selector: '[ng2SmartTableColumnEditor]',
|
|
306
308
|
host: {
|
|
307
|
-
|
|
309
|
+
'(click)': 'buttclicked()',
|
|
308
310
|
},
|
|
309
311
|
}]
|
|
310
312
|
}] });
|
|
@@ -755,11 +757,11 @@ class ServerDataSource extends DataSource {
|
|
|
755
757
|
}
|
|
756
758
|
emitOnChanged(eventData, newElements) {
|
|
757
759
|
if ([
|
|
758
|
-
SmartTableOnChangedEventName
|
|
759
|
-
SmartTableOnChangedEventName
|
|
760
|
-
SmartTableOnChangedEventName
|
|
761
|
-
SmartTableOnChangedEventName
|
|
762
|
-
SmartTableOnChangedEventName
|
|
760
|
+
SmartTableOnChangedEventName.filter,
|
|
761
|
+
SmartTableOnChangedEventName.sort,
|
|
762
|
+
SmartTableOnChangedEventName.page,
|
|
763
|
+
SmartTableOnChangedEventName.paging,
|
|
764
|
+
SmartTableOnChangedEventName.refresh,
|
|
763
765
|
].includes(eventData.action)) {
|
|
764
766
|
this.paramPrepareFunction({
|
|
765
767
|
sort: this.sortConf,
|
|
@@ -970,7 +972,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
970
972
|
`, standalone: true, imports: [FormsModule], styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}\n"] }]
|
|
971
973
|
}] });
|
|
972
974
|
|
|
973
|
-
class BuildInEditorComponent extends BaseEditorComponent
|
|
975
|
+
class BuildInEditorComponent extends BaseEditorComponent {
|
|
974
976
|
constructor() {
|
|
975
977
|
super(...arguments);
|
|
976
978
|
this.editorType = computed(() => {
|
|
@@ -989,20 +991,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
989
991
|
args: [{ selector: 'ng2-table-cell-build-in-editor', imports: [SelectEditorComponent, TextareaEditorComponent, CheckboxEditorComponent, InputEditorComponent], standalone: true, template: "<div role=\"none\" (click)=\"$event.stopPropagation()\">\n @switch (editorType()) {\n @case ('list') {\n <ng2-select-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </ng2-select-editor>\n }\n @case ('textarea') {\n <ng2-textarea-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </ng2-textarea-editor>\n }\n @case ('checkbox') {\n <ng2-checkbox-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </ng2-checkbox-editor>\n }\n @default {\n <ng2-input-editor\n [cell]=\"cell()\"\n [inputClass]=\"inputClass()\">\n </ng2-input-editor>\n }\n}\n</div>" }]
|
|
990
992
|
}] });
|
|
991
993
|
|
|
992
|
-
class CustomEditComponent extends BaseEditorComponent
|
|
994
|
+
class CustomEditComponent extends BaseEditorComponent {
|
|
993
995
|
ngOnChanges(changes) {
|
|
994
996
|
const editor = this.cell().getColumn().editor;
|
|
995
997
|
if (this.customComponent) {
|
|
996
998
|
if (this.customComponent?.instance && 'ngOnChanges' in this.customComponent.instance) {
|
|
997
|
-
|
|
998
|
-
|
|
999
|
+
try {
|
|
1000
|
+
const onChanges = this.customComponent.instance.ngOnChanges;
|
|
1001
|
+
onChanges(changes);
|
|
1002
|
+
}
|
|
1003
|
+
catch {
|
|
1004
|
+
// do nothing
|
|
1005
|
+
}
|
|
999
1006
|
}
|
|
1000
1007
|
return;
|
|
1001
1008
|
}
|
|
1002
|
-
if (this.cell() &&
|
|
1003
|
-
!this.customComponent &&
|
|
1004
|
-
editor &&
|
|
1005
|
-
editor.type == "custom") {
|
|
1009
|
+
if (this.cell() && !this.customComponent && editor && editor.type == 'custom') {
|
|
1006
1010
|
this.customComponent = this.dynamicTarget?.createComponent(editor.component);
|
|
1007
1011
|
this.customComponent?.setInput('cell', this.cell());
|
|
1008
1012
|
this.customComponent?.setInput('inputClass', this.inputClass());
|
|
@@ -1019,13 +1023,13 @@ class CustomEditComponent extends BaseEditorComponent$1 {
|
|
|
1019
1023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CustomEditComponent, decorators: [{
|
|
1020
1024
|
type: Component,
|
|
1021
1025
|
args: [{
|
|
1022
|
-
selector:
|
|
1026
|
+
selector: 'ng2-table-cell-custom-editor',
|
|
1023
1027
|
template: ` <ng-template #dynamicTarget></ng-template> `,
|
|
1024
1028
|
standalone: true,
|
|
1025
1029
|
}]
|
|
1026
1030
|
}], propDecorators: { dynamicTarget: [{
|
|
1027
1031
|
type: ViewChild,
|
|
1028
|
-
args: [
|
|
1032
|
+
args: ['dynamicTarget', { read: ViewContainerRef, static: true }]
|
|
1029
1033
|
}] } });
|
|
1030
1034
|
|
|
1031
1035
|
class EditCellComponent {
|
|
@@ -1754,7 +1758,7 @@ class TbodyCustomComponent {
|
|
|
1754
1758
|
});
|
|
1755
1759
|
}
|
|
1756
1760
|
customActions() {
|
|
1757
|
-
return this.grid.getSetting(
|
|
1761
|
+
return this.grid.getSetting('actions.custom');
|
|
1758
1762
|
}
|
|
1759
1763
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyCustomComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1760
1764
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TbodyCustomComponent, isStandalone: true, selector: "ng2-st-tbody-custom", inputs: { grid: "grid", row: "row", source: "source" }, outputs: { custom: "custom" }, ngImport: i0, template: `
|
|
@@ -1764,17 +1768,14 @@ class TbodyCustomComponent {
|
|
|
1764
1768
|
href="#"
|
|
1765
1769
|
class="ng2-smart-action ng2-smart-action-custom-custom"
|
|
1766
1770
|
[innerHTML]="action.title"
|
|
1767
|
-
(click)="
|
|
1768
|
-
$event.stopPropagation(); $event.preventDefault(); onCustom(action)
|
|
1769
|
-
"
|
|
1770
|
-
></a>
|
|
1771
|
+
(click)="$event.stopPropagation(); $event.preventDefault(); onCustom(action)"></a>
|
|
1771
1772
|
}
|
|
1772
1773
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1773
1774
|
}
|
|
1774
1775
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyCustomComponent, decorators: [{
|
|
1775
1776
|
type: Component,
|
|
1776
1777
|
args: [{
|
|
1777
|
-
selector:
|
|
1778
|
+
selector: 'ng2-st-tbody-custom',
|
|
1778
1779
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1779
1780
|
template: `
|
|
1780
1781
|
@for (action of customActions(); track $index) {
|
|
@@ -1783,10 +1784,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1783
1784
|
href="#"
|
|
1784
1785
|
class="ng2-smart-action ng2-smart-action-custom-custom"
|
|
1785
1786
|
[innerHTML]="action.title"
|
|
1786
|
-
(click)="
|
|
1787
|
-
$event.stopPropagation(); $event.preventDefault(); onCustom(action)
|
|
1788
|
-
"
|
|
1789
|
-
></a>
|
|
1787
|
+
(click)="$event.stopPropagation(); $event.preventDefault(); onCustom(action)"></a>
|
|
1790
1788
|
}
|
|
1791
1789
|
`,
|
|
1792
1790
|
standalone: true,
|
|
@@ -1811,8 +1809,8 @@ class TbodyEditDeleteComponent {
|
|
|
1811
1809
|
this.isActionEdit = false;
|
|
1812
1810
|
this.isActionDelete = false;
|
|
1813
1811
|
this.isExternalMode = false;
|
|
1814
|
-
this.editRowButtonContent =
|
|
1815
|
-
this.deleteRowButtonContent =
|
|
1812
|
+
this.editRowButtonContent = 'Edit';
|
|
1813
|
+
this.deleteRowButtonContent = 'Delete';
|
|
1816
1814
|
effect(() => {
|
|
1817
1815
|
const settings = this.grid().settings();
|
|
1818
1816
|
const actions = settings.actions;
|
|
@@ -1821,12 +1819,8 @@ class TbodyEditDeleteComponent {
|
|
|
1821
1819
|
this.isActionEdit = !!actions.edit;
|
|
1822
1820
|
}
|
|
1823
1821
|
this.isExternalMode = settings.mode === 'external';
|
|
1824
|
-
this.editRowButtonContent = settings.edit
|
|
1825
|
-
|
|
1826
|
-
: "Edit";
|
|
1827
|
-
this.deleteRowButtonContent = settings.delete
|
|
1828
|
-
? settings.delete.deleteButtonContent || "Delete"
|
|
1829
|
-
: "Delete";
|
|
1822
|
+
this.editRowButtonContent = settings.edit ? settings.edit.editButtonContent || 'Edit' : 'Edit';
|
|
1823
|
+
this.deleteRowButtonContent = settings.delete ? settings.delete.deleteButtonContent || 'Delete' : 'Delete';
|
|
1830
1824
|
this.cdr.detectChanges();
|
|
1831
1825
|
});
|
|
1832
1826
|
}
|
|
@@ -1862,16 +1856,14 @@ class TbodyEditDeleteComponent {
|
|
|
1862
1856
|
[id]="'row-' + row().index + '_action-edit-button'"
|
|
1863
1857
|
class="ng2-smart-action ng2-smart-action-edit-edit"
|
|
1864
1858
|
[innerHTML]="editRowButtonContent"
|
|
1865
|
-
(click)="onEdit($event)"
|
|
1866
|
-
></a>
|
|
1859
|
+
(click)="onEdit($event)"></a>
|
|
1867
1860
|
} @if (isActionDelete) {
|
|
1868
1861
|
<a
|
|
1869
1862
|
href="#"
|
|
1870
1863
|
[id]="'row-' + row().index + '_action-delete-button'"
|
|
1871
1864
|
class="ng2-smart-action ng2-smart-action-delete-delete"
|
|
1872
1865
|
[innerHTML]="deleteRowButtonContent"
|
|
1873
|
-
(click)="onDelete($event)"
|
|
1874
|
-
></a>
|
|
1866
|
+
(click)="onDelete($event)"></a>
|
|
1875
1867
|
} } @else {
|
|
1876
1868
|
<div style="display: flex;">
|
|
1877
1869
|
@if (isActionEdit) {
|
|
@@ -1887,12 +1879,10 @@ class TbodyEditDeleteComponent {
|
|
|
1887
1879
|
y="0px"
|
|
1888
1880
|
viewBox="0 0 100 100"
|
|
1889
1881
|
enable-background="new 0 0 0 0"
|
|
1890
|
-
xml:space="preserve"
|
|
1891
|
-
>
|
|
1882
|
+
xml:space="preserve">
|
|
1892
1883
|
<path
|
|
1893
1884
|
fill="#e9e9e9"
|
|
1894
|
-
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"
|
|
1895
|
-
>
|
|
1885
|
+
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">
|
|
1896
1886
|
<animateTransform
|
|
1897
1887
|
attributeName="transform"
|
|
1898
1888
|
attributeType="XML"
|
|
@@ -1900,8 +1890,7 @@ class TbodyEditDeleteComponent {
|
|
|
1900
1890
|
dur="1s"
|
|
1901
1891
|
from="0 50 50"
|
|
1902
1892
|
to="360 50 50"
|
|
1903
|
-
repeatCount="indefinite"
|
|
1904
|
-
/>
|
|
1893
|
+
repeatCount="indefinite" />
|
|
1905
1894
|
</path>
|
|
1906
1895
|
</svg>
|
|
1907
1896
|
} @if (isActionDelete) {
|
|
@@ -1917,12 +1906,10 @@ class TbodyEditDeleteComponent {
|
|
|
1917
1906
|
y="0px"
|
|
1918
1907
|
viewBox="0 0 100 100"
|
|
1919
1908
|
enable-background="new 0 0 0 0"
|
|
1920
|
-
xml:space="preserve"
|
|
1921
|
-
>
|
|
1909
|
+
xml:space="preserve">
|
|
1922
1910
|
<path
|
|
1923
1911
|
fill="#e9e9e9"
|
|
1924
|
-
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"
|
|
1925
|
-
>
|
|
1912
|
+
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">
|
|
1926
1913
|
<animateTransform
|
|
1927
1914
|
attributeName="transform"
|
|
1928
1915
|
attributeType="XML"
|
|
@@ -1930,8 +1917,7 @@ class TbodyEditDeleteComponent {
|
|
|
1930
1917
|
dur="1s"
|
|
1931
1918
|
from="0 50 50"
|
|
1932
1919
|
to="360 50 50"
|
|
1933
|
-
repeatCount="indefinite"
|
|
1934
|
-
/>
|
|
1920
|
+
repeatCount="indefinite" />
|
|
1935
1921
|
</path>
|
|
1936
1922
|
</svg>
|
|
1937
1923
|
}
|
|
@@ -1942,7 +1928,7 @@ class TbodyEditDeleteComponent {
|
|
|
1942
1928
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyEditDeleteComponent, decorators: [{
|
|
1943
1929
|
type: Component,
|
|
1944
1930
|
args: [{
|
|
1945
|
-
selector:
|
|
1931
|
+
selector: 'ng2-st-tbody-edit-delete',
|
|
1946
1932
|
template: `
|
|
1947
1933
|
@if (!row().pending()) { @if (isActionEdit) {
|
|
1948
1934
|
<a
|
|
@@ -1950,16 +1936,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1950
1936
|
[id]="'row-' + row().index + '_action-edit-button'"
|
|
1951
1937
|
class="ng2-smart-action ng2-smart-action-edit-edit"
|
|
1952
1938
|
[innerHTML]="editRowButtonContent"
|
|
1953
|
-
(click)="onEdit($event)"
|
|
1954
|
-
></a>
|
|
1939
|
+
(click)="onEdit($event)"></a>
|
|
1955
1940
|
} @if (isActionDelete) {
|
|
1956
1941
|
<a
|
|
1957
1942
|
href="#"
|
|
1958
1943
|
[id]="'row-' + row().index + '_action-delete-button'"
|
|
1959
1944
|
class="ng2-smart-action ng2-smart-action-delete-delete"
|
|
1960
1945
|
[innerHTML]="deleteRowButtonContent"
|
|
1961
|
-
(click)="onDelete($event)"
|
|
1962
|
-
></a>
|
|
1946
|
+
(click)="onDelete($event)"></a>
|
|
1963
1947
|
} } @else {
|
|
1964
1948
|
<div style="display: flex;">
|
|
1965
1949
|
@if (isActionEdit) {
|
|
@@ -1975,12 +1959,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1975
1959
|
y="0px"
|
|
1976
1960
|
viewBox="0 0 100 100"
|
|
1977
1961
|
enable-background="new 0 0 0 0"
|
|
1978
|
-
xml:space="preserve"
|
|
1979
|
-
>
|
|
1962
|
+
xml:space="preserve">
|
|
1980
1963
|
<path
|
|
1981
1964
|
fill="#e9e9e9"
|
|
1982
|
-
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"
|
|
1983
|
-
>
|
|
1965
|
+
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">
|
|
1984
1966
|
<animateTransform
|
|
1985
1967
|
attributeName="transform"
|
|
1986
1968
|
attributeType="XML"
|
|
@@ -1988,8 +1970,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1988
1970
|
dur="1s"
|
|
1989
1971
|
from="0 50 50"
|
|
1990
1972
|
to="360 50 50"
|
|
1991
|
-
repeatCount="indefinite"
|
|
1992
|
-
/>
|
|
1973
|
+
repeatCount="indefinite" />
|
|
1993
1974
|
</path>
|
|
1994
1975
|
</svg>
|
|
1995
1976
|
} @if (isActionDelete) {
|
|
@@ -2005,12 +1986,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2005
1986
|
y="0px"
|
|
2006
1987
|
viewBox="0 0 100 100"
|
|
2007
1988
|
enable-background="new 0 0 0 0"
|
|
2008
|
-
xml:space="preserve"
|
|
2009
|
-
>
|
|
1989
|
+
xml:space="preserve">
|
|
2010
1990
|
<path
|
|
2011
1991
|
fill="#e9e9e9"
|
|
2012
|
-
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"
|
|
2013
|
-
>
|
|
1992
|
+
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">
|
|
2014
1993
|
<animateTransform
|
|
2015
1994
|
attributeName="transform"
|
|
2016
1995
|
attributeType="XML"
|
|
@@ -2018,8 +1997,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2018
1997
|
dur="1s"
|
|
2019
1998
|
from="0 50 50"
|
|
2020
1999
|
to="360 50 50"
|
|
2021
|
-
repeatCount="indefinite"
|
|
2022
|
-
/>
|
|
2000
|
+
repeatCount="indefinite" />
|
|
2023
2001
|
</path>
|
|
2024
2002
|
</svg>
|
|
2025
2003
|
}
|
|
@@ -2038,7 +2016,7 @@ class Ng2SmartTableTbodyComponent {
|
|
|
2038
2016
|
this.deleteConfirm = input.required();
|
|
2039
2017
|
this.createConfirm = input.required();
|
|
2040
2018
|
this.editConfirm = input.required();
|
|
2041
|
-
this.rowClassFunction = input(() =>
|
|
2019
|
+
this.rowClassFunction = input(() => '');
|
|
2042
2020
|
this.save = output();
|
|
2043
2021
|
this.edit = output();
|
|
2044
2022
|
this.editCancel = output();
|
|
@@ -2056,7 +2034,7 @@ class Ng2SmartTableTbodyComponent {
|
|
|
2056
2034
|
return editOptions.inputClass || '';
|
|
2057
2035
|
});
|
|
2058
2036
|
this.noDataMessage = computed(() => {
|
|
2059
|
-
return this.grid().settings().noDataMessage ||
|
|
2037
|
+
return this.grid().settings().noDataMessage || 'No data found';
|
|
2060
2038
|
});
|
|
2061
2039
|
}
|
|
2062
2040
|
trackByIdOrIndex(index, item) {
|
|
@@ -2067,7 +2045,7 @@ class Ng2SmartTableTbodyComponent {
|
|
|
2067
2045
|
}
|
|
2068
2046
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableTbodyComponent, decorators: [{
|
|
2069
2047
|
type: Component,
|
|
2070
|
-
args: [{ selector:
|
|
2048
|
+
args: [{ selector: '[ng2-st-tbody]', standalone: true, imports: [
|
|
2071
2049
|
FormsModule,
|
|
2072
2050
|
TbodyCustomComponent,
|
|
2073
2051
|
TbodyEditDeleteComponent,
|
|
@@ -2104,7 +2082,7 @@ class CheckboxFilterComponent extends BaseFilterComponent {
|
|
|
2104
2082
|
}
|
|
2105
2083
|
ngOnChanges({ query }) {
|
|
2106
2084
|
if (query) {
|
|
2107
|
-
this.inputControl
|
|
2085
|
+
this.inputControl?.setValue(query.currentValue === this.trueVal, { emitEvent: false });
|
|
2108
2086
|
}
|
|
2109
2087
|
}
|
|
2110
2088
|
resetFilter(event) {
|
|
@@ -2281,8 +2259,13 @@ class CustomFilterComponent {
|
|
|
2281
2259
|
ngOnChanges(changes) {
|
|
2282
2260
|
if (this.customComponent) {
|
|
2283
2261
|
if (this.customComponent?.instance && 'ngOnChanges' in this.customComponent.instance) {
|
|
2284
|
-
|
|
2285
|
-
|
|
2262
|
+
try {
|
|
2263
|
+
const onChanges = this.customComponent.instance.ngOnChanges;
|
|
2264
|
+
onChanges(changes);
|
|
2265
|
+
}
|
|
2266
|
+
catch {
|
|
2267
|
+
// do nothing
|
|
2268
|
+
}
|
|
2286
2269
|
}
|
|
2287
2270
|
return;
|
|
2288
2271
|
}
|
|
@@ -2417,15 +2400,15 @@ class AddButtonComponent {
|
|
|
2417
2400
|
this.addNewButtonContent = computed(() => {
|
|
2418
2401
|
const addParams = this.grid().settings()?.add;
|
|
2419
2402
|
if (!addParams) {
|
|
2420
|
-
return
|
|
2403
|
+
return 'Add New';
|
|
2421
2404
|
}
|
|
2422
|
-
return addParams?.addButtonContent ||
|
|
2405
|
+
return addParams?.addButtonContent || 'Add New';
|
|
2423
2406
|
});
|
|
2424
2407
|
}
|
|
2425
2408
|
onAdd(event) {
|
|
2426
2409
|
event.preventDefault();
|
|
2427
2410
|
event.stopPropagation();
|
|
2428
|
-
if (this.grid().getSetting(
|
|
2411
|
+
if (this.grid().getSetting('mode') === 'external') {
|
|
2429
2412
|
this.create.emit({
|
|
2430
2413
|
source: this.source(),
|
|
2431
2414
|
});
|
|
@@ -2441,27 +2424,25 @@ class AddButtonComponent {
|
|
|
2441
2424
|
href="#"
|
|
2442
2425
|
class="ng2-smart-action ng2-smart-action-add-add"
|
|
2443
2426
|
[innerHTML]="addNewButtonContent()"
|
|
2444
|
-
(click)="onAdd($event)"
|
|
2445
|
-
></a>
|
|
2427
|
+
(click)="onAdd($event)"></a>
|
|
2446
2428
|
}
|
|
2447
2429
|
`, isInline: true }); }
|
|
2448
2430
|
}
|
|
2449
2431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AddButtonComponent, decorators: [{
|
|
2450
2432
|
type: Component,
|
|
2451
2433
|
args: [{
|
|
2452
|
-
selector:
|
|
2434
|
+
selector: '[ng2-st-add-button]',
|
|
2453
2435
|
template: `
|
|
2454
2436
|
@if (isActionAdd()) {
|
|
2455
2437
|
<a
|
|
2456
2438
|
href="#"
|
|
2457
2439
|
class="ng2-smart-action ng2-smart-action-add-add"
|
|
2458
2440
|
[innerHTML]="addNewButtonContent()"
|
|
2459
|
-
(click)="onAdd($event)"
|
|
2460
|
-
></a>
|
|
2441
|
+
(click)="onAdd($event)"></a>
|
|
2461
2442
|
}
|
|
2462
2443
|
`,
|
|
2463
2444
|
host: {
|
|
2464
|
-
class:
|
|
2445
|
+
class: 'ng2-smart-actions-title ng2-smart-actions-title-add',
|
|
2465
2446
|
},
|
|
2466
2447
|
standalone: true,
|
|
2467
2448
|
}]
|
|
@@ -2475,9 +2456,9 @@ class TheadFiltersRowComponent {
|
|
|
2475
2456
|
this.filterInputClass = computed(() => {
|
|
2476
2457
|
const filterOptions = this.grid().settings()?.filter;
|
|
2477
2458
|
if (!filterOptions) {
|
|
2478
|
-
return
|
|
2459
|
+
return '';
|
|
2479
2460
|
}
|
|
2480
|
-
return filterOptions.inputClass ||
|
|
2461
|
+
return filterOptions.inputClass || '';
|
|
2481
2462
|
});
|
|
2482
2463
|
}
|
|
2483
2464
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFiltersRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -2485,61 +2466,33 @@ class TheadFiltersRowComponent {
|
|
|
2485
2466
|
@if (grid().isMultiSelectVisible()) {
|
|
2486
2467
|
<th></th>
|
|
2487
2468
|
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2488
|
-
<th
|
|
2489
|
-
ng2-st-add-button
|
|
2490
|
-
[source]="source()"
|
|
2491
|
-
[grid]="grid()"
|
|
2492
|
-
(create)="create.emit($event)"
|
|
2493
|
-
></th>
|
|
2469
|
+
<th ng2-st-add-button [source]="source()" [grid]="grid()" (create)="create.emit($event)"></th>
|
|
2494
2470
|
} @for (column of grid().dataSet.getVisibleColumns(); track column.id + $index) {
|
|
2495
2471
|
<th class="ng2-smart-th {{ column.id }}">
|
|
2496
|
-
<ng2-smart-table-filter
|
|
2497
|
-
[source]="source()"
|
|
2498
|
-
[column]="column"
|
|
2499
|
-
[inputClass]="filterInputClass()"
|
|
2500
|
-
>
|
|
2472
|
+
<ng2-smart-table-filter [source]="source()" [column]="column" [inputClass]="filterInputClass()">
|
|
2501
2473
|
</ng2-smart-table-filter>
|
|
2502
2474
|
</th>
|
|
2503
2475
|
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
2504
|
-
<th
|
|
2505
|
-
ng2-st-add-button
|
|
2506
|
-
[grid]="grid()"
|
|
2507
|
-
[source]="source()"
|
|
2508
|
-
(create)="create.emit($event)"
|
|
2509
|
-
></th>
|
|
2476
|
+
<th ng2-st-add-button [grid]="grid()" [source]="source()" (create)="create.emit($event)"></th>
|
|
2510
2477
|
}
|
|
2511
2478
|
`, isInline: true, dependencies: [{ kind: "component", type: AddButtonComponent, selector: "[ng2-st-add-button]", inputs: ["grid", "source"], outputs: ["create"] }, { kind: "component", type: FilterComponent, selector: "ng2-smart-table-filter", inputs: ["column", "source", "inputClass"] }] }); }
|
|
2512
2479
|
}
|
|
2513
2480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFiltersRowComponent, decorators: [{
|
|
2514
2481
|
type: Component,
|
|
2515
2482
|
args: [{
|
|
2516
|
-
selector:
|
|
2483
|
+
selector: '[ng2-st-thead-filters-row]',
|
|
2517
2484
|
template: `
|
|
2518
2485
|
@if (grid().isMultiSelectVisible()) {
|
|
2519
2486
|
<th></th>
|
|
2520
2487
|
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2521
|
-
<th
|
|
2522
|
-
ng2-st-add-button
|
|
2523
|
-
[source]="source()"
|
|
2524
|
-
[grid]="grid()"
|
|
2525
|
-
(create)="create.emit($event)"
|
|
2526
|
-
></th>
|
|
2488
|
+
<th ng2-st-add-button [source]="source()" [grid]="grid()" (create)="create.emit($event)"></th>
|
|
2527
2489
|
} @for (column of grid().dataSet.getVisibleColumns(); track column.id + $index) {
|
|
2528
2490
|
<th class="ng2-smart-th {{ column.id }}">
|
|
2529
|
-
<ng2-smart-table-filter
|
|
2530
|
-
[source]="source()"
|
|
2531
|
-
[column]="column"
|
|
2532
|
-
[inputClass]="filterInputClass()"
|
|
2533
|
-
>
|
|
2491
|
+
<ng2-smart-table-filter [source]="source()" [column]="column" [inputClass]="filterInputClass()">
|
|
2534
2492
|
</ng2-smart-table-filter>
|
|
2535
2493
|
</th>
|
|
2536
2494
|
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
2537
|
-
<th
|
|
2538
|
-
ng2-st-add-button
|
|
2539
|
-
[grid]="grid()"
|
|
2540
|
-
[source]="source()"
|
|
2541
|
-
(create)="create.emit($event)"
|
|
2542
|
-
></th>
|
|
2495
|
+
<th ng2-st-add-button [grid]="grid()" [source]="source()" (create)="create.emit($event)"></th>
|
|
2543
2496
|
}
|
|
2544
2497
|
`,
|
|
2545
2498
|
standalone: true,
|
|
@@ -2611,9 +2564,9 @@ class TheadFormRowComponent {
|
|
|
2611
2564
|
this.addInputClass = computed(() => {
|
|
2612
2565
|
const addOptions = this.grid().settings()?.add;
|
|
2613
2566
|
if (!addOptions) {
|
|
2614
|
-
return
|
|
2567
|
+
return '';
|
|
2615
2568
|
}
|
|
2616
|
-
return addOptions.inputClass ||
|
|
2569
|
+
return addOptions.inputClass || '';
|
|
2617
2570
|
});
|
|
2618
2571
|
}
|
|
2619
2572
|
onCreate(event) {
|
|
@@ -2629,26 +2582,19 @@ class TheadFormRowComponent {
|
|
|
2629
2582
|
<td></td>
|
|
2630
2583
|
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2631
2584
|
<td class="ng2-smart-actions">
|
|
2632
|
-
<ng2-st-actions
|
|
2633
|
-
[grid]="grid()"
|
|
2634
|
-
(create)="onCreate($event)"
|
|
2635
|
-
></ng2-st-actions>
|
|
2585
|
+
<ng2-st-actions [grid]="grid()" (create)="onCreate($event)"></ng2-st-actions>
|
|
2636
2586
|
</td>
|
|
2637
2587
|
} @for (cell of getVisibleCells(); track cell.getId()+ $index) {
|
|
2638
2588
|
<td>
|
|
2639
2589
|
<ng2-smart-table-cell
|
|
2640
2590
|
[cell]="cell"
|
|
2641
2591
|
[inputClass]="addInputClass()"
|
|
2642
|
-
[isInEditing]="grid().getNewRow().isInEditing()"
|
|
2643
|
-
>
|
|
2592
|
+
[isInEditing]="grid().getNewRow().isInEditing()">
|
|
2644
2593
|
</ng2-smart-table-cell>
|
|
2645
2594
|
</td>
|
|
2646
2595
|
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
2647
2596
|
<td class="ng2-smart-actions">
|
|
2648
|
-
<ng2-st-actions
|
|
2649
|
-
[grid]="grid()"
|
|
2650
|
-
(create)="onCreate($event)"
|
|
2651
|
-
></ng2-st-actions>
|
|
2597
|
+
<ng2-st-actions [grid]="grid()" (create)="onCreate($event)"></ng2-st-actions>
|
|
2652
2598
|
</td>
|
|
2653
2599
|
}
|
|
2654
2600
|
`, 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"] }] }); }
|
|
@@ -2656,32 +2602,25 @@ class TheadFormRowComponent {
|
|
|
2656
2602
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadFormRowComponent, decorators: [{
|
|
2657
2603
|
type: Component,
|
|
2658
2604
|
args: [{
|
|
2659
|
-
selector:
|
|
2605
|
+
selector: '[ng2-st-thead-form-row]',
|
|
2660
2606
|
template: `
|
|
2661
2607
|
@if (grid().isMultiSelectVisible()) {
|
|
2662
2608
|
<td></td>
|
|
2663
2609
|
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2664
2610
|
<td class="ng2-smart-actions">
|
|
2665
|
-
<ng2-st-actions
|
|
2666
|
-
[grid]="grid()"
|
|
2667
|
-
(create)="onCreate($event)"
|
|
2668
|
-
></ng2-st-actions>
|
|
2611
|
+
<ng2-st-actions [grid]="grid()" (create)="onCreate($event)"></ng2-st-actions>
|
|
2669
2612
|
</td>
|
|
2670
2613
|
} @for (cell of getVisibleCells(); track cell.getId()+ $index) {
|
|
2671
2614
|
<td>
|
|
2672
2615
|
<ng2-smart-table-cell
|
|
2673
2616
|
[cell]="cell"
|
|
2674
2617
|
[inputClass]="addInputClass()"
|
|
2675
|
-
[isInEditing]="grid().getNewRow().isInEditing()"
|
|
2676
|
-
>
|
|
2618
|
+
[isInEditing]="grid().getNewRow().isInEditing()">
|
|
2677
2619
|
</ng2-smart-table-cell>
|
|
2678
2620
|
</td>
|
|
2679
2621
|
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
2680
2622
|
<td class="ng2-smart-actions">
|
|
2681
|
-
<ng2-st-actions
|
|
2682
|
-
[grid]="grid()"
|
|
2683
|
-
(create)="onCreate($event)"
|
|
2684
|
-
></ng2-st-actions>
|
|
2623
|
+
<ng2-st-actions [grid]="grid()" (create)="onCreate($event)"></ng2-st-actions>
|
|
2685
2624
|
</td>
|
|
2686
2625
|
}
|
|
2687
2626
|
`,
|
|
@@ -2799,23 +2738,17 @@ class ColumnTitleComponent {
|
|
|
2799
2738
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ColumnTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2800
2739
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: ColumnTitleComponent, isStandalone: true, selector: "ng2-st-column-title", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
2801
2740
|
<div class="ng2-smart-title">
|
|
2802
|
-
<ng2-smart-table-title
|
|
2803
|
-
[source]="source()"
|
|
2804
|
-
[column]="column()"
|
|
2805
|
-
></ng2-smart-table-title>
|
|
2741
|
+
<ng2-smart-table-title [source]="source()" [column]="column()"></ng2-smart-table-title>
|
|
2806
2742
|
</div>
|
|
2807
2743
|
`, isInline: true, dependencies: [{ kind: "component", type: TitleComponent, selector: "ng2-smart-table-title", inputs: ["source", "column"] }] }); }
|
|
2808
2744
|
}
|
|
2809
2745
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ColumnTitleComponent, decorators: [{
|
|
2810
2746
|
type: Component,
|
|
2811
2747
|
args: [{
|
|
2812
|
-
selector:
|
|
2748
|
+
selector: 'ng2-st-column-title',
|
|
2813
2749
|
template: `
|
|
2814
2750
|
<div class="ng2-smart-title">
|
|
2815
|
-
<ng2-smart-table-title
|
|
2816
|
-
[source]="source()"
|
|
2817
|
-
[column]="column()"
|
|
2818
|
-
></ng2-smart-table-title>
|
|
2751
|
+
<ng2-smart-table-title [source]="source()" [column]="column()"></ng2-smart-table-title>
|
|
2819
2752
|
</div>
|
|
2820
2753
|
`,
|
|
2821
2754
|
standalone: true,
|
|
@@ -2832,24 +2765,13 @@ class TheadTitlesRowComponent {
|
|
|
2832
2765
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadTitlesRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2833
2766
|
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: { selectAllRows: "selectAllRows" }, ngImport: i0, template: `
|
|
2834
2767
|
@if (grid().isMultiSelectVisible()) {
|
|
2835
|
-
<th
|
|
2836
|
-
ng2-st-checkbox-select-all
|
|
2837
|
-
[grid]="grid()"
|
|
2838
|
-
(click)="selectAllRows.emit()"
|
|
2839
|
-
></th>
|
|
2768
|
+
<th ng2-st-checkbox-select-all [grid]="grid()" (click)="selectAllRows.emit()"></th>
|
|
2840
2769
|
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2841
2770
|
|
|
2842
2771
|
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
2843
2772
|
} @for (column of grid().dataSet.getVisibleColumns(); track column.id + $index) {
|
|
2844
|
-
<th
|
|
2845
|
-
|
|
2846
|
-
[class]="column.class"
|
|
2847
|
-
[style.width]="column.width"
|
|
2848
|
-
>
|
|
2849
|
-
<ng2-st-column-title
|
|
2850
|
-
[source]="source()"
|
|
2851
|
-
[column]="column"
|
|
2852
|
-
></ng2-st-column-title>
|
|
2773
|
+
<th class="ng2-smart-th {{ column.id }}" [class]="column.class" [style.width]="column.width">
|
|
2774
|
+
<ng2-st-column-title [source]="source()" [column]="column"></ng2-st-column-title>
|
|
2853
2775
|
</th>
|
|
2854
2776
|
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
2855
2777
|
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
@@ -2859,38 +2781,23 @@ class TheadTitlesRowComponent {
|
|
|
2859
2781
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TheadTitlesRowComponent, decorators: [{
|
|
2860
2782
|
type: Component,
|
|
2861
2783
|
args: [{
|
|
2862
|
-
selector:
|
|
2784
|
+
selector: '[ng2-st-thead-titles-row]',
|
|
2863
2785
|
template: `
|
|
2864
2786
|
@if (grid().isMultiSelectVisible()) {
|
|
2865
|
-
<th
|
|
2866
|
-
ng2-st-checkbox-select-all
|
|
2867
|
-
[grid]="grid()"
|
|
2868
|
-
(click)="selectAllRows.emit()"
|
|
2869
|
-
></th>
|
|
2787
|
+
<th ng2-st-checkbox-select-all [grid]="grid()" (click)="selectAllRows.emit()"></th>
|
|
2870
2788
|
} @if (grid().actionIsOnLeft() && grid().isActionsVisible()) {
|
|
2871
2789
|
|
|
2872
2790
|
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
2873
2791
|
} @for (column of grid().dataSet.getVisibleColumns(); track column.id + $index) {
|
|
2874
|
-
<th
|
|
2875
|
-
|
|
2876
|
-
[class]="column.class"
|
|
2877
|
-
[style.width]="column.width"
|
|
2878
|
-
>
|
|
2879
|
-
<ng2-st-column-title
|
|
2880
|
-
[source]="source()"
|
|
2881
|
-
[column]="column"
|
|
2882
|
-
></ng2-st-column-title>
|
|
2792
|
+
<th class="ng2-smart-th {{ column.id }}" [class]="column.class" [style.width]="column.width">
|
|
2793
|
+
<ng2-st-column-title [source]="source()" [column]="column"></ng2-st-column-title>
|
|
2883
2794
|
</th>
|
|
2884
2795
|
} @if (grid().actionIsOnRight() && grid().isActionsVisible()) {
|
|
2885
2796
|
<th ng2-st-actions-title [grid]="grid()"></th>
|
|
2886
2797
|
}
|
|
2887
2798
|
`,
|
|
2888
2799
|
standalone: true,
|
|
2889
|
-
imports: [
|
|
2890
|
-
CheckboxSelectAllComponent,
|
|
2891
|
-
ActionsTitleComponent,
|
|
2892
|
-
ColumnTitleComponent,
|
|
2893
|
-
],
|
|
2800
|
+
imports: [CheckboxSelectAllComponent, ActionsTitleComponent, ColumnTitleComponent],
|
|
2894
2801
|
}]
|
|
2895
2802
|
}] });
|
|
2896
2803
|
|
|
@@ -2912,11 +2819,7 @@ class Ng2SmartTableTheadComponent {
|
|
|
2912
2819
|
}
|
|
2913
2820
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: Ng2SmartTableTheadComponent, decorators: [{
|
|
2914
2821
|
type: Component,
|
|
2915
|
-
args: [{ selector:
|
|
2916
|
-
TheadTitlesRowComponent,
|
|
2917
|
-
TheadFiltersRowComponent,
|
|
2918
|
-
TheadFormRowComponent,
|
|
2919
|
-
], template: "@if (!isHideHeader()) {\n <tr ng2-st-thead-titles-row\n class=\"ng2-smart-titles\"\n [grid]=\"grid()\"\n [source]=\"source()\"\n (selectAllRows)=\"selectAllRows.emit()\">\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 </tr>\n}\n\n@if (grid().createFormShown) {\n <tr ng2-st-thead-form-row\n [grid]=\"grid()\"\n [createConfirm]=\"createConfirm\">\n </tr>\n}\n" }]
|
|
2822
|
+
args: [{ selector: '[ng2-st-thead]', standalone: true, imports: [TheadTitlesRowComponent, TheadFiltersRowComponent, TheadFormRowComponent], template: "@if (!isHideHeader()) {\n <tr ng2-st-thead-titles-row\n class=\"ng2-smart-titles\"\n [grid]=\"grid()\"\n [source]=\"source()\"\n (selectAllRows)=\"selectAllRows.emit()\">\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 </tr>\n}\n\n@if (grid().createFormShown) {\n <tr ng2-st-thead-form-row\n [grid]=\"grid()\"\n [createConfirm]=\"createConfirm\">\n </tr>\n}\n" }]
|
|
2920
2823
|
}], propDecorators: { createConfirm: [{
|
|
2921
2824
|
type: Input
|
|
2922
2825
|
}] } });
|