@sd-angular/core 1.2.99 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/sd-angular-core-grid-material.umd.js +18 -15
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-utility.umd.js +31 -0
- package/bundles/sd-angular-core-utility.umd.js.map +1 -1
- package/bundles/sd-angular-core-utility.umd.min.js +1 -1
- package/bundles/sd-angular-core-utility.umd.min.js.map +1 -1
- package/esm2015/grid-material/src/lib/grid-material.component.js +44 -40
- package/esm2015/utility/src/lib/utility.service.js +22 -2
- package/fesm2015/sd-angular-core-grid-material.js +43 -39
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/fesm2015/sd-angular-core-utility.js +21 -1
- package/fesm2015/sd-angular-core-utility.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/package.json +1 -1
- package/{sd-angular-core-1.2.99.tgz → sd-angular-core-1.3.1.tgz} +0 -0
- package/utility/src/lib/utility.service.d.ts +4 -0
|
@@ -1837,7 +1837,7 @@
|
|
|
1837
1837
|
{ type: core.NgZone }
|
|
1838
1838
|
]; };
|
|
1839
1839
|
|
|
1840
|
-
var _paginator, _sort, _subscription$1, _optionChanges, _initCellDef, _initFilterDef, _initFooterDef, _filterExportInfo, _initConfiguration, _filterLocal, _getFilter, _load$1, _render, _exportedItems, _allColumns, _allExportedColumns, _onExport, _updateSelectedItems;
|
|
1840
|
+
var _paginator, _sort, _subscription$1, _optionChanges, _reload, _initCellDef, _initFilterDef, _initFooterDef, _filterExportInfo, _initConfiguration, _filterLocal, _getFilter, _load$1, _render, _exportedItems, _allColumns, _allExportedColumns, _onExport, _updateSelectedItems;
|
|
1841
1841
|
var SdGridMaterial = /** @class */ (function () {
|
|
1842
1842
|
function SdGridMaterial(ref, configuration, gridConfigurationService, exportService, notifyService, translateService, columnValuesPipe, editorHandlerColumnPipe) {
|
|
1843
1843
|
var _this = this;
|
|
@@ -1875,6 +1875,7 @@
|
|
|
1875
1875
|
// Subcription
|
|
1876
1876
|
_subscription$1.set(this, new rxjs.Subscription());
|
|
1877
1877
|
_optionChanges.set(this, new core.EventEmitter());
|
|
1878
|
+
_reload.set(this, new rxjs.Subject());
|
|
1878
1879
|
this.isExporting = false;
|
|
1879
1880
|
this.isSelectAll = false;
|
|
1880
1881
|
this.exportTitle = 'Export';
|
|
@@ -2017,9 +2018,9 @@
|
|
|
2017
2018
|
}
|
|
2018
2019
|
}
|
|
2019
2020
|
else if (type === 'datetime' || type === 'date' || type === 'time') {
|
|
2020
|
-
var
|
|
2021
|
+
var from_1 = (_b = (_a = rawColumnFilter[field]) === null || _a === void 0 ? void 0 : _a.from) !== null && _b !== void 0 ? _b : rawColumnFilter[field];
|
|
2021
2022
|
var to = (_d = (_c = rawColumnFilter[field]) === null || _c === void 0 ? void 0 : _c.to) !== null && _d !== void 0 ? _d : rawColumnFilter[field];
|
|
2022
|
-
var fromDate = Date.begin(
|
|
2023
|
+
var fromDate = Date.begin(from_1);
|
|
2023
2024
|
var toDate = Date.end(to);
|
|
2024
2025
|
if (fromDate && toDate) {
|
|
2025
2026
|
if (!columnValue) {
|
|
@@ -2093,7 +2094,7 @@
|
|
|
2093
2094
|
});
|
|
2094
2095
|
_load$1.set(this, function (filterReq, force) {
|
|
2095
2096
|
if (force === void 0) { force = true; }
|
|
2096
|
-
return __awaiter(_this, void 0, void 0, function () {
|
|
2097
|
+
var func = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
2097
2098
|
var result, results, _2, error_1;
|
|
2098
2099
|
return __generator(this, function (_3) {
|
|
2099
2100
|
switch (_3.label) {
|
|
@@ -2134,20 +2135,23 @@
|
|
|
2134
2135
|
case 10: return [2 /*return*/];
|
|
2135
2136
|
}
|
|
2136
2137
|
});
|
|
2137
|
-
});
|
|
2138
|
+
}); };
|
|
2139
|
+
var obs = rxjs.defer(function () { return rxjs.from(func()); });
|
|
2140
|
+
return obs.pipe(operators.debounceTime(200));
|
|
2138
2141
|
});
|
|
2139
2142
|
_render.set(this, function (args) { return __awaiter(_this, void 0, void 0, function () {
|
|
2140
|
-
var _a, _b, _c;
|
|
2143
|
+
var _a, _b, _c, _d;
|
|
2141
2144
|
return __generator(this, function (_2) {
|
|
2142
2145
|
switch (_2.label) {
|
|
2143
2146
|
case 0:
|
|
2147
|
+
(_a = this.sdScroll) === null || _a === void 0 ? void 0 : _a.scrollTop();
|
|
2144
2148
|
this.items = (args === null || args === void 0 ? void 0 : args.items) || [];
|
|
2145
2149
|
this.total = (args === null || args === void 0 ? void 0 : args.total) || 0;
|
|
2146
2150
|
// this.isHiddenPaginator = this.filterInfo.pageNumber === 0 && this.total <= this.filterInfo.pageSize;
|
|
2147
2151
|
this.items.forEach(function (item) {
|
|
2148
2152
|
item.originItem = Object.assign({}, item);
|
|
2149
2153
|
});
|
|
2150
|
-
return [4 /*yield*/, ((
|
|
2154
|
+
return [4 /*yield*/, ((_d = (_c = (_b = this.gridOption) === null || _b === void 0 ? void 0 : _b.reload) === null || _c === void 0 ? void 0 : _c.onReload) === null || _d === void 0 ? void 0 : _d.call(_c, this.items))];
|
|
2151
2155
|
case 1:
|
|
2152
2156
|
_2.sent();
|
|
2153
2157
|
this.isSelectAll = this.items.every(function (e) { return e.isSelected; });
|
|
@@ -2159,13 +2163,12 @@
|
|
|
2159
2163
|
this.reload = function (force) {
|
|
2160
2164
|
if (force === void 0) { force = true; }
|
|
2161
2165
|
return __awaiter(_this, void 0, void 0, function () {
|
|
2162
|
-
var
|
|
2166
|
+
var data;
|
|
2163
2167
|
return __generator(this, function (_2) {
|
|
2164
2168
|
switch (_2.label) {
|
|
2165
|
-
case 0: return [4 /*yield*/, __classPrivateFieldGet(this, _load$1).call(this, __classPrivateFieldGet(this, _getFilter).call(this), force)];
|
|
2169
|
+
case 0: return [4 /*yield*/, __classPrivateFieldGet(this, _load$1).call(this, __classPrivateFieldGet(this, _getFilter).call(this), force).toPromise()];
|
|
2166
2170
|
case 1:
|
|
2167
2171
|
data = _2.sent();
|
|
2168
|
-
(_d = this.sdScroll) === null || _d === void 0 ? void 0 : _d.scrollTop();
|
|
2169
2172
|
__classPrivateFieldGet(this, _render).call(this, data);
|
|
2170
2173
|
return [2 /*return*/];
|
|
2171
2174
|
}
|
|
@@ -2912,7 +2915,7 @@
|
|
|
2912
2915
|
var _this = this;
|
|
2913
2916
|
if (gridFilter && this.gridFilter !== gridFilter) {
|
|
2914
2917
|
this.gridFilter = gridFilter;
|
|
2915
|
-
__classPrivateFieldGet(this, _subscription$1).add(gridFilter.filterChange.pipe(operators.
|
|
2918
|
+
__classPrivateFieldGet(this, _subscription$1).add(gridFilter.filterChange.pipe(operators.map(function () {
|
|
2916
2919
|
__classPrivateFieldGet(_this, _paginator).pageIndex = 0;
|
|
2917
2920
|
return __classPrivateFieldGet(_this, _getFilter).call(_this);
|
|
2918
2921
|
}), operators.switchMap(function (filterInfo) { return __classPrivateFieldGet(_this, _load$1).call(_this, filterInfo, false); })).subscribe(__classPrivateFieldGet(this, _render)));
|
|
@@ -2948,7 +2951,7 @@
|
|
|
2948
2951
|
var _this = this;
|
|
2949
2952
|
if (paginator && __classPrivateFieldGet(this, _paginator) !== paginator) {
|
|
2950
2953
|
__classPrivateFieldSet(this, _paginator, paginator);
|
|
2951
|
-
__classPrivateFieldGet(this, _subscription$1).add(paginator.page.pipe(operators.
|
|
2954
|
+
__classPrivateFieldGet(this, _subscription$1).add(paginator.page.pipe(operators.map(__classPrivateFieldGet(this, _getFilter)), operators.switchMap(function (filterInfo) { return __classPrivateFieldGet(_this, _load$1).call(_this, filterInfo, false); })).subscribe(__classPrivateFieldGet(this, _render)));
|
|
2952
2955
|
}
|
|
2953
2956
|
},
|
|
2954
2957
|
enumerable: false,
|
|
@@ -2959,7 +2962,7 @@
|
|
|
2959
2962
|
var _this = this;
|
|
2960
2963
|
if (sort && __classPrivateFieldGet(this, _sort) !== sort) {
|
|
2961
2964
|
__classPrivateFieldSet(this, _sort, sort);
|
|
2962
|
-
__classPrivateFieldGet(this, _subscription$1).add(sort.sortChange.pipe(operators.
|
|
2965
|
+
__classPrivateFieldGet(this, _subscription$1).add(sort.sortChange.pipe(operators.map(__classPrivateFieldGet(this, _getFilter)), operators.switchMap(function (filterInfo) { return __classPrivateFieldGet(_this, _load$1).call(_this, filterInfo, false); })).subscribe(__classPrivateFieldGet(this, _render)));
|
|
2963
2966
|
}
|
|
2964
2967
|
},
|
|
2965
2968
|
enumerable: false,
|
|
@@ -2973,7 +2976,7 @@
|
|
|
2973
2976
|
__classPrivateFieldGet(this, _subscription$1).add(this.sdCellDefs.changes.pipe(operators.startWith([])).subscribe(__classPrivateFieldGet(this, _initCellDef)));
|
|
2974
2977
|
__classPrivateFieldGet(this, _subscription$1).add(this.sdFooterDefs.changes.pipe(operators.startWith([])).subscribe(__classPrivateFieldGet(this, _initFooterDef)));
|
|
2975
2978
|
__classPrivateFieldGet(this, _subscription$1).add(this.sdFilterDefs.changes.pipe(operators.startWith([])).subscribe(__classPrivateFieldGet(this, _initFilterDef)));
|
|
2976
|
-
__classPrivateFieldGet(this, _subscription$1).add(__classPrivateFieldGet(this, _optionChanges).pipe(operators.startWith({}), operators.
|
|
2979
|
+
__classPrivateFieldGet(this, _subscription$1).add(__classPrivateFieldGet(this, _optionChanges).pipe(operators.startWith({}), operators.map(__classPrivateFieldGet(this, _getFilter)), operators.switchMap(function (filterInfo) { return __classPrivateFieldGet(_this, _load$1).call(_this, filterInfo, true); })).subscribe(__classPrivateFieldGet(this, _render)));
|
|
2977
2980
|
this.ref.detectChanges();
|
|
2978
2981
|
};
|
|
2979
2982
|
SdGridMaterial.prototype.ngOnDestroy = function () {
|
|
@@ -3019,7 +3022,7 @@
|
|
|
3019
3022
|
});
|
|
3020
3023
|
return SdGridMaterial;
|
|
3021
3024
|
}());
|
|
3022
|
-
_paginator = new WeakMap(), _sort = new WeakMap(), _subscription$1 = new WeakMap(), _optionChanges = new WeakMap(), _initCellDef = new WeakMap(), _initFilterDef = new WeakMap(), _initFooterDef = new WeakMap(), _filterExportInfo = new WeakMap(), _initConfiguration = new WeakMap(), _filterLocal = new WeakMap(), _getFilter = new WeakMap(), _load$1 = new WeakMap(), _render = new WeakMap(), _exportedItems = new WeakMap(), _allColumns = new WeakMap(), _allExportedColumns = new WeakMap(), _onExport = new WeakMap(), _updateSelectedItems = new WeakMap();
|
|
3025
|
+
_paginator = new WeakMap(), _sort = new WeakMap(), _subscription$1 = new WeakMap(), _optionChanges = new WeakMap(), _reload = new WeakMap(), _initCellDef = new WeakMap(), _initFilterDef = new WeakMap(), _initFooterDef = new WeakMap(), _filterExportInfo = new WeakMap(), _initConfiguration = new WeakMap(), _filterLocal = new WeakMap(), _getFilter = new WeakMap(), _load$1 = new WeakMap(), _render = new WeakMap(), _exportedItems = new WeakMap(), _allColumns = new WeakMap(), _allExportedColumns = new WeakMap(), _onExport = new WeakMap(), _updateSelectedItems = new WeakMap();
|
|
3023
3026
|
SdGridMaterial.decorators = [
|
|
3024
3027
|
{ type: core.Component, args: [{
|
|
3025
3028
|
selector: 'sd-grid-material',
|