@ai-matrx/records-ui 0.116.45 → 0.116.47

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/dist/{SaveToTable-SL5DUNI4.js → SaveToTable-HG3HQMAQ.js} +5 -5
  3. package/dist/{chunk-KQR2RA4V.js → chunk-ABIUJCNS.js} +3 -3
  4. package/dist/chunk-ABIUJCNS.js.map +1 -0
  5. package/dist/{chunk-F4SAKQKQ.js → chunk-K3B5IRXY.js} +79 -76
  6. package/dist/chunk-K3B5IRXY.js.map +1 -0
  7. package/dist/{chunk-OV6QBL5R.js → chunk-LBZZDHV6.js} +8 -8
  8. package/dist/chunk-LBZZDHV6.js.map +1 -0
  9. package/dist/{chunk-NKZBAIU4.js → chunk-MDXDJVDB.js} +8 -6
  10. package/dist/chunk-MDXDJVDB.js.map +1 -0
  11. package/dist/{chunk-XKI6S5KF.js → chunk-VJDJQDDI.js} +7 -7
  12. package/dist/{chunk-XKI6S5KF.js.map → chunk-VJDJQDDI.js.map} +1 -1
  13. package/dist/helpers.cjs +14 -12
  14. package/dist/helpers.cjs.map +1 -1
  15. package/dist/helpers.js +14 -12
  16. package/dist/helpers.js.map +1 -1
  17. package/dist/index.cjs +137 -116
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +2 -2
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +46 -30
  22. package/dist/index.js.map +1 -1
  23. package/dist/object-actions.cjs +8 -8
  24. package/dist/object-actions.cjs.map +1 -1
  25. package/dist/object-actions.d.cts +1 -1
  26. package/dist/object-actions.d.ts +1 -1
  27. package/dist/object-actions.js +2 -2
  28. package/dist/{objectActions-Be9sBGvW.d.cts → objectActions-DK-qa5zC.d.cts} +1 -1
  29. package/dist/{objectActions-Be9sBGvW.d.ts → objectActions-DK-qa5zC.d.ts} +1 -1
  30. package/dist/pickers.cjs +90 -86
  31. package/dist/pickers.cjs.map +1 -1
  32. package/dist/pickers.js +3 -3
  33. package/package.json +5 -5
  34. package/dist/chunk-F4SAKQKQ.js.map +0 -1
  35. package/dist/chunk-KQR2RA4V.js.map +0 -1
  36. package/dist/chunk-NKZBAIU4.js.map +0 -1
  37. package/dist/chunk-OV6QBL5R.js.map +0 -1
  38. /package/dist/{SaveToTable-SL5DUNI4.js.map → SaveToTable-HG3HQMAQ.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -3,8 +3,8 @@ import { ReactNode, ComponentType, KeyboardEvent, ReactElement, RefObject, SVGAt
3
3
  import * as _ai_matrx_records from '@ai-matrx/records';
4
4
  import { Field, ReadRow, Uuid, RowAction, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict, TableDecorations, StoreFilter as StoreFilter$1, ImportRun, NewFieldDeclaration, RuleExpression, ChoiceRehome, FieldOptionEdit, StoredRecord, ChoiceNudge, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, MigrationEntry, PortalCard, PortalPrincipal, PortalPreviewRow, PortalAccent, PublicPicture, PortalStyle, RecordFilter, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, AggregateGroupValue, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, CoercibleField, AggregateRow, DashboardRunResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsActor, RecordsDataSource, RecordsConfig, TableDuplicated, HistoryActor, FieldHistoryEntry, DrillDefinition, DrillSource, DrillLane, DrillQuestion, TableDuplicateProgress, TableArchiveProgress } from '@ai-matrx/records';
5
5
  import { ReversibleAnnouncement } from '@ai-matrx/kit/reversible';
6
- import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-Be9sBGvW.cjs';
7
- export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-Be9sBGvW.cjs';
6
+ import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-DK-qa5zC.cjs';
7
+ export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-DK-qa5zC.cjs';
8
8
  import { Uuid as Uuid$1, Table as Table$1, Field as Field$1, ReadRow as ReadRow$1, StoreFilter, useRecordsClient } from '@ai-matrx/records/react';
9
9
  import * as _ai_matrx_records_core from '@ai-matrx/records/core';
10
10
  import { RecordsClient, ParsedImport } from '@ai-matrx/records/core';
package/dist/index.d.ts CHANGED
@@ -3,8 +3,8 @@ import { ReactNode, ComponentType, KeyboardEvent, ReactElement, RefObject, SVGAt
3
3
  import * as _ai_matrx_records from '@ai-matrx/records';
4
4
  import { Field, ReadRow, Uuid, RowAction, RowActionStep, RecordScopeContext, EnrichCell, RecordsError, RecordDocument, Table, PermissionLevel, RecordRead, RowAgentTarget, AggregateFilter, RelationDisplay, WriteConflict, TableDecorations, StoreFilter as StoreFilter$1, ImportRun, NewFieldDeclaration, RuleExpression, ChoiceRehome, FieldOptionEdit, StoredRecord, ChoiceNudge, HiddenFieldNotice, ValueEnvelope, ChecklistRequirementKind, ContextPolicy, WorkDueState, FieldSensitivity, StageRuleOnFail, SubscriptionCadence, WorkApprovalState, WorkInboxKind, ArchiveLane, ArchivedRow, WorkInboxView, WorkInboxItem, MigrationEntry, PortalCard, PortalPrincipal, PortalPreviewRow, PortalAccent, PublicPicture, PortalStyle, RecordFilter, MySubscription, DashboardBlockKind, AggregateBucket, AggregateMeasure, AggregateCompare, DashboardTarget, DashboardBlock, DashboardSummary, AggregateGroupValue, DocTemplateRow, DocRenderRow, QuietHours, DashboardBlockResult, CoercibleField, AggregateRow, DashboardRunResult, ChecklistRunStep, BookingSummary, CaptureSheetFace, CaptureField, AnonTokenBinding, RecordsActor, RecordsDataSource, RecordsConfig, TableDuplicated, HistoryActor, FieldHistoryEntry, DrillDefinition, DrillSource, DrillLane, DrillQuestion, TableDuplicateProgress, TableArchiveProgress } from '@ai-matrx/records';
5
5
  import { ReversibleAnnouncement } from '@ai-matrx/kit/reversible';
6
- import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-Be9sBGvW.js';
7
- export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-Be9sBGvW.js';
6
+ import { O as ObjectAction, W as WhatYouMayDo, T as TableActionHost, a as ObjectActionIcon } from './objectActions-DK-qa5zC.js';
7
+ export { A as ACTION_CHECKING_ACCESS_REASON, b as ACTION_NOT_HERE_REASON, c as ACTION_NO_ACCESS_REASON, d as ACTION_PLATFORM_TABLE_REASON, B as BuiltOnDestination, C as Capability, D as DEFAULT_ACTION_ORIGIN, K as KERNEL_REASON, L as LEVEL_WORD, N as NOT_ANSWERED_YET, e as OBJECT_ACTION_GROUPS, f as ObjectActionDropdownEntry, g as ObjectActionGroup, h as ObjectActionGroupDef, i as ObjectActionSection, S as STANDARD_VERBS, j as STRIP_FEATURE_ROWS, k as StandardVerbId, l as StripAndRows, m as TableActionSubject, n as TableActionsInput, o as dropdownActionIds, p as dropdownActions, q as groupObjectActions, r as levelNeededFor, s as rightsReason, t as tableActions, u as tableLink, v as toDropdownEntries, w as toStripAndRows, x as whatYouMayDo, y as whatYouMayDoWithTable, z as withExtensions } from './objectActions-DK-qa5zC.js';
8
8
  import { Uuid as Uuid$1, Table as Table$1, Field as Field$1, ReadRow as ReadRow$1, StoreFilter, useRecordsClient } from '@ai-matrx/records/react';
9
9
  import * as _ai_matrx_records_core from '@ai-matrx/records/core';
10
10
  import { RecordsClient, ParsedImport } from '@ai-matrx/records/core';
package/dist/index.js CHANGED
@@ -182,7 +182,7 @@ import {
182
182
  withoutAddition,
183
183
  withoutLeadingBlank,
184
184
  workedOutErrorFor
185
- } from "./chunk-F4SAKQKQ.js";
185
+ } from "./chunk-K3B5IRXY.js";
186
186
  import {
187
187
  CHART_PLOT_PX,
188
188
  EMBEDDED_ROW_PX,
@@ -293,7 +293,7 @@ import {
293
293
  visibilityLaneFor,
294
294
  whyNotAskable,
295
295
  writeOnTheWinningVersion_exports
296
- } from "./chunk-XKI6S5KF.js";
296
+ } from "./chunk-VJDJQDDI.js";
297
297
  import {
298
298
  ACTION_CHECKING_ACCESS_REASON,
299
299
  ACTION_NOT_HERE_REASON,
@@ -313,7 +313,7 @@ import {
313
313
  toDropdownEntries,
314
314
  toStripAndRows,
315
315
  withExtensions
316
- } from "./chunk-KQR2RA4V.js";
316
+ } from "./chunk-ABIUJCNS.js";
317
317
  import {
318
318
  ABSENCE_WORD_LABEL,
319
319
  ABSENCE_WORD_VALUES,
@@ -402,7 +402,7 @@ import {
402
402
  useRowRights,
403
403
  useTableRights,
404
404
  withoutInternalCodes
405
- } from "./chunk-NKZBAIU4.js";
405
+ } from "./chunk-MDXDJVDB.js";
406
406
  import {
407
407
  FEWEST_KEY_VALUE_PAIRS,
408
408
  FEWEST_LIST_ITEMS,
@@ -425,7 +425,7 @@ import {
425
425
  tableIsLocked,
426
426
  whatYouMayDo,
427
427
  whatYouMayDoWithTable
428
- } from "./chunk-OV6QBL5R.js";
428
+ } from "./chunk-LBZZDHV6.js";
429
429
  import {
430
430
  PARITY_LABEL,
431
431
  PARITY_MADE_OF,
@@ -8913,7 +8913,7 @@ function EnrichPanel({ tableId, fieldId, className }) {
8913
8913
  target?.name ?? "this column",
8914
8914
  " in automatically."
8915
8915
  ] }),
8916
- /* @__PURE__ */ jsx26("p", { className: "text-muted-foreground", children: "An admin on this table sets that up." })
8916
+ /* @__PURE__ */ jsx26("p", { className: "text-muted-foreground", children: "Someone with Full access on this table sets that up." })
8917
8917
  ] });
8918
8918
  }
8919
8919
  return /* @__PURE__ */ jsxs25("div", { className: cn10("space-y-3 p-4 text-sm", className), children: [
@@ -8994,7 +8994,7 @@ function EnrichPanel({ tableId, fieldId, className }) {
8994
8994
  if (shown4.length === 0) {
8995
8995
  return /* @__PURE__ */ jsxs25("div", { className: cn10("space-y-2 p-4 text-sm", className), children: [
8996
8996
  /* @__PURE__ */ jsx26("p", { className: "font-medium", children: "No column here is filled in by a model." }),
8997
- /* @__PURE__ */ jsx26("p", { className: "text-muted-foreground", children: rights.admin ? "Open a column's menu and choose \u201CLet AI fill\u201D to set one up \u2014 or just ask for it in plain words and the agent will." : "An admin on this table sets that up." })
8997
+ /* @__PURE__ */ jsx26("p", { className: "text-muted-foreground", children: rights.admin ? "Open a column's menu and choose \u201CLet AI fill\u201D to set one up \u2014 or just ask for it in plain words and the agent will." : "Someone with Full access on this table sets that up." })
8998
8998
  ] });
8999
8999
  }
9000
9000
  return /* @__PURE__ */ jsx26("div", { className: cn10("space-y-6 p-4", className), children: shown4.map((row) => {
@@ -11772,6 +11772,7 @@ function BulkActions({
11772
11772
  noun,
11773
11773
  nounPlural,
11774
11774
  titleKey = null,
11775
+ mayWrite = true,
11775
11776
  onDone
11776
11777
  }) {
11777
11778
  const typeable = useMemo24(() => fields.filter(fieldIsEditable), [fields]);
@@ -11795,12 +11796,12 @@ function BulkActions({
11795
11796
  if (ok) onDone();
11796
11797
  };
11797
11798
  return /* @__PURE__ */ jsxs36(Fragment14, { children: [
11798
- typeable.length > 0 ? /* @__PURE__ */ jsxs36(Fragment14, { children: [
11799
+ mayWrite && typeable.length > 0 ? /* @__PURE__ */ jsxs36(Fragment14, { children: [
11799
11800
  /* @__PURE__ */ jsx40(Button30, { size: "sm", variant: "outline", className: "h-7 px-2", "data-records-bulk": "set", disabled: bulk.busy, onClick: () => open("set"), children: "Set a column" }),
11800
11801
  /* @__PURE__ */ jsx40(Button30, { size: "sm", variant: "outline", className: "h-7 px-2", "data-records-bulk": "clear", disabled: bulk.busy, onClick: () => open("clear"), children: "Clear a column" }),
11801
11802
  ids.length > 1 ? /* @__PURE__ */ jsx40(Button30, { size: "sm", variant: "outline", className: "h-7 px-2", "data-records-bulk": "fill", disabled: bulk.busy, onClick: () => open("fill"), children: "Fill down" }) : null
11802
11803
  ] }) : null,
11803
- /* @__PURE__ */ jsx40(
11804
+ mayWrite ? /* @__PURE__ */ jsx40(
11804
11805
  Button30,
11805
11806
  {
11806
11807
  size: "sm",
@@ -11811,9 +11812,9 @@ function BulkActions({
11811
11812
  onClick: () => void bulk.duplicate(ids).then((ok) => ok ? onDone() : void 0),
11812
11813
  children: "Duplicate"
11813
11814
  }
11814
- ),
11815
+ ) : null,
11815
11816
  /* @__PURE__ */ jsx40(Button30, { size: "sm", variant: "outline", className: "h-7 px-2", "data-records-bulk": "print", disabled: bulk.busy, onClick: () => setPrinting(true), children: "Print with layout\u2026" }),
11816
- /* @__PURE__ */ jsx40(Button30, { size: "sm", variant: "outline", className: "h-7 px-2", "data-records-bulk": "delete", disabled: bulk.busy, onClick: () => setConfirmDelete(true), children: "Delete" }),
11817
+ mayWrite ? /* @__PURE__ */ jsx40(Button30, { size: "sm", variant: "outline", className: "h-7 px-2", "data-records-bulk": "delete", disabled: bulk.busy, onClick: () => setConfirmDelete(true), children: "Delete" }) : null,
11817
11818
  printing ? /* @__PURE__ */ jsx40(PrintWithLayoutDialog, { tableId, recordIds: ids, names: printNames(ids, rows, titleKey), open: true, onOpenChange: setPrinting }) : null,
11818
11819
  /* @__PURE__ */ jsx40(Dialog14, { open: asking !== null, onOpenChange: (next) => !next ? setAsking(null) : void 0, children: /* @__PURE__ */ jsxs36(DialogContent14, { className: "sm:max-w-md", children: [
11819
11820
  /* @__PURE__ */ jsxs36(DialogHeader14, { children: [
@@ -12783,7 +12784,7 @@ function GridBody({
12783
12784
  versions
12784
12785
  });
12785
12786
  const [selectedIds, setSelectedIds] = useState41([]);
12786
- const offerSelection = !embedded && !readOnly && canWrite && (merged || tableActions2.runnable.length > 0);
12787
+ const offerSelection = !embedded && !readOnly && (merged || canWrite && tableActions2.runnable.length > 0);
12787
12788
  const [reordering, setReordering] = useState41(false);
12788
12789
  const chosenSummaries = localSummaries ?? presentation.summaries ?? NO_SUMMARIES;
12789
12790
  const summaryVersion = useMemo26(
@@ -14399,10 +14400,11 @@ function GridBody({
14399
14400
  noun,
14400
14401
  nounPlural,
14401
14402
  titleKey,
14403
+ mayWrite: canWrite,
14402
14404
  onDone: () => setSelectedIds([])
14403
14405
  }
14404
14406
  ) : null,
14405
- tableActions2.runnable.map((action2) => /* @__PURE__ */ jsx44(
14407
+ canWrite ? tableActions2.runnable.map((action2) => /* @__PURE__ */ jsx44(
14406
14408
  ActionButton,
14407
14409
  {
14408
14410
  action: action2,
@@ -14411,7 +14413,7 @@ function GridBody({
14411
14413
  onPress: () => runner.press(action2, ids)
14412
14414
  },
14413
14415
  action2.id
14414
- ))
14416
+ )) : null
14415
14417
  ] })
14416
14418
  }
14417
14419
  } : embedded ? { selection: false } : {},
@@ -17644,7 +17646,7 @@ function CommentThread({ tableId, recordId, fieldKey, className }) {
17644
17646
  }
17645
17647
  ) : (
17646
17648
  // No dead composer. The store's own rung, in a person's words.
17647
- /* @__PURE__ */ jsx58("p", { className: "text-xs text-muted-foreground", children: "You can read this conversation and not join it. Commenting needs the commenter level on this record \u2014 ask whoever shared it with you to raise it." })
17649
+ /* @__PURE__ */ jsx58("p", { className: "text-xs text-muted-foreground", children: "You can read this conversation and not join it. Commenting needs Comment access on this record \u2014 ask whoever shared it with you to raise it." })
17648
17650
  )
17649
17651
  ] });
17650
17652
  }
@@ -37905,7 +37907,7 @@ import { FORM_STATE_WORDS as FORM_STATE_WORDS2 } from "@ai-matrx/records/forms";
37905
37907
  import { Fragment as Fragment53, jsx as jsx117, jsxs as jsxs110 } from "react/jsx-runtime";
37906
37908
  var FORM_NOT_HERE_LINE = "The link named a form this table does not have \u2014 it may have been removed, or it belongs to another table. The forms this table does have are listed here.";
37907
37909
  var WHAT_A_FORM_IS = "A form uses this table's own fields, and its answers land here as ordinary records stamped with the form they came through.";
37908
- var NO_ADMIN = "This table has no forms. Making one needs the admin level on it, because a form decides what people with no account may add here.";
37910
+ var NO_ADMIN = "This table has no forms. Making one needs Full access on it, because a form decides what people with no account may add here.";
37909
37911
  function formSuggestion(tableName2) {
37910
37912
  const subject = tableName2?.trim() ? tableName2.trim() : "this table";
37911
37913
  return `Make me a form that collects new ${subject} entries and tells me when somebody answers.`;
@@ -38985,7 +38987,7 @@ function EmbedFrame({
38985
38987
  if (!rights.admin) {
38986
38988
  return /* @__PURE__ */ jsxs115("p", { className: cn70("rounded border border-dashed px-2 py-1 text-xs text-muted-foreground", className), children: [
38987
38989
  rights.why("structure"),
38988
- " Issuing an embed opens a way in from somebody else's website, so it needs the admin level on this table."
38990
+ " Issuing an embed opens a way in from somebody else's website, so it needs Full access on this table."
38989
38991
  ] });
38990
38992
  }
38991
38993
  const snippet = secret ? `<iframe src="${embedUrl}#t=${secret}" style="width:100%;height:640px;border:0" loading="lazy"></iframe>` : null;
@@ -40399,7 +40401,7 @@ function railFromParam(raw) {
40399
40401
  function unknownRailLine(raw) {
40400
40402
  return `The link asked to open \u201C${raw}\u201D on this table, which is not something a table has, so you are looking at its records. A table opens Forms, Bookings, Checklists, Notifications, Portals, Settings, Import, Inbox and Share \u2014 each is in the table's menu.`;
40401
40403
  }
40402
- var SHARE_NOT_YOURS_LINE = "The link asked to open this table's sharing, and only someone with Admin on this table can share it, so it did not open. Ask an admin of this table to share it or to give you Admin.";
40404
+ var SHARE_NOT_YOURS_LINE = "The link asked to open this table's sharing, and only someone with Full access on this table can share it, so it did not open. Ask someone with Full access on this table to share it or to give you Full access.";
40403
40405
  function openingView(activeView, activeDashboardId) {
40404
40406
  const named = pageViewFromParam(activeView);
40405
40407
  if (named === null) {
@@ -40599,6 +40601,20 @@ function TablePage({
40599
40601
  const [duplicateOpen, setDuplicateOpen] = useState120(false);
40600
40602
  const [referenceOpen, setReferenceOpen] = useState120(false);
40601
40603
  const [subscribeOpen, setSubscribeOpen] = useState120(false);
40604
+ const subscribeDateKey = shown4?.dateField ?? (shown4?.layout === "calendar" && allFields.data ? eligibleFieldFor("date", allFields.data, null).field?.key ?? null : null);
40605
+ const subscribeInCalendar = async () => {
40606
+ const current = view;
40607
+ if (!current || !subscribeDateKey) return;
40608
+ if (current.dateField !== subscribeDateKey) {
40609
+ const written = await saveViewPatch(client, tableId, current.id, { dateField: subscribeDateKey });
40610
+ if (!written.ok) {
40611
+ recordsUi.notify?.error(refusalSentence(written.error));
40612
+ return;
40613
+ }
40614
+ setView({ ...current, dateField: subscribeDateKey });
40615
+ }
40616
+ setSubscribeOpen(true);
40617
+ };
40602
40618
  const [breakDownOpen, setBreakDownOpen] = useState120(false);
40603
40619
  const canGetReference = useCanGetReference();
40604
40620
  const [toolbarSlot, setToolbarSlot] = useState120(null);
@@ -40950,7 +40966,7 @@ function TablePage({
40950
40966
  label: "Questions",
40951
40967
  icon: "layout-dashboard",
40952
40968
  group: "built-on",
40953
- ...mayDo.known && !mayDo.read ? { disabledReason: "Needs Viewer access" } : {},
40969
+ ...mayDo.known && !mayDo.read ? { disabledReason: "Needs View access" } : {},
40954
40970
  run: () => go({ main: "questions" })
40955
40971
  },
40956
40972
  ...canGetReference ? [
@@ -40959,7 +40975,7 @@ function TablePage({
40959
40975
  label: "Get reference\u2026",
40960
40976
  icon: "link-2",
40961
40977
  group: "share",
40962
- ...mayDo.known && !mayDo.read ? { disabledReason: "Needs Viewer access" } : {},
40978
+ ...mayDo.known && !mayDo.read ? { disabledReason: "Needs View access" } : {},
40963
40979
  run: () => void window.setTimeout(() => setReferenceOpen(true), 0)
40964
40980
  }
40965
40981
  ] : [],
@@ -40970,7 +40986,7 @@ function TablePage({
40970
40986
  label: subItemsOn ? "Turn off sub-items" : "Turn on sub-items",
40971
40987
  icon: "list-checks",
40972
40988
  group: "manage",
40973
- ...mayDo.known && !mayDo.structure ? { disabledReason: "Needs Admin access" } : {},
40989
+ ...mayDo.known && !mayDo.structure ? { disabledReason: "Needs Full access" } : {},
40974
40990
  run: () => void toggleSubItems()
40975
40991
  },
40976
40992
  // CLEAN THE WHOLE TABLE (the Sheet's toolbar cleanup): the grid's one review, from the ⋯ too.
@@ -40980,13 +40996,13 @@ function TablePage({
40980
40996
  label: CLEAN_TABLE_LABEL,
40981
40997
  icon: "eraser",
40982
40998
  group: "manage",
40983
- ...mayDo.known && !mayDo.write ? { disabledReason: "Needs Editor access" } : {},
40999
+ ...mayDo.known && !mayDo.write ? { disabledReason: "Needs Edit access" } : {},
40984
41000
  run: () => void window.setTimeout(() => askToCleanTable(tableId), 0)
40985
41001
  }
40986
41002
  ] : [],
40987
41003
  // BREAK DOWN: the grid grouped by one column, through the drill's own question.
40988
41004
  breakDownAction({
40989
- ...mayDo.known && !mayDo.read ? { disabledReason: "Needs Viewer access" } : !view ? { disabledReason: NO_VIEW_REASON } : allFields.data && allFields.data.length === 0 ? { disabledReason: NO_DIMENSION_REASON } : {},
41005
+ ...mayDo.known && !mayDo.read ? { disabledReason: "Needs View access" } : !view ? { disabledReason: NO_VIEW_REASON } : allFields.data && allFields.data.length === 0 ? { disabledReason: NO_DIMENSION_REASON } : {},
40990
41006
  run: () => void window.setTimeout(() => setBreakDownOpen(true), 0)
40991
41007
  }),
40992
41008
  // THE VIEW'S TWO ONE-PRESS WAYS OUT (TABLE-EXPERIENCE item 4).
@@ -41001,10 +41017,10 @@ function TablePage({
41001
41017
  recordsUi.notify?.error("Couldn\u2019t copy the link");
41002
41018
  }
41003
41019
  },
41004
- ...mayDo.known && !mayDo.read ? { disabledReason: "Needs Viewer access" } : {}
41020
+ ...mayDo.known && !mayDo.read ? { disabledReason: "Needs View access" } : {}
41005
41021
  }),
41006
41022
  downloadCsvAction({
41007
- ...mayDo.known && !mayDo.read ? { disabledReason: "Needs Viewer access" } : !allFields.data ? { disabledReason: "Reading this table\u2026" } : {},
41023
+ ...mayDo.known && !mayDo.read ? { disabledReason: "Needs View access" } : !allFields.data ? { disabledReason: "Reading this table\u2026" } : {},
41008
41024
  run: () => downloadViewCsv({
41009
41025
  client,
41010
41026
  host: recordsUi,
@@ -41016,7 +41032,7 @@ function TablePage({
41016
41032
  })
41017
41033
  }),
41018
41034
  downloadMarkdownAction({
41019
- ...mayDo.known && !mayDo.read ? { disabledReason: "Needs Viewer access" } : !allFields.data ? { disabledReason: "Reading this table\u2026" } : {},
41035
+ ...mayDo.known && !mayDo.read ? { disabledReason: "Needs View access" } : !allFields.data ? { disabledReason: "Reading this table\u2026" } : {},
41020
41036
  run: () => downloadViewMarkdown({
41021
41037
  client,
41022
41038
  host: recordsUi,
@@ -41028,7 +41044,7 @@ function TablePage({
41028
41044
  })
41029
41045
  }),
41030
41046
  copyMarkdownAction({
41031
- ...mayDo.known && !mayDo.read ? { disabledReason: "Needs Viewer access" } : !allFields.data ? { disabledReason: "Reading this table\u2026" } : {},
41047
+ ...mayDo.known && !mayDo.read ? { disabledReason: "Needs View access" } : !allFields.data ? { disabledReason: "Reading this table\u2026" } : {},
41032
41048
  run: () => copyViewMarkdown({
41033
41049
  client,
41034
41050
  host: recordsUi,
@@ -41042,7 +41058,7 @@ function TablePage({
41042
41058
  // PRINT, FULL PRINT, HTML PREVIEW, COPY THE HTML PAGE, SAVE AS FILE (TABLE-PARITY item 3): the platform print system's.
41043
41059
  ...["print", "full-print", "html-preview", "copy-html-page", "save-as-file"].map(
41044
41060
  (kind2) => tablePageAction(kind2, {
41045
- ...mayDo.known && !mayDo.read ? { disabledReason: "Needs Viewer access" } : !allFields.data ? { disabledReason: "Reading this table\u2026" } : {},
41061
+ ...mayDo.known && !mayDo.read ? { disabledReason: "Needs View access" } : !allFields.data ? { disabledReason: "Reading this table\u2026" } : {},
41046
41062
  run: () => runTablePageAction(kind2, {
41047
41063
  client,
41048
41064
  host: recordsUi,
@@ -41057,8 +41073,8 @@ function TablePage({
41057
41073
  // THE PRIVATE CALENDAR LINK (CAL-FEED-UI): only where the host bound the doors.
41058
41074
  ...recordsUi.calendarFeed && organizationId ? [
41059
41075
  subscribeCalendarAction({
41060
- ...mayDo.known && !mayDo.read ? { disabledReason: "Needs Viewer access" } : !view ? { disabledReason: NO_VIEW_REASON } : !shown4?.dateField ? { disabledReason: "This view has no date field" } : {},
41061
- run: () => void window.setTimeout(() => setSubscribeOpen(true), 0)
41076
+ ...mayDo.known && !mayDo.read ? { disabledReason: "Needs View access" } : !view ? { disabledReason: NO_VIEW_REASON } : !subscribeDateKey ? { disabledReason: shown4?.layout === "calendar" ? "This table has no date column" : "Switch this view to Calendar to subscribe" } : {},
41077
+ run: () => void window.setTimeout(() => void subscribeInCalendar(), 0)
41062
41078
  })
41063
41079
  ] : [],
41064
41080
  ...actionHost?.extend ? actionHost.extend(subject, mayDo) : []