@ai-matrx/records-ui 0.116.16 → 0.116.17
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 +22 -1
- package/dist/{SaveToTable-54FVMGKL.js → SaveToTable-62C57VOL.js} +2 -2
- package/dist/{chunk-QVTYE4XU.js → chunk-4GZVOFJJ.js} +90 -8
- package/dist/chunk-4GZVOFJJ.js.map +1 -0
- package/dist/{chunk-YIGEIVU7.js → chunk-U3ZEY6BB.js} +174 -2
- package/dist/chunk-U3ZEY6BB.js.map +1 -0
- package/dist/index.cjs +328 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +88 -6
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-QVTYE4XU.js.map +0 -1
- package/dist/chunk-YIGEIVU7.js.map +0 -1
- /package/dist/{SaveToTable-54FVMGKL.js.map → SaveToTable-62C57VOL.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -17,11 +17,32 @@
|
|
|
17
17
|
- Tests: `vitest.setup.ts` gives jsdom a no-op `performance.mark` / `measure`.
|
|
18
18
|
- **New subpath `@ai-matrx/records-ui/data-source`:** `recordsDataSource`, `personActor` and the who-changed words (`whenWords`, `actorWords`, `actorBadge`, `lastChangeSentence`, `SOMEBODY`, `THE_SYSTEM`) alone. `/helpers` also carries the field-type words, the colour resolver and the table builders, which read `@ai-matrx/records/core`; this entry reaches `@ai-matrx/kit` only, and shares the one data-source cache with `/helpers` and the root. Additive. Consumer action: a shell-reachable service that only binds its supabase client or says when imports from `/data-source`.
|
|
19
19
|
|
|
20
|
-
## 0.116.
|
|
20
|
+
## 0.116.17
|
|
21
21
|
|
|
22
22
|
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.
|
|
23
23
|
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/records-ui/src`.
|
|
24
24
|
|
|
25
|
+
## 0.116.16
|
|
26
|
+
|
|
27
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
28
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
29
|
+
Diff: `git diff b3732ecfc5 25eb01daa8 -- apps/shared/records-ui/src`
|
|
30
|
+
|
|
31
|
+
Changed shipped source files (16):
|
|
32
|
+
- `apps/shared/records-ui/src/CustomFieldsSection.tsx`
|
|
33
|
+
- `apps/shared/records-ui/src/Grid.tsx`
|
|
34
|
+
- `apps/shared/records-ui/src/LinkPreviewCard.tsx`
|
|
35
|
+
- `apps/shared/records-ui/src/ListView.tsx`
|
|
36
|
+
- `apps/shared/records-ui/src/RecordsSkeleton.tsx`
|
|
37
|
+
- `apps/shared/records-ui/src/SectionCard.tsx`
|
|
38
|
+
- `apps/shared/records-ui/src/ViewSwitcher.tsx`
|
|
39
|
+
- `apps/shared/records-ui/src/buttonCell.tsx`
|
|
40
|
+
- `apps/shared/records-ui/src/clickableSurface.tsx`
|
|
41
|
+
- `apps/shared/records-ui/src/editors.tsx`
|
|
42
|
+
- `apps/shared/records-ui/src/looks/designLooks.tsx`
|
|
43
|
+
- `apps/shared/records-ui/src/looks/index.ts`
|
|
44
|
+
- ...and 4 more
|
|
45
|
+
|
|
25
46
|
## 0.116.15
|
|
26
47
|
|
|
27
48
|
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
SAVE_TO_TABLE_TYPES,
|
|
5
5
|
SaveToTable,
|
|
6
6
|
shapesOfSource
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U3ZEY6BB.js";
|
|
8
8
|
import "./chunk-DDTOL35E.js";
|
|
9
9
|
import "./chunk-TF3JYYJN.js";
|
|
10
10
|
import "./chunk-TIZHA6VK.js";
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
SaveToTable,
|
|
18
18
|
shapesOfSource
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=SaveToTable-
|
|
20
|
+
//# sourceMappingURL=SaveToTable-62C57VOL.js.map
|
|
@@ -657,17 +657,50 @@ function NumberBox({
|
|
|
657
657
|
function unitOf(format) {
|
|
658
658
|
return format.options?.unit ?? "px";
|
|
659
659
|
}
|
|
660
|
+
function MeasureMini({ px, kind }) {
|
|
661
|
+
if (kind === "spacing") {
|
|
662
|
+
const gap = Math.max(1, Math.min(px, 48));
|
|
663
|
+
return /* @__PURE__ */ jsxs2("span", { "aria-hidden": true, "data-records-measure-mini": "spacing", className: "inline-flex h-4 shrink-0 items-center", children: [
|
|
664
|
+
/* @__PURE__ */ jsx2("span", { className: "h-4 w-2.5 rounded-sm border border-border bg-muted" }),
|
|
665
|
+
/* @__PURE__ */ jsx2("span", { style: { width: gap } }),
|
|
666
|
+
/* @__PURE__ */ jsx2("span", { className: "h-4 w-2.5 rounded-sm border border-border bg-muted" })
|
|
667
|
+
] });
|
|
668
|
+
}
|
|
669
|
+
if (kind === "radius") {
|
|
670
|
+
return /* @__PURE__ */ jsx2(
|
|
671
|
+
"span",
|
|
672
|
+
{
|
|
673
|
+
"aria-hidden": true,
|
|
674
|
+
"data-records-measure-mini": "radius",
|
|
675
|
+
className: "inline-block h-5 w-5 shrink-0 border-2 border-foreground bg-card",
|
|
676
|
+
style: { borderRadius: Math.min(px, 10) }
|
|
677
|
+
}
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
return null;
|
|
681
|
+
}
|
|
660
682
|
function MeasureView({ value, format }) {
|
|
661
683
|
const n = numberOf(value);
|
|
662
684
|
if (n === null) return null;
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
/* @__PURE__ */ jsx2(
|
|
685
|
+
const px = pixels(n, unitOf(format));
|
|
686
|
+
const kind = format.options?.measurePreview ?? "none";
|
|
687
|
+
return /* @__PURE__ */ jsxs2("span", { "data-records-look": "measure", className: "inline-flex items-center gap-2 tabular-nums", children: [
|
|
688
|
+
px !== null && (kind === "spacing" || kind === "radius") ? /* @__PURE__ */ jsx2(MeasureMini, { px, kind }) : null,
|
|
689
|
+
/* @__PURE__ */ jsxs2("span", { children: [
|
|
690
|
+
n,
|
|
691
|
+
" ",
|
|
692
|
+
/* @__PURE__ */ jsx2("span", { className: "text-muted-foreground", children: unitOf(format) })
|
|
693
|
+
] })
|
|
667
694
|
] });
|
|
668
695
|
}
|
|
669
696
|
function MeasureEditor({ value, format, onChange, disabled, id, label }) {
|
|
670
|
-
|
|
697
|
+
const n = numberOf(value);
|
|
698
|
+
const px = n === null ? null : pixels(n, unitOf(format));
|
|
699
|
+
const kind = format.options?.measurePreview ?? "none";
|
|
700
|
+
return /* @__PURE__ */ jsxs2("span", { className: "flex items-center gap-2", children: [
|
|
701
|
+
/* @__PURE__ */ jsx2(NumberBox, { id, label, value: n, unit: unitOf(format), disabled, className: "w-full max-w-40", onChange }),
|
|
702
|
+
px !== null && (kind === "spacing" || kind === "radius") ? /* @__PURE__ */ jsx2(MeasureMini, { px, kind }) : null
|
|
703
|
+
] });
|
|
671
704
|
}
|
|
672
705
|
function pixels(n, unit) {
|
|
673
706
|
if (unit === "px" || unit === "pt") return n;
|
|
@@ -4353,7 +4386,7 @@ import { AlchemyMenu } from "@ai-matrx/alchemy/react";
|
|
|
4353
4386
|
import { OutboundLink as OutboundLink5 } from "@ai-matrx/kit/outbound-react";
|
|
4354
4387
|
import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
|
|
4355
4388
|
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4356
|
-
var SaveToTable = lazy(() => import("./SaveToTable-
|
|
4389
|
+
var SaveToTable = lazy(() => import("./SaveToTable-62C57VOL.js").then((m) => ({ default: m.SaveToTable })));
|
|
4357
4390
|
var LONGEST_READ = 5e5;
|
|
4358
4391
|
var FENCE = /^```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n?```$/;
|
|
4359
4392
|
function isPlainObject(v) {
|
|
@@ -7827,6 +7860,25 @@ function FieldEditor(props) {
|
|
|
7827
7860
|
const watchStart = useMemo10(() => watchedFieldsOf(start), [start]);
|
|
7828
7861
|
const [watchFields, setWatchFields] = useState25(watchStart);
|
|
7829
7862
|
const [dependency, setDependency] = useState25(dependencyStart);
|
|
7863
|
+
const [notifyStart, setNotifyStart] = useState25(field2 ? null : false);
|
|
7864
|
+
const [notify, setNotify] = useState25(false);
|
|
7865
|
+
const [notifyReadError, setNotifyReadError] = useState25(null);
|
|
7866
|
+
const personColumn = !onEntity && type === "member";
|
|
7867
|
+
useEffect17(() => {
|
|
7868
|
+
if (!field2 || onEntity || type !== "member") return;
|
|
7869
|
+
let live = true;
|
|
7870
|
+
void client.fieldNotifyOnAssign({ field_id: field2.id, on: null }).then((got) => {
|
|
7871
|
+
if (!live) return;
|
|
7872
|
+
if (got.ok) {
|
|
7873
|
+
setNotifyStart(got.data.notify_on_assign === true);
|
|
7874
|
+
setNotify(got.data.notify_on_assign === true);
|
|
7875
|
+
setNotifyReadError(null);
|
|
7876
|
+
} else setNotifyReadError(got.error);
|
|
7877
|
+
});
|
|
7878
|
+
return () => {
|
|
7879
|
+
live = false;
|
|
7880
|
+
};
|
|
7881
|
+
}, [client, field2, onEntity, type]);
|
|
7830
7882
|
useEffect17(() => {
|
|
7831
7883
|
if (!field2 || type !== "status") return;
|
|
7832
7884
|
let live = true;
|
|
@@ -8039,7 +8091,16 @@ function FieldEditor(props) {
|
|
|
8039
8091
|
return;
|
|
8040
8092
|
}
|
|
8041
8093
|
const written2 = await tableMutation.update({ field_id: field2.id, patch });
|
|
8042
|
-
if (written2
|
|
8094
|
+
if (written2 === null) return;
|
|
8095
|
+
if (personColumn && notifyStart !== null && notify !== notifyStart) {
|
|
8096
|
+
const told = await client.fieldNotifyOnAssign({ field_id: field2.id, on: notify });
|
|
8097
|
+
if (!told.ok) {
|
|
8098
|
+
setBackfillError(told.error);
|
|
8099
|
+
return;
|
|
8100
|
+
}
|
|
8101
|
+
setNotifyStart(notify);
|
|
8102
|
+
}
|
|
8103
|
+
onSaved?.();
|
|
8043
8104
|
return;
|
|
8044
8105
|
}
|
|
8045
8106
|
const spec = {
|
|
@@ -8119,6 +8180,13 @@ function FieldEditor(props) {
|
|
|
8119
8180
|
return;
|
|
8120
8181
|
}
|
|
8121
8182
|
}
|
|
8183
|
+
if (personColumn && notify) {
|
|
8184
|
+
const told = await client.fieldNotifyOnAssign({ field_id: written, on: true });
|
|
8185
|
+
if (!told.ok) {
|
|
8186
|
+
setBackfillError(told.error);
|
|
8187
|
+
return;
|
|
8188
|
+
}
|
|
8189
|
+
}
|
|
8122
8190
|
setBackfillError(null);
|
|
8123
8191
|
if (type === "relation" && relationTarget === tableId && dependency && !onEntity) {
|
|
8124
8192
|
const marked = await client.fieldUpdate({ field_id: written, patch: { dependency: true } });
|
|
@@ -8314,6 +8382,20 @@ function FieldEditor(props) {
|
|
|
8314
8382
|
/* @__PURE__ */ jsx35(Checkbox4, { checked: dependency, "aria-label": "Waits on the linked records", "data-records-dependency": "", onCheckedChange: (v) => setDependency(v === true) }),
|
|
8315
8383
|
/* @__PURE__ */ jsx35("span", { children: "Waits on the linked records" })
|
|
8316
8384
|
] }) : null,
|
|
8385
|
+
personColumn ? /* @__PURE__ */ jsxs31("label", { className: "flex items-center gap-1.5 text-sm", title: "Each person added to this column gets a notice", children: [
|
|
8386
|
+
/* @__PURE__ */ jsx35(
|
|
8387
|
+
Checkbox4,
|
|
8388
|
+
{
|
|
8389
|
+
checked: notify,
|
|
8390
|
+
disabled: notifyStart === null,
|
|
8391
|
+
"aria-label": "Notify people when they're added",
|
|
8392
|
+
"data-records-notify-on-assign": "",
|
|
8393
|
+
onCheckedChange: (v) => setNotify(v === true)
|
|
8394
|
+
}
|
|
8395
|
+
),
|
|
8396
|
+
/* @__PURE__ */ jsx35("span", { children: "Notify people when they're added" })
|
|
8397
|
+
] }) : null,
|
|
8398
|
+
notifyReadError ? /* @__PURE__ */ jsx35(RefusalNotice, { error: notifyReadError }) : null,
|
|
8317
8399
|
type === "rollup" ? /* @__PURE__ */ jsx35(
|
|
8318
8400
|
RollupFilterQuestion,
|
|
8319
8401
|
{
|
|
@@ -11730,4 +11812,4 @@ export {
|
|
|
11730
11812
|
RecordNameText,
|
|
11731
11813
|
HeldChangeDecision
|
|
11732
11814
|
};
|
|
11733
|
-
//# sourceMappingURL=chunk-
|
|
11815
|
+
//# sourceMappingURL=chunk-4GZVOFJJ.js.map
|