@arsedizioni/ars-utils 21.2.311 → 21.2.314

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.311",
3
+ "version": "21.2.314",
4
4
  "author": {
5
5
  "email": "software@arsedizioni.it",
6
6
  "name": "Fabio Buscaroli, Alberto Doria"
@@ -1025,7 +1025,7 @@ declare class ClipperDocumentMenuComponent {
1025
1025
  /** Internal counter incremented on each external selection-model change to drive signal re-evaluation. */
1026
1026
  private readonly selectionChangeTick;
1027
1027
  readonly useSelections: _angular_core.InputSignal<boolean>;
1028
- readonly selectionSource: _angular_core.InputSignal<"selection" | "bag" | "none">;
1028
+ readonly selectionSource: _angular_core.InputSignal<"bag" | "selection" | "none">;
1029
1029
  /**
1030
1030
  * Computed signal that returns the current effective document selection.
1031
1031
  * Re-evaluates when any input signal or the underlying selection model changes.
@@ -383,6 +383,7 @@ declare class SelectTreeDialogComponent {
383
383
  /** Dialog configuration, injected and exposed as a signal. */
384
384
  protected readonly dialogData: _angular_core.WritableSignal<SelectTreeDialogData>;
385
385
  private readonly tree;
386
+ private readonly _elRef;
386
387
  /** Reference to the Material tree component. */
387
388
  protected readonly matTree: _angular_core.Signal<MatTree<ItemNode, ItemNode>>;
388
389
  /** Provides children of a tree node to the tree component. */
@@ -395,9 +396,13 @@ declare class SelectTreeDialogComponent {
395
396
  protected readonly filterText: _angular_core.WritableSignal<string>;
396
397
  /** Nodes matching the current filter text. */
397
398
  protected readonly filteredItems: _angular_core.WritableSignal<ItemNode[]>;
398
- /** Index of the currently highlighted filtered node. */
399
+ /** Index of the currently highlighted filtered node (-1 = none). */
399
400
  protected readonly filterIndex: _angular_core.WritableSignal<number>;
401
+ /** The currently highlighted filtered node, or null. */
402
+ protected readonly filteredNode: _angular_core.Signal<ItemNode>;
400
403
  protected readonly canAppend: _angular_core.WritableSignal<boolean>;
404
+ /** Flat node map rebuilt whenever treeNodes changes. */
405
+ private readonly _nodeMap;
401
406
  protected hasChild: (_: number, node: ItemNode) => boolean;
402
407
  constructor();
403
408
  /**
@@ -415,26 +420,30 @@ declare class SelectTreeDialogComponent {
415
420
  */
416
421
  protected clearFilter(): void;
417
422
  /**
418
- * Filter the tree nodes by name.
419
- * @param text - Optional text to set as the filter before applying.
423
+ * Filter the tree nodes by name (minimum 3 characters).
420
424
  */
421
- protected doFilter(text?: string): void;
425
+ protected doFilter(): void;
422
426
  /**
423
427
  * Advance to the next matching filtered node and scroll it into view.
424
428
  */
425
429
  protected nextFiltered(): void;
430
+ /**
431
+ * Returns true when the node is the currently highlighted filter match.
432
+ * @param node - tree node to check.
433
+ */
434
+ protected isFilteredNode(node: ItemNode): boolean;
435
+ /**
436
+ * Expands ancestors of the target node and scrolls it into view.
437
+ * @param index - index within `items` to scroll to.
438
+ * @param items - current filtered items array.
439
+ */
440
+ private _scrollToFiltered;
426
441
  /**
427
442
  * Expand a node and all of its parent nodes.
428
443
  * @param node - The node to expand.
429
444
  * @returns Always false.
430
445
  */
431
446
  expand(node: ItemNode): boolean;
432
- /**
433
- * Recursively get all nodes in depth-first order.
434
- * @param nodes - Root nodes to traverse.
435
- * @param result - Accumulator array.
436
- */
437
- private getAllNodes;
438
447
  /**
439
448
  * Recursively find a node by id.
440
449
  * @param nodes - Nodes to search.