@webitel/ui-sdk 26.8.117 → 26.8.118

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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Walks a tree depth-first and returns the nodes from a root down to the
3
+ * first node matching `isTarget`, both ends included, or `null` when nothing
4
+ * matches. Children are read from `childrenKey` (e.g. `service` for case
5
+ * service catalogs, whose services nest under `service`).
6
+ *
7
+ * The path is what a breadcrumb, an "A / B / C" label or an ancestor check
8
+ * needs: `path.map(({ name }) => name)`, `path.slice(0, -1)`, and so on.
9
+ */
10
+ export declare function findTreePath<TNode extends object>(nodes: readonly TNode[] | null | undefined, isTarget: (node: TNode) => boolean, childrenKey: NoInfer<keyof TNode>): TNode[] | null;
@@ -1,3 +1,4 @@
1
1
  export * from './displayText';
2
+ export * from './findTreePath';
2
3
  export * from './formatDate';
3
4
  export * from './prettifyDate';