@anzusystems/common-admin 1.47.0-beta.dev-1782073999 → 1.47.0-beta.dev-1782074999

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
@@ -1180,6 +1180,8 @@ export declare interface ListEditorChanges<TItem> {
1180
1180
  export declare interface ListEditorHandle<TItem extends Record<string, any>> {
1181
1181
  items: ComputedRef<TItem[]>;
1182
1182
  hasUnsaved: ComputedRef<boolean>;
1183
+ /** Count of distinct unconfirmed changes (added/edited/moved rows + deferred-deletion tombstones). */
1184
+ unsavedCount: ComputedRef<number>;
1183
1185
  hasErrors: ComputedRef<boolean>;
1184
1186
  invalidKeys: ComputedRef<Set<ListEditorKey>>;
1185
1187
  /** Amber: is this row added / edited / moved since the last commit? */
@@ -1198,7 +1200,12 @@ export declare interface ListEditorHandle<TItem extends Record<string, any>> {
1198
1200
  reset: (items?: TItem[]) => void;
1199
1201
  addItem: (item?: TItem, hint?: PositionHint) => void;
1200
1202
  updateItem: (key: ListEditorKey, next: TItem | Partial<TItem> | ((current: TItem) => TItem)) => void;
1201
- deleteItem: (key: ListEditorKey) => void;
1203
+ /** Remove a row. `trackDeleted: false` (immediate mode) skips the deferred-deletion tombstone. */
1204
+ deleteItem: (key: ListEditorKey, opts?: {
1205
+ trackDeleted?: boolean;
1206
+ }) => void;
1207
+ /** Clear a deferred-deletion tombstone (the caller re-inserts the row, e.g. reorder Cancel). */
1208
+ restoreDeleted: (key: ListEditorKey) => void;
1202
1209
  moveItem: (fromIndex: number, toIndex: number) => void;
1203
1210
  /** Escape hatch: a row form (e.g. vuelidate) reports its own validity instead of `validate`. */
1204
1211
  registerValidity: (key: ListEditorKey, isValid: () => boolean) => () => void;
@@ -1308,6 +1315,8 @@ export declare interface NestedListEditorHandle<TItem extends Record<string, any
1308
1315
  /** Tree view rows (key/index/raw/depth/parent…), as consumed by the renderer. */
1309
1316
  viewItems: ComputedRef<NestedViewItem<TItem>[]>;
1310
1317
  hasUnsaved: ComputedRef<boolean>;
1318
+ /** Count of distinct unconfirmed changes (added/edited/moved/reparented rows + deferred deletions). */
1319
+ unsavedCount: ComputedRef<number>;
1311
1320
  hasErrors: ComputedRef<boolean>;
1312
1321
  invalidKeys: ComputedRef<Set<ListEditorKey>>;
1313
1322
  /** Amber: is this row added / edited / moved / reparented since the last commit? */
@@ -1328,7 +1337,10 @@ export declare interface NestedListEditorHandle<TItem extends Record<string, any
1328
1337
  addAfter: (afterKey: ListEditorKey, item?: TItem, childrenAllowed?: boolean) => void;
1329
1338
  addChild: (parentKey: ListEditorKey, item?: TItem, childrenAllowed?: boolean) => void;
1330
1339
  updateItem: (key: ListEditorKey, data: TItem, markDirty?: boolean) => void;
1331
- deleteItem: (key: ListEditorKey) => void;
1340
+ deleteItem: (key: ListEditorKey, opts?: {
1341
+ trackDeleted?: boolean;
1342
+ }) => void;
1343
+ restoreDeleted: (key: ListEditorKey) => void;
1332
1344
  moveUp: (key: ListEditorKey) => boolean;
1333
1345
  moveDown: (key: ListEditorKey) => boolean;
1334
1346
  moveTop: (key: ListEditorKey) => boolean;
@@ -1493,6 +1505,13 @@ declare interface Props<TItem extends Record<string, any>> {
1493
1505
  disableUnsaved?: boolean;
1494
1506
  deleteConfirmTitle?: string | null;
1495
1507
  deleteConfirmText?: string | null;
1508
+ /**
1509
+ * How a row delete persists. `deferred` (default): the row disappears but the deletion counts as an
1510
+ * unconfirmed change (`unsavedCount`) until save, and is revertible until then. `immediate`: the
1511
+ * consumer deletes on the backend (`:on-delete`) — the dialog states it is irreversible and the
1512
+ * delete does NOT read as unsaved.
1513
+ */
1514
+ deleteMode?: 'immediate' | 'deferred';
1496
1515
  closeVariant?: 'auto' | 'icon' | 'labeled';
1497
1516
  /**
1498
1517
  * Render every `#item` slot expanded — no edit pencil, inline footer, or row-click
@@ -1573,6 +1592,12 @@ declare interface Props_2<TItem extends Record<string, any>> {
1573
1592
  disableDeleteConfirm?: boolean;
1574
1593
  deleteConfirmTitle?: string | null;
1575
1594
  deleteConfirmText?: string | null;
1595
+ /**
1596
+ * How a row delete persists. `deferred` (default): the row disappears but the deletion counts as an
1597
+ * unconfirmed change until save (revertible until then, incl. via reorder Cancel). `immediate`: the
1598
+ * consumer deletes on the backend — the dialog says it is irreversible and it does NOT read as unsaved.
1599
+ */
1600
+ deleteMode?: 'immediate' | 'deferred';
1576
1601
  closeVariant?: 'auto' | 'icon' | 'labeled';
1577
1602
  loadingKeys?: Set<ListEditorKey> | null;
1578
1603
  showReorderToggle?: boolean;
@@ -1667,6 +1692,12 @@ declare interface Props_3<TItem extends Record<string, any>> {
1667
1692
  disableDeleteConfirm?: boolean;
1668
1693
  deleteConfirmTitle?: string | null;
1669
1694
  deleteConfirmText?: string | null;
1695
+ /**
1696
+ * How a row delete persists. `deferred` (default): the row disappears but the deletion counts as an
1697
+ * unconfirmed change until save (revertible until then, incl. via reorder Cancel). `immediate`: the
1698
+ * consumer deletes on the backend — the dialog says it is irreversible and it does NOT read as unsaved.
1699
+ */
1700
+ deleteMode?: 'immediate' | 'deferred';
1670
1701
  closeVariant?: 'auto' | 'icon' | 'labeled';
1671
1702
  loadingKeys?: Set<ListEditorKey> | null;
1672
1703
  showReorderToggle?: boolean;