@acorex/cdk 19.7.0-next.0 → 19.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-cdk-list-navigation.mjs +172 -0
- package/fesm2022/acorex-cdk-list-navigation.mjs.map +1 -0
- package/fesm2022/acorex-cdk-selection.mjs +2 -2
- package/fesm2022/acorex-cdk-selection.mjs.map +1 -1
- package/list-navigation/README.md +3 -0
- package/list-navigation/index.d.ts +3 -0
- package/list-navigation/lib/list-navigation-item.directive.d.ts +13 -0
- package/list-navigation/lib/list-navigation.directive.d.ts +18 -0
- package/list-navigation/lib/list-navigation.module.d.ts +9 -0
- package/package.json +5 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, signal, afterNextRender, Directive, contentChildren, output, input, effect, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
|
|
5
|
+
class AXListNavigationItemDirective {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.itemElem = inject(ElementRef);
|
|
8
|
+
this.isActive = signal(false);
|
|
9
|
+
this.navigationItemKey = Math.random();
|
|
10
|
+
this.navigationParentItemKey = signal(null);
|
|
11
|
+
this.index = signal(null);
|
|
12
|
+
this.parent = inject(AXListNavigationItemDirective, { optional: true, skipSelf: true });
|
|
13
|
+
this.#init = afterNextRender(() => {
|
|
14
|
+
if (!this.parent?.navigationItemKey)
|
|
15
|
+
return;
|
|
16
|
+
this.navigationParentItemKey.set(this.parent.navigationItemKey);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
#init;
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXListNavigationItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
21
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: AXListNavigationItemDirective, isStandalone: false, selector: "[axListNavigationItem]", exportAs: ["axListNavigationItem"], ngImport: i0 }); }
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXListNavigationItemDirective, decorators: [{
|
|
24
|
+
type: Directive,
|
|
25
|
+
args: [{
|
|
26
|
+
selector: '[axListNavigationItem]',
|
|
27
|
+
standalone: false,
|
|
28
|
+
exportAs: 'axListNavigationItem',
|
|
29
|
+
}]
|
|
30
|
+
}] });
|
|
31
|
+
|
|
32
|
+
class AXListNavigationDirective {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.parentElem = inject(ElementRef);
|
|
35
|
+
this.childElem = contentChildren(AXListNavigationItemDirective, { descendants: true });
|
|
36
|
+
this.activeIndex = signal(null);
|
|
37
|
+
this.holdShift = signal(false);
|
|
38
|
+
this.onNavigationChanged = output();
|
|
39
|
+
this.orientation = input('vertical');
|
|
40
|
+
this.#init = afterNextRender(() => {
|
|
41
|
+
this.parentElem.nativeElement.onkeydown = (e) => {
|
|
42
|
+
if (e.code === 'ShiftLeft' || e.code === 'ShiftRight') {
|
|
43
|
+
this.holdShift.set(true);
|
|
44
|
+
}
|
|
45
|
+
if (this.orientation() === 'vertical') {
|
|
46
|
+
switch (e.code) {
|
|
47
|
+
case 'ArrowDown':
|
|
48
|
+
this.navigationHandler('ArrowDown');
|
|
49
|
+
break;
|
|
50
|
+
case 'ArrowUp':
|
|
51
|
+
this.navigationHandler('ArrowUp');
|
|
52
|
+
break;
|
|
53
|
+
case 'ArrowLeft':
|
|
54
|
+
this.parentNavigationHandler('ArrowLeft');
|
|
55
|
+
break;
|
|
56
|
+
case 'Tab':
|
|
57
|
+
if (this.holdShift()) {
|
|
58
|
+
this.navigationHandler('ArrowUp');
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this.navigationHandler('ArrowDown');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
else if (this.orientation() === 'horizontal') {
|
|
66
|
+
switch (e.code) {
|
|
67
|
+
case 'ArrowRight':
|
|
68
|
+
this.navigationHandler('ArrowDown');
|
|
69
|
+
break;
|
|
70
|
+
case 'ArrowLeft':
|
|
71
|
+
this.navigationHandler('ArrowUp');
|
|
72
|
+
break;
|
|
73
|
+
case 'ArrowUp':
|
|
74
|
+
this.parentNavigationHandler('ArrowLeft');
|
|
75
|
+
break;
|
|
76
|
+
case 'Tab':
|
|
77
|
+
if (this.holdShift()) {
|
|
78
|
+
this.navigationHandler('ArrowUp');
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
this.navigationHandler('ArrowDown');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
this.parentElem.nativeElement.onkeyup = (e) => {
|
|
87
|
+
if (e.code === 'ShiftLeft' || e.code === 'ShiftRight') {
|
|
88
|
+
this.holdShift.set(false);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
this.parentElem.nativeElement.tabIndex = 0;
|
|
92
|
+
this.childElem().forEach((item, index) => {
|
|
93
|
+
item.itemElem.nativeElement.tabIndex = 0;
|
|
94
|
+
item.index.set(index);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
this.#effect = effect(() => {
|
|
98
|
+
if (this.childElem().length === 0 || this.activeIndex() === null)
|
|
99
|
+
return;
|
|
100
|
+
this.childElem()[this.activeIndex()].itemElem.nativeElement.focus();
|
|
101
|
+
this.childElem().forEach((item) => item.isActive.set(false));
|
|
102
|
+
this.childElem()[this.activeIndex()].isActive.set(true);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
#init;
|
|
106
|
+
navigationHandler(e) {
|
|
107
|
+
this.onNavigationChanged.emit({ sender: this });
|
|
108
|
+
if (this.activeIndex() === null) {
|
|
109
|
+
this.activeIndex.set(0);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (e === 'ArrowUp' && this.activeIndex() > 0) {
|
|
113
|
+
this.activeIndex.update((prev) => prev - 1);
|
|
114
|
+
}
|
|
115
|
+
else if (e === 'ArrowDown' && this.activeIndex() < this.childElem().length - 1) {
|
|
116
|
+
this.activeIndex.update((prev) => prev + 1);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
parentNavigationHandler(e) {
|
|
120
|
+
if (e === 'ArrowLeft') {
|
|
121
|
+
const selectedItemParentKey = this.childElem()[this.activeIndex()].navigationParentItemKey();
|
|
122
|
+
if (!selectedItemParentKey)
|
|
123
|
+
return;
|
|
124
|
+
const parentElem = this.childElem().find((item) => item.navigationItemKey === selectedItemParentKey);
|
|
125
|
+
parentElem.itemElem.nativeElement.focus();
|
|
126
|
+
this.childElem().forEach((item) => item.isActive.set(false));
|
|
127
|
+
parentElem.isActive.set(true);
|
|
128
|
+
this.activeIndex.set(parentElem.index());
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
#effect;
|
|
132
|
+
navigateTo(e) {
|
|
133
|
+
e.itemElem.nativeElement.focus();
|
|
134
|
+
this.childElem().forEach((item) => item.isActive.set(false));
|
|
135
|
+
e.isActive.set(true);
|
|
136
|
+
this.activeIndex.set(e.index());
|
|
137
|
+
}
|
|
138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXListNavigationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
139
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.0.3", type: AXListNavigationDirective, isStandalone: false, selector: "[axListNavigation]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onNavigationChanged: "onNavigationChanged" }, queries: [{ propertyName: "childElem", predicate: AXListNavigationItemDirective, descendants: true, isSignal: true }], exportAs: ["axListNavigation"], ngImport: i0 }); }
|
|
140
|
+
}
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXListNavigationDirective, decorators: [{
|
|
142
|
+
type: Directive,
|
|
143
|
+
args: [{
|
|
144
|
+
selector: '[axListNavigation]',
|
|
145
|
+
standalone: false,
|
|
146
|
+
exportAs: 'axListNavigation',
|
|
147
|
+
}]
|
|
148
|
+
}] });
|
|
149
|
+
|
|
150
|
+
const COMPONENT = [AXListNavigationDirective, AXListNavigationItemDirective];
|
|
151
|
+
const MODULES = [CommonModule];
|
|
152
|
+
class AXListNavigationModule {
|
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXListNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
154
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXListNavigationModule, declarations: [AXListNavigationDirective, AXListNavigationItemDirective], imports: [CommonModule], exports: [AXListNavigationDirective, AXListNavigationItemDirective] }); }
|
|
155
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXListNavigationModule, imports: [MODULES] }); }
|
|
156
|
+
}
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXListNavigationModule, decorators: [{
|
|
158
|
+
type: NgModule,
|
|
159
|
+
args: [{
|
|
160
|
+
declarations: [...COMPONENT],
|
|
161
|
+
imports: [...MODULES],
|
|
162
|
+
exports: [...COMPONENT],
|
|
163
|
+
providers: [],
|
|
164
|
+
}]
|
|
165
|
+
}] });
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Generated bundle index. Do not edit.
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
export { AXListNavigationDirective, AXListNavigationItemDirective, AXListNavigationModule };
|
|
172
|
+
//# sourceMappingURL=acorex-cdk-list-navigation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-cdk-list-navigation.mjs","sources":["../../../../libs/cdk/list-navigation/src/lib/list-navigation-item.directive.ts","../../../../libs/cdk/list-navigation/src/lib/list-navigation.directive.ts","../../../../libs/cdk/list-navigation/src/lib/list-navigation.module.ts","../../../../libs/cdk/list-navigation/src/acorex-cdk-list-navigation.ts"],"sourcesContent":["import { afterNextRender, Directive, ElementRef, inject, signal } from '@angular/core';\n\n@Directive({\n selector: '[axListNavigationItem]',\n standalone: false,\n exportAs: 'axListNavigationItem',\n})\nexport class AXListNavigationItemDirective {\n itemElem = inject(ElementRef);\n isActive = signal(false);\n navigationItemKey = Math.random();\n navigationParentItemKey = signal(null);\n index = signal(null);\n\n private parent = inject(AXListNavigationItemDirective, { optional: true, skipSelf: true });\n\n #init = afterNextRender(() => {\n if (!this.parent?.navigationItemKey) return;\n this.navigationParentItemKey.set(this.parent.navigationItemKey);\n });\n}\n","import {\n afterNextRender,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { AXListNavigationItemDirective } from './list-navigation-item.directive';\n\n@Directive({\n selector: '[axListNavigation]',\n standalone: false,\n exportAs: 'axListNavigation',\n})\nexport class AXListNavigationDirective {\n private parentElem = inject(ElementRef);\n private childElem = contentChildren(AXListNavigationItemDirective, { descendants: true });\n private activeIndex = signal(null);\n private holdShift = signal(false);\n onNavigationChanged = output<{ sender: AXListNavigationDirective }>();\n orientation = input<'horizontal' | 'vertical'>('vertical');\n\n #init = afterNextRender(() => {\n (this.parentElem.nativeElement as HTMLElement).onkeydown = (e: KeyboardEvent) => {\n if (e.code === 'ShiftLeft' || e.code === 'ShiftRight') {\n this.holdShift.set(true);\n }\n\n if (this.orientation() === 'vertical') {\n switch (e.code) {\n case 'ArrowDown':\n this.navigationHandler('ArrowDown');\n break;\n case 'ArrowUp':\n this.navigationHandler('ArrowUp');\n break;\n case 'ArrowLeft':\n this.parentNavigationHandler('ArrowLeft');\n break;\n case 'Tab':\n if (this.holdShift()) {\n this.navigationHandler('ArrowUp');\n } else {\n this.navigationHandler('ArrowDown');\n }\n }\n } else if (this.orientation() === 'horizontal') {\n switch (e.code) {\n case 'ArrowRight':\n this.navigationHandler('ArrowDown');\n break;\n case 'ArrowLeft':\n this.navigationHandler('ArrowUp');\n break;\n case 'ArrowUp':\n this.parentNavigationHandler('ArrowLeft');\n break;\n case 'Tab':\n if (this.holdShift()) {\n this.navigationHandler('ArrowUp');\n } else {\n this.navigationHandler('ArrowDown');\n }\n }\n }\n };\n\n (this.parentElem.nativeElement as HTMLElement).onkeyup = (e: KeyboardEvent) => {\n if (e.code === 'ShiftLeft' || e.code === 'ShiftRight') {\n this.holdShift.set(false);\n }\n };\n\n (this.parentElem.nativeElement as HTMLElement).tabIndex = 0;\n this.childElem().forEach((item, index) => {\n (item.itemElem.nativeElement as HTMLElement).tabIndex = 0;\n item.index.set(index);\n });\n });\n\n private navigationHandler(e: string) {\n this.onNavigationChanged.emit({ sender: this });\n\n if (this.activeIndex() === null) {\n this.activeIndex.set(0);\n return;\n }\n\n if (e === 'ArrowUp' && this.activeIndex() > 0) {\n this.activeIndex.update((prev) => prev - 1);\n } else if (e === 'ArrowDown' && this.activeIndex() < this.childElem().length - 1) {\n this.activeIndex.update((prev) => prev + 1);\n }\n }\n\n private parentNavigationHandler(e: string) {\n if (e === 'ArrowLeft') {\n const selectedItemParentKey = this.childElem()[this.activeIndex()].navigationParentItemKey();\n if (!selectedItemParentKey) return;\n const parentElem = this.childElem().find((item) => item.navigationItemKey === selectedItemParentKey);\n (parentElem.itemElem.nativeElement as HTMLAreaElement).focus();\n this.childElem().forEach((item) => item.isActive.set(false));\n parentElem.isActive.set(true);\n this.activeIndex.set(parentElem.index());\n }\n }\n\n #effect = effect(() => {\n if (this.childElem().length === 0 || this.activeIndex() === null) return;\n (this.childElem()[this.activeIndex()].itemElem.nativeElement as HTMLElement).focus();\n this.childElem().forEach((item) => item.isActive.set(false));\n this.childElem()[this.activeIndex()].isActive.set(true);\n });\n\n navigateTo(e: AXListNavigationItemDirective) {\n (e.itemElem.nativeElement as HTMLElement).focus();\n this.childElem().forEach((item) => item.isActive.set(false));\n e.isActive.set(true);\n this.activeIndex.set(e.index());\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXListNavigationItemDirective } from './list-navigation-item.directive';\nimport { AXListNavigationDirective } from './list-navigation.directive';\n\nconst COMPONENT = [AXListNavigationDirective, AXListNavigationItemDirective];\n\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXListNavigationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,6BAA6B,CAAA;AAL1C,IAAA,WAAA,GAAA;AAME,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;AACxB,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC,MAAM,EAAE;AACjC,QAAA,IAAA,CAAA,uBAAuB,GAAG,MAAM,CAAC,IAAI,CAAC;AACtC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC;AAEZ,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,6BAA6B,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE1F,QAAA,IAAA,CAAA,KAAK,GAAG,eAAe,CAAC,MAAK;AAC3B,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB;gBAAE;YACrC,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,i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AAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAJpB,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -38,7 +38,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
38
38
|
|
|
39
39
|
class AXSelectionGroupDirective {
|
|
40
40
|
constructor() {
|
|
41
|
-
this.content = contentChildren(AXSelectionItemDirective);
|
|
41
|
+
this.content = contentChildren(AXSelectionItemDirective, { descendants: true });
|
|
42
42
|
this.activeIndex = signal(null);
|
|
43
43
|
this.multiple = input(false);
|
|
44
44
|
this.selectedKeys = input();
|
|
@@ -107,7 +107,7 @@ class AXSelectionGroupDirective {
|
|
|
107
107
|
#effect;
|
|
108
108
|
#effect2;
|
|
109
109
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXSelectionGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
110
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.0.3", type: AXSelectionGroupDirective, isStandalone: false, selector: "[axSelectionGroup]", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, selectedKeys: { classPropertyName: "selectedKeys", publicName: "selectedKeys", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelectionChanged: "onSelectionChanged" }, queries: [{ propertyName: "content", predicate: AXSelectionItemDirective, isSignal: true }], exportAs: ["axSelectionGroup"], ngImport: i0 }); }
|
|
110
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.0.3", type: AXSelectionGroupDirective, isStandalone: false, selector: "[axSelectionGroup]", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, selectedKeys: { classPropertyName: "selectedKeys", publicName: "selectedKeys", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSelectionChanged: "onSelectionChanged" }, queries: [{ propertyName: "content", predicate: AXSelectionItemDirective, descendants: true, isSignal: true }], exportAs: ["axSelectionGroup"], ngImport: i0 }); }
|
|
111
111
|
}
|
|
112
112
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXSelectionGroupDirective, decorators: [{
|
|
113
113
|
type: Directive,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-cdk-selection.mjs","sources":["../../../../libs/cdk/selection/src/lib/selection-item.directive.ts","../../../../libs/cdk/selection/src/lib/selection-group.directive.ts","../../../../libs/cdk/selection/src/lib/selection.module.ts","../../../../libs/cdk/selection/src/acorex-cdk-selection.ts"],"sourcesContent":["import { afterNextRender, Directive, ElementRef, inject, input, output, signal } from '@angular/core';\n\n@Directive({\n selector: '[axSelectionItem]',\n exportAs: 'axSelectionItem',\n standalone: false,\n})\nexport class AXSelectionItemDirective {\n private elm = inject(ElementRef);\n isActive = signal(false);\n onClick = output<{ sender: AXSelectionItemDirective }>();\n key = input.required<string>();\n\n #init = afterNextRender(() => {\n (this.elm.nativeElement as HTMLElement).onclick = () => {\n this.onClick.emit({ sender: this });\n };\n });\n\n public toggle() {\n this.isActive.update((prev) => !prev);\n }\n public select() {\n this.isActive.set(true);\n }\n public unselect() {\n this.isActive.set(false);\n }\n}\n","import {\n AfterContentInit,\n afterNextRender,\n contentChildren,\n Directive,\n effect,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { AXSelectionItemDirective } from './selection-item.directive';\n\n@Directive({\n selector: '[axSelectionGroup]',\n standalone: false,\n exportAs: 'axSelectionGroup',\n})\nexport class AXSelectionGroupDirective implements AfterContentInit {\n private content = contentChildren(AXSelectionItemDirective);\n private activeIndex = signal(null);\n multiple = input(false);\n selectedKeys = input<string | string[]>();\n onSelectionChanged = output<{ sender: AXSelectionGroupDirective; selectedKeys: string[] }>();\n\n #init = afterNextRender(() => {\n this.content().forEach((element) => {\n element.onClick.subscribe((e) => {\n this.activeIndex.set(e.sender.key());\n if (this.multiple()) {\n element.toggle();\n } else {\n this.content().forEach((element) => {\n if (element.key() !== this.activeIndex()) {\n element.unselect();\n }\n });\n element.select();\n }\n });\n });\n });\n\n ngAfterContentInit(): void {\n if (!this.selectedKeys()) return;\n if (typeof this.selectedKeys() === 'string') {\n this.content().forEach((element) => {\n if (this.selectedKeys() === element.key()) {\n element.isActive.set(true);\n }\n });\n } else if (this.selectedKeys() instanceof Array) {\n (this.selectedKeys() as Array<string>).forEach((index) => {\n this.content().forEach((element) => {\n if (index === element.key()) {\n element.isActive.set(true);\n }\n });\n });\n }\n }\n\n #effect = effect(() => {\n if (!this.selectedKeys()) {\n this.content()[0].isActive.set(true);\n }\n });\n\n #effect2 = effect(() => {\n if (!this.activeIndex()) return;\n if (this.multiple()) {\n const selectedKeys = [];\n this.content().forEach((item) => {\n if (item.isActive()) {\n selectedKeys.push(item.key());\n }\n });\n this.onSelectionChanged.emit({ sender: this, selectedKeys: selectedKeys });\n } else {\n this.onSelectionChanged.emit({ sender: this, selectedKeys: [this.activeIndex()] });\n }\n });\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXSelectionGroupDirective } from './selection-group.directive';\nimport { AXSelectionItemDirective } from './selection-item.directive';\n\nconst COMPONENT = [AXSelectionGroupDirective, AXSelectionItemDirective];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXSelectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,wBAAwB,CAAA;AALrC,IAAA,WAAA,GAAA;AAMU,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;QACxB,IAAO,CAAA,OAAA,GAAG,MAAM,EAAwC;AACxD,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,EAAU;AAE9B,QAAA,IAAA,CAAA,KAAK,GAAG,eAAe,CAAC,MAAK;YAC1B,IAAI,CAAC,GAAG,CAAC,aAA6B,CAAC,OAAO,GAAG,MAAK;gBACrD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACrC,aAAC;AACH,SAAC,CAAC;AAWH;AAfC,IAAA,KAAK;IAME,MAAM,GAAA;AACX,QAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC;;IAEhC,MAAM,GAAA;AACX,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;;IAElB,QAAQ,GAAA;AACb,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;;8GAnBf,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,UAAU,EAAE,KAAK;AAClB,iBAAA;;;MCWY,yBAAyB,CAAA;AALtC,IAAA,WAAA,GAAA;
|
|
1
|
+
{"version":3,"file":"acorex-cdk-selection.mjs","sources":["../../../../libs/cdk/selection/src/lib/selection-item.directive.ts","../../../../libs/cdk/selection/src/lib/selection-group.directive.ts","../../../../libs/cdk/selection/src/lib/selection.module.ts","../../../../libs/cdk/selection/src/acorex-cdk-selection.ts"],"sourcesContent":["import { afterNextRender, Directive, ElementRef, inject, input, output, signal } from '@angular/core';\n\n@Directive({\n selector: '[axSelectionItem]',\n exportAs: 'axSelectionItem',\n standalone: false,\n})\nexport class AXSelectionItemDirective {\n private elm = inject(ElementRef);\n isActive = signal(false);\n onClick = output<{ sender: AXSelectionItemDirective }>();\n key = input.required<string>();\n\n #init = afterNextRender(() => {\n (this.elm.nativeElement as HTMLElement).onclick = () => {\n this.onClick.emit({ sender: this });\n };\n });\n\n public toggle() {\n this.isActive.update((prev) => !prev);\n }\n public select() {\n this.isActive.set(true);\n }\n public unselect() {\n this.isActive.set(false);\n }\n}\n","import {\n AfterContentInit,\n afterNextRender,\n contentChildren,\n Directive,\n effect,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { AXSelectionItemDirective } from './selection-item.directive';\n\n@Directive({\n selector: '[axSelectionGroup]',\n standalone: false,\n exportAs: 'axSelectionGroup',\n})\nexport class AXSelectionGroupDirective implements AfterContentInit {\n private content = contentChildren(AXSelectionItemDirective, { descendants: true });\n private activeIndex = signal(null);\n multiple = input(false);\n selectedKeys = input<string | string[]>();\n onSelectionChanged = output<{ sender: AXSelectionGroupDirective; selectedKeys: string[] }>();\n\n #init = afterNextRender(() => {\n this.content().forEach((element) => {\n element.onClick.subscribe((e) => {\n this.activeIndex.set(e.sender.key());\n if (this.multiple()) {\n element.toggle();\n } else {\n this.content().forEach((element) => {\n if (element.key() !== this.activeIndex()) {\n element.unselect();\n }\n });\n element.select();\n }\n });\n });\n });\n\n ngAfterContentInit(): void {\n if (!this.selectedKeys()) return;\n if (typeof this.selectedKeys() === 'string') {\n this.content().forEach((element) => {\n if (this.selectedKeys() === element.key()) {\n element.isActive.set(true);\n }\n });\n } else if (this.selectedKeys() instanceof Array) {\n (this.selectedKeys() as Array<string>).forEach((index) => {\n this.content().forEach((element) => {\n if (index === element.key()) {\n element.isActive.set(true);\n }\n });\n });\n }\n }\n\n #effect = effect(() => {\n if (!this.selectedKeys()) {\n this.content()[0].isActive.set(true);\n }\n });\n\n #effect2 = effect(() => {\n if (!this.activeIndex()) return;\n if (this.multiple()) {\n const selectedKeys = [];\n this.content().forEach((item) => {\n if (item.isActive()) {\n selectedKeys.push(item.key());\n }\n });\n this.onSelectionChanged.emit({ sender: this, selectedKeys: selectedKeys });\n } else {\n this.onSelectionChanged.emit({ sender: this, selectedKeys: [this.activeIndex()] });\n }\n });\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXSelectionGroupDirective } from './selection-group.directive';\nimport { AXSelectionItemDirective } from './selection-item.directive';\n\nconst COMPONENT = [AXSelectionGroupDirective, AXSelectionItemDirective];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXSelectionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";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A,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CATX,yBAAyB,EAAE,wBAAwB,aACrD,YAAY,CAAA,EAAA,OAAA,EAAA,CADV,yBAAyB,EAAE,wBAAwB,CAAA,EAAA,CAAA,CAAA;AASzD,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJf,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AXListNavigationItemDirective {
|
|
4
|
+
#private;
|
|
5
|
+
itemElem: ElementRef<any>;
|
|
6
|
+
isActive: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
+
navigationItemKey: number;
|
|
8
|
+
navigationParentItemKey: import("@angular/core").WritableSignal<any>;
|
|
9
|
+
index: import("@angular/core").WritableSignal<any>;
|
|
10
|
+
private parent;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXListNavigationItemDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AXListNavigationItemDirective, "[axListNavigationItem]", ["axListNavigationItem"], {}, {}, never, never, false, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AXListNavigationItemDirective } from './list-navigation-item.directive';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AXListNavigationDirective {
|
|
4
|
+
#private;
|
|
5
|
+
private parentElem;
|
|
6
|
+
private childElem;
|
|
7
|
+
private activeIndex;
|
|
8
|
+
private holdShift;
|
|
9
|
+
onNavigationChanged: import("@angular/core").OutputEmitterRef<{
|
|
10
|
+
sender: AXListNavigationDirective;
|
|
11
|
+
}>;
|
|
12
|
+
orientation: import("@angular/core").InputSignal<"horizontal" | "vertical">;
|
|
13
|
+
private navigationHandler;
|
|
14
|
+
private parentNavigationHandler;
|
|
15
|
+
navigateTo(e: AXListNavigationItemDirective): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXListNavigationDirective, never>;
|
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AXListNavigationDirective, "[axListNavigation]", ["axListNavigation"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, { "onNavigationChanged": "onNavigationChanged"; }, ["childElem"], never, false, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./list-navigation.directive";
|
|
3
|
+
import * as i2 from "./list-navigation-item.directive";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
export declare class AXListNavigationModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXListNavigationModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXListNavigationModule, [typeof i1.AXListNavigationDirective, typeof i2.AXListNavigationItemDirective], [typeof i3.CommonModule], [typeof i1.AXListNavigationDirective, typeof i2.AXListNavigationItemDirective]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXListNavigationModule>;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/cdk",
|
|
3
|
-
"version": "19.7.0
|
|
3
|
+
"version": "19.7.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=19.0.0",
|
|
6
6
|
"@angular/core": ">=19.0.0",
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
"types": "./collapse/index.d.ts",
|
|
32
32
|
"default": "./fesm2022/acorex-cdk-collapse.mjs"
|
|
33
33
|
},
|
|
34
|
+
"./list-navigation": {
|
|
35
|
+
"types": "./list-navigation/index.d.ts",
|
|
36
|
+
"default": "./fesm2022/acorex-cdk-list-navigation.mjs"
|
|
37
|
+
},
|
|
34
38
|
"./outline": {
|
|
35
39
|
"types": "./outline/index.d.ts",
|
|
36
40
|
"default": "./fesm2022/acorex-cdk-outline.mjs"
|