@arsedizioni/ars-utils 21.2.270 → 21.2.271

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arsedizioni/ars-utils",
3
- "version": "21.2.270",
3
+ "version": "21.2.271",
4
4
  "author": {
5
5
  "email": "software@arsedizioni.it",
6
6
  "name": "Fabio Buscaroli, Alberto Doria"
@@ -382,18 +382,22 @@ declare class SelectTreeDialogComponent implements OnInit {
382
382
  /** Dialog configuration, injected and exposed as a signal. */
383
383
  protected readonly dialogData: _angular_core.WritableSignal<SelectTreeDialogData>;
384
384
  private readonly tree;
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[]>;
385
+ /** Reference to the Material tree component. */
386
+ protected readonly matTree: _angular_core.Signal<MatTree<ItemNode, ItemNode>>;
387
+ /** Provides children of a tree node to the tree component. */
388
+ protected readonly childrenAccessor: (node: ItemNode) => ItemNode[];
389
+ /** Root nodes used as the tree data source. */
390
+ protected readonly treeNodes: _angular_core.WritableSignal<ItemNode[]>;
390
391
  /** Currently selected tree node. */
391
- protected readonly currentNode: _angular_core.WritableSignal<SelectableNode>;
392
+ protected readonly currentNode: _angular_core.WritableSignal<ItemNode>;
393
+ /** Current filter text, bound via ngModel. */
392
394
  protected filterText: string;
393
- protected filteredItems: SelectableNode[];
394
- protected filterIndex: number;
395
+ /** Nodes matching the current filter text. */
396
+ protected readonly filteredItems: _angular_core.WritableSignal<ItemNode[]>;
397
+ /** Index of the currently highlighted filtered node. */
398
+ protected readonly filterIndex: _angular_core.WritableSignal<number>;
395
399
  protected readonly canAppend: _angular_core.WritableSignal<boolean>;
396
- protected hasChild: (_: number, _node: SelectableNode) => boolean;
400
+ protected hasChild: (_: number, node: ItemNode) => boolean;
397
401
  ngOnInit(): void;
398
402
  /**
399
403
  * Confirm the current selection and close the dialog.
@@ -404,7 +408,7 @@ declare class SelectTreeDialogComponent implements OnInit {
404
408
  * @param e - The mouse event (propagation is stopped).
405
409
  * @param node - The node that was clicked.
406
410
  */
407
- protected select(e: MouseEvent, node: SelectableNode): void;
411
+ protected select(e: MouseEvent, node: ItemNode): void;
408
412
  /**
409
413
  * Clear the active filter text.
410
414
  */
@@ -420,15 +424,22 @@ declare class SelectTreeDialogComponent implements OnInit {
420
424
  protected nextFiltered(): void;
421
425
  /**
422
426
  * Expand a node and all of its parent nodes.
423
- * @param node - The selectable node to expand.
427
+ * @param node - The node to expand.
428
+ * @returns Always false.
424
429
  */
425
- expand(node: SelectableNode): boolean;
430
+ expand(node: ItemNode): boolean;
426
431
  /**
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.
432
+ * Recursively get all nodes in depth-first order.
433
+ * @param nodes - Root nodes to traverse.
434
+ * @param result - Accumulator array.
430
435
  */
431
- private flattenNodes;
436
+ private getAllNodes;
437
+ /**
438
+ * Recursively find a node by id.
439
+ * @param nodes - Nodes to search.
440
+ * @param id - The id to find.
441
+ */
442
+ private findInTree;
432
443
  /**
433
444
  * Append a new node to the tree.
434
445
  * @param node - The node to insert.