@sd-angular/core 1.3.61 → 1.3.63

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.
@@ -654,6 +654,7 @@
654
654
  }
655
655
  finally { if (e_4) throw e_4.error; }
656
656
  }
657
+ _this.ref.markForCheck();
657
658
  });
658
659
  this.onFilter = function (item) {
659
660
  _this.filterChange.next(true);
@@ -2685,12 +2686,18 @@
2685
2686
  _this.ref.detectChanges();
2686
2687
  });
2687
2688
  this.clearFilter = function () {
2688
- var _a;
2689
- (_a = _this.gridFilter) === null || _a === void 0 ? void 0 : _a.onClearFilter();
2689
+ var _a, _b, _c;
2690
+ if ((_b = (_a = _this.gridOption) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.inlineColumn) {
2691
+ _this.columnFilter = {};
2692
+ }
2693
+ (_c = _this.gridFilter) === null || _c === void 0 ? void 0 : _c.onClearFilter();
2690
2694
  };
2691
2695
  this.setFilter = function (args) {
2692
- var _a;
2693
- (_a = _this.gridFilter) === null || _a === void 0 ? void 0 : _a.setFilter(args);
2696
+ var _a, _b, _c;
2697
+ if (((_b = (_a = _this.gridOption) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.inlineColumn) && (args === null || args === void 0 ? void 0 : args.columnFilter)) {
2698
+ _this.columnFilter = args.columnFilter;
2699
+ }
2700
+ (_c = _this.gridFilter) === null || _c === void 0 ? void 0 : _c.setFilter(args);
2694
2701
  };
2695
2702
  this.onCreate = function () {
2696
2703
  var _a, _b;
@@ -4466,28 +4473,51 @@
4466
4473
  gridOption: [{ type: core.Input }]
4467
4474
  };
4468
4475
 
4476
+ var _valueChanges, _subcription;
4469
4477
  var SdColumnInlineFilter = /** @class */ (function () {
4470
4478
  function SdColumnInlineFilter() {
4471
4479
  var _this = this;
4472
4480
  this.columnFilter = {};
4473
4481
  this.filterChange = new core.EventEmitter();
4482
+ _valueChanges.set(this, new rxjs.Subject());
4483
+ _subcription.set(this, new rxjs.Subscription());
4474
4484
  this.onFilterChange = function () {
4475
4485
  _this.filterChange.emit();
4476
4486
  };
4477
4487
  }
4488
+ SdColumnInlineFilter.prototype._value = function (value) {
4489
+ this.value = value;
4490
+ __classPrivateFieldGet(this, _valueChanges).next();
4491
+ };
4492
+ Object.defineProperty(SdColumnInlineFilter.prototype, "_columnFilter", {
4493
+ set: function (columnFilter) {
4494
+ this.columnFilter = columnFilter || {};
4495
+ __classPrivateFieldGet(this, _valueChanges).next();
4496
+ },
4497
+ enumerable: false,
4498
+ configurable: true
4499
+ });
4500
+ ;
4478
4501
  SdColumnInlineFilter.prototype.ngOnInit = function () {
4479
- var _a, _b;
4480
- if (this.column.type === 'date' || this.column.type === 'time' || this.column.type === 'datetime') {
4481
- if (!((_b = (_a = this.column) === null || _a === void 0 ? void 0 : _a.option) === null || _b === void 0 ? void 0 : _b.useFilterDate)) {
4482
- this.columnFilter[this.column.field] = this.columnFilter[this.column.field] || {
4483
- from: null,
4484
- to: null
4485
- };
4502
+ var _this = this;
4503
+ __classPrivateFieldGet(this, _subcription).add(__classPrivateFieldGet(this, _valueChanges).pipe(operators.startWith(this.columnFilter)).subscribe(function () {
4504
+ var _a, _b;
4505
+ if (_this.column.type === 'date' || _this.column.type === 'time' || _this.column.type === 'datetime') {
4506
+ if (!((_b = (_a = _this.column) === null || _a === void 0 ? void 0 : _a.option) === null || _b === void 0 ? void 0 : _b.useFilterDate)) {
4507
+ _this.columnFilter[_this.column.field] = _this.columnFilter[_this.column.field] || {
4508
+ from: null,
4509
+ to: null
4510
+ };
4511
+ }
4486
4512
  }
4487
- }
4513
+ }));
4514
+ };
4515
+ SdColumnInlineFilter.prototype.ngOnDestroy = function () {
4516
+ __classPrivateFieldGet(this, _subcription).unsubscribe();
4488
4517
  };
4489
4518
  return SdColumnInlineFilter;
4490
4519
  }());
4520
+ _valueChanges = new WeakMap(), _subcription = new WeakMap();
4491
4521
  SdColumnInlineFilter.decorators = [
4492
4522
  { type: core.Component, args: [{
4493
4523
  selector: 'sd-column-inline-filter',
@@ -4498,8 +4528,8 @@
4498
4528
  ];
4499
4529
  SdColumnInlineFilter.ctorParameters = function () { return []; };
4500
4530
  SdColumnInlineFilter.propDecorators = {
4501
- value: [{ type: core.Input }],
4502
- columnFilter: [{ type: core.Input }],
4531
+ _value: [{ type: core.Input, args: ['value',] }],
4532
+ _columnFilter: [{ type: core.Input, args: ['columnFilter',] }],
4503
4533
  column: [{ type: core.Input }],
4504
4534
  filterChange: [{ type: core.Output }]
4505
4535
  };