@smartbit4all/ng-client 4.0.44 → 4.0.46

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 (16) hide show
  1. package/esm2022/lib/smart-dialog/smartdialog.service.mjs +2 -1
  2. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.mjs +5 -8
  3. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.mjs +11 -5
  4. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +10 -15
  5. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.mjs +16 -5
  6. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.mjs +5 -10
  7. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.mjs +16 -5
  8. package/fesm2022/smartbit4all-ng-client.mjs +58 -42
  9. package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
  10. package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.d.ts +0 -1
  11. package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.d.ts +7 -3
  12. package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.d.ts +7 -3
  13. package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.d.ts +7 -3
  14. package/package.json +1 -1
  15. package/smartbit4all-ng-client-4.0.46.tgz +0 -0
  16. package/smartbit4all-ng-client-4.0.44.tgz +0 -0
@@ -3536,6 +3536,7 @@ let SmartdialogService = class SmartdialogService {
3536
3536
  }
3537
3537
  else {
3538
3538
  this.dialogRef = this.dialogService.open(component, {
3539
+ header: this.dialogData.content.title,
3539
3540
  data: this.dialogData,
3540
3541
  });
3541
3542
  this.dialogRef.onClose.subscribe((result) => {
@@ -7833,11 +7834,8 @@ class UiActionConfirmDialogComponent {
7833
7834
  this.manager = manager;
7834
7835
  this.componentLibrary = ComponentLibrary;
7835
7836
  this.code = this.service.action.code;
7836
- this.setUp();
7837
- }
7838
- async setUp() {
7839
- this.descriptor = await this.manager.getActionDescriptor(this.service.action);
7840
- this.dialogType = this.descriptor.confirmDialog ? 'confirmDialog' : 'dialog';
7837
+ this.descriptor = service.descriptor;
7838
+ this.dialogType = service.dialogType;
7841
7839
  }
7842
7840
  ngOnDestroy() {
7843
7841
  this.service._destroy$.next();
@@ -7868,11 +7866,11 @@ class UiActionConfirmDialogComponent {
7868
7866
  this.service.cancel();
7869
7867
  }
7870
7868
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogComponent, deps: [{ token: 'confirmDialogService' }, { token: COMPONENT_LIBRARY }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component }); }
7871
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.11", type: UiActionConfirmDialogComponent, selector: "app-ui-action-confirm-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"doAction()\">\r\n {{ getActionButtonLabel() }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], dependencies: [{ kind: "component", type: i2$3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }] }); }
7869
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.11", type: UiActionConfirmDialogComponent, selector: "app-ui-action-confirm-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"doAction()\">\r\n {{ getActionButtonLabel() }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], dependencies: [{ kind: "component", type: i2$3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }] }); }
7872
7870
  }
7873
7871
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogComponent, decorators: [{
7874
7872
  type: Component,
7875
- args: [{ selector: 'app-ui-action-confirm-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"doAction()\">\r\n {{ getActionButtonLabel() }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
7873
+ args: [{ selector: 'app-ui-action-confirm-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"doAction()\">\r\n {{ getActionButtonLabel() }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
7876
7874
  }], ctorParameters: () => [{ type: UiActionConfirmDialogService, decorators: [{
7877
7875
  type: Inject,
7878
7876
  args: ['confirmDialogService']
@@ -7882,18 +7880,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
7882
7880
  }] }, { type: UiActionDescriptorService }] });
7883
7881
 
7884
7882
  class UiActionConfirmDialogService extends SmartdialogService {
7885
- constructor(dialog, router, dialogService, inject, compLib) {
7883
+ constructor(dialog, router, dialogService, inject, compLib, manager) {
7886
7884
  super(dialog, router, dialogService, inject, compLib);
7885
+ this.manager = manager;
7887
7886
  this._destroy$ = new Subject();
7888
7887
  this.onAction = new SmartSubject(this._destroy$);
7889
7888
  this.shouldDoAction = false;
7889
+ this.setUp();
7890
+ }
7891
+ async setUp() {
7892
+ this.descriptor = await this.manager.getActionDescriptor(this.action);
7893
+ this.dialogType = this.descriptor.confirmDialog ? 'confirmDialog' : 'dialog';
7890
7894
  }
7891
7895
  openDialog() {
7892
7896
  this.shouldDoAction = false;
7893
7897
  this.onAction = new SmartSubject(this._destroy$);
7894
7898
  const dialogData = {
7895
7899
  content: {
7896
- title: '',
7900
+ title: this.descriptor[this.dialogType].title,
7897
7901
  },
7898
7902
  size: {},
7899
7903
  customComponent: UiActionConfirmDialogComponent,
@@ -7911,7 +7915,7 @@ class UiActionConfirmDialogService extends SmartdialogService {
7911
7915
  this.closeDialog();
7912
7916
  this.onAction = new SmartSubject(this._destroy$);
7913
7917
  }
7914
- 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 }); }
7918
+ 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 }); }
7915
7919
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, providedIn: 'root' }); }
7916
7920
  }
7917
7921
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, decorators: [{
@@ -7922,7 +7926,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
7922
7926
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
7923
7927
  type: Inject,
7924
7928
  args: [COMPONENT_LIBRARY]
7925
- }] }] });
7929
+ }] }, { type: UiActionDescriptorService }] });
7926
7930
 
7927
7931
  class UiActionInputDialogComponent {
7928
7932
  constructor(service, compLib, manager) {
@@ -7938,13 +7942,8 @@ class UiActionInputDialogComponent {
7938
7942
  this.cancel();
7939
7943
  }
7940
7944
  async setUp() {
7941
- this.descriptor = await this.manager.getActionDescriptor(this.service.action);
7942
- if (this.descriptor[this.service.inputTypeName]) {
7943
- this.dialogType = this.service.inputTypeName;
7944
- }
7945
- else {
7946
- this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
7947
- }
7945
+ this.descriptor = this.service.descriptor;
7946
+ this.dialogType = this.service.dialogType;
7948
7947
  this.constructForm();
7949
7948
  }
7950
7949
  getTitle() {
@@ -8026,11 +8025,11 @@ class UiActionInputDialogComponent {
8026
8025
  this.service.cancel();
8027
8026
  }
8028
8027
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogComponent, deps: [{ token: 'textFieldDialogService' }, { token: COMPONENT_LIBRARY }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component }); }
8029
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.11", type: UiActionInputDialogComponent, selector: "smart-ui-action-input-dialog", viewQueries: [{ propertyName: "folderFormChild", first: true, predicate: ["form"], descendants: true }], ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <smartform #form [smartForm]=\"folderForm\"></smartform>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\r\n {{ getActionButtonLabel() }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], dependencies: [{ kind: "component", type: i2$3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { kind: "component", type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }] }); }
8028
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.11", type: UiActionInputDialogComponent, selector: "smart-ui-action-input-dialog", viewQueries: [{ propertyName: "folderFormChild", first: true, predicate: ["form"], descendants: true }], ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <smartform #form [smartForm]=\"folderForm\"></smartform>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\r\n {{ getActionButtonLabel() }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], dependencies: [{ kind: "component", type: i2$3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { kind: "component", type: SmartformComponent, selector: "smartform", inputs: ["smartForm"] }] }); }
8030
8029
  }
8031
8030
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogComponent, decorators: [{
8032
8031
  type: Component,
8033
- args: [{ selector: 'smart-ui-action-input-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <smartform #form [smartForm]=\"folderForm\"></smartform>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\r\n {{ getActionButtonLabel() }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
8032
+ args: [{ selector: 'smart-ui-action-input-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n <smartform #form [smartForm]=\"folderForm\"></smartform>\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\r\n {{ getActionButtonLabel() }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
8034
8033
  }], ctorParameters: () => [{ type: UiActionInputDialogService, decorators: [{
8035
8034
  type: Inject,
8036
8035
  args: ['textFieldDialogService']
@@ -8043,10 +8042,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
8043
8042
  }] } });
8044
8043
 
8045
8044
  class UiActionInputDialogService extends SmartdialogService {
8046
- constructor(dialog, router, dialogService, inject, compLib) {
8045
+ constructor(dialog, router, dialogService, inject, compLib, manager) {
8047
8046
  super(dialog, router, dialogService, inject, compLib);
8047
+ this.manager = manager;
8048
8048
  this._destroy$ = new Subject();
8049
8049
  this.onAction = new SmartSubject(this._destroy$);
8050
+ this.setUp();
8051
+ }
8052
+ async setUp() {
8053
+ this.descriptor = await this.manager.getActionDescriptor(this.action);
8054
+ if (this.descriptor[this.inputTypeName]) {
8055
+ this.dialogType = this.inputTypeName;
8056
+ }
8057
+ else {
8058
+ this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
8059
+ }
8050
8060
  }
8051
8061
  setDataAndOpenDialog(action, nodeName) {
8052
8062
  this.action = action;
@@ -8058,7 +8068,7 @@ class UiActionInputDialogService extends SmartdialogService {
8058
8068
  this.onAction = new SmartSubject(this._destroy$);
8059
8069
  const dialogData = {
8060
8070
  content: {
8061
- title: '',
8071
+ title: this.descriptor[this.dialogType].title,
8062
8072
  },
8063
8073
  size: {},
8064
8074
  customComponent: UiActionInputDialogComponent,
@@ -8076,7 +8086,7 @@ class UiActionInputDialogService extends SmartdialogService {
8076
8086
  this.closeDialog();
8077
8087
  this.onAction = new SmartSubject(this._destroy$);
8078
8088
  }
8079
- 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 }); }
8089
+ 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 }); }
8080
8090
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, providedIn: 'root' }); }
8081
8091
  }
8082
8092
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, decorators: [{
@@ -8087,7 +8097,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
8087
8097
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
8088
8098
  type: Inject,
8089
8099
  args: [COMPONENT_LIBRARY]
8090
- }] }] });
8100
+ }] }, { type: UiActionDescriptorService }] });
8091
8101
 
8092
8102
  /*
8093
8103
  * Public API Surface of smart-view-context
@@ -8216,11 +8226,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
8216
8226
  }], ctorParameters: () => [{ type: SmartViewContextErrorDialogService }] });
8217
8227
 
8218
8228
  class UiActionFileUploadDialogService extends SmartdialogService {
8219
- constructor(dialog, router, dialogService, inject, compLib) {
8229
+ constructor(dialog, router, dialogService, inject, compLib, manager) {
8220
8230
  super(dialog, router, dialogService, inject, compLib);
8231
+ this.manager = manager;
8221
8232
  this._destroy$ = new Subject();
8222
8233
  this.onAction = new SmartSubject(this._destroy$);
8223
8234
  this.isMultiple = false;
8235
+ this.setUp();
8236
+ }
8237
+ async setUp() {
8238
+ this.descriptor = await this.manager.getActionDescriptor(this.action);
8239
+ if (this.descriptor[this.inputTypeName]) {
8240
+ this.dialogType = this.inputTypeName;
8241
+ }
8242
+ else {
8243
+ this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
8244
+ }
8224
8245
  }
8225
8246
  setDataAndOpenDialog(action, nodeName) {
8226
8247
  this.action = action;
@@ -8232,7 +8253,7 @@ class UiActionFileUploadDialogService extends SmartdialogService {
8232
8253
  this.onAction = new SmartSubject(this._destroy$);
8233
8254
  const dialogData = {
8234
8255
  content: {
8235
- title: '',
8256
+ title: this.descriptor[this.dialogType].title,
8236
8257
  },
8237
8258
  size: {},
8238
8259
  customComponent: UiActionFileUploadDialogComponent,
@@ -8250,7 +8271,7 @@ class UiActionFileUploadDialogService extends SmartdialogService {
8250
8271
  this.closeDialog();
8251
8272
  this.onAction = new SmartSubject(this._destroy$);
8252
8273
  }
8253
- 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 }); }
8274
+ 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 }); }
8254
8275
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogService, providedIn: 'root' }); }
8255
8276
  }
8256
8277
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogService, decorators: [{
@@ -8261,7 +8282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
8261
8282
  }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
8262
8283
  type: Inject,
8263
8284
  args: [COMPONENT_LIBRARY]
8264
- }] }] });
8285
+ }] }, { type: UiActionDescriptorService }] });
8265
8286
 
8266
8287
  class UiActionFileUploadDialogComponent {
8267
8288
  constructor(service, compLib, manager) {
@@ -8279,22 +8300,17 @@ class UiActionFileUploadDialogComponent {
8279
8300
  this.cancel();
8280
8301
  }
8281
8302
  async setUp() {
8282
- this.descriptor = await this.manager.getActionDescriptor(this.service.action);
8303
+ this.descriptor = this.service.descriptor;
8283
8304
  this.isMultiple = this.service.isMultiple;
8284
8305
  this.i18n = {
8285
- addFile: this.descriptor.upload?.title ?? 'dokumentum hozzáadása',
8286
- browseOrDrag: this.descriptor.upload?.description ?? 'tallózás vagy behúzás',
8287
- formats: this.descriptor.upload?.formats ?? '',
8288
- maxSize: this.descriptor.upload?.maxSize ?? '',
8289
- upload: this.descriptor.upload?.uploadButtonTitle,
8306
+ addFile: this.descriptor?.upload?.title ?? 'dokumentum hozzáadása',
8307
+ browseOrDrag: this.descriptor?.upload?.description ?? 'tallózás vagy behúzás',
8308
+ formats: this.descriptor?.upload?.formats ?? '',
8309
+ maxSize: this.descriptor?.upload?.maxSize ?? '',
8310
+ upload: this.descriptor?.upload?.uploadButtonTitle,
8290
8311
  };
8291
8312
  // TODO set max size and file formats by UiAction.params
8292
- if (this.descriptor[this.service.inputTypeName]) {
8293
- this.dialogType = this.service.inputTypeName;
8294
- }
8295
- else {
8296
- this.dialogType = this.descriptor.inputDialog ? 'inputDialog' : 'dialog';
8297
- }
8313
+ this.dialogType = this.service.dialogType;
8298
8314
  }
8299
8315
  getTitle() {
8300
8316
  return this.descriptor[this.dialogType].title;
@@ -8333,11 +8349,11 @@ class UiActionFileUploadDialogComponent {
8333
8349
  this.service.cancel();
8334
8350
  }
8335
8351
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogComponent, deps: [{ token: 'fileUploadDialogService' }, { token: COMPONENT_LIBRARY }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component }); }
8336
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.11", type: UiActionFileUploadDialogComponent, selector: "lib-ui-action-file-upload-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n @if(compLib === componentLibrary.PRIMENG) {\r\n\r\n <p-fileUpload\r\n name=\"files[]\"\r\n url=\"\"\r\n (onSend)=\"uploadFiles($event)\"\r\n (onSelect)=\"onSelect($event)\"\r\n (onRemove)=\"onRemove($event)\"\r\n [multiple]=\"isMultiple\"\r\n [accept]=\"fileFormats?.join(',')\"\r\n [maxFileSize]=\"maxSizeMb\"\r\n uploadLabel=\"Felt\u00F6lt\u00E9s\"\r\n cancelLabel=\"M\u00E9gsem\"\r\n chooseLabel=\"V\u00E1laszt\u00E1s\"\r\n >\r\n <ng-template pTemplate=\"content\"> </ng-template>\r\n </p-fileUpload>\r\n }@else{\r\n <smartfileuploader\r\n [i18n]=\"i18n\"\r\n [fileFormats]=\"fileFormats\"\r\n [maxSizeMb]=\"maxSizeMb\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [isMultiple]=\"isMultiple\"\r\n ></smartfileuploader>\r\n\r\n }\r\n\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\r\n {{ getActionButtonLabel() }}\r\n </button> -->\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], dependencies: [{ kind: "component", type: i2$3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { kind: "component", type: i5$3.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }] }); }
8352
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.11", type: UiActionFileUploadDialogComponent, selector: "lib-ui-action-file-upload-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n @if(compLib === componentLibrary.PRIMENG) {\r\n\r\n <p-fileUpload\r\n name=\"files[]\"\r\n url=\"\"\r\n (onSend)=\"uploadFiles($event)\"\r\n (onSelect)=\"onSelect($event)\"\r\n (onRemove)=\"onRemove($event)\"\r\n [multiple]=\"isMultiple\"\r\n [accept]=\"fileFormats?.join(',')\"\r\n [maxFileSize]=\"maxSizeMb\"\r\n uploadLabel=\"Felt\u00F6lt\u00E9s\"\r\n cancelLabel=\"M\u00E9gsem\"\r\n chooseLabel=\"V\u00E1laszt\u00E1s\"\r\n >\r\n <ng-template pTemplate=\"content\"> </ng-template>\r\n </p-fileUpload>\r\n }@else{\r\n <smartfileuploader\r\n [i18n]=\"i18n\"\r\n [fileFormats]=\"fileFormats\"\r\n [maxSizeMb]=\"maxSizeMb\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [isMultiple]=\"isMultiple\"\r\n ></smartfileuploader>\r\n\r\n }\r\n\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\r\n {{ getActionButtonLabel() }}\r\n </button> -->\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"], dependencies: [{ kind: "component", type: i2$3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i3$3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: SmartIconComponent, selector: "smart-icon", inputs: ["icon", "color"] }, { kind: "component", type: i5$3.FileUpload, selector: "p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "component", type: SmartfileuploaderComponent, selector: "smartfileuploader", inputs: ["uploadCallback", "fileFormats", "maxSizeMb", "i18n", "useIconButton", "isMultiple"] }] }); }
8337
8353
  }
8338
8354
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogComponent, decorators: [{
8339
8355
  type: Component,
8340
- args: [{ selector: 'lib-ui-action-file-upload-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n @if(compLib === componentLibrary.PRIMENG) {\r\n\r\n <p-fileUpload\r\n name=\"files[]\"\r\n url=\"\"\r\n (onSend)=\"uploadFiles($event)\"\r\n (onSelect)=\"onSelect($event)\"\r\n (onRemove)=\"onRemove($event)\"\r\n [multiple]=\"isMultiple\"\r\n [accept]=\"fileFormats?.join(',')\"\r\n [maxFileSize]=\"maxSizeMb\"\r\n uploadLabel=\"Felt\u00F6lt\u00E9s\"\r\n cancelLabel=\"M\u00E9gsem\"\r\n chooseLabel=\"V\u00E1laszt\u00E1s\"\r\n >\r\n <ng-template pTemplate=\"content\"> </ng-template>\r\n </p-fileUpload>\r\n }@else{\r\n <smartfileuploader\r\n [i18n]=\"i18n\"\r\n [fileFormats]=\"fileFormats\"\r\n [maxSizeMb]=\"maxSizeMb\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [isMultiple]=\"isMultiple\"\r\n ></smartfileuploader>\r\n\r\n }\r\n\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\r\n {{ getActionButtonLabel() }}\r\n </button> -->\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
8356
+ args: [{ selector: 'lib-ui-action-file-upload-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n <div class=\"headerContainer\">\r\n @if(compLib === componentLibrary.MATERIAL) {\r\n <h3 class=\"color-accent-700\">\r\n {{ getTitle() }}\r\n </h3>\r\n <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n </button>\r\n }\r\n </div>\r\n <p>\r\n {{ getText() }}\r\n </p>\r\n @if(compLib === componentLibrary.PRIMENG) {\r\n\r\n <p-fileUpload\r\n name=\"files[]\"\r\n url=\"\"\r\n (onSend)=\"uploadFiles($event)\"\r\n (onSelect)=\"onSelect($event)\"\r\n (onRemove)=\"onRemove($event)\"\r\n [multiple]=\"isMultiple\"\r\n [accept]=\"fileFormats?.join(',')\"\r\n [maxFileSize]=\"maxSizeMb\"\r\n uploadLabel=\"Felt\u00F6lt\u00E9s\"\r\n cancelLabel=\"M\u00E9gsem\"\r\n chooseLabel=\"V\u00E1laszt\u00E1s\"\r\n >\r\n <ng-template pTemplate=\"content\"> </ng-template>\r\n </p-fileUpload>\r\n }@else{\r\n <smartfileuploader\r\n [i18n]=\"i18n\"\r\n [fileFormats]=\"fileFormats\"\r\n [maxSizeMb]=\"maxSizeMb\"\r\n [uploadCallback]=\"upload.bind(this)\"\r\n [isMultiple]=\"isMultiple\"\r\n ></smartfileuploader>\r\n\r\n }\r\n\r\n <div class=\"folderNameDialogButtonsContainer\">\r\n <button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n {{ getCancelButtonLabel() }}\r\n </button>\r\n <!-- <button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"upload()\">\r\n {{ getActionButtonLabel() }}\r\n </button> -->\r\n </div>\r\n</div>\r\n", styles: [".folderNameDialogContainer{width:25rem;display:flex;flex-direction:column;gap:1rem}.headerContainer{display:flex;flex-direction:row;justify-content:space-between}.headerContainer h3{margin:0}.folderNameDialogButtonsContainer{display:flex;flex-direction:row;justify-content:flex-end;gap:.5rem}\n"] }]
8341
8357
  }], ctorParameters: () => [{ type: UiActionFileUploadDialogService, decorators: [{
8342
8358
  type: Inject,
8343
8359
  args: ['fileUploadDialogService']