@ai-matrx/records-ui 0.116.84 → 0.116.86

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
@@ -35,8 +35,6 @@ import {
35
35
  NOTION_CALCULATIONS,
36
36
  NotApplicableGate,
37
37
  OpenRecordHereContext,
38
- PERSON_NOT_IN_ORGANIZATION,
39
- PersonPicker,
40
38
  ProvenanceBadge,
41
39
  REVERSE_COLUMN_PREFIX,
42
40
  ROW_HEIGHT_PX,
@@ -138,7 +136,6 @@ import {
138
136
  lookColumnKeys,
139
137
  markWithheld,
140
138
  measuresFor,
141
- memberName,
142
139
  mergeTokenSets,
143
140
  needsSentence,
144
141
  nextFieldSort,
@@ -146,7 +143,6 @@ import {
146
143
  optionFor,
147
144
  paintByOption,
148
145
  personActor,
149
- personRecordForMember,
150
146
  placeColumn,
151
147
  pointsAtRecords,
152
148
  previewWords,
@@ -184,7 +180,6 @@ import {
184
180
  useChoiceOptions,
185
181
  useGridColors,
186
182
  useLabelWait,
187
- useMemberRoster,
188
183
  usePeopleTick,
189
184
  usePersonTimeZone,
190
185
  useRecordLabels,
@@ -204,7 +199,7 @@ import {
204
199
  withoutLeadingBlank,
205
200
  workedOutErrorFor,
206
201
  workedOutHoldsNumbers
207
- } from "./chunk-PDIM4BLZ.js";
202
+ } from "./chunk-OBRFVN3V.js";
208
203
  import {
209
204
  CHART_PLOT_PX,
210
205
  EMBEDDED_ROW_PX,
@@ -314,7 +309,7 @@ import {
314
309
  valueFromPastedText,
315
310
  visibilityLaneFor,
316
311
  whyNotAskable
317
- } from "./chunk-OGEB2WDY.js";
312
+ } from "./chunk-7IBO6WSM.js";
318
313
  import {
319
314
  ACTION_CHECKING_ACCESS_REASON,
320
315
  ACTION_NOT_HERE_REASON,
@@ -361,8 +356,10 @@ import {
361
356
  NO_SAVED_VIEWS_REASON,
362
357
  NO_SHARE_REASON,
363
358
  NO_UPLOAD_REASON,
359
+ PERSON_NOT_IN_ORGANIZATION,
364
360
  PROPOSED_CHANGE_ACT_LABEL,
365
361
  PROPOSED_CHANGE_ACT_VALUES,
362
+ PersonPicker,
366
363
  PickOne,
367
364
  PickOrAdd,
368
365
  ROLLUP_AGG_LABEL,
@@ -401,6 +398,8 @@ import {
401
398
  isValueSet,
402
399
  looksLikeId,
403
400
  machineIdentityIn,
401
+ memberName,
402
+ personRecordForMember,
404
403
  pluralNoun,
405
404
  recordName,
406
405
  recordNameIn,
@@ -419,6 +418,7 @@ import {
419
418
  tableRightsAt,
420
419
  tokenFor,
421
420
  useChoiceNudge,
421
+ useMemberRoster,
422
422
  usePickerTables,
423
423
  useReadAgain,
424
424
  useReadRefusal,
@@ -428,7 +428,7 @@ import {
428
428
  useTableRights,
429
429
  withoutInternalCodes,
430
430
  writeOnTheWinningVersion_exports
431
- } from "./chunk-3I6HFES6.js";
431
+ } from "./chunk-NSRAGMZ2.js";
432
432
  import {
433
433
  FEWEST_KEY_VALUE_PAIRS,
434
434
  FEWEST_LIST_ITEMS,
@@ -2977,6 +2977,16 @@ function sourceWords(source, nameOf = () => void 0) {
2977
2977
  if (kind2) return `${humanizeIdentifier2(kind2)}${note ? `: ${note}` : ""}.`;
2978
2978
  return note;
2979
2979
  }
2980
+ function agentWords(actor, changes = []) {
2981
+ const kinds = new Set(
2982
+ changes.map((c) => c.source && typeof c.source.kind === "string" ? c.source.kind : null).filter(Boolean)
2983
+ );
2984
+ const who = kinds.has("enrichment") || kinds.has("ai") ? "an AI column" : kinds.has("import") ? "an import" : kinds.has("form") ? "a form" : "an assistant";
2985
+ const obo = actor.on_behalf_of ?? null;
2986
+ const forName = obo?.name ?? (obo ? "a person" : actor.name ?? "a person");
2987
+ const startedBy = obo && actor.user_id && obo.user_id && actor.user_id !== obo.user_id ? actor.name ?? "somebody else" : null;
2988
+ return { who, forName, startedBy };
2989
+ }
2980
2990
 
2981
2991
  // src/Enrich.tsx
2982
2992
  import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
@@ -15841,7 +15851,7 @@ function VersionRow({
15841
15851
  },
15842
15852
  children: [
15843
15853
  /* @__PURE__ */ jsxs50("span", { className: "flex min-w-0 items-baseline gap-1.5", children: [
15844
- /* @__PURE__ */ jsx57(Who, { actor: entry.actor }),
15854
+ /* @__PURE__ */ jsx57(Who, { actor: entry.actor, changes: entry.changes }),
15845
15855
  /* @__PURE__ */ jsx57("span", { className: "shrink-0 text-muted-foreground", children: verbWords(operationWords(entry.operation_label)) }),
15846
15856
  entry.undoable ? /* @__PURE__ */ jsx57(Badge4, { variant: "secondary", className: "min-w-0 shrink truncate text-[10px]", title: "part of a bigger change", children: "part of a bigger change" }) : null,
15847
15857
  /* @__PURE__ */ jsxs50("span", { className: "ml-auto flex shrink-0 items-baseline gap-1.5 whitespace-nowrap text-muted-foreground", children: [
@@ -15916,16 +15926,20 @@ function VersionRow({
15916
15926
  )
15917
15927
  );
15918
15928
  }
15919
- function Who({ actor }) {
15929
+ function Who({ actor, changes }) {
15920
15930
  const name = actor.name ?? (actor.kind === "system" ? "the platform" : "somebody");
15921
15931
  if (actor.kind === "agent") {
15922
15932
  return /* @__PURE__ */ jsxs50("span", { className: "shrink-0", children: [
15923
15933
  /* @__PURE__ */ jsx57(Badge4, { variant: "outline", className: "mr-1 text-[10px]", children: "agent" }),
15924
- actor.on_behalf_of ? /* @__PURE__ */ jsxs50("span", { className: "text-muted-foreground", children: [
15925
- actor.name ?? "an assistant",
15926
- ", for ",
15927
- /* @__PURE__ */ jsx57("strong", { className: "font-medium text-foreground", children: actor.on_behalf_of.name ?? "a person" })
15928
- ] }) : /* @__PURE__ */ jsx57("span", { className: "text-muted-foreground", children: actor.name ?? "an assistant" }),
15934
+ (() => {
15935
+ const said = agentWords(actor, changes);
15936
+ return /* @__PURE__ */ jsxs50("span", { className: "text-muted-foreground", children: [
15937
+ said.who,
15938
+ ", for ",
15939
+ /* @__PURE__ */ jsx57("strong", { className: "font-medium text-foreground", children: said.forName }),
15940
+ said.startedBy ? ` \xB7 started by ${said.startedBy}` : null
15941
+ ] });
15942
+ })(),
15929
15943
  actor.approved_by ? /* @__PURE__ */ jsxs50("span", { className: "text-muted-foreground", children: [
15930
15944
  " \xB7 approved by ",
15931
15945
  actor.approved_by.name ?? "a person"
@@ -16140,7 +16154,10 @@ function FormulaHistoryList({ recordId, fieldKey, label, onClose, className }) {
16140
16154
  "Formula v",
16141
16155
  row.formula_version
16142
16156
  ] }),
16143
- /* @__PURE__ */ jsx58("span", { className: "shrink-0 text-muted-foreground", children: row.actor.kind === "agent" ? `agent for ${row.actor.on_behalf_of?.name ?? "a person"}` : row.actor.name ?? (row.actor.kind === "system" ? "the platform" : "somebody") }),
16157
+ /* @__PURE__ */ jsx58("span", { className: "shrink-0 text-muted-foreground", children: row.actor.kind === "agent" ? (() => {
16158
+ const said = agentWords(row.actor, []);
16159
+ return `${said.who}, for ${said.forName}${said.startedBy ? ` \xB7 started by ${said.startedBy}` : ""}`;
16160
+ })() : row.actor.name ?? (row.actor.kind === "system" ? "the platform" : "somebody") }),
16144
16161
  /* @__PURE__ */ jsx58("span", { className: "w-28 shrink-0 whitespace-nowrap text-right text-muted-foreground", title: new Date(row.occurred_at).toLocaleString(), children: whenText(row.occurred_at) })
16145
16162
  ] }, `${row.record_version}-${row.formula_version}-${i}`)) })
16146
16163
  ] });
@@ -16272,8 +16289,10 @@ function FieldValueHistory({
16272
16289
  ] }),
16273
16290
  /* @__PURE__ */ jsx59("span", { className: "shrink-0 text-muted-foreground", children: row.actor.kind === "agent" ? /* @__PURE__ */ jsxs52(Fragment21, { children: [
16274
16291
  /* @__PURE__ */ jsx59(Badge6, { variant: "outline", className: "mr-1 text-[10px]", children: "agent" }),
16275
- "for ",
16276
- row.actor.on_behalf_of?.name ?? "a person",
16292
+ (() => {
16293
+ const said2 = agentWords(row.actor, []);
16294
+ return `${said2.who}, for ${said2.forName}${said2.startedBy ? ` \xB7 started by ${said2.startedBy}` : ""}`;
16295
+ })(),
16277
16296
  row.actor.approved_by ? ` \xB7 approved by ${row.actor.approved_by.name ?? "a person"}` : null
16278
16297
  ] }) : row.actor.name ?? (row.actor.kind === "system" ? "the platform" : "somebody") }),
16279
16298
  /* @__PURE__ */ jsx59(
@@ -32454,7 +32473,7 @@ function ThankYou({
32454
32473
  // SAID TO THE PERSON WHO ANSWERED (lane HANDOVER, 2026-09-29): "Saved to Form 1, with
32455
32474
  // this form stamped on it" was the owner's bookkeeping read out to a front-desk member
32456
32475
  // and to strangers. Where it landed is the owner's to see on the table.
32457
- "Answers received"
32476
+ words2.received
32458
32477
  ) : done })
32459
32478
  ] });
32460
32479
  }