@ai-matrx/records-ui 0.115.52 → 0.115.54
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/first-page.cjs +1 -1
- package/dist/first-page.cjs.map +1 -1
- package/dist/first-page.d.cts +1 -1
- package/dist/first-page.d.ts +1 -1
- package/dist/first-page.js +1 -1
- package/dist/first-page.js.map +1 -1
- package/dist/index.cjs +16 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1679,7 +1679,7 @@ type GridGrouping = {
|
|
|
1679
1679
|
order?: GroupOrder;
|
|
1680
1680
|
/** The sections this view keeps shut, by the primitive's own group key. */
|
|
1681
1681
|
collapsed?: string[];
|
|
1682
|
-
/** The grouped column drawn as a column
|
|
1682
|
+
/** The grouped column stays drawn as a column (Airtable). Absent = shown; `false` = the person stepped it aside. */
|
|
1683
1683
|
showColumn?: boolean;
|
|
1684
1684
|
/**
|
|
1685
1685
|
* SUB-GROUPS (lane S1-PRIME VIEW-KEYS; ui-bench LISTS "sub-grouping"): up to two more levels
|
package/dist/index.d.ts
CHANGED
|
@@ -1679,7 +1679,7 @@ type GridGrouping = {
|
|
|
1679
1679
|
order?: GroupOrder;
|
|
1680
1680
|
/** The sections this view keeps shut, by the primitive's own group key. */
|
|
1681
1681
|
collapsed?: string[];
|
|
1682
|
-
/** The grouped column drawn as a column
|
|
1682
|
+
/** The grouped column stays drawn as a column (Airtable). Absent = shown; `false` = the person stepped it aside. */
|
|
1683
1683
|
showColumn?: boolean;
|
|
1684
1684
|
/**
|
|
1685
1685
|
* SUB-GROUPS (lane S1-PRIME VIEW-KEYS; ui-bench LISTS "sub-grouping"): up to two more levels
|
package/dist/index.js
CHANGED
|
@@ -4000,7 +4000,7 @@ function parseGrouping(raw) {
|
|
|
4000
4000
|
const collapsed = raw["collapsed"].filter((k) => typeof k === "string");
|
|
4001
4001
|
if (collapsed.length > 0) out.collapsed = collapsed;
|
|
4002
4002
|
}
|
|
4003
|
-
if (raw["showColumn"] ===
|
|
4003
|
+
if (typeof raw["showColumn"] === "boolean") out.showColumn = raw["showColumn"];
|
|
4004
4004
|
if (Array.isArray(raw["then"])) {
|
|
4005
4005
|
const then = [];
|
|
4006
4006
|
for (const level of raw["then"]) {
|
|
@@ -26839,7 +26839,8 @@ function GridBody({
|
|
|
26839
26839
|
...facts ? { groupFacts: facts } : {},
|
|
26840
26840
|
...!rowsGrouped && view?.order ? { order: view.order } : {},
|
|
26841
26841
|
...view?.collapsed ? { collapsed: view.collapsed } : {},
|
|
26842
|
-
|
|
26842
|
+
// Airtable keeps the grouped column visible; only an explicit `false` steps it aside.
|
|
26843
|
+
showColumn: view?.showColumn !== false,
|
|
26843
26844
|
...onPresentationChange ? {
|
|
26844
26845
|
onColumnIdChange: (columnId2) => {
|
|
26845
26846
|
if (columnId2 === null) {
|
|
@@ -26873,8 +26874,7 @@ function GridBody({
|
|
|
26873
26874
|
onShowColumnChange: (show) => {
|
|
26874
26875
|
const current = presentation.grouping;
|
|
26875
26876
|
if (!current) return;
|
|
26876
|
-
|
|
26877
|
-
writeLook({ ...presentation, grouping: show ? { ...rest, showColumn: true } : rest });
|
|
26877
|
+
writeLook({ ...presentation, grouping: { ...current, showColumn: show } });
|
|
26878
26878
|
}
|
|
26879
26879
|
} : {}
|
|
26880
26880
|
};
|
|
@@ -33131,6 +33131,12 @@ function lookAfterReset(look) {
|
|
|
33131
33131
|
if (!look) return null;
|
|
33132
33132
|
const kept = { ...look };
|
|
33133
33133
|
for (const key of QUESTION_KEYS) delete kept[key];
|
|
33134
|
+
const presentation = kept["presentation"];
|
|
33135
|
+
if (presentation && typeof presentation === "object") {
|
|
33136
|
+
const { grouping: _grouping, ...layout } = presentation;
|
|
33137
|
+
if (Object.keys(layout).length > 0) kept["presentation"] = layout;
|
|
33138
|
+
else delete kept["presentation"];
|
|
33139
|
+
}
|
|
33134
33140
|
for (const key of Object.keys(kept)) if (kept[key] === void 0) delete kept[key];
|
|
33135
33141
|
return Object.keys(kept).length > 0 ? kept : null;
|
|
33136
33142
|
}
|
|
@@ -38076,6 +38082,12 @@ function ViewSwitcher({
|
|
|
38076
38082
|
const pageSize = pageSizeAsked ?? (embedded ? EMBEDDED_PAGE_SIZE : 200);
|
|
38077
38083
|
const [layout, setLayout] = useState106(view.layout);
|
|
38078
38084
|
const [local, setLocal] = useState106({});
|
|
38085
|
+
const viewSignature = JSON.stringify(view);
|
|
38086
|
+
const [seenSignature, setSeenSignature] = useState106(viewSignature);
|
|
38087
|
+
if (seenSignature !== viewSignature) {
|
|
38088
|
+
setSeenSignature(viewSignature);
|
|
38089
|
+
if (Object.keys(local).length > 0) setLocal({});
|
|
38090
|
+
}
|
|
38079
38091
|
useEffect86(() => {
|
|
38080
38092
|
setLayout(view.layout);
|
|
38081
38093
|
setLocal({});
|