carbon-components-angular 5.38.2 → 5.39.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.
Files changed (51) hide show
  1. package/docs/documentation/components/TextareaLabelComponent.html +79 -5
  2. package/docs/documentation/components/TreeNodeComponent.html +87 -50
  3. package/docs/documentation/components/TreeViewComponent.html +106 -15
  4. package/docs/documentation/coverage.html +11 -11
  5. package/docs/documentation/injectables/TreeViewService.html +158 -11
  6. package/docs/documentation/interfaces/Node.html +48 -1
  7. package/docs/documentation/js/search/search_index.js +2 -2
  8. package/docs/documentation/modules/TilesModule/dependencies.svg +92 -92
  9. package/docs/documentation/modules/TilesModule.html +92 -92
  10. package/docs/documentation/modules/TimePickerModule/dependencies.svg +4 -4
  11. package/docs/documentation/modules/TimePickerModule.html +4 -4
  12. package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +31 -31
  13. package/docs/documentation/modules/TimePickerSelectModule.html +31 -31
  14. package/docs/documentation/modules/ToggleModule/dependencies.svg +40 -44
  15. package/docs/documentation/modules/ToggleModule.html +40 -44
  16. package/docs/documentation/modules/ToggletipModule/dependencies.svg +4 -4
  17. package/docs/documentation/modules/ToggletipModule.html +4 -4
  18. package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
  19. package/docs/documentation/modules/TooltipModule.html +4 -4
  20. package/docs/documentation/modules/TreeviewModule/dependencies.svg +30 -30
  21. package/docs/documentation/modules/TreeviewModule.html +30 -30
  22. package/docs/documentation.json +228 -92
  23. package/docs/storybook/{1345.9201efca.iframe.bundle.js → 1345.9eabf5e2.iframe.bundle.js} +1 -1
  24. package/docs/storybook/iframe.html +2 -2
  25. package/docs/storybook/input-textarea-stories.1a3b5e80.iframe.bundle.js +1 -0
  26. package/docs/storybook/main.fef9668a.iframe.bundle.js +1 -0
  27. package/docs/storybook/project.json +1 -1
  28. package/docs/storybook/{runtime~main.b26c0bbe.iframe.bundle.js → runtime~main.193d0e61.iframe.bundle.js} +1 -1
  29. package/docs/storybook/treeview-treeview-stories.1e5a6fb2.iframe.bundle.js +1 -0
  30. package/esm2020/input/textarea-label.component.mjs +8 -2
  31. package/esm2020/treeview/tree-node.component.mjs +21 -10
  32. package/esm2020/treeview/tree-node.types.mjs +1 -1
  33. package/esm2020/treeview/treeview.component.mjs +16 -5
  34. package/esm2020/treeview/treeview.service.mjs +10 -1
  35. package/fesm2015/carbon-components-angular-input.mjs +8 -1
  36. package/fesm2015/carbon-components-angular-input.mjs.map +1 -1
  37. package/fesm2015/carbon-components-angular-treeview.mjs +55 -24
  38. package/fesm2015/carbon-components-angular-treeview.mjs.map +1 -1
  39. package/fesm2020/carbon-components-angular-input.mjs +7 -1
  40. package/fesm2020/carbon-components-angular-input.mjs.map +1 -1
  41. package/fesm2020/carbon-components-angular-treeview.mjs +44 -13
  42. package/fesm2020/carbon-components-angular-treeview.mjs.map +1 -1
  43. package/input/textarea-label.component.d.ts +1 -0
  44. package/package.json +1 -1
  45. package/treeview/tree-node.component.d.ts +2 -1
  46. package/treeview/tree-node.types.d.ts +1 -0
  47. package/treeview/treeview.component.d.ts +5 -0
  48. package/treeview/treeview.service.d.ts +7 -0
  49. package/docs/storybook/input-textarea-stories.51dab44c.iframe.bundle.js +0 -1
  50. package/docs/storybook/main.99dffacb.iframe.bundle.js +0 -1
  51. package/docs/storybook/treeview-treeview-stories.85954a19.iframe.bundle.js +0 -1
@@ -20,11 +20,20 @@ class TreeViewService {
20
20
  */
21
21
  this.isMultiSelect = false;
22
22
  this.selectionSubject = new ReplaySubject(1);
23
+ this.focusNodeSubject = new ReplaySubject(1);
23
24
  /**
24
25
  * Hold's list of selected nodes and preserves order
25
26
  */
26
27
  this.value = new Map();
27
28
  this.selectionObservable = this.selectionSubject.asObservable();
29
+ this.focusNodeObservable = this.focusNodeSubject.asObservable();
30
+ }
31
+ /**
32
+ * Emits the focused node
33
+ * @param node: Node
34
+ */
35
+ focusNode(node) {
36
+ this.focusNodeSubject.next(node);
28
37
  }
29
38
  /**
30
39
  * Store selected node in map
@@ -72,6 +81,7 @@ class TreeNodeComponent {
72
81
  this.id = `tree-node-${TreeNodeComponent.treeNodeCount++}`;
73
82
  this.active = false;
74
83
  this.disabled = false;
84
+ this.selectable = true;
75
85
  this.expanded = false;
76
86
  this.selected = false;
77
87
  this.gap = 0;
@@ -95,6 +105,7 @@ class TreeNodeComponent {
95
105
  this.id = node.id ?? this.id;
96
106
  this.active = node.active ?? this.active;
97
107
  this.disabled = node.disabled ?? this.disabled;
108
+ this.selectable = node.selectable ?? this.selectable;
98
109
  this.expanded = node.expanded ?? this.expanded;
99
110
  this.label = node.label ?? this.label;
100
111
  this.labelContext = node.labelContext ?? this.labelContext;
@@ -121,8 +132,8 @@ class TreeNodeComponent {
121
132
  ngOnInit() {
122
133
  // Highlight the node
123
134
  this.subscription = this.treeViewService.selectionObservable.subscribe((value) => {
124
- this.selected = value.has(this.id);
125
- this.active = this.selected;
135
+ this.selected = this.selectable && value.has(this.id);
136
+ this.active = this.selectable && this.selected;
126
137
  });
127
138
  }
128
139
  /**
@@ -137,11 +148,16 @@ class TreeNodeComponent {
137
148
  */
138
149
  nodeClick(event) {
139
150
  if (!this.disabled) {
140
- this.selected = true;
141
- this.active = true;
142
151
  event.target.parentElement.focus();
143
- // Passes event to all nodes to update highlighting & parent to emit
144
- this.treeViewService.selectNode({ id: this.id, label: this.label, value: this.value });
152
+ if (this.selectable || this.children.length === 0) {
153
+ this.selected = true;
154
+ this.active = true;
155
+ // Passes event to all nodes to update highlighting & parent to emit
156
+ this.treeViewService.selectNode({ id: this.id, label: this.label, value: this.value });
157
+ }
158
+ else {
159
+ this.toggleExpanded(event);
160
+ }
145
161
  }
146
162
  }
147
163
  /**
@@ -164,7 +180,9 @@ class TreeNodeComponent {
164
180
  return this.depth + this.gap + 2.5;
165
181
  }
166
182
  emitFocusEvent(event) {
167
- this.nodeFocus.emit({ node: { id: this.id, label: this.label, value: this.value }, event });
183
+ const node = { id: this.id, label: this.label, value: this.value };
184
+ this.nodeFocus.emit({ node, event });
185
+ this.treeViewService.focusNode(node);
168
186
  }
169
187
  emitBlurEvent(event) {
170
188
  this.nodeBlur.emit({ node: { id: this.id, label: this.label, value: this.value }, event });
@@ -213,7 +231,7 @@ class TreeNodeComponent {
213
231
  }
214
232
  TreeNodeComponent.treeNodeCount = 0;
215
233
  TreeNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeNodeComponent, deps: [{ token: TreeViewService }], target: i0.ɵɵFactoryTarget.Component });
216
- TreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TreeNodeComponent, selector: "cds-tree-node", inputs: { id: "id", active: "active", disabled: "disabled", expanded: "expanded", label: "label", labelContext: "labelContext", selected: "selected", value: "value", icon: "icon", iconContext: "iconContext", gap: "gap", children: "children", depth: "depth", node: "node" }, outputs: { nodeFocus: "nodeFocus", nodeBlur: "nodeBlur", nodeSelect: "nodeSelect", nodetoggle: "nodetoggle" }, ngImport: i0, template: `
234
+ TreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TreeNodeComponent, selector: "cds-tree-node", inputs: { id: "id", active: "active", disabled: "disabled", selectable: "selectable", expanded: "expanded", label: "label", labelContext: "labelContext", selected: "selected", value: "value", icon: "icon", iconContext: "iconContext", gap: "gap", children: "children", depth: "depth", node: "node" }, outputs: { nodeFocus: "nodeFocus", nodeBlur: "nodeBlur", nodeSelect: "nodeSelect", nodetoggle: "nodetoggle" }, ngImport: i0, template: `
217
235
  <div
218
236
  [id]="id"
219
237
  class="cds--tree-node"
@@ -313,7 +331,7 @@ TreeNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
313
331
  </ng-template>
314
332
  </div>
315
333
  </div>
316
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: TreeNodeComponent, selector: "cds-tree-node", inputs: ["id", "active", "disabled", "expanded", "label", "labelContext", "selected", "value", "icon", "iconContext", "gap", "children", "depth", "node"], outputs: ["nodeFocus", "nodeBlur", "nodeSelect", "nodetoggle"] }] });
334
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: TreeNodeComponent, selector: "cds-tree-node", inputs: ["id", "active", "disabled", "selectable", "expanded", "label", "labelContext", "selected", "value", "icon", "iconContext", "gap", "children", "depth", "node"], outputs: ["nodeFocus", "nodeBlur", "nodeSelect", "nodetoggle"] }] });
317
335
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeNodeComponent, decorators: [{
318
336
  type: Component,
319
337
  args: [{
@@ -426,6 +444,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
426
444
  type: Input
427
445
  }], disabled: [{
428
446
  type: Input
447
+ }], selectable: [{
448
+ type: Input
429
449
  }], expanded: [{
430
450
  type: Input
431
451
  }], label: [{
@@ -504,11 +524,9 @@ class TreeViewComponent {
504
524
  this.subscription = this.treeViewService.selectionObservable.subscribe((nodesMap) => {
505
525
  // Get all values from the map to emit
506
526
  const nodes = [...nodesMap.values()];
507
- // Update focus to reset arrow key traversal
508
- // Select the current highlight node as the last node, since we preserve order in map
509
- this.treeWalker.currentNode = this.elementRef.nativeElement.querySelector(`#${CSS.escape(nodes[nodes.length - 1].id)}`);
510
527
  this.select.emit(this.treeViewService.isMultiSelect ? nodes : nodes[0]);
511
528
  });
529
+ this.subscription.add(this.treeViewService.focusNodeObservable.subscribe(node => this.onNodeFocusChange(node)));
512
530
  }
513
531
  ngOnDestroy() {
514
532
  this.subscription.unsubscribe();
@@ -541,6 +559,19 @@ class TreeViewComponent {
541
559
  this.treeWalker.nextNode()?.focus();
542
560
  }
543
561
  }
562
+ /**
563
+ * Node focus change
564
+ * @param node - Node
565
+ */
566
+ onNodeFocusChange(node) {
567
+ if (!node) {
568
+ // if for some reason the focused node is not defined we fallback on the root element of the treeview
569
+ this.treeWalker.currentNode = this.treeWalker.root;
570
+ return;
571
+ }
572
+ // Update current node based on focus change to have a better keyboard navigation experience
573
+ this.treeWalker.currentNode = this.elementRef.nativeElement.querySelector(`#${CSS.escape(node.id)}`);
574
+ }
544
575
  isTemplate(value) {
545
576
  return value instanceof TemplateRef;
546
577
  }
@@ -592,7 +623,7 @@ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
592
623
  </cds-tree-node>
593
624
  </ng-template>
594
625
  </div>
595
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TreeNodeComponent, selector: "cds-tree-node", inputs: ["id", "active", "disabled", "expanded", "label", "labelContext", "selected", "value", "icon", "iconContext", "gap", "children", "depth", "node"], outputs: ["nodeFocus", "nodeBlur", "nodeSelect", "nodetoggle"] }] });
626
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: TreeNodeComponent, selector: "cds-tree-node", inputs: ["id", "active", "disabled", "selectable", "expanded", "label", "labelContext", "selected", "value", "icon", "iconContext", "gap", "children", "depth", "node"], outputs: ["nodeFocus", "nodeBlur", "nodeSelect", "nodetoggle"] }] });
596
627
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TreeViewComponent, decorators: [{
597
628
  type: Component,
598
629
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"carbon-components-angular-treeview.mjs","sources":["../../src/treeview/treeview.service.ts","../../src/treeview/tree-node.component.ts","../../src/treeview/treeview.component.ts","../../src/treeview/treeview.module.ts","../../src/treeview/carbon-components-angular-treeview.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\nimport { Observable, ReplaySubject } from \"rxjs\";\nimport { Node } from \"./tree-node.types\";\n\n@Injectable()\nexport class TreeViewService {\n\tselectionObservable: Observable<any | any[]>;\n\t/**\n\t * Variable used across all nodes and wrapper to determine if we should allow content projection\n\t * or generate the tree\n\t *\n\t * Value is updated by passing a value to `tree` input in wrapper component.\n\t */\n\tcontentProjected = true;\n\t/**\n\t * **Experimental**\n\t */\n\tisMultiSelect = false;\n\n\tprivate selectionSubject = new ReplaySubject<Map<string, Node>>(1);\n\n\t/**\n\t * Hold's list of selected nodes and preserves order\n\t */\n\tprivate value = new Map();\n\n\tconstructor() {\n\t\tthis.selectionObservable = this.selectionSubject.asObservable();\n\t}\n\n\t/**\n\t * Store selected node in map\n\t * @param node: Node\n\t */\n\tselectNode(node: Node) {\n\t\tif (!node) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Since multiselect is not enabled, we clear existing map\n\t\tif (!this.isMultiSelect) {\n\t\t\tthis.value.clear();\n\t\t}\n\t\tthis.value.set(node.id, node);\n\t\tthis.selectionSubject.next(this.value);\n\t}\n\n\t/**\n\t * Removes selected node from the map\n\t * @param node: Node\n\t */\n\tdeselectNode(node: Node) {\n\t\tif (!node) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value.delete(node.id);\n\t\tthis.selectionSubject.next(this.value);\n\t}\n\n\t/**\n\t * Removes all selected nodes from the map\n\t */\n\tdeselectAllNodes() {\n\t\tthis.value.clear();\n\t\tthis.selectionSubject.next(this.value);\n\t}\n}\n","import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tOnInit,\n\tOnDestroy,\n\tAfterContentInit,\n\tTemplateRef,\n\tAfterContentChecked\n} from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\nimport { TreeViewService } from \"./treeview.service\";\nimport { Node } from \"./tree-node.types\";\n\n@Component({\n\tselector: \"cds-tree-node\",\n\ttemplate: `\n\t\t<div\n\t\t\t[id]=\"id\"\n\t\t\tclass=\"cds--tree-node\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--tree-node--active': active,\n\t\t\t\t'cds--tree-node--disabled': disabled,\n\t\t\t\t'cds--tree-node--selected': selected,\n\t\t\t\t'cds--tree-leaf-node': !children.length,\n\t\t\t\t'cds--tree-parent-node': children.length,\n\t\t\t\t'cds--tree-node--with-icon': icon\n\t\t\t}\"\n\t\t\t[attr.aria-expanded]=\"expanded || null\"\n\t\t\t[attr.aria-current]=\"active || null\"\n\t\t\t[attr.aria-selected]=\"disabled ? null : selected\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\trole=\"treeitem\"\n\t\t\t[attr.tabindex]=\"selected ? 0 : -1\"\n\t\t\t(focus)=\"emitFocusEvent($event)\"\n\t\t\t(blur)=\"emitBlurEvent($event)\"\n\t\t\t(keydown)=\"navigateTree($event)\">\n\t\t\t<div\n\t\t\t\t*ngIf=\"!children.length\"\n\t\t\t\tclass=\"cds--tree-node__label\"\n\t\t\t\t[style.padding-inline-start.rem]=\"offset\"\n\t\t\t\t[style.margin-inline-start.rem]=\"-offset\"\n\t\t\t\t(click)=\"nodeClick($event)\">\n\t\t\t\t<!-- Icon -->\n\t\t\t\t<ng-container *ngIf=\"icon && !isTemplate(icon)\">\n\t\t\t\t\t<svg\n\t\t\t\t\t\tclass=\"cds--tree-node__icon\"\n\t\t\t\t\t\t[cdsIcon]=\"icon\"\n\t\t\t\t\t\tsize=\"16\">\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(icon)\" [ngTemplateOutlet]=\"icon\"></ng-template>\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t<ng-template\n\t\t\t\t\t*ngIf=\"isTemplate(label)\"\n\t\t\t\t\t[ngTemplateOutlet]=\"label\"\n\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: labelContext }\">\n\t\t\t\t</ng-template>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\t*ngIf=\"children.length\"\n\t\t\t\tclass=\"cds--tree-node__label\"\n\t\t\t\t[style.padding-inline-start.rem]=\"offset\"\n\t\t\t\t[style.margin-inline-start.rem]=\"-offset\"\n\t\t\t\trole=\"group\"\n\t\t\t\t(click)=\"nodeClick($event)\">\n\t\t\t\t<span\n\t\t\t\t\tclass=\"cds--tree-parent-node__toggle\"\n\t\t\t\t\t[attr.disabled]=\"disabled || null\"\n\t\t\t\t\t(click)=\"toggleExpanded($event)\">\n\t\t\t\t\t<svg\n\t\t\t\t\t\tclass=\"cds--tree-parent-node__toggle-icon\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--tree-parent-node__toggle-icon--expanded' : expanded}\"\n\t\t\t\t\t\tibmIcon=\"caret--down\"\n\t\t\t\t\t\tsize=\"16\">\n\t\t\t\t\t</svg>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"cds--tree-node__label__details\">\n\t\t\t\t\t<!-- Icon -->\n\t\t\t\t\t<ng-container *ngIf=\"icon && !isTemplate(icon)\">\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tclass=\"cds--tree-node__icon\"\n\t\t\t\t\t\t\t[cdsIcon]=\"icon\"\n\t\t\t\t\t\t\tsize=\"16\">\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ng-container>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t*ngIf=\"isTemplate(icon)\"\n\t\t\t\t\t\t[ngTemplateOutlet]=\"icon\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: iconContext }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t*ngIf=\"isTemplate(label)\"\n\t\t\t\t\t\t[ngTemplateOutlet]=\"label\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: labelContext }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\t*ngIf=\"expanded\"\n\t\t\t\trole=\"group\"\n\t\t\t\tclass=\"cds--tree-node__children\">\n\t\t\t\t<ng-container *ngIf=\"isProjected(); else notProjected\">\n\t\t\t\t\t<ng-content></ng-content>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template #notProjected>\n\t\t\t\t\t<cds-tree-node\n\t\t\t\t\t\t*ngFor=\"let childNode of children\"\n\t\t\t\t\t\t[node]=\"childNode\"\n\t\t\t\t\t\t[depth]=\"depth + 1\"\n\t\t\t\t\t\t[disabled]=\"disabled\">\n\t\t\t\t\t</cds-tree-node>\n\t\t\t\t</ng-template>\n\t\t\t</div>\n\t\t</div>\n\t`\n})\nexport class TreeNodeComponent implements AfterContentChecked, OnInit, OnDestroy {\n\tstatic treeNodeCount = 0;\n\t@Input() id = `tree-node-${TreeNodeComponent.treeNodeCount++}`;\n\t@Input() active = false;\n\t@Input() disabled = false;\n\t@Input() expanded = false;\n\t@Input() label: string | TemplateRef<any>;\n\t@Input() labelContext: any;\n\t@Input() selected = false;\n\t@Input() value;\n\t@Input() icon: string | TemplateRef<any>;\n\t@Input() iconContext: any;\n\t@Input() gap = 0;\n\t@Input() children: Node[] = [];\n\n\t/**\n\t * Determines the depth of the node\n\t * Calculated by default when passing `Node` array to `TreeViewComponent`, manual entry required otherwise\n\t */\n\t@Input() depth = 0;\n\n\t/**\n\t * Simple way to set all attributes of Node component via node object\n\t * Would simplify setting component attributes when dynamically rendering node.\n\t */\n\t@Input() set node(node: Node) {\n\t\tthis._node = node;\n\n\t\tthis.id = node.id ?? this.id;\n\t\tthis.active = node.active ?? this.active;\n\t\tthis.disabled = node.disabled ?? this.disabled;\n\t\tthis.expanded = node.expanded ?? this.expanded;\n\t\tthis.label = node.label ?? this.label;\n\t\tthis.labelContext = node.labelContext ?? this.labelContext;\n\t\tthis.value = node.value ?? this.value;\n\t\tthis.icon = node.icon ?? this.icon;\n\t\tthis.selected = node.selected ?? this.selected;\n\t\tthis.depth = node.depth ?? this.depth;\n\t\tthis.gap = node.gap ?? this.gap;\n\t\tthis.children = node.children ?? this.children;\n\t\tthis.iconContext = node.iconText ?? this.iconContext;\n\t}\n\n\tget node() {\n\t\treturn this._node;\n\t}\n\n\t@Output() nodeFocus = new EventEmitter();\n\t@Output() nodeBlur = new EventEmitter();\n\t@Output() nodeSelect = new EventEmitter();\n\t@Output() nodetoggle = new EventEmitter();\n\n\toffset;\n\tprivate _node;\n\tprivate subscription: Subscription;\n\n\tconstructor(private treeViewService: TreeViewService) {}\n\n\t/**\n\t * Caclulate offset for margin/padding\n\t */\n\tngAfterContentChecked(): void {\n\t\tthis.offset = this.calculateOffset();\n\t}\n\n\t/**\n\t * Highlight the node\n\t */\n\tngOnInit(): void {\n\t\t// Highlight the node\n\t\tthis.subscription = this.treeViewService.selectionObservable.subscribe((value: Map<string, Node>) => {\n\t\t\tthis.selected = value.has(this.id);\n\t\t\tthis.active = this.selected;\n\t\t});\n\t}\n\n\t/**\n\t * Unsubscribe from subscriptions\n\t */\n\tngOnDestroy(): void {\n\t\tthis.subscription?.unsubscribe();\n\t}\n\n\t/**\n\t * Selects the node and emits the event from the tree view component\n\t * @param event\n\t */\n\tnodeClick(event) {\n\t\tif (!this.disabled) {\n\t\t\tthis.selected = true;\n\t\t\tthis.active = true;\n\t\t\tevent.target.parentElement.focus();\n\t\t\t// Passes event to all nodes to update highlighting & parent to emit\n\t\t\tthis.treeViewService.selectNode({ id: this.id, label: this.label, value: this.value });\n\t\t}\n\t}\n\n\t/**\n\t * Calculate the node offset\n\t * @returns Number\n\t */\n\tcalculateOffset() {\n\t\t// Parent node with icon\n\t\tif (this.children.length && this.icon) {\n\t\t\treturn this.depth + 1 + this.depth * 0.5;\n\t\t}\n\n\t\t// parent node without icon\n\t\tif (this.children.length) {\n\t\t\treturn this.depth + 1;\n\t\t}\n\n\t\t// leaf node with icon\n\t\tif (this.icon) {\n\t\t\treturn this.depth + 2 + this.depth * 0.5;\n\t\t}\n\n\t\treturn this.depth + this.gap + 2.5;\n\t}\n\n\temitFocusEvent(event) {\n\t\tthis.nodeFocus.emit({ node: { id: this.id, label: this.label, value: this.value }, event });\n\t}\n\n\temitBlurEvent(event) {\n\t\tthis.nodeBlur.emit({ node: { id: this.id, label: this.label, value: this.value }, event });\n\t}\n\n\t/**\n\t * Expand children if not disabled\n\t * @param event: Event\n\t */\n\ttoggleExpanded(event) {\n\t\tif (!this.disabled) {\n\t\t\tthis.nodetoggle.emit({ node: { id: this.id, label: this.label, value: this.value }, event });\n\t\t\tthis.expanded = !this.expanded;\n\t\t\t// Prevent selection of the node\n\t\t\tevent.stopPropagation();\n\t\t}\n\t}\n\n\t/**\n\t * Manages the keyboard accessibility for children expansion & selection\n\t */\n\tnavigateTree(event: KeyboardEvent) {\n\t\tif (event.key === \"ArrowLeft\" || event.key === \"ArrowRight\" || event.key === \"Enter\") {\n\t\t\tevent.stopPropagation();\n\t\t}\n\t\t// Unexpand\n\t\tif (event.key === \"ArrowLeft\") {\n\t\t\tif (this.expanded && this.children) {\n\t\t\t\tthis.toggleExpanded(event);\n\t\t\t}\n\t\t}\n\n\t\tif (event.key === \"ArrowRight\") {\n\t\t\tif (!this.expanded && this.children) {\n\t\t\t\tthis.toggleExpanded(event);\n\t\t\t}\n\t\t}\n\n\t\tif (event.key === \"Enter\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.nodeClick(event);\n\t\t}\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\tpublic isProjected() {\n\t\treturn this.treeViewService.contentProjected;\n\t}\n}\n","import { DOCUMENT } from \"@angular/common\";\nimport {\n\tComponent,\n\tInput,\n\tOutput,\n\tTemplateRef,\n\tEventEmitter,\n\tAfterViewInit,\n\tInject,\n\tViewChild,\n\tElementRef,\n\tOnInit,\n\tOnDestroy\n} from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\nimport { Node } from \"./tree-node.types\";\nimport { TreeViewService } from \"./treeview.service\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TreeviewModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tree-view--basic)\n */\n@Component({\n\tselector: \"cds-tree-view\",\n\ttemplate: `\n\t\t<label\n\t\t\t*ngIf=\"label\"\n\t\t\t[id]=\"id\"\n\t\t\tclass=\"cds--label\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"isTemplate(label)\"\n\t\t\t\t[ngTemplateOutlet]=\"label\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: labelContext }\">\n\t\t\t</ng-template>\n\t\t</label>\n\t\t<div\n\t\t\tclass=\"cds--tree\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--tree--sm': size === 'sm',\n\t\t\t\t'cds--tree--xs': size === 'xs'\n\t\t\t}\"\n\t\t\t[attr.aria-label]=\"label ? label : null\"\n\t\t\t[attr.aria-labelledby]=\"!label ? id : null\"\n\t\t\t[attr.aria-multiselectable]=\"isMultiSelect || null\"\n\t\t\trole=\"tree\"\n\t\t\t(keydown)=\"navigateTree($event)\"\n\t\t\t#treeWrapper>\n\t\t\t<ng-container *ngIf=\"isProjected(); else notProjected\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</ng-container>\n\t\t\t<ng-template #notProjected>\n\t\t\t\t<cds-tree-node\n\t\t\t\t\t*ngFor=\"let node of tree\"\n\t\t\t\t\t[node]=\"node\">\n\t\t\t\t</cds-tree-node>\n\t\t\t</ng-template>\n\t\t</div>\n\t`,\n\tproviders: [TreeViewService]\n})\nexport class TreeViewComponent implements AfterViewInit, OnInit, OnDestroy {\n\t/**\n\t * Pass `Node[]` array to have tree view render the nodes\n\t * Passing value will disregard projected content\n\t */\n\t@Input() set tree(treeNodes: Node[]) {\n\t\tthis._tree = treeNodes.map((node) => this.copyNode(node));\n\t\tthis.treeViewService.contentProjected = false;\n\t}\n\n\tget tree() {\n\t\treturn this._tree;\n\t}\n\n\tstatic treeViewCount = 0;\n\n\t@Input() id = `tree-view-${TreeViewComponent.treeViewCount++}`;\n\t/**\n\t * Tree view label\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Optional context for label if it's a template\n\t */\n\t@Input() labelContext: any;\n\t/**\n\t * Specify the size of the list items in the tree\n\t */\n\t@Input() size: \"xs\" | \"sm\" = \"sm\";\n\t/**\n\t * **Experimental** - Enable to select multiple nodes\n\t */\n\t@Input() set isMultiSelect(isMulti: boolean) {\n\t\tthis.treeViewService.isMultiSelect = isMulti;\n\t}\n\n\t@Output() select = new EventEmitter<Node | Node[]>();\n\t@ViewChild(\"treeWrapper\") root: ElementRef;\n\n\tprivate treeWalker: TreeWalker;\n\tprivate _tree: Node[] = [];\n\tprivate subscription: Subscription;\n\n\tconstructor(\n\t\t@Inject(DOCUMENT) private document: Document,\n\t\tpublic treeViewService: TreeViewService,\n\t\tprivate elementRef: ElementRef\n\t) {}\n\n\t/**\n\t * Subscribe for node selection\n\t */\n\tngOnInit(): void {\n\t\tthis.subscription = this.treeViewService.selectionObservable.subscribe((nodesMap: Map<string, Node>) => {\n\t\t\t// Get all values from the map to emit\n\t\t\tconst nodes = [...nodesMap.values()];\n\n\t\t\t// Update focus to reset arrow key traversal\n\t\t\t// Select the current highlight node as the last node, since we preserve order in map\n\t\t\tthis.treeWalker.currentNode = this.elementRef.nativeElement.querySelector(`#${CSS.escape(nodes[nodes.length - 1].id)}`);\n\t\t\tthis.select.emit(this.treeViewService.isMultiSelect ? nodes : nodes[0]);\n\t\t});\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.subscription.unsubscribe();\n\t}\n\n\t/**\n\t * Initialize tree walker to support keyboard navigation\n\t */\n\tngAfterViewInit(): void {\n\t\tthis.treeWalker = this.document.createTreeWalker(this.root.nativeElement, NodeFilter.SHOW_ELEMENT, {\n\t\t\tacceptNode: function (node: HTMLElement) {\n\t\t\t\tif (node.classList.contains(`cds--tree-node--disabled`)) {\n\t\t\t\t\treturn NodeFilter.FILTER_REJECT;\n\t\t\t\t}\n\t\t\t\tif (node.matches(`div.cds--tree-node`)) {\n\t\t\t\t\treturn NodeFilter.FILTER_ACCEPT;\n\t\t\t\t}\n\t\t\t\treturn NodeFilter.FILTER_SKIP;\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Navigate tree using tree walker\n\t * @param event - KeyboardEvent\n\t */\n\tnavigateTree(event: KeyboardEvent) {\n\t\tif (event.key === \"ArrowUp\") {\n\t\t\t(this.treeWalker.previousNode() as HTMLElement)?.focus();\n\t\t}\n\n\t\tif (event.key === \"ArrowDown\") {\n\t\t\t(this.treeWalker.nextNode() as HTMLElement)?.focus();\n\t\t}\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\tpublic isProjected() {\n\t\treturn this.treeViewService.contentProjected;\n\t}\n\n\tprivate copyNode(node: Node): Node {\n\t\t// making a recursive shallow copy to avoid performance issues when deeply cloning templateRefs if defined in the node\n\t\tconst copiedNode = Object.assign({}, node);\n\t\tif (node.children) {\n\t\t copiedNode.children = node.children.map(child => this.copyNode(child));\n\t\t}\n\t\treturn copiedNode;\n\t}\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { IconModule } from \"carbon-components-angular/icon\";\n\nimport { TreeViewComponent } from \"./treeview.component\";\nimport { TreeNodeComponent } from \"./tree-node.component\";\n\n@NgModule({\n\tdeclarations: [TreeViewComponent, TreeNodeComponent],\n\texports: [TreeViewComponent, TreeNodeComponent],\n\timports: [CommonModule, IconModule]\n})\nexport class TreeviewModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TreeViewService","i3.TreeNodeComponent"],"mappings":";;;;;;;;MAKa,eAAe,CA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AAc,EAAA,OAAA,EAAA,CAFhB,YAAY,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAEtB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;AAC/C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACnC,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"carbon-components-angular-treeview.mjs","sources":["../../src/treeview/treeview.service.ts","../../src/treeview/tree-node.component.ts","../../src/treeview/treeview.component.ts","../../src/treeview/treeview.module.ts","../../src/treeview/carbon-components-angular-treeview.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\nimport { Observable, ReplaySubject } from \"rxjs\";\nimport { Node } from \"./tree-node.types\";\n\n@Injectable()\nexport class TreeViewService {\n\tselectionObservable: Observable<any | any[]>;\n\tfocusNodeObservable: Observable<Node>;\n\t/**\n\t * Variable used across all nodes and wrapper to determine if we should allow content projection\n\t * or generate the tree\n\t *\n\t * Value is updated by passing a value to `tree` input in wrapper component.\n\t */\n\tcontentProjected = true;\n\t/**\n\t * **Experimental**\n\t */\n\tisMultiSelect = false;\n\n\tprivate selectionSubject = new ReplaySubject<Map<string, Node>>(1);\n\tprivate focusNodeSubject = new ReplaySubject<Node>(1);\n\n\t/**\n\t * Hold's list of selected nodes and preserves order\n\t */\n\tprivate value = new Map();\n\n\tconstructor() {\n\t\tthis.selectionObservable = this.selectionSubject.asObservable();\n\t\tthis.focusNodeObservable = this.focusNodeSubject.asObservable();\n\t}\n\n\t/**\n\t * Emits the focused node\n\t * @param node: Node\n\t */\n\tfocusNode(node: Node) {\n\t\tthis.focusNodeSubject.next(node);\n\t}\n\n\t/**\n\t * Store selected node in map\n\t * @param node: Node\n\t */\n\tselectNode(node: Node) {\n\t\tif (!node) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Since multiselect is not enabled, we clear existing map\n\t\tif (!this.isMultiSelect) {\n\t\t\tthis.value.clear();\n\t\t}\n\t\tthis.value.set(node.id, node);\n\t\tthis.selectionSubject.next(this.value);\n\t}\n\n\t/**\n\t * Removes selected node from the map\n\t * @param node: Node\n\t */\n\tdeselectNode(node: Node) {\n\t\tif (!node) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value.delete(node.id);\n\t\tthis.selectionSubject.next(this.value);\n\t}\n\n\t/**\n\t * Removes all selected nodes from the map\n\t */\n\tdeselectAllNodes() {\n\t\tthis.value.clear();\n\t\tthis.selectionSubject.next(this.value);\n\t}\n}\n","import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tOnInit,\n\tOnDestroy,\n\tAfterContentInit,\n\tTemplateRef,\n\tAfterContentChecked\n} from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\nimport { TreeViewService } from \"./treeview.service\";\nimport { Node } from \"./tree-node.types\";\n\n@Component({\n\tselector: \"cds-tree-node\",\n\ttemplate: `\n\t\t<div\n\t\t\t[id]=\"id\"\n\t\t\tclass=\"cds--tree-node\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--tree-node--active': active,\n\t\t\t\t'cds--tree-node--disabled': disabled,\n\t\t\t\t'cds--tree-node--selected': selected,\n\t\t\t\t'cds--tree-leaf-node': !children.length,\n\t\t\t\t'cds--tree-parent-node': children.length,\n\t\t\t\t'cds--tree-node--with-icon': icon\n\t\t\t}\"\n\t\t\t[attr.aria-expanded]=\"expanded || null\"\n\t\t\t[attr.aria-current]=\"active || null\"\n\t\t\t[attr.aria-selected]=\"disabled ? null : selected\"\n\t\t\t[attr.aria-disabled]=\"disabled\"\n\t\t\trole=\"treeitem\"\n\t\t\t[attr.tabindex]=\"selected ? 0 : -1\"\n\t\t\t(focus)=\"emitFocusEvent($event)\"\n\t\t\t(blur)=\"emitBlurEvent($event)\"\n\t\t\t(keydown)=\"navigateTree($event)\">\n\t\t\t<div\n\t\t\t\t*ngIf=\"!children.length\"\n\t\t\t\tclass=\"cds--tree-node__label\"\n\t\t\t\t[style.padding-inline-start.rem]=\"offset\"\n\t\t\t\t[style.margin-inline-start.rem]=\"-offset\"\n\t\t\t\t(click)=\"nodeClick($event)\">\n\t\t\t\t<!-- Icon -->\n\t\t\t\t<ng-container *ngIf=\"icon && !isTemplate(icon)\">\n\t\t\t\t\t<svg\n\t\t\t\t\t\tclass=\"cds--tree-node__icon\"\n\t\t\t\t\t\t[cdsIcon]=\"icon\"\n\t\t\t\t\t\tsize=\"16\">\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(icon)\" [ngTemplateOutlet]=\"icon\"></ng-template>\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t<ng-template\n\t\t\t\t\t*ngIf=\"isTemplate(label)\"\n\t\t\t\t\t[ngTemplateOutlet]=\"label\"\n\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: labelContext }\">\n\t\t\t\t</ng-template>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\t*ngIf=\"children.length\"\n\t\t\t\tclass=\"cds--tree-node__label\"\n\t\t\t\t[style.padding-inline-start.rem]=\"offset\"\n\t\t\t\t[style.margin-inline-start.rem]=\"-offset\"\n\t\t\t\trole=\"group\"\n\t\t\t\t(click)=\"nodeClick($event)\">\n\t\t\t\t<span\n\t\t\t\t\tclass=\"cds--tree-parent-node__toggle\"\n\t\t\t\t\t[attr.disabled]=\"disabled || null\"\n\t\t\t\t\t(click)=\"toggleExpanded($event)\">\n\t\t\t\t\t<svg\n\t\t\t\t\t\tclass=\"cds--tree-parent-node__toggle-icon\"\n\t\t\t\t\t\t[ngClass]=\"{'cds--tree-parent-node__toggle-icon--expanded' : expanded}\"\n\t\t\t\t\t\tibmIcon=\"caret--down\"\n\t\t\t\t\t\tsize=\"16\">\n\t\t\t\t\t</svg>\n\t\t\t\t</span>\n\t\t\t\t<span class=\"cds--tree-node__label__details\">\n\t\t\t\t\t<!-- Icon -->\n\t\t\t\t\t<ng-container *ngIf=\"icon && !isTemplate(icon)\">\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tclass=\"cds--tree-node__icon\"\n\t\t\t\t\t\t\t[cdsIcon]=\"icon\"\n\t\t\t\t\t\t\tsize=\"16\">\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</ng-container>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t*ngIf=\"isTemplate(icon)\"\n\t\t\t\t\t\t[ngTemplateOutlet]=\"icon\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: iconContext }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t\t<ng-template\n\t\t\t\t\t\t*ngIf=\"isTemplate(label)\"\n\t\t\t\t\t\t[ngTemplateOutlet]=\"label\"\n\t\t\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: labelContext }\">\n\t\t\t\t\t</ng-template>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\t*ngIf=\"expanded\"\n\t\t\t\trole=\"group\"\n\t\t\t\tclass=\"cds--tree-node__children\">\n\t\t\t\t<ng-container *ngIf=\"isProjected(); else notProjected\">\n\t\t\t\t\t<ng-content></ng-content>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template #notProjected>\n\t\t\t\t\t<cds-tree-node\n\t\t\t\t\t\t*ngFor=\"let childNode of children\"\n\t\t\t\t\t\t[node]=\"childNode\"\n\t\t\t\t\t\t[depth]=\"depth + 1\"\n\t\t\t\t\t\t[disabled]=\"disabled\">\n\t\t\t\t\t</cds-tree-node>\n\t\t\t\t</ng-template>\n\t\t\t</div>\n\t\t</div>\n\t`\n})\nexport class TreeNodeComponent implements AfterContentChecked, OnInit, OnDestroy {\n\tstatic treeNodeCount = 0;\n\t@Input() id = `tree-node-${TreeNodeComponent.treeNodeCount++}`;\n\t@Input() active = false;\n\t@Input() disabled = false;\n\t@Input() selectable = true;\n\t@Input() expanded = false;\n\t@Input() label: string | TemplateRef<any>;\n\t@Input() labelContext: any;\n\t@Input() selected = false;\n\t@Input() value;\n\t@Input() icon: string | TemplateRef<any>;\n\t@Input() iconContext: any;\n\t@Input() gap = 0;\n\t@Input() children: Node[] = [];\n\n\t/**\n\t * Determines the depth of the node\n\t * Calculated by default when passing `Node` array to `TreeViewComponent`, manual entry required otherwise\n\t */\n\t@Input() depth = 0;\n\n\t/**\n\t * Simple way to set all attributes of Node component via node object\n\t * Would simplify setting component attributes when dynamically rendering node.\n\t */\n\t@Input() set node(node: Node) {\n\t\tthis._node = node;\n\n\t\tthis.id = node.id ?? this.id;\n\t\tthis.active = node.active ?? this.active;\n\t\tthis.disabled = node.disabled ?? this.disabled;\n\t\tthis.selectable = node.selectable ?? this.selectable;\n\t\tthis.expanded = node.expanded ?? this.expanded;\n\t\tthis.label = node.label ?? this.label;\n\t\tthis.labelContext = node.labelContext ?? this.labelContext;\n\t\tthis.value = node.value ?? this.value;\n\t\tthis.icon = node.icon ?? this.icon;\n\t\tthis.selected = node.selected ?? this.selected;\n\t\tthis.depth = node.depth ?? this.depth;\n\t\tthis.gap = node.gap ?? this.gap;\n\t\tthis.children = node.children ?? this.children;\n\t\tthis.iconContext = node.iconText ?? this.iconContext;\n\t}\n\n\tget node() {\n\t\treturn this._node;\n\t}\n\n\t@Output() nodeFocus = new EventEmitter();\n\t@Output() nodeBlur = new EventEmitter();\n\t@Output() nodeSelect = new EventEmitter();\n\t@Output() nodetoggle = new EventEmitter();\n\n\toffset;\n\tprivate _node;\n\tprivate subscription: Subscription;\n\n\tconstructor(private treeViewService: TreeViewService) {}\n\n\t/**\n\t * Caclulate offset for margin/padding\n\t */\n\tngAfterContentChecked(): void {\n\t\tthis.offset = this.calculateOffset();\n\t}\n\n\t/**\n\t * Highlight the node\n\t */\n\tngOnInit(): void {\n\t\t// Highlight the node\n\t\tthis.subscription = this.treeViewService.selectionObservable.subscribe((value: Map<string, Node>) => {\n\t\t\tthis.selected = this.selectable && value.has(this.id);\n\t\t\tthis.active = this.selectable && this.selected;\n\t\t});\n\t}\n\n\t/**\n\t * Unsubscribe from subscriptions\n\t */\n\tngOnDestroy(): void {\n\t\tthis.subscription?.unsubscribe();\n\t}\n\n\t/**\n\t * Selects the node and emits the event from the tree view component\n\t * @param event\n\t */\n\tnodeClick(event) {\n\t\tif (!this.disabled) {\n\t\t\tevent.target.parentElement.focus();\n\t\t\tif (this.selectable || this.children.length === 0) {\n\t\t\t\tthis.selected = true;\n\t\t\t\tthis.active = true;\n\t\t\t\t// Passes event to all nodes to update highlighting & parent to emit\n\t\t\t\tthis.treeViewService.selectNode({ id: this.id, label: this.label, value: this.value });\n\t\t\t} else {\n\t\t\t\tthis.toggleExpanded(event);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Calculate the node offset\n\t * @returns Number\n\t */\n\tcalculateOffset() {\n\t\t// Parent node with icon\n\t\tif (this.children.length && this.icon) {\n\t\t\treturn this.depth + 1 + this.depth * 0.5;\n\t\t}\n\n\t\t// parent node without icon\n\t\tif (this.children.length) {\n\t\t\treturn this.depth + 1;\n\t\t}\n\n\t\t// leaf node with icon\n\t\tif (this.icon) {\n\t\t\treturn this.depth + 2 + this.depth * 0.5;\n\t\t}\n\n\t\treturn this.depth + this.gap + 2.5;\n\t}\n\n\temitFocusEvent(event) {\n\t\tconst node = { id: this.id, label: this.label, value: this.value }\n\t\tthis.nodeFocus.emit({ node, event });\n\t\tthis.treeViewService.focusNode(node);\n\t}\n\n\temitBlurEvent(event) {\n\t\tthis.nodeBlur.emit({ node: { id: this.id, label: this.label, value: this.value }, event });\n\t}\n\n\t/**\n\t * Expand children if not disabled\n\t * @param event: Event\n\t */\n\ttoggleExpanded(event) {\n\t\tif (!this.disabled) {\n\t\t\tthis.nodetoggle.emit({ node: { id: this.id, label: this.label, value: this.value }, event });\n\t\t\tthis.expanded = !this.expanded;\n\t\t\t// Prevent selection of the node\n\t\t\tevent.stopPropagation();\n\t\t}\n\t}\n\n\t/**\n\t * Manages the keyboard accessibility for children expansion & selection\n\t */\n\tnavigateTree(event: KeyboardEvent) {\n\t\tif (event.key === \"ArrowLeft\" || event.key === \"ArrowRight\" || event.key === \"Enter\") {\n\t\t\tevent.stopPropagation();\n\t\t}\n\t\t// Unexpand\n\t\tif (event.key === \"ArrowLeft\") {\n\t\t\tif (this.expanded && this.children) {\n\t\t\t\tthis.toggleExpanded(event);\n\t\t\t}\n\t\t}\n\n\t\tif (event.key === \"ArrowRight\") {\n\t\t\tif (!this.expanded && this.children) {\n\t\t\t\tthis.toggleExpanded(event);\n\t\t\t}\n\t\t}\n\n\t\tif (event.key === \"Enter\") {\n\t\t\tevent.preventDefault();\n\t\t\tthis.nodeClick(event);\n\t\t}\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\tpublic isProjected() {\n\t\treturn this.treeViewService.contentProjected;\n\t}\n}\n","import { DOCUMENT } from \"@angular/common\";\nimport {\n\tComponent,\n\tInput,\n\tOutput,\n\tTemplateRef,\n\tEventEmitter,\n\tAfterViewInit,\n\tInject,\n\tViewChild,\n\tElementRef,\n\tOnInit,\n\tOnDestroy\n} from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\nimport { Node } from \"./tree-node.types\";\nimport { TreeViewService } from \"./treeview.service\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TreeviewModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tree-view--basic)\n */\n@Component({\n\tselector: \"cds-tree-view\",\n\ttemplate: `\n\t\t<label\n\t\t\t*ngIf=\"label\"\n\t\t\t[id]=\"id\"\n\t\t\tclass=\"cds--label\">\n\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t<ng-template\n\t\t\t\t*ngIf=\"isTemplate(label)\"\n\t\t\t\t[ngTemplateOutlet]=\"label\"\n\t\t\t\t[ngTemplateOutletContext]=\"{ $implicit: labelContext }\">\n\t\t\t</ng-template>\n\t\t</label>\n\t\t<div\n\t\t\tclass=\"cds--tree\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--tree--sm': size === 'sm',\n\t\t\t\t'cds--tree--xs': size === 'xs'\n\t\t\t}\"\n\t\t\t[attr.aria-label]=\"label ? label : null\"\n\t\t\t[attr.aria-labelledby]=\"!label ? id : null\"\n\t\t\t[attr.aria-multiselectable]=\"isMultiSelect || null\"\n\t\t\trole=\"tree\"\n\t\t\t(keydown)=\"navigateTree($event)\"\n\t\t\t#treeWrapper>\n\t\t\t<ng-container *ngIf=\"isProjected(); else notProjected\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</ng-container>\n\t\t\t<ng-template #notProjected>\n\t\t\t\t<cds-tree-node\n\t\t\t\t\t*ngFor=\"let node of tree\"\n\t\t\t\t\t[node]=\"node\">\n\t\t\t\t</cds-tree-node>\n\t\t\t</ng-template>\n\t\t</div>\n\t`,\n\tproviders: [TreeViewService]\n})\nexport class TreeViewComponent implements AfterViewInit, OnInit, OnDestroy {\n\t/**\n\t * Pass `Node[]` array to have tree view render the nodes\n\t * Passing value will disregard projected content\n\t */\n\t@Input() set tree(treeNodes: Node[]) {\n\t\tthis._tree = treeNodes.map((node) => this.copyNode(node));\n\t\tthis.treeViewService.contentProjected = false;\n\t}\n\n\tget tree() {\n\t\treturn this._tree;\n\t}\n\n\tstatic treeViewCount = 0;\n\n\t@Input() id = `tree-view-${TreeViewComponent.treeViewCount++}`;\n\t/**\n\t * Tree view label\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Optional context for label if it's a template\n\t */\n\t@Input() labelContext: any;\n\t/**\n\t * Specify the size of the list items in the tree\n\t */\n\t@Input() size: \"xs\" | \"sm\" = \"sm\";\n\t/**\n\t * **Experimental** - Enable to select multiple nodes\n\t */\n\t@Input() set isMultiSelect(isMulti: boolean) {\n\t\tthis.treeViewService.isMultiSelect = isMulti;\n\t}\n\n\t@Output() select = new EventEmitter<Node | Node[]>();\n\t@ViewChild(\"treeWrapper\") root: ElementRef;\n\n\tprivate treeWalker: TreeWalker;\n\tprivate _tree: Node[] = [];\n\tprivate subscription: Subscription;\n\n\tconstructor(\n\t\t@Inject(DOCUMENT) private document: Document,\n\t\tpublic treeViewService: TreeViewService,\n\t\tprivate elementRef: ElementRef\n\t) {}\n\n\t/**\n\t * Subscribe for node selection\n\t */\n\tngOnInit(): void {\n\t\tthis.subscription = this.treeViewService.selectionObservable.subscribe((nodesMap: Map<string, Node>) => {\n\t\t\t// Get all values from the map to emit\n\t\t\tconst nodes = [...nodesMap.values()];\n\n\t\t\tthis.select.emit(this.treeViewService.isMultiSelect ? nodes : nodes[0]);\n\t\t});\n\t\tthis.subscription.add(this.treeViewService.focusNodeObservable.subscribe(node => this.onNodeFocusChange(node)));\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.subscription.unsubscribe();\n\t}\n\n\t/**\n\t * Initialize tree walker to support keyboard navigation\n\t */\n\tngAfterViewInit(): void {\n\t\tthis.treeWalker = this.document.createTreeWalker(this.root.nativeElement, NodeFilter.SHOW_ELEMENT, {\n\t\t\tacceptNode: function (node: HTMLElement) {\n\t\t\t\tif (node.classList.contains(`cds--tree-node--disabled`)) {\n\t\t\t\t\treturn NodeFilter.FILTER_REJECT;\n\t\t\t\t}\n\t\t\t\tif (node.matches(`div.cds--tree-node`)) {\n\t\t\t\t\treturn NodeFilter.FILTER_ACCEPT;\n\t\t\t\t}\n\t\t\t\treturn NodeFilter.FILTER_SKIP;\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Navigate tree using tree walker\n\t * @param event - KeyboardEvent\n\t */\n\tnavigateTree(event: KeyboardEvent) {\n\t\tif (event.key === \"ArrowUp\") {\n\t\t\t(this.treeWalker.previousNode() as HTMLElement)?.focus();\n\t\t}\n\n\t\tif (event.key === \"ArrowDown\") {\n\t\t\t(this.treeWalker.nextNode() as HTMLElement)?.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Node focus change\n\t * @param node - Node\n\t */\n\tonNodeFocusChange(node: Node) {\n\t\tif (!node) {\n\t\t\t// if for some reason the focused node is not defined we fallback on the root element of the treeview\n\t\t\tthis.treeWalker.currentNode = this.treeWalker.root;\n\t\t\treturn;\n\t\t}\n\t\t// Update current node based on focus change to have a better keyboard navigation experience\n\t\tthis.treeWalker.currentNode = this.elementRef.nativeElement.querySelector(`#${CSS.escape(node.id)}`);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\tpublic isProjected() {\n\t\treturn this.treeViewService.contentProjected;\n\t}\n\n\tprivate copyNode(node: Node): Node {\n\t\t// making a recursive shallow copy to avoid performance issues when deeply cloning templateRefs if defined in the node\n\t\tconst copiedNode = Object.assign({}, node);\n\t\tif (node.children) {\n\t\t copiedNode.children = node.children.map(child => this.copyNode(child));\n\t\t}\n\t\treturn copiedNode;\n\t}\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { IconModule } from \"carbon-components-angular/icon\";\n\nimport { TreeViewComponent } from \"./treeview.component\";\nimport { TreeNodeComponent } from \"./tree-node.component\";\n\n@NgModule({\n\tdeclarations: [TreeViewComponent, TreeNodeComponent],\n\texports: [TreeViewComponent, TreeNodeComponent],\n\timports: [CommonModule, IconModule]\n})\nexport class TreeviewModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TreeViewService","i3.TreeNodeComponent"],"mappings":";;;;;;;;MAKa,eAAe,CAAA;AAuB3B,IAAA,WAAA,GAAA;AApBA;;;;;AAKG;QACH,IAAgB,CAAA,gBAAA,GAAG,IAAI,CAAC;AACxB;;AAEG;QACH,IAAa,CAAA,aAAA,GAAG,KAAK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/C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACnC,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
@@ -89,6 +89,7 @@ export declare class TextareaLabelComponent implements AfterViewInit {
89
89
  wrapper: ElementRef<HTMLDivElement>;
90
90
  textArea: TextArea;
91
91
  labelClass: boolean;
92
+ get isReadonly(): boolean;
92
93
  /**
93
94
  * Creates an instance of Label.
94
95
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-components-angular",
3
- "version": "5.38.2",
3
+ "version": "5.39.0",
4
4
  "description": "Next generation components",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -28,6 +28,7 @@ export declare class TreeNodeComponent implements AfterContentChecked, OnInit, O
28
28
  id: string;
29
29
  active: boolean;
30
30
  disabled: boolean;
31
+ selectable: boolean;
31
32
  expanded: boolean;
32
33
  label: string | TemplateRef<any>;
33
34
  labelContext: any;
@@ -92,5 +93,5 @@ export declare class TreeNodeComponent implements AfterContentChecked, OnInit, O
92
93
  isTemplate(value: any): boolean;
93
94
  isProjected(): boolean;
94
95
  static ɵfac: i0.ɵɵFactoryDeclaration<TreeNodeComponent, never>;
95
- static ɵcmp: i0.ɵɵComponentDeclaration<TreeNodeComponent, "cds-tree-node", never, { "id": "id"; "active": "active"; "disabled": "disabled"; "expanded": "expanded"; "label": "label"; "labelContext": "labelContext"; "selected": "selected"; "value": "value"; "icon": "icon"; "iconContext": "iconContext"; "gap": "gap"; "children": "children"; "depth": "depth"; "node": "node"; }, { "nodeFocus": "nodeFocus"; "nodeBlur": "nodeBlur"; "nodeSelect": "nodeSelect"; "nodetoggle": "nodetoggle"; }, never, ["*"], false>;
96
+ static ɵcmp: i0.ɵɵComponentDeclaration<TreeNodeComponent, "cds-tree-node", never, { "id": "id"; "active": "active"; "disabled": "disabled"; "selectable": "selectable"; "expanded": "expanded"; "label": "label"; "labelContext": "labelContext"; "selected": "selected"; "value": "value"; "icon": "icon"; "iconContext": "iconContext"; "gap": "gap"; "children": "children"; "depth": "depth"; "node": "node"; }, { "nodeFocus": "nodeFocus"; "nodeBlur": "nodeBlur"; "nodeSelect": "nodeSelect"; "nodetoggle": "nodetoggle"; }, never, ["*"], false>;
96
97
  }
@@ -26,6 +26,7 @@ export interface Node {
26
26
  id?: string;
27
27
  active?: boolean;
28
28
  disabled?: boolean;
29
+ selectable?: boolean;
29
30
  expanded?: boolean;
30
31
  selected?: boolean;
31
32
  icon?: string | TemplateRef<any>;
@@ -79,6 +79,11 @@ export declare class TreeViewComponent implements AfterViewInit, OnInit, OnDestr
79
79
  * @param event - KeyboardEvent
80
80
  */
81
81
  navigateTree(event: KeyboardEvent): void;
82
+ /**
83
+ * Node focus change
84
+ * @param node - Node
85
+ */
86
+ onNodeFocusChange(node: Node): void;
82
87
  isTemplate(value: any): boolean;
83
88
  isProjected(): boolean;
84
89
  private copyNode;
@@ -23,6 +23,7 @@ import { Node } from "./tree-node.types";
23
23
  import * as i0 from "@angular/core";
24
24
  export declare class TreeViewService {
25
25
  selectionObservable: Observable<any | any[]>;
26
+ focusNodeObservable: Observable<Node>;
26
27
  /**
27
28
  * Variable used across all nodes and wrapper to determine if we should allow content projection
28
29
  * or generate the tree
@@ -35,11 +36,17 @@ export declare class TreeViewService {
35
36
  */
36
37
  isMultiSelect: boolean;
37
38
  private selectionSubject;
39
+ private focusNodeSubject;
38
40
  /**
39
41
  * Hold's list of selected nodes and preserves order
40
42
  */
41
43
  private value;
42
44
  constructor();
45
+ /**
46
+ * Emits the focused node
47
+ * @param node: Node
48
+ */
49
+ focusNode(node: Node): void;
43
50
  /**
44
51
  * Store selected node in map
45
52
  * @param node: Node
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[2399],{"./src/input/textarea.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,Skeleton:()=>Skeleton,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/input/index.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Input/Text area",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_1__.gP]})],component:___WEBPACK_IMPORTED_MODULE_1__.y8},Basic=(args=>({props:args,template:'\n <cds-textarea-label\n [helperText]="helperText"\n [invalid]="invalid"\n [disabled]="disabled"\n [invalidText]="invalidText"\n [warn]="warn"\n [warnText]="warnText">\n {{label}}\n <textarea\n cdsTextArea\n [placeholder]="placeholder"\n [invalid]="invalid"\n [disabled]="disabled"\n [theme]="theme"\n [rows]="rows"\n [cols]="cols"\n aria-label="textarea"></textarea>\n </cds-textarea-label>\n '})).bind({});Basic.args={disabled:!1,invalid:!1,invalidText:"Invalid entry",warn:!1,warnText:"This is a warning!",label:"Text input label",helperText:"Optional helper text",placeholder:"Placeholder",cols:50,rows:4,autocomplete:"on",theme:"dark"},Basic.argTypes={autocomplete:{options:["on","off"],control:"radio"},theme:{options:["light","dark"],control:"radio"}};const Skeleton=(args=>({props:args,template:'\n <cds-textarea-label skeleton="true">\n <div cdsTextArea skeleton="true"></div>\n </cds-textarea-label>\n '})).bind({});Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-textarea-label\n [helperText]="helperText"\n [invalid]="invalid"\n [disabled]="disabled"\n [invalidText]="invalidText"\n [warn]="warn"\n [warnText]="warnText">\n {{label}}\n <textarea\n cdsTextArea\n [placeholder]="placeholder"\n [invalid]="invalid"\n [disabled]="disabled"\n [theme]="theme"\n [rows]="rows"\n [cols]="cols"\n aria-label="textarea"></textarea>\n </cds-textarea-label>\n `\n})',...Basic.parameters?.docs?.source}}},Skeleton.parameters={...Skeleton.parameters,docs:{...Skeleton.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-textarea-label skeleton="true">\n <div cdsTextArea skeleton="true"></div>\n </cds-textarea-label>\n `\n})',...Skeleton.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","Skeleton"]}}]);