@daffodil/design 0.91.0 → 0.92.3-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/accordion/README.md +26 -38
  2. package/accordion/index.d.ts +2 -2
  3. package/article/README.md +66 -46
  4. package/article/index.d.ts +22 -1
  5. package/article/src/article-theme.scss +12 -0
  6. package/breadcrumb/README.md +6 -1
  7. package/breadcrumb/index.d.ts +65 -11
  8. package/breadcrumb/src/breadcrumb-theme.scss +1 -1
  9. package/button/README.md +36 -33
  10. package/button/index.d.ts +26 -5
  11. package/button/src/button/basic/button-theme.scss +4 -2
  12. package/button/src/button/button-base.scss +26 -3
  13. package/button/src/button/icon/icon-theme.scss +10 -6
  14. package/button/src/button/raised/raised-theme.scss +4 -2
  15. package/callout/README.md +15 -27
  16. package/card/README.md +36 -61
  17. package/container/README.md +18 -23
  18. package/fesm2022/daffodil-design-accordion.mjs +13 -13
  19. package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
  20. package/fesm2022/daffodil-design-article.mjs +168 -26
  21. package/fesm2022/daffodil-design-article.mjs.map +1 -1
  22. package/fesm2022/daffodil-design-breadcrumb.mjs +180 -28
  23. package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
  24. package/fesm2022/daffodil-design-button.mjs +83 -42
  25. package/fesm2022/daffodil-design-button.mjs.map +1 -1
  26. package/fesm2022/daffodil-design-callout.mjs +23 -23
  27. package/fesm2022/daffodil-design-callout.mjs.map +1 -1
  28. package/fesm2022/daffodil-design-card.mjs +33 -33
  29. package/fesm2022/daffodil-design-card.mjs.map +1 -1
  30. package/fesm2022/daffodil-design-checkbox.mjs +13 -13
  31. package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
  32. package/fesm2022/daffodil-design-container.mjs +8 -8
  33. package/fesm2022/daffodil-design-container.mjs.map +1 -1
  34. package/fesm2022/daffodil-design-form-field.mjs +26 -26
  35. package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
  36. package/fesm2022/daffodil-design-form.mjs +9 -9
  37. package/fesm2022/daffodil-design-form.mjs.map +1 -1
  38. package/fesm2022/daffodil-design-hero.mjs +23 -23
  39. package/fesm2022/daffodil-design-hero.mjs.map +1 -1
  40. package/fesm2022/daffodil-design-image.mjs +8 -8
  41. package/fesm2022/daffodil-design-image.mjs.map +1 -1
  42. package/fesm2022/daffodil-design-input.mjs +18 -14
  43. package/fesm2022/daffodil-design-input.mjs.map +1 -1
  44. package/fesm2022/daffodil-design-link-set.mjs +25 -17
  45. package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
  46. package/fesm2022/daffodil-design-list.mjs +16 -16
  47. package/fesm2022/daffodil-design-list.mjs.map +1 -1
  48. package/fesm2022/daffodil-design-loading-icon.mjs +8 -8
  49. package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
  50. package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
  51. package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
  52. package/fesm2022/daffodil-design-menu.mjs +223 -60
  53. package/fesm2022/daffodil-design-menu.mjs.map +1 -1
  54. package/fesm2022/daffodil-design-modal.mjs +33 -29
  55. package/fesm2022/daffodil-design-modal.mjs.map +1 -1
  56. package/fesm2022/daffodil-design-native-select.mjs +47 -41
  57. package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
  58. package/fesm2022/daffodil-design-navbar.mjs +25 -21
  59. package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
  60. package/fesm2022/daffodil-design-notification.mjs +16 -16
  61. package/fesm2022/daffodil-design-notification.mjs.map +1 -1
  62. package/fesm2022/daffodil-design-paginator.mjs +7 -7
  63. package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
  64. package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
  65. package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
  66. package/fesm2022/daffodil-design-quantity-field.mjs +17 -14
  67. package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
  68. package/fesm2022/daffodil-design-radio.mjs +16 -16
  69. package/fesm2022/daffodil-design-radio.mjs.map +1 -1
  70. package/fesm2022/daffodil-design-select.mjs +6 -6
  71. package/fesm2022/daffodil-design-select.mjs.map +1 -1
  72. package/fesm2022/daffodil-design-sidebar.mjs +25 -25
  73. package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
  74. package/fesm2022/daffodil-design-spinner.mjs +99 -0
  75. package/fesm2022/daffodil-design-spinner.mjs.map +1 -0
  76. package/fesm2022/daffodil-design-switch.mjs +3 -3
  77. package/fesm2022/daffodil-design-switch.mjs.map +1 -1
  78. package/fesm2022/daffodil-design-tabs.mjs +15 -15
  79. package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
  80. package/fesm2022/daffodil-design-tag.mjs +7 -7
  81. package/fesm2022/daffodil-design-tag.mjs.map +1 -1
  82. package/fesm2022/daffodil-design-text-snippet.mjs +6 -8
  83. package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
  84. package/fesm2022/daffodil-design-textarea.mjs +6 -3
  85. package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
  86. package/fesm2022/daffodil-design-toast.mjs +23 -25
  87. package/fesm2022/daffodil-design-toast.mjs.map +1 -1
  88. package/fesm2022/daffodil-design-tree.mjs +152 -103
  89. package/fesm2022/daffodil-design-tree.mjs.map +1 -1
  90. package/fesm2022/daffodil-design-youtube-player.mjs +6 -6
  91. package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
  92. package/fesm2022/daffodil-design.mjs +385 -326
  93. package/fesm2022/daffodil-design.mjs.map +1 -1
  94. package/form-field/README.md +50 -85
  95. package/form-field/index.d.ts +11 -9
  96. package/hero/README.md +5 -5
  97. package/image/README.md +2 -2
  98. package/index.d.ts +184 -270
  99. package/input/README.md +4 -4
  100. package/input/index.d.ts +4 -3
  101. package/link-set/index.d.ts +9 -1
  102. package/list/README.md +2 -2
  103. package/loading-icon/README.md +1 -1
  104. package/loading-icon/index.d.ts +1 -1
  105. package/media-gallery/README.md +3 -3
  106. package/menu/README.md +107 -10
  107. package/menu/index.d.ts +143 -11
  108. package/modal/README.md +1 -1
  109. package/modal/index.d.ts +23 -15
  110. package/native-select/README.md +4 -4
  111. package/native-select/index.d.ts +8 -7
  112. package/navbar/README.md +23 -17
  113. package/navbar/index.d.ts +12 -2
  114. package/navbar/src/navbar-theme.scss +4 -46
  115. package/notification/README.md +4 -4
  116. package/package.json +1 -1
  117. package/paginator/README.md +42 -6
  118. package/paginator/index.d.ts +4 -2
  119. package/progress-bar/README.md +3 -3
  120. package/quantity-field/README.md +4 -4
  121. package/quantity-field/index.d.ts +4 -1
  122. package/radio/README.md +1 -1
  123. package/scss/theme.scss +7 -1
  124. package/scss/theming/_color-palettes.scss +0 -6
  125. package/select/README.md +4 -4
  126. package/sidebar/README.md +6 -6
  127. package/spinner/README.md +57 -0
  128. package/spinner/index.d.ts +53 -0
  129. package/spinner/src/spinner-theme.scss +62 -0
  130. package/switch/README.md +4 -4
  131. package/switch/index.d.ts +2 -2
  132. package/tabs/README.md +1 -1
  133. package/tabs/index.d.ts +2 -2
  134. package/tag/README.md +24 -30
  135. package/tag/index.d.ts +1 -1
  136. package/text-snippet/README.md +1 -1
  137. package/text-snippet/src/text-snippet-theme.scss +12 -0
  138. package/textarea/README.md +4 -4
  139. package/textarea/index.d.ts +4 -4
  140. package/toast/README.md +4 -4
  141. package/tree/README.md +39 -22
  142. package/tree/index.d.ts +57 -90
@@ -1,7 +1,7 @@
1
- import { NgTemplateOutlet, CommonModule } from '@angular/common';
1
+ import { NgTemplateOutlet, DOCUMENT, CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Inject, ContentChild, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, DOCUMENT, Directive, NgModule } from '@angular/core';
4
- import * as i2 from '@daffodil/design';
3
+ import { Inject, inject, input, computed, signal, contentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, effect, untracked, Directive, NgModule } from '@angular/core';
4
+ import * as i1 from '@daffodil/design';
5
5
  import { DaffArticleEncapsulatedDirective } from '@daffodil/design';
6
6
  import { __decorate } from 'tslib';
7
7
  import { BehaviorSubject } from 'rxjs';
@@ -132,7 +132,7 @@ const traverse = (tree, visit, key) => {
132
132
  };
133
133
 
134
134
  const daffDataTreeToUiTree = (data, parent, open = false) => ({
135
- id: data.id ?? data.title,
135
+ id: parent ? `${parent.id}.${data.id ?? data.title}` : (data.id ?? data.title),
136
136
  title: data.title,
137
137
  url: data.url,
138
138
  data: data.data,
@@ -144,10 +144,18 @@ const daffDataTreeToUiTree = (data, parent, open = false) => ({
144
144
  * This function translates the original data given to us by the client
145
145
  * to the internal representation of the tree used by the {@link DaffTreeComponent}
146
146
  */
147
- const hydrateTree = (data) => {
148
- const tree = daffDataTreeToUiTree(data, undefined, true);
147
+ const hydrateTree = (data, treeId) => {
148
+ const root = {
149
+ id: treeId ?? (data.id ?? data.title),
150
+ title: data.title,
151
+ url: data.url,
152
+ data: data.data,
153
+ open: true,
154
+ parent: undefined,
155
+ items: [],
156
+ };
149
157
  let treeStack = [
150
- tree,
158
+ root,
151
159
  ];
152
160
  traverse(data, (el) => {
153
161
  const treeEl = treeStack.pop();
@@ -158,10 +166,11 @@ const hydrateTree = (data) => {
158
166
  ];
159
167
  return el;
160
168
  }, 'items');
161
- return tree;
169
+ return root;
162
170
  };
163
171
 
164
172
  /* eslint-disable quote-props */
173
+ let daffTreeId = 0;
165
174
  /**
166
175
  * The `DaffTreeComponent` allows you to render tree structures as interactable UI.
167
176
  *
@@ -182,54 +191,73 @@ const hydrateTree = (data) => {
182
191
  *
183
192
  */
184
193
  class DaffTreeComponent {
185
- /**
186
- * @docs-private
187
- */
188
- constructor(notifier) {
189
- this.notifier = notifier;
194
+ constructor() {
195
+ this.notifier = inject(DaffTreeNotifierService);
196
+ /**
197
+ * The rendering mode for nodes in the tree.
198
+ *
199
+ * Default value is `in-dom`, which means nodes are present in the DOM.
200
+ *
201
+ * Generally, `not-in-dom` is faster as there are less DOM elements to render,
202
+ * but there may be use-cases (like SEO) where having the tree in the DOM
203
+ * is relevant.
204
+ */
205
+ this.renderMode = input(...(ngDevMode ? [undefined, { debugName: "renderMode" }] : []));
206
+ /**
207
+ * A unique identifier for the tree instance.
208
+ * Used as a prefix for all node IDs in the tree.
209
+ * If not provided, an auto-incrementing number is used.
210
+ */
211
+ this.id = input(`${daffTreeId++}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
212
+ /**
213
+ * The tree data you would like to render.
214
+ */
215
+ this.tree = input(...(ngDevMode ? [undefined, { debugName: "tree" }] : []));
190
216
  /**
191
217
  * The internal tree element.
192
218
  */
193
- this._tree = undefined;
219
+ this._tree = computed(() => {
220
+ const tree = this.tree();
221
+ return tree ? hydrateTree(tree, this.id()) : undefined;
222
+ }, ...(ngDevMode ? [{ debugName: "_tree" }] : []));
223
+ /**
224
+ * A revision counter incremented by notifications from tree items.
225
+ * Used to trigger re-flattening when tree item state changes.
226
+ */
227
+ this._revision = signal(0, ...(ngDevMode ? [{ debugName: "_revision" }] : []));
194
228
  /**
195
229
  * @docs-private
196
230
  *
197
231
  * The flattened tree data. For debugging purposes, you can iterate through this if you want to inspect
198
232
  * the resulting array structure we computed to render the tree.
199
233
  */
200
- this.flatTree = [];
201
- }
202
- /**
203
- * @docs-private
204
- */
205
- ngOnChanges(changes) {
206
- if (!changes.tree.currentValue) {
207
- this._tree = undefined;
208
- this.flatTree = [];
209
- return;
210
- }
211
- if (changes.renderMode && !changes.tree) {
212
- this.flatTree = flattenTree(this._tree, changes.renderMode.currentValue === 'not-in-dom');
213
- }
214
- else if (changes.renderMode || changes.tree) {
215
- this._tree = hydrateTree(changes.tree?.currentValue ?? this.tree);
216
- this.flatTree = flattenTree(this._tree, (changes.renderMode?.currentValue ?? this.renderMode) === 'not-in-dom');
217
- }
218
- }
219
- /**
220
- * @docs-private
221
- */
222
- ngOnInit() {
234
+ this.flatTree = computed(() => {
235
+ this._revision();
236
+ const tree = this._tree();
237
+ return tree ? flattenTree(tree, this.renderMode() === 'not-in-dom') : [];
238
+ }, ...(ngDevMode ? [{ debugName: "flatTree" }] : []));
239
+ /**
240
+ * The template used to render tree-nodes that themselves have children.
241
+ *
242
+ * @docs-private
243
+ */
244
+ this.withChildrenTemplate = contentChild('daffTreeItemWithChildrenTpl', ...(ngDevMode ? [{ debugName: "withChildrenTemplate" }] : []));
245
+ /**
246
+ * The template used to render tree-nodes that have no children.
247
+ *
248
+ * @docs-private
249
+ */
250
+ this.treeItemTemplate = contentChild('daffTreeItemTpl', ...(ngDevMode ? [{ debugName: "treeItemTemplate" }] : []));
223
251
  this.notifier.notice$.subscribe(() => {
224
- this.flatTree = flattenTree(this._tree, this.renderMode === 'not-in-dom');
252
+ this._revision.update((r) => r + 1);
225
253
  });
226
254
  }
227
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTreeComponent, deps: [{ token: DaffTreeNotifierService }], target: i0.ɵɵFactoryTarget.Component }); }
228
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffTreeComponent, isStandalone: true, selector: "ul[daff-tree]", inputs: { renderMode: "renderMode", tree: "tree" }, host: { classAttribute: "daff-tree" }, providers: [
255
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
256
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffTreeComponent, isStandalone: true, selector: "ul[daff-tree]", inputs: { renderMode: { classPropertyName: "renderMode", publicName: "renderMode", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, tree: { classPropertyName: "tree", publicName: "tree", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "daff-tree" }, providers: [
229
257
  DaffTreeNotifierService,
230
- ], queries: [{ propertyName: "withChildrenTemplate", first: true, predicate: ["daffTreeItemWithChildrenTpl"], descendants: true, static: true }, { propertyName: "treeItemTemplate", first: true, predicate: ["daffTreeItemTpl"], descendants: true, static: true }], usesOnChanges: true, hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }], ngImport: i0, template: "@for (node of flatTree; track node.id) {\n\t<li [attr.aria-level]=\"node.level\" [class.hidden]=\"!node.visible\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"node.hasChildren ? withChildrenTemplate : treeItemTemplate; context: { $implicit: node }\">\n\t\t</ng-container>\n\t</li>\n}", styles: [".daff-tree{margin:0;padding:0;list-style:none;--tree-padding: 1rem}.daff-tree li.hidden{display:none}.daff-tree-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;position:relative;background:none;border:0;padding:.5rem 1rem .5rem 0;line-height:1.5rem;font-weight:400;text-align:left;text-decoration:none;width:100%;padding-left:calc(var(--tree-padding) * (var(--depth)))}.daff-tree-item:before{content:\"\";position:absolute;top:0;bottom:0;left:0;width:.25rem}.daff-tree-item:focus,.daff-tree-item:focus-visible{z-index:1}.daff-tree-item.selected{font-weight:500}.daff-tree-item.parent{position:relative;padding-right:2.5rem}.daff-tree-item.parent:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-tree-item.parent.open:after{top:56%;transform:translateY(-50%) rotate(225deg)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
258
+ ], queries: [{ propertyName: "withChildrenTemplate", first: true, predicate: ["daffTreeItemWithChildrenTpl"], descendants: true, isSignal: true }, { propertyName: "treeItemTemplate", first: true, predicate: ["daffTreeItemTpl"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DaffArticleEncapsulatedDirective }], ngImport: i0, template: "@for (node of flatTree(); track node.id) {\n\t<li [attr.aria-level]=\"node.level\" [class.hidden]=\"!node.visible\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"node.hasChildren ? withChildrenTemplate() : treeItemTemplate(); context: { $implicit: node }\">\n\t\t</ng-container>\n\t</li>\n}", styles: [".daff-tree{margin:0;padding:0;list-style:none;--tree-padding: 1rem}.daff-tree li.hidden{display:none}.daff-tree-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;position:relative;background:none;border:0;padding:.5rem 1rem .5rem 0;line-height:1.5rem;font-weight:400;text-align:left;text-decoration:none;width:100%;padding-left:calc(var(--tree-padding) * (var(--depth)))}.daff-tree-item:before{content:\"\";position:absolute;top:0;bottom:0;left:0;width:.25rem}.daff-tree-item:focus,.daff-tree-item:focus-visible{z-index:1}.daff-tree-item.selected{font-weight:500}.daff-tree-item.parent{position:relative;padding-right:2.5rem}.daff-tree-item.parent:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-tree-item.parent.open:after{top:56%;transform:translateY(-50%) rotate(225deg)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
231
259
  }
232
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTreeComponent, decorators: [{
260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTreeComponent, decorators: [{
233
261
  type: Component,
234
262
  args: [{ selector: 'ul[daff-tree]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
235
263
  DaffTreeNotifierService,
@@ -239,18 +267,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
239
267
  'class': 'daff-tree',
240
268
  }, imports: [
241
269
  NgTemplateOutlet,
242
- ], template: "@for (node of flatTree; track node.id) {\n\t<li [attr.aria-level]=\"node.level\" [class.hidden]=\"!node.visible\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"node.hasChildren ? withChildrenTemplate : treeItemTemplate; context: { $implicit: node }\">\n\t\t</ng-container>\n\t</li>\n}", styles: [".daff-tree{margin:0;padding:0;list-style:none;--tree-padding: 1rem}.daff-tree li.hidden{display:none}.daff-tree-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;position:relative;background:none;border:0;padding:.5rem 1rem .5rem 0;line-height:1.5rem;font-weight:400;text-align:left;text-decoration:none;width:100%;padding-left:calc(var(--tree-padding) * (var(--depth)))}.daff-tree-item:before{content:\"\";position:absolute;top:0;bottom:0;left:0;width:.25rem}.daff-tree-item:focus,.daff-tree-item:focus-visible{z-index:1}.daff-tree-item.selected{font-weight:500}.daff-tree-item.parent{position:relative;padding-right:2.5rem}.daff-tree-item.parent:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-tree-item.parent.open:after{top:56%;transform:translateY(-50%) rotate(225deg)}\n"] }]
243
- }], ctorParameters: () => [{ type: DaffTreeNotifierService }], propDecorators: { renderMode: [{
244
- type: Input
245
- }], tree: [{
246
- type: Input
247
- }], withChildrenTemplate: [{
248
- type: ContentChild,
249
- args: ['daffTreeItemWithChildrenTpl', { static: true }]
250
- }], treeItemTemplate: [{
251
- type: ContentChild,
252
- args: ['daffTreeItemTpl', { static: true }]
253
- }] } });
270
+ ], template: "@for (node of flatTree(); track node.id) {\n\t<li [attr.aria-level]=\"node.level\" [class.hidden]=\"!node.visible\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"node.hasChildren ? withChildrenTemplate() : treeItemTemplate(); context: { $implicit: node }\">\n\t\t</ng-container>\n\t</li>\n}", styles: [".daff-tree{margin:0;padding:0;list-style:none;--tree-padding: 1rem}.daff-tree li.hidden{display:none}.daff-tree-item{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;position:relative;background:none;border:0;padding:.5rem 1rem .5rem 0;line-height:1.5rem;font-weight:400;text-align:left;text-decoration:none;width:100%;padding-left:calc(var(--tree-padding) * (var(--depth)))}.daff-tree-item:before{content:\"\";position:absolute;top:0;bottom:0;left:0;width:.25rem}.daff-tree-item:focus,.daff-tree-item:focus-visible{z-index:1}.daff-tree-item.selected{font-weight:500}.daff-tree-item.parent{position:relative;padding-right:2.5rem}.daff-tree-item.parent:after{content:\"\";position:absolute;top:48%;right:1rem;display:inline-block;border-right:2px solid currentColor;border-bottom:2px solid currentColor;width:.5rem;height:.5rem;transform:translateY(-50%) rotate(45deg);transition:transform .15s}.daff-tree-item.parent.open:after{top:56%;transform:translateY(-50%) rotate(225deg)}\n"] }]
271
+ }], ctorParameters: () => [], propDecorators: { renderMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "renderMode", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], tree: [{ type: i0.Input, args: [{ isSignal: true, alias: "tree", required: false }] }], withChildrenTemplate: [{ type: i0.ContentChild, args: ['daffTreeItemWithChildrenTpl', { isSignal: true }] }], treeItemTemplate: [{ type: i0.ContentChild, args: ['daffTreeItemTpl', { isSignal: true }] }] } });
272
+
273
+ /**
274
+ * Walk up the tree from a leaf to the root applying the
275
+ * visit function at each node along the way.
276
+ */
277
+ const walkUp = (tree, visit) => {
278
+ while (tree.parent) {
279
+ visit(tree);
280
+ tree = tree.parent;
281
+ }
282
+ return tree;
283
+ };
284
+
285
+ /**
286
+ * Open all ancestor nodes of the given node so that it becomes visible in the tree.
287
+ */
288
+ const daffTreeOpenAncestors = (node) => {
289
+ walkUp(node, (ancestor) => {
290
+ ancestor.open = true;
291
+ return ancestor;
292
+ });
293
+ };
254
294
 
255
295
  /* eslint-disable quote-props */
256
296
  /**
@@ -274,49 +314,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
274
314
  *
275
315
  */
276
316
  class DaffTreeItemDirective {
277
- /**
278
- * The {@link DaffTreeFlatNode} associated with this specific tree item.
279
- */
280
- get node() {
281
- return this._node;
282
- }
283
- ;
284
- set node(val) {
285
- this._node = val;
286
- this.id = 'tree-' + this._node.id;
287
- this.depth = this._node.level;
288
- this.isParent = this._node.hasChildren;
289
- this.open = this._node._treeRef.open;
290
- if (this._node.hasChildren) {
291
- this.ariaExpanded = this._node._treeRef.open ? 'true' : 'false';
292
- }
293
- }
294
- constructor(document, treeNotifier) {
295
- this.document = document;
296
- this.treeNotifier = treeNotifier;
297
- this.isParent = false;
317
+ constructor() {
318
+ this.document = inject(DOCUMENT);
319
+ this.treeNotifier = inject(DaffTreeNotifierService);
298
320
  /**
299
- * Indicates whether or not the tree is `open`.
321
+ * The {@link DaffTreeFlatNode} associated with this specific tree item.
300
322
  */
301
- this.open = false;
323
+ this.node = input.required(...(ngDevMode ? [{ debugName: "node" }] : []));
302
324
  /**
303
325
  * Whether or not the tree item is the currently active item.
304
- * Note that there is no requirement there there only be one active item at a time.
326
+ * Note that there is no requirement that there only be one active item at a time.
327
+ *
328
+ * When a tree item becomes selected, all of its ancestor nodes
329
+ * will be automatically opened so that the selected item is visible.
330
+ */
331
+ this.selected = input(false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
332
+ /**
333
+ * The html `id` of the tree item. This is derived from the {@link DaffTreeData}.
334
+ */
335
+ this.id = computed(() => 'tree-' + this.node().id, ...(ngDevMode ? [{ debugName: "id" }] : []));
336
+ /**
337
+ * A property indicating the depth of the tree.
305
338
  */
306
- this.selected = false;
339
+ this.depth = computed(() => this.node().level, ...(ngDevMode ? [{ debugName: "depth" }] : []));
340
+ /**
341
+ * Whether or not this node has children.
342
+ */
343
+ this.isParent = computed(() => this.node().hasChildren, ...(ngDevMode ? [{ debugName: "isParent" }] : []));
344
+ /**
345
+ * Indicates whether or not the tree is `open`.
346
+ */
347
+ this.open = computed(() => this.node()._treeRef.open, ...(ngDevMode ? [{ debugName: "open" }] : []));
348
+ /**
349
+ * Accessibility property, notifying users about whether
350
+ * or not the tree item is open.
351
+ */
352
+ this.ariaExpanded = computed(() => {
353
+ const node = this.node();
354
+ return node.hasChildren ? (node._treeRef.open ? 'true' : 'false') : undefined;
355
+ }, ...(ngDevMode ? [{ debugName: "ariaExpanded" }] : []));
356
+ effect(() => {
357
+ if (this.selected()) {
358
+ const node = untracked(this.node);
359
+ daffTreeOpenAncestors(node._treeRef);
360
+ this.treeNotifier.notify();
361
+ }
362
+ });
307
363
  }
308
364
  /**
309
365
  * @docs-private
310
366
  */
311
367
  onEscape() {
312
- this.toggleParent(this.node);
368
+ this.toggleParent(this.node());
313
369
  }
314
370
  /**
315
371
  * @docs-private
316
372
  */
317
373
  onClick() {
318
- if (this.node.hasChildren) {
319
- this.toggleTree(this.node);
374
+ if (this.node().hasChildren) {
375
+ this.toggleTree(this.node());
320
376
  }
321
377
  this.treeNotifier.notify();
322
378
  }
@@ -341,46 +397,39 @@ class DaffTreeItemDirective {
341
397
  node._treeRef.open = false;
342
398
  }
343
399
  }
344
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTreeItemDirective, deps: [{ token: DOCUMENT }, { token: DaffTreeNotifierService }], target: i0.ɵɵFactoryTarget.Directive }); }
345
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: DaffTreeItemDirective, isStandalone: true, selector: "[daffTreeItem]", inputs: { node: "node", selected: "selected" }, host: { listeners: { "keydown.escape": "onEscape()", "click": "onClick()" }, properties: { "class.selected": "selected", "class.parent": "isParent", "class.open": "open", "attr.id": "id", "attr.aria-expanded": "ariaExpanded", "style.--depth": "depth" }, classAttribute: "daff-tree-item" }, ngImport: i0 }); }
400
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTreeItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
401
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.18", type: DaffTreeItemDirective, isStandalone: true, selector: "[daffTreeItem]", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.escape": "onEscape()", "click": "onClick()" }, properties: { "class.selected": "selected()", "class.parent": "isParent()", "class.open": "open()", "attr.id": "id()", "attr.aria-expanded": "ariaExpanded()", "style.--depth": "depth()" }, classAttribute: "daff-tree-item" }, ngImport: i0 }); }
346
402
  }
347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTreeItemDirective, decorators: [{
403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTreeItemDirective, decorators: [{
348
404
  type: Directive,
349
405
  args: [{
350
406
  selector: '[daffTreeItem]',
351
407
  host: {
352
408
  'class': 'daff-tree-item',
353
- '[class.selected]': 'selected',
354
- '[class.parent]': 'isParent',
355
- '[class.open]': 'open',
356
- '[attr.id]': 'id',
357
- '[attr.aria-expanded]': 'ariaExpanded',
358
- '[style.--depth]': 'depth',
409
+ '[class.selected]': 'selected()',
410
+ '[class.parent]': 'isParent()',
411
+ '[class.open]': 'open()',
412
+ '[attr.id]': 'id()',
413
+ '[attr.aria-expanded]': 'ariaExpanded()',
414
+ '[style.--depth]': 'depth()',
359
415
  '(keydown.escape)': 'onEscape()',
360
416
  '(click)': 'onClick()',
361
417
  },
362
418
  }]
363
- }], ctorParameters: () => [{ type: undefined, decorators: [{
364
- type: Inject,
365
- args: [DOCUMENT]
366
- }] }, { type: DaffTreeNotifierService }], propDecorators: { node: [{
367
- type: Input
368
- }], selected: [{
369
- type: Input
370
- }] } });
419
+ }], ctorParameters: () => [], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }] } });
371
420
 
372
421
  /**
373
422
  * @deprecated in favor of {@link DAFF_TREE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
374
423
  */
375
424
  class DaffTreeModule {
376
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
377
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffTreeModule, imports: [CommonModule,
425
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
426
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffTreeModule, imports: [CommonModule,
378
427
  DaffTreeComponent,
379
428
  DaffTreeItemDirective], exports: [DaffTreeComponent,
380
429
  DaffTreeItemDirective] }); }
381
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTreeModule, imports: [CommonModule] }); }
430
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTreeModule, imports: [CommonModule] }); }
382
431
  }
383
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffTreeModule, decorators: [{
432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffTreeModule, decorators: [{
384
433
  type: NgModule,
385
434
  args: [{
386
435
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-tree.mjs","sources":["../../../libs/design/tree/src/tree/tree-notifier.service.ts","../../../libs/design/tree/src/utils/flatten-tree.ts","../../../libs/design/tree/src/utils/traverse-tree.ts","../../../libs/design/tree/src/utils/hydrate-tree.ts","../../../libs/design/tree/src/tree/tree.component.ts","../../../libs/design/tree/src/tree/tree.component.html","../../../libs/design/tree/src/tree-item/tree-item.directive.ts","../../../libs/design/tree/src/tree.module.ts","../../../libs/design/tree/src/utils/transform.ts","../../../libs/design/tree/src/tree.ts","../../../libs/design/tree/src/daffodil-design-tree.ts"],"sourcesContent":["import {\n Inject,\n OnDestroy,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n/**\n * This service is used by tree items to notify their parent\n * that the tree has to be recomputed.\n *\n * This service is a multiton associated with each tree instance.\n * It follows the same lifecycle as the tree it is associated with.\n */\n@Inject({})\nexport class DaffTreeNotifierService implements OnDestroy {\n\n /**\n * @docs-private\n */\n private _notice: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);\n\n /**\n * An observable that emits when the tree needs to be re-computed.\n */\n notice$ = this._notice.asObservable();\n\n /**\n * `notify` can be called to trigger a re-computation of the tree\n * if data has changed unexpectedly and a re-render did not occur.\n *\n * This should be used sparingly. Instead, prefer updating `data` on the tree\n * itself for performance reasons.\n */\n notify() {\n this._notice.next(true);\n }\n\n /**\n * Cleanup when the tree is destroyed.\n *\n * @docs-private\n */\n ngOnDestroy(): void {\n this._notice.complete();\n }\n}\n","import { collect } from '@daffodil/core';\n\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * A flattened node of a tree. This is used when translating the tree data\n * structure into an array.\n */\nexport interface DaffTreeFlatNode {\n id: number | string;\n title: string;\n url: string;\n level: number;\n hasChildren: boolean;\n data: unknown;\n visible: boolean;\n _treeRef: DaffTreeUi<unknown>;\n}\n\n/**\n * Flatten a DaffTreeUi<unknown> into an array, removing elements from the array\n * below nodes in the tree that are not open.\n */\nexport const flattenTree = (daffUiTree: DaffTreeUi<unknown>, removeNodes: boolean = false): DaffTreeFlatNode[] => {\n const tree: DaffTreeFlatNode[] = [];\n if(!daffUiTree) {\n return [];\n }\n\n let items = [\n {\n ...daffUiTree,\n level: 0,\n data: undefined,\n open: true,\n _treeRef: daffUiTree,\n },\n ];\n\n\n while(items) {\n const el = items.pop();\n if(!el) {\n break;\n }\n\n items = [\n ...items,\n ...el.items.map((i) => ({\n ...i,\n level:\n el.level + 1,\n _treeRef: i,\n })).reverse(),\n ];\n\n const hasClosedAncestor = el._treeRef.parent\n ? collect(el._treeRef.parent, (node) => node.parent ? [node.parent] : [], el.level).reduce(\n (acc, parent) => acc || !parent.open,\n false,\n )\n : false;\n\n if(!removeNodes && el._treeRef.parent) {\n tree.push({\n id: el.id,\n title: el.title,\n level: el.level,\n url : el.url,\n visible: !hasClosedAncestor,\n hasChildren: el.items.length > 0,\n data: undefined,\n _treeRef: el._treeRef,\n });\n } else if(removeNodes && el._treeRef.parent?.open) {\n tree.push({\n id: el.id,\n title: el.title,\n level: el.level,\n url : el.url,\n visible: !hasClosedAncestor,\n hasChildren: el.items.length > 0,\n data: undefined,\n _treeRef: el._treeRef,\n });\n }\n }\n\n return tree;\n};\n","import { RecursiveTreeKeyOfType } from '../interfaces/recursive-key';\n\n/**\n * Traverse the tree, pre-order, right-to-left\n */\nexport const traverse = <T extends Record<any, any>, V extends Record<any, any> = T>(\n tree: T,\n visit: (tree: T) => V,\n key: RecursiveTreeKeyOfType<T>,\n): V => {\n let stack = [\n tree,\n ];\n\n while(stack) {\n const el = stack.pop();\n if(!el) {\n break;\n }\n\n visit(el);\n\n stack = [\n ...stack,\n ...<T[]><unknown>el[key],\n ];\n }\n\n return tree;\n};\n","import { traverse } from './traverse-tree';\nimport { DaffTreeData } from '../interfaces/tree-data';\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\nexport const daffDataTreeToUiTree = <T>(data: DaffTreeData<T>, parent: DaffTreeUi<T>, open: boolean = false): DaffTreeUi<T> => ({\n id: data.id ?? data.title,\n title: data.title,\n url: data.url,\n data: data.data,\n open,\n parent,\n items: [],\n});\n\n/**\n * This function translates the original data given to us by the client\n * to the internal representation of the tree used by the {@link DaffTreeComponent}\n */\nexport const hydrateTree = <T>(data: DaffTreeData<T>): DaffTreeUi<T> => {\n const tree = daffDataTreeToUiTree(data, undefined, true);\n\n let treeStack = [\n tree,\n ];\n\n traverse(data, (el) => {\n const treeEl = treeStack.pop();\n treeEl.items = el.items.map((i) => daffDataTreeToUiTree(i, treeEl, false));\n treeStack = [\n ...treeStack,\n ...treeEl.items,\n ];\n return el;\n }, 'items');\n\n return tree;\n};\n","/* eslint-disable quote-props */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\n\nimport { DaffTreeNotifierService } from './tree-notifier.service';\nimport { DaffTreeData } from '../interfaces/tree-data';\nimport { DaffTreeRenderMode } from '../interfaces/tree-render-mode';\nimport { DaffTreeUi } from '../interfaces/tree-ui';\nimport {\n DaffTreeFlatNode,\n flattenTree,\n} from '../utils/flatten-tree';\nimport { hydrateTree } from '../utils/hydrate-tree';\n\n/**\n * The `DaffTreeComponent` allows you to render tree structures as interactable UI.\n *\n * @example Basic use of the tree component\n * ```html\n * <ul daff-tree [tree]=\"tree\">\n * <ng-template #daffTreeItemWithChildrenTpl let-node>\n * <button daffTreeItem [node]=\"node\">{{ node.title }} </button>\n * </ng-template>\n *\n * <ng-template #daffTreeItemTpl let-node>\n * <a daffTreeItem [node]=\"node\" [routerLink]=\"node.url\">{{ node.title }}</a>\n * </ng-template>\n * </ul>\n * ```\n *\n * where `tree` is a {@link DaffTreeData}.\n *\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ul[daff-tree]',\n templateUrl: './tree.component.html',\n styleUrls: ['./tree.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n DaffTreeNotifierService,\n ],\n hostDirectives: [{\n directive: DaffArticleEncapsulatedDirective,\n }],\n host: {\n 'class': 'daff-tree',\n },\n imports: [\n NgTemplateOutlet,\n ],\n})\nexport class DaffTreeComponent implements OnInit, OnChanges {\n /**\n * The rendering mode for nodes in the tree.\n *\n * Default value is `in-dom`, which means nodes are present in the DOM.\n *\n * Generally, `not-in-dom` is faster as there are less DOM elements to render,\n * but there may be use-cases (like SEO) where having the tree in the DOM\n * is relevant.\n */\n @Input() renderMode: DaffTreeRenderMode;\n\n /**\n * The internal tree element.\n */\n private _tree: DaffTreeUi<unknown> = undefined;\n\n /**\n * @docs-private\n *\n * The flattened tree data. For debugging purposes, you can iterate through this if you want to inspect\n * the resulting array structure we computed to render the tree.\n */\n public flatTree: DaffTreeFlatNode[] = [];\n\n /**\n * The tree data you would like to render.\n */\n @Input() tree: DaffTreeData<unknown>;\n\n /**\n * The template used to render tree-nodes that themselves have children.\n *\n * @docs-private\n */\n @ContentChild('daffTreeItemWithChildrenTpl', { static: true })\n withChildrenTemplate: TemplateRef<any>;\n\n /**\n * The template used to render tree-nodes that have no children.\n *\n * @docs-private\n */\n @ContentChild('daffTreeItemTpl', { static: true }) treeItemTemplate: TemplateRef<any>;\n\n /**\n * @docs-private\n */\n constructor(private notifier: DaffTreeNotifierService) {}\n\n /**\n * @docs-private\n */\n ngOnChanges(changes: SimpleChanges): void {\n if(!changes.tree.currentValue) {\n this._tree = undefined;\n this.flatTree = [];\n return;\n }\n\n if(changes.renderMode && !changes.tree) {\n this.flatTree = flattenTree(this._tree, changes.renderMode.currentValue === 'not-in-dom');\n } else if(changes.renderMode || changes.tree) {\n this._tree = hydrateTree(changes.tree?.currentValue ?? this.tree);\n this.flatTree = flattenTree(this._tree, (changes.renderMode?.currentValue ?? this.renderMode) === 'not-in-dom');\n }\n }\n\n /**\n * @docs-private\n */\n ngOnInit(): void {\n this.notifier.notice$.subscribe(() => {\n this.flatTree = flattenTree(this._tree, this.renderMode === 'not-in-dom');\n });\n }\n}\n","@for (node of flatTree; track node.id) {\n\t<li [attr.aria-level]=\"node.level\" [class.hidden]=\"!node.visible\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"node.hasChildren ? withChildrenTemplate : treeItemTemplate; context: { $implicit: node }\">\n\t\t</ng-container>\n\t</li>\n}","/* eslint-disable quote-props */\n\nimport {\n Directive,\n Inject,\n Input,\n DOCUMENT,\n} from '@angular/core';\n\nimport { DaffTreeNotifierService } from '../tree/tree-notifier.service';\nimport { DaffTreeFlatNode } from '../utils/flatten-tree';\n\n/**\n * The `DaffTreeItemDirective` marks elements as tree child nodes that interact with the parent tree structure.\n *\n * @example Using a `[daffTreeItem]`\n *\n * `[tree]` is a {@link DaffTreeData} and `[daff-tree]` is a {@link DaffTreeComponent}.\n *\n * ```html\n * <ul daff-tree [tree]=\"tree\">\n * <ng-template #daffTreeItemWithChildrenTpl let-node>\n * <button daffTreeItem [node]=\"node\">{{ node.title }} </button>\n * </ng-template>\n *\n * <ng-template #daffTreeItemTpl let-node>\n * <a daffTreeItem [node]=\"node\" [routerLink]=\"node.url\">{{ node.title }}</a>\n * </ng-template>\n * </ul>\n * ```\n *\n */\n@Directive({\n selector: '[daffTreeItem]',\n host: {\n 'class': 'daff-tree-item',\n '[class.selected]': 'selected',\n '[class.parent]': 'isParent',\n '[class.open]': 'open',\n '[attr.id]': 'id',\n '[attr.aria-expanded]': 'ariaExpanded',\n '[style.--depth]': 'depth',\n '(keydown.escape)': 'onEscape()',\n '(click)': 'onClick()',\n },\n})\nexport class DaffTreeItemDirective {\n private isParent = false;\n\n /**\n * The html `id` of the tree item. This is derived from the {@link DaffTreeData}.\n *\n */\n private id: string;\n\n /**\n * Accessibility property, notifying users about whether\n * or not the tree item is open.\n */\n private ariaExpanded: string;\n\n /**\n * A property indicating the depth of the tree.\n */\n private depth: number;\n\n /**\n * Indicates whether or not the tree is `open`.\n */\n private open = false;\n\n /**\n * The {@link DaffTreeFlatNode} associated with this specific tree item.\n */\n private _node: DaffTreeFlatNode;\n\n /**\n * The {@link DaffTreeFlatNode} associated with this specific tree item.\n */\n @Input()\n get node() {\n return this._node;\n };\n set node(val: DaffTreeFlatNode) {\n this._node = val;\n this.id = 'tree-' + this._node.id;\n this.depth = this._node.level;\n this.isParent = this._node.hasChildren;\n this.open = this._node._treeRef.open;\n\n if(this._node.hasChildren) {\n this.ariaExpanded = this._node._treeRef.open ? 'true' : 'false';\n }\n }\n\n /**\n * Whether or not the tree item is the currently active item.\n * Note that there is no requirement there there only be one active item at a time.\n */\n @Input() selected = false;\n\n constructor(\n @Inject(DOCUMENT) private document: any,\n private treeNotifier: DaffTreeNotifierService,\n ) {}\n\n /**\n * @docs-private\n */\n onEscape() {\n this.toggleParent(this.node);\n }\n\n /**\n * @docs-private\n */\n onClick() {\n if(this.node.hasChildren) {\n this.toggleTree(this.node);\n }\n this.treeNotifier.notify();\n }\n\n /**\n * Toggle the open state of the tree's parent.\n */\n toggleParent(node: DaffTreeFlatNode) {\n if(node._treeRef?.parent.parent === undefined) {\n return;\n }\n node._treeRef.parent.open = !node._treeRef.parent.open;\n (<Document>this.document).getElementById('tree-' + node._treeRef.parent.id).focus();\n }\n\n /**\n * Toggle the open state of this specific subtree tree.\n */\n toggleTree(node: DaffTreeFlatNode) {\n if(node._treeRef.open === false) {\n node._treeRef.open = true;\n } else {\n node._treeRef.open = false;\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffTreeComponent } from './tree/tree.component';\nimport { DaffTreeItemDirective } from './tree-item/tree-item.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_TREE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffTreeComponent,\n DaffTreeItemDirective,\n ],\n exports: [\n DaffTreeComponent,\n DaffTreeItemDirective,\n ],\n})\nexport class DaffTreeModule { }\n","import { RecursiveTreeKeyOfType } from '../interfaces/recursive-key';\nimport { DaffTreeData } from '../interfaces/tree-data';\n\n/**\n * Transform a tree-like structure into a {@link DaffTreeData}.\n *\n * @param tree - The data structure representing tree-like data.\n * @param transformFn - A user-supplied function that will transform the user\n * type into a {@link DaffTreeData}\n * @param key - The property of the your tree that indicates which\n * key contains the \"children\" of your tree structure.\n *\n */\nexport const daffTransformTree = <\n\n T extends Record<any,any>,\n V\n>(\n tree: T,\n transformFn: (type: T) => DaffTreeData<V>,\n key: RecursiveTreeKeyOfType<T>,\n): DaffTreeData<V> => {\n\n const transformedTree: DaffTreeData<V> = transformFn(tree);\n\n const queue: { node: T; parent: DaffTreeData<V> }[] = [{ node: tree, parent: transformedTree }];\n\n while (queue.length > 0) {\n const { node, parent } = queue.shift();\n\n const childItems = node[key];\n for (const child of <T[]>childItems) {\n const transformedChild: DaffTreeData<V> = transformFn(child);\n parent.items.push(transformedChild);\n queue.push({ node: child, parent: transformedChild });\n }\n }\n\n return transformedTree;\n};\n","import { DaffTreeComponent } from './tree/tree.component';\nimport { DaffTreeItemDirective } from './tree-item/tree-item.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_TREE_COMPONENTS = <const> [\n DaffTreeComponent,\n DaffTreeItemDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffTreeNotifierService"],"mappings":";;;;;;;;;AAMA;;;;;;AAMG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB,CAAA;AAA7B,IAAA,WAAA,GAAA;AAEL;;AAEG;AACK,QAAA,IAAA,CAAA,OAAO,GAA6B,IAAI,eAAe,CAAU,IAAI,CAAC;AAE9E;;AAEG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;IAqBvC;AAnBE;;;;;;AAMG;IACH,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;IACzB;AAEA;;;;AAIG;IACH,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;IACzB;CACD;AA/BY,uBAAuB,GAAA,UAAA,CAAA;IADnC,MAAM,CAAC,EAAE;AACG,CAAA,EAAA,uBAAuB,CA+BnC;;AC1BD;;;AAGG;AACI,MAAM,WAAW,GAAG,CAAC,UAA+B,EAAE,WAAA,GAAuB,KAAK,KAAwB;IAC/G,MAAM,IAAI,GAAuB,EAAE;IACnC,IAAG,CAAC,UAAU,EAAE;AACd,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,IAAI,KAAK,GAAG;AACV,QAAA;AACE,YAAA,GAAG,UAAU;AACb,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,QAA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s","sources":["../../../libs/design/tree/src/tree/tree-notifier.service.ts","../../../libs/design/tree/src/utils/flatten-tree.ts","../../../libs/design/tree/src/utils/traverse-tree.ts","../../../libs/design/tree/src/utils/hydrate-tree.ts","../../../libs/design/tree/src/tree/tree.component.ts","../../../libs/design/tree/src/tree/tree.component.html","../../../libs/design/tree/src/utils/walk-up.ts","../../../libs/design/tree/src/utils/open-ancestors.ts","../../../libs/design/tree/src/tree-item/tree-item.directive.ts","../../../libs/design/tree/src/tree.module.ts","../../../libs/design/tree/src/utils/transform.ts","../../../libs/design/tree/src/tree.ts","../../../libs/design/tree/src/daffodil-design-tree.ts"],"sourcesContent":["import {\n Inject,\n OnDestroy,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n/**\n * This service is used by tree items to notify their parent\n * that the tree has to be recomputed.\n *\n * This service is a multiton associated with each tree instance.\n * It follows the same lifecycle as the tree it is associated with.\n */\n@Inject({})\nexport class DaffTreeNotifierService implements OnDestroy {\n\n /**\n * @docs-private\n */\n private _notice: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);\n\n /**\n * An observable that emits when the tree needs to be re-computed.\n */\n notice$ = this._notice.asObservable();\n\n /**\n * `notify` can be called to trigger a re-computation of the tree\n * if data has changed unexpectedly and a re-render did not occur.\n *\n * This should be used sparingly. Instead, prefer updating `data` on the tree\n * itself for performance reasons.\n */\n notify() {\n this._notice.next(true);\n }\n\n /**\n * Cleanup when the tree is destroyed.\n *\n * @docs-private\n */\n ngOnDestroy(): void {\n this._notice.complete();\n }\n}\n","import { collect } from '@daffodil/core';\n\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * A flattened node of a tree. This is used when translating the tree data\n * structure into an array.\n */\nexport interface DaffTreeFlatNode {\n id: number | string;\n title: string;\n url: string;\n level: number;\n hasChildren: boolean;\n data: unknown;\n visible: boolean;\n _treeRef: DaffTreeUi<unknown>;\n}\n\n/**\n * Flatten a DaffTreeUi<unknown> into an array, removing elements from the array\n * below nodes in the tree that are not open.\n */\nexport const flattenTree = (daffUiTree: DaffTreeUi<unknown>, removeNodes: boolean = false): DaffTreeFlatNode[] => {\n const tree: DaffTreeFlatNode[] = [];\n if(!daffUiTree) {\n return [];\n }\n\n let items = [\n {\n ...daffUiTree,\n level: 0,\n data: undefined,\n open: true,\n _treeRef: daffUiTree,\n },\n ];\n\n\n while(items) {\n const el = items.pop();\n if(!el) {\n break;\n }\n\n items = [\n ...items,\n ...el.items.map((i) => ({\n ...i,\n level:\n el.level + 1,\n _treeRef: i,\n })).reverse(),\n ];\n\n const hasClosedAncestor = el._treeRef.parent\n ? collect(el._treeRef.parent, (node) => node.parent ? [node.parent] : [], el.level).reduce(\n (acc, parent) => acc || !parent.open,\n false,\n )\n : false;\n\n if(!removeNodes && el._treeRef.parent) {\n tree.push({\n id: el.id,\n title: el.title,\n level: el.level,\n url : el.url,\n visible: !hasClosedAncestor,\n hasChildren: el.items.length > 0,\n data: undefined,\n _treeRef: el._treeRef,\n });\n } else if(removeNodes && el._treeRef.parent?.open) {\n tree.push({\n id: el.id,\n title: el.title,\n level: el.level,\n url : el.url,\n visible: !hasClosedAncestor,\n hasChildren: el.items.length > 0,\n data: undefined,\n _treeRef: el._treeRef,\n });\n }\n }\n\n return tree;\n};\n","import { RecursiveTreeKeyOfType } from '../interfaces/recursive-key';\n\n/**\n * Traverse the tree, pre-order, right-to-left\n */\nexport const traverse = <T extends Record<any, any>, V extends Record<any, any> = T>(\n tree: T,\n visit: (tree: T) => V,\n key: RecursiveTreeKeyOfType<T>,\n): V => {\n let stack = [\n tree,\n ];\n\n while(stack) {\n const el = stack.pop();\n if(!el) {\n break;\n }\n\n visit(el);\n\n stack = [\n ...stack,\n ...<T[]><unknown>el[key],\n ];\n }\n\n return tree;\n};\n","import { traverse } from './traverse-tree';\nimport { DaffTreeData } from '../interfaces/tree-data';\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\nexport const daffDataTreeToUiTree = <T>(data: DaffTreeData<T>, parent: DaffTreeUi<T>, open: boolean = false): DaffTreeUi<T> => ({\n id: parent ? `${parent.id}.${data.id ?? data.title}` : (data.id ?? data.title),\n title: data.title,\n url: data.url,\n data: data.data,\n open,\n parent,\n items: [],\n});\n\n/**\n * This function translates the original data given to us by the client\n * to the internal representation of the tree used by the {@link DaffTreeComponent}\n */\nexport const hydrateTree = <T>(data: DaffTreeData<T>, treeId?: string): DaffTreeUi<T> => {\n const root: DaffTreeUi<T> = {\n id: treeId ?? (data.id ?? data.title),\n title: data.title,\n url: data.url,\n data: data.data,\n open: true,\n parent: undefined,\n items: [],\n };\n\n let treeStack = [\n root,\n ];\n\n traverse(data, (el) => {\n const treeEl = treeStack.pop();\n treeEl.items = el.items.map((i) => daffDataTreeToUiTree(i, treeEl, false));\n treeStack = [\n ...treeStack,\n ...treeEl.items,\n ];\n return el;\n }, 'items');\n\n return root;\n};\n","/* eslint-disable quote-props */\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n inject,\n input,\n signal,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\n\nimport { DaffTreeNotifierService } from './tree-notifier.service';\nimport { DaffTreeData } from '../interfaces/tree-data';\nimport { DaffTreeRenderMode } from '../interfaces/tree-render-mode';\nimport { flattenTree } from '../utils/flatten-tree';\nimport { hydrateTree } from '../utils/hydrate-tree';\n\nlet daffTreeId = 0;\n\n/**\n * The `DaffTreeComponent` allows you to render tree structures as interactable UI.\n *\n * @example Basic use of the tree component\n * ```html\n * <ul daff-tree [tree]=\"tree\">\n * <ng-template #daffTreeItemWithChildrenTpl let-node>\n * <button daffTreeItem [node]=\"node\">{{ node.title }} </button>\n * </ng-template>\n *\n * <ng-template #daffTreeItemTpl let-node>\n * <a daffTreeItem [node]=\"node\" [routerLink]=\"node.url\">{{ node.title }}</a>\n * </ng-template>\n * </ul>\n * ```\n *\n * where `tree` is a {@link DaffTreeData}.\n *\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ul[daff-tree]',\n templateUrl: './tree.component.html',\n styleUrls: ['./tree.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n DaffTreeNotifierService,\n ],\n hostDirectives: [{\n directive: DaffArticleEncapsulatedDirective,\n }],\n host: {\n 'class': 'daff-tree',\n },\n imports: [\n NgTemplateOutlet,\n ],\n})\nexport class DaffTreeComponent {\n private notifier = inject(DaffTreeNotifierService);\n\n /**\n * The rendering mode for nodes in the tree.\n *\n * Default value is `in-dom`, which means nodes are present in the DOM.\n *\n * Generally, `not-in-dom` is faster as there are less DOM elements to render,\n * but there may be use-cases (like SEO) where having the tree in the DOM\n * is relevant.\n */\n readonly renderMode = input<DaffTreeRenderMode>();\n\n /**\n * A unique identifier for the tree instance.\n * Used as a prefix for all node IDs in the tree.\n * If not provided, an auto-incrementing number is used.\n */\n readonly id = input<string>(`${daffTreeId++}`);\n\n /**\n * The tree data you would like to render.\n */\n readonly tree = input<DaffTreeData<unknown>>();\n\n /**\n * The internal tree element.\n */\n private _tree = computed(() => {\n const tree = this.tree();\n return tree ? hydrateTree(tree, this.id()) : undefined;\n });\n\n /**\n * A revision counter incremented by notifications from tree items.\n * Used to trigger re-flattening when tree item state changes.\n */\n readonly _revision = signal(0);\n\n /**\n * @docs-private\n *\n * The flattened tree data. For debugging purposes, you can iterate through this if you want to inspect\n * the resulting array structure we computed to render the tree.\n */\n readonly flatTree = computed(() => {\n this._revision();\n const tree = this._tree();\n return tree ? flattenTree(tree, this.renderMode() === 'not-in-dom') : [];\n });\n\n /**\n * The template used to render tree-nodes that themselves have children.\n *\n * @docs-private\n */\n readonly withChildrenTemplate = contentChild<TemplateRef<any>>('daffTreeItemWithChildrenTpl');\n\n /**\n * The template used to render tree-nodes that have no children.\n *\n * @docs-private\n */\n readonly treeItemTemplate = contentChild<TemplateRef<any>>('daffTreeItemTpl');\n\n constructor() {\n this.notifier.notice$.subscribe(() => {\n this._revision.update((r) => r + 1);\n });\n }\n}\n","@for (node of flatTree(); track node.id) {\n\t<li [attr.aria-level]=\"node.level\" [class.hidden]=\"!node.visible\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"node.hasChildren ? withChildrenTemplate() : treeItemTemplate(); context: { $implicit: node }\">\n\t\t</ng-container>\n\t</li>\n}","import { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * Walk up the tree from a leaf to the root applying the\n * visit function at each node along the way.\n */\nexport const walkUp = <T>(\n tree: DaffTreeUi<T>,\n visit: (tree: DaffTreeUi<T>) => DaffTreeUi<T>,\n): DaffTreeUi<T> => {\n while(tree.parent) {\n visit(tree);\n tree = tree.parent;\n }\n\n return tree;\n};\n","import { walkUp } from './walk-up';\nimport { DaffTreeUi } from '../interfaces/tree-ui';\n\n/**\n * Open all ancestor nodes of the given node so that it becomes visible in the tree.\n */\nexport const daffTreeOpenAncestors = <T>(node: DaffTreeUi<T>): void => {\n walkUp(node, (ancestor) => {\n ancestor.open = true;\n return ancestor;\n });\n};\n","/* eslint-disable quote-props */\n\nimport { DOCUMENT } from '@angular/common';\nimport {\n computed,\n Directive,\n effect,\n inject,\n input,\n untracked,\n} from '@angular/core';\n\nimport { DaffTreeNotifierService } from '../tree/tree-notifier.service';\nimport { DaffTreeFlatNode } from '../utils/flatten-tree';\nimport { daffTreeOpenAncestors } from '../utils/open-ancestors';\n\n/**\n * The `DaffTreeItemDirective` marks elements as tree child nodes that interact with the parent tree structure.\n *\n * @example Using a `[daffTreeItem]`\n *\n * `[tree]` is a {@link DaffTreeData} and `[daff-tree]` is a {@link DaffTreeComponent}.\n *\n * ```html\n * <ul daff-tree [tree]=\"tree\">\n * <ng-template #daffTreeItemWithChildrenTpl let-node>\n * <button daffTreeItem [node]=\"node\">{{ node.title }} </button>\n * </ng-template>\n *\n * <ng-template #daffTreeItemTpl let-node>\n * <a daffTreeItem [node]=\"node\" [routerLink]=\"node.url\">{{ node.title }}</a>\n * </ng-template>\n * </ul>\n * ```\n *\n */\n@Directive({\n selector: '[daffTreeItem]',\n host: {\n 'class': 'daff-tree-item',\n '[class.selected]': 'selected()',\n '[class.parent]': 'isParent()',\n '[class.open]': 'open()',\n '[attr.id]': 'id()',\n '[attr.aria-expanded]': 'ariaExpanded()',\n '[style.--depth]': 'depth()',\n '(keydown.escape)': 'onEscape()',\n '(click)': 'onClick()',\n },\n})\nexport class DaffTreeItemDirective {\n private document = inject(DOCUMENT);\n private treeNotifier = inject(DaffTreeNotifierService);\n\n /**\n * The {@link DaffTreeFlatNode} associated with this specific tree item.\n */\n readonly node = input.required<DaffTreeFlatNode>();\n\n /**\n * Whether or not the tree item is the currently active item.\n * Note that there is no requirement that there only be one active item at a time.\n *\n * When a tree item becomes selected, all of its ancestor nodes\n * will be automatically opened so that the selected item is visible.\n */\n readonly selected = input(false);\n\n /**\n * The html `id` of the tree item. This is derived from the {@link DaffTreeData}.\n */\n protected readonly id = computed(() => 'tree-' + this.node().id);\n\n /**\n * A property indicating the depth of the tree.\n */\n protected readonly depth = computed(() => this.node().level);\n\n /**\n * Whether or not this node has children.\n */\n protected readonly isParent = computed(() => this.node().hasChildren);\n\n /**\n * Indicates whether or not the tree is `open`.\n */\n protected readonly open = computed(() => this.node()._treeRef.open);\n\n /**\n * Accessibility property, notifying users about whether\n * or not the tree item is open.\n */\n protected readonly ariaExpanded = computed(() => {\n const node = this.node();\n return node.hasChildren ? (node._treeRef.open ? 'true' : 'false') : undefined;\n });\n\n constructor() {\n effect(() => {\n if(this.selected()) {\n const node = untracked(this.node);\n daffTreeOpenAncestors(node._treeRef);\n this.treeNotifier.notify();\n }\n });\n }\n\n /**\n * @docs-private\n */\n onEscape() {\n this.toggleParent(this.node());\n }\n\n /**\n * @docs-private\n */\n onClick() {\n if(this.node().hasChildren) {\n this.toggleTree(this.node());\n }\n this.treeNotifier.notify();\n }\n\n /**\n * Toggle the open state of the tree's parent.\n */\n toggleParent(node: DaffTreeFlatNode) {\n if(node._treeRef?.parent.parent === undefined) {\n return;\n }\n node._treeRef.parent.open = !node._treeRef.parent.open;\n (<Document>this.document).getElementById('tree-' + node._treeRef.parent.id).focus();\n }\n\n /**\n * Toggle the open state of this specific subtree tree.\n */\n toggleTree(node: DaffTreeFlatNode) {\n if(node._treeRef.open === false) {\n node._treeRef.open = true;\n } else {\n node._treeRef.open = false;\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffTreeComponent } from './tree/tree.component';\nimport { DaffTreeItemDirective } from './tree-item/tree-item.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_TREE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffTreeComponent,\n DaffTreeItemDirective,\n ],\n exports: [\n DaffTreeComponent,\n DaffTreeItemDirective,\n ],\n})\nexport class DaffTreeModule { }\n","import { RecursiveTreeKeyOfType } from '../interfaces/recursive-key';\nimport { DaffTreeData } from '../interfaces/tree-data';\n\n/**\n * Transform a tree-like structure into a {@link DaffTreeData}.\n *\n * @param tree - The data structure representing tree-like data.\n * @param transformFn - A user-supplied function that will transform the user\n * type into a {@link DaffTreeData}\n * @param key - The property of the your tree that indicates which\n * key contains the \"children\" of your tree structure.\n *\n */\nexport const daffTransformTree = <\n\n T extends Record<any,any>,\n V\n>(\n tree: T,\n transformFn: (type: T) => DaffTreeData<V>,\n key: RecursiveTreeKeyOfType<T>,\n): DaffTreeData<V> => {\n\n const transformedTree: DaffTreeData<V> = transformFn(tree);\n\n const queue: { node: T; parent: DaffTreeData<V> }[] = [{ node: tree, parent: transformedTree }];\n\n while (queue.length > 0) {\n const { node, parent } = queue.shift();\n\n const childItems = node[key];\n for (const child of <T[]>childItems) {\n const transformedChild: DaffTreeData<V> = transformFn(child);\n parent.items.push(transformedChild);\n queue.push({ node: child, parent: transformedChild });\n }\n }\n\n return transformedTree;\n};\n","import { DaffTreeComponent } from './tree/tree.component';\nimport { DaffTreeItemDirective } from './tree-item/tree-item.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_TREE_COMPONENTS = <const> [\n DaffTreeComponent,\n DaffTreeItemDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAMA;;;;;;AAMG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB,CAAA;AAA7B,IAAA,WAAA,GAAA;AAEL;;AAEG;AACK,QAAA,IAAA,CAAA,OAAO,GAA6B,IAAI,eAAe,CAAU,IAAI,CAAC;AAE9E;;AAEG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;IAqBvC;AAnBE;;;;;;AAMG;IACH,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;IACzB;AAEA;;;;AAIG;IACH,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;IACzB;CACD;AA/BY,uBAAuB,GAAA,UAAA,CAAA;IADnC,MAAM,CAAC,EAAE;AACG,CAAA,EAAA,uBAAuB,CA+BnC;;AC1BD;;;AAGG;AACI,MAAM,WAAW,GAAG,CAAC,UAA+B,EAAE,WAAA,GAAuB,KAAK,KAAwB;IAC/G,MAAM,IAAI,GAAuB,EAAE;IACnC,IAAG,CAAC,UAAU,EAAE;AACd,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,IAAI,KAAK,GAAG;AACV,QAAA;AACE,YAAA,GAAG,UAAU;AACb,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,QAAQ,EAAE,UAAU;AACrB,SAAA;KACF;IAGD,OAAM,KAAK,EAAE;AACX,QAAA,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,EAAE;QACtB,I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R,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,qBAAqB;AACtB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,iBAAiB;wBACjB,qBAAqB;AACtB,qBAAA;AACF,iBAAA;;;AChBD;;;;;;;;;AASG;AACI,MAAM,iBAAiB,GAAG,CAK/B,IAAO,EACP,WAAyC,EACzC,GAA8B,KACX;AAEnB,IAAA,MAAM,eAAe,GAAoB,WAAW,CAAC,IAAI,CAAC;AAE1D,IAAA,MAAM,KAAK,GAA2C,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;AAE/F,IAAA,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE;AAEtC,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC;AAC5B,QAAA,KAAK,MAAM,KAAK,IAAS,UAAU,EAAE;AACnC,YAAA,MAAM,gBAAgB,GAAoB,WAAW,CAAC,KAAK,CAAC;AAC5D,YAAA,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC;AACnC,YAAA,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;QACvD;IACF;AAEA,IAAA,OAAO,eAAe;AACxB;;ACpCA;;AAEG;AACI,MAAM,oBAAoB,GAAW;IAC1C,iBAAiB;IACjB,qBAAqB;;;ACRvB;;AAEG;;;;"}
@@ -55,10 +55,10 @@ class DaffYoutubePlayerComponent {
55
55
  get maxWidth() {
56
56
  return this.width + 'px';
57
57
  }
58
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffYoutubePlayerComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
59
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: DaffYoutubePlayerComponent, isStandalone: true, selector: "daff-youtube-player", inputs: { src: "src", title: "title", width: "width", height: "height" }, host: { properties: { "style.max-width": "this.maxWidth" } }, ngImport: i0, template: "@if (src) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio\"\n [src]=\"src\"\n [title]=\"title\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}", styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host .daff-youtube-player{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
58
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffYoutubePlayerComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
59
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DaffYoutubePlayerComponent, isStandalone: true, selector: "daff-youtube-player", inputs: { src: "src", title: "title", width: "width", height: "height" }, host: { properties: { "style.max-width": "this.maxWidth" } }, ngImport: i0, template: "@if (src) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio\"\n [src]=\"src\"\n [title]=\"title\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}", styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host .daff-youtube-player{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
60
60
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffYoutubePlayerComponent, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffYoutubePlayerComponent, decorators: [{
62
62
  type: Component,
63
63
  args: [{ selector: 'daff-youtube-player', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (src) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio\"\n [src]=\"src\"\n [title]=\"title\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}", styles: [":host{display:block;border-radius:inherit;position:relative;width:100%}:host .daff-youtube-player{display:block;object-fit:cover;max-width:100%;max-height:100%;width:100%}\n"] }]
64
64
  }], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { src: [{
@@ -81,10 +81,10 @@ class DaffYoutubeSafePipe {
81
81
  transform(url) {
82
82
  return this.domSanitizer.bypassSecurityTrustResourceUrl(url);
83
83
  }
84
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffYoutubeSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
85
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: DaffYoutubeSafePipe, isStandalone: true, name: "daffYoutubeSafe" }); }
84
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffYoutubeSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
85
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffYoutubeSafePipe, isStandalone: true, name: "daffYoutubeSafe" }); }
86
86
  }
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffYoutubeSafePipe, decorators: [{
87
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffYoutubeSafePipe, decorators: [{
88
88
  type: Pipe,
89
89
  args: [{
90
90
  name: 'daffYoutubeSafe',
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-design-youtube-player.mjs","sources":["../../../libs/design/youtube-player/src/youtube-player.component.ts","../../../libs/design/youtube-player/src/youtube-player.component.html","../../../libs/design/youtube-player/src/safe-url.pipe.ts","../../../libs/design/youtube-player/src/youtube-player.ts","../../../libs/design/youtube-player/src/daffodil-design-youtube-player.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n OnInit,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeStyle,\n SafeUrl,\n} from '@angular/platform-browser';\n\nconst validateProperty = (object: Record<string, any>, prop: string) => {\n if (object[prop] === null || object[prop] === undefined || object[prop] === '') {\n throw new Error(`DaffYoutubePlayerComponent must have a defined ${prop} attribute.`);\n }\n};\n\nconst validateProperties = (object: Record<string, any>, props: string[]) => {\n const invalidProps = props.filter(prop => {\n try {\n validateProperty(object, prop);\n } catch(e) {\n return true;\n }\n return false;\n });\n\n if (invalidProps.length) {\n throw new Error(`DaffYoutubePlayerComponent must have the ${invalidProps.join(',')} attributes defined.`);\n }\n};\n\n@Component({\n selector: 'daff-youtube-player',\n templateUrl: './youtube-player.component.html',\n styleUrl: './youtube-player.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffYoutubePlayerComponent implements OnInit {\n @Input() src: SafeUrl;\n @Input() title = '';\n\n private _width: number;\n\n @Input()\n get width(): number {\n return this._width;\n }\n set width(value: number) {\n this._width = value;\n validateProperty(this, 'width');\n }\n\n private _height: number;\n\n @Input()\n get height(): number {\n return this._height;\n }\n set height(value: number) {\n this._height = value;\n validateProperty(this, 'height');\n }\n\n constructor(private sanitizer: DomSanitizer) {}\n\n /**\n * @docs-private\n */\n ngOnInit(): void {\n validateProperties(this, ['width', 'height']);\n }\n\n get _aspectRatio(): SafeStyle {\n return this.sanitizer.bypassSecurityTrustStyle(this.width + ' / ' + this.height);\n }\n\n /**\n * @docs-private\n */\n @HostBinding('style.max-width') get maxWidth(): string {\n return this.width + 'px';\n }\n}\n","@if (src) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio\"\n [src]=\"src\"\n [title]=\"title\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeUrl,\n} from '@angular/platform-browser';\n\n@Pipe({\n name: 'daffYoutubeSafe',\n})\nexport class DaffYoutubeSafePipe implements PipeTransform {\n constructor(private domSanitizer: DomSanitizer) {}\n transform(url: string): SafeUrl {\n return this.domSanitizer.bypassSecurityTrustResourceUrl(url);\n }\n}\n","import { DaffYoutubeSafePipe } from './safe-url.pipe';\nimport { DaffYoutubePlayerComponent } from './youtube-player.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_YOUTUBE_PLAYER_COMPONENTS = <const> [\n DaffYoutubePlayerComponent,\n DaffYoutubeSafePipe,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAaA,MAAM,gBAAgB,GAAG,CAAC,MAA2B,EAAE,IAAY,KAAI;IACrE,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,SAAS,I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,YAAY,CAAC,8BAA8B,CAAC,GAAG,CAAC;IAC9D;iIAJW,mBAAmB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;+HAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,CAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,iBAAiB;AACxB,iBAAA;;;ACRD;;AAEG;AACI,MAAM,8BAA8B,GAAW;IACpD,0BAA0B;IAC1B,mBAAmB;;;ACRrB;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-design-youtube-player.mjs","sources":["../../../libs/design/youtube-player/src/youtube-player.component.ts","../../../libs/design/youtube-player/src/youtube-player.component.html","../../../libs/design/youtube-player/src/safe-url.pipe.ts","../../../libs/design/youtube-player/src/youtube-player.ts","../../../libs/design/youtube-player/src/daffodil-design-youtube-player.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Input,\n OnInit,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeStyle,\n SafeUrl,\n} from '@angular/platform-browser';\n\nconst validateProperty = (object: Record<string, any>, prop: string) => {\n if (object[prop] === null || object[prop] === undefined || object[prop] === '') {\n throw new Error(`DaffYoutubePlayerComponent must have a defined ${prop} attribute.`);\n }\n};\n\nconst validateProperties = (object: Record<string, any>, props: string[]) => {\n const invalidProps = props.filter(prop => {\n try {\n validateProperty(object, prop);\n } catch(e) {\n return true;\n }\n return false;\n });\n\n if (invalidProps.length) {\n throw new Error(`DaffYoutubePlayerComponent must have the ${invalidProps.join(',')} attributes defined.`);\n }\n};\n\n@Component({\n selector: 'daff-youtube-player',\n templateUrl: './youtube-player.component.html',\n styleUrl: './youtube-player.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DaffYoutubePlayerComponent implements OnInit {\n @Input() src: SafeUrl;\n @Input() title = '';\n\n private _width: number;\n\n @Input()\n get width(): number {\n return this._width;\n }\n set width(value: number) {\n this._width = value;\n validateProperty(this, 'width');\n }\n\n private _height: number;\n\n @Input()\n get height(): number {\n return this._height;\n }\n set height(value: number) {\n this._height = value;\n validateProperty(this, 'height');\n }\n\n constructor(private sanitizer: DomSanitizer) {}\n\n /**\n * @docs-private\n */\n ngOnInit(): void {\n validateProperties(this, ['width', 'height']);\n }\n\n get _aspectRatio(): SafeStyle {\n return this.sanitizer.bypassSecurityTrustStyle(this.width + ' / ' + this.height);\n }\n\n /**\n * @docs-private\n */\n @HostBinding('style.max-width') get maxWidth(): string {\n return this.width + 'px';\n }\n}\n","@if (src) {\n <iframe class=\"daff-youtube-player\"\n [style.aspectRatio]=\"_aspectRatio\"\n [src]=\"src\"\n [title]=\"title\"\n frameborder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\n referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n}","import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n DomSanitizer,\n SafeUrl,\n} from '@angular/platform-browser';\n\n@Pipe({\n name: 'daffYoutubeSafe',\n})\nexport class DaffYoutubeSafePipe implements PipeTransform {\n constructor(private domSanitizer: DomSanitizer) {}\n transform(url: string): SafeUrl {\n return this.domSanitizer.bypassSecurityTrustResourceUrl(url);\n }\n}\n","import { DaffYoutubeSafePipe } from './safe-url.pipe';\nimport { DaffYoutubePlayerComponent } from './youtube-player.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_YOUTUBE_PLAYER_COMPONENTS = <const> [\n DaffYoutubePlayerComponent,\n DaffYoutubeSafePipe,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAa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