@ai-matrx/records-ui 0.116.38 → 0.116.39

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
@@ -12284,6 +12284,7 @@ var embeddedPageAskKey = (tableId, search, sorts, filter, pageDoorViewId) => JSO
12284
12284
  var NO_SUMMARIES = Object.freeze({});
12285
12285
  var NO_DRILL_FIELDS = Object.freeze([]);
12286
12286
  var rowIdOf = (row) => row.id;
12287
+ var ACTIONS_GHOST_ROW = { id: "", document: {} };
12287
12288
  var NO_REREAD = () => {
12288
12289
  };
12289
12290
  var VALUE_FILTER_UI = { allowNegation: true };
@@ -13587,9 +13588,9 @@ function GridBody({
13587
13588
  () => /* @__PURE__ */ jsx44(ActionsHeaderControls, { ...mayManageActions ? { onAddColumn: () => addColumnNow.current() } : {} }),
13588
13589
  [mayManageActions]
13589
13590
  );
13590
- const rowActions = useCallback22(
13591
- (row) => /* @__PURE__ */ jsxs39(Fragment15, { children: [
13592
- canWrite && mayWriteRow(row.id) ? tableActions2.runnable.map((action2) => /* @__PURE__ */ jsx44(
13591
+ const rowStrip = useCallback22(
13592
+ (row, writable) => /* @__PURE__ */ jsxs39(Fragment15, { children: [
13593
+ canWrite && writable ? tableActions2.runnable.map((action2) => /* @__PURE__ */ jsx44(
13593
13594
  ActionButton,
13594
13595
  {
13595
13596
  action: action2,
@@ -13639,7 +13640,7 @@ function GridBody({
13639
13640
  children: "Duplicate"
13640
13641
  }
13641
13642
  ) : null,
13642
- canWrite && mayWriteRow(row.id) ? /* @__PURE__ */ jsx44(
13643
+ canWrite && writable ? /* @__PURE__ */ jsx44(
13643
13644
  Button33,
13644
13645
  {
13645
13646
  size: "sm",
@@ -13651,8 +13652,9 @@ function GridBody({
13651
13652
  ) : null
13652
13653
  ] }),
13653
13654
  // eslint-disable-next-line react-hooks/exhaustive-deps -- `hasTalk`/`hasAgent` stand for the host ports the JSX reads; handlers run through `rowActionsNow`.
13654
- [canWrite, mayWriteRow, tableActions2.runnable, tableActions2.agent, runner.busy, hasTalk, hasAgent, editable, rights.write, readOnly]
13655
+ [canWrite, tableActions2.runnable, tableActions2.agent, runner.busy, hasTalk, hasAgent, editable, rights.write, readOnly]
13655
13656
  );
13657
+ const rowActions = useCallback22((row) => rowStrip(row, row === ACTIONS_GHOST_ROW || mayWriteRow(row.id)), [rowStrip, mayWriteRow]);
13656
13658
  const headerHeld = useRef21(/* @__PURE__ */ new Map());
13657
13659
  const menuLatest = useRef21(/* @__PURE__ */ new Map());
13658
13660
  const addColumnDef = useMemo26(() => addColumnColumn(() => addColumnNow.current()), []);
@@ -13676,7 +13678,7 @@ function GridBody({
13676
13678
  () => offersRowActions ? [...columns, { id: "custom-actions", header: merged ? /* @__PURE__ */ jsxs39("span", { className: "inline-flex items-center gap-0.5", children: [
13677
13679
  /* @__PURE__ */ jsx44("span", { children: "Actions" }),
13678
13680
  actionsHeader
13679
- ] }) : "Actions", label: "Actions", reorderable: false, sortable: false, filter: false, customActions: rowActions }] : columns,
13681
+ ] }) : "Actions", label: "Actions", reorderable: false, sortable: false, filter: false, customActions: rowActions, customActionsGhostRow: ACTIONS_GHOST_ROW }] : columns,
13680
13682
  [columns, offersRowActions, merged, actionsHeader, rowActions]
13681
13683
  );
13682
13684
  const [localColumns, setLocalColumns] = useState41(