@smartbit4all/ng-client 3.2.0 → 3.2.2

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.
@@ -13614,32 +13614,19 @@ class SmartFilterEditorContentComponent {
13614
13614
  this.expressionUiActionModels = [];
13615
13615
  this.type = FilterExpressionBuilderUiModel.TypeEnum;
13616
13616
  }
13617
- ngAfterViewInit() {
13618
- if (this.smartFilterChangeSubscription) {
13619
- this.smartFilterChangeSubscription.unsubscribe();
13620
- }
13621
- this.smartFilterChangeSubscription = this.simpleFilterFormChild.onBlurSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
13622
- this.saveFilter();
13623
- });
13624
- if (this.smartFilterSophisticatedChangeSubscription) {
13625
- this.smartFilterSophisticatedChangeSubscription.unsubscribe();
13626
- }
13627
- this.smartFilterSophisticatedChangeSubscription =
13628
- this.simpleFilterFormChild.sophisticatedValueChange?.pipe(takeUntil(this._destroy$)).subscribe((change) => {
13629
- if (change.kind === 'selection') {
13630
- this.saveFilter();
13631
- }
13632
- });
13633
- }
13617
+ ngAfterViewInit() { }
13634
13618
  ngOnInit() {
13635
13619
  this.service.load();
13636
- this.setUp();
13620
+ this.service.modelChanged.pipe(takeUntil(this._destroy$)).subscribe(() => this.setUp());
13637
13621
  }
13638
13622
  ngOnDestroy() {
13639
13623
  this._destroy$.next();
13640
13624
  this._destroy$.complete();
13641
13625
  }
13642
13626
  setupSimpleFilter() {
13627
+ if (this.simpleFilterForm) {
13628
+ return;
13629
+ }
13643
13630
  let widgets = [];
13644
13631
  let key;
13645
13632
  let model = {};
@@ -13679,6 +13666,21 @@ class SmartFilterEditorContentComponent {
13679
13666
  useOnBlurEvent: true,
13680
13667
  widgets,
13681
13668
  };
13669
+ if (this.smartFilterChangeSubscription) {
13670
+ this.smartFilterChangeSubscription.unsubscribe();
13671
+ }
13672
+ this.smartFilterChangeSubscription = this.simpleFilterFormChild.onBlurSubject?.pipe(takeUntil(this._destroy$)).subscribe(() => {
13673
+ this.saveFilter();
13674
+ });
13675
+ if (this.smartFilterSophisticatedChangeSubscription) {
13676
+ this.smartFilterSophisticatedChangeSubscription.unsubscribe();
13677
+ }
13678
+ this.smartFilterSophisticatedChangeSubscription =
13679
+ this.simpleFilterFormChild.sophisticatedValueChange?.pipe(takeUntil(this._destroy$)).subscribe((change) => {
13680
+ if (change.kind === 'selection') {
13681
+ this.saveFilter();
13682
+ }
13683
+ });
13682
13684
  }
13683
13685
  extractFilterFieldFromFormModel() {
13684
13686
  let simpleFilter = this.simpleFilterFormChild?.submitForm(false).componentModel.data;
@@ -13728,6 +13730,9 @@ class SmartFilterEditorContentComponent {
13728
13730
  }
13729
13731
  }
13730
13732
  constructForm() {
13733
+ if (this.smartForm) {
13734
+ return;
13735
+ }
13731
13736
  let generatedWidgets = this.layoutService.render({
13732
13737
  layoutDefinitions: this.service.model?.selectedFieldEditor?.layoutDef?.widgets,
13733
13738
  });