@acorex/modules 20.4.2 → 20.5.0-next.1

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.
Files changed (106) hide show
  1. package/common/index.d.ts +16 -18
  2. package/data-management/index.d.ts +69 -5
  3. package/fesm2022/{acorex-modules-application-management-acorex-modules-application-management-3Z51H2O-.mjs → acorex-modules-application-management-acorex-modules-application-management-BqYLpEvY.mjs} +18 -15
  4. package/fesm2022/acorex-modules-application-management-acorex-modules-application-management-BqYLpEvY.mjs.map +1 -0
  5. package/fesm2022/acorex-modules-application-management-menu-list.component-D4uW0aXY.mjs +830 -0
  6. package/fesm2022/acorex-modules-application-management-menu-list.component-D4uW0aXY.mjs.map +1 -0
  7. package/fesm2022/acorex-modules-application-management.mjs +1 -1
  8. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-BwMF7mXK.mjs → acorex-modules-auth-acorex-modules-auth-D1GLmcE-.mjs} +10 -10
  9. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-BwMF7mXK.mjs.map → acorex-modules-auth-acorex-modules-auth-D1GLmcE-.mjs.map} +1 -1
  10. package/fesm2022/{acorex-modules-auth-app-chooser.component-Y8ccBUCa.mjs → acorex-modules-auth-app-chooser.component-BwuQ1IDp.mjs} +2 -2
  11. package/fesm2022/{acorex-modules-auth-app-chooser.component-Y8ccBUCa.mjs.map → acorex-modules-auth-app-chooser.component-BwuQ1IDp.mjs.map} +1 -1
  12. package/fesm2022/{acorex-modules-auth-login.module-B-nJmy3_.mjs → acorex-modules-auth-login.module-C3YVgPHp.mjs} +4 -4
  13. package/fesm2022/{acorex-modules-auth-login.module-B-nJmy3_.mjs.map → acorex-modules-auth-login.module-C3YVgPHp.mjs.map} +1 -1
  14. package/fesm2022/{acorex-modules-auth-master.layout-BhsnK28w.mjs → acorex-modules-auth-master.layout-D0iHJc_T.mjs} +2 -2
  15. package/fesm2022/{acorex-modules-auth-master.layout-BhsnK28w.mjs.map → acorex-modules-auth-master.layout-D0iHJc_T.mjs.map} +1 -1
  16. package/fesm2022/{acorex-modules-auth-oauth-callback.component-DojO-qYk.mjs → acorex-modules-auth-oauth-callback.component-CfTRvv9t.mjs} +2 -2
  17. package/fesm2022/{acorex-modules-auth-oauth-callback.component-DojO-qYk.mjs.map → acorex-modules-auth-oauth-callback.component-CfTRvv9t.mjs.map} +1 -1
  18. package/fesm2022/{acorex-modules-auth-password.component-DauiGRQb.mjs → acorex-modules-auth-password.component-C-aos_5o.mjs} +2 -2
  19. package/fesm2022/{acorex-modules-auth-password.component-DauiGRQb.mjs.map → acorex-modules-auth-password.component-C-aos_5o.mjs.map} +1 -1
  20. package/fesm2022/{acorex-modules-auth-password.component-DxzlLZWK.mjs → acorex-modules-auth-password.component-DzWcZlfs.mjs} +2 -2
  21. package/fesm2022/{acorex-modules-auth-password.component-DxzlLZWK.mjs.map → acorex-modules-auth-password.component-DzWcZlfs.mjs.map} +1 -1
  22. package/fesm2022/{acorex-modules-auth-routes-BwJilKAK.mjs → acorex-modules-auth-routes-CR8yYe3M.mjs} +2 -2
  23. package/fesm2022/{acorex-modules-auth-routes-BwJilKAK.mjs.map → acorex-modules-auth-routes-CR8yYe3M.mjs.map} +1 -1
  24. package/fesm2022/{acorex-modules-auth-two-factor.module-CV70xdxY.mjs → acorex-modules-auth-two-factor.module-BzFLnBad.mjs} +2 -2
  25. package/fesm2022/{acorex-modules-auth-two-factor.module-CV70xdxY.mjs.map → acorex-modules-auth-two-factor.module-BzFLnBad.mjs.map} +1 -1
  26. package/fesm2022/{acorex-modules-auth-user-sessions.component-CYtCo5d1.mjs → acorex-modules-auth-user-sessions.component-Bfb74eNc.mjs} +3 -3
  27. package/fesm2022/acorex-modules-auth-user-sessions.component-Bfb74eNc.mjs.map +1 -0
  28. package/fesm2022/acorex-modules-auth.mjs +1 -1
  29. package/fesm2022/acorex-modules-common.mjs +489 -545
  30. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  31. package/fesm2022/acorex-modules-dashboard-management.mjs +1 -1
  32. package/fesm2022/acorex-modules-dashboard-management.mjs.map +1 -1
  33. package/fesm2022/acorex-modules-data-management.mjs +447 -11
  34. package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
  35. package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-CwVDh52l.mjs → acorex-modules-document-management-acorex-modules-document-management-BsfSETMk.mjs} +18 -18
  36. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-BsfSETMk.mjs.map +1 -0
  37. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-KTVXeYE1.mjs → acorex-modules-document-management-attachment-widget.component-C4KhZ0gC.mjs} +2 -2
  38. package/fesm2022/{acorex-modules-document-management-attachment-widget.component-KTVXeYE1.mjs.map → acorex-modules-document-management-attachment-widget.component-C4KhZ0gC.mjs.map} +1 -1
  39. package/fesm2022/{acorex-modules-document-management-details-view.component-Blo7DEM9.mjs → acorex-modules-document-management-details-view.component-DeI-r7-g.mjs} +2 -2
  40. package/fesm2022/{acorex-modules-document-management-details-view.component-Blo7DEM9.mjs.map → acorex-modules-document-management-details-view.component-DeI-r7-g.mjs.map} +1 -1
  41. package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-wVF422mD.mjs → acorex-modules-document-management-document-signature-popup.component-DMFqz5jZ.mjs} +2 -2
  42. package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-wVF422mD.mjs.map → acorex-modules-document-management-document-signature-popup.component-DMFqz5jZ.mjs.map} +1 -1
  43. package/fesm2022/{acorex-modules-document-management-drive-choose.component-Bk62GMxv.mjs → acorex-modules-document-management-drive-choose.component-BcLME_up.mjs} +2 -2
  44. package/fesm2022/{acorex-modules-document-management-drive-choose.component-Bk62GMxv.mjs.map → acorex-modules-document-management-drive-choose.component-BcLME_up.mjs.map} +1 -1
  45. package/fesm2022/{acorex-modules-document-management-drive.component-CdauFuwi.mjs → acorex-modules-document-management-drive.component-BVgm40pD.mjs} +2 -2
  46. package/fesm2022/{acorex-modules-document-management-drive.component-CdauFuwi.mjs.map → acorex-modules-document-management-drive.component-BVgm40pD.mjs.map} +1 -1
  47. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-BkeEB1i8.mjs → acorex-modules-document-management-large-icons-view.component-D9NtNlWh.mjs} +2 -2
  48. package/fesm2022/{acorex-modules-document-management-large-icons-view.component-BkeEB1i8.mjs.map → acorex-modules-document-management-large-icons-view.component-D9NtNlWh.mjs.map} +1 -1
  49. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-CTp5hvCU.mjs → acorex-modules-document-management-large-tiles-view.component-DUvlPflF.mjs} +2 -2
  50. package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-CTp5hvCU.mjs.map → acorex-modules-document-management-large-tiles-view.component-DUvlPflF.mjs.map} +1 -1
  51. package/fesm2022/{acorex-modules-document-management-link-dialog.component-BXzePJlW.mjs → acorex-modules-document-management-link-dialog.component-Gc-Cwsq-.mjs} +2 -2
  52. package/fesm2022/acorex-modules-document-management-link-dialog.component-Gc-Cwsq-.mjs.map +1 -0
  53. package/fesm2022/{acorex-modules-document-management-list-view.component-Ctk28jwC.mjs → acorex-modules-document-management-list-view.component-CulR4iN1.mjs} +2 -2
  54. package/fesm2022/{acorex-modules-document-management-list-view.component-Ctk28jwC.mjs.map → acorex-modules-document-management-list-view.component-CulR4iN1.mjs.map} +1 -1
  55. package/fesm2022/{acorex-modules-document-management-share-dialog.component-PCK4_jcD.mjs → acorex-modules-document-management-share-dialog.component-Cie7I04V.mjs} +2 -2
  56. package/fesm2022/acorex-modules-document-management-share-dialog.component-Cie7I04V.mjs.map +1 -0
  57. package/fesm2022/{acorex-modules-document-management-share-email-dialog.component-DZEoX29V.mjs → acorex-modules-document-management-share-email-dialog.component-DbRYaPFI.mjs} +2 -2
  58. package/fesm2022/acorex-modules-document-management-share-email-dialog.component-DbRYaPFI.mjs.map +1 -0
  59. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-D81OAgYf.mjs → acorex-modules-document-management-small-icons-view.component-DJI_f_9F.mjs} +2 -2
  60. package/fesm2022/{acorex-modules-document-management-small-icons-view.component-D81OAgYf.mjs.map → acorex-modules-document-management-small-icons-view.component-DJI_f_9F.mjs.map} +1 -1
  61. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BNuswkkU.mjs → acorex-modules-document-management-small-tiles-view.component-kNOOhmcY.mjs} +2 -2
  62. package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-BNuswkkU.mjs.map → acorex-modules-document-management-small-tiles-view.component-kNOOhmcY.mjs.map} +1 -1
  63. package/fesm2022/acorex-modules-document-management.mjs +1 -1
  64. package/fesm2022/{acorex-modules-help-desk-acorex-modules-help-desk-CcVD1arq.mjs → acorex-modules-help-desk-acorex-modules-help-desk-BR0maKeU.mjs} +3 -3
  65. package/fesm2022/{acorex-modules-help-desk-acorex-modules-help-desk-CcVD1arq.mjs.map → acorex-modules-help-desk-acorex-modules-help-desk-BR0maKeU.mjs.map} +1 -1
  66. package/fesm2022/{acorex-modules-help-desk-capture-screen.component-BAD2K3Yk.mjs → acorex-modules-help-desk-capture-screen.component-DZFQUHUd.mjs} +2 -2
  67. package/fesm2022/{acorex-modules-help-desk-capture-screen.component-BAD2K3Yk.mjs.map → acorex-modules-help-desk-capture-screen.component-DZFQUHUd.mjs.map} +1 -1
  68. package/fesm2022/acorex-modules-help-desk.mjs +1 -1
  69. package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-OuRcuL44.mjs → acorex-modules-human-capital-management-acorex-modules-human-capital-management-cb1hY8I2.mjs} +9 -9
  70. package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-OuRcuL44.mjs.map → acorex-modules-human-capital-management-acorex-modules-human-capital-management-cb1hY8I2.mjs.map} +1 -1
  71. package/fesm2022/{acorex-modules-human-capital-management-employee-skill.entity-CcfQMQcK.mjs → acorex-modules-human-capital-management-employee-skill.entity-DfdiUEju.mjs} +2 -2
  72. package/fesm2022/{acorex-modules-human-capital-management-employee-skill.entity-CcfQMQcK.mjs.map → acorex-modules-human-capital-management-employee-skill.entity-DfdiUEju.mjs.map} +1 -1
  73. package/fesm2022/{acorex-modules-human-capital-management-employee.entity-DstZ_ed2.mjs → acorex-modules-human-capital-management-employee.entity-CP0J0udU.mjs} +2 -2
  74. package/fesm2022/{acorex-modules-human-capital-management-employee.entity-DstZ_ed2.mjs.map → acorex-modules-human-capital-management-employee.entity-CP0J0udU.mjs.map} +1 -1
  75. package/fesm2022/{acorex-modules-human-capital-management-employment-type.entity-Cxpm2FR4.mjs → acorex-modules-human-capital-management-employment-type.entity-0nT4XSi2.mjs} +2 -2
  76. package/fesm2022/{acorex-modules-human-capital-management-employment-type.entity-Cxpm2FR4.mjs.map → acorex-modules-human-capital-management-employment-type.entity-0nT4XSi2.mjs.map} +1 -1
  77. package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-wNFknszR.mjs → acorex-modules-human-capital-management-leave-request.entity-YGyl6MWh.mjs} +2 -2
  78. package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-wNFknszR.mjs.map → acorex-modules-human-capital-management-leave-request.entity-YGyl6MWh.mjs.map} +1 -1
  79. package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-CS5I6afy.mjs → acorex-modules-human-capital-management-leave-type.entity-J9p3UIlS.mjs} +2 -2
  80. package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-CS5I6afy.mjs.map → acorex-modules-human-capital-management-leave-type.entity-J9p3UIlS.mjs.map} +1 -1
  81. package/fesm2022/{acorex-modules-human-capital-management-position-assignment.entity-ClzIrdYi.mjs → acorex-modules-human-capital-management-position-assignment.entity-DBz-A04O.mjs} +2 -2
  82. package/fesm2022/{acorex-modules-human-capital-management-position-assignment.entity-ClzIrdYi.mjs.map → acorex-modules-human-capital-management-position-assignment.entity-DBz-A04O.mjs.map} +1 -1
  83. package/fesm2022/{acorex-modules-human-capital-management-skill-level.entity-CA_afJbJ.mjs → acorex-modules-human-capital-management-skill-level.entity-CV9vEbTH.mjs} +2 -2
  84. package/fesm2022/{acorex-modules-human-capital-management-skill-level.entity-CA_afJbJ.mjs.map → acorex-modules-human-capital-management-skill-level.entity-CV9vEbTH.mjs.map} +1 -1
  85. package/fesm2022/{acorex-modules-human-capital-management-skill.entity-B0rZeAGS.mjs → acorex-modules-human-capital-management-skill.entity-n6HyUWfU.mjs} +9 -3
  86. package/fesm2022/acorex-modules-human-capital-management-skill.entity-n6HyUWfU.mjs.map +1 -0
  87. package/fesm2022/acorex-modules-human-capital-management.mjs +1 -1
  88. package/fesm2022/{acorex-modules-report-management-report-create-root.component-Cy7fMpif.mjs → acorex-modules-report-management-report-create-root.component-w6pWujhV.mjs} +2 -2
  89. package/fesm2022/acorex-modules-report-management-report-create-root.component-w6pWujhV.mjs.map +1 -0
  90. package/fesm2022/acorex-modules-report-management.mjs +1 -1
  91. package/fesm2022/acorex-modules-security-management.mjs +2 -2
  92. package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
  93. package/fesm2022/acorex-modules-text-template-management.mjs +1 -251
  94. package/fesm2022/acorex-modules-text-template-management.mjs.map +1 -1
  95. package/package.json +6 -6
  96. package/text-template-management/index.d.ts +2 -23
  97. package/fesm2022/acorex-modules-application-management-acorex-modules-application-management-3Z51H2O-.mjs.map +0 -1
  98. package/fesm2022/acorex-modules-application-management-menu-list.component-LIRwdWs6.mjs +0 -731
  99. package/fesm2022/acorex-modules-application-management-menu-list.component-LIRwdWs6.mjs.map +0 -1
  100. package/fesm2022/acorex-modules-auth-user-sessions.component-CYtCo5d1.mjs.map +0 -1
  101. package/fesm2022/acorex-modules-document-management-acorex-modules-document-management-CwVDh52l.mjs.map +0 -1
  102. package/fesm2022/acorex-modules-document-management-link-dialog.component-BXzePJlW.mjs.map +0 -1
  103. package/fesm2022/acorex-modules-document-management-share-dialog.component-PCK4_jcD.mjs.map +0 -1
  104. package/fesm2022/acorex-modules-document-management-share-email-dialog.component-DZEoX29V.mjs.map +0 -1
  105. package/fesm2022/acorex-modules-human-capital-management-skill.entity-B0rZeAGS.mjs.map +0 -1
  106. package/fesm2022/acorex-modules-report-management-report-create-root.component-Cy7fMpif.mjs.map +0 -1
@@ -1,731 +0,0 @@
1
- import { CdkDrag, CdkDragHandle, CdkDropList, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop';
2
- import * as i5 from '@angular/common';
3
- import { CommonModule } from '@angular/common';
4
- import * as i0 from '@angular/core';
5
- import { input, output, signal, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, Injectable } from '@angular/core';
6
- import { ActivatedRoute } from '@angular/router';
7
- import * as i1 from '@acorex/components/button';
8
- import { AXButtonModule } from '@acorex/components/button';
9
- import { AXDialogService } from '@acorex/components/dialog';
10
- import { AXToastService } from '@acorex/components/toast';
11
- import * as i6 from '@acorex/core/translation';
12
- import { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';
13
- import { AXPPlatformScope } from '@acorex/platform/core';
14
- import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
15
- import { AXPThemeLayoutBlockComponent, AXPStateMessageComponent } from '@acorex/platform/layout/components';
16
- import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
17
- import * as i2 from '@acorex/components/decorators';
18
- import { AXDecoratorModule } from '@acorex/components/decorators';
19
- import * as i3 from '@acorex/components/dropdown-button';
20
- import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
21
- import * as i4 from '@acorex/components/dropdown';
22
- import { AXDropdownModule } from '@acorex/components/dropdown';
23
- import { AXPSettingService, AXPMenuProviderService } from '@acorex/platform/common';
24
- import { cloneDeep } from 'lodash-es';
25
- import { A as AXP_MENU_CUSTOMIZATION_KEY, a as AXP_MENU_CUSTOMIZATION_DEFAULT } from './acorex-modules-application-management-acorex-modules-application-management-3Z51H2O-.mjs';
26
-
27
- //#region ---- Menu Tree Item Component ----
28
- class AXMMenuTreeItemComponent {
29
- constructor() {
30
- //#region ---- Inputs ----
31
- this.item = input.required(...(ngDevMode ? [{ debugName: "item" }] : []));
32
- this.level = input(0, ...(ngDevMode ? [{ debugName: "level" }] : []));
33
- this.canDelete = input(false, ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
34
- //#endregion
35
- //#region ---- Outputs ----
36
- this.actionTriggered = output();
37
- this.itemDropped = output();
38
- //#endregion
39
- //#region ---- Component State ----
40
- this.isExpanded = signal(true, ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
41
- }
42
- //#endregion
43
- //#region ---- Event Handlers ----
44
- /**
45
- * Toggle expand/collapse
46
- */
47
- toggleExpand() {
48
- this.isExpanded.update((expanded) => !expanded);
49
- }
50
- /**
51
- * Handle action trigger
52
- */
53
- onAction(action) {
54
- this.actionTriggered.emit({ action, item: this.item() });
55
- }
56
- /**
57
- * Handle drop event
58
- */
59
- onDrop(event) {
60
- this.itemDropped.emit(event);
61
- }
62
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMMenuTreeItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXMMenuTreeItemComponent, isStandalone: true, selector: "axm-menu-tree-item", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, canDelete: { classPropertyName: "canDelete", publicName: "canDelete", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", itemDropped: "itemDropped" }, host: { classAttribute: "axm-menu-tree-item" }, ngImport: i0, template: "<div class=\"axm-menu-tree-item__container\" [style.padding-left.rem]=\"level()\">\n <div class=\"axm-menu-tree-item__content\" cdkDrag [cdkDragData]=\"item()\" [class.--hidden]=\"item().isHidden\"\n [class.--custom]=\"item().isCustom\">\n <!-- Drag Handle -->\n <div class=\"axm-menu-tree-item__drag-handle\" cdkDragHandle>\n <i class=\"fa-light fa-grip-dots-vertical\"></i>\n </div>\n\n <!-- Expand/Collapse Button -->\n @if (item().children && item().children!.length > 0) {\n <ax-button class=\"axm-menu-tree-item__expand-btn\" [look]=\"'blank'\" [size]=\"'sm'\" (onClick)=\"toggleExpand()\">\n <i [class]=\"isExpanded() ? 'fa-light fa-chevron-down' : 'fa-light fa-chevron-right'\"></i>\n </ax-button>\n } @else {\n <div class=\"axm-menu-tree-item__spacer\"></div>\n }\n\n <!-- Icon -->\n @if (item().icon) {\n <i class=\"axm-menu-tree-item__icon\" [class]=\"item().icon\"></i>\n }\n\n <!-- Text or Info -->\n @if (item().text) {\n <span class=\"axm-menu-tree-item__text\">\n {{ item().text | translate | async }}\n </span>\n } @else if (item().path) {\n <span class=\"axm-menu-tree-item__path\">\n <i class=\"fa-light fa-link\"></i>\n {{ item().path }}\n </span>\n } @else {\n <span class=\"axm-menu-tree-item__divider\">\n <i class=\"fa-light fa-minus\"></i>\n {{ '@application-management:menu-management.badge.divider' | translate | async }}\n </span>\n }\n\n <!-- Menu Name/Key -->\n @if (item().name) {\n <code class=\"axm-menu-tree-item__name\">\n {{ item().name }}\n </code>\n }\n\n <!-- Actions Dropdown -->\n <ax-dropdown-button class=\"axm-menu-tree-item__actions\" [look]=\"'blank'\" [size]=\"'sm'\">\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <!-- Show/Hide (only for items with names) -->\n @if (item().name && item().isBuiltIn) {\n @if (item().isHidden) {\n <ax-button-item (onClick)=\"onAction('show'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-eye\"></i>\n </ax-prefix>\n {{ '@application-management:menu-management.actions.show' | translate | async }}\n </ax-button-item>\n } @else {\n <ax-button-item (onClick)=\"onAction('hide'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-eye-slash\"></i>\n </ax-prefix>\n {{ '@application-management:menu-management.actions.hide' | translate | async }}\n </ax-button-item>\n }\n }\n\n <!-- Edit (only for items with names) -->\n @if (item().name) {\n <ax-button-item (onClick)=\"onAction('edit'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-edit\"></i>\n </ax-prefix>\n {{ '@general:actions.edit.title' | translate | async }}\n </ax-button-item>\n }\n\n <!-- Add Child -->\n <ax-button-item (onClick)=\"onAction('add-child'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-plus\"></i>\n </ax-prefix>\n {{ '@application-management:menu-management.actions.add-child' | translate | async }}\n </ax-button-item>\n\n <!-- Delete (only for custom items with names) -->\n @if (item().name && item().isCustom && canDelete()) {\n <ax-divider></ax-divider>\n <ax-button-item [color]=\"'danger'\" (onClick)=\"onAction('delete'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-trash\"></i>\n </ax-prefix>\n {{ '@general:actions.delete.title' | translate | async }}\n </ax-button-item>\n }\n\n <!-- Info message for items without names -->\n @if (!item().name) {\n <ax-divider></ax-divider>\n <div class=\"ax-p-2 ax-text-xs ax-text-neutral-500 ax-italic\">\n {{ '@application-management:menu-management.messages.no-name-info' | translate | async }}\n </div>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-dropdown-button>\n </div>\n\n <!-- Children -->\n @if (item().children && item().children!.length > 0 && isExpanded()) {\n <div class=\"axm-menu-tree-item__children\" cdkDropList [cdkDropListData]=\"item().children!\"\n (cdkDropListDropped)=\"onDrop($event)\">\n @for (child of item().children!; track child.name || child.path || $index) {\n <axm-menu-tree-item [item]=\"child\" [level]=\"level() + 1\" [canDelete]=\"canDelete()\"\n (actionTriggered)=\"actionTriggered.emit($event)\" (itemDropped)=\"itemDropped.emit($event)\" />\n }\n </div>\n }\n</div>", styles: [".axm-menu-tree-item__container{display:flex;flex-direction:column}.axm-menu-tree-item__content{display:flex;align-items:center;gap:.5rem;border-radius:.375rem;padding:.5rem;border-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));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.axm-menu-tree-item__content:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axm-menu-tree-item__content.--hidden{opacity:.5}.axm-menu-tree-item__content.--custom{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))}.axm-menu-tree-item__content.cdk-drag-preview{--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-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));border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))}.axm-menu-tree-item__drag-handle{display:flex;align-items:center;justify-content:center;height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1));cursor:move}.axm-menu-tree-item__drag-handle:hover{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.axm-menu-tree-item__expand-btn{height:1.5rem;width:1.5rem}.axm-menu-tree-item__spacer{width:1.5rem}.axm-menu-tree-item__icon{display:flex;align-items:center;justify-content:center;height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}.axm-menu-tree-item__text{flex:1 1 0%;font-size:.875rem;line-height:1.25rem;font-weight:500}.axm-menu-tree-item__divider,.axm-menu-tree-item__path{display:flex;flex:1 1 0%;align-items:center;gap:.5rem;font-size:.75rem;line-height:1rem;font-style:italic;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.axm-menu-tree-item__divider i,.axm-menu-tree-item__path i{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.axm-menu-tree-item__name{display:flex;align-items:center;border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1));font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:400;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));white-space:nowrap;-webkit-user-select:all;-moz-user-select:all;user-select:all}.axm-menu-tree-item__actions{margin-left:.5rem}.axm-menu-tree-item__children{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;padding-left:1rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}\n"], dependencies: [{ kind: "component", type: AXMMenuTreeItemComponent, selector: "axm-menu-tree-item", inputs: ["item", "level", "canDelete"], outputs: ["actionTriggered", "itemDropped"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: i1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.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: AXDropdownButtonModule }, { kind: "component", type: i3.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
64
- }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMMenuTreeItemComponent, decorators: [{
66
- type: Component,
67
- args: [{ selector: 'axm-menu-tree-item', imports: [
68
- CommonModule,
69
- CdkDrag,
70
- CdkDragHandle,
71
- CdkDropList,
72
- AXButtonModule,
73
- AXDecoratorModule,
74
- AXDropdownButtonModule,
75
- AXDropdownModule,
76
- AXTranslationModule,
77
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'axm-menu-tree-item' }, template: "<div class=\"axm-menu-tree-item__container\" [style.padding-left.rem]=\"level()\">\n <div class=\"axm-menu-tree-item__content\" cdkDrag [cdkDragData]=\"item()\" [class.--hidden]=\"item().isHidden\"\n [class.--custom]=\"item().isCustom\">\n <!-- Drag Handle -->\n <div class=\"axm-menu-tree-item__drag-handle\" cdkDragHandle>\n <i class=\"fa-light fa-grip-dots-vertical\"></i>\n </div>\n\n <!-- Expand/Collapse Button -->\n @if (item().children && item().children!.length > 0) {\n <ax-button class=\"axm-menu-tree-item__expand-btn\" [look]=\"'blank'\" [size]=\"'sm'\" (onClick)=\"toggleExpand()\">\n <i [class]=\"isExpanded() ? 'fa-light fa-chevron-down' : 'fa-light fa-chevron-right'\"></i>\n </ax-button>\n } @else {\n <div class=\"axm-menu-tree-item__spacer\"></div>\n }\n\n <!-- Icon -->\n @if (item().icon) {\n <i class=\"axm-menu-tree-item__icon\" [class]=\"item().icon\"></i>\n }\n\n <!-- Text or Info -->\n @if (item().text) {\n <span class=\"axm-menu-tree-item__text\">\n {{ item().text | translate | async }}\n </span>\n } @else if (item().path) {\n <span class=\"axm-menu-tree-item__path\">\n <i class=\"fa-light fa-link\"></i>\n {{ item().path }}\n </span>\n } @else {\n <span class=\"axm-menu-tree-item__divider\">\n <i class=\"fa-light fa-minus\"></i>\n {{ '@application-management:menu-management.badge.divider' | translate | async }}\n </span>\n }\n\n <!-- Menu Name/Key -->\n @if (item().name) {\n <code class=\"axm-menu-tree-item__name\">\n {{ item().name }}\n </code>\n }\n\n <!-- Actions Dropdown -->\n <ax-dropdown-button class=\"axm-menu-tree-item__actions\" [look]=\"'blank'\" [size]=\"'sm'\">\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <!-- Show/Hide (only for items with names) -->\n @if (item().name && item().isBuiltIn) {\n @if (item().isHidden) {\n <ax-button-item (onClick)=\"onAction('show'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-eye\"></i>\n </ax-prefix>\n {{ '@application-management:menu-management.actions.show' | translate | async }}\n </ax-button-item>\n } @else {\n <ax-button-item (onClick)=\"onAction('hide'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-eye-slash\"></i>\n </ax-prefix>\n {{ '@application-management:menu-management.actions.hide' | translate | async }}\n </ax-button-item>\n }\n }\n\n <!-- Edit (only for items with names) -->\n @if (item().name) {\n <ax-button-item (onClick)=\"onAction('edit'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-edit\"></i>\n </ax-prefix>\n {{ '@general:actions.edit.title' | translate | async }}\n </ax-button-item>\n }\n\n <!-- Add Child -->\n <ax-button-item (onClick)=\"onAction('add-child'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-plus\"></i>\n </ax-prefix>\n {{ '@application-management:menu-management.actions.add-child' | translate | async }}\n </ax-button-item>\n\n <!-- Delete (only for custom items with names) -->\n @if (item().name && item().isCustom && canDelete()) {\n <ax-divider></ax-divider>\n <ax-button-item [color]=\"'danger'\" (onClick)=\"onAction('delete'); panel.close()\">\n <ax-prefix>\n <i class=\"fa-light fa-trash\"></i>\n </ax-prefix>\n {{ '@general:actions.delete.title' | translate | async }}\n </ax-button-item>\n }\n\n <!-- Info message for items without names -->\n @if (!item().name) {\n <ax-divider></ax-divider>\n <div class=\"ax-p-2 ax-text-xs ax-text-neutral-500 ax-italic\">\n {{ '@application-management:menu-management.messages.no-name-info' | translate | async }}\n </div>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-dropdown-button>\n </div>\n\n <!-- Children -->\n @if (item().children && item().children!.length > 0 && isExpanded()) {\n <div class=\"axm-menu-tree-item__children\" cdkDropList [cdkDropListData]=\"item().children!\"\n (cdkDropListDropped)=\"onDrop($event)\">\n @for (child of item().children!; track child.name || child.path || $index) {\n <axm-menu-tree-item [item]=\"child\" [level]=\"level() + 1\" [canDelete]=\"canDelete()\"\n (actionTriggered)=\"actionTriggered.emit($event)\" (itemDropped)=\"itemDropped.emit($event)\" />\n }\n </div>\n }\n</div>", styles: [".axm-menu-tree-item__container{display:flex;flex-direction:column}.axm-menu-tree-item__content{display:flex;align-items:center;gap:.5rem;border-radius:.375rem;padding:.5rem;border-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));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.axm-menu-tree-item__content:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axm-menu-tree-item__content.--hidden{opacity:.5}.axm-menu-tree-item__content.--custom{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))}.axm-menu-tree-item__content.cdk-drag-preview{--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-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));border-width:1px;--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))}.axm-menu-tree-item__drag-handle{display:flex;align-items:center;justify-content:center;height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1));cursor:move}.axm-menu-tree-item__drag-handle:hover{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.axm-menu-tree-item__expand-btn{height:1.5rem;width:1.5rem}.axm-menu-tree-item__spacer{width:1.5rem}.axm-menu-tree-item__icon{display:flex;align-items:center;justify-content:center;height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}.axm-menu-tree-item__text{flex:1 1 0%;font-size:.875rem;line-height:1.25rem;font-weight:500}.axm-menu-tree-item__divider,.axm-menu-tree-item__path{display:flex;flex:1 1 0%;align-items:center;gap:.5rem;font-size:.75rem;line-height:1rem;font-style:italic;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.axm-menu-tree-item__divider i,.axm-menu-tree-item__path i{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.axm-menu-tree-item__name{display:flex;align-items:center;border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1));font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:400;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));white-space:nowrap;-webkit-user-select:all;-moz-user-select:all;user-select:all}.axm-menu-tree-item__actions{margin-left:.5rem}.axm-menu-tree-item__children{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;padding-left:1rem;border-left-width:2px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}\n"] }]
78
- }] });
79
-
80
- //#region ---- Menu Management Service ----
81
- class AXPMenuManagementService {
82
- constructor() {
83
- //#region ---- Dependencies ----
84
- this.settingService = inject(AXPSettingService);
85
- this.menuProviderService = inject(AXPMenuProviderService);
86
- }
87
- //#endregion
88
- //#region ---- Public Methods ----
89
- /**
90
- * Get all menu items with customization metadata
91
- */
92
- async getMenuTree(scope) {
93
- // Get RAW menu items WITHOUT middleware (for management purposes)
94
- const baseItems = await this.menuProviderService.rawItems();
95
- // Load customizations for the given scope
96
- const customization = await this.loadCustomization(scope);
97
- // Convert to nodes with metadata
98
- return this.convertToNodes(baseItems, customization);
99
- }
100
- /**
101
- * Load menu customization for a specific scope
102
- */
103
- async loadCustomization(scope) {
104
- try {
105
- const scopedSettings = this.settingService.scope(scope);
106
- const saved = await scopedSettings.get(AXP_MENU_CUSTOMIZATION_KEY);
107
- if (saved && saved.version) {
108
- return saved;
109
- }
110
- return cloneDeep(AXP_MENU_CUSTOMIZATION_DEFAULT);
111
- }
112
- catch (error) {
113
- console.warn('Failed to load menu customization, using defaults', error);
114
- return cloneDeep(AXP_MENU_CUSTOMIZATION_DEFAULT);
115
- }
116
- }
117
- /**
118
- * Save menu customization for a specific scope
119
- */
120
- async saveCustomization(scope, customization) {
121
- const scopedSettings = this.settingService.scope(scope);
122
- await scopedSettings.set(AXP_MENU_CUSTOMIZATION_KEY, customization);
123
- // Clear menu cache to force reload
124
- this.menuProviderService.clearCache();
125
- }
126
- /**
127
- * Hide a menu item
128
- */
129
- async hideMenuItem(scope, menuName) {
130
- if (!menuName) {
131
- throw new Error('Menu item must have a name to be hidden');
132
- }
133
- const customization = await this.loadCustomization(scope);
134
- if (!customization.overrides[menuName]) {
135
- customization.overrides[menuName] = {};
136
- }
137
- customization.overrides[menuName].hidden = true;
138
- await this.saveCustomization(scope, customization);
139
- }
140
- /**
141
- * Show a menu item
142
- */
143
- async showMenuItem(scope, menuName) {
144
- if (!menuName) {
145
- throw new Error('Menu item must have a name to be shown');
146
- }
147
- const customization = await this.loadCustomization(scope);
148
- if (customization.overrides[menuName]) {
149
- delete customization.overrides[menuName].hidden;
150
- // Clean up if no other overrides exist
151
- if (Object.keys(customization.overrides[menuName]).length === 0) {
152
- delete customization.overrides[menuName];
153
- }
154
- }
155
- await this.saveCustomization(scope, customization);
156
- }
157
- /**
158
- * Update menu item priority
159
- */
160
- async updateMenuPriority(scope, menuName, priority) {
161
- const customization = await this.loadCustomization(scope);
162
- if (!customization.overrides[menuName]) {
163
- customization.overrides[menuName] = {};
164
- }
165
- customization.overrides[menuName].priority = priority;
166
- await this.saveCustomization(scope, customization);
167
- }
168
- /**
169
- * Move menu item to different parent
170
- */
171
- async moveMenuItem(scope, menuName, newParentName) {
172
- const customization = await this.loadCustomization(scope);
173
- if (!customization.overrides[menuName]) {
174
- customization.overrides[menuName] = {};
175
- }
176
- if (newParentName) {
177
- customization.overrides[menuName].parentName = newParentName;
178
- }
179
- else {
180
- delete customization.overrides[menuName].parentName;
181
- }
182
- await this.saveCustomization(scope, customization);
183
- }
184
- /**
185
- * Update menu item properties
186
- */
187
- async updateMenuProperties(scope, menuName, properties) {
188
- const customization = await this.loadCustomization(scope);
189
- if (!customization.overrides[menuName]) {
190
- customization.overrides[menuName] = {};
191
- }
192
- customization.overrides[menuName].properties = {
193
- ...customization.overrides[menuName].properties,
194
- ...properties,
195
- };
196
- await this.saveCustomization(scope, customization);
197
- }
198
- /**
199
- * Add custom menu item
200
- */
201
- async addCustomMenuItem(scope, menuItem) {
202
- const customization = await this.loadCustomization(scope);
203
- // Generate unique name if not provided
204
- if (!menuItem.name) {
205
- menuItem.name = `custom-menu-${Date.now()}`;
206
- }
207
- customization.customItems.push(menuItem);
208
- await this.saveCustomization(scope, customization);
209
- }
210
- /**
211
- * Update custom menu item
212
- */
213
- async updateCustomMenuItem(scope, menuName, menuItem) {
214
- const customization = await this.loadCustomization(scope);
215
- const index = customization.customItems.findIndex((item) => item.name === menuName);
216
- if (index !== -1) {
217
- customization.customItems[index] = menuItem;
218
- await this.saveCustomization(scope, customization);
219
- }
220
- }
221
- /**
222
- * Delete custom menu item
223
- */
224
- async deleteCustomMenuItem(scope, menuName) {
225
- const customization = await this.loadCustomization(scope);
226
- customization.customItems = customization.customItems.filter((item) => item.name !== menuName);
227
- await this.saveCustomization(scope, customization);
228
- }
229
- /**
230
- * Reset all customizations for a scope
231
- */
232
- async resetCustomizations(scope) {
233
- await this.saveCustomization(scope, cloneDeep(AXP_MENU_CUSTOMIZATION_DEFAULT));
234
- }
235
- /**
236
- * Reorder menu items based on drag-drop
237
- */
238
- async reorderMenuItems(scope, items, parentName) {
239
- const customization = await this.loadCustomization(scope);
240
- // Update priorities for all items at this level (only for items with names)
241
- items.forEach((item, index) => {
242
- if (item.name) {
243
- if (!customization.overrides[item.name]) {
244
- customization.overrides[item.name] = {};
245
- }
246
- customization.overrides[item.name].priority = index * 100;
247
- // Update parent if moved
248
- if (parentName !== undefined) {
249
- customization.overrides[item.name].parentName = parentName || undefined;
250
- }
251
- // Recursively handle children
252
- if (item.children && item.children.length > 0) {
253
- this.reorderChildrenRecursive(customization, item.children, item.name);
254
- }
255
- }
256
- });
257
- await this.saveCustomization(scope, customization);
258
- }
259
- //#endregion
260
- //#region ---- Private Methods ----
261
- /**
262
- * Convert menu items to nodes with metadata
263
- */
264
- convertToNodes(items, customization) {
265
- const nodes = items.map((item) => {
266
- // Only use items that have a proper name property
267
- const itemName = item.name;
268
- const override = itemName ? customization.overrides[itemName] : undefined;
269
- const isCustom = itemName ? customization.customItems.some((ci) => ci.name === itemName) : false;
270
- const node = {
271
- ...item,
272
- name: itemName,
273
- isBuiltIn: !isCustom,
274
- isCustom,
275
- isHidden: override?.hidden || false,
276
- originalPriority: item.priority,
277
- originalParentName: undefined,
278
- // Apply priority override if it exists
279
- priority: override?.priority !== undefined ? override.priority : item.priority,
280
- children: item.children ? this.convertToNodes(item.children, customization) : undefined,
281
- };
282
- return node;
283
- });
284
- // Sort by priority (after applying overrides)
285
- nodes.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
286
- return nodes;
287
- }
288
- /**
289
- * Recursively update children priorities
290
- */
291
- reorderChildrenRecursive(customization, children, parentName) {
292
- children.forEach((child, index) => {
293
- if (child.name) {
294
- if (!customization.overrides[child.name]) {
295
- customization.overrides[child.name] = {};
296
- }
297
- customization.overrides[child.name].priority = index * 100;
298
- if (parentName) {
299
- customization.overrides[child.name].parentName = parentName;
300
- }
301
- }
302
- if (child.children && child.children.length > 0) {
303
- this.reorderChildrenRecursive(customization, child.children, child.name);
304
- }
305
- });
306
- }
307
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPMenuManagementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
308
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPMenuManagementService, providedIn: 'root' }); }
309
- }
310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPMenuManagementService, decorators: [{
311
- type: Injectable,
312
- args: [{ providedIn: 'root' }]
313
- }] });
314
-
315
- //#region ---- Menu List Component ----
316
- class AXMMenuListComponent extends AXPPageLayoutBaseComponent {
317
- constructor() {
318
- super(...arguments);
319
- //#region ---- Dependencies ----
320
- this.menuManagementService = inject(AXPMenuManagementService);
321
- this.layoutBuilder = inject(AXPLayoutBuilderService);
322
- this.dialogService = inject(AXDialogService);
323
- this.toastService = inject(AXToastService);
324
- this.translationService = inject(AXTranslationService);
325
- this.route = inject(ActivatedRoute);
326
- //#endregion
327
- //#region ---- Component State ----
328
- this.menuItems = signal([], ...(ngDevMode ? [{ debugName: "menuItems" }] : []));
329
- this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
330
- this.error = signal('', ...(ngDevMode ? [{ debugName: "error" }] : []));
331
- this.currentScope = signal(AXPPlatformScope.User, ...(ngDevMode ? [{ debugName: "currentScope" }] : []));
332
- }
333
- //#endregion
334
- //#region ---- Lifecycle ----
335
- async ngOnInit() {
336
- await super.ngOnInit();
337
- // Get scope from route
338
- this.route.params.subscribe(async (params) => {
339
- const scope = params['scope'];
340
- if (scope) {
341
- this.currentScope.set(scope);
342
- await this.loadMenuItems();
343
- this.recompute(); // Update page header after loading
344
- }
345
- });
346
- }
347
- //#endregion
348
- //#region ---- Data Loading ----
349
- /**
350
- * Load menu items for current scope
351
- */
352
- async loadMenuItems() {
353
- try {
354
- this.isLoading.set(true);
355
- this.error.set('');
356
- const items = await this.menuManagementService.getMenuTree(this.currentScope());
357
- this.menuItems.set(items);
358
- this.recompute();
359
- }
360
- catch (error) {
361
- this.error.set(error instanceof Error ? error.message : 'Failed to load menu items');
362
- this.toastService.danger('@application-management:menu-management.messages.load-error');
363
- }
364
- finally {
365
- this.isLoading.set(false);
366
- }
367
- }
368
- //#endregion
369
- //#region ---- Page Layout Interface ----
370
- /**
371
- * Get page title
372
- */
373
- async getPageTitle() {
374
- const scopeName = this.currentScope();
375
- const scopeKey = scopeName === AXPPlatformScope.User ? 'user' : 'tenant';
376
- return this.translationService.translateAsync(`@application-management:menu-management.${scopeKey}.title`);
377
- }
378
- /**
379
- * Get page description
380
- */
381
- async getPageDescription() {
382
- return this.translationService.translateAsync('@application-management:menu-management.description');
383
- }
384
- /**
385
- * Get primary menu items (actions)
386
- */
387
- async getPrimaryMenuItems() {
388
- return [
389
- {
390
- title: await this.translationService.translateAsync('@application-management:menu-management.actions.add-root'),
391
- icon: 'fa-light fa-plus',
392
- color: 'primary',
393
- command: { name: 'add-root' },
394
- },
395
- ];
396
- }
397
- /**
398
- * Get secondary menu items
399
- */
400
- async getSecondaryMenuItems() {
401
- return [
402
- {
403
- title: await this.translationService.translateAsync('@application-management:menu-management.actions.reset'),
404
- icon: 'fa-light fa-rotate-left',
405
- color: 'danger',
406
- command: { name: 'reset' },
407
- },
408
- ];
409
- }
410
- /**
411
- * Execute commands from page actions
412
- */
413
- async execute(command) {
414
- switch (command.name) {
415
- case 'add-root':
416
- await this.addRootMenuItem();
417
- break;
418
- case 'reset':
419
- await this.resetCustomizations();
420
- break;
421
- }
422
- }
423
- //#endregion
424
- //#region ---- Event Handlers ----
425
- /**
426
- * Handle menu item action
427
- */
428
- async onActionTriggered(event) {
429
- const { action, item } = event;
430
- switch (action) {
431
- case 'show':
432
- await this.showMenuItem(item);
433
- break;
434
- case 'hide':
435
- await this.hideMenuItem(item);
436
- break;
437
- case 'edit':
438
- await this.editMenuItem(item);
439
- break;
440
- case 'delete':
441
- await this.deleteMenuItem(item);
442
- break;
443
- case 'add-child':
444
- await this.addChildMenuItem(item);
445
- break;
446
- }
447
- }
448
- /**
449
- * Handle drag and drop
450
- */
451
- async onItemDropped(event) {
452
- try {
453
- if (event.previousContainer === event.container) {
454
- // Same container - just reorder
455
- moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
456
- }
457
- else {
458
- // Different container - move between parents
459
- transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
460
- }
461
- // Update signal to reflect the new order immediately
462
- this.menuItems.set([...this.menuItems()]);
463
- // Find which parent owns the target container and save with correct context
464
- const targetParent = this.findParentOfContainer(event.container.data, this.menuItems());
465
- const targetParentName = targetParent?.name;
466
- // Save the reordered items with their parent context
467
- await this.menuManagementService.reorderMenuItems(this.currentScope(), event.container.data, targetParentName);
468
- // If moved between containers, also update the source container
469
- if (event.previousContainer !== event.container) {
470
- const sourceParent = this.findParentOfContainer(event.previousContainer.data, this.menuItems());
471
- const sourceParentName = sourceParent?.name;
472
- await this.menuManagementService.reorderMenuItems(this.currentScope(), event.previousContainer.data, sourceParentName);
473
- }
474
- this.toastService.success('@application-management:menu-management.messages.reorder-success');
475
- // Don't reload - signal is already updated and changes are saved
476
- }
477
- catch (error) {
478
- this.toastService.danger('@application-management:menu-management.messages.reorder-error');
479
- // Reload on error to revert changes
480
- await this.loadMenuItems();
481
- }
482
- }
483
- /**
484
- * Find the parent item that owns a given children array
485
- */
486
- findParentOfContainer(containerData, items) {
487
- // Check if this is the root level
488
- if (containerData === items) {
489
- return null; // Root level has no parent
490
- }
491
- // Recursively search for the parent
492
- for (const item of items) {
493
- if (item.children === containerData) {
494
- return item;
495
- }
496
- if (item.children) {
497
- const found = this.findParentOfContainer(containerData, item.children);
498
- if (found !== undefined) {
499
- return found;
500
- }
501
- }
502
- }
503
- return undefined; // Not found (shouldn't happen)
504
- }
505
- /**
506
- * Add new root menu item
507
- */
508
- async addRootMenuItem() {
509
- await this.showMenuItemDialog(null);
510
- }
511
- /**
512
- * Reset customizations
513
- */
514
- async resetCustomizations() {
515
- const confirmed = await this.dialogService.confirm('@application-management:menu-management.reset.title', '@application-management:menu-management.reset.message');
516
- if (!confirmed)
517
- return;
518
- try {
519
- await this.menuManagementService.resetCustomizations(this.currentScope());
520
- this.toastService.success('@application-management:menu-management.messages.reset-success');
521
- await this.loadMenuItems();
522
- }
523
- catch (error) {
524
- this.toastService.danger('@application-management:menu-management.messages.reset-error');
525
- }
526
- }
527
- //#endregion
528
- //#region ---- Menu Item Actions ----
529
- /**
530
- * Show menu item
531
- */
532
- async showMenuItem(item) {
533
- try {
534
- if (!item.name)
535
- return;
536
- await this.menuManagementService.showMenuItem(this.currentScope(), item.name);
537
- this.toastService.success('@application-management:menu-management.messages.show-success');
538
- await this.loadMenuItems();
539
- }
540
- catch (error) {
541
- this.toastService.danger('@application-management:menu-management.messages.show-error');
542
- }
543
- }
544
- /**
545
- * Hide menu item
546
- */
547
- async hideMenuItem(item) {
548
- try {
549
- if (!item.name)
550
- return;
551
- await this.menuManagementService.hideMenuItem(this.currentScope(), item.name);
552
- this.toastService.success('@application-management:menu-management.messages.hide-success');
553
- await this.loadMenuItems();
554
- }
555
- catch (error) {
556
- this.toastService.danger('@application-management:menu-management.messages.hide-error');
557
- }
558
- }
559
- /**
560
- * Edit menu item
561
- */
562
- async editMenuItem(item) {
563
- await this.showMenuItemDialog(item);
564
- }
565
- /**
566
- * Delete custom menu item
567
- */
568
- async deleteMenuItem(item) {
569
- const confirmed = await this.dialogService.confirm('@general:actions.delete.title', '@application-management:menu-management.delete.message');
570
- if (!confirmed)
571
- return;
572
- try {
573
- if (!item.name)
574
- return;
575
- await this.menuManagementService.deleteCustomMenuItem(this.currentScope(), item.name);
576
- this.toastService.success('@application-management:menu-management.messages.delete-success');
577
- await this.loadMenuItems();
578
- }
579
- catch (error) {
580
- this.toastService.danger('@application-management:menu-management.messages.delete-error');
581
- }
582
- }
583
- /**
584
- * Add child menu item
585
- */
586
- async addChildMenuItem(parent) {
587
- await this.showMenuItemDialog(null, parent);
588
- }
589
- //#endregion
590
- //#region ---- Dialog Helpers ----
591
- /**
592
- * Show menu item dialog (add/edit)
593
- */
594
- async showMenuItemDialog(item, parent) {
595
- const isEdit = !!item;
596
- const title = isEdit
597
- ? '@application-management:menu-management.edit-dialog.title'
598
- : '@application-management:menu-management.add-dialog.title';
599
- const context = {
600
- name: item?.name || '',
601
- text: item?.text || '',
602
- icon: item?.icon || '',
603
- path: item?.path || '',
604
- priority: item?.priority || 0,
605
- description: item?.description || '',
606
- };
607
- const dialogRef = await this.layoutBuilder
608
- .create()
609
- .dialog((dialog) => {
610
- dialog
611
- .setTitle(title)
612
- .setContext(context)
613
- .content((flex) => {
614
- flex
615
- .setDirection('column')
616
- .formField('@application-management:menu-management.fields.name', (field) => {
617
- field.path('name');
618
- field.textBox({
619
- placeholder: '@application-management:menu-management.fields.name',
620
- validations: [{ rule: 'required' }],
621
- readonly: isEdit && item?.isBuiltIn,
622
- });
623
- })
624
- .formField('@application-management:menu-management.fields.text', (field) => {
625
- field.path('text');
626
- field.textBox({
627
- placeholder: '@application-management:menu-management.fields.text',
628
- validations: [{ rule: 'required' }],
629
- });
630
- })
631
- .formField('@application-management:menu-management.fields.icon', (field) => {
632
- field.path('icon');
633
- field.textBox({
634
- placeholder: '@application-management:menu-management.fields.icon',
635
- });
636
- })
637
- .formField('@application-management:menu-management.fields.path', (field) => {
638
- field.path('path');
639
- field.textBox({
640
- placeholder: '@application-management:menu-management.fields.path',
641
- });
642
- })
643
- .formField('@application-management:menu-management.fields.priority', (field) => {
644
- field.path('priority');
645
- field.numberBox({
646
- placeholder: '@application-management:menu-management.fields.priority',
647
- });
648
- })
649
- .formField('@application-management:menu-management.fields.description', (field) => {
650
- field.path('description');
651
- field.largeTextBox({
652
- placeholder: '@application-management:menu-management.fields.description',
653
- rows: 3,
654
- });
655
- });
656
- })
657
- .setActions((actions) => {
658
- actions.cancel('@general:actions.cancel.title').submit('@general:actions.save.title');
659
- });
660
- })
661
- .show();
662
- const action = dialogRef.action();
663
- if (action === 'cancel') {
664
- dialogRef.close();
665
- return;
666
- }
667
- const formData = dialogRef.context();
668
- try {
669
- if (isEdit && item?.name) {
670
- // Update existing item
671
- if (item.isCustom) {
672
- await this.menuManagementService.updateCustomMenuItem(this.currentScope(), item.name, formData);
673
- }
674
- else {
675
- await this.menuManagementService.updateMenuProperties(this.currentScope(), item.name, formData);
676
- }
677
- }
678
- else {
679
- // Add new custom item
680
- const newItem = {
681
- name: formData.name,
682
- text: formData.text,
683
- icon: formData.icon,
684
- path: formData.path,
685
- priority: formData.priority,
686
- description: formData.description,
687
- };
688
- // If parent is specified, add as child
689
- if (parent?.name) {
690
- // This would require adding logic to insert as child
691
- // For now, add as root level item
692
- }
693
- await this.menuManagementService.addCustomMenuItem(this.currentScope(), newItem);
694
- }
695
- this.toastService.success('@application-management:menu-management.messages.save-success');
696
- await this.loadMenuItems();
697
- dialogRef.close();
698
- }
699
- catch (error) {
700
- this.toastService.danger('@application-management:menu-management.messages.save-error');
701
- }
702
- }
703
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMMenuListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
704
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXMMenuListComponent, isStandalone: true, selector: "axm-menu-list", host: { classAttribute: "axm-menu-list-page" }, providers: [
705
- {
706
- provide: AXPPageLayoutBase,
707
- useExisting: AXMMenuListComponent,
708
- },
709
- ], usesInheritance: true, ngImport: i0, template: "<axp-page-layout>\n <axp-page-content>\n @if (isLoading()) {\n <!-- Loading State -->\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-light fa-spinner-third fa-spin\"\n [title]=\"('@application-management:menu-management.loading.title' | translate | async) || 'Loading...'\"\n [description]=\"\n ('@application-management:menu-management.loading.description' | translate | async) || 'Please wait'\n \"\n />\n } @else if (error()) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-circle-exclamation\"\n [title]=\"('@application-management:menu-management.error.title' | translate | async) || 'Error'\"\n [description]=\"error() || 'An error occurred'\"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@general:actions.retry.title' | translate | async\"\n [look]=\"'outline'\"\n [color]=\"'primary'\"\n (onClick)=\"loadMenuItems()\"\n >\n <i class=\"fa-light fa-rotate-left\"></i>\n </ax-button>\n </axp-state-message>\n } @else if (menuItems().length === 0) {\n <!-- Empty State -->\n <axp-state-message\n mode=\"empty\"\n icon=\"fa-light fa-bars\"\n [title]=\"('@application-management:menu-management.empty-state.title' | translate | async) || 'No menu items'\"\n [description]=\"\n ('@application-management:menu-management.empty-state.description' | translate | async) ||\n 'Add a new menu item to get started'\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@application-management:menu-management.actions.add-root' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n (onClick)=\"addRootMenuItem()\"\n >\n <i class=\"fa-light fa-plus\"></i>\n </ax-button>\n </axp-state-message>\n } @else {\n <!-- Menu Tree Content -->\n <div class=\"axm-menu-list__container\">\n <!-- Info Banner -->\n <div class=\"axm-menu-list__info-banner\">\n <i class=\"fa-light fa-info-circle\"></i>\n <span>{{ '@application-management:menu-management.info-banner' | translate | async }}</span>\n </div>\n\n <!-- Menu Tree -->\n <div\n class=\"axm-menu-list__tree\"\n cdkDropList\n [cdkDropListData]=\"menuItems()\"\n (cdkDropListDropped)=\"onItemDropped($event)\"\n >\n @for (item of menuItems(); track item.name || item.path || $index) {\n <axm-menu-tree-item\n [item]=\"item\"\n [level]=\"0\"\n [canDelete]=\"true\"\n (actionTriggered)=\"onActionTriggered($event)\"\n (itemDropped)=\"onItemDropped($event)\"\n />\n }\n </div>\n </div>\n }\n </axp-page-content>\n</axp-page-layout>\n", styles: [".axm-menu-list-page .axm-menu-list__container{display:flex;flex-direction:column;gap:1rem;padding:1.5rem}.axm-menu-list-page .axm-menu-list__info-banner{display:flex;align-items:center;gap:.75rem;border-radius:.375rem;padding:1rem;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-500),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-list__info-banner i{font-size:1.125rem;line-height:1.75rem}.axm-menu-list-page .axm-menu-list__info-banner span{font-size:.875rem;line-height:1.25rem}.axm-menu-list-page .axm-menu-list__tree{display:flex;flex-direction:column;gap:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXTranslationModule }, { kind: "component", type: 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: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "component", type: AXMMenuTreeItemComponent, selector: "axm-menu-tree-item", inputs: ["item", "level", "canDelete"], outputs: ["actionTriggered", "itemDropped"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
710
- }
711
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMMenuListComponent, decorators: [{
712
- type: Component,
713
- args: [{ selector: 'axm-menu-list', standalone: true, imports: [
714
- CommonModule,
715
- CdkDropList,
716
- AXButtonModule,
717
- AXTranslationModule,
718
- AXPPageLayoutComponent,
719
- AXPThemeLayoutBlockComponent,
720
- AXPStateMessageComponent,
721
- AXMMenuTreeItemComponent,
722
- ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
723
- {
724
- provide: AXPPageLayoutBase,
725
- useExisting: AXMMenuListComponent,
726
- },
727
- ], host: { class: 'axm-menu-list-page' }, template: "<axp-page-layout>\n <axp-page-content>\n @if (isLoading()) {\n <!-- Loading State -->\n <axp-state-message\n mode=\"loading\"\n icon=\"fa-light fa-spinner-third fa-spin\"\n [title]=\"('@application-management:menu-management.loading.title' | translate | async) || 'Loading...'\"\n [description]=\"\n ('@application-management:menu-management.loading.description' | translate | async) || 'Please wait'\n \"\n />\n } @else if (error()) {\n <!-- Error State -->\n <axp-state-message\n mode=\"error\"\n icon=\"fa-light fa-circle-exclamation\"\n [title]=\"('@application-management:menu-management.error.title' | translate | async) || 'Error'\"\n [description]=\"error() || 'An error occurred'\"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@general:actions.retry.title' | translate | async\"\n [look]=\"'outline'\"\n [color]=\"'primary'\"\n (onClick)=\"loadMenuItems()\"\n >\n <i class=\"fa-light fa-rotate-left\"></i>\n </ax-button>\n </axp-state-message>\n } @else if (menuItems().length === 0) {\n <!-- Empty State -->\n <axp-state-message\n mode=\"empty\"\n icon=\"fa-light fa-bars\"\n [title]=\"('@application-management:menu-management.empty-state.title' | translate | async) || 'No menu items'\"\n [description]=\"\n ('@application-management:menu-management.empty-state.description' | translate | async) ||\n 'Add a new menu item to get started'\n \"\n >\n <ax-button\n slot=\"actions\"\n [text]=\"'@application-management:menu-management.actions.add-root' | translate | async\"\n [look]=\"'solid'\"\n [color]=\"'primary'\"\n (onClick)=\"addRootMenuItem()\"\n >\n <i class=\"fa-light fa-plus\"></i>\n </ax-button>\n </axp-state-message>\n } @else {\n <!-- Menu Tree Content -->\n <div class=\"axm-menu-list__container\">\n <!-- Info Banner -->\n <div class=\"axm-menu-list__info-banner\">\n <i class=\"fa-light fa-info-circle\"></i>\n <span>{{ '@application-management:menu-management.info-banner' | translate | async }}</span>\n </div>\n\n <!-- Menu Tree -->\n <div\n class=\"axm-menu-list__tree\"\n cdkDropList\n [cdkDropListData]=\"menuItems()\"\n (cdkDropListDropped)=\"onItemDropped($event)\"\n >\n @for (item of menuItems(); track item.name || item.path || $index) {\n <axm-menu-tree-item\n [item]=\"item\"\n [level]=\"0\"\n [canDelete]=\"true\"\n (actionTriggered)=\"onActionTriggered($event)\"\n (itemDropped)=\"onItemDropped($event)\"\n />\n }\n </div>\n </div>\n }\n </axp-page-content>\n</axp-page-layout>\n", styles: [".axm-menu-list-page .axm-menu-list__container{display:flex;flex-direction:column;gap:1rem;padding:1.5rem}.axm-menu-list-page .axm-menu-list__info-banner{display:flex;align-items:center;gap:.75rem;border-radius:.375rem;padding:1rem;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-500),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-list__info-banner i{font-size:1.125rem;line-height:1.75rem}.axm-menu-list-page .axm-menu-list__info-banner span{font-size:.875rem;line-height:1.25rem}.axm-menu-list-page .axm-menu-list__tree{display:flex;flex-direction:column;gap:.5rem}\n"] }]
728
- }] });
729
-
730
- export { AXMMenuListComponent };
731
- //# sourceMappingURL=acorex-modules-application-management-menu-list.component-LIRwdWs6.mjs.map