@ai-matrx/records-ui 0.115.72 → 0.115.74
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 +12 -0
- package/dist/index.cjs +152 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +173 -137
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
+
## 0.115.74
|
|
4
|
+
|
|
5
|
+
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
6
|
+
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/records-ui/src`.
|
|
7
|
+
|
|
8
|
+
## 0.115.73
|
|
9
|
+
|
|
10
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
11
|
+
`git diff npm/records-ui/v0.115.72..npm/records-ui/v0.115.73 -- apps/shared/records-ui`).
|
|
12
|
+
No source changes intended and no consumer action required.
|
|
13
|
+
|
|
3
14
|
## 0.115.72
|
|
4
15
|
|
|
5
16
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
@@ -9,6 +20,7 @@ No source changes intended and no consumer action required.
|
|
|
9
20
|
## 0.115.71
|
|
10
21
|
### Unreleased
|
|
11
22
|
|
|
23
|
+
- **No native `<select>` left in the package.** The last nine screens (bookings, checklists, form flow, portals, stage rules, notify rules, dashboard shape/width, digest schedule) and the demo shell now use the design system's `Select` (`@ai-matrx/design-system/controls`); the native-select allowlist is empty, so the guard fails on any new one. `NotifyRuleEditor` keeps its form field names through hidden inputs.
|
|
12
24
|
- **`@ai-matrx/records-ui/helpers` — the light door (page-weight campaign, 2026-10-13).** The root entry is one "use client" bundle of every screen (~2.4 MB, the grid and recharts with it), and a host service that imported one helper from it put the whole package on every page. `/helpers` (~25 KB, no React, no "use client", shaken) serves `personActor`, `recordsDataSource`, `setPersonTimeZone` / `getPersonTimeZone` / `personWallNow` / `subscribePersonTimeZone`, `tableRightsAt`, `NO_RIGHTS`, the names (`tableName`, `fieldName`, `recordName`, …), `whenWords` and the other who-changed words, `withheldNoticeOf` / `withheldSentence` / `WITHHELD_WORD`, `fieldTypeLabel` and the parity helpers, `tablePickerEntries` / `isValueSet` / `isKeptTable`, `declareTable` and the table builders, `resolveTableStyle` / `styleFromDecorations`, and the host contract's types (`RecordsUiHost`, `OpenRecordsAsk`, `AgentBuildAsk`, `TableRights`, `PickerTable`, `NewFieldSpec`, …). The root re-exports every name (new: `subscribePersonTimeZone`). The person's zone and the one-data-source-per-client cache moved into realm-wide `globalSlot`s, so `/helpers` and the root share ONE instance though each bundles its own copy of the code. The pure halves were split out of their screens: `dataSource.ts` (from `RecordsMount.tsx`), `personZone.ts` (from `personTime.ts`), `tableRights.ts` (from `host.tsx`), `withheldNotice.ts` (from `withheld.tsx`), `tablePickerEntries.ts` (from `tablePicking.tsx`); `choiceLooks.ts` / `presentation.ts` read their colour values from design-system's pure `data-table/table-style` instead of the data-table root. Guard: `src/helpers-entry-is-light.test.tsx` (the helper graph reaches no React, screen or heavy entry; every helper is also a root export; the zone and the cache are shared by a second copy of the code — red with a module-level `let`). Consumer action: a module that imports only these helpers from the root imports them from `/helpers`.
|
|
13
25
|
|
|
14
26
|
## 0.115.70
|
package/dist/index.cjs
CHANGED
|
@@ -19964,7 +19964,7 @@ function EnrichBadge({ cell: cell2, onPin, className }) {
|
|
|
19964
19964
|
const read = Array.isArray(source.read) ? source.read : [];
|
|
19965
19965
|
const alternates = cell2.alternates ?? [];
|
|
19966
19966
|
const word = state2 === "yours" ? "yours" : state2 === "unsure" ? "unsure" : "agent";
|
|
19967
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_design_system60.HoverCard, {
|
|
19967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_design_system60.HoverCard, { children: [
|
|
19968
19968
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_design_system60.HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: (0, import_design_system60.cn)("inline-flex items-center gap-1 align-middle", className), children: [
|
|
19969
19969
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
19970
19970
|
import_design_system60.Badge,
|
|
@@ -29393,6 +29393,7 @@ var import_react158 = require("@ai-matrx/records/react");
|
|
|
29393
29393
|
var import_format8 = require("@ai-matrx/kit/format");
|
|
29394
29394
|
var import_records48 = require("@ai-matrx/records");
|
|
29395
29395
|
var import_design_system79 = require("@ai-matrx/design-system");
|
|
29396
|
+
var import_controls2 = require("@ai-matrx/design-system/controls");
|
|
29396
29397
|
|
|
29397
29398
|
// src/publicQuestions.ts
|
|
29398
29399
|
var CANNOT_ASK = {
|
|
@@ -29695,39 +29696,39 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
|
|
|
29695
29696
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
29696
29697
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_design_system79.Label, { className: "text-xs font-medium", children: "How long one appointment is" }),
|
|
29697
29698
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
29698
|
-
|
|
29699
|
+
import_controls2.Select,
|
|
29699
29700
|
{
|
|
29700
|
-
|
|
29701
|
-
value: minutes,
|
|
29702
|
-
|
|
29703
|
-
|
|
29704
|
-
n,
|
|
29705
|
-
" minutes"
|
|
29706
|
-
] }, n))
|
|
29701
|
+
"aria-label": "How long one appointment is",
|
|
29702
|
+
value: String(minutes),
|
|
29703
|
+
onValueChange: (v) => setMinutes(Number(v)),
|
|
29704
|
+
options: LENGTHS.map((n) => ({ value: String(n), label: `${n} minutes` }))
|
|
29707
29705
|
}
|
|
29708
29706
|
)
|
|
29709
29707
|
] }),
|
|
29710
29708
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
29711
29709
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_design_system79.Label, { className: "text-xs font-medium", children: "Gap kept after each one" }),
|
|
29712
29710
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
29713
|
-
|
|
29711
|
+
import_controls2.Select,
|
|
29714
29712
|
{
|
|
29715
|
-
|
|
29716
|
-
value: buffer,
|
|
29717
|
-
|
|
29718
|
-
|
|
29713
|
+
"aria-label": "Gap kept after each one",
|
|
29714
|
+
value: String(buffer),
|
|
29715
|
+
onValueChange: (v) => setBuffer(Number(v)),
|
|
29716
|
+
options: [0, 5, 10, 15, 30].map((n) => ({ value: String(n), label: n === 0 ? "No gap \u2014 back to back" : `${n} minutes` }))
|
|
29719
29717
|
}
|
|
29720
29718
|
)
|
|
29721
29719
|
] }),
|
|
29722
29720
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
29723
29721
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_design_system79.Label, { className: "text-xs font-medium", children: "Earliest somebody may book" }),
|
|
29724
29722
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
29725
|
-
|
|
29723
|
+
import_controls2.Select,
|
|
29726
29724
|
{
|
|
29727
|
-
|
|
29728
|
-
value: lead,
|
|
29729
|
-
|
|
29730
|
-
|
|
29725
|
+
"aria-label": "Earliest somebody may book",
|
|
29726
|
+
value: String(lead),
|
|
29727
|
+
onValueChange: (v) => setLead(Number(v)),
|
|
29728
|
+
options: [0, 60, 120, 240, 1440].map((n) => ({
|
|
29729
|
+
value: String(n),
|
|
29730
|
+
label: n === 0 ? "Right away" : n === 1440 ? "A day from now" : `${(0, import_format8.formatDurationMinutes)(n, { style: "long" })} from now`
|
|
29731
|
+
}))
|
|
29731
29732
|
}
|
|
29732
29733
|
)
|
|
29733
29734
|
] }),
|
|
@@ -29746,15 +29747,12 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
|
|
|
29746
29747
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
29747
29748
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_design_system79.Label, { className: "text-xs font-medium", children: "How far ahead the page offers" }),
|
|
29748
29749
|
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
29749
|
-
|
|
29750
|
+
import_controls2.Select,
|
|
29750
29751
|
{
|
|
29751
|
-
|
|
29752
|
-
value: days,
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
-
n,
|
|
29756
|
-
" days"
|
|
29757
|
-
] }, n))
|
|
29752
|
+
"aria-label": "How far ahead the page offers",
|
|
29753
|
+
value: String(days),
|
|
29754
|
+
onValueChange: (v) => setDays(Number(v)),
|
|
29755
|
+
options: [7, 14, 30, 60, 90].map((n) => ({ value: String(n), label: `${n} days` }))
|
|
29758
29756
|
}
|
|
29759
29757
|
)
|
|
29760
29758
|
] }),
|
|
@@ -31237,6 +31235,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, ma
|
|
|
31237
31235
|
var import_react169 = require("react");
|
|
31238
31236
|
var import_react170 = require("@ai-matrx/records/react");
|
|
31239
31237
|
var import_design_system86 = require("@ai-matrx/design-system");
|
|
31238
|
+
var import_controls3 = require("@ai-matrx/design-system/controls");
|
|
31240
31239
|
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
31241
31240
|
var NO_RULES_YET = "Nothing has to be true to get here yet.";
|
|
31242
31241
|
var NEEDS_A_SENTENCE = "Write the sentence somebody reads when this stops them, the way you would say it out loud.";
|
|
@@ -31367,16 +31366,15 @@ function StageRulesSection({ tableId, stage, className }) {
|
|
|
31367
31366
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
31368
31367
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "font-medium", children: "Rules for entering" }),
|
|
31369
31368
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
31370
|
-
|
|
31369
|
+
import_controls3.Select,
|
|
31371
31370
|
{
|
|
31372
31371
|
"aria-label": "Stage",
|
|
31373
|
-
className: "h-7 rounded border bg-background px-1 text-xs",
|
|
31374
31372
|
value: stageKey ?? "",
|
|
31375
|
-
|
|
31376
|
-
setChosen(
|
|
31373
|
+
onValueChange: (v) => {
|
|
31374
|
+
setChosen(v);
|
|
31377
31375
|
setDraft(null);
|
|
31378
31376
|
},
|
|
31379
|
-
|
|
31377
|
+
options: stages.filter((s) => !s.retired).map((s) => ({ value: s.key, label: s.label }))
|
|
31380
31378
|
}
|
|
31381
31379
|
),
|
|
31382
31380
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-muted-foreground", children: gates.length }),
|
|
@@ -31444,13 +31442,12 @@ function StageRulesSection({ tableId, stage, className }) {
|
|
|
31444
31442
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
31445
31443
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-muted-foreground", children: "and when it does not" }),
|
|
31446
31444
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
31447
|
-
|
|
31445
|
+
import_controls3.Select,
|
|
31448
31446
|
{
|
|
31449
31447
|
"aria-label": "What happens",
|
|
31450
|
-
className: "h-8 rounded border bg-background px-1 text-xs",
|
|
31451
31448
|
value: draft.on_fail ?? "refuse",
|
|
31452
|
-
|
|
31453
|
-
|
|
31449
|
+
onValueChange: (on_fail) => setDraft({ ...draft, on_fail }),
|
|
31450
|
+
options: ON_FAIL.map((o) => ({ value: o.value, label: o.label }))
|
|
31454
31451
|
}
|
|
31455
31452
|
),
|
|
31456
31453
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-muted-foreground", children: ON_FAIL.find((o) => o.value === (draft.on_fail ?? "refuse"))?.note })
|
|
@@ -39716,7 +39713,7 @@ function ArchivedPortals({
|
|
|
39716
39713
|
var import_react231 = require("react");
|
|
39717
39714
|
var import_react232 = require("@ai-matrx/records/react");
|
|
39718
39715
|
var import_design_system112 = require("@ai-matrx/design-system");
|
|
39719
|
-
var
|
|
39716
|
+
var import_controls4 = require("@ai-matrx/design-system/controls");
|
|
39720
39717
|
var import_core22 = require("@dnd-kit/core");
|
|
39721
39718
|
var import_sortable = require("@dnd-kit/sortable");
|
|
39722
39719
|
var import_utilities = require("@dnd-kit/utilities");
|
|
@@ -40115,7 +40112,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40115
40112
|
}
|
|
40116
40113
|
) : /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("div", { className: "group flex min-h-7 items-center gap-1 px-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: [
|
|
40117
40114
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
40118
|
-
|
|
40115
|
+
import_controls4.Button,
|
|
40119
40116
|
{
|
|
40120
40117
|
variant: "quiet",
|
|
40121
40118
|
className: "min-w-0 flex-1 justify-start gap-1 px-0",
|
|
@@ -40130,12 +40127,12 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40130
40127
|
}
|
|
40131
40128
|
),
|
|
40132
40129
|
rights.admin ? /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
40133
|
-
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
40134
|
-
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
40130
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_controls4.Button, { variant: "quiet", className: "shrink-0 normal-case", "data-view-section-rename": "", onClick: () => setRenamingSection({ from: group.name, draft: group.name }), children: "Rename" }),
|
|
40131
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_controls4.Button, { variant: "danger", className: "shrink-0 normal-case", "data-view-section-delete": "", title: "The views stay; they leave the section", onClick: () => void renameSection(group.name, null), children: "Delete" })
|
|
40135
40132
|
] }) : null
|
|
40136
40133
|
] }) : null,
|
|
40137
40134
|
group.name !== null && shut.includes(group.name) && !group.views.some((v) => v.id === active) ? null : group.views.map((view) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(SortableRow, { id: view.id, disabled: !(rights.admin || view.personal) || view.presentation?.locked === true, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
40138
|
-
|
|
40135
|
+
import_controls4.Tile,
|
|
40139
40136
|
{
|
|
40140
40137
|
variant: "quiet",
|
|
40141
40138
|
selected: view.id === active,
|
|
@@ -40182,7 +40179,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40182
40179
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_design_system112.Button, { size: "sm", type: "submit", className: "h-7", children: "Save" })
|
|
40183
40180
|
] }),
|
|
40184
40181
|
rights.admin ? /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)("label", { className: "flex items-center gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
40185
|
-
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
40182
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_controls4.Switch, { checked: namingPersonal, onCheckedChange: setNamingPersonal, "data-view-new-personal": "" }),
|
|
40186
40183
|
"Personal (only you see it)"
|
|
40187
40184
|
] }) : null
|
|
40188
40185
|
]
|
|
@@ -40194,8 +40191,8 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40194
40191
|
current.name,
|
|
40195
40192
|
"\u201D to"
|
|
40196
40193
|
] }),
|
|
40197
|
-
(0, import_views2.sectionNames)(views).map((name) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
40198
|
-
current.section ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
40194
|
+
(0, import_views2.sectionNames)(views).map((name) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_controls4.Tile, { variant: "quiet", disabled: current.section === name, title: name, onClick: () => void moveToSection(current, name) }, name)),
|
|
40195
|
+
current.section ? /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_controls4.Tile, { variant: "quiet", "data-view-section-none": "", title: "No section", onClick: () => void moveToSection(current, null) }) : null,
|
|
40199
40196
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
40200
40197
|
"form",
|
|
40201
40198
|
{
|
|
@@ -40255,7 +40252,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
40255
40252
|
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
40256
40253
|
reasons.map((reason) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("p", { className: "truncate px-2 py-1 text-xs text-muted-foreground", "data-view-actions-reason": "", title: reason, children: reason }, reason)),
|
|
40257
40254
|
actions.map((action3) => /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
40258
|
-
|
|
40255
|
+
import_controls4.Tile,
|
|
40259
40256
|
{
|
|
40260
40257
|
variant: "quiet",
|
|
40261
40258
|
...action3.destructive ? { danger: true } : {},
|
|
@@ -40393,6 +40390,7 @@ var import_format11 = require("@ai-matrx/kit/format");
|
|
|
40393
40390
|
var import_react236 = require("react");
|
|
40394
40391
|
var import_react237 = require("@ai-matrx/records/react");
|
|
40395
40392
|
var import_design_system114 = require("@ai-matrx/design-system");
|
|
40393
|
+
var import_controls5 = require("@ai-matrx/design-system/controls");
|
|
40396
40394
|
var import_text_case15 = require("@ai-matrx/kit/text-case");
|
|
40397
40395
|
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
40398
40396
|
var DUE_WORD = DUE_STATE_LABEL;
|
|
@@ -40544,16 +40542,13 @@ function ChecklistRunner({
|
|
|
40544
40542
|
active.overdue > 0 ? ` \xB7 ${active.overdue} overdue` : ""
|
|
40545
40543
|
] }) : null,
|
|
40546
40544
|
runs && runs.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
40547
|
-
|
|
40545
|
+
import_controls5.Select,
|
|
40548
40546
|
{
|
|
40549
40547
|
"aria-label": "Checklist run",
|
|
40550
|
-
className: "ml-auto
|
|
40548
|
+
className: "ml-auto",
|
|
40551
40549
|
value: activeId ?? "",
|
|
40552
|
-
|
|
40553
|
-
|
|
40554
|
-
r.name,
|
|
40555
|
-
r.about ? ` \u2014 ${r.about}` : ""
|
|
40556
|
-
] }, r.run_id))
|
|
40550
|
+
onValueChange: (v) => setActiveId(v),
|
|
40551
|
+
options: runs.map((r) => ({ value: r.run_id, label: `${r.name}${r.about ? ` \u2014 ${r.about}` : ""}` }))
|
|
40557
40552
|
}
|
|
40558
40553
|
) : null
|
|
40559
40554
|
] }),
|
|
@@ -40636,19 +40631,18 @@ function StepRow({
|
|
|
40636
40631
|
] }),
|
|
40637
40632
|
unassigned && onAssign && members && members.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("label", { className: "mt-1 flex items-center gap-1.5 pl-7 text-[11px] text-muted-foreground", children: [
|
|
40638
40633
|
"Give it to",
|
|
40639
|
-
/* @__PURE__ */ (0, import_jsx_runtime133.
|
|
40640
|
-
|
|
40634
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
40635
|
+
import_controls5.Select,
|
|
40641
40636
|
{
|
|
40642
|
-
className: "h-7 rounded border bg-background px-1 text-xs text-foreground",
|
|
40643
40637
|
"aria-label": `Give ${step2.title} to`,
|
|
40644
40638
|
value: "",
|
|
40645
40639
|
disabled: busy,
|
|
40646
|
-
|
|
40647
|
-
if (
|
|
40640
|
+
onValueChange: (v) => {
|
|
40641
|
+
if (v) onAssign(v);
|
|
40648
40642
|
},
|
|
40649
|
-
|
|
40650
|
-
|
|
40651
|
-
members.map((m) =>
|
|
40643
|
+
options: [
|
|
40644
|
+
{ value: "", label: "Choose a person" },
|
|
40645
|
+
...members.map((m) => ({ value: m.userId, label: m.name || m.email || "A member" }))
|
|
40652
40646
|
]
|
|
40653
40647
|
}
|
|
40654
40648
|
)
|
|
@@ -41126,13 +41120,12 @@ function ChecklistTemplateEditor({
|
|
|
41126
41120
|
}
|
|
41127
41121
|
),
|
|
41128
41122
|
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
41129
|
-
|
|
41123
|
+
import_controls5.Select,
|
|
41130
41124
|
{
|
|
41131
41125
|
"aria-label": `Step ${index + 1} asks for`,
|
|
41132
|
-
className: "h-7 rounded border bg-background px-1 text-xs",
|
|
41133
41126
|
value: row.requires,
|
|
41134
|
-
|
|
41135
|
-
|
|
41127
|
+
onValueChange: (v) => change(index, { requires: v }),
|
|
41128
|
+
options: REQUIRES_KINDS.map((kind) => ({ value: kind, label: kind === "none" ? "just a tick" : REQUIRES_WORD[kind] ?? kind }))
|
|
41136
41129
|
}
|
|
41137
41130
|
),
|
|
41138
41131
|
row.requires === "answer" || row.requires === "record_field" ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
@@ -42077,7 +42070,7 @@ var import_react240 = require("react");
|
|
|
42077
42070
|
var import_records64 = require("@ai-matrx/records");
|
|
42078
42071
|
var import_react241 = require("@ai-matrx/records/react");
|
|
42079
42072
|
var import_design_system116 = require("@ai-matrx/design-system");
|
|
42080
|
-
var
|
|
42073
|
+
var import_controls6 = require("@ai-matrx/design-system/controls");
|
|
42081
42074
|
var import_text_case16 = require("@ai-matrx/kit/text-case");
|
|
42082
42075
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
42083
42076
|
function endOfDayIso(day2, zone = getPersonTimeZone()) {
|
|
@@ -42118,7 +42111,7 @@ function AsOfControl({ value, onChange, className }) {
|
|
|
42118
42111
|
}
|
|
42119
42112
|
return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: (0, import_design_system116.cn)("flex h-6 items-center gap-1", className), "data-records-as-of": "", children: [
|
|
42120
42113
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
42121
|
-
|
|
42114
|
+
import_controls6.Field,
|
|
42122
42115
|
{
|
|
42123
42116
|
type: "text",
|
|
42124
42117
|
inputMode: "numeric",
|
|
@@ -42148,7 +42141,7 @@ function AsOfControl({ value, onChange, className }) {
|
|
|
42148
42141
|
}
|
|
42149
42142
|
),
|
|
42150
42143
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { role: "group", "aria-label": "Clock", className: "flex overflow-hidden rounded border text-[11px]", children: ["recorded", "world"].map((which) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
42151
|
-
|
|
42144
|
+
import_controls6.Button,
|
|
42152
42145
|
{
|
|
42153
42146
|
variant: clock === which ? "primary" : "quiet",
|
|
42154
42147
|
pressed: clock === which,
|
|
@@ -43317,6 +43310,7 @@ function FormResultsPanel({ form, className }) {
|
|
|
43317
43310
|
var import_react252 = require("react");
|
|
43318
43311
|
var import_react253 = require("@ai-matrx/records/react");
|
|
43319
43312
|
var import_design_system122 = require("@ai-matrx/design-system");
|
|
43313
|
+
var import_controls7 = require("@ai-matrx/design-system/controls");
|
|
43320
43314
|
var import_jsx_runtime141 = require("react/jsx-runtime");
|
|
43321
43315
|
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.";
|
|
43322
43316
|
function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
|
|
@@ -43523,15 +43517,15 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
|
|
|
43523
43517
|
] }),
|
|
43524
43518
|
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
43525
43519
|
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_design_system122.Label, { className: "text-xs font-medium", children: "Which table holds your clients" }),
|
|
43526
|
-
/* @__PURE__ */ (0, import_jsx_runtime141.
|
|
43527
|
-
|
|
43520
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
43521
|
+
import_controls7.Select,
|
|
43528
43522
|
{
|
|
43529
|
-
|
|
43523
|
+
"aria-label": "Which table holds your clients",
|
|
43530
43524
|
value: clientTableId ?? "",
|
|
43531
|
-
|
|
43532
|
-
|
|
43533
|
-
|
|
43534
|
-
all.map((t) =>
|
|
43525
|
+
onValueChange: (v) => setClientTableId(v || null),
|
|
43526
|
+
options: [
|
|
43527
|
+
{ value: "", label: "Pick the table whose records are the people signing in" },
|
|
43528
|
+
...all.map((t) => ({ value: t.id, label: t.name }))
|
|
43535
43529
|
]
|
|
43536
43530
|
}
|
|
43537
43531
|
),
|
|
@@ -43576,15 +43570,15 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
|
|
|
43576
43570
|
) : /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "mt-2 flex flex-col gap-2", children: [
|
|
43577
43571
|
/* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
43578
43572
|
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(import_design_system122.Label, { className: "text-xs font-medium", children: "Which field says whose row it is" }),
|
|
43579
|
-
/* @__PURE__ */ (0, import_jsx_runtime141.
|
|
43580
|
-
|
|
43573
|
+
/* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
|
|
43574
|
+
import_controls7.Select,
|
|
43581
43575
|
{
|
|
43582
|
-
|
|
43576
|
+
"aria-label": "Which field says whose row it is",
|
|
43583
43577
|
value: exposure?.namesVia ?? "",
|
|
43584
|
-
|
|
43585
|
-
|
|
43586
|
-
|
|
43587
|
-
ties.map((f) =>
|
|
43578
|
+
onValueChange: (v) => patch(t.id, { namesVia: v }),
|
|
43579
|
+
options: [
|
|
43580
|
+
{ value: "", label: "Pick the field that names the client" },
|
|
43581
|
+
...ties.map((f) => ({ value: f.key, label: fieldName(f) }))
|
|
43588
43582
|
]
|
|
43589
43583
|
}
|
|
43590
43584
|
)
|
|
@@ -44812,6 +44806,7 @@ var import_react258 = require("react");
|
|
|
44812
44806
|
var import_react259 = require("@ai-matrx/records/react");
|
|
44813
44807
|
var import_records66 = require("@ai-matrx/records");
|
|
44814
44808
|
var import_design_system127 = require("@ai-matrx/design-system");
|
|
44809
|
+
var import_controls8 = require("@ai-matrx/design-system/controls");
|
|
44815
44810
|
|
|
44816
44811
|
// src/scheduleWords.ts
|
|
44817
44812
|
var DAYS3 = {
|
|
@@ -45015,15 +45010,15 @@ function DigestScheduler({
|
|
|
45015
45010
|
] }),
|
|
45016
45011
|
savedViewId ? null : /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
45017
45012
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_design_system127.Label, { className: "text-xs font-medium", children: "What it summarises" }),
|
|
45018
|
-
/* @__PURE__ */ (0, import_jsx_runtime146.
|
|
45019
|
-
|
|
45013
|
+
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
45014
|
+
import_controls8.Select,
|
|
45020
45015
|
{
|
|
45021
|
-
|
|
45016
|
+
"aria-label": "What it summarises",
|
|
45022
45017
|
value: viewId,
|
|
45023
|
-
|
|
45024
|
-
|
|
45025
|
-
|
|
45026
|
-
(views ?? []).map((v) =>
|
|
45018
|
+
onValueChange: setViewId,
|
|
45019
|
+
options: [
|
|
45020
|
+
{ value: "new", label: subjectName?.trim() ? `What I am looking at now (${subjectName.trim()})` : "What I am looking at now" },
|
|
45021
|
+
...(views ?? []).map((v) => ({ value: v.view_id, label: v.name }))
|
|
45027
45022
|
]
|
|
45028
45023
|
}
|
|
45029
45024
|
),
|
|
@@ -45033,24 +45028,27 @@ function DigestScheduler({
|
|
|
45033
45028
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
45034
45029
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_design_system127.Label, { className: "text-xs font-medium", children: "How often" }),
|
|
45035
45030
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
45036
|
-
|
|
45031
|
+
import_controls8.Select,
|
|
45037
45032
|
{
|
|
45038
|
-
|
|
45033
|
+
"aria-label": "How often",
|
|
45039
45034
|
value: cadence,
|
|
45040
|
-
|
|
45041
|
-
|
|
45035
|
+
onValueChange: (c) => setCadence(c),
|
|
45036
|
+
options: (cadences.length > 0 ? cadences : ["hourly", "daily", "weekly"]).map((c) => ({
|
|
45037
|
+
value: c,
|
|
45038
|
+
label: CADENCE_WORDS[c] ?? c
|
|
45039
|
+
}))
|
|
45042
45040
|
}
|
|
45043
45041
|
)
|
|
45044
45042
|
] }),
|
|
45045
45043
|
cadence === "weekly" ? /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
45046
45044
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_design_system127.Label, { className: "text-xs font-medium", children: "Which day" }),
|
|
45047
45045
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
45048
|
-
|
|
45046
|
+
import_controls8.Select,
|
|
45049
45047
|
{
|
|
45050
|
-
|
|
45048
|
+
"aria-label": "Which day",
|
|
45051
45049
|
value: weekday,
|
|
45052
|
-
|
|
45053
|
-
|
|
45050
|
+
onValueChange: setWeekday,
|
|
45051
|
+
options: WEEKDAYS.map((d) => ({ value: d, label: d[0].toUpperCase() + d.slice(1) }))
|
|
45054
45052
|
}
|
|
45055
45053
|
)
|
|
45056
45054
|
] }) : null,
|
|
@@ -45074,12 +45072,12 @@ function DigestScheduler({
|
|
|
45074
45072
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
45075
45073
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_design_system127.Label, { className: "text-xs font-medium", children: "Where it arrives" }),
|
|
45076
45074
|
/* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
|
|
45077
|
-
|
|
45075
|
+
import_controls8.Select,
|
|
45078
45076
|
{
|
|
45079
|
-
|
|
45077
|
+
"aria-label": "Where it arrives",
|
|
45080
45078
|
value: channel,
|
|
45081
|
-
|
|
45082
|
-
|
|
45079
|
+
onValueChange: setChannel,
|
|
45080
|
+
options: Object.entries(CHANNEL_WORDS).map(([key, words2]) => ({ value: key, label: words2 }))
|
|
45083
45081
|
}
|
|
45084
45082
|
)
|
|
45085
45083
|
] })
|
|
@@ -45611,6 +45609,7 @@ function SubscriptionsPanel({ tableId, activeRuleId, className }) {
|
|
|
45611
45609
|
// src/FormBuilder.tsx
|
|
45612
45610
|
var import_clipboard10 = require("@ai-matrx/kit/clipboard");
|
|
45613
45611
|
var import_design_system132 = require("@ai-matrx/design-system");
|
|
45612
|
+
var import_controls9 = require("@ai-matrx/design-system/controls");
|
|
45614
45613
|
var import_react267 = require("react");
|
|
45615
45614
|
var import_core23 = require("@dnd-kit/core");
|
|
45616
45615
|
var import_sortable2 = require("@dnd-kit/sortable");
|
|
@@ -47057,12 +47056,15 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
|
|
|
47057
47056
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("label", { className: "flex flex-col gap-1", children: [
|
|
47058
47057
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_design_system133.Label, { className: "text-xs font-medium", children: "Flow" }),
|
|
47059
47058
|
/* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
|
|
47060
|
-
|
|
47059
|
+
import_controls9.Select,
|
|
47061
47060
|
{
|
|
47062
|
-
|
|
47061
|
+
"aria-label": "Flow",
|
|
47063
47062
|
value: draft.flow ?? "one-at-a-time",
|
|
47064
|
-
|
|
47065
|
-
|
|
47063
|
+
onValueChange: (flow) => patch({ flow }),
|
|
47064
|
+
options: import_forms3.FORM_FLOWS.map((flow) => ({
|
|
47065
|
+
value: flow,
|
|
47066
|
+
label: flow === "one-at-a-time" ? "One question at a time" : "All on one page"
|
|
47067
|
+
}))
|
|
47066
47068
|
}
|
|
47067
47069
|
)
|
|
47068
47070
|
] }),
|
|
@@ -48008,6 +48010,7 @@ var import_react276 = require("react");
|
|
|
48008
48010
|
var import_react277 = require("@ai-matrx/records/react");
|
|
48009
48011
|
var import_records69 = require("@ai-matrx/records");
|
|
48010
48012
|
var import_design_system137 = require("@ai-matrx/design-system");
|
|
48013
|
+
var import_controls10 = require("@ai-matrx/design-system/controls");
|
|
48011
48014
|
var import_jsx_runtime155 = require("react/jsx-runtime");
|
|
48012
48015
|
var CADENCE_WORDS2 = SUBSCRIPTION_CADENCE_LABEL;
|
|
48013
48016
|
var CHANNEL_WORDS3 = SUBSCRIPTION_CHANNEL_LABEL;
|
|
@@ -48021,6 +48024,9 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
|
|
|
48021
48024
|
const [views, setViews] = (0, import_react276.useState)(null);
|
|
48022
48025
|
const [error, setError] = (0, import_react276.useState)(null);
|
|
48023
48026
|
const [busy, setBusy] = (0, import_react276.useState)(false);
|
|
48027
|
+
const [pickView, setPickView] = (0, import_react276.useState)("");
|
|
48028
|
+
const [pickCadence, setPickCadence] = (0, import_react276.useState)("");
|
|
48029
|
+
const [pickChannel, setPickChannel] = (0, import_react276.useState)("in_app");
|
|
48024
48030
|
const [stopping, setStopping] = (0, import_react276.useState)(null);
|
|
48025
48031
|
const load = (0, import_react276.useCallback)(async () => {
|
|
48026
48032
|
const [held, offered] = await Promise.all([
|
|
@@ -48218,9 +48224,36 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
|
|
|
48218
48224
|
if (view) void subscribe(view, name, cadence, channel, schedule, quiet2);
|
|
48219
48225
|
},
|
|
48220
48226
|
children: [
|
|
48221
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("
|
|
48222
|
-
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
48223
|
-
|
|
48227
|
+
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("input", { type: "hidden", name: "view", value: pickView || (views[0]?.id ?? "") }),
|
|
48228
|
+
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
48229
|
+
import_controls10.Select,
|
|
48230
|
+
{
|
|
48231
|
+
"aria-label": "View to be told about",
|
|
48232
|
+
value: pickView || (views[0]?.id ?? ""),
|
|
48233
|
+
onValueChange: setPickView,
|
|
48234
|
+
options: views.map((view) => ({ value: view.id, label: view.name }))
|
|
48235
|
+
}
|
|
48236
|
+
),
|
|
48237
|
+
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("input", { type: "hidden", name: "cadence", value: pickCadence || (cadences.length > 0 ? cadences : ["instant"])[0] }),
|
|
48238
|
+
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
48239
|
+
import_controls10.Select,
|
|
48240
|
+
{
|
|
48241
|
+
"aria-label": "How often",
|
|
48242
|
+
value: pickCadence || (cadences.length > 0 ? cadences : ["instant"])[0],
|
|
48243
|
+
onValueChange: setPickCadence,
|
|
48244
|
+
options: (cadences.length > 0 ? cadences : ["instant"]).map((cadence) => ({ value: cadence, label: CADENCE_WORDS2[cadence] ?? cadence }))
|
|
48245
|
+
}
|
|
48246
|
+
),
|
|
48247
|
+
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)("input", { type: "hidden", name: "channel", value: pickChannel }),
|
|
48248
|
+
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
48249
|
+
import_controls10.Select,
|
|
48250
|
+
{
|
|
48251
|
+
"aria-label": "Where it arrives",
|
|
48252
|
+
value: pickChannel,
|
|
48253
|
+
onValueChange: setPickChannel,
|
|
48254
|
+
options: ["in_app", "email", "sms"].map((channel) => ({ value: channel, label: CHANNEL_WORDS3[channel] ?? channel }))
|
|
48255
|
+
}
|
|
48256
|
+
),
|
|
48224
48257
|
/* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
|
|
48225
48258
|
"input",
|
|
48226
48259
|
{
|
|
@@ -48268,6 +48301,7 @@ var import_core24 = require("@dnd-kit/core");
|
|
|
48268
48301
|
var import_sortable3 = require("@dnd-kit/sortable");
|
|
48269
48302
|
var import_utilities3 = require("@dnd-kit/utilities");
|
|
48270
48303
|
var import_design_system138 = require("@ai-matrx/design-system");
|
|
48304
|
+
var import_controls11 = require("@ai-matrx/design-system/controls");
|
|
48271
48305
|
|
|
48272
48306
|
// src/dashboardLayout.ts
|
|
48273
48307
|
var SPAN_CHOICES = [
|
|
@@ -48385,13 +48419,13 @@ function GridCell2({
|
|
|
48385
48419
|
}
|
|
48386
48420
|
),
|
|
48387
48421
|
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
48388
|
-
|
|
48422
|
+
import_controls11.Select,
|
|
48389
48423
|
{
|
|
48390
48424
|
"aria-label": `Width of ${item.title}`,
|
|
48391
|
-
className: "ml-auto
|
|
48392
|
-
value: snapSpan(item.span),
|
|
48393
|
-
|
|
48394
|
-
|
|
48425
|
+
className: "ml-auto",
|
|
48426
|
+
value: String(snapSpan(item.span)),
|
|
48427
|
+
onValueChange: (v) => onSpan(index, Number(v)),
|
|
48428
|
+
options: SPAN_CHOICES.map((choice) => ({ value: String(choice.span), label: choice.label }))
|
|
48395
48429
|
}
|
|
48396
48430
|
)
|
|
48397
48431
|
] }) : null,
|
|
@@ -48526,6 +48560,9 @@ function AddChart({ subject, onAdd, onClose }) {
|
|
|
48526
48560
|
] });
|
|
48527
48561
|
}
|
|
48528
48562
|
|
|
48563
|
+
// src/DashboardCanvas.tsx
|
|
48564
|
+
var import_controls12 = require("@ai-matrx/design-system/controls");
|
|
48565
|
+
|
|
48529
48566
|
// src/pages.ts
|
|
48530
48567
|
var import_records70 = require("@ai-matrx/records");
|
|
48531
48568
|
var PAGE_BLOCK_KINDS = ["list", "record", "button", "form", "filter", "chart", "heading", "text", "applet"];
|
|
@@ -48968,13 +49005,12 @@ function BlockSettings({
|
|
|
48968
49005
|
const fields = own3.data ?? [];
|
|
48969
49006
|
return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "flex flex-col items-stretch gap-1.5 text-xs", children: [
|
|
48970
49007
|
/* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|
|
48971
|
-
|
|
49008
|
+
import_controls12.Select,
|
|
48972
49009
|
{
|
|
48973
49010
|
"aria-label": `Shape of ${title}`,
|
|
48974
|
-
className: "h-7 rounded border bg-background px-1 text-xs",
|
|
48975
49011
|
value: spec.kind,
|
|
48976
|
-
|
|
48977
|
-
|
|
49012
|
+
onValueChange: (kind) => onChange({ ...spec, kind }),
|
|
49013
|
+
options: CHART_KINDS.map((kind) => ({ value: kind, label: CHART_KIND_LABEL[kind] }))
|
|
48978
49014
|
}
|
|
48979
49015
|
),
|
|
48980
49016
|
(spec.groupBy ?? []).length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
|