@smartbit4all/ng-client 4.0.41 → 4.0.43

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 (20) hide show
  1. package/esm2022/lib/smart-dialog/smartdialog.service.mjs +33 -12
  2. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.mjs +12 -5
  3. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.mjs +12 -6
  4. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +3 -3
  5. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.mjs +12 -6
  6. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.mjs +12 -5
  7. package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.mjs +12 -6
  8. package/esm2022/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.service.mjs +12 -6
  9. package/fesm2022/smartbit4all-ng-client.mjs +260 -220
  10. package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
  11. package/lib/smart-dialog/smartdialog.service.d.ts +11 -4
  12. package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.d.ts +4 -1
  13. package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.d.ts +4 -1
  14. package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.d.ts +4 -1
  15. package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.d.ts +4 -1
  16. package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.d.ts +4 -1
  17. package/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.service.d.ts +4 -1
  18. package/package.json +1 -1
  19. package/smartbit4all-ng-client-4.0.43.tgz +0 -0
  20. package/smartbit4all-ng-client-4.0.41.tgz +0 -0
@@ -22,6 +22,7 @@ import * as i2$3 from '@angular/material/button';
22
22
  import { MatButtonModule } from '@angular/material/button';
23
23
  import * as i3$4 from '@angular/material/expansion';
24
24
  import { MatExpansionModule } from '@angular/material/expansion';
25
+ import { __decorate, __param } from 'tslib';
25
26
  import * as i9 from '@angular/forms';
26
27
  import { UntypedFormGroup, UntypedFormControl, Validators, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
27
28
  import { ENTER, COMMA } from '@angular/cdk/keycodes';
@@ -3509,25 +3510,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
3509
3510
  * Public API Surface of component-factory-service
3510
3511
  */
3511
3512
 
3512
- class SmartdialogService {
3513
- constructor(dialog, router) {
3513
+ let SmartdialogService = class SmartdialogService {
3514
+ constructor(dialog, router, dialogService, inject, compLib) {
3514
3515
  this.dialog = dialog;
3515
3516
  this.router = router;
3517
+ this.dialogService = dialogService;
3518
+ this.inject = inject;
3519
+ this.compLib = compLib;
3520
+ this.componentLibrary = ComponentLibrary;
3516
3521
  this.defaultDialogSizes = {
3517
3522
  maxHeight: 100,
3518
3523
  minHeight: 100,
3519
3524
  maxWidth: 100,
3520
- minWidth: 100
3525
+ minWidth: 100,
3521
3526
  };
3522
3527
  }
3523
3528
  createDialog(smartDialog, component) {
3524
- this.dialogData = smartDialog;
3525
- this.dialogRef = this.dialog.open(component, { data: this.dialogData });
3526
- this.dialogRef.afterClosed().subscribe((result) => {
3527
- this.handleAfterClosed(result);
3528
- this.closeDialog();
3529
- });
3530
- return this.dialogRef;
3529
+ let dialogData = smartDialog;
3530
+ if (this.compLib === this.componentLibrary.MATERIAL) {
3531
+ let dialogRef = this.dialog.open(component, { data: dialogData });
3532
+ dialogRef.afterClosed().subscribe((result) => {
3533
+ this.closeDialog();
3534
+ });
3535
+ return dialogRef;
3536
+ }
3537
+ else {
3538
+ let dialogRef = this.dialogService.open(component, {
3539
+ data: dialogData,
3540
+ });
3541
+ dialogRef.onClose.subscribe((result) => {
3542
+ this.closeDialog();
3543
+ });
3544
+ return dialogRef;
3545
+ }
3531
3546
  }
3532
3547
  createDialogRef(smartDialog, component) {
3533
3548
  const dialogRef = this.dialog.open(component, { data: smartDialog });
@@ -3561,7 +3576,10 @@ class SmartdialogService {
3561
3576
  }
3562
3577
  this.dialogRef?.close();
3563
3578
  }
3564
- }
3579
+ };
3580
+ SmartdialogService = __decorate([
3581
+ __param(4, Inject(COMPONENT_LIBRARY))
3582
+ ], SmartdialogService);
3565
3583
 
3566
3584
  /**
3567
3585
  * Custom HttpParameterCodec
@@ -7773,125 +7791,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
7773
7791
  * Public API Surface of smarttable
7774
7792
  */
7775
7793
 
7776
- class SmartViewContextErrorDialogService extends SmartdialogService {
7777
- constructor(dialog, router, viewContext) {
7778
- super(dialog, router);
7779
- this.viewContext = viewContext;
7780
- this.dialogRefs = [];
7781
- }
7782
- handleAfterClosed(result) { }
7783
- openDialog() {
7784
- const dialogData = {
7785
- content: {
7786
- title: '',
7787
- },
7788
- size: {},
7789
- customComponent: SmartViewContextErrorDialogComponent,
7790
- };
7791
- this.dialogRefs.push(this.createDialogRef(dialogData, SmartViewContextErrorDialogComponent));
7792
- }
7793
- async closeDialog() {
7794
- let dialogRef = this.dialogRefs.pop();
7795
- dialogRef?.close();
7796
- }
7797
- async getSmartViewContextApiError() {
7798
- if (this.viewApiError?.code) {
7799
- return await this.viewContext.getSmartViewContextApiErrorByCode(this.viewApiError.code);
7800
- }
7801
- let dialogTitle;
7802
- let buttonLabel;
7803
- let message;
7804
- if (this.viewContext.translateService) {
7805
- dialogTitle = await this.viewContext.translateService
7806
- .get(SmartViewContextErrorDialogTitle)
7807
- .toPromise();
7808
- buttonLabel = await this.viewContext.translateService
7809
- .get(SmartViewContextErrorDialogButtonLabel)
7810
- .toPromise();
7811
- message = await this.viewContext.translateService
7812
- .get(SmartViewContextErrorDialogMessage)
7813
- .toPromise();
7814
- }
7815
- else {
7816
- buttonLabel = 'Ok';
7817
- dialogTitle = 'Hiba';
7818
- message = 'An error has occured.';
7819
- }
7820
- return {
7821
- code: this.viewApiError?.code ?? '',
7822
- message: this.viewApiError?.message ?? message,
7823
- buttonLabel,
7824
- dialogTitle,
7825
- };
7826
- }
7827
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }, { token: SmartViewContextService }], target: i0.ɵɵFactoryTarget.Injectable }); }
7828
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogService, providedIn: 'root' }); }
7829
- }
7830
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogService, decorators: [{
7831
- type: Injectable,
7832
- args: [{
7833
- providedIn: 'root',
7834
- }]
7835
- }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: SmartViewContextService }] });
7836
-
7837
- class SmartViewContextErrorDialogComponent {
7838
- constructor(service) {
7839
- this.service = service;
7840
- this.service
7841
- .getSmartViewContextApiError()
7842
- .then((smartViewContextApiError) => {
7843
- this.smartViewContextApiError = smartViewContextApiError;
7844
- });
7845
- }
7846
- ngOnInit() { }
7847
- onActionClick() {
7848
- if (this.smartViewContextApiError?.customAction) {
7849
- this.smartViewContextApiError.customAction();
7850
- }
7851
- this.service.closeDialog();
7852
- }
7853
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogComponent, deps: [{ token: SmartViewContextErrorDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
7854
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartViewContextErrorDialogComponent, selector: "lib-smart-view-context-error-dialog", ngImport: i0, template: "<div *ngIf=\"smartViewContextApiError\" class=\"container\">\r\n <h3 class=\"color-accent-700\">\r\n {{ smartViewContextApiError.dialogTitle }}\r\n </h3>\r\n <div class=\"content\">\r\n <p>\r\n {{ smartViewContextApiError.message }}\r\n </p>\r\n </div>\r\n <div class=\"buttonContainer\">\r\n <button mat-raised-button color=\"primary\" (click)=\"onActionClick()\">\r\n {{ smartViewContextApiError.buttonLabel }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".container{display:flex;flex-direction:column;gap:1em;min-width:25rem;max-width:50vw;height:auto;max-height:75vh}.content{flex:1;overflow:auto}.buttonContainer{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
7855
- }
7856
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogComponent, decorators: [{
7857
- type: Component,
7858
- args: [{ selector: 'lib-smart-view-context-error-dialog', template: "<div *ngIf=\"smartViewContextApiError\" class=\"container\">\r\n <h3 class=\"color-accent-700\">\r\n {{ smartViewContextApiError.dialogTitle }}\r\n </h3>\r\n <div class=\"content\">\r\n <p>\r\n {{ smartViewContextApiError.message }}\r\n </p>\r\n </div>\r\n <div class=\"buttonContainer\">\r\n <button mat-raised-button color=\"primary\" (click)=\"onActionClick()\">\r\n {{ smartViewContextApiError.buttonLabel }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".container{display:flex;flex-direction:column;gap:1em;min-width:25rem;max-width:50vw;height:auto;max-height:75vh}.content{flex:1;overflow:auto}.buttonContainer{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
7859
- }], ctorParameters: () => [{ type: SmartViewContextErrorDialogService }] });
7860
-
7861
- class SmartViewContextInterceptor {
7862
- constructor(viewContextErrorDialog) {
7863
- this.viewContextErrorDialog = viewContextErrorDialog;
7864
- }
7865
- intercept(request, next) {
7866
- // parameter: async: True -> don't throw/open error (dialog)
7867
- if (request.body) {
7868
- try {
7869
- let body = request.body;
7870
- if (body.params[IS_ASYNC_PARAM_NAME]) {
7871
- return next.handle(request);
7872
- }
7873
- }
7874
- catch (error) { }
7875
- }
7876
- return next.handle(request).pipe(catchError((error) => {
7877
- if (error.status === 409 &&
7878
- (error.error.code || error.error.message)) {
7879
- this.openErrorDialog(error.error);
7880
- }
7881
- return throwError(error);
7882
- }));
7883
- }
7884
- openErrorDialog(viewApiError) {
7885
- this.viewContextErrorDialog.viewApiError = viewApiError;
7886
- this.viewContextErrorDialog.openDialog();
7887
- }
7888
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextInterceptor, deps: [{ token: SmartViewContextErrorDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
7889
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextInterceptor }); }
7890
- }
7891
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextInterceptor, decorators: [{
7892
- type: Injectable
7893
- }], ctorParameters: () => [{ type: SmartViewContextErrorDialogService }] });
7894
-
7895
7794
  class SmartViewRedirect {
7896
7795
  constructor(service, navigation, route) {
7897
7796
  this.service = service;
@@ -7920,31 +7819,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
7920
7819
  const SmartLinkChannelVariableInPath = 'channel';
7921
7820
  const SmartLinkUuidVariableInPath = 'uuid';
7922
7821
 
7923
- class UiActionInputDialogService extends SmartdialogService {
7924
- constructor(dialog, router) {
7925
- super(dialog, router);
7822
+ var UiActionDialogType;
7823
+ (function (UiActionDialogType) {
7824
+ UiActionDialogType["inputDialog"] = "inputDialog";
7825
+ UiActionDialogType["confirmDialog"] = "confirmDialog";
7826
+ UiActionDialogType["dialog"] = "dialog";
7827
+ })(UiActionDialogType || (UiActionDialogType = {}));
7828
+
7829
+ class UiActionConfirmDialogComponent {
7830
+ constructor(service, compLib, manager) {
7831
+ this.service = service;
7832
+ this.compLib = compLib;
7833
+ this.manager = manager;
7834
+ this.componentLibrary = ComponentLibrary;
7835
+ 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';
7841
+ }
7842
+ ngOnDestroy() {
7843
+ this.service._destroy$.next();
7844
+ this.cancel();
7845
+ }
7846
+ getTitle() {
7847
+ return this.descriptor[this.dialogType].title;
7848
+ }
7849
+ getText() {
7850
+ return this.descriptor[this.dialogType].text ?? '';
7851
+ }
7852
+ getActionButtonLabel() {
7853
+ return this.descriptor[this.dialogType].actionButton.caption;
7854
+ }
7855
+ getActionButtonColor() {
7856
+ return this.descriptor[this.dialogType].actionButton.color;
7857
+ }
7858
+ getCancelButtonLabel() {
7859
+ return this.descriptor[this.dialogType].cancelButton.caption;
7860
+ }
7861
+ getCancelButtonColor() {
7862
+ return this.descriptor[this.dialogType].cancelButton.color;
7863
+ }
7864
+ doAction() {
7865
+ this.service.doAction();
7866
+ }
7867
+ cancel() {
7868
+ this.service.cancel();
7869
+ }
7870
+ 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"] }] }); }
7872
+ }
7873
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogComponent, decorators: [{
7874
+ 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"] }]
7876
+ }], ctorParameters: () => [{ type: UiActionConfirmDialogService, decorators: [{
7877
+ type: Inject,
7878
+ args: ['confirmDialogService']
7879
+ }] }, { type: ComponentLibrary, decorators: [{
7880
+ type: Inject,
7881
+ args: [COMPONENT_LIBRARY]
7882
+ }] }, { type: UiActionDescriptorService }] });
7883
+
7884
+ class UiActionConfirmDialogService extends SmartdialogService {
7885
+ constructor(dialog, router, dialogService, inject, compLib) {
7886
+ super(dialog, router, dialogService, inject, compLib);
7926
7887
  this._destroy$ = new Subject();
7927
7888
  this.onAction = new SmartSubject(this._destroy$);
7928
- }
7929
- setDataAndOpenDialog(action, nodeName) {
7930
- this.action = action;
7931
- this.nodeName = nodeName;
7932
- this.openDialog();
7889
+ this.shouldDoAction = false;
7933
7890
  }
7934
7891
  openDialog() {
7935
- this.params = undefined;
7892
+ this.shouldDoAction = false;
7936
7893
  this.onAction = new SmartSubject(this._destroy$);
7937
7894
  const dialogData = {
7938
7895
  content: {
7939
7896
  title: '',
7940
7897
  },
7941
7898
  size: {},
7942
- customComponent: UiActionInputDialogComponent,
7899
+ customComponent: UiActionConfirmDialogComponent,
7943
7900
  };
7944
- this.createDialog(dialogData, UiActionInputDialogComponent);
7901
+ this.createDialog(dialogData, UiActionConfirmDialogComponent);
7945
7902
  }
7946
- async onSave(params) {
7947
- this.params = params;
7903
+ doAction() {
7904
+ this.shouldDoAction = true;
7948
7905
  this.onAction.complete();
7949
7906
  this.closeDialog();
7950
7907
  this.onAction = new SmartSubject(this._destroy$);
@@ -7954,20 +7911,25 @@ class UiActionInputDialogService extends SmartdialogService {
7954
7911
  this.closeDialog();
7955
7912
  this.onAction = new SmartSubject(this._destroy$);
7956
7913
  }
7957
- 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 }], target: i0.ɵɵFactoryTarget.Injectable }); }
7958
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, providedIn: 'root' }); }
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 }); }
7915
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, providedIn: 'root' }); }
7959
7916
  }
7960
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, decorators: [{
7917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, decorators: [{
7961
7918
  type: Injectable,
7962
7919
  args: [{
7963
7920
  providedIn: 'root',
7964
7921
  }]
7965
- }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }] });
7922
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
7923
+ type: Inject,
7924
+ args: [COMPONENT_LIBRARY]
7925
+ }] }] });
7966
7926
 
7967
7927
  class UiActionInputDialogComponent {
7968
- constructor(service, manager) {
7928
+ constructor(service, compLib, manager) {
7969
7929
  this.service = service;
7930
+ this.compLib = compLib;
7970
7931
  this.manager = manager;
7932
+ this.componentLibrary = ComponentLibrary;
7971
7933
  this.code = this.service.action.code;
7972
7934
  this.setUp();
7973
7935
  }
@@ -8063,41 +8025,48 @@ class UiActionInputDialogComponent {
8063
8025
  cancel() {
8064
8026
  this.service.cancel();
8065
8027
  }
8066
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogComponent, deps: [{ token: 'textFieldDialogService' }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component }); }
8067
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</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.ɵ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"] }] }); }
8068
8030
  }
8069
8031
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogComponent, decorators: [{
8070
8032
  type: Component,
8071
- args: [{ selector: 'smart-ui-action-input-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<smartform #form [smartForm]=\"folderForm\"></smartform>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"save()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</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"] }]
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"] }]
8072
8034
  }], ctorParameters: () => [{ type: UiActionInputDialogService, decorators: [{
8073
8035
  type: Inject,
8074
8036
  args: ['textFieldDialogService']
8037
+ }] }, { type: ComponentLibrary, decorators: [{
8038
+ type: Inject,
8039
+ args: [COMPONENT_LIBRARY]
8075
8040
  }] }, { type: UiActionDescriptorService }], propDecorators: { folderFormChild: [{
8076
8041
  type: ViewChild,
8077
8042
  args: ['form']
8078
8043
  }] } });
8079
8044
 
8080
- class UiActionConfirmDialogService extends SmartdialogService {
8081
- constructor(dialog, router) {
8082
- super(dialog, router);
8045
+ class UiActionInputDialogService extends SmartdialogService {
8046
+ constructor(dialog, router, dialogService, inject, compLib) {
8047
+ super(dialog, router, dialogService, inject, compLib);
8083
8048
  this._destroy$ = new Subject();
8084
8049
  this.onAction = new SmartSubject(this._destroy$);
8085
- this.shouldDoAction = false;
8050
+ }
8051
+ setDataAndOpenDialog(action, nodeName) {
8052
+ this.action = action;
8053
+ this.nodeName = nodeName;
8054
+ this.openDialog();
8086
8055
  }
8087
8056
  openDialog() {
8088
- this.shouldDoAction = false;
8057
+ this.params = undefined;
8089
8058
  this.onAction = new SmartSubject(this._destroy$);
8090
8059
  const dialogData = {
8091
8060
  content: {
8092
8061
  title: '',
8093
8062
  },
8094
8063
  size: {},
8095
- customComponent: UiActionConfirmDialogComponent,
8064
+ customComponent: UiActionInputDialogComponent,
8096
8065
  };
8097
- this.createDialog(dialogData, UiActionConfirmDialogComponent);
8066
+ this.createDialog(dialogData, UiActionInputDialogComponent);
8098
8067
  }
8099
- doAction() {
8100
- this.shouldDoAction = true;
8068
+ async onSave(params) {
8069
+ this.params = params;
8101
8070
  this.onAction.complete();
8102
8071
  this.closeDialog();
8103
8072
  this.onAction = new SmartSubject(this._destroy$);
@@ -8107,80 +8076,148 @@ class UiActionConfirmDialogService extends SmartdialogService {
8107
8076
  this.closeDialog();
8108
8077
  this.onAction = new SmartSubject(this._destroy$);
8109
8078
  }
8110
- 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 }], target: i0.ɵɵFactoryTarget.Injectable }); }
8111
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, providedIn: 'root' }); }
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 }); }
8080
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, providedIn: 'root' }); }
8112
8081
  }
8113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, decorators: [{
8082
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, decorators: [{
8114
8083
  type: Injectable,
8115
8084
  args: [{
8116
8085
  providedIn: 'root',
8117
8086
  }]
8118
- }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }] });
8087
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
8088
+ type: Inject,
8089
+ args: [COMPONENT_LIBRARY]
8090
+ }] }] });
8119
8091
 
8120
- class UiActionConfirmDialogComponent {
8121
- constructor(service, manager) {
8122
- this.service = service;
8123
- this.manager = manager;
8124
- this.code = this.service.action.code;
8125
- this.setUp();
8126
- }
8127
- async setUp() {
8128
- this.descriptor = await this.manager.getActionDescriptor(this.service.action);
8129
- this.dialogType = this.descriptor.confirmDialog ? 'confirmDialog' : 'dialog';
8130
- }
8131
- ngOnDestroy() {
8132
- this.service._destroy$.next();
8133
- this.cancel();
8092
+ /*
8093
+ * Public API Surface of smart-view-context
8094
+ */
8095
+
8096
+ class SmartViewContextErrorDialogService extends SmartdialogService {
8097
+ constructor(dialog, router, viewContext, dialogService, inject, compLib) {
8098
+ super(dialog, router, dialogService, inject, compLib);
8099
+ this.viewContext = viewContext;
8100
+ this.dialogRefs = [];
8134
8101
  }
8135
- getTitle() {
8136
- return this.descriptor[this.dialogType].title;
8102
+ handleAfterClosed(result) { }
8103
+ openDialog() {
8104
+ const dialogData = {
8105
+ content: {
8106
+ title: '',
8107
+ },
8108
+ size: {},
8109
+ customComponent: SmartViewContextErrorDialogComponent,
8110
+ };
8111
+ this.dialogRefs.push(this.createDialogRef(dialogData, SmartViewContextErrorDialogComponent));
8137
8112
  }
8138
- getText() {
8139
- return this.descriptor[this.dialogType].text ?? '';
8113
+ async closeDialog() {
8114
+ let dialogRef = this.dialogRefs.pop();
8115
+ dialogRef?.close();
8140
8116
  }
8141
- getActionButtonLabel() {
8142
- return this.descriptor[this.dialogType].actionButton.caption;
8117
+ async getSmartViewContextApiError() {
8118
+ if (this.viewApiError?.code) {
8119
+ return await this.viewContext.getSmartViewContextApiErrorByCode(this.viewApiError.code);
8120
+ }
8121
+ let dialogTitle;
8122
+ let buttonLabel;
8123
+ let message;
8124
+ if (this.viewContext.translateService) {
8125
+ dialogTitle = await this.viewContext.translateService
8126
+ .get(SmartViewContextErrorDialogTitle)
8127
+ .toPromise();
8128
+ buttonLabel = await this.viewContext.translateService
8129
+ .get(SmartViewContextErrorDialogButtonLabel)
8130
+ .toPromise();
8131
+ message = await this.viewContext.translateService
8132
+ .get(SmartViewContextErrorDialogMessage)
8133
+ .toPromise();
8134
+ }
8135
+ else {
8136
+ buttonLabel = 'Ok';
8137
+ dialogTitle = 'Hiba';
8138
+ message = 'An error has occured.';
8139
+ }
8140
+ return {
8141
+ code: this.viewApiError?.code ?? '',
8142
+ message: this.viewApiError?.message ?? message,
8143
+ buttonLabel,
8144
+ dialogTitle,
8145
+ };
8143
8146
  }
8144
- getActionButtonColor() {
8145
- return this.descriptor[this.dialogType].actionButton.color;
8147
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogService, deps: [{ token: i1$1.MatDialog }, { token: i2$1.Router }, { token: SmartViewContextService }, { token: i3$1.DialogService }, { token: i0.Injector }, { token: COMPONENT_LIBRARY }], target: i0.ɵɵFactoryTarget.Injectable }); }
8148
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogService, providedIn: 'root' }); }
8149
+ }
8150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogService, decorators: [{
8151
+ type: Injectable,
8152
+ args: [{
8153
+ providedIn: 'root',
8154
+ }]
8155
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: SmartViewContextService }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
8156
+ type: Inject,
8157
+ args: [COMPONENT_LIBRARY]
8158
+ }] }] });
8159
+
8160
+ class SmartViewContextErrorDialogComponent {
8161
+ constructor(service) {
8162
+ this.service = service;
8163
+ this.service
8164
+ .getSmartViewContextApiError()
8165
+ .then((smartViewContextApiError) => {
8166
+ this.smartViewContextApiError = smartViewContextApiError;
8167
+ });
8146
8168
  }
8147
- getCancelButtonLabel() {
8148
- return this.descriptor[this.dialogType].cancelButton.caption;
8169
+ ngOnInit() { }
8170
+ onActionClick() {
8171
+ if (this.smartViewContextApiError?.customAction) {
8172
+ this.smartViewContextApiError.customAction();
8173
+ }
8174
+ this.service.closeDialog();
8149
8175
  }
8150
- getCancelButtonColor() {
8151
- return this.descriptor[this.dialogType].cancelButton.color;
8176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogComponent, deps: [{ token: SmartViewContextErrorDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
8177
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartViewContextErrorDialogComponent, selector: "lib-smart-view-context-error-dialog", ngImport: i0, template: "<div *ngIf=\"smartViewContextApiError\" class=\"container\">\r\n <h3 class=\"color-accent-700\">\r\n {{ smartViewContextApiError.dialogTitle }}\r\n </h3>\r\n <div class=\"content\">\r\n <p>\r\n {{ smartViewContextApiError.message }}\r\n </p>\r\n </div>\r\n <div class=\"buttonContainer\">\r\n <button mat-raised-button color=\"primary\" (click)=\"onActionClick()\">\r\n {{ smartViewContextApiError.buttonLabel }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".container{display:flex;flex-direction:column;gap:1em;min-width:25rem;max-width:50vw;height:auto;max-height:75vh}.content{flex:1;overflow:auto}.buttonContainer{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
8178
+ }
8179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextErrorDialogComponent, decorators: [{
8180
+ type: Component,
8181
+ args: [{ selector: 'lib-smart-view-context-error-dialog', template: "<div *ngIf=\"smartViewContextApiError\" class=\"container\">\r\n <h3 class=\"color-accent-700\">\r\n {{ smartViewContextApiError.dialogTitle }}\r\n </h3>\r\n <div class=\"content\">\r\n <p>\r\n {{ smartViewContextApiError.message }}\r\n </p>\r\n </div>\r\n <div class=\"buttonContainer\">\r\n <button mat-raised-button color=\"primary\" (click)=\"onActionClick()\">\r\n {{ smartViewContextApiError.buttonLabel }}\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".container{display:flex;flex-direction:column;gap:1em;min-width:25rem;max-width:50vw;height:auto;max-height:75vh}.content{flex:1;overflow:auto}.buttonContainer{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
8182
+ }], ctorParameters: () => [{ type: SmartViewContextErrorDialogService }] });
8183
+
8184
+ class SmartViewContextInterceptor {
8185
+ constructor(viewContextErrorDialog) {
8186
+ this.viewContextErrorDialog = viewContextErrorDialog;
8152
8187
  }
8153
- doAction() {
8154
- this.service.doAction();
8188
+ intercept(request, next) {
8189
+ // parameter: async: True -> don't throw/open error (dialog)
8190
+ if (request.body) {
8191
+ try {
8192
+ let body = request.body;
8193
+ if (body.params[IS_ASYNC_PARAM_NAME]) {
8194
+ return next.handle(request);
8195
+ }
8196
+ }
8197
+ catch (error) { }
8198
+ }
8199
+ return next.handle(request).pipe(catchError((error) => {
8200
+ if (error.status === 409 &&
8201
+ (error.error.code || error.error.message)) {
8202
+ this.openErrorDialog(error.error);
8203
+ }
8204
+ return throwError(error);
8205
+ }));
8155
8206
  }
8156
- cancel() {
8157
- this.service.cancel();
8207
+ openErrorDialog(viewApiError) {
8208
+ this.viewContextErrorDialog.viewApiError = viewApiError;
8209
+ this.viewContextErrorDialog.openDialog();
8158
8210
  }
8159
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogComponent, deps: [{ token: 'confirmDialogService' }, { token: UiActionDescriptorService }], target: i0.ɵɵFactoryTarget.Component }); }
8160
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: UiActionConfirmDialogComponent, selector: "app-ui-action-confirm-dialog", ngImport: i0, template: "<div class=\"folderNameDialogContainer\">\r\n\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"doAction()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</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"] }] }); }
8211
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextInterceptor, deps: [{ token: SmartViewContextErrorDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
8212
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextInterceptor }); }
8161
8213
  }
8162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogComponent, decorators: [{
8163
- type: Component,
8164
- args: [{ selector: 'app-ui-action-confirm-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n\t<div class=\"headerContainer\">\r\n\t\t<h3 class=\"color-accent-700\">\r\n\t\t\t{{ getTitle() }}\r\n\t\t</h3>\r\n\t\t<button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n\t\t\t<smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<p>\r\n\t\t{{ getText() }}\r\n\t</p>\r\n\t<div class=\"folderNameDialogButtonsContainer\">\r\n\t\t<button mat-button color=\"accent\" [color]=\"getCancelButtonColor()\" (click)=\"cancel()\">\r\n\t\t\t{{ getCancelButtonLabel() }}\r\n\t\t</button>\r\n\t\t<button mat-raised-button [color]=\"getActionButtonColor()\" (click)=\"doAction()\">\r\n\t\t\t{{ getActionButtonLabel() }}\r\n\t\t</button>\r\n\t</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"] }]
8165
- }], ctorParameters: () => [{ type: UiActionConfirmDialogService, decorators: [{
8166
- type: Inject,
8167
- args: ['confirmDialogService']
8168
- }] }, { type: UiActionDescriptorService }] });
8169
-
8170
- var UiActionDialogType;
8171
- (function (UiActionDialogType) {
8172
- UiActionDialogType["inputDialog"] = "inputDialog";
8173
- UiActionDialogType["confirmDialog"] = "confirmDialog";
8174
- UiActionDialogType["dialog"] = "dialog";
8175
- })(UiActionDialogType || (UiActionDialogType = {}));
8176
-
8177
- /*
8178
- * Public API Surface of smart-view-context
8179
- */
8214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextInterceptor, decorators: [{
8215
+ type: Injectable
8216
+ }], ctorParameters: () => [{ type: SmartViewContextErrorDialogService }] });
8180
8217
 
8181
8218
  class UiActionFileUploadDialogService extends SmartdialogService {
8182
- constructor(dialog, router) {
8183
- super(dialog, router);
8219
+ constructor(dialog, router, dialogService, inject, compLib) {
8220
+ super(dialog, router, dialogService, inject, compLib);
8184
8221
  this._destroy$ = new Subject();
8185
8222
  this.onAction = new SmartSubject(this._destroy$);
8186
8223
  this.isMultiple = false;
@@ -8213,7 +8250,7 @@ class UiActionFileUploadDialogService extends SmartdialogService {
8213
8250
  this.closeDialog();
8214
8251
  this.onAction = new SmartSubject(this._destroy$);
8215
8252
  }
8216
- 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 }], target: i0.ɵɵFactoryTarget.Injectable }); }
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 }); }
8217
8254
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogService, providedIn: 'root' }); }
8218
8255
  }
8219
8256
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogService, decorators: [{
@@ -8221,7 +8258,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
8221
8258
  args: [{
8222
8259
  providedIn: 'root',
8223
8260
  }]
8224
- }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }] });
8261
+ }], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
8262
+ type: Inject,
8263
+ args: [COMPONENT_LIBRARY]
8264
+ }] }] });
8225
8265
 
8226
8266
  class UiActionFileUploadDialogComponent {
8227
8267
  constructor(service, compLib, manager) {
@@ -8293,11 +8333,11 @@ class UiActionFileUploadDialogComponent {
8293
8333
  this.service.cancel();
8294
8334
  }
8295
8335
  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 }); }
8296
- 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 <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n @if(compLib === componentLibrary.PRIMENG) {\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'times'\"></smart-icon>\r\n }@else{\r\n\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n }\r\n </button>\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"] }] }); }
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"] }] }); }
8297
8337
  }
8298
8338
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogComponent, decorators: [{
8299
8339
  type: Component,
8300
- 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 <button mat-icon-button title=\"close\" (click)=\"cancel()\">\r\n @if(compLib === componentLibrary.PRIMENG) {\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'times'\"></smart-icon>\r\n }@else{\r\n\r\n <smart-icon [color]=\"'primary'\" [icon]=\"'X'\"></smart-icon>\r\n }\r\n </button>\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"] }]
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"] }]
8301
8341
  }], ctorParameters: () => [{ type: UiActionFileUploadDialogService, decorators: [{
8302
8342
  type: Inject,
8303
8343
  args: ['fileUploadDialogService']