@ai-matrx/records-ui 0.115.78 → 0.115.79
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/CHANGELOG.md +13 -1
- package/dist/index.cjs +124 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +481 -411
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +64 -35
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +97 -68
- package/dist/pickers.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -3755,7 +3755,7 @@ import { useCallback as useCallback10, useEffect as useEffect25, useMemo as useM
|
|
|
3755
3755
|
import { isButtonField as isButtonField4 } from "@ai-matrx/records";
|
|
3756
3756
|
import { asWriteConflict, wholeValueOf as wholeValueOf2 } from "@ai-matrx/records/core";
|
|
3757
3757
|
import { useRecordsClient as useRecordsClient13 } from "@ai-matrx/records/react";
|
|
3758
|
-
import { Button as Button20, Checkbox as Checkbox6, Popover as Popover8, PopoverContent as PopoverContent8, PopoverTrigger as PopoverTrigger8, cn as
|
|
3758
|
+
import { Button as Button20, Checkbox as Checkbox6, Popover as Popover8, PopoverContent as PopoverContent8, PopoverTrigger as PopoverTrigger8, cn as cn27 } from "@ai-matrx/design-system";
|
|
3759
3759
|
|
|
3760
3760
|
// src/presentation.ts
|
|
3761
3761
|
import { COLOR_ROTATION, parseTableStyle, tableStyleIsEmpty } from "@ai-matrx/design-system/data-table/table-style";
|
|
@@ -4521,7 +4521,7 @@ import {
|
|
|
4521
4521
|
SelectItem as SelectItem7,
|
|
4522
4522
|
SelectTrigger as SelectTrigger7,
|
|
4523
4523
|
SelectValue as SelectValue7,
|
|
4524
|
-
cn as
|
|
4524
|
+
cn as cn26
|
|
4525
4525
|
} from "@ai-matrx/design-system";
|
|
4526
4526
|
|
|
4527
4527
|
// src/newerKindValues.tsx
|
|
@@ -5173,7 +5173,7 @@ function RelationPicker({ field: field2, value, onChange, disabled, id, classNam
|
|
|
5173
5173
|
|
|
5174
5174
|
// src/buttonCell.tsx
|
|
5175
5175
|
import { useState as useState28 } from "react";
|
|
5176
|
-
import { Button as Button18, Dialog as Dialog2, DialogContent as DialogContent2, DialogDescription, DialogHeader as DialogHeader2, DialogTitle as DialogTitle2, Popover as Popover5, PopoverContent as PopoverContent5, PopoverTrigger as PopoverTrigger5, cn as
|
|
5176
|
+
import { Button as Button18, Dialog as Dialog2, DialogContent as DialogContent2, DialogDescription, DialogHeader as DialogHeader2, DialogTitle as DialogTitle2, Popover as Popover5, PopoverContent as PopoverContent5, PopoverTrigger as PopoverTrigger5, cn as cn24 } from "@ai-matrx/design-system";
|
|
5177
5177
|
import { CHOICE_CHIP_CLASS as CHOICE_CHIP_CLASS2, NEUTRAL_CHIP_CLASS as NEUTRAL_CHIP_CLASS2, isStyleColor as isStyleColor2 } from "@ai-matrx/design-system/data-table";
|
|
5178
5178
|
import { buttonNeeds as buttonNeeds2, buttonOf as buttonOf2 } from "@ai-matrx/records";
|
|
5179
5179
|
import { useOptionalRecordsClient as useOptionalRecordsClient9 } from "@ai-matrx/records/react";
|
|
@@ -5241,7 +5241,7 @@ import {
|
|
|
5241
5241
|
SelectTrigger as SelectTrigger6,
|
|
5242
5242
|
SelectValue as SelectValue6,
|
|
5243
5243
|
Separator,
|
|
5244
|
-
cn as
|
|
5244
|
+
cn as cn23
|
|
5245
5245
|
} from "@ai-matrx/design-system";
|
|
5246
5246
|
|
|
5247
5247
|
// src/FormulaTextEditor.tsx
|
|
@@ -5574,7 +5574,7 @@ function WithheldValue({ field: field2, notice }) {
|
|
|
5574
5574
|
}
|
|
5575
5575
|
|
|
5576
5576
|
// src/values.tsx
|
|
5577
|
-
import { Badge as Badge5, cn as
|
|
5577
|
+
import { Badge as Badge5, cn as cn21 } from "@ai-matrx/design-system";
|
|
5578
5578
|
|
|
5579
5579
|
// src/embeddedLook.tsx
|
|
5580
5580
|
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
@@ -6210,7 +6210,7 @@ function linkChipText(raw) {
|
|
|
6210
6210
|
// src/gridAttachments.tsx
|
|
6211
6211
|
import { useEffect as useEffect14, useRef as useRef12, useState as useState20 } from "react";
|
|
6212
6212
|
import { useOptionalRecordsClient as useOptionalRecordsClient6 } from "@ai-matrx/records/react";
|
|
6213
|
-
import { Badge as Badge3, Button as Button12, Dialog, DialogContent, DialogHeader, DialogTitle } from "@ai-matrx/design-system";
|
|
6213
|
+
import { Badge as Badge3, Button as Button12, cn as cn18, Dialog, DialogContent, DialogHeader, DialogTitle } from "@ai-matrx/design-system";
|
|
6214
6214
|
|
|
6215
6215
|
// src/FilePicker.tsx
|
|
6216
6216
|
import { useCallback as useCallback5, useId, useRef as useRef11, useState as useState19 } from "react";
|
|
@@ -6366,46 +6366,63 @@ function AttachmentChip({ id, onRemove, onPreview }) {
|
|
|
6366
6366
|
const words2 = read?.name ?? (read ? FILE_CHIP_UNREAD : "\u2026");
|
|
6367
6367
|
const href = read?.fileId ? host.hrefForFile?.({ fileId: read.fileId }) : void 0;
|
|
6368
6368
|
const title = onPreview ? `Preview ${words2}` : href ? `Open ${words2}` : read?.why ?? FILE_CHIP_NO_PAGE;
|
|
6369
|
-
return /* @__PURE__ */ jsxs22(
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6369
|
+
return /* @__PURE__ */ jsxs22(
|
|
6370
|
+
Badge3,
|
|
6371
|
+
{
|
|
6372
|
+
variant: "secondary",
|
|
6373
|
+
className: cn18("max-w-[14rem] gap-1 text-[11px]", onPreview && "cursor-pointer"),
|
|
6374
|
+
"data-records-file-chip": id,
|
|
6375
|
+
title,
|
|
6376
|
+
...onPreview ? {
|
|
6376
6377
|
onClick: (event) => {
|
|
6377
6378
|
event.stopPropagation();
|
|
6378
6379
|
onPreview();
|
|
6379
6380
|
},
|
|
6380
6381
|
onMouseDown: (event) => event.stopPropagation(),
|
|
6381
|
-
onDoubleClick: (event) => event.stopPropagation()
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6382
|
+
onDoubleClick: (event) => event.stopPropagation()
|
|
6383
|
+
} : {},
|
|
6384
|
+
children: [
|
|
6385
|
+
onPreview ? /* @__PURE__ */ jsx25(
|
|
6386
|
+
"button",
|
|
6387
|
+
{
|
|
6388
|
+
type: "button",
|
|
6389
|
+
className: "truncate underline-offset-2 hover:underline",
|
|
6390
|
+
"data-records-file-preview": id,
|
|
6391
|
+
onClick: (event) => {
|
|
6392
|
+
event.stopPropagation();
|
|
6393
|
+
onPreview();
|
|
6394
|
+
},
|
|
6395
|
+
onMouseDown: (event) => event.stopPropagation(),
|
|
6396
|
+
onDoubleClick: (event) => event.stopPropagation(),
|
|
6397
|
+
children: words2
|
|
6398
|
+
}
|
|
6399
|
+
) : href ? /* @__PURE__ */ jsx25(
|
|
6400
|
+
OutboundLink4,
|
|
6401
|
+
{
|
|
6402
|
+
href,
|
|
6403
|
+
className: "truncate underline-offset-2 hover:underline",
|
|
6404
|
+
"data-records-file-link": read?.fileId ?? "",
|
|
6405
|
+
onClick: (event) => event.stopPropagation(),
|
|
6406
|
+
onMouseDown: (event) => event.stopPropagation(),
|
|
6407
|
+
children: words2
|
|
6408
|
+
}
|
|
6409
|
+
) : /* @__PURE__ */ jsx25("span", { className: "truncate", children: words2 }),
|
|
6410
|
+
onRemove ? /* @__PURE__ */ jsx25(
|
|
6411
|
+
"button",
|
|
6412
|
+
{
|
|
6413
|
+
type: "button",
|
|
6414
|
+
"aria-label": `Remove ${words2}`,
|
|
6415
|
+
className: "shrink-0 rounded px-0.5 text-muted-foreground hover:text-foreground",
|
|
6416
|
+
onClick: (event) => {
|
|
6417
|
+
event.stopPropagation();
|
|
6418
|
+
onRemove();
|
|
6419
|
+
},
|
|
6420
|
+
children: "\xD7"
|
|
6421
|
+
}
|
|
6422
|
+
) : null
|
|
6423
|
+
]
|
|
6424
|
+
}
|
|
6425
|
+
);
|
|
6409
6426
|
}
|
|
6410
6427
|
function AttachmentChips({ value, onRemove }) {
|
|
6411
6428
|
const host = useRecordsUi();
|
|
@@ -6446,6 +6463,18 @@ function AttachmentViewer({
|
|
|
6446
6463
|
{
|
|
6447
6464
|
className: "sm:max-w-3xl",
|
|
6448
6465
|
"data-records-attachment-viewer": id,
|
|
6466
|
+
tabIndex: -1,
|
|
6467
|
+
onOpenAutoFocus: (event) => {
|
|
6468
|
+
event.preventDefault();
|
|
6469
|
+
event.currentTarget.focus();
|
|
6470
|
+
},
|
|
6471
|
+
onCloseAutoFocus: (event) => {
|
|
6472
|
+
const chip = document.querySelector(`[data-records-file-preview="${ids[index]}"]`);
|
|
6473
|
+
if (chip) {
|
|
6474
|
+
event.preventDefault();
|
|
6475
|
+
chip.focus();
|
|
6476
|
+
}
|
|
6477
|
+
},
|
|
6449
6478
|
onKeyDown: (event) => {
|
|
6450
6479
|
if (event.key === "ArrowLeft") {
|
|
6451
6480
|
event.preventDefault();
|
|
@@ -6554,7 +6583,7 @@ function AttachmentControl({
|
|
|
6554
6583
|
|
|
6555
6584
|
// src/ReferenceChips.tsx
|
|
6556
6585
|
import { entityRefsOf as entityRefsOf2 } from "@ai-matrx/records";
|
|
6557
|
-
import { Badge as Badge4, Skeleton as Skeleton2, cn as
|
|
6586
|
+
import { Badge as Badge4, Skeleton as Skeleton2, cn as cn19 } from "@ai-matrx/design-system";
|
|
6558
6587
|
|
|
6559
6588
|
// src/kindValues.ts
|
|
6560
6589
|
import { tryDecodeDirective } from "@ai-matrx/content-ir/directives";
|
|
@@ -6659,7 +6688,7 @@ function ReferenceChip({ reference, waiting }) {
|
|
|
6659
6688
|
return /* @__PURE__ */ jsxs23(
|
|
6660
6689
|
"span",
|
|
6661
6690
|
{
|
|
6662
|
-
className:
|
|
6691
|
+
className: cn19(
|
|
6663
6692
|
"inline-flex max-w-full min-w-0 items-center gap-1.5 text-sm text-foreground hover:underline [&_a]:text-inherit [&_a]:no-underline [&_a:hover]:underline",
|
|
6664
6693
|
reference.archived && "opacity-70"
|
|
6665
6694
|
),
|
|
@@ -6679,7 +6708,7 @@ function ReferenceChip({ reference, waiting }) {
|
|
|
6679
6708
|
Badge4,
|
|
6680
6709
|
{
|
|
6681
6710
|
variant: "secondary",
|
|
6682
|
-
className:
|
|
6711
|
+
className: cn19(
|
|
6683
6712
|
"max-w-full min-w-0 gap-1 px-1.5 py-0 text-[11px] font-normal",
|
|
6684
6713
|
reference.archived && "opacity-70"
|
|
6685
6714
|
),
|
|
@@ -6707,12 +6736,12 @@ function KindValueCell({
|
|
|
6707
6736
|
return /* @__PURE__ */ jsx26("span", { className: "flex min-w-0 max-w-full items-center", "data-records-kind-value": kv.kind, children: host.renderKind({ value: kv.value, kind: kv.kind, where, title }) });
|
|
6708
6737
|
}
|
|
6709
6738
|
const named = kv.items.map(kindItemWords).filter((w) => w !== null);
|
|
6710
|
-
return /* @__PURE__ */ jsx26("span", { className:
|
|
6739
|
+
return /* @__PURE__ */ jsx26("span", { className: cn19("flex min-w-0 flex-wrap gap-1"), "data-records-kind-value": kv.kind, title: JSON.stringify(kv.value), children: named.length > 0 ? named.map((w, i) => /* @__PURE__ */ jsx26(Badge4, { variant: "secondary", className: "px-1.5 py-0 text-[11px] font-normal", children: w }, `${w}-${i}`)) : /* @__PURE__ */ jsx26(Badge4, { variant: "outline", className: "px-1.5 py-0 text-[11px] font-normal", children: kindLabel(kv.kind) }) });
|
|
6711
6740
|
}
|
|
6712
6741
|
|
|
6713
6742
|
// src/ClampedChips.tsx
|
|
6714
6743
|
import { useCallback as useCallback6, useLayoutEffect, useRef as useRef13, useState as useState21 } from "react";
|
|
6715
|
-
import { Popover as Popover4, PopoverContent as PopoverContent4, PopoverTrigger as PopoverTrigger4, cn as
|
|
6744
|
+
import { Popover as Popover4, PopoverContent as PopoverContent4, PopoverTrigger as PopoverTrigger4, cn as cn20 } from "@ai-matrx/design-system";
|
|
6716
6745
|
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6717
6746
|
var GAP = 4;
|
|
6718
6747
|
var OVERFLOW_ROOM = 34;
|
|
@@ -6783,7 +6812,7 @@ function ClampedChips({
|
|
|
6783
6812
|
"span",
|
|
6784
6813
|
{
|
|
6785
6814
|
ref: box,
|
|
6786
|
-
className:
|
|
6815
|
+
className: cn20("flex min-w-0 max-w-full flex-nowrap items-center gap-1 overflow-hidden [[data-matrx-cell-lines]:not([data-matrx-cell-lines=one])_&]:flex-wrap", className),
|
|
6787
6816
|
"data-records-clamped": dataAttr ?? "",
|
|
6788
6817
|
children: [
|
|
6789
6818
|
shown5.map((item) => /* @__PURE__ */ jsx27("span", { "data-clamp-item": "", className: "inline-flex min-w-0 shrink-0 max-w-full", children: item.node }, item.key)),
|
|
@@ -7209,11 +7238,11 @@ function renderValue(field2, value, document2, labels, stillWaitingFor, look) {
|
|
|
7209
7238
|
Badge5,
|
|
7210
7239
|
{
|
|
7211
7240
|
variant: "outline",
|
|
7212
|
-
className:
|
|
7241
|
+
className: cn21("text-[11px]", chip.className),
|
|
7213
7242
|
"data-records-choice-chip": "",
|
|
7214
7243
|
...chip.tinted ? { "data-records-choice-tint": "" } : {},
|
|
7215
7244
|
children: [
|
|
7216
|
-
look?.choiceDot ? /* @__PURE__ */ jsx30("span", { "aria-hidden": "true", "data-matrx-pill-ink": "", "data-records-choice-dot": "", className:
|
|
7245
|
+
look?.choiceDot ? /* @__PURE__ */ jsx30("span", { "aria-hidden": "true", "data-matrx-pill-ink": "", "data-records-choice-dot": "", className: cn21("mr-1.5 inline-block size-1.5 shrink-0 rounded-full", chip.dot) }) : null,
|
|
7217
7246
|
statusMark(field2, item, Array.isArray(value) ? void 0 : document2),
|
|
7218
7247
|
scalarText(field2, item, labels, Array.isArray(value) ? void 0 : stillWaitingFor)
|
|
7219
7248
|
]
|
|
@@ -7262,7 +7291,7 @@ function renderValue(field2, value, document2, labels, stillWaitingFor, look) {
|
|
|
7262
7291
|
if (typeof value === "boolean") {
|
|
7263
7292
|
return /* @__PURE__ */ jsx30("span", { className: kind2 === "checkbox" ? "text-sm" : "", title: value ? "Yes" : "No", children: value ? "\u2713" : "\u2014" });
|
|
7264
7293
|
}
|
|
7265
|
-
return /* @__PURE__ */ jsx30("span", { className:
|
|
7294
|
+
return /* @__PURE__ */ jsx30("span", { className: cn21("truncate", kind2 === "number" || kind2 === "currency" || kind2 === "percent" ? "tabular-nums" : ""), children: scalarText(field2, value, labels, stillWaitingFor) });
|
|
7266
7295
|
}
|
|
7267
7296
|
function scalarText(field2, value, labels, stillWaitingFor) {
|
|
7268
7297
|
if (value === null || value === void 0) return "\u2014";
|
|
@@ -8520,7 +8549,7 @@ import { useOptionalRecordsClient as useOptionalRecordsClient8 } from "@ai-matrx
|
|
|
8520
8549
|
|
|
8521
8550
|
// src/AccentSwatches.tsx
|
|
8522
8551
|
import { PORTAL_ACCENTS } from "@ai-matrx/records";
|
|
8523
|
-
import { cn as
|
|
8552
|
+
import { cn as cn22 } from "@ai-matrx/design-system";
|
|
8524
8553
|
import { STYLE_COLOR_LABELS as STYLE_COLOR_LABELS2, SWATCH_CLASS as SWATCH_CLASS3 } from "@ai-matrx/design-system/data-table";
|
|
8525
8554
|
import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
8526
8555
|
function AccentSwatches({ value, onChange, options = PORTAL_ACCENTS, noneLabel = "App colour" }) {
|
|
@@ -8532,7 +8561,7 @@ function AccentSwatches({ value, onChange, options = PORTAL_ACCENTS, noneLabel =
|
|
|
8532
8561
|
role: "radio",
|
|
8533
8562
|
"aria-checked": value === "",
|
|
8534
8563
|
onClick: () => onChange(""),
|
|
8535
|
-
className:
|
|
8564
|
+
className: cn22(
|
|
8536
8565
|
"h-7 rounded border px-2 text-xs",
|
|
8537
8566
|
value === "" ? "border-foreground" : "border-border text-muted-foreground"
|
|
8538
8567
|
),
|
|
@@ -8548,7 +8577,7 @@ function AccentSwatches({ value, onChange, options = PORTAL_ACCENTS, noneLabel =
|
|
|
8548
8577
|
"aria-label": STYLE_COLOR_LABELS2[c],
|
|
8549
8578
|
title: STYLE_COLOR_LABELS2[c],
|
|
8550
8579
|
onClick: () => onChange(c),
|
|
8551
|
-
className:
|
|
8580
|
+
className: cn22("h-7 w-7 rounded-full border-2", SWATCH_CLASS3[c], value === c ? "border-foreground" : "border-transparent")
|
|
8552
8581
|
},
|
|
8553
8582
|
c
|
|
8554
8583
|
))
|
|
@@ -9026,7 +9055,7 @@ function FieldEditor(props) {
|
|
|
9026
9055
|
const offersMany = multiApplies(type) && !isTitle;
|
|
9027
9056
|
if (!mayShape) {
|
|
9028
9057
|
if (onEntity && entityRights.loading) return null;
|
|
9029
|
-
return /* @__PURE__ */ jsx38("p", { className:
|
|
9058
|
+
return /* @__PURE__ */ jsx38("p", { className: cn23("text-xs text-muted-foreground", className), children: props.tableLabel && storeLabel && whyNot ? whyNot.split(storeLabel).join(props.tableLabel) : whyNot });
|
|
9030
9059
|
}
|
|
9031
9060
|
const options = newChoices.map((r) => r.words.trim()).filter((word) => word !== "");
|
|
9032
9061
|
const shownStatusRows = type !== "status" ? [] : statusGroupRows(field2, editing ? choiceList ?? [] : newChoices, statusKeys, statusGroups);
|
|
@@ -9226,7 +9255,7 @@ function FieldEditor(props) {
|
|
|
9226
9255
|
if (gone) (onRemoved ?? onSaved)?.();
|
|
9227
9256
|
else setAskingToRemove(false);
|
|
9228
9257
|
};
|
|
9229
|
-
return /* @__PURE__ */ jsxs34("div", { className:
|
|
9258
|
+
return /* @__PURE__ */ jsxs34("div", { className: cn23("flex min-w-0 flex-col gap-3 text-xs", className), "data-records-field-editor": "", children: [
|
|
9230
9259
|
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
9231
9260
|
/* @__PURE__ */ jsx38("span", { className: "font-medium", children: field2 ? `Field \xB7 ${fieldName(field2)}` : "New field" }),
|
|
9232
9261
|
/* @__PURE__ */ jsx38("span", { className: "ml-auto text-muted-foreground", children: tableLabel })
|
|
@@ -9683,8 +9712,8 @@ function FieldEditor(props) {
|
|
|
9683
9712
|
the dialog card 0.2278 and closing it 0.1303. The consequence is the tooltip of
|
|
9684
9713
|
"Remove it" (interface-text: the slot holds a label, never a paragraph). */
|
|
9685
9714
|
/* @__PURE__ */ jsxs34("div", { className: "ml-auto grid shrink-0 items-center", "data-field-editor-remove": askingToRemove ? "asking" : "idle", children: [
|
|
9686
|
-
/* @__PURE__ */ jsx38("div", { className:
|
|
9687
|
-
/* @__PURE__ */ jsxs34("div", { className:
|
|
9715
|
+
/* @__PURE__ */ jsx38("div", { className: cn23("col-start-1 row-start-1 flex items-center justify-end gap-2", askingToRemove && "invisible"), "aria-hidden": askingToRemove || void 0, children: /* @__PURE__ */ jsx38(Button17, { size: "sm", variant: "outline", tabIndex: askingToRemove ? -1 : void 0, onClick: () => setAskingToRemove(true), children: "Remove this field" }) }),
|
|
9716
|
+
/* @__PURE__ */ jsxs34("div", { className: cn23("col-start-1 row-start-1 flex items-center justify-end gap-2", !askingToRemove && "invisible"), "aria-hidden": !askingToRemove || void 0, children: [
|
|
9688
9717
|
/* @__PURE__ */ jsx38("span", { className: "whitespace-nowrap text-destructive", "data-field-editor-remove-ask": "", children: "Archive this field?" }),
|
|
9689
9718
|
/* @__PURE__ */ jsx38(
|
|
9690
9719
|
Button17,
|
|
@@ -10123,7 +10152,7 @@ function ButtonValue({ field: field2, recordId, inCell }) {
|
|
|
10123
10152
|
"data-records-button-unset": needs ? "" : void 0,
|
|
10124
10153
|
"aria-busy": busy || void 0,
|
|
10125
10154
|
disabled: busy,
|
|
10126
|
-
className:
|
|
10155
|
+
className: cn24("max-w-full gap-1 border px-2 font-medium", inCell ? "h-5" : "h-6", color, needs && "border-dashed opacity-80"),
|
|
10127
10156
|
onPointerDown: stop,
|
|
10128
10157
|
onDoubleClick: stop,
|
|
10129
10158
|
onClick: (event) => {
|
|
@@ -10335,7 +10364,7 @@ function formatControl(args) {
|
|
|
10335
10364
|
|
|
10336
10365
|
// src/typedDateHelper.tsx
|
|
10337
10366
|
import { useState as useState31 } from "react";
|
|
10338
|
-
import { Popover as Popover6, PopoverContent as PopoverContent6, PopoverTrigger as PopoverTrigger6, cn as
|
|
10367
|
+
import { Popover as Popover6, PopoverContent as PopoverContent6, PopoverTrigger as PopoverTrigger6, cn as cn25 } from "@ai-matrx/design-system";
|
|
10339
10368
|
import { readTypedDate, readTypedTime, typedDateText, typedTimeText } from "@ai-matrx/records";
|
|
10340
10369
|
import { jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
10341
10370
|
var WEEK = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
@@ -10460,7 +10489,7 @@ function TypedDateHelper({
|
|
|
10460
10489
|
type: "button",
|
|
10461
10490
|
...keepFocus,
|
|
10462
10491
|
"data-records-date-helper-day": key,
|
|
10463
|
-
className:
|
|
10492
|
+
className: cn25(
|
|
10464
10493
|
"h-6 w-6 rounded tabular-nums hover:bg-muted",
|
|
10465
10494
|
key === held.day ? "bg-primary text-primary-foreground hover:bg-primary" : "",
|
|
10466
10495
|
key === todayKey && key !== held.day ? "ring-1 ring-ring" : ""
|
|
@@ -10479,7 +10508,7 @@ function TypedDateHelper({
|
|
|
10479
10508
|
type: "button",
|
|
10480
10509
|
...keepFocus,
|
|
10481
10510
|
"data-records-date-helper-time": `${pad2(t.h)}:${pad2(t.m)}`,
|
|
10482
|
-
className:
|
|
10511
|
+
className: cn25(
|
|
10483
10512
|
"whitespace-nowrap rounded px-2 py-0.5 text-left tabular-nums hover:bg-muted",
|
|
10484
10513
|
held.time && held.time.h === t.h && held.time.m === t.m ? "bg-primary text-primary-foreground" : ""
|
|
10485
10514
|
),
|
|
@@ -11305,7 +11334,7 @@ function OpenChoicePicker({
|
|
|
11305
11334
|
const pickedOptions = current.map((v) => options.find((o) => isTheChosen(o, v)));
|
|
11306
11335
|
const cellChips = pickedWords.map((word, i) => {
|
|
11307
11336
|
const chip = chipOf(pickedOptions[i], word);
|
|
11308
|
-
return /* @__PURE__ */ jsx43(Badge6, { variant: "outline", className:
|
|
11337
|
+
return /* @__PURE__ */ jsx43(Badge6, { variant: "outline", className: cn26("text-[11px]", chip.className), "data-records-choice-chip": "", children: word }, word);
|
|
11309
11338
|
});
|
|
11310
11339
|
const headChips = pickedWords.map((word, i) => {
|
|
11311
11340
|
const option = pickedOptions[i];
|
|
@@ -11378,7 +11407,7 @@ function RecordChip({
|
|
|
11378
11407
|
// name. So it caps at its container and ends in an ellipsis with the whole name in
|
|
11379
11408
|
// its tooltip, rather than being cut mid-word by whatever box it landed in
|
|
11380
11409
|
// (lane FIX-14, 2026-09-22).
|
|
11381
|
-
/* @__PURE__ */ jsxs39(Badge6, { variant: "secondary", className:
|
|
11410
|
+
/* @__PURE__ */ jsxs39(Badge6, { variant: "secondary", className: cn26("max-w-full gap-1 text-[11px]", className), title, children: [
|
|
11382
11411
|
/* @__PURE__ */ jsx43("span", { className: "min-w-0 truncate", children: title }),
|
|
11383
11412
|
onRemove ? /* @__PURE__ */ jsx43("button", { type: "button", onClick: onRemove, "aria-label": `Remove ${title}`, className: "shrink-0 opacity-60 hover:opacity-100", children: "\xD7" }) : null
|
|
11384
11413
|
] })
|
|
@@ -11433,7 +11462,7 @@ function ChoiceAnswer({
|
|
|
11433
11462
|
tabIndex: field2.multi || choice.key === tabStop ? 0 : -1,
|
|
11434
11463
|
onClick: () => press(choice),
|
|
11435
11464
|
"data-records-choice-answer": choice.key,
|
|
11436
|
-
className:
|
|
11465
|
+
className: cn26(
|
|
11437
11466
|
"flex min-h-11 w-full items-center gap-3 rounded-md border px-3 py-2 text-left text-base font-medium text-foreground transition-colors sm:min-h-10 sm:text-sm",
|
|
11438
11467
|
chosen ? "border-primary bg-primary/10" : "border-primary/30 bg-primary/[0.03] hover:bg-primary/10"
|
|
11439
11468
|
),
|
|
@@ -11442,7 +11471,7 @@ function ChoiceAnswer({
|
|
|
11442
11471
|
"kbd",
|
|
11443
11472
|
{
|
|
11444
11473
|
"aria-hidden": "true",
|
|
11445
|
-
className:
|
|
11474
|
+
className: cn26(
|
|
11446
11475
|
"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded border font-sans text-xs font-semibold",
|
|
11447
11476
|
chosen ? "border-primary bg-primary text-primary-foreground" : "border-primary/40 text-primary"
|
|
11448
11477
|
),
|
|
@@ -12503,7 +12532,7 @@ function GridCell({
|
|
|
12503
12532
|
disabled: !editable,
|
|
12504
12533
|
"aria-label": editable ? `${fieldName(field2)} \u2014 press Space to ${value === true ? "untick" : "tick"}` : fieldName(field2),
|
|
12505
12534
|
title: editable ? answered ? `${fieldName(field2)} \u2014 press Space to change` : `${fieldName(field2)} \u2014 nobody has answered this yet` : whyNot ?? `${fieldName(field2)} \u2014 you cannot change this record`,
|
|
12506
|
-
className:
|
|
12535
|
+
className: cn27(state2 === "saving" ? "opacity-60" : "", state2 === "refused" ? "ring-1 ring-destructive" : ""),
|
|
12507
12536
|
onCheckedChange: (next) => editing?.setCell(row.id, field2.key, next === true)
|
|
12508
12537
|
}
|
|
12509
12538
|
),
|
|
@@ -12571,7 +12600,7 @@ function GridCell({
|
|
|
12571
12600
|
// after it has been typed into.
|
|
12572
12601
|
`${fieldName(field2)} \u2014 ${whyNot ?? "you cannot change this record"}`
|
|
12573
12602
|
) : `${fieldName(field2)} is worked out by the system, so it cannot be typed in`,
|
|
12574
|
-
className:
|
|
12603
|
+
className: cn27(
|
|
12575
12604
|
// `w-full` so the whole cell is the control. A gap beside it is bare
|
|
12576
12605
|
// table cell, and a click there is a row click.
|
|
12577
12606
|
"block w-full min-w-0 flex-1 truncate rounded px-1 py-0.5",
|
|
@@ -12880,7 +12909,7 @@ function OpenCell({
|
|
|
12880
12909
|
style: wideTo ? { width: wideTo, minWidth: wideTo, maxWidth: "28rem", right: "auto" } : void 0,
|
|
12881
12910
|
"data-matrx-cell-editor": "",
|
|
12882
12911
|
tabIndex: -1,
|
|
12883
|
-
className:
|
|
12912
|
+
className: cn27(
|
|
12884
12913
|
// OVER the cell's ghost (see `data-records-open-cell`), never in the table's measuring.
|
|
12885
12914
|
"absolute inset-x-0 top-1/2 z-[25] flex w-full min-w-0 max-w-full -translate-y-1/2 flex-col gap-1 outline-none",
|
|
12886
12915
|
// A box reaching over the next column is opaque, so what it covers never shows through it
|
|
@@ -12947,7 +12976,7 @@ function OpenCell({
|
|
|
12947
12976
|
}
|
|
12948
12977
|
),
|
|
12949
12978
|
/* @__PURE__ */ jsxs40("span", { "data-records-cell-tray": "", className: FLOATING_CELL_TRAY_CLASS, children: [
|
|
12950
|
-
picker || asksAboutAChoice(draft) ? null : blurCommits ? null : /* @__PURE__ */ jsxs40("span", { className:
|
|
12979
|
+
picker || asksAboutAChoice(draft) ? null : blurCommits ? null : /* @__PURE__ */ jsxs40("span", { className: cn27("flex items-center gap-1", FLOATING_CELL_TRAY_PIECE_CLASS), children: [
|
|
12951
12980
|
/* @__PURE__ */ jsx45(Button20, { size: "sm", onClick: () => once(() => onCommit(null, "pick")), children: "Save" }),
|
|
12952
12981
|
/* @__PURE__ */ jsx45(Button20, { size: "sm", variant: "ghost", onClick: () => once(() => onCancel("pick")), children: "Cancel" })
|
|
12953
12982
|
] }),
|
|
@@ -12994,7 +13023,7 @@ function rememberLayout(tableId, layout) {
|
|
|
12994
13023
|
|
|
12995
13024
|
// src/RecordsSkeleton.tsx
|
|
12996
13025
|
import { useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
12997
|
-
import { cn as
|
|
13026
|
+
import { cn as cn28, Skeleton as Skeleton3 } from "@ai-matrx/design-system";
|
|
12998
13027
|
import { MatrxDataTable } from "@ai-matrx/design-system/data-table";
|
|
12999
13028
|
import { Fragment as Fragment14, jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
13000
13029
|
var NEVER = () => () => {
|
|
@@ -13058,7 +13087,7 @@ function GridSkeleton({ embedded, rows }) {
|
|
|
13058
13087
|
...embedded ? {
|
|
13059
13088
|
appearance: "embedded",
|
|
13060
13089
|
hidePagination: true,
|
|
13061
|
-
tableClassName:
|
|
13090
|
+
tableClassName: cn28(EMBEDDED_TABLE_CLASS, EMBEDDED_PLAIN_FOOTER_CLASS)
|
|
13062
13091
|
} : {}
|
|
13063
13092
|
}
|
|
13064
13093
|
);
|
|
@@ -13141,7 +13170,7 @@ function RecordsSkeleton({ layout = "grid", embedded = false, rows, className })
|
|
|
13141
13170
|
"aria-label": "Loading",
|
|
13142
13171
|
"aria-busy": "true",
|
|
13143
13172
|
"data-records-skeleton": layout,
|
|
13144
|
-
className:
|
|
13173
|
+
className: cn28("flex min-h-0 flex-col", !embedded && "flex-1", className),
|
|
13145
13174
|
children: /* @__PURE__ */ jsx46(BodySkeleton, { layout, embedded, rows: rows ?? (embedded ? 5 : "fill") })
|
|
13146
13175
|
}
|
|
13147
13176
|
);
|
|
@@ -13157,7 +13186,7 @@ function TablePageSkeleton({
|
|
|
13157
13186
|
const rememberedFace = useRememberedLayout(embedded || layoutAsked ? void 0 : tableId);
|
|
13158
13187
|
const layout = layoutAsked ?? skeletonLayoutFor(rememberedFace);
|
|
13159
13188
|
const painted = rows ?? (remembered === "fill" ? void 0 : remembered);
|
|
13160
|
-
return /* @__PURE__ */ jsx46("div", { className:
|
|
13189
|
+
return /* @__PURE__ */ jsx46("div", { className: cn28(TABLE_PAGE_FRAME_CLASS, className), "data-records-skeleton-page": layout, children: /* @__PURE__ */ jsxs41("div", { className: TABLE_PAGE_COLUMN_CLASS, children: [
|
|
13161
13190
|
/* @__PURE__ */ jsxs41("div", { className: TABLE_TOOLBAR_ROW_CLASS, "data-table-toolbar": "", "data-records-skeleton-part": "toolbar", "aria-hidden": "true", children: [
|
|
13162
13191
|
/* @__PURE__ */ jsx46(Skeleton3, { shape: "control", width: "sm", className: "w-28" }),
|
|
13163
13192
|
/* @__PURE__ */ jsx46(Skeleton3, { shape: "control", className: "w-16" }),
|
|
@@ -15164,13 +15193,13 @@ import {
|
|
|
15164
15193
|
SelectItem as SelectItem8,
|
|
15165
15194
|
SelectTrigger as SelectTrigger8,
|
|
15166
15195
|
SelectValue as SelectValue8,
|
|
15167
|
-
cn as
|
|
15196
|
+
cn as cn31
|
|
15168
15197
|
} from "@ai-matrx/design-system";
|
|
15169
15198
|
|
|
15170
15199
|
// src/rowActionPreview.tsx
|
|
15171
15200
|
import { useEffect as useEffect31, useState as useState44 } from "react";
|
|
15172
15201
|
import { useRecordsClient as useRecordsClient21 } from "@ai-matrx/records/react";
|
|
15173
|
-
import { cn as
|
|
15202
|
+
import { cn as cn29 } from "@ai-matrx/design-system";
|
|
15174
15203
|
import { jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
15175
15204
|
function isComputed(field2) {
|
|
15176
15205
|
const kind2 = String(field2.type);
|
|
@@ -15271,7 +15300,7 @@ function ActionRowPreview({
|
|
|
15271
15300
|
{
|
|
15272
15301
|
role: "columnheader",
|
|
15273
15302
|
title: cell2.name,
|
|
15274
|
-
className:
|
|
15303
|
+
className: cn29("truncate border-l bg-muted/60 px-2 py-1 font-medium", cell2.changed ? "text-foreground" : "text-muted-foreground"),
|
|
15275
15304
|
children: cell2.name
|
|
15276
15305
|
},
|
|
15277
15306
|
cell2.key
|
|
@@ -15288,7 +15317,7 @@ function ActionRowPreview({
|
|
|
15288
15317
|
"data-changed": cell2.changed ? "true" : void 0,
|
|
15289
15318
|
"data-records-preview-cell": cell2.key,
|
|
15290
15319
|
title: shown5.text,
|
|
15291
|
-
className:
|
|
15320
|
+
className: cn29(
|
|
15292
15321
|
"truncate border-l border-t px-2 py-1",
|
|
15293
15322
|
shown5.text === "empty" && "italic text-muted-foreground",
|
|
15294
15323
|
cell2.changed && which === "before" && "bg-destructive/10 text-destructive line-through",
|
|
@@ -15312,7 +15341,7 @@ function ActionRowPreview({
|
|
|
15312
15341
|
import { useCallback as useCallback13, useEffect as useEffect32, useMemo as useMemo20, useState as useState45 } from "react";
|
|
15313
15342
|
import { useRecordsClient as useRecordsClient22, useRowActions } from "@ai-matrx/records/react";
|
|
15314
15343
|
import { actionRefusals } from "@ai-matrx/records";
|
|
15315
|
-
import { Button as Button28, ConfirmDialog, cn as
|
|
15344
|
+
import { Button as Button28, ConfirmDialog, cn as cn30 } from "@ai-matrx/design-system";
|
|
15316
15345
|
import { jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
15317
15346
|
var EMPTY_ACTIONS = [];
|
|
15318
15347
|
var actionListeners = /* @__PURE__ */ new Map();
|
|
@@ -15470,7 +15499,7 @@ function ActionButton({
|
|
|
15470
15499
|
{
|
|
15471
15500
|
size: "sm",
|
|
15472
15501
|
variant: count === void 0 ? "ghost" : "outline",
|
|
15473
|
-
className:
|
|
15502
|
+
className: cn30("h-7 px-2", className),
|
|
15474
15503
|
"data-records-row-action": action3.id,
|
|
15475
15504
|
title: action3.kind === "agent" ? `Hand this to an agent: ${action3.prompt ?? action3.name}` : action3.name,
|
|
15476
15505
|
disabled: busy,
|
|
@@ -15492,7 +15521,7 @@ function ActionOutcomeNotice({
|
|
|
15492
15521
|
{
|
|
15493
15522
|
role: "status",
|
|
15494
15523
|
"data-records-action-outcome": outcome.kind,
|
|
15495
|
-
className:
|
|
15524
|
+
className: cn30(
|
|
15496
15525
|
"flex flex-col gap-1 rounded border px-2 py-1 text-xs",
|
|
15497
15526
|
outcome.kind === "refused" ? "border-destructive/40 bg-destructive/5" : "border-border bg-muted/40"
|
|
15498
15527
|
),
|
|
@@ -15505,7 +15534,7 @@ function ActionOutcomeNotice({
|
|
|
15505
15534
|
{
|
|
15506
15535
|
size: "sm",
|
|
15507
15536
|
variant: "ghost",
|
|
15508
|
-
className:
|
|
15537
|
+
className: cn30("h-6", outcome.kind === "ran" && outcome.undo ? "" : "ml-auto"),
|
|
15509
15538
|
onClick: onDismiss,
|
|
15510
15539
|
children: "Dismiss"
|
|
15511
15540
|
}
|
|
@@ -15779,7 +15808,7 @@ function RowActionsSection({
|
|
|
15779
15808
|
}
|
|
15780
15809
|
);
|
|
15781
15810
|
}
|
|
15782
|
-
return /* @__PURE__ */ jsxs51("div", { className:
|
|
15811
|
+
return /* @__PURE__ */ jsxs51("div", { className: cn31("flex flex-col gap-2", className), "data-records-row-actions-editor": "", children: [
|
|
15783
15812
|
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2", children: [
|
|
15784
15813
|
/* @__PURE__ */ jsx57("span", { className: "font-medium", children: "Row actions" }),
|
|
15785
15814
|
loaded && !readError ? /* @__PURE__ */ jsx57("span", { className: "text-muted-foreground", children: actions.length }) : null,
|
|
@@ -15926,7 +15955,7 @@ function ActionForm({
|
|
|
15926
15955
|
const first = settable2.find((f) => doc[f.key] !== null && doc[f.key] !== void 0 && doc[f.key] !== "");
|
|
15927
15956
|
return first ? shown2(doc[first.key]) : row.id;
|
|
15928
15957
|
};
|
|
15929
|
-
return /* @__PURE__ */ jsxs51("div", { className:
|
|
15958
|
+
return /* @__PURE__ */ jsxs51("div", { className: cn31("flex flex-col gap-3 text-xs", className), "data-records-action-form": "", children: [
|
|
15930
15959
|
/* @__PURE__ */ jsx57("span", { className: "font-medium", children: original ? `Row action \xB7 ${original.name}` : "New row action" }),
|
|
15931
15960
|
/* @__PURE__ */ jsxs51("label", { className: "flex flex-col gap-1", children: [
|
|
15932
15961
|
/* @__PURE__ */ jsx57(Label10, { className: "text-xs", children: "Name" }),
|
|
@@ -16193,7 +16222,7 @@ import {
|
|
|
16193
16222
|
DropdownMenuLabel,
|
|
16194
16223
|
DropdownMenuSeparator,
|
|
16195
16224
|
DropdownMenuTrigger,
|
|
16196
|
-
cn as
|
|
16225
|
+
cn as cn32
|
|
16197
16226
|
} from "@ai-matrx/design-system";
|
|
16198
16227
|
import { Fragment as Fragment16, jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
16199
16228
|
var SUMMARY_ROW_ID = "__records_ui_summary__";
|
|
@@ -16298,7 +16327,7 @@ function SummaryCell({
|
|
|
16298
16327
|
size: "sm",
|
|
16299
16328
|
variant: "ghost",
|
|
16300
16329
|
"data-records-summary": field2.key,
|
|
16301
|
-
className:
|
|
16330
|
+
className: cn32(
|
|
16302
16331
|
"h-6 max-w-full justify-start gap-1 px-1 text-xs font-normal",
|
|
16303
16332
|
// AN UNCHOSEN SUMMARY IS A HOVER, NOT A WORD IN EVERY FOOTER CELL (lane C, review
|
|
16304
16333
|
// 2026-09-26 E1 — Airtable's footer): it shows under the pointer, on keyboard focus and
|
|
@@ -16322,7 +16351,7 @@ function SummaryCell({
|
|
|
16322
16351
|
{
|
|
16323
16352
|
"data-records-summary-choice": op2,
|
|
16324
16353
|
onSelect: () => onChoose(op2),
|
|
16325
|
-
className:
|
|
16354
|
+
className: cn32(op2 === chosen && "font-medium"),
|
|
16326
16355
|
children: words2(op2, "menu")
|
|
16327
16356
|
},
|
|
16328
16357
|
op2
|
|
@@ -17976,7 +18005,7 @@ function selectOpenCellText() {
|
|
|
17976
18005
|
}
|
|
17977
18006
|
|
|
17978
18007
|
// src/Grid.tsx
|
|
17979
|
-
import { Button as Button49, ConfirmDialog as ConfirmDialog5, TapTargetSearchGroup, cn as
|
|
18008
|
+
import { Button as Button49, ConfirmDialog as ConfirmDialog5, TapTargetSearchGroup, cn as cn41, useIsMobile } from "@ai-matrx/design-system";
|
|
17980
18009
|
|
|
17981
18010
|
// src/gridAddRow.tsx
|
|
17982
18011
|
import { useCallback as useCallback18, useEffect as useEffect41, useMemo as useMemo27, useRef as useRef29, useState as useState55 } from "react";
|
|
@@ -18002,13 +18031,13 @@ import {
|
|
|
18002
18031
|
useRecordsClient as useRecordsClient30
|
|
18003
18032
|
} from "@ai-matrx/records/react";
|
|
18004
18033
|
import { asWriteConflict as asWriteConflict2, predictWriteRefusals, wholeValueOf as wholeValueOf3 } from "@ai-matrx/records/core";
|
|
18005
|
-
import { Button as Button37, Separator as Separator3, cn as
|
|
18034
|
+
import { Button as Button37, Separator as Separator3, cn as cn35 } from "@ai-matrx/design-system";
|
|
18006
18035
|
import { humanizeIdentifier as humanizeIdentifier6 } from "@ai-matrx/kit/text-case";
|
|
18007
18036
|
|
|
18008
18037
|
// src/StandardRecordForm.tsx
|
|
18009
18038
|
import { useState as useState53 } from "react";
|
|
18010
18039
|
import { useEntityRecord as useEntityRecord2, useRecordsClient as useRecordsClient29 } from "@ai-matrx/records/react";
|
|
18011
|
-
import { Input as Input2, Textarea as Textarea2, cn as
|
|
18040
|
+
import { Input as Input2, Textarea as Textarea2, cn as cn34 } from "@ai-matrx/design-system";
|
|
18012
18041
|
|
|
18013
18042
|
// src/CustomFieldsSection.tsx
|
|
18014
18043
|
import { useEffect as useEffect39, useMemo as useMemo25, useRef as useRef27, useState as useState52 } from "react";
|
|
@@ -18018,7 +18047,7 @@ import {
|
|
|
18018
18047
|
useEntityRecord,
|
|
18019
18048
|
useRecordsClient as useRecordsClient28
|
|
18020
18049
|
} from "@ai-matrx/records/react";
|
|
18021
|
-
import { Button as Button36, Separator as Separator2, cn as
|
|
18050
|
+
import { Button as Button36, Separator as Separator2, cn as cn33 } from "@ai-matrx/design-system";
|
|
18022
18051
|
import { mapPgError } from "@ai-matrx/records/core";
|
|
18023
18052
|
import { jsx as jsx64, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
18024
18053
|
function isEmptyValue(value) {
|
|
@@ -18274,7 +18303,7 @@ function CustomFieldsSection({
|
|
|
18274
18303
|
const values = read.data?.custom ?? {};
|
|
18275
18304
|
const empty = fields.length === 0;
|
|
18276
18305
|
if (empty && !adding) {
|
|
18277
|
-
return /* @__PURE__ */ jsxs58("section", { className:
|
|
18306
|
+
return /* @__PURE__ */ jsxs58("section", { className: cn33("flex min-w-0 flex-col gap-1 text-xs", className), children: [
|
|
18278
18307
|
/* @__PURE__ */ jsxs58("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
18279
18308
|
/* @__PURE__ */ jsx64("h3", { className: "text-sm font-medium", children: title }),
|
|
18280
18309
|
!read.loading ? /* @__PURE__ */ jsx64("span", { className: "text-muted-foreground", children: "None yet" }) : null,
|
|
@@ -18283,7 +18312,7 @@ function CustomFieldsSection({
|
|
|
18283
18312
|
cannotAdd
|
|
18284
18313
|
] });
|
|
18285
18314
|
}
|
|
18286
|
-
return /* @__PURE__ */ jsxs58("section", { className:
|
|
18315
|
+
return /* @__PURE__ */ jsxs58("section", { className: cn33("flex min-w-0 flex-col gap-2 text-xs", className), children: [
|
|
18287
18316
|
/* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-2", children: [
|
|
18288
18317
|
/* @__PURE__ */ jsx64("h3", { className: "text-sm font-medium", children: title }),
|
|
18289
18318
|
!empty ? /* @__PURE__ */ jsx64("span", { className: "text-muted-foreground", children: fields.length }) : null,
|
|
@@ -18498,7 +18527,7 @@ function StandardRecordForm({ token: token2, recordId, columns, onSaved, classNa
|
|
|
18498
18527
|
onSaved?.(recordId);
|
|
18499
18528
|
};
|
|
18500
18529
|
if (read.error) return /* @__PURE__ */ jsx65(RefusalLine, { error: read.error, className });
|
|
18501
|
-
return /* @__PURE__ */ jsxs59("div", { className:
|
|
18530
|
+
return /* @__PURE__ */ jsxs59("div", { className: cn34("flex min-w-0 flex-col gap-2 text-xs", className), "data-records-standard-form": entityToken, children: [
|
|
18502
18531
|
/* @__PURE__ */ jsx65("dl", { className: "grid grid-cols-[minmax(5rem,7rem)_1fr] gap-x-3 gap-y-1", children: columns.map((column) => {
|
|
18503
18532
|
const id = `std-${recordId}-${column.key}`;
|
|
18504
18533
|
const value = stored[column.key];
|
|
@@ -18744,7 +18773,7 @@ function CustomRecordForm({
|
|
|
18744
18773
|
return /* @__PURE__ */ jsxs60(
|
|
18745
18774
|
"form",
|
|
18746
18775
|
{
|
|
18747
|
-
className:
|
|
18776
|
+
className: cn35("flex min-w-0 flex-col gap-3", className),
|
|
18748
18777
|
onSubmit: (e) => {
|
|
18749
18778
|
e.preventDefault();
|
|
18750
18779
|
void save();
|
|
@@ -18834,7 +18863,7 @@ function FieldRow({
|
|
|
18834
18863
|
const id = `field-${field2.id}`;
|
|
18835
18864
|
const storedWords = document2?.[field2.key];
|
|
18836
18865
|
const whole = typeof storedWords === "string" ? wholeValueOf3(document2, field2.key) : null;
|
|
18837
|
-
return /* @__PURE__ */ jsxs60("div", { className:
|
|
18866
|
+
return /* @__PURE__ */ jsxs60("div", { className: cn35("flex min-w-0 flex-col gap-1", whole && "sm:col-span-2"), children: [
|
|
18838
18867
|
/* @__PURE__ */ jsx66(FieldLabel, { field: field2, htmlFor: id, children: /* @__PURE__ */ jsx66(ProvenanceBadge, { document: document2, fieldKey: field2.key }) }),
|
|
18839
18868
|
whole ? (
|
|
18840
18869
|
// A TEXT KEPT AS A FILE opens WHOLE, never as the 1000 characters its cell holds —
|
|
@@ -19719,7 +19748,7 @@ import {
|
|
|
19719
19748
|
Label as Label14,
|
|
19720
19749
|
Skeleton as Skeleton6,
|
|
19721
19750
|
Switch,
|
|
19722
|
-
cn as
|
|
19751
|
+
cn as cn36
|
|
19723
19752
|
} from "@ai-matrx/design-system";
|
|
19724
19753
|
import { formatRelativeTime as formatRelativeTime2 } from "@ai-matrx/kit/format";
|
|
19725
19754
|
import { Fragment as Fragment19, jsx as jsx68, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
@@ -19742,7 +19771,7 @@ function EnrichBadge({ cell: cell2, onPin, className }) {
|
|
|
19742
19771
|
const alternates = cell2.alternates ?? [];
|
|
19743
19772
|
const word = state2 === "yours" ? "yours" : state2 === "unsure" ? "unsure" : "agent";
|
|
19744
19773
|
return /* @__PURE__ */ jsxs62(HoverCard, { children: [
|
|
19745
|
-
/* @__PURE__ */ jsx68(HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ jsxs62("span", { className:
|
|
19774
|
+
/* @__PURE__ */ jsx68(HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ jsxs62("span", { className: cn36("inline-flex items-center gap-1 align-middle", className), children: [
|
|
19746
19775
|
/* @__PURE__ */ jsx68(
|
|
19747
19776
|
Badge8,
|
|
19748
19777
|
{
|
|
@@ -19908,12 +19937,12 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
19908
19937
|
[host, load, tableId]
|
|
19909
19938
|
);
|
|
19910
19939
|
if (error) return /* @__PURE__ */ jsx68(RefusalNotice, { error, className });
|
|
19911
|
-
if (rows === null) return /* @__PURE__ */ jsx68(Skeleton6, { className:
|
|
19940
|
+
if (rows === null) return /* @__PURE__ */ jsx68(Skeleton6, { className: cn36("h-40 w-full", className) });
|
|
19912
19941
|
if (shown5.length === 0 && fieldId) {
|
|
19913
19942
|
const target = (fields.data ?? []).find((f) => f.id === fieldId);
|
|
19914
19943
|
const setup = draft[fieldId] ?? { instruction: "", every: "30" };
|
|
19915
19944
|
if (!rights.admin) {
|
|
19916
|
-
return /* @__PURE__ */ jsxs62("div", { className:
|
|
19945
|
+
return /* @__PURE__ */ jsxs62("div", { className: cn36("space-y-2 p-4 text-sm", className), children: [
|
|
19917
19946
|
/* @__PURE__ */ jsxs62("p", { className: "font-medium", children: [
|
|
19918
19947
|
"Nothing fills ",
|
|
19919
19948
|
target?.name ?? "this column",
|
|
@@ -19922,7 +19951,7 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
19922
19951
|
/* @__PURE__ */ jsx68("p", { className: "text-muted-foreground", children: "An admin on this table sets that up." })
|
|
19923
19952
|
] });
|
|
19924
19953
|
}
|
|
19925
|
-
return /* @__PURE__ */ jsxs62("div", { className:
|
|
19954
|
+
return /* @__PURE__ */ jsxs62("div", { className: cn36("space-y-3 p-4 text-sm", className), children: [
|
|
19926
19955
|
/* @__PURE__ */ jsxs62("p", { className: "font-medium", children: [
|
|
19927
19956
|
"Let a model keep ",
|
|
19928
19957
|
target?.name ?? "this column",
|
|
@@ -19973,12 +20002,12 @@ function EnrichPanel({ tableId, fieldId, className }) {
|
|
|
19973
20002
|
] });
|
|
19974
20003
|
}
|
|
19975
20004
|
if (shown5.length === 0) {
|
|
19976
|
-
return /* @__PURE__ */ jsxs62("div", { className:
|
|
20005
|
+
return /* @__PURE__ */ jsxs62("div", { className: cn36("space-y-2 p-4 text-sm", className), children: [
|
|
19977
20006
|
/* @__PURE__ */ jsx68("p", { className: "font-medium", children: "No column here is filled in by a model." }),
|
|
19978
20007
|
/* @__PURE__ */ jsx68("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." })
|
|
19979
20008
|
] });
|
|
19980
20009
|
}
|
|
19981
|
-
return /* @__PURE__ */ jsx68("div", { className:
|
|
20010
|
+
return /* @__PURE__ */ jsx68("div", { className: cn36("space-y-6 p-4", className), children: shown5.map((row) => {
|
|
19982
20011
|
const d = draft[row.field_id] ?? {
|
|
19983
20012
|
instruction: row.enrichment?.instruction ?? "",
|
|
19984
20013
|
every: row.review_interval_days ? String(row.review_interval_days) : ""
|
|
@@ -20359,6 +20388,8 @@ function columnForField(field2, editing, mayWriteRow, whyNotRow, look, onAskWhoC
|
|
|
20359
20388
|
] }) : name
|
|
20360
20389
|
),
|
|
20361
20390
|
label: name,
|
|
20391
|
+
// The field's own description, one hover away on every header (not only the type mark's glyph).
|
|
20392
|
+
...fieldHelpText(field2) ? { helpText: fieldHelpText(field2) } : {},
|
|
20362
20393
|
accessorFn: (row) => row.document?.[field2.key],
|
|
20363
20394
|
// A column the store keeps no value for is not offered a sort it would refuse (`sortRefusal`).
|
|
20364
20395
|
sortable: sortRefusal(field2) === null,
|
|
@@ -20517,7 +20548,7 @@ import {
|
|
|
20517
20548
|
|
|
20518
20549
|
// src/ReverseColumns.tsx
|
|
20519
20550
|
import { useFields as useFields9, useOptionalRecordsClient as useOptionalRecordsClient12, useReverseColumns as useReverseColumns3, useReverseLinks, useTable as useTable7 } from "@ai-matrx/records/react";
|
|
20520
|
-
import { Button as Button41, Dialog as Dialog14, DialogContent as DialogContent14, DialogHeader as DialogHeader14, DialogTitle as DialogTitle14, Popover as Popover9, PopoverContent as PopoverContent9, PopoverTrigger as PopoverTrigger9, Separator as Separator4, Skeleton as Skeleton7, cn as
|
|
20551
|
+
import { Button as Button41, Dialog as Dialog14, DialogContent as DialogContent14, DialogHeader as DialogHeader14, DialogTitle as DialogTitle14, Popover as Popover9, PopoverContent as PopoverContent9, PopoverTrigger as PopoverTrigger9, Separator as Separator4, Skeleton as Skeleton7, cn as cn37 } from "@ai-matrx/design-system";
|
|
20521
20552
|
import { Fragment as Fragment20, jsx as jsx70, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
20522
20553
|
function reverseColumnId(column) {
|
|
20523
20554
|
return `${REVERSE_COLUMN_PREFIX}${column.key}`;
|
|
@@ -20554,7 +20585,7 @@ function ReverseLinkChips({
|
|
|
20554
20585
|
}
|
|
20555
20586
|
);
|
|
20556
20587
|
}
|
|
20557
|
-
return /* @__PURE__ */ jsxs64("span", { className:
|
|
20588
|
+
return /* @__PURE__ */ jsxs64("span", { className: cn37("flex min-w-0 flex-wrap items-center gap-1", className), "data-records-reverse-cell": column.key, children: [
|
|
20558
20589
|
refs.map((r) => /* @__PURE__ */ jsx70(ReferenceChip, { reference: r }, r.id)),
|
|
20559
20590
|
more > 0 ? /* @__PURE__ */ jsxs64("span", { className: "shrink-0 text-[11px] text-muted-foreground", title: `${more} more`, "data-records-reverse-more": "", children: [
|
|
20560
20591
|
"+",
|
|
@@ -21151,7 +21182,7 @@ import {
|
|
|
21151
21182
|
DropdownMenu as DropdownMenu4,
|
|
21152
21183
|
DropdownMenuContent as DropdownMenuContent4,
|
|
21153
21184
|
DropdownMenuTrigger as DropdownMenuTrigger4,
|
|
21154
|
-
cn as
|
|
21185
|
+
cn as cn38
|
|
21155
21186
|
} from "@ai-matrx/design-system";
|
|
21156
21187
|
|
|
21157
21188
|
// src/ObjectActionMenuItems.tsx
|
|
@@ -21405,7 +21436,7 @@ function RecordActionMenu({ tableId, row, name, onOpenRecord, onChanged, childre
|
|
|
21405
21436
|
[row.id, tableId, name, rights, actionHost]
|
|
21406
21437
|
);
|
|
21407
21438
|
return /* @__PURE__ */ jsxs68(ContextMenu, { children: [
|
|
21408
|
-
/* @__PURE__ */ jsx75(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs68("div", { className:
|
|
21439
|
+
/* @__PURE__ */ jsx75(ContextMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs68("div", { className: cn38("group/record-card relative", className), "data-record-actions": row.id, children: [
|
|
21409
21440
|
children,
|
|
21410
21441
|
/* @__PURE__ */ jsxs68(DropdownMenu4, { children: [
|
|
21411
21442
|
/* @__PURE__ */ jsx75(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsx75(
|
|
@@ -21547,15 +21578,15 @@ import {
|
|
|
21547
21578
|
SelectTrigger as SelectTrigger9,
|
|
21548
21579
|
SelectValue as SelectValue9,
|
|
21549
21580
|
Separator as Separator6,
|
|
21550
|
-
cn as
|
|
21581
|
+
cn as cn39
|
|
21551
21582
|
} from "@ai-matrx/design-system";
|
|
21552
21583
|
import { relationNameIndexOf, relationNameKey as relationNameKey2, relationNamesIn, splitListCell } from "@ai-matrx/records";
|
|
21553
21584
|
|
|
21554
21585
|
// src/importRuleCheck.ts
|
|
21555
21586
|
import { predictValueRefusals as predictValueRefusals2 } from "@ai-matrx/records/core";
|
|
21556
|
-
function
|
|
21587
|
+
function refusedCellsOf(fields, rows, mapping, choiceOptions, relationNames) {
|
|
21557
21588
|
const byKey = new Map(fields.map((f) => [f.key, f]));
|
|
21558
|
-
const
|
|
21589
|
+
const cells = [];
|
|
21559
21590
|
for (const [header, key] of Object.entries(mapping)) {
|
|
21560
21591
|
const field2 = byKey.get(key);
|
|
21561
21592
|
if (!field2) continue;
|
|
@@ -21565,9 +21596,8 @@ function checkImportRules(fields, rows, mapping, choiceOptions, relationNames) {
|
|
|
21565
21596
|
if (isChoice && !options) continue;
|
|
21566
21597
|
const named = relationNames?.get(key);
|
|
21567
21598
|
if (kind2 === "relation" && !named) continue;
|
|
21568
|
-
let refused = 0;
|
|
21569
21599
|
let judged = 0;
|
|
21570
|
-
|
|
21600
|
+
const mine = [];
|
|
21571
21601
|
rows.forEach((row, i) => {
|
|
21572
21602
|
const raw = String(row[header] ?? "").trim();
|
|
21573
21603
|
if (raw === "") return;
|
|
@@ -21583,17 +21613,20 @@ function checkImportRules(fields, rows, mapping, choiceOptions, relationNames) {
|
|
|
21583
21613
|
);
|
|
21584
21614
|
if (predicted.length > 0) why = predicted[0].message;
|
|
21585
21615
|
}
|
|
21586
|
-
if (why !== null) {
|
|
21587
|
-
refused += 1;
|
|
21588
|
-
if (!first) first = { why, line: i + 1, raw };
|
|
21589
|
-
}
|
|
21616
|
+
if (why !== null) mine.push({ header, line: i + 1, raw, why });
|
|
21590
21617
|
});
|
|
21591
|
-
|
|
21592
|
-
|
|
21593
|
-
|
|
21594
|
-
|
|
21618
|
+
for (const c of mine) cells.push({ ...c, judged, field: field2 });
|
|
21619
|
+
}
|
|
21620
|
+
return cells;
|
|
21621
|
+
}
|
|
21622
|
+
function checkImportRules(fields, rows, mapping, choiceOptions, relationNames) {
|
|
21623
|
+
const verdicts = /* @__PURE__ */ new Map();
|
|
21624
|
+
for (const c of refusedCellsOf(fields, rows, mapping, choiceOptions, relationNames)) {
|
|
21625
|
+
const have = verdicts.get(c.header);
|
|
21626
|
+
if (have) have.refused += 1;
|
|
21627
|
+
else verdicts.set(c.header, { header: c.header, field: c.field, refused: 1, judged: c.judged, firstWhy: c.why, firstLine: c.line, firstRaw: c.raw });
|
|
21595
21628
|
}
|
|
21596
|
-
return verdicts;
|
|
21629
|
+
return [...verdicts.values()];
|
|
21597
21630
|
}
|
|
21598
21631
|
|
|
21599
21632
|
// src/ImportWizard.tsx
|
|
@@ -22005,7 +22038,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
22005
22038
|
},
|
|
22006
22039
|
[client, openRun]
|
|
22007
22040
|
);
|
|
22008
|
-
const declared2 = fields.data ?? [];
|
|
22041
|
+
const declared2 = useMemo32(() => fields.data ?? [], [fields.data]);
|
|
22009
22042
|
const titleKey = table.data?.title_field ?? null;
|
|
22010
22043
|
const titleHeader = titleFrom ?? (titleKey ? Object.entries(mapping).find(([h, key]) => key === titleKey && h !== TITLE_COPY)?.[0] ?? null : null);
|
|
22011
22044
|
const distinctRows = useMemo32(() => {
|
|
@@ -22299,6 +22332,12 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
22299
22332
|
() => exactDuplicateRows(effectiveRows, (plan?.columns ?? []).map((c) => c.header).filter((h) => !leftOut.has(h))),
|
|
22300
22333
|
[effectiveRows, plan, leftOut]
|
|
22301
22334
|
);
|
|
22335
|
+
const [goAheadAnyway, setGoAheadAnyway] = useState62(false);
|
|
22336
|
+
const refusedCells = useMemo32(
|
|
22337
|
+
() => goAheadAnyway ? refusedCellsOf(declared2, effectiveRows, mapping, choiceIndex, relationIndex) : [],
|
|
22338
|
+
[goAheadAnyway, declared2, effectiveRows, mapping, choiceIndex, relationIndex]
|
|
22339
|
+
);
|
|
22340
|
+
const [keptAside, setKeptAside] = useState62([]);
|
|
22302
22341
|
const rowsToSend = useCallback22(
|
|
22303
22342
|
(index) => {
|
|
22304
22343
|
const repeated = new Set(skipRepeats ? repeats.map((r) => r.row) : []);
|
|
@@ -22308,6 +22347,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
22308
22347
|
if (repeated.has(at)) return;
|
|
22309
22348
|
const out = {};
|
|
22310
22349
|
for (const [header, value] of Object.entries(row)) if (!leftOut.has(header)) out[header] = value;
|
|
22350
|
+
for (const c of refusedCells) if (c.line === at + 1 && c.header in out) out[c.header] = "";
|
|
22311
22351
|
if (titleFrom) out[TITLE_COPY] = String(row[titleFrom] ?? "").trim();
|
|
22312
22352
|
for (const { header, field: field2 } of mappedRelations) {
|
|
22313
22353
|
const named = index.get(field2.key);
|
|
@@ -22337,7 +22377,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
22337
22377
|
return { rows: sent, lines };
|
|
22338
22378
|
},
|
|
22339
22379
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- choiceFor reads unlinkedChoice
|
|
22340
|
-
[effectiveRows, combined, titleFrom, leftOut, mappedRelations, unlinkedChoice, dateAsks, dateMiss, repeats, skipRepeats]
|
|
22380
|
+
[effectiveRows, combined, titleFrom, leftOut, mappedRelations, unlinkedChoice, dateAsks, dateMiss, repeats, skipRepeats, refusedCells]
|
|
22341
22381
|
);
|
|
22342
22382
|
const run = useCallback22(async () => {
|
|
22343
22383
|
if (!plan) return;
|
|
@@ -22405,6 +22445,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
22405
22445
|
index = reread;
|
|
22406
22446
|
}
|
|
22407
22447
|
const { rows: sendRows, lines: sendLines } = rowsToSend(index);
|
|
22448
|
+
setKeptAside(refusedCells.map(({ header, line, raw, why }) => ({ header, line, raw, why })));
|
|
22408
22449
|
setSentLines(sendLines);
|
|
22409
22450
|
setRepeatsSkipped(effectiveRows.length - sendRows.length);
|
|
22410
22451
|
let sendMapping = mapping;
|
|
@@ -22538,7 +22579,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
22538
22579
|
setPhase("done");
|
|
22539
22580
|
onWrote?.(finished.data.rows_written);
|
|
22540
22581
|
void loadRuns();
|
|
22541
|
-
}, [newColumns, makesColumns, kindChoice, guessedKind, addChoiceWords, client, dedupeKey, effectiveRows, fileBytes, fileHash, fileName, format, leftOut, loadRuns, mappedRelations, mapping, newChoiceWords, nudge, onDuplicate, onWrote, plan, readRelationNames, relationAsks, relationIndex, rights.admin, rowsToSend, tableId, unmapped, unlinkedChoice]);
|
|
22582
|
+
}, [newColumns, makesColumns, kindChoice, guessedKind, addChoiceWords, client, dedupeKey, effectiveRows, fileBytes, fileHash, fileName, format, leftOut, loadRuns, mappedRelations, mapping, newChoiceWords, nudge, onDuplicate, onWrote, plan, readRelationNames, refusedCells, relationAsks, relationIndex, rights.admin, rowsToSend, tableId, unmapped, unlinkedChoice]);
|
|
22542
22583
|
const counts = useMemo32(() => {
|
|
22543
22584
|
let landed = 0;
|
|
22544
22585
|
let duplicate = 0;
|
|
@@ -22567,8 +22608,8 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
22567
22608
|
);
|
|
22568
22609
|
const ruleVerdictOf = useMemo32(() => new Map(ruleVerdicts.map((v) => [v.header, v])), [ruleVerdicts]);
|
|
22569
22610
|
const refusedByRules = ruleVerdicts.reduce((n, v) => n + v.refused, 0);
|
|
22570
|
-
const
|
|
22571
|
-
useEffect46(() => setGoAheadAnyway(false), [
|
|
22611
|
+
const verdictKey = ruleVerdicts.map((v) => `${v.header}:${v.refused}/${v.judged}`).join("|");
|
|
22612
|
+
useEffect46(() => setGoAheadAnyway(false), [verdictKey]);
|
|
22572
22613
|
const [autoRan, setAutoRan] = useState62(false);
|
|
22573
22614
|
useEffect46(() => {
|
|
22574
22615
|
if (!autoRun || autoRan || !source || phase !== "ready" || !plan) return;
|
|
@@ -22577,7 +22618,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
22577
22618
|
void run();
|
|
22578
22619
|
}, [autoRun, autoRan, source, phase, plan, busy, rights.write, rows.length, titleMissing, ruleVerdicts, run]);
|
|
22579
22620
|
const afterWrite = !busy && (phase === "done" || alreadyRan !== null || ledger !== null && ledger.seen > 0);
|
|
22580
|
-
return /* @__PURE__ */ jsxs70("div", { className:
|
|
22621
|
+
return /* @__PURE__ */ jsxs70("div", { className: cn39("flex min-w-0 flex-col gap-2 text-xs", className), children: [
|
|
22581
22622
|
/* @__PURE__ */ jsxs70("div", { className: "flex items-center gap-2", children: [
|
|
22582
22623
|
/* @__PURE__ */ jsx77("span", { className: "font-medium", children: "Import" }),
|
|
22583
22624
|
/* @__PURE__ */ jsx77("span", { className: "text-muted-foreground", children: table.data?.name }),
|
|
@@ -22937,7 +22978,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
22937
22978
|
"div",
|
|
22938
22979
|
{
|
|
22939
22980
|
"data-import-relation": ask2.field.key,
|
|
22940
|
-
className:
|
|
22981
|
+
className: cn39(
|
|
22941
22982
|
"flex flex-col gap-1 rounded border px-2 py-1.5",
|
|
22942
22983
|
clean ? "bg-muted/40" : "border-amber-500/40 bg-amber-500/5"
|
|
22943
22984
|
),
|
|
@@ -23091,7 +23132,7 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
23091
23132
|
children: phase === "linking" ? "Linking the names\u2026" : phase === "declaring" ? "Adding the columns\u2026" : phase === "writing" ? `Writing\u2026 ${progress} of ${effectiveRows.length}` : combining ? `Import ${effectiveRows.length} records from ${rows.length} rows` : `Import ${rows.length} row${rows.length === 1 ? "" : "s"}`
|
|
23092
23133
|
}
|
|
23093
23134
|
),
|
|
23094
|
-
/* @__PURE__ */ jsxs70("span", { className:
|
|
23135
|
+
/* @__PURE__ */ jsxs70("span", { className: cn39("text-muted-foreground", titleMissing && "text-destructive"), children: [
|
|
23095
23136
|
titleMissing ? `Nothing goes into ${titleFieldLabel} yet, so these records would have no name. Choose the column above, then this will run.` : columnsSentence(mappedCount, plan.columns.length - leftOut.size, unmapped) + (leftOut.size > 0 ? ` \xB7 ${leftOut.size} left out` : ""),
|
|
23096
23137
|
fileHash || titleMissing ? "" : " \xB7 this browser cannot recognise the file again, so importing it twice would write it twice"
|
|
23097
23138
|
] })
|
|
@@ -23117,9 +23158,9 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
23117
23158
|
/* @__PURE__ */ jsx77("span", { children: ledger ? `${ledger.written} landed \xB7 ${ledger.duplicate} already here \xB7 ${ledger.refused} refused, of ${ledger.seen} row${ledger.seen === 1 ? "" : "s"} offered` : `${counts.landed} landed \xB7 ${counts.duplicate} already here \xB7 ${counts.refused} refused` }),
|
|
23118
23159
|
ledger && !ledger.final && phase !== "writing" ? /* @__PURE__ */ jsx77("span", { className: "text-destructive", children: "The run stopped here, so the rest of the file was never offered \u2014 these are the rows that were dealt with before it stopped, not the whole file." }) : null,
|
|
23119
23160
|
(ledger ? ledger.refused + ledger.duplicate : counts.refused + counts.duplicate) > 0 ? /* @__PURE__ */ jsxs70(Fragment24, { children: [
|
|
23120
|
-
/* @__PURE__ */ jsx77("button", { type: "button", className:
|
|
23121
|
-
/* @__PURE__ */ jsx77("button", { type: "button", className:
|
|
23122
|
-
/* @__PURE__ */ jsx77("button", { type: "button", className:
|
|
23161
|
+
/* @__PURE__ */ jsx77("button", { type: "button", className: cn39("underline underline-offset-2", show === "all" && "font-medium"), onClick: () => setShow("all"), children: "everything that did not land" }),
|
|
23162
|
+
/* @__PURE__ */ jsx77("button", { type: "button", className: cn39("underline underline-offset-2", show === "refused" && "font-medium"), onClick: () => setShow("refused"), children: "refused" }),
|
|
23163
|
+
/* @__PURE__ */ jsx77("button", { type: "button", className: cn39("underline underline-offset-2", show === "duplicate" && "font-medium"), onClick: () => setShow("duplicate"), children: "already here" })
|
|
23123
23164
|
] }) : null
|
|
23124
23165
|
] }),
|
|
23125
23166
|
summary ? /* @__PURE__ */ jsx77("p", { className: "text-muted-foreground", children: summary }) : null,
|
|
@@ -23158,6 +23199,23 @@ function ImportWizard({ tableId, source, onDone, onWrote, autoRun, className })
|
|
|
23158
23199
|
] })
|
|
23159
23200
|
}
|
|
23160
23201
|
) }) : null,
|
|
23202
|
+
afterWrite && keptAside.length > 0 ? /* @__PURE__ */ jsxs70("div", { "data-import-kept-aside": "", className: "flex flex-col gap-0.5", children: [
|
|
23203
|
+
/* @__PURE__ */ jsxs70("p", { children: [
|
|
23204
|
+
keptAside.length,
|
|
23205
|
+
" cell",
|
|
23206
|
+
keptAside.length === 1 ? " was" : "s were",
|
|
23207
|
+
" kept aside and left empty; every other value in those rows was written."
|
|
23208
|
+
] }),
|
|
23209
|
+
/* @__PURE__ */ jsx77("ul", { className: "flex flex-col gap-0.5 text-muted-foreground", children: keptAside.map((c) => /* @__PURE__ */ jsxs70("li", { children: [
|
|
23210
|
+
c.header,
|
|
23211
|
+
", ",
|
|
23212
|
+
source ? `row ${c.line}` : `line ${lineInYourFile(c.line)}`,
|
|
23213
|
+
": ",
|
|
23214
|
+
c.raw,
|
|
23215
|
+
" \u2014 ",
|
|
23216
|
+
c.why
|
|
23217
|
+
] }, `${c.header}:${c.line}`)) })
|
|
23218
|
+
] }) : null,
|
|
23161
23219
|
repeatsSkipped > 0 ? /* @__PURE__ */ jsxs70("p", { className: "text-muted-foreground", "data-import-repeats-skipped": "", children: [
|
|
23162
23220
|
repeatsSkipped,
|
|
23163
23221
|
" repeated row",
|
|
@@ -25201,7 +25259,7 @@ function BulkActions({
|
|
|
25201
25259
|
import { useEffect as useEffect53, useMemo as useMemo38, useRef as useRef36, useState as useState69 } from "react";
|
|
25202
25260
|
import { useRecordsClient as useRecordsClient41 } from "@ai-matrx/records/react";
|
|
25203
25261
|
import { stableFilterKey as stableFilterKey2 } from "@ai-matrx/records";
|
|
25204
|
-
import { Button as Button48, ConfirmDialog as ConfirmDialog4, Popover as Popover11, PopoverContent as PopoverContent11, PopoverTrigger as PopoverTrigger11, cn as
|
|
25262
|
+
import { Button as Button48, ConfirmDialog as ConfirmDialog4, Popover as Popover11, PopoverContent as PopoverContent11, PopoverTrigger as PopoverTrigger11, cn as cn40 } from "@ai-matrx/design-system";
|
|
25205
25263
|
|
|
25206
25264
|
// src/views.ts
|
|
25207
25265
|
import {
|
|
@@ -25446,7 +25504,7 @@ function HandOrderDialog({
|
|
|
25446
25504
|
setDragging(index);
|
|
25447
25505
|
},
|
|
25448
25506
|
onDragEnd: () => setDragging(null),
|
|
25449
|
-
className:
|
|
25507
|
+
className: cn40(
|
|
25450
25508
|
"flex items-center gap-2 border-b border-border px-2 py-1 text-sm last:border-b-0",
|
|
25451
25509
|
dragging === index && "bg-muted"
|
|
25452
25510
|
),
|
|
@@ -27451,7 +27509,7 @@ function GridBody({
|
|
|
27451
27509
|
return /* @__PURE__ */ jsx88(WhoChangedSource, { tableId, labelOf: labelOfField, children: /* @__PURE__ */ jsxs77(
|
|
27452
27510
|
"div",
|
|
27453
27511
|
{
|
|
27454
|
-
className:
|
|
27512
|
+
className: cn41("relative flex min-h-0 flex-col gap-2", fills && "flex-1", className),
|
|
27455
27513
|
"data-records-grid-footer": footer ?? "natural",
|
|
27456
27514
|
...merged ? {
|
|
27457
27515
|
// THE SUMMARY MEASURES ARE ASKED WHEN A PERSON REACHES FOR THE GRID — a header menu, a
|
|
@@ -27645,7 +27703,7 @@ function GridBody({
|
|
|
27645
27703
|
...valueFacets ? { facets: valueFacets, filterUi: VALUE_FILTER_UI } : {},
|
|
27646
27704
|
...classicInCard || embeddedMore ? { hidePagination: true } : {},
|
|
27647
27705
|
...embedded ? { appearance: "embedded" } : {},
|
|
27648
|
-
tableClassName:
|
|
27706
|
+
tableClassName: cn41(
|
|
27649
27707
|
!look.wrap && lines === 1 && "[&_tbody_td]:max-w-[28rem] [&_tbody_td]:overflow-hidden [&_tbody_td]:text-ellipsis [&_tbody_td]:whitespace-nowrap! [&_tbody_td_*]:whitespace-nowrap!",
|
|
27650
27708
|
embedded && EMBEDDED_TABLE_CLASS,
|
|
27651
27709
|
embedded && !calculationChosen && EMBEDDED_PLAIN_FOOTER_CLASS
|
|
@@ -28250,7 +28308,7 @@ function cutWords(written) {
|
|
|
28250
28308
|
|
|
28251
28309
|
// src/ExportMenu.tsx
|
|
28252
28310
|
import { AlchemyMenu } from "@ai-matrx/alchemy/react";
|
|
28253
|
-
import { Button as Button51, cn as
|
|
28311
|
+
import { Button as Button51, cn as cn42 } from "@ai-matrx/design-system";
|
|
28254
28312
|
import { jsx as jsx91, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
28255
28313
|
function toRows(fields, records, labels) {
|
|
28256
28314
|
return records.map((record) => {
|
|
@@ -28331,7 +28389,7 @@ function ExportMenu({ tableId, rows, label, className, view }) {
|
|
|
28331
28389
|
if (!rows && !view && page.error) return /* @__PURE__ */ jsx91(RefusalLine, { error: page.error, className });
|
|
28332
28390
|
if (!rows && viewHeld && "error" in viewHeld) return /* @__PURE__ */ jsx91(RefusalLine, { error: viewHeld.error, className });
|
|
28333
28391
|
if (!fields.data || !rows && (view ? !viewHeld : !page.data)) {
|
|
28334
|
-
return /* @__PURE__ */ jsx91("span", { className:
|
|
28392
|
+
return /* @__PURE__ */ jsx91("span", { className: cn42("text-xs text-muted-foreground", className), children: "Reading this table\u2026" });
|
|
28335
28393
|
}
|
|
28336
28394
|
const exported = () => rowsForFile({ client, host, fields: columns, records, labels });
|
|
28337
28395
|
const tableName2 = table.data?.name ?? name;
|
|
@@ -28342,7 +28400,7 @@ function ExportMenu({ tableId, rows, label, className, view }) {
|
|
|
28342
28400
|
{ id: "copy-json", label: "Copy JSON", word: "JSON", suffix: "", copy: true, write: exportJson },
|
|
28343
28401
|
{ id: "copy-full-schema", label: "Copy full schema", word: "full schema", suffix: "", copy: true, write: (c, r) => exportFullSchema({ name: tableName2, settings }, c, r) }
|
|
28344
28402
|
];
|
|
28345
|
-
return /* @__PURE__ */ jsxs79("div", { className:
|
|
28403
|
+
return /* @__PURE__ */ jsxs79("div", { className: cn42("flex items-center gap-1", className), children: [
|
|
28346
28404
|
/* @__PURE__ */ jsx91(
|
|
28347
28405
|
Button51,
|
|
28348
28406
|
{
|
|
@@ -28445,7 +28503,7 @@ function ExportMenu({ tableId, rows, label, className, view }) {
|
|
|
28445
28503
|
// src/ImportNotice.tsx
|
|
28446
28504
|
import { useCallback as useCallback29, useEffect as useEffect57, useMemo as useMemo41, useState as useState73 } from "react";
|
|
28447
28505
|
import { useRecordsClient as useRecordsClient46 } from "@ai-matrx/records/react";
|
|
28448
|
-
import { Button as Button52, cn as
|
|
28506
|
+
import { Button as Button52, cn as cn43 } from "@ai-matrx/design-system";
|
|
28449
28507
|
import { jsx as jsx92, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
28450
28508
|
var DISMISSED_KEY = (importId) => `records-ui.import-notice.dismissed.${importId}`;
|
|
28451
28509
|
function wasDismissed(importId) {
|
|
@@ -28508,7 +28566,7 @@ function ImportNotice({ tableId, onOpenImport, epoch = 0, className }) {
|
|
|
28508
28566
|
if (problem) return /* @__PURE__ */ jsx92(RefusalNotice, { error: problem, className });
|
|
28509
28567
|
if (!shown5) return null;
|
|
28510
28568
|
const reasons = report && report.import_id === shown5.import_id ? groupReasons(report.rows.map((r) => String(r.reason ?? ""))) : [];
|
|
28511
|
-
return /* @__PURE__ */ jsx92("div", { className:
|
|
28569
|
+
return /* @__PURE__ */ jsx92("div", { className: cn43("shrink-0", className), "data-import-notice": shown5.import_id, children: /* @__PURE__ */ jsx92(
|
|
28512
28570
|
RefusalNotice,
|
|
28513
28571
|
{
|
|
28514
28572
|
error: (0, refusals_exports.refusal)(
|
|
@@ -28559,7 +28617,7 @@ import {
|
|
|
28559
28617
|
SelectItem as SelectItem11,
|
|
28560
28618
|
SelectTrigger as SelectTrigger11,
|
|
28561
28619
|
SelectValue as SelectValue11,
|
|
28562
|
-
cn as
|
|
28620
|
+
cn as cn49
|
|
28563
28621
|
} from "@ai-matrx/design-system";
|
|
28564
28622
|
|
|
28565
28623
|
// src/unfinishedTable.ts
|
|
@@ -28602,7 +28660,7 @@ import { useEffect as useEffect62, useState as useState79 } from "react";
|
|
|
28602
28660
|
import { useRecordsClient as useRecordsClient52, useTables as useTables2 } from "@ai-matrx/records/react";
|
|
28603
28661
|
import { withTableFacts } from "@ai-matrx/records/core";
|
|
28604
28662
|
import { withTablePlacement as withTablePlacement2 } from "@ai-matrx/records";
|
|
28605
|
-
import { Button as Button59, Skeleton as Skeleton10, cn as
|
|
28663
|
+
import { Button as Button59, Skeleton as Skeleton10, cn as cn48 } from "@ai-matrx/design-system";
|
|
28606
28664
|
|
|
28607
28665
|
// src/NewTableStart.tsx
|
|
28608
28666
|
import { useCallback as useCallback30, useMemo as useMemo42, useRef as useRef38, useState as useState74 } from "react";
|
|
@@ -28618,7 +28676,7 @@ import {
|
|
|
28618
28676
|
SelectValue as SelectValue10,
|
|
28619
28677
|
Switch as Switch2,
|
|
28620
28678
|
Textarea as Textarea3,
|
|
28621
|
-
cn as
|
|
28679
|
+
cn as cn44
|
|
28622
28680
|
} from "@ai-matrx/design-system";
|
|
28623
28681
|
import { Tile } from "@ai-matrx/design-system/controls";
|
|
28624
28682
|
|
|
@@ -29218,7 +29276,7 @@ function NewTableStart({
|
|
|
29218
29276
|
return /* @__PURE__ */ jsxs81(
|
|
29219
29277
|
"div",
|
|
29220
29278
|
{
|
|
29221
|
-
className:
|
|
29279
|
+
className: cn44("relative flex h-full min-h-0 flex-col", className),
|
|
29222
29280
|
"data-new-table-start": step2.at,
|
|
29223
29281
|
onDragOver: (e) => {
|
|
29224
29282
|
if (step2.at === "wizard" || !e.dataTransfer?.types?.includes("Files")) return;
|
|
@@ -29307,7 +29365,7 @@ import { copyText as copyText5 } from "@ai-matrx/kit/clipboard";
|
|
|
29307
29365
|
import { useCallback as useCallback33, useEffect as useEffect60, useMemo as useMemo44, useState as useState77 } from "react";
|
|
29308
29366
|
import { useRecordsClient as useRecordsClient50, useMyLevels as useMyLevels2 } from "@ai-matrx/records/react";
|
|
29309
29367
|
import { bookingPath as bookingPath2 } from "@ai-matrx/records";
|
|
29310
|
-
import { Badge as Badge11, Button as Button57, Skeleton as Skeleton9, cn as
|
|
29368
|
+
import { Badge as Badge11, Button as Button57, Skeleton as Skeleton9, cn as cn47 } from "@ai-matrx/design-system";
|
|
29311
29369
|
|
|
29312
29370
|
// src/BookingBuilder.tsx
|
|
29313
29371
|
import { copyText as copyText4 } from "@ai-matrx/kit/clipboard";
|
|
@@ -29318,7 +29376,7 @@ import { formatDurationMinutes } from "@ai-matrx/kit/format";
|
|
|
29318
29376
|
import {
|
|
29319
29377
|
bookingPath
|
|
29320
29378
|
} from "@ai-matrx/records";
|
|
29321
|
-
import { BasicInput as BasicInput17, BasicTextarea as BasicTextarea7, Button as Button54, Checkbox as Checkbox10, Label as Label18, Skeleton as Skeleton8, cn as
|
|
29379
|
+
import { BasicInput as BasicInput17, BasicTextarea as BasicTextarea7, Button as Button54, Checkbox as Checkbox10, Label as Label18, Skeleton as Skeleton8, cn as cn45 } from "@ai-matrx/design-system";
|
|
29322
29380
|
import { Select as Select11 } from "@ai-matrx/design-system/controls";
|
|
29323
29381
|
|
|
29324
29382
|
// src/publicQuestions.ts
|
|
@@ -29595,9 +29653,9 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
|
|
|
29595
29653
|
await load();
|
|
29596
29654
|
onSaved?.({ form_id: formId });
|
|
29597
29655
|
}
|
|
29598
|
-
if (!loaded || fields.loading && !fields.data) return /* @__PURE__ */ jsx95(Skeleton8, { className:
|
|
29656
|
+
if (!loaded || fields.loading && !fields.data) return /* @__PURE__ */ jsx95(Skeleton8, { className: cn45("h-64 w-full", className) });
|
|
29599
29657
|
if (!rights.structure) {
|
|
29600
|
-
return /* @__PURE__ */ jsx95("p", { className:
|
|
29658
|
+
return /* @__PURE__ */ jsx95("p", { className: cn45("text-xs text-muted-foreground", className), children: rights.why("structure") ?? "Making a booking page needs the admin level on this table, because it lets people with no account take time in your calendar." });
|
|
29601
29659
|
}
|
|
29602
29660
|
const url = formId ? `${publicOrigin}${bookingPath(formId)}` : null;
|
|
29603
29661
|
const shown5 = offer ?? null;
|
|
@@ -29605,7 +29663,7 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
|
|
|
29605
29663
|
// THE RAIL IS 384px WIDE AND THE VIEWPORT IS NOT (walk 1, 2026-09-21):
|
|
29606
29664
|
// every split below is a CONTAINER query, so this screen is the same
|
|
29607
29665
|
// screen in a rail, a dialog and a full page.
|
|
29608
|
-
/* @__PURE__ */ jsxs83("section", { className:
|
|
29666
|
+
/* @__PURE__ */ jsxs83("section", { className: cn45("@container flex flex-col gap-3", className), children: [
|
|
29609
29667
|
/* @__PURE__ */ jsxs83("header", { className: "flex items-center gap-2", children: [
|
|
29610
29668
|
/* @__PURE__ */ jsx95("h3", { className: "text-sm font-medium", children: existing ? "Booking page" : "New booking page" }),
|
|
29611
29669
|
/* @__PURE__ */ jsx95("div", { className: "flex-1" }),
|
|
@@ -29821,7 +29879,7 @@ function asksWhoTheyAre(askable) {
|
|
|
29821
29879
|
}
|
|
29822
29880
|
|
|
29823
29881
|
// src/BuildOrAsk.tsx
|
|
29824
|
-
import { Button as Button55, cn as
|
|
29882
|
+
import { Button as Button55, cn as cn46 } from "@ai-matrx/design-system";
|
|
29825
29883
|
import { jsx as jsx96, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
29826
29884
|
var NO_AGENT_PORT = "Asking for one in words needs an agent, which this screen reaches through its host's `onAskForOne` port \u2014 it is not bound here, so build it below instead.";
|
|
29827
29885
|
function BuildOrAsk({
|
|
@@ -29839,7 +29897,7 @@ function BuildOrAsk({
|
|
|
29839
29897
|
className
|
|
29840
29898
|
}) {
|
|
29841
29899
|
const mayAsk = mayBuild && Boolean(onAsk);
|
|
29842
|
-
return /* @__PURE__ */ jsxs84("div", { className:
|
|
29900
|
+
return /* @__PURE__ */ jsxs84("div", { className: cn46("rounded-md border border-dashed p-3", className), children: [
|
|
29843
29901
|
/* @__PURE__ */ jsx96("p", { className: "text-xs text-muted-foreground", children }),
|
|
29844
29902
|
mayBuild && editor ? /* @__PURE__ */ jsx96("div", { className: "mt-2.5", children: editor }) : null,
|
|
29845
29903
|
mayBuild ? /* @__PURE__ */ jsxs84("div", { className: "mt-2.5 flex flex-wrap items-center gap-2", children: [
|
|
@@ -30089,10 +30147,10 @@ function BookingSlots({ tableId, activeBookingId, className }) {
|
|
|
30089
30147
|
setShown(url);
|
|
30090
30148
|
}
|
|
30091
30149
|
}, []);
|
|
30092
|
-
if (pages === null) return /* @__PURE__ */ jsx98(Skeleton9, { className:
|
|
30150
|
+
if (pages === null) return /* @__PURE__ */ jsx98(Skeleton9, { className: cn47("h-32 w-full", className) });
|
|
30093
30151
|
if (pages.length === 0 && !tableId && !error && !building) return null;
|
|
30094
30152
|
const origin = host.publicOrigin ?? (typeof window === "undefined" ? "" : window.location.origin);
|
|
30095
|
-
return /* @__PURE__ */ jsxs86("section", { className:
|
|
30153
|
+
return /* @__PURE__ */ jsxs86("section", { className: cn47("flex flex-col gap-3", className), "data-testid": "booking-slots", children: [
|
|
30096
30154
|
/* @__PURE__ */ jsxs86("header", { className: "flex items-center gap-2", children: [
|
|
30097
30155
|
/* @__PURE__ */ jsx98("h3", { className: "text-sm font-medium", children: "Bookings" }),
|
|
30098
30156
|
/* @__PURE__ */ jsx98("span", { className: "text-xs text-muted-foreground", children: pages.length === 0 ? "none yet" : `${pages.length}` }),
|
|
@@ -30154,7 +30212,7 @@ function BookingSlots({ tableId, activeBookingId, className }) {
|
|
|
30154
30212
|
"data-testid": "booking-page",
|
|
30155
30213
|
"data-linked": page.form_id === activeBookingId ? "true" : void 0,
|
|
30156
30214
|
ref: page.form_id === activeBookingId ? (el) => el?.scrollIntoView({ block: "nearest" }) : void 0,
|
|
30157
|
-
className:
|
|
30215
|
+
className: cn47(
|
|
30158
30216
|
"rounded-md border p-2.5",
|
|
30159
30217
|
page.form_id === activeBookingId && "border-primary ring-1 ring-primary"
|
|
30160
30218
|
),
|
|
@@ -30591,8 +30649,8 @@ function TablesHome({ onOpenTable, organizationName, makingOnly = false, askedBy
|
|
|
30591
30649
|
cancelled = true;
|
|
30592
30650
|
};
|
|
30593
30651
|
}, [client, makingOnly]);
|
|
30594
|
-
return /* @__PURE__ */ jsxs88("div", { className:
|
|
30595
|
-
creating ? /* @__PURE__ */ jsx100("div", { className:
|
|
30652
|
+
return /* @__PURE__ */ jsxs88("div", { className: cn48("flex min-h-0 flex-col gap-4", className), children: [
|
|
30653
|
+
creating ? /* @__PURE__ */ jsx100("div", { className: cn48("min-h-0", hostButtons ? "flex-1" : "h-[36rem] max-w-2xl rounded-lg border"), children: /* @__PURE__ */ jsx100(
|
|
30596
30654
|
NewTableStart,
|
|
30597
30655
|
{
|
|
30598
30656
|
templatesHref,
|
|
@@ -30627,7 +30685,7 @@ function TablesHome({ onOpenTable, organizationName, makingOnly = false, askedBy
|
|
|
30627
30685
|
type: "button",
|
|
30628
30686
|
disabled: !board.table_id,
|
|
30629
30687
|
onClick: () => board.table_id ? onOpenTable?.(board.table_id, board.dashboard_id) : void 0,
|
|
30630
|
-
className:
|
|
30688
|
+
className: cn48(
|
|
30631
30689
|
"w-full rounded-md border px-3 py-2 text-left transition-colors",
|
|
30632
30690
|
onOpenTable && board.table_id ? "hover:bg-accent" : "cursor-default"
|
|
30633
30691
|
),
|
|
@@ -30667,7 +30725,7 @@ function TablesHome({ onOpenTable, organizationName, makingOnly = false, askedBy
|
|
|
30667
30725
|
{
|
|
30668
30726
|
type: "button",
|
|
30669
30727
|
onClick: () => onOpenTable?.(table.id),
|
|
30670
|
-
className:
|
|
30728
|
+
className: cn48(
|
|
30671
30729
|
"w-full rounded-md px-3 py-2 text-left transition-colors",
|
|
30672
30730
|
onOpenTable ? "hover:bg-accent" : "cursor-default"
|
|
30673
30731
|
),
|
|
@@ -30801,7 +30859,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, ma
|
|
|
30801
30859
|
[sourceName, headers, rows, sourceText]
|
|
30802
30860
|
);
|
|
30803
30861
|
if (!shape) {
|
|
30804
|
-
return /* @__PURE__ */ jsx101("div", { className:
|
|
30862
|
+
return /* @__PURE__ */ jsx101("div", { className: cn49("flex flex-col gap-2 text-sm", className), "data-save-to-table": "", children: /* @__PURE__ */ jsx101("p", { className: "text-muted-foreground", children: "Nothing here reads as rows \u2014 a table, a list, lines of \u201CName: value\u201D, CSV or pasted spreadsheet cells can be saved as a table." }) });
|
|
30805
30863
|
}
|
|
30806
30864
|
const chooseShape = (i) => {
|
|
30807
30865
|
setWhich(i);
|
|
@@ -30921,7 +30979,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, ma
|
|
|
30921
30979
|
};
|
|
30922
30980
|
makeRef.current = make;
|
|
30923
30981
|
const busy = phase === "making" || phase === "writing";
|
|
30924
|
-
return /* @__PURE__ */ jsxs89("div", { className:
|
|
30982
|
+
return /* @__PURE__ */ jsxs89("div", { className: cn49("flex min-w-0 flex-col gap-3 text-sm", className), "data-save-to-table": "", children: [
|
|
30925
30983
|
/* @__PURE__ */ jsxs89("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
30926
30984
|
shapes.length > 1 ? /* @__PURE__ */ jsxs89(Select12, { value: String(which), onValueChange: (v) => chooseShape(Number(v)), disabled: busy || phase === "done", children: [
|
|
30927
30985
|
/* @__PURE__ */ jsx101(SelectTrigger11, { size: "sm", "aria-label": "Which of these to save", className: "min-w-[16rem]", children: /* @__PURE__ */ jsx101(SelectValue11, {}) }),
|
|
@@ -31168,7 +31226,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, ma
|
|
|
31168
31226
|
// src/StageRules.tsx
|
|
31169
31227
|
import { useCallback as useCallback34, useEffect as useEffect64, useMemo as useMemo46, useState as useState81 } from "react";
|
|
31170
31228
|
import { useFields as useFields16, useRecordsClient as useRecordsClient54, useTable as useTable14 } from "@ai-matrx/records/react";
|
|
31171
|
-
import { BasicInput as BasicInput18, BasicTextarea as BasicTextarea8, Button as Button61, Separator as Separator7, Skeleton as Skeleton11, cn as
|
|
31229
|
+
import { BasicInput as BasicInput18, BasicTextarea as BasicTextarea8, Button as Button61, Separator as Separator7, Skeleton as Skeleton11, cn as cn50 } from "@ai-matrx/design-system";
|
|
31172
31230
|
import { Select as Select13 } from "@ai-matrx/design-system/controls";
|
|
31173
31231
|
import { jsx as jsx102, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
31174
31232
|
var NO_RULES_YET = "Nothing has to be true to get here yet.";
|
|
@@ -31290,13 +31348,13 @@ function StageRulesSection({ tableId, stage, className }) {
|
|
|
31290
31348
|
if (!asked3) return /* @__PURE__ */ jsx102(Skeleton11, { className: "h-24 w-full" });
|
|
31291
31349
|
if (error && !pipeline) return /* @__PURE__ */ jsx102(RefusalNotice, { error });
|
|
31292
31350
|
if (!pipeline?.is_pipeline) {
|
|
31293
|
-
return /* @__PURE__ */ jsxs90("div", { className:
|
|
31351
|
+
return /* @__PURE__ */ jsxs90("div", { className: cn50("flex min-w-0 flex-col gap-2 text-xs", className), children: [
|
|
31294
31352
|
/* @__PURE__ */ jsx102("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx102("span", { className: "font-medium", children: "Rules for entering a stage" }) }),
|
|
31295
31353
|
/* @__PURE__ */ jsx102("p", { className: "text-muted-foreground", children: NO_STAGE_COLUMN })
|
|
31296
31354
|
] });
|
|
31297
31355
|
}
|
|
31298
31356
|
const canEdit = rights.structure;
|
|
31299
|
-
return /* @__PURE__ */ jsxs90("div", { className:
|
|
31357
|
+
return /* @__PURE__ */ jsxs90("div", { className: cn50("flex min-w-0 flex-col gap-2 text-xs", className), children: [
|
|
31300
31358
|
/* @__PURE__ */ jsxs90("div", { className: "flex items-center gap-2", children: [
|
|
31301
31359
|
/* @__PURE__ */ jsx102("span", { className: "font-medium", children: "Rules for entering" }),
|
|
31302
31360
|
/* @__PURE__ */ jsx102(
|
|
@@ -31683,7 +31741,7 @@ import {
|
|
|
31683
31741
|
useTableArchive,
|
|
31684
31742
|
tableShapeChanged as tableShapeChanged11
|
|
31685
31743
|
} from "@ai-matrx/records/react";
|
|
31686
|
-
import { Badge as Badge14, Button as Button67, Separator as Separator8, cn as
|
|
31744
|
+
import { Badge as Badge14, Button as Button67, Separator as Separator8, cn as cn53 } from "@ai-matrx/design-system";
|
|
31687
31745
|
|
|
31688
31746
|
// src/announceTableArchived.ts
|
|
31689
31747
|
var TableRestoreRefused = class extends Error {
|
|
@@ -31773,7 +31831,7 @@ function TableFoundationSwitch({ tableId, table }) {
|
|
|
31773
31831
|
// src/TableAccessLevel.tsx
|
|
31774
31832
|
import { useCallback as useCallback36, useEffect as useEffect67, useMemo as useMemo47, useState as useState85 } from "react";
|
|
31775
31833
|
import { tableShapeChanged as tableShapeChanged10, useRecordsClient as useRecordsClient58 } from "@ai-matrx/records/react";
|
|
31776
|
-
import { Badge as Badge12, Button as Button64, Textarea as Textarea5, cn as
|
|
31834
|
+
import { Badge as Badge12, Button as Button64, Textarea as Textarea5, cn as cn51 } from "@ai-matrx/design-system";
|
|
31777
31835
|
import { Fragment as Fragment37, jsx as jsx106, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
31778
31836
|
var PERSON_KERNEL_TABLE = "11111111-0000-4000-8000-000000000005";
|
|
31779
31837
|
var LEVEL_WORDS = { organization: "Organization", confidential: "Confidential" };
|
|
@@ -31859,7 +31917,7 @@ function TableAccessLevel({ tableId, fields }) {
|
|
|
31859
31917
|
variant: on ? "secondary" : "outline",
|
|
31860
31918
|
"aria-pressed": on,
|
|
31861
31919
|
disabled: busy,
|
|
31862
|
-
className:
|
|
31920
|
+
className: cn51(on && "ring-1 ring-primary"),
|
|
31863
31921
|
onClick: () => setPicked(on ? picked.filter((k) => k !== f.key) : [...picked, f.key]),
|
|
31864
31922
|
children: fieldName(f)
|
|
31865
31923
|
},
|
|
@@ -32073,7 +32131,7 @@ function RowShownTo({ recordId, tableId }) {
|
|
|
32073
32131
|
// src/ColumnsAtOnce.tsx
|
|
32074
32132
|
import { useEffect as useEffect69, useMemo as useMemo48, useState as useState87 } from "react";
|
|
32075
32133
|
import { useFieldMutation as useFieldMutation3 } from "@ai-matrx/records/react";
|
|
32076
|
-
import { Badge as Badge13, BasicInput as BasicInput19, Button as Button66, Checkbox as Checkbox12, cn as
|
|
32134
|
+
import { Badge as Badge13, BasicInput as BasicInput19, Button as Button66, Checkbox as Checkbox12, cn as cn52 } from "@ai-matrx/design-system";
|
|
32077
32135
|
import { jsx as jsx108, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
32078
32136
|
function columnsBatch(saved, draft) {
|
|
32079
32137
|
const byId = new Map(saved.map((f) => [f.id, f]));
|
|
@@ -32159,7 +32217,7 @@ function ColumnsAtOnce({
|
|
|
32159
32217
|
setDragging(index);
|
|
32160
32218
|
},
|
|
32161
32219
|
onDragEnd: () => setDragging(null),
|
|
32162
|
-
className:
|
|
32220
|
+
className: cn52("flex flex-wrap items-center gap-x-2 gap-y-1 px-2 py-1.5", dragging === index && "bg-muted"),
|
|
32163
32221
|
children: [
|
|
32164
32222
|
/* @__PURE__ */ jsx108("span", { "aria-hidden": true, className: "cursor-grab select-none text-muted-foreground", children: "\u22EE\u22EE" }),
|
|
32165
32223
|
/* @__PURE__ */ jsx108(
|
|
@@ -32311,7 +32369,7 @@ function TableSettingsPanel({
|
|
|
32311
32369
|
if (fields.error) return /* @__PURE__ */ jsx109(RefusalNotice, { error: fields.error, className });
|
|
32312
32370
|
if (!rights.structure) {
|
|
32313
32371
|
if (tableIsLocked(table.data)) {
|
|
32314
|
-
return /* @__PURE__ */ jsxs97("div", { className:
|
|
32372
|
+
return /* @__PURE__ */ jsxs97("div", { className: cn53("flex flex-col items-start gap-2 text-xs text-muted-foreground", className), "data-table-locked": "", children: [
|
|
32315
32373
|
/* @__PURE__ */ jsx109("p", { children: DATABASE_LOCKED_REASON }),
|
|
32316
32374
|
/* @__PURE__ */ jsx109(
|
|
32317
32375
|
Button67,
|
|
@@ -32330,7 +32388,7 @@ function TableSettingsPanel({
|
|
|
32330
32388
|
)
|
|
32331
32389
|
] });
|
|
32332
32390
|
}
|
|
32333
|
-
return /* @__PURE__ */ jsx109("p", { className:
|
|
32391
|
+
return /* @__PURE__ */ jsx109("p", { className: cn53("text-xs text-muted-foreground", className), children: rights.why("structure") });
|
|
32334
32392
|
}
|
|
32335
32393
|
const rows = [...fields.data ?? []].sort((a, b) => (a.sort ?? 0) - (b.sort ?? 0));
|
|
32336
32394
|
const remove = async (field2) => {
|
|
@@ -32401,7 +32459,7 @@ function TableSettingsPanel({
|
|
|
32401
32459
|
}
|
|
32402
32460
|
);
|
|
32403
32461
|
}
|
|
32404
|
-
return /* @__PURE__ */ jsxs97("div", { className:
|
|
32462
|
+
return /* @__PURE__ */ jsxs97("div", { className: cn53("flex min-w-0 flex-col gap-2 text-xs", className), children: [
|
|
32405
32463
|
deliberate && table.data ? /* @__PURE__ */ jsx109(
|
|
32406
32464
|
ArchiveDeliberatelyDialog,
|
|
32407
32465
|
{
|
|
@@ -32513,7 +32571,7 @@ import { AlchemyMenu as AlchemyMenu2 } from "@ai-matrx/alchemy/react";
|
|
|
32513
32571
|
// src/RecordChat.tsx
|
|
32514
32572
|
import { useEffect as useEffect71, useMemo as useMemo50, useState as useState89 } from "react";
|
|
32515
32573
|
import { useRecordsClient as useRecordsClient61 } from "@ai-matrx/records/react";
|
|
32516
|
-
import { Skeleton as Skeleton12, cn as
|
|
32574
|
+
import { Skeleton as Skeleton12, cn as cn54 } from "@ai-matrx/design-system";
|
|
32517
32575
|
import { jsx as jsx110, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
32518
32576
|
var NO_CHAT_REASON = "Chatting about this record is not switched on here yet, so this panel is empty rather than showing a box that goes nowhere. It is on our list, not yours.";
|
|
32519
32577
|
function RecordChat({ tableId, recordId, className }) {
|
|
@@ -32560,9 +32618,9 @@ function RecordChat({ tableId, recordId, className }) {
|
|
|
32560
32618
|
};
|
|
32561
32619
|
}, [scope, recordId, tableId]);
|
|
32562
32620
|
if (error) return /* @__PURE__ */ jsx110(RefusalNotice, { error, className });
|
|
32563
|
-
if (!context) return /* @__PURE__ */ jsx110(Skeleton12, { className:
|
|
32621
|
+
if (!context) return /* @__PURE__ */ jsx110(Skeleton12, { className: cn54("h-64 w-full", className) });
|
|
32564
32622
|
if (!host.chat) {
|
|
32565
|
-
return /* @__PURE__ */ jsxs98("section", { className:
|
|
32623
|
+
return /* @__PURE__ */ jsxs98("section", { className: cn54("flex min-h-0 flex-col gap-2", className), children: [
|
|
32566
32624
|
/* @__PURE__ */ jsxs98("header", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
32567
32625
|
/* @__PURE__ */ jsx110("span", { className: "font-medium text-foreground", children: context.title }),
|
|
32568
32626
|
/* @__PURE__ */ jsxs98("span", { children: [
|
|
@@ -32574,7 +32632,7 @@ function RecordChat({ tableId, recordId, className }) {
|
|
|
32574
32632
|
/* @__PURE__ */ jsx110(Withheld, { withheld: context.withheld })
|
|
32575
32633
|
] });
|
|
32576
32634
|
}
|
|
32577
|
-
return /* @__PURE__ */ jsxs98("section", { className:
|
|
32635
|
+
return /* @__PURE__ */ jsxs98("section", { className: cn54("flex min-h-0 flex-col gap-2", className), children: [
|
|
32578
32636
|
/* @__PURE__ */ jsxs98("header", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
32579
32637
|
/* @__PURE__ */ jsx110("span", { className: "font-medium text-foreground", children: context.title }),
|
|
32580
32638
|
/* @__PURE__ */ jsxs98("span", { children: [
|
|
@@ -32635,7 +32693,7 @@ function entriesFor(scope) {
|
|
|
32635
32693
|
}
|
|
32636
32694
|
|
|
32637
32695
|
// src/Peek.tsx
|
|
32638
|
-
import { Button as Button71, Separator as Separator9, Skeleton as Skeleton14, cn as
|
|
32696
|
+
import { Button as Button71, Separator as Separator9, Skeleton as Skeleton14, cn as cn56 } from "@ai-matrx/design-system";
|
|
32639
32697
|
|
|
32640
32698
|
// src/recordInPlace.tsx
|
|
32641
32699
|
import { useMemo as useMemo51, useRef as useRef43 } from "react";
|
|
@@ -32922,7 +32980,7 @@ function ShareForSomebodyElse({
|
|
|
32922
32980
|
|
|
32923
32981
|
// src/RecordBody.tsx
|
|
32924
32982
|
import { useEffect as useEffect73, useRef as useRef44, useState as useState92 } from "react";
|
|
32925
|
-
import { Button as Button70, cn as
|
|
32983
|
+
import { Button as Button70, cn as cn55 } from "@ai-matrx/design-system";
|
|
32926
32984
|
import { newerKindOf as newerKindOf6 } from "@ai-matrx/records";
|
|
32927
32985
|
import { tableShapeChanged as tableShapeChanged12, useFieldMutation as useFieldMutation5, useFields as useFields18, useRecord as useRecord2, useRecordsClient as useRecordsClient64, useTable as useTable18 } from "@ai-matrx/records/react";
|
|
32928
32986
|
import { Fragment as Fragment41, jsx as jsx114, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
@@ -32940,7 +32998,7 @@ function RecordBody({ tableId, recordId, className }) {
|
|
|
32940
32998
|
const fallback = /* @__PURE__ */ jsx114(DefaultRecordBody, { tableId, recordId, className });
|
|
32941
32999
|
const hostBody = host.renderRecordBody && hostRecord.data ? host.renderRecordBody({ tableId, recordId, record: hostRecord.data, readOnly: !hostMay.write, fallback }) : null;
|
|
32942
33000
|
if (hostBody !== null && hostBody !== void 0) {
|
|
32943
|
-
return /* @__PURE__ */ jsx114("section", { className:
|
|
33001
|
+
return /* @__PURE__ */ jsx114("section", { className: cn55("flex min-w-0 flex-col gap-1.5", className), "data-record-body": "host", children: hostBody });
|
|
32944
33002
|
}
|
|
32945
33003
|
return fallback;
|
|
32946
33004
|
}
|
|
@@ -32948,7 +33006,7 @@ function DefaultRecordBody({ tableId, recordId, className }) {
|
|
|
32948
33006
|
const fields = useFields18(tableId);
|
|
32949
33007
|
const field2 = bodyFieldOf(fields.data ?? []);
|
|
32950
33008
|
if (fields.loading && !fields.data) return null;
|
|
32951
|
-
return /* @__PURE__ */ jsx114("section", { className:
|
|
33009
|
+
return /* @__PURE__ */ jsx114("section", { className: cn55("flex min-w-0 flex-col gap-1.5", className), "data-record-body": field2?.key ?? "", children: field2 ? /* @__PURE__ */ jsx114(BodyEditor, { tableId, recordId, field: field2 }, `${recordId}:${field2.key}`) : /* @__PURE__ */ jsx114(AddBody, { tableId }) });
|
|
32952
33010
|
}
|
|
32953
33011
|
function BodyEditor({ tableId, recordId, field: field2 }) {
|
|
32954
33012
|
const host = useRecordsUi();
|
|
@@ -33055,7 +33113,7 @@ function Peek({ tableId, recordId, onClose, className, onPage = false }) {
|
|
|
33055
33113
|
if (document2 && isLockedStub({ document: document2, level: null })) {
|
|
33056
33114
|
const filed = document2["submitted_at"];
|
|
33057
33115
|
const when = typeof filed === "string" && !Number.isNaN(Date.parse(filed)) ? new Date(filed).toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric" }) : null;
|
|
33058
|
-
return /* @__PURE__ */ jsxs103("p", { className:
|
|
33116
|
+
return /* @__PURE__ */ jsxs103("p", { className: cn56("text-sm text-muted-foreground", className), "data-records-locked-record": "", children: [
|
|
33059
33117
|
"You can't open this record",
|
|
33060
33118
|
when ? `. Filed ${when}.` : "."
|
|
33061
33119
|
] });
|
|
@@ -33066,8 +33124,8 @@ function Peek({ tableId, recordId, onClose, className, onPage = false }) {
|
|
|
33066
33124
|
const shownFields = (fields.data ?? []).filter((field2) => !onPage || !drawnBelowOnPage(field2, bodyKey));
|
|
33067
33125
|
const askOpenBelow = onPage && !host.talkToRecord && Boolean(host.chat);
|
|
33068
33126
|
const href = host.hrefForRecord && table.data ? host.hrefForRecord({ table: table.data, recordId }) : void 0;
|
|
33069
|
-
return /* @__PURE__ */ jsxs103("div", { className:
|
|
33070
|
-
/* @__PURE__ */ jsx115("h3", { className:
|
|
33127
|
+
return /* @__PURE__ */ jsxs103("div", { className: cn56("flex min-w-0 flex-col gap-2 text-xs", className), children: [
|
|
33128
|
+
/* @__PURE__ */ jsx115("h3", { className: cn56("break-words font-medium leading-snug", onPage ? "text-2xl font-semibold" : "text-sm"), "data-records-peek-title": "", title, children: record.loading && !document2 ? /* @__PURE__ */ jsx115(Skeleton14, { className: "h-4 w-40" }) : title }),
|
|
33071
33129
|
/* @__PURE__ */ jsxs103("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
33072
33130
|
/* @__PURE__ */ jsx115(
|
|
33073
33131
|
AlchemyMenu2,
|
|
@@ -33125,14 +33183,14 @@ function Peek({ tableId, recordId, onClose, className, onPage = false }) {
|
|
|
33125
33183
|
canWrite: may.write,
|
|
33126
33184
|
whyNot: may.why("write") ?? void 0,
|
|
33127
33185
|
reload: () => record.reload(),
|
|
33128
|
-
className:
|
|
33186
|
+
className: cn56("grid grid-cols-[minmax(6rem,12rem)_1fr] gap-x-3 gap-y-0.5", onPage && "text-sm"),
|
|
33129
33187
|
renderLabel: (field2) => /* @__PURE__ */ jsxs103(Fragment42, { children: [
|
|
33130
33188
|
fieldName(field2),
|
|
33131
33189
|
/* @__PURE__ */ jsx115(ProvenanceBadge, { document: document2, fieldKey: field2.key }),
|
|
33132
33190
|
/* @__PURE__ */ jsx115(ValueAlternates, { recordId, field: field2, document: document2, canWrite: may.write, onChosen: () => record.reload() })
|
|
33133
33191
|
] })
|
|
33134
33192
|
}
|
|
33135
|
-
) : /* @__PURE__ */ jsxs103("dl", { className:
|
|
33193
|
+
) : /* @__PURE__ */ jsxs103("dl", { className: cn56("grid grid-cols-[minmax(6rem,12rem)_1fr] gap-x-3 gap-y-1.5", onPage && "text-sm"), children: [
|
|
33136
33194
|
fields.loading && !fields.data ? Array.from({ length: peekRowsWhileReading }, (_, i) => /* @__PURE__ */ jsxs103("div", { className: "contents", "data-records-skeleton-part": "field", children: [
|
|
33137
33195
|
/* @__PURE__ */ jsx115("dt", { className: "py-0.5", children: /* @__PURE__ */ jsx115(Skeleton14, { shape: "line", width: "2/3" }) }),
|
|
33138
33196
|
/* @__PURE__ */ jsx115("dd", { className: "py-0.5", children: /* @__PURE__ */ jsx115(Skeleton14, { shape: "line", width: i % 2 ? "1/2" : "3/4" }) })
|
|
@@ -33368,7 +33426,7 @@ function lookAfterReset(look) {
|
|
|
33368
33426
|
import { useEffect as useEffect87, useMemo as useMemo62, useState as useState106 } from "react";
|
|
33369
33427
|
import { mayDrag as mayDrag4, useFields as useFields21, useRecordPage as useRecordPage2, useRecordsClient as useRecordsClient71, useTable as useTable21 } from "@ai-matrx/records/react";
|
|
33370
33428
|
import { isButtonField as isButtonField5, newerKindOf as newerKindOf7, stableFilterKey as stableFilterKey4 } from "@ai-matrx/records";
|
|
33371
|
-
import { Button as Button77, Select as Select19, SelectContent as SelectContent17, SelectItem as SelectItem17, SelectTrigger as SelectTrigger17, SelectValue as SelectValue17, cn as
|
|
33429
|
+
import { Button as Button77, Select as Select19, SelectContent as SelectContent17, SelectItem as SelectItem17, SelectTrigger as SelectTrigger17, SelectValue as SelectValue17, cn as cn63 } from "@ai-matrx/design-system";
|
|
33372
33430
|
import {
|
|
33373
33431
|
CHOICE_CHIP_CLASS as CHOICE_CHIP_CLASS5,
|
|
33374
33432
|
EMPTY_TABLE_STYLE as EMPTY_TABLE_STYLE2,
|
|
@@ -33587,7 +33645,7 @@ import {
|
|
|
33587
33645
|
DropdownMenuItem as DropdownMenuItem6,
|
|
33588
33646
|
DropdownMenuTrigger as DropdownMenuTrigger7,
|
|
33589
33647
|
Skeleton as Skeleton15,
|
|
33590
|
-
cn as
|
|
33648
|
+
cn as cn57
|
|
33591
33649
|
} from "@ai-matrx/design-system";
|
|
33592
33650
|
import {
|
|
33593
33651
|
resolveRowColor,
|
|
@@ -33884,7 +33942,7 @@ function PipelineBoard({
|
|
|
33884
33942
|
return /* @__PURE__ */ jsxs106(
|
|
33885
33943
|
"div",
|
|
33886
33944
|
{
|
|
33887
|
-
className:
|
|
33945
|
+
className: cn57("flex min-h-0 flex-col gap-2", className),
|
|
33888
33946
|
onKeyDown: (e) => {
|
|
33889
33947
|
if (e.key === "Escape" && selected.size > 0) {
|
|
33890
33948
|
e.preventDefault();
|
|
@@ -33960,7 +34018,7 @@ function PipelineBoard({
|
|
|
33960
34018
|
const id = e.dataTransfer.getData("text/plain");
|
|
33961
34019
|
if (id) void drop(id, stage.key);
|
|
33962
34020
|
},
|
|
33963
|
-
className:
|
|
34021
|
+
className: cn57(
|
|
33964
34022
|
"flex w-64 shrink-0 flex-col rounded border bg-muted/30",
|
|
33965
34023
|
over === stage.key ? "ring-2 ring-primary" : "",
|
|
33966
34024
|
n?.over_limit ? "border-destructive" : ""
|
|
@@ -34218,7 +34276,7 @@ function PipelineCard({
|
|
|
34218
34276
|
"data-card-index": index,
|
|
34219
34277
|
"data-selected": selected ? "true" : void 0,
|
|
34220
34278
|
"aria-pressed": draggable ? selected : void 0,
|
|
34221
|
-
className:
|
|
34279
|
+
className: cn57(
|
|
34222
34280
|
"w-full truncate rounded border bg-background py-1 pl-2 pr-7 text-left text-xs hover:bg-muted",
|
|
34223
34281
|
draggable ? "cursor-grab active:cursor-grabbing" : "",
|
|
34224
34282
|
dragging ? "opacity-50" : "",
|
|
@@ -34380,7 +34438,7 @@ function CardFieldsInline({ row, fields }) {
|
|
|
34380
34438
|
// src/CalendarView.tsx
|
|
34381
34439
|
import { useEffect as useEffect79, useMemo as useMemo56, useRef as useRef47, useState as useState98 } from "react";
|
|
34382
34440
|
import { mayDrag as mayDrag2 } from "@ai-matrx/records/react";
|
|
34383
|
-
import { Button as Button74, Select as Select15, SelectContent as SelectContent13, SelectItem as SelectItem13, SelectTrigger as SelectTrigger13, SelectValue as SelectValue13, cn as
|
|
34441
|
+
import { Button as Button74, Select as Select15, SelectContent as SelectContent13, SelectItem as SelectItem13, SelectTrigger as SelectTrigger13, SelectValue as SelectValue13, cn as cn58 } from "@ai-matrx/design-system";
|
|
34384
34442
|
import { CHOICE_CHIP_CLASS as CHOICE_CHIP_CLASS3 } from "@ai-matrx/design-system/data-table";
|
|
34385
34443
|
|
|
34386
34444
|
// src/weekStart.ts
|
|
@@ -34972,7 +35030,7 @@ function CalendarView({
|
|
|
34972
35030
|
"button",
|
|
34973
35031
|
{
|
|
34974
35032
|
type: "button",
|
|
34975
|
-
className:
|
|
35033
|
+
className: cn58(
|
|
34976
35034
|
"flex w-full min-w-0 items-center gap-1 truncate rounded border px-1.5 py-0.5 text-left text-xs hover:brightness-95",
|
|
34977
35035
|
// The chip palette, not the faint row tint: a calendar is read by its colours at a glance.
|
|
34978
35036
|
color ? CHOICE_CHIP_CLASS3[color] : "bg-background",
|
|
@@ -35097,12 +35155,12 @@ function CalendarView({
|
|
|
35097
35155
|
})
|
|
35098
35156
|
);
|
|
35099
35157
|
const columns = `3.5rem repeat(${days.length}, minmax(0, 1fr))`;
|
|
35100
|
-
body = /* @__PURE__ */ jsx120("div", { className: "min-w-0 flex-1 overflow-x-auto", children: /* @__PURE__ */ jsxs108("div", { className:
|
|
35158
|
+
body = /* @__PURE__ */ jsx120("div", { className: "min-w-0 flex-1 overflow-x-auto", children: /* @__PURE__ */ jsxs108("div", { className: cn58("border-l border-t", days.length > 1 ? "min-w-[640px]" : ""), "data-calendar-week": "", "data-calendar-days": days.length, children: [
|
|
35101
35159
|
/* @__PURE__ */ jsxs108("div", { className: "grid", style: { gridTemplateColumns: columns }, children: [
|
|
35102
35160
|
/* @__PURE__ */ jsx120("div", { className: "border-b border-r" }),
|
|
35103
|
-
days.map((d) => /* @__PURE__ */ jsx120("div", { className:
|
|
35161
|
+
days.map((d) => /* @__PURE__ */ jsx120("div", { className: cn58("border-b border-r px-1 py-0.5 text-center text-xs", d === today ? "font-semibold text-primary" : "text-muted-foreground"), children: dayDate(d).toLocaleDateString(void 0, { weekday: "short", day: "numeric" }) }, `h${d}`)),
|
|
35104
35162
|
/* @__PURE__ */ jsx120("div", { className: "border-b border-r px-1 py-0.5 text-[10px] text-muted-foreground", children: "All day" }),
|
|
35105
|
-
days.map((d) => /* @__PURE__ */ jsx120("div", { "data-calendar-day": d, className:
|
|
35163
|
+
days.map((d) => /* @__PURE__ */ jsx120("div", { "data-calendar-day": d, className: cn58("min-h-8 border-b border-r p-0.5", ghost?.day === d && ghost.minute === null ? "bg-primary/10" : void 0), ...dayDrop(d), children: /* @__PURE__ */ jsx120("ul", { className: "flex flex-col gap-0.5", children: allDay(d).map((p) => listCard(p, `${p.row.id}:${d}`)) }) }, `a${d}`))
|
|
35106
35164
|
] }),
|
|
35107
35165
|
/* @__PURE__ */ jsx120(
|
|
35108
35166
|
WeekHours,
|
|
@@ -35148,7 +35206,7 @@ function CalendarView({
|
|
|
35148
35206
|
p.row,
|
|
35149
35207
|
tight ? null : /* @__PURE__ */ jsx120("span", { className: "shrink-0 tabular-nums text-[10px] opacity-75", "data-calendar-time": "", children: timeLabel(start) }),
|
|
35150
35208
|
// Taller blocks sharing the width stack the time over the name.
|
|
35151
|
-
|
|
35209
|
+
cn58("h-full items-start", !tight && end - start >= 45 && cols > 1 ? "flex-col gap-0" : void 0)
|
|
35152
35210
|
),
|
|
35153
35211
|
endField && !endWorkedOut && canMove(p.row) ? /* @__PURE__ */ jsx120(
|
|
35154
35212
|
"div",
|
|
@@ -35177,7 +35235,7 @@ function CalendarView({
|
|
|
35177
35235
|
for (const p of placed) for (let d = p.firstDay; d <= p.lastDay; d = addDays2(d, 1)) byDay.set(d, [...byDay.get(d) ?? [], p]);
|
|
35178
35236
|
const listed = [...byDay.entries()].sort((a, b) => a[0].localeCompare(b[0])).map(([d, cards]) => [d, [...cards].sort(byTime)]);
|
|
35179
35237
|
body = /* @__PURE__ */ jsx120("ol", { className: "flex min-h-0 min-w-0 flex-1 flex-col divide-y overflow-y-auto rounded border", "data-calendar-list": "", children: listed.map(([d, cards]) => /* @__PURE__ */ jsxs108("li", { className: "flex gap-3 p-2", "data-calendar-day": d, ...dayDrop(d), children: [
|
|
35180
|
-
/* @__PURE__ */ jsx120("span", { className:
|
|
35238
|
+
/* @__PURE__ */ jsx120("span", { className: cn58("w-24 shrink-0 text-xs font-medium tabular-nums", d === today ? "text-primary" : ""), children: calendarDayLabel(d) }),
|
|
35181
35239
|
/* @__PURE__ */ jsx120("ul", { className: "flex min-w-0 flex-1 flex-col gap-1", children: cards.map((p) => listCard(p, `${p.row.id}:${d}`)) })
|
|
35182
35240
|
] }, d)) });
|
|
35183
35241
|
}
|
|
@@ -35185,7 +35243,7 @@ function CalendarView({
|
|
|
35185
35243
|
"div",
|
|
35186
35244
|
{
|
|
35187
35245
|
ref: frame,
|
|
35188
|
-
className:
|
|
35246
|
+
className: cn58("relative flex min-h-0 flex-col gap-2", className),
|
|
35189
35247
|
"data-calendar-mode": mode,
|
|
35190
35248
|
onKeyDown: moves.onKeyDown,
|
|
35191
35249
|
onDragLeave: (e) => {
|
|
@@ -35249,7 +35307,7 @@ function MonthWeek({
|
|
|
35249
35307
|
role: "gridcell",
|
|
35250
35308
|
"aria-label": calendarDayLabel(d),
|
|
35251
35309
|
"data-calendar-day": d,
|
|
35252
|
-
className:
|
|
35310
|
+
className: cn58(
|
|
35253
35311
|
"group relative flex min-h-24 flex-col gap-0.5 border-b border-r p-0.5",
|
|
35254
35312
|
inMonth ? "" : "bg-muted/40",
|
|
35255
35313
|
ghostDay === d ? "bg-primary/10 ring-2 ring-inset ring-primary" : "",
|
|
@@ -35273,7 +35331,7 @@ function MonthWeek({
|
|
|
35273
35331
|
/* @__PURE__ */ jsx120(
|
|
35274
35332
|
"span",
|
|
35275
35333
|
{
|
|
35276
|
-
className:
|
|
35334
|
+
className: cn58(
|
|
35277
35335
|
"ml-auto rounded-full px-1.5 text-xs tabular-nums",
|
|
35278
35336
|
d === today ? "bg-primary text-primary-foreground" : inMonth ? "" : "text-muted-foreground"
|
|
35279
35337
|
),
|
|
@@ -35357,7 +35415,7 @@ function WeekHours({
|
|
|
35357
35415
|
days.map((d) => /* @__PURE__ */ jsxs108(
|
|
35358
35416
|
"div",
|
|
35359
35417
|
{
|
|
35360
|
-
className:
|
|
35418
|
+
className: cn58("relative border-r", onSlotPointerDown ? "cursor-cell" : void 0),
|
|
35361
35419
|
"data-calendar-column": d,
|
|
35362
35420
|
...timeDrop(d),
|
|
35363
35421
|
...onSlotPointerDown ? { onPointerDown: onSlotPointerDown(d) } : {},
|
|
@@ -35391,7 +35449,7 @@ function weekHeading(first) {
|
|
|
35391
35449
|
// src/TimelineView.tsx
|
|
35392
35450
|
import { useEffect as useEffect80, useMemo as useMemo57, useRef as useRef48, useState as useState99 } from "react";
|
|
35393
35451
|
import { mayDrag as mayDrag3 } from "@ai-matrx/records/react";
|
|
35394
|
-
import { DropdownMenu as DropdownMenu8, DropdownMenuCheckboxItem as DropdownMenuCheckboxItem2, DropdownMenuContent as DropdownMenuContent8, DropdownMenuItem as DropdownMenuItem7, DropdownMenuRadioGroup as DropdownMenuRadioGroup2, DropdownMenuRadioItem as DropdownMenuRadioItem2, DropdownMenuSeparator as DropdownMenuSeparator4, DropdownMenuSub as DropdownMenuSub2, DropdownMenuSubContent as DropdownMenuSubContent2, DropdownMenuSubTrigger as DropdownMenuSubTrigger2, DropdownMenuTrigger as DropdownMenuTrigger8, Button as Button75, Select as Select16, SelectContent as SelectContent14, SelectItem as SelectItem14, SelectTrigger as SelectTrigger14, SelectValue as SelectValue14, cn as
|
|
35452
|
+
import { DropdownMenu as DropdownMenu8, DropdownMenuCheckboxItem as DropdownMenuCheckboxItem2, DropdownMenuContent as DropdownMenuContent8, DropdownMenuItem as DropdownMenuItem7, DropdownMenuRadioGroup as DropdownMenuRadioGroup2, DropdownMenuRadioItem as DropdownMenuRadioItem2, DropdownMenuSeparator as DropdownMenuSeparator4, DropdownMenuSub as DropdownMenuSub2, DropdownMenuSubContent as DropdownMenuSubContent2, DropdownMenuSubTrigger as DropdownMenuSubTrigger2, DropdownMenuTrigger as DropdownMenuTrigger8, Button as Button75, Select as Select16, SelectContent as SelectContent14, SelectItem as SelectItem14, SelectTrigger as SelectTrigger14, SelectValue as SelectValue14, cn as cn59 } from "@ai-matrx/design-system";
|
|
35395
35453
|
import { CHOICE_CHIP_CLASS as CHOICE_CHIP_CLASS4 } from "@ai-matrx/design-system/data-table";
|
|
35396
35454
|
import { useOptionalRecordsClient as useOptionalRecordsClient15 } from "@ai-matrx/records/react";
|
|
35397
35455
|
|
|
@@ -36168,7 +36226,7 @@ function TimelineView({
|
|
|
36168
36226
|
"aria-label": `${title}, ${calendarDayLabel(first)}${last !== first ? ` to ${calendarDayLabel(last)}` : ""}`,
|
|
36169
36227
|
...may ? { "aria-keyshortcuts": "Alt+ArrowLeft Alt+ArrowRight Alt+Shift+ArrowLeft Alt+Shift+ArrowRight" } : {},
|
|
36170
36228
|
title: [why ?? (may ? `${title} \xB7 drag to move, or Alt + arrow keys` : title), slip !== null ? slipWords(slip) : "", percent !== null ? `${percent}% done` : ""].filter(Boolean).join(" \xB7 "),
|
|
36171
|
-
className:
|
|
36229
|
+
className: cn59(
|
|
36172
36230
|
"absolute flex select-none items-center gap-1 rounded border px-1.5 text-xs outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
36173
36231
|
outside ? "overflow-visible" : "overflow-hidden",
|
|
36174
36232
|
milestone ? "border-transparent bg-transparent" : color ? CHOICE_CHIP_CLASS4[color] : "bg-muted",
|
|
@@ -36201,7 +36259,7 @@ function TimelineView({
|
|
|
36201
36259
|
percent !== null && !milestone ? /* @__PURE__ */ jsx121("span", { "aria-hidden": "true", "data-timeline-progress": percent, className: "pointer-events-none absolute inset-y-0 left-0 bg-foreground/20", style: { width: `${percent}%` } }) : null,
|
|
36202
36260
|
inset > 0 ? /* @__PURE__ */ jsx121("span", { "aria-hidden": "true", className: "shrink-0", style: { width: inset } }) : null,
|
|
36203
36261
|
may ? null : /* @__PURE__ */ jsx121(LockIcon2, {}),
|
|
36204
|
-
milestone ? /* @__PURE__ */ jsx121("span", { "aria-hidden": "true", className:
|
|
36262
|
+
milestone ? /* @__PURE__ */ jsx121("span", { "aria-hidden": "true", className: cn59("mx-auto h-3.5 w-3.5 shrink-0 rotate-45 rounded-[2px] border", onCritical ? "bg-amber-500" : "bg-foreground") }) : p.marker ? /* @__PURE__ */ jsx121("span", { "aria-hidden": "true", className: "h-2 w-2 shrink-0 rotate-45 rounded-[1px] bg-current opacity-70" }) : null,
|
|
36205
36263
|
outside ? (
|
|
36206
36264
|
// Too short for its words: they sit just after the bar, the way Airtable labels a short bar.
|
|
36207
36265
|
/* @__PURE__ */ jsxs109("span", { className: "pointer-events-none absolute left-full top-1/2 ml-1.5 -translate-y-1/2 whitespace-nowrap text-foreground", children: [
|
|
@@ -36283,7 +36341,7 @@ function TimelineView({
|
|
|
36283
36341
|
] })
|
|
36284
36342
|
] });
|
|
36285
36343
|
if (!startField) {
|
|
36286
|
-
return /* @__PURE__ */ jsx121("div", { className:
|
|
36344
|
+
return /* @__PURE__ */ jsx121("div", { className: cn59("flex min-w-0 flex-col gap-2", className), "data-timeline-needs": "", children: /* @__PURE__ */ jsxs109("div", { className: "flex flex-col gap-2 rounded border border-dashed p-4 text-xs text-muted-foreground", children: [
|
|
36287
36345
|
/* @__PURE__ */ jsx121("p", { children: dates.length > 0 ? VIEW_NEEDS.timeline?.pick : VIEW_NEEDS.timeline?.missing }),
|
|
36288
36346
|
dates.length > 0 ? /* @__PURE__ */ jsx121("div", { className: "flex flex-wrap gap-2", children: settings }) : null
|
|
36289
36347
|
] }) });
|
|
@@ -36399,7 +36457,7 @@ function TimelineView({
|
|
|
36399
36457
|
"button",
|
|
36400
36458
|
{
|
|
36401
36459
|
type: "button",
|
|
36402
|
-
className:
|
|
36460
|
+
className: cn59(
|
|
36403
36461
|
"flex w-full min-w-0 items-center gap-1 truncate rounded border px-1.5 py-0.5 text-left text-xs hover:brightness-95",
|
|
36404
36462
|
color ? CHOICE_CHIP_CLASS4[color] : "bg-background",
|
|
36405
36463
|
may ? "cursor-grab" : "cursor-default"
|
|
@@ -36423,7 +36481,7 @@ function TimelineView({
|
|
|
36423
36481
|
return [at.first, at.last];
|
|
36424
36482
|
}), Number(today.slice(0, 4)));
|
|
36425
36483
|
const listDayW = listYear ? "w-[3.75rem]" : "w-12";
|
|
36426
|
-
const LABEL_COLUMN =
|
|
36484
|
+
const LABEL_COLUMN = cn59("sticky left-0 z-30 shrink-0 border-r bg-background", ganttOn ? "w-64 sm:w-80" : "w-24 sm:w-36");
|
|
36427
36485
|
const todayLine = todayX !== null ? /* @__PURE__ */ jsx121(
|
|
36428
36486
|
"div",
|
|
36429
36487
|
{
|
|
@@ -36434,10 +36492,10 @@ function TimelineView({
|
|
|
36434
36492
|
}
|
|
36435
36493
|
) : null;
|
|
36436
36494
|
const headerRow = (segments, className2, key) => /* @__PURE__ */ jsxs109("div", { className: "flex", "data-timeline-scale": key, children: [
|
|
36437
|
-
hasLabel ? /* @__PURE__ */ jsx121("div", { className:
|
|
36495
|
+
hasLabel ? /* @__PURE__ */ jsx121("div", { className: cn59(LABEL_COLUMN, "border-b"), children: ganttOn && key === "bottom" ? /* @__PURE__ */ jsxs109("div", { className: "flex h-full items-center gap-1 px-1.5 text-[11px] text-muted-foreground", "data-timeline-list-head": "", children: [
|
|
36438
36496
|
/* @__PURE__ */ jsx121("span", { className: "min-w-0 flex-1 truncate", children: "Task" }),
|
|
36439
|
-
/* @__PURE__ */ jsx121("span", { className:
|
|
36440
|
-
/* @__PURE__ */ jsx121("span", { className:
|
|
36497
|
+
/* @__PURE__ */ jsx121("span", { className: cn59(listDayW, "shrink-0"), children: "Start" }),
|
|
36498
|
+
/* @__PURE__ */ jsx121("span", { className: cn59(listDayW, "shrink-0"), children: "End" }),
|
|
36441
36499
|
/* @__PURE__ */ jsx121("span", { className: "w-14 shrink-0 text-right", children: "Days" })
|
|
36442
36500
|
] }) : null }) : null,
|
|
36443
36501
|
/* @__PURE__ */ jsxs109("div", { className: "relative shrink-0", style: { width, height: 22 }, children: [
|
|
@@ -36448,7 +36506,7 @@ function TimelineView({
|
|
|
36448
36506
|
return /* @__PURE__ */ jsx121(
|
|
36449
36507
|
"div",
|
|
36450
36508
|
{
|
|
36451
|
-
className:
|
|
36509
|
+
className: cn59("absolute top-0 h-full truncate border-b border-l px-1 text-[11px] leading-[22px]", className2, s.day === today && key === "bottom" ? "font-semibold text-primary" : void 0),
|
|
36452
36510
|
style: { left, width: w, paddingLeft: 4 + inset },
|
|
36453
36511
|
children: w >= 14 ? s.label : ""
|
|
36454
36512
|
},
|
|
@@ -36464,24 +36522,24 @@ function TimelineView({
|
|
|
36464
36522
|
headerRow(scale.bottom, "text-muted-foreground", "bottom")
|
|
36465
36523
|
] }),
|
|
36466
36524
|
laneRows.map((lane) => /* @__PURE__ */ jsxs109("div", { className: "flex border-b", "data-timeline-lane": groupField ? lane.key : "", children: [
|
|
36467
|
-
ganttOn ? /* @__PURE__ */ jsx121("div", { className:
|
|
36525
|
+
ganttOn ? /* @__PURE__ */ jsx121("div", { className: cn59(LABEL_COLUMN), "data-timeline-label": "", "data-timeline-list": "", style: { paddingTop: LANE_PAD / 2 }, children: lane.packed.map((b) => {
|
|
36468
36526
|
const at = shown5(b.p);
|
|
36469
36527
|
const slip = slipDays(baselineOf(b.p.row)?.last ?? null, at.last);
|
|
36470
36528
|
return /* @__PURE__ */ jsxs109("div", { "data-timeline-list-row": b.p.row.id, className: "flex items-center gap-1 px-1.5 text-xs", style: { height: ROW_PX }, children: [
|
|
36471
36529
|
/* @__PURE__ */ jsx121("button", { type: "button", className: "min-w-0 flex-1 truncate text-left hover:underline", onClick: () => onOpenRecord?.(b.p.row.id), children: titleOf(b.p.row) }),
|
|
36472
|
-
/* @__PURE__ */ jsx121("span", { className:
|
|
36473
|
-
/* @__PURE__ */ jsx121("span", { className:
|
|
36530
|
+
/* @__PURE__ */ jsx121("span", { className: cn59(listDayW, "shrink-0 whitespace-nowrap tabular-nums text-muted-foreground"), children: taskListDay(at.first, listYear) }),
|
|
36531
|
+
/* @__PURE__ */ jsx121("span", { className: cn59(listDayW, "shrink-0 whitespace-nowrap tabular-nums text-muted-foreground"), children: taskListDay(at.last, listYear) }),
|
|
36474
36532
|
/* @__PURE__ */ jsxs109("span", { className: "w-14 shrink-0 whitespace-nowrap text-right tabular-nums", title: slip !== null ? slipWords(slip) : void 0, children: [
|
|
36475
36533
|
daysBetween(at.first, at.last) + 1,
|
|
36476
36534
|
"d",
|
|
36477
|
-
slip !== null && slip !== 0 ? /* @__PURE__ */ jsx121("span", { className:
|
|
36535
|
+
slip !== null && slip !== 0 ? /* @__PURE__ */ jsx121("span", { className: cn59("ml-1", slip > 0 ? "text-destructive" : "text-emerald-600"), children: slip > 0 ? `+${slip}` : slip }) : null
|
|
36478
36536
|
] })
|
|
36479
36537
|
] }, b.p.row.id);
|
|
36480
|
-
}) }) : grouped ? /* @__PURE__ */ jsxs109("div", { className:
|
|
36538
|
+
}) }) : grouped ? /* @__PURE__ */ jsxs109("div", { className: cn59(LABEL_COLUMN, "flex items-start p-1"), "data-timeline-label": "", children: [
|
|
36481
36539
|
/* @__PURE__ */ jsx121(
|
|
36482
36540
|
"span",
|
|
36483
36541
|
{
|
|
36484
|
-
className:
|
|
36542
|
+
className: cn59("max-w-full truncate rounded px-1.5 py-0.5 text-xs font-medium", lane.color ? CHOICE_CHIP_CLASS4[lane.color] : void 0),
|
|
36485
36543
|
title: laneLocked ?? lane.label,
|
|
36486
36544
|
...laneLocked ? { "data-timeline-lane-locked": "" } : {},
|
|
36487
36545
|
children: lane.label
|
|
@@ -36498,7 +36556,7 @@ function TimelineView({
|
|
|
36498
36556
|
] })
|
|
36499
36557
|
] }, lane.key))
|
|
36500
36558
|
] }) });
|
|
36501
|
-
return /* @__PURE__ */ jsxs109("div", { className:
|
|
36559
|
+
return /* @__PURE__ */ jsxs109("div", { className: cn59("relative flex min-h-0 min-w-0 max-w-full flex-col gap-2", className), "data-timeline": "", onKeyDown: moves.onKeyDown, children: [
|
|
36502
36560
|
note ? /* @__PURE__ */ jsx121("p", { className: "text-xs text-muted-foreground", children: note }) : null,
|
|
36503
36561
|
toolbar,
|
|
36504
36562
|
critical && critical.ids.length > 0 ? /* @__PURE__ */ jsxs109("p", { className: "text-xs text-muted-foreground", "data-timeline-critical-note": "", children: [
|
|
@@ -36892,7 +36950,7 @@ function BoardOptions({
|
|
|
36892
36950
|
|
|
36893
36951
|
// src/ListView.tsx
|
|
36894
36952
|
import { useMemo as useMemo58 } from "react";
|
|
36895
|
-
import { Select as Select17, SelectContent as SelectContent15, SelectItem as SelectItem15, SelectTrigger as SelectTrigger15, SelectValue as SelectValue15, cn as
|
|
36953
|
+
import { Select as Select17, SelectContent as SelectContent15, SelectItem as SelectItem15, SelectTrigger as SelectTrigger15, SelectValue as SelectValue15, cn as cn60 } from "@ai-matrx/design-system";
|
|
36896
36954
|
import { resolveRowColor as resolveRowColor3, ROW_TINT_CLASS as ROW_TINT_CLASS2 } from "@ai-matrx/design-system/data-table";
|
|
36897
36955
|
import { jsx as jsx125, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
36898
36956
|
var LIST_DEFAULT_FIELDS = 4;
|
|
@@ -37057,7 +37115,7 @@ function ListRow({
|
|
|
37057
37115
|
{
|
|
37058
37116
|
type: "button",
|
|
37059
37117
|
"data-records-list-row": row.id,
|
|
37060
|
-
className:
|
|
37118
|
+
className: cn60(
|
|
37061
37119
|
"flex w-full min-w-0 items-center gap-3 rounded px-1 py-1 pr-7 text-left text-xs hover:bg-muted",
|
|
37062
37120
|
color ? ROW_TINT_CLASS2[color] : void 0
|
|
37063
37121
|
),
|
|
@@ -37098,7 +37156,7 @@ import {
|
|
|
37098
37156
|
measureKey as measureKey3
|
|
37099
37157
|
} from "@ai-matrx/records";
|
|
37100
37158
|
import { mapPgError as mapPgError2 } from "@ai-matrx/records/core";
|
|
37101
|
-
import { cn as
|
|
37159
|
+
import { cn as cn62 } from "@ai-matrx/design-system";
|
|
37102
37160
|
import { formatCount as formatCount5 } from "@ai-matrx/kit/format";
|
|
37103
37161
|
|
|
37104
37162
|
// src/linkWords.ts
|
|
@@ -37402,7 +37460,7 @@ import {
|
|
|
37402
37460
|
useRef as useRef49,
|
|
37403
37461
|
useState as useState104
|
|
37404
37462
|
} from "react";
|
|
37405
|
-
import { cn as
|
|
37463
|
+
import { cn as cn61 } from "@ai-matrx/design-system";
|
|
37406
37464
|
import { jsx as jsx126, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
37407
37465
|
function useMeasuredWidth(fallback = 480) {
|
|
37408
37466
|
const ref = useRef49(null);
|
|
@@ -37444,7 +37502,7 @@ function ChartFrame({
|
|
|
37444
37502
|
ref,
|
|
37445
37503
|
"data-chart": chartId,
|
|
37446
37504
|
style: { height, ...chartVariables(config) },
|
|
37447
|
-
className:
|
|
37505
|
+
className: cn61(
|
|
37448
37506
|
"w-full min-w-0 overflow-hidden text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-layer]:outline-none [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",
|
|
37449
37507
|
className
|
|
37450
37508
|
),
|
|
@@ -37463,7 +37521,7 @@ function ChartTooltipContent({
|
|
|
37463
37521
|
return /* @__PURE__ */ jsxs113(
|
|
37464
37522
|
"div",
|
|
37465
37523
|
{
|
|
37466
|
-
className:
|
|
37524
|
+
className: cn61(
|
|
37467
37525
|
"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
37468
37526
|
className
|
|
37469
37527
|
),
|
|
@@ -37493,7 +37551,7 @@ function ChartLegendContent({
|
|
|
37493
37551
|
className
|
|
37494
37552
|
}) {
|
|
37495
37553
|
if (!payload || payload.length === 0) return null;
|
|
37496
|
-
return /* @__PURE__ */ jsx126("div", { className:
|
|
37554
|
+
return /* @__PURE__ */ jsx126("div", { className: cn61("flex flex-wrap items-center justify-center gap-3 pt-2", className), children: payload.map((entry, index) => {
|
|
37497
37555
|
const key = String(entry.dataKey ?? entry.value ?? index);
|
|
37498
37556
|
return /* @__PURE__ */ jsxs113("span", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
37499
37557
|
/* @__PURE__ */ jsx126(
|
|
@@ -37516,7 +37574,7 @@ function Trend({ pct, aimingUp, className }) {
|
|
|
37516
37574
|
const up = pct > 0;
|
|
37517
37575
|
const flat = pct === 0;
|
|
37518
37576
|
const tone = flat || !aimingUp ? "text-muted-foreground" : up ? "text-success" : "text-destructive";
|
|
37519
|
-
return /* @__PURE__ */ jsxs114("span", { className:
|
|
37577
|
+
return /* @__PURE__ */ jsxs114("span", { className: cn62("inline-flex items-center gap-0.5 tabular-nums", tone, className), children: [
|
|
37520
37578
|
flat ? null : /* @__PURE__ */ jsx127("svg", { viewBox: "0 0 10 10", "aria-hidden": "true", className: "h-2.5 w-2.5 fill-current", children: up ? /* @__PURE__ */ jsx127("path", { d: "M5 1 9 8H1z" }) : /* @__PURE__ */ jsx127("path", { d: "M5 9 1 2h8z" }) }),
|
|
37521
37579
|
/* @__PURE__ */ jsxs114("span", { children: [
|
|
37522
37580
|
up ? "+" : "",
|
|
@@ -37652,7 +37710,7 @@ function ChartBlock({ block, subject, tableName: tableName2, className, centerVa
|
|
|
37652
37710
|
return /* @__PURE__ */ jsx127(
|
|
37653
37711
|
"figure",
|
|
37654
37712
|
{
|
|
37655
|
-
className:
|
|
37713
|
+
className: cn62("flex min-h-24 min-w-0 items-center justify-center rounded border border-dashed p-2", className),
|
|
37656
37714
|
"data-records-chart-not-shared": "",
|
|
37657
37715
|
children: /* @__PURE__ */ jsx127("figcaption", { className: "text-xs text-muted-foreground", children: "Not shared with you" })
|
|
37658
37716
|
}
|
|
@@ -37661,7 +37719,7 @@ function ChartBlock({ block, subject, tableName: tableName2, className, centerVa
|
|
|
37661
37719
|
return /* @__PURE__ */ jsxs114(
|
|
37662
37720
|
"figure",
|
|
37663
37721
|
{
|
|
37664
|
-
className:
|
|
37722
|
+
className: cn62("flex min-w-0 flex-col gap-1.5", bare ? null : "rounded border p-2", className),
|
|
37665
37723
|
...bare ? { "aria-label": block.title || CHART_KIND_LABEL[kind2] } : {},
|
|
37666
37724
|
...typeof block.ms === "number" ? { "data-store-ms": pretty(block.ms) } : {},
|
|
37667
37725
|
children: [
|
|
@@ -38278,7 +38336,7 @@ function ViewSwitcherBody({
|
|
|
38278
38336
|
setLocal((held) => ({ ...held, ...patch }));
|
|
38279
38337
|
onViewChange?.(patch);
|
|
38280
38338
|
};
|
|
38281
|
-
return /* @__PURE__ */ jsxs116("div", { className:
|
|
38339
|
+
return /* @__PURE__ */ jsxs116("div", { className: cn63("flex min-h-0 flex-col gap-2", footer === "sticky" && "flex-1", className), children: [
|
|
38282
38340
|
chooser && !embedded ? /* @__PURE__ */ jsxs116("div", { className: "flex items-center gap-2", children: [
|
|
38283
38341
|
/* @__PURE__ */ jsx129("span", { className: "truncate text-sm font-medium", children: view.name }),
|
|
38284
38342
|
/* @__PURE__ */ jsx129("div", { className: "ml-auto flex items-center gap-0.5", role: "group", "aria-label": "Layout", children: VIEW_LAYOUTS.map((option) => /* @__PURE__ */ jsx129(
|
|
@@ -38959,7 +39017,7 @@ function Kanban({
|
|
|
38959
39017
|
const heading = (name) => /* @__PURE__ */ jsxs116(
|
|
38960
39018
|
"header",
|
|
38961
39019
|
{
|
|
38962
|
-
className:
|
|
39020
|
+
className: cn63("flex h-7 items-center gap-2 border-b px-2 text-xs font-medium", columnColor(name) ? CHOICE_CHIP_CLASS5[columnColor(name)] : void 0),
|
|
38963
39021
|
"data-board-heading": name,
|
|
38964
39022
|
...columnColor(name) ? { "data-column-color": columnColor(name) } : {},
|
|
38965
39023
|
children: [
|
|
@@ -38976,7 +39034,7 @@ function Kanban({
|
|
|
38976
39034
|
{
|
|
38977
39035
|
"data-board-column": name,
|
|
38978
39036
|
...laneName !== null ? { "data-board-lane": laneName } : {},
|
|
38979
|
-
className:
|
|
39037
|
+
className: cn63("flex shrink-0 flex-col rounded border bg-muted/30", size.column),
|
|
38980
39038
|
onDragOver: (e) => {
|
|
38981
39039
|
if (movable && e.dataTransfer.types.includes("application/x-records-card")) e.preventDefault();
|
|
38982
39040
|
},
|
|
@@ -39010,7 +39068,7 @@ function Kanban({
|
|
|
39010
39068
|
"li",
|
|
39011
39069
|
{
|
|
39012
39070
|
draggable,
|
|
39013
|
-
className:
|
|
39071
|
+
className: cn63("relative", choiceColor(name) ? "pl-1.5" : void 0, draggable ? "cursor-grab active:cursor-grabbing" : void 0),
|
|
39014
39072
|
...draggable ? { "aria-keyshortcuts": "Alt+ArrowLeft Alt+ArrowRight", title: "Drag to another column, or Alt + arrow keys" } : {},
|
|
39015
39073
|
onDragStart: (e) => {
|
|
39016
39074
|
if (!draggable) return;
|
|
@@ -39026,9 +39084,9 @@ function Kanban({
|
|
|
39026
39084
|
void move(card, { column: name, lane: laneName }, { column: to, lane: laneName });
|
|
39027
39085
|
},
|
|
39028
39086
|
children: [
|
|
39029
|
-
accent ? /* @__PURE__ */ jsx129("span", { "aria-hidden": "true", "data-card-accent": accent, className:
|
|
39087
|
+
accent ? /* @__PURE__ */ jsx129("span", { "aria-hidden": "true", "data-card-accent": accent, className: cn63("absolute inset-y-0.5 left-0 w-1 rounded", SWATCH_CLASS4[accent]) }) : null,
|
|
39030
39088
|
/* @__PURE__ */ jsx129(RecordActionMenu, { tableId, row: card, name: cardWords(card, titleField).text, onOpenRecord, onChanged, children: previewField ? /* @__PURE__ */ jsxs116("div", { className: "flex flex-col gap-1", children: [
|
|
39031
|
-
/* @__PURE__ */ jsx129("span", { className:
|
|
39089
|
+
/* @__PURE__ */ jsx129("span", { className: cn63("block w-full shrink-0 overflow-hidden rounded bg-muted/50", size.cover), "data-board-preview": previewField.key, children: /* @__PURE__ */ jsx129(GalleryCover, { field: previewField, value: cover }) }),
|
|
39032
39090
|
recordCard
|
|
39033
39091
|
] }) : recordCard }),
|
|
39034
39092
|
moves.refused?.recordId === card.id ? /* @__PURE__ */ jsx129(MoveRefusedBadge, { refused: moves.refused }) : null
|
|
@@ -39060,7 +39118,7 @@ function Kanban({
|
|
|
39060
39118
|
// is the same fixed width in every band and in the heading row, and a lane's strip is one
|
|
39061
39119
|
// fixed height — collapsing a lane moves only what is below it, never a column.
|
|
39062
39120
|
/* @__PURE__ */ jsx129("div", { className: "min-h-0 overflow-x-auto pb-2", children: /* @__PURE__ */ jsxs116("div", { className: "flex w-max flex-col gap-2", "data-board-lanes": "", children: [
|
|
39063
|
-
/* @__PURE__ */ jsx129("div", { className: "flex gap-2", "data-board-heads": "", children: columns.map((name) => /* @__PURE__ */ jsx129("div", { className:
|
|
39121
|
+
/* @__PURE__ */ jsx129("div", { className: "flex gap-2", "data-board-heads": "", children: columns.map((name) => /* @__PURE__ */ jsx129("div", { className: cn63("shrink-0 overflow-hidden rounded border bg-muted/30", size.column), children: heading(name) }, name)) }),
|
|
39064
39122
|
lanes.map((lane) => {
|
|
39065
39123
|
const open = !shut.has(lane.name);
|
|
39066
39124
|
return /* @__PURE__ */ jsxs116("div", { "data-board-lane-band": lane.name, className: "flex flex-col gap-1", children: [
|
|
@@ -39171,13 +39229,13 @@ function Gallery({
|
|
|
39171
39229
|
"button",
|
|
39172
39230
|
{
|
|
39173
39231
|
type: "button",
|
|
39174
|
-
className:
|
|
39232
|
+
className: cn63(
|
|
39175
39233
|
"flex h-full w-full flex-col gap-1 rounded border p-2 pr-7 text-left hover:bg-muted",
|
|
39176
39234
|
rowColor ? ROW_TINT_CLASS3[rowColor] : void 0
|
|
39177
39235
|
),
|
|
39178
39236
|
onClick: () => onOpenRecord?.(row.id),
|
|
39179
39237
|
children: [
|
|
39180
|
-
imageField ? /* @__PURE__ */ jsx129("span", { className:
|
|
39238
|
+
imageField ? /* @__PURE__ */ jsx129("span", { className: cn63(dims.cover, "w-full shrink-0 overflow-hidden rounded bg-muted/50"), "data-records-gallery-cover": imageField.key, children: /* @__PURE__ */ jsx129(GalleryCover, { field: imageField, value: image }) }) : null,
|
|
39181
39239
|
/* @__PURE__ */ jsx129("span", { className: "truncate text-sm font-medium", "data-records-gallery-title": "", children: recordNameIn({ title_field: titleKey ?? null }, doc) || "Untitled" }),
|
|
39182
39240
|
onCard.map((field2) => /* @__PURE__ */ jsxs116("span", { className: "flex h-5 min-w-0 items-center gap-1 overflow-hidden whitespace-nowrap text-xs", children: [
|
|
39183
39241
|
/* @__PURE__ */ jsx129("span", { className: "shrink-0 text-muted-foreground", children: fieldName(field2) }),
|
|
@@ -39255,7 +39313,7 @@ function RecordCard({
|
|
|
39255
39313
|
role: "button",
|
|
39256
39314
|
tabIndex: 0,
|
|
39257
39315
|
"data-records-card": record.id,
|
|
39258
|
-
className:
|
|
39316
|
+
className: cn63(
|
|
39259
39317
|
"w-full cursor-pointer truncate rounded border bg-background px-2 py-1 text-left text-xs hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
39260
39318
|
host.density === "spacious" ? "py-2" : "",
|
|
39261
39319
|
color ? ROW_TINT_CLASS3[color] : void 0
|
|
@@ -39307,7 +39365,7 @@ import {
|
|
|
39307
39365
|
emptyArchiveLine
|
|
39308
39366
|
} from "@ai-matrx/records";
|
|
39309
39367
|
import { tableShapeChanged as tableShapeChanged13, useFields as useFields22, useRecordsClient as useRecordsClient72, useTable as useTable22 } from "@ai-matrx/records/react";
|
|
39310
|
-
import { Button as Button78, Skeleton as Skeleton16, cn as
|
|
39368
|
+
import { Button as Button78, Skeleton as Skeleton16, cn as cn64 } from "@ai-matrx/design-system";
|
|
39311
39369
|
import { jsx as jsx130, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
39312
39370
|
var ARCHIVE_MEANS = "Archiving never destroys anything. A record you remove from the grid waits here until somebody brings it back.";
|
|
39313
39371
|
function mayNotRestoreLine(why) {
|
|
@@ -39373,7 +39431,7 @@ function ArchivedView({
|
|
|
39373
39431
|
const titleKey = table.data?.title_field ?? null;
|
|
39374
39432
|
const mayRestore = rights.organise;
|
|
39375
39433
|
const whyNot = mayRestore ? "" : mayNotRestoreLine(rights.why("organise"));
|
|
39376
|
-
return /* @__PURE__ */ jsxs117("div", { className:
|
|
39434
|
+
return /* @__PURE__ */ jsxs117("div", { className: cn64("flex min-h-0 flex-col gap-2", className), "data-testid": "archived-view", children: [
|
|
39377
39435
|
/* @__PURE__ */ jsxs117("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
39378
39436
|
/* @__PURE__ */ jsx130("span", { className: "text-sm font-medium", children: "Archived" }),
|
|
39379
39437
|
/* @__PURE__ */ jsx130("div", { className: "ml-auto flex items-center gap-0.5", role: "group", "aria-label": "Archived by", children: ARCHIVE_LANES.map((option) => /* @__PURE__ */ jsx130(
|
|
@@ -39503,7 +39561,7 @@ import {
|
|
|
39503
39561
|
portalTitleTypedBack
|
|
39504
39562
|
} from "@ai-matrx/records";
|
|
39505
39563
|
import { useRecordsClient as useRecordsClient73 } from "@ai-matrx/records/react";
|
|
39506
|
-
import { BasicInput as BasicInput21, Button as Button79, Skeleton as Skeleton17, cn as
|
|
39564
|
+
import { BasicInput as BasicInput21, Button as Button79, Skeleton as Skeleton17, cn as cn65 } from "@ai-matrx/design-system";
|
|
39507
39565
|
import { jsx as jsx131, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
39508
39566
|
var ARCHIVED_NEVER_DESTROYED = "Archiving never destroys anything. What you put away waits here until somebody brings it back.";
|
|
39509
39567
|
function ArchivedDisclosure({
|
|
@@ -39520,7 +39578,7 @@ function ArchivedDisclosure({
|
|
|
39520
39578
|
setOpen(next);
|
|
39521
39579
|
onOpenChange?.(next);
|
|
39522
39580
|
};
|
|
39523
|
-
return /* @__PURE__ */ jsxs118("div", { className:
|
|
39581
|
+
return /* @__PURE__ */ jsxs118("div", { className: cn65("flex flex-col gap-2", className), "data-testid": "archived-disclosure", children: [
|
|
39524
39582
|
/* @__PURE__ */ jsx131("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs118(
|
|
39525
39583
|
Button79,
|
|
39526
39584
|
{
|
|
@@ -39683,7 +39741,7 @@ function ArchivedPortals({
|
|
|
39683
39741
|
// src/ViewBar.tsx
|
|
39684
39742
|
import { useCallback as useCallback43, useEffect as useEffect90, useRef as useRef51, useState as useState109 } from "react";
|
|
39685
39743
|
import { useRecordsClient as useRecordsClient74 } from "@ai-matrx/records/react";
|
|
39686
|
-
import { Badge as Badge15, Button as Button80, Input as Input7, Popover as Popover16, PopoverContent as PopoverContent16, PopoverTrigger as PopoverTrigger16, Skeleton as Skeleton18, cn as
|
|
39744
|
+
import { Badge as Badge15, Button as Button80, Input as Input7, Popover as Popover16, PopoverContent as PopoverContent16, PopoverTrigger as PopoverTrigger16, Skeleton as Skeleton18, cn as cn66 } from "@ai-matrx/design-system";
|
|
39687
39745
|
import { Button as ControlButton, Switch as Switch5, Tile as Tile2 } from "@ai-matrx/design-system/controls";
|
|
39688
39746
|
import { DndContext, PointerSensor, closestCenter, useDroppable, useSensor, useSensors } from "@dnd-kit/core";
|
|
39689
39747
|
import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
@@ -39753,6 +39811,9 @@ function settingsToCopy(source, target) {
|
|
|
39753
39811
|
const same3 = source.layout === target.layout;
|
|
39754
39812
|
return {
|
|
39755
39813
|
where: source.where ?? null,
|
|
39814
|
+
// The flat filter map a view may carry instead of (or beside) `where`: every stored filter shape travels.
|
|
39815
|
+
filters: source.filters ?? null,
|
|
39816
|
+
// saveViewPatch sends null to the door, which clears it
|
|
39756
39817
|
sorts: source.sorts ?? [],
|
|
39757
39818
|
groupField: source.groupField ?? null,
|
|
39758
39819
|
presentation: look,
|
|
@@ -39770,7 +39831,7 @@ function seedIsSatisfied(seed, views) {
|
|
|
39770
39831
|
}
|
|
39771
39832
|
function SectionBox({ id, children, ...rest }) {
|
|
39772
39833
|
const { setNodeRef, isOver } = useDroppable({ id });
|
|
39773
|
-
return /* @__PURE__ */ jsx132("div", { ref: setNodeRef, className:
|
|
39834
|
+
return /* @__PURE__ */ jsx132("div", { ref: setNodeRef, className: cn66("rounded-sm", isOver && "bg-accent/40"), ...rest, children });
|
|
39774
39835
|
}
|
|
39775
39836
|
function SortableRow({ id, disabled, children }) {
|
|
39776
39837
|
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id, disabled });
|
|
@@ -39779,7 +39840,7 @@ function SortableRow({ id, disabled, children }) {
|
|
|
39779
39840
|
{
|
|
39780
39841
|
ref: setNodeRef,
|
|
39781
39842
|
style: { transform: CSS2.Transform.toString(transform), transition },
|
|
39782
|
-
className:
|
|
39843
|
+
className: cn66(isDragging && "relative z-10 opacity-80"),
|
|
39783
39844
|
"data-view-row": id,
|
|
39784
39845
|
...disabled ? {} : attributes,
|
|
39785
39846
|
...disabled ? {} : listeners,
|
|
@@ -39787,7 +39848,7 @@ function SortableRow({ id, disabled, children }) {
|
|
|
39787
39848
|
}
|
|
39788
39849
|
);
|
|
39789
39850
|
}
|
|
39790
|
-
function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews, initialViews, className }) {
|
|
39851
|
+
function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews, onSettingsCopied, initialViews, className }) {
|
|
39791
39852
|
const client = useRecordsClient74();
|
|
39792
39853
|
const claimSeed = useSeedGuard();
|
|
39793
39854
|
const table = useTable23(tableId);
|
|
@@ -39960,6 +40021,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
39960
40021
|
return;
|
|
39961
40022
|
}
|
|
39962
40023
|
setCopying(false);
|
|
40024
|
+
onSettingsCopied?.(into.id);
|
|
39963
40025
|
await load();
|
|
39964
40026
|
notify?.success(`Copied settings from \u201C${source.name}\u201D`);
|
|
39965
40027
|
}
|
|
@@ -40042,7 +40104,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40042
40104
|
return /* @__PURE__ */ jsx132(
|
|
40043
40105
|
"span",
|
|
40044
40106
|
{
|
|
40045
|
-
className:
|
|
40107
|
+
className: cn66("max-w-[16rem] shrink-0 truncate text-xs text-muted-foreground", className),
|
|
40046
40108
|
title: SAVED_VIEWS_UNAVAILABLE,
|
|
40047
40109
|
"data-saved-views-unavailable": "",
|
|
40048
40110
|
children: SAVED_VIEWS_UNAVAILABLE
|
|
@@ -40050,7 +40112,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40050
40112
|
);
|
|
40051
40113
|
}
|
|
40052
40114
|
if (error) return /* @__PURE__ */ jsx132(RefusalNotice, { error, className, actions: /* @__PURE__ */ jsx132(Button80, { size: "sm", variant: "ghost", onClick: () => void load(), children: "Try again" }) });
|
|
40053
|
-
if (views === null) return /* @__PURE__ */ jsx132(Skeleton18, { className:
|
|
40115
|
+
if (views === null) return /* @__PURE__ */ jsx132(Skeleton18, { className: cn66(VIEW_CHIP_BOX, className), "data-view-picker-reserved": "" });
|
|
40054
40116
|
const current = views.find((v) => v.id === active) ?? null;
|
|
40055
40117
|
return /* @__PURE__ */ jsxs119(Popover16, { open, onOpenChange: setOpen, children: [
|
|
40056
40118
|
/* @__PURE__ */ jsx132(PopoverTrigger16, { asChild: true, children: /* @__PURE__ */ jsxs119(
|
|
@@ -40058,7 +40120,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40058
40120
|
{
|
|
40059
40121
|
size: "sm",
|
|
40060
40122
|
variant: "subtle",
|
|
40061
|
-
className:
|
|
40123
|
+
className: cn66(VIEW_CHIP_BOX, "justify-between gap-1 px-2 text-xs", className),
|
|
40062
40124
|
title: current?.name ?? void 0,
|
|
40063
40125
|
"aria-label": `View: ${current?.name ?? "none yet"}. Change view`,
|
|
40064
40126
|
"data-view-picker": "",
|
|
@@ -40115,7 +40177,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40115
40177
|
"data-view-section-toggle": "",
|
|
40116
40178
|
onClick: () => toggleShut(group.name),
|
|
40117
40179
|
children: [
|
|
40118
|
-
/* @__PURE__ */ jsx132("svg", { viewBox: "0 0 24 24", className:
|
|
40180
|
+
/* @__PURE__ */ jsx132("svg", { viewBox: "0 0 24 24", className: cn66("h-3 w-3 shrink-0", shut.includes(group.name) && "-rotate-90"), fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx132("path", { d: "m6 9 6 6 6-6" }) }),
|
|
40119
40181
|
/* @__PURE__ */ jsx132("span", { className: "truncate", children: group.name }),
|
|
40120
40182
|
/* @__PURE__ */ jsx132("span", { className: "shrink-0 font-normal normal-case", children: group.views.length })
|
|
40121
40183
|
]
|
|
@@ -40131,7 +40193,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40131
40193
|
{
|
|
40132
40194
|
variant: "quiet",
|
|
40133
40195
|
selected: view.id === active,
|
|
40134
|
-
className:
|
|
40196
|
+
className: cn66(group.name !== null && "pl-4"),
|
|
40135
40197
|
onClick: () => {
|
|
40136
40198
|
if (justDragged.current) return;
|
|
40137
40199
|
setActive(view.id);
|
|
@@ -40278,7 +40340,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40278
40340
|
// src/ProposalRow.tsx
|
|
40279
40341
|
import { useEffect as useEffect91, useRef as useRef52, useState as useState110 } from "react";
|
|
40280
40342
|
import { useRecordsClient as useRecordsClient75 } from "@ai-matrx/records/react";
|
|
40281
|
-
import { Badge as Badge16, Button as Button81, cn as
|
|
40343
|
+
import { Badge as Badge16, Button as Button81, cn as cn67 } from "@ai-matrx/design-system";
|
|
40282
40344
|
import { jsx as jsx133, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
40283
40345
|
var ACT_WORD = PROPOSED_CHANGE_ACT_LABEL;
|
|
40284
40346
|
function ProposalRow({
|
|
@@ -40337,14 +40399,14 @@ function ProposalRow({
|
|
|
40337
40399
|
setSettled(result);
|
|
40338
40400
|
onSettled?.(result);
|
|
40339
40401
|
}
|
|
40340
|
-
return /* @__PURE__ */ jsxs120("div", { className:
|
|
40402
|
+
return /* @__PURE__ */ jsxs120("div", { className: cn67("flex flex-col gap-1 rounded border p-2", className), children: [
|
|
40341
40403
|
/* @__PURE__ */ jsxs120("div", { className: "flex items-baseline gap-2", children: [
|
|
40342
40404
|
/* @__PURE__ */ jsx133(Badge16, { variant: change.act === "remove" ? "destructive" : "secondary", className: "text-[10px]", children: ACT_WORD[change.act] }),
|
|
40343
40405
|
/* @__PURE__ */ jsx133("span", { className: "min-w-0 flex-1 truncate text-xs", title: change.label, children: change.label }),
|
|
40344
40406
|
settled ? /* @__PURE__ */ jsx133(
|
|
40345
40407
|
"span",
|
|
40346
40408
|
{
|
|
40347
|
-
className:
|
|
40409
|
+
className: cn67(
|
|
40348
40410
|
"shrink-0 text-xs",
|
|
40349
40411
|
settled.settled === "refused" ? "text-destructive" : "text-muted-foreground"
|
|
40350
40412
|
),
|
|
@@ -40386,14 +40448,14 @@ function ProposalRow({
|
|
|
40386
40448
|
// src/ActionInbox.tsx
|
|
40387
40449
|
import { useCallback as useCallback45, useEffect as useEffect93, useMemo as useMemo64, useRef as useRef53, useState as useState112 } from "react";
|
|
40388
40450
|
import { useRecordsClient as useRecordsClient77 } from "@ai-matrx/records/react";
|
|
40389
|
-
import { Badge as Badge18, Button as Button83, Checkbox as Checkbox13, Skeleton as Skeleton20, cn as
|
|
40451
|
+
import { Badge as Badge18, Button as Button83, Checkbox as Checkbox13, Skeleton as Skeleton20, cn as cn69 } from "@ai-matrx/design-system";
|
|
40390
40452
|
import { toggleSelection as toggleSelection2 } from "@ai-matrx/design-system/data-table";
|
|
40391
40453
|
import { formatAbsoluteDate, formatDurationMs } from "@ai-matrx/kit/format";
|
|
40392
40454
|
|
|
40393
40455
|
// src/ChecklistRunner.tsx
|
|
40394
40456
|
import { useCallback as useCallback44, useEffect as useEffect92, useMemo as useMemo63, useState as useState111 } from "react";
|
|
40395
40457
|
import { useRecordsClient as useRecordsClient76, useTable as useTable24 } from "@ai-matrx/records/react";
|
|
40396
|
-
import { Badge as Badge17, BasicInput as BasicInput22, BasicTextarea as BasicTextarea9, Button as Button82, Skeleton as Skeleton19, cn as
|
|
40458
|
+
import { Badge as Badge17, BasicInput as BasicInput22, BasicTextarea as BasicTextarea9, Button as Button82, Skeleton as Skeleton19, cn as cn68 } from "@ai-matrx/design-system";
|
|
40397
40459
|
import { Select as Select20 } from "@ai-matrx/design-system/controls";
|
|
40398
40460
|
import { humanizeIdentifier as humanizeIdentifier15 } from "@ai-matrx/kit/text-case";
|
|
40399
40461
|
import { Fragment as Fragment51, jsx as jsx134, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
@@ -40535,7 +40597,7 @@ function ChecklistRunner({
|
|
|
40535
40597
|
if (runs === null && steps === null && !runId) {
|
|
40536
40598
|
return /* @__PURE__ */ jsx134(Skeleton19, { shape: "block", height: "sm", className });
|
|
40537
40599
|
}
|
|
40538
|
-
return /* @__PURE__ */ jsxs121("section", { className:
|
|
40600
|
+
return /* @__PURE__ */ jsxs121("section", { className: cn68("flex min-h-0 flex-col gap-2", className), "data-testid": "checklist-runner", children: [
|
|
40539
40601
|
/* @__PURE__ */ jsxs121("header", { className: "flex items-center gap-2 text-xs", children: [
|
|
40540
40602
|
/* @__PURE__ */ jsx134("h3", { className: "text-sm font-medium", children: "Checklists" }),
|
|
40541
40603
|
active ? /* @__PURE__ */ jsxs121("span", { className: "tabular-nums text-muted-foreground", children: [
|
|
@@ -40615,14 +40677,14 @@ function StepRow({
|
|
|
40615
40677
|
return /* @__PURE__ */ jsxs121(
|
|
40616
40678
|
"li",
|
|
40617
40679
|
{
|
|
40618
|
-
className:
|
|
40680
|
+
className: cn68("rounded border p-2", step2.finished && "opacity-70", className),
|
|
40619
40681
|
"data-testid": "checklist-step",
|
|
40620
40682
|
"data-step-ref": step2.ref,
|
|
40621
40683
|
"data-finished": step2.finished ? "true" : "false",
|
|
40622
40684
|
children: [
|
|
40623
40685
|
/* @__PURE__ */ jsxs121("div", { className: "flex items-center gap-2", children: [
|
|
40624
40686
|
/* @__PURE__ */ jsx134("span", { className: "w-5 shrink-0 text-right text-[11px] tabular-nums text-muted-foreground", children: step2.step_order }),
|
|
40625
|
-
/* @__PURE__ */ jsx134("span", { className:
|
|
40687
|
+
/* @__PURE__ */ jsx134("span", { className: cn68("min-w-0 flex-1 truncate text-xs", step2.finished && "line-through"), children: step2.title }),
|
|
40626
40688
|
step2.role ? /* @__PURE__ */ jsx134(Badge17, { variant: "outline", className: "text-[10px]", children: step2.assignee_name ?? humanizeIdentifier15(step2.role) }) : null,
|
|
40627
40689
|
step2.due_state && step2.due_state !== "undated" ? /* @__PURE__ */ jsx134(
|
|
40628
40690
|
Badge17,
|
|
@@ -40765,7 +40827,7 @@ function MyChecklistSteps({
|
|
|
40765
40827
|
);
|
|
40766
40828
|
if (loading && steps.length === 0) return null;
|
|
40767
40829
|
if (steps.length === 0 && !error) return null;
|
|
40768
|
-
return /* @__PURE__ */ jsxs121("section", { className:
|
|
40830
|
+
return /* @__PURE__ */ jsxs121("section", { className: cn68("flex flex-col gap-1.5", className), "data-testid": "inbox-checklist-steps", children: [
|
|
40769
40831
|
/* @__PURE__ */ jsxs121("h4", { className: "text-xs font-medium text-muted-foreground", children: [
|
|
40770
40832
|
"Your checklist steps ",
|
|
40771
40833
|
/* @__PURE__ */ jsx134("span", { className: "tabular-nums", children: steps.length })
|
|
@@ -40815,7 +40877,7 @@ function ChecklistsPanel({ tableId, onOpenRecord, className }) {
|
|
|
40815
40877
|
useEffect92(() => {
|
|
40816
40878
|
void load();
|
|
40817
40879
|
}, [load]);
|
|
40818
|
-
if (templates === null) return /* @__PURE__ */ jsx134(Skeleton19, { className:
|
|
40880
|
+
if (templates === null) return /* @__PURE__ */ jsx134(Skeleton19, { className: cn68("h-40 w-full", className) });
|
|
40819
40881
|
if (editing) {
|
|
40820
40882
|
return /* @__PURE__ */ jsx134(
|
|
40821
40883
|
ChecklistTemplateEditor,
|
|
@@ -40831,12 +40893,12 @@ function ChecklistsPanel({ tableId, onOpenRecord, className }) {
|
|
|
40831
40893
|
);
|
|
40832
40894
|
}
|
|
40833
40895
|
if (openRun) {
|
|
40834
|
-
return /* @__PURE__ */ jsxs121("div", { className:
|
|
40896
|
+
return /* @__PURE__ */ jsxs121("div", { className: cn68("flex flex-col gap-2", className), children: [
|
|
40835
40897
|
/* @__PURE__ */ jsx134(Button82, { size: "sm", variant: "ghost", className: "self-start", onClick: () => setOpenRun(null), children: "Back to checklists" }),
|
|
40836
40898
|
/* @__PURE__ */ jsx134(ChecklistRunner, { tableId, runId: openRun, offerToStart: false })
|
|
40837
40899
|
] });
|
|
40838
40900
|
}
|
|
40839
|
-
return /* @__PURE__ */ jsxs121("section", { className:
|
|
40901
|
+
return /* @__PURE__ */ jsxs121("section", { className: cn68("flex flex-col gap-3", className), "data-testid": "checklists-panel", children: [
|
|
40840
40902
|
/* @__PURE__ */ jsxs121("header", { className: "flex items-center gap-2", children: [
|
|
40841
40903
|
/* @__PURE__ */ jsx134("h3", { className: "text-sm font-medium", children: "Checklists" }),
|
|
40842
40904
|
/* @__PURE__ */ jsx134("span", { className: "text-xs text-muted-foreground", children: templates.length === 0 ? "none yet" : `${templates.length}` }),
|
|
@@ -41049,8 +41111,8 @@ function ChecklistTemplateEditor({
|
|
|
41049
41111
|
onDone?.();
|
|
41050
41112
|
}, [client, onDone, onSaved, spec, savedId]);
|
|
41051
41113
|
const change = (index, patch) => setRows((held) => held.map((row, i) => i === index ? { ...row, ...patch } : row));
|
|
41052
|
-
if (loading) return /* @__PURE__ */ jsx134(Skeleton19, { className:
|
|
41053
|
-
return /* @__PURE__ */ jsxs121("section", { className:
|
|
41114
|
+
if (loading) return /* @__PURE__ */ jsx134(Skeleton19, { className: cn68("h-48 w-full", className) });
|
|
41115
|
+
return /* @__PURE__ */ jsxs121("section", { className: cn68("flex flex-col gap-2", className), "data-testid": "checklist-editor", children: [
|
|
41054
41116
|
/* @__PURE__ */ jsxs121("header", { className: "flex items-center gap-2", children: [
|
|
41055
41117
|
/* @__PURE__ */ jsx134("h3", { className: "text-sm font-medium", children: templateId ? "Change this checklist" : "Write a checklist" }),
|
|
41056
41118
|
/* @__PURE__ */ jsx134(Button82, { size: "sm", variant: "ghost", className: "ml-auto", onClick: () => onDone?.(), children: "Cancel" })
|
|
@@ -41689,7 +41751,7 @@ function ActionInbox({
|
|
|
41689
41751
|
}
|
|
41690
41752
|
},
|
|
41691
41753
|
"data-selected": selected.has(item.item_id) ? "true" : void 0,
|
|
41692
|
-
className:
|
|
41754
|
+
className: cn69(
|
|
41693
41755
|
"flex flex-col gap-1 rounded border p-2",
|
|
41694
41756
|
index === cursor ? "border-primary bg-accent/40" : "border-border",
|
|
41695
41757
|
selected.has(item.item_id) ? "bg-primary/10" : "",
|
|
@@ -41716,7 +41778,7 @@ function ActionInbox({
|
|
|
41716
41778
|
item.due_state ? /* @__PURE__ */ jsx135(
|
|
41717
41779
|
"span",
|
|
41718
41780
|
{
|
|
41719
|
-
className:
|
|
41781
|
+
className: cn69(
|
|
41720
41782
|
"shrink-0 text-[11px]",
|
|
41721
41783
|
item.due_state === "overdue" ? "text-destructive" : "text-muted-foreground"
|
|
41722
41784
|
),
|
|
@@ -41840,11 +41902,11 @@ function ActionInbox({
|
|
|
41840
41902
|
item.item_id
|
|
41841
41903
|
);
|
|
41842
41904
|
};
|
|
41843
|
-
if (items === null) return /* @__PURE__ */ jsx135(Skeleton20, { className:
|
|
41905
|
+
if (items === null) return /* @__PURE__ */ jsx135(Skeleton20, { className: cn69("h-32 w-full", className) });
|
|
41844
41906
|
return /* @__PURE__ */ jsxs122(
|
|
41845
41907
|
"section",
|
|
41846
41908
|
{
|
|
41847
|
-
className:
|
|
41909
|
+
className: cn69("@container flex min-h-0 flex-col gap-2 outline-none", className),
|
|
41848
41910
|
tabIndex: 0,
|
|
41849
41911
|
onKeyDown,
|
|
41850
41912
|
"aria-label": "Inbox",
|
|
@@ -41865,7 +41927,7 @@ function ActionInbox({
|
|
|
41865
41927
|
setSelected(/* @__PURE__ */ new Set());
|
|
41866
41928
|
setSnoozing(null);
|
|
41867
41929
|
},
|
|
41868
|
-
className:
|
|
41930
|
+
className: cn69(
|
|
41869
41931
|
"flex items-baseline gap-1 whitespace-nowrap rounded px-1.5 py-0.5 text-xs",
|
|
41870
41932
|
view === v ? "bg-accent font-medium text-foreground" : "text-muted-foreground"
|
|
41871
41933
|
),
|
|
@@ -41890,7 +41952,7 @@ function ActionInbox({
|
|
|
41890
41952
|
type: "button",
|
|
41891
41953
|
"aria-pressed": groupBy === g,
|
|
41892
41954
|
onClick: () => setGroupBy(g),
|
|
41893
|
-
className:
|
|
41955
|
+
className: cn69(
|
|
41894
41956
|
"whitespace-nowrap rounded px-1.5 py-0.5 text-[11px]",
|
|
41895
41957
|
groupBy === g ? "bg-accent font-medium text-foreground" : "text-muted-foreground"
|
|
41896
41958
|
),
|
|
@@ -42072,14 +42134,14 @@ import {
|
|
|
42072
42134
|
useRecordsClient as useRecordsClient80,
|
|
42073
42135
|
useTable as useTable25
|
|
42074
42136
|
} from "@ai-matrx/records/react";
|
|
42075
|
-
import { Badge as Badge19, Button as Button86, Skeleton as Skeleton22, cn as
|
|
42137
|
+
import { Badge as Badge19, Button as Button86, Skeleton as Skeleton22, cn as cn72 } from "@ai-matrx/design-system";
|
|
42076
42138
|
import { formatRelativeTime as formatRelativeTime3 } from "@ai-matrx/kit/format";
|
|
42077
42139
|
|
|
42078
42140
|
// src/AsOfReading.tsx
|
|
42079
42141
|
import { useEffect as useEffect94, useMemo as useMemo65, useState as useState113 } from "react";
|
|
42080
42142
|
import { readTypedDate as readTypedDate3, typedDateText as typedDateText3 } from "@ai-matrx/records";
|
|
42081
42143
|
import { useRecordsClient as useRecordsClient78 } from "@ai-matrx/records/react";
|
|
42082
|
-
import { Button as Button84, Skeleton as Skeleton21, cn as
|
|
42144
|
+
import { Button as Button84, Skeleton as Skeleton21, cn as cn70 } from "@ai-matrx/design-system";
|
|
42083
42145
|
import { Button as ControlButton2, Field as ControlField } from "@ai-matrx/design-system/controls";
|
|
42084
42146
|
import { humanizeIdentifier as humanizeIdentifier16 } from "@ai-matrx/kit/text-case";
|
|
42085
42147
|
import { Fragment as Fragment53, jsx as jsx136, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
@@ -42119,7 +42181,7 @@ function AsOfControl({ value, onChange, className }) {
|
|
|
42119
42181
|
setText(typedDateText3(read.day));
|
|
42120
42182
|
onChange({ day: read.day, clock });
|
|
42121
42183
|
}
|
|
42122
|
-
return /* @__PURE__ */ jsxs123("div", { className:
|
|
42184
|
+
return /* @__PURE__ */ jsxs123("div", { className: cn70("flex h-6 items-center gap-1", className), "data-records-as-of": "", children: [
|
|
42123
42185
|
/* @__PURE__ */ jsx136(
|
|
42124
42186
|
ControlField,
|
|
42125
42187
|
{
|
|
@@ -42168,7 +42230,7 @@ function AsOfControl({ value, onChange, className }) {
|
|
|
42168
42230
|
{
|
|
42169
42231
|
size: "sm",
|
|
42170
42232
|
variant: "ghost",
|
|
42171
|
-
className:
|
|
42233
|
+
className: cn70("h-6 whitespace-nowrap px-1.5 text-[11px]", !value && "invisible"),
|
|
42172
42234
|
"aria-hidden": !value,
|
|
42173
42235
|
tabIndex: value ? 0 : -1,
|
|
42174
42236
|
onClick: () => {
|
|
@@ -42214,18 +42276,18 @@ function AsOfReading({
|
|
|
42214
42276
|
};
|
|
42215
42277
|
}, [client, key]);
|
|
42216
42278
|
const rows = useMemo65(() => answer && "doc" in answer && answer.doc ? asOfRows(fields, answer.doc, today) : [], [answer, fields, today]);
|
|
42217
|
-
const box =
|
|
42279
|
+
const box = cn70("h-[9.25rem] min-h-0 overflow-y-auto rounded border", className);
|
|
42218
42280
|
if (!answer || answer.key !== key) return /* @__PURE__ */ jsx136(Skeleton21, { shape: "block", className: box });
|
|
42219
42281
|
if ("error" in answer) return /* @__PURE__ */ jsx136(RefusalNotice, { error: answer.error, className });
|
|
42220
42282
|
if (answer.doc === null) {
|
|
42221
|
-
return /* @__PURE__ */ jsxs123("p", { className:
|
|
42283
|
+
return /* @__PURE__ */ jsxs123("p", { className: cn70(box, "p-2 text-xs text-muted-foreground"), "data-records-as-of-none": "", children: [
|
|
42222
42284
|
"Not there on ",
|
|
42223
42285
|
typedDateText3(asOf.day)
|
|
42224
42286
|
] });
|
|
42225
42287
|
}
|
|
42226
|
-
return /* @__PURE__ */ jsx136("dl", { className:
|
|
42288
|
+
return /* @__PURE__ */ jsx136("dl", { className: cn70(box, "grid grid-cols-[minmax(5rem,9rem)_1fr] content-start gap-x-3 gap-y-0.5 p-2 text-[11px]"), "data-records-as-of-reading": "", children: rows.map(({ field: field2, was, now, differs }) => /* @__PURE__ */ jsxs123("div", { className: "contents", "data-as-of-field": field2.key, "data-as-of-differs": differs ? "" : void 0, children: [
|
|
42227
42289
|
/* @__PURE__ */ jsx136("dt", { className: "truncate text-muted-foreground", title: fieldName(field2) || humanizeIdentifier16(field2.key), children: fieldName(field2) || humanizeIdentifier16(field2.key) }),
|
|
42228
|
-
/* @__PURE__ */ jsx136("dd", { className:
|
|
42290
|
+
/* @__PURE__ */ jsx136("dd", { className: cn70("min-w-0 truncate", differs && "rounded bg-amber-500/10 px-1"), children: differs ? /* @__PURE__ */ jsxs123(Fragment53, { children: [
|
|
42229
42291
|
/* @__PURE__ */ jsx136("span", { className: "font-medium", children: isEmpty2(was) ? "nothing" : scalarText(field2, was) }),
|
|
42230
42292
|
/* @__PURE__ */ jsx136("span", { className: "mx-1 text-muted-foreground", children: "\u2192" }),
|
|
42231
42293
|
/* @__PURE__ */ jsx136("span", { className: "text-muted-foreground", children: isEmpty2(now) ? "nothing" : scalarText(field2, now) }),
|
|
@@ -42240,7 +42302,7 @@ import { humanizeIdentifier as humanizeIdentifier18 } from "@ai-matrx/kit/text-c
|
|
|
42240
42302
|
// src/MigrationLog.tsx
|
|
42241
42303
|
import { useCallback as useCallback46, useEffect as useEffect95, useState as useState114 } from "react";
|
|
42242
42304
|
import { useRecordsClient as useRecordsClient79 } from "@ai-matrx/records/react";
|
|
42243
|
-
import { Button as Button85, cn as
|
|
42305
|
+
import { Button as Button85, cn as cn71 } from "@ai-matrx/design-system";
|
|
42244
42306
|
import { humanizeIdentifier as humanizeIdentifier17 } from "@ai-matrx/kit/text-case";
|
|
42245
42307
|
import { jsx as jsx137, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
42246
42308
|
var MAKES_A_RECORD = /* @__PURE__ */ new Set(["split", "extract_parent", "extract"]);
|
|
@@ -42292,7 +42354,7 @@ function MigrationLog({ entries, readError, canUndo, whyNotUndo, onUndone, class
|
|
|
42292
42354
|
const [busy, setBusy] = useState114(null);
|
|
42293
42355
|
const [error, setError] = useState114(null);
|
|
42294
42356
|
if (readError) {
|
|
42295
|
-
return /* @__PURE__ */ jsxs124("section", { "aria-label": "Migration log", className:
|
|
42357
|
+
return /* @__PURE__ */ jsxs124("section", { "aria-label": "Migration log", className: cn71("flex flex-col gap-1", className), children: [
|
|
42296
42358
|
/* @__PURE__ */ jsx137("h4", { className: "text-xs font-medium", children: "Migration log" }),
|
|
42297
42359
|
/* @__PURE__ */ jsx137(RefusalLine, { error: readError })
|
|
42298
42360
|
] });
|
|
@@ -42310,7 +42372,7 @@ function MigrationLog({ entries, readError, canUndo, whyNotUndo, onUndone, class
|
|
|
42310
42372
|
const removed = back.data.removed ? " The record it made is archived, so no copy is left behind." : "";
|
|
42311
42373
|
await onUndone(`${migrationWords(entry.verb)} undone.${removed}`);
|
|
42312
42374
|
}
|
|
42313
|
-
return /* @__PURE__ */ jsxs124("section", { "aria-label": "Migration log", className:
|
|
42375
|
+
return /* @__PURE__ */ jsxs124("section", { "aria-label": "Migration log", className: cn71("flex flex-col gap-1", className), "data-records-migration-log": "", children: [
|
|
42314
42376
|
/* @__PURE__ */ jsx137("h4", { className: "text-xs font-medium", children: "Migration log" }),
|
|
42315
42377
|
/* @__PURE__ */ jsx137("ul", { className: "flex flex-col divide-y rounded border text-xs", children: entries.map((entry) => /* @__PURE__ */ jsxs124("li", { "data-migration-id": entry.id, className: "flex items-center gap-2 px-2 py-1.5", children: [
|
|
42316
42378
|
/* @__PURE__ */ jsx137("span", { className: "shrink-0 font-medium", children: migrationWords(entry.verb) }),
|
|
@@ -42439,7 +42501,7 @@ function HistoryPanel({ tableId, recordId, onAskAboutField, className }) {
|
|
|
42439
42501
|
);
|
|
42440
42502
|
await load();
|
|
42441
42503
|
}
|
|
42442
|
-
return /* @__PURE__ */ jsxs125("section", { className:
|
|
42504
|
+
return /* @__PURE__ */ jsxs125("section", { className: cn72("flex min-h-0 flex-col gap-2", className), children: [
|
|
42443
42505
|
/* @__PURE__ */ jsxs125("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
42444
42506
|
/* @__PURE__ */ jsx138("h3", { className: "text-sm font-medium", children: "History" }),
|
|
42445
42507
|
/* @__PURE__ */ jsxs125("span", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -42788,7 +42850,7 @@ import {
|
|
|
42788
42850
|
useRecordsClient as useRecordsClient81,
|
|
42789
42851
|
useTable as useTable26
|
|
42790
42852
|
} from "@ai-matrx/records/react";
|
|
42791
|
-
import { Badge as Badge20, Button as Button87, Skeleton as Skeleton23, Textarea as Textarea6, cn as
|
|
42853
|
+
import { Badge as Badge20, Button as Button87, Skeleton as Skeleton23, Textarea as Textarea6, cn as cn73 } from "@ai-matrx/design-system";
|
|
42792
42854
|
import { humanizeIdentifier as humanizeIdentifier19 } from "@ai-matrx/kit/text-case";
|
|
42793
42855
|
import { jsx as jsx139, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
42794
42856
|
function CommentThread({ tableId, recordId, fieldKey, className }) {
|
|
@@ -42889,7 +42951,7 @@ function CommentThread({ tableId, recordId, fieldKey, className }) {
|
|
|
42889
42951
|
}
|
|
42890
42952
|
await load();
|
|
42891
42953
|
}
|
|
42892
|
-
return /* @__PURE__ */ jsxs126("section", { className:
|
|
42954
|
+
return /* @__PURE__ */ jsxs126("section", { className: cn73("flex min-h-0 flex-col gap-2", className), children: [
|
|
42893
42955
|
/* @__PURE__ */ jsxs126("div", { className: "flex items-baseline gap-2", children: [
|
|
42894
42956
|
/* @__PURE__ */ jsx139("h3", { className: "text-sm font-medium", children: fieldLabel ? `Comments on ${fieldLabel}` : "Comments" }),
|
|
42895
42957
|
/* @__PURE__ */ jsx139("span", { className: "text-xs text-muted-foreground", children: shown5.length }),
|
|
@@ -43032,7 +43094,7 @@ import {
|
|
|
43032
43094
|
useRecordsClient as useRecordsClient82,
|
|
43033
43095
|
useTable as useTable27
|
|
43034
43096
|
} from "@ai-matrx/records/react";
|
|
43035
|
-
import { Badge as Badge21, Button as Button88, Skeleton as Skeleton24, cn as
|
|
43097
|
+
import { Badge as Badge21, Button as Button88, Skeleton as Skeleton24, cn as cn74 } from "@ai-matrx/design-system";
|
|
43036
43098
|
import { humanizeIdentifier as humanizeIdentifier20 } from "@ai-matrx/kit/text-case";
|
|
43037
43099
|
import { Fragment as Fragment55, jsx as jsx140, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
43038
43100
|
function FieldHistoryPanel({
|
|
@@ -43068,7 +43130,7 @@ function FieldHistoryPanel({
|
|
|
43068
43130
|
}, [load]);
|
|
43069
43131
|
const label = (fields.data ?? []).find((f) => f.key === fieldKey)?.label || humanizeIdentifier20(fieldKey);
|
|
43070
43132
|
if (error) return /* @__PURE__ */ jsx140(RefusalNotice, { error, className });
|
|
43071
|
-
if (!rows || fields.loading && !fields.data || table.loading && !table.data) return /* @__PURE__ */ jsx140(Skeleton24, { className:
|
|
43133
|
+
if (!rows || fields.loading && !fields.data || table.loading && !table.data) return /* @__PURE__ */ jsx140(Skeleton24, { className: cn74("h-40 w-full", className) });
|
|
43072
43134
|
async function start(row, back = false) {
|
|
43073
43135
|
setSaid(null);
|
|
43074
43136
|
const target = back ? row.version - 1 : row.version;
|
|
@@ -43099,7 +43161,7 @@ function FieldHistoryPanel({
|
|
|
43099
43161
|
);
|
|
43100
43162
|
await load();
|
|
43101
43163
|
}
|
|
43102
|
-
return /* @__PURE__ */ jsxs127("section", { className:
|
|
43164
|
+
return /* @__PURE__ */ jsxs127("section", { className: cn74("flex min-h-0 flex-col gap-2", className), children: [
|
|
43103
43165
|
/* @__PURE__ */ jsxs127("div", { className: "flex items-baseline gap-2", children: [
|
|
43104
43166
|
/* @__PURE__ */ jsxs127("h3", { className: "text-sm font-medium", children: [
|
|
43105
43167
|
"Who changed ",
|
|
@@ -43200,7 +43262,7 @@ import { FORM_FLOWS as FORM_FLOWS2, FORM_EMBEDS as FORM_EMBEDS2, formDeclareArgs
|
|
|
43200
43262
|
// src/FormResultsPanel.tsx
|
|
43201
43263
|
import { useEffect as useEffect99, useMemo as useMemo67, useState as useState118 } from "react";
|
|
43202
43264
|
import { useFields as useFields26, useOptionalRecordsClient as useOptionalRecordsClient19 } from "@ai-matrx/records/react";
|
|
43203
|
-
import { Button as Button89, Skeleton as Skeleton25, cn as
|
|
43265
|
+
import { Button as Button89, Skeleton as Skeleton25, cn as cn75 } from "@ai-matrx/design-system";
|
|
43204
43266
|
import { jsx as jsx141, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
43205
43267
|
var CHARTED_KINDS = /* @__PURE__ */ new Set(["select", "multi_select", "checkbox", "number", "currency", "percent", "member", "relation"]);
|
|
43206
43268
|
function dropOffBlock(results, label) {
|
|
@@ -43257,9 +43319,9 @@ function FormResultsPanel({ form, className }) {
|
|
|
43257
43319
|
return (key) => asks.get(key)?.trim() || (byKey.get(key) ? fieldName(byKey.get(key)) : key);
|
|
43258
43320
|
}, [fields.data, form.questions]);
|
|
43259
43321
|
if (error) return /* @__PURE__ */ jsx141(RefusalNotice, { error, className });
|
|
43260
|
-
if (!results) return /* @__PURE__ */ jsx141(Skeleton25, { className:
|
|
43322
|
+
if (!results) return /* @__PURE__ */ jsx141(Skeleton25, { className: cn75("h-48 w-full", className) });
|
|
43261
43323
|
const endingTitle = (id) => id ? (form.endings ?? []).find((e) => e.id === id)?.title ?? id : form.thankYou?.title ?? "Thank you";
|
|
43262
|
-
return /* @__PURE__ */ jsxs128("section", { className:
|
|
43324
|
+
return /* @__PURE__ */ jsxs128("section", { className: cn75("flex flex-col gap-3", className), "aria-label": "Results", "data-records-form-results": "", children: [
|
|
43263
43325
|
/* @__PURE__ */ jsxs128("div", { className: "flex items-center gap-2", children: [
|
|
43264
43326
|
/* @__PURE__ */ jsx141("span", { className: "text-sm font-medium", children: "Results" }),
|
|
43265
43327
|
/* @__PURE__ */ jsx141(Button89, { size: "sm", variant: "ghost", className: "ml-auto", onClick: () => setRound((n) => n + 1), children: "Refresh" })
|
|
@@ -43327,7 +43389,7 @@ function FormResultsPanel({ form, className }) {
|
|
|
43327
43389
|
// src/PortalBuilder.tsx
|
|
43328
43390
|
import { useCallback as useCallback50, useEffect as useEffect100, useMemo as useMemo68, useRef as useRef57, useState as useState119 } from "react";
|
|
43329
43391
|
import { useRecordsClient as useRecordsClient83, useTables as useTables4 } from "@ai-matrx/records/react";
|
|
43330
|
-
import { BasicInput as BasicInput23, Button as Button90, Checkbox as Checkbox14, Label as Label20, Separator as Separator10, Skeleton as Skeleton26, cn as
|
|
43392
|
+
import { BasicInput as BasicInput23, Button as Button90, Checkbox as Checkbox14, Label as Label20, Separator as Separator10, Skeleton as Skeleton26, cn as cn76 } from "@ai-matrx/design-system";
|
|
43331
43393
|
import { Select as Select21 } from "@ai-matrx/design-system/controls";
|
|
43332
43394
|
import { Fragment as Fragment56, jsx as jsx142, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
43333
43395
|
var RESTATING_REPLACES = "Saving replaces what this portal shows: a table you untick stops being visible to every client the moment you save. Who is invited is not touched.";
|
|
@@ -43505,7 +43567,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
|
|
|
43505
43567
|
setInviteEmail("");
|
|
43506
43568
|
setInviteRecordId("");
|
|
43507
43569
|
}
|
|
43508
|
-
if (tables.loading || loading) return /* @__PURE__ */ jsx142(Skeleton26, { className:
|
|
43570
|
+
if (tables.loading || loading) return /* @__PURE__ */ jsx142(Skeleton26, { className: cn76("h-64 w-full", className) });
|
|
43509
43571
|
const all = tablePickerEntries(tables.data ?? []).entries.map((e) => e.table);
|
|
43510
43572
|
const missingTie = ticked.filter((e) => e.namesVia.trim() === "");
|
|
43511
43573
|
const ready = clientTableId !== null && ticked.length > 0 && missingTie.length === 0;
|
|
@@ -43513,7 +43575,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
|
|
|
43513
43575
|
const missingTieName = firstMissing ? all.find((t) => t.id === firstMissing.tableId)?.name : void 0;
|
|
43514
43576
|
const missingHasNoLink = firstMissing ? tiesTo(firstMissing.tableId).length === 0 : false;
|
|
43515
43577
|
const notReady = clientTableId === null ? "Pick the table that holds your clients" : ticked.length === 0 ? "Tick a table your clients can see" : missingTieName ? (missingHasNoLink ? `Add a link to your clients on ${missingTieName}` : `Pick whose row it is on ${missingTieName}`).slice(0, 60) : null;
|
|
43516
|
-
return /* @__PURE__ */ jsxs129("section", { className:
|
|
43578
|
+
return /* @__PURE__ */ jsxs129("section", { className: cn76("@container flex flex-col gap-3", className), children: [
|
|
43517
43579
|
/* @__PURE__ */ jsxs129("header", { className: "flex items-center gap-2", children: [
|
|
43518
43580
|
/* @__PURE__ */ jsx142("h3", { className: "text-sm font-medium", children: existing ? "Portal" : "New client portal" }),
|
|
43519
43581
|
/* @__PURE__ */ jsx142("div", { className: "flex-1" }),
|
|
@@ -43726,20 +43788,20 @@ import {
|
|
|
43726
43788
|
portalPath,
|
|
43727
43789
|
portalTitleTypedBack as portalTitleTypedBack2
|
|
43728
43790
|
} from "@ai-matrx/records";
|
|
43729
|
-
import { Badge as Badge22, BasicInput as BasicInput25, Button as Button92, Separator as Separator11, Skeleton as Skeleton27, cn as
|
|
43791
|
+
import { Badge as Badge22, BasicInput as BasicInput25, Button as Button92, Separator as Separator11, Skeleton as Skeleton27, cn as cn79 } from "@ai-matrx/design-system";
|
|
43730
43792
|
|
|
43731
43793
|
// src/PortalLookEditor.tsx
|
|
43732
43794
|
import { useEffect as useEffect101, useMemo as useMemo69, useState as useState120 } from "react";
|
|
43733
43795
|
import { useRecordsClient as useRecordsClient84 } from "@ai-matrx/records/react";
|
|
43734
|
-
import { BasicInput as BasicInput24, Button as Button91, cn as
|
|
43796
|
+
import { BasicInput as BasicInput24, Button as Button91, cn as cn78 } from "@ai-matrx/design-system";
|
|
43735
43797
|
|
|
43736
43798
|
// src/PublicPicturePicker.tsx
|
|
43737
|
-
import { cn as
|
|
43799
|
+
import { cn as cn77 } from "@ai-matrx/design-system";
|
|
43738
43800
|
import { jsx as jsx143, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
43739
43801
|
function PublicPicturePicker({ label, pictures, value, onChange, noneLabel, className }) {
|
|
43740
43802
|
const chosen = value ?? "";
|
|
43741
43803
|
const lost = chosen !== "" && !pictures.some((p) => p.file_id === chosen);
|
|
43742
|
-
return /* @__PURE__ */ jsxs130("div", { className:
|
|
43804
|
+
return /* @__PURE__ */ jsxs130("div", { className: cn77("flex flex-col gap-1", className), children: [
|
|
43743
43805
|
/* @__PURE__ */ jsxs130("div", { className: "flex max-h-40 flex-wrap gap-1.5 overflow-y-auto", role: "radiogroup", "aria-label": label, children: [
|
|
43744
43806
|
/* @__PURE__ */ jsx143(
|
|
43745
43807
|
"button",
|
|
@@ -43748,7 +43810,7 @@ function PublicPicturePicker({ label, pictures, value, onChange, noneLabel, clas
|
|
|
43748
43810
|
role: "radio",
|
|
43749
43811
|
"aria-checked": chosen === "" || lost,
|
|
43750
43812
|
onClick: () => onChange(""),
|
|
43751
|
-
className:
|
|
43813
|
+
className: cn77(
|
|
43752
43814
|
"h-12 rounded border px-2 text-xs",
|
|
43753
43815
|
chosen === "" ? "border-foreground" : "border-border text-muted-foreground"
|
|
43754
43816
|
),
|
|
@@ -43764,7 +43826,7 @@ function PublicPicturePicker({ label, pictures, value, onChange, noneLabel, clas
|
|
|
43764
43826
|
"aria-label": p.name,
|
|
43765
43827
|
title: p.name,
|
|
43766
43828
|
onClick: () => onChange(p.file_id),
|
|
43767
|
-
className:
|
|
43829
|
+
className: cn77(
|
|
43768
43830
|
"h-12 w-12 overflow-hidden rounded border-2 bg-muted",
|
|
43769
43831
|
chosen === p.file_id ? "border-foreground" : "border-transparent"
|
|
43770
43832
|
),
|
|
@@ -43889,7 +43951,7 @@ function PortalLookEditor({ card, onSaved, className }) {
|
|
|
43889
43951
|
setSaid("Saved. Clients see this the next time a portal page opens.");
|
|
43890
43952
|
onSaved();
|
|
43891
43953
|
}
|
|
43892
|
-
return /* @__PURE__ */ jsxs131("section", { className:
|
|
43954
|
+
return /* @__PURE__ */ jsxs131("section", { className: cn78("flex flex-col gap-2", className), "aria-label": "Look and forms", children: [
|
|
43893
43955
|
/* @__PURE__ */ jsx144("h4", { className: "text-xs font-medium", children: "How the portal looks" }),
|
|
43894
43956
|
/* @__PURE__ */ jsxs131("label", { className: "flex flex-col gap-1 text-xs", children: [
|
|
43895
43957
|
/* @__PURE__ */ jsx144("span", { children: "Business name clients see" }),
|
|
@@ -44088,7 +44150,7 @@ function PortalsPanel({ tableId, activePortalId, className }) {
|
|
|
44088
44150
|
useEffect102(() => {
|
|
44089
44151
|
void load();
|
|
44090
44152
|
}, [load]);
|
|
44091
|
-
if (portals === null) return /* @__PURE__ */ jsx145(Skeleton27, { className:
|
|
44153
|
+
if (portals === null) return /* @__PURE__ */ jsx145(Skeleton27, { className: cn79("h-32 w-full", className) });
|
|
44092
44154
|
const onATable = Boolean(tableId);
|
|
44093
44155
|
const holdingThis = new Set(
|
|
44094
44156
|
exposures.filter((e) => e.table_id === tableId).map((e) => e.portal_id)
|
|
@@ -44097,7 +44159,7 @@ function PortalsPanel({ tableId, activePortalId, className }) {
|
|
|
44097
44159
|
const couldTakeIt = onATable ? portals.filter((p) => !holdingThis.has(p.portal_id)) : [];
|
|
44098
44160
|
const elsewhere = couldTakeIt.length;
|
|
44099
44161
|
const origin = host.publicOrigin ?? (typeof window === "undefined" ? "" : window.location.origin);
|
|
44100
|
-
return /* @__PURE__ */ jsxs132("section", { className:
|
|
44162
|
+
return /* @__PURE__ */ jsxs132("section", { className: cn79("flex flex-col gap-3", className), children: [
|
|
44101
44163
|
/* @__PURE__ */ jsxs132("header", { className: "flex items-center gap-2", children: [
|
|
44102
44164
|
/* @__PURE__ */ jsx145("h3", { className: "text-sm font-medium", children: "Portals" }),
|
|
44103
44165
|
/* @__PURE__ */ jsx145("span", { className: "text-xs text-muted-foreground", children: shown5.length === 0 ? "none for this table" : `${shown5.length}` }),
|
|
@@ -44176,7 +44238,7 @@ function PortalsPanel({ tableId, activePortalId, className }) {
|
|
|
44176
44238
|
{
|
|
44177
44239
|
"data-linked": linked ? "true" : void 0,
|
|
44178
44240
|
ref: linked ? (el) => el?.scrollIntoView({ block: "nearest" }) : void 0,
|
|
44179
|
-
className:
|
|
44241
|
+
className: cn79(
|
|
44180
44242
|
"rounded-md border border-border bg-card p-2.5",
|
|
44181
44243
|
linked && "border-primary ring-1 ring-primary"
|
|
44182
44244
|
),
|
|
@@ -44431,7 +44493,7 @@ function PortalCardView({
|
|
|
44431
44493
|
origin,
|
|
44432
44494
|
className
|
|
44433
44495
|
}) {
|
|
44434
|
-
return /* @__PURE__ */ jsxs132("div", { className:
|
|
44496
|
+
return /* @__PURE__ */ jsxs132("div", { className: cn79("mt-2.5 flex flex-col gap-2.5 border-t border-border pt-2.5", className), children: [
|
|
44435
44497
|
card.external_lane_open ? null : /* @__PURE__ */ jsx145("p", { className: "rounded border border-destructive/40 px-2 py-1.5 text-xs text-destructive", children: "This organization's outside door is closed, so nobody in this portal can sign in yet \u2014 whatever their row below says. Re-stating the portal opens it." }),
|
|
44436
44498
|
/* @__PURE__ */ jsxs132("section", { className: "flex flex-col gap-1.5", children: [
|
|
44437
44499
|
/* @__PURE__ */ jsx145("h4", { className: "text-xs font-medium", children: "What they see" }),
|
|
@@ -44716,7 +44778,7 @@ function Invite({ card, onInvited }) {
|
|
|
44716
44778
|
}
|
|
44717
44779
|
|
|
44718
44780
|
// src/FormLookFrame.tsx
|
|
44719
|
-
import { cn as
|
|
44781
|
+
import { cn as cn80 } from "@ai-matrx/design-system";
|
|
44720
44782
|
import { SWATCH_CLASS as SWATCH_CLASS5 } from "@ai-matrx/design-system/data-table";
|
|
44721
44783
|
import { jsx as jsx146, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
44722
44784
|
var ACCENT_PRIMARY = {
|
|
@@ -44771,7 +44833,7 @@ function FormLookLogo({ view, size = "md" }) {
|
|
|
44771
44833
|
width: size === "sm" ? 36 : 48,
|
|
44772
44834
|
height: size === "sm" ? 36 : 48,
|
|
44773
44835
|
"data-records-form-logo": "",
|
|
44774
|
-
className:
|
|
44836
|
+
className: cn80(box, "shrink-0 rounded-lg border border-border bg-card object-contain")
|
|
44775
44837
|
}
|
|
44776
44838
|
);
|
|
44777
44839
|
}
|
|
@@ -44780,7 +44842,7 @@ function FormLookLogo({ view, size = "md" }) {
|
|
|
44780
44842
|
{
|
|
44781
44843
|
"aria-hidden": true,
|
|
44782
44844
|
"data-records-form-logo": "",
|
|
44783
|
-
className:
|
|
44845
|
+
className: cn80(box, "inline-flex shrink-0 items-center justify-center rounded-lg font-semibold", view.monogramClass),
|
|
44784
44846
|
children: monogram(view.name)
|
|
44785
44847
|
}
|
|
44786
44848
|
);
|
|
@@ -44791,14 +44853,14 @@ function FormLookFrame({ look, title, children, contained = false, showOwnerHead
|
|
|
44791
44853
|
"div",
|
|
44792
44854
|
{
|
|
44793
44855
|
"data-records-form-look": "",
|
|
44794
|
-
className:
|
|
44856
|
+
className: cn80("relative flex w-full flex-col gap-4", contained && "pt-2", className),
|
|
44795
44857
|
style: view.primaryVars ?? void 0,
|
|
44796
44858
|
children: [
|
|
44797
44859
|
view.bandClass ? /* @__PURE__ */ jsx146(
|
|
44798
44860
|
"div",
|
|
44799
44861
|
{
|
|
44800
44862
|
"aria-hidden": true,
|
|
44801
|
-
className:
|
|
44863
|
+
className: cn80(contained ? "absolute inset-x-0 top-0 h-1 rounded-t" : "fixed inset-x-0 top-0 z-10 h-1", view.bandClass)
|
|
44802
44864
|
}
|
|
44803
44865
|
) : null,
|
|
44804
44866
|
view.coverUrl ? /* @__PURE__ */ jsx146("div", { "data-records-form-cover": "", className: "aspect-[3/1] w-full overflow-hidden rounded-xl border border-border bg-muted", children: /* @__PURE__ */ jsx146("img", { src: view.coverUrl, alt: "", className: "h-full w-full object-cover" }) }) : null,
|
|
@@ -44828,7 +44890,7 @@ function FormLookFrame({ look, title, children, contained = false, showOwnerHead
|
|
|
44828
44890
|
import { useCallback as useCallback52, useEffect as useEffect103, useMemo as useMemo71, useState as useState122 } from "react";
|
|
44829
44891
|
import { useRecordsClient as useRecordsClient86, useTable as useTable28 } from "@ai-matrx/records/react";
|
|
44830
44892
|
import { hasQuietHours } from "@ai-matrx/records";
|
|
44831
|
-
import { BasicInput as BasicInput26, Button as Button93, Checkbox as Checkbox15, Label as Label21, Separator as Separator12, Skeleton as Skeleton28, cn as
|
|
44893
|
+
import { BasicInput as BasicInput26, Button as Button93, Checkbox as Checkbox15, Label as Label21, Separator as Separator12, Skeleton as Skeleton28, cn as cn81 } from "@ai-matrx/design-system";
|
|
44832
44894
|
import { Select as Select22 } from "@ai-matrx/design-system/controls";
|
|
44833
44895
|
|
|
44834
44896
|
// src/scheduleWords.ts
|
|
@@ -45011,8 +45073,8 @@ function DigestScheduler({
|
|
|
45011
45073
|
}
|
|
45012
45074
|
setPreview(answered.data);
|
|
45013
45075
|
}
|
|
45014
|
-
if (views === null && !error) return /* @__PURE__ */ jsx147(Skeleton28, { className:
|
|
45015
|
-
return /* @__PURE__ */ jsxs134("section", { className:
|
|
45076
|
+
if (views === null && !error) return /* @__PURE__ */ jsx147(Skeleton28, { className: cn81("h-56 w-full", className) });
|
|
45077
|
+
return /* @__PURE__ */ jsxs134("section", { className: cn81("@container flex flex-col gap-3", className), children: [
|
|
45016
45078
|
/* @__PURE__ */ jsxs134("header", { className: "flex items-center gap-2", children: [
|
|
45017
45079
|
/* @__PURE__ */ jsx147("h3", { className: "text-sm font-medium", children: existing ? "Change this summary" : "Send this on a schedule" }),
|
|
45018
45080
|
/* @__PURE__ */ jsx147("div", { className: "flex-1" }),
|
|
@@ -45204,12 +45266,12 @@ function DigestScheduler({
|
|
|
45204
45266
|
import { useCallback as useCallback54, useEffect as useEffect105, useState as useState124 } from "react";
|
|
45205
45267
|
import { useRecordsClient as useRecordsClient88 } from "@ai-matrx/records/react";
|
|
45206
45268
|
import { hasQuietHours as hasQuietHours2 } from "@ai-matrx/records";
|
|
45207
|
-
import { Badge as Badge23, Button as Button95, Skeleton as Skeleton30, Switch as Switch6, cn as
|
|
45269
|
+
import { Badge as Badge23, Button as Button95, Skeleton as Skeleton30, Switch as Switch6, cn as cn83 } from "@ai-matrx/design-system";
|
|
45208
45270
|
|
|
45209
45271
|
// src/WebhooksPanel.tsx
|
|
45210
45272
|
import { useCallback as useCallback53, useEffect as useEffect104, useState as useState123 } from "react";
|
|
45211
45273
|
import { useRecordsClient as useRecordsClient87, useTable as useTable29 } from "@ai-matrx/records/react";
|
|
45212
|
-
import { BasicInput as BasicInput27, Button as Button94, Checkbox as Checkbox16, ConfirmDialog as ConfirmDialog7, Label as Label22, Skeleton as Skeleton29, cn as
|
|
45274
|
+
import { BasicInput as BasicInput27, Button as Button94, Checkbox as Checkbox16, ConfirmDialog as ConfirmDialog7, Label as Label22, Skeleton as Skeleton29, cn as cn82 } from "@ai-matrx/design-system";
|
|
45213
45275
|
import { jsx as jsx148, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
45214
45276
|
var WEBHOOK_EVENT_LABEL = {
|
|
45215
45277
|
"record.created": "A record is added",
|
|
@@ -45277,10 +45339,10 @@ function WebhooksPanel({ tableId, className }) {
|
|
|
45277
45339
|
setEvents(DEFAULT_EVENTS);
|
|
45278
45340
|
await load();
|
|
45279
45341
|
};
|
|
45280
|
-
if (hooks === null) return /* @__PURE__ */ jsx148(Skeleton29, { className:
|
|
45342
|
+
if (hooks === null) return /* @__PURE__ */ jsx148(Skeleton29, { className: cn82("h-16 w-full", className) });
|
|
45281
45343
|
const notHers = readRefused?.sqlstate === "42501" && rights.known && !rights.structure;
|
|
45282
45344
|
if (notHers) {
|
|
45283
|
-
return /* @__PURE__ */ jsxs135("section", { "data-records-webhooks": "", className:
|
|
45345
|
+
return /* @__PURE__ */ jsxs135("section", { "data-records-webhooks": "", className: cn82("flex flex-col gap-2 border-t pt-3", className), children: [
|
|
45284
45346
|
/* @__PURE__ */ jsx148("header", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx148("h3", { className: "text-sm font-medium", children: "Webhooks" }) }),
|
|
45285
45347
|
/* @__PURE__ */ jsxs135("p", { className: "text-xs text-muted-foreground", children: [
|
|
45286
45348
|
"Which other systems are told about these records is for this table's admins.",
|
|
@@ -45291,7 +45353,7 @@ function WebhooksPanel({ tableId, className }) {
|
|
|
45291
45353
|
}
|
|
45292
45354
|
const mayChange = rights.structure;
|
|
45293
45355
|
const live = hooks.filter((h) => h.is_active);
|
|
45294
|
-
return /* @__PURE__ */ jsxs135("section", { "data-records-webhooks": "", className:
|
|
45356
|
+
return /* @__PURE__ */ jsxs135("section", { "data-records-webhooks": "", className: cn82("flex flex-col gap-2 border-t pt-3", className), children: [
|
|
45295
45357
|
/* @__PURE__ */ jsxs135("header", { className: "flex items-center gap-2", children: [
|
|
45296
45358
|
/* @__PURE__ */ jsx148("h3", { className: "text-sm font-medium", children: "Webhooks" }),
|
|
45297
45359
|
/* @__PURE__ */ jsx148("span", { className: "text-xs text-muted-foreground", children: live.length === 0 ? "none" : `${live.length} sending` }),
|
|
@@ -45474,8 +45536,8 @@ function SubscriptionsPanel({ tableId, activeRuleId, className }) {
|
|
|
45474
45536
|
},
|
|
45475
45537
|
[client]
|
|
45476
45538
|
);
|
|
45477
|
-
if (rows === null) return /* @__PURE__ */ jsx149(Skeleton30, { className:
|
|
45478
|
-
return /* @__PURE__ */ jsxs136("section", { className:
|
|
45539
|
+
if (rows === null) return /* @__PURE__ */ jsx149(Skeleton30, { className: cn83("h-32 w-full", className) });
|
|
45540
|
+
return /* @__PURE__ */ jsxs136("section", { className: cn83("flex flex-col gap-3", className), children: [
|
|
45479
45541
|
/* @__PURE__ */ jsxs136("header", { className: "flex items-center gap-2", children: [
|
|
45480
45542
|
/* @__PURE__ */ jsx149("h3", { className: "text-sm font-medium", children: "Notifications" }),
|
|
45481
45543
|
/* @__PURE__ */ jsx149("span", { className: "text-xs text-muted-foreground", children: rows.length === 0 ? "none" : `${rows.filter((r) => !r.muted).length} on` }),
|
|
@@ -45532,7 +45594,7 @@ function SubscriptionsPanel({ tableId, activeRuleId, className }) {
|
|
|
45532
45594
|
{
|
|
45533
45595
|
"data-linked": subscription.rule_id === activeRuleId ? "true" : void 0,
|
|
45534
45596
|
ref: subscription.rule_id === activeRuleId ? (el) => el?.scrollIntoView({ block: "nearest" }) : void 0,
|
|
45535
|
-
className:
|
|
45597
|
+
className: cn83(
|
|
45536
45598
|
"rounded-md border p-2.5",
|
|
45537
45599
|
subscription.rule_id === activeRuleId && "border-primary ring-1 ring-primary"
|
|
45538
45600
|
),
|
|
@@ -45646,7 +45708,7 @@ import {
|
|
|
45646
45708
|
Checkbox as Checkbox17,
|
|
45647
45709
|
Label as Label25,
|
|
45648
45710
|
Skeleton as Skeleton32,
|
|
45649
|
-
cn as
|
|
45711
|
+
cn as cn85
|
|
45650
45712
|
} from "@ai-matrx/design-system";
|
|
45651
45713
|
|
|
45652
45714
|
// src/FormFlowEditor.tsx
|
|
@@ -45908,7 +45970,7 @@ function EmbedSnippets({ url, label }) {
|
|
|
45908
45970
|
// src/FormRunner.tsx
|
|
45909
45971
|
import { useCallback as useCallback55, useEffect as useEffect106, useMemo as useMemo72, useRef as useRef58, useState as useState126 } from "react";
|
|
45910
45972
|
import { useFields as useFields27, useOptionalRecordsClient as useOptionalRecordsClient20 } from "@ai-matrx/records/react";
|
|
45911
|
-
import { Button as Button97, Label as Label24, Progress, Skeleton as Skeleton31, cn as
|
|
45973
|
+
import { Button as Button97, Label as Label24, Progress, Skeleton as Skeleton31, cn as cn84, formThemeClasses } from "@ai-matrx/design-system";
|
|
45912
45974
|
import { answerRefusal, formRoutes, pipeAnswers, submissionStamp } from "@ai-matrx/records/forms";
|
|
45913
45975
|
import { humanizeIdentifier as humanizeIdentifier21 } from "@ai-matrx/kit/text-case";
|
|
45914
45976
|
import { Fragment as Fragment60, jsx as jsx151, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
@@ -45982,7 +46044,7 @@ function ConnectedFormRunner(props) {
|
|
|
45982
46044
|
[client, form.subject, form.questions, form.endings]
|
|
45983
46045
|
);
|
|
45984
46046
|
if (fields.error) return /* @__PURE__ */ jsx151(RefusalNotice, { error: fields.error, className });
|
|
45985
|
-
if (fields.loading && !fields.data) return /* @__PURE__ */ jsx151(Skeleton31, { className:
|
|
46047
|
+
if (fields.loading && !fields.data) return /* @__PURE__ */ jsx151(Skeleton31, { className: cn84("h-40 w-full", className) });
|
|
45986
46048
|
return /* @__PURE__ */ jsx151(
|
|
45987
46049
|
FormStage,
|
|
45988
46050
|
{
|
|
@@ -46307,7 +46369,7 @@ function FormStage({
|
|
|
46307
46369
|
ending: (form.endings ?? []).find((e) => e.id === ending) ?? null,
|
|
46308
46370
|
buttonClass: theme.buttonClass,
|
|
46309
46371
|
pipe,
|
|
46310
|
-
className:
|
|
46372
|
+
className: cn84("mx-auto max-w-xl py-10", centred && "text-center", className)
|
|
46311
46373
|
}
|
|
46312
46374
|
);
|
|
46313
46375
|
}
|
|
@@ -46318,7 +46380,7 @@ function FormStage({
|
|
|
46318
46380
|
return /* @__PURE__ */ jsxs138(
|
|
46319
46381
|
"section",
|
|
46320
46382
|
{
|
|
46321
|
-
className:
|
|
46383
|
+
className: cn84("mx-auto flex min-h-[min(70dvh,640px)] w-full max-w-2xl flex-col justify-center gap-4 py-8", theme.surface, theme.background !== "plain" && "rounded-lg px-5", centred && "items-center text-center", className),
|
|
46322
46384
|
style: theme.surfaceStyle,
|
|
46323
46385
|
"data-records-form-welcome": "",
|
|
46324
46386
|
children: [
|
|
@@ -46334,7 +46396,7 @@ function FormStage({
|
|
|
46334
46396
|
return /* @__PURE__ */ jsxs138(
|
|
46335
46397
|
"section",
|
|
46336
46398
|
{
|
|
46337
|
-
className:
|
|
46399
|
+
className: cn84(
|
|
46338
46400
|
"mx-auto flex w-full max-w-2xl flex-col gap-4 py-4",
|
|
46339
46401
|
// TYPEFORM'S SIZE (TYPEFORM-2): one question at a time fills the screen, centred in it.
|
|
46340
46402
|
oneAtATime && "min-h-[min(70dvh,640px)]",
|
|
@@ -46357,7 +46419,7 @@ function FormStage({
|
|
|
46357
46419
|
...routeKnown ? { "aria-valuetext": oneAtATime ? `${index + 1} of ${live.length}` : `${answered} of ${live.length}` } : {}
|
|
46358
46420
|
}
|
|
46359
46421
|
),
|
|
46360
|
-
/* @__PURE__ */ jsx151("span", { className:
|
|
46422
|
+
/* @__PURE__ */ jsx151("span", { className: cn84("min-w-[3.5rem] text-right tabular-nums", !routeKnown && "invisible"), "data-records-form-count": "", children: oneAtATime ? `${index + 1} of ${live.length}` : `${answered} of ${live.length}` })
|
|
46361
46423
|
] }),
|
|
46362
46424
|
signedInPublic ? /* @__PURE__ */ jsx151(
|
|
46363
46425
|
"p",
|
|
@@ -46440,7 +46502,7 @@ function FormStage({
|
|
|
46440
46502
|
}
|
|
46441
46503
|
)
|
|
46442
46504
|
] }) : null,
|
|
46443
|
-
/* @__PURE__ */ jsxs138("footer", { className:
|
|
46505
|
+
/* @__PURE__ */ jsxs138("footer", { className: cn84("flex flex-wrap items-center gap-3", centred && "justify-center"), children: [
|
|
46444
46506
|
oneAtATime && index > 0 ? /* @__PURE__ */ jsx151(Button97, { size: "lg", variant: "ghost", className: theme.buttonClass, onClick: retreat, children: "Back" }) : null,
|
|
46445
46507
|
oneAtATime && index < live.length - 1 ? /* @__PURE__ */ jsx151(Button97, { size: "lg", className: theme.buttonClass, onClick: () => void advance(), children: "Next" }) : /* @__PURE__ */ jsx151(Button97, { size: "lg", className: theme.buttonClass, disabled: writing, onClick: () => void (oneAtATime ? advance() : submit()), children: writing ? "Sending\u2026" : form.submitLabel ?? "Submit" }),
|
|
46446
46508
|
oneAtATime ? /* @__PURE__ */ jsxs138("span", { className: "hidden text-xs text-muted-foreground sm:inline", "data-records-form-enter-hint": "", children: [
|
|
@@ -46495,7 +46557,7 @@ function ThankYou({
|
|
|
46495
46557
|
{
|
|
46496
46558
|
href: redirect,
|
|
46497
46559
|
"data-records-form-next": "",
|
|
46498
|
-
className:
|
|
46560
|
+
className: cn84("inline-flex min-h-10 items-center rounded-md bg-primary px-4 font-medium text-primary-foreground", buttonClass),
|
|
46499
46561
|
children: ending?.buttonLabel || "Continue"
|
|
46500
46562
|
}
|
|
46501
46563
|
),
|
|
@@ -46528,7 +46590,7 @@ function Question({
|
|
|
46528
46590
|
return /* @__PURE__ */ jsxs138(
|
|
46529
46591
|
"div",
|
|
46530
46592
|
{
|
|
46531
|
-
className:
|
|
46593
|
+
className: cn84(
|
|
46532
46594
|
"flex flex-col",
|
|
46533
46595
|
large ? "gap-3 [&_input]:text-base [&_textarea]:text-base [&_input]:min-h-12" : "gap-1.5 [&_input]:text-base [&_textarea]:text-base"
|
|
46534
46596
|
),
|
|
@@ -46536,11 +46598,11 @@ function Question({
|
|
|
46536
46598
|
"aria-describedby": refused ? sayId : void 0,
|
|
46537
46599
|
children: [
|
|
46538
46600
|
/* @__PURE__ */ jsxs138("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
|
|
46539
|
-
/* @__PURE__ */ jsx151(Label24, { htmlFor: id, className:
|
|
46601
|
+
/* @__PURE__ */ jsx151(Label24, { htmlFor: id, className: cn84("font-medium leading-snug text-foreground", large ? "text-xl sm:text-2xl" : "text-base"), children: question.ask }),
|
|
46540
46602
|
question.required ? /* @__PURE__ */ jsx151("span", { className: "text-sm text-foreground/80", children: "required" }) : null,
|
|
46541
46603
|
field2.unit ? /* @__PURE__ */ jsx151("span", { className: "text-sm text-foreground/70", children: field2.unit }) : null
|
|
46542
46604
|
] }),
|
|
46543
|
-
question.help ? /* @__PURE__ */ jsx151("p", { className:
|
|
46605
|
+
question.help ? /* @__PURE__ */ jsx151("p", { className: cn84("text-muted-foreground", large ? "text-base" : "text-sm"), children: authored(host, question.help, "form-help") }) : null,
|
|
46544
46606
|
isAttachment && !upload ? /* @__PURE__ */ jsx151("p", { className: "w-fit rounded border border-dashed px-2 py-0.5 text-xs text-muted-foreground", title: NO_UPLOAD_REASON, children: "File upload unavailable here" }) : isAttachment ? /* @__PURE__ */ jsxs138(Fragment60, { children: [
|
|
46545
46607
|
/* @__PURE__ */ jsx151(
|
|
46546
46608
|
"input",
|
|
@@ -46904,17 +46966,17 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
|
|
|
46904
46966
|
}
|
|
46905
46967
|
);
|
|
46906
46968
|
}
|
|
46907
|
-
if (fields.loading || forms === null) return /* @__PURE__ */ jsx152(Skeleton32, { className:
|
|
46969
|
+
if (fields.loading || forms === null) return /* @__PURE__ */ jsx152(Skeleton32, { className: cn85("h-64 w-full", className) });
|
|
46908
46970
|
if (createOnMount && (makeOnMount === "waiting" || makeOnMount === "making") && !refused) {
|
|
46909
|
-
return /* @__PURE__ */ jsx152(Skeleton32, { className:
|
|
46971
|
+
return /* @__PURE__ */ jsx152(Skeleton32, { className: cn85("h-64 w-full", className) });
|
|
46910
46972
|
}
|
|
46911
46973
|
if (!rights.admin) {
|
|
46912
|
-
return /* @__PURE__ */ jsx152("p", { className:
|
|
46974
|
+
return /* @__PURE__ */ jsx152("p", { className: cn85("text-xs text-muted-foreground", className), children: rights.why("structure") });
|
|
46913
46975
|
}
|
|
46914
46976
|
return (
|
|
46915
46977
|
// THE CONTAINER IS THE PARENT (TYPEFORM-2): a container query asks an ANCESTOR, so `@3xl:` on the
|
|
46916
46978
|
// element that is itself `@container` never fired and the preview sat 3,000 px below the editor.
|
|
46917
|
-
/* @__PURE__ */ jsx152("div", { className:
|
|
46979
|
+
/* @__PURE__ */ jsx152("div", { className: cn85("@container min-h-0", className), children: /* @__PURE__ */ jsxs139("div", { className: "flex min-h-0 flex-col gap-3 @3xl:flex-row @3xl:items-start", children: [
|
|
46918
46980
|
/* @__PURE__ */ jsxs139("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
|
|
46919
46981
|
/* @__PURE__ */ jsxs139("div", { className: "flex items-center gap-1 overflow-x-auto", role: "group", "aria-label": "Forms", children: [
|
|
46920
46982
|
forms.map((form) => /* @__PURE__ */ jsx152(
|
|
@@ -47380,7 +47442,7 @@ function QuestionRow({
|
|
|
47380
47442
|
{
|
|
47381
47443
|
ref: sortable.setNodeRef,
|
|
47382
47444
|
style: { transform: CSS3.Transform.toString(sortable.transform), transition: sortable.transition },
|
|
47383
|
-
className:
|
|
47445
|
+
className: cn85("rounded border bg-background px-2 py-1.5", sortable.isDragging && "z-10 shadow-md"),
|
|
47384
47446
|
"data-records-form-question-row": question.field,
|
|
47385
47447
|
children: [
|
|
47386
47448
|
/* @__PURE__ */ jsxs139("div", { className: "flex items-center gap-2", children: [
|
|
@@ -47561,7 +47623,7 @@ function NotifyOnAnswer({
|
|
|
47561
47623
|
/* @__PURE__ */ jsxs139(
|
|
47562
47624
|
"label",
|
|
47563
47625
|
{
|
|
47564
|
-
className:
|
|
47626
|
+
className: cn85("flex items-center gap-2", !emailQuestion && "text-muted-foreground"),
|
|
47565
47627
|
title: emailQuestion ? "An email to the person who answered, in your ending's words." : "Add an email question first.",
|
|
47566
47628
|
children: [
|
|
47567
47629
|
/* @__PURE__ */ jsx152(
|
|
@@ -47606,7 +47668,7 @@ function NotifyOnAnswer({
|
|
|
47606
47668
|
// src/DocTemplate.tsx
|
|
47607
47669
|
import { useCallback as useCallback57, useEffect as useEffect108, useState as useState128 } from "react";
|
|
47608
47670
|
import { useFields as useFields29, useRecordsClient as useRecordsClient90, useTable as useTable31 } from "@ai-matrx/records/react";
|
|
47609
|
-
import { BasicInput as BasicInput30, BasicTextarea as BasicTextarea12, Button as Button99, Label as Label26, Skeleton as Skeleton33, cn as
|
|
47671
|
+
import { BasicInput as BasicInput30, BasicTextarea as BasicTextarea12, Button as Button99, Label as Label26, Skeleton as Skeleton33, cn as cn86 } from "@ai-matrx/design-system";
|
|
47610
47672
|
import { jsx as jsx153, jsxs as jsxs140 } from "react/jsx-runtime";
|
|
47611
47673
|
function DocTemplate({ tableId, seed, activeTemplateId, onActiveTemplate, className }) {
|
|
47612
47674
|
const client = useRecordsClient90();
|
|
@@ -47704,11 +47766,11 @@ function DocTemplate({ tableId, seed, activeTemplateId, onActiveTemplate, classN
|
|
|
47704
47766
|
}
|
|
47705
47767
|
);
|
|
47706
47768
|
}
|
|
47707
|
-
if (templates === null || fields.loading && !fields.data) return /* @__PURE__ */ jsx153(Skeleton33, { className:
|
|
47769
|
+
if (templates === null || fields.loading && !fields.data) return /* @__PURE__ */ jsx153(Skeleton33, { className: cn86("h-64 w-full", className) });
|
|
47708
47770
|
if (!rights.admin) {
|
|
47709
|
-
return /* @__PURE__ */ jsx153("p", { className:
|
|
47771
|
+
return /* @__PURE__ */ jsx153("p", { className: cn86("text-xs text-muted-foreground", className), children: rights.why("structure") });
|
|
47710
47772
|
}
|
|
47711
|
-
return /* @__PURE__ */ jsxs140("div", { className:
|
|
47773
|
+
return /* @__PURE__ */ jsxs140("div", { className: cn86("flex flex-col gap-2", className), children: [
|
|
47712
47774
|
/* @__PURE__ */ jsxs140("div", { className: "flex items-center gap-1 overflow-x-auto", role: "group", "aria-label": "Templates", children: [
|
|
47713
47775
|
templates.map((t) => /* @__PURE__ */ jsxs140(
|
|
47714
47776
|
Button99,
|
|
@@ -47790,7 +47852,7 @@ function DocTemplate({ tableId, seed, activeTemplateId, onActiveTemplate, classN
|
|
|
47790
47852
|
// src/DocRender.tsx
|
|
47791
47853
|
import { useCallback as useCallback58, useEffect as useEffect109, useRef as useRef60, useState as useState129 } from "react";
|
|
47792
47854
|
import { useRecordsClient as useRecordsClient91 } from "@ai-matrx/records/react";
|
|
47793
|
-
import { Button as Button100, Skeleton as Skeleton34, cn as
|
|
47855
|
+
import { Button as Button100, Skeleton as Skeleton34, cn as cn87 } from "@ai-matrx/design-system";
|
|
47794
47856
|
import { jsx as jsx154, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
47795
47857
|
function DocRender({ templateId, recordId, filename, onRendered, className }) {
|
|
47796
47858
|
const client = useRecordsClient91();
|
|
@@ -47866,10 +47928,10 @@ function DocRender({ templateId, recordId, filename, onRendered, className }) {
|
|
|
47866
47928
|
}
|
|
47867
47929
|
);
|
|
47868
47930
|
}
|
|
47869
|
-
if (preview === null || renders === null) return /* @__PURE__ */ jsx154(Skeleton34, { className:
|
|
47931
|
+
if (preview === null || renders === null) return /* @__PURE__ */ jsx154(Skeleton34, { className: cn87("h-64 w-full", className) });
|
|
47870
47932
|
const frozen = showing ? renders.find((r) => r.id === showing) ?? null : null;
|
|
47871
47933
|
const text = frozen ? frozen.body : preview;
|
|
47872
|
-
return /* @__PURE__ */ jsxs141("div", { className:
|
|
47934
|
+
return /* @__PURE__ */ jsxs141("div", { className: cn87("flex flex-col gap-2", className), children: [
|
|
47873
47935
|
/* @__PURE__ */ jsxs141("div", { className: "flex items-center gap-1 text-xs", children: [
|
|
47874
47936
|
/* @__PURE__ */ jsx154(
|
|
47875
47937
|
Button100,
|
|
@@ -47906,7 +47968,7 @@ function DocRender({ templateId, recordId, filename, onRendered, className }) {
|
|
|
47906
47968
|
// src/SignBlock.tsx
|
|
47907
47969
|
import { useCallback as useCallback59, useEffect as useEffect110, useState as useState130 } from "react";
|
|
47908
47970
|
import { useFields as useFields30, useRecordsClient as useRecordsClient92 } from "@ai-matrx/records/react";
|
|
47909
|
-
import { BasicInput as BasicInput31, Button as Button101, Skeleton as Skeleton35, cn as
|
|
47971
|
+
import { BasicInput as BasicInput31, Button as Button101, Skeleton as Skeleton35, cn as cn88 } from "@ai-matrx/design-system";
|
|
47910
47972
|
import { useTable as useTable32 } from "@ai-matrx/records/react";
|
|
47911
47973
|
import { jsx as jsx155, jsxs as jsxs142 } from "react/jsx-runtime";
|
|
47912
47974
|
function SignBlock({ tableId, recordId, render, className }) {
|
|
@@ -47965,9 +48027,9 @@ function SignBlock({ tableId, recordId, render, className }) {
|
|
|
47965
48027
|
}
|
|
47966
48028
|
);
|
|
47967
48029
|
}
|
|
47968
|
-
if (fields.loading || signatures === null) return /* @__PURE__ */ jsx155(Skeleton35, { className:
|
|
48030
|
+
if (fields.loading || signatures === null) return /* @__PURE__ */ jsx155(Skeleton35, { className: cn88("h-32 w-full", className) });
|
|
47969
48031
|
const signable = (fields.data ?? []).filter(isSignatureField);
|
|
47970
|
-
return /* @__PURE__ */ jsxs142("div", { className:
|
|
48032
|
+
return /* @__PURE__ */ jsxs142("div", { className: cn88("flex flex-col gap-2", className), children: [
|
|
47971
48033
|
/* @__PURE__ */ jsxs142("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
47972
48034
|
/* @__PURE__ */ jsx155("span", { className: "font-medium text-foreground", children: "Signatures" }),
|
|
47973
48035
|
/* @__PURE__ */ jsxs142("span", { children: [
|
|
@@ -48058,7 +48120,7 @@ function SignBlock({ tableId, recordId, render, className }) {
|
|
|
48058
48120
|
import { useCallback as useCallback60, useEffect as useEffect111, useState as useState131 } from "react";
|
|
48059
48121
|
import { useRecordsClient as useRecordsClient93, useTable as useTable33 } from "@ai-matrx/records/react";
|
|
48060
48122
|
import { hasQuietHours as hasQuietHours3 } from "@ai-matrx/records";
|
|
48061
|
-
import { Button as Button102, Skeleton as Skeleton36, cn as
|
|
48123
|
+
import { Button as Button102, Skeleton as Skeleton36, cn as cn89 } from "@ai-matrx/design-system";
|
|
48062
48124
|
import { Select as Select24 } from "@ai-matrx/design-system/controls";
|
|
48063
48125
|
import { jsx as jsx156, jsxs as jsxs143 } from "react/jsx-runtime";
|
|
48064
48126
|
var CADENCE_WORDS2 = SUBSCRIPTION_CADENCE_LABEL;
|
|
@@ -48193,8 +48255,8 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
|
|
|
48193
48255
|
}
|
|
48194
48256
|
);
|
|
48195
48257
|
}
|
|
48196
|
-
if (subscriptions === null) return /* @__PURE__ */ jsx156(Skeleton36, { className:
|
|
48197
|
-
return /* @__PURE__ */ jsxs143("div", { className:
|
|
48258
|
+
if (subscriptions === null) return /* @__PURE__ */ jsx156(Skeleton36, { className: cn89("h-40 w-full", className) });
|
|
48259
|
+
return /* @__PURE__ */ jsxs143("div", { className: cn89("flex flex-col gap-2", className), children: [
|
|
48198
48260
|
/* @__PURE__ */ jsxs143("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
48199
48261
|
/* @__PURE__ */ jsx156("span", { className: "font-medium text-foreground", children: "Tell me when" }),
|
|
48200
48262
|
/* @__PURE__ */ jsxs143("span", { children: [
|
|
@@ -48235,7 +48297,7 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
|
|
|
48235
48297
|
children: "Use for this form"
|
|
48236
48298
|
}
|
|
48237
48299
|
) : null,
|
|
48238
|
-
rights.write && !(onChoose && held.rule_id === chosenRuleId) && stopping === held.rule_id ? /* @__PURE__ */ jsxs143("span", { className:
|
|
48300
|
+
rights.write && !(onChoose && held.rule_id === chosenRuleId) && stopping === held.rule_id ? /* @__PURE__ */ jsxs143("span", { className: cn89("flex flex-wrap items-center gap-2", onChoose ? void 0 : "ml-auto"), children: [
|
|
48239
48301
|
/* @__PURE__ */ jsx156("span", { className: "text-xs text-destructive", children: archiveConfirmSentence("this subscription") }),
|
|
48240
48302
|
/* @__PURE__ */ jsx156(Button102, { size: "sm", variant: "destructive", disabled: busy, onClick: () => void unsubscribe(held.rule_id), children: "Stop telling me" }),
|
|
48241
48303
|
/* @__PURE__ */ jsx156(Button102, { size: "sm", variant: "ghost", onClick: () => setStopping(null), children: "Keep it" })
|
|
@@ -48355,7 +48417,7 @@ import {
|
|
|
48355
48417
|
SelectTrigger as SelectTrigger19,
|
|
48356
48418
|
SelectValue as SelectValue19,
|
|
48357
48419
|
Skeleton as Skeleton37,
|
|
48358
|
-
cn as
|
|
48420
|
+
cn as cn91
|
|
48359
48421
|
} from "@ai-matrx/design-system";
|
|
48360
48422
|
|
|
48361
48423
|
// src/DashboardGrid.tsx
|
|
@@ -48374,7 +48436,7 @@ import {
|
|
|
48374
48436
|
useSortable as useSortable3
|
|
48375
48437
|
} from "@dnd-kit/sortable";
|
|
48376
48438
|
import { CSS as CSS4 } from "@dnd-kit/utilities";
|
|
48377
|
-
import { cn as
|
|
48439
|
+
import { cn as cn90 } from "@ai-matrx/design-system";
|
|
48378
48440
|
import { Select as Select25 } from "@ai-matrx/design-system/controls";
|
|
48379
48441
|
|
|
48380
48442
|
// src/dashboardLayout.ts
|
|
@@ -48466,7 +48528,7 @@ function GridCell2({
|
|
|
48466
48528
|
ref: sortable.setNodeRef,
|
|
48467
48529
|
style,
|
|
48468
48530
|
"data-testid": `dashboard-block-${index}`,
|
|
48469
|
-
className:
|
|
48531
|
+
className: cn90(
|
|
48470
48532
|
"group/block relative flex min-w-0 flex-col gap-1",
|
|
48471
48533
|
spanClass(item.span),
|
|
48472
48534
|
arranging && "rounded-md ring-1 ring-border",
|
|
@@ -48887,9 +48949,9 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, createOnMount, on
|
|
|
48887
48949
|
}
|
|
48888
48950
|
const spansTables = new Set((board?.blocks ?? []).map((b) => b.subject ?? tableId)).size > 1;
|
|
48889
48951
|
const rightsPending = !rights.known && (table.loading || !!table.data && !table.error);
|
|
48890
|
-
if (boards === null || rightsPending) return /* @__PURE__ */ jsx159(Skeleton37, { className:
|
|
48952
|
+
if (boards === null || rightsPending) return /* @__PURE__ */ jsx159(Skeleton37, { className: cn91("h-64 w-full", className) });
|
|
48891
48953
|
const PageLink = host.Link;
|
|
48892
|
-
return /* @__PURE__ */ jsxs146("div", { className:
|
|
48954
|
+
return /* @__PURE__ */ jsxs146("div", { className: cn91("flex min-h-0 flex-col gap-2", className), children: [
|
|
48893
48955
|
/* @__PURE__ */ jsxs146("div", { className: "flex flex-wrap items-center gap-1", role: "group", "aria-label": "Dashboards", children: [
|
|
48894
48956
|
boards.map((d) => /* @__PURE__ */ jsx159(
|
|
48895
48957
|
Button104,
|
|
@@ -49351,7 +49413,7 @@ function TargetControl({
|
|
|
49351
49413
|
// src/QuestionPanel.tsx
|
|
49352
49414
|
import { copyText as copyText9 } from "@ai-matrx/kit/clipboard";
|
|
49353
49415
|
import { useEffect as useEffect113, useMemo as useMemo76, useRef as useRef61, useState as useState134 } from "react";
|
|
49354
|
-
import { Badge as Badge24, BasicInput as BasicInput33, Button as Button105, Checkbox as Checkbox18, Label as Label27, Skeleton as Skeleton38, cn as
|
|
49416
|
+
import { Badge as Badge24, BasicInput as BasicInput33, Button as Button105, Checkbox as Checkbox18, Label as Label27, Skeleton as Skeleton38, cn as cn92 } from "@ai-matrx/design-system";
|
|
49355
49417
|
import { useFields as useFields33, useRecordsClient as useRecordsClient96 } from "@ai-matrx/records/react";
|
|
49356
49418
|
|
|
49357
49419
|
// src/question.ts
|
|
@@ -49524,7 +49586,7 @@ function QuestionPanel({ tableId, activeQuestionId, draft, className }) {
|
|
|
49524
49586
|
void copyText9(url.toString());
|
|
49525
49587
|
};
|
|
49526
49588
|
if (fields.loading || hidden === null) {
|
|
49527
|
-
return /* @__PURE__ */ jsxs147("div", { className:
|
|
49589
|
+
return /* @__PURE__ */ jsxs147("div", { className: cn92("flex flex-col gap-2 p-3", className), "data-testid": "question-panel", children: [
|
|
49528
49590
|
/* @__PURE__ */ jsx160(Skeleton38, { className: "h-8 w-full" }),
|
|
49529
49591
|
/* @__PURE__ */ jsx160(Skeleton38, { className: "h-32 w-full" })
|
|
49530
49592
|
] });
|
|
@@ -49533,7 +49595,7 @@ function QuestionPanel({ tableId, activeQuestionId, draft, className }) {
|
|
|
49533
49595
|
{ value: "", label: "New question" },
|
|
49534
49596
|
...(saved ?? []).map((q) => ({ value: q.id, label: q.name, group: q.shared ? "Shared" : "Only me" }))
|
|
49535
49597
|
];
|
|
49536
|
-
return /* @__PURE__ */ jsxs147("div", { className:
|
|
49598
|
+
return /* @__PURE__ */ jsxs147("div", { className: cn92("flex min-h-0 flex-col gap-3 p-3 text-xs", className), "data-testid": "question-panel", children: [
|
|
49537
49599
|
/* @__PURE__ */ jsxs147("div", { className: "flex flex-wrap items-center gap-1.5", children: [
|
|
49538
49600
|
/* @__PURE__ */ jsx160(
|
|
49539
49601
|
PickOne,
|
|
@@ -49659,7 +49721,7 @@ function QuestionPanel({ tableId, activeQuestionId, draft, className }) {
|
|
|
49659
49721
|
)) })
|
|
49660
49722
|
] }) : null
|
|
49661
49723
|
] }),
|
|
49662
|
-
/* @__PURE__ */ jsx160("div", { className:
|
|
49724
|
+
/* @__PURE__ */ jsx160("div", { className: cn92("min-h-24 rounded-md border p-2 transition-opacity", asking && "opacity-60"), "data-testid": "question-answer", "aria-busy": asking, children: answer === null ? /* @__PURE__ */ jsx160(Skeleton38, { className: "h-16 w-full" }) : !answer.ok ? /* @__PURE__ */ jsx160(RefusalNotice, { error: answer.error }) : /* @__PURE__ */ jsx160(QuestionAnswerView, { tableId, spec, answer: answer.data, fields: all, related }) })
|
|
49663
49725
|
] });
|
|
49664
49726
|
}
|
|
49665
49727
|
function Measures({ measures, fields, onChange }) {
|
|
@@ -50333,7 +50395,7 @@ import {
|
|
|
50333
50395
|
useRowActions as useRowActions2
|
|
50334
50396
|
} from "@ai-matrx/records/react";
|
|
50335
50397
|
import { onRecordChanged as onRecordChanged2 } from "@ai-matrx/records/core";
|
|
50336
|
-
import { BasicInput as BasicInput35, Button as Button107, Checkbox as Checkbox19, Skeleton as Skeleton40, cn as
|
|
50398
|
+
import { BasicInput as BasicInput35, Button as Button107, Checkbox as Checkbox19, Skeleton as Skeleton40, cn as cn93 } from "@ai-matrx/design-system";
|
|
50337
50399
|
import { formFromSummary as formFromSummary2 } from "@ai-matrx/records/forms";
|
|
50338
50400
|
import { Fragment as Fragment65, jsx as jsx162, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
50339
50401
|
var EDIT_LEVELS = /* @__PURE__ */ new Set(["edit_content", "editor", "admin", "owner"]);
|
|
@@ -50473,9 +50535,9 @@ function PageScreen({
|
|
|
50473
50535
|
}, [client, page, onArchived]);
|
|
50474
50536
|
if (error) return /* @__PURE__ */ jsx162(RefusalNotice, { error, className });
|
|
50475
50537
|
if (missing) {
|
|
50476
|
-
return /* @__PURE__ */ jsx162("p", { className:
|
|
50538
|
+
return /* @__PURE__ */ jsx162("p", { className: cn93("p-4 text-sm text-muted-foreground", className), "data-records-page-missing": "", children: "This page is archived or not shared with you." });
|
|
50477
50539
|
}
|
|
50478
|
-
if (!page) return /* @__PURE__ */ jsx162(Skeleton40, { className:
|
|
50540
|
+
if (!page) return /* @__PURE__ */ jsx162(Skeleton40, { className: cn93("h-64 w-full", className) });
|
|
50479
50541
|
const filtersFor = (listId) => {
|
|
50480
50542
|
const out = {};
|
|
50481
50543
|
for (const b of blocks) {
|
|
@@ -50518,7 +50580,7 @@ function PageScreen({
|
|
|
50518
50580
|
) : null,
|
|
50519
50581
|
organizationId ? /* @__PURE__ */ jsx162(ShareControl, { kind: "record", organizationId, subjectId: page.id, name: page.name }) : null
|
|
50520
50582
|
] });
|
|
50521
|
-
return /* @__PURE__ */ jsxs149("div", { className:
|
|
50583
|
+
return /* @__PURE__ */ jsxs149("div", { className: cn93("flex min-h-0 flex-col gap-2", className), "data-records-page": page.id, children: [
|
|
50522
50584
|
header ? header({ name: page.name, actions }) : /* @__PURE__ */ jsxs149("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
50523
50585
|
/* @__PURE__ */ jsx162("h1", { className: "min-w-0 flex-1 truncate text-base font-medium", children: page.name }),
|
|
50524
50586
|
actions
|
|
@@ -50792,7 +50854,7 @@ function ListBlockView({
|
|
|
50792
50854
|
onSelect(row.id);
|
|
50793
50855
|
}
|
|
50794
50856
|
},
|
|
50795
|
-
className:
|
|
50857
|
+
className: cn93(
|
|
50796
50858
|
"cursor-pointer border-t hover:bg-muted/60",
|
|
50797
50859
|
row.id === selected && "bg-primary/10 hover:bg-primary/15"
|
|
50798
50860
|
),
|
|
@@ -51116,7 +51178,7 @@ import { copyText as copyText10 } from "@ai-matrx/kit/clipboard";
|
|
|
51116
51178
|
import { useCallback as useCallback63, useEffect as useEffect116, useState as useState137 } from "react";
|
|
51117
51179
|
import { useRecordsClient as useRecordsClient99, useTable as useTable37 } from "@ai-matrx/records/react";
|
|
51118
51180
|
import { publicFormPath as publicFormPath2 } from "@ai-matrx/records";
|
|
51119
|
-
import { Badge as Badge25, Button as Button108, Skeleton as Skeleton41, cn as
|
|
51181
|
+
import { Badge as Badge25, Button as Button108, Skeleton as Skeleton41, cn as cn94 } from "@ai-matrx/design-system";
|
|
51120
51182
|
import { FORM_STATE_WORDS as FORM_STATE_WORDS2 } from "@ai-matrx/records/forms";
|
|
51121
51183
|
import { Fragment as Fragment66, jsx as jsx163, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
51122
51184
|
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.";
|
|
@@ -51179,9 +51241,9 @@ function FormsPanel({ tableId, activeFormId, className }) {
|
|
|
51179
51241
|
setShown(url);
|
|
51180
51242
|
}
|
|
51181
51243
|
}, []);
|
|
51182
|
-
if (forms === null) return /* @__PURE__ */ jsx163(Skeleton41, { className:
|
|
51244
|
+
if (forms === null) return /* @__PURE__ */ jsx163(Skeleton41, { className: cn94("h-32 w-full", className) });
|
|
51183
51245
|
const origin = host.publicOrigin ?? (typeof window === "undefined" ? "" : window.location.origin);
|
|
51184
|
-
return /* @__PURE__ */ jsxs150("section", { className:
|
|
51246
|
+
return /* @__PURE__ */ jsxs150("section", { className: cn94("flex flex-col gap-3", className), children: [
|
|
51185
51247
|
/* @__PURE__ */ jsxs150("header", { className: "flex items-center gap-2", children: [
|
|
51186
51248
|
/* @__PURE__ */ jsx163("h3", { className: "text-sm font-medium", children: "Forms" }),
|
|
51187
51249
|
/* @__PURE__ */ jsx163("span", { className: "text-xs text-muted-foreground", children: forms.length === 0 ? "none yet" : `${forms.length}` }),
|
|
@@ -51227,7 +51289,7 @@ function FormsPanel({ tableId, activeFormId, className }) {
|
|
|
51227
51289
|
{
|
|
51228
51290
|
"data-linked": form.form_id === activeFormId ? "true" : void 0,
|
|
51229
51291
|
ref: form.form_id === activeFormId ? (el) => el?.scrollIntoView({ block: "nearest" }) : void 0,
|
|
51230
|
-
className:
|
|
51292
|
+
className: cn94(
|
|
51231
51293
|
"rounded-md border p-2.5",
|
|
51232
51294
|
form.form_id === activeFormId && "border-primary ring-1 ring-primary"
|
|
51233
51295
|
),
|
|
@@ -51299,7 +51361,7 @@ function FormsPanel({ tableId, activeFormId, className }) {
|
|
|
51299
51361
|
// src/CaptureSheet.tsx
|
|
51300
51362
|
import { useCallback as useCallback65, useEffect as useEffect118, useRef as useRef63, useState as useState139 } from "react";
|
|
51301
51363
|
import { useFields as useFields36, useRecordsClient as useRecordsClient101, useTable as useTable38 } from "@ai-matrx/records/react";
|
|
51302
|
-
import { Button as Button110, Input as Input9, Skeleton as Skeleton43, Textarea as Textarea8, cn as
|
|
51364
|
+
import { Button as Button110, Input as Input9, Skeleton as Skeleton43, Textarea as Textarea8, cn as cn96 } from "@ai-matrx/design-system";
|
|
51303
51365
|
|
|
51304
51366
|
// src/CaptureRun.tsx
|
|
51305
51367
|
import { useCallback as useCallback64, useEffect as useEffect117, useMemo as useMemo78, useRef as useRef62, useState as useState138 } from "react";
|
|
@@ -51309,7 +51371,7 @@ import {
|
|
|
51309
51371
|
openCaptureQueue
|
|
51310
51372
|
} from "@ai-matrx/records";
|
|
51311
51373
|
import { useRecordsClient as useRecordsClient100 } from "@ai-matrx/records/react";
|
|
51312
|
-
import { Button as Button109, Input as Input8, Skeleton as Skeleton42, Textarea as Textarea7, cn as
|
|
51374
|
+
import { Button as Button109, Input as Input8, Skeleton as Skeleton42, Textarea as Textarea7, cn as cn95 } from "@ai-matrx/design-system";
|
|
51313
51375
|
import { jsx as jsx164, jsxs as jsxs151 } from "react/jsx-runtime";
|
|
51314
51376
|
function controlFor(field2) {
|
|
51315
51377
|
if (!field2) return "text";
|
|
@@ -51487,13 +51549,13 @@ function CaptureRun({ sheetId, face: given, className }) {
|
|
|
51487
51549
|
if (online) await sync();
|
|
51488
51550
|
}
|
|
51489
51551
|
if (loadFailed) {
|
|
51490
|
-
return /* @__PURE__ */ jsx164("section", { className:
|
|
51552
|
+
return /* @__PURE__ */ jsx164("section", { className: cn95("mx-auto w-full max-w-sm p-4", className), children: /* @__PURE__ */ jsx164("div", { "data-testid": "capture-refusal", children: /* @__PURE__ */ jsx164(RefusalNotice, { error: loadFailed, className: "text-sm" }) }) });
|
|
51491
51553
|
}
|
|
51492
51554
|
if (face === void 0) {
|
|
51493
|
-
return /* @__PURE__ */ jsx164(Skeleton42, { className:
|
|
51555
|
+
return /* @__PURE__ */ jsx164(Skeleton42, { className: cn95("mx-auto h-64 w-full max-w-sm", className) });
|
|
51494
51556
|
}
|
|
51495
51557
|
if (face === null) {
|
|
51496
|
-
return /* @__PURE__ */ jsx164("section", { className:
|
|
51558
|
+
return /* @__PURE__ */ jsx164("section", { className: cn95("mx-auto w-full max-w-sm p-4", className), children: /* @__PURE__ */ jsx164("p", { className: "text-sm", "data-testid": "capture-refusal", children: "This capture sheet is not here, or it is not yours to open. If somebody sent you this link, ask them to check it." }) });
|
|
51497
51559
|
}
|
|
51498
51560
|
const waiting = counts.waiting + counts.sending;
|
|
51499
51561
|
const queueLine = /* @__PURE__ */ jsxs151("div", { className: "flex items-center gap-2 text-[11px] text-muted-foreground", "data-testid": "capture-queue-line", children: [
|
|
@@ -51545,7 +51607,7 @@ function CaptureRun({ sheetId, face: given, className }) {
|
|
|
51545
51607
|
) : null
|
|
51546
51608
|
] }, i.client_key)) }) : null;
|
|
51547
51609
|
if (!face.may_capture) {
|
|
51548
|
-
return /* @__PURE__ */ jsxs151("section", { className:
|
|
51610
|
+
return /* @__PURE__ */ jsxs151("section", { className: cn95("mx-auto flex w-full max-w-sm flex-col gap-3 p-4", className), children: [
|
|
51549
51611
|
/* @__PURE__ */ jsx164("h1", { className: "text-lg font-medium", children: face.title }),
|
|
51550
51612
|
/* @__PURE__ */ jsx164("p", { className: "text-sm", "data-testid": "capture-refusal", children: face.message }),
|
|
51551
51613
|
queueLine,
|
|
@@ -51554,7 +51616,7 @@ function CaptureRun({ sheetId, face: given, className }) {
|
|
|
51554
51616
|
}
|
|
51555
51617
|
if (done) {
|
|
51556
51618
|
const thanks = face.presentation?.thank_you ?? {};
|
|
51557
|
-
return /* @__PURE__ */ jsxs151("section", { className:
|
|
51619
|
+
return /* @__PURE__ */ jsxs151("section", { className: cn95("mx-auto flex w-full max-w-sm flex-col gap-3 p-4", className), children: [
|
|
51558
51620
|
/* @__PURE__ */ jsx164("h2", { className: "text-lg font-medium", "data-testid": "capture-thankyou", children: thanks.title ?? "Logged" }),
|
|
51559
51621
|
/* @__PURE__ */ jsx164("p", { className: "text-sm text-muted-foreground", children: done.queued ? "There is no signal, so this one is on the phone and goes up the moment there is. Nothing is lost." : thanks.body ?? "Ready for the next one." }),
|
|
51560
51622
|
/* @__PURE__ */ jsx164(Button109, { className: "h-12", onClick: () => setDone(null), "data-testid": "capture-next", children: "Next one" }),
|
|
@@ -51566,7 +51628,7 @@ function CaptureRun({ sheetId, face: given, className }) {
|
|
|
51566
51628
|
const field2 = fieldOf2(q.field);
|
|
51567
51629
|
const control = controlFor(field2);
|
|
51568
51630
|
const last = at >= questions.length - 1;
|
|
51569
|
-
return /* @__PURE__ */ jsxs151("section", { className:
|
|
51631
|
+
return /* @__PURE__ */ jsxs151("section", { className: cn95("mx-auto flex w-full max-w-sm flex-col gap-3 p-4", className), children: [
|
|
51570
51632
|
/* @__PURE__ */ jsxs151("div", { className: "flex items-center gap-2 text-[11px] text-muted-foreground", children: [
|
|
51571
51633
|
/* @__PURE__ */ jsxs151("span", { className: "tabular-nums", "data-testid": "capture-progress", children: [
|
|
51572
51634
|
at + 1,
|
|
@@ -51823,9 +51885,9 @@ function AdHocCaptureSheet({
|
|
|
51823
51885
|
}
|
|
51824
51886
|
if (table.error) return /* @__PURE__ */ jsx165(RefusalNotice, { error: table.error, className });
|
|
51825
51887
|
if (fields.error) return /* @__PURE__ */ jsx165(RefusalNotice, { error: fields.error, className });
|
|
51826
|
-
if (fields.loading || pending === null) return /* @__PURE__ */ jsx165(Skeleton43, { className:
|
|
51888
|
+
if (fields.loading || pending === null) return /* @__PURE__ */ jsx165(Skeleton43, { className: cn96("h-64 w-full", className) });
|
|
51827
51889
|
const keys = resolved();
|
|
51828
|
-
return /* @__PURE__ */ jsxs152("section", { className:
|
|
51890
|
+
return /* @__PURE__ */ jsxs152("section", { className: cn96("mx-auto flex w-full max-w-sm flex-col gap-2", className), children: [
|
|
51829
51891
|
/* @__PURE__ */ jsxs152("header", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
51830
51892
|
CAPTURE_MODES.map((m) => /* @__PURE__ */ jsx165(
|
|
51831
51893
|
Button110,
|
|
@@ -51930,7 +51992,7 @@ function AdHocCaptureSheet({
|
|
|
51930
51992
|
// src/PortalShell.tsx
|
|
51931
51993
|
import { useCallback as useCallback66, useEffect as useEffect119, useState as useState140 } from "react";
|
|
51932
51994
|
import { useRecordsClient as useRecordsClient102 } from "@ai-matrx/records/react";
|
|
51933
|
-
import { Button as Button111, Skeleton as Skeleton44, cn as
|
|
51995
|
+
import { Button as Button111, Skeleton as Skeleton44, cn as cn97 } from "@ai-matrx/design-system";
|
|
51934
51996
|
import { jsx as jsx166, jsxs as jsxs153 } from "react/jsx-runtime";
|
|
51935
51997
|
function PortalShell({ tableId, form, resourceType = "record", className }) {
|
|
51936
51998
|
const client = useRecordsClient102();
|
|
@@ -51960,12 +52022,12 @@ function PortalShell({ tableId, form, resourceType = "record", className }) {
|
|
|
51960
52022
|
if (error) {
|
|
51961
52023
|
return /* @__PURE__ */ jsx166(RefusalNotice, { error, className });
|
|
51962
52024
|
}
|
|
51963
|
-
if (!card || reach === null) return /* @__PURE__ */ jsx166(Skeleton44, { className:
|
|
52025
|
+
if (!card || reach === null) return /* @__PURE__ */ jsx166(Skeleton44, { className: cn97("h-64 w-full", className) });
|
|
51964
52026
|
if (!card.external) {
|
|
51965
|
-
return /* @__PURE__ */ jsx166("p", { className:
|
|
52027
|
+
return /* @__PURE__ */ jsx166("p", { className: cn97("rounded border border-dashed px-2 py-1 text-xs text-muted-foreground", className), children: card.explanation || "You are a member of an organization here, so this portal is not yours \u2014 a portal is the scoped view an OUTSIDER gets. You have the full application instead." });
|
|
51966
52028
|
}
|
|
51967
52029
|
if (sending && form) {
|
|
51968
|
-
return /* @__PURE__ */ jsxs153("section", { className:
|
|
52030
|
+
return /* @__PURE__ */ jsxs153("section", { className: cn97("flex min-h-0 flex-col gap-2", className), children: [
|
|
51969
52031
|
/* @__PURE__ */ jsxs153("header", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
51970
52032
|
/* @__PURE__ */ jsx166("span", { className: "font-medium text-foreground", children: form.name }),
|
|
51971
52033
|
/* @__PURE__ */ jsx166(Button111, { size: "sm", variant: "ghost", className: "ml-auto h-6 px-2 text-[11px]", onClick: () => setSending(false), children: "Back" })
|
|
@@ -51983,9 +52045,9 @@ function PortalShell({ tableId, form, resourceType = "record", className }) {
|
|
|
51983
52045
|
] });
|
|
51984
52046
|
}
|
|
51985
52047
|
if (open) {
|
|
51986
|
-
return /* @__PURE__ */ jsx166("section", { className:
|
|
52048
|
+
return /* @__PURE__ */ jsx166("section", { className: cn97("flex min-h-0 flex-col gap-2", className), children: /* @__PURE__ */ jsx166(Peek, { tableId, recordId: open, onClose: () => setOpen(null) }) });
|
|
51987
52049
|
}
|
|
51988
|
-
return /* @__PURE__ */ jsxs153("section", { className:
|
|
52050
|
+
return /* @__PURE__ */ jsxs153("section", { className: cn97("flex min-h-0 flex-col gap-2", className), children: [
|
|
51989
52051
|
/* @__PURE__ */ jsxs153("header", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
51990
52052
|
/* @__PURE__ */ jsx166("span", { className: "font-medium text-foreground", children: "Shared with you" }),
|
|
51991
52053
|
/* @__PURE__ */ jsx166("span", { className: "tabular-nums", children: reach.length }),
|
|
@@ -52036,7 +52098,7 @@ function PortalRow({ tableId, recordId }) {
|
|
|
52036
52098
|
// src/PublicViewPage.tsx
|
|
52037
52099
|
import { useCallback as useCallback67, useEffect as useEffect120, useState as useState141 } from "react";
|
|
52038
52100
|
import { useRecordsClient as useRecordsClient103 } from "@ai-matrx/records/react";
|
|
52039
|
-
import { Skeleton as Skeleton45, cn as
|
|
52101
|
+
import { Skeleton as Skeleton45, cn as cn98 } from "@ai-matrx/design-system";
|
|
52040
52102
|
import { publicReadOf } from "@ai-matrx/records/forms";
|
|
52041
52103
|
import { jsx as jsx167, jsxs as jsxs154 } from "react/jsx-runtime";
|
|
52042
52104
|
function PublicViewPage({ slug, className }) {
|
|
@@ -52101,15 +52163,15 @@ function PublicViewPage({ slug, className }) {
|
|
|
52101
52163
|
void load();
|
|
52102
52164
|
}, [load]);
|
|
52103
52165
|
if (error) return /* @__PURE__ */ jsx167(RefusalNotice, { error, className });
|
|
52104
|
-
if (binding === null) return /* @__PURE__ */ jsx167(Skeleton45, { className:
|
|
52166
|
+
if (binding === null) return /* @__PURE__ */ jsx167(Skeleton45, { className: cn98("h-64 w-full", className) });
|
|
52105
52167
|
if (binding === "none") {
|
|
52106
|
-
return /* @__PURE__ */ jsxs154("main", { className:
|
|
52168
|
+
return /* @__PURE__ */ jsxs154("main", { className: cn98("mx-auto max-w-2xl py-16 text-center", className), children: [
|
|
52107
52169
|
/* @__PURE__ */ jsx167("h1", { className: "text-lg font-medium", children: "Nothing here" }),
|
|
52108
52170
|
/* @__PURE__ */ jsx167("p", { className: "mt-1 text-sm text-muted-foreground", children: "There is no public page at this address." }),
|
|
52109
52171
|
gap ? /* @__PURE__ */ jsx167("p", { className: "mt-6 text-xs text-muted-foreground", children: gap }) : null
|
|
52110
52172
|
] });
|
|
52111
52173
|
}
|
|
52112
|
-
return /* @__PURE__ */ jsxs154("main", { className:
|
|
52174
|
+
return /* @__PURE__ */ jsxs154("main", { className: cn98("mx-auto flex max-w-2xl flex-col gap-3 py-8", className), children: [
|
|
52113
52175
|
/* @__PURE__ */ jsxs154("header", { className: "flex items-baseline gap-2 text-xs text-muted-foreground", children: [
|
|
52114
52176
|
/* @__PURE__ */ jsx167("span", { className: "font-medium text-foreground", children: binding.namespace ?? "Published" }),
|
|
52115
52177
|
/* @__PURE__ */ jsx167("span", { children: plan?.read === "table" || plan?.read === "view" ? `${rows?.length ?? 0} items` : "Shared publicly" })
|
|
@@ -52137,7 +52199,7 @@ function PublicRow({ row, fields }) {
|
|
|
52137
52199
|
import { copyText as copyText11 } from "@ai-matrx/kit/clipboard";
|
|
52138
52200
|
import { useCallback as useCallback68, useEffect as useEffect121, useState as useState142 } from "react";
|
|
52139
52201
|
import { useRecordsClient as useRecordsClient104 } from "@ai-matrx/records/react";
|
|
52140
|
-
import { Button as Button112, Input as Input10, Skeleton as Skeleton46, Textarea as Textarea9, cn as
|
|
52202
|
+
import { Button as Button112, Input as Input10, Skeleton as Skeleton46, Textarea as Textarea9, cn as cn99 } from "@ai-matrx/design-system";
|
|
52141
52203
|
import { useTable as useTable39 } from "@ai-matrx/records/react";
|
|
52142
52204
|
import { Fragment as Fragment68, jsx as jsx168, jsxs as jsxs155 } from "react/jsx-runtime";
|
|
52143
52205
|
function EmbedFrame({
|
|
@@ -52191,15 +52253,15 @@ function EmbedFrame({
|
|
|
52191
52253
|
setTokenId(null);
|
|
52192
52254
|
}, [client, tokenId]);
|
|
52193
52255
|
if (table.error) return /* @__PURE__ */ jsx168(RefusalNotice, { error: table.error, className });
|
|
52194
|
-
if (table.loading && !table.data) return /* @__PURE__ */ jsx168(Skeleton46, { className:
|
|
52256
|
+
if (table.loading && !table.data) return /* @__PURE__ */ jsx168(Skeleton46, { className: cn99("h-48 w-full", className) });
|
|
52195
52257
|
if (!rights.admin) {
|
|
52196
|
-
return /* @__PURE__ */ jsxs155("p", { className:
|
|
52258
|
+
return /* @__PURE__ */ jsxs155("p", { className: cn99("rounded border border-dashed px-2 py-1 text-xs text-muted-foreground", className), children: [
|
|
52197
52259
|
rights.why("structure"),
|
|
52198
52260
|
" Issuing an embed opens a way in from somebody else's website, so the store asks for the admin level on this table before it will mint one."
|
|
52199
52261
|
] });
|
|
52200
52262
|
}
|
|
52201
52263
|
const snippet = secret ? `<iframe src="${embedUrl}#t=${secret}" style="width:100%;height:640px;border:0" loading="lazy"></iframe>` : null;
|
|
52202
|
-
return /* @__PURE__ */ jsxs155("section", { className:
|
|
52264
|
+
return /* @__PURE__ */ jsxs155("section", { className: cn99("flex min-h-0 flex-col gap-2", className), children: [
|
|
52203
52265
|
/* @__PURE__ */ jsxs155("header", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
52204
52266
|
/* @__PURE__ */ jsx168("span", { className: "font-medium text-foreground", children: "Embed" }),
|
|
52205
52267
|
/* @__PURE__ */ jsx168("span", { children: mode === "write" ? "a form people can send" : "a read-only view" })
|
|
@@ -52288,7 +52350,7 @@ import {
|
|
|
52288
52350
|
DropdownMenuTrigger as DropdownMenuTrigger10,
|
|
52289
52351
|
Input as Input12,
|
|
52290
52352
|
Skeleton as Skeleton47,
|
|
52291
|
-
cn as
|
|
52353
|
+
cn as cn101,
|
|
52292
52354
|
useIsMobile as useIsMobile2
|
|
52293
52355
|
} from "@ai-matrx/design-system";
|
|
52294
52356
|
import { humanizeIdentifier as humanizeIdentifier22 } from "@ai-matrx/kit/text-case";
|
|
@@ -53171,7 +53233,7 @@ function ViewFilter({ tableId, view, onApply, className }) {
|
|
|
53171
53233
|
}
|
|
53172
53234
|
|
|
53173
53235
|
// src/PhoneTableActions.tsx
|
|
53174
|
-
import { DropdownMenu as DropdownMenu9, DropdownMenuContent as DropdownMenuContent9, DropdownMenuTrigger as DropdownMenuTrigger9, cn as
|
|
53236
|
+
import { DropdownMenu as DropdownMenu9, DropdownMenuContent as DropdownMenuContent9, DropdownMenuTrigger as DropdownMenuTrigger9, cn as cn100 } from "@ai-matrx/design-system";
|
|
53175
53237
|
import { jsx as jsx177, jsxs as jsxs164 } from "react/jsx-runtime";
|
|
53176
53238
|
function PhoneActionRow({ action: action3, groupStart }) {
|
|
53177
53239
|
const disabled = action3.disabledReason !== void 0;
|
|
@@ -53185,7 +53247,7 @@ function PhoneActionRow({ action: action3, groupStart }) {
|
|
|
53185
53247
|
onClick: () => {
|
|
53186
53248
|
if (!disabled) void action3.run();
|
|
53187
53249
|
},
|
|
53188
|
-
className:
|
|
53250
|
+
className: cn100(
|
|
53189
53251
|
"flex min-h-11 w-full items-center gap-3 px-1 text-left text-base disabled:opacity-60",
|
|
53190
53252
|
groupStart && "border-t border-border pt-1",
|
|
53191
53253
|
action3.destructive && "text-destructive"
|
|
@@ -53569,7 +53631,7 @@ function TableNotHere({
|
|
|
53569
53631
|
if (archived.phase === "asking") return /* @__PURE__ */ jsx178(Skeleton47, { className: "h-40 w-full" });
|
|
53570
53632
|
const row = archived.phase === "answered" ? archived.row : null;
|
|
53571
53633
|
if (row) {
|
|
53572
|
-
return /* @__PURE__ */ jsxs165("div", { className:
|
|
53634
|
+
return /* @__PURE__ */ jsxs165("div", { className: cn101("flex flex-col items-start gap-2 rounded-md border border-dashed p-6", className), children: [
|
|
53573
53635
|
/* @__PURE__ */ jsx178("p", { className: "text-sm font-medium", children: "This table is archived" }),
|
|
53574
53636
|
/* @__PURE__ */ jsx178("p", { className: "max-w-prose text-xs text-muted-foreground", children: TABLE_IS_ARCHIVED }),
|
|
53575
53637
|
/* @__PURE__ */ jsx178("p", { className: "text-xs text-muted-foreground", children: archivedByLine2(row) }),
|
|
@@ -53598,7 +53660,7 @@ function TableNotHere({
|
|
|
53598
53660
|
] })
|
|
53599
53661
|
] });
|
|
53600
53662
|
}
|
|
53601
|
-
return /* @__PURE__ */ jsxs165("div", { className:
|
|
53663
|
+
return /* @__PURE__ */ jsxs165("div", { className: cn101("flex flex-col items-start gap-2 rounded-md border border-dashed p-6", className), children: [
|
|
53602
53664
|
/* @__PURE__ */ jsx178("p", { className: "text-sm font-medium", children: "This table is not here" }),
|
|
53603
53665
|
/* @__PURE__ */ jsx178("p", { className: "max-w-prose text-xs text-muted-foreground", children: TABLE_NOT_REACHABLE }),
|
|
53604
53666
|
onLeave ? /* @__PURE__ */ jsx178(Button120, { size: "sm", variant: "outline", onClick: onLeave, children: leaveLabel }) : null
|
|
@@ -54482,7 +54544,7 @@ function TablePage({
|
|
|
54482
54544
|
rights.write && view && Object.keys(viewPatchDocument(saveToViewPlan(view, look ?? {}).patch)).length > 0
|
|
54483
54545
|
);
|
|
54484
54546
|
return /* @__PURE__ */ jsxs165(ViewAddressContext.Provider, { value: addressPort, children: [
|
|
54485
|
-
/* @__PURE__ */ jsxs165("div", { className:
|
|
54547
|
+
/* @__PURE__ */ jsxs165("div", { className: cn101("flex h-full min-h-0 gap-4", className), "data-table-footer": footer, children: [
|
|
54486
54548
|
headerNode,
|
|
54487
54549
|
/* @__PURE__ */ jsx178("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col gap-2", children: structure.hidden || !structure.settled ? (
|
|
54488
54550
|
/* THE TOOLBAR ROW'S HEIGHT IS KEPT (min-h-8), so the sentence lands exactly where the bar was. */
|
|
@@ -54517,6 +54579,14 @@ function TablePage({
|
|
|
54517
54579
|
}
|
|
54518
54580
|
},
|
|
54519
54581
|
onViews: setViews,
|
|
54582
|
+
onSettingsCopied: (copiedId) => {
|
|
54583
|
+
setAddressResetEpoch((n) => n + 1);
|
|
54584
|
+
setLooks((all) => {
|
|
54585
|
+
const { [copiedId]: _gone, ...rest } = all ?? {};
|
|
54586
|
+
return rest;
|
|
54587
|
+
});
|
|
54588
|
+
void keepLook(client, tableId, copiedId, null);
|
|
54589
|
+
},
|
|
54520
54590
|
...seededViews && viewsEpoch === 0 ? { initialViews: seededViews } : {},
|
|
54521
54591
|
seed: seedViews ?? [defaultView(tableId)],
|
|
54522
54592
|
settings: view && main === "records" && shownLayout === "grid" ? /* @__PURE__ */ jsxs165("div", { className: "flex flex-col gap-0.5 px-1 py-1", role: "radiogroup", "aria-label": FOOTER_WORDS.label, children: [
|
|
@@ -54528,7 +54598,7 @@ function TablePage({
|
|
|
54528
54598
|
role: "radio",
|
|
54529
54599
|
"aria-checked": footer === option,
|
|
54530
54600
|
"data-view-footer": option,
|
|
54531
|
-
className:
|
|
54601
|
+
className: cn101(
|
|
54532
54602
|
"flex min-h-7 items-center gap-2 rounded-sm px-1 text-left text-xs text-popover-foreground hover:bg-accent hover:text-accent-foreground",
|
|
54533
54603
|
footer === option && "font-medium"
|
|
54534
54604
|
),
|
|
@@ -54538,7 +54608,7 @@ function TablePage({
|
|
|
54538
54608
|
"span",
|
|
54539
54609
|
{
|
|
54540
54610
|
"aria-hidden": "true",
|
|
54541
|
-
className:
|
|
54611
|
+
className: cn101("h-2 w-2 shrink-0 rounded-full border border-current", footer === option && "bg-current")
|
|
54542
54612
|
}
|
|
54543
54613
|
),
|
|
54544
54614
|
FOOTER_WORDS[option]
|
|
@@ -54647,7 +54717,7 @@ function TablePage({
|
|
|
54647
54717
|
"div",
|
|
54648
54718
|
{
|
|
54649
54719
|
ref: setToolbarSlot,
|
|
54650
|
-
className:
|
|
54720
|
+
className: cn101(
|
|
54651
54721
|
// `min-w-9`: never narrower than the layout toolbar's folded "…" (36 px) — a row too
|
|
54652
54722
|
// narrow for its pinned controls folds them behind that "…" (design-system
|
|
54653
54723
|
// `usePinnedFold`), and the "…" itself is never cut (merged-grid leftovers, 2026-09-28).
|
|
@@ -54739,7 +54809,7 @@ function TablePage({
|
|
|
54739
54809
|
) : /* @__PURE__ */ jsx178(TableToolbarSlotContext.Provider, { value: toolbarSlot, children: /* @__PURE__ */ jsx178(TableToolbarFoldContext.Provider, { value: toolbarFold2, children: /* @__PURE__ */ jsx178(TableToolbarSheetExtrasContext.Provider, { value: sheetExtras, children: /* @__PURE__ */ jsxs165(
|
|
54740
54810
|
"div",
|
|
54741
54811
|
{
|
|
54742
|
-
className:
|
|
54812
|
+
className: cn101(
|
|
54743
54813
|
"min-h-0 flex-1",
|
|
54744
54814
|
// Inline: a plain scrolling block, so nothing in it shrinks to the height — the
|
|
54745
54815
|
// layout is as tall as its rows and the footer follows the last one.
|
|
@@ -54952,7 +55022,7 @@ import { formatCount as formatCount8 } from "@ai-matrx/kit/format";
|
|
|
54952
55022
|
import { TapTargetSearchGroup as TapTargetSearchGroup2, TooltipProvider } from "@ai-matrx/design-system";
|
|
54953
55023
|
import { MatrxTableCardShowMore as MatrxTableCardShowMore3 } from "@ai-matrx/design-system/data-table";
|
|
54954
55024
|
import { useEffect as useEffect126, useMemo as useMemo83, useRef as useRef65, useState as useState152 } from "react";
|
|
54955
|
-
import { Button as Button121, ErrorBox as ErrorBox9, Input as Input13, cn as
|
|
55025
|
+
import { Button as Button121, ErrorBox as ErrorBox9, Input as Input13, cn as cn102 } from "@ai-matrx/design-system";
|
|
54956
55026
|
import { SEED_FRESH_MS, useRecordsClient as useRecordsClient107, useSeededAnswerAt } from "@ai-matrx/records/react";
|
|
54957
55027
|
import { Fragment as Fragment73, jsx as jsx179, jsxs as jsxs166 } from "react/jsx-runtime";
|
|
54958
55028
|
var entityTitleColumn = entityNameColumn;
|
|
@@ -54990,14 +55060,14 @@ function EntityBoard({ entity, groupBy, cardFields, onOpenRecord, className }) {
|
|
|
54990
55060
|
const says = await entity.update(id, column, to);
|
|
54991
55061
|
if (says) setRefused({ to, says });
|
|
54992
55062
|
};
|
|
54993
|
-
return /* @__PURE__ */ jsx179("div", { className:
|
|
55063
|
+
return /* @__PURE__ */ jsx179("div", { className: cn102("flex min-h-40 gap-2 overflow-x-auto pb-1", className), "data-records-entity-board": column.key, children: lanes.map((lane) => {
|
|
54994
55064
|
const cards = rowsOf2(lane.key);
|
|
54995
55065
|
if (lane.key === "" && cards.length === 0) return null;
|
|
54996
55066
|
return /* @__PURE__ */ jsxs166(
|
|
54997
55067
|
"section",
|
|
54998
55068
|
{
|
|
54999
55069
|
"aria-label": lane.label,
|
|
55000
|
-
className:
|
|
55070
|
+
className: cn102("flex w-60 shrink-0 flex-col gap-1.5 rounded-md bg-muted/40 p-1.5", over === lane.key && "ring-1 ring-ring"),
|
|
55001
55071
|
onDragOver: writable && lane.key ? (e) => {
|
|
55002
55072
|
e.preventDefault();
|
|
55003
55073
|
setOver(lane.key);
|
|
@@ -55018,7 +55088,7 @@ function EntityBoard({ entity, groupBy, cardFields, onOpenRecord, className }) {
|
|
|
55018
55088
|
e.dataTransfer.setData("text/x-entity-row", row._id);
|
|
55019
55089
|
e.dataTransfer.effectAllowed = "move";
|
|
55020
55090
|
},
|
|
55021
|
-
className:
|
|
55091
|
+
className: cn102("flex flex-col gap-0.5 rounded border bg-card px-2 py-1.5 text-xs shadow-sm", writable && "cursor-grab"),
|
|
55022
55092
|
"data-records-entity-card": row._id,
|
|
55023
55093
|
children: [
|
|
55024
55094
|
onOpenRecord ? /* @__PURE__ */ jsx179("button", { type: "button", className: "truncate text-left font-medium hover:underline", onClick: () => onOpenRecord(row._id), children: (title ? entityValueText(title, entityCellValue(row, title)) : shown4(row._id)) || "Untitled" }) : /* @__PURE__ */ jsx179("span", { className: "truncate font-medium", children: (title ? entityValueText(title, entityCellValue(row, title)) : shown4(row._id)) || "Untitled" }),
|
|
@@ -55138,7 +55208,7 @@ function EntityTablePageBody({
|
|
|
55138
55208
|
rowNoun: (entity.label ?? "record").toLowerCase(),
|
|
55139
55209
|
enabled: layout === "grid"
|
|
55140
55210
|
});
|
|
55141
|
-
return /* @__PURE__ */ jsxs166("div", { className:
|
|
55211
|
+
return /* @__PURE__ */ jsxs166("div", { className: cn102("flex min-w-0 flex-col gap-2", className), "data-records-entity-page": source.token, children: [
|
|
55142
55212
|
presentation === "page" || boardable || entity.creatable ? /* @__PURE__ */ jsxs166("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
55143
55213
|
presentation === "page" ? /* @__PURE__ */ jsx179("h2", { className: "truncate text-base font-semibold", children: entity.label ?? (entity.loading ? "Loading\u2026" : "Table") }) : null,
|
|
55144
55214
|
presentation === "page" ? /* @__PURE__ */ jsx179("span", { className: "text-xs tabular-nums text-muted-foreground", children: entity.loading || entity.total === null ? "" : formatCount8(entity.total) }) : null,
|
|
@@ -55237,7 +55307,7 @@ function TablePage2(props) {
|
|
|
55237
55307
|
import { useEffect as useEffect127, useMemo as useMemo84 } from "react";
|
|
55238
55308
|
import { isEntityReferenceConfig } from "@ai-matrx/records";
|
|
55239
55309
|
import { useFields as useFields40, useTable as useTable41 } from "@ai-matrx/records/react";
|
|
55240
|
-
import { BasicInput as BasicInput36, Button as Button122, CreatablePicker as CreatablePicker3, cn as
|
|
55310
|
+
import { BasicInput as BasicInput36, Button as Button122, CreatablePicker as CreatablePicker3, cn as cn103 } from "@ai-matrx/design-system";
|
|
55241
55311
|
import { jsx as jsx181, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
55242
55312
|
var DATA_BINDING_SHAPES = [
|
|
55243
55313
|
{ value: "collection", label: "The whole table" },
|
|
@@ -55413,7 +55483,7 @@ function BindingDetails({
|
|
|
55413
55483
|
/* @__PURE__ */ jsx181(
|
|
55414
55484
|
"textarea",
|
|
55415
55485
|
{
|
|
55416
|
-
className:
|
|
55486
|
+
className: cn103(
|
|
55417
55487
|
"min-h-[3.5rem] w-full rounded-md border border-border bg-background px-2 py-1.5 font-mono text-xs"
|
|
55418
55488
|
),
|
|
55419
55489
|
"aria-label": "Each row reads as",
|