@ai-matrx/records-ui 0.43.0 → 0.44.0
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 +19 -0
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
+
## 0.44.0
|
|
4
|
+
|
|
5
|
+
**Pressing Open in the inbox landed you on the table with the record still shut.**
|
|
6
|
+
|
|
7
|
+
`ActionInbox` has always handed its host `onOpenRecord(recordId, tableId)`, and
|
|
8
|
+
the app has always routed that to `/data-v2/<table>?record=<record>` — and
|
|
9
|
+
NOTHING read the parameter. So an approval, an assignment, an agent's proposal
|
|
10
|
+
and (since 0.41.0) a checklist step all offered an Open that did not open
|
|
11
|
+
anything. Measured in the real app on a dental practice's onboarding steps.
|
|
12
|
+
|
|
13
|
+
`TablePage` takes `activeRecordId` and opens the record rail on it, moving the
|
|
14
|
+
rail when a later link names a different record. Absent, the page opens exactly
|
|
15
|
+
as it did. `openingRail` is the exported seam and `src/record-link.test.tsx`
|
|
16
|
+
fails on 0.43.0's bytes.
|
|
17
|
+
|
|
18
|
+
**Consumer action:** pass `activeRecordId` from your route's `?record=`
|
|
19
|
+
parameter, beside the `activeDashboardId` you already pass. Without it the Open
|
|
20
|
+
control in the inbox still goes nowhere.
|
|
21
|
+
|
|
3
22
|
## 0.43.0
|
|
4
23
|
|
|
5
24
|
**Five headings carrying the store's real counts, over five empty columns.**
|
package/dist/index.cjs
CHANGED
|
@@ -11901,6 +11901,9 @@ var VIEW_NOT_SAVED_YET = "This table has no saved view yet, so the layout you pi
|
|
|
11901
11901
|
function defaultView(tableId) {
|
|
11902
11902
|
return { name: DEFAULT_VIEW_NAME, subject: tableId, layout: "grid", isDefault: true };
|
|
11903
11903
|
}
|
|
11904
|
+
function openingRail(activeRecordId) {
|
|
11905
|
+
return activeRecordId ? { rail: "record", record: activeRecordId } : { rail: "none", record: null };
|
|
11906
|
+
}
|
|
11904
11907
|
function TablePage({
|
|
11905
11908
|
tableId,
|
|
11906
11909
|
pageSize = 100,
|
|
@@ -11908,6 +11911,7 @@ function TablePage({
|
|
|
11908
11911
|
onLeave,
|
|
11909
11912
|
leaveLabel = "Back to your tables",
|
|
11910
11913
|
activeDashboardId,
|
|
11914
|
+
activeRecordId,
|
|
11911
11915
|
className
|
|
11912
11916
|
}) {
|
|
11913
11917
|
const client = (0, import_react98.useRecordsClient)();
|
|
@@ -11915,12 +11919,18 @@ function TablePage({
|
|
|
11915
11919
|
const rights = useTableRights(table.data);
|
|
11916
11920
|
const organizationId = (0, import_react98.useRecordsClient)().config.organizationId;
|
|
11917
11921
|
const [view, setView] = (0, import_react97.useState)(null);
|
|
11918
|
-
const
|
|
11922
|
+
const opening = openingRail(activeRecordId);
|
|
11923
|
+
const [rail, setRail] = (0, import_react97.useState)(opening.rail);
|
|
11919
11924
|
const [asking, setAsking] = (0, import_react97.useState)(null);
|
|
11920
11925
|
const [main, setMain] = (0, import_react97.useState)(activeDashboardId ? "dashboards" : "records");
|
|
11921
|
-
const [openRecord, setOpenRecord] = (0, import_react97.useState)(
|
|
11926
|
+
const [openRecord, setOpenRecord] = (0, import_react97.useState)(opening.record);
|
|
11922
11927
|
const viewVersion = useRecordVersion(view?.id ?? null);
|
|
11923
11928
|
const show = (next) => setRail((current) => current === next ? "none" : next);
|
|
11929
|
+
(0, import_react97.useEffect)(() => {
|
|
11930
|
+
if (!activeRecordId) return;
|
|
11931
|
+
setOpenRecord(activeRecordId);
|
|
11932
|
+
setRail("record");
|
|
11933
|
+
}, [activeRecordId]);
|
|
11924
11934
|
const patchView = (0, import_react97.useCallback)(
|
|
11925
11935
|
async (patch) => {
|
|
11926
11936
|
const current = view;
|