@sd-angular/core 1.3.1 → 1.3.3

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.
@@ -2018,9 +2018,9 @@
2018
2018
  }
2019
2019
  }
2020
2020
  else if (type === 'datetime' || type === 'date' || type === 'time') {
2021
- var from_1 = (_b = (_a = rawColumnFilter[field]) === null || _a === void 0 ? void 0 : _a.from) !== null && _b !== void 0 ? _b : rawColumnFilter[field];
2021
+ var from = (_b = (_a = rawColumnFilter[field]) === null || _a === void 0 ? void 0 : _a.from) !== null && _b !== void 0 ? _b : rawColumnFilter[field];
2022
2022
  var to = (_d = (_c = rawColumnFilter[field]) === null || _c === void 0 ? void 0 : _c.to) !== null && _d !== void 0 ? _d : rawColumnFilter[field];
2023
- var fromDate = Date.begin(from_1);
2023
+ var fromDate = Date.begin(from);
2024
2024
  var toDate = Date.end(to);
2025
2025
  if (fromDate && toDate) {
2026
2026
  if (!columnValue) {
@@ -2094,7 +2094,7 @@
2094
2094
  });
2095
2095
  _load$1.set(this, function (filterReq, force) {
2096
2096
  if (force === void 0) { force = true; }
2097
- var func = function () { return __awaiter(_this, void 0, void 0, function () {
2097
+ return __awaiter(_this, void 0, void 0, function () {
2098
2098
  var result, results, _2, error_1;
2099
2099
  return __generator(this, function (_3) {
2100
2100
  switch (_3.label) {
@@ -2135,9 +2135,7 @@
2135
2135
  case 10: return [2 /*return*/];
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
2140
  _render.set(this, function (args) { return __awaiter(_this, void 0, void 0, function () {
2143
2141
  var _a, _b, _c, _d;
@@ -2166,7 +2164,7 @@
2166
2164
  var data;
2167
2165
  return __generator(this, function (_2) {
2168
2166
  switch (_2.label) {
2169
- case 0: return [4 /*yield*/, __classPrivateFieldGet(this, _load$1).call(this, __classPrivateFieldGet(this, _getFilter).call(this), force).toPromise()];
2167
+ case 0: return [4 /*yield*/, __classPrivateFieldGet(this, _load$1).call(this, __classPrivateFieldGet(this, _getFilter).call(this), force)];
2170
2168
  case 1:
2171
2169
  data = _2.sent();
2172
2170
  __classPrivateFieldGet(this, _render).call(this, data);
@@ -2915,10 +2913,11 @@
2915
2913
  var _this = this;
2916
2914
  if (gridFilter && this.gridFilter !== gridFilter) {
2917
2915
  this.gridFilter = gridFilter;
2916
+ __classPrivateFieldGet(this, _reload).next(false);
2918
2917
  __classPrivateFieldGet(this, _subscription$1).add(gridFilter.filterChange.pipe(operators.map(function () {
2919
2918
  __classPrivateFieldGet(_this, _paginator).pageIndex = 0;
2920
- return __classPrivateFieldGet(_this, _getFilter).call(_this);
2921
- }), operators.switchMap(function (filterInfo) { return __classPrivateFieldGet(_this, _load$1).call(_this, filterInfo, false); })).subscribe(__classPrivateFieldGet(this, _render)));
2919
+ __classPrivateFieldGet(_this, _reload).next(false);
2920
+ })).subscribe());
2922
2921
  }
2923
2922
  },
2924
2923
  enumerable: false,
@@ -2931,7 +2930,7 @@
2931
2930
  if (option) {
2932
2931
  option = __classPrivateFieldGet(this, _initConfiguration).call(this, option);
2933
2932
  this.gridOption = option;
2934
- __classPrivateFieldGet(this, _optionChanges).emit();
2933
+ __classPrivateFieldGet(this, _reload).next(true);
2935
2934
  (_a = option === null || option === void 0 ? void 0 : option.columns) === null || _a === void 0 ? void 0 : _a.forEach(function (col) {
2936
2935
  var _a;
2937
2936
  if ((_a = col.filter) === null || _a === void 0 ? void 0 : _a.default) {
@@ -2951,7 +2950,9 @@
2951
2950
  var _this = this;
2952
2951
  if (paginator && __classPrivateFieldGet(this, _paginator) !== paginator) {
2953
2952
  __classPrivateFieldSet(this, _paginator, paginator);
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)));
2953
+ __classPrivateFieldGet(this, _subscription$1).add(paginator.page.pipe(operators.map(function () {
2954
+ __classPrivateFieldGet(_this, _reload).next(false);
2955
+ })).subscribe());
2955
2956
  }
2956
2957
  },
2957
2958
  enumerable: false,
@@ -2962,7 +2963,9 @@
2962
2963
  var _this = this;
2963
2964
  if (sort && __classPrivateFieldGet(this, _sort) !== sort) {
2964
2965
  __classPrivateFieldSet(this, _sort, sort);
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)));
2966
+ __classPrivateFieldGet(this, _subscription$1).add(sort.sortChange.pipe(operators.map(function () {
2967
+ __classPrivateFieldGet(_this, _reload).next(false);
2968
+ })).subscribe());
2966
2969
  }
2967
2970
  },
2968
2971
  enumerable: false,
@@ -2973,10 +2976,19 @@
2973
2976
  };
2974
2977
  SdGridMaterial.prototype.ngAfterViewInit = function () {
2975
2978
  var _this = this;
2979
+ __classPrivateFieldGet(this, _subscription$1).add(__classPrivateFieldGet(this, _reload).pipe(operators.startWith(true), operators.debounceTime(200), operators.switchMap(function (force) {
2980
+ var filterInfo = __classPrivateFieldGet(_this, _getFilter).call(_this);
2981
+ return __classPrivateFieldGet(_this, _load$1).call(_this, filterInfo, force);
2982
+ })).subscribe(__classPrivateFieldGet(this, _render)));
2976
2983
  __classPrivateFieldGet(this, _subscription$1).add(this.sdCellDefs.changes.pipe(operators.startWith([])).subscribe(__classPrivateFieldGet(this, _initCellDef)));
2977
2984
  __classPrivateFieldGet(this, _subscription$1).add(this.sdFooterDefs.changes.pipe(operators.startWith([])).subscribe(__classPrivateFieldGet(this, _initFooterDef)));
2978
2985
  __classPrivateFieldGet(this, _subscription$1).add(this.sdFilterDefs.changes.pipe(operators.startWith([])).subscribe(__classPrivateFieldGet(this, _initFilterDef)));
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)));
2986
+ // this.#subscription.add(this.#optionChanges.pipe(
2987
+ // debounceTime(200),
2988
+ // startWith({}),
2989
+ // map(this.#getFilter),
2990
+ // switchMap(filterInfo => this.#load(filterInfo, true))
2991
+ // ).subscribe(this.#render));
2980
2992
  this.ref.detectChanges();
2981
2993
  };
2982
2994
  SdGridMaterial.prototype.ngOnDestroy = function () {