@acorex/platform 20.3.0-next.21 → 20.3.0-next.22
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/common/index.d.ts +69 -64
- package/fesm2022/acorex-platform-common-common-settings.provider-9OHien_H.mjs +47 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-9OHien_H.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +99 -77
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +7 -6
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +38 -31
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +1 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +116 -5
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/layout/entity/index.d.ts +2 -0
- package/layout/views/index.d.ts +0 -1
- package/layout/widget-core/index.d.ts +2 -1
- package/package.json +9 -9
|
@@ -14,7 +14,7 @@ import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
|
14
14
|
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
15
15
|
import * as i8 from '@acorex/platform/layout/components';
|
|
16
16
|
import { AXPComponentSlotModule, AXPThemeLayoutBlockComponent, AXPThemeLayoutActionsComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutContainerComponent, AXPThemeLayoutListComponent, AXPThemeLayoutListItemComponent, AXPThemeLayoutStartSideComponent } from '@acorex/platform/layout/components';
|
|
17
|
-
import { AXPStickyDirective, AXPHomePageService, AXPEntityCommandScope } from '@acorex/platform/common';
|
|
17
|
+
import { AXPStickyDirective, AXPHomePageService, AXPCommonSettings, AXPSettingService, AXPEntityCommandScope } from '@acorex/platform/common';
|
|
18
18
|
import * as i1 from '@acorex/cdk/drawer';
|
|
19
19
|
import { AXDrawerDirectiveModule, AXDrawerContainerDirective } from '@acorex/cdk/drawer';
|
|
20
20
|
import { AXDrawerModule } from '@acorex/components/drawer';
|
|
@@ -500,7 +500,7 @@ const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
|
|
|
500
500
|
const cache = store.renderedTabsCache();
|
|
501
501
|
return cache[pageId] || [];
|
|
502
502
|
}),
|
|
503
|
-
})), withMethods((store, evaluatorService = inject(AXPExpressionEvaluatorService), router = inject(Router), route = inject(ActivatedRoute), layout = inject(AXPLayoutThemeService), formatService = inject(AXFormatService), toastService = inject(AXToastService), translateService = inject(AXTranslationService)) => {
|
|
503
|
+
})), withMethods((store, evaluatorService = inject(AXPExpressionEvaluatorService), router = inject(Router), route = inject(ActivatedRoute), layout = inject(AXPLayoutThemeService), formatService = inject(AXFormatService), toastService = inject(AXToastService), translateService = inject(AXTranslationService), settingService = inject(AXPSettingService)) => {
|
|
504
504
|
// Effect to automatically cache current tab when it changes
|
|
505
505
|
effect(() => {
|
|
506
506
|
const currentPage = store.currentPage();
|
|
@@ -833,6 +833,7 @@ const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
|
|
|
833
833
|
status: AXPPageStatus.Submitting,
|
|
834
834
|
});
|
|
835
835
|
const result = await store.currentPage()?.execute?.(command, store.context());
|
|
836
|
+
const enableOperationToasts = await settingService.get(AXPCommonSettings.EnableOperationToasts);
|
|
836
837
|
if (result?.success) {
|
|
837
838
|
patchState(store, {
|
|
838
839
|
previousContext: store.context(),
|
|
@@ -844,27 +845,31 @@ const AXPLayoutDetailsViewViewModel = signalStore(withState(() => {
|
|
|
844
845
|
catch (error) {
|
|
845
846
|
console.error('Failed to refresh page after save', error);
|
|
846
847
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
848
|
+
if (enableOperationToasts) {
|
|
849
|
+
toastService.show({
|
|
850
|
+
color: 'success',
|
|
851
|
+
title: await translateService.translateAsync('@general:messages.generic.success.title'),
|
|
852
|
+
content: await translateService.translateAsync('@general:messages.generic.success.description'),
|
|
853
|
+
location: 'bottom-center',
|
|
854
|
+
closeButton: true,
|
|
855
|
+
timeOut: 3000,
|
|
856
|
+
timeOutProgress: true,
|
|
857
|
+
});
|
|
858
|
+
}
|
|
856
859
|
}
|
|
857
860
|
else {
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
861
|
+
if (enableOperationToasts) {
|
|
862
|
+
toastService.show({
|
|
863
|
+
color: 'danger',
|
|
864
|
+
title: await translateService.translateAsync('@general:messages.generic.error.title'),
|
|
865
|
+
content: result?.error?.message ||
|
|
866
|
+
(await translateService.translateAsync('@general:messages.generic.error.description')),
|
|
867
|
+
location: 'bottom-center',
|
|
868
|
+
closeButton: true,
|
|
869
|
+
timeOut: 3000,
|
|
870
|
+
timeOutProgress: true,
|
|
871
|
+
});
|
|
872
|
+
}
|
|
868
873
|
}
|
|
869
874
|
patchState(store, {
|
|
870
875
|
status: AXPPageStatus.Submitted,
|
|
@@ -1032,16 +1037,18 @@ class AXPLayoutDetailsViewComponent extends AXPPageLayoutBaseComponent {
|
|
|
1032
1037
|
return null;
|
|
1033
1038
|
}
|
|
1034
1039
|
}
|
|
1035
|
-
async getPageBadge() {
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
}
|
|
1040
|
+
// override async getPageBadge(): Promise<AXPBadge | null> {
|
|
1041
|
+
// if (this.vm.isDirty()) {
|
|
1042
|
+
// return {
|
|
1043
|
+
// title: await this.translateService.translateAsync('@general:terms.interface.save-status.not-saved.title'),
|
|
1044
|
+
// color: 'warning',
|
|
1045
|
+
// description: await this.translateService.translateAsync(
|
|
1046
|
+
// '@general:terms.interface.save-status.not-saved.description',
|
|
1047
|
+
// ),
|
|
1048
|
+
// };
|
|
1049
|
+
// }
|
|
1050
|
+
// return null;
|
|
1051
|
+
// }
|
|
1045
1052
|
async onBackButtonClick() {
|
|
1046
1053
|
// When back button is clicked in small layout, go back to page list
|
|
1047
1054
|
if (!this.vm.showPages()) {
|