@anzusystems/common-admin 1.47.0-beta.dev-1782079999 → 1.47.0-beta.dev-1784059859

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
@@ -1523,8 +1523,22 @@ export declare interface PositionHint {
1523
1523
  export declare type PositionOption<TItem> = false | keyof TItem | {
1524
1524
  field: keyof TItem;
1525
1525
  multiplier?: number;
1526
+ strategy?: PositionStrategy;
1526
1527
  };
1527
1528
 
1529
+ /**
1530
+ * How the managed order field is maintained.
1531
+ * - `renumber` (default) — positions are opaque ordinals: every write rewrites them to a clean
1532
+ * `(index + 1) * multiplier` series.
1533
+ * - `preserve-values` — positions are meaningful ABSOLUTE numbers (e.g. a CMS page interleaves its
1534
+ * rows with another collection on the same numeric scale, so rewriting 10/310 to 100/200 would
1535
+ * move unrelated items). A REORDER then only swaps rows through the EXISTING slots: the set of
1536
+ * values is kept and reassigned, ascending, to the new row order. It is a reorder policy, not a
1537
+ * normalization policy — `add` keeps the position the factory/consumer supplied, `delete` leaves
1538
+ * holes rather than compacting.
1539
+ */
1540
+ export declare type PositionStrategy = 'renumber' | 'preserve-values';
1541
+
1528
1542
  declare interface Props<TItem extends Record<string, any>> {
1529
1543
  /**
1530
1544
  * New-row factory. Add / "add after" insert `factory()` through the controller
@@ -1545,6 +1559,7 @@ declare interface Props<TItem extends Record<string, any>> {
1545
1559
  position?: string | false | {
1546
1560
  field: string;
1547
1561
  multiplier?: number;
1562
+ strategy?: PositionStrategy;
1548
1563
  };
1549
1564
  /**
1550
1565
  * Extra fields to drop from the dirty content-hash (position is always dropped).
@@ -1646,6 +1661,7 @@ declare interface Props_2<TItem extends Record<string, any>> {
1646
1661
  position?: string | false | {
1647
1662
  field: string;
1648
1663
  multiplier?: number;
1664
+ strategy?: PositionStrategy;
1649
1665
  };
1650
1666
  /**
1651
1667
  * Extra fields to drop from the dirty content-hash (position is always
@@ -1755,6 +1771,7 @@ declare interface Props_3<TItem extends Record<string, any>> {
1755
1771
  position?: string | false | {
1756
1772
  field: string;
1757
1773
  multiplier?: number;
1774
+ strategy?: PositionStrategy;
1758
1775
  };
1759
1776
  /** Parent-key field written onto reparented rows. Default `'parent'`. */
1760
1777
  parentField?: string;