@wirekyt/angular 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fesm2022/wirekyt-angular-field.mjs +1 -1
- package/dist/fesm2022/wirekyt-angular-field.mjs.map +1 -1
- package/dist/fesm2022/wirekyt-angular-image-cropper.mjs +336 -0
- package/dist/fesm2022/wirekyt-angular-image-cropper.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-json-tree-view.mjs +768 -0
- package/dist/fesm2022/wirekyt-angular-json-tree-view.mjs.map +1 -0
- package/dist/fesm2022/wirekyt-angular-tree-view.mjs +858 -0
- package/dist/fesm2022/wirekyt-angular-tree-view.mjs.map +1 -0
- package/dist/package.json +13 -1
- package/dist/types/wirekyt-angular-checkbox.d.ts +1 -1
- package/dist/types/wirekyt-angular-color-picker.d.ts +1 -1
- package/dist/types/wirekyt-angular-combobox.d.ts +1 -1
- package/dist/types/wirekyt-angular-date-picker.d.ts +1 -1
- package/dist/types/wirekyt-angular-image-cropper.d.ts +122 -0
- package/dist/types/wirekyt-angular-image-cropper.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-json-tree-view.d.ts +173 -0
- package/dist/types/wirekyt-angular-json-tree-view.d.ts.map +1 -0
- package/dist/types/wirekyt-angular-tree-view.d.ts +278 -0
- package/dist/types/wirekyt-angular-tree-view.d.ts.map +1 -0
- package/package.json +14 -2
|
@@ -0,0 +1,858 @@
|
|
|
1
|
+
import * as treeView from '@wirekyt/dom/machines/tree-view';
|
|
2
|
+
export { anatomy as treeViewAnatomy } from '@wirekyt/dom/machines/tree-view';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, inject, booleanAttribute, input, model, output, EnvironmentInjector, Injector, DestroyRef, Renderer2, ElementRef, forwardRef, Directive, computed, TemplateRef, ViewContainerRef, effect, HostBinding } from '@angular/core';
|
|
5
|
+
import { injectLocale, injectEnvironment, createId, useMachine, buildRootCarrier, bindProps } from '@wirekyt/angular';
|
|
6
|
+
import { TreeCollection } from '@wirekyt/dom/collection';
|
|
7
|
+
import { useCollapsible, COLLAPSIBLE_CONTEXT, injectCollapsibleContext } from '@wirekyt/angular/collapsible';
|
|
8
|
+
export { createFileTreeCollection, createTreeCollection } from '@wirekyt/angular/collection';
|
|
9
|
+
|
|
10
|
+
const TREE_VIEW_CONTEXT = new InjectionToken("TREE_VIEW_CONTEXT");
|
|
11
|
+
function injectTreeViewContext() {
|
|
12
|
+
return inject(TREE_VIEW_CONTEXT);
|
|
13
|
+
}
|
|
14
|
+
const TREE_VIEW_NODE_CONTEXT = new InjectionToken("TREE_VIEW_NODE_CONTEXT");
|
|
15
|
+
function injectTreeViewNodeContext() {
|
|
16
|
+
return inject(TREE_VIEW_NODE_CONTEXT);
|
|
17
|
+
}
|
|
18
|
+
const TREE_VIEW_NODE_PROPS_CONTEXT = new InjectionToken("TREE_VIEW_NODE_PROPS_CONTEXT");
|
|
19
|
+
function injectTreeViewNodePropsContext() {
|
|
20
|
+
return inject(TREE_VIEW_NODE_PROPS_CONTEXT);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function useTreeView(options) {
|
|
24
|
+
const locale = injectLocale();
|
|
25
|
+
const environment = injectEnvironment();
|
|
26
|
+
const fallbackId = createId();
|
|
27
|
+
return useMachine({
|
|
28
|
+
machine: treeView.machine,
|
|
29
|
+
context: () => {
|
|
30
|
+
const props = options.context();
|
|
31
|
+
return {
|
|
32
|
+
...props,
|
|
33
|
+
dir: locale.dir,
|
|
34
|
+
getRootNode: environment.getRootNode,
|
|
35
|
+
id: props.id ?? fallbackId,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
connect: (service, normalize) => treeView.connect(service, normalize),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const optionalBooleanAttribute = (value) => value === undefined || value === null ? undefined : booleanAttribute(value);
|
|
43
|
+
class TreeViewRoot {
|
|
44
|
+
id = input(undefined, /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
46
|
+
ids = input(undefined, /* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [{ debugName: "ids" }] : /* istanbul ignore next */ []));
|
|
48
|
+
collection = input.required(/* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "collection" }] : /* istanbul ignore next */ []));
|
|
50
|
+
expandedValue = model(undefined, /* @ts-ignore */
|
|
51
|
+
...(ngDevMode ? [{ debugName: "expandedValue" }] : /* istanbul ignore next */ []));
|
|
52
|
+
defaultExpandedValue = input(undefined, /* @ts-ignore */
|
|
53
|
+
...(ngDevMode ? [{ debugName: "defaultExpandedValue" }] : /* istanbul ignore next */ []));
|
|
54
|
+
selectedValue = model(undefined, /* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [{ debugName: "selectedValue" }] : /* istanbul ignore next */ []));
|
|
56
|
+
defaultSelectedValue = input(undefined, /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "defaultSelectedValue" }] : /* istanbul ignore next */ []));
|
|
58
|
+
checkedValue = model(undefined, /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "checkedValue" }] : /* istanbul ignore next */ []));
|
|
60
|
+
defaultCheckedValue = input(undefined, /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "defaultCheckedValue" }] : /* istanbul ignore next */ []));
|
|
62
|
+
focusedValue = model(undefined, /* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
|
|
64
|
+
defaultFocusedValue = input(undefined, /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "defaultFocusedValue" }] : /* istanbul ignore next */ []));
|
|
66
|
+
expandOnClick = input(undefined, { ...(ngDevMode ? { debugName: "expandOnClick" } : /* istanbul ignore next */ {}), transform: optionalBooleanAttribute });
|
|
67
|
+
typeahead = input(undefined, { ...(ngDevMode ? { debugName: "typeahead" } : /* istanbul ignore next */ {}), transform: optionalBooleanAttribute });
|
|
68
|
+
lazyMount = input(false, { ...(ngDevMode ? { debugName: "lazyMount" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
69
|
+
unmountOnExit = input(false, { ...(ngDevMode ? { debugName: "unmountOnExit" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
70
|
+
selectionMode = input(undefined, /* @ts-ignore */
|
|
71
|
+
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
72
|
+
translations = input(undefined, /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "translations" }] : /* istanbul ignore next */ []));
|
|
74
|
+
loadChildren = input(undefined, /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "loadChildren" }] : /* istanbul ignore next */ []));
|
|
76
|
+
canRename = input(undefined, /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "canRename" }] : /* istanbul ignore next */ []));
|
|
78
|
+
scrollToIndexFn = input(undefined, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "scrollToIndexFn" }] : /* istanbul ignore next */ []));
|
|
80
|
+
expandedChange = output();
|
|
81
|
+
selectionChange = output();
|
|
82
|
+
checkedChange = output();
|
|
83
|
+
focusChange = output();
|
|
84
|
+
loadChildrenComplete = output();
|
|
85
|
+
loadChildrenError = output();
|
|
86
|
+
renameStart = output();
|
|
87
|
+
beforeRename = output();
|
|
88
|
+
renameComplete = output();
|
|
89
|
+
fallbackCollection = new TreeCollection({
|
|
90
|
+
rootNode: { id: "__wirekyt_tree_view_root__" },
|
|
91
|
+
nodeToValue: () => "__wirekyt_tree_view_root__",
|
|
92
|
+
nodeToString: () => "",
|
|
93
|
+
nodeToChildren: () => [],
|
|
94
|
+
});
|
|
95
|
+
readCollection() {
|
|
96
|
+
try {
|
|
97
|
+
return this.collection();
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return this.fallbackCollection;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
machine = useTreeView({
|
|
104
|
+
context: () => ({
|
|
105
|
+
id: this.id(),
|
|
106
|
+
ids: this.ids(),
|
|
107
|
+
collection: this.readCollection(),
|
|
108
|
+
expandedValue: this.expandedValue(),
|
|
109
|
+
defaultExpandedValue: this.defaultExpandedValue(),
|
|
110
|
+
selectedValue: this.selectedValue(),
|
|
111
|
+
defaultSelectedValue: this.defaultSelectedValue(),
|
|
112
|
+
checkedValue: this.checkedValue(),
|
|
113
|
+
defaultCheckedValue: this.defaultCheckedValue(),
|
|
114
|
+
focusedValue: this.focusedValue(),
|
|
115
|
+
defaultFocusedValue: this.defaultFocusedValue(),
|
|
116
|
+
expandOnClick: this.expandOnClick(),
|
|
117
|
+
typeahead: this.typeahead(),
|
|
118
|
+
selectionMode: this.selectionMode(),
|
|
119
|
+
translations: this.translations(),
|
|
120
|
+
loadChildren: this.loadChildren(),
|
|
121
|
+
canRename: this.canRename(),
|
|
122
|
+
scrollToIndexFn: this.scrollToIndexFn(),
|
|
123
|
+
onExpandedChange: (details) => {
|
|
124
|
+
if (!arraysShallowEqual(this.expandedValue(), details.expandedValue)) {
|
|
125
|
+
this.expandedValue.set([...details.expandedValue]);
|
|
126
|
+
}
|
|
127
|
+
this.expandedChange.emit(details);
|
|
128
|
+
},
|
|
129
|
+
onSelectionChange: (details) => {
|
|
130
|
+
if (!arraysShallowEqual(this.selectedValue(), details.selectedValue)) {
|
|
131
|
+
this.selectedValue.set([...details.selectedValue]);
|
|
132
|
+
}
|
|
133
|
+
this.selectionChange.emit(details);
|
|
134
|
+
},
|
|
135
|
+
onCheckedChange: (details) => {
|
|
136
|
+
if (!arraysShallowEqual(this.checkedValue(), details.checkedValue)) {
|
|
137
|
+
this.checkedValue.set([...details.checkedValue]);
|
|
138
|
+
}
|
|
139
|
+
this.checkedChange.emit(details);
|
|
140
|
+
},
|
|
141
|
+
onFocusChange: (details) => {
|
|
142
|
+
if (this.focusedValue() !== details.focusedValue) {
|
|
143
|
+
this.focusedValue.set(details.focusedValue);
|
|
144
|
+
}
|
|
145
|
+
this.focusChange.emit(details);
|
|
146
|
+
},
|
|
147
|
+
onLoadChildrenComplete: (details) => {
|
|
148
|
+
this.loadChildrenComplete.emit(details);
|
|
149
|
+
},
|
|
150
|
+
onLoadChildrenError: (details) => {
|
|
151
|
+
this.loadChildrenError.emit(details);
|
|
152
|
+
},
|
|
153
|
+
onRenameStart: (details) => {
|
|
154
|
+
this.renameStart.emit(details);
|
|
155
|
+
},
|
|
156
|
+
onBeforeRename: (details) => {
|
|
157
|
+
this.beforeRename.emit(details);
|
|
158
|
+
const renameDetails = details;
|
|
159
|
+
return this.canRename()?.(renameDetails.node, renameDetails.indexPath) ?? true;
|
|
160
|
+
},
|
|
161
|
+
onRenameComplete: (details) => {
|
|
162
|
+
this.renameComplete.emit(details);
|
|
163
|
+
},
|
|
164
|
+
}),
|
|
165
|
+
});
|
|
166
|
+
state = this.machine.state;
|
|
167
|
+
api = this.machine.api;
|
|
168
|
+
service = this.machine.service;
|
|
169
|
+
send = this.machine.send;
|
|
170
|
+
contextCarrier = buildRootCarrier({
|
|
171
|
+
root: this,
|
|
172
|
+
rootToken: TREE_VIEW_CONTEXT,
|
|
173
|
+
originInjector: inject(Injector),
|
|
174
|
+
environmentInjector: inject(EnvironmentInjector),
|
|
175
|
+
});
|
|
176
|
+
constructor() {
|
|
177
|
+
bindProps({
|
|
178
|
+
elementRef: inject(ElementRef),
|
|
179
|
+
renderer: inject(Renderer2),
|
|
180
|
+
destroyRef: inject(DestroyRef),
|
|
181
|
+
props: () => this.api().getRootProps(),
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
getContextCarrier() {
|
|
185
|
+
return this.contextCarrier;
|
|
186
|
+
}
|
|
187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
188
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewRoot, isStandalone: true, selector: "[tree-view-root]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, ids: { classPropertyName: "ids", publicName: "ids", isSignal: true, isRequired: false, transformFunction: null }, collection: { classPropertyName: "collection", publicName: "collection", isSignal: true, isRequired: true, transformFunction: null }, expandedValue: { classPropertyName: "expandedValue", publicName: "expandedValue", isSignal: true, isRequired: false, transformFunction: null }, defaultExpandedValue: { classPropertyName: "defaultExpandedValue", publicName: "defaultExpandedValue", isSignal: true, isRequired: false, transformFunction: null }, selectedValue: { classPropertyName: "selectedValue", publicName: "selectedValue", isSignal: true, isRequired: false, transformFunction: null }, defaultSelectedValue: { classPropertyName: "defaultSelectedValue", publicName: "defaultSelectedValue", isSignal: true, isRequired: false, transformFunction: null }, checkedValue: { classPropertyName: "checkedValue", publicName: "checkedValue", isSignal: true, isRequired: false, transformFunction: null }, defaultCheckedValue: { classPropertyName: "defaultCheckedValue", publicName: "defaultCheckedValue", isSignal: true, isRequired: false, transformFunction: null }, focusedValue: { classPropertyName: "focusedValue", publicName: "focusedValue", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedValue: { classPropertyName: "defaultFocusedValue", publicName: "defaultFocusedValue", isSignal: true, isRequired: false, transformFunction: null }, expandOnClick: { classPropertyName: "expandOnClick", publicName: "expandOnClick", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, lazyMount: { classPropertyName: "lazyMount", publicName: "lazyMount", isSignal: true, isRequired: false, transformFunction: null }, unmountOnExit: { classPropertyName: "unmountOnExit", publicName: "unmountOnExit", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, translations: { classPropertyName: "translations", publicName: "translations", isSignal: true, isRequired: false, transformFunction: null }, loadChildren: { classPropertyName: "loadChildren", publicName: "loadChildren", isSignal: true, isRequired: false, transformFunction: null }, canRename: { classPropertyName: "canRename", publicName: "canRename", isSignal: true, isRequired: false, transformFunction: null }, scrollToIndexFn: { classPropertyName: "scrollToIndexFn", publicName: "scrollToIndexFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedValue: "expandedValueChange", selectedValue: "selectedValueChange", checkedValue: "checkedValueChange", focusedValue: "focusedValueChange", expandedChange: "expandedChange", selectionChange: "selectionChange", checkedChange: "checkedChange", focusChange: "focusChange", loadChildrenComplete: "loadChildrenComplete", loadChildrenError: "loadChildrenError", renameStart: "renameStart", beforeRename: "beforeRename", renameComplete: "renameComplete" }, providers: [{ provide: TREE_VIEW_CONTEXT, useExisting: forwardRef(() => TreeViewRoot) }], exportAs: ["treeViewRoot"], ngImport: i0 });
|
|
189
|
+
}
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewRoot, decorators: [{
|
|
191
|
+
type: Directive,
|
|
192
|
+
args: [{
|
|
193
|
+
selector: "[tree-view-root]",
|
|
194
|
+
standalone: true,
|
|
195
|
+
exportAs: "treeViewRoot",
|
|
196
|
+
providers: [{ provide: TREE_VIEW_CONTEXT, useExisting: forwardRef(() => TreeViewRoot) }],
|
|
197
|
+
}]
|
|
198
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ids: [{ type: i0.Input, args: [{ isSignal: true, alias: "ids", required: false }] }], collection: [{ type: i0.Input, args: [{ isSignal: true, alias: "collection", required: true }] }], expandedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedValue", required: false }] }, { type: i0.Output, args: ["expandedValueChange"] }], defaultExpandedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultExpandedValue", required: false }] }], selectedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedValue", required: false }] }, { type: i0.Output, args: ["selectedValueChange"] }], defaultSelectedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultSelectedValue", required: false }] }], checkedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkedValue", required: false }] }, { type: i0.Output, args: ["checkedValueChange"] }], defaultCheckedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultCheckedValue", required: false }] }], focusedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedValue", required: false }] }, { type: i0.Output, args: ["focusedValueChange"] }], defaultFocusedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultFocusedValue", required: false }] }], expandOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandOnClick", required: false }] }], typeahead: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeahead", required: false }] }], lazyMount: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyMount", required: false }] }], unmountOnExit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unmountOnExit", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], translations: [{ type: i0.Input, args: [{ isSignal: true, alias: "translations", required: false }] }], loadChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadChildren", required: false }] }], canRename: [{ type: i0.Input, args: [{ isSignal: true, alias: "canRename", required: false }] }], scrollToIndexFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollToIndexFn", required: false }] }], expandedChange: [{ type: i0.Output, args: ["expandedChange"] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], focusChange: [{ type: i0.Output, args: ["focusChange"] }], loadChildrenComplete: [{ type: i0.Output, args: ["loadChildrenComplete"] }], loadChildrenError: [{ type: i0.Output, args: ["loadChildrenError"] }], renameStart: [{ type: i0.Output, args: ["renameStart"] }], beforeRename: [{ type: i0.Output, args: ["beforeRename"] }], renameComplete: [{ type: i0.Output, args: ["renameComplete"] }] } });
|
|
199
|
+
function arraysShallowEqual(a, b) {
|
|
200
|
+
if (a === b)
|
|
201
|
+
return true;
|
|
202
|
+
if (!a || !b)
|
|
203
|
+
return false;
|
|
204
|
+
if (a.length !== b.length)
|
|
205
|
+
return false;
|
|
206
|
+
for (let index = 0; index < a.length; index++) {
|
|
207
|
+
if (a[index] !== b[index])
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
class TreeViewRootProvider {
|
|
214
|
+
value = input.required(/* @ts-ignore */
|
|
215
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
216
|
+
lazyMount = input(false, { ...(ngDevMode ? { debugName: "lazyMount" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
217
|
+
unmountOnExit = input(false, { ...(ngDevMode ? { debugName: "unmountOnExit" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
218
|
+
state = computed(() => this.value().state(), /* @ts-ignore */
|
|
219
|
+
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
220
|
+
api = computed(() => this.value().api(), /* @ts-ignore */
|
|
221
|
+
...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
|
|
222
|
+
send = (event) => this.value().send(event);
|
|
223
|
+
get service() {
|
|
224
|
+
return this.value().service;
|
|
225
|
+
}
|
|
226
|
+
contextCarrier = buildRootCarrier({
|
|
227
|
+
root: this,
|
|
228
|
+
rootToken: TREE_VIEW_CONTEXT,
|
|
229
|
+
originInjector: inject(Injector),
|
|
230
|
+
environmentInjector: inject(EnvironmentInjector),
|
|
231
|
+
});
|
|
232
|
+
constructor() {
|
|
233
|
+
bindProps({
|
|
234
|
+
elementRef: inject(ElementRef),
|
|
235
|
+
renderer: inject(Renderer2),
|
|
236
|
+
destroyRef: inject(DestroyRef),
|
|
237
|
+
props: () => this.api().getRootProps(),
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
getContextCarrier() {
|
|
241
|
+
return this.contextCarrier;
|
|
242
|
+
}
|
|
243
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewRootProvider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
244
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewRootProvider, isStandalone: true, selector: "[tree-view-root-provider]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, lazyMount: { classPropertyName: "lazyMount", publicName: "lazyMount", isSignal: true, isRequired: false, transformFunction: null }, unmountOnExit: { classPropertyName: "unmountOnExit", publicName: "unmountOnExit", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: TREE_VIEW_CONTEXT, useExisting: forwardRef(() => TreeViewRootProvider) }], exportAs: ["treeViewRootProvider"], ngImport: i0 });
|
|
245
|
+
}
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewRootProvider, decorators: [{
|
|
247
|
+
type: Directive,
|
|
248
|
+
args: [{
|
|
249
|
+
selector: "[tree-view-root-provider]",
|
|
250
|
+
standalone: true,
|
|
251
|
+
exportAs: "treeViewRootProvider",
|
|
252
|
+
providers: [{ provide: TREE_VIEW_CONTEXT, useExisting: forwardRef(() => TreeViewRootProvider) }],
|
|
253
|
+
}]
|
|
254
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], lazyMount: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyMount", required: false }] }], unmountOnExit: [{ type: i0.Input, args: [{ isSignal: true, alias: "unmountOnExit", required: false }] }] } });
|
|
255
|
+
|
|
256
|
+
class TreeViewNodeProvider {
|
|
257
|
+
node = input.required(/* @ts-ignore */
|
|
258
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
259
|
+
indexPath = input.required(/* @ts-ignore */
|
|
260
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
261
|
+
treeView = injectTreeViewContext();
|
|
262
|
+
nodeProps = computed(() => ({
|
|
263
|
+
node: this.node(),
|
|
264
|
+
indexPath: this.indexPath(),
|
|
265
|
+
}), /* @ts-ignore */
|
|
266
|
+
...(ngDevMode ? [{ debugName: "nodeProps" }] : /* istanbul ignore next */ []));
|
|
267
|
+
nodeState = computed(() => this.treeView.api().getNodeState(this.nodeProps()), /* @ts-ignore */
|
|
268
|
+
...(ngDevMode ? [{ debugName: "nodeState" }] : /* istanbul ignore next */ []));
|
|
269
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeProvider, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
270
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewNodeProvider, isStandalone: true, selector: "[tree-view-node-provider]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
271
|
+
{
|
|
272
|
+
provide: TREE_VIEW_NODE_CONTEXT,
|
|
273
|
+
useFactory: (provider) => provider.nodeState,
|
|
274
|
+
deps: [forwardRef(() => TreeViewNodeProvider)],
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
provide: TREE_VIEW_NODE_PROPS_CONTEXT,
|
|
278
|
+
useFactory: (provider) => provider.nodeProps,
|
|
279
|
+
deps: [forwardRef(() => TreeViewNodeProvider)],
|
|
280
|
+
},
|
|
281
|
+
], exportAs: ["treeViewNodeProvider"], ngImport: i0 });
|
|
282
|
+
}
|
|
283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeProvider, decorators: [{
|
|
284
|
+
type: Directive,
|
|
285
|
+
args: [{
|
|
286
|
+
selector: "[tree-view-node-provider]",
|
|
287
|
+
standalone: true,
|
|
288
|
+
exportAs: "treeViewNodeProvider",
|
|
289
|
+
providers: [
|
|
290
|
+
{
|
|
291
|
+
provide: TREE_VIEW_NODE_CONTEXT,
|
|
292
|
+
useFactory: (provider) => provider.nodeState,
|
|
293
|
+
deps: [forwardRef(() => TreeViewNodeProvider)],
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
provide: TREE_VIEW_NODE_PROPS_CONTEXT,
|
|
297
|
+
useFactory: (provider) => provider.nodeProps,
|
|
298
|
+
deps: [forwardRef(() => TreeViewNodeProvider)],
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
}]
|
|
302
|
+
}], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: true }] }] } });
|
|
303
|
+
|
|
304
|
+
class TreeViewContext {
|
|
305
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
306
|
+
void context;
|
|
307
|
+
return true;
|
|
308
|
+
}
|
|
309
|
+
treeView = injectTreeViewContext();
|
|
310
|
+
templateRef = inject(TemplateRef);
|
|
311
|
+
viewContainer = inject(ViewContainerRef);
|
|
312
|
+
constructor() {
|
|
313
|
+
const view = this.viewContainer.createEmbeddedView(this.templateRef, {
|
|
314
|
+
$implicit: this.treeView.api,
|
|
315
|
+
api: this.treeView.api,
|
|
316
|
+
});
|
|
317
|
+
effect(() => {
|
|
318
|
+
this.treeView.api();
|
|
319
|
+
view.detectChanges();
|
|
320
|
+
});
|
|
321
|
+
inject(DestroyRef).onDestroy(() => view.destroy());
|
|
322
|
+
}
|
|
323
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewContext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
324
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: TreeViewContext, isStandalone: true, selector: "[tree-view-context]", exportAs: ["treeViewContext"], ngImport: i0 });
|
|
325
|
+
}
|
|
326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewContext, decorators: [{
|
|
327
|
+
type: Directive,
|
|
328
|
+
args: [{
|
|
329
|
+
selector: "[tree-view-context]",
|
|
330
|
+
standalone: true,
|
|
331
|
+
exportAs: "treeViewContext",
|
|
332
|
+
}]
|
|
333
|
+
}], ctorParameters: () => [] });
|
|
334
|
+
|
|
335
|
+
class TreeViewNodeContext {
|
|
336
|
+
static ngTemplateContextGuard(_directive, context) {
|
|
337
|
+
void context;
|
|
338
|
+
return true;
|
|
339
|
+
}
|
|
340
|
+
state = injectTreeViewNodeContext();
|
|
341
|
+
templateRef = inject(TemplateRef);
|
|
342
|
+
viewContainer = inject(ViewContainerRef);
|
|
343
|
+
constructor() {
|
|
344
|
+
const view = this.viewContainer.createEmbeddedView(this.templateRef, {
|
|
345
|
+
$implicit: this.state,
|
|
346
|
+
state: this.state,
|
|
347
|
+
});
|
|
348
|
+
effect(() => {
|
|
349
|
+
this.state();
|
|
350
|
+
view.detectChanges();
|
|
351
|
+
});
|
|
352
|
+
inject(DestroyRef).onDestroy(() => view.destroy());
|
|
353
|
+
}
|
|
354
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeContext, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
355
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: TreeViewNodeContext, isStandalone: true, selector: "[tree-view-node-context]", exportAs: ["treeViewNodeContext"], ngImport: i0 });
|
|
356
|
+
}
|
|
357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeContext, decorators: [{
|
|
358
|
+
type: Directive,
|
|
359
|
+
args: [{
|
|
360
|
+
selector: "[tree-view-node-context]",
|
|
361
|
+
standalone: true,
|
|
362
|
+
exportAs: "treeViewNodeContext",
|
|
363
|
+
}]
|
|
364
|
+
}], ctorParameters: () => [] });
|
|
365
|
+
|
|
366
|
+
function createTreeViewNodePropsResolver(partName, node, indexPath) {
|
|
367
|
+
const provider = inject(TREE_VIEW_NODE_PROPS_CONTEXT, {
|
|
368
|
+
optional: true,
|
|
369
|
+
});
|
|
370
|
+
return () => {
|
|
371
|
+
const explicitNode = node();
|
|
372
|
+
const explicitIndexPath = indexPath();
|
|
373
|
+
if (explicitNode !== undefined && explicitIndexPath !== undefined) {
|
|
374
|
+
return { node: explicitNode, indexPath: explicitIndexPath };
|
|
375
|
+
}
|
|
376
|
+
if (explicitNode === undefined && explicitIndexPath === undefined && provider) {
|
|
377
|
+
return provider();
|
|
378
|
+
}
|
|
379
|
+
throw new Error(`${partName} requires [node] and [indexPath] inputs or an ancestor [tree-view-node-provider].`);
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
class TreeViewBranch {
|
|
384
|
+
node = input(undefined, /* @ts-ignore */
|
|
385
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
386
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
387
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
388
|
+
context = injectTreeViewContext();
|
|
389
|
+
nodeProps = createTreeViewNodePropsResolver("TreeViewBranch", this.node, this.indexPath);
|
|
390
|
+
nodeState = computed(() => this.context.api().getNodeState(this.nodeProps()), /* @ts-ignore */
|
|
391
|
+
...(ngDevMode ? [{ debugName: "nodeState" }] : /* istanbul ignore next */ []));
|
|
392
|
+
collapsible = useCollapsible({
|
|
393
|
+
context: () => ({
|
|
394
|
+
open: this.nodeState().expanded,
|
|
395
|
+
ids: { content: this.context.api().getBranchContentProps(this.nodeProps())["id"] },
|
|
396
|
+
lazyMount: this.context.lazyMount(),
|
|
397
|
+
unmountOnExit: this.context.unmountOnExit(),
|
|
398
|
+
}),
|
|
399
|
+
});
|
|
400
|
+
constructor() {
|
|
401
|
+
bindProps({
|
|
402
|
+
elementRef: inject(ElementRef),
|
|
403
|
+
renderer: inject(Renderer2),
|
|
404
|
+
destroyRef: inject(DestroyRef),
|
|
405
|
+
props: () => ({
|
|
406
|
+
...this.collapsible.api().getRootProps(),
|
|
407
|
+
...this.context.api().getBranchProps(this.nodeProps()),
|
|
408
|
+
}),
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranch, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
412
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewBranch, isStandalone: true, selector: "[tree-view-branch]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
413
|
+
{
|
|
414
|
+
provide: COLLAPSIBLE_CONTEXT,
|
|
415
|
+
useFactory: (branch) => branch.collapsible,
|
|
416
|
+
deps: [forwardRef(() => TreeViewBranch)],
|
|
417
|
+
},
|
|
418
|
+
], exportAs: ["treeViewBranch"], ngImport: i0 });
|
|
419
|
+
}
|
|
420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranch, decorators: [{
|
|
421
|
+
type: Directive,
|
|
422
|
+
args: [{
|
|
423
|
+
selector: "[tree-view-branch]",
|
|
424
|
+
standalone: true,
|
|
425
|
+
exportAs: "treeViewBranch",
|
|
426
|
+
providers: [
|
|
427
|
+
{
|
|
428
|
+
provide: COLLAPSIBLE_CONTEXT,
|
|
429
|
+
useFactory: (branch) => branch.collapsible,
|
|
430
|
+
deps: [forwardRef(() => TreeViewBranch)],
|
|
431
|
+
},
|
|
432
|
+
],
|
|
433
|
+
}]
|
|
434
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
435
|
+
|
|
436
|
+
class TreeViewBranchContent {
|
|
437
|
+
node = input(undefined, /* @ts-ignore */
|
|
438
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
439
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
440
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
441
|
+
context = injectTreeViewContext();
|
|
442
|
+
collapsible = injectCollapsibleContext();
|
|
443
|
+
nodeProps = createTreeViewNodePropsResolver("TreeViewBranchContent", this.node, this.indexPath);
|
|
444
|
+
template = inject((TemplateRef));
|
|
445
|
+
viewContainer = inject(ViewContainerRef);
|
|
446
|
+
elementRef = { nativeElement: null };
|
|
447
|
+
view;
|
|
448
|
+
constructor() {
|
|
449
|
+
effect(() => {
|
|
450
|
+
if (this.collapsible.isUnmounted()) {
|
|
451
|
+
this.elementRef.nativeElement = null;
|
|
452
|
+
this.viewContainer.clear();
|
|
453
|
+
this.view = undefined;
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
if (!this.view) {
|
|
457
|
+
this.view = this.viewContainer.createEmbeddedView(this.template);
|
|
458
|
+
this.elementRef.nativeElement =
|
|
459
|
+
this.view.rootNodes.find((node) => node.nodeType === 1) ?? null;
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
bindProps({
|
|
463
|
+
elementRef: this.elementRef,
|
|
464
|
+
renderer: inject(Renderer2),
|
|
465
|
+
destroyRef: inject(DestroyRef),
|
|
466
|
+
props: () => {
|
|
467
|
+
this.collapsible.isUnmounted();
|
|
468
|
+
const branchContentProps = {
|
|
469
|
+
...this.context.api().getBranchContentProps(this.nodeProps()),
|
|
470
|
+
};
|
|
471
|
+
delete branchContentProps["hidden"];
|
|
472
|
+
delete branchContentProps["data-state"];
|
|
473
|
+
return {
|
|
474
|
+
...branchContentProps,
|
|
475
|
+
...this.collapsible.api().getContentProps(),
|
|
476
|
+
};
|
|
477
|
+
},
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
481
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewBranchContent, isStandalone: true, selector: "[tree-view-branch-content]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewBranchContent"], ngImport: i0 });
|
|
482
|
+
}
|
|
483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchContent, decorators: [{
|
|
484
|
+
type: Directive,
|
|
485
|
+
args: [{
|
|
486
|
+
selector: "[tree-view-branch-content]",
|
|
487
|
+
standalone: true,
|
|
488
|
+
exportAs: "treeViewBranchContent",
|
|
489
|
+
}]
|
|
490
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
491
|
+
|
|
492
|
+
class TreeViewBranchControl {
|
|
493
|
+
node = input(undefined, /* @ts-ignore */
|
|
494
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
495
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
496
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
497
|
+
constructor() {
|
|
498
|
+
const context = injectTreeViewContext();
|
|
499
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewBranchControl", this.node, this.indexPath);
|
|
500
|
+
bindProps({
|
|
501
|
+
elementRef: inject(ElementRef),
|
|
502
|
+
renderer: inject(Renderer2),
|
|
503
|
+
destroyRef: inject(DestroyRef),
|
|
504
|
+
props: () => context.api().getBranchControlProps(nodeProps()),
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
508
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewBranchControl, isStandalone: true, selector: "[tree-view-branch-control]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewBranchControl"], ngImport: i0 });
|
|
509
|
+
}
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchControl, decorators: [{
|
|
511
|
+
type: Directive,
|
|
512
|
+
args: [{
|
|
513
|
+
selector: "[tree-view-branch-control]",
|
|
514
|
+
standalone: true,
|
|
515
|
+
exportAs: "treeViewBranchControl",
|
|
516
|
+
}]
|
|
517
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
518
|
+
|
|
519
|
+
class TreeViewBranchIndentGuide {
|
|
520
|
+
node = input(undefined, /* @ts-ignore */
|
|
521
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
522
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
523
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
524
|
+
constructor() {
|
|
525
|
+
const context = injectTreeViewContext();
|
|
526
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewBranchIndentGuide", this.node, this.indexPath);
|
|
527
|
+
bindProps({
|
|
528
|
+
elementRef: inject(ElementRef),
|
|
529
|
+
renderer: inject(Renderer2),
|
|
530
|
+
destroyRef: inject(DestroyRef),
|
|
531
|
+
props: () => context.api().getBranchIndentGuideProps(nodeProps()),
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchIndentGuide, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
535
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewBranchIndentGuide, isStandalone: true, selector: "[tree-view-branch-indent-guide]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewBranchIndentGuide"], ngImport: i0 });
|
|
536
|
+
}
|
|
537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchIndentGuide, decorators: [{
|
|
538
|
+
type: Directive,
|
|
539
|
+
args: [{
|
|
540
|
+
selector: "[tree-view-branch-indent-guide]",
|
|
541
|
+
standalone: true,
|
|
542
|
+
exportAs: "treeViewBranchIndentGuide",
|
|
543
|
+
}]
|
|
544
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
545
|
+
|
|
546
|
+
class TreeViewBranchIndicator {
|
|
547
|
+
node = input(undefined, /* @ts-ignore */
|
|
548
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
549
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
550
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
551
|
+
constructor() {
|
|
552
|
+
const context = injectTreeViewContext();
|
|
553
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewBranchIndicator", this.node, this.indexPath);
|
|
554
|
+
bindProps({
|
|
555
|
+
elementRef: inject(ElementRef),
|
|
556
|
+
renderer: inject(Renderer2),
|
|
557
|
+
destroyRef: inject(DestroyRef),
|
|
558
|
+
props: () => context.api().getBranchIndicatorProps(nodeProps()),
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
562
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewBranchIndicator, isStandalone: true, selector: "[tree-view-branch-indicator]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewBranchIndicator"], ngImport: i0 });
|
|
563
|
+
}
|
|
564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchIndicator, decorators: [{
|
|
565
|
+
type: Directive,
|
|
566
|
+
args: [{
|
|
567
|
+
selector: "[tree-view-branch-indicator]",
|
|
568
|
+
standalone: true,
|
|
569
|
+
exportAs: "treeViewBranchIndicator",
|
|
570
|
+
}]
|
|
571
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
572
|
+
|
|
573
|
+
class TreeViewBranchText {
|
|
574
|
+
node = input(undefined, /* @ts-ignore */
|
|
575
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
576
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
577
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
578
|
+
constructor() {
|
|
579
|
+
const context = injectTreeViewContext();
|
|
580
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewBranchText", this.node, this.indexPath);
|
|
581
|
+
bindProps({
|
|
582
|
+
elementRef: inject(ElementRef),
|
|
583
|
+
renderer: inject(Renderer2),
|
|
584
|
+
destroyRef: inject(DestroyRef),
|
|
585
|
+
props: () => context.api().getBranchTextProps(nodeProps()),
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchText, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
589
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewBranchText, isStandalone: true, selector: "[tree-view-branch-text]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewBranchText"], ngImport: i0 });
|
|
590
|
+
}
|
|
591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchText, decorators: [{
|
|
592
|
+
type: Directive,
|
|
593
|
+
args: [{
|
|
594
|
+
selector: "[tree-view-branch-text]",
|
|
595
|
+
standalone: true,
|
|
596
|
+
exportAs: "treeViewBranchText",
|
|
597
|
+
}]
|
|
598
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
599
|
+
|
|
600
|
+
class TreeViewBranchTrigger {
|
|
601
|
+
node = input(undefined, /* @ts-ignore */
|
|
602
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
603
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
604
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
605
|
+
constructor() {
|
|
606
|
+
const context = injectTreeViewContext();
|
|
607
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewBranchTrigger", this.node, this.indexPath);
|
|
608
|
+
bindProps({
|
|
609
|
+
elementRef: inject(ElementRef),
|
|
610
|
+
renderer: inject(Renderer2),
|
|
611
|
+
destroyRef: inject(DestroyRef),
|
|
612
|
+
props: () => context.api().getBranchTriggerProps(nodeProps()),
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
616
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewBranchTrigger, isStandalone: true, selector: "[tree-view-branch-trigger]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewBranchTrigger"], ngImport: i0 });
|
|
617
|
+
}
|
|
618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewBranchTrigger, decorators: [{
|
|
619
|
+
type: Directive,
|
|
620
|
+
args: [{
|
|
621
|
+
selector: "[tree-view-branch-trigger]",
|
|
622
|
+
standalone: true,
|
|
623
|
+
exportAs: "treeViewBranchTrigger",
|
|
624
|
+
}]
|
|
625
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
626
|
+
|
|
627
|
+
class TreeViewItem {
|
|
628
|
+
node = input(undefined, /* @ts-ignore */
|
|
629
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
630
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
631
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
632
|
+
constructor() {
|
|
633
|
+
const context = injectTreeViewContext();
|
|
634
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewItem", this.node, this.indexPath);
|
|
635
|
+
bindProps({
|
|
636
|
+
elementRef: inject(ElementRef),
|
|
637
|
+
renderer: inject(Renderer2),
|
|
638
|
+
destroyRef: inject(DestroyRef),
|
|
639
|
+
props: () => context.api().getItemProps(nodeProps()),
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
643
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewItem, isStandalone: true, selector: "[tree-view-item]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewItem"], ngImport: i0 });
|
|
644
|
+
}
|
|
645
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewItem, decorators: [{
|
|
646
|
+
type: Directive,
|
|
647
|
+
args: [{
|
|
648
|
+
selector: "[tree-view-item]",
|
|
649
|
+
standalone: true,
|
|
650
|
+
exportAs: "treeViewItem",
|
|
651
|
+
}]
|
|
652
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
653
|
+
|
|
654
|
+
class TreeViewItemIndicator {
|
|
655
|
+
node = input(undefined, /* @ts-ignore */
|
|
656
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
657
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
658
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
659
|
+
constructor() {
|
|
660
|
+
const context = injectTreeViewContext();
|
|
661
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewItemIndicator", this.node, this.indexPath);
|
|
662
|
+
bindProps({
|
|
663
|
+
elementRef: inject(ElementRef),
|
|
664
|
+
renderer: inject(Renderer2),
|
|
665
|
+
destroyRef: inject(DestroyRef),
|
|
666
|
+
props: () => context.api().getItemIndicatorProps(nodeProps()),
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewItemIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
670
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewItemIndicator, isStandalone: true, selector: "[tree-view-item-indicator]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewItemIndicator"], ngImport: i0 });
|
|
671
|
+
}
|
|
672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewItemIndicator, decorators: [{
|
|
673
|
+
type: Directive,
|
|
674
|
+
args: [{
|
|
675
|
+
selector: "[tree-view-item-indicator]",
|
|
676
|
+
standalone: true,
|
|
677
|
+
exportAs: "treeViewItemIndicator",
|
|
678
|
+
}]
|
|
679
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
680
|
+
|
|
681
|
+
class TreeViewItemText {
|
|
682
|
+
node = input(undefined, /* @ts-ignore */
|
|
683
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
684
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
685
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
686
|
+
constructor() {
|
|
687
|
+
const context = injectTreeViewContext();
|
|
688
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewItemText", this.node, this.indexPath);
|
|
689
|
+
bindProps({
|
|
690
|
+
elementRef: inject(ElementRef),
|
|
691
|
+
renderer: inject(Renderer2),
|
|
692
|
+
destroyRef: inject(DestroyRef),
|
|
693
|
+
props: () => context.api().getItemTextProps(nodeProps()),
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewItemText, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
697
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewItemText, isStandalone: true, selector: "[tree-view-item-text]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewItemText"], ngImport: i0 });
|
|
698
|
+
}
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewItemText, decorators: [{
|
|
700
|
+
type: Directive,
|
|
701
|
+
args: [{
|
|
702
|
+
selector: "[tree-view-item-text]",
|
|
703
|
+
standalone: true,
|
|
704
|
+
exportAs: "treeViewItemText",
|
|
705
|
+
}]
|
|
706
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
707
|
+
|
|
708
|
+
class TreeViewLabel {
|
|
709
|
+
constructor() {
|
|
710
|
+
const context = injectTreeViewContext();
|
|
711
|
+
bindProps({
|
|
712
|
+
elementRef: inject(ElementRef),
|
|
713
|
+
renderer: inject(Renderer2),
|
|
714
|
+
destroyRef: inject(DestroyRef),
|
|
715
|
+
props: () => context.api().getLabelProps(),
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
719
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: TreeViewLabel, isStandalone: true, selector: "[tree-view-label]", exportAs: ["treeViewLabel"], ngImport: i0 });
|
|
720
|
+
}
|
|
721
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewLabel, decorators: [{
|
|
722
|
+
type: Directive,
|
|
723
|
+
args: [{
|
|
724
|
+
selector: "[tree-view-label]",
|
|
725
|
+
standalone: true,
|
|
726
|
+
exportAs: "treeViewLabel",
|
|
727
|
+
}]
|
|
728
|
+
}], ctorParameters: () => [] });
|
|
729
|
+
|
|
730
|
+
class TreeViewNodeCheckbox {
|
|
731
|
+
node = input(undefined, /* @ts-ignore */
|
|
732
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
733
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
734
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
735
|
+
constructor() {
|
|
736
|
+
const context = injectTreeViewContext();
|
|
737
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewNodeCheckbox", this.node, this.indexPath);
|
|
738
|
+
bindProps({
|
|
739
|
+
elementRef: inject(ElementRef),
|
|
740
|
+
renderer: inject(Renderer2),
|
|
741
|
+
destroyRef: inject(DestroyRef),
|
|
742
|
+
props: () => context.api().getNodeCheckboxProps(nodeProps()),
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
746
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewNodeCheckbox, isStandalone: true, selector: "[tree-view-node-checkbox]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewNodeCheckbox"], ngImport: i0 });
|
|
747
|
+
}
|
|
748
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeCheckbox, decorators: [{
|
|
749
|
+
type: Directive,
|
|
750
|
+
args: [{
|
|
751
|
+
selector: "[tree-view-node-checkbox]",
|
|
752
|
+
standalone: true,
|
|
753
|
+
exportAs: "treeViewNodeCheckbox",
|
|
754
|
+
}]
|
|
755
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
756
|
+
|
|
757
|
+
class TreeViewNodeCheckboxIndicator {
|
|
758
|
+
node = input(undefined, /* @ts-ignore */
|
|
759
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
760
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
761
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
762
|
+
state = input(undefined, /* @ts-ignore */
|
|
763
|
+
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
764
|
+
context = injectTreeViewContext();
|
|
765
|
+
nodeProps = createTreeViewNodePropsResolver("TreeViewNodeCheckboxIndicator", this.node, this.indexPath);
|
|
766
|
+
checked = computed(() => this.context.api().getNodeState(this.nodeProps()).checked, /* @ts-ignore */
|
|
767
|
+
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
768
|
+
dataState = computed(() => {
|
|
769
|
+
const checked = this.checked();
|
|
770
|
+
if (checked === "indeterminate")
|
|
771
|
+
return "indeterminate";
|
|
772
|
+
return checked ? "checked" : "unchecked";
|
|
773
|
+
}, /* @ts-ignore */
|
|
774
|
+
...(ngDevMode ? [{ debugName: "dataState" }] : /* istanbul ignore next */ []));
|
|
775
|
+
get hostDataState() {
|
|
776
|
+
return this.dataState();
|
|
777
|
+
}
|
|
778
|
+
ariaHidden = "true";
|
|
779
|
+
get hidden() {
|
|
780
|
+
const state = this.state();
|
|
781
|
+
return state !== undefined && this.dataState() !== state;
|
|
782
|
+
}
|
|
783
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeCheckboxIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
784
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewNodeCheckboxIndicator, isStandalone: true, selector: "[tree-view-node-checkbox-indicator]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-state": "this.hostDataState", "attr.aria-hidden": "this.ariaHidden", "hidden": "this.hidden" } }, exportAs: ["treeViewNodeCheckboxIndicator"], ngImport: i0 });
|
|
785
|
+
}
|
|
786
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeCheckboxIndicator, decorators: [{
|
|
787
|
+
type: Directive,
|
|
788
|
+
args: [{
|
|
789
|
+
selector: "[tree-view-node-checkbox-indicator]",
|
|
790
|
+
standalone: true,
|
|
791
|
+
exportAs: "treeViewNodeCheckboxIndicator",
|
|
792
|
+
}]
|
|
793
|
+
}], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], hostDataState: [{
|
|
794
|
+
type: HostBinding,
|
|
795
|
+
args: ["attr.data-state"]
|
|
796
|
+
}], ariaHidden: [{
|
|
797
|
+
type: HostBinding,
|
|
798
|
+
args: ["attr.aria-hidden"]
|
|
799
|
+
}], hidden: [{
|
|
800
|
+
type: HostBinding,
|
|
801
|
+
args: ["hidden"]
|
|
802
|
+
}] } });
|
|
803
|
+
|
|
804
|
+
class TreeViewNodeRenameInput {
|
|
805
|
+
node = input(undefined, /* @ts-ignore */
|
|
806
|
+
...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
|
|
807
|
+
indexPath = input(undefined, /* @ts-ignore */
|
|
808
|
+
...(ngDevMode ? [{ debugName: "indexPath" }] : /* istanbul ignore next */ []));
|
|
809
|
+
constructor() {
|
|
810
|
+
const context = injectTreeViewContext();
|
|
811
|
+
const nodeProps = createTreeViewNodePropsResolver("TreeViewNodeRenameInput", this.node, this.indexPath);
|
|
812
|
+
bindProps({
|
|
813
|
+
elementRef: inject(ElementRef),
|
|
814
|
+
renderer: inject(Renderer2),
|
|
815
|
+
destroyRef: inject(DestroyRef),
|
|
816
|
+
props: () => context.api().getNodeRenameInputProps(nodeProps()),
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeRenameInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
820
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: TreeViewNodeRenameInput, isStandalone: true, selector: "[tree-view-node-rename-input]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, indexPath: { classPropertyName: "indexPath", publicName: "indexPath", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["treeViewNodeRenameInput"], ngImport: i0 });
|
|
821
|
+
}
|
|
822
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewNodeRenameInput, decorators: [{
|
|
823
|
+
type: Directive,
|
|
824
|
+
args: [{
|
|
825
|
+
selector: "[tree-view-node-rename-input]",
|
|
826
|
+
standalone: true,
|
|
827
|
+
exportAs: "treeViewNodeRenameInput",
|
|
828
|
+
}]
|
|
829
|
+
}], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], indexPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "indexPath", required: false }] }] } });
|
|
830
|
+
|
|
831
|
+
class TreeViewTree {
|
|
832
|
+
constructor() {
|
|
833
|
+
const context = injectTreeViewContext();
|
|
834
|
+
bindProps({
|
|
835
|
+
elementRef: inject(ElementRef),
|
|
836
|
+
renderer: inject(Renderer2),
|
|
837
|
+
destroyRef: inject(DestroyRef),
|
|
838
|
+
props: () => context.api().getTreeProps(),
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewTree, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
842
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: TreeViewTree, isStandalone: true, selector: "[tree-view-tree]", exportAs: ["treeViewTree"], ngImport: i0 });
|
|
843
|
+
}
|
|
844
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TreeViewTree, decorators: [{
|
|
845
|
+
type: Directive,
|
|
846
|
+
args: [{
|
|
847
|
+
selector: "[tree-view-tree]",
|
|
848
|
+
standalone: true,
|
|
849
|
+
exportAs: "treeViewTree",
|
|
850
|
+
}]
|
|
851
|
+
}], ctorParameters: () => [] });
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* Generated bundle index. Do not edit.
|
|
855
|
+
*/
|
|
856
|
+
|
|
857
|
+
export { TREE_VIEW_CONTEXT, TREE_VIEW_NODE_CONTEXT, TREE_VIEW_NODE_PROPS_CONTEXT, TreeViewBranch, TreeViewBranchContent, TreeViewBranchControl, TreeViewBranchIndentGuide, TreeViewBranchIndicator, TreeViewBranchText, TreeViewBranchTrigger, TreeViewContext, TreeViewItem, TreeViewItemIndicator, TreeViewItemText, TreeViewLabel, TreeViewNodeCheckbox, TreeViewNodeCheckboxIndicator, TreeViewNodeContext, TreeViewNodeProvider, TreeViewNodeRenameInput, TreeViewRoot, TreeViewRootProvider, TreeViewTree, injectTreeViewContext, injectTreeViewNodeContext, injectTreeViewNodePropsContext, useTreeView };
|
|
858
|
+
//# sourceMappingURL=wirekyt-angular-tree-view.mjs.map
|