@anzusystems/common-admin 1.47.0-beta.dev-1782072299 → 1.47.0-beta.dev-1782072499

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/dist/labs.d.ts CHANGED
@@ -1852,6 +1852,22 @@ export declare const sortByPosition: <TItem extends {
1852
1852
  position: number;
1853
1853
  }>(items: TItem[]) => TItem[];
1854
1854
 
1855
+ /**
1856
+ * Non-mutating deep `sortByPosition`. Sorts the top-level array, then for every
1857
+ * item carrying one of `childKeys` as an array, recursively sorts that nested
1858
+ * array too. The same `childKeys` apply at every depth and keys absent on a node
1859
+ * are skipped — so pass the UNION of nested position-bearing array fields across
1860
+ * the whole shape (e.g. `['contentItems', 'boxPositionIncludes']`).
1861
+ *
1862
+ * Same non-mutating contract as `sortByPosition`: only nodes that actually have a
1863
+ * nested array are shallow-cloned; leaf nodes and untouched branches keep their
1864
+ * reference. Use it to normalize an API response's ordering before it becomes
1865
+ * store state, in one call, for nested collections.
1866
+ */
1867
+ export declare const sortByPositionDeep: <TItem extends {
1868
+ position: number;
1869
+ }>(items: TItem[], childKeys?: string[]) => TItem[];
1870
+
1855
1871
  declare const SortOrder: {
1856
1872
  readonly Asc: "asc";
1857
1873
  readonly Desc: "desc";