@arsedizioni/ars-utils 21.2.349 → 21.2.351

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.349",
3
+ "version": "21.2.351",
4
4
  "author": {
5
5
  "email": "software@arsedizioni.it",
6
6
  "name": "Fabio Buscaroli, Alberto Doria"
@@ -1369,6 +1369,11 @@ declare class TreePickerComponent {
1369
1369
  readonly descriptionEmpty: _angular_core.InputSignal<string>;
1370
1370
  /** Maximum number of tree levels to display (default: 3). */
1371
1371
  readonly maxDepth: _angular_core.InputSignal<number>;
1372
+ /**
1373
+ * List of node IDs at depth >= maxDepth that are allowed to be expanded and selected.
1374
+ * Nodes beyond maxDepth not in this list are visible and expandable but have no checkbox.
1375
+ */
1376
+ readonly maxDepthOverrides: _angular_core.InputSignal<string[]>;
1372
1377
  /**
1373
1378
  * Number of levels to auto-expand on load.
1374
1379
  * 0 or undefined = only top level visible (no expansion);
@@ -1385,16 +1390,21 @@ declare class TreePickerComponent {
1385
1390
  readonly changed: _angular_core.OutputEmitterRef<void>;
1386
1391
  private readonly _treeRef;
1387
1392
  private readonly _elRef;
1393
+ /** Set of node IDs that override the maxDepth selection limit. */
1394
+ private readonly _overridesSet;
1388
1395
  /** All three maps rebuilt lazily as a single computed whenever taxonomy changes. */
1389
1396
  private readonly _maps;
1390
1397
  /** O(1) set of selected ids, rebuilt only when selection changes. */
1391
1398
  private readonly _selectedSet;
1392
1399
  /** True when at least one node is explicitly selected. */
1393
1400
  protected readonly hasSelection: _angular_core.Signal<boolean>;
1394
- /** Count of selected nodes within the visible levels (depth 0 to maxDepth-1), shown in the tab label. */
1401
+ /** Count of selected nodes within selectable levels (depth < maxDepth or in overrides), shown in the tab label. */
1395
1402
  protected readonly selectedVisibleCount: _angular_core.Signal<number>;
1396
1403
  readonly treeChildrenAccessor: (node: INode) => INode[];
1397
1404
  readonly hasChild: (_: number, node: INode) => boolean;
1405
+ /** Returns true when the node can be selected: depth < maxDepth or explicitly listed in maxDepthOverrides. */
1406
+ protected isSelectable(node: INode): boolean;
1407
+ private _isSelectableNode;
1398
1408
  /** Current filter text. */
1399
1409
  protected readonly filterText: _angular_core.WritableSignal<string>;
1400
1410
  /** Nodes matching the current filter text, in nodeMap iteration order. */
@@ -1457,12 +1467,12 @@ declare class TreePickerComponent {
1457
1467
  */
1458
1468
  protected isChipVisible(id: string): boolean;
1459
1469
  /**
1460
- * Returns all descendants of node in depth-first order, including nodes
1461
- * beyond the 3-level display limit.
1470
+ * Returns only the selectable descendants of node (depth < maxDepth or in overrides),
1471
+ * used for indeterminate state and parent auto-selection logic.
1462
1472
  * @param node - root of the subtree to traverse
1463
- * @returns flat array of all descendant INodes
1473
+ * @returns flat array of selectable descendant INodes
1464
1474
  */
1465
- private _getDescendants;
1475
+ private _getSelectableDescendants;
1466
1476
  /**
1467
1477
  * Walks up the ancestor chain from node, selecting a parent only when all
1468
1478
  * its descendants are in the set, deselecting it otherwise.
@@ -1471,7 +1481,7 @@ declare class TreePickerComponent {
1471
1481
  */
1472
1482
  private _syncParentsInSet;
1473
1483
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreePickerComponent, never>;
1474
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<TreePickerComponent, "tree-picker", never, { "tree": { "alias": "tree"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "descriptionEmpty": { "alias": "descriptionEmpty"; "required": false; "isSignal": true; }; "maxDepth": { "alias": "maxDepth"; "required": false; "isSignal": true; }; "minDepth": { "alias": "minDepth"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "selectionCount": "selectionCount"; "changed": "changed"; }, never, never, true, never>;
1484
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TreePickerComponent, "tree-picker", never, { "tree": { "alias": "tree"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "descriptionEmpty": { "alias": "descriptionEmpty"; "required": false; "isSignal": true; }; "maxDepth": { "alias": "maxDepth"; "required": false; "isSignal": true; }; "maxDepthOverrides": { "alias": "maxDepthOverrides"; "required": false; "isSignal": true; }; "minDepth": { "alias": "minDepth"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "selectionCount": "selectionCount"; "changed": "changed"; }, never, never, true, never>;
1475
1485
  }
1476
1486
 
1477
1487
  export { ApplicationDialogService, ArsUIApplicationModule, ButtonSelectorComponent, ButtonToggleComponent, CalendarEmptyHeader, ChipsSelectorComponent, CurrentFilter, CurrentFilterChanged, CurrentFilterItem, FileInputComponent, FilePreviewComponent, FilterBarComponent, Filters, ItemNode, PromptDateDialogComponent, PromptDialogComponent, PromptDialogType, PromptOtpDialogComponent, PromptTimeDialogComponent, ResizeTableColumnDirective, SelectDialogComponent, SelectFileDialogComponent, SelectPictureDialogComponent, SelectTreeDialogComponent, SelectableItem, SelectableNode, SendToDialogComponent, TreeDataSource, TreePickerComponent };