@arsedizioni/ars-utils 21.2.268 → 21.2.270
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +3 -5
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-help.mjs +30 -24
- package/fesm2022/arsedizioni-ars-utils-help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +35 -26
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-help.d.ts +12 -12
- package/types/arsedizioni-ars-utils-ui.application.d.ts +12 -12
package/package.json
CHANGED
|
@@ -2,9 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { OnInit, OnDestroy, AfterViewInit } from '@angular/core';
|
|
3
3
|
import { Folder, ApiResult } from '@arsedizioni/ars-utils/core';
|
|
4
4
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
5
|
-
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
6
5
|
import { MatSidenav } from '@angular/material/sidenav';
|
|
7
|
-
import {
|
|
6
|
+
import { MatTree } from '@angular/material/tree';
|
|
8
7
|
import * as rxjs from 'rxjs';
|
|
9
8
|
import { BehaviorSubject } from 'rxjs';
|
|
10
9
|
|
|
@@ -78,19 +77,14 @@ declare class HelpViewerComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
|
78
77
|
protected indexNode: IndexInfo | undefined;
|
|
79
78
|
private readonly history;
|
|
80
79
|
protected readonly canGoBack: i0.Signal<boolean>;
|
|
81
|
-
/**
|
|
82
|
-
* Manage flat tree view
|
|
83
|
-
*/
|
|
84
80
|
private tree;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
protected
|
|
81
|
+
readonly matTree: i0.Signal<MatTree<IndexNode, IndexNode>>;
|
|
82
|
+
/** Provides the level of a flat node to the tree component. */
|
|
83
|
+
protected readonly levelAccessor: (node: IndexNode) => number;
|
|
84
|
+
/** Flat list of all tree nodes used as the tree data source. */
|
|
85
|
+
protected readonly flatNodes: i0.WritableSignal<IndexNode[]>;
|
|
88
86
|
private folders?;
|
|
89
|
-
private getChildren;
|
|
90
|
-
private getLevel;
|
|
91
|
-
private isExpandable;
|
|
92
87
|
protected hasChild: (_: number, _node: IndexNode) => boolean;
|
|
93
|
-
protected transformer: (item: IndexInfo, level: number) => IndexNode;
|
|
94
88
|
ngOnInit(): void;
|
|
95
89
|
ngOnDestroy(): void;
|
|
96
90
|
ngAfterViewInit(): void;
|
|
@@ -128,6 +122,12 @@ declare class HelpViewerComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
|
128
122
|
* and all its ancestor nodes.
|
|
129
123
|
*/
|
|
130
124
|
private expandCurrentFolder;
|
|
125
|
+
/**
|
|
126
|
+
* Recursively flattens a nested IndexInfo tree into a depth-first ordered array of IndexNodes.
|
|
127
|
+
* @param items - Root-level nodes to flatten.
|
|
128
|
+
* @param level - Current depth level.
|
|
129
|
+
*/
|
|
130
|
+
private flattenNodes;
|
|
131
131
|
/**
|
|
132
132
|
* Retrieves and displays a help chapter by id.
|
|
133
133
|
* Optionally scrolls to an anchor or pixel offset after loading.
|
|
@@ -4,8 +4,7 @@ import { Searchable, SearchBag, NameValueItem, DateInterval, SearchFilterMetadat
|
|
|
4
4
|
import { MatFormFieldAppearance, MatFormFieldControl } from '@angular/material/form-field';
|
|
5
5
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
6
6
|
import { DialogService } from '@arsedizioni/ars-utils/ui';
|
|
7
|
-
import {
|
|
8
|
-
import { MatTreeFlatDataSource } from '@angular/material/tree';
|
|
7
|
+
import { MatTree } from '@angular/material/tree';
|
|
9
8
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
10
9
|
import { NgForm, ControlValueAccessor, NgControl } from '@angular/forms';
|
|
11
10
|
import { MatCheckboxChange } from '@angular/material/checkbox';
|
|
@@ -383,23 +382,18 @@ declare class SelectTreeDialogComponent implements OnInit {
|
|
|
383
382
|
/** Dialog configuration, injected and exposed as a signal. */
|
|
384
383
|
protected readonly dialogData: _angular_core.WritableSignal<SelectTreeDialogData>;
|
|
385
384
|
private readonly tree;
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
protected
|
|
385
|
+
protected matTree: MatTree<SelectableNode>;
|
|
386
|
+
/** Provides the level of a flat node to the tree component. */
|
|
387
|
+
protected readonly levelAccessor: (node: SelectableNode) => number;
|
|
388
|
+
/** Flat list of all tree nodes used as the tree data source. */
|
|
389
|
+
protected readonly flatNodes: _angular_core.WritableSignal<SelectableNode[]>;
|
|
389
390
|
/** Currently selected tree node. */
|
|
390
391
|
protected readonly currentNode: _angular_core.WritableSignal<SelectableNode>;
|
|
391
392
|
protected filterText: string;
|
|
392
393
|
protected filteredItems: SelectableNode[];
|
|
393
394
|
protected filterIndex: number;
|
|
394
395
|
protected readonly canAppend: _angular_core.WritableSignal<boolean>;
|
|
395
|
-
/**
|
|
396
|
-
* Manage flat tree view
|
|
397
|
-
*/
|
|
398
|
-
private getChildren;
|
|
399
|
-
private getLevel;
|
|
400
|
-
private isExpandable;
|
|
401
396
|
protected hasChild: (_: number, _node: SelectableNode) => boolean;
|
|
402
|
-
protected transformer: (item: ItemNode, level: number) => SelectableNode;
|
|
403
397
|
ngOnInit(): void;
|
|
404
398
|
/**
|
|
405
399
|
* Confirm the current selection and close the dialog.
|
|
@@ -429,6 +423,12 @@ declare class SelectTreeDialogComponent implements OnInit {
|
|
|
429
423
|
* @param node - The selectable node to expand.
|
|
430
424
|
*/
|
|
431
425
|
expand(node: SelectableNode): boolean;
|
|
426
|
+
/**
|
|
427
|
+
* Recursively flatten a nested ItemNode tree into a depth-first ordered array of SelectableNodes.
|
|
428
|
+
* @param items - Root-level nodes to flatten.
|
|
429
|
+
* @param level - Current depth level.
|
|
430
|
+
*/
|
|
431
|
+
private flattenNodes;
|
|
432
432
|
/**
|
|
433
433
|
* Append a new node to the tree.
|
|
434
434
|
* @param node - The node to insert.
|