@den4ik92/ng2-smart-table 19.1.2 → 19.1.4
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.
|
@@ -27,6 +27,7 @@ class DefaultFilter {
|
|
|
27
27
|
this.delay = 300;
|
|
28
28
|
this.query = '';
|
|
29
29
|
this.inputClass = input('');
|
|
30
|
+
this.source = input.required();
|
|
30
31
|
this.column = input.required();
|
|
31
32
|
this.filter = output();
|
|
32
33
|
}
|
|
@@ -39,7 +40,7 @@ class DefaultFilter {
|
|
|
39
40
|
this.filter.emit(this.query);
|
|
40
41
|
}
|
|
41
42
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultFilter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
42
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: DefaultFilter, isStandalone: true, selector: "ng2-default-base-filter-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 }); }
|
|
43
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: DefaultFilter, isStandalone: true, selector: "ng2-default-base-filter-component", inputs: { query: { classPropertyName: "query", publicName: "query", isSignal: false, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { filter: "filter" }, ngImport: i0, template: '', isInline: true }); }
|
|
43
44
|
}
|
|
44
45
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DefaultFilter, decorators: [{
|
|
45
46
|
type: Component,
|
|
@@ -419,7 +420,7 @@ class Row {
|
|
|
419
420
|
this.index = index;
|
|
420
421
|
this.data = data;
|
|
421
422
|
this._dataSet = _dataSet;
|
|
422
|
-
this.pending = false;
|
|
423
|
+
this.pending = signal(false);
|
|
423
424
|
this.isSelected = false;
|
|
424
425
|
this.isInEditing = false;
|
|
425
426
|
this.cells = [];
|
|
@@ -1577,7 +1578,7 @@ class TbodyCreateCancelComponent {
|
|
|
1577
1578
|
}
|
|
1578
1579
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyCreateCancelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1579
1580
|
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: `
|
|
1580
|
-
@if (!row().pending) {
|
|
1581
|
+
@if (!row().pending()) {
|
|
1581
1582
|
<a
|
|
1582
1583
|
href="#"
|
|
1583
1584
|
[id]="'row-' + row().index + '_editing-confirm-button'"
|
|
@@ -1661,7 +1662,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
1661
1662
|
args: [{
|
|
1662
1663
|
selector: "ng2-st-tbody-create-cancel",
|
|
1663
1664
|
template: `
|
|
1664
|
-
@if (!row().pending) {
|
|
1665
|
+
@if (!row().pending()) {
|
|
1665
1666
|
<a
|
|
1666
1667
|
href="#"
|
|
1667
1668
|
[id]="'row-' + row().index + '_editing-confirm-button'"
|
|
@@ -1933,11 +1934,11 @@ class Grid {
|
|
|
1933
1934
|
row.isInEditing = true;
|
|
1934
1935
|
}
|
|
1935
1936
|
create(row, confirmEmitter) {
|
|
1936
|
-
row.pending
|
|
1937
|
+
row.pending.set(true);
|
|
1937
1938
|
const deferred = new Deferred();
|
|
1938
1939
|
deferred.promise
|
|
1939
1940
|
.then((newData) => {
|
|
1940
|
-
row.pending
|
|
1941
|
+
row.pending.set(false);
|
|
1941
1942
|
newData = newData || row.getNewData();
|
|
1942
1943
|
this.source.prepend(newData).then(() => {
|
|
1943
1944
|
this.createFormShown = false;
|
|
@@ -1945,9 +1946,9 @@ class Grid {
|
|
|
1945
1946
|
});
|
|
1946
1947
|
})
|
|
1947
1948
|
.catch((err) => {
|
|
1948
|
-
row.pending
|
|
1949
|
+
row.pending.set(false);
|
|
1949
1950
|
});
|
|
1950
|
-
if (this.getSetting("add.confirmCreate")) {
|
|
1951
|
+
if (this.getSetting("add.confirmCreate", false)) {
|
|
1951
1952
|
confirmEmitter.emit({
|
|
1952
1953
|
newData: row.getNewData(),
|
|
1953
1954
|
source: this.source,
|
|
@@ -1956,21 +1957,22 @@ class Grid {
|
|
|
1956
1957
|
}
|
|
1957
1958
|
else {
|
|
1958
1959
|
deferred.resolve(false);
|
|
1960
|
+
row.pending.set(false);
|
|
1959
1961
|
}
|
|
1960
1962
|
}
|
|
1961
1963
|
save(row, confirmEmitter) {
|
|
1962
|
-
row.pending
|
|
1964
|
+
row.pending.set(true);
|
|
1963
1965
|
const deferred = new Deferred();
|
|
1964
1966
|
deferred.promise
|
|
1965
1967
|
.then((newData) => {
|
|
1966
|
-
row.pending
|
|
1968
|
+
row.pending.set(false);
|
|
1967
1969
|
newData = newData || row.getNewData();
|
|
1968
1970
|
this.source.update(row.getData(), newData).then(() => {
|
|
1969
1971
|
row.isInEditing = false;
|
|
1970
1972
|
});
|
|
1971
1973
|
})
|
|
1972
|
-
.catch((
|
|
1973
|
-
row.pending
|
|
1974
|
+
.catch(() => {
|
|
1975
|
+
row.pending.set(false);
|
|
1974
1976
|
});
|
|
1975
1977
|
if (this.getSetting("edit.confirmSave", false)) {
|
|
1976
1978
|
confirmEmitter.emit({
|
|
@@ -1982,18 +1984,19 @@ class Grid {
|
|
|
1982
1984
|
}
|
|
1983
1985
|
else {
|
|
1984
1986
|
deferred.resolve(false);
|
|
1987
|
+
row.pending.set(false);
|
|
1985
1988
|
}
|
|
1986
1989
|
}
|
|
1987
1990
|
delete(row, confirmEmitter) {
|
|
1988
|
-
row.pending
|
|
1991
|
+
row.pending.set(true);
|
|
1989
1992
|
const deferred = new Deferred();
|
|
1990
1993
|
deferred.promise
|
|
1991
1994
|
.then(() => {
|
|
1992
|
-
row.pending
|
|
1995
|
+
row.pending.set(false);
|
|
1993
1996
|
this.source.remove(row.getData());
|
|
1994
1997
|
})
|
|
1995
|
-
.catch((
|
|
1996
|
-
row.pending
|
|
1998
|
+
.catch(() => {
|
|
1999
|
+
row.pending.set(false);
|
|
1997
2000
|
// doing nothing
|
|
1998
2001
|
});
|
|
1999
2002
|
if (this.getSetting("delete.confirmDelete")) {
|
|
@@ -2005,6 +2008,7 @@ class Grid {
|
|
|
2005
2008
|
}
|
|
2006
2009
|
else {
|
|
2007
2010
|
deferred.resolve(false);
|
|
2011
|
+
row.pending.set(false);
|
|
2008
2012
|
}
|
|
2009
2013
|
if (row.isSelected) {
|
|
2010
2014
|
this.dataSet.selectRow(row, false);
|
|
@@ -2244,7 +2248,7 @@ class TbodyEditDeleteComponent {
|
|
|
2244
2248
|
}
|
|
2245
2249
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TbodyEditDeleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2246
2250
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: TbodyEditDeleteComponent, isStandalone: true, selector: "ng2-st-tbody-edit-delete", inputs: { grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: true, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null }, source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, deleteConfirm: { classPropertyName: "deleteConfirm", publicName: "deleteConfirm", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { edit: "edit", delete: "delete" }, ngImport: i0, template: `
|
|
2247
|
-
@if (!row().pending) { @if (isActionEdit) {
|
|
2251
|
+
@if (!row().pending()) { @if (isActionEdit) {
|
|
2248
2252
|
<a
|
|
2249
2253
|
href="#"
|
|
2250
2254
|
[id]="'row-' + row().index + '_action-edit-button'"
|
|
@@ -2332,7 +2336,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2332
2336
|
args: [{
|
|
2333
2337
|
selector: "ng2-st-tbody-edit-delete",
|
|
2334
2338
|
template: `
|
|
2335
|
-
@if (!row().pending) { @if (isActionEdit) {
|
|
2339
|
+
@if (!row().pending()) { @if (isActionEdit) {
|
|
2336
2340
|
<a
|
|
2337
2341
|
href="#"
|
|
2338
2342
|
[id]="'row-' + row().index + '_action-edit-button'"
|
|
@@ -2709,6 +2713,7 @@ class DefaultFilterComponent extends FilterDefault {
|
|
|
2709
2713
|
<ng2-select-filter
|
|
2710
2714
|
[query]="query"
|
|
2711
2715
|
[class]="inputClass()"
|
|
2716
|
+
[source]="source()"
|
|
2712
2717
|
[column]="column()"
|
|
2713
2718
|
(filter)="onFilter($event)"
|
|
2714
2719
|
>
|
|
@@ -2716,6 +2721,7 @@ class DefaultFilterComponent extends FilterDefault {
|
|
|
2716
2721
|
} @case ('checkbox') {
|
|
2717
2722
|
<ng2-checkbox-filter
|
|
2718
2723
|
[query]="query"
|
|
2724
|
+
[source]="source()"
|
|
2719
2725
|
[class]="inputClass()"
|
|
2720
2726
|
[column]="column()"
|
|
2721
2727
|
(filter)="onFilter($event)"
|
|
@@ -2724,6 +2730,7 @@ class DefaultFilterComponent extends FilterDefault {
|
|
|
2724
2730
|
} @default {
|
|
2725
2731
|
<ng2-input-filter
|
|
2726
2732
|
[query]="query"
|
|
2733
|
+
[source]="source()"
|
|
2727
2734
|
[class]="inputClass()"
|
|
2728
2735
|
[column]="column()"
|
|
2729
2736
|
(filter)="onFilter($event)"
|
|
@@ -2741,6 +2748,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2741
2748
|
<ng2-select-filter
|
|
2742
2749
|
[query]="query"
|
|
2743
2750
|
[class]="inputClass()"
|
|
2751
|
+
[source]="source()"
|
|
2744
2752
|
[column]="column()"
|
|
2745
2753
|
(filter)="onFilter($event)"
|
|
2746
2754
|
>
|
|
@@ -2748,6 +2756,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2748
2756
|
} @case ('checkbox') {
|
|
2749
2757
|
<ng2-checkbox-filter
|
|
2750
2758
|
[query]="query"
|
|
2759
|
+
[source]="source()"
|
|
2751
2760
|
[class]="inputClass()"
|
|
2752
2761
|
[column]="column()"
|
|
2753
2762
|
(filter)="onFilter($event)"
|
|
@@ -2756,6 +2765,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2756
2765
|
} @default {
|
|
2757
2766
|
<ng2-input-filter
|
|
2758
2767
|
[query]="query"
|
|
2768
|
+
[source]="source()"
|
|
2759
2769
|
[class]="inputClass()"
|
|
2760
2770
|
[column]="column()"
|
|
2761
2771
|
(filter)="onFilter($event)"
|