@acorex/platform 20.8.13 → 20.8.14
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/{types/acorex-platform-auth.d.ts → auth/index.d.ts} +2 -14
- package/{types/acorex-platform-common.d.ts → common/index.d.ts} +30 -302
- package/{types/acorex-platform-core.d.ts → core/index.d.ts} +44 -188
- package/{types/acorex-platform-domain.d.ts → domain/index.d.ts} +412 -744
- package/fesm2022/acorex-platform-auth.mjs +27 -125
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-Bi1RYif5.mjs → acorex-platform-common-common-settings.provider-DVvuLUfF.mjs} +32 -30
- package/fesm2022/acorex-platform-common-common-settings.provider-DVvuLUfF.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +205 -711
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +127 -420
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +830 -561
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +114 -634
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs} +9 -9
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +877 -3362
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +204 -456
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +10062 -14672
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +171 -413
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +441 -507
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs → acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs} +10 -10
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs → acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs} +76 -21
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs → acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs} +7 -6
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs → acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs +111 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +3408 -5611
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +7 -8
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +166 -391
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs +1716 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs → acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs} +23 -16
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs → acorex-platform-themes-default-error-401.component-53VB-PS_.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs → acorex-platform-themes-default-error-404.component-DVF9soT5.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +61 -1784
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs → acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs → acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs} +25 -24
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs +65 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs +64 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +305 -408
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +100 -359
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/{types/acorex-platform-layout-builder.d.ts → layout/builder/index.d.ts} +38 -160
- package/{types/acorex-platform-layout-components.d.ts → layout/components/index.d.ts} +125 -854
- package/{types/acorex-platform-layout-designer.d.ts → layout/designer/index.d.ts} +18 -96
- package/{types/acorex-platform-layout-entity.d.ts → layout/entity/index.d.ts} +65 -848
- package/{types/acorex-platform-layout-views.d.ts → layout/views/index.d.ts} +47 -80
- package/{types/acorex-platform-layout-widget-core.d.ts → layout/widget-core/index.d.ts} +197 -274
- package/{types/acorex-platform-layout-widgets.d.ts → layout/widgets/index.d.ts} +124 -608
- package/{types/acorex-platform-native.d.ts → native/index.d.ts} +7 -0
- package/package.json +31 -31
- package/runtime/index.d.ts +307 -0
- package/{types/acorex-platform-themes-default.d.ts → themes/default/index.d.ts} +4 -113
- package/{types/acorex-platform-themes-shared.d.ts → themes/shared/index.d.ts} +4 -5
- package/{types/acorex-platform-workflow.d.ts → workflow/index.d.ts} +81 -162
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs +0 -116
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs +0 -160
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs +0 -120
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +0 -94
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +0 -86
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +0 -1
- package/types/acorex-platform-runtime.d.ts +0 -571
- /package/{types/acorex-platform.d.ts → index.d.ts} +0 -0
|
@@ -10,27 +10,26 @@ 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$1 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';
|
|
20
19
|
import { AXPopoverModule } from '@acorex/components/popover';
|
|
21
20
|
import * as i6 from '@acorex/components/search-box';
|
|
22
21
|
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
23
22
|
import { AXTabsModule } from '@acorex/components/tabs';
|
|
24
23
|
import { AXTooltipModule } from '@acorex/components/tooltip';
|
|
25
24
|
import * as i10 from '@acorex/core/translation';
|
|
26
|
-
import { AXTranslationModule
|
|
25
|
+
import { AXTranslationModule } from '@acorex/core/translation';
|
|
27
26
|
import * as i2 from '@acorex/core/utils';
|
|
28
27
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
29
28
|
import { AXPAuthModule, AXPSessionService, AXPSessionStatus, AXPAuthGuard } from '@acorex/platform/auth';
|
|
30
|
-
import { AXPRefreshEvent,
|
|
31
|
-
import * as i1$
|
|
32
|
-
import { AXPDeviceService,
|
|
33
|
-
import {
|
|
29
|
+
import { AXPRefreshEvent, AXP_PLATFORM_CONFIG_TOKEN, AXPMenuService, AXPSettingsService, AXPMenuVisibilityService, AXPCommonModule } from '@acorex/platform/common';
|
|
30
|
+
import * as i1$2 from '@acorex/platform/core';
|
|
31
|
+
import { AXPDeviceService, AXPComponentSlotModule, AXPPlatformScope, AXPBroadcastEventService, AXPContextStore } from '@acorex/platform/core';
|
|
32
|
+
import { AXP_ENTITY_CONFIG_TOKEN } from '@acorex/platform/layout/entity';
|
|
34
33
|
import * as i7$1 from '@acorex/platform/layout/widget-core';
|
|
35
34
|
import { AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
|
|
36
35
|
import { AXPWidgetsModule } from '@acorex/platform/layout/widgets';
|
|
@@ -39,24 +38,15 @@ import { AXPWorkflowService, ofType } from '@acorex/platform/workflow';
|
|
|
39
38
|
import * as i1$1 from '@angular/common';
|
|
40
39
|
import { CommonModule } from '@angular/common';
|
|
41
40
|
import * as i0 from '@angular/core';
|
|
42
|
-
import { inject, signal, computed, effect, ViewChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component,
|
|
41
|
+
import { inject, signal, computed, effect, ViewChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
43
42
|
import { FormsModule } from '@angular/forms';
|
|
44
|
-
import * as i1$
|
|
45
|
-
import { RouterModule, Router,
|
|
43
|
+
import * as i1$3 from '@angular/router';
|
|
44
|
+
import { RouterModule, Router, NavigationEnd, RouteReuseStrategy, ROUTES } from '@angular/router';
|
|
46
45
|
import { Subject, takeUntil, filter, firstValueFrom } from 'rxjs';
|
|
47
|
-
import * as
|
|
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';
|
|
46
|
+
import * as i2$2 from '@acorex/components/side-menu';
|
|
59
47
|
import { AXSideMenuModule } from '@acorex/components/side-menu';
|
|
48
|
+
import { AXPTaskBadgeService, AXPMenuBadgeHelper, AXPTaskBadgeDirective, AXPLogoComponent } from '@acorex/platform/layout/components';
|
|
49
|
+
import { sortBy } from 'lodash-es';
|
|
60
50
|
import { AXAvatarModule } from '@acorex/components/avatar';
|
|
61
51
|
import { AXImageModule } from '@acorex/components/image';
|
|
62
52
|
import * as i4$1 from '@acorex/components/menu';
|
|
@@ -71,8 +61,8 @@ class AXPEntityDetailListViewComponent {
|
|
|
71
61
|
this.workflow = inject(AXPWorkflowService);
|
|
72
62
|
this.store = inject(AXPLayoutThemeService);
|
|
73
63
|
this.deviceService = inject(AXPDeviceService);
|
|
74
|
-
this.toolbarPrimaryActions = signal([], ...(ngDevMode ? [{ debugName: "toolbarPrimaryActions" }] :
|
|
75
|
-
this.toolbarSecondaryActions = signal([], ...(ngDevMode ? [{ debugName: "toolbarSecondaryActions" }] :
|
|
64
|
+
this.toolbarPrimaryActions = signal([], ...(ngDevMode ? [{ debugName: "toolbarPrimaryActions" }] : []));
|
|
65
|
+
this.toolbarSecondaryActions = signal([], ...(ngDevMode ? [{ debugName: "toolbarSecondaryActions" }] : []));
|
|
76
66
|
this.destroyed = new Subject();
|
|
77
67
|
this.dropdownRowItems = computed(() => {
|
|
78
68
|
return this.vm.secondaryRowActions().map((c) => ({
|
|
@@ -81,7 +71,7 @@ class AXPEntityDetailListViewComponent {
|
|
|
81
71
|
text: c.title,
|
|
82
72
|
color: c.color,
|
|
83
73
|
}));
|
|
84
|
-
}, ...(ngDevMode ? [{ debugName: "dropdownRowItems" }] :
|
|
74
|
+
}, ...(ngDevMode ? [{ debugName: "dropdownRowItems" }] : []));
|
|
85
75
|
this.commandRowItems = computed(() => {
|
|
86
76
|
return this.vm.primaryRowActions().map((c) => {
|
|
87
77
|
return {
|
|
@@ -91,7 +81,7 @@ class AXPEntityDetailListViewComponent {
|
|
|
91
81
|
color: c.color,
|
|
92
82
|
};
|
|
93
83
|
});
|
|
94
|
-
}, ...(ngDevMode ? [{ debugName: "commandRowItems" }] :
|
|
84
|
+
}, ...(ngDevMode ? [{ debugName: "commandRowItems" }] : []));
|
|
95
85
|
this.getCommandRowItems = () => {
|
|
96
86
|
return this.commandRowItems();
|
|
97
87
|
};
|
|
@@ -160,12 +150,12 @@ class AXPEntityDetailListViewComponent {
|
|
|
160
150
|
this.vm?.destroy();
|
|
161
151
|
this.destroy();
|
|
162
152
|
}
|
|
163
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
164
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPEntityDetailListViewComponent, deps: [{ token: i1.AXActionSheetService }, { token: i2.AXUnsubscriber }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
154
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", 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 @if (vm.showIndexColumn()) {\n <ax-index-column\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></ax-index-column>\n }\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:
|
|
165
155
|
//
|
|
166
156
|
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 }); }
|
|
167
157
|
}
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPEntityDetailListViewComponent, decorators: [{
|
|
169
159
|
type: Component,
|
|
170
160
|
args: [{ selector: 'axp-entity-detail-list-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [AXUnsubscriber], imports: [
|
|
171
161
|
CommonModule,
|
|
@@ -200,1726 +190,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
200
190
|
args: ['grid', { static: true }]
|
|
201
191
|
}] } });
|
|
202
192
|
|
|
203
|
-
//#region ---- Constants ----
|
|
204
|
-
const ROOT_NODE_ID = 'all';
|
|
205
|
-
const LOADING_DELAY_MS = 300;
|
|
206
|
-
const DEFAULT_TEXT_FIELD = 'title';
|
|
207
|
-
const DEFAULT_VALUE_FIELD = 'id';
|
|
208
|
-
//#endregion
|
|
209
|
-
class AXPEntityCategoryComponent {
|
|
210
|
-
//#endregion
|
|
211
|
-
//#region ---- Constructor & Lifecycle ----
|
|
212
|
-
constructor() {
|
|
213
|
-
//#region ---- Services & Dependencies ----
|
|
214
|
-
/** i18n key for the synthetic "all items" root row; resolved in the template with the translate pipe. */
|
|
215
|
-
this.categoryTreeRootTitleI18nKey = AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY;
|
|
216
|
-
this.translate = inject(AXTranslationService);
|
|
217
|
-
this.workflow = inject(AXPWorkflowService);
|
|
218
|
-
this.commandService = inject(AXPCommandService);
|
|
219
|
-
this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
|
|
220
|
-
this.categoryTreeService = inject(AXPCategoryTreeService);
|
|
221
|
-
this.highlightService = inject(AXHighlightService);
|
|
222
|
-
//#endregion
|
|
223
|
-
//#region ---- Component Inputs & View Queries ----
|
|
224
|
-
this.vm = input.required(...(ngDevMode ? [{ debugName: "vm" }] : /* istanbul ignore next */ []));
|
|
225
|
-
this.tree = viewChild('tree', ...(ngDevMode ? [{ debugName: "tree" }] : /* istanbul ignore next */ []));
|
|
226
|
-
this.searchValue = input('', ...(ngDevMode ? [{ debugName: "searchValue" }] : /* istanbul ignore next */ []));
|
|
227
|
-
// Tree view inputs with defaults
|
|
228
|
-
this.selectMode = input('single', ...(ngDevMode ? [{ debugName: "selectMode" }] : /* istanbul ignore next */ []));
|
|
229
|
-
this.selectionBehavior = input('intermediate', ...(ngDevMode ? [{ debugName: "selectionBehavior" }] : /* istanbul ignore next */ []));
|
|
230
|
-
this.dragArea = input('handler', ...(ngDevMode ? [{ debugName: "dragArea" }] : /* istanbul ignore next */ []));
|
|
231
|
-
this.dragBehavior = input('none', ...(ngDevMode ? [{ debugName: "dragBehavior" }] : /* istanbul ignore next */ []));
|
|
232
|
-
this.showIcons = input(true, ...(ngDevMode ? [{ debugName: "showIcons" }] : /* istanbul ignore next */ []));
|
|
233
|
-
this.showChildrenBadge = input(false, ...(ngDevMode ? [{ debugName: "showChildrenBadge" }] : /* istanbul ignore next */ []));
|
|
234
|
-
this.expandedIcon = input('fa-solid fa-chevron-down', ...(ngDevMode ? [{ debugName: "expandedIcon" }] : /* istanbul ignore next */ []));
|
|
235
|
-
this.collapsedIcon = input('fa-solid fa-chevron-right', ...(ngDevMode ? [{ debugName: "collapsedIcon" }] : /* istanbul ignore next */ []));
|
|
236
|
-
this.indentSize = input(16, ...(ngDevMode ? [{ debugName: "indentSize" }] : /* istanbul ignore next */ []));
|
|
237
|
-
this.look = input('default', ...(ngDevMode ? [{ debugName: "look" }] : /* istanbul ignore next */ []));
|
|
238
|
-
this.searchWithChildren = input(true, ...(ngDevMode ? [{ debugName: "searchWithChildren" }] : /* istanbul ignore next */ [])); // Include children of search results
|
|
239
|
-
//#endregion
|
|
240
|
-
//#region ---- Component State ----
|
|
241
|
-
this.isLoading = signal(true, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
242
|
-
this.isSearching = signal(false, ...(ngDevMode ? [{ debugName: "isSearching" }] : /* istanbul ignore next */ []));
|
|
243
|
-
this.searchResultCount = signal(0, ...(ngDevMode ? [{ debugName: "searchResultCount" }] : /* istanbul ignore next */ []));
|
|
244
|
-
this.currentSearchValue = signal('', ...(ngDevMode ? [{ debugName: "currentSearchValue" }] : /* istanbul ignore next */ []));
|
|
245
|
-
this.resultsFoundText = signal('', ...(ngDevMode ? [{ debugName: "resultsFoundText" }] : /* istanbul ignore next */ []));
|
|
246
|
-
//#endregion
|
|
247
|
-
//#region ---- Private Properties ----
|
|
248
|
-
this.loadingTimeoutId = null;
|
|
249
|
-
this.treeData = null;
|
|
250
|
-
this.treeConfig = null;
|
|
251
|
-
this.matchingNodeIds = new Set();
|
|
252
|
-
this.relevantNodeIds = new Set(); // For search filtering
|
|
253
|
-
this.nodeDataCache = new Map(); // Cache parent data from search results
|
|
254
|
-
this.expandedNodesBeforeSearch = [];
|
|
255
|
-
this.nodesExpandedDuringSearch = [];
|
|
256
|
-
this.currentSearchTerm = null;
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region ---- Computed Properties ----
|
|
259
|
-
this.textField = computed(() => this.vm().entityDef.category?.textField || DEFAULT_TEXT_FIELD, ...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
|
|
260
|
-
this.valueField = computed(() => this.vm().entityDef.category?.valueField || DEFAULT_VALUE_FIELD, ...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
|
|
261
|
-
/** When true, add/edit/delete category actions are hidden (from category plugin readonly option). */
|
|
262
|
-
this.categoryReadonly = computed(() => this.vm().entityDef?.extensions?.category?.readonly === true, ...(ngDevMode ? [{ debugName: "categoryReadonly" }] : /* istanbul ignore next */ []));
|
|
263
|
-
/**
|
|
264
|
-
* Computed property to check if we should show the "no search results" empty state.
|
|
265
|
-
* Returns true when search is active, not searching, and no results found.
|
|
266
|
-
*/
|
|
267
|
-
this.showNoSearchResults = computed(() => {
|
|
268
|
-
const searchValue = this.currentSearchValue().trim();
|
|
269
|
-
const isSearching = this.isSearching();
|
|
270
|
-
const resultCount = this.searchResultCount();
|
|
271
|
-
return searchValue.length > 0 && !isSearching && resultCount === 0;
|
|
272
|
-
}, ...(ngDevMode ? [{ debugName: "showNoSearchResults" }] : /* istanbul ignore next */ []));
|
|
273
|
-
this.categoryEntityKey = computed(() => {
|
|
274
|
-
const key = this.vm().entityDef.category?.entity;
|
|
275
|
-
if (!key) {
|
|
276
|
-
throw new Error('Category entity is not configured');
|
|
277
|
-
}
|
|
278
|
-
return key;
|
|
279
|
-
}, ...(ngDevMode ? [{ debugName: "categoryEntityKey" }] : /* istanbul ignore next */ []));
|
|
280
|
-
// protected toggleExpand(e: AXTreeViewNodeDoubleClickEvent) {
|
|
281
|
-
// (e.component as AXTreeViewComponent).toggleNodeExpansion(String(e.node[this.valueField()] ?? ''));
|
|
282
|
-
// }
|
|
283
|
-
//#endregion
|
|
284
|
-
//#region ---- Tree Data Source ----
|
|
285
|
-
/**
|
|
286
|
-
* Datasource callback for tree-view component.
|
|
287
|
-
* Provides lazy loading support for tree nodes.
|
|
288
|
-
*/
|
|
289
|
-
this.datasource = async (parentId) => {
|
|
290
|
-
if (!this.isTreeInitialized()) {
|
|
291
|
-
return [];
|
|
292
|
-
}
|
|
293
|
-
// Load root nodes if no parent ID provided
|
|
294
|
-
if (!parentId) {
|
|
295
|
-
return await this.loadRootNodes();
|
|
296
|
-
}
|
|
297
|
-
// Load children for the specified parent
|
|
298
|
-
return await this.loadChildNodes(parentId);
|
|
299
|
-
};
|
|
300
|
-
afterNextRender(() => {
|
|
301
|
-
this.initializeTree();
|
|
302
|
-
});
|
|
303
|
-
this.workflow.events$
|
|
304
|
-
.pipe(ofType(AXPRefreshEvent))
|
|
305
|
-
.pipe(takeUntilDestroyed())
|
|
306
|
-
.subscribe((event) => {
|
|
307
|
-
this.tree()?.reloadData();
|
|
308
|
-
// this.tree()?.refresh();
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
//#endregion
|
|
312
|
-
//#region ---- Public Methods ----
|
|
313
|
-
/**
|
|
314
|
-
* Handles category search input changes - Uses server-side search for efficiency and reliability
|
|
315
|
-
*/
|
|
316
|
-
async handleCategorySearchChange(event) {
|
|
317
|
-
if (!this.isTreeInitialized()) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
const searchTerm = (event.value ?? '').trim().toLowerCase();
|
|
321
|
-
const previousSearchTerm = this.currentSearchValue();
|
|
322
|
-
// If search is cleared, reset tree
|
|
323
|
-
if (!searchTerm) {
|
|
324
|
-
if (previousSearchTerm || this.matchingNodeIds.size > 0) {
|
|
325
|
-
this.currentSearchValue.set('');
|
|
326
|
-
this.currentSearchTerm = null;
|
|
327
|
-
await this.resetSearch();
|
|
328
|
-
}
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
// For non-empty search, only process user interactions
|
|
332
|
-
if (!event.isUserInteraction) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
// Prevent concurrent searches
|
|
336
|
-
if (this.isSearching() && this.currentSearchTerm !== null) {
|
|
337
|
-
if (this.currentSearchTerm === searchTerm) {
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
this.currentSearchValue.set(event.value ?? '');
|
|
342
|
-
this.currentSearchTerm = searchTerm;
|
|
343
|
-
const treeComponent = this.tree();
|
|
344
|
-
if (!treeComponent) {
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
|
-
// Store expanded nodes before starting a new search (only on first search)
|
|
348
|
-
if (!previousSearchTerm && this.expandedNodesBeforeSearch.length === 0) {
|
|
349
|
-
const expandedNodes = treeComponent.getExpandedNodes();
|
|
350
|
-
this.expandedNodesBeforeSearch = expandedNodes
|
|
351
|
-
.map((node) => String(node['id'] ?? ''))
|
|
352
|
-
.filter((id) => id && id !== ROOT_NODE_ID);
|
|
353
|
-
}
|
|
354
|
-
// Collapse nodes from previous search before starting new search
|
|
355
|
-
if (previousSearchTerm && this.nodesExpandedDuringSearch.length > 0) {
|
|
356
|
-
const nodesToCollapse = [...this.nodesExpandedDuringSearch].reverse();
|
|
357
|
-
this.nodesExpandedDuringSearch = [];
|
|
358
|
-
for (const nodeId of nodesToCollapse) {
|
|
359
|
-
// Only collapse if it wasn't originally expanded before search
|
|
360
|
-
if (!this.expandedNodesBeforeSearch.includes(nodeId)) {
|
|
361
|
-
try {
|
|
362
|
-
treeComponent.collapseNode(nodeId);
|
|
363
|
-
}
|
|
364
|
-
catch {
|
|
365
|
-
// Node might not exist anymore, ignore
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
this.isSearching.set(true);
|
|
371
|
-
try {
|
|
372
|
-
// Step 1: Use server-side search to get matching items
|
|
373
|
-
const searchResults = await this.categoryTreeService.searchCategories(searchTerm, this.treeData, this.treeConfig);
|
|
374
|
-
// Check if search term changed during the API call
|
|
375
|
-
if (this.currentSearchTerm !== searchTerm) {
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
if (!searchResults || searchResults.length === 0) {
|
|
379
|
-
this.matchingNodeIds.clear();
|
|
380
|
-
this.relevantNodeIds.clear();
|
|
381
|
-
this.searchResultCount.set(0);
|
|
382
|
-
await this.updateTranslatedMessages(0);
|
|
383
|
-
// Clear highlighting and reload tree to show all nodes
|
|
384
|
-
this.highlightService.clear();
|
|
385
|
-
await treeComponent.reloadData();
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
// Store matching node IDs from search results
|
|
389
|
-
this.matchingNodeIds.clear();
|
|
390
|
-
const valueField = this.valueField();
|
|
391
|
-
searchResults.forEach((item) => {
|
|
392
|
-
const nodeId = String(item[valueField] ?? '');
|
|
393
|
-
if (nodeId) {
|
|
394
|
-
this.matchingNodeIds.add(nodeId);
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
const resultCount = searchResults.length;
|
|
398
|
-
this.searchResultCount.set(resultCount);
|
|
399
|
-
// Update translated messages
|
|
400
|
-
await this.updateTranslatedMessages(resultCount);
|
|
401
|
-
// Step 2: Collect parent IDs (builds relevantNodeIds for filtering)
|
|
402
|
-
const parentsToExpand = await this.collectParentIds(searchResults);
|
|
403
|
-
// Step 2.5: Collect children IDs if searchWithChildren is enabled
|
|
404
|
-
if (this.searchWithChildren()) {
|
|
405
|
-
await this.collectChildrenIds(searchResults);
|
|
406
|
-
}
|
|
407
|
-
// Step 3: Reload tree to apply filtering
|
|
408
|
-
await treeComponent.reloadData();
|
|
409
|
-
// Step 4: Expand root node
|
|
410
|
-
if (!treeComponent.isNodeExpanded(ROOT_NODE_ID)) {
|
|
411
|
-
try {
|
|
412
|
-
await treeComponent.expandNode(ROOT_NODE_ID);
|
|
413
|
-
this.nodesExpandedDuringSearch.push(ROOT_NODE_ID);
|
|
414
|
-
}
|
|
415
|
-
catch {
|
|
416
|
-
// Root might not exist
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
// Step 4: Expand all parent nodes in order (from root to leaves)
|
|
420
|
-
// Sort parents by their depth to expand in correct order
|
|
421
|
-
const sortedParents = await this.sortParentsByDepth(Array.from(parentsToExpand));
|
|
422
|
-
for (const parentId of sortedParents) {
|
|
423
|
-
// Only expand if not already expanded
|
|
424
|
-
if (!treeComponent.isNodeExpanded(parentId)) {
|
|
425
|
-
try {
|
|
426
|
-
await treeComponent.expandNode(parentId);
|
|
427
|
-
this.nodesExpandedDuringSearch.push(parentId);
|
|
428
|
-
// Small delay to prevent overwhelming the tree component
|
|
429
|
-
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
430
|
-
}
|
|
431
|
-
catch {
|
|
432
|
-
// Node might not exist, ignore
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
// Step 5: Apply highlighting after tree is rendered
|
|
437
|
-
// Use setTimeout to ensure DOM is updated after tree reload
|
|
438
|
-
setTimeout(() => {
|
|
439
|
-
if (this.currentSearchValue().trim()) {
|
|
440
|
-
this.highlightService.highlight('ax-tree-view .ax-truncate', this.currentSearchValue().trim());
|
|
441
|
-
}
|
|
442
|
-
}, 100);
|
|
443
|
-
}
|
|
444
|
-
catch (error) {
|
|
445
|
-
console.error('Error searching categories:', error);
|
|
446
|
-
this.matchingNodeIds.clear();
|
|
447
|
-
this.relevantNodeIds.clear();
|
|
448
|
-
this.searchResultCount.set(0);
|
|
449
|
-
this.highlightService.clear();
|
|
450
|
-
// Reload tree to clear any filters
|
|
451
|
-
const treeComponent = this.tree();
|
|
452
|
-
if (treeComponent) {
|
|
453
|
-
await treeComponent.reloadData();
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
finally {
|
|
457
|
-
if (this.currentSearchTerm === searchTerm) {
|
|
458
|
-
this.currentSearchTerm = null;
|
|
459
|
-
}
|
|
460
|
-
this.isSearching.set(false);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* Collects all parent IDs for the given search results
|
|
465
|
-
* Handles both nested 'parent' object and 'parentId' field in search results
|
|
466
|
-
* Recursively fetches parent nodes to build the full parent chain
|
|
467
|
-
*/
|
|
468
|
-
async collectParentIds(items) {
|
|
469
|
-
const parentsToExpand = new Set();
|
|
470
|
-
const valueField = this.valueField();
|
|
471
|
-
const parentKey = this.treeData?.categoryEntityDef?.parentKey || 'parentId';
|
|
472
|
-
// Build relevantNodeIds = matching nodes + all parents
|
|
473
|
-
this.relevantNodeIds.clear();
|
|
474
|
-
this.matchingNodeIds.forEach((id) => this.relevantNodeIds.add(id));
|
|
475
|
-
// Recursively extract all parent IDs
|
|
476
|
-
const extractParentIds = async (item) => {
|
|
477
|
-
// First, try to get parent from nested 'parent' object (if available)
|
|
478
|
-
const parent = item['parent'];
|
|
479
|
-
if (parent) {
|
|
480
|
-
const parentId = String(parent[valueField] ?? parent['id'] ?? '');
|
|
481
|
-
if (parentId && parentId !== ROOT_NODE_ID) {
|
|
482
|
-
parentsToExpand.add(parentId);
|
|
483
|
-
this.relevantNodeIds.add(parentId); // Add to filter set
|
|
484
|
-
this.nodeDataCache.set(parentId, parent);
|
|
485
|
-
await extractParentIds(parent);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
else {
|
|
489
|
-
// Fallback: use parentId field and fetch parent from server
|
|
490
|
-
// Try both parentKey from entity definition and common 'parentId' field
|
|
491
|
-
const parentIdValue = item[parentKey] ?? item['parentId'];
|
|
492
|
-
if (parentIdValue) {
|
|
493
|
-
const parentId = String(parentIdValue);
|
|
494
|
-
if (parentId && parentId !== ROOT_NODE_ID) {
|
|
495
|
-
// Add to sets first
|
|
496
|
-
parentsToExpand.add(parentId);
|
|
497
|
-
this.relevantNodeIds.add(parentId);
|
|
498
|
-
// Fetch parent from server if not already cached
|
|
499
|
-
if (!this.nodeDataCache.has(parentId)) {
|
|
500
|
-
const parentItem = await this.fetchItemById(parentId);
|
|
501
|
-
if (parentItem) {
|
|
502
|
-
this.nodeDataCache.set(parentId, parentItem);
|
|
503
|
-
// Recursively fetch parent's parent
|
|
504
|
-
await extractParentIds(parentItem);
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
else {
|
|
508
|
-
// Parent already in cache, recursively process it
|
|
509
|
-
const cachedParent = this.nodeDataCache.get(parentId);
|
|
510
|
-
if (cachedParent) {
|
|
511
|
-
await extractParentIds(cachedParent);
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
// Process all items
|
|
519
|
-
for (const item of items) {
|
|
520
|
-
await extractParentIds(item);
|
|
521
|
-
}
|
|
522
|
-
return parentsToExpand;
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* Collects children IDs for matching search results recursively
|
|
526
|
-
* Adds all descendants (children, grandchildren, etc.) to relevantNodeIds so they appear in the filtered tree
|
|
527
|
-
*/
|
|
528
|
-
async collectChildrenIds(items) {
|
|
529
|
-
if (!this.treeData?.categoryEntityQueryFunc || !this.treeConfig) {
|
|
530
|
-
return;
|
|
531
|
-
}
|
|
532
|
-
const valueField = this.valueField();
|
|
533
|
-
const parentKey = this.treeData.categoryEntityDef?.parentKey;
|
|
534
|
-
if (!parentKey) {
|
|
535
|
-
return;
|
|
536
|
-
}
|
|
537
|
-
// For each matching node, recursively fetch all its descendants
|
|
538
|
-
for (const item of items) {
|
|
539
|
-
const nodeId = String(item[valueField] ?? '');
|
|
540
|
-
if (!nodeId || nodeId === ROOT_NODE_ID) {
|
|
541
|
-
continue;
|
|
542
|
-
}
|
|
543
|
-
await this.collectChildrenRecursively(nodeId, valueField, parentKey);
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
/**
|
|
547
|
-
* Recursively collects all descendant IDs for a given node
|
|
548
|
-
*/
|
|
549
|
-
async collectChildrenRecursively(nodeId, valueField, parentKey) {
|
|
550
|
-
if (!this.treeData?.categoryEntityQueryFunc) {
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
try {
|
|
554
|
-
// Fetch children for this node
|
|
555
|
-
const event = {
|
|
556
|
-
...this.treeData.basicQueryEvent,
|
|
557
|
-
filter: {
|
|
558
|
-
field: parentKey,
|
|
559
|
-
value: nodeId,
|
|
560
|
-
operator: { type: 'equal' },
|
|
561
|
-
},
|
|
562
|
-
};
|
|
563
|
-
const res = await this.treeData.categoryEntityQueryFunc(event);
|
|
564
|
-
if (res?.items && res.items.length > 0) {
|
|
565
|
-
// Add children IDs to relevantNodeIds so they appear in filtered tree
|
|
566
|
-
for (const child of res.items) {
|
|
567
|
-
const childId = String(child[valueField] ?? '');
|
|
568
|
-
if (childId && childId !== ROOT_NODE_ID) {
|
|
569
|
-
this.relevantNodeIds.add(childId);
|
|
570
|
-
// Cache child data
|
|
571
|
-
this.nodeDataCache.set(childId, child);
|
|
572
|
-
// Recursively fetch children of this child
|
|
573
|
-
await this.collectChildrenRecursively(childId, valueField, parentKey);
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
catch (error) {
|
|
579
|
-
console.error(`Error fetching children for node ${nodeId}:`, error);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
/**
|
|
583
|
-
* Fetches a single item by ID from the server
|
|
584
|
-
*/
|
|
585
|
-
async fetchItemById(id) {
|
|
586
|
-
if (!this.treeData?.categoryEntityQueryFunc) {
|
|
587
|
-
return null;
|
|
588
|
-
}
|
|
589
|
-
try {
|
|
590
|
-
const valueField = this.valueField();
|
|
591
|
-
const event = {
|
|
592
|
-
...this.treeData.basicQueryEvent,
|
|
593
|
-
filter: {
|
|
594
|
-
field: valueField,
|
|
595
|
-
value: id,
|
|
596
|
-
operator: { type: 'equal' },
|
|
597
|
-
},
|
|
598
|
-
};
|
|
599
|
-
const res = await this.treeData.categoryEntityQueryFunc(event);
|
|
600
|
-
return res?.items?.[0] ?? null;
|
|
601
|
-
}
|
|
602
|
-
catch (error) {
|
|
603
|
-
console.error('Error fetching item by ID:', error);
|
|
604
|
-
return null;
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* Sorts parent IDs by their depth (root first, leaves last)
|
|
609
|
-
* Uses cached data from collectParentIds
|
|
610
|
-
*/
|
|
611
|
-
async sortParentsByDepth(parentIds) {
|
|
612
|
-
const parentKey = this.treeData?.categoryEntityDef?.parentKey;
|
|
613
|
-
if (!parentKey || parentIds.length === 0) {
|
|
614
|
-
return parentIds;
|
|
615
|
-
}
|
|
616
|
-
// Build depth map using cached data
|
|
617
|
-
const depthMap = new Map();
|
|
618
|
-
for (const parentId of parentIds) {
|
|
619
|
-
if (depthMap.has(parentId)) {
|
|
620
|
-
continue;
|
|
621
|
-
}
|
|
622
|
-
let depth = 0;
|
|
623
|
-
let currentId = parentId;
|
|
624
|
-
const visited = new Set();
|
|
625
|
-
while (currentId && currentId !== ROOT_NODE_ID && !visited.has(currentId)) {
|
|
626
|
-
visited.add(currentId);
|
|
627
|
-
depth++;
|
|
628
|
-
// Use nodeDataCache which was populated by collectParentIds
|
|
629
|
-
const item = this.nodeDataCache.get(currentId);
|
|
630
|
-
if (item) {
|
|
631
|
-
currentId = item[parentKey] ? String(item[parentKey]) : null;
|
|
632
|
-
}
|
|
633
|
-
else {
|
|
634
|
-
break;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
depthMap.set(parentId, depth);
|
|
638
|
-
}
|
|
639
|
-
// Sort by depth (lower depth = closer to root = expand first)
|
|
640
|
-
return parentIds.sort((a, b) => {
|
|
641
|
-
const depthA = depthMap.get(a) ?? 0;
|
|
642
|
-
const depthB = depthMap.get(b) ?? 0;
|
|
643
|
-
return depthA - depthB;
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Updates translated messages for search results
|
|
648
|
-
*/
|
|
649
|
-
async updateTranslatedMessages(resultCount) {
|
|
650
|
-
if (resultCount > 0) {
|
|
651
|
-
const key = resultCount === 1
|
|
652
|
-
? '@general:terms.interface.category.search.results-found.singular'
|
|
653
|
-
: '@general:terms.interface.category.search.results-found.plural';
|
|
654
|
-
const text = await this.translate.translateAsync(key, { params: { count: resultCount } });
|
|
655
|
-
this.resultsFoundText.set(text);
|
|
656
|
-
}
|
|
657
|
-
else {
|
|
658
|
-
this.resultsFoundText.set('');
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
/**
|
|
662
|
-
* Resets search state and restores tree to original expanded state
|
|
663
|
-
*/
|
|
664
|
-
async resetSearch() {
|
|
665
|
-
this.searchResultCount.set(0);
|
|
666
|
-
this.resultsFoundText.set('');
|
|
667
|
-
this.currentSearchTerm = null;
|
|
668
|
-
this.isSearching.set(false);
|
|
669
|
-
this.matchingNodeIds.clear();
|
|
670
|
-
this.relevantNodeIds.clear();
|
|
671
|
-
this.nodeDataCache.clear();
|
|
672
|
-
// Clear highlighting
|
|
673
|
-
this.highlightService.clear();
|
|
674
|
-
const treeComponent = this.tree();
|
|
675
|
-
if (!treeComponent) {
|
|
676
|
-
this.expandedNodesBeforeSearch = [];
|
|
677
|
-
this.nodesExpandedDuringSearch = [];
|
|
678
|
-
return;
|
|
679
|
-
}
|
|
680
|
-
// Reload tree to show all nodes (no filtering)
|
|
681
|
-
await treeComponent.reloadData();
|
|
682
|
-
// Collapse nodes that were expanded during search (in reverse order - leaves first)
|
|
683
|
-
const nodesToCollapse = [...this.nodesExpandedDuringSearch].reverse();
|
|
684
|
-
this.nodesExpandedDuringSearch = [];
|
|
685
|
-
for (const nodeId of nodesToCollapse) {
|
|
686
|
-
// Only collapse if it wasn't originally expanded before search
|
|
687
|
-
if (!this.expandedNodesBeforeSearch.includes(nodeId)) {
|
|
688
|
-
try {
|
|
689
|
-
treeComponent.collapseNode(nodeId);
|
|
690
|
-
}
|
|
691
|
-
catch {
|
|
692
|
-
// Node might not exist anymore, ignore
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
// Clear the stored expanded nodes
|
|
697
|
-
this.expandedNodesBeforeSearch = [];
|
|
698
|
-
}
|
|
699
|
-
/**
|
|
700
|
-
* Checks if a node matches the current search term
|
|
701
|
-
*/
|
|
702
|
-
isMatchingNode(nodeId) {
|
|
703
|
-
return this.matchingNodeIds.has(nodeId);
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* Handles node click events to apply category filters and track selected category for create command
|
|
707
|
-
*/
|
|
708
|
-
handleNodeClick(node) {
|
|
709
|
-
const nodeData = this.extractNodeData(node);
|
|
710
|
-
const applyConditions = this.vm().entityDef.category?.applyConditions || [];
|
|
711
|
-
const valueField = this.valueField();
|
|
712
|
-
const textField = this.textField();
|
|
713
|
-
const nodeId = String(nodeData[valueField] ?? node['id'] ?? '');
|
|
714
|
-
// Track selected category for default category when creating new entities
|
|
715
|
-
if (nodeId === 'all' || !nodeId) {
|
|
716
|
-
this.vm().setSelectedCategory(null);
|
|
717
|
-
}
|
|
718
|
-
else {
|
|
719
|
-
this.vm().setSelectedCategory({
|
|
720
|
-
id: nodeId,
|
|
721
|
-
title: String(nodeData[textField] ?? node['title'] ?? ''),
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
const categoryFilters = this.buildCategoryFilters(nodeData, applyConditions);
|
|
725
|
-
const viewFilters = this.buildViewFilters();
|
|
726
|
-
this.vm().dataSource.filter({
|
|
727
|
-
filters: [...viewFilters, ...categoryFilters],
|
|
728
|
-
logic: 'and',
|
|
729
|
-
});
|
|
730
|
-
this.vm().dataSource.refresh();
|
|
731
|
-
}
|
|
732
|
-
/**
|
|
733
|
-
* Handles node toggle events (expansion/collapse)
|
|
734
|
-
*/
|
|
735
|
-
async onNodeToggle(_event) {
|
|
736
|
-
// Tree component handles lazy loading via datasource callback
|
|
737
|
-
}
|
|
738
|
-
//#endregion
|
|
739
|
-
//#region ---- CRUD Operations ----
|
|
740
|
-
/**
|
|
741
|
-
* Creates a new root category node (uses Entity:Create command).
|
|
742
|
-
*/
|
|
743
|
-
async handleCreateRootClick(event) {
|
|
744
|
-
this.preventDefaultAndStopPropagation(event);
|
|
745
|
-
try {
|
|
746
|
-
const result = await this.executeCreateCommand(undefined);
|
|
747
|
-
await this.applyCreateResult(result, undefined);
|
|
748
|
-
}
|
|
749
|
-
catch (error) {
|
|
750
|
-
console.error('Error creating root category:', error);
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
|
-
* Creates a new child category under the given parent node (uses Entity:Create command).
|
|
755
|
-
*/
|
|
756
|
-
async handleCreateChildClick(node, event) {
|
|
757
|
-
this.preventDefaultAndStopPropagation(event);
|
|
758
|
-
try {
|
|
759
|
-
const parentId = this.extractNodeId(node);
|
|
760
|
-
const result = await this.executeCreateCommand(parentId);
|
|
761
|
-
await this.applyCreateResult(result, parentId);
|
|
762
|
-
}
|
|
763
|
-
catch (error) {
|
|
764
|
-
console.error('Error creating child category:', error);
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
/**
|
|
768
|
-
* Updates an existing category node (uses Entity:Update command).
|
|
769
|
-
*/
|
|
770
|
-
async handleEditNodeClick(node, event) {
|
|
771
|
-
this.preventDefaultAndStopPropagation(event);
|
|
772
|
-
try {
|
|
773
|
-
const nodeData = this.extractNodeData(node);
|
|
774
|
-
const result = await this.executeUpdateCommand(nodeData);
|
|
775
|
-
await this.applyUpdateResult(result, node);
|
|
776
|
-
}
|
|
777
|
-
catch (error) {
|
|
778
|
-
console.error('Error editing category:', error);
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* Deletes a category node
|
|
783
|
-
*/
|
|
784
|
-
async handleDeleteNodeClick(node, event) {
|
|
785
|
-
this.preventDefaultAndStopPropagation(event);
|
|
786
|
-
try {
|
|
787
|
-
const nodeData = this.extractNodeData(node);
|
|
788
|
-
const context = await this.executeDeleteWorkflow(nodeData);
|
|
789
|
-
await this.handleDeleteResult(context, node);
|
|
790
|
-
}
|
|
791
|
-
catch (error) {
|
|
792
|
-
console.error('Error deleting category:', error);
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
//#endregion
|
|
796
|
-
//#region ---- Private Tree Management Methods ----
|
|
797
|
-
/**
|
|
798
|
-
* Initializes the category tree data structure
|
|
799
|
-
*/
|
|
800
|
-
async initializeTree() {
|
|
801
|
-
this.setLoadingWithDelay(true);
|
|
802
|
-
try {
|
|
803
|
-
const entityKey = this.categoryEntityKey();
|
|
804
|
-
this.treeConfig = {
|
|
805
|
-
entityKey,
|
|
806
|
-
textField: this.textField(),
|
|
807
|
-
valueField: this.valueField(),
|
|
808
|
-
};
|
|
809
|
-
this.treeData = await this.categoryTreeService.initializeCategoryTree(this.treeConfig);
|
|
810
|
-
if (!this.treeData) {
|
|
811
|
-
this.clearLoadingState();
|
|
812
|
-
return;
|
|
813
|
-
}
|
|
814
|
-
// Set parent key from entity definition
|
|
815
|
-
if (this.treeData.categoryEntityDef?.parentKey) {
|
|
816
|
-
this.treeConfig.parentKey = this.treeData.categoryEntityDef.parentKey;
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
catch (error) {
|
|
820
|
-
console.error('Error loading categories:', error);
|
|
821
|
-
}
|
|
822
|
-
finally {
|
|
823
|
-
this.clearLoadingState();
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
/**
|
|
827
|
-
* Loads root nodes for the tree
|
|
828
|
-
*/
|
|
829
|
-
async loadRootNodes() {
|
|
830
|
-
if (!this.isTreeInitialized()) {
|
|
831
|
-
return [];
|
|
832
|
-
}
|
|
833
|
-
// Load root categories
|
|
834
|
-
const items = await this.categoryTreeService.loadRootCategories(this.treeData, this.treeConfig);
|
|
835
|
-
if (!items) {
|
|
836
|
-
return [];
|
|
837
|
-
}
|
|
838
|
-
const rootNode = await this.categoryTreeService.createRootNode(items, this.treeConfig);
|
|
839
|
-
// Filter root's children when search is active
|
|
840
|
-
if (this.relevantNodeIds.size > 0 && rootNode['children']) {
|
|
841
|
-
rootNode['children'] = rootNode['children'].filter((child) => {
|
|
842
|
-
const childId = String(child['id'] ?? '');
|
|
843
|
-
return this.relevantNodeIds.has(childId);
|
|
844
|
-
});
|
|
845
|
-
rootNode['childrenCount'] = rootNode['children'].length;
|
|
846
|
-
}
|
|
847
|
-
return [rootNode];
|
|
848
|
-
}
|
|
849
|
-
/**
|
|
850
|
-
* Loads child nodes for a given parent ID
|
|
851
|
-
*/
|
|
852
|
-
async loadChildNodes(parentId) {
|
|
853
|
-
if (!this.isTreeInitialized()) {
|
|
854
|
-
return [];
|
|
855
|
-
}
|
|
856
|
-
// Create minimal node object - loadChildren only needs node.id
|
|
857
|
-
const targetNode = {
|
|
858
|
-
id: parentId,
|
|
859
|
-
};
|
|
860
|
-
let children = await this.categoryTreeService.loadChildren(targetNode, this.treeData, this.treeConfig);
|
|
861
|
-
// Filter children when search is active
|
|
862
|
-
if (this.relevantNodeIds.size > 0) {
|
|
863
|
-
children = children.filter((child) => {
|
|
864
|
-
const childId = String(child['id'] ?? '');
|
|
865
|
-
return this.relevantNodeIds.has(childId);
|
|
866
|
-
});
|
|
867
|
-
}
|
|
868
|
-
return children;
|
|
869
|
-
}
|
|
870
|
-
/**
|
|
871
|
-
* Refreshes the tree view component
|
|
872
|
-
*/
|
|
873
|
-
refreshTree() {
|
|
874
|
-
const treeComponent = this.tree();
|
|
875
|
-
if (treeComponent) {
|
|
876
|
-
treeComponent.refresh();
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
/**
|
|
880
|
-
* Refreshes tree after CRUD operations
|
|
881
|
-
*/
|
|
882
|
-
async refreshAfterChange(parentId) {
|
|
883
|
-
this.refreshTree();
|
|
884
|
-
}
|
|
885
|
-
/**
|
|
886
|
-
* Adds a new node to the tree after create operation
|
|
887
|
-
*/
|
|
888
|
-
async addNodeToTree(entityData, parentId) {
|
|
889
|
-
if (!this.isTreeInitialized()) {
|
|
890
|
-
return;
|
|
891
|
-
}
|
|
892
|
-
const treeComponent = this.tree();
|
|
893
|
-
if (!treeComponent) {
|
|
894
|
-
return;
|
|
895
|
-
}
|
|
896
|
-
const newNode = this.categoryTreeService.convertToTreeNode(entityData, this.treeConfig);
|
|
897
|
-
if (parentId) {
|
|
898
|
-
await this.addChildNode(treeComponent, parentId, newNode);
|
|
899
|
-
}
|
|
900
|
-
else {
|
|
901
|
-
await this.addRootNode(treeComponent, newNode);
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
/**
|
|
905
|
-
* Adds a child node to a parent node
|
|
906
|
-
*/
|
|
907
|
-
async addChildNode(treeComponent, parentId, newNode) {
|
|
908
|
-
const parentNode = treeComponent.findNode(parentId);
|
|
909
|
-
if (!parentNode) {
|
|
910
|
-
await this.refreshAfterChange(parentId);
|
|
911
|
-
return;
|
|
912
|
-
}
|
|
913
|
-
if (!treeComponent.isNodeExpanded(parentId)) {
|
|
914
|
-
await treeComponent.expandNode(parentId);
|
|
915
|
-
}
|
|
916
|
-
treeComponent.addChild(parentId, newNode);
|
|
917
|
-
}
|
|
918
|
-
/**
|
|
919
|
-
* Adds a root node to the tree
|
|
920
|
-
*/
|
|
921
|
-
async addRootNode(treeComponent, newNode) {
|
|
922
|
-
const rootNode = treeComponent.findNode(ROOT_NODE_ID);
|
|
923
|
-
if (!rootNode) {
|
|
924
|
-
await this.refreshAfterChange();
|
|
925
|
-
return;
|
|
926
|
-
}
|
|
927
|
-
if (!treeComponent.isNodeExpanded(ROOT_NODE_ID)) {
|
|
928
|
-
await treeComponent.expandNode(ROOT_NODE_ID);
|
|
929
|
-
}
|
|
930
|
-
treeComponent.addChild(ROOT_NODE_ID, newNode);
|
|
931
|
-
}
|
|
932
|
-
/**
|
|
933
|
-
* Updates an existing node in the tree after edit operation
|
|
934
|
-
*/
|
|
935
|
-
async updateNodeInTree(nodeId, entityData) {
|
|
936
|
-
if (!this.isTreeInitialized()) {
|
|
937
|
-
return;
|
|
938
|
-
}
|
|
939
|
-
const treeComponent = this.tree();
|
|
940
|
-
if (!treeComponent) {
|
|
941
|
-
return;
|
|
942
|
-
}
|
|
943
|
-
const existingNode = treeComponent.findNode(nodeId);
|
|
944
|
-
if (!existingNode) {
|
|
945
|
-
await this.refreshNodeParent(entityData);
|
|
946
|
-
return;
|
|
947
|
-
}
|
|
948
|
-
// Check if parent changed
|
|
949
|
-
const parentKey = this.treeData?.categoryEntityDef?.parentKey;
|
|
950
|
-
let newParentId = undefined;
|
|
951
|
-
if (parentKey && entityData[parentKey]) {
|
|
952
|
-
const parentValue = String(entityData[parentKey]);
|
|
953
|
-
// 'all' means root, so treat it as undefined
|
|
954
|
-
newParentId = parentValue !== 'all' && parentValue !== '' ? parentValue : undefined;
|
|
955
|
-
}
|
|
956
|
-
const currentParent = treeComponent.getParent(nodeId);
|
|
957
|
-
const currentParentId = currentParent ? String(currentParent['id'] ?? '') : undefined;
|
|
958
|
-
// Normalize current parent: 'all' means root (undefined)
|
|
959
|
-
const normalizedCurrentParentId = currentParentId === 'all' || currentParentId === '' ? undefined : currentParentId;
|
|
960
|
-
// Handle parent change: move node to new parent if parent changed
|
|
961
|
-
if (newParentId !== normalizedCurrentParentId) {
|
|
962
|
-
// If parent changed, move the node first
|
|
963
|
-
const moved = treeComponent.moveNode(nodeId, newParentId);
|
|
964
|
-
if (!moved) {
|
|
965
|
-
// If move failed, refresh the tree to ensure consistency
|
|
966
|
-
await this.refreshNodeParent(entityData);
|
|
967
|
-
return;
|
|
968
|
-
}
|
|
969
|
-
// After moving, we need to ensure the new parent is expanded
|
|
970
|
-
if (newParentId) {
|
|
971
|
-
if (!treeComponent.isNodeExpanded(newParentId)) {
|
|
972
|
-
await treeComponent.expandNode(newParentId);
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
else {
|
|
976
|
-
// Moving to root - ensure root is expanded
|
|
977
|
-
if (!treeComponent.isNodeExpanded(ROOT_NODE_ID)) {
|
|
978
|
-
await treeComponent.expandNode(ROOT_NODE_ID);
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
// Update node properties (title, data, etc.)
|
|
983
|
-
const updatedNode = this.categoryTreeService.convertToTreeNode(entityData, this.treeConfig);
|
|
984
|
-
const updates = {
|
|
985
|
-
['title']: updatedNode['title'],
|
|
986
|
-
['data']: updatedNode['data'],
|
|
987
|
-
['childrenCount']: updatedNode['childrenCount'],
|
|
988
|
-
['icon']: updatedNode['icon'],
|
|
989
|
-
};
|
|
990
|
-
treeComponent.editNode(nodeId, updates);
|
|
991
|
-
}
|
|
992
|
-
/**
|
|
993
|
-
* Removes a node from the tree after delete operation
|
|
994
|
-
*/
|
|
995
|
-
async removeNodeFromTree(nodeId) {
|
|
996
|
-
const treeComponent = this.tree();
|
|
997
|
-
if (!treeComponent) {
|
|
998
|
-
return;
|
|
999
|
-
}
|
|
1000
|
-
const nodeToDelete = treeComponent.findNode(nodeId);
|
|
1001
|
-
if (!nodeToDelete) {
|
|
1002
|
-
await this.refreshAfterChange();
|
|
1003
|
-
return;
|
|
1004
|
-
}
|
|
1005
|
-
treeComponent.removeNode(nodeId);
|
|
1006
|
-
}
|
|
1007
|
-
//#endregion
|
|
1008
|
-
//#region ---- Entity CRUD (Commands) ----
|
|
1009
|
-
/**
|
|
1010
|
-
* Executes Entity:Create command for category (standard command-based create).
|
|
1011
|
-
*/
|
|
1012
|
-
async executeCreateCommand(parentId) {
|
|
1013
|
-
const entityKey = this.categoryEntityKey();
|
|
1014
|
-
const [moduleName, entityName] = entityKey.split('.');
|
|
1015
|
-
const entityRef = await this.entityRegistry.resolve(moduleName, entityName);
|
|
1016
|
-
const data = {};
|
|
1017
|
-
if (parentId && this.treeData?.categoryEntityDef?.parentKey) {
|
|
1018
|
-
data[this.treeData.categoryEntityDef.parentKey] = parentId;
|
|
1019
|
-
}
|
|
1020
|
-
const createCategoryTitle = await this.translate.translateAsync('@general:actions.create-category.title');
|
|
1021
|
-
const result = await this.commandService.execute('Entity:Create', {
|
|
1022
|
-
__context__: {
|
|
1023
|
-
entity: entityKey,
|
|
1024
|
-
entityInfo: {
|
|
1025
|
-
name: entityRef.name,
|
|
1026
|
-
module: entityRef.module,
|
|
1027
|
-
title: entityRef.title ?? entityRef.formats?.individual ?? '',
|
|
1028
|
-
parentKey: entityRef.parentKey,
|
|
1029
|
-
},
|
|
1030
|
-
data: Object.keys(data).length > 0 ? data : undefined,
|
|
1031
|
-
options: {
|
|
1032
|
-
process: { redirect: false, canCreateNewOne: !!parentId },
|
|
1033
|
-
decoration: { header: { title: createCategoryTitle } },
|
|
1034
|
-
},
|
|
1035
|
-
},
|
|
1036
|
-
});
|
|
1037
|
-
return result ?? { success: false };
|
|
1038
|
-
}
|
|
1039
|
-
/**
|
|
1040
|
-
* Executes Entity:Update command for category (standard command-based update).
|
|
1041
|
-
*/
|
|
1042
|
-
async executeUpdateCommand(nodeData) {
|
|
1043
|
-
const entityKey = this.categoryEntityKey();
|
|
1044
|
-
const [moduleName, entityName] = entityKey.split('.');
|
|
1045
|
-
const entityRef = await this.entityRegistry.resolve(moduleName, entityName);
|
|
1046
|
-
const result = await this.commandService.execute('Entity:Update', {
|
|
1047
|
-
__context__: {
|
|
1048
|
-
entity: entityKey,
|
|
1049
|
-
entityInfo: {
|
|
1050
|
-
name: entityRef.name,
|
|
1051
|
-
module: entityRef.module,
|
|
1052
|
-
title: entityRef.title ?? entityRef.formats?.individual ?? '',
|
|
1053
|
-
parentKey: entityRef.parentKey,
|
|
1054
|
-
},
|
|
1055
|
-
data: nodeData,
|
|
1056
|
-
options: { layout: { size: 'md' } },
|
|
1057
|
-
},
|
|
1058
|
-
});
|
|
1059
|
-
return result ?? { success: false };
|
|
1060
|
-
}
|
|
1061
|
-
/**
|
|
1062
|
-
* Applies create command result to the tree (add node or refresh).
|
|
1063
|
-
*/
|
|
1064
|
-
async applyCreateResult(result, parentId) {
|
|
1065
|
-
if (!result.success || !this.isTreeInitialized()) {
|
|
1066
|
-
await this.refreshAfterChange(parentId);
|
|
1067
|
-
return;
|
|
1068
|
-
}
|
|
1069
|
-
const newEntityData = result.data;
|
|
1070
|
-
if (newEntityData) {
|
|
1071
|
-
await this.addNodeToTree(newEntityData, parentId);
|
|
1072
|
-
}
|
|
1073
|
-
else {
|
|
1074
|
-
await this.refreshAfterChange(parentId);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
/**
|
|
1078
|
-
* Applies update command result to the tree (update node or refresh).
|
|
1079
|
-
*/
|
|
1080
|
-
async applyUpdateResult(result, node) {
|
|
1081
|
-
if (!result.success || !this.isTreeInitialized()) {
|
|
1082
|
-
await this.refreshNodeParent(this.extractNodeData(node));
|
|
1083
|
-
return;
|
|
1084
|
-
}
|
|
1085
|
-
const updatedEntityData = result.data;
|
|
1086
|
-
if (updatedEntityData) {
|
|
1087
|
-
await this.updateNodeInTree(this.extractNodeId(node), updatedEntityData);
|
|
1088
|
-
}
|
|
1089
|
-
else {
|
|
1090
|
-
await this.refreshNodeParent(this.extractNodeData(node));
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
//#endregion
|
|
1094
|
-
//#region ---- Delete (Workflow) ----
|
|
1095
|
-
/**
|
|
1096
|
-
* Executes delete-entity workflow (platform has no Entity:Delete command).
|
|
1097
|
-
*/
|
|
1098
|
-
async executeDeleteWorkflow(nodeData) {
|
|
1099
|
-
return await this.workflow.execute('delete-entity', {
|
|
1100
|
-
entity: this.categoryEntityKey(),
|
|
1101
|
-
data: nodeData,
|
|
1102
|
-
options: { process: { showResult: true } },
|
|
1103
|
-
});
|
|
1104
|
-
}
|
|
1105
|
-
/**
|
|
1106
|
-
* Handles the result of a delete operation
|
|
1107
|
-
*/
|
|
1108
|
-
async handleDeleteResult(context, node) {
|
|
1109
|
-
const result = context.getOutput('result');
|
|
1110
|
-
if (result) {
|
|
1111
|
-
await this.removeNodeFromTree(this.extractNodeId(node));
|
|
1112
|
-
}
|
|
1113
|
-
else {
|
|
1114
|
-
await this.refreshNodeParent(this.extractNodeData(node));
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
//#endregion
|
|
1118
|
-
//#region ---- Utility Methods ----
|
|
1119
|
-
/**
|
|
1120
|
-
* Checks if tree data and config are initialized
|
|
1121
|
-
*/
|
|
1122
|
-
isTreeInitialized() {
|
|
1123
|
-
return !!(this.treeData && this.treeConfig);
|
|
1124
|
-
}
|
|
1125
|
-
/**
|
|
1126
|
-
* Extracts node data from a tree node
|
|
1127
|
-
*/
|
|
1128
|
-
extractNodeData(node) {
|
|
1129
|
-
return (node['data'] || node);
|
|
1130
|
-
}
|
|
1131
|
-
/**
|
|
1132
|
-
* Extracts node ID from a tree node
|
|
1133
|
-
*/
|
|
1134
|
-
extractNodeId(node) {
|
|
1135
|
-
return String(node['id'] ?? '');
|
|
1136
|
-
}
|
|
1137
|
-
/**
|
|
1138
|
-
* Builds category filters from node data and apply conditions
|
|
1139
|
-
*/
|
|
1140
|
-
buildCategoryFilters(nodeData, applyConditions) {
|
|
1141
|
-
return applyConditions
|
|
1142
|
-
.map((condition) => {
|
|
1143
|
-
const value = nodeData[condition.value];
|
|
1144
|
-
if (value === 'all' || value == null) {
|
|
1145
|
-
return null;
|
|
1146
|
-
}
|
|
1147
|
-
return {
|
|
1148
|
-
field: condition.name,
|
|
1149
|
-
value,
|
|
1150
|
-
operator: condition.operator,
|
|
1151
|
-
};
|
|
1152
|
-
})
|
|
1153
|
-
.filter((item) => item !== null);
|
|
1154
|
-
}
|
|
1155
|
-
/**
|
|
1156
|
-
* Builds view filters from view conditions
|
|
1157
|
-
*/
|
|
1158
|
-
buildViewFilters() {
|
|
1159
|
-
return this.vm()
|
|
1160
|
-
.view()
|
|
1161
|
-
.conditions.map((condition) => ({ ...condition, field: condition.name }));
|
|
1162
|
-
}
|
|
1163
|
-
/**
|
|
1164
|
-
* Refreshes the parent node of the given entity data
|
|
1165
|
-
*/
|
|
1166
|
-
async refreshNodeParent(entityData) {
|
|
1167
|
-
const parentKey = this.treeData?.categoryEntityDef?.parentKey;
|
|
1168
|
-
const parentId = parentKey && entityData[parentKey] ? entityData[parentKey] : undefined;
|
|
1169
|
-
await this.refreshAfterChange(parentId);
|
|
1170
|
-
}
|
|
1171
|
-
/**
|
|
1172
|
-
* Prevents default behavior and stops event propagation
|
|
1173
|
-
*/
|
|
1174
|
-
preventDefaultAndStopPropagation(event) {
|
|
1175
|
-
event.nativeEvent.preventDefault();
|
|
1176
|
-
event.nativeEvent.stopPropagation();
|
|
1177
|
-
}
|
|
1178
|
-
//#endregion
|
|
1179
|
-
//#region ---- Loading State Management ----
|
|
1180
|
-
/**
|
|
1181
|
-
* Sets loading state with delay to avoid flickering for fast responses
|
|
1182
|
-
*/
|
|
1183
|
-
setLoadingWithDelay(loading) {
|
|
1184
|
-
if (!loading) {
|
|
1185
|
-
return;
|
|
1186
|
-
}
|
|
1187
|
-
if (this.loadingTimeoutId) {
|
|
1188
|
-
clearTimeout(this.loadingTimeoutId);
|
|
1189
|
-
}
|
|
1190
|
-
this.loadingTimeoutId = setTimeout(() => {
|
|
1191
|
-
this.isLoading.set(true);
|
|
1192
|
-
this.loadingTimeoutId = null;
|
|
1193
|
-
}, LOADING_DELAY_MS);
|
|
1194
|
-
}
|
|
1195
|
-
/**
|
|
1196
|
-
* Clears loading state and cancels any pending timeout
|
|
1197
|
-
*/
|
|
1198
|
-
clearLoadingState() {
|
|
1199
|
-
if (this.loadingTimeoutId) {
|
|
1200
|
-
clearTimeout(this.loadingTimeoutId);
|
|
1201
|
-
this.loadingTimeoutId = null;
|
|
1202
|
-
}
|
|
1203
|
-
this.isLoading.set(false);
|
|
1204
|
-
}
|
|
1205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1206
|
-
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\n (onValueChanged)=\"handleCategorySearchChange($event)\"\n [delayTime]=\"300\"\n [placeholder]=\"'@general:terms.interface.category.search.placeholder' | translate | async\"\n >\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\n 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 >\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\n [datasource]=\"datasource\"\n [selectMode]=\"selectMode()\"\n [selectionBehavior]=\"selectionBehavior()\"\n [dragArea]=\"dragArea()\"\n [dragBehavior]=\"dragBehavior()\"\n [showIcons]=\"showIcons()\"\n [showChildrenBadge]=\"showChildrenBadge()\"\n [expandedIcon]=\"expandedIcon()\"\n [collapsedIcon]=\"collapsedIcon()\"\n [indentSize]=\"indentSize()\"\n [look]=\"look()\"\n [titleField]=\"textField()\"\n [idField]=\"valueField()\"\n [expandOnDoubleClick]=\"true\"\n [nodeTemplate]=\"itemTemplate\"\n (onNodeToggle)=\"onNodeToggle($event)\"\n (onNodeClick)=\"handleNodeClick($event.node)\"\n #tree\n >\n </ax-tree-view>\n </div>\n } @else {\n <div class=\"__empty-state\">\n <axp-state-message\n 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 >\n @if (!categoryReadonly()) {\n <ax-button\n slot=\"actions\"\n (onClick)=\"handleCreateRootClick($event)\"\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@general:actions.add-new.title' | translate | async\"\n >\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 | translate | async;\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\n class=\"fas fa-folder\"\n [style.color]=\"item.color ?? 'rgba(var(--ax-sys-color-warning-500), 1)'\"\n ></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\n (onClick)=\"handleCreateChildClick(node, $event)\"\n look=\"blank\"\n color=\"default\"\n [text]=\"('@general:actions.add-new-child.title' | translate | async)!\"\n >\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button-item>\n <ax-button-item\n (onClick)=\"handleEditNodeClick(node, $event)\"\n look=\"blank\"\n [text]=\"('@general:actions.edit.title' | translate | async)!\"\n >\n <ax-icon class=\"fas fa-pen\"></ax-icon>\n </ax-button-item>\n <ax-button-item\n (onClick)=\"handleDeleteNodeClick(node, $event)\"\n color=\"danger\"\n look=\"blank\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\"\n >\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>\n", 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", "look"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i10.AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1207
|
-
}
|
|
1208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryComponent, decorators: [{
|
|
1209
|
-
type: Component,
|
|
1210
|
-
args: [{ selector: 'axp-entity-category', standalone: true, encapsulation: ViewEncapsulation.None, imports: [
|
|
1211
|
-
CommonModule,
|
|
1212
|
-
AXDecoratorModule,
|
|
1213
|
-
AXTreeViewModule,
|
|
1214
|
-
AXTreeViewComponent,
|
|
1215
|
-
AXSkeletonModule,
|
|
1216
|
-
AXPThemeLayoutBlockComponent,
|
|
1217
|
-
AXSearchBoxModule,
|
|
1218
|
-
AXPThemeLayoutHeaderComponent,
|
|
1219
|
-
AXPThemeLayoutToolbarComponent,
|
|
1220
|
-
AXTranslationModule,
|
|
1221
|
-
AXButtonModule,
|
|
1222
|
-
AXDropdownModule,
|
|
1223
|
-
AXPStateMessageComponent,
|
|
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\n (onValueChanged)=\"handleCategorySearchChange($event)\"\n [delayTime]=\"300\"\n [placeholder]=\"'@general:terms.interface.category.search.placeholder' | translate | async\"\n >\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\n 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 >\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\n [datasource]=\"datasource\"\n [selectMode]=\"selectMode()\"\n [selectionBehavior]=\"selectionBehavior()\"\n [dragArea]=\"dragArea()\"\n [dragBehavior]=\"dragBehavior()\"\n [showIcons]=\"showIcons()\"\n [showChildrenBadge]=\"showChildrenBadge()\"\n [expandedIcon]=\"expandedIcon()\"\n [collapsedIcon]=\"collapsedIcon()\"\n [indentSize]=\"indentSize()\"\n [look]=\"look()\"\n [titleField]=\"textField()\"\n [idField]=\"valueField()\"\n [expandOnDoubleClick]=\"true\"\n [nodeTemplate]=\"itemTemplate\"\n (onNodeToggle)=\"onNodeToggle($event)\"\n (onNodeClick)=\"handleNodeClick($event.node)\"\n #tree\n >\n </ax-tree-view>\n </div>\n } @else {\n <div class=\"__empty-state\">\n <axp-state-message\n 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 >\n @if (!categoryReadonly()) {\n <ax-button\n slot=\"actions\"\n (onClick)=\"handleCreateRootClick($event)\"\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@general:actions.add-new.title' | translate | async\"\n >\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 | translate | async;\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\n class=\"fas fa-folder\"\n [style.color]=\"item.color ?? 'rgba(var(--ax-sys-color-warning-500), 1)'\"\n ></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\n (onClick)=\"handleCreateChildClick(node, $event)\"\n look=\"blank\"\n color=\"default\"\n [text]=\"('@general:actions.add-new-child.title' | translate | async)!\"\n >\n <ax-icon class=\"fas fa-plus\"></ax-icon>\n </ax-button-item>\n <ax-button-item\n (onClick)=\"handleEditNodeClick(node, $event)\"\n look=\"blank\"\n [text]=\"('@general:actions.edit.title' | translate | async)!\"\n >\n <ax-icon class=\"fas fa-pen\"></ax-icon>\n </ax-button-item>\n <ax-button-item\n (onClick)=\"handleDeleteNodeClick(node, $event)\"\n color=\"danger\"\n look=\"blank\"\n [text]=\"('@general:actions.delete.title' | translate | async)!\"\n >\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>\n" }]
|
|
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) => ({
|
|
1277
|
-
name: s.name,
|
|
1278
|
-
dir: s.dir,
|
|
1279
|
-
})), ...(ngDevMode ? [{ debugName: "sortQueries" }] : /* istanbul ignore next */ []));
|
|
1280
|
-
this.sortDefinitions = computed(() => this.vm.sortableFields().map((s) => ({
|
|
1281
|
-
name: s.name,
|
|
1282
|
-
title: s.title,
|
|
1283
|
-
dir: s.dir,
|
|
1284
|
-
})), ...(ngDevMode ? [{ debugName: "sortDefinitions" }] : /* istanbul ignore next */ []));
|
|
1285
|
-
}
|
|
1286
|
-
async ngOnInit() {
|
|
1287
|
-
// Prefer saved settings (view/columns/sorts/filters) if available, then apply
|
|
1288
|
-
await this.loadSettings();
|
|
1289
|
-
await this.vm.setView();
|
|
1290
|
-
await this.vm.ensureListPagingResolved();
|
|
1291
|
-
this.filtersDefinitions.set(this.vm.filtersDef);
|
|
1292
|
-
this.isInitializing = true;
|
|
1293
|
-
// this.pendingInitialFilters = true;
|
|
1294
|
-
// this.pendingInitialSorts = true;
|
|
1295
|
-
this.setInitialFiltersFromSettingsOrView();
|
|
1296
|
-
// Ensure initial load even when filters/sorts are absent
|
|
1297
|
-
setTimeout(() => {
|
|
1298
|
-
this.isInitializing = false;
|
|
1299
|
-
this.scheduleApply();
|
|
1300
|
-
}, 0);
|
|
1301
|
-
}
|
|
1302
|
-
async loadSettings() {
|
|
1303
|
-
const filterTriggerMode = await this.settingsService.get(AXPCommonSettings.EntityFilterApplyMode);
|
|
1304
|
-
this.filterTriggerMode = (filterTriggerMode?.value ?? 'auto');
|
|
1305
|
-
}
|
|
1306
|
-
scheduleApply() {
|
|
1307
|
-
clearTimeout(this.applyTimer);
|
|
1308
|
-
this.applyTimer = setTimeout(() => {
|
|
1309
|
-
this.vm.applyFilterAndSort();
|
|
1310
|
-
}, 50);
|
|
1311
|
-
}
|
|
1312
|
-
async onViewChanged(view) {
|
|
1313
|
-
await this.vm.setView(view.name);
|
|
1314
|
-
// Sync query param immediately on tab change
|
|
1315
|
-
this.router.navigate([], {
|
|
1316
|
-
relativeTo: this.activeRoute,
|
|
1317
|
-
queryParams: { view: view.name },
|
|
1318
|
-
queryParamsHandling: 'merge',
|
|
1319
|
-
replaceUrl: true,
|
|
1320
|
-
});
|
|
1321
|
-
this.isInitializing = true;
|
|
1322
|
-
this.pendingInitialFilters = true;
|
|
1323
|
-
this.pendingInitialSorts = true;
|
|
1324
|
-
this.setInitialFiltersFromSettingsOrView();
|
|
1325
|
-
// Ensure initial load after view change
|
|
1326
|
-
setTimeout(() => {
|
|
1327
|
-
this.isInitializing = false;
|
|
1328
|
-
this.scheduleApply();
|
|
1329
|
-
}, 0);
|
|
1330
|
-
}
|
|
1331
|
-
#effect;
|
|
1332
|
-
setInitialFiltersFromSettingsOrView() {
|
|
1333
|
-
const saved = this.vm.filterQueries();
|
|
1334
|
-
this.previousFilterQueries.set(saved);
|
|
1335
|
-
const viewConditions = this.vm.view().conditions.map((c) => c.name);
|
|
1336
|
-
if (saved && saved.length) {
|
|
1337
|
-
this.initialFilters.set(saved.map((s) => ({ ...s, hidden: viewConditions.includes(s.field) })));
|
|
1338
|
-
return;
|
|
1339
|
-
}
|
|
1340
|
-
this.initialFilters.set(this.vm.view().conditions.map((c) => ({
|
|
1341
|
-
field: c.name,
|
|
1342
|
-
operator: c.operator,
|
|
1343
|
-
value: c.value,
|
|
1344
|
-
hidden: true,
|
|
1345
|
-
})));
|
|
1346
|
-
}
|
|
1347
|
-
onFiltersChanged(filters) {
|
|
1348
|
-
if (this.isInitializing || this.pendingInitialFilters) {
|
|
1349
|
-
this.pendingInitialFilters = false;
|
|
1350
|
-
return;
|
|
1351
|
-
}
|
|
1352
|
-
this.vm.filterQueries.set(filters);
|
|
1353
|
-
if (this.filterTriggerMode === 'auto') {
|
|
1354
|
-
this.applyFilters();
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
applyFilters() {
|
|
1358
|
-
this.previousFilterQueries.set(this.vm.filterQueries());
|
|
1359
|
-
this.vm.saveSettings('filters', this.vm.filterQueries());
|
|
1360
|
-
this.scheduleApply();
|
|
1361
|
-
}
|
|
1362
|
-
onSortQueriesChange(e) {
|
|
1363
|
-
if (this.isInitializing || this.pendingInitialSorts) {
|
|
1364
|
-
this.pendingInitialSorts = false;
|
|
1365
|
-
return;
|
|
1366
|
-
}
|
|
1367
|
-
this.vm.sortedFields.set(e.map((s) => ({
|
|
1368
|
-
name: s.name,
|
|
1369
|
-
title: s.name,
|
|
1370
|
-
dir: s.dir,
|
|
1371
|
-
})));
|
|
1372
|
-
// Persist sorts per module/entity/view
|
|
1373
|
-
this.vm.saveSettings('sorts', e);
|
|
1374
|
-
this.scheduleApply();
|
|
1375
|
-
}
|
|
1376
|
-
onColumnsChange(columns) {
|
|
1377
|
-
const keyOf = (c) => c.column?.options?.dataPath ?? c.name;
|
|
1378
|
-
this.vm.columns.update((prev) => {
|
|
1379
|
-
const byKey = new Map(prev.map((c) => [keyOf(c), c]));
|
|
1380
|
-
return columns.map((newColumn) => {
|
|
1381
|
-
const existing = byKey.get(keyOf(newColumn));
|
|
1382
|
-
if (!existing) {
|
|
1383
|
-
return null;
|
|
1384
|
-
}
|
|
1385
|
-
return new AXPEntityListViewColumnViewModel(existing.property, {
|
|
1386
|
-
...existing.column,
|
|
1387
|
-
options: {
|
|
1388
|
-
...existing.column.options,
|
|
1389
|
-
visible: newColumn.visible,
|
|
1390
|
-
},
|
|
1391
|
-
});
|
|
1392
|
-
}).filter((c) => c != null);
|
|
1393
|
-
});
|
|
1394
|
-
// Persist column order/visibility
|
|
1395
|
-
this.vm.onColumnsChanged(this.vm.columns());
|
|
1396
|
-
// Use debounced apply to avoid triple refresh when combined with sorts/filters
|
|
1397
|
-
// this.scheduleApply();
|
|
1398
|
-
}
|
|
1399
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityMasterToolbarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1400
|
-
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 }); }
|
|
1401
|
-
}
|
|
1402
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityMasterToolbarViewComponent, decorators: [{
|
|
1403
|
-
type: Component,
|
|
1404
|
-
args: [{ selector: 'axp-entity-master-toolbar-view', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
1405
|
-
CommonModule,
|
|
1406
|
-
AXButtonModule,
|
|
1407
|
-
AXDecoratorModule,
|
|
1408
|
-
AXTranslationModule,
|
|
1409
|
-
AXPQueryFiltersComponent,
|
|
1410
|
-
AXPopoverModule,
|
|
1411
|
-
AXPQuerySortsComponent,
|
|
1412
|
-
AXPQueryViewsComponent,
|
|
1413
|
-
AXPQueryColumnsComponent,
|
|
1414
|
-
], host: {
|
|
1415
|
-
class: 'ax-w-full',
|
|
1416
|
-
}, 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" }]
|
|
1417
|
-
}], propDecorators: { vm: [{
|
|
1418
|
-
type: Input,
|
|
1419
|
-
args: ['viewModel']
|
|
1420
|
-
}] } });
|
|
1421
|
-
|
|
1422
|
-
class AXPEntityMasterListViewComponent extends AXPPageLayoutBaseComponent {
|
|
1423
|
-
constructor(platform) {
|
|
1424
|
-
super();
|
|
1425
|
-
this.platform = platform;
|
|
1426
|
-
this.activeRoute = inject(ActivatedRoute);
|
|
1427
|
-
this.router = inject(Router);
|
|
1428
|
-
this.vm = this.activeRoute.snapshot.data['vm'];
|
|
1429
|
-
//
|
|
1430
|
-
this.store = inject(AXPLayoutThemeService);
|
|
1431
|
-
//
|
|
1432
|
-
this.searchBarShown = signal(true, ...(ngDevMode ? [{ debugName: "searchBarShown" }] : /* istanbul ignore next */ []));
|
|
1433
|
-
this.activeEndSideView = signal('column', ...(ngDevMode ? [{ debugName: "activeEndSideView" }] : /* istanbul ignore next */ []));
|
|
1434
|
-
this.categorySearchValue = signal('', ...(ngDevMode ? [{ debugName: "categorySearchValue" }] : /* istanbul ignore next */ []));
|
|
1435
|
-
// @ViewChild('grid', { static: true}) grid: AXDataTableComponent;
|
|
1436
|
-
this.grid = viewChild('grid', ...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
|
|
1437
|
-
this.initializedFromRoute = false;
|
|
1438
|
-
this.lastEvaluatedViewName = null;
|
|
1439
|
-
this.componentDestroyed = new Subject();
|
|
1440
|
-
this.isRestoringExpandedRows = false;
|
|
1441
|
-
this.restoreExpandedRowsScheduled = false;
|
|
1442
|
-
this.commandRowItems = computed(() => {
|
|
1443
|
-
return this.vm.primaryRowActions().map((c) => {
|
|
1444
|
-
return {
|
|
1445
|
-
icon: c.icon,
|
|
1446
|
-
name: c.name,
|
|
1447
|
-
text: translateSync(c.title),
|
|
1448
|
-
color: c.color,
|
|
1449
|
-
disabled: c.disabled,
|
|
1450
|
-
default: c.default,
|
|
1451
|
-
};
|
|
1452
|
-
});
|
|
1453
|
-
}, ...(ngDevMode ? [{ debugName: "commandRowItems" }] : /* istanbul ignore next */ []));
|
|
1454
|
-
this.getDropdownRowItems = (rowData) => {
|
|
1455
|
-
return Promise.resolve(this.dropdownRowItems(rowData));
|
|
1456
|
-
};
|
|
1457
|
-
this.getCommandRowItems = () => {
|
|
1458
|
-
return this.commandRowItems();
|
|
1459
|
-
};
|
|
1460
|
-
effect(() => {
|
|
1461
|
-
if (this.grid()) {
|
|
1462
|
-
this.grid().selectedRows = this.vm.selectedItems();
|
|
1463
|
-
}
|
|
1464
|
-
});
|
|
1465
|
-
//
|
|
1466
|
-
this.vm.events$.subscribe(async (e) => {
|
|
1467
|
-
const refreshTargetId = e.meta?.refreshTargetId;
|
|
1468
|
-
const resetPagination = e.meta?.resetPagination === true;
|
|
1469
|
-
if (e.action == 'refresh') {
|
|
1470
|
-
if (refreshTargetId) {
|
|
1471
|
-
await this.grid()?.refreshItemChildren(refreshTargetId);
|
|
1472
|
-
this.updateParentHasChildAfterRefresh(refreshTargetId);
|
|
1473
|
-
}
|
|
1474
|
-
else {
|
|
1475
|
-
if (!resetPagination) {
|
|
1476
|
-
await this.vm.ensureListPagingResolved();
|
|
1477
|
-
this.vm.applyPagingToDataSourceWithoutLoad();
|
|
1478
|
-
}
|
|
1479
|
-
this.grid()?.refresh({
|
|
1480
|
-
reset: resetPagination,
|
|
1481
|
-
});
|
|
1482
|
-
if (!resetPagination) {
|
|
1483
|
-
this.scheduleSyncGridPagerUi();
|
|
1484
|
-
}
|
|
1485
|
-
this.scheduleRestoreExpandedRows();
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
|
-
});
|
|
1489
|
-
// Keep URL query param `view` in sync with current vm view
|
|
1490
|
-
effect(() => {
|
|
1491
|
-
if (!this.initializedFromRoute) {
|
|
1492
|
-
return;
|
|
1493
|
-
}
|
|
1494
|
-
const currentViewName = this.vm.view().name;
|
|
1495
|
-
const urlView = this.activeRoute.snapshot.queryParamMap.get('view');
|
|
1496
|
-
if (currentViewName && currentViewName !== urlView) {
|
|
1497
|
-
this.router.navigate([], {
|
|
1498
|
-
relativeTo: this.activeRoute,
|
|
1499
|
-
queryParams: { view: currentViewName },
|
|
1500
|
-
queryParamsHandling: 'merge',
|
|
1501
|
-
replaceUrl: true,
|
|
1502
|
-
});
|
|
1503
|
-
}
|
|
1504
|
-
});
|
|
1505
|
-
// Recompute page actions/title/etc. when view changes (expressions may depend on list.view()).
|
|
1506
|
-
effect(() => {
|
|
1507
|
-
const currentViewName = this.vm.view().name;
|
|
1508
|
-
if (!this.initializedFromRoute) {
|
|
1509
|
-
this.lastEvaluatedViewName = currentViewName;
|
|
1510
|
-
return;
|
|
1511
|
-
}
|
|
1512
|
-
if (this.lastEvaluatedViewName !== currentViewName) {
|
|
1513
|
-
this.lastEvaluatedViewName = currentViewName;
|
|
1514
|
-
this.recompute();
|
|
1515
|
-
this.scheduleRestoreExpandedRows();
|
|
1516
|
-
}
|
|
1517
|
-
});
|
|
1518
|
-
}
|
|
1519
|
-
async ngOnInit() {
|
|
1520
|
-
// React to external URL changes (back/forward navigation or deep links)
|
|
1521
|
-
this.queryParamSub = this.activeRoute.queryParamMap.subscribe(async (qp) => {
|
|
1522
|
-
const viewFromUrl = qp.get('view');
|
|
1523
|
-
await this.vm.setView(viewFromUrl);
|
|
1524
|
-
this.scheduleRestoreExpandedRows();
|
|
1525
|
-
});
|
|
1526
|
-
}
|
|
1527
|
-
async ngAfterViewInit() {
|
|
1528
|
-
const viewFromUrl = this.activeRoute.snapshot.queryParamMap.get('view');
|
|
1529
|
-
await this.vm.setView(viewFromUrl);
|
|
1530
|
-
const resolvedView = this.vm.view().name;
|
|
1531
|
-
const currentUrlView = this.activeRoute.snapshot.queryParamMap.get('view');
|
|
1532
|
-
if (currentUrlView !== resolvedView) {
|
|
1533
|
-
this.router.navigate([], {
|
|
1534
|
-
relativeTo: this.activeRoute,
|
|
1535
|
-
queryParams: { view: resolvedView },
|
|
1536
|
-
queryParamsHandling: 'merge',
|
|
1537
|
-
replaceUrl: true,
|
|
1538
|
-
});
|
|
1539
|
-
}
|
|
1540
|
-
this.initializedFromRoute = true;
|
|
1541
|
-
this.bindExpandedRowPersistence();
|
|
1542
|
-
this.scheduleRestoreExpandedRows();
|
|
1543
|
-
}
|
|
1544
|
-
onColumnSizeChanged(e) {
|
|
1545
|
-
if (e.isUserInteraction && e.type === 'end') {
|
|
1546
|
-
this.vm.saveSettings('columnSizes', e.data);
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
onPageChanged(e) {
|
|
1550
|
-
if (e.isUserInteraction && !this.vm.skipListPagingPersistence) {
|
|
1551
|
-
this.vm.saveListPaging(e.take, e.skip);
|
|
1552
|
-
}
|
|
1553
|
-
this.scheduleRestoreExpandedRows();
|
|
1554
|
-
}
|
|
1555
|
-
onColumnsOrderChanged(e) {
|
|
1556
|
-
if (e.isUserInteraction) {
|
|
1557
|
-
this.vm.onColumnsOrderChanged(e.data.event);
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
async dropdownRowItems(rowData) {
|
|
1561
|
-
return (await this.vm.secondaryRowActions(rowData)).map((c) => ({
|
|
1562
|
-
icon: c.icon,
|
|
1563
|
-
name: c.name,
|
|
1564
|
-
text: c.title,
|
|
1565
|
-
color: c.color,
|
|
1566
|
-
disabled: c.disabled,
|
|
1567
|
-
default: c.default,
|
|
1568
|
-
divided: c.separated,
|
|
1569
|
-
}));
|
|
1570
|
-
}
|
|
1571
|
-
async handleRowDbClick(e) {
|
|
1572
|
-
if (this.grid()?.dataSource.isLoading) {
|
|
1573
|
-
return;
|
|
1574
|
-
}
|
|
1575
|
-
const allItems = [...this.commandRowItems(), ...(await this.dropdownRowItems(e.data))];
|
|
1576
|
-
// const defaultAction = allItems.find((c) => (c as any).default) || allItems[0];
|
|
1577
|
-
const defaultAction = allItems.find((c) => {
|
|
1578
|
-
const commandName = c.name.split('&')[0];
|
|
1579
|
-
return (c.default || commandName === 'open-entity') && !c.disabled;
|
|
1580
|
-
});
|
|
1581
|
-
if (!defaultAction) {
|
|
1582
|
-
return;
|
|
1583
|
-
}
|
|
1584
|
-
const d = {
|
|
1585
|
-
component: e.component,
|
|
1586
|
-
name: defaultAction.name,
|
|
1587
|
-
data: e.data,
|
|
1588
|
-
};
|
|
1589
|
-
this.handleRowCommandClick(d);
|
|
1590
|
-
}
|
|
1591
|
-
async handleRowCommandClick(e) {
|
|
1592
|
-
if (this.grid()?.dataSource.isLoading) {
|
|
1593
|
-
return;
|
|
1594
|
-
}
|
|
1595
|
-
if (e.setLoading) {
|
|
1596
|
-
e.setLoading(true);
|
|
1597
|
-
}
|
|
1598
|
-
await this.vm.executeCommand(e.name, e.data);
|
|
1599
|
-
if (e.setLoading) {
|
|
1600
|
-
e.setLoading(false);
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
async handleSelectedRowsChange(rows) {
|
|
1604
|
-
this.vm.selectedItems.set(rows);
|
|
1605
|
-
}
|
|
1606
|
-
/**
|
|
1607
|
-
* After refreshing a row's children (e.g. when a new child was created), update the parent row's
|
|
1608
|
-
* hasChild so the expand icon is shown. The list query sets hasChild from childrenCount only on
|
|
1609
|
-
* initial load; refreshItemChildren does not re-fetch the parent, so we patch it here.
|
|
1610
|
-
*/
|
|
1611
|
-
updateParentHasChildAfterRefresh(parentId) {
|
|
1612
|
-
const gridRef = this.grid();
|
|
1613
|
-
const ds = gridRef?.dataSource;
|
|
1614
|
-
if (!ds?.cachedItems?.length) {
|
|
1615
|
-
return;
|
|
1616
|
-
}
|
|
1617
|
-
const key = ds.config?.key ?? 'id';
|
|
1618
|
-
const parent = this.findItemById(ds.cachedItems, String(parentId), key);
|
|
1619
|
-
if (parent && typeof parent === 'object') {
|
|
1620
|
-
parent['hasChild'] = true;
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
findItemById(items, id, key) {
|
|
1624
|
-
for (const item of items) {
|
|
1625
|
-
if (item && typeof item === 'object' && String(item[key]) === id) {
|
|
1626
|
-
return item;
|
|
1627
|
-
}
|
|
1628
|
-
const rec = item;
|
|
1629
|
-
const metaChildren = rec?.['__meta__']?.['children'];
|
|
1630
|
-
const directChildren = rec?.['children'];
|
|
1631
|
-
const childArr = Array.isArray(metaChildren)
|
|
1632
|
-
? metaChildren
|
|
1633
|
-
: Array.isArray(directChildren)
|
|
1634
|
-
? directChildren
|
|
1635
|
-
: null;
|
|
1636
|
-
if (childArr?.length) {
|
|
1637
|
-
const found = this.findItemById(childArr, id, key);
|
|
1638
|
-
if (found)
|
|
1639
|
-
return found;
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
return null;
|
|
1643
|
-
}
|
|
1644
|
-
makeResponsive(value) {
|
|
1645
|
-
if (this.platform.is('Mobile') || this.platform.is('SM')) {
|
|
1646
|
-
return '';
|
|
1647
|
-
}
|
|
1648
|
-
else {
|
|
1649
|
-
return value;
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
toggleSideBar(sideBar) {
|
|
1653
|
-
this.toggleEndSide();
|
|
1654
|
-
if (sideBar) {
|
|
1655
|
-
this.activeEndSideView.set(sideBar);
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
toggleSearchBar() {
|
|
1659
|
-
this.searchBarShown.update((v) => !v);
|
|
1660
|
-
}
|
|
1661
|
-
handleResetClick(sideBar) {
|
|
1662
|
-
switch (sideBar) {
|
|
1663
|
-
case 'filter': {
|
|
1664
|
-
this.vm.resetFilters();
|
|
1665
|
-
break;
|
|
1666
|
-
}
|
|
1667
|
-
case 'sort': {
|
|
1668
|
-
this.vm.resetSorts();
|
|
1669
|
-
break;
|
|
1670
|
-
}
|
|
1671
|
-
case 'column': {
|
|
1672
|
-
this.vm.resetColumns();
|
|
1673
|
-
break;
|
|
1674
|
-
}
|
|
1675
|
-
}
|
|
1676
|
-
}
|
|
1677
|
-
// protected handleDiscardClick(sideBar: 'filter' | 'sort' | 'column') {
|
|
1678
|
-
// switch (sideBar) {
|
|
1679
|
-
// case 'filter': {
|
|
1680
|
-
// this.vm.discardFilters();
|
|
1681
|
-
// break;
|
|
1682
|
-
// }
|
|
1683
|
-
// case 'sort': {
|
|
1684
|
-
// this.vm.resetSorts();
|
|
1685
|
-
// break;
|
|
1686
|
-
// }
|
|
1687
|
-
// case 'column': {
|
|
1688
|
-
// this.vm.resetColumns();
|
|
1689
|
-
// break;
|
|
1690
|
-
// }
|
|
1691
|
-
// }
|
|
1692
|
-
// }
|
|
1693
|
-
handleApplyClick(sideBar) {
|
|
1694
|
-
this.vm.applyFilterAndSort();
|
|
1695
|
-
this.toggleEndSide();
|
|
1696
|
-
}
|
|
1697
|
-
ngOnDestroy() {
|
|
1698
|
-
this.componentDestroyed.next();
|
|
1699
|
-
this.componentDestroyed.complete();
|
|
1700
|
-
this.queryParamSub?.unsubscribe();
|
|
1701
|
-
this.vm.destroy();
|
|
1702
|
-
}
|
|
1703
|
-
bindExpandedRowPersistence() {
|
|
1704
|
-
if (!this.vm.parentKey()) {
|
|
1705
|
-
return;
|
|
1706
|
-
}
|
|
1707
|
-
this.vm.dataSource.onItemExpanded.pipe(takeUntil(this.componentDestroyed)).subscribe((event) => {
|
|
1708
|
-
const expandedItem = event?.expandedItem;
|
|
1709
|
-
if (expandedItem && typeof expandedItem === 'object') {
|
|
1710
|
-
this.vm.handleRowExpandChange(expandedItem);
|
|
1711
|
-
}
|
|
1712
|
-
});
|
|
1713
|
-
}
|
|
1714
|
-
scheduleSyncGridPagerUi() {
|
|
1715
|
-
queueMicrotask(() => {
|
|
1716
|
-
this.syncGridPagerUi();
|
|
1717
|
-
});
|
|
1718
|
-
}
|
|
1719
|
-
syncGridPagerUi() {
|
|
1720
|
-
const gridRef = this.grid();
|
|
1721
|
-
if (!gridRef) {
|
|
1722
|
-
return;
|
|
1723
|
-
}
|
|
1724
|
-
const pageIndex = getDataSourcePageIndex(this.vm.dataSource);
|
|
1725
|
-
const take = this.vm.dataSource.config.pageSize;
|
|
1726
|
-
const pagerPage = pageIndex + 1;
|
|
1727
|
-
const grid = gridRef;
|
|
1728
|
-
this.vm.skipListPagingPersistence = true;
|
|
1729
|
-
try {
|
|
1730
|
-
if (grid.page() !== pageIndex) {
|
|
1731
|
-
grid.page.set(pageIndex);
|
|
1732
|
-
}
|
|
1733
|
-
grid.pageSize.set(take);
|
|
1734
|
-
const pager = grid.dataPager;
|
|
1735
|
-
if (pager && pager.value !== pagerPage) {
|
|
1736
|
-
pager.goToPage(pagerPage);
|
|
1737
|
-
}
|
|
1738
|
-
}
|
|
1739
|
-
finally {
|
|
1740
|
-
this.vm.skipListPagingPersistence = false;
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
scheduleRestoreExpandedRows() {
|
|
1744
|
-
if (!this.vm.parentKey() || this.restoreExpandedRowsScheduled) {
|
|
1745
|
-
return;
|
|
1746
|
-
}
|
|
1747
|
-
this.restoreExpandedRowsScheduled = true;
|
|
1748
|
-
queueMicrotask(() => {
|
|
1749
|
-
this.restoreExpandedRowsScheduled = false;
|
|
1750
|
-
void this.restoreExpandedRows();
|
|
1751
|
-
});
|
|
1752
|
-
}
|
|
1753
|
-
async restoreExpandedRows() {
|
|
1754
|
-
if (!this.vm.parentKey() || this.isRestoringExpandedRows) {
|
|
1755
|
-
return;
|
|
1756
|
-
}
|
|
1757
|
-
const expandedRowIds = this.vm.getExpandedRowIds();
|
|
1758
|
-
if (!expandedRowIds.length) {
|
|
1759
|
-
return;
|
|
1760
|
-
}
|
|
1761
|
-
const gridRef = this.grid();
|
|
1762
|
-
if (!gridRef || gridRef.dataSource.isLoading) {
|
|
1763
|
-
return;
|
|
1764
|
-
}
|
|
1765
|
-
const gridWithDisplayedRows = gridRef;
|
|
1766
|
-
const displayedRows = gridWithDisplayedRows.displayedRows?.() ?? [];
|
|
1767
|
-
if (!displayedRows.length) {
|
|
1768
|
-
return;
|
|
1769
|
-
}
|
|
1770
|
-
this.isRestoringExpandedRows = true;
|
|
1771
|
-
this.vm.skipExpandedRowPersistence = true;
|
|
1772
|
-
try {
|
|
1773
|
-
const rowKey = this.vm.dataSource.config?.key ?? 'id';
|
|
1774
|
-
await restoreEntityListExpandedRows({
|
|
1775
|
-
expandedRowIds,
|
|
1776
|
-
rowKey,
|
|
1777
|
-
getDisplayedRows: () => gridWithDisplayedRows.displayedRows?.() ?? [],
|
|
1778
|
-
expandRow: (row) => gridRef.expandRow(row),
|
|
1779
|
-
});
|
|
1780
|
-
}
|
|
1781
|
-
finally {
|
|
1782
|
-
this.vm.skipExpandedRowPersistence = false;
|
|
1783
|
-
this.isRestoringExpandedRows = false;
|
|
1784
|
-
}
|
|
1785
|
-
}
|
|
1786
|
-
toggleCategoryDrawer() {
|
|
1787
|
-
this.toggleStartSide();
|
|
1788
|
-
}
|
|
1789
|
-
getPageTitle() {
|
|
1790
|
-
return this.vm.title();
|
|
1791
|
-
}
|
|
1792
|
-
async getPageDescription() {
|
|
1793
|
-
const description = this.vm.description();
|
|
1794
|
-
if (description) {
|
|
1795
|
-
return this.translateService.translateAsync(description);
|
|
1796
|
-
}
|
|
1797
|
-
return '';
|
|
1798
|
-
}
|
|
1799
|
-
getPageBreadcrumbs() {
|
|
1800
|
-
return this.vm.beardcrumbs();
|
|
1801
|
-
}
|
|
1802
|
-
async getPrimaryMenuItems() {
|
|
1803
|
-
return (await this.vm.getPrimaryActions())
|
|
1804
|
-
.filter((tr) => !tr.isChild)
|
|
1805
|
-
.map((tr) => ({
|
|
1806
|
-
name: tr.name,
|
|
1807
|
-
title: tr.title,
|
|
1808
|
-
icon: tr.icon,
|
|
1809
|
-
color: tr.color,
|
|
1810
|
-
disabled: tr.disabled,
|
|
1811
|
-
items: tr.items?.map((sub) => ({
|
|
1812
|
-
name: sub.name,
|
|
1813
|
-
title: sub.title,
|
|
1814
|
-
icon: sub.icon,
|
|
1815
|
-
color: sub.color,
|
|
1816
|
-
disabled: sub.disabled,
|
|
1817
|
-
command: {
|
|
1818
|
-
name: sub.name,
|
|
1819
|
-
options: sub.options,
|
|
1820
|
-
metadata: sub.metadata,
|
|
1821
|
-
},
|
|
1822
|
-
})),
|
|
1823
|
-
command: {
|
|
1824
|
-
name: tr.name,
|
|
1825
|
-
options: tr.options,
|
|
1826
|
-
metadata: tr.metadata,
|
|
1827
|
-
},
|
|
1828
|
-
}));
|
|
1829
|
-
}
|
|
1830
|
-
async getSecondaryMenuItems() {
|
|
1831
|
-
return (await this.vm.getSecondaryActions()).map((tr) => ({
|
|
1832
|
-
name: tr.name,
|
|
1833
|
-
title: tr.title,
|
|
1834
|
-
icon: tr.icon,
|
|
1835
|
-
color: tr.color,
|
|
1836
|
-
disabled: tr.disabled,
|
|
1837
|
-
separated: tr.separated,
|
|
1838
|
-
command: {
|
|
1839
|
-
name: tr.name,
|
|
1840
|
-
options: tr.options,
|
|
1841
|
-
metadata: tr.metadata,
|
|
1842
|
-
},
|
|
1843
|
-
}));
|
|
1844
|
-
}
|
|
1845
|
-
async execute(command) {
|
|
1846
|
-
if (command) {
|
|
1847
|
-
this.vm.execute(command);
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
|
-
handleUnselectAll() {
|
|
1851
|
-
this.vm.selectedItems.set([]);
|
|
1852
|
-
}
|
|
1853
|
-
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 }); }
|
|
1854
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityMasterListViewComponent, isStandalone: true, selector: "axp-entity-master-list", providers: [
|
|
1855
|
-
{
|
|
1856
|
-
provide: AXPPageLayoutBase,
|
|
1857
|
-
useExisting: AXPEntityMasterListViewComponent,
|
|
1858
|
-
},
|
|
1859
|
-
], 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\n id=\"axp-entity-category\"\n class=\"ax-w-80\"\n [vm]=\"vm\"\n [searchValue]=\"categorySearchValue()\"\n ></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\n 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 >\n <span\n >{{ 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\n id=\"axp-entity-table\"\n [allowReordering]=\"true\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\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 (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n >\n @if (vm.showIndexColumn()) {\n <ax-index-column\n id=\"axp-table-col-index\"\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></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\n [attr.id]=\"'axp-table-col-' + col.name\"\n [expandHandler]=\"$index === 0 && vm.parentKey() ? true : false\"\n [caption]=\"(col.title | translate | async)!\"\n [node]=\"col.node()\"\n [customWidth]=\"col.width\"\n ></axp-widget-column-renderer>\n }\n }\n @if (getCommandRowItems().length) {\n <ax-command-column\n id=\"axp-table-col-commands\"\n fixed=\"end\"\n [width]=\"getCommandRowItems().length * 70 + 'px'\"\n [items]=\"getCommandRowItems()\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-command-column>\n }\n <ax-dropdown-command-column\n id=\"axp-table-col-dropdown-commands\"\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-dropdown-command-column>\n </ax-data-table>\n </axp-page-content>\n</axp-page-layout>\n", 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:
|
|
1860
|
-
//
|
|
1861
|
-
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:
|
|
1862
|
-
//
|
|
1863
|
-
AXPEntityMasterToolbarViewComponent, selector: "axp-entity-master-toolbar-view", inputs: ["viewModel"] }, { kind: "component", type:
|
|
1864
|
-
//
|
|
1865
|
-
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 }); }
|
|
1866
|
-
}
|
|
1867
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityMasterListViewComponent, decorators: [{
|
|
1868
|
-
type: Component,
|
|
1869
|
-
args: [{ selector: 'axp-entity-master-list', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
1870
|
-
CommonModule,
|
|
1871
|
-
FormsModule,
|
|
1872
|
-
RouterModule,
|
|
1873
|
-
AXButtonModule,
|
|
1874
|
-
AXDecoratorModule,
|
|
1875
|
-
AXBadgeModule,
|
|
1876
|
-
AXDropdownModule,
|
|
1877
|
-
AXPopoverModule,
|
|
1878
|
-
AXFormModule,
|
|
1879
|
-
AXActionSheetModule,
|
|
1880
|
-
AXDrawerModule,
|
|
1881
|
-
AXDialogModule,
|
|
1882
|
-
AXLoadingModule,
|
|
1883
|
-
AXTabsModule,
|
|
1884
|
-
AXTooltipModule,
|
|
1885
|
-
AXBreadcrumbsModule,
|
|
1886
|
-
AXDropdownButtonModule,
|
|
1887
|
-
AXSearchBoxModule,
|
|
1888
|
-
AXDataTableModule,
|
|
1889
|
-
AXTranslationModule,
|
|
1890
|
-
DragDropModule,
|
|
1891
|
-
//
|
|
1892
|
-
AXPWidgetCoreModule,
|
|
1893
|
-
AXPWidgetsModule,
|
|
1894
|
-
AXPAuthModule,
|
|
1895
|
-
//
|
|
1896
|
-
AXPEntityMasterToolbarViewComponent,
|
|
1897
|
-
//
|
|
1898
|
-
AXPPageLayoutComponent,
|
|
1899
|
-
AXPThemeLayoutBlockComponent,
|
|
1900
|
-
AXDropdownButtonModule,
|
|
1901
|
-
AXPThemeLayoutStartSideComponent,
|
|
1902
|
-
AXPEntityCategoryComponent,
|
|
1903
|
-
], providers: [
|
|
1904
|
-
{
|
|
1905
|
-
provide: AXPPageLayoutBase,
|
|
1906
|
-
useExisting: AXPEntityMasterListViewComponent,
|
|
1907
|
-
},
|
|
1908
|
-
], 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\n id=\"axp-entity-category\"\n class=\"ax-w-80\"\n [vm]=\"vm\"\n [searchValue]=\"categorySearchValue()\"\n ></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\n 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 >\n <span\n >{{ 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\n id=\"axp-entity-table\"\n [allowReordering]=\"true\"\n (onColumnsOrderChanged)=\"onColumnsOrderChanged($event)\"\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 (onColumnSizeChanged)=\"onColumnSizeChanged($event)\"\n (onPageChanged)=\"onPageChanged($event)\"\n >\n @if (vm.showIndexColumn()) {\n <ax-index-column\n id=\"axp-table-col-index\"\n [caption]=\"('@general:terms.common.row-number' | translate | async)!\"\n fixed=\"start\"\n [width]=\"'80px'\"\n [padZero]=\"false\"\n ></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\n [attr.id]=\"'axp-table-col-' + col.name\"\n [expandHandler]=\"$index === 0 && vm.parentKey() ? true : false\"\n [caption]=\"(col.title | translate | async)!\"\n [node]=\"col.node()\"\n [customWidth]=\"col.width\"\n ></axp-widget-column-renderer>\n }\n }\n @if (getCommandRowItems().length) {\n <ax-command-column\n id=\"axp-table-col-commands\"\n fixed=\"end\"\n [width]=\"getCommandRowItems().length * 70 + 'px'\"\n [items]=\"getCommandRowItems()\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-command-column>\n }\n <ax-dropdown-command-column\n id=\"axp-table-col-dropdown-commands\"\n fixed=\"end\"\n [width]=\"'60px'\"\n [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-dropdown-command-column>\n </ax-data-table>\n </axp-page-content>\n</axp-page-layout>\n", 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"] }]
|
|
1909
|
-
}], ctorParameters: () => [{ type: i1$2.AXPlatform }], propDecorators: { grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
|
|
1910
|
-
|
|
1911
|
-
var entityMasterListView_component = /*#__PURE__*/Object.freeze({
|
|
1912
|
-
__proto__: null,
|
|
1913
|
-
AXPEntityMasterListViewComponent: AXPEntityMasterListViewComponent
|
|
1914
|
-
});
|
|
1915
|
-
|
|
1916
193
|
class AXPRootLayoutFooterComponent {
|
|
1917
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1918
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootLayoutFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
195
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", 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$2.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1919
196
|
}
|
|
1920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootLayoutFooterComponent, decorators: [{
|
|
1921
198
|
type: Component,
|
|
1922
|
-
args: [{ selector: 'axp-dashboard-admin-footer', encapsulation: ViewEncapsulation.None,
|
|
199
|
+
args: [{ selector: 'axp-dashboard-admin-footer', encapsulation: ViewEncapsulation.None, providers: [], host: {
|
|
1923
200
|
class: 'ax-h-10 ax-flex ax-item-center ax-justify-between ax-bg-lighter ax-border-lighter ax-px-6 ax-border-t',
|
|
1924
201
|
}, standalone: true, imports: [
|
|
1925
202
|
AXPComponentSlotModule
|
|
@@ -1939,12 +216,12 @@ class AXPRootLayoutHeaderComponent {
|
|
|
1939
216
|
handleLogoClick() {
|
|
1940
217
|
this.router.navigate(['/']);
|
|
1941
218
|
}
|
|
1942
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1943
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
219
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootLayoutHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
220
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", 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$2.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"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1944
221
|
}
|
|
1945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootLayoutHeaderComponent, decorators: [{
|
|
1946
223
|
type: Component,
|
|
1947
|
-
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,
|
|
224
|
+
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: [
|
|
1948
225
|
AXPComponentSlotModule,
|
|
1949
226
|
AXButtonModule,
|
|
1950
227
|
AXDecoratorModule
|
|
@@ -1958,7 +235,7 @@ class AXPRootLayoutMenuComponent {
|
|
|
1958
235
|
this.badgeService = inject(AXPTaskBadgeService);
|
|
1959
236
|
this.settingsService = inject(AXPSettingsService);
|
|
1960
237
|
this.visibilityService = inject(AXPMenuVisibilityService);
|
|
1961
|
-
this.badgeVisible = signal(true, ...(ngDevMode ? [{ debugName: "badgeVisible" }] :
|
|
238
|
+
this.badgeVisible = signal(true, ...(ngDevMode ? [{ debugName: "badgeVisible" }] : []));
|
|
1962
239
|
// Debug: Track menu items changes
|
|
1963
240
|
// effect(() => {
|
|
1964
241
|
// const items = this.menuStore.items();
|
|
@@ -2128,10 +405,10 @@ class AXPRootLayoutMenuComponent {
|
|
|
2128
405
|
const lowerPath = path.trim().toLowerCase();
|
|
2129
406
|
return lowerPath.startsWith('http://') || lowerPath.startsWith('https://');
|
|
2130
407
|
}
|
|
2131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2132
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootLayoutMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
409
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", 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$2.AXSideMenuComponent, selector: "ax-side-menu", inputs: ["items", "look", "location"], outputs: ["itemsChange"] }, { kind: "component", type: i2$2.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 }); }
|
|
2133
410
|
}
|
|
2134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootLayoutMenuComponent, decorators: [{
|
|
2135
412
|
type: Component,
|
|
2136
413
|
args: [{ selector: 'axp-side-menu', encapsulation: ViewEncapsulation.None, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2137
414
|
CommonModule,
|
|
@@ -2152,7 +429,7 @@ class AXPHorizontalMenuComponent {
|
|
|
2152
429
|
this.badgeService = inject(AXPTaskBadgeService);
|
|
2153
430
|
this.settingsService = inject(AXPSettingsService);
|
|
2154
431
|
this.visibilityService = inject(AXPMenuVisibilityService);
|
|
2155
|
-
this.badgeVisible = signal(true, ...(ngDevMode ? [{ debugName: "badgeVisible" }] :
|
|
432
|
+
this.badgeVisible = signal(true, ...(ngDevMode ? [{ debugName: "badgeVisible" }] : []));
|
|
2156
433
|
}
|
|
2157
434
|
async ngOnInit() {
|
|
2158
435
|
this.badgeVisible.set(await this.settingsService.scope(AXPPlatformScope.User).get(AXPThemeLayoutSetting.MenuBadgeVisible));
|
|
@@ -2316,10 +593,10 @@ class AXPHorizontalMenuComponent {
|
|
|
2316
593
|
const lowerPath = path.trim().toLowerCase();
|
|
2317
594
|
return lowerPath.startsWith('http://') || lowerPath.startsWith('https://');
|
|
2318
595
|
}
|
|
2319
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2320
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
596
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPHorizontalMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
597
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", 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$2.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 }); }
|
|
2321
598
|
}
|
|
2322
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPHorizontalMenuComponent, decorators: [{
|
|
2323
600
|
type: Component,
|
|
2324
601
|
args: [{ selector: 'axp-horizontal-menu', host: { class: 'ax-light' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2325
602
|
CommonModule,
|
|
@@ -2349,10 +626,10 @@ class AXPRootHorizontalLayoutComponent {
|
|
|
2349
626
|
this.store.setSideMenuWidth(e.value);
|
|
2350
627
|
}
|
|
2351
628
|
}
|
|
2352
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2353
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
629
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootHorizontalLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
630
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", 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$3.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$1.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 }); }
|
|
2354
631
|
}
|
|
2355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootHorizontalLayoutComponent, decorators: [{
|
|
2356
633
|
type: Component,
|
|
2357
634
|
args: [{ selector: 'axp-root-horizontal-layout', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
2358
635
|
RouterModule,
|
|
@@ -2398,10 +675,10 @@ class AXPRootVerticalLayoutComponent {
|
|
|
2398
675
|
this.store.setSideMenuWidth(e.value);
|
|
2399
676
|
}
|
|
2400
677
|
}
|
|
2401
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2402
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
678
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootVerticalLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
679
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", 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$3.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$1.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "transition", "closeOnBackdropClick", "backdropClass", "collapsed", "singleOpenMode"], outputs: ["onBackdropClick", "collapsedStateChanged"] }, { kind: "component", type: i3$1.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$2.AXPComponentSlotDirective, selector: "axp-component-slot", inputs: ["name", "host", "context"], exportAs: ["slot"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2403
680
|
}
|
|
2404
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
681
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootVerticalLayoutComponent, decorators: [{
|
|
2405
682
|
type: Component,
|
|
2406
683
|
args: [{ selector: 'axp-root-vertical-layout', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
2407
684
|
RouterModule,
|
|
@@ -2470,8 +747,8 @@ class AXPRootLayoutComponent {
|
|
|
2470
747
|
}
|
|
2471
748
|
});
|
|
2472
749
|
}
|
|
2473
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2474
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
750
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
751
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: AXPRootLayoutComponent, isStandalone: true, selector: "ng-component", providers: [AXUnsubscriber], ngImport: i0, template: `
|
|
2475
752
|
@if(layout.isMenuHorizontal()){
|
|
2476
753
|
<axp-root-horizontal-layout></axp-root-horizontal-layout>
|
|
2477
754
|
}@else{
|
|
@@ -2479,7 +756,7 @@ class AXPRootLayoutComponent {
|
|
|
2479
756
|
}
|
|
2480
757
|
`, 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 }); }
|
|
2481
758
|
}
|
|
2482
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRootLayoutComponent, decorators: [{
|
|
2483
760
|
type: Component,
|
|
2484
761
|
args: [{
|
|
2485
762
|
template: `
|
|
@@ -2493,7 +770,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2493
770
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2494
771
|
standalone: true,
|
|
2495
772
|
imports: [AXPRootHorizontalLayoutComponent, AXPRootVerticalLayoutComponent],
|
|
2496
|
-
providers: [AXUnsubscriber
|
|
773
|
+
providers: [AXUnsubscriber],
|
|
2497
774
|
}]
|
|
2498
775
|
}] });
|
|
2499
776
|
|
|
@@ -2613,15 +890,15 @@ function routesFacory() {
|
|
|
2613
890
|
children: [
|
|
2614
891
|
{
|
|
2615
892
|
path: 'offline',
|
|
2616
|
-
loadComponent: () => import('./acorex-platform-themes-default-error-offline.component-
|
|
893
|
+
loadComponent: () => import('./acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs').then((c) => c.AXPErrorOfflineComponent),
|
|
2617
894
|
},
|
|
2618
895
|
{
|
|
2619
896
|
path: '404',
|
|
2620
|
-
loadComponent: () => import('./acorex-platform-themes-default-error-404.component-
|
|
897
|
+
loadComponent: () => import('./acorex-platform-themes-default-error-404.component-DVF9soT5.mjs').then((c) => c.AXPError404Component),
|
|
2621
898
|
},
|
|
2622
899
|
{
|
|
2623
900
|
path: '401',
|
|
2624
|
-
loadComponent: () => import('./acorex-platform-themes-default-error-401.component-
|
|
901
|
+
loadComponent: () => import('./acorex-platform-themes-default-error-401.component-53VB-PS_.mjs').then((c) => c.AXPError401Component),
|
|
2625
902
|
},
|
|
2626
903
|
],
|
|
2627
904
|
},
|
|
@@ -2629,9 +906,9 @@ function routesFacory() {
|
|
|
2629
906
|
return routes;
|
|
2630
907
|
}
|
|
2631
908
|
class AXPDefaultThemeModule {
|
|
2632
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2633
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2634
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
909
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPDefaultThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
910
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: AXPDefaultThemeModule, imports: [AXPCommonModule, AXPThemesSharedModule] }); }
|
|
911
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPDefaultThemeModule, providers: [
|
|
2635
912
|
{
|
|
2636
913
|
provide: AXP_ENTITY_CONFIG_TOKEN,
|
|
2637
914
|
useFactory: () => {
|
|
@@ -2639,14 +916,14 @@ class AXPDefaultThemeModule {
|
|
|
2639
916
|
viewers: {
|
|
2640
917
|
root: () => Promise.resolve().then(function () { return rootLayout_component; }).then((c) => c.AXPRootLayoutComponent),
|
|
2641
918
|
master: {
|
|
2642
|
-
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-
|
|
919
|
+
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs').then((c) => c.AXPEntityMasterSingleViewComponent),
|
|
2643
920
|
details: () => import('@acorex/platform/layout/views').then((c) => c.AXPLayoutDetailsViewComponent),
|
|
2644
921
|
///
|
|
2645
|
-
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-
|
|
922
|
+
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs').then((c) => c.AXPEntityMasterCreateViewComponent),
|
|
2646
923
|
///
|
|
2647
|
-
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-
|
|
924
|
+
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs').then((c) => c.AXPEntityMasterModifyViewComponent),
|
|
2648
925
|
//
|
|
2649
|
-
list: () =>
|
|
926
|
+
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs').then((c) => c.AXPEntityMasterListViewComponent),
|
|
2650
927
|
},
|
|
2651
928
|
},
|
|
2652
929
|
};
|
|
@@ -2661,7 +938,7 @@ class AXPDefaultThemeModule {
|
|
|
2661
938
|
},
|
|
2662
939
|
], imports: [AXPCommonModule, AXPThemesSharedModule] }); }
|
|
2663
940
|
}
|
|
2664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPDefaultThemeModule, decorators: [{
|
|
2665
942
|
type: NgModule,
|
|
2666
943
|
args: [{
|
|
2667
944
|
imports: [AXPCommonModule, AXPThemesSharedModule],
|
|
@@ -2675,14 +952,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2675
952
|
viewers: {
|
|
2676
953
|
root: () => Promise.resolve().then(function () { return rootLayout_component; }).then((c) => c.AXPRootLayoutComponent),
|
|
2677
954
|
master: {
|
|
2678
|
-
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-
|
|
955
|
+
single: () => import('./acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs').then((c) => c.AXPEntityMasterSingleViewComponent),
|
|
2679
956
|
details: () => import('@acorex/platform/layout/views').then((c) => c.AXPLayoutDetailsViewComponent),
|
|
2680
957
|
///
|
|
2681
|
-
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-
|
|
958
|
+
create: () => import('./acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs').then((c) => c.AXPEntityMasterCreateViewComponent),
|
|
2682
959
|
///
|
|
2683
|
-
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-
|
|
960
|
+
modify: () => import('./acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs').then((c) => c.AXPEntityMasterModifyViewComponent),
|
|
2684
961
|
//
|
|
2685
|
-
list: () =>
|
|
962
|
+
list: () => import('./acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs').then((c) => c.AXPEntityMasterListViewComponent),
|
|
2686
963
|
},
|
|
2687
964
|
},
|
|
2688
965
|
};
|
|
@@ -2703,5 +980,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2703
980
|
* Generated bundle index. Do not edit.
|
|
2704
981
|
*/
|
|
2705
982
|
|
|
2706
|
-
export { AXPDefaultThemeModule, AXPEntityDetailListViewComponent,
|
|
983
|
+
export { AXPDefaultThemeModule, AXPEntityDetailListViewComponent, AXPRootHorizontalLayoutComponent, AXPRootLayoutComponent, AXPRootLayoutFooterComponent, AXPRootLayoutHeaderComponent, AXPRootLayoutMenuComponent, AXPRootVerticalLayoutComponent };
|
|
2707
984
|
//# sourceMappingURL=acorex-platform-themes-default.mjs.map
|