@ai-matrx/records-ui 0.116.97 → 0.116.99

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/index.js CHANGED
@@ -199,7 +199,7 @@ import {
199
199
  withoutLeadingBlank,
200
200
  workedOutErrorFor,
201
201
  workedOutHoldsNumbers
202
- } from "./chunk-IEVLSGJZ.js";
202
+ } from "./chunk-CPFQVQIK.js";
203
203
  import {
204
204
  CHART_PLOT_PX,
205
205
  EMBEDDED_ROW_PX,
@@ -309,7 +309,7 @@ import {
309
309
  valueFromPastedText,
310
310
  visibilityLaneFor,
311
311
  whyNotAskable
312
- } from "./chunk-PO7UMIDY.js";
312
+ } from "./chunk-HU3X5SRA.js";
313
313
  import {
314
314
  ACTION_CHECKING_ACCESS_REASON,
315
315
  ACTION_NOT_HERE_REASON,
@@ -329,7 +329,7 @@ import {
329
329
  toDropdownEntries,
330
330
  toStripAndRows,
331
331
  withExtensions
332
- } from "./chunk-ESNTHDQO.js";
332
+ } from "./chunk-SB5UVLQK.js";
333
333
  import {
334
334
  ABSENCE_WORD_LABEL,
335
335
  ABSENCE_WORD_VALUES,
@@ -441,7 +441,7 @@ import {
441
441
  shapeOfGrid,
442
442
  shapeOfValue,
443
443
  shapeTextOfNode
444
- } from "./chunk-6Z537SLG.js";
444
+ } from "./chunk-YHPVSUK6.js";
445
445
  import {
446
446
  DATABASE_LOCKED_REASON,
447
447
  KERNEL_REASON,
@@ -13945,7 +13945,21 @@ function GridBody({
13945
13945
  archived,
13946
13946
  " is archived. Nothing was destroyed \u2014 it is in this table\u2019s Archived items, where Restore brings it back."
13947
13947
  ] }),
13948
- /* @__PURE__ */ jsx46(Button34, { size: "sm", variant: "ghost", className: "ml-auto h-6", onClick: () => setArchived(null), children: "Dismiss" })
13948
+ undo.canUndo ? /* @__PURE__ */ jsx46(
13949
+ Button34,
13950
+ {
13951
+ size: "sm",
13952
+ variant: "outline",
13953
+ className: "ml-auto h-6",
13954
+ "data-records-undo-now": "",
13955
+ onClick: () => {
13956
+ setArchived(null);
13957
+ void undo.undo();
13958
+ },
13959
+ children: "Undo"
13960
+ }
13961
+ ) : null,
13962
+ /* @__PURE__ */ jsx46(Button34, { size: "sm", variant: "ghost", className: undo.canUndo ? "h-6" : "ml-auto h-6", onClick: () => setArchived(null), children: "Dismiss" })
13949
13963
  ]
13950
13964
  }
13951
13965
  ) : null,
@@ -14261,16 +14275,13 @@ function GridBody({
14261
14275
  setDeleteBusy(false);
14262
14276
  setDeleting(null);
14263
14277
  if (failed) return;
14264
- if (merged) {
14265
- undo.push({
14266
- label: `Archived ${name}`,
14267
- cells: [],
14268
- archived: [row.id]
14269
- });
14270
- sheetController.current?.focusGrid();
14271
- } else {
14272
- setArchived(name);
14273
- }
14278
+ undo.push({
14279
+ label: `Archived ${name}`,
14280
+ cells: [],
14281
+ archived: [row.id]
14282
+ });
14283
+ if (merged) sheetController.current?.focusGrid();
14284
+ else setArchived(name);
14274
14285
  }
14275
14286
  }
14276
14287
  )