@smartbit4all/ng-client 4.0.45 → 4.0.47

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.
Files changed (15) hide show
  1. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.mjs +3 -6
  2. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.mjs +16 -6
  3. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +8 -13
  4. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.mjs +21 -6
  5. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.mjs +3 -8
  6. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.mjs +21 -6
  7. package/fesm2022/smartbit4all-ng-client.mjs +63 -36
  8. package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
  9. package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.d.ts +0 -1
  10. package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.d.ts +8 -3
  11. package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.d.ts +8 -3
  12. package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.d.ts +8 -3
  13. package/package.json +1 -1
  14. package/smartbit4all-ng-client-4.0.47.tgz +0 -0
  15. package/smartbit4all-ng-client-4.0.45.tgz +0 -0
@@ -7834,11 +7834,8 @@ class UiActionConfirmDialogComponent {
7834
7834
  this.manager = manager;
7835
7835
  this.componentLibrary = ComponentLibrary;
7836
7836
  this.code = this.service.action.code;
7837
- this.setUp();
7838
- }
7839
- async setUp() {
7840
- this.descriptor = await this.manager.getActionDescriptor(this.service.action);
7841
- this.dialogType = this.descriptor.confirmDialog ? 'confirmDialog' : 'dialog';
7837
+ this.descriptor = service.descriptor;
7838
+ this.dialogType = service.dialogType;
7842
7839
  }
7843
7840
  ngOnDestroy() {
7844
7841
  this.service._destroy$.next();
@@ -7883,18 +7880,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
7883
7880
  }] }, { type: UiActionDescriptorService }] });
7884
7881
 
7885
7882
  class UiActionConfirmDialogService extends SmartdialogService {
7886
- constructor(dialog, router, dialogService, inject, compLib) {
7883
+ constructor(dialog, router, dialogService, inject, compLib, manager) {
7887
7884
  super(dialog, router, dialogService, inject, compLib);
7885
+ this.manager = manager;
7888
7886
  this._destroy$ = new Subject();
7889
7887
  this.onAction = new SmartSubject(this._destroy$);
7890
7888
  this.shouldDoAction = false;
7889
+ this.onSetup = new SmartSubject(this._destroy$);
7890
+ this.onSetup.pipe(takeUntil(this._destroy$)).subscribe(() => {
7891
+ this.setUp();
7892
+ });
7893
+ }
7894
+ async setUp() {
7895
+ this.descriptor = await this.manager.getActionDescriptor(this.action);
7896
+ this.dialogType = this.descriptor.confirmDialog ? 'confirmDialog' : 'dialog';
7891
7897
  }
7892
7898
  openDialog() {
7899
+ this.onSetup.next();
7893
7900
  this.shouldDoAction = false;
7894
7901
  this.onAction = new SmartSubject(this._destroy$);
7895
7902
  const dialogData = {
7896
7903
  content: {
7897
- title: this.action.descriptor?.confirmDialog?.title,
7904
+ title: this.descriptor[this.dialogType].title,
7898
7905
  },
7899
7906
  size: {},
7900
7907
  customComponent: UiActionConfirmDialogComponent,
@@ -7912,7 +7919,7 @@ class UiActionConfirmDialogService extends SmartdialogService {
7912
7919
  this.closeDialog();
7913
7920
  this.onAction = new SmartSubject(this._destroy$);
7914
7921
  }
7915
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }, { token: i3$1.DialogService }, { token: i0.Injector }, { token: COMPONENT_LIBRARY }], target: i0.ɵɵFactoryTarget.Injectable }); }
7922
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }, { token: i3$1.DialogService }, { token: i0.Injector }, { token: COMPONENT_LIBRARY }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
7916
7923
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, providedIn: 'root' }); }
7917
7924
  }
7918
7925
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, decorators: [{
@@ -7923,7 +7930,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
7923
7930
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
7924
7931
  type: Inject,
7925
7932
  args: [COMPONENT_LIBRARY]
7926
- }] }] });
7933
+ }] }, { type: UiActionDescriptorService }] });
7927
7934
 
7928
7935
  class UiActionInputDialogComponent {
7929
7936
  constructor(service, compLib, manager) {
@@ -7939,13 +7946,8 @@ class UiActionInputDialogComponent {
7939
7946
  this.cancel();
7940
7947
  }
7941
7948
  async setUp() {
7942
- this.descriptor = await this.manager.getActionDescriptor(this.service.action);
7943
- if (this.descriptor[this.service.inputTypeName]) {
7944
- this.dialogType = this.service.inputTypeName;
7945
- }
7946
- else {
7947
- this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
7948
- }
7949
+ this.descriptor = this.service.descriptor;
7950
+ this.dialogType = this.service.dialogType;
7949
7951
  this.constructForm();
7950
7952
  }
7951
7953
  getTitle() {
@@ -8044,10 +8046,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
8044
8046
  }] } });
8045
8047
 
8046
8048
  class UiActionInputDialogService extends SmartdialogService {
8047
- constructor(dialog, router, dialogService, inject, compLib) {
8049
+ constructor(dialog, router, dialogService, inject, compLib, manager) {
8048
8050
  super(dialog, router, dialogService, inject, compLib);
8051
+ this.manager = manager;
8049
8052
  this._destroy$ = new Subject();
8053
+ this.onSetup = new SmartSubject(this._destroy$);
8050
8054
  this.onAction = new SmartSubject(this._destroy$);
8055
+ this.onSetup.pipe(takeUntil(this._destroy$)).subscribe(() => {
8056
+ this.setUp();
8057
+ });
8058
+ }
8059
+ async setUp() {
8060
+ this.descriptor = await this.manager.getActionDescriptor(this.action);
8061
+ if (this.descriptor[this.inputTypeName]) {
8062
+ this.dialogType = this.inputTypeName;
8063
+ }
8064
+ else {
8065
+ this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
8066
+ }
8051
8067
  }
8052
8068
  setDataAndOpenDialog(action, nodeName) {
8053
8069
  this.action = action;
@@ -8055,11 +8071,12 @@ class UiActionInputDialogService extends SmartdialogService {
8055
8071
  this.openDialog();
8056
8072
  }
8057
8073
  openDialog() {
8074
+ this.onSetup.next();
8058
8075
  this.params = undefined;
8059
8076
  this.onAction = new SmartSubject(this._destroy$);
8060
8077
  const dialogData = {
8061
8078
  content: {
8062
- title: this.action.descriptor?.[this.inputTypeName]?.title,
8079
+ title: this.descriptor[this.dialogType].title,
8063
8080
  },
8064
8081
  size: {},
8065
8082
  customComponent: UiActionInputDialogComponent,
@@ -8077,7 +8094,7 @@ class UiActionInputDialogService extends SmartdialogService {
8077
8094
  this.closeDialog();
8078
8095
  this.onAction = new SmartSubject(this._destroy$);
8079
8096
  }
8080
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }, { token: i3$1.DialogService }, { token: i0.Injector }, { token: COMPONENT_LIBRARY }], target: i0.ɵɵFactoryTarget.Injectable }); }
8097
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }, { token: i3$1.DialogService }, { token: i0.Injector }, { token: COMPONENT_LIBRARY }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
8081
8098
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, providedIn: 'root' }); }
8082
8099
  }
8083
8100
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, decorators: [{
@@ -8088,7 +8105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
8088
8105
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
8089
8106
  type: Inject,
8090
8107
  args: [COMPONENT_LIBRARY]
8091
- }] }] });
8108
+ }] }, { type: UiActionDescriptorService }] });
8092
8109
 
8093
8110
  /*
8094
8111
  * Public API Surface of smart-view-context
@@ -8217,11 +8234,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
8217
8234
  }], ctorParameters: () => [{ type: SmartViewContextErrorDialogService }] });
8218
8235
 
8219
8236
  class UiActionFileUploadDialogService extends SmartdialogService {
8220
- constructor(dialog, router, dialogService, inject, compLib) {
8237
+ constructor(dialog, router, dialogService, inject, compLib, manager) {
8221
8238
  super(dialog, router, dialogService, inject, compLib);
8239
+ this.manager = manager;
8222
8240
  this._destroy$ = new Subject();
8223
8241
  this.onAction = new SmartSubject(this._destroy$);
8242
+ this.onSetup = new SmartSubject(this._destroy$);
8224
8243
  this.isMultiple = false;
8244
+ this.onSetup.pipe(takeUntil(this._destroy$)).subscribe(() => {
8245
+ this.setUp();
8246
+ });
8247
+ }
8248
+ async setUp() {
8249
+ this.descriptor = await this.manager.getActionDescriptor(this.action);
8250
+ if (this.descriptor[this.inputTypeName]) {
8251
+ this.dialogType = this.inputTypeName;
8252
+ }
8253
+ else {
8254
+ this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
8255
+ }
8225
8256
  }
8226
8257
  setDataAndOpenDialog(action, nodeName) {
8227
8258
  this.action = action;
@@ -8229,11 +8260,12 @@ class UiActionFileUploadDialogService extends SmartdialogService {
8229
8260
  this.openDialog();
8230
8261
  }
8231
8262
  openDialog() {
8263
+ this.onSetup.next();
8232
8264
  this.files = undefined;
8233
8265
  this.onAction = new SmartSubject(this._destroy$);
8234
8266
  const dialogData = {
8235
8267
  content: {
8236
- title: this.action.descriptor?.[this.inputTypeName]?.title,
8268
+ title: this.descriptor[this.dialogType].title,
8237
8269
  },
8238
8270
  size: {},
8239
8271
  customComponent: UiActionFileUploadDialogComponent,
@@ -8251,7 +8283,7 @@ class UiActionFileUploadDialogService extends SmartdialogService {
8251
8283
  this.closeDialog();
8252
8284
  this.onAction = new SmartSubject(this._destroy$);
8253
8285
  }
8254
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }, { token: i3$1.DialogService }, { token: i0.Injector }, { token: COMPONENT_LIBRARY }], target: i0.ɵɵFactoryTarget.Injectable }); }
8286
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }, { token: i3$1.DialogService }, { token: i0.Injector }, { token: COMPONENT_LIBRARY }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Injectable }); }
8255
8287
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogService, providedIn: 'root' }); }
8256
8288
  }
8257
8289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogService, decorators: [{
@@ -8262,7 +8294,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
8262
8294
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
8263
8295
  type: Inject,
8264
8296
  args: [COMPONENT_LIBRARY]
8265
- }] }] });
8297
+ }] }, { type: UiActionDescriptorService }] });
8266
8298
 
8267
8299
  class UiActionFileUploadDialogComponent {
8268
8300
  constructor(service, compLib, manager) {
@@ -8280,22 +8312,17 @@ class UiActionFileUploadDialogComponent {
8280
8312
  this.cancel();
8281
8313
  }
8282
8314
  async setUp() {
8283
- this.descriptor = await this.manager.getActionDescriptor(this.service.action);
8315
+ this.descriptor = this.service.descriptor;
8284
8316
  this.isMultiple = this.service.isMultiple;
8285
8317
  this.i18n = {
8286
- addFile: this.descriptor.upload?.title ?? 'dokumentum hozzáadása',
8287
- browseOrDrag: this.descriptor.upload?.description ?? 'tallózás vagy behúzás',
8288
- formats: this.descriptor.upload?.formats ?? '',
8289
- maxSize: this.descriptor.upload?.maxSize ?? '',
8290
- upload: this.descriptor.upload?.uploadButtonTitle,
8318
+ addFile: this.descriptor?.upload?.title ?? 'dokumentum hozzáadása',
8319
+ browseOrDrag: this.descriptor?.upload?.description ?? 'tallózás vagy behúzás',
8320
+ formats: this.descriptor?.upload?.formats ?? '',
8321
+ maxSize: this.descriptor?.upload?.maxSize ?? '',
8322
+ upload: this.descriptor?.upload?.uploadButtonTitle,
8291
8323
  };
8292
8324
  // TODO set max size and file formats by UiAction.params
8293
- if (this.descriptor[this.service.inputTypeName]) {
8294
- this.dialogType = this.service.inputTypeName;
8295
- }
8296
- else {
8297
- this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
8298
- }
8325
+ this.dialogType = this.service.dialogType;
8299
8326
  }
8300
8327
  getTitle() {
8301
8328
  return this.descriptor[this.dialogType].title;