@acorex/platform 21.0.0-next.24 → 21.0.0-next.33
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/fesm2022/acorex-platform-auth.mjs +121 -27
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-gyb6ohAE.mjs → acorex-platform-common-common-settings.provider-G9XcXXOG.mjs} +46 -4
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +677 -267
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +393 -111
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +554 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +345 -59
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-Cb6Lk4Ch.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs} +9 -9
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +3373 -872
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +169 -154
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +14645 -11533
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +244 -170
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +367 -408
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-Dnbx_uY7.mjs → acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs} +10 -10
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-B0omAUil.mjs → acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs} +30 -22
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-D-HFZHNZ.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-q30grR3z.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs +111 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-BJh1QJqp.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs} +7 -7
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component--rzP7scF.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-DHlgsHa7.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +5924 -4049
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +8 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +220 -169
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-di5w_3K2.mjs → acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs} +15 -22
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-D9NZ-6L_.mjs → acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-404.component-CgB_tlPU.mjs → acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +1667 -61
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-Cmju9l91.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-Cp5Th57U.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-BQxoUmYL.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-CTGy2kjJ.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs} +9 -9
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +231 -227
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +208 -91
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +34 -34
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +14 -2
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +189 -16
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +178 -15
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +719 -413
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +91 -42
- package/{layout/components/index.d.ts → types/acorex-platform-layout-components.d.ts} +893 -138
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +9 -3
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +515 -26
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +44 -9
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +146 -95
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +506 -98
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/{runtime/index.d.ts → types/acorex-platform-runtime.d.ts} +237 -74
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +104 -4
- package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +33 -30
- package/fesm2022/acorex-platform-common-common-settings.provider-gyb6ohAE.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-Cb6Lk4Ch.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dnbx_uY7.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-B0omAUil.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-D-HFZHNZ.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-q30grR3z.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-fcCirNxz.mjs +0 -111
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-fcCirNxz.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-BJh1QJqp.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component--rzP7scF.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-DHlgsHa7.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D_ex0nL2.mjs +0 -160
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D_ex0nL2.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BhDLyC5P.mjs +0 -1611
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BhDLyC5P.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-CgLUnYRq.mjs +0 -99
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-CgLUnYRq.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-di5w_3K2.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-D9NZ-6L_.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-CgB_tlPU.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DlUrqVmj.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DlUrqVmj.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-Cmju9l91.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-Cp5Th57U.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BQxoUmYL.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-CTGy2kjJ.mjs.map +0 -1
- /package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +0 -0
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
|
@@ -10,26 +10,27 @@ import { AXDataTableModule } from '@acorex/components/data-table';
|
|
|
10
10
|
import * as i2$1 from '@acorex/components/decorators';
|
|
11
11
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
12
12
|
import { AXDialogModule } from '@acorex/components/dialog';
|
|
13
|
-
import * as i3$
|
|
13
|
+
import * as i3$2 from '@acorex/components/drawer';
|
|
14
14
|
import { AXDrawerModule } from '@acorex/components/drawer';
|
|
15
15
|
import * as i5 from '@acorex/components/dropdown';
|
|
16
16
|
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
17
17
|
import { AXFormModule } from '@acorex/components/form';
|
|
18
18
|
import { AXLoadingModule } from '@acorex/components/loading';
|
|
19
|
+
import * as i3$1 from '@acorex/components/popover';
|
|
19
20
|
import { AXPopoverModule } from '@acorex/components/popover';
|
|
20
21
|
import * as i6 from '@acorex/components/search-box';
|
|
21
22
|
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
22
23
|
import { AXTabsModule } from '@acorex/components/tabs';
|
|
23
24
|
import { AXTooltipModule } from '@acorex/components/tooltip';
|
|
24
25
|
import * as i10 from '@acorex/core/translation';
|
|
25
|
-
import { AXTranslationModule } from '@acorex/core/translation';
|
|
26
|
+
import { AXTranslationModule, AXTranslationService, translateSync } from '@acorex/core/translation';
|
|
26
27
|
import * as i2 from '@acorex/core/utils';
|
|
27
28
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
28
29
|
import { AXPAuthModule, AXPSessionService, AXPSessionStatus, AXPAuthGuard } from '@acorex/platform/auth';
|
|
29
|
-
import { AXPRefreshEvent, AXP_PLATFORM_CONFIG_TOKEN, AXPMenuService,
|
|
30
|
-
import * as i1$
|
|
31
|
-
import { AXPDeviceService, AXPComponentSlotModule, AXPPlatformScope, AXPBroadcastEventService, AXPContextStore } from '@acorex/platform/core';
|
|
32
|
-
import { AXP_ENTITY_CONFIG_TOKEN } from '@acorex/platform/layout/entity';
|
|
30
|
+
import { AXPRefreshEvent, AXPSettingsService, AXPCommonSettings, AXP_PLATFORM_CONFIG_TOKEN, AXPMenuService, AXPMenuVisibilityService, AXPCommonModule } from '@acorex/platform/common';
|
|
31
|
+
import * as i1$3 from '@acorex/platform/core';
|
|
32
|
+
import { AXPDeviceService, AXHighlightService, AXPResolveMultiLanguageStringPipe, AXPComponentSlotModule, AXPPlatformScope, AXPBroadcastEventService, AXPContextStore } from '@acorex/platform/core';
|
|
33
|
+
import { AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY, AXPEntityDefinitionRegistryService, AXPCategoryTreeService, AXPEntityListViewColumnViewModel, AXP_ENTITY_CONFIG_TOKEN } from '@acorex/platform/layout/entity';
|
|
33
34
|
import * as i7$1 from '@acorex/platform/layout/widget-core';
|
|
34
35
|
import { AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
|
|
35
36
|
import { AXPWidgetsModule } from '@acorex/platform/layout/widgets';
|
|
@@ -38,15 +39,24 @@ import { AXPWorkflowService, ofType } from '@acorex/platform/workflow';
|
|
|
38
39
|
import * as i1$1 from '@angular/common';
|
|
39
40
|
import { CommonModule } from '@angular/common';
|
|
40
41
|
import * as i0 from '@angular/core';
|
|
41
|
-
import { inject, signal, computed, effect, ViewChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
42
|
+
import { inject, signal, computed, effect, ViewChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, input, viewChild, afterNextRender, NgModule } from '@angular/core';
|
|
42
43
|
import { FormsModule } from '@angular/forms';
|
|
43
|
-
import * as i1$
|
|
44
|
-
import { RouterModule, Router, NavigationEnd, RouteReuseStrategy, ROUTES } from '@angular/router';
|
|
44
|
+
import * as i1$4 from '@angular/router';
|
|
45
|
+
import { RouterModule, Router, ActivatedRoute, NavigationEnd, RouteReuseStrategy, ROUTES } from '@angular/router';
|
|
45
46
|
import { Subject, takeUntil, filter, firstValueFrom } from 'rxjs';
|
|
46
|
-
import * as
|
|
47
|
+
import * as i1$2 from '@acorex/core/platform';
|
|
48
|
+
import { AXPThemeLayoutBlockComponent, AXPThemeLayoutHeaderComponent, AXPThemeLayoutToolbarComponent, AXPStateMessageComponent, AXPQueryFiltersComponent, AXPQuerySortsComponent, AXPQueryViewsComponent, AXPQueryColumnsComponent, AXPThemeLayoutStartSideComponent, AXPTaskBadgeService, AXPMenuBadgeHelper, AXPTaskBadgeDirective, AXPLogoComponent } from '@acorex/platform/layout/components';
|
|
49
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
50
|
+
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
51
|
+
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
|
|
52
|
+
import * as i2$2 from '@acorex/components/skeleton';
|
|
53
|
+
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
54
|
+
import { AXTreeViewModule, AXTreeViewComponent } from '@acorex/components/tree-view';
|
|
55
|
+
import { AXPCommandService } from '@acorex/platform/runtime';
|
|
56
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
57
|
+
import { isEqual, sortBy } from 'lodash-es';
|
|
58
|
+
import * as i2$3 from '@acorex/components/side-menu';
|
|
47
59
|
import { AXSideMenuModule } from '@acorex/components/side-menu';
|
|
48
|
-
import { AXPTaskBadgeService, AXPMenuBadgeHelper, AXPTaskBadgeDirective, AXPLogoComponent } from '@acorex/platform/layout/components';
|
|
49
|
-
import { sortBy } from 'lodash-es';
|
|
50
60
|
import { AXAvatarModule } from '@acorex/components/avatar';
|
|
51
61
|
import { AXImageModule } from '@acorex/components/image';
|
|
52
62
|
import * as i4$1 from '@acorex/components/menu';
|
|
@@ -61,8 +71,8 @@ class AXPEntityDetailListViewComponent {
|
|
|
61
71
|
this.workflow = inject(AXPWorkflowService);
|
|
62
72
|
this.store = inject(AXPLayoutThemeService);
|
|
63
73
|
this.deviceService = inject(AXPDeviceService);
|
|
64
|
-
this.toolbarPrimaryActions = signal([], ...(ngDevMode ? [{ debugName: "toolbarPrimaryActions" }] : []));
|
|
65
|
-
this.toolbarSecondaryActions = signal([], ...(ngDevMode ? [{ debugName: "toolbarSecondaryActions" }] : []));
|
|
74
|
+
this.toolbarPrimaryActions = signal([], ...(ngDevMode ? [{ debugName: "toolbarPrimaryActions" }] : /* istanbul ignore next */ []));
|
|
75
|
+
this.toolbarSecondaryActions = signal([], ...(ngDevMode ? [{ debugName: "toolbarSecondaryActions" }] : /* istanbul ignore next */ []));
|
|
66
76
|
this.destroyed = new Subject();
|
|
67
77
|
this.dropdownRowItems = computed(() => {
|
|
68
78
|
return this.vm.secondaryRowActions().map((c) => ({
|
|
@@ -71,7 +81,7 @@ class AXPEntityDetailListViewComponent {
|
|
|
71
81
|
text: c.title,
|
|
72
82
|
color: c.color,
|
|
73
83
|
}));
|
|
74
|
-
}, ...(ngDevMode ? [{ debugName: "dropdownRowItems" }] : []));
|
|
84
|
+
}, ...(ngDevMode ? [{ debugName: "dropdownRowItems" }] : /* istanbul ignore next */ []));
|
|
75
85
|
this.commandRowItems = computed(() => {
|
|
76
86
|
return this.vm.primaryRowActions().map((c) => {
|
|
77
87
|
return {
|
|
@@ -81,7 +91,7 @@ class AXPEntityDetailListViewComponent {
|
|
|
81
91
|
color: c.color,
|
|
82
92
|
};
|
|
83
93
|
});
|
|
84
|
-
}, ...(ngDevMode ? [{ debugName: "commandRowItems" }] : []));
|
|
94
|
+
}, ...(ngDevMode ? [{ debugName: "commandRowItems" }] : /* istanbul ignore next */ []));
|
|
85
95
|
this.getCommandRowItems = () => {
|
|
86
96
|
return this.commandRowItems();
|
|
87
97
|
};
|
|
@@ -149,12 +159,12 @@ class AXPEntityDetailListViewComponent {
|
|
|
149
159
|
ngOnDestroy() {
|
|
150
160
|
this.destroy();
|
|
151
161
|
}
|
|
152
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
153
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailListViewComponent, deps: [{ token: i1.AXActionSheetService }, { token: i2.AXUnsubscriber }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
163
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityDetailListViewComponent, isStandalone: true, selector: "axp-entity-detail-list-view", inputs: { vm: ["viewModel", "vm"] }, providers: [AXUnsubscriber], viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"ax-flex ax-p-2\">\n <div class=\"ax-flex ax-flex-col ax-items-end ax-gap-3 ax-flex-1 ax-overflow-auto ax-min-h-72\">\n <div class=\"ax-flex ax-justify-between ax-items-center ax-w-full\">\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <div class=\"ax-flex ax-justify-start ax-items-center ax-gap-4\">\n @if (vm.hasSelectedItems()) {\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-h-10\">\n <span class=\"ax-text-xl ax-font-bold\">\n {{ vm.selectedItems().length }}\n {{ '@general:terms.items-selected' | translate | async }}\n </span>\n <span\n (click)=\"vm.clearSelection()\"\n class=\"ax-text-sm ax-text-primary-500 ax-underline ax-cursor-pointer\"\n >{{ '@general:actions.unselect.title' | translate | async }}</span\n >\n </div>\n } @else {\n @if (vm.hasInlineFilters() && !deviceService.isSmall()) {\n <div class=\"ax-w-72\">\n <ax-search-box\n [placeholder]=\"\n ('@general:widgets.lookup.search' | translate | async) + vm.inlineFiltersPlaceholders().join(', ')\n \"\n (onValueChanged)=\"handleChangeSearchValue($event)\"\n ><ax-clear-button></ax-clear-button\n ></ax-search-box>\n </div>\n }\n }\n </div>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-3\">\n @for (tr of toolbarPrimaryActions(); track $index) {\n <ax-button\n [text]=\"(tr.title | translate | async)!\"\n [color]=\"tr.color\"\n [disabled]=\"tr.disabled\"\n (onClick)=\"vm.executeCommand(tr.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"tr.icon\"> </ax-icon>\n </ax-prefix>\n </ax-button>\n }\n @if (toolbarSecondaryActions().length) {\n <ax-button\n [text]=\"deviceService.isSmall() ? null : ('@general:terms.interface.actions' | translate | async)\"\n [color]=\"'default'\"\n >\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for (tr of toolbarSecondaryActions(); track $index) {\n <ng-container>\n @if (tr.separated && !$first) {\n <ax-divider></ax-divider>\n }\n <ax-button-item\n [text]=\"(tr.title | translate | async)!\"\n class=\"ax-font-semibold ax-text-{{ tr.color }}\"\n (onClick)=\"vm.executeCommand(tr.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"tr.icon\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ng-container>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n </div>\n </div>\n\n <div class=\"ax-flex ax-flex-1 ax-pt-0 ax-overflow-auto ax-max-w-full\">\n <ax-data-table\n #grid\n [showFooter]=\"false\"\n class=\"ax-flex-1\"\n [paging]=\"true\"\n [fetchDataMode]=\"'manual'\"\n [parentField]=\"vm.parentKey()\"\n [loading]=\"{ enabled: true, animation: true }\"\n [dataSource]=\"vm.dataSource\"\n (selectedRowsChange)=\"handleSelectedRowsChange($event)\"\n (onRowDbClick)=\"handleRowDbClick($event)\"\n >\n <ax-index-column fixed=\"start\" [width]=\"'80px'\" [padZero]=\"true\"></ax-index-column>\n @if (vm.selectedScopeActionsCount()) {\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n }\n @for (col of vm.columns(); track col.name) {\n @if (col.visible) {\n <axp-widget-column-renderer\n [expandHandler]=\"$index === 0 && vm.parentKey() ? true : false\"\n [caption]=\"(col.title | translate | async)!\"\n [node]=\"col.node()\"\n ></axp-widget-column-renderer>\n }\n }\n @if (getCommandRowItems().length) {\n <ax-command-column\n fixed=\"end\"\n [width]=\"getCommandRowItems().length * 60 + 'px'\"\n [items]=\"getCommandRowItems()\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-command-column>\n }\n @if (dropdownRowItems().length) {\n <ax-dropdown-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-dropdown-command-column>\n }\n </ax-data-table>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i5.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXActionSheetModule }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "ngmodule", type: AXDialogModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i7.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "title", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i7.AXRowIndexColumnComponent, selector: "ax-index-column", inputs: ["width", "caption", "fixed", "footerTemplate", "padZero"] }, { kind: "component", type: i7.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed"] }, { kind: "component", type: i7.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i7.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "emptyStateTemplate", "emptyStateText", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type:
|
|
154
164
|
//
|
|
155
165
|
AXPWidgetCoreModule }, { kind: "component", type: i7$1.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXPWidgetsModule }, { kind: "ngmodule", type: AXPAuthModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
156
166
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailListViewComponent, decorators: [{
|
|
158
168
|
type: Component,
|
|
159
169
|
args: [{ selector: 'axp-entity-detail-list-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [AXUnsubscriber], imports: [
|
|
160
170
|
CommonModule,
|
|
@@ -189,13 +199,1609 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
189
199
|
args: ['grid', { static: true }]
|
|
190
200
|
}] } });
|
|
191
201
|
|
|
202
|
+
//#region ---- Constants ----
|
|
203
|
+
const ROOT_NODE_ID = 'all';
|
|
204
|
+
const LOADING_DELAY_MS = 300;
|
|
205
|
+
const DEFAULT_TEXT_FIELD = 'title';
|
|
206
|
+
const DEFAULT_VALUE_FIELD = 'id';
|
|
207
|
+
//#endregion
|
|
208
|
+
class AXPEntityCategoryComponent {
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region ---- Constructor & Lifecycle ----
|
|
211
|
+
constructor() {
|
|
212
|
+
//#region ---- Services & Dependencies ----
|
|
213
|
+
/** i18n key for the synthetic "all items" root row; resolved in the template with the translate pipe. */
|
|
214
|
+
this.categoryTreeRootTitleI18nKey = AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY;
|
|
215
|
+
this.translate = inject(AXTranslationService);
|
|
216
|
+
this.workflow = inject(AXPWorkflowService);
|
|
217
|
+
this.commandService = inject(AXPCommandService);
|
|
218
|
+
this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
|
|
219
|
+
this.categoryTreeService = inject(AXPCategoryTreeService);
|
|
220
|
+
this.highlightService = inject(AXHighlightService);
|
|
221
|
+
//#endregion
|
|
222
|
+
//#region ---- Component Inputs & View Queries ----
|
|
223
|
+
this.vm = input.required(...(ngDevMode ? [{ debugName: "vm" }] : /* istanbul ignore next */ []));
|
|
224
|
+
this.tree = viewChild('tree', ...(ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []));
|
|
225
|
+
this.searchValue = input('', ...(ngDevMode ? [{ debugName: "searchValue" }] : /* istanbul ignore next */ []));
|
|
226
|
+
// Tree view inputs with defaults
|
|
227
|
+
this.selectMode = input('single', ...(ngDevMode ? [{ debugName: "selectMode" }] : /* istanbul ignore next */ []));
|
|
228
|
+
this.selectionBehavior = input('intermediate', ...(ngDevMode ? [{ debugName: "selectionBehavior" }] : /* istanbul ignore next */ []));
|
|
229
|
+
this.dragArea = input('handler', ...(ngDevMode ? [{ debugName: "dragArea" }] : /* istanbul ignore next */ []));
|
|
230
|
+
this.dragBehavior = input('none', ...(ngDevMode ? [{ debugName: "dragBehavior" }] : /* istanbul ignore next */ []));
|
|
231
|
+
this.showIcons = input(true, ...(ngDevMode ? [{ debugName: "showIcons" }] : /* istanbul ignore next */ []));
|
|
232
|
+
this.showChildrenBadge = input(false, ...(ngDevMode ? [{ debugName: "showChildrenBadge" }] : /* istanbul ignore next */ []));
|
|
233
|
+
this.expandedIcon = input('fa-solid fa-chevron-down', ...(ngDevMode ? [{ debugName: "expandedIcon" }] : /* istanbul ignore next */ []));
|
|
234
|
+
this.collapsedIcon = input('fa-solid fa-chevron-right', ...(ngDevMode ? [{ debugName: "collapsedIcon" }] : /* istanbul ignore next */ []));
|
|
235
|
+
this.indentSize = input(16, ...(ngDevMode ? [{ debugName: "indentSize" }] : /* istanbul ignore next */ []));
|
|
236
|
+
this.look = input('default', ...(ngDevMode ? [{ debugName: "look" }] : /* istanbul ignore next */ []));
|
|
237
|
+
this.searchWithChildren = input(true, ...(ngDevMode ? [{ debugName: "searchWithChildren" }] : /* istanbul ignore next */ [])); // Include children of search results
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region ---- Component State ----
|
|
240
|
+
this.isLoading = signal(true, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
241
|
+
this.isSearching = signal(false, ...(ngDevMode ? [{ debugName: "isSearching" }] : /* istanbul ignore next */ []));
|
|
242
|
+
this.searchResultCount = signal(0, ...(ngDevMode ? [{ debugName: "searchResultCount" }] : /* istanbul ignore next */ []));
|
|
243
|
+
this.currentSearchValue = signal('', ...(ngDevMode ? [{ debugName: "currentSearchValue" }] : /* istanbul ignore next */ []));
|
|
244
|
+
this.resultsFoundText = signal('', ...(ngDevMode ? [{ debugName: "resultsFoundText" }] : /* istanbul ignore next */ []));
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region ---- Private Properties ----
|
|
247
|
+
this.loadingTimeoutId = null;
|
|
248
|
+
this.treeData = null;
|
|
249
|
+
this.treeConfig = null;
|
|
250
|
+
this.matchingNodeIds = new Set();
|
|
251
|
+
this.relevantNodeIds = new Set(); // For search filtering
|
|
252
|
+
this.nodeDataCache = new Map(); // Cache parent data from search results
|
|
253
|
+
this.expandedNodesBeforeSearch = [];
|
|
254
|
+
this.nodesExpandedDuringSearch = [];
|
|
255
|
+
this.currentSearchTerm = null;
|
|
256
|
+
//#endregion
|
|
257
|
+
//#region ---- Computed Properties ----
|
|
258
|
+
this.textField = computed(() => this.vm().entityDef.category?.textField || DEFAULT_TEXT_FIELD, ...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
|
|
259
|
+
this.valueField = computed(() => this.vm().entityDef.category?.valueField || DEFAULT_VALUE_FIELD, ...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
|
|
260
|
+
/** When true, add/edit/delete category actions are hidden (from category plugin readonly option). */
|
|
261
|
+
this.categoryReadonly = computed(() => this.vm().entityDef?.extensions?.category?.readonly === true, ...(ngDevMode ? [{ debugName: "categoryReadonly" }] : /* istanbul ignore next */ []));
|
|
262
|
+
/**
|
|
263
|
+
* Computed property to check if we should show the "no search results" empty state.
|
|
264
|
+
* Returns true when search is active, not searching, and no results found.
|
|
265
|
+
*/
|
|
266
|
+
this.showNoSearchResults = computed(() => {
|
|
267
|
+
const searchValue = this.currentSearchValue().trim();
|
|
268
|
+
const isSearching = this.isSearching();
|
|
269
|
+
const resultCount = this.searchResultCount();
|
|
270
|
+
return searchValue.length > 0 && !isSearching && resultCount === 0;
|
|
271
|
+
}, ...(ngDevMode ? [{ debugName: "showNoSearchResults" }] : /* istanbul ignore next */ []));
|
|
272
|
+
this.categoryEntityKey = computed(() => {
|
|
273
|
+
const key = this.vm().entityDef.category?.entity;
|
|
274
|
+
if (!key) {
|
|
275
|
+
throw new Error('Category entity is not configured');
|
|
276
|
+
}
|
|
277
|
+
return key;
|
|
278
|
+
}, ...(ngDevMode ? [{ debugName: "categoryEntityKey" }] : /* istanbul ignore next */ []));
|
|
279
|
+
// protected toggleExpand(e: AXTreeViewNodeDoubleClickEvent) {
|
|
280
|
+
// (e.component as AXTreeViewComponent).toggleNodeExpansion(String(e.node[this.valueField()] ?? ''));
|
|
281
|
+
// }
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region ---- Tree Data Source ----
|
|
284
|
+
/**
|
|
285
|
+
* Datasource callback for tree-view component.
|
|
286
|
+
* Provides lazy loading support for tree nodes.
|
|
287
|
+
*/
|
|
288
|
+
this.datasource = async (parentId) => {
|
|
289
|
+
if (!this.isTreeInitialized()) {
|
|
290
|
+
return [];
|
|
291
|
+
}
|
|
292
|
+
// Load root nodes if no parent ID provided
|
|
293
|
+
if (!parentId) {
|
|
294
|
+
return await this.loadRootNodes();
|
|
295
|
+
}
|
|
296
|
+
// Load children for the specified parent
|
|
297
|
+
return await this.loadChildNodes(parentId);
|
|
298
|
+
};
|
|
299
|
+
afterNextRender(() => {
|
|
300
|
+
this.initializeTree();
|
|
301
|
+
});
|
|
302
|
+
this.workflow.events$
|
|
303
|
+
.pipe(ofType(AXPRefreshEvent))
|
|
304
|
+
.pipe(takeUntilDestroyed())
|
|
305
|
+
.subscribe((event) => {
|
|
306
|
+
this.tree()?.reloadData();
|
|
307
|
+
// this.tree()?.refresh();
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region ---- Public Methods ----
|
|
312
|
+
/**
|
|
313
|
+
* Handles category search input changes - Uses server-side search for efficiency and reliability
|
|
314
|
+
*/
|
|
315
|
+
async handleCategorySearchChange(event) {
|
|
316
|
+
if (!this.isTreeInitialized()) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
const searchTerm = (event.value ?? '').trim().toLowerCase();
|
|
320
|
+
const previousSearchTerm = this.currentSearchValue();
|
|
321
|
+
// If search is cleared, reset tree
|
|
322
|
+
if (!searchTerm) {
|
|
323
|
+
if (previousSearchTerm || this.matchingNodeIds.size > 0) {
|
|
324
|
+
this.currentSearchValue.set('');
|
|
325
|
+
this.currentSearchTerm = null;
|
|
326
|
+
await this.resetSearch();
|
|
327
|
+
}
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
// For non-empty search, only process user interactions
|
|
331
|
+
if (!event.isUserInteraction) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
// Prevent concurrent searches
|
|
335
|
+
if (this.isSearching() && this.currentSearchTerm !== null) {
|
|
336
|
+
if (this.currentSearchTerm === searchTerm) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
this.currentSearchValue.set(event.value ?? '');
|
|
341
|
+
this.currentSearchTerm = searchTerm;
|
|
342
|
+
const treeComponent = this.tree();
|
|
343
|
+
if (!treeComponent) {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
// Store expanded nodes before starting a new search (only on first search)
|
|
347
|
+
if (!previousSearchTerm && this.expandedNodesBeforeSearch.length === 0) {
|
|
348
|
+
const expandedNodes = treeComponent.getExpandedNodes();
|
|
349
|
+
this.expandedNodesBeforeSearch = expandedNodes
|
|
350
|
+
.map((node) => String(node['id'] ?? ''))
|
|
351
|
+
.filter((id) => id && id !== ROOT_NODE_ID);
|
|
352
|
+
}
|
|
353
|
+
// Collapse nodes from previous search before starting new search
|
|
354
|
+
if (previousSearchTerm && this.nodesExpandedDuringSearch.length > 0) {
|
|
355
|
+
const nodesToCollapse = [...this.nodesExpandedDuringSearch].reverse();
|
|
356
|
+
this.nodesExpandedDuringSearch = [];
|
|
357
|
+
for (const nodeId of nodesToCollapse) {
|
|
358
|
+
// Only collapse if it wasn't originally expanded before search
|
|
359
|
+
if (!this.expandedNodesBeforeSearch.includes(nodeId)) {
|
|
360
|
+
try {
|
|
361
|
+
treeComponent.collapseNode(nodeId);
|
|
362
|
+
}
|
|
363
|
+
catch {
|
|
364
|
+
// Node might not exist anymore, ignore
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
this.isSearching.set(true);
|
|
370
|
+
try {
|
|
371
|
+
// Step 1: Use server-side search to get matching items
|
|
372
|
+
const searchResults = await this.categoryTreeService.searchCategories(searchTerm, this.treeData, this.treeConfig);
|
|
373
|
+
// Check if search term changed during the API call
|
|
374
|
+
if (this.currentSearchTerm !== searchTerm) {
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
if (!searchResults || searchResults.length === 0) {
|
|
378
|
+
this.matchingNodeIds.clear();
|
|
379
|
+
this.relevantNodeIds.clear();
|
|
380
|
+
this.searchResultCount.set(0);
|
|
381
|
+
await this.updateTranslatedMessages(0);
|
|
382
|
+
// Clear highlighting and reload tree to show all nodes
|
|
383
|
+
this.highlightService.clear();
|
|
384
|
+
await treeComponent.reloadData();
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
// Store matching node IDs from search results
|
|
388
|
+
this.matchingNodeIds.clear();
|
|
389
|
+
const valueField = this.valueField();
|
|
390
|
+
searchResults.forEach((item) => {
|
|
391
|
+
const nodeId = String(item[valueField] ?? '');
|
|
392
|
+
if (nodeId) {
|
|
393
|
+
this.matchingNodeIds.add(nodeId);
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
const resultCount = searchResults.length;
|
|
397
|
+
this.searchResultCount.set(resultCount);
|
|
398
|
+
// Update translated messages
|
|
399
|
+
await this.updateTranslatedMessages(resultCount);
|
|
400
|
+
// Step 2: Collect parent IDs (builds relevantNodeIds for filtering)
|
|
401
|
+
const parentsToExpand = await this.collectParentIds(searchResults);
|
|
402
|
+
// Step 2.5: Collect children IDs if searchWithChildren is enabled
|
|
403
|
+
if (this.searchWithChildren()) {
|
|
404
|
+
await this.collectChildrenIds(searchResults);
|
|
405
|
+
}
|
|
406
|
+
// Step 3: Reload tree to apply filtering
|
|
407
|
+
await treeComponent.reloadData();
|
|
408
|
+
// Step 4: Expand root node
|
|
409
|
+
if (!treeComponent.isNodeExpanded(ROOT_NODE_ID)) {
|
|
410
|
+
try {
|
|
411
|
+
await treeComponent.expandNode(ROOT_NODE_ID);
|
|
412
|
+
this.nodesExpandedDuringSearch.push(ROOT_NODE_ID);
|
|
413
|
+
}
|
|
414
|
+
catch {
|
|
415
|
+
// Root might not exist
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
// Step 4: Expand all parent nodes in order (from root to leaves)
|
|
419
|
+
// Sort parents by their depth to expand in correct order
|
|
420
|
+
const sortedParents = await this.sortParentsByDepth(Array.from(parentsToExpand));
|
|
421
|
+
for (const parentId of sortedParents) {
|
|
422
|
+
// Only expand if not already expanded
|
|
423
|
+
if (!treeComponent.isNodeExpanded(parentId)) {
|
|
424
|
+
try {
|
|
425
|
+
await treeComponent.expandNode(parentId);
|
|
426
|
+
this.nodesExpandedDuringSearch.push(parentId);
|
|
427
|
+
// Small delay to prevent overwhelming the tree component
|
|
428
|
+
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
429
|
+
}
|
|
430
|
+
catch {
|
|
431
|
+
// Node might not exist, ignore
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
// Step 5: Apply highlighting after tree is rendered
|
|
436
|
+
// Use setTimeout to ensure DOM is updated after tree reload
|
|
437
|
+
setTimeout(() => {
|
|
438
|
+
if (this.currentSearchValue().trim()) {
|
|
439
|
+
this.highlightService.highlight('ax-tree-view .ax-truncate', this.currentSearchValue().trim());
|
|
440
|
+
}
|
|
441
|
+
}, 100);
|
|
442
|
+
}
|
|
443
|
+
catch (error) {
|
|
444
|
+
console.error('Error searching categories:', error);
|
|
445
|
+
this.matchingNodeIds.clear();
|
|
446
|
+
this.relevantNodeIds.clear();
|
|
447
|
+
this.searchResultCount.set(0);
|
|
448
|
+
this.highlightService.clear();
|
|
449
|
+
// Reload tree to clear any filters
|
|
450
|
+
const treeComponent = this.tree();
|
|
451
|
+
if (treeComponent) {
|
|
452
|
+
await treeComponent.reloadData();
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
finally {
|
|
456
|
+
if (this.currentSearchTerm === searchTerm) {
|
|
457
|
+
this.currentSearchTerm = null;
|
|
458
|
+
}
|
|
459
|
+
this.isSearching.set(false);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Collects all parent IDs for the given search results
|
|
464
|
+
* Handles both nested 'parent' object and 'parentId' field in search results
|
|
465
|
+
* Recursively fetches parent nodes to build the full parent chain
|
|
466
|
+
*/
|
|
467
|
+
async collectParentIds(items) {
|
|
468
|
+
const parentsToExpand = new Set();
|
|
469
|
+
const valueField = this.valueField();
|
|
470
|
+
const parentKey = this.treeData?.categoryEntityDef?.parentKey || 'parentId';
|
|
471
|
+
// Build relevantNodeIds = matching nodes + all parents
|
|
472
|
+
this.relevantNodeIds.clear();
|
|
473
|
+
this.matchingNodeIds.forEach((id) => this.relevantNodeIds.add(id));
|
|
474
|
+
// Recursively extract all parent IDs
|
|
475
|
+
const extractParentIds = async (item) => {
|
|
476
|
+
// First, try to get parent from nested 'parent' object (if available)
|
|
477
|
+
const parent = item['parent'];
|
|
478
|
+
if (parent) {
|
|
479
|
+
const parentId = String(parent[valueField] ?? parent['id'] ?? '');
|
|
480
|
+
if (parentId && parentId !== ROOT_NODE_ID) {
|
|
481
|
+
parentsToExpand.add(parentId);
|
|
482
|
+
this.relevantNodeIds.add(parentId); // Add to filter set
|
|
483
|
+
this.nodeDataCache.set(parentId, parent);
|
|
484
|
+
await extractParentIds(parent);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
// Fallback: use parentId field and fetch parent from server
|
|
489
|
+
// Try both parentKey from entity definition and common 'parentId' field
|
|
490
|
+
const parentIdValue = item[parentKey] ?? item['parentId'];
|
|
491
|
+
if (parentIdValue) {
|
|
492
|
+
const parentId = String(parentIdValue);
|
|
493
|
+
if (parentId && parentId !== ROOT_NODE_ID) {
|
|
494
|
+
// Add to sets first
|
|
495
|
+
parentsToExpand.add(parentId);
|
|
496
|
+
this.relevantNodeIds.add(parentId);
|
|
497
|
+
// Fetch parent from server if not already cached
|
|
498
|
+
if (!this.nodeDataCache.has(parentId)) {
|
|
499
|
+
const parentItem = await this.fetchItemById(parentId);
|
|
500
|
+
if (parentItem) {
|
|
501
|
+
this.nodeDataCache.set(parentId, parentItem);
|
|
502
|
+
// Recursively fetch parent's parent
|
|
503
|
+
await extractParentIds(parentItem);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
// Parent already in cache, recursively process it
|
|
508
|
+
const cachedParent = this.nodeDataCache.get(parentId);
|
|
509
|
+
if (cachedParent) {
|
|
510
|
+
await extractParentIds(cachedParent);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
// Process all items
|
|
518
|
+
for (const item of items) {
|
|
519
|
+
await extractParentIds(item);
|
|
520
|
+
}
|
|
521
|
+
return parentsToExpand;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* Collects children IDs for matching search results recursively
|
|
525
|
+
* Adds all descendants (children, grandchildren, etc.) to relevantNodeIds so they appear in the filtered tree
|
|
526
|
+
*/
|
|
527
|
+
async collectChildrenIds(items) {
|
|
528
|
+
if (!this.treeData?.categoryEntityQueryFunc || !this.treeConfig) {
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
const valueField = this.valueField();
|
|
532
|
+
const parentKey = this.treeData.categoryEntityDef?.parentKey;
|
|
533
|
+
if (!parentKey) {
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
// For each matching node, recursively fetch all its descendants
|
|
537
|
+
for (const item of items) {
|
|
538
|
+
const nodeId = String(item[valueField] ?? '');
|
|
539
|
+
if (!nodeId || nodeId === ROOT_NODE_ID) {
|
|
540
|
+
continue;
|
|
541
|
+
}
|
|
542
|
+
await this.collectChildrenRecursively(nodeId, valueField, parentKey);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Recursively collects all descendant IDs for a given node
|
|
547
|
+
*/
|
|
548
|
+
async collectChildrenRecursively(nodeId, valueField, parentKey) {
|
|
549
|
+
if (!this.treeData?.categoryEntityQueryFunc) {
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
try {
|
|
553
|
+
// Fetch children for this node
|
|
554
|
+
const event = {
|
|
555
|
+
...this.treeData.basicQueryEvent,
|
|
556
|
+
filter: {
|
|
557
|
+
field: parentKey,
|
|
558
|
+
value: nodeId,
|
|
559
|
+
operator: { type: 'equal' },
|
|
560
|
+
},
|
|
561
|
+
};
|
|
562
|
+
const res = await this.treeData.categoryEntityQueryFunc(event);
|
|
563
|
+
if (res?.items && res.items.length > 0) {
|
|
564
|
+
// Add children IDs to relevantNodeIds so they appear in filtered tree
|
|
565
|
+
for (const child of res.items) {
|
|
566
|
+
const childId = String(child[valueField] ?? '');
|
|
567
|
+
if (childId && childId !== ROOT_NODE_ID) {
|
|
568
|
+
this.relevantNodeIds.add(childId);
|
|
569
|
+
// Cache child data
|
|
570
|
+
this.nodeDataCache.set(childId, child);
|
|
571
|
+
// Recursively fetch children of this child
|
|
572
|
+
await this.collectChildrenRecursively(childId, valueField, parentKey);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
catch (error) {
|
|
578
|
+
console.error(`Error fetching children for node ${nodeId}:`, error);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Fetches a single item by ID from the server
|
|
583
|
+
*/
|
|
584
|
+
async fetchItemById(id) {
|
|
585
|
+
if (!this.treeData?.categoryEntityQueryFunc) {
|
|
586
|
+
return null;
|
|
587
|
+
}
|
|
588
|
+
try {
|
|
589
|
+
const valueField = this.valueField();
|
|
590
|
+
const event = {
|
|
591
|
+
...this.treeData.basicQueryEvent,
|
|
592
|
+
filter: {
|
|
593
|
+
field: valueField,
|
|
594
|
+
value: id,
|
|
595
|
+
operator: { type: 'equal' },
|
|
596
|
+
},
|
|
597
|
+
};
|
|
598
|
+
const res = await this.treeData.categoryEntityQueryFunc(event);
|
|
599
|
+
return res?.items?.[0] ?? null;
|
|
600
|
+
}
|
|
601
|
+
catch (error) {
|
|
602
|
+
console.error('Error fetching item by ID:', error);
|
|
603
|
+
return null;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Sorts parent IDs by their depth (root first, leaves last)
|
|
608
|
+
* Uses cached data from collectParentIds
|
|
609
|
+
*/
|
|
610
|
+
async sortParentsByDepth(parentIds) {
|
|
611
|
+
const parentKey = this.treeData?.categoryEntityDef?.parentKey;
|
|
612
|
+
if (!parentKey || parentIds.length === 0) {
|
|
613
|
+
return parentIds;
|
|
614
|
+
}
|
|
615
|
+
// Build depth map using cached data
|
|
616
|
+
const depthMap = new Map();
|
|
617
|
+
for (const parentId of parentIds) {
|
|
618
|
+
if (depthMap.has(parentId)) {
|
|
619
|
+
continue;
|
|
620
|
+
}
|
|
621
|
+
let depth = 0;
|
|
622
|
+
let currentId = parentId;
|
|
623
|
+
const visited = new Set();
|
|
624
|
+
while (currentId && currentId !== ROOT_NODE_ID && !visited.has(currentId)) {
|
|
625
|
+
visited.add(currentId);
|
|
626
|
+
depth++;
|
|
627
|
+
// Use nodeDataCache which was populated by collectParentIds
|
|
628
|
+
const item = this.nodeDataCache.get(currentId);
|
|
629
|
+
if (item) {
|
|
630
|
+
currentId = item[parentKey] ? String(item[parentKey]) : null;
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
break;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
depthMap.set(parentId, depth);
|
|
637
|
+
}
|
|
638
|
+
// Sort by depth (lower depth = closer to root = expand first)
|
|
639
|
+
return parentIds.sort((a, b) => {
|
|
640
|
+
const depthA = depthMap.get(a) ?? 0;
|
|
641
|
+
const depthB = depthMap.get(b) ?? 0;
|
|
642
|
+
return depthA - depthB;
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Updates translated messages for search results
|
|
647
|
+
*/
|
|
648
|
+
async updateTranslatedMessages(resultCount) {
|
|
649
|
+
if (resultCount > 0) {
|
|
650
|
+
const key = resultCount === 1
|
|
651
|
+
? '@general:terms.interface.category.search.results-found.singular'
|
|
652
|
+
: '@general:terms.interface.category.search.results-found.plural';
|
|
653
|
+
const text = await this.translate.translateAsync(key, { params: { count: resultCount } });
|
|
654
|
+
this.resultsFoundText.set(text);
|
|
655
|
+
}
|
|
656
|
+
else {
|
|
657
|
+
this.resultsFoundText.set('');
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Resets search state and restores tree to original expanded state
|
|
662
|
+
*/
|
|
663
|
+
async resetSearch() {
|
|
664
|
+
this.searchResultCount.set(0);
|
|
665
|
+
this.resultsFoundText.set('');
|
|
666
|
+
this.currentSearchTerm = null;
|
|
667
|
+
this.isSearching.set(false);
|
|
668
|
+
this.matchingNodeIds.clear();
|
|
669
|
+
this.relevantNodeIds.clear();
|
|
670
|
+
this.nodeDataCache.clear();
|
|
671
|
+
// Clear highlighting
|
|
672
|
+
this.highlightService.clear();
|
|
673
|
+
const treeComponent = this.tree();
|
|
674
|
+
if (!treeComponent) {
|
|
675
|
+
this.expandedNodesBeforeSearch = [];
|
|
676
|
+
this.nodesExpandedDuringSearch = [];
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
// Reload tree to show all nodes (no filtering)
|
|
680
|
+
await treeComponent.reloadData();
|
|
681
|
+
// Collapse nodes that were expanded during search (in reverse order - leaves first)
|
|
682
|
+
const nodesToCollapse = [...this.nodesExpandedDuringSearch].reverse();
|
|
683
|
+
this.nodesExpandedDuringSearch = [];
|
|
684
|
+
for (const nodeId of nodesToCollapse) {
|
|
685
|
+
// Only collapse if it wasn't originally expanded before search
|
|
686
|
+
if (!this.expandedNodesBeforeSearch.includes(nodeId)) {
|
|
687
|
+
try {
|
|
688
|
+
treeComponent.collapseNode(nodeId);
|
|
689
|
+
}
|
|
690
|
+
catch {
|
|
691
|
+
// Node might not exist anymore, ignore
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
// Clear the stored expanded nodes
|
|
696
|
+
this.expandedNodesBeforeSearch = [];
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* Checks if a node matches the current search term
|
|
700
|
+
*/
|
|
701
|
+
isMatchingNode(nodeId) {
|
|
702
|
+
return this.matchingNodeIds.has(nodeId);
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Handles node click events to apply category filters and track selected category for create command
|
|
706
|
+
*/
|
|
707
|
+
handleNodeClick(node) {
|
|
708
|
+
const nodeData = this.extractNodeData(node);
|
|
709
|
+
const applyConditions = this.vm().entityDef.category?.applyConditions || [];
|
|
710
|
+
const valueField = this.valueField();
|
|
711
|
+
const textField = this.textField();
|
|
712
|
+
const nodeId = String(nodeData[valueField] ?? node['id'] ?? '');
|
|
713
|
+
// Track selected category for default category when creating new entities
|
|
714
|
+
if (nodeId === 'all' || !nodeId) {
|
|
715
|
+
this.vm().setSelectedCategory(null);
|
|
716
|
+
}
|
|
717
|
+
else {
|
|
718
|
+
this.vm().setSelectedCategory({
|
|
719
|
+
id: nodeId,
|
|
720
|
+
title: String(nodeData[textField] ?? node['title'] ?? ''),
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
const categoryFilters = this.buildCategoryFilters(nodeData, applyConditions);
|
|
724
|
+
const viewFilters = this.buildViewFilters();
|
|
725
|
+
this.vm().dataSource.filter({
|
|
726
|
+
filters: [...viewFilters, ...categoryFilters],
|
|
727
|
+
logic: 'and',
|
|
728
|
+
});
|
|
729
|
+
this.vm().dataSource.refresh();
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Handles node toggle events (expansion/collapse)
|
|
733
|
+
*/
|
|
734
|
+
async onNodeToggle(_event) {
|
|
735
|
+
// Tree component handles lazy loading via datasource callback
|
|
736
|
+
}
|
|
737
|
+
//#endregion
|
|
738
|
+
//#region ---- CRUD Operations ----
|
|
739
|
+
/**
|
|
740
|
+
* Creates a new root category node (uses Entity:Create command).
|
|
741
|
+
*/
|
|
742
|
+
async handleCreateRootClick(event) {
|
|
743
|
+
this.preventDefaultAndStopPropagation(event);
|
|
744
|
+
try {
|
|
745
|
+
const result = await this.executeCreateCommand(undefined);
|
|
746
|
+
await this.applyCreateResult(result, undefined);
|
|
747
|
+
}
|
|
748
|
+
catch (error) {
|
|
749
|
+
console.error('Error creating root category:', error);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Creates a new child category under the given parent node (uses Entity:Create command).
|
|
754
|
+
*/
|
|
755
|
+
async handleCreateChildClick(node, event) {
|
|
756
|
+
this.preventDefaultAndStopPropagation(event);
|
|
757
|
+
try {
|
|
758
|
+
const parentId = this.extractNodeId(node);
|
|
759
|
+
const result = await this.executeCreateCommand(parentId);
|
|
760
|
+
await this.applyCreateResult(result, parentId);
|
|
761
|
+
}
|
|
762
|
+
catch (error) {
|
|
763
|
+
console.error('Error creating child category:', error);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Updates an existing category node (uses Entity:Update command).
|
|
768
|
+
*/
|
|
769
|
+
async handleEditNodeClick(node, event) {
|
|
770
|
+
this.preventDefaultAndStopPropagation(event);
|
|
771
|
+
try {
|
|
772
|
+
const nodeData = this.extractNodeData(node);
|
|
773
|
+
const result = await this.executeUpdateCommand(nodeData);
|
|
774
|
+
await this.applyUpdateResult(result, node);
|
|
775
|
+
}
|
|
776
|
+
catch (error) {
|
|
777
|
+
console.error('Error editing category:', error);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Deletes a category node
|
|
782
|
+
*/
|
|
783
|
+
async handleDeleteNodeClick(node, event) {
|
|
784
|
+
this.preventDefaultAndStopPropagation(event);
|
|
785
|
+
try {
|
|
786
|
+
const nodeData = this.extractNodeData(node);
|
|
787
|
+
const context = await this.executeDeleteWorkflow(nodeData);
|
|
788
|
+
await this.handleDeleteResult(context, node);
|
|
789
|
+
}
|
|
790
|
+
catch (error) {
|
|
791
|
+
console.error('Error deleting category:', error);
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region ---- Private Tree Management Methods ----
|
|
796
|
+
/**
|
|
797
|
+
* Initializes the category tree data structure
|
|
798
|
+
*/
|
|
799
|
+
async initializeTree() {
|
|
800
|
+
this.setLoadingWithDelay(true);
|
|
801
|
+
try {
|
|
802
|
+
const entityKey = this.categoryEntityKey();
|
|
803
|
+
this.treeConfig = {
|
|
804
|
+
entityKey,
|
|
805
|
+
textField: this.textField(),
|
|
806
|
+
valueField: this.valueField(),
|
|
807
|
+
};
|
|
808
|
+
this.treeData = await this.categoryTreeService.initializeCategoryTree(this.treeConfig);
|
|
809
|
+
if (!this.treeData) {
|
|
810
|
+
this.clearLoadingState();
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
// Set parent key from entity definition
|
|
814
|
+
if (this.treeData.categoryEntityDef?.parentKey) {
|
|
815
|
+
this.treeConfig.parentKey = this.treeData.categoryEntityDef.parentKey;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
catch (error) {
|
|
819
|
+
console.error('Error loading categories:', error);
|
|
820
|
+
}
|
|
821
|
+
finally {
|
|
822
|
+
this.clearLoadingState();
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Loads root nodes for the tree
|
|
827
|
+
*/
|
|
828
|
+
async loadRootNodes() {
|
|
829
|
+
if (!this.isTreeInitialized()) {
|
|
830
|
+
return [];
|
|
831
|
+
}
|
|
832
|
+
// Load root categories
|
|
833
|
+
const items = await this.categoryTreeService.loadRootCategories(this.treeData, this.treeConfig);
|
|
834
|
+
if (!items) {
|
|
835
|
+
return [];
|
|
836
|
+
}
|
|
837
|
+
const rootNode = await this.categoryTreeService.createRootNode(items, this.treeConfig);
|
|
838
|
+
// Filter root's children when search is active
|
|
839
|
+
if (this.relevantNodeIds.size > 0 && rootNode['children']) {
|
|
840
|
+
rootNode['children'] = rootNode['children'].filter((child) => {
|
|
841
|
+
const childId = String(child['id'] ?? '');
|
|
842
|
+
return this.relevantNodeIds.has(childId);
|
|
843
|
+
});
|
|
844
|
+
rootNode['childrenCount'] = rootNode['children'].length;
|
|
845
|
+
}
|
|
846
|
+
return [rootNode];
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Loads child nodes for a given parent ID
|
|
850
|
+
*/
|
|
851
|
+
async loadChildNodes(parentId) {
|
|
852
|
+
if (!this.isTreeInitialized()) {
|
|
853
|
+
return [];
|
|
854
|
+
}
|
|
855
|
+
// Create minimal node object - loadChildren only needs node.id
|
|
856
|
+
const targetNode = {
|
|
857
|
+
id: parentId,
|
|
858
|
+
};
|
|
859
|
+
let children = await this.categoryTreeService.loadChildren(targetNode, this.treeData, this.treeConfig);
|
|
860
|
+
// Filter children when search is active
|
|
861
|
+
if (this.relevantNodeIds.size > 0) {
|
|
862
|
+
children = children.filter((child) => {
|
|
863
|
+
const childId = String(child['id'] ?? '');
|
|
864
|
+
return this.relevantNodeIds.has(childId);
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
return children;
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* Refreshes the tree view component
|
|
871
|
+
*/
|
|
872
|
+
refreshTree() {
|
|
873
|
+
const treeComponent = this.tree();
|
|
874
|
+
if (treeComponent) {
|
|
875
|
+
treeComponent.refresh();
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Refreshes tree after CRUD operations
|
|
880
|
+
*/
|
|
881
|
+
async refreshAfterChange(parentId) {
|
|
882
|
+
this.refreshTree();
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Adds a new node to the tree after create operation
|
|
886
|
+
*/
|
|
887
|
+
async addNodeToTree(entityData, parentId) {
|
|
888
|
+
if (!this.isTreeInitialized()) {
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
891
|
+
const treeComponent = this.tree();
|
|
892
|
+
if (!treeComponent) {
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
const newNode = this.categoryTreeService.convertToTreeNode(entityData, this.treeConfig);
|
|
896
|
+
if (parentId) {
|
|
897
|
+
await this.addChildNode(treeComponent, parentId, newNode);
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
await this.addRootNode(treeComponent, newNode);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Adds a child node to a parent node
|
|
905
|
+
*/
|
|
906
|
+
async addChildNode(treeComponent, parentId, newNode) {
|
|
907
|
+
const parentNode = treeComponent.findNode(parentId);
|
|
908
|
+
if (!parentNode) {
|
|
909
|
+
await this.refreshAfterChange(parentId);
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
912
|
+
if (!treeComponent.isNodeExpanded(parentId)) {
|
|
913
|
+
await treeComponent.expandNode(parentId);
|
|
914
|
+
}
|
|
915
|
+
treeComponent.addChild(parentId, newNode);
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Adds a root node to the tree
|
|
919
|
+
*/
|
|
920
|
+
async addRootNode(treeComponent, newNode) {
|
|
921
|
+
const rootNode = treeComponent.findNode(ROOT_NODE_ID);
|
|
922
|
+
if (!rootNode) {
|
|
923
|
+
await this.refreshAfterChange();
|
|
924
|
+
return;
|
|
925
|
+
}
|
|
926
|
+
if (!treeComponent.isNodeExpanded(ROOT_NODE_ID)) {
|
|
927
|
+
await treeComponent.expandNode(ROOT_NODE_ID);
|
|
928
|
+
}
|
|
929
|
+
treeComponent.addChild(ROOT_NODE_ID, newNode);
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Updates an existing node in the tree after edit operation
|
|
933
|
+
*/
|
|
934
|
+
async updateNodeInTree(nodeId, entityData) {
|
|
935
|
+
if (!this.isTreeInitialized()) {
|
|
936
|
+
return;
|
|
937
|
+
}
|
|
938
|
+
const treeComponent = this.tree();
|
|
939
|
+
if (!treeComponent) {
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
942
|
+
const existingNode = treeComponent.findNode(nodeId);
|
|
943
|
+
if (!existingNode) {
|
|
944
|
+
await this.refreshNodeParent(entityData);
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
// Check if parent changed
|
|
948
|
+
const parentKey = this.treeData?.categoryEntityDef?.parentKey;
|
|
949
|
+
let newParentId = undefined;
|
|
950
|
+
if (parentKey && entityData[parentKey]) {
|
|
951
|
+
const parentValue = String(entityData[parentKey]);
|
|
952
|
+
// 'all' means root, so treat it as undefined
|
|
953
|
+
newParentId = parentValue !== 'all' && parentValue !== '' ? parentValue : undefined;
|
|
954
|
+
}
|
|
955
|
+
const currentParent = treeComponent.getParent(nodeId);
|
|
956
|
+
const currentParentId = currentParent ? String(currentParent['id'] ?? '') : undefined;
|
|
957
|
+
// Normalize current parent: 'all' means root (undefined)
|
|
958
|
+
const normalizedCurrentParentId = currentParentId === 'all' || currentParentId === '' ? undefined : currentParentId;
|
|
959
|
+
// Handle parent change: move node to new parent if parent changed
|
|
960
|
+
if (newParentId !== normalizedCurrentParentId) {
|
|
961
|
+
// If parent changed, move the node first
|
|
962
|
+
const moved = treeComponent.moveNode(nodeId, newParentId);
|
|
963
|
+
if (!moved) {
|
|
964
|
+
// If move failed, refresh the tree to ensure consistency
|
|
965
|
+
await this.refreshNodeParent(entityData);
|
|
966
|
+
return;
|
|
967
|
+
}
|
|
968
|
+
// After moving, we need to ensure the new parent is expanded
|
|
969
|
+
if (newParentId) {
|
|
970
|
+
if (!treeComponent.isNodeExpanded(newParentId)) {
|
|
971
|
+
await treeComponent.expandNode(newParentId);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
else {
|
|
975
|
+
// Moving to root - ensure root is expanded
|
|
976
|
+
if (!treeComponent.isNodeExpanded(ROOT_NODE_ID)) {
|
|
977
|
+
await treeComponent.expandNode(ROOT_NODE_ID);
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
// Update node properties (title, data, etc.)
|
|
982
|
+
const updatedNode = this.categoryTreeService.convertToTreeNode(entityData, this.treeConfig);
|
|
983
|
+
const updates = {
|
|
984
|
+
['title']: updatedNode['title'],
|
|
985
|
+
['data']: updatedNode['data'],
|
|
986
|
+
['childrenCount']: updatedNode['childrenCount'],
|
|
987
|
+
['icon']: updatedNode['icon'],
|
|
988
|
+
};
|
|
989
|
+
treeComponent.editNode(nodeId, updates);
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Removes a node from the tree after delete operation
|
|
993
|
+
*/
|
|
994
|
+
async removeNodeFromTree(nodeId) {
|
|
995
|
+
const treeComponent = this.tree();
|
|
996
|
+
if (!treeComponent) {
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
const nodeToDelete = treeComponent.findNode(nodeId);
|
|
1000
|
+
if (!nodeToDelete) {
|
|
1001
|
+
await this.refreshAfterChange();
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
treeComponent.removeNode(nodeId);
|
|
1005
|
+
}
|
|
1006
|
+
//#endregion
|
|
1007
|
+
//#region ---- Entity CRUD (Commands) ----
|
|
1008
|
+
/**
|
|
1009
|
+
* Executes Entity:Create command for category (standard command-based create).
|
|
1010
|
+
*/
|
|
1011
|
+
async executeCreateCommand(parentId) {
|
|
1012
|
+
const entityKey = this.categoryEntityKey();
|
|
1013
|
+
const [moduleName, entityName] = entityKey.split('.');
|
|
1014
|
+
const entityRef = await this.entityRegistry.resolve(moduleName, entityName);
|
|
1015
|
+
const data = {};
|
|
1016
|
+
if (parentId && this.treeData?.categoryEntityDef?.parentKey) {
|
|
1017
|
+
data[this.treeData.categoryEntityDef.parentKey] = parentId;
|
|
1018
|
+
}
|
|
1019
|
+
const createCategoryTitle = await this.translate.translateAsync('@general:actions.create-category.title');
|
|
1020
|
+
const result = await this.commandService.execute('Entity:Create', {
|
|
1021
|
+
__context__: {
|
|
1022
|
+
entity: entityKey,
|
|
1023
|
+
entityInfo: {
|
|
1024
|
+
name: entityRef.name,
|
|
1025
|
+
module: entityRef.module,
|
|
1026
|
+
title: entityRef.title ?? entityRef.formats?.individual ?? '',
|
|
1027
|
+
parentKey: entityRef.parentKey,
|
|
1028
|
+
},
|
|
1029
|
+
data: Object.keys(data).length > 0 ? data : undefined,
|
|
1030
|
+
options: {
|
|
1031
|
+
process: { redirect: false, canCreateNewOne: !!parentId },
|
|
1032
|
+
decoration: { header: { title: createCategoryTitle } },
|
|
1033
|
+
},
|
|
1034
|
+
},
|
|
1035
|
+
});
|
|
1036
|
+
return result ?? { success: false };
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* Executes Entity:Update command for category (standard command-based update).
|
|
1040
|
+
*/
|
|
1041
|
+
async executeUpdateCommand(nodeData) {
|
|
1042
|
+
const entityKey = this.categoryEntityKey();
|
|
1043
|
+
const [moduleName, entityName] = entityKey.split('.');
|
|
1044
|
+
const entityRef = await this.entityRegistry.resolve(moduleName, entityName);
|
|
1045
|
+
const result = await this.commandService.execute('Entity:Update', {
|
|
1046
|
+
__context__: {
|
|
1047
|
+
entity: entityKey,
|
|
1048
|
+
entityInfo: {
|
|
1049
|
+
name: entityRef.name,
|
|
1050
|
+
module: entityRef.module,
|
|
1051
|
+
title: entityRef.title ?? entityRef.formats?.individual ?? '',
|
|
1052
|
+
parentKey: entityRef.parentKey,
|
|
1053
|
+
},
|
|
1054
|
+
data: nodeData,
|
|
1055
|
+
options: { layout: { size: 'md' } },
|
|
1056
|
+
},
|
|
1057
|
+
});
|
|
1058
|
+
return result ?? { success: false };
|
|
1059
|
+
}
|
|
1060
|
+
/**
|
|
1061
|
+
* Applies create command result to the tree (add node or refresh).
|
|
1062
|
+
*/
|
|
1063
|
+
async applyCreateResult(result, parentId) {
|
|
1064
|
+
if (!result.success || !this.isTreeInitialized()) {
|
|
1065
|
+
await this.refreshAfterChange(parentId);
|
|
1066
|
+
return;
|
|
1067
|
+
}
|
|
1068
|
+
const newEntityData = result.data;
|
|
1069
|
+
if (newEntityData) {
|
|
1070
|
+
await this.addNodeToTree(newEntityData, parentId);
|
|
1071
|
+
}
|
|
1072
|
+
else {
|
|
1073
|
+
await this.refreshAfterChange(parentId);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Applies update command result to the tree (update node or refresh).
|
|
1078
|
+
*/
|
|
1079
|
+
async applyUpdateResult(result, node) {
|
|
1080
|
+
if (!result.success || !this.isTreeInitialized()) {
|
|
1081
|
+
await this.refreshNodeParent(this.extractNodeData(node));
|
|
1082
|
+
return;
|
|
1083
|
+
}
|
|
1084
|
+
const updatedEntityData = result.data;
|
|
1085
|
+
if (updatedEntityData) {
|
|
1086
|
+
await this.updateNodeInTree(this.extractNodeId(node), updatedEntityData);
|
|
1087
|
+
}
|
|
1088
|
+
else {
|
|
1089
|
+
await this.refreshNodeParent(this.extractNodeData(node));
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
//#endregion
|
|
1093
|
+
//#region ---- Delete (Workflow) ----
|
|
1094
|
+
/**
|
|
1095
|
+
* Executes delete-entity workflow (platform has no Entity:Delete command).
|
|
1096
|
+
*/
|
|
1097
|
+
async executeDeleteWorkflow(nodeData) {
|
|
1098
|
+
return await this.workflow.execute('delete-entity', {
|
|
1099
|
+
entity: this.categoryEntityKey(),
|
|
1100
|
+
data: nodeData,
|
|
1101
|
+
options: { process: { showResult: true } },
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Handles the result of a delete operation
|
|
1106
|
+
*/
|
|
1107
|
+
async handleDeleteResult(context, node) {
|
|
1108
|
+
const result = context.getOutput('result');
|
|
1109
|
+
if (result) {
|
|
1110
|
+
await this.removeNodeFromTree(this.extractNodeId(node));
|
|
1111
|
+
}
|
|
1112
|
+
else {
|
|
1113
|
+
await this.refreshNodeParent(this.extractNodeData(node));
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
//#endregion
|
|
1117
|
+
//#region ---- Utility Methods ----
|
|
1118
|
+
/**
|
|
1119
|
+
* Checks if tree data and config are initialized
|
|
1120
|
+
*/
|
|
1121
|
+
isTreeInitialized() {
|
|
1122
|
+
return !!(this.treeData && this.treeConfig);
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Extracts node data from a tree node
|
|
1126
|
+
*/
|
|
1127
|
+
extractNodeData(node) {
|
|
1128
|
+
return (node['data'] || node);
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* Extracts node ID from a tree node
|
|
1132
|
+
*/
|
|
1133
|
+
extractNodeId(node) {
|
|
1134
|
+
return String(node['id'] ?? '');
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Builds category filters from node data and apply conditions
|
|
1138
|
+
*/
|
|
1139
|
+
buildCategoryFilters(nodeData, applyConditions) {
|
|
1140
|
+
return applyConditions
|
|
1141
|
+
.map((condition) => {
|
|
1142
|
+
const value = nodeData[condition.value];
|
|
1143
|
+
if (value === 'all' || value == null) {
|
|
1144
|
+
return null;
|
|
1145
|
+
}
|
|
1146
|
+
return {
|
|
1147
|
+
field: condition.name,
|
|
1148
|
+
value,
|
|
1149
|
+
operator: condition.operator,
|
|
1150
|
+
};
|
|
1151
|
+
})
|
|
1152
|
+
.filter((item) => item !== null);
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1155
|
+
* Builds view filters from view conditions
|
|
1156
|
+
*/
|
|
1157
|
+
buildViewFilters() {
|
|
1158
|
+
return this.vm()
|
|
1159
|
+
.view()
|
|
1160
|
+
.conditions.map((condition) => ({ ...condition, field: condition.name }));
|
|
1161
|
+
}
|
|
1162
|
+
/**
|
|
1163
|
+
* Refreshes the parent node of the given entity data
|
|
1164
|
+
*/
|
|
1165
|
+
async refreshNodeParent(entityData) {
|
|
1166
|
+
const parentKey = this.treeData?.categoryEntityDef?.parentKey;
|
|
1167
|
+
const parentId = parentKey && entityData[parentKey] ? entityData[parentKey] : undefined;
|
|
1168
|
+
await this.refreshAfterChange(parentId);
|
|
1169
|
+
}
|
|
1170
|
+
/**
|
|
1171
|
+
* Prevents default behavior and stops event propagation
|
|
1172
|
+
*/
|
|
1173
|
+
preventDefaultAndStopPropagation(event) {
|
|
1174
|
+
event.nativeEvent.preventDefault();
|
|
1175
|
+
event.nativeEvent.stopPropagation();
|
|
1176
|
+
}
|
|
1177
|
+
//#endregion
|
|
1178
|
+
//#region ---- Loading State Management ----
|
|
1179
|
+
/**
|
|
1180
|
+
* Sets loading state with delay to avoid flickering for fast responses
|
|
1181
|
+
*/
|
|
1182
|
+
setLoadingWithDelay(loading) {
|
|
1183
|
+
if (!loading) {
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
1186
|
+
if (this.loadingTimeoutId) {
|
|
1187
|
+
clearTimeout(this.loadingTimeoutId);
|
|
1188
|
+
}
|
|
1189
|
+
this.loadingTimeoutId = setTimeout(() => {
|
|
1190
|
+
this.isLoading.set(true);
|
|
1191
|
+
this.loadingTimeoutId = null;
|
|
1192
|
+
}, LOADING_DELAY_MS);
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Clears loading state and cancels any pending timeout
|
|
1196
|
+
*/
|
|
1197
|
+
clearLoadingState() {
|
|
1198
|
+
if (this.loadingTimeoutId) {
|
|
1199
|
+
clearTimeout(this.loadingTimeoutId);
|
|
1200
|
+
this.loadingTimeoutId = null;
|
|
1201
|
+
}
|
|
1202
|
+
this.isLoading.set(false);
|
|
1203
|
+
}
|
|
1204
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1205
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityCategoryComponent, isStandalone: true, selector: "axp-entity-category", inputs: { vm: { classPropertyName: "vm", publicName: "vm", isSignal: true, isRequired: true, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "searchValue", isSignal: true, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: true, isRequired: false, transformFunction: null }, selectionBehavior: { classPropertyName: "selectionBehavior", publicName: "selectionBehavior", isSignal: true, isRequired: false, transformFunction: null }, dragArea: { classPropertyName: "dragArea", publicName: "dragArea", isSignal: true, isRequired: false, transformFunction: null }, dragBehavior: { classPropertyName: "dragBehavior", publicName: "dragBehavior", isSignal: true, isRequired: false, transformFunction: null }, showIcons: { classPropertyName: "showIcons", publicName: "showIcons", isSignal: true, isRequired: false, transformFunction: null }, showChildrenBadge: { classPropertyName: "showChildrenBadge", publicName: "showChildrenBadge", isSignal: true, isRequired: false, transformFunction: null }, expandedIcon: { classPropertyName: "expandedIcon", publicName: "expandedIcon", isSignal: true, isRequired: false, transformFunction: null }, collapsedIcon: { classPropertyName: "collapsedIcon", publicName: "collapsedIcon", isSignal: true, isRequired: false, transformFunction: null }, indentSize: { classPropertyName: "indentSize", publicName: "indentSize", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, searchWithChildren: { classPropertyName: "searchWithChildren", publicName: "searchWithChildren", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "tree", first: true, predicate: ["tree"], descendants: true, isSignal: true }], ngImport: i0, template: "<axp-layout-header>\n <axp-layout-title>{{\n vm().entityDef.category?.title || '@general:terms.classification.category' | translate | async\n }}</axp-layout-title>\n <axp-layout-toolbar>\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-w-full\">\n <ax-search-box (onValueChanged)=\"handleCategorySearchChange($event)\" [delayTime]=\"300\"\n [placeholder]=\"'@general:terms.interface.category.search.placeholder' | translate | async\">\n </ax-search-box>\n @if (isSearching() && currentSearchValue().trim()) {\n <div class=\"ax-text-xs ax-text-muted ax-flex ax-items-center ax-gap-1\">\n <span>{{ '@general:terms.interface.category.search.searching' | translate | async }}</span>\n </div>\n } @else if (currentSearchValue().trim() && !isSearching()) {\n <div class=\"ax-text-xs ax-text-muted ax-flex ax-items-center ax-gap-1\">\n @if (searchResultCount() > 0) {\n <span>{{ resultsFoundText() }}</span>\n }\n </div>\n }\n </div>\n </axp-layout-toolbar>\n</axp-layout-header>\n<axp-layout-content>\n @if (isLoading()) {\n <div class=\"ax-p-4 ax-flex ax-flex-col ax-gap-3\">\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n </div>\n } @else if (showNoSearchResults()) {\n <div class=\"__empty-state\">\n <axp-state-message icon=\"fa-light fa-search\"\n [title]=\"'@general:terms.interface.category.search.no-results-found.title'\"\n [description]=\"'@general:terms.interface.category.search.no-results-found.description'\">\n </axp-state-message>\n </div>\n } @else if (treeData) {\n <div class=\"ax-px-4 ax-max-h-[calc(100vh-250px)] ax-overflow-auto\">\n <ax-tree-view [datasource]=\"datasource\" [selectMode]=\"selectMode()\" [selectionBehavior]=\"selectionBehavior()\"\n [dragArea]=\"dragArea()\" [dragBehavior]=\"dragBehavior()\" [showIcons]=\"showIcons()\"\n [showChildrenBadge]=\"showChildrenBadge()\" [expandedIcon]=\"expandedIcon()\" [collapsedIcon]=\"collapsedIcon()\"\n [indentSize]=\"indentSize()\" [look]=\"look()\" [titleField]=\"textField()\" [idField]=\"valueField()\"\n [expandOnDoubleClick]=\"true\" [nodeTemplate]=\"itemTemplate\" (onNodeToggle)=\"onNodeToggle($event)\"\n (onNodeClick)=\"handleNodeClick($event.node)\" #tree>\n </ax-tree-view>\n </div>\n } @else {\n <div class=\"__empty-state\">\n <axp-state-message icon=\"fa-light fa-folder-open\"\n [title]=\"'@general:terms.interface.category.search.no-records.title'\"\n [description]=\"'@general:terms.interface.category.search.no-records.description'\">\n @if (!categoryReadonly()) {\n <ax-button slot=\"actions\" (onClick)=\"handleCreateRootClick($event)\" look=\"solid\" color=\"primary\"\n [text]=\"'@general:actions.add-new.title' | translate | async\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button>\n }\n </axp-state-message>\n </div>\n }\n\n <ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n @let item = node.data || node;\n @let textField = vm().entityDef.category?.textField || 'title';\n @let valueField = vm().entityDef.category?.valueField || 'id';\n @let itemId = item[valueField] || node.id;\n @let rawLabel = item[textField] || node.title;\n @let itemTitle = rawLabel | axpResolveMultiLanguageString;\n <div class=\"ax-flex ax-items-center ax-justify-between ax-w-full ax-gap-2 ax-overflow-hidden ax-py-1\">\n <div class=\"ax-flex ax-items-center ax-gap-2 ax-min-w-0\">\n <ax-icon class=\"fas fa-folder\"\n [style.color]=\"item.color ?? 'rgba(var(--ax-sys-color-warning-500), 1)'\"></ax-icon>\n <span class=\"ax-truncate\">\n @if (itemId === 'all') {\n {{ categoryTreeRootTitleI18nKey | translate | async }}\n } @else {\n {{ itemTitle }}\n }\n </span>\n </div>\n @if (itemId && itemId !== 'all' && !categoryReadonly()) {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" color=\"default\" look=\"blank\" (onClick)=\"$event.nativeEvent.stopPropagation()\">\n <ax-icon class=\"fas fa-ellipsis-v\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleCreateChildClick(node, $event)\" look=\"blank\" color=\"default\"\n [text]=\"('@general:actions.add-new-child.title' | translate | async)!\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button-item>\n <ax-button-item (onClick)=\"handleEditNodeClick(node, $event)\" look=\"blank\"\n [text]=\"('@general:actions.edit.title' | translate | async)!\">\n <ax-icon class=\"fas fa-pen\"></ax-icon>\n </ax-button-item>\n <ax-button-item (onClick)=\"handleDeleteNodeClick(node, $event)\" color=\"danger\" look=\"blank\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\">\n <ax-icon class=\"fas fa-trash\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n } @else if (itemId === 'all' && !categoryReadonly()) {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" (onClick)=\"handleCreateRootClick($event)\" look=\"blank\" color=\"default\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n </ng-template>\n</axp-layout-content>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTreeViewModule }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["datasource", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "nodeTemplate", "idField", "titleField", "tooltipField", "iconField", "expandedField", "selectedField", "indeterminateField", "disabledField", "hiddenField", "childrenField", "childrenCountField", "dataField", "inheritDisabled", "expandOnDoubleClick", "doubleClickDuration", "tooltipDelay"], outputs: ["datasourceChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onNodeDoubleClick", "onNodeClick", "onSelectionChange", "onOrderChange", "onMoveChange", "onItemsChange"] }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i2$2.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXPThemeLayoutHeaderComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutToolbarComponent, selector: "axp-layout-toolbar" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i5.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AXPResolveMultiLanguageStringPipe, name: "axpResolveMultiLanguageString" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1206
|
+
}
|
|
1207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryComponent, decorators: [{
|
|
1208
|
+
type: Component,
|
|
1209
|
+
args: [{ selector: 'axp-entity-category', standalone: true, encapsulation: ViewEncapsulation.None, imports: [
|
|
1210
|
+
CommonModule,
|
|
1211
|
+
AXDecoratorModule,
|
|
1212
|
+
AXTreeViewModule,
|
|
1213
|
+
AXTreeViewComponent,
|
|
1214
|
+
AXSkeletonModule,
|
|
1215
|
+
AXPThemeLayoutBlockComponent,
|
|
1216
|
+
AXSearchBoxModule,
|
|
1217
|
+
AXPThemeLayoutHeaderComponent,
|
|
1218
|
+
AXPThemeLayoutToolbarComponent,
|
|
1219
|
+
AXTranslationModule,
|
|
1220
|
+
AXButtonModule,
|
|
1221
|
+
AXDropdownModule,
|
|
1222
|
+
AXPStateMessageComponent,
|
|
1223
|
+
AXPResolveMultiLanguageStringPipe
|
|
1224
|
+
], template: "<axp-layout-header>\n <axp-layout-title>{{\n vm().entityDef.category?.title || '@general:terms.classification.category' | translate | async\n }}</axp-layout-title>\n <axp-layout-toolbar>\n <div class=\"ax-flex ax-flex-col ax-gap-1 ax-w-full\">\n <ax-search-box (onValueChanged)=\"handleCategorySearchChange($event)\" [delayTime]=\"300\"\n [placeholder]=\"'@general:terms.interface.category.search.placeholder' | translate | async\">\n </ax-search-box>\n @if (isSearching() && currentSearchValue().trim()) {\n <div class=\"ax-text-xs ax-text-muted ax-flex ax-items-center ax-gap-1\">\n <span>{{ '@general:terms.interface.category.search.searching' | translate | async }}</span>\n </div>\n } @else if (currentSearchValue().trim() && !isSearching()) {\n <div class=\"ax-text-xs ax-text-muted ax-flex ax-items-center ax-gap-1\">\n @if (searchResultCount() > 0) {\n <span>{{ resultsFoundText() }}</span>\n }\n </div>\n }\n </div>\n </axp-layout-toolbar>\n</axp-layout-header>\n<axp-layout-content>\n @if (isLoading()) {\n <div class=\"ax-p-4 ax-flex ax-flex-col ax-gap-3\">\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n <ax-skeleton class=\"ax-w-full ax-h-6 ax-rounded-md\"></ax-skeleton>\n </div>\n } @else if (showNoSearchResults()) {\n <div class=\"__empty-state\">\n <axp-state-message icon=\"fa-light fa-search\"\n [title]=\"'@general:terms.interface.category.search.no-results-found.title'\"\n [description]=\"'@general:terms.interface.category.search.no-results-found.description'\">\n </axp-state-message>\n </div>\n } @else if (treeData) {\n <div class=\"ax-px-4 ax-max-h-[calc(100vh-250px)] ax-overflow-auto\">\n <ax-tree-view [datasource]=\"datasource\" [selectMode]=\"selectMode()\" [selectionBehavior]=\"selectionBehavior()\"\n [dragArea]=\"dragArea()\" [dragBehavior]=\"dragBehavior()\" [showIcons]=\"showIcons()\"\n [showChildrenBadge]=\"showChildrenBadge()\" [expandedIcon]=\"expandedIcon()\" [collapsedIcon]=\"collapsedIcon()\"\n [indentSize]=\"indentSize()\" [look]=\"look()\" [titleField]=\"textField()\" [idField]=\"valueField()\"\n [expandOnDoubleClick]=\"true\" [nodeTemplate]=\"itemTemplate\" (onNodeToggle)=\"onNodeToggle($event)\"\n (onNodeClick)=\"handleNodeClick($event.node)\" #tree>\n </ax-tree-view>\n </div>\n } @else {\n <div class=\"__empty-state\">\n <axp-state-message icon=\"fa-light fa-folder-open\"\n [title]=\"'@general:terms.interface.category.search.no-records.title'\"\n [description]=\"'@general:terms.interface.category.search.no-records.description'\">\n @if (!categoryReadonly()) {\n <ax-button slot=\"actions\" (onClick)=\"handleCreateRootClick($event)\" look=\"solid\" color=\"primary\"\n [text]=\"'@general:actions.add-new.title' | translate | async\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button>\n }\n </axp-state-message>\n </div>\n }\n\n <ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n @let item = node.data || node;\n @let textField = vm().entityDef.category?.textField || 'title';\n @let valueField = vm().entityDef.category?.valueField || 'id';\n @let itemId = item[valueField] || node.id;\n @let rawLabel = item[textField] || node.title;\n @let itemTitle = rawLabel | axpResolveMultiLanguageString;\n <div class=\"ax-flex ax-items-center ax-justify-between ax-w-full ax-gap-2 ax-overflow-hidden ax-py-1\">\n <div class=\"ax-flex ax-items-center ax-gap-2 ax-min-w-0\">\n <ax-icon class=\"fas fa-folder\"\n [style.color]=\"item.color ?? 'rgba(var(--ax-sys-color-warning-500), 1)'\"></ax-icon>\n <span class=\"ax-truncate\">\n @if (itemId === 'all') {\n {{ categoryTreeRootTitleI18nKey | translate | async }}\n } @else {\n {{ itemTitle }}\n }\n </span>\n </div>\n @if (itemId && itemId !== 'all' && !categoryReadonly()) {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" color=\"default\" look=\"blank\" (onClick)=\"$event.nativeEvent.stopPropagation()\">\n <ax-icon class=\"fas fa-ellipsis-v\"></ax-icon>\n <ax-dropdown-panel>\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleCreateChildClick(node, $event)\" look=\"blank\" color=\"default\"\n [text]=\"('@general:actions.add-new-child.title' | translate | async)!\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button-item>\n <ax-button-item (onClick)=\"handleEditNodeClick(node, $event)\" look=\"blank\"\n [text]=\"('@general:actions.edit.title' | translate | async)!\">\n <ax-icon class=\"fas fa-pen\"></ax-icon>\n </ax-button-item>\n <ax-button-item (onClick)=\"handleDeleteNodeClick(node, $event)\" color=\"danger\" look=\"blank\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\">\n <ax-icon class=\"fas fa-trash\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n } @else if (itemId === 'all' && !categoryReadonly()) {\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <ax-button class=\"ax-xs\" (onClick)=\"handleCreateRootClick($event)\" look=\"blank\" color=\"default\">\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button>\n </div>\n }\n </div>\n </ng-template>\n</axp-layout-content>" }]
|
|
1225
|
+
}], ctorParameters: () => [], propDecorators: { vm: [{ type: i0.Input, args: [{ isSignal: true, alias: "vm", required: true }] }], tree: [{ type: i0.ViewChild, args: ['tree', { isSignal: true }] }], searchValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchValue", required: false }] }], selectMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectMode", required: false }] }], selectionBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionBehavior", required: false }] }], dragArea: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragArea", required: false }] }], dragBehavior: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragBehavior", required: false }] }], showIcons: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcons", required: false }] }], showChildrenBadge: [{ type: i0.Input, args: [{ isSignal: true, alias: "showChildrenBadge", required: false }] }], expandedIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIcon", required: false }] }], collapsedIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedIcon", required: false }] }], indentSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "indentSize", required: false }] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }], searchWithChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchWithChildren", required: false }] }] } });
|
|
1226
|
+
|
|
1227
|
+
class AXPEntityMasterToolbarViewComponent {
|
|
1228
|
+
constructor() {
|
|
1229
|
+
this.layoutService = inject(AXPLayoutThemeService);
|
|
1230
|
+
this.deviceService = inject(AXPDeviceService);
|
|
1231
|
+
this.parent = inject(AXPEntityMasterListViewComponent);
|
|
1232
|
+
this.router = inject(Router);
|
|
1233
|
+
this.activeRoute = inject(ActivatedRoute);
|
|
1234
|
+
this.settingsService = inject(AXPSettingsService);
|
|
1235
|
+
this.isInitializing = false;
|
|
1236
|
+
this.pendingInitialFilters = true;
|
|
1237
|
+
this.pendingInitialSorts = true;
|
|
1238
|
+
this.filterTriggerMode = 'manual';
|
|
1239
|
+
this.previousFilterQueries = signal([], ...(ngDevMode ? [{ debugName: "previousFilterQueries" }] : /* istanbul ignore next */ []));
|
|
1240
|
+
this.initialFilters = signal([], ...(ngDevMode ? [{ debugName: "initialFilters" }] : /* istanbul ignore next */ []));
|
|
1241
|
+
this.filtersDefinitions = signal([], ...(ngDevMode ? [{ debugName: "filtersDefinitions" }] : /* istanbul ignore next */ []));
|
|
1242
|
+
this.viewQueries = computed(() => this.vm.views().map((v) => ({
|
|
1243
|
+
name: v.name,
|
|
1244
|
+
fixed: false,
|
|
1245
|
+
title: v.title,
|
|
1246
|
+
columns: v.columns,
|
|
1247
|
+
conditions: v.conditions.map((c) => ({
|
|
1248
|
+
field: c.name,
|
|
1249
|
+
operator: c.operator,
|
|
1250
|
+
value: c.value,
|
|
1251
|
+
})),
|
|
1252
|
+
sorts: v.sorts,
|
|
1253
|
+
})), ...(ngDevMode ? [{ debugName: "viewQueries" }] : /* istanbul ignore next */ []));
|
|
1254
|
+
this.selectedViewQuery = computed(() => ({
|
|
1255
|
+
name: this.vm.view().name,
|
|
1256
|
+
fixed: false,
|
|
1257
|
+
title: this.vm.view().title,
|
|
1258
|
+
columns: this.vm.view().columns,
|
|
1259
|
+
conditions: this.vm.view().conditions.map((c) => ({
|
|
1260
|
+
field: c.name,
|
|
1261
|
+
operator: c.operator,
|
|
1262
|
+
value: c.value,
|
|
1263
|
+
})),
|
|
1264
|
+
sorts: this.vm.view().sorts,
|
|
1265
|
+
}), ...(ngDevMode ? [{ debugName: "selectedViewQuery" }] : /* istanbul ignore next */ []));
|
|
1266
|
+
this.isFiltersDirty = computed(() => !isEqual(this.vm.filterQueries(), this.previousFilterQueries()), ...(ngDevMode ? [{ debugName: "isFiltersDirty" }] : /* istanbul ignore next */ []));
|
|
1267
|
+
// Debounced apply to coalesce multiple UI changes (filters/sorts/columns)
|
|
1268
|
+
this.applyTimer = null;
|
|
1269
|
+
this.#effect = effect(() => {
|
|
1270
|
+
// Keep definitions up to date; initial filters are set explicitly from settings or view
|
|
1271
|
+
this.filtersDefinitions.set(this.vm.filtersDef);
|
|
1272
|
+
}, ...(ngDevMode ? [{ debugName: "#effect" }] : /* istanbul ignore next */ []));
|
|
1273
|
+
this.sortQueries = computed(() => this.vm
|
|
1274
|
+
.sortedFields()
|
|
1275
|
+
.filter((s) => !!s.dir)
|
|
1276
|
+
.map((s) => ({ name: s.name, dir: s.dir })), ...(ngDevMode ? [{ debugName: "sortQueries" }] : /* istanbul ignore next */ []));
|
|
1277
|
+
this.sortDefinitions = computed(() => this.vm.sortableFields().map((s) => ({
|
|
1278
|
+
name: s.name,
|
|
1279
|
+
title: s.title,
|
|
1280
|
+
dir: s.dir,
|
|
1281
|
+
})), ...(ngDevMode ? [{ debugName: "sortDefinitions" }] : /* istanbul ignore next */ []));
|
|
1282
|
+
}
|
|
1283
|
+
async ngOnInit() {
|
|
1284
|
+
// Prefer saved settings (view/columns/sorts/filters) if available, then apply
|
|
1285
|
+
await this.loadSettings();
|
|
1286
|
+
await this.vm.setView();
|
|
1287
|
+
this.filtersDefinitions.set(this.vm.filtersDef);
|
|
1288
|
+
this.isInitializing = true;
|
|
1289
|
+
// this.pendingInitialFilters = true;
|
|
1290
|
+
// this.pendingInitialSorts = true;
|
|
1291
|
+
this.setInitialFiltersFromSettingsOrView();
|
|
1292
|
+
// Ensure initial load even when filters/sorts are absent
|
|
1293
|
+
setTimeout(() => {
|
|
1294
|
+
this.isInitializing = false;
|
|
1295
|
+
this.scheduleApply();
|
|
1296
|
+
}, 0);
|
|
1297
|
+
}
|
|
1298
|
+
async loadSettings() {
|
|
1299
|
+
const filterTriggerMode = await this.settingsService.get(AXPCommonSettings.EntityFilterApplyMode);
|
|
1300
|
+
this.filterTriggerMode = (filterTriggerMode?.value ?? 'auto');
|
|
1301
|
+
}
|
|
1302
|
+
scheduleApply() {
|
|
1303
|
+
clearTimeout(this.applyTimer);
|
|
1304
|
+
this.applyTimer = setTimeout(() => {
|
|
1305
|
+
this.vm.applyFilterAndSort();
|
|
1306
|
+
}, 50);
|
|
1307
|
+
}
|
|
1308
|
+
async onViewChanged(view) {
|
|
1309
|
+
await this.vm.setView(view.name);
|
|
1310
|
+
// Sync query param immediately on tab change
|
|
1311
|
+
this.router.navigate([], {
|
|
1312
|
+
relativeTo: this.activeRoute,
|
|
1313
|
+
queryParams: { view: view.name },
|
|
1314
|
+
queryParamsHandling: 'merge',
|
|
1315
|
+
replaceUrl: true,
|
|
1316
|
+
});
|
|
1317
|
+
this.isInitializing = true;
|
|
1318
|
+
this.pendingInitialFilters = true;
|
|
1319
|
+
this.pendingInitialSorts = true;
|
|
1320
|
+
this.setInitialFiltersFromSettingsOrView();
|
|
1321
|
+
// Ensure initial load after view change
|
|
1322
|
+
setTimeout(() => {
|
|
1323
|
+
this.isInitializing = false;
|
|
1324
|
+
this.scheduleApply();
|
|
1325
|
+
}, 0);
|
|
1326
|
+
}
|
|
1327
|
+
#effect;
|
|
1328
|
+
setInitialFiltersFromSettingsOrView() {
|
|
1329
|
+
const saved = this.vm.filterQueries();
|
|
1330
|
+
this.previousFilterQueries.set(saved);
|
|
1331
|
+
const viewConditions = this.vm.view().conditions.map((c) => c.name);
|
|
1332
|
+
if (saved && saved.length) {
|
|
1333
|
+
this.initialFilters.set(saved.map((s) => ({ ...s, hidden: viewConditions.includes(s.field) })));
|
|
1334
|
+
return;
|
|
1335
|
+
}
|
|
1336
|
+
this.initialFilters.set(this.vm.view().conditions.map((c) => ({
|
|
1337
|
+
field: c.name,
|
|
1338
|
+
operator: c.operator,
|
|
1339
|
+
value: c.value,
|
|
1340
|
+
hidden: true,
|
|
1341
|
+
})));
|
|
1342
|
+
}
|
|
1343
|
+
onFiltersChanged(filters) {
|
|
1344
|
+
if (this.isInitializing || this.pendingInitialFilters) {
|
|
1345
|
+
this.pendingInitialFilters = false;
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1348
|
+
this.vm.filterQueries.set(filters);
|
|
1349
|
+
if (this.filterTriggerMode === 'auto') {
|
|
1350
|
+
this.applyFilters();
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
applyFilters() {
|
|
1354
|
+
this.previousFilterQueries.set(this.vm.filterQueries());
|
|
1355
|
+
this.vm.saveSettings('filters', this.vm.filterQueries());
|
|
1356
|
+
this.scheduleApply();
|
|
1357
|
+
}
|
|
1358
|
+
onSortQueriesChange(e) {
|
|
1359
|
+
if (this.isInitializing || this.pendingInitialSorts) {
|
|
1360
|
+
this.pendingInitialSorts = false;
|
|
1361
|
+
return;
|
|
1362
|
+
}
|
|
1363
|
+
this.vm.sortedFields.set(e.map((s) => ({
|
|
1364
|
+
name: s.name,
|
|
1365
|
+
title: s.name,
|
|
1366
|
+
dir: s.dir,
|
|
1367
|
+
})));
|
|
1368
|
+
// Persist sorts per module/entity/view
|
|
1369
|
+
this.vm.saveSettings('sorts', e);
|
|
1370
|
+
this.scheduleApply();
|
|
1371
|
+
}
|
|
1372
|
+
onColumnsChange(columns) {
|
|
1373
|
+
const keyOf = (c) => c.column?.options?.dataPath ?? c.name;
|
|
1374
|
+
this.vm.columns.update((prev) => {
|
|
1375
|
+
const byKey = new Map(prev.map((c) => [keyOf(c), c]));
|
|
1376
|
+
return columns.map((newColumn) => {
|
|
1377
|
+
const existing = byKey.get(keyOf(newColumn));
|
|
1378
|
+
return new AXPEntityListViewColumnViewModel(existing.property, {
|
|
1379
|
+
...existing.column,
|
|
1380
|
+
options: {
|
|
1381
|
+
...existing.column.options,
|
|
1382
|
+
visible: newColumn.visible,
|
|
1383
|
+
},
|
|
1384
|
+
});
|
|
1385
|
+
});
|
|
1386
|
+
});
|
|
1387
|
+
// Persist column order/visibility
|
|
1388
|
+
this.vm.onColumnsChanged(this.vm.columns());
|
|
1389
|
+
// Use debounced apply to avoid triple refresh when combined with sorts/filters
|
|
1390
|
+
// this.scheduleApply();
|
|
1391
|
+
}
|
|
1392
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityMasterToolbarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1393
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityMasterToolbarViewComponent, isStandalone: true, selector: "axp-entity-master-toolbar-view", inputs: { vm: ["viewModel", "vm"] }, host: { classAttribute: "ax-w-full" }, ngImport: i0, template: "<!-- <axp-entity-view-toolbar [viewModel]=\"vm\"></axp-entity-view-toolbar> -->\n<axp-query-views\n id=\"axp-toolbar-view-selector\"\n [views]=\"viewQueries()\"\n [selectedView]=\"selectedViewQuery()\"\n (selectedViewChange)=\"onViewChanged($event)\"\n></axp-query-views>\n<div class=\"ax-flex ax-items-center ax-gap-2 ax-border-b ax-border-light w-full\">\n <!-- <axp-entity-filter-toolbar [viewModel]=\"vm\"></axp-entity-filter-toolbar> -->\n <axp-query-filters\n id=\"axp-toolbar-filters\"\n [filtersDefinitions]=\"filtersDefinitions()\"\n [initialFilters]=\"initialFilters()\"\n (onFiltersChanged)=\"onFiltersChanged($event)\"\n ></axp-query-filters>\n\n <div class=\"ax-flex ax-items-center ax-gap-2 md:ax-gap-2\">\n @if (filterTriggerMode === 'manual' && isFiltersDirty()) {\n <ax-button\n id=\"axp-toolbar-btn-filter\"\n [title]=\"'@general:actions.apply.title'\"\n [iconOnly]=\"true\"\n #filterButton\n [color]=\"'primary'\"\n (onClick)=\"applyFilters()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-search\"></i>\n </ax-prefix>\n </ax-button>\n }\n <div>\n <ax-button id=\"axp-toolbar-btn-columns\" [iconOnly]=\"true\" #columnButton [color]=\"'default'\">\n <i class=\"fa-light fa-table-columns\"></i>\n </ax-button>\n <ax-popover\n id=\"axp-popover-columns\"\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"10\"\n [target]=\"columnButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ '@general:terms.common.columns' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <axp-query-columns [columns]=\"vm.columns()\" (columnsChange)=\"onColumnsChange($event)\"></axp-query-columns>\n <!-- <axp-list-view-option-columns [viewModel]=\"vm\"></axp-list-view-option-columns> -->\n </div>\n </div>\n </ax-popover>\n </div>\n\n @if (vm.canSort()) {\n <div>\n <ax-button id=\"axp-toolbar-btn-sort\" [iconOnly]=\"true\" [text]=\"'Sorts'\" #sortButton [color]=\"'default'\">\n <i class=\"fa-light fa-sort-amount-up\"></i>\n </ax-button>\n <ax-popover\n id=\"axp-popover-sort\"\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"10\"\n [target]=\"sortButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ '@general:terms.common.sorts' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <!-- <axp-list-view-option-sorting [viewModel]=\"vm\"></axp-list-view-option-sorting> -->\n <axp-query-sorts\n [sortDefinitions]=\"sortDefinitions()\"\n (sortQueriesChange)=\"onSortQueriesChange($event)\"\n [initialSortQueries]=\"sortQueries()\"\n ></axp-query-sorts>\n </div>\n </div>\n </ax-popover>\n </div>\n }\n @if (deviceService.isSmall()) {\n <ax-button\n id=\"axp-toolbar-btn-category\"\n (onClick)=\"parent.toggleCategoryDrawer()\"\n [iconOnly]=\"true\"\n [color]=\"'default'\"\n >\n <i class=\"fa-light fa-bars\"></i>\n </ax-button>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPQueryFiltersComponent, selector: "axp-query-filters", inputs: ["filtersDefinitions", "initialFilters"], outputs: ["onFiltersChanged"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i3$1.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "repositionOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXPQuerySortsComponent, selector: "axp-query-sorts", inputs: ["sortDefinitions", "initialSortQueries"], outputs: ["sortDefinitionsChange", "sortQueriesChange"] }, { kind: "component", type: AXPQueryViewsComponent, selector: "axp-query-views", inputs: ["views", "selectedView"], outputs: ["viewsChange", "selectedViewChange"] }, { kind: "component", type: AXPQueryColumnsComponent, selector: "axp-query-columns", inputs: ["columns"], outputs: ["columnsChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1394
|
+
}
|
|
1395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityMasterToolbarViewComponent, decorators: [{
|
|
1396
|
+
type: Component,
|
|
1397
|
+
args: [{ selector: 'axp-entity-master-toolbar-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1398
|
+
CommonModule,
|
|
1399
|
+
AXButtonModule,
|
|
1400
|
+
AXDecoratorModule,
|
|
1401
|
+
AXTranslationModule,
|
|
1402
|
+
AXPQueryFiltersComponent,
|
|
1403
|
+
AXPopoverModule,
|
|
1404
|
+
AXPQuerySortsComponent,
|
|
1405
|
+
AXPQueryViewsComponent,
|
|
1406
|
+
AXPQueryColumnsComponent,
|
|
1407
|
+
], host: {
|
|
1408
|
+
class: 'ax-w-full',
|
|
1409
|
+
}, template: "<!-- <axp-entity-view-toolbar [viewModel]=\"vm\"></axp-entity-view-toolbar> -->\n<axp-query-views\n id=\"axp-toolbar-view-selector\"\n [views]=\"viewQueries()\"\n [selectedView]=\"selectedViewQuery()\"\n (selectedViewChange)=\"onViewChanged($event)\"\n></axp-query-views>\n<div class=\"ax-flex ax-items-center ax-gap-2 ax-border-b ax-border-light w-full\">\n <!-- <axp-entity-filter-toolbar [viewModel]=\"vm\"></axp-entity-filter-toolbar> -->\n <axp-query-filters\n id=\"axp-toolbar-filters\"\n [filtersDefinitions]=\"filtersDefinitions()\"\n [initialFilters]=\"initialFilters()\"\n (onFiltersChanged)=\"onFiltersChanged($event)\"\n ></axp-query-filters>\n\n <div class=\"ax-flex ax-items-center ax-gap-2 md:ax-gap-2\">\n @if (filterTriggerMode === 'manual' && isFiltersDirty()) {\n <ax-button\n id=\"axp-toolbar-btn-filter\"\n [title]=\"'@general:actions.apply.title'\"\n [iconOnly]=\"true\"\n #filterButton\n [color]=\"'primary'\"\n (onClick)=\"applyFilters()\"\n >\n <ax-prefix>\n <i class=\"fa-light fa-search\"></i>\n </ax-prefix>\n </ax-button>\n }\n <div>\n <ax-button id=\"axp-toolbar-btn-columns\" [iconOnly]=\"true\" #columnButton [color]=\"'default'\">\n <i class=\"fa-light fa-table-columns\"></i>\n </ax-button>\n <ax-popover\n id=\"axp-popover-columns\"\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"10\"\n [target]=\"columnButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ '@general:terms.common.columns' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <axp-query-columns [columns]=\"vm.columns()\" (columnsChange)=\"onColumnsChange($event)\"></axp-query-columns>\n <!-- <axp-list-view-option-columns [viewModel]=\"vm\"></axp-list-view-option-columns> -->\n </div>\n </div>\n </ax-popover>\n </div>\n\n @if (vm.canSort()) {\n <div>\n <ax-button id=\"axp-toolbar-btn-sort\" [iconOnly]=\"true\" [text]=\"'Sorts'\" #sortButton [color]=\"'default'\">\n <i class=\"fa-light fa-sort-amount-up\"></i>\n </ax-button>\n <ax-popover\n id=\"axp-popover-sort\"\n [adaptivityEnabled]=\"true\"\n [offsetY]=\"10\"\n [target]=\"sortButton\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n #popover\n >\n <div class=\"ax-lightest-surface ax-shadow-md ax-border md:ax-w-72 ax-w-full ax-rounded-md\">\n <ax-header class=\"ax-border-b ax-lighter-surface ax-rounded-t-md ax-p-4 ax-font-bold\">\n {{ '@general:terms.common.sorts' | translate | async }}\n </ax-header>\n <div class=\"ax-py-2 ax-px-4\">\n <!-- <axp-list-view-option-sorting [viewModel]=\"vm\"></axp-list-view-option-sorting> -->\n <axp-query-sorts\n [sortDefinitions]=\"sortDefinitions()\"\n (sortQueriesChange)=\"onSortQueriesChange($event)\"\n [initialSortQueries]=\"sortQueries()\"\n ></axp-query-sorts>\n </div>\n </div>\n </ax-popover>\n </div>\n }\n @if (deviceService.isSmall()) {\n <ax-button\n id=\"axp-toolbar-btn-category\"\n (onClick)=\"parent.toggleCategoryDrawer()\"\n [iconOnly]=\"true\"\n [color]=\"'default'\"\n >\n <i class=\"fa-light fa-bars\"></i>\n </ax-button>\n }\n </div>\n</div>\n" }]
|
|
1410
|
+
}], propDecorators: { vm: [{
|
|
1411
|
+
type: Input,
|
|
1412
|
+
args: ['viewModel']
|
|
1413
|
+
}] } });
|
|
1414
|
+
|
|
1415
|
+
class AXPEntityMasterListViewComponent extends AXPPageLayoutBaseComponent {
|
|
1416
|
+
constructor(platform) {
|
|
1417
|
+
super();
|
|
1418
|
+
this.platform = platform;
|
|
1419
|
+
this.activeRoute = inject(ActivatedRoute);
|
|
1420
|
+
this.router = inject(Router);
|
|
1421
|
+
this.vm = this.activeRoute.snapshot.data['vm'];
|
|
1422
|
+
//
|
|
1423
|
+
this.store = inject(AXPLayoutThemeService);
|
|
1424
|
+
//
|
|
1425
|
+
this.searchBarShown = signal(true, ...(ngDevMode ? [{ debugName: "searchBarShown" }] : /* istanbul ignore next */ []));
|
|
1426
|
+
this.activeEndSideView = signal('column', ...(ngDevMode ? [{ debugName: "activeEndSideView" }] : /* istanbul ignore next */ []));
|
|
1427
|
+
this.categorySearchValue = signal('', ...(ngDevMode ? [{ debugName: "categorySearchValue" }] : /* istanbul ignore next */ []));
|
|
1428
|
+
// @ViewChild('grid', { static: true}) grid: AXDataTableComponent;
|
|
1429
|
+
this.grid = viewChild('grid', ...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
|
|
1430
|
+
this.initializedFromRoute = false;
|
|
1431
|
+
this.commandRowItems = computed(() => {
|
|
1432
|
+
return this.vm.primaryRowActions().map((c) => {
|
|
1433
|
+
return {
|
|
1434
|
+
icon: c.icon,
|
|
1435
|
+
name: c.name,
|
|
1436
|
+
text: translateSync(c.title),
|
|
1437
|
+
color: c.color,
|
|
1438
|
+
disabled: c.disabled,
|
|
1439
|
+
default: c.default,
|
|
1440
|
+
};
|
|
1441
|
+
});
|
|
1442
|
+
}, ...(ngDevMode ? [{ debugName: "commandRowItems" }] : /* istanbul ignore next */ []));
|
|
1443
|
+
this.getDropdownRowItems = (rowData) => {
|
|
1444
|
+
return Promise.resolve(this.dropdownRowItems(rowData));
|
|
1445
|
+
};
|
|
1446
|
+
this.getCommandRowItems = () => {
|
|
1447
|
+
return this.commandRowItems();
|
|
1448
|
+
};
|
|
1449
|
+
effect(() => {
|
|
1450
|
+
if (this.grid()) {
|
|
1451
|
+
this.grid().selectedRows = this.vm.selectedItems();
|
|
1452
|
+
}
|
|
1453
|
+
});
|
|
1454
|
+
//
|
|
1455
|
+
this.vm.events$.subscribe(async (e) => {
|
|
1456
|
+
const refreshTargetId = e.meta?.refreshTargetId;
|
|
1457
|
+
const resetPagination = e.meta?.resetPagination === true;
|
|
1458
|
+
if (e.action == 'refresh') {
|
|
1459
|
+
if (refreshTargetId) {
|
|
1460
|
+
await this.grid()?.refreshItemChildren(refreshTargetId);
|
|
1461
|
+
this.updateParentHasChildAfterRefresh(refreshTargetId);
|
|
1462
|
+
}
|
|
1463
|
+
else {
|
|
1464
|
+
this.grid()?.refresh({
|
|
1465
|
+
reset: resetPagination,
|
|
1466
|
+
});
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
});
|
|
1470
|
+
// Keep URL query param `view` in sync with current vm view
|
|
1471
|
+
effect(() => {
|
|
1472
|
+
if (!this.initializedFromRoute) {
|
|
1473
|
+
return;
|
|
1474
|
+
}
|
|
1475
|
+
const currentViewName = this.vm.view().name;
|
|
1476
|
+
const urlView = this.activeRoute.snapshot.queryParamMap.get('view');
|
|
1477
|
+
if (currentViewName && currentViewName !== urlView) {
|
|
1478
|
+
this.router.navigate([], {
|
|
1479
|
+
relativeTo: this.activeRoute,
|
|
1480
|
+
queryParams: { view: currentViewName },
|
|
1481
|
+
queryParamsHandling: 'merge',
|
|
1482
|
+
replaceUrl: true,
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
});
|
|
1486
|
+
}
|
|
1487
|
+
async ngOnInit() {
|
|
1488
|
+
// React to external URL changes (back/forward navigation or deep links)
|
|
1489
|
+
this.queryParamSub = this.activeRoute.queryParamMap.subscribe(async (qp) => {
|
|
1490
|
+
const viewFromUrl = qp.get('view');
|
|
1491
|
+
await this.vm.setView(viewFromUrl);
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
async ngAfterViewInit() {
|
|
1495
|
+
const viewFromUrl = this.activeRoute.snapshot.queryParamMap.get('view');
|
|
1496
|
+
await this.vm.setView(viewFromUrl);
|
|
1497
|
+
const resolvedView = this.vm.view().name;
|
|
1498
|
+
const currentUrlView = this.activeRoute.snapshot.queryParamMap.get('view');
|
|
1499
|
+
if (currentUrlView !== resolvedView) {
|
|
1500
|
+
this.router.navigate([], {
|
|
1501
|
+
relativeTo: this.activeRoute,
|
|
1502
|
+
queryParams: { view: resolvedView },
|
|
1503
|
+
queryParamsHandling: 'merge',
|
|
1504
|
+
replaceUrl: true,
|
|
1505
|
+
});
|
|
1506
|
+
}
|
|
1507
|
+
this.initializedFromRoute = true;
|
|
1508
|
+
}
|
|
1509
|
+
onColumnSizeChanged(e) {
|
|
1510
|
+
if (e.isUserInteraction && e.type === 'end') {
|
|
1511
|
+
this.vm.saveSettings('columnSizes', e.data);
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
onPageChanged(e) {
|
|
1515
|
+
if (e.isUserInteraction) {
|
|
1516
|
+
const pageSizeChanged = e.take != this.vm.dataSource.pageSize;
|
|
1517
|
+
if (pageSizeChanged) {
|
|
1518
|
+
this.vm.saveSettings('pageSize', e.take);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
onColumnsOrderChanged(e) {
|
|
1523
|
+
if (e.isUserInteraction) {
|
|
1524
|
+
this.vm.onColumnsOrderChanged(e.data.event);
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
async dropdownRowItems(rowData) {
|
|
1528
|
+
return (await this.vm.secondaryRowActions(rowData)).map((c) => ({
|
|
1529
|
+
icon: c.icon,
|
|
1530
|
+
name: c.name,
|
|
1531
|
+
text: c.title,
|
|
1532
|
+
color: c.color,
|
|
1533
|
+
disabled: c.disabled,
|
|
1534
|
+
default: c.default,
|
|
1535
|
+
divided: c.separated,
|
|
1536
|
+
}));
|
|
1537
|
+
}
|
|
1538
|
+
async handleRowDbClick(e) {
|
|
1539
|
+
if (this.grid()?.dataSource.isLoading) {
|
|
1540
|
+
return;
|
|
1541
|
+
}
|
|
1542
|
+
const allItems = [...this.commandRowItems(), ...(await this.dropdownRowItems(e.data))];
|
|
1543
|
+
// const defaultAction = allItems.find((c) => (c as any).default) || allItems[0];
|
|
1544
|
+
const defaultAction = allItems.find((c) => {
|
|
1545
|
+
const commandName = c.name.split('&')[0];
|
|
1546
|
+
return (c.default || commandName === 'open-entity') && !c.disabled;
|
|
1547
|
+
});
|
|
1548
|
+
if (!defaultAction) {
|
|
1549
|
+
return;
|
|
1550
|
+
}
|
|
1551
|
+
const d = {
|
|
1552
|
+
component: e.component,
|
|
1553
|
+
name: defaultAction.name,
|
|
1554
|
+
data: e.data,
|
|
1555
|
+
};
|
|
1556
|
+
this.handleRowCommandClick(d);
|
|
1557
|
+
}
|
|
1558
|
+
async handleRowCommandClick(e) {
|
|
1559
|
+
if (this.grid()?.dataSource.isLoading) {
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
if (e.setLoading) {
|
|
1563
|
+
e.setLoading(true);
|
|
1564
|
+
}
|
|
1565
|
+
await this.vm.executeCommand(e.name, e.data);
|
|
1566
|
+
if (e.setLoading) {
|
|
1567
|
+
e.setLoading(false);
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
async handleSelectedRowsChange(rows) {
|
|
1571
|
+
this.vm.selectedItems.set(rows);
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* After refreshing a row's children (e.g. when a new child was created), update the parent row's
|
|
1575
|
+
* hasChild so the expand icon is shown. The list query sets hasChild from childrenCount only on
|
|
1576
|
+
* initial load; refreshItemChildren does not re-fetch the parent, so we patch it here.
|
|
1577
|
+
*/
|
|
1578
|
+
updateParentHasChildAfterRefresh(parentId) {
|
|
1579
|
+
const gridRef = this.grid();
|
|
1580
|
+
const ds = gridRef?.dataSource;
|
|
1581
|
+
if (!ds?.cachedItems?.length) {
|
|
1582
|
+
return;
|
|
1583
|
+
}
|
|
1584
|
+
const key = ds.config?.key ?? 'id';
|
|
1585
|
+
const parent = this.findItemById(ds.cachedItems, String(parentId), key);
|
|
1586
|
+
if (parent && typeof parent === 'object') {
|
|
1587
|
+
parent['hasChild'] = true;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
findItemById(items, id, key) {
|
|
1591
|
+
for (const item of items) {
|
|
1592
|
+
if (item && typeof item === 'object' && String(item[key]) === id) {
|
|
1593
|
+
return item;
|
|
1594
|
+
}
|
|
1595
|
+
const rec = item;
|
|
1596
|
+
const metaChildren = rec?.['__meta__']?.['children'];
|
|
1597
|
+
const directChildren = rec?.['children'];
|
|
1598
|
+
const childArr = Array.isArray(metaChildren)
|
|
1599
|
+
? metaChildren
|
|
1600
|
+
: Array.isArray(directChildren)
|
|
1601
|
+
? directChildren
|
|
1602
|
+
: null;
|
|
1603
|
+
if (childArr?.length) {
|
|
1604
|
+
const found = this.findItemById(childArr, id, key);
|
|
1605
|
+
if (found)
|
|
1606
|
+
return found;
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
return null;
|
|
1610
|
+
}
|
|
1611
|
+
makeResponsive(value) {
|
|
1612
|
+
if (this.platform.is('Mobile') || this.platform.is('SM')) {
|
|
1613
|
+
return '';
|
|
1614
|
+
}
|
|
1615
|
+
else {
|
|
1616
|
+
return value;
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
toggleSideBar(sideBar) {
|
|
1620
|
+
this.toggleEndSide();
|
|
1621
|
+
if (sideBar) {
|
|
1622
|
+
this.activeEndSideView.set(sideBar);
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
toggleSearchBar() {
|
|
1626
|
+
this.searchBarShown.update((v) => !v);
|
|
1627
|
+
}
|
|
1628
|
+
handleResetClick(sideBar) {
|
|
1629
|
+
switch (sideBar) {
|
|
1630
|
+
case 'filter': {
|
|
1631
|
+
this.vm.resetFilters();
|
|
1632
|
+
break;
|
|
1633
|
+
}
|
|
1634
|
+
case 'sort': {
|
|
1635
|
+
this.vm.resetSorts();
|
|
1636
|
+
break;
|
|
1637
|
+
}
|
|
1638
|
+
case 'column': {
|
|
1639
|
+
this.vm.resetColumns();
|
|
1640
|
+
break;
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
// protected handleDiscardClick(sideBar: 'filter' | 'sort' | 'column') {
|
|
1645
|
+
// switch (sideBar) {
|
|
1646
|
+
// case 'filter': {
|
|
1647
|
+
// this.vm.discardFilters();
|
|
1648
|
+
// break;
|
|
1649
|
+
// }
|
|
1650
|
+
// case 'sort': {
|
|
1651
|
+
// this.vm.resetSorts();
|
|
1652
|
+
// break;
|
|
1653
|
+
// }
|
|
1654
|
+
// case 'column': {
|
|
1655
|
+
// this.vm.resetColumns();
|
|
1656
|
+
// break;
|
|
1657
|
+
// }
|
|
1658
|
+
// }
|
|
1659
|
+
// }
|
|
1660
|
+
handleApplyClick(sideBar) {
|
|
1661
|
+
this.vm.applyFilterAndSort();
|
|
1662
|
+
this.toggleEndSide();
|
|
1663
|
+
}
|
|
1664
|
+
ngOnDestroy() {
|
|
1665
|
+
this.queryParamSub?.unsubscribe();
|
|
1666
|
+
this.vm.destroy();
|
|
1667
|
+
}
|
|
1668
|
+
toggleCategoryDrawer() {
|
|
1669
|
+
this.toggleStartSide();
|
|
1670
|
+
}
|
|
1671
|
+
getPageTitle() {
|
|
1672
|
+
return this.vm.title();
|
|
1673
|
+
}
|
|
1674
|
+
async getPageDescription() {
|
|
1675
|
+
const description = this.vm.description();
|
|
1676
|
+
if (description) {
|
|
1677
|
+
return this.translateService.translateAsync(description);
|
|
1678
|
+
}
|
|
1679
|
+
return '';
|
|
1680
|
+
}
|
|
1681
|
+
getPageBreadcrumbs() {
|
|
1682
|
+
return this.vm.beardcrumbs();
|
|
1683
|
+
}
|
|
1684
|
+
async getPrimaryMenuItems() {
|
|
1685
|
+
return (await this.vm.getPrimaryActions())
|
|
1686
|
+
.filter((tr) => !tr.isChild)
|
|
1687
|
+
.map((tr) => ({
|
|
1688
|
+
name: tr.name,
|
|
1689
|
+
title: tr.title,
|
|
1690
|
+
icon: tr.icon,
|
|
1691
|
+
color: tr.color,
|
|
1692
|
+
disabled: tr.disabled,
|
|
1693
|
+
items: tr.items?.map((sub) => ({
|
|
1694
|
+
name: sub.name,
|
|
1695
|
+
title: sub.title,
|
|
1696
|
+
icon: sub.icon,
|
|
1697
|
+
color: sub.color,
|
|
1698
|
+
disabled: sub.disabled,
|
|
1699
|
+
command: {
|
|
1700
|
+
name: sub.name,
|
|
1701
|
+
options: sub.options,
|
|
1702
|
+
metadata: sub.metadata,
|
|
1703
|
+
},
|
|
1704
|
+
})),
|
|
1705
|
+
command: {
|
|
1706
|
+
name: tr.name,
|
|
1707
|
+
options: tr.options,
|
|
1708
|
+
metadata: tr.metadata,
|
|
1709
|
+
},
|
|
1710
|
+
}));
|
|
1711
|
+
}
|
|
1712
|
+
async getSecondaryMenuItems() {
|
|
1713
|
+
return (await this.vm.getSecondaryActions()).map((tr) => ({
|
|
1714
|
+
name: tr.name,
|
|
1715
|
+
title: tr.title,
|
|
1716
|
+
icon: tr.icon,
|
|
1717
|
+
color: tr.color,
|
|
1718
|
+
disabled: tr.disabled,
|
|
1719
|
+
separated: tr.separated,
|
|
1720
|
+
command: {
|
|
1721
|
+
name: tr.name,
|
|
1722
|
+
options: tr.options,
|
|
1723
|
+
metadata: tr.metadata,
|
|
1724
|
+
},
|
|
1725
|
+
}));
|
|
1726
|
+
}
|
|
1727
|
+
async execute(command) {
|
|
1728
|
+
if (command) {
|
|
1729
|
+
this.vm.execute(command);
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
handleUnselectAll() {
|
|
1733
|
+
this.vm.selectedItems.set([]);
|
|
1734
|
+
}
|
|
1735
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityMasterListViewComponent, deps: [{ token: i1$2.AXPlatform }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1736
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityMasterListViewComponent, isStandalone: true, selector: "axp-entity-master-list", providers: [
|
|
1737
|
+
{
|
|
1738
|
+
provide: AXPPageLayoutBase,
|
|
1739
|
+
useExisting: AXPEntityMasterListViewComponent,
|
|
1740
|
+
},
|
|
1741
|
+
], viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n @if (vm.entityDef.category) {\n <axp-layout-start-side id=\"axp-entity-category-drawer\">\n <axp-entity-category id=\"axp-entity-category\" class=\"ax-w-80\" [vm]=\"vm\"\n [searchValue]=\"categorySearchValue()\"></axp-entity-category>\n </axp-layout-start-side>\n }\n <axp-page-toolbar id=\"axp-entity-toolbar\">\n <axp-entity-master-toolbar-view [viewModel]=\"vm\"></axp-entity-master-toolbar-view>\n </axp-page-toolbar>\n <axp-page-content class=\"ax-overflow-auto ax-pt-0\">\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-1 ax-pb-1 ax-text-muted ax-text-sm\"\n [class.ax-invisible]=\"!grid.selectedRows.length\">\n <span>{{ grid.selectedRows.length }}\n <span>{{ '@general:terms.interface.items-selected' | translate | async }}</span>\n </span>\n <ax-button text=\"@general:terms.interface.unselect-all\" class=\"ax-xs\" (onClick)=\"handleUnselectAll()\"></ax-button>\n </div>\n <ax-data-table id=\"axp-entity-table\" [allowReordering]=\"true\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\" #grid [showFooter]=\"false\" class=\"ax-flex-1\"\n [paging]=\"true\" [fetchDataMode]=\"'manual'\" [parentField]=\"vm.parentKey()\"\n [loading]=\"{ enabled: true, animation: true }\" [dataSource]=\"vm.dataSource\"\n (selectedRowsChange)=\"handleSelectedRowsChange($event)\" (onRowDbClick)=\"handleRowDbClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\" (onPageChanged)=\"onPageChanged($event)\">\n @if (vm.view().indexCol === true) {\n <ax-index-column id=\"axp-table-col-index\" fixed=\"start\" [width]=\"'80px'\" [padZero]=\"true\"></ax-index-column>\n }\n @if (vm.selectedScopeActionsCount()) {\n <ax-select-column id=\"axp-table-col-select\" fixed=\"start\" [width]=\"'60px'\"></ax-select-column>\n }\n @for (col of vm.columns(); track col.name) {\n @if (col.visible) {\n <axp-widget-column-renderer [attr.id]=\"'axp-table-col-' + col.name\"\n [expandHandler]=\"$index === 0 && vm.parentKey() ? true : false\" [caption]=\"(col.title | translate | async)!\"\n [node]=\"col.node()\" [customWidth]=\"col.width\"></axp-widget-column-renderer>\n }\n }\n @if (getCommandRowItems().length) {\n <ax-command-column id=\"axp-table-col-commands\" fixed=\"end\" [width]=\"getCommandRowItems().length * 70 + 'px'\"\n [items]=\"getCommandRowItems()\" (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n }\n <ax-dropdown-command-column id=\"axp-table-col-dropdown-commands\" fixed=\"end\" [width]=\"'60px'\"\n [items]=\"getDropdownRowItems\" (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n </ax-data-table>\n </axp-page-content>\n</axp-page-layout>", styles: ["axp-entity-master-list axp-layout-start-side{min-width:20rem!important;border-inline-end-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-entity-master-list axp-layout-header{padding-bottom:.25rem!important}.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}.view-drawer{width:85vw}@media(min-width:768px){.view-drawer{width:45vw}}@media(min-width:1024px){.view-drawer{width:35vw}}@media(min-width:1536px){.view-drawer{width:20vw}}.view-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));border-inline-start-width:1px;border-inline-start-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));border-top-width:1px;--tw-border-opacity: 1;border-top-color:rgba(var(--ax-sys-color-primary-600),var(--tw-border-opacity, 1))}.view-drawer ax-header{display:flex;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1));padding:.5rem 1rem}.view-drawer ax-header h2{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lighter-surface),var(--tw-text-opacity, 1))}.view-drawer ax-footer{position:absolute!important;bottom:0!important;width:100%!important;justify-content:flex-start!important;border-top-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1))!important;padding:.5rem 1rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXActionSheetModule }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "ngmodule", type: AXDialogModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXTooltipModule }, { kind: "ngmodule", type: AXBreadcrumbsModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i7.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "hasChildrenField", "rowDetailsTemplate", "title", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i7.AXRowIndexColumnComponent, selector: "ax-index-column", inputs: ["width", "caption", "fixed", "footerTemplate", "padZero"] }, { kind: "component", type: i7.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed"] }, { kind: "component", type: i7.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i7.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "emptyStateTemplate", "emptyStateText", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i10.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type:
|
|
1742
|
+
//
|
|
1743
|
+
AXPWidgetCoreModule }, { kind: "component", type: i7$1.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXPWidgetsModule }, { kind: "ngmodule", type: AXPAuthModule }, { kind: "component", type:
|
|
1744
|
+
//
|
|
1745
|
+
AXPEntityMasterToolbarViewComponent, selector: "axp-entity-master-toolbar-view", inputs: ["viewModel"] }, { kind: "component", type:
|
|
1746
|
+
//
|
|
1747
|
+
AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPThemeLayoutStartSideComponent, selector: "axp-layout-page-start-side, axp-layout-start-side" }, { kind: "component", type: AXPEntityCategoryComponent, selector: "axp-entity-category", inputs: ["vm", "searchValue", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "searchWithChildren"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1748
|
+
}
|
|
1749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityMasterListViewComponent, decorators: [{
|
|
1750
|
+
type: Component,
|
|
1751
|
+
args: [{ selector: 'axp-entity-master-list', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1752
|
+
CommonModule,
|
|
1753
|
+
FormsModule,
|
|
1754
|
+
RouterModule,
|
|
1755
|
+
AXButtonModule,
|
|
1756
|
+
AXDecoratorModule,
|
|
1757
|
+
AXBadgeModule,
|
|
1758
|
+
AXDropdownModule,
|
|
1759
|
+
AXPopoverModule,
|
|
1760
|
+
AXFormModule,
|
|
1761
|
+
AXActionSheetModule,
|
|
1762
|
+
AXDrawerModule,
|
|
1763
|
+
AXDialogModule,
|
|
1764
|
+
AXLoadingModule,
|
|
1765
|
+
AXTabsModule,
|
|
1766
|
+
AXTooltipModule,
|
|
1767
|
+
AXBreadcrumbsModule,
|
|
1768
|
+
AXDropdownButtonModule,
|
|
1769
|
+
AXSearchBoxModule,
|
|
1770
|
+
AXDataTableModule,
|
|
1771
|
+
AXTranslationModule,
|
|
1772
|
+
DragDropModule,
|
|
1773
|
+
//
|
|
1774
|
+
AXPWidgetCoreModule,
|
|
1775
|
+
AXPWidgetsModule,
|
|
1776
|
+
AXPAuthModule,
|
|
1777
|
+
//
|
|
1778
|
+
AXPEntityMasterToolbarViewComponent,
|
|
1779
|
+
//
|
|
1780
|
+
AXPPageLayoutComponent,
|
|
1781
|
+
AXPThemeLayoutBlockComponent,
|
|
1782
|
+
AXDropdownButtonModule,
|
|
1783
|
+
AXPThemeLayoutStartSideComponent,
|
|
1784
|
+
AXPEntityCategoryComponent,
|
|
1785
|
+
], providers: [
|
|
1786
|
+
{
|
|
1787
|
+
provide: AXPPageLayoutBase,
|
|
1788
|
+
useExisting: AXPEntityMasterListViewComponent,
|
|
1789
|
+
},
|
|
1790
|
+
], template: "<axp-page-layout *translate=\"let t\">\n @if (vm.entityDef.category) {\n <axp-layout-start-side id=\"axp-entity-category-drawer\">\n <axp-entity-category id=\"axp-entity-category\" class=\"ax-w-80\" [vm]=\"vm\"\n [searchValue]=\"categorySearchValue()\"></axp-entity-category>\n </axp-layout-start-side>\n }\n <axp-page-toolbar id=\"axp-entity-toolbar\">\n <axp-entity-master-toolbar-view [viewModel]=\"vm\"></axp-entity-master-toolbar-view>\n </axp-page-toolbar>\n <axp-page-content class=\"ax-overflow-auto ax-pt-0\">\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-1 ax-pb-1 ax-text-muted ax-text-sm\"\n [class.ax-invisible]=\"!grid.selectedRows.length\">\n <span>{{ grid.selectedRows.length }}\n <span>{{ '@general:terms.interface.items-selected' | translate | async }}</span>\n </span>\n <ax-button text=\"@general:terms.interface.unselect-all\" class=\"ax-xs\" (onClick)=\"handleUnselectAll()\"></ax-button>\n </div>\n <ax-data-table id=\"axp-entity-table\" [allowReordering]=\"true\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\" #grid [showFooter]=\"false\" class=\"ax-flex-1\"\n [paging]=\"true\" [fetchDataMode]=\"'manual'\" [parentField]=\"vm.parentKey()\"\n [loading]=\"{ enabled: true, animation: true }\" [dataSource]=\"vm.dataSource\"\n (selectedRowsChange)=\"handleSelectedRowsChange($event)\" (onRowDbClick)=\"handleRowDbClick($event)\"\n (onColumnSizeChanged)=\"onColumnSizeChanged($event)\" (onPageChanged)=\"onPageChanged($event)\">\n @if (vm.view().indexCol === true) {\n <ax-index-column id=\"axp-table-col-index\" fixed=\"start\" [width]=\"'80px'\" [padZero]=\"true\"></ax-index-column>\n }\n @if (vm.selectedScopeActionsCount()) {\n <ax-select-column id=\"axp-table-col-select\" fixed=\"start\" [width]=\"'60px'\"></ax-select-column>\n }\n @for (col of vm.columns(); track col.name) {\n @if (col.visible) {\n <axp-widget-column-renderer [attr.id]=\"'axp-table-col-' + col.name\"\n [expandHandler]=\"$index === 0 && vm.parentKey() ? true : false\" [caption]=\"(col.title | translate | async)!\"\n [node]=\"col.node()\" [customWidth]=\"col.width\"></axp-widget-column-renderer>\n }\n }\n @if (getCommandRowItems().length) {\n <ax-command-column id=\"axp-table-col-commands\" fixed=\"end\" [width]=\"getCommandRowItems().length * 70 + 'px'\"\n [items]=\"getCommandRowItems()\" (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n }\n <ax-dropdown-command-column id=\"axp-table-col-dropdown-commands\" fixed=\"end\" [width]=\"'60px'\"\n [items]=\"getDropdownRowItems\" (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n </ax-data-table>\n </axp-page-content>\n</axp-page-layout>", styles: ["axp-entity-master-list axp-layout-start-side{min-width:20rem!important;border-inline-end-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface))}axp-entity-master-list axp-layout-header{padding-bottom:.25rem!important}.cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}.view-drawer{width:85vw}@media(min-width:768px){.view-drawer{width:45vw}}@media(min-width:1024px){.view-drawer{width:35vw}}@media(min-width:1536px){.view-drawer{width:20vw}}.view-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));border-inline-start-width:1px;border-inline-start-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));border-top-width:1px;--tw-border-opacity: 1;border-top-color:rgba(var(--ax-sys-color-primary-600),var(--tw-border-opacity, 1))}.view-drawer ax-header{display:flex;align-items:center;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lighter-surface),var(--tw-bg-opacity, 1));padding:.5rem 1rem}.view-drawer ax-header h2{font-size:1.25rem;line-height:1.75rem;font-weight:700;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lighter-surface),var(--tw-text-opacity, 1))}.view-drawer ax-footer{position:absolute!important;bottom:0!important;width:100%!important;justify-content:flex-start!important;border-top-width:1px!important;--tw-border-opacity: 1 !important;border-color:rgba(var(--ax-sys-color-border-lightest-surface),var(--tw-border-opacity, 1))!important;padding:.5rem 1rem!important}\n"] }]
|
|
1791
|
+
}], ctorParameters: () => [{ type: i1$2.AXPlatform }], propDecorators: { grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
|
|
1792
|
+
|
|
1793
|
+
var entityMasterListView_component = /*#__PURE__*/Object.freeze({
|
|
1794
|
+
__proto__: null,
|
|
1795
|
+
AXPEntityMasterListViewComponent: AXPEntityMasterListViewComponent
|
|
1796
|
+
});
|
|
1797
|
+
|
|
192
1798
|
class AXPRootLayoutFooterComponent {
|
|
193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
194
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1799
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1800
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPRootLayoutFooterComponent, isStandalone: true, selector: "axp-dashboard-admin-footer", host: { classAttribute: "ax-h-10 ax-flex ax-item-center ax-justify-between ax-bg-lighter ax-border-lighter ax-px-6 ax-border-t" }, providers: [], ngImport: i0, template: "<div class=\"ax-flex ax-items-center ax-justify-start ax-gap-1\">\n <axp-component-slot name=\"root-footer-start\"></axp-component-slot>\n</div>\n<div class=\"ax-flex ax-items-center ax-justify-end ax-gap-1\">\n <axp-component-slot name=\"root-footer-end\"></axp-component-slot>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AXPComponentSlotModule }, { kind: "directive", type: i1$3.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
195
1801
|
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutFooterComponent, decorators: [{
|
|
197
1803
|
type: Component,
|
|
198
|
-
args: [{ selector: 'axp-dashboard-admin-footer', encapsulation: ViewEncapsulation.None, providers: [], host: {
|
|
1804
|
+
args: [{ selector: 'axp-dashboard-admin-footer', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [], host: {
|
|
199
1805
|
class: 'ax-h-10 ax-flex ax-item-center ax-justify-between ax-bg-lighter ax-border-lighter ax-px-6 ax-border-t',
|
|
200
1806
|
}, standalone: true, imports: [
|
|
201
1807
|
AXPComponentSlotModule
|
|
@@ -215,12 +1821,12 @@ class AXPRootLayoutHeaderComponent {
|
|
|
215
1821
|
handleLogoClick() {
|
|
216
1822
|
this.router.navigate(['/']);
|
|
217
1823
|
}
|
|
218
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
219
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1824
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1825
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRootLayoutHeaderComponent, isStandalone: true, selector: "axp-dashboard-admin-header", host: { classAttribute: "ax-w-full ax-flex ax-items-center ax-justify-between ax-bg-primary-surface ax-text-primary-on-surface ax-h-14 ax-px-2 ax-light" }, ngImport: i0, template: "<ax-button id=\"axp-menu-toggle\" (onClick)=\"toggleSideMenu()\" color=\"primary\">\n <ax-icon class=\"rtl:ax-rotate-180\">\n <svg width=\"28\" height=\"28\" viewBox=\"0 0 30 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n @if (store.isSideMenuOpen()) {\n <defs>\n <clipPath id=\"clip1382_20239\">\n <rect width=\"30.000000\" height=\"30.000000\" fill=\"white\" fill-opacity=\"0\"></rect>\n </clipPath>\n </defs>\n <rect width=\"30.000000\" height=\"30.000000\" fill=\"#FFFFFF\" fill-opacity=\"0\"></rect>\n <g clip-path=\"url(#clip1382_20239)\">\n <rect\n id=\"rect\"\n x=\"17.420410\"\n y=\"12.316406\"\n rx=\"1.000947\"\n width=\"5.995172\"\n height=\"2.001895\"\n transform=\"rotate(137.159 17.420410 12.316406)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <rect\n id=\"rect\"\n x=\"12.959473\"\n y=\"13.728516\"\n rx=\"0.995190\"\n width=\"6.002943\"\n height=\"1.990380\"\n transform=\"rotate(40.853 12.959473 13.728516)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <path\n id=\"path\"\n d=\"M20.1 25.5L9.9 25.51C9.48 25.51 9.06 25.47 8.65 25.39C8.24 25.3 7.84 25.18 7.45 25.02C7.06 24.86 6.69 24.66 6.34 24.43C5.99 24.19 5.67 23.92 5.37 23.63C5.07 23.33 4.81 23 4.58 22.65C4.34 22.3 4.15 21.93 3.98 21.54C3.82 21.15 3.7 20.75 3.62 20.34C3.54 19.93 3.5 19.51 3.5 19.09L3.5 10.93C3.5 10.51 3.54 10.1 3.62 9.68C3.7 9.27 3.82 8.87 3.98 8.48C4.15 8.09 4.34 7.72 4.58 7.37C4.81 7.02 5.07 6.69 5.37 6.39C5.67 6.1 5.99 5.83 6.34 5.6C6.69 5.36 7.06 5.16 7.45 5C7.84 4.84 8.24 4.72 8.65 4.64C9.06 4.55 9.48 4.51 9.9 4.51L20.1 4.5C20.52 4.5 20.94 4.54 21.35 4.62C21.76 4.7 22.16 4.83 22.55 4.99C22.94 5.15 23.31 5.35 23.66 5.58C24 5.82 24.33 6.08 24.62 6.38C24.92 6.68 25.19 7 25.42 7.35C25.65 7.7 25.85 8.07 26.01 8.46C26.17 8.85 26.3 9.25 26.38 9.67C26.46 10.08 26.5 10.5 26.5 10.92L26.5 19.07C26.5 19.5 26.46 19.91 26.38 20.32C26.3 20.74 26.17 21.14 26.01 21.53C25.85 21.92 25.65 22.29 25.42 22.64C25.19 22.99 24.92 23.31 24.62 23.61C24.33 23.91 24 24.17 23.66 24.41C23.31 24.64 22.94 24.84 22.55 25C22.16 25.16 21.76 25.29 21.35 25.37C20.94 25.45 20.52 25.5 20.1 25.5ZM9.9 6.6C9.61 6.6 9.33 6.63 9.05 6.69C8.78 6.74 8.51 6.82 8.24 6.93C7.98 7.04 7.73 7.18 7.5 7.33C7.26 7.49 7.04 7.67 6.84 7.87C6.64 8.07 6.46 8.29 6.31 8.53C6.15 8.77 6.02 9.01 5.91 9.28C5.8 9.54 5.72 9.81 5.66 10.09C5.61 10.37 5.58 10.65 5.58 10.93L5.58 19.09C5.58 19.37 5.61 19.65 5.66 19.93C5.72 20.21 5.8 20.48 5.91 20.74C6.02 21.01 6.15 21.26 6.31 21.49C6.46 21.73 6.64 21.95 6.84 22.15C7.04 22.35 7.26 22.53 7.5 22.69C7.73 22.85 7.98 22.98 8.24 23.09C8.51 23.2 8.78 23.28 9.05 23.33C9.33 23.39 9.61 23.42 9.9 23.42L20.1 23.41C20.38 23.41 20.67 23.37 20.94 23.32C21.22 23.26 21.49 23.18 21.75 23.07C22.01 22.96 22.26 22.83 22.5 22.67C22.73 22.51 22.95 22.33 23.15 22.13C23.35 21.93 23.53 21.71 23.69 21.48C23.85 21.24 23.98 20.99 24.09 20.73C24.2 20.47 24.28 20.2 24.33 19.92C24.39 19.64 24.42 19.36 24.42 19.07L24.42 10.92C24.42 10.64 24.39 10.35 24.33 10.07C24.28 9.79 24.2 9.52 24.09 9.26C23.98 9 23.85 8.75 23.69 8.51C23.53 8.28 23.35 8.06 23.15 7.86C22.95 7.66 22.73 7.48 22.5 7.32C22.26 7.16 22.01 7.03 21.75 6.92C21.49 6.81 21.22 6.73 20.94 6.67C20.67 6.62 20.38 6.59 20.1 6.59L9.9 6.6Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"nonzero\"\n ></path>\n <path\n id=\"rect\"\n d=\"M8.5 5.51L10.54 5.51L10.6 24.43L8.55 24.43L8.5 5.51Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"evenodd\"\n ></path>\n </g>\n } @else {\n <defs>\n <clipPath id=\"clip1381_20236\">\n <rect id=\"\u6253\u5F00\u8FB9\u680F0730\" width=\"30.000000\" height=\"30.000000\" fill=\"white\" fill-opacity=\"0\"></rect>\n </clipPath>\n </defs>\n <rect id=\"\u6253\u5F00\u8FB9\u680F0730\" width=\"30.000000\" height=\"30.000000\" fill=\"#FFFFFF\" fill-opacity=\"0\"></rect>\n <g clip-path=\"url(#clip1381_20236)\">\n <rect\n id=\"rect\"\n x=\"11.572754\"\n y=\"17.683594\"\n rx=\"1.000947\"\n width=\"5.995172\"\n height=\"2.001895\"\n transform=\"rotate(-42.841 11.572754 17.683594)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <rect\n id=\"rect\"\n x=\"16.033691\"\n y=\"16.271484\"\n rx=\"0.995190\"\n width=\"6.002943\"\n height=\"1.990380\"\n transform=\"rotate(-139.147 16.033691 16.271484)\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n ></rect>\n <path\n id=\"path\"\n d=\"M20.09 25.48L9.89 25.5C9.47 25.5 9.05 25.45 8.64 25.37C8.23 25.29 7.83 25.17 7.44 25C7.05 24.84 6.68 24.64 6.33 24.41C5.98 24.18 5.66 23.91 5.36 23.61C5.07 23.31 4.8 22.99 4.57 22.64C4.34 22.29 4.14 21.92 3.98 21.53C3.82 21.14 3.69 20.74 3.61 20.32C3.53 19.91 3.49 19.49 3.49 19.07L3.49 10.92C3.49 10.5 3.53 10.08 3.61 9.67C3.69 9.25 3.82 8.85 3.98 8.46C4.14 8.07 4.34 7.7 4.57 7.35C4.8 7 5.07 6.68 5.36 6.38C5.66 6.08 5.98 5.81 6.33 5.58C6.68 5.35 7.05 5.15 7.44 4.99C7.83 4.82 8.23 4.7 8.64 4.62C9.05 4.54 9.47 4.5 9.89 4.5L20.09 4.48C20.51 4.48 20.93 4.52 21.34 4.6C21.75 4.69 22.15 4.81 22.54 4.97C22.93 5.13 23.3 5.33 23.65 5.57C24 5.8 24.32 6.06 24.62 6.36C24.92 6.66 25.18 6.98 25.41 7.33C25.65 7.69 25.84 8.06 26.01 8.45C26.17 8.84 26.29 9.24 26.37 9.65C26.45 10.06 26.49 10.48 26.5 10.91L26.5 19.06C26.49 19.48 26.45 19.89 26.37 20.31C26.29 20.72 26.17 21.12 26.01 21.51C25.84 21.9 25.65 22.27 25.41 22.62C25.18 22.97 24.92 23.3 24.62 23.6C24.32 23.89 24 24.16 23.65 24.39C23.3 24.63 22.93 24.83 22.54 24.99C22.15 25.15 21.75 25.27 21.34 25.35C20.93 25.44 20.51 25.48 20.09 25.48ZM9.89 6.59C9.61 6.59 9.32 6.62 9.05 6.67C8.77 6.73 8.5 6.81 8.24 6.92C7.98 7.03 7.73 7.16 7.49 7.32C7.26 7.48 7.04 7.66 6.84 7.86C6.64 8.06 6.46 8.28 6.3 8.51C6.14 8.75 6.01 9 5.9 9.26C5.79 9.52 5.71 9.8 5.66 10.07C5.6 10.35 5.57 10.63 5.57 10.92L5.57 19.07C5.57 19.36 5.6 19.64 5.66 19.92C5.71 20.19 5.79 20.47 5.9 20.73C6.01 20.99 6.14 21.24 6.3 21.48C6.46 21.71 6.64 21.93 6.84 22.13C7.04 22.33 7.26 22.51 7.49 22.67C7.73 22.83 7.98 22.96 8.24 23.07C8.5 23.18 8.77 23.26 9.05 23.32C9.32 23.37 9.61 23.4 9.89 23.4L20.09 23.39C20.38 23.39 20.66 23.36 20.94 23.3C21.21 23.25 21.48 23.17 21.75 23.06C22.01 22.95 22.26 22.81 22.49 22.66C22.73 22.5 22.95 22.32 23.15 22.12C23.35 21.91 23.52 21.7 23.68 21.46C23.84 21.22 23.97 20.98 24.08 20.71C24.19 20.45 24.27 20.18 24.33 19.9C24.38 19.62 24.41 19.34 24.41 19.06L24.41 10.91C24.41 10.62 24.38 10.34 24.33 10.06C24.27 9.78 24.19 9.51 24.08 9.25C23.97 8.98 23.84 8.74 23.68 8.5C23.52 8.26 23.35 8.04 23.15 7.84C22.95 7.64 22.73 7.46 22.49 7.3C22.26 7.15 22.01 7.01 21.75 6.9C21.48 6.79 21.21 6.71 20.94 6.66C20.66 6.6 20.38 6.57 20.09 6.57L9.89 6.59Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"nonzero\"\n ></path>\n <path\n id=\"rect\"\n d=\"M8.49 5.5L10.53 5.5L10.59 24.41L8.54 24.41L8.49 5.5Z\"\n fill=\"currentColor\"\n fill-opacity=\"1.000000\"\n fill-rule=\"evenodd\"\n ></path>\n </g>\n }\n </svg>\n </ax-icon>\n</ax-button>\n<div class=\"ax-flex ax-items-center ax-gap-1 ax-justify-between ax-w-full\">\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <axp-component-slot name=\"root-header-start\"></axp-component-slot>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <axp-component-slot name=\"root-header-end\"></axp-component-slot>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AXPComponentSlotModule }, { kind: "directive", type: i1$3.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
220
1826
|
}
|
|
221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutHeaderComponent, decorators: [{
|
|
222
1828
|
type: Component,
|
|
223
|
-
args: [{ selector: 'axp-dashboard-admin-header', encapsulation: ViewEncapsulation.None, host: { class: 'ax-w-full ax-flex ax-items-center ax-justify-between ax-bg-primary-surface ax-text-primary-on-surface ax-h-14 ax-px-2 ax-light' }, standalone: true, imports: [
|
|
1829
|
+
args: [{ selector: 'axp-dashboard-admin-header', encapsulation: ViewEncapsulation.None, host: { class: 'ax-w-full ax-flex ax-items-center ax-justify-between ax-bg-primary-surface ax-text-primary-on-surface ax-h-14 ax-px-2 ax-light' }, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
224
1830
|
AXPComponentSlotModule,
|
|
225
1831
|
AXButtonModule,
|
|
226
1832
|
AXDecoratorModule
|
|
@@ -234,7 +1840,7 @@ class AXPRootLayoutMenuComponent {
|
|
|
234
1840
|
this.badgeService = inject(AXPTaskBadgeService);
|
|
235
1841
|
this.settingsService = inject(AXPSettingsService);
|
|
236
1842
|
this.visibilityService = inject(AXPMenuVisibilityService);
|
|
237
|
-
this.badgeVisible = signal(true, ...(ngDevMode ? [{ debugName: "badgeVisible" }] : []));
|
|
1843
|
+
this.badgeVisible = signal(true, ...(ngDevMode ? [{ debugName: "badgeVisible" }] : /* istanbul ignore next */ []));
|
|
238
1844
|
// Debug: Track menu items changes
|
|
239
1845
|
// effect(() => {
|
|
240
1846
|
// const items = this.menuStore.items();
|
|
@@ -404,10 +2010,10 @@ class AXPRootLayoutMenuComponent {
|
|
|
404
2010
|
const lowerPath = path.trim().toLowerCase();
|
|
405
2011
|
return lowerPath.startsWith('http://') || lowerPath.startsWith('https://');
|
|
406
2012
|
}
|
|
407
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
408
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2013
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2014
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRootLayoutMenuComponent, isStandalone: true, selector: "axp-side-menu", ngImport: i0, template: "<ax-side-menu look=\"pills\">\n @let sortedItems = sort(menuStore.items());\n @for (item of sortedItems; track item; let i = $index) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: item, items: sortedItems, index: i }\"> </ng-container>\n }\n</ax-side-menu>\n<ng-template #recursiveMenu let-item=\"item\" let-items=\"items\" let-index=\"index\">\n @if (item.type == 'group') {\n @if (isItemVisible(item)) {\n <ax-title>{{ item.text | translate | async }}</ax-title>\n }\n } @else if (item.type == 'break') {\n @if (shouldShowDivider(item, items, index)) {\n <ax-divider></ax-divider>\n }\n } @else {\n @if (shouldRenderMenuItem(item)) {\n @let routerLinkValue = getRouterLink(item);\n @if (routerLinkValue) {\n <ax-side-menu-item [attr.id]=\"'axp-menu-item-' + (item.name || item.text)\" (onClick)=\"onMenuItemClick(item, true)\"\n [routerLink]=\"routerLinkValue\" [active]=\"item === menuStore.selectedMenuItem().item\"\n [isCollapsed]=\"!menuStore.isItemOpen(item)\">\n <ax-prefix>\n <ax-icon [class]=\"item.icon\" class=\"fa-fw\"></ax-icon>\n </ax-prefix>\n <span>{{ item.text | translate | async }}</span>\n @if (item.children?.length) {\n <ng-container>\n @let sortedChildren = sort(item.children);\n @for (child of sortedChildren; track child; let childIndex = $index) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: child, items: sortedChildren, index: childIndex }\">\n </ng-container>\n }\n </ng-container>\n }\n <ax-suffix>\n @if (badgeVisible()) {\n <ax-badge [axp-task-badge]=\"getMenuBadge(item)()\" color=\"secondary\"></ax-badge>\n }\n </ax-suffix>\n </ax-side-menu-item>\n } @else {\n <ax-side-menu-item [attr.id]=\"'axp-menu-item-' + (item.name || item.text)\" (onClick)=\"onMenuItemClick(item)\"\n [active]=\"item === menuStore.selectedMenuItem().item\" [isCollapsed]=\"!menuStore.isItemOpen(item)\">\n <ax-prefix>\n <ax-icon [class]=\"item.icon\" class=\"fa-fw\"></ax-icon>\n </ax-prefix>\n <span>{{ item.text | translate | async }}</span>\n @if (item.children?.length) {\n <ng-container>\n @let sortedChildren = sort(item.children);\n @for (child of sortedChildren; track child; let childIndex = $index) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: child, items: sortedChildren, index: childIndex }\">\n </ng-container>\n }\n </ng-container>\n }\n <ax-suffix>\n @if (badgeVisible()) {\n <ax-badge [axp-task-badge]=\"getMenuBadge(item)()\" color=\"secondary\"></ax-badge>\n }\n </ax-suffix>\n </ax-side-menu-item>\n }\n }\n }\n</ng-template>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "component", type: i2$3.AXSideMenuComponent, selector: "ax-side-menu", inputs: ["items", "look", "location"], outputs: ["itemsChange"] }, { kind: "component", type: i2$3.AXSideMenuItemComponent, selector: "ax-side-menu-item", inputs: ["disabled", "text", "active", "isLoading", "isCollapsed", "toggleOnClick", "href", "routerLink", "routerLinkActive", "routerLinkActiveOptions", "target"], outputs: ["textChange", "activeChange", "isLoadingChange", "isCollapsedChange", "onClick"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: AXPTaskBadgeDirective, selector: "[axp-task-badge]", inputs: ["badgeKey", "axp-task-badge"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i4.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
409
2015
|
}
|
|
410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2016
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutMenuComponent, decorators: [{
|
|
411
2017
|
type: Component,
|
|
412
2018
|
args: [{ selector: 'axp-side-menu', encapsulation: ViewEncapsulation.None, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
413
2019
|
CommonModule,
|
|
@@ -428,7 +2034,7 @@ class AXPHorizontalMenuComponent {
|
|
|
428
2034
|
this.badgeService = inject(AXPTaskBadgeService);
|
|
429
2035
|
this.settingsService = inject(AXPSettingsService);
|
|
430
2036
|
this.visibilityService = inject(AXPMenuVisibilityService);
|
|
431
|
-
this.badgeVisible = signal(true, ...(ngDevMode ? [{ debugName: "badgeVisible" }] : []));
|
|
2037
|
+
this.badgeVisible = signal(true, ...(ngDevMode ? [{ debugName: "badgeVisible" }] : /* istanbul ignore next */ []));
|
|
432
2038
|
}
|
|
433
2039
|
async ngOnInit() {
|
|
434
2040
|
this.badgeVisible.set(await this.settingsService.scope(AXPPlatformScope.User).get(AXPThemeLayoutSetting.MenuBadgeVisible));
|
|
@@ -592,10 +2198,10 @@ class AXPHorizontalMenuComponent {
|
|
|
592
2198
|
const lowerPath = path.trim().toLowerCase();
|
|
593
2199
|
return lowerPath.startsWith('http://') || lowerPath.startsWith('https://');
|
|
594
2200
|
}
|
|
595
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
596
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2201
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHorizontalMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2202
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPHorizontalMenuComponent, isStandalone: true, selector: "axp-horizontal-menu", host: { classAttribute: "ax-light" }, ngImport: i0, template: "<div\n class=\"ax-w-full ax-flex ax-items-center ax-justify-between ax-gap-1 ax-bg-primary-surface ax-text-primary-on-surface ax-h-14 ax-px-4\"\n>\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <axp-logo\n [source]=\"platformConfig.logo?.full?.dark\"\n [attr.alt]=\"platformConfig.title\"\n class=\"ax-mx-auto ax-text-2xl\"\n ></axp-logo>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-1\">\n <axp-component-slot name=\"root-header-start\"></axp-component-slot>\n <axp-component-slot name=\"root-header-end\"></axp-component-slot>\n </div>\n</div>\n\n<div class=\"__menu-bar\">\n <ax-menu [orientation]=\"'horizontal'\" [class.ax-dark]=\"layoutService.isDarkMode()\" [hasArrow]=\"true\">\n @let sortedItems = sort(menuStore.items());\n @for (item of sortedItems; track item; let i = $index) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: item, items: sortedItems, index: i }\"> </ng-container>\n }\n <!-- Item Templates -->\n <ng-template #recursiveMenu let-item=\"item\" let-items=\"items\" let-index=\"index\">\n @if (item.type == 'group') {\n @if (isItemVisible(item)) {\n <ax-title>{{ item.text | translate | async }}</ax-title>\n }\n } @else if (item.type == 'break') {\n @if (shouldShowDivider(item, items, index)) {\n <ax-divider></ax-divider>\n }\n } @else {\n @if (shouldRenderMenuItem(item)) {\n <ax-menu-item (onClick)=\"onMenuItemClick(item)\">\n @if (!item.meta?.isRoot) {\n <ax-prefix>\n <ax-icon [class]=\"item.icon\" class=\"fa-fw\"></ax-icon>\n </ax-prefix>\n }\n <ax-text> {{ item.text | translate | async }}</ax-text>\n @if (item.children?.length) {\n <ng-container>\n @let sortedChildren = sort(item.children);\n @for (child of sortedChildren; track child; let childIndex = $index) {\n <ng-container [ngTemplateOutlet]=\"recursiveMenu\" [ngTemplateOutletContext]=\"{ item: child, items: sortedChildren, index: childIndex }\">\n </ng-container>\n }\n </ng-container>\n }\n <ax-suffix>\n @if (badgeVisible()) {\n <ax-badge [axp-task-badge]=\"getMenuBadge(item)()\" color=\"secondary\"></ax-badge>\n }\n </ax-suffix>\n </ax-menu-item>\n }\n }\n </ng-template>\n </ax-menu>\n</div>\n<!-- <div class=\"__tab-bar\">\n<div class=\"axp-tabs-item axp-state-active\">\n <span class=\"ax-font-medium\">Account</span>\n <i class=\"fa-light fa-times ax-text-sm\"></i>\n</div>\n<div class=\"axp-tabs-item\">\n <span class=\"ax-font-medium\">Projects</span>\n\n</div>\n</div> -->\n", styles: [".__tab-bar{display:flex;height:3rem;width:100%;align-items:flex-end;gap:.5rem;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-darker-surface),var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-primary-darker-surface),var(--tw-text-opacity, 1))}.__tab-bar .axp-tabs-item{display:flex;height:2.5rem;cursor:pointer;align-items:center;justify-content:space-between;gap:.5rem;border-top-left-radius:.5rem;border-top-right-radius:.5rem;padding-left:1rem;padding-right:1rem;font-size:.875rem;line-height:1.25rem;line-height:1}.__tab-bar .axp-tabs-item:hover,.__tab-bar .axp-tabs-item.axp-state-active{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}.__menu-bar{display:flex;width:100%;align-items:flex-end;gap:.5rem;overflow-x:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-dark-surface),var(--tw-bg-opacity, 1));padding:.375rem 1rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-primary-dark-surface),var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: AXPComponentSlotModule }, { kind: "directive", type: i1$3.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXPLogoComponent, selector: "axp-logo", inputs: ["source"] }, { kind: "ngmodule", type: AXMenuModule }, { kind: "component", type: i4$1.AXMenuItemComponent, selector: "ax-menu-item", inputs: ["name", "data", "disabled", "color"], outputs: ["onClick"] }, { kind: "component", type: i4$1.AXMenuComponent, selector: "ax-menu", inputs: ["orientation", "openOn", "closeOn", "items", "hasArrow"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: AXPTaskBadgeDirective, selector: "[axp-task-badge]", inputs: ["badgeKey", "axp-task-badge"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i4.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
597
2203
|
}
|
|
598
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPHorizontalMenuComponent, decorators: [{
|
|
599
2205
|
type: Component,
|
|
600
2206
|
args: [{ selector: 'axp-horizontal-menu', host: { class: 'ax-light' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
601
2207
|
CommonModule,
|
|
@@ -625,10 +2231,10 @@ class AXPRootHorizontalLayoutComponent {
|
|
|
625
2231
|
this.store.setSideMenuWidth(e.value);
|
|
626
2232
|
}
|
|
627
2233
|
}
|
|
628
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
629
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2234
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootHorizontalLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2235
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRootHorizontalLayoutComponent, isStandalone: true, selector: "axp-root-horizontal-layout", viewQueries: [{ propertyName: "drawer", first: true, predicate: ["drawer"], descendants: true }], ngImport: i0, template: "<div class=\"axp-root-layout\">\n <ax-drawer-container>\n <ax-content class=\"ax-flex ax-flex-col ax-relative ax-bg-lightest dark:ax-bg-lighter\">\n @if(store.isNavigationLoading()) {\n <div class=\"axp-navigating-progress\">\n <div></div>\n </div>\n }\n <axp-horizontal-menu></axp-horizontal-menu>\n <div class=\"ax-flex-1 ax-overflow-auto ax-relative\">\n <router-outlet></router-outlet>\n </div>\n </ax-content>\n </ax-drawer-container>\n <axp-dashboard-admin-footer></axp-dashboard-admin-footer>\n</div>", styles: [".axp-root-layout{display:flex;height:100%;width:100%;flex-direction:column;justify-content:space-between}.axp-navigating-progress{position:absolute;top:0;height:.25rem;width:100%;overflow:hidden;background-color:rgba(var(--ax-sys-color-primary-200),.4)}.axp-navigating-progress>div{height:100%;width:100%;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-500),var(--tw-bg-opacity, 1));animation:indeterminateAnimation 1.5s infinite cubic-bezier(.65,.815,.735,.395);transform-origin:0% 50%}@keyframes indeterminateAnimation{0%{transform:translate(-100%) scaleX(.2)}50%{transform:translate(50%) scaleX(.6)}to{transform:translate(100%) scaleX(.4)}}axp-dashboard-admin-header{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-500),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-primary-surface),var(--tw-text-opacity, 1))}axp-dashboard-admin-header ax-button{--ax-comp-button-normal-bg-color: 0, 0, 0, 0 !important;--ax-comp-button-border-width: 0 !important;--ax-comp-button-normal-text-color: var(--axp-on-brand-color) !important;--ax-comp-button-hover-text-color: var(--axp-on-brand-color) !important;--ax-comp-button-focus-text-color: var(--axp-on-brand-color) !important;--ax-comp-button-pressed-text-color: var(--axp-on-brand-color) !important}.resize-handle{background-color:transparent!important}.resize-handle:hover{background-color:rgba(var(--ax-sys-color-primary-surface))!important}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$4.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXAvatarModule }, { kind: "ngmodule", type: AXImageModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$2.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXPAuthModule }, { kind: "component", type: AXPRootLayoutFooterComponent, selector: "axp-dashboard-admin-footer" }, { kind: "component", type: AXPHorizontalMenuComponent, selector: "axp-horizontal-menu" }, { kind: "ngmodule", type: AXPComponentSlotModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
630
2236
|
}
|
|
631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootHorizontalLayoutComponent, decorators: [{
|
|
632
2238
|
type: Component,
|
|
633
2239
|
args: [{ selector: 'axp-root-horizontal-layout', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
634
2240
|
RouterModule,
|
|
@@ -674,10 +2280,10 @@ class AXPRootVerticalLayoutComponent {
|
|
|
674
2280
|
this.store.setSideMenuWidth(e.value);
|
|
675
2281
|
}
|
|
676
2282
|
}
|
|
677
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
678
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2283
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootVerticalLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2284
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRootVerticalLayoutComponent, isStandalone: true, selector: "axp-root-vertical-layout", viewQueries: [{ propertyName: "drawer", first: true, predicate: ["drawer"], descendants: true }], ngImport: i0, template: "<div id=\"axp-root-layout\" class=\"axp-root-layout\">\n <ax-drawer-container>\n <ax-drawer id=\"axp-side-menu-drawer\" [axResizable]=\"deviceService.isLarge()\" #drawer\n class=\"ax-w-[75%] lg:ax-w-72 ax-border-lighter ax-bg-lighter dark:ax-border-darkest dark:ax-bg-darkest ax-h-full !ax-flex ax-flex-col\"\n [width]=\"(deviceService.isLarge() ? store.sideMenuWidth() : null)!\" location=\"start\"\n [collapsed]=\"!store.isSideMenuOpen()\" [closeOnBackdropClick]=\"false\" [defaultWidth]=\"288\"\n [mode]=\"deviceService.isSmall() || deviceService.isMedium() ? 'overlay' : 'push'\" [dblClickAction]=\"'fit'\"\n (onResizingEnded)=\"handleResizingEnded($event)\" (onResizingDblClick)=\"handleResizingEnded($event)\"\n (onBackdropClick)=\"store.closeSideMenu()\" backdropClass=\"ax-bg-black/50\">\n <ax-header id=\"axp-side-menu-header\"\n class=\"ax-light ax-h-14 ax-flex ax-items-center ax-justify-center ax-bg-primary-500 ax-text-primary-on-surface ax-border-e ax-border-primary-600\">\n <axp-logo [source]=\"logo?.full?.dark\"></axp-logo>\n </ax-header>\n <ax-content class=\"ax-flex ax-flex-col ax-border-e ax-h-full ax-overflow-auto\">\n <axp-component-slot name=\"root-side-menu-header\"></axp-component-slot>\n <div class=\"ax-overflow-auto ax-flex-1\">\n <axp-side-menu id=\"axp-side-menu\" class=\"ax-p-4 ax-block\"></axp-side-menu>\n </div>\n <axp-component-slot name=\"root-side-menu-footer\"></axp-component-slot>\n </ax-content>\n </ax-drawer>\n <ax-content class=\"ax-flex ax-flex-col ax-relative ax-bg-lightest dark:ax-bg-lighter ax-overflow-auto\">\n @if (store.isNavigationLoading()) {\n <div class=\"axp-navigating-progress\">\n <div></div>\n </div>\n }\n <axp-dashboard-admin-header id=\"axp-main-header\" class=\"ax-light\"></axp-dashboard-admin-header>\n\n <div class=\"ax-flex-1 ax-overflow-auto ax-relative\">\n <router-outlet></router-outlet>\n </div>\n </ax-content>\n </ax-drawer-container>\n <axp-dashboard-admin-footer id=\"axp-main-footer\"></axp-dashboard-admin-footer>\n</div>", styles: [".axp-root-layout{display:flex;height:100%;width:100%;flex-direction:column;justify-content:space-between}.axp-navigating-progress{position:absolute;top:0;height:.25rem;width:100%;overflow:hidden;background-color:rgba(var(--ax-sys-color-primary-200),.4)}.axp-navigating-progress>div{height:100%;width:100%;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-500),var(--tw-bg-opacity, 1));animation:indeterminateAnimation 1.5s infinite cubic-bezier(.65,.815,.735,.395);transform-origin:0% 50%}@keyframes indeterminateAnimation{0%{transform:translate(-100%) scaleX(.2)}50%{transform:translate(50%) scaleX(.6)}to{transform:translate(100%) scaleX(.4)}}axp-dashboard-admin-header{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-500),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-primary-surface),var(--tw-text-opacity, 1))}axp-dashboard-admin-header ax-button{--ax-comp-button-normal-bg-color: 0, 0, 0, 0 !important;--ax-comp-button-border-width: 0 !important;--ax-comp-button-normal-text-color: var(--axp-on-brand-color) !important;--ax-comp-button-hover-text-color: var(--axp-on-brand-color) !important;--ax-comp-button-focus-text-color: var(--axp-on-brand-color) !important;--ax-comp-button-pressed-text-color: var(--axp-on-brand-color) !important}.resize-handle{background-color:transparent!important}.resize-handle:hover{background-color:rgba(var(--ax-sys-color-primary-surface))!important}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$4.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXAvatarModule }, { kind: "ngmodule", type: AXImageModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$2.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "transition", "closeOnBackdropClick", "backdropClass", "collapsed", "singleOpenMode"], outputs: ["onBackdropClick", "collapsedStateChanged"] }, { kind: "component", type: i3$2.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: AXPLogoComponent, selector: "axp-logo", inputs: ["source"] }, { kind: "ngmodule", type: AXPAuthModule }, { kind: "directive", type: AXResizableDirective, selector: "[axResizable]", inputs: ["axResizable", "minWidth", "maxWidth", "dblClickAction", "width", "defaultWidth"], outputs: ["axResizableChange", "minWidthChange", "maxWidthChange", "dblClickActionChange", "widthChange", "defaultWidthChange", "onResizingStarted", "onResizingEnded", "onResizingDblClick"] }, { kind: "component", type: AXPRootLayoutFooterComponent, selector: "axp-dashboard-admin-footer" }, { kind: "component", type: AXPRootLayoutHeaderComponent, selector: "axp-dashboard-admin-header" }, { kind: "component", type: AXPRootLayoutMenuComponent, selector: "axp-side-menu" }, { kind: "ngmodule", type: AXPComponentSlotModule }, { kind: "directive", type: i1$3.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
679
2285
|
}
|
|
680
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootVerticalLayoutComponent, decorators: [{
|
|
681
2287
|
type: Component,
|
|
682
2288
|
args: [{ selector: 'axp-root-vertical-layout', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
683
2289
|
RouterModule,
|
|
@@ -746,8 +2352,8 @@ class AXPRootLayoutComponent {
|
|
|
746
2352
|
}
|
|
747
2353
|
});
|
|
748
2354
|
}
|
|
749
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
750
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2355
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2356
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPRootLayoutComponent, isStandalone: true, selector: "ng-component", providers: [AXUnsubscriber, AXPContextStore], ngImport: i0, template: `
|
|
751
2357
|
@if(layout.isMenuHorizontal()){
|
|
752
2358
|
<axp-root-horizontal-layout></axp-root-horizontal-layout>
|
|
753
2359
|
}@else{
|
|
@@ -755,7 +2361,7 @@ class AXPRootLayoutComponent {
|
|
|
755
2361
|
}
|
|
756
2362
|
`, isInline: true, dependencies: [{ kind: "component", type: AXPRootHorizontalLayoutComponent, selector: "axp-root-horizontal-layout" }, { kind: "component", type: AXPRootVerticalLayoutComponent, selector: "axp-root-vertical-layout" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
757
2363
|
}
|
|
758
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPRootLayoutComponent, decorators: [{
|
|
759
2365
|
type: Component,
|
|
760
2366
|
args: [{
|
|
761
2367
|
template: `
|
|
@@ -769,7 +2375,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
769
2375
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
770
2376
|
standalone: true,
|
|
771
2377
|
imports: [AXPRootHorizontalLayoutComponent, AXPRootVerticalLayoutComponent],
|
|
772
|
-
providers: [AXUnsubscriber],
|
|
2378
|
+
providers: [AXUnsubscriber, AXPContextStore],
|
|
773
2379
|
}]
|
|
774
2380
|
}] });
|
|
775
2381
|
|
|
@@ -889,15 +2495,15 @@ function routesFacory() {
|
|
|
889
2495
|
children: [
|
|
890
2496
|
{
|
|
891
2497
|
path: 'offline',
|
|
892
|
-
loadComponent: () => import('./acorex-platform-themes-default-error-offline.component-
|
|
2498
|
+
loadComponent: () => import('./acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs').then((c) => c.AXPErrorOfflineComponent),
|
|
893
2499
|
},
|
|
894
2500
|
{
|
|
895
2501
|
path: '404',
|
|
896
|
-
loadComponent: () => import('./acorex-platform-themes-default-error-404.component-
|
|
2502
|
+
loadComponent: () => import('./acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs').then((c) => c.AXPError404Component),
|
|
897
2503
|
},
|
|
898
2504
|
{
|
|
899
2505
|
path: '401',
|
|
900
|
-
loadComponent: () => import('./acorex-platform-themes-default-error-401.component-
|
|
2506
|
+
loadComponent: () => import('./acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs').then((c) => c.AXPError401Component),
|
|
901
2507
|
},
|
|
902
2508
|
],
|
|
903
2509
|
},
|
|
@@ -905,9 +2511,9 @@ function routesFacory() {
|
|
|
905
2511
|
return routes;
|
|
906
2512
|
}
|
|
907
2513
|
class AXPDefaultThemeModule {
|
|
908
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
909
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
910
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2514
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2515
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultThemeModule, imports: [AXPCommonModule, AXPThemesSharedModule] }); }
|
|
2516
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultThemeModule, providers: [
|
|
911
2517
|
{
|
|
912
2518
|
provide: AXP_ENTITY_CONFIG_TOKEN,
|
|
913
2519
|
useFactory: () => {
|
|
@@ -915,14 +2521,14 @@ class AXPDefaultThemeModule {
|
|
|
915
2521
|
viewers: {
|
|
916
2522
|
root: () => Promise.resolve().then(function () { return rootLayout_component; }).then((c) => c.AXPRootLayoutComponent),
|
|
917
2523
|
master: {
|
|
918
|
-
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-
|
|
2524
|
+
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs').then((c) => c.AXPEntityMasterSingleViewComponent),
|
|
919
2525
|
details: () => import('@acorex/platform/layout/views').then((c) => c.AXPLayoutDetailsViewComponent),
|
|
920
2526
|
///
|
|
921
|
-
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-
|
|
2527
|
+
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs').then((c) => c.AXPEntityMasterCreateViewComponent),
|
|
922
2528
|
///
|
|
923
|
-
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-
|
|
2529
|
+
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs').then((c) => c.AXPEntityMasterModifyViewComponent),
|
|
924
2530
|
//
|
|
925
|
-
list: () =>
|
|
2531
|
+
list: () => Promise.resolve().then(function () { return entityMasterListView_component; }).then((c) => c.AXPEntityMasterListViewComponent),
|
|
926
2532
|
},
|
|
927
2533
|
},
|
|
928
2534
|
};
|
|
@@ -937,7 +2543,7 @@ class AXPDefaultThemeModule {
|
|
|
937
2543
|
},
|
|
938
2544
|
], imports: [AXPCommonModule, AXPThemesSharedModule] }); }
|
|
939
2545
|
}
|
|
940
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2546
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPDefaultThemeModule, decorators: [{
|
|
941
2547
|
type: NgModule,
|
|
942
2548
|
args: [{
|
|
943
2549
|
imports: [AXPCommonModule, AXPThemesSharedModule],
|
|
@@ -951,14 +2557,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
951
2557
|
viewers: {
|
|
952
2558
|
root: () => Promise.resolve().then(function () { return rootLayout_component; }).then((c) => c.AXPRootLayoutComponent),
|
|
953
2559
|
master: {
|
|
954
|
-
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-
|
|
2560
|
+
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs').then((c) => c.AXPEntityMasterSingleViewComponent),
|
|
955
2561
|
details: () => import('@acorex/platform/layout/views').then((c) => c.AXPLayoutDetailsViewComponent),
|
|
956
2562
|
///
|
|
957
|
-
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-
|
|
2563
|
+
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs').then((c) => c.AXPEntityMasterCreateViewComponent),
|
|
958
2564
|
///
|
|
959
|
-
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-
|
|
2565
|
+
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs').then((c) => c.AXPEntityMasterModifyViewComponent),
|
|
960
2566
|
//
|
|
961
|
-
list: () =>
|
|
2567
|
+
list: () => Promise.resolve().then(function () { return entityMasterListView_component; }).then((c) => c.AXPEntityMasterListViewComponent),
|
|
962
2568
|
},
|
|
963
2569
|
},
|
|
964
2570
|
};
|
|
@@ -979,5 +2585,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
979
2585
|
* Generated bundle index. Do not edit.
|
|
980
2586
|
*/
|
|
981
2587
|
|
|
982
|
-
export { AXPDefaultThemeModule, AXPEntityDetailListViewComponent, AXPRootHorizontalLayoutComponent, AXPRootLayoutComponent, AXPRootLayoutFooterComponent, AXPRootLayoutHeaderComponent, AXPRootLayoutMenuComponent, AXPRootVerticalLayoutComponent };
|
|
2588
|
+
export { AXPDefaultThemeModule, AXPEntityDetailListViewComponent, AXPEntityMasterListViewComponent, AXPRootHorizontalLayoutComponent, AXPRootLayoutComponent, AXPRootLayoutFooterComponent, AXPRootLayoutHeaderComponent, AXPRootLayoutMenuComponent, AXPRootVerticalLayoutComponent };
|
|
983
2589
|
//# sourceMappingURL=acorex-platform-themes-default.mjs.map
|