@smartbit4all/ng-client 4.0.42 → 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.
- package/esm2022/lib/smart-dialog/smartdialog.service.mjs +33 -12
- package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.mjs +12 -5
- package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.mjs +12 -6
- package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.component.mjs +3 -3
- package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.mjs +7 -7
- package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.mjs +12 -5
- package/esm2022/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.mjs +7 -7
- package/esm2022/lib/view-context/smart-view-context-dialog.service.mjs +1 -1
- package/esm2022/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.service.mjs +12 -6
- package/fesm2022/smartbit4all-ng-client.mjs +230 -196
- package/fesm2022/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/smart-dialog/smartdialog.service.d.ts +11 -4
- package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.component.d.ts +4 -1
- package/lib/view-context/smart-ui-action/dialogs/ui-action-confirm-dialog/ui-action-confirm-dialog.service.d.ts +4 -1
- package/lib/view-context/smart-ui-action/dialogs/ui-action-file-upload-dialog/ui-action-file-upload-dialog.service.d.ts +4 -7
- package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.component.d.ts +4 -1
- package/lib/view-context/smart-ui-action/dialogs/ui-action-input-dialog/ui-action-input-dialog.service.d.ts +4 -7
- package/lib/view-context/smart-view-context-dialog.service.d.ts +1 -1
- package/lib/view-context/smart-view-context-error-dialog/smart-view-context-error-dialog.service.d.ts +4 -1
- package/package.json +1 -1
- package/smartbit4all-ng-client-4.0.43.tgz +0 -0
- package/smartbit4all-ng-client-4.0.42.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
|
-
|
|
3525
|
-
this.
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
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;
|
|
@@ -7928,9 +7827,11 @@ var UiActionDialogType;
|
|
|
7928
7827
|
})(UiActionDialogType || (UiActionDialogType = {}));
|
|
7929
7828
|
|
|
7930
7829
|
class UiActionConfirmDialogComponent {
|
|
7931
|
-
constructor(service, manager) {
|
|
7830
|
+
constructor(service, compLib, manager) {
|
|
7932
7831
|
this.service = service;
|
|
7832
|
+
this.compLib = compLib;
|
|
7933
7833
|
this.manager = manager;
|
|
7834
|
+
this.componentLibrary = ComponentLibrary;
|
|
7934
7835
|
this.code = this.service.action.code;
|
|
7935
7836
|
this.setUp();
|
|
7936
7837
|
}
|
|
@@ -7966,20 +7867,23 @@ class UiActionConfirmDialogComponent {
|
|
|
7966
7867
|
cancel() {
|
|
7967
7868
|
this.service.cancel();
|
|
7968
7869
|
}
|
|
7969
|
-
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 }); }
|
|
7970
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
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"] }] }); }
|
|
7971
7872
|
}
|
|
7972
7873
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogComponent, decorators: [{
|
|
7973
7874
|
type: Component,
|
|
7974
|
-
args: [{ selector: 'app-ui-action-confirm-dialog', template: "<div class=\"folderNameDialogContainer\">\r\n
|
|
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"] }]
|
|
7975
7876
|
}], ctorParameters: () => [{ type: UiActionConfirmDialogService, decorators: [{
|
|
7976
7877
|
type: Inject,
|
|
7977
7878
|
args: ['confirmDialogService']
|
|
7879
|
+
}] }, { type: ComponentLibrary, decorators: [{
|
|
7880
|
+
type: Inject,
|
|
7881
|
+
args: [COMPONENT_LIBRARY]
|
|
7978
7882
|
}] }, { type: UiActionDescriptorService }] });
|
|
7979
7883
|
|
|
7980
7884
|
class UiActionConfirmDialogService extends SmartdialogService {
|
|
7981
|
-
constructor(dialog, router) {
|
|
7982
|
-
super(dialog, router);
|
|
7885
|
+
constructor(dialog, router, dialogService, inject, compLib) {
|
|
7886
|
+
super(dialog, router, dialogService, inject, compLib);
|
|
7983
7887
|
this._destroy$ = new Subject();
|
|
7984
7888
|
this.onAction = new SmartSubject(this._destroy$);
|
|
7985
7889
|
this.shouldDoAction = false;
|
|
@@ -8007,7 +7911,7 @@ class UiActionConfirmDialogService extends SmartdialogService {
|
|
|
8007
7911
|
this.closeDialog();
|
|
8008
7912
|
this.onAction = new SmartSubject(this._destroy$);
|
|
8009
7913
|
}
|
|
8010
|
-
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 }); }
|
|
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 }); }
|
|
8011
7915
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, providedIn: 'root' }); }
|
|
8012
7916
|
}
|
|
8013
7917
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionConfirmDialogService, decorators: [{
|
|
@@ -8015,63 +7919,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
|
8015
7919
|
args: [{
|
|
8016
7920
|
providedIn: 'root',
|
|
8017
7921
|
}]
|
|
8018
|
-
}], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }] });
|
|
8019
|
-
|
|
8020
|
-
/*
|
|
8021
|
-
* Public API Surface of smart-view-context
|
|
8022
|
-
*/
|
|
8023
|
-
|
|
8024
|
-
class UiActionInputDialogService extends SmartViewContextDialogService {
|
|
8025
|
-
constructor(dialog, router, dialogService, inject, compLib) {
|
|
8026
|
-
super(dialog, router, dialogService, inject, compLib);
|
|
8027
|
-
this._destroy$ = new Subject();
|
|
8028
|
-
this.onAction = new SmartSubject(this._destroy$);
|
|
8029
|
-
}
|
|
8030
|
-
setDataAndOpenDialog(action, nodeName) {
|
|
8031
|
-
this.action = action;
|
|
8032
|
-
this.nodeName = nodeName;
|
|
8033
|
-
this.openDialog();
|
|
8034
|
-
}
|
|
8035
|
-
openDialog() {
|
|
8036
|
-
this.params = undefined;
|
|
8037
|
-
this.onAction = new SmartSubject(this._destroy$);
|
|
8038
|
-
this.dialogData = {
|
|
8039
|
-
content: {
|
|
8040
|
-
title: '',
|
|
8041
|
-
},
|
|
8042
|
-
size: {},
|
|
8043
|
-
customComponent: UiActionInputDialogComponent,
|
|
8044
|
-
};
|
|
8045
|
-
this.dialofRef = this.createDialog(this.dialogData, UiActionInputDialogComponent);
|
|
8046
|
-
}
|
|
8047
|
-
async onSave(params) {
|
|
8048
|
-
this.params = params;
|
|
8049
|
-
this.onAction.complete();
|
|
8050
|
-
this.closeDialog(this.dialofRef, this.dialogData);
|
|
8051
|
-
this.onAction = new SmartSubject(this._destroy$);
|
|
8052
|
-
}
|
|
8053
|
-
cancel() {
|
|
8054
|
-
this.onAction.complete();
|
|
8055
|
-
this.closeDialog(this.dialofRef, this.dialogData);
|
|
8056
|
-
this.onAction = new SmartSubject(this._destroy$);
|
|
8057
|
-
}
|
|
8058
|
-
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 }); }
|
|
8059
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, providedIn: 'root' }); }
|
|
8060
|
-
}
|
|
8061
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, decorators: [{
|
|
8062
|
-
type: Injectable,
|
|
8063
|
-
args: [{
|
|
8064
|
-
providedIn: 'root',
|
|
8065
|
-
}]
|
|
8066
7922
|
}], ctorParameters: () => [{ type: i1$1.MatDialog }, { type: i2$1.Router }, { type: i3$1.DialogService }, { type: i0.Injector }, { type: ComponentLibrary, decorators: [{
|
|
8067
7923
|
type: Inject,
|
|
8068
7924
|
args: [COMPONENT_LIBRARY]
|
|
8069
7925
|
}] }] });
|
|
8070
7926
|
|
|
8071
7927
|
class UiActionInputDialogComponent {
|
|
8072
|
-
constructor(service, manager) {
|
|
7928
|
+
constructor(service, compLib, manager) {
|
|
8073
7929
|
this.service = service;
|
|
7930
|
+
this.compLib = compLib;
|
|
8074
7931
|
this.manager = manager;
|
|
7932
|
+
this.componentLibrary = ComponentLibrary;
|
|
8075
7933
|
this.code = this.service.action.code;
|
|
8076
7934
|
this.setUp();
|
|
8077
7935
|
}
|
|
@@ -8167,21 +8025,197 @@ class UiActionInputDialogComponent {
|
|
|
8167
8025
|
cancel() {
|
|
8168
8026
|
this.service.cancel();
|
|
8169
8027
|
}
|
|
8170
|
-
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 }); }
|
|
8171
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
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"] }] }); }
|
|
8172
8030
|
}
|
|
8173
8031
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogComponent, decorators: [{
|
|
8174
8032
|
type: Component,
|
|
8175
|
-
args: [{ selector: 'smart-ui-action-input-dialog', template: "<div class=\"folderNameDialogContainer\">\r\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"] }]
|
|
8176
8034
|
}], ctorParameters: () => [{ type: UiActionInputDialogService, decorators: [{
|
|
8177
8035
|
type: Inject,
|
|
8178
8036
|
args: ['textFieldDialogService']
|
|
8037
|
+
}] }, { type: ComponentLibrary, decorators: [{
|
|
8038
|
+
type: Inject,
|
|
8039
|
+
args: [COMPONENT_LIBRARY]
|
|
8179
8040
|
}] }, { type: UiActionDescriptorService }], propDecorators: { folderFormChild: [{
|
|
8180
8041
|
type: ViewChild,
|
|
8181
8042
|
args: ['form']
|
|
8182
8043
|
}] } });
|
|
8183
8044
|
|
|
8184
|
-
class
|
|
8045
|
+
class UiActionInputDialogService extends SmartdialogService {
|
|
8046
|
+
constructor(dialog, router, dialogService, inject, compLib) {
|
|
8047
|
+
super(dialog, router, dialogService, inject, compLib);
|
|
8048
|
+
this._destroy$ = new Subject();
|
|
8049
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
8050
|
+
}
|
|
8051
|
+
setDataAndOpenDialog(action, nodeName) {
|
|
8052
|
+
this.action = action;
|
|
8053
|
+
this.nodeName = nodeName;
|
|
8054
|
+
this.openDialog();
|
|
8055
|
+
}
|
|
8056
|
+
openDialog() {
|
|
8057
|
+
this.params = undefined;
|
|
8058
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
8059
|
+
const dialogData = {
|
|
8060
|
+
content: {
|
|
8061
|
+
title: '',
|
|
8062
|
+
},
|
|
8063
|
+
size: {},
|
|
8064
|
+
customComponent: UiActionInputDialogComponent,
|
|
8065
|
+
};
|
|
8066
|
+
this.createDialog(dialogData, UiActionInputDialogComponent);
|
|
8067
|
+
}
|
|
8068
|
+
async onSave(params) {
|
|
8069
|
+
this.params = params;
|
|
8070
|
+
this.onAction.complete();
|
|
8071
|
+
this.closeDialog();
|
|
8072
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
8073
|
+
}
|
|
8074
|
+
cancel() {
|
|
8075
|
+
this.onAction.complete();
|
|
8076
|
+
this.closeDialog();
|
|
8077
|
+
this.onAction = new SmartSubject(this._destroy$);
|
|
8078
|
+
}
|
|
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' }); }
|
|
8081
|
+
}
|
|
8082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionInputDialogService, decorators: [{
|
|
8083
|
+
type: Injectable,
|
|
8084
|
+
args: [{
|
|
8085
|
+
providedIn: 'root',
|
|
8086
|
+
}]
|
|
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
|
+
}] }] });
|
|
8091
|
+
|
|
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 = [];
|
|
8101
|
+
}
|
|
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));
|
|
8112
|
+
}
|
|
8113
|
+
async closeDialog() {
|
|
8114
|
+
let dialogRef = this.dialogRefs.pop();
|
|
8115
|
+
dialogRef?.close();
|
|
8116
|
+
}
|
|
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
|
+
};
|
|
8146
|
+
}
|
|
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
|
+
});
|
|
8168
|
+
}
|
|
8169
|
+
ngOnInit() { }
|
|
8170
|
+
onActionClick() {
|
|
8171
|
+
if (this.smartViewContextApiError?.customAction) {
|
|
8172
|
+
this.smartViewContextApiError.customAction();
|
|
8173
|
+
}
|
|
8174
|
+
this.service.closeDialog();
|
|
8175
|
+
}
|
|
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;
|
|
8187
|
+
}
|
|
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
|
+
}));
|
|
8206
|
+
}
|
|
8207
|
+
openErrorDialog(viewApiError) {
|
|
8208
|
+
this.viewContextErrorDialog.viewApiError = viewApiError;
|
|
8209
|
+
this.viewContextErrorDialog.openDialog();
|
|
8210
|
+
}
|
|
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 }); }
|
|
8213
|
+
}
|
|
8214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartViewContextInterceptor, decorators: [{
|
|
8215
|
+
type: Injectable
|
|
8216
|
+
}], ctorParameters: () => [{ type: SmartViewContextErrorDialogService }] });
|
|
8217
|
+
|
|
8218
|
+
class UiActionFileUploadDialogService extends SmartdialogService {
|
|
8185
8219
|
constructor(dialog, router, dialogService, inject, compLib) {
|
|
8186
8220
|
super(dialog, router, dialogService, inject, compLib);
|
|
8187
8221
|
this._destroy$ = new Subject();
|
|
@@ -8196,24 +8230,24 @@ class UiActionFileUploadDialogService extends SmartViewContextDialogService {
|
|
|
8196
8230
|
openDialog() {
|
|
8197
8231
|
this.files = undefined;
|
|
8198
8232
|
this.onAction = new SmartSubject(this._destroy$);
|
|
8199
|
-
|
|
8233
|
+
const dialogData = {
|
|
8200
8234
|
content: {
|
|
8201
8235
|
title: '',
|
|
8202
8236
|
},
|
|
8203
8237
|
size: {},
|
|
8204
8238
|
customComponent: UiActionFileUploadDialogComponent,
|
|
8205
8239
|
};
|
|
8206
|
-
this.createDialog(
|
|
8240
|
+
this.createDialog(dialogData, UiActionFileUploadDialogComponent);
|
|
8207
8241
|
}
|
|
8208
8242
|
async onSave(files) {
|
|
8209
8243
|
this.files = files;
|
|
8210
8244
|
this.onAction.complete();
|
|
8211
|
-
this.closeDialog(
|
|
8245
|
+
this.closeDialog();
|
|
8212
8246
|
this.onAction = new SmartSubject(this._destroy$);
|
|
8213
8247
|
}
|
|
8214
8248
|
cancel() {
|
|
8215
8249
|
this.onAction.complete();
|
|
8216
|
-
this.closeDialog(
|
|
8250
|
+
this.closeDialog();
|
|
8217
8251
|
this.onAction = new SmartSubject(this._destroy$);
|
|
8218
8252
|
}
|
|
8219
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 }); }
|
|
@@ -8299,11 +8333,11 @@ class UiActionFileUploadDialogComponent {
|
|
|
8299
8333
|
this.service.cancel();
|
|
8300
8334
|
}
|
|
8301
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 }); }
|
|
8302
|
-
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
|
|
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"] }] }); }
|
|
8303
8337
|
}
|
|
8304
8338
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: UiActionFileUploadDialogComponent, decorators: [{
|
|
8305
8339
|
type: Component,
|
|
8306
|
-
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
|
|
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"] }]
|
|
8307
8341
|
}], ctorParameters: () => [{ type: UiActionFileUploadDialogService, decorators: [{
|
|
8308
8342
|
type: Inject,
|
|
8309
8343
|
args: ['fileUploadDialogService']
|