@firestitch/filter 9.9.0 → 9.9.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.
@@ -16,7 +16,6 @@ export declare abstract class BaseItem<T extends IFilterConfigBaseItem> {
16
16
  change: (item: BaseItem<T>) => void;
17
17
  protected readonly _type: T['type'];
18
18
  protected _model: any;
19
- protected _initialized: boolean;
20
19
  protected _pendingValues: boolean;
21
20
  protected _pendingDefaultValue: boolean;
22
21
  protected _loading$: BehaviorSubject<boolean>;
@@ -56,6 +55,7 @@ export declare abstract class BaseItem<T extends IFilterConfigBaseItem> {
56
55
  get loading$(): Observable<boolean>;
57
56
  get loading(): boolean;
58
57
  set loading(value: boolean);
58
+ protected get _initialized(): boolean;
59
59
  valueChanged(): void;
60
60
  get queryObject(): Record<string, unknown>;
61
61
  get persistanceObject(): Record<string, unknown>;
@@ -254,7 +254,7 @@
254
254
  var BaseItem = /** @class */ (function () {
255
255
  function BaseItem(itemConfig, _additionalConfig) {
256
256
  this._additionalConfig = _additionalConfig;
257
- this._initialized = false;
257
+ // protected _initialized = false;
258
258
  this._pendingValues = false;
259
259
  this._pendingDefaultValue = false;
260
260
  this._loading$ = new rxjs.BehaviorSubject(false);
@@ -453,6 +453,13 @@
453
453
  enumerable: true,
454
454
  configurable: true
455
455
  });
456
+ Object.defineProperty(BaseItem.prototype, "_initialized", {
457
+ get: function () {
458
+ return !this._pendingDefaultValue && !this._pendingValues;
459
+ },
460
+ enumerable: true,
461
+ configurable: true
462
+ });
456
463
  BaseItem.prototype.valueChanged = function () {
457
464
  this._value$.next(this.value);
458
465
  if (this.change) {
@@ -490,12 +497,13 @@
490
497
  return this.defaultValueFn()
491
498
  .pipe(operators.tap(function (value) {
492
499
  _this.defaultValue = value;
500
+ _this._initDefaultModel();
493
501
  }), operators.finalize(function () {
494
502
  _this._pendingDefaultValue = false;
495
503
  }));
496
504
  };
497
505
  BaseItem.prototype.initValues = function (persistedValue) {
498
- this._initialized = false;
506
+ // this._initialized = false;
499
507
  this.persistedValue = persistedValue;
500
508
  this._initDefaultModel();
501
509
  var isAutocomplete = this.type === exports.ItemType.AutoComplete || this.type === exports.ItemType.AutoCompleteChips;
@@ -508,12 +516,12 @@
508
516
  this.values = valuesResult;
509
517
  // Move to some other place
510
518
  this._init();
511
- this._initialized = true;
519
+ // this._initialized = true;
512
520
  }
513
521
  }
514
522
  else {
515
523
  this._init();
516
- this._initialized = true;
524
+ // this._initialized = true;
517
525
  }
518
526
  };
519
527
  BaseItem.prototype.loadAsyncValues = function (reload) {
@@ -529,7 +537,7 @@
529
537
  _this.loading = false;
530
538
  _this._init();
531
539
  _this._validateModel();
532
- _this._initialized = true;
540
+ // this._initialized = true;
533
541
  });
534
542
  }
535
543
  };