@rxap/tree 16.0.0-dev.1 → 16.0.0-dev.3

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.
@@ -6,66 +6,58 @@ import { map, tap, switchMap, startWith } from 'rxjs/operators';
6
6
  import { BaseDataSource, RXAP_DATA_SOURCE_METADATA } from '@rxap/data-source';
7
7
  import { joinPath, Required, DebounceCall } from '@rxap/utilities';
8
8
  import * as i0 from '@angular/core';
9
- import { InjectionToken, isDevMode, Injectable, Inject, TemplateRef, Directive, EventEmitter, ViewContainerRef, ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Input, ContentChild, Output, ViewChild, HostListener, NgModule } from '@angular/core';
10
- import { ToggleSubject, Node } from '@rxap/utilities/rxjs';
11
- import * as i9 from '@angular/cdk/portal';
9
+ import { InjectionToken, isDevMode, Injectable, Inject, TemplateRef, Directive, EventEmitter, ViewContainerRef, ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Input, ContentChild, Output, ViewChild, HostListener } from '@angular/core';
10
+ import { Node } from '@rxap/data-structure-tree';
11
+ import { ToggleSubject } from '@rxap/rxjs';
12
+ import * as i10 from '@angular/cdk/portal';
12
13
  import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
13
- import * as i1 from '@angular/common';
14
- import { CommonModule } from '@angular/common';
15
- import * as i2 from '@angular/material/tree';
16
- import { MatTreeModule } from '@angular/material/tree';
17
- import * as i3 from '@angular/material/legacy-button';
18
- import { MatLegacyButtonModule } from '@angular/material/legacy-button';
19
- import * as i4 from '@angular/material/icon';
20
- import { MatIconModule } from '@angular/material/icon';
21
- import * as i5 from '@angular/flex-layout/flex';
22
- import * as i6 from '@angular/flex-layout/extended';
23
- import * as i7 from '@angular/material/divider';
14
+ import * as i9 from '@angular/material/divider';
24
15
  import { MatDividerModule } from '@angular/material/divider';
25
- import * as i8 from '@angular/material/legacy-progress-spinner';
26
- import { MatLegacyProgressSpinnerModule } from '@angular/material/legacy-progress-spinner';
27
- import * as i10 from '@rxap/contenteditable';
28
- import { ContenteditableDirectiveModule } from '@rxap/contenteditable';
29
- import * as i11 from '@rxap/material-directives/icon';
30
- import { IconDirectiveModule } from '@rxap/material-directives/icon';
31
- import * as i12 from '@angular/material/legacy-checkbox';
32
- import { MatLegacyCheckboxModule } from '@angular/material/legacy-checkbox';
33
- import * as i13 from '@angular/material/legacy-progress-bar';
34
- import { MatLegacyProgressBarModule } from '@angular/material/legacy-progress-bar';
35
- import { FlexLayoutModule } from '@angular/flex-layout';
16
+ import * as i8 from '@angular/material/progress-spinner';
17
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
18
+ import { ContenteditableDirective } from '@rxap/contenteditable';
19
+ import * as i7 from '@angular/material/button';
20
+ import { MatButtonModule } from '@angular/material/button';
21
+ import * as i6 from '@angular/material/checkbox';
22
+ import { MatCheckboxModule } from '@angular/material/checkbox';
23
+ import { IconDirective } from '@rxap/material-directives/icon';
24
+ import * as i5 from '@angular/material/icon';
25
+ import { MatIconModule } from '@angular/material/icon';
26
+ import * as i4 from '@angular/material/tree';
27
+ import { MatTreeModule } from '@angular/material/tree';
28
+ import * as i3 from '@angular/material/progress-bar';
29
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
30
+ import * as i2 from '@angular/flex-layout/extended';
31
+ import { ExtendedModule } from '@angular/flex-layout/extended';
32
+ import { NgStyle, NgIf, AsyncPipe } from '@angular/common';
33
+ import * as i1 from '@angular/flex-layout/flex';
34
+ import { FlexModule } from '@angular/flex-layout/flex';
36
35
 
37
36
  function isSelectionChange(obj) {
38
- return !!obj && obj.hasOwnProperty('added') && obj.hasOwnProperty('removed');
37
+ return !!obj && !!obj['added'] && !!obj['removed'];
39
38
  }
40
39
  const RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD = new InjectionToken('rxap/tree/data-source/root-remote-method');
41
40
  const RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD = new InjectionToken('rxap/tree/data-source/children-remote-method');
42
41
  class TreeDataSource extends BaseDataSource {
43
- get nodeParameters() {
44
- return this._nodeParameters;
45
- }
46
- set nodeParameters(nodeParameters) {
47
- this._nodeParameters = nodeParameters;
48
- this.tree$.value.forEach(node => node.parameters = nodeParameters);
49
- }
50
42
  constructor(rootRemoteMethod, childrenRemoteMethod, metadata = null) {
51
43
  super(metadata);
52
44
  this.rootRemoteMethod = rootRemoteMethod;
53
45
  this.childrenRemoteMethod = childrenRemoteMethod;
54
46
  this.tree$ = new BehaviorSubject([]);
47
+ this.loading$ = new ToggleSubject(true);
48
+ // TODO : änlich problem wie bei der redundaten expand SelectionModel.
49
+ this._data$ = new BehaviorSubject([]);
55
50
  this._expandedLocalStorageSubscription = null;
56
51
  this._selectedLocalStorageSubscription = null;
57
- // TODO : änlich problem wie bei der redundaten expand SelectionModel.
58
52
  // im localStorage wird nur die id gespeichert.
59
53
  this._preSelected = [];
60
- this._data$ = new BehaviorSubject([]);
61
- this.loading$ = new ToggleSubject(true);
54
+ this._refreshMatchFilter = new Subject();
55
+ this._nodeParameters = null;
62
56
  this.toDisplay = () => 'to display function not defined';
63
57
  this.getIcon = () => null;
64
58
  this.getStyle = () => ({});
65
59
  this.hasDetails = () => true;
66
60
  this.matchFilter = () => true;
67
- this._refreshMatchFilter = new Subject();
68
- this._nodeParameters = null;
69
61
  this.tree$
70
62
  .pipe(map((tree) => tree
71
63
  .map((child) => this.flatTree(child))
@@ -75,6 +67,13 @@ class TreeDataSource extends BaseDataSource {
75
67
  this.initSelected();
76
68
  this.initExpanded();
77
69
  }
70
+ get nodeParameters() {
71
+ return this._nodeParameters;
72
+ }
73
+ set nodeParameters(nodeParameters) {
74
+ this._nodeParameters = nodeParameters;
75
+ this.tree$.value.forEach(node => node.parameters = nodeParameters);
76
+ }
78
77
  async getTreeRoot() {
79
78
  this.loading$.enable();
80
79
  const root = await this.getRoot();
@@ -228,6 +227,50 @@ class TreeDataSource extends BaseDataSource {
228
227
  refreshMatchFilter() {
229
228
  this._refreshMatchFilter.next();
230
229
  }
230
+ async refresh() {
231
+ const rootNodes = await this.getTreeRoot();
232
+ // refresh all expanded nodes;
233
+ const loadExpandedNodes = async (children) => {
234
+ for (const child of children) {
235
+ if (this.expanded.isSelected(child.id)) {
236
+ // call the node method to ensure that the expanded property of
237
+ // Node is set.
238
+ await child.expand();
239
+ }
240
+ if (child.hasChildren) {
241
+ await loadExpandedNodes(child.children);
242
+ }
243
+ }
244
+ };
245
+ await Promise.all(rootNodes
246
+ .filter((node) => node.hasChildren)
247
+ .map((node) => loadExpandedNodes(node.children)));
248
+ const selected = this.selected.selected
249
+ .map((node) => this.getNodeById(node.id))
250
+ .filter(Boolean);
251
+ this.selected.clear();
252
+ this.selected.select(...selected);
253
+ }
254
+ reset() {
255
+ this.selected.clear();
256
+ this.expanded.clear();
257
+ return this.getTreeRoot();
258
+ }
259
+ setGetStyle(getStyle = this.getStyle) {
260
+ this.getStyle = getStyle;
261
+ }
262
+ /**
263
+ * recall the getStyle, getIcon and toDisplay methods
264
+ * and update the node objects
265
+ */
266
+ updateNodes() {
267
+ this._data$.value.forEach(node => {
268
+ node.style = this.getStyle(node.item);
269
+ node.icon = this.getIcon(node.item);
270
+ node.display = this.toDisplay(node.item);
271
+ });
272
+ this._data$.next(this._data$.value);
273
+ }
231
274
  _connect(collectionViewer) {
232
275
  this.treeControl.expansionModel.changed.subscribe((change) => {
233
276
  if (isSelectionChange(change)) {
@@ -278,33 +321,9 @@ class TreeDataSource extends BaseDataSource {
278
321
  return Promise.resolve();
279
322
  }), switchMap(() => merge(collectionViewer.viewChange, this._data$).pipe(map(() => this._data$.value))), switchMap(nodeList => this._refreshMatchFilter.pipe(startWith(null), map(() => nodeList.filter(node => this.matchFilter(node))))));
280
323
  }
281
- async refresh() {
282
- const rootNodes = await this.getTreeRoot();
283
- // refresh all expanded nodes;
284
- const loadExpandedNodes = async (children) => {
285
- for (const child of children) {
286
- if (this.expanded.isSelected(child.id)) {
287
- // call the node method to ensure that the expanded property of
288
- // Node is set.
289
- await child.expand();
290
- }
291
- if (child.hasChildren) {
292
- await loadExpandedNodes(child.children);
293
- }
294
- }
295
- };
296
- await Promise.all(rootNodes
297
- .filter((node) => node.hasChildren)
298
- .map((node) => loadExpandedNodes(node.children)));
299
- const selected = this.selected.selected
300
- .map((node) => this.getNodeById(node.id))
301
- .filter(Boolean);
302
- this.selected.clear();
303
- this.selected.select(...selected);
304
- }
305
324
  initSelected() {
306
325
  const key = joinPath('rxap/tree', this.id, 'selected');
307
- if (this.metadata.cacheSelected) {
326
+ if (this.metadata['cacheSelected']) {
308
327
  if (localStorage.getItem(key)) {
309
328
  try {
310
329
  this._preSelected = JSON.parse(localStorage.getItem(key));
@@ -315,21 +334,16 @@ class TreeDataSource extends BaseDataSource {
315
334
  }
316
335
  }
317
336
  this.selected = new SelectionModel(!!this.metadata.selectMultiple, []);
318
- if (this.metadata.cacheSelected) {
337
+ if (this.metadata['cacheSelected']) {
319
338
  this._selectedLocalStorageSubscription = this.selected.changed
320
339
  .pipe(tap(() => localStorage.setItem(key, JSON.stringify(this.selected.selected.map((s) => s.id)))))
321
340
  .subscribe();
322
341
  }
323
342
  }
324
- reset() {
325
- this.selected.clear();
326
- this.expanded.clear();
327
- return this.getTreeRoot();
328
- }
329
343
  initExpanded() {
330
344
  const key = joinPath('rxap/tree', this.id, 'expanded');
331
345
  let expanded = [];
332
- if (this.metadata.cacheExpanded) {
346
+ if (this.metadata['cacheExpanded']) {
333
347
  if (localStorage.getItem(key)) {
334
348
  try {
335
349
  expanded = JSON.parse(localStorage.getItem(key));
@@ -340,35 +354,20 @@ class TreeDataSource extends BaseDataSource {
340
354
  }
341
355
  }
342
356
  this.expanded = new SelectionModel(this.metadata.expandMultiple !== false, expanded);
343
- if (this.metadata.cacheExpanded) {
357
+ if (this.metadata['cacheExpanded']) {
344
358
  this._expandedLocalStorageSubscription = this.expanded.changed
345
359
  .pipe(tap(() => localStorage.setItem(key, JSON.stringify(this.expanded.selected))))
346
360
  .subscribe();
347
361
  }
348
362
  }
349
- setGetStyle(getStyle = this.getStyle) {
350
- this.getStyle = getStyle;
351
- }
352
- /**
353
- * recall the getStyle, getIcon and toDisplay methods
354
- * and update the node objects
355
- */
356
- updateNodes() {
357
- this._data$.value.forEach(node => {
358
- node.style = this.getStyle(node.item);
359
- node.icon = this.getIcon(node.item);
360
- node.display = this.toDisplay(node.item);
361
- });
362
- this._data$.next(this._data$.value);
363
- }
364
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeDataSource, deps: [{ token: RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD }, { token: RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD }, { token: RXAP_DATA_SOURCE_METADATA }], target: i0.ɵɵFactoryTarget.Injectable }); }
365
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeDataSource }); }
363
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TreeDataSource, deps: [{ token: RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD }, { token: RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD }, { token: RXAP_DATA_SOURCE_METADATA }], target: i0.ɵɵFactoryTarget.Injectable }); }
364
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TreeDataSource }); }
366
365
  }
367
366
  __decorate([
368
367
  Required,
369
368
  __metadata("design:type", FlatTreeControl)
370
369
  ], TreeDataSource.prototype, "treeControl", void 0);
371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeDataSource, decorators: [{
370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TreeDataSource, decorators: [{
372
371
  type: Injectable
373
372
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
374
373
  type: Inject,
@@ -385,14 +384,15 @@ class TreeContentDirective {
385
384
  constructor(template) {
386
385
  this.template = template;
387
386
  }
388
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeContentDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
389
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.2", type: TreeContentDirective, selector: "ng-template[rxapTreeContent]", ngImport: i0 }); }
387
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TreeContentDirective, deps: [{ token: TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); }
388
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.4", type: TreeContentDirective, isStandalone: true, selector: "ng-template[rxapTreeContent]", ngImport: i0 }); }
390
389
  }
391
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeContentDirective, decorators: [{
390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TreeContentDirective, decorators: [{
392
391
  type: Directive,
393
392
  args: [{
394
393
  // tslint:disable-next-line:directive-selector
395
394
  selector: 'ng-template[rxapTreeContent]',
395
+ standalone: true,
396
396
  }]
397
397
  }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
398
398
  type: Inject,
@@ -402,12 +402,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
402
402
  const RXAP_TREE_CONTENT_EDITABLE_METHOD = new InjectionToken('rxap/tree-content-editable-method');
403
403
 
404
404
  class TreeComponent {
405
- get nodeDisplayEditable() {
406
- return !!this.contentEditableMethod;
407
- }
408
- get cacheId() {
409
- return ['rxap', 'tree', this.id].join('/');
410
- }
411
405
  constructor(viewContainerRef, cdr, contentEditableMethod, renderer) {
412
406
  this.viewContainerRef = viewContainerRef;
413
407
  this.cdr = cdr;
@@ -417,9 +411,6 @@ class TreeComponent {
417
411
  this.details = new EventEmitter();
418
412
  this.dividerOffset = '256px';
419
413
  this.portal = null;
420
- this.getLevel = (node) => node.depth;
421
- this.isExpandable = (node) => node.hasChildren;
422
- this.hasChild = (_, nodeData) => nodeData.hasChildren;
423
414
  /**
424
415
  * Indicates that the divider is moved with mouse down
425
416
  * @private
@@ -432,9 +423,18 @@ class TreeComponent {
432
423
  * @private
433
424
  */
434
425
  this._treeContainerWidth = null;
426
+ this.getLevel = (node) => node.depth;
427
+ this.isExpandable = (node) => node.hasChildren;
428
+ this.hasChild = (_, nodeData) => nodeData.hasChildren;
435
429
  this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
436
430
  this.contentEditableMethod = contentEditableMethod;
437
431
  }
432
+ get nodeDisplayEditable() {
433
+ return !!this.contentEditableMethod;
434
+ }
435
+ get cacheId() {
436
+ return ['rxap', 'tree', this.id].join('/');
437
+ }
438
438
  ngOnInit() {
439
439
  this.dataSource.setTreeControl(this.treeControl);
440
440
  this.dataSource.setToDisplay(this.toDisplay);
@@ -450,7 +450,7 @@ class TreeComponent {
450
450
  this.setDividerOffset(cachedOffset);
451
451
  }
452
452
  else if (isDevMode()) {
453
- console.log("Divider offset cache is not available or invalid: " + cachedOffset);
453
+ console.log('Divider offset cache is not available or invalid: ' + cachedOffset);
454
454
  }
455
455
  }
456
456
  ngAfterContentInit() {
@@ -489,7 +489,7 @@ class TreeComponent {
489
489
  }
490
490
  setDividerOffset(offset) {
491
491
  if (isDevMode()) {
492
- console.log("set divider offset to: " + offset);
492
+ console.log('set divider offset to: ' + offset);
493
493
  }
494
494
  this.dividerOffset = offset;
495
495
  this.renderer.setStyle(this.treeContainer.nativeElement, 'max-width', offset);
@@ -497,8 +497,8 @@ class TreeComponent {
497
497
  this.renderer.setStyle(this.treeContainer.nativeElement, 'flex-basis', offset);
498
498
  localStorage.setItem(this.cacheId, offset);
499
499
  }
500
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeComponent, deps: [{ token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: RXAP_TREE_CONTENT_EDITABLE_METHOD, optional: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
501
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: TreeComponent, selector: "rxap-tree", inputs: { dataSource: "dataSource", contentEditableMethod: "contentEditableMethod", toDisplay: "toDisplay", getIcon: "getIcon", getStyle: "getStyle", multiple: "multiple", hasDetails: "hasDetails", hideLeafIcon: "hideLeafIcon", id: "id", dividerOffset: "dividerOffset" }, outputs: { details: "details" }, host: { listeners: { "mouseup": "onMouseup()", "mousemove": "onMousemove($event)" } }, queries: [{ propertyName: "content", first: true, predicate: TreeContentDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"container\" fxLayout=\"row\">\n <div [ngStyle]=\"{ maxWidth: dividerOffset, minWidth: dividerOffset, flexBasis: dividerOffset }\" #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-progress-bar *ngIf=\"!dataSource || (dataSource.loading$ | async)\" mode=\"indeterminate\"></mat-progress-bar>\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template [ngIf]=\"multiple\">\n <mat-checkbox\n (change)=\"node.toggleSelect()\"\n [checked]=\"node.selected\"\n [disabled]=\"!node.hasDetails\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\">\n {{ node.display }}\n </mat-checkbox>\n </ng-template>\n <ng-template [ngIf]=\"!multiple\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n [ngStyle]=\"node.style\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n [ngStyle]=\"node.style\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".container{height:100%}.tree-view{background-color:initial}.details{max-height:calc(100vh - 96px);overflow-y:auto}.tree-container{max-height:calc(100vh - 96px);overflow-y:auto;width:-moz-fit-content;width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i2.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: i3.MatLegacyButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i6.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "directive", type: i6.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { kind: "component", type: i7.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i8.MatLegacyProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i9.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: i10.ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { kind: "directive", type: i11.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { kind: "component", type: i12.MatLegacyCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i13.MatLegacyProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
500
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TreeComponent, deps: [{ token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: RXAP_TREE_CONTENT_EDITABLE_METHOD, optional: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
501
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: TreeComponent, isStandalone: true, selector: "rxap-tree", inputs: { dataSource: "dataSource", contentEditableMethod: "contentEditableMethod", toDisplay: "toDisplay", getIcon: "getIcon", getStyle: "getStyle", multiple: "multiple", hasDetails: "hasDetails", hideLeafIcon: "hideLeafIcon", id: "id", dividerOffset: "dividerOffset" }, outputs: { details: "details" }, host: { listeners: { "mouseup": "onMouseup()", "mousemove": "onMousemove($event)" } }, queries: [{ propertyName: "content", first: true, predicate: TreeContentDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"container\" fxLayout=\"row\">\n <div #treeContainer [ngStyle]=\"{ maxWidth: dividerOffset, minWidth: dividerOffset, flexBasis: dividerOffset }\"\n class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-progress-bar *ngIf=\"!dataSource || (dataSource.loading$ | async)\" mode=\"indeterminate\"></mat-progress-bar>\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\"\n class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template [ngIf]=\"multiple\">\n <mat-checkbox\n (change)=\"node.toggleSelect()\"\n [checked]=\"node.selected\"\n [disabled]=\"!node.hasDetails\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\">\n {{ node.display }}\n </mat-checkbox>\n </ng-template>\n <ng-template [ngIf]=\"!multiple\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".container{height:100%}.tree-view{background-color:initial}.details{max-height:calc(100vh - 96px);overflow-y:auto}.tree-container{max-height:calc(100vh - 96px);overflow-y:auto;width:-moz-fit-content;width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { kind: "directive", type: i1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ExtendedModule }, { kind: "directive", type: i2.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "directive", type: i2.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i3.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i4.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i4.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i4.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i4.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i4.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i9.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i10.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
502
502
  }
503
503
  __decorate([
504
504
  Required,
@@ -510,9 +510,25 @@ __decorate([
510
510
  __metadata("design:paramtypes", [Node]),
511
511
  __metadata("design:returntype", void 0)
512
512
  ], TreeComponent.prototype, "openDetails", null);
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeComponent, decorators: [{
513
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TreeComponent, decorators: [{
514
514
  type: Component,
515
- args: [{ selector: 'rxap-tree', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"container\" fxLayout=\"row\">\n <div [ngStyle]=\"{ maxWidth: dividerOffset, minWidth: dividerOffset, flexBasis: dividerOffset }\" #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-progress-bar *ngIf=\"!dataSource || (dataSource.loading$ | async)\" mode=\"indeterminate\"></mat-progress-bar>\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template [ngIf]=\"multiple\">\n <mat-checkbox\n (change)=\"node.toggleSelect()\"\n [checked]=\"node.selected\"\n [disabled]=\"!node.hasDetails\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\">\n {{ node.display }}\n </mat-checkbox>\n </ng-template>\n <ng-template [ngIf]=\"!multiple\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n [ngStyle]=\"node.style\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n [ngStyle]=\"node.style\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".container{height:100%}.tree-view{background-color:initial}.details{max-height:calc(100vh - 96px);overflow-y:auto}.tree-container{max-height:calc(100vh - 96px);overflow-y:auto;width:-moz-fit-content;width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}\n"] }]
515
+ args: [{ selector: 'rxap-tree', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
516
+ FlexModule,
517
+ NgStyle,
518
+ ExtendedModule,
519
+ NgIf,
520
+ MatProgressBarModule,
521
+ MatTreeModule,
522
+ MatIconModule,
523
+ IconDirective,
524
+ MatCheckboxModule,
525
+ MatButtonModule,
526
+ ContenteditableDirective,
527
+ MatProgressSpinnerModule,
528
+ MatDividerModule,
529
+ PortalModule,
530
+ AsyncPipe,
531
+ ], template: "<div class=\"container\" fxLayout=\"row\">\n <div #treeContainer [ngStyle]=\"{ maxWidth: dividerOffset, minWidth: dividerOffset, flexBasis: dividerOffset }\"\n class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-progress-bar *ngIf=\"!dataSource || (dataSource.loading$ | async)\" mode=\"indeterminate\"></mat-progress-bar>\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\"\n class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template [ngIf]=\"multiple\">\n <mat-checkbox\n (change)=\"node.toggleSelect()\"\n [checked]=\"node.selected\"\n [disabled]=\"!node.hasDetails\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\">\n {{ node.display }}\n </mat-checkbox>\n </ng-template>\n <ng-template [ngIf]=\"!multiple\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n [ngStyle]=\"node.style\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".container{height:100%}.tree-view{background-color:initial}.details{max-height:calc(100vh - 96px);overflow-y:auto}.tree-container{max-height:calc(100vh - 96px);overflow-y:auto;width:-moz-fit-content;width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}\n"] }]
516
532
  }], ctorParameters: function () { return [{ type: i0.ViewContainerRef, decorators: [{
517
533
  type: Inject,
518
534
  args: [ViewContainerRef]
@@ -560,58 +576,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
560
576
  args: ['mousemove', ['$event']]
561
577
  }] } });
562
578
 
563
- class TreeComponentModule {
564
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
565
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: TreeComponentModule, declarations: [TreeComponent, TreeContentDirective], imports: [CommonModule,
566
- MatTreeModule,
567
- MatLegacyButtonModule,
568
- MatIconModule,
569
- FlexLayoutModule,
570
- MatDividerModule,
571
- MatLegacyProgressSpinnerModule,
572
- PortalModule,
573
- ContenteditableDirectiveModule,
574
- IconDirectiveModule,
575
- MatLegacyCheckboxModule,
576
- MatLegacyProgressBarModule], exports: [TreeComponent, TreeContentDirective] }); }
577
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeComponentModule, imports: [CommonModule,
578
- MatTreeModule,
579
- MatLegacyButtonModule,
580
- MatIconModule,
581
- FlexLayoutModule,
582
- MatDividerModule,
583
- MatLegacyProgressSpinnerModule,
584
- PortalModule,
585
- ContenteditableDirectiveModule,
586
- IconDirectiveModule,
587
- MatLegacyCheckboxModule,
588
- MatLegacyProgressBarModule] }); }
589
- }
590
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TreeComponentModule, decorators: [{
591
- type: NgModule,
592
- args: [{
593
- imports: [
594
- CommonModule,
595
- MatTreeModule,
596
- MatLegacyButtonModule,
597
- MatIconModule,
598
- FlexLayoutModule,
599
- MatDividerModule,
600
- MatLegacyProgressSpinnerModule,
601
- PortalModule,
602
- ContenteditableDirectiveModule,
603
- IconDirectiveModule,
604
- MatLegacyCheckboxModule,
605
- MatLegacyProgressBarModule,
606
- ],
607
- declarations: [TreeComponent, TreeContentDirective],
608
- exports: [TreeComponent, TreeContentDirective]
609
- }]
610
- }] });
611
-
612
579
  /**
613
580
  * Generated bundle index. Do not edit.
614
581
  */
615
582
 
616
- export { RXAP_TREE_CONTENT_EDITABLE_METHOD, RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD, RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD, TreeComponent, TreeComponentModule, TreeContentDirective, TreeDataSource, isSelectionChange };
583
+ export { RXAP_TREE_CONTENT_EDITABLE_METHOD, RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD, RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD, TreeComponent, TreeContentDirective, TreeDataSource, isSelectionChange };
617
584
  //# sourceMappingURL=rxap-tree.mjs.map