@smartbit4all/ng-client 3.3.178 → 3.3.179

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.
@@ -6260,6 +6260,20 @@ class SmartformComponent {
6260
6260
  }
6261
6261
  this.onBlurSubject = new SmartSubject(this._destroy$);
6262
6262
  }
6263
+ // ngAfterViewInit(): void {
6264
+ // if (this.smartWidgetsQL) {
6265
+ // this.handleQueryList(this.smartWidgetsQL, (widget) => {
6266
+ // // ???
6267
+ // });
6268
+ // }
6269
+ // }
6270
+ // // TODO this is a duplicate from SmartFormApiClient -> move it to a utility
6271
+ // protected handleQueryList<T>(ql: QueryList<T>, handler: (el: T) => void) {
6272
+ // ql.forEach((el) => handler(el));
6273
+ // ql.changes
6274
+ // .pipe(takeUntil(this._destroy$))
6275
+ // .subscribe((list) => (list as QueryList<T>).forEach((el) => handler(el)));
6276
+ // }
6263
6277
  refresh() {
6264
6278
  this.service.setValuesFromModel();
6265
6279
  }
@@ -6280,11 +6294,15 @@ class SmartformComponent {
6280
6294
  this.form = this.service.toFormGroup();
6281
6295
  if (this.smartForm.translateService) {
6282
6296
  this.smartForm.translateService.onLangChange.pipe(takeUntil(this._destroy$)).subscribe(() => {
6283
- this.service.translateWidgets(this.smartForm.widgets);
6297
+ this.translateWidgets(this.smartForm.widgets);
6284
6298
  });
6285
- this.service.translateWidgets(this.smartForm.widgets);
6299
+ this.translateWidgets(this.smartForm.widgets);
6286
6300
  }
6287
6301
  }
6302
+ async translateWidgets(widgets) {
6303
+ await this.service.translateWidgets(this.smartForm.widgets);
6304
+ this.smartWidgetsQL?.forEach((widget) => widget.changeDetector.markForCheck());
6305
+ }
6288
6306
  ngOnDestroy() {
6289
6307
  this._destroy$.next();
6290
6308
  this._destroy$.complete();