@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.
- package/esm2020/lib/smart-form/smartform.component.mjs +21 -3
- package/esm2020/lib/smart-form/widgets/smartformwidget/smartformwidget.component.mjs +1 -1
- package/fesm2015/smartbit4all-ng-client.mjs +23 -2
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +20 -2
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-form/smartform.component.d.ts +1 -0
- package/lib/smart-form/widgets/smartformwidget/smartformwidget.component.d.ts +1 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.3.179.tgz +0 -0
- package/smartbit4all-ng-client-3.3.178.tgz +0 -0
|
@@ -6232,6 +6232,20 @@ class SmartformComponent {
|
|
|
6232
6232
|
}
|
|
6233
6233
|
this.onBlurSubject = new SmartSubject(this._destroy$);
|
|
6234
6234
|
}
|
|
6235
|
+
// ngAfterViewInit(): void {
|
|
6236
|
+
// if (this.smartWidgetsQL) {
|
|
6237
|
+
// this.handleQueryList(this.smartWidgetsQL, (widget) => {
|
|
6238
|
+
// // ???
|
|
6239
|
+
// });
|
|
6240
|
+
// }
|
|
6241
|
+
// }
|
|
6242
|
+
// // TODO this is a duplicate from SmartFormApiClient -> move it to a utility
|
|
6243
|
+
// protected handleQueryList<T>(ql: QueryList<T>, handler: (el: T) => void) {
|
|
6244
|
+
// ql.forEach((el) => handler(el));
|
|
6245
|
+
// ql.changes
|
|
6246
|
+
// .pipe(takeUntil(this._destroy$))
|
|
6247
|
+
// .subscribe((list) => (list as QueryList<T>).forEach((el) => handler(el)));
|
|
6248
|
+
// }
|
|
6235
6249
|
refresh() {
|
|
6236
6250
|
this.service.setValuesFromModel();
|
|
6237
6251
|
}
|
|
@@ -6252,11 +6266,18 @@ class SmartformComponent {
|
|
|
6252
6266
|
this.form = this.service.toFormGroup();
|
|
6253
6267
|
if (this.smartForm.translateService) {
|
|
6254
6268
|
this.smartForm.translateService.onLangChange.pipe(takeUntil(this._destroy$)).subscribe(() => {
|
|
6255
|
-
this.
|
|
6269
|
+
this.translateWidgets(this.smartForm.widgets);
|
|
6256
6270
|
});
|
|
6257
|
-
this.
|
|
6271
|
+
this.translateWidgets(this.smartForm.widgets);
|
|
6258
6272
|
}
|
|
6259
6273
|
}
|
|
6274
|
+
translateWidgets(widgets) {
|
|
6275
|
+
var _a;
|
|
6276
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
6277
|
+
yield this.service.translateWidgets(this.smartForm.widgets);
|
|
6278
|
+
(_a = this.smartWidgetsQL) === null || _a === void 0 ? void 0 : _a.forEach((widget) => widget.changeDetector.markForCheck());
|
|
6279
|
+
});
|
|
6280
|
+
}
|
|
6260
6281
|
ngOnDestroy() {
|
|
6261
6282
|
this._destroy$.next();
|
|
6262
6283
|
this._destroy$.complete();
|