@ai-matrx/records-ui 0.115.101 → 0.115.102
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 +10 -1
- package/dist/index.cjs +36 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +36 -26
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
-
## 0.115.
|
|
3
|
+
## 0.115.102
|
|
4
4
|
|
|
5
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
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
7
|
|
|
8
|
+
## 0.115.101
|
|
9
|
+
|
|
10
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
11
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
12
|
+
Diff: `git diff 6902500e6b 0840b10e27 -- apps/shared/records-ui/src`
|
|
13
|
+
|
|
14
|
+
Changed shipped source files (1):
|
|
15
|
+
- `apps/shared/records-ui/src/values.tsx`
|
|
16
|
+
|
|
8
17
|
## 0.115.100
|
|
9
18
|
|
|
10
19
|
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
package/dist/index.cjs
CHANGED
|
@@ -30508,6 +30508,9 @@ function GridBody({
|
|
|
30508
30508
|
}, [countedButNotReturned]);
|
|
30509
30509
|
const askPerRow = Boolean(editable) && !host.rights && rights.known && !rights.write && rows.length > 0;
|
|
30510
30510
|
const rowRights = useRowRights(rowIds, askPerRow);
|
|
30511
|
+
const rowRightsAnswered = (0, import_react168.useRef)(false);
|
|
30512
|
+
const rowRightsWaiting = askPerRow && !rowRightsAnswered.current && rowIds.length > 0 && rowRights(rowIds[0])?.known === false;
|
|
30513
|
+
if (askPerRow && !rowRightsWaiting) rowRightsAnswered.current = true;
|
|
30511
30514
|
const mayWriteRow = (0, import_react168.useCallback)(
|
|
30512
30515
|
(rowId) => askPerRow ? rowRights(rowId)?.write ?? false : rights.write,
|
|
30513
30516
|
[askPerRow, rowRights, rights.write]
|
|
@@ -32064,7 +32067,7 @@ function GridBody({
|
|
|
32064
32067
|
if (table.error) return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(RefusalNotice, { error: table.error, className });
|
|
32065
32068
|
if (fields.error) return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(RefusalNotice, { error: fields.error, className });
|
|
32066
32069
|
const nothingToShowYet = table.loading && !table.data || // No columns on a table whose level may hide them: not yet known which (one read, Confidential only).
|
|
32067
|
-
!structure.settled && (fields.data ?? []).length === 0 || fields.loading && !fields.data || !rights.known || records.loading && rows.length === 0 || // The page read has neither answered nor refused: nothing has been said yet, so nothing is empty.
|
|
32070
|
+
!structure.settled && (fields.data ?? []).length === 0 || fields.loading && !fields.data || !rights.known || rowRightsWaiting || records.loading && rows.length === 0 || // The page read has neither answered nor refused: nothing has been said yet, so nothing is empty.
|
|
32068
32071
|
!records.data && !records.error || countedButNotReturned || manual && hand.loading && rows.length === 0;
|
|
32069
32072
|
const refreshing = !nothingToShowYet && (records.loading || manual && hand.loading);
|
|
32070
32073
|
const structureLocked = !nothingToShowYet && (fields.data ?? []).length === 0 && structure.hidden;
|
|
@@ -53287,7 +53290,7 @@ function ReviewBlockView({ block, viewerUserId, extra }) {
|
|
|
53287
53290
|
const name = block.title ?? table.data?.name ?? "Records";
|
|
53288
53291
|
const neighbors = current ? neighborsOf(rows.map((r) => r.id), current.id) : null;
|
|
53289
53292
|
if (read.error) return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(RefusalLine, { error: read.error });
|
|
53290
|
-
if (read.waiting || read.loading && rows.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_design_system146.Skeleton, { className: "h-
|
|
53293
|
+
if (read.waiting || read.loading && rows.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_design_system146.Skeleton, { className: "h-72 w-full" });
|
|
53291
53294
|
if (rows.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(BlockNote, { children: read.mine ? "Nothing assigned to you here." : "No records match." });
|
|
53292
53295
|
return /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("div", { className: "grid min-w-0 grid-cols-1 gap-2 md:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]", "data-records-page-review": block.id, children: [
|
|
53293
53296
|
/* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("div", { className: "flex min-w-0 flex-col rounded-md border bg-card", children: [
|
|
@@ -55995,6 +55998,8 @@ var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
|
55995
55998
|
function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage = false, neighbors, onStep, expanded, onToggleExpand }) {
|
|
55996
55999
|
const host = useRecordsUi();
|
|
55997
56000
|
const [asking, setAsking] = (0, import_react317.useState)(null);
|
|
56001
|
+
const record = (0, import_react318.useRecord)(recordId, true, { tableId });
|
|
56002
|
+
const answered = Boolean(record.data) && !record.error;
|
|
55998
56003
|
return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
|
|
55999
56004
|
"div",
|
|
56000
56005
|
{
|
|
@@ -56021,28 +56026,30 @@ function RecordPanel({ tableId, recordId, onClose, onAskAboutField, onPage = fal
|
|
|
56021
56026
|
children: [
|
|
56022
56027
|
neighbors && onStep ? /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(RecordStepper, { neighbors, onStep: (to) => onStep(to), expanded, onToggleExpand }) : null,
|
|
56023
56028
|
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Peek, { tableId, recordId, onPage, ...onClose ? { onClose } : {} }),
|
|
56024
|
-
|
|
56025
|
-
/* @__PURE__ */ (0, import_jsx_runtime176.
|
|
56026
|
-
|
|
56027
|
-
|
|
56028
|
-
|
|
56029
|
-
|
|
56029
|
+
answered ? /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(import_jsx_runtime176.Fragment, { children: [
|
|
56030
|
+
onPage ? /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(import_jsx_runtime176.Fragment, { children: [
|
|
56031
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(RecordBody, { tableId, recordId }),
|
|
56032
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(LinkedLists, { tableId, recordId }),
|
|
56033
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(ReverseLinksSections, { tableId, recordId })
|
|
56034
|
+
] }) : null,
|
|
56035
|
+
host.recordSections ? /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(import_react317.Fragment, { children: [
|
|
56036
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_design_system157.Separator, {}),
|
|
56037
|
+
host.recordSections({ tableId, recordId })
|
|
56038
|
+
] }) : null,
|
|
56039
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(ChecklistRunner, { tableId, recordId, quietWhenEmpty: true, className: "border-t pt-3" }),
|
|
56030
56040
|
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_design_system157.Separator, {}),
|
|
56031
|
-
|
|
56032
|
-
|
|
56033
|
-
|
|
56034
|
-
|
|
56035
|
-
|
|
56036
|
-
|
|
56037
|
-
|
|
56038
|
-
|
|
56039
|
-
|
|
56040
|
-
|
|
56041
|
-
|
|
56042
|
-
|
|
56043
|
-
}
|
|
56044
|
-
),
|
|
56045
|
-
!onAskAboutField && asking ? /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(FieldHistoryPanel, { tableId, fieldKey: asking, recordId, onClose: () => setAsking(null) }) : null
|
|
56041
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(CommentThread, { tableId, recordId }),
|
|
56042
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(import_design_system157.Separator, {}),
|
|
56043
|
+
/* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
|
|
56044
|
+
HistoryPanel,
|
|
56045
|
+
{
|
|
56046
|
+
tableId,
|
|
56047
|
+
recordId,
|
|
56048
|
+
onAskAboutField: (fieldKey) => onAskAboutField ? onAskAboutField(fieldKey) : setAsking(fieldKey)
|
|
56049
|
+
}
|
|
56050
|
+
),
|
|
56051
|
+
!onAskAboutField && asking ? /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(FieldHistoryPanel, { tableId, fieldKey: asking, recordId, onClose: () => setAsking(null) }) : null
|
|
56052
|
+
] }) : null
|
|
56046
56053
|
]
|
|
56047
56054
|
}
|
|
56048
56055
|
);
|
|
@@ -56555,6 +56562,7 @@ init_host();
|
|
|
56555
56562
|
|
|
56556
56563
|
// src/toolbarFit.ts
|
|
56557
56564
|
var import_react325 = require("react");
|
|
56565
|
+
var import_react_dom3 = require("react-dom");
|
|
56558
56566
|
function widthAtFold(piece, fold) {
|
|
56559
56567
|
for (let f = Math.min(fold, (piece.byFold?.length ?? 0) - 1); f >= 0; f -= 1) {
|
|
56560
56568
|
const w = piece.byFold?.[f];
|
|
@@ -56654,7 +56662,7 @@ function useToolbarFit(row) {
|
|
|
56654
56662
|
let current = 0;
|
|
56655
56663
|
let pending = 0;
|
|
56656
56664
|
let stopped = false;
|
|
56657
|
-
const measure = () => {
|
|
56665
|
+
const measure = (sync = false) => {
|
|
56658
56666
|
pending = 0;
|
|
56659
56667
|
if (stopped) return;
|
|
56660
56668
|
const available = row.clientWidth;
|
|
@@ -56674,12 +56682,13 @@ function useToolbarFit(row) {
|
|
|
56674
56682
|
const next = toolbarFold({ available, needsNow: needs, gap, folded: current, look, chooser, tools, share });
|
|
56675
56683
|
if (next !== current) {
|
|
56676
56684
|
current = next;
|
|
56677
|
-
setFold(next);
|
|
56685
|
+
if (sync) (0, import_react_dom3.flushSync)(() => setFold(next));
|
|
56686
|
+
else setFold(next);
|
|
56678
56687
|
}
|
|
56679
56688
|
};
|
|
56680
56689
|
const schedule = () => {
|
|
56681
56690
|
if (pending) return;
|
|
56682
|
-
pending = typeof requestAnimationFrame === "function" ? requestAnimationFrame(measure) : setTimeout(measure, 0);
|
|
56691
|
+
pending = typeof requestAnimationFrame === "function" ? requestAnimationFrame(() => measure()) : setTimeout(() => measure(), 0);
|
|
56683
56692
|
};
|
|
56684
56693
|
const sizes = typeof ResizeObserver === "function" ? new ResizeObserver(schedule) : null;
|
|
56685
56694
|
const watchSizes = () => {
|
|
@@ -56693,6 +56702,7 @@ function useToolbarFit(row) {
|
|
|
56693
56702
|
};
|
|
56694
56703
|
const content = new MutationObserver(() => {
|
|
56695
56704
|
watchSizes();
|
|
56705
|
+
measure(true);
|
|
56696
56706
|
schedule();
|
|
56697
56707
|
});
|
|
56698
56708
|
content.observe(row, { childList: true, subtree: true, characterData: true, attributes: true, attributeFilter: ["class", "style"] });
|