@acorex/components 6.0.2 → 6.0.5
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/README.md +24 -24
- package/alert/src/alert.component.d.ts +2 -3
- package/badge/src/badge.component.d.ts +1 -2
- package/breadcrumbs/src/breadcrumbs-item.component.d.ts +4 -6
- package/button/src/button-group.component.d.ts +4 -6
- package/button/src/button-item.component.d.ts +4 -6
- package/calendar/src/calendar.component.d.ts +1 -0
- package/color-picker/src/color-picker.component.d.ts +14 -21
- package/common/src/styles.class.d.ts +2 -2
- package/context-menu/index.d.ts +5 -0
- package/context-menu/public-api.d.ts +2 -0
- package/context-menu/src/context-menu.component.d.ts +34 -0
- package/context-menu/src/context-menu.module.d.ts +13 -0
- package/date-picker/src/datepicker.component.d.ts +11 -14
- package/decorators/public-api.d.ts +0 -1
- package/decorators/src/decorators.module.d.ts +5 -6
- package/decorators/src/header.component.d.ts +1 -1
- package/esm2020/alert/src/alert.component.mjs +5 -4
- package/esm2020/button/src/button.component.mjs +1 -1
- package/esm2020/calendar/src/calendar.component.mjs +33 -5
- package/esm2020/checkbox/src/checkbox.component.mjs +3 -3
- package/esm2020/common/src/styles.class.mjs +13 -2
- package/esm2020/context-menu/acorex-components-context-menu.mjs +5 -0
- package/esm2020/context-menu/public-api.mjs +3 -0
- package/esm2020/context-menu/src/context-menu.component.mjs +257 -0
- package/esm2020/context-menu/src/context-menu.module.mjs +36 -0
- package/esm2020/decorators/public-api.mjs +1 -2
- package/esm2020/decorators/src/decorators.module.mjs +1 -5
- package/esm2020/decorators/src/header.component.mjs +3 -3
- package/esm2020/form/public-api.mjs +2 -2
- package/esm2020/form/src/form.component.mjs +69 -8
- package/esm2020/form/src/form.module.mjs +68 -0
- package/esm2020/menu/src/menu.component.mjs +261 -117
- package/esm2020/menu/src/menu.module.mjs +16 -8
- package/esm2020/mixin/src/base-components.class.mjs +1 -3
- package/esm2020/mixin/src/base-menu-mixin.class.mjs +11 -11
- package/esm2020/mixin/src/mixin.class.mjs +14 -14
- package/esm2020/mixin/src/selection-component.class.mjs +2 -4
- package/esm2020/mixin/src/textbox-mixin.class.mjs +1 -1
- package/esm2020/mixin/src/value-mixin.class.mjs +6 -6
- package/esm2020/number-box/src/number-box.component.mjs +14 -4
- package/esm2020/public-api.mjs +1 -1
- package/esm2020/radio/src/radio.component.mjs +3 -3
- package/esm2020/result/src/result.component.mjs +3 -3
- package/esm2020/search-box/src/search-box.component.mjs +3 -3
- package/esm2020/selection-list/src/selection-list.component.mjs +3 -3
- package/esm2020/tabs/src/tabs.class.mjs +1 -1
- package/esm2020/tabs/src/tabs.component.mjs +35 -16
- package/esm2020/toast/src/toast.component.mjs +4 -4
- package/esm2020/toast/src/toast.service.mjs +10 -1
- package/fesm2015/acorex-components-alert.mjs +4 -3
- package/fesm2015/acorex-components-alert.mjs.map +1 -1
- package/fesm2015/acorex-components-button.mjs.map +1 -1
- package/fesm2015/acorex-components-calendar.mjs +30 -2
- package/fesm2015/acorex-components-calendar.mjs.map +1 -1
- package/fesm2015/acorex-components-checkbox.mjs +2 -2
- package/fesm2015/acorex-components-checkbox.mjs.map +1 -1
- package/fesm2015/acorex-components-common.mjs +13 -2
- package/fesm2015/acorex-components-common.mjs.map +1 -1
- package/fesm2015/acorex-components-context-menu.mjs +297 -0
- package/fesm2015/acorex-components-context-menu.mjs.map +1 -0
- package/fesm2015/acorex-components-decorators.mjs +4 -25
- package/fesm2015/acorex-components-decorators.mjs.map +1 -1
- package/fesm2015/acorex-components-form.mjs +76 -14
- package/fesm2015/acorex-components-form.mjs.map +1 -1
- package/fesm2015/acorex-components-menu.mjs +276 -124
- package/fesm2015/acorex-components-menu.mjs.map +1 -1
- package/fesm2015/acorex-components-mixin.mjs +17 -21
- package/fesm2015/acorex-components-mixin.mjs.map +1 -1
- package/fesm2015/acorex-components-number-box.mjs +13 -3
- package/fesm2015/acorex-components-number-box.mjs.map +1 -1
- package/fesm2015/acorex-components-radio.mjs +2 -2
- package/fesm2015/acorex-components-radio.mjs.map +1 -1
- package/fesm2015/acorex-components-result.mjs +2 -2
- package/fesm2015/acorex-components-result.mjs.map +1 -1
- package/fesm2015/acorex-components-search-box.mjs +2 -2
- package/fesm2015/acorex-components-search-box.mjs.map +1 -1
- package/fesm2015/acorex-components-selection-list.mjs +2 -2
- package/fesm2015/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2015/acorex-components-tabs.mjs +35 -16
- package/fesm2015/acorex-components-tabs.mjs.map +1 -1
- package/fesm2015/acorex-components-toast.mjs +12 -3
- package/fesm2015/acorex-components-toast.mjs.map +1 -1
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components-alert.mjs +4 -3
- package/fesm2020/acorex-components-alert.mjs.map +1 -1
- package/fesm2020/acorex-components-button.mjs.map +1 -1
- package/fesm2020/acorex-components-calendar.mjs +30 -2
- package/fesm2020/acorex-components-calendar.mjs.map +1 -1
- package/fesm2020/acorex-components-checkbox.mjs +2 -2
- package/fesm2020/acorex-components-checkbox.mjs.map +1 -1
- package/fesm2020/acorex-components-common.mjs +13 -2
- package/fesm2020/acorex-components-common.mjs.map +1 -1
- package/fesm2020/acorex-components-context-menu.mjs +297 -0
- package/fesm2020/acorex-components-context-menu.mjs.map +1 -0
- package/fesm2020/acorex-components-decorators.mjs +4 -25
- package/fesm2020/acorex-components-decorators.mjs.map +1 -1
- package/fesm2020/acorex-components-form.mjs +75 -14
- package/fesm2020/acorex-components-form.mjs.map +1 -1
- package/fesm2020/acorex-components-menu.mjs +273 -120
- package/fesm2020/acorex-components-menu.mjs.map +1 -1
- package/fesm2020/acorex-components-mixin.mjs +17 -20
- package/fesm2020/acorex-components-mixin.mjs.map +1 -1
- package/fesm2020/acorex-components-number-box.mjs +13 -3
- package/fesm2020/acorex-components-number-box.mjs.map +1 -1
- package/fesm2020/acorex-components-radio.mjs +2 -2
- package/fesm2020/acorex-components-radio.mjs.map +1 -1
- package/fesm2020/acorex-components-result.mjs +2 -2
- package/fesm2020/acorex-components-result.mjs.map +1 -1
- package/fesm2020/acorex-components-search-box.mjs +2 -2
- package/fesm2020/acorex-components-search-box.mjs.map +1 -1
- package/fesm2020/acorex-components-selection-list.mjs +2 -2
- package/fesm2020/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2020/acorex-components-tabs.mjs +34 -15
- package/fesm2020/acorex-components-tabs.mjs.map +1 -1
- package/fesm2020/acorex-components-toast.mjs +12 -3
- package/fesm2020/acorex-components-toast.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs.map +1 -1
- package/form/public-api.d.ts +1 -1
- package/form/src/form.component.d.ts +18 -2
- package/form/src/{form-field.module.d.ts → form.module.d.ts} +0 -0
- package/menu/src/menu.component.d.ts +21 -36
- package/menu/src/menu.module.d.ts +2 -2
- package/mixin/src/base-components.class.d.ts +1 -3
- package/mixin/src/base-menu-mixin.class.d.ts +8 -9
- package/mixin/src/button-mixin.class.d.ts +1 -2
- package/mixin/src/clickable-mixin.class.d.ts +1 -2
- package/mixin/src/color-look-mixing.class.d.ts +1 -2
- package/mixin/src/datalist-component.class.d.ts +9 -10
- package/mixin/src/dropdown-mixin.class.d.ts +1 -2
- package/mixin/src/interactive-mixin.class.d.ts +6 -5
- package/mixin/src/loading-mixin.class.d.ts +1 -2
- package/mixin/src/mixin.class.d.ts +47 -100
- package/mixin/src/page-component.class.d.ts +1 -2
- package/mixin/src/selection-component.class.d.ts +1 -2
- package/mixin/src/sizable-mixin.class.d.ts +1 -2
- package/mixin/src/textbox-mixin.class.d.ts +7 -8
- package/mixin/src/value-mixin.class.d.ts +7 -8
- package/package.json +9 -1
- package/tabs/src/tab-item.component.d.ts +1 -2
- package/tabs/src/tabs.class.d.ts +1 -0
- package/tabs/src/tabs.component.d.ts +9 -4
- package/toast/src/toast.service.d.ts +1 -0
- package/decorators/src/addon.component.d.ts +0 -8
- package/esm2020/decorators/src/addon.component.mjs +0 -21
- package/esm2020/form/src/form-field.module.mjs +0 -68
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation,
|
|
3
|
-
import { AXPopoverComponent, AXPopoverModule } from '@acorex/components/popover';
|
|
4
|
-
import { AXSearchBoxComponent } from '@acorex/components/search-box';
|
|
3
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChild, NgModule } from '@angular/core';
|
|
5
4
|
import { AXBaseMenuMixin } from '@acorex/components/mixin';
|
|
6
|
-
import * as i1 from '@angular/
|
|
5
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
6
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
7
|
+
import * as i2 from '@acorex/core/platform';
|
|
8
|
+
import * as i3 from '@angular/common';
|
|
7
9
|
import { CommonModule } from '@angular/common';
|
|
8
|
-
import * as
|
|
10
|
+
import * as i4 from '@acorex/components/decorators';
|
|
9
11
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
10
|
-
import * as
|
|
12
|
+
import * as i5 from '@acorex/components/loading';
|
|
11
13
|
import { AXLoadingModule } from '@acorex/components/loading';
|
|
12
|
-
import * as
|
|
14
|
+
import * as i6 from '@acorex/core/translation';
|
|
13
15
|
import { AXTranslationModule } from '@acorex/core/translation';
|
|
14
16
|
|
|
15
17
|
/**
|
|
@@ -18,23 +20,13 @@ import { AXTranslationModule } from '@acorex/core/translation';
|
|
|
18
20
|
* @category Components
|
|
19
21
|
*/
|
|
20
22
|
class AXMenuComponent extends AXBaseMenuMixin {
|
|
21
|
-
constructor(
|
|
22
|
-
super(
|
|
23
|
-
this.
|
|
23
|
+
constructor(_elementRef, cdr, _overlay, _platform) {
|
|
24
|
+
super(_elementRef, cdr);
|
|
25
|
+
this._elementRef = _elementRef;
|
|
24
26
|
this.cdr = cdr;
|
|
25
|
-
this.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const target = document.querySelector('UL');
|
|
29
|
-
if (e.target != target) {
|
|
30
|
-
this.displayItems.forEach((element) => {
|
|
31
|
-
element.isActive = false;
|
|
32
|
-
element.isOpen = false;
|
|
33
|
-
});
|
|
34
|
-
cdr.detectChanges();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
});
|
|
27
|
+
this._overlay = _overlay;
|
|
28
|
+
this._platform = _platform;
|
|
29
|
+
this._levelCount = 0;
|
|
38
30
|
}
|
|
39
31
|
get emptyTemplate() {
|
|
40
32
|
return this._contentEmptyTemplate;
|
|
@@ -44,134 +36,290 @@ class AXMenuComponent extends AXBaseMenuMixin {
|
|
|
44
36
|
}
|
|
45
37
|
onInit() {
|
|
46
38
|
super.onInit();
|
|
47
|
-
if (this.hasChildField) {
|
|
48
|
-
this._fetchData();
|
|
49
|
-
}
|
|
50
39
|
}
|
|
51
40
|
ngAfterViewInit() {
|
|
52
41
|
super.onViewInit();
|
|
53
42
|
}
|
|
54
|
-
|
|
43
|
+
_onMenuMouseEnter(e, item) {
|
|
55
44
|
if (this.isLoading) {
|
|
56
45
|
return;
|
|
57
46
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
this.openMode === 'click' &&
|
|
61
|
-
checkSpacing.closest('a')) {
|
|
62
|
-
if (this.openMode === 'click' && this.direction === 'horizontal') {
|
|
63
|
-
this.displayItems.forEach((element) => {
|
|
64
|
-
if (element[this.valueField] != item[this.valueField] &&
|
|
65
|
-
!item.parentId) {
|
|
66
|
-
element.isOpen = false;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
this._notActive(this.displayItems);
|
|
71
|
-
if (item.children?.length > 0 || item[this.hasChildField]) {
|
|
72
|
-
if (item.children?.length > 0) {
|
|
73
|
-
if (this.openMode === 'click' && this.direction === 'horizontal') {
|
|
74
|
-
this._setParentNode(item.children, item[this.valueField]);
|
|
75
|
-
}
|
|
76
|
-
this._closeChild(item.children);
|
|
77
|
-
}
|
|
78
|
-
item.isOpen = !item.isOpen;
|
|
79
|
-
}
|
|
80
|
-
item.isActive = !item.isActive;
|
|
81
|
-
this.onMenuItemClick.emit({
|
|
82
|
-
component: this,
|
|
83
|
-
item: item,
|
|
84
|
-
nativeEvent: e,
|
|
85
|
-
});
|
|
86
|
-
if (item.isOpen && item[this.hasChildField] && !item.children) {
|
|
87
|
-
item.isLoading = true;
|
|
88
|
-
this._fetchData(item[this.valueField]).then(() => {
|
|
89
|
-
item.isLoading = false;
|
|
90
|
-
});
|
|
91
|
-
}
|
|
47
|
+
if (this.openMode === 'hover') {
|
|
48
|
+
this._handelMenuLogic(e, item);
|
|
92
49
|
}
|
|
93
50
|
e.stopPropagation();
|
|
94
51
|
e.preventDefault();
|
|
95
52
|
}
|
|
96
|
-
|
|
53
|
+
_onMenuClick(e, item) {
|
|
97
54
|
if (this.isLoading) {
|
|
98
55
|
return;
|
|
99
56
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
if (item.children?.length > 0) {
|
|
103
|
-
this._closeChild(item.children);
|
|
104
|
-
}
|
|
105
|
-
item.isOpen = true;
|
|
106
|
-
}
|
|
107
|
-
this.onMenuItemClick.emit({
|
|
108
|
-
component: this,
|
|
109
|
-
item: item,
|
|
110
|
-
nativeEvent: e,
|
|
111
|
-
});
|
|
112
|
-
if (item.isOpen && item[this.hasChildField] && !item.children) {
|
|
113
|
-
item.isLoading = true;
|
|
114
|
-
this._fetchData(item[this.valueField]).then(() => {
|
|
115
|
-
item.isLoading = false;
|
|
116
|
-
});
|
|
117
|
-
}
|
|
57
|
+
if (this.openMode === 'click') {
|
|
58
|
+
this._handelMenuLogic(e, item);
|
|
118
59
|
}
|
|
60
|
+
this.onMenuItemClick.emit({
|
|
61
|
+
component: this,
|
|
62
|
+
item: item,
|
|
63
|
+
nativeEvent: e,
|
|
64
|
+
});
|
|
119
65
|
e.stopPropagation();
|
|
120
66
|
e.preventDefault();
|
|
121
67
|
}
|
|
122
|
-
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
68
|
+
_getDirection() {
|
|
69
|
+
if (this.orientation === 'horizontal' && this._levelCount === 0) {
|
|
70
|
+
return 'ax-horizontal';
|
|
71
|
+
}
|
|
72
|
+
else if (this._levelCount > 0) {
|
|
73
|
+
return 'ax-vertical ax-submenu-ul';
|
|
74
|
+
}
|
|
75
|
+
else if (this.orientation === 'sidemenu') {
|
|
76
|
+
return 'ax-side-menu';
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
return 'ax-vertical';
|
|
130
80
|
}
|
|
131
81
|
}
|
|
132
|
-
|
|
82
|
+
_removeActive(items) {
|
|
133
83
|
items.forEach((element) => {
|
|
134
84
|
element.isActive = false;
|
|
135
|
-
if (element
|
|
136
|
-
this.
|
|
85
|
+
if (element?.children?.length > 0) {
|
|
86
|
+
this._removeActive(element.children);
|
|
137
87
|
}
|
|
138
88
|
});
|
|
139
89
|
}
|
|
140
|
-
|
|
90
|
+
_closeOpenChild(items) {
|
|
141
91
|
items.forEach((element) => {
|
|
142
92
|
element.isOpen = false;
|
|
143
|
-
if (element
|
|
144
|
-
this.
|
|
93
|
+
if (element?.children?.length > 0) {
|
|
94
|
+
this._closeOpenChild(element.children);
|
|
145
95
|
}
|
|
146
96
|
});
|
|
147
97
|
}
|
|
148
|
-
|
|
149
|
-
|
|
98
|
+
_initParent(items, parentId) {
|
|
99
|
+
items.forEach((element) => {
|
|
150
100
|
element.parentId = parentId;
|
|
151
101
|
});
|
|
152
102
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
103
|
+
_handelMenuLogic(e, item) {
|
|
104
|
+
if (!item[this.disableField] || item[this.dividerField] === false) {
|
|
105
|
+
const targetElement = e.target;
|
|
106
|
+
if ((targetElement.closest('li') && this.openMode === 'click') ||
|
|
107
|
+
(targetElement.closest('li') && this.openMode === 'hover')) {
|
|
108
|
+
if (this._overlayRef && this._oldItem !== item) {
|
|
109
|
+
this._overlayRef.detach();
|
|
110
|
+
}
|
|
111
|
+
if (this.orientation === 'horizontal') {
|
|
112
|
+
this.displayItems.forEach((element) => {
|
|
113
|
+
if (!item.parentId &&
|
|
114
|
+
item[this.valueField] !== element[this.valueField]) {
|
|
115
|
+
element.isOpen = false;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
if (item?.children?.length > 0) {
|
|
120
|
+
if (this.orientation === 'horizontal') {
|
|
121
|
+
this._initParent(item.children, item[this.valueField]);
|
|
122
|
+
}
|
|
123
|
+
if (this.orientation === 'horizontal' ||
|
|
124
|
+
this.orientation === 'vertical') {
|
|
125
|
+
if (this._oldItem !== item) {
|
|
126
|
+
this._openAsOverlay(targetElement.closest('li'), item.children);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
this._closeOpenChild(item.children);
|
|
130
|
+
if (this.orientation === 'horizontal' ||
|
|
131
|
+
this.orientation === 'vertical') {
|
|
132
|
+
item.isOpen = true;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
item.isOpen = !item.isOpen;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
this._removeActive(this.displayItems);
|
|
139
|
+
item.isActive = !item.isActive;
|
|
140
|
+
if (this.orientation === 'horizontal' ||
|
|
141
|
+
this.orientation === 'vertical') {
|
|
142
|
+
if (this._oldItem &&
|
|
143
|
+
this._oldItem?.isOpen &&
|
|
144
|
+
item[this.valueField] !== this._oldItem[this.valueField]) {
|
|
145
|
+
this._oldItem.isOpen = false;
|
|
146
|
+
}
|
|
147
|
+
this._oldItem = item;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
157
151
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
152
|
+
_openAsOverlay(targetRef, overlayItems) {
|
|
153
|
+
let positions = [];
|
|
154
|
+
if (this.orientation === 'vertical') {
|
|
155
|
+
if (this._levelCount >= 1) {
|
|
156
|
+
positions = [
|
|
157
|
+
{
|
|
158
|
+
originX: 'end',
|
|
159
|
+
originY: 'center',
|
|
160
|
+
overlayX: 'start',
|
|
161
|
+
overlayY: 'top',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
originX: 'end',
|
|
165
|
+
originY: 'center',
|
|
166
|
+
overlayX: 'start',
|
|
167
|
+
overlayY: 'bottom',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
originX: 'center',
|
|
171
|
+
originY: 'center',
|
|
172
|
+
overlayX: 'center',
|
|
173
|
+
overlayY: 'center',
|
|
174
|
+
},
|
|
175
|
+
];
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
positions = [
|
|
179
|
+
{
|
|
180
|
+
originX: 'end',
|
|
181
|
+
originY: 'center',
|
|
182
|
+
overlayX: 'start',
|
|
183
|
+
overlayY: 'top',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
originX: 'end',
|
|
187
|
+
originY: 'top',
|
|
188
|
+
overlayX: 'start',
|
|
189
|
+
overlayY: 'bottom',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
originX: 'center',
|
|
193
|
+
originY: 'center',
|
|
194
|
+
overlayX: 'center',
|
|
195
|
+
overlayY: 'center',
|
|
196
|
+
},
|
|
197
|
+
];
|
|
198
|
+
}
|
|
161
199
|
}
|
|
162
200
|
else {
|
|
163
|
-
|
|
201
|
+
if (this._levelCount >= 1) {
|
|
202
|
+
positions = [
|
|
203
|
+
{
|
|
204
|
+
originX: 'end',
|
|
205
|
+
originY: 'center',
|
|
206
|
+
overlayX: 'start',
|
|
207
|
+
overlayY: 'top',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
originX: 'end',
|
|
211
|
+
originY: 'center',
|
|
212
|
+
overlayX: 'start',
|
|
213
|
+
overlayY: 'bottom',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
originX: 'end',
|
|
217
|
+
originY: 'top',
|
|
218
|
+
overlayX: 'center',
|
|
219
|
+
overlayY: 'top',
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
originX: 'center',
|
|
223
|
+
originY: 'top',
|
|
224
|
+
overlayX: 'center',
|
|
225
|
+
overlayY: 'top',
|
|
226
|
+
},
|
|
227
|
+
];
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
positions = [
|
|
231
|
+
{
|
|
232
|
+
originX: 'start',
|
|
233
|
+
originY: 'bottom',
|
|
234
|
+
overlayX: 'start',
|
|
235
|
+
overlayY: 'top',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
originX: 'end',
|
|
239
|
+
originY: 'center',
|
|
240
|
+
overlayX: 'start',
|
|
241
|
+
overlayY: 'bottom',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
originX: 'end',
|
|
245
|
+
originY: 'top',
|
|
246
|
+
overlayX: 'center',
|
|
247
|
+
overlayY: 'top',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
originX: 'center',
|
|
251
|
+
originY: 'top',
|
|
252
|
+
overlayX: 'center',
|
|
253
|
+
overlayY: 'top',
|
|
254
|
+
},
|
|
255
|
+
];
|
|
256
|
+
}
|
|
164
257
|
}
|
|
258
|
+
this._overlayRef = this._overlay.create({
|
|
259
|
+
scrollStrategy: this._overlay.scrollStrategies.close(),
|
|
260
|
+
positionStrategy: this._overlay
|
|
261
|
+
.position()
|
|
262
|
+
.flexibleConnectedTo(targetRef)
|
|
263
|
+
.withPositions([...positions])
|
|
264
|
+
.withPush(false),
|
|
265
|
+
disposeOnNavigation: true,
|
|
266
|
+
panelClass: ['ax-animate-fadeIn', 'ax-animate-faster', 'ax-overlay-menu'],
|
|
267
|
+
maxHeight: 'unset',
|
|
268
|
+
hasBackdrop: false,
|
|
269
|
+
backdropClass: ['cdk-overlay-transparent-backdrop'],
|
|
270
|
+
});
|
|
271
|
+
const ref = this._overlayRef.attach(new ComponentPortal(AXMenuComponent));
|
|
272
|
+
ref.instance.items = overlayItems;
|
|
273
|
+
ref.instance.orientation = this.orientation;
|
|
274
|
+
ref.instance.openMode = 'hover';
|
|
275
|
+
ref.instance._levelCount = this._levelCount + 1;
|
|
276
|
+
ref.instance.disableField = this.disableField;
|
|
277
|
+
ref.instance.visibleField = this.visibleField;
|
|
278
|
+
ref.instance.iconField = this.iconField;
|
|
279
|
+
ref.instance.dividerField = this.dividerField;
|
|
280
|
+
ref.onDestroy(() => {
|
|
281
|
+
ref.instance?._overlayRef?.dispose();
|
|
282
|
+
});
|
|
283
|
+
this._overlayRef.outsidePointerEvents().subscribe((e) => {
|
|
284
|
+
if (this._overlayRef && this.openMode === 'click') {
|
|
285
|
+
this._close();
|
|
286
|
+
e.stopPropagation();
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
this._platform.scroll.subscribe(() => {
|
|
290
|
+
if (this._overlayRef) {
|
|
291
|
+
this._close();
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
this._platform.resize.subscribe(() => {
|
|
295
|
+
if (this._overlayRef) {
|
|
296
|
+
this._close();
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
_close() {
|
|
301
|
+
this._overlayRef.detach();
|
|
302
|
+
this._oldItem = null;
|
|
303
|
+
this.displayItems.forEach((element) => {
|
|
304
|
+
element.isOpen = false;
|
|
305
|
+
element.isActive = false;
|
|
306
|
+
});
|
|
307
|
+
this.cdr.detectChanges();
|
|
308
|
+
}
|
|
309
|
+
onDestroy() {
|
|
310
|
+
this._overlayRef?.detach();
|
|
165
311
|
}
|
|
166
312
|
}
|
|
167
|
-
AXMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
168
|
-
AXMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXMenuComponent, selector: "ax-menu", inputs: { disabled: "disabled", tabIndex: "tabIndex", textField: "textField", valueField: "valueField", items: "items",
|
|
313
|
+
AXMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Overlay }, { token: i2.AXPlatform }], target: i0.ɵɵFactoryTarget.Component });
|
|
314
|
+
AXMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXMenuComponent, selector: "ax-menu", inputs: { disabled: "disabled", tabIndex: "tabIndex", textField: "textField", valueField: "valueField", items: "items", parentId: "parentId", iconField: "iconField", tooltip: "tooltip", isOpen: "isOpen", isActive: "isActive", visibleField: "visibleField", disableField: "disableField", hasChildField: "hasChildField", dividerField: "dividerField", openMode: "openMode", orientation: "orientation", showModal: "showModal" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", onMenuItemClick: "onMenuItemClick" }, host: { classAttribute: "ax-menu" }, queries: [{ propertyName: "_contentEmptyTemplate", first: true, predicate: ["emptyTemplate"], descendants: true }, { propertyName: "_contentItemTemplate", first: true, predicate: ["itemTemplate"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul [ngClass]=\"_getDirection()\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: displayItems }\"></ng-container>\r\n </ul>\r\n <ng-template #recursiveListTmpl let-list=\"list\">\r\n <ng-container *ngFor=\"let item of list\">\r\n <li *ngIf=\"item[visibleField] !=false\" [class.ax-state-disabled]=\"item[disableField]\"\r\n (click)=\"_onMenuClick($event,item)\" (mouseenter)=\"_onMenuMouseEnter($event,item)\"\r\n [ngClass]=\"{'ax-state-active ': item.isActive}\">\r\n <div class=\"ax-menu-item\" *ngIf=\"itemTemplate == null else tmpItem\">\r\n <div class=\"ax-menu-item-prefix\">\r\n <ax-icon *ngIf=\"item[iconField]\" [class]=\"item[iconField]\"></ax-icon>\r\n <span>{{_getItemDisplayTextTemplte(item)}}</span>\r\n </div>\r\n <div class=\"ax-menu-item-suffix\">\r\n <ax-icon *ngIf=\"!item.isLoading\"\r\n [ngClass]=\"{'ax-ic-chevron':item?.children?.length > 0,'ax-menu-active-icon': item.isOpen}\">\r\n </ax-icon>\r\n <ax-loading *ngIf=\"item.isLoading\">\r\n </ax-loading>\r\n </div>\r\n </div>\r\n <!--------------- check for custom item template --------------->\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: item }\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ul *ngIf=\"item?.children?.length > 0 && item.isOpen &&!_overlayRef\"\r\n [class.ax-state-disabled]=\"item[disableField]\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: item.children }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n <li class=\"ax-divider\" *ngIf=\"item[this.dividerField]\"></li>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n<ng-container *ngIf=\"isLoading\">\r\n <ng-template>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <!--------------- check for custom template --------------->\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n <div class=\"ax-list-item\">\r\n {{ 'common.no-result-found' | trans }}\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n</ng-template>", dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i5.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "text"], outputs: ["visibleChange"] }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "trans" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
169
315
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXMenuComponent, decorators: [{
|
|
170
316
|
type: Component,
|
|
171
|
-
args: [{ selector: 'ax-menu', inputs: [
|
|
317
|
+
args: [{ selector: 'ax-menu', inputs: [
|
|
318
|
+
'disabled',
|
|
319
|
+
'tabIndex',
|
|
320
|
+
'textField',
|
|
172
321
|
'valueField',
|
|
173
322
|
'items',
|
|
174
|
-
'id',
|
|
175
323
|
'parentId',
|
|
176
324
|
'iconField',
|
|
177
325
|
'tooltip',
|
|
@@ -180,34 +328,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImpor
|
|
|
180
328
|
'visibleField',
|
|
181
329
|
'disableField',
|
|
182
330
|
'hasChildField',
|
|
331
|
+
'dividerField',
|
|
183
332
|
'openMode',
|
|
184
|
-
'
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}], _contentEmptyTemplate: [{
|
|
333
|
+
'orientation',
|
|
334
|
+
'showModal',
|
|
335
|
+
], outputs: ['onBlur', 'onFocus', 'onMenuItemClick'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-menu' }, template: "<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul [ngClass]=\"_getDirection()\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: displayItems }\"></ng-container>\r\n </ul>\r\n <ng-template #recursiveListTmpl let-list=\"list\">\r\n <ng-container *ngFor=\"let item of list\">\r\n <li *ngIf=\"item[visibleField] !=false\" [class.ax-state-disabled]=\"item[disableField]\"\r\n (click)=\"_onMenuClick($event,item)\" (mouseenter)=\"_onMenuMouseEnter($event,item)\"\r\n [ngClass]=\"{'ax-state-active ': item.isActive}\">\r\n <div class=\"ax-menu-item\" *ngIf=\"itemTemplate == null else tmpItem\">\r\n <div class=\"ax-menu-item-prefix\">\r\n <ax-icon *ngIf=\"item[iconField]\" [class]=\"item[iconField]\"></ax-icon>\r\n <span>{{_getItemDisplayTextTemplte(item)}}</span>\r\n </div>\r\n <div class=\"ax-menu-item-suffix\">\r\n <ax-icon *ngIf=\"!item.isLoading\"\r\n [ngClass]=\"{'ax-ic-chevron':item?.children?.length > 0,'ax-menu-active-icon': item.isOpen}\">\r\n </ax-icon>\r\n <ax-loading *ngIf=\"item.isLoading\">\r\n </ax-loading>\r\n </div>\r\n </div>\r\n <!--------------- check for custom item template --------------->\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: item }\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ul *ngIf=\"item?.children?.length > 0 && item.isOpen &&!_overlayRef\"\r\n [class.ax-state-disabled]=\"item[disableField]\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: item.children }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n <li class=\"ax-divider\" *ngIf=\"item[this.dividerField]\"></li>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n<ng-container *ngIf=\"isLoading\">\r\n <ng-template>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <!--------------- check for custom template --------------->\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n <div class=\"ax-list-item\">\r\n {{ 'common.no-result-found' | trans }}\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n</ng-template>" }]
|
|
336
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.Overlay }, { type: i2.AXPlatform }]; }, propDecorators: { _contentEmptyTemplate: [{
|
|
189
337
|
type: ContentChild,
|
|
190
338
|
args: ['emptyTemplate']
|
|
191
339
|
}], _contentItemTemplate: [{
|
|
192
340
|
type: ContentChild,
|
|
193
341
|
args: ['itemTemplate']
|
|
194
|
-
}], _searchBox: [{
|
|
195
|
-
type: ContentChild,
|
|
196
|
-
args: [AXSearchBoxComponent, { static: true }]
|
|
197
342
|
}] } });
|
|
198
343
|
|
|
199
344
|
const COMPONENT = [AXMenuComponent];
|
|
200
|
-
const MODULES = [
|
|
345
|
+
const MODULES = [
|
|
346
|
+
AXDecoratorModule,
|
|
347
|
+
AXLoadingModule,
|
|
348
|
+
AXTranslationModule,
|
|
349
|
+
OverlayModule,
|
|
350
|
+
];
|
|
201
351
|
class AXMenuModule {
|
|
202
352
|
}
|
|
203
353
|
AXMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
204
|
-
AXMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: AXMenuModule, declarations: [AXMenuComponent], imports: [CommonModule, AXDecoratorModule,
|
|
205
|
-
|
|
354
|
+
AXMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: AXMenuModule, declarations: [AXMenuComponent], imports: [CommonModule, AXDecoratorModule,
|
|
355
|
+
AXLoadingModule,
|
|
356
|
+
AXTranslationModule,
|
|
357
|
+
OverlayModule], exports: [AXMenuComponent] });
|
|
358
|
+
AXMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXMenuModule, imports: [CommonModule, MODULES] });
|
|
206
359
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXMenuModule, decorators: [{
|
|
207
360
|
type: NgModule,
|
|
208
361
|
args: [{
|
|
209
362
|
declarations: [...COMPONENT],
|
|
210
|
-
imports: [...MODULES
|
|
363
|
+
imports: [CommonModule, ...MODULES],
|
|
211
364
|
exports: [...COMPONENT],
|
|
212
365
|
providers: [],
|
|
213
366
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-menu.mjs","sources":["../../../../projects/acorex/components/menu/src/menu.component.ts","../../../../projects/acorex/components/menu/src/menu.component.html","../../../../projects/acorex/components/menu/src/menu.module.ts","../../../../projects/acorex/components/menu/acorex-components-menu.ts"],"sourcesContent":["import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n TemplateRef,\r\n ContentChild,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport { AXValueChangedEvent } from '@acorex/components/common';\r\n\r\n\r\nimport { AXPopoverComponent } from '@acorex/components/popover';\r\nimport { AXSearchBoxComponent } from '@acorex/components/search-box';\r\nimport { AXBaseMenuMixin } from '@acorex/components/mixin';\r\n\r\nexport interface AXMenuItems {\r\n id?: string;\r\n name?: string;\r\n text?: string;\r\n tooltip?: string;\r\n parentId?: string;\r\n icon?: string;\r\n visibleField?: boolean;\r\n disableField?: boolean;\r\n selected?: boolean;\r\n data?: any;\r\n style?: string;\r\n children?: AXMenuItems[];\r\n isOpen?: boolean;\r\n isActive?: boolean;\r\n onClick?: (e?: any) => void;\r\n}\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-menu',\r\n templateUrl: './menu.component.html',\r\n inputs: ['disabled', 'tabIndex', 'textField',\r\n 'valueField',\r\n 'items',\r\n 'id',\r\n 'parentId',\r\n 'iconField',\r\n 'tooltip',\r\n 'isOpen',\r\n 'isActive',\r\n 'visibleField',\r\n 'disableField',\r\n 'hasChildField',\r\n 'openMode',\r\n 'direction',],\r\n outputs: ['onBlur', 'onFocus', 'onMenuItemClick'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-menu' },\r\n})\r\nexport class AXMenuComponent extends AXBaseMenuMixin {\r\n @ViewChild(AXPopoverComponent, { static: true })\r\n popover: AXPopoverComponent;\r\n\r\n @ContentChild('emptyTemplate')\r\n private _contentEmptyTemplate: TemplateRef<any>;\r\n\r\n @ContentChild('itemTemplate')\r\n private _contentItemTemplate: TemplateRef<any>;\r\n\r\n @ContentChild(AXSearchBoxComponent, { static: true })\r\n _searchBox: AXSearchBoxComponent;\r\n\r\n _forceFocus: boolean = false;\r\n _target: HTMLDivElement;\r\n\r\n get emptyTemplate(): TemplateRef<any> {\r\n return this._contentEmptyTemplate;\r\n }\r\n\r\n get itemTemplate(): TemplateRef<any> {\r\n return this._contentItemTemplate;\r\n }\r\n constructor(private elementRef: ElementRef, private cdr: ChangeDetectorRef) {\r\n super(elementRef, cdr);\r\n window.addEventListener('click', (e) => {\r\n if (this.displayItems.length > 0) {\r\n const target = document.querySelector('UL');\r\n if (e.target != target) {\r\n this.displayItems.forEach((element) => {\r\n element.isActive = false;\r\n element.isOpen = false;\r\n });\r\n cdr.detectChanges();\r\n }\r\n }\r\n });\r\n }\r\n\r\n onInit(): void {\r\n super.onInit();\r\n if (this.hasChildField) {\r\n this._fetchData();\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n super.onViewInit();\r\n }\r\n\r\n _onMenuClick(e: MouseEvent, item: any) {\r\n if (this.isLoading) {\r\n return;\r\n }\r\n const checkSpacing = e.target as HTMLDivElement;\r\n if (\r\n !item[this.disableField] &&\r\n this.openMode === 'click' &&\r\n checkSpacing.closest('a')\r\n ) {\r\n if (this.openMode === 'click' && this.direction === 'horizontal') {\r\n this.displayItems.forEach((element) => {\r\n if (\r\n element[this.valueField] != item[this.valueField] &&\r\n !item.parentId\r\n ) {\r\n element.isOpen = false;\r\n }\r\n });\r\n }\r\n this._notActive(this.displayItems);\r\n if (item.children?.length > 0 || item[this.hasChildField]) {\r\n if (item.children?.length > 0) {\r\n if (this.openMode === 'click' && this.direction === 'horizontal') {\r\n this._setParentNode(item.children, item[this.valueField]);\r\n }\r\n this._closeChild(item.children);\r\n }\r\n item.isOpen = !item.isOpen;\r\n }\r\n item.isActive = !item.isActive;\r\n this.onMenuItemClick.emit({\r\n component: this,\r\n item: item,\r\n nativeEvent: e,\r\n });\r\n if (item.isOpen && item[this.hasChildField] && !item.children) {\r\n item.isLoading = true;\r\n this._fetchData(item[this.valueField]).then(() => {\r\n item.isLoading = false;\r\n });\r\n }\r\n }\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n _onMouseEnter(e: MouseEvent, item: any) {\r\n if (this.isLoading) {\r\n return;\r\n }\r\n if (!item[this.disableField] && this.openMode === 'hover') {\r\n if (item.children?.length > 0 || item[this.hasChildField]) {\r\n if (item.children?.length > 0) {\r\n this._closeChild(item.children);\r\n }\r\n item.isOpen = true;\r\n }\r\n this.onMenuItemClick.emit({\r\n component: this,\r\n item: item,\r\n nativeEvent: e,\r\n });\r\n if (item.isOpen && item[this.hasChildField] && !item.children) {\r\n item.isLoading = true;\r\n this._fetchData(item[this.valueField]).then(() => {\r\n item.isLoading = false;\r\n });\r\n }\r\n }\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n _onMouseLeave(item: any) {\r\n if (!item[this.disableField] && this.openMode === 'hover') {\r\n if (item.children?.length > 0 || item[this.hasChildField]) {\r\n if (item.children?.length > 0) {\r\n this._closeChild(item.children);\r\n }\r\n item.isOpen = false;\r\n }\r\n }\r\n }\r\n\r\n _notActive(items: any[]) {\r\n items.forEach((element: any) => {\r\n element.isActive = false;\r\n if (element.children?.length > 0) {\r\n this._notActive(element.children);\r\n }\r\n });\r\n }\r\n\r\n _closeChild(items: any[]) {\r\n items.forEach((element: any) => {\r\n element.isOpen = false;\r\n if (element.children?.length > 0) {\r\n this._closeChild(element.children);\r\n }\r\n });\r\n }\r\n\r\n _setParentNode(item, parentId) {\r\n item.forEach((element) => {\r\n element.parentId = parentId;\r\n });\r\n }\r\n\r\n _onSearchExprChanged(e: AXValueChangedEvent<string>) {\r\n // this.empty();\r\n this._forceFocus = true;\r\n this._fetchData(0, this._searchBox?.searchExp);\r\n }\r\n\r\n _getDirection() {\r\n if (this.direction === 'horizontal') {\r\n return 'horizontal-mode';\r\n } else {\r\n return 'vertical-mode';\r\n }\r\n }\r\n}\r\n","<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul [ngClass]=\"_getDirection()\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: displayItems }\"></ng-container>\r\n </ul>\r\n\r\n <ng-template #recursiveListTmpl let-list=\"list\">\r\n <ng-container *ngFor=\"let item of list; trackBy: _trackLoaded\">\r\n <li #parentRef *ngIf=\"item[visibleField] !=false\" [class.ax-state-disabled]=\"item[disableField]\"\r\n (click)=\"_onMenuClick($event,item)\" (mouseenter)=\"_onMouseEnter($event,item)\"\r\n (mouseleave)=\"_onMouseLeave(item)\">\r\n <a [ngClass]=\"{'active': item.isActive}\">\r\n <div class=\"ax-menu-start-side\">\r\n <ax-icon *ngIf=\"item[iconField] else tmpItem\" [class]=\"item[iconField]\"></ax-icon>\r\n <span>{{_getItemDisplayTextTemplte(item)}}</span>\r\n </div>\r\n <div class=\"ax-menu-end-side\">\r\n <ax-icon *ngIf=\"!item.isLoading\"\r\n [ngClass]=\"{'ax-ic-chevron':item?.children?.length > 0 || item[hasChildField],'active-icon': item.isOpen}\">\r\n </ax-icon>\r\n <ax-loading *ngIf=\"item.isLoading\">\r\n </ax-loading>\r\n </div>\r\n </a>\r\n <!-- <ax-popover [target]=\"parentRef\" [position]=\"position\" [openTrigger]=\"'mouseover'\" [closeTrigger]=\"'clickout'\"> -->\r\n <ul [class.ax-state-disabled]=\"item[disableField]\" *ngIf=\"item?.children?.length > 0 && item.isOpen\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: item.children }\"></ng-container>\r\n </ul>\r\n <!-- </ax-popover> -->\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n\r\n\r\n<ng-container *ngIf=\"isLoading\">\r\n <ng-template>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n<ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <!--------------- check for custom template --------------->\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n <div class=\"ax-list-item\">\r\n {{ 'common.no-result-found' | trans }}\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n</ng-template>\r\n<ng-template #tmpItem>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <!--------------- check for custom template --------------->\r\n <ng-container *ngIf=\"itemTemplate\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXTranslationModule } from '@acorex/core/translation';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXPopoverModule } from '@acorex/components/popover';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXMenuComponent } from './menu.component';\r\n\r\nconst COMPONENT = [AXMenuComponent];\r\nconst MODULES = [CommonModule, AXDecoratorModule];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [...MODULES, AXLoadingModule, AXTranslationModule, AXPopoverModule],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXMenuModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAkCA;;;;AAIG;AAuBG,MAAO,eAAgB,SAAQ,eAAe,CAAA;IAuBlD,WAAoB,CAAA,UAAsB,EAAU,GAAsB,EAAA;AACxE,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QADL,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QAAU,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAV1E,IAAW,CAAA,WAAA,GAAY,KAAK,CAAC;QAY3B,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,KAAI;AACrC,YAAA,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;gBAChC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AAC5C,gBAAA,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,EAAE;oBACtB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,OAAO,K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oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-components-menu.mjs","sources":["../../../../projects/acorex/components/menu/src/menu.component.ts","../../../../projects/acorex/components/menu/src/menu.component.html","../../../../projects/acorex/components/menu/src/menu.module.ts","../../../../projects/acorex/components/menu/acorex-components-menu.ts"],"sourcesContent":["import { OverlayRef, Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\n\r\nimport {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n OnInit,\r\n ContentChild,\r\n TemplateRef,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n} from '@angular/core';\r\nimport { AXBaseMenuMixin } from '@acorex/components/mixin';\r\nimport { AXPlatform } from '@acorex/core/platform';\r\n\r\n/**\r\n * The Button is a component which detects user interaction and triggers a corresponding event\r\n *\r\n * @category Components\r\n */\r\n@Component({\r\n selector: 'ax-menu',\r\n templateUrl: './menu.component.html',\r\n inputs: [\r\n 'disabled',\r\n 'tabIndex',\r\n 'textField',\r\n 'valueField',\r\n 'items',\r\n 'parentId',\r\n 'iconField',\r\n 'tooltip',\r\n 'isOpen',\r\n 'isActive',\r\n 'visibleField',\r\n 'disableField',\r\n 'hasChildField',\r\n 'dividerField',\r\n 'openMode',\r\n 'orientation',\r\n 'showModal',\r\n ],\r\n outputs: ['onBlur', 'onFocus', 'onMenuItemClick'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n host: { class: 'ax-menu' },\r\n})\r\nexport class AXMenuComponent extends AXBaseMenuMixin implements OnInit {\r\n @ContentChild('emptyTemplate')\r\n private _contentEmptyTemplate: TemplateRef<any>;\r\n\r\n @ContentChild('itemTemplate')\r\n private _contentItemTemplate: TemplateRef<any>;\r\n\r\n public _overlayRef: OverlayRef;\r\n\r\n get emptyTemplate(): TemplateRef<any> {\r\n return this._contentEmptyTemplate;\r\n }\r\n\r\n get itemTemplate(): TemplateRef<any> {\r\n return this._contentItemTemplate;\r\n }\r\n\r\n private _levelCount: number = 0;\r\n\r\n private _oldItem: any;\r\n\r\n constructor(\r\n private _elementRef: ElementRef,\r\n private cdr: ChangeDetectorRef,\r\n private _overlay: Overlay,\r\n private _platform: AXPlatform\r\n ) {\r\n super(_elementRef, cdr);\r\n }\r\n\r\n onInit(): void {\r\n super.onInit();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n super.onViewInit();\r\n }\r\n\r\n _onMenuMouseEnter(e: MouseEvent, item: any): void {\r\n if (this.isLoading) {\r\n return;\r\n }\r\n if (this.openMode === 'hover') {\r\n this._handelMenuLogic(e, item);\r\n }\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n _onMenuClick(e: MouseEvent, item: any): void {\r\n if (this.isLoading) {\r\n return;\r\n }\r\n\r\n if (this.openMode === 'click') {\r\n this._handelMenuLogic(e, item);\r\n }\r\n\r\n this.onMenuItemClick.emit({\r\n component: this,\r\n item: item,\r\n nativeEvent: e,\r\n });\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n _getDirection(): string {\r\n if (this.orientation === 'horizontal' && this._levelCount === 0) {\r\n return 'ax-horizontal';\r\n } else if (this._levelCount > 0) {\r\n return 'ax-vertical ax-submenu-ul';\r\n } else if (this.orientation === 'sidemenu') {\r\n return 'ax-side-menu';\r\n } else {\r\n return 'ax-vertical';\r\n }\r\n }\r\n\r\n private _removeActive(items: any): void {\r\n items.forEach((element) => {\r\n element.isActive = false;\r\n if (element?.children?.length > 0) {\r\n this._removeActive(element.children);\r\n }\r\n });\r\n }\r\n\r\n private _closeOpenChild(items: any): void {\r\n items.forEach((element) => {\r\n element.isOpen = false;\r\n if (element?.children?.length > 0) {\r\n this._closeOpenChild(element.children);\r\n }\r\n });\r\n }\r\n\r\n private _initParent(items: any, parentId: any): void {\r\n items.forEach((element) => {\r\n element.parentId = parentId;\r\n });\r\n }\r\n\r\n private _handelMenuLogic(e: MouseEvent, item: any): void {\r\n if (!item[this.disableField] || item[this.dividerField] === false) {\r\n const targetElement = e.target as HTMLDivElement;\r\n if (\r\n (targetElement.closest('li') && this.openMode === 'click') ||\r\n (targetElement.closest('li') && this.openMode === 'hover')\r\n ) {\r\n if (this._overlayRef && this._oldItem !== item) {\r\n this._overlayRef.detach();\r\n }\r\n if (this.orientation === 'horizontal') {\r\n this.displayItems.forEach((element) => {\r\n if (\r\n !item.parentId &&\r\n item[this.valueField] !== element[this.valueField]\r\n ) {\r\n element.isOpen = false;\r\n }\r\n });\r\n }\r\n if (item?.children?.length > 0) {\r\n if (this.orientation === 'horizontal') {\r\n this._initParent(item.children, item[this.valueField]);\r\n }\r\n if (\r\n this.orientation === 'horizontal' ||\r\n this.orientation === 'vertical'\r\n ) {\r\n if (this._oldItem !== item) {\r\n this._openAsOverlay(targetElement.closest('li'), item.children);\r\n }\r\n }\r\n this._closeOpenChild(item.children);\r\n\r\n if (\r\n this.orientation === 'horizontal' ||\r\n this.orientation === 'vertical'\r\n ) {\r\n item.isOpen = true;\r\n } else {\r\n item.isOpen = !item.isOpen;\r\n }\r\n }\r\n\r\n this._removeActive(this.displayItems);\r\n\r\n item.isActive = !item.isActive;\r\n\r\n if (\r\n this.orientation === 'horizontal' ||\r\n this.orientation === 'vertical'\r\n ) {\r\n if (\r\n this._oldItem &&\r\n this._oldItem?.isOpen &&\r\n item[this.valueField] !== this._oldItem[this.valueField]\r\n ) {\r\n this._oldItem.isOpen = false;\r\n }\r\n this._oldItem = item;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private _openAsOverlay(targetRef, overlayItems: any[]): void {\r\n let positions = [];\r\n\r\n if (this.orientation === 'vertical') {\r\n if (this._levelCount >= 1) {\r\n positions = [\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'center',\r\n overlayX: 'center',\r\n overlayY: 'center',\r\n },\r\n ];\r\n } else {\r\n positions = [\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'center',\r\n overlayX: 'center',\r\n overlayY: 'center',\r\n },\r\n ];\r\n }\r\n } else {\r\n if (this._levelCount >= 1) {\r\n positions = [\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n ];\r\n } else {\r\n positions = [\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'center',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n },\r\n {\r\n originX: 'end',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n {\r\n originX: 'center',\r\n originY: 'top',\r\n overlayX: 'center',\r\n overlayY: 'top',\r\n },\r\n ];\r\n }\r\n }\r\n\r\n this._overlayRef = this._overlay.create({\r\n scrollStrategy: this._overlay.scrollStrategies.close(),\r\n positionStrategy: this._overlay\r\n .position()\r\n .flexibleConnectedTo(targetRef)\r\n .withPositions([...positions])\r\n .withPush(false),\r\n disposeOnNavigation: true,\r\n panelClass: ['ax-animate-fadeIn', 'ax-animate-faster', 'ax-overlay-menu'],\r\n maxHeight: 'unset',\r\n hasBackdrop: false,\r\n backdropClass: ['cdk-overlay-transparent-backdrop'],\r\n });\r\n\r\n const ref = this._overlayRef.attach(new ComponentPortal(AXMenuComponent));\r\n\r\n ref.instance.items = overlayItems;\r\n\r\n ref.instance.orientation = this.orientation;\r\n\r\n ref.instance.openMode = 'hover';\r\n\r\n ref.instance._levelCount = this._levelCount + 1;\r\n\r\n ref.instance.disableField = this.disableField;\r\n\r\n ref.instance.visibleField = this.visibleField;\r\n\r\n ref.instance.iconField = this.iconField;\r\n\r\n ref.instance.dividerField = this.dividerField;\r\n\r\n ref.onDestroy(() => {\r\n ref.instance?._overlayRef?.dispose();\r\n });\r\n\r\n this._overlayRef.outsidePointerEvents().subscribe((e) => {\r\n if (this._overlayRef && this.openMode === 'click') {\r\n this._close();\r\n e.stopPropagation();\r\n }\r\n });\r\n\r\n this._platform.scroll.subscribe(() => {\r\n if (this._overlayRef) {\r\n this._close();\r\n }\r\n });\r\n\r\n this._platform.resize.subscribe(() => {\r\n if (this._overlayRef) {\r\n this._close();\r\n }\r\n });\r\n }\r\n\r\n private _close() {\r\n this._overlayRef.detach();\r\n this._oldItem = null;\r\n this.displayItems.forEach((element) => {\r\n element.isOpen = false;\r\n element.isActive = false;\r\n });\r\n this.cdr.detectChanges();\r\n }\r\n\r\n onDestroy(): void {\r\n this._overlayRef?.detach();\r\n }\r\n}\r\n","<ng-container *ngIf=\"displayItems.length; else tmpEmpty\">\r\n <ul [ngClass]=\"_getDirection()\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: displayItems }\"></ng-container>\r\n </ul>\r\n <ng-template #recursiveListTmpl let-list=\"list\">\r\n <ng-container *ngFor=\"let item of list\">\r\n <li *ngIf=\"item[visibleField] !=false\" [class.ax-state-disabled]=\"item[disableField]\"\r\n (click)=\"_onMenuClick($event,item)\" (mouseenter)=\"_onMenuMouseEnter($event,item)\"\r\n [ngClass]=\"{'ax-state-active ': item.isActive}\">\r\n <div class=\"ax-menu-item\" *ngIf=\"itemTemplate == null else tmpItem\">\r\n <div class=\"ax-menu-item-prefix\">\r\n <ax-icon *ngIf=\"item[iconField]\" [class]=\"item[iconField]\"></ax-icon>\r\n <span>{{_getItemDisplayTextTemplte(item)}}</span>\r\n </div>\r\n <div class=\"ax-menu-item-suffix\">\r\n <ax-icon *ngIf=\"!item.isLoading\"\r\n [ngClass]=\"{'ax-ic-chevron':item?.children?.length > 0,'ax-menu-active-icon': item.isOpen}\">\r\n </ax-icon>\r\n <ax-loading *ngIf=\"item.isLoading\">\r\n </ax-loading>\r\n </div>\r\n </div>\r\n <!--------------- check for custom item template --------------->\r\n <ng-template #tmpItem>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <ng-container *ngTemplateOutlet=\"itemTemplate;context: { $implicit: item }\">\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ul *ngIf=\"item?.children?.length > 0 && item.isOpen &&!_overlayRef\"\r\n [class.ax-state-disabled]=\"item[disableField]\">\r\n <ng-container *ngTemplateOutlet=\"recursiveListTmpl; context:{ list: item.children }\">\r\n </ng-container>\r\n </ul>\r\n </li>\r\n <li class=\"ax-divider\" *ngIf=\"item[this.dividerField]\"></li>\r\n </ng-container>\r\n </ng-template>\r\n</ng-container>\r\n<ng-container *ngIf=\"isLoading\">\r\n <ng-template>\r\n <div class=\"ax-flex ax-items-center ax-justify-center ax-p-4\">\r\n <ax-loading text=\"{{ 'layout.loading.text' | trans }}\"></ax-loading>\r\n </div>\r\n </ng-template>\r\n</ng-container>\r\n\r\n<ng-template #tmpEmpty>\r\n <ng-container *ngIf=\"!isLoading\">\r\n <!--------------- check for custom template --------------->\r\n <ng-container *ngIf=\"emptyTemplate; else elseEmptyTemplate\">\r\n <ng-container *ngTemplateOutlet=\"emptyTemplate\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #elseEmptyTemplate>\r\n <div class=\"ax-list-item\">\r\n {{ 'common.no-result-found' | trans }}\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXMenuComponent } from './menu.component';\r\nimport { AXLoadingModule } from '@acorex/components/loading';\r\nimport { AXTranslationModule } from '@acorex/core/translation';\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\n\r\nconst COMPONENT = [AXMenuComponent];\r\nconst MODULES = [\r\n AXDecoratorModule,\r\n AXLoadingModule,\r\n AXTranslationModule,\r\n OverlayModule,\r\n];\r\n\r\n@NgModule({\r\n declarations: [...COMPONENT],\r\n imports: [CommonModule, ...MODULES],\r\n exports: [...COMPONENT],\r\n providers: [],\r\n})\r\nexport class AXMenuModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgBA;;;;AAIG;AA4BG,MAAO,eAAgB,SAAQ,eAAe,CAAA;AAqBlD,IAAA,WAAA,CACU,WAAuB,EACvB,GAAsB,EACtB,QAAiB,EACjB,SAAqB,EAAA;AAE7B,QAAA,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QALhB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;QACvB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QACtB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAS;QACjB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAY;QARvB,IAAW,CAAA,WAAA,GAAW,CAAC,CAAC;KAW/B;AAnBD,IAAA,IAAI,aAAa,GAAA;QACf,OAAO,IAAI,CAAC,qBAAqB,CAAC;KACnC;AAED,IAAA,IAAI,YAAY,GAAA;QACd,OAAO,IAAI,CAAC,oBAAoB,CAAC;KAClC;IAeD,MAAM,GAAA;QACJ,KAAK,CAAC,MAAM,EAAE,CAAC;KAChB;IAED,eAAe,GAAA;QACb,KAAK,CAAC,UAAU,EAAE,CAAC;KACpB;IAED,iBAAiB,CAAC,CAAa,EAAE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