@smartbit4all/ng-client 3.0.33 → 3.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/view-context/smart-view-context-dialog.service.mjs +1 -7
- package/esm2020/lib/view-context/smart-view-context.service.mjs +23 -23
- package/fesm2015/smartbit4all-ng-client.mjs +22 -28
- package/fesm2015/smartbit4all-ng-client.mjs.map +1 -1
- package/fesm2020/smartbit4all-ng-client.mjs +22 -28
- package/fesm2020/smartbit4all-ng-client.mjs.map +1 -1
- package/lib/view-context/smart-view-context-dialog.service.d.ts +0 -2
- package/package.json +1 -1
- package/smartbit4all-ng-client-3.0.35.tgz +0 -0
- package/smartbit4all-ng-client-3.0.33.tgz +0 -0
|
@@ -2500,7 +2500,6 @@ class SmartViewContextDialogService {
|
|
|
2500
2500
|
let dialogData = smartDialog;
|
|
2501
2501
|
let dialogRef = this.dialog.open(component, { data: dialogData });
|
|
2502
2502
|
dialogRef.afterClosed().subscribe((result) => {
|
|
2503
|
-
this.handleAfterClosed(result);
|
|
2504
2503
|
this.closeDialog(dialogRef, dialogData);
|
|
2505
2504
|
});
|
|
2506
2505
|
return dialogRef;
|
|
@@ -2508,7 +2507,6 @@ class SmartViewContextDialogService {
|
|
|
2508
2507
|
createDialogRef(smartDialog, component) {
|
|
2509
2508
|
const dialogRef = this.dialog.open(component, { data: smartDialog });
|
|
2510
2509
|
dialogRef.afterClosed().subscribe((result) => {
|
|
2511
|
-
this.handleAfterClosed(result);
|
|
2512
2510
|
dialogRef.close();
|
|
2513
2511
|
});
|
|
2514
2512
|
return dialogRef;
|
|
@@ -2523,10 +2521,6 @@ class SmartViewContextDialogService {
|
|
|
2523
2521
|
};
|
|
2524
2522
|
return this.createDialog(smartDialog, component);
|
|
2525
2523
|
}
|
|
2526
|
-
handleAfterClosed(result) { }
|
|
2527
|
-
openDialog() {
|
|
2528
|
-
throw new Error('openDialog function is not implemented!');
|
|
2529
|
-
}
|
|
2530
2524
|
async closeDialog(dialogRef, dialogData) {
|
|
2531
2525
|
if (dialogData?.outlets) {
|
|
2532
2526
|
await this.router.navigate([
|
|
@@ -2725,29 +2719,29 @@ class SmartViewContextService {
|
|
|
2725
2719
|
if (!viewHandler.component) {
|
|
2726
2720
|
throw new Error(`Component is undefined in SmartViewHandlerModel with name: ${view.viewName}`);
|
|
2727
2721
|
}
|
|
2728
|
-
let dialogRef = this.dialog.openComponentAsDialog(viewHandler.component, viewHandler.name);
|
|
2729
|
-
let dialogDisableClose = true;
|
|
2730
|
-
try {
|
|
2731
|
-
dialogDisableClose = this.inject.get(DIALOG_DISABLE_CLOSE);
|
|
2732
|
-
}
|
|
2733
|
-
catch {
|
|
2734
|
-
console.error('Error during reading DIALOG_DISABLE_CLOSE');
|
|
2735
|
-
}
|
|
2736
|
-
dialogRef.disableClose = dialogDisableClose;
|
|
2737
|
-
// if (view.viewName === this.messageDialogname) {
|
|
2738
|
-
// if (view.message?.options && view.message.options.length) {
|
|
2739
|
-
// }
|
|
2740
|
-
// }
|
|
2741
|
-
if (!dialogDisableClose) {
|
|
2742
|
-
dialogRef
|
|
2743
|
-
.afterClosed()
|
|
2744
|
-
.pipe(takeUntil(this._destroy$))
|
|
2745
|
-
.subscribe(() => {
|
|
2746
|
-
this.performAction(view.uuid, { code: DefaultUiActionCode_CLOSE, params: {} });
|
|
2747
|
-
});
|
|
2748
|
-
}
|
|
2749
2722
|
let refIsAlradyAdded = this.dialogRefs.some((ref) => ref.uuid === view.uuid);
|
|
2750
2723
|
if (!refIsAlradyAdded) {
|
|
2724
|
+
let dialogRef = this.dialog.openComponentAsDialog(viewHandler.component, viewHandler.name);
|
|
2725
|
+
let dialogDisableClose = true;
|
|
2726
|
+
try {
|
|
2727
|
+
dialogDisableClose = this.inject.get(DIALOG_DISABLE_CLOSE);
|
|
2728
|
+
}
|
|
2729
|
+
catch {
|
|
2730
|
+
console.error('Error during reading DIALOG_DISABLE_CLOSE');
|
|
2731
|
+
}
|
|
2732
|
+
dialogRef.disableClose = dialogDisableClose;
|
|
2733
|
+
// if (view.viewName === this.messageDialogname) {
|
|
2734
|
+
// if (view.message?.options && view.message.options.length) {
|
|
2735
|
+
// }
|
|
2736
|
+
// }
|
|
2737
|
+
if (!dialogDisableClose) {
|
|
2738
|
+
dialogRef
|
|
2739
|
+
.afterClosed()
|
|
2740
|
+
.pipe(takeUntil(this._destroy$))
|
|
2741
|
+
.subscribe(() => {
|
|
2742
|
+
this.performAction(view.uuid, { code: DefaultUiActionCode_CLOSE, params: {} });
|
|
2743
|
+
});
|
|
2744
|
+
}
|
|
2751
2745
|
this.dialogRefs.push({
|
|
2752
2746
|
uuid: view.uuid,
|
|
2753
2747
|
dialogRef,
|
|
@@ -2791,7 +2785,7 @@ class SmartViewContextService {
|
|
|
2791
2785
|
this.dialogRefs.splice(index, 1);
|
|
2792
2786
|
}
|
|
2793
2787
|
else {
|
|
2794
|
-
|
|
2788
|
+
console.log('DialogRef is not found by uuid.');
|
|
2795
2789
|
}
|
|
2796
2790
|
}
|
|
2797
2791
|
else if (view.type === ViewType.Normal) {
|