@ai-matrx/records-ui 0.116.102 → 0.116.103
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 +3 -1
- package/dist/index.cjs +37 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +35 -12
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.116.
|
|
3
|
+
## 0.116.103
|
|
4
|
+
|
|
5
|
+
- **A field marked hidden stays off every default view (lane HIDDEN-FIELD-DEFAULT, 2026-10-23).** A field whose definition carries `config.hidden === true` (the Notion importer's "Notion ID") is now left out wherever a view has no saved choice: the grid's and merged grid's columns, the gallery tiles, board/list/calendar/timeline card fields and the org-chart/swipe card lines. One shared helper (`systemFields.ts`: `isSystemField`, `hiddenOrSystemDefault`, `hiddenToWrite`). A view's own saved `hiddenFields` / `cardHidden` (even empty) wins, the Fields and column pickers still list the field so a person can turn it on, and emptying the hidden list now writes `hiddenFields: []` (when the table has such a field) so the choice is kept. Guard: `a-field-marked-hidden-stays-off-every-default-view.test.tsx` (red before). Consumer action: none.
|
|
4
6
|
|
|
5
7
|
- **Move under… and Also points at never move the dialog (lane CLOSE-LINK round 2, 2026-10-23).** `MoveUnderDialog` draws its search box before a table is picked (disabled, "Pick a table first"), and `AlsoPointsAt` keeps one fixed-height box for "Reading tables…", "No other tables yet." and the list, so nothing below shifts when the tables arrive. Guards: assertions in `a-record-moves-under-another-and-a-refused-move-says-why.test.tsx` and `every-table-picker-hides-value-sets.test.tsx` (red before). Consumer action: none.
|
|
6
8
|
|
package/dist/index.cjs
CHANGED
|
@@ -29892,6 +29892,29 @@ init_parity();
|
|
|
29892
29892
|
init_pasteValues();
|
|
29893
29893
|
init_host();
|
|
29894
29894
|
init_plainWords();
|
|
29895
|
+
|
|
29896
|
+
// src/systemFields.ts
|
|
29897
|
+
function isSystemField(field2) {
|
|
29898
|
+
return field2.config?.hidden === true;
|
|
29899
|
+
}
|
|
29900
|
+
function systemFieldKeys(fields) {
|
|
29901
|
+
return (fields ?? []).filter(isSystemField).map((f) => f.key);
|
|
29902
|
+
}
|
|
29903
|
+
function hiddenOrSystemDefault(saved, fields) {
|
|
29904
|
+
if (saved) return [...saved];
|
|
29905
|
+
const system = systemFieldKeys(fields);
|
|
29906
|
+
return system.length > 0 ? system : void 0;
|
|
29907
|
+
}
|
|
29908
|
+
function hiddenFieldsEntry(hidden, fields) {
|
|
29909
|
+
const kept2 = hiddenToWrite(hidden, fields);
|
|
29910
|
+
return kept2 ? { hiddenFields: kept2 } : {};
|
|
29911
|
+
}
|
|
29912
|
+
function hiddenToWrite(hidden, fields) {
|
|
29913
|
+
if (hidden.length > 0) return [...hidden];
|
|
29914
|
+
return systemFieldKeys(fields).length > 0 ? [] : void 0;
|
|
29915
|
+
}
|
|
29916
|
+
|
|
29917
|
+
// src/gridControls.tsx
|
|
29895
29918
|
init_readRefusals();
|
|
29896
29919
|
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
29897
29920
|
var VALUE_COUNTS_FRESH_MS = 1e4;
|
|
@@ -29983,8 +30006,8 @@ function useMergedGridControls(args) {
|
|
|
29983
30006
|
}, [held, fieldKeys, keptOrder, frozenKeys]);
|
|
29984
30007
|
const hidden = (0, import_react158.useMemo)(() => {
|
|
29985
30008
|
const known = new Set(fieldKeys);
|
|
29986
|
-
return (held?.hidden ?? keptHidden ?? []).filter((k) => known.has(k) || k.startsWith(REVERSE_COLUMN_PREFIX));
|
|
29987
|
-
}, [held, keptHidden, fieldKeys]);
|
|
30009
|
+
return (held?.hidden ?? hiddenOrSystemDefault(keptHidden, fields) ?? []).filter((k) => known.has(k) || k.startsWith(REVERSE_COLUMN_PREFIX));
|
|
30010
|
+
}, [held, keptHidden, fieldKeys, fields]);
|
|
29988
30011
|
const naturalOrder = (0, import_react158.useMemo)(
|
|
29989
30012
|
() => [...fieldKeys.filter((k) => frozenKeys.has(k)), ...fieldKeys.filter((k) => !frozenKeys.has(k))],
|
|
29990
30013
|
[fieldKeys, frozenKeys]
|
|
@@ -29997,10 +30020,10 @@ function useMergedGridControls(args) {
|
|
|
29997
30020
|
writeLook({
|
|
29998
30021
|
...rest,
|
|
29999
30022
|
...moved ? { columnOrder: next.order } : {},
|
|
30000
|
-
...next.hidden
|
|
30023
|
+
...hiddenFieldsEntry(next.hidden, fields)
|
|
30001
30024
|
});
|
|
30002
30025
|
},
|
|
30003
|
-
[presentation, writeLook, naturalOrder]
|
|
30026
|
+
[presentation, writeLook, naturalOrder, fields]
|
|
30004
30027
|
);
|
|
30005
30028
|
const pendingInsert = (0, import_react158.useRef)(null);
|
|
30006
30029
|
(0, import_react158.useEffect)(() => {
|
|
@@ -36056,7 +36079,7 @@ function GridBody({
|
|
|
36056
36079
|
}),
|
|
36057
36080
|
[host, tableId, table.data, fields.data]
|
|
36058
36081
|
);
|
|
36059
|
-
const hiddenKeys = presentation.hiddenFields;
|
|
36082
|
+
const hiddenKeys = hiddenOrSystemDefault(presentation.hiddenFields, fields.data);
|
|
36060
36083
|
const shownKeys = (0, import_react197.useMemo)(
|
|
36061
36084
|
() => hiddenKeys && hiddenKeys.length > 0 ? columnIds.filter((k) => !hiddenKeys.includes(k)) : columnIds,
|
|
36062
36085
|
[columnIds, hiddenKeys]
|
|
@@ -36538,7 +36561,7 @@ function GridBody({
|
|
|
36538
36561
|
// THE CLASSIC GRID OBEYS THE VIEW TOO (CHAIR-GRID-LINKS 07): with no merged controls the kept
|
|
36539
36562
|
// `presentation.hiddenFields` / `columnOrder` still decide what is drawn.
|
|
36540
36563
|
order: controls.columns?.order ?? localColumns?.order ?? (presentation.columnOrder?.length ? columnsInKeptOrder(columnIds, presentation.columnOrder) : columnIds),
|
|
36541
|
-
hidden: controls.columns?.hidden ?? localColumns?.hidden ?? presentation.hiddenFields ?? [],
|
|
36564
|
+
hidden: controls.columns?.hidden ?? localColumns?.hidden ?? hiddenOrSystemDefault(presentation.hiddenFields, fields.data) ?? [],
|
|
36542
36565
|
onChange: (drawn) => {
|
|
36543
36566
|
const next = { order: fieldColumnIds(drawn.order, fields.data ?? []), hidden: fieldColumnIds(drawn.hidden, fields.data ?? []) };
|
|
36544
36567
|
if (controls.columns) controls.columns.onChange(next);
|
|
@@ -43990,7 +44013,7 @@ function isEmptyOnCard(value) {
|
|
|
43990
44013
|
return value === null || value === void 0 || value === "" || Array.isArray(value) && value.length === 0;
|
|
43991
44014
|
}
|
|
43992
44015
|
function cardFieldsShown(fields, hiddenFields, exclude) {
|
|
43993
|
-
const hidden = new Set(hiddenFields ?? []);
|
|
44016
|
+
const hidden = new Set(hiddenOrSystemDefault(hiddenFields, fields) ?? []);
|
|
43994
44017
|
const out = new Set(exclude.filter((k) => Boolean(k)));
|
|
43995
44018
|
return fields.filter((field2) => !hidden.has(field2.key) && !out.has(field2.key));
|
|
43996
44019
|
}
|
|
@@ -44002,7 +44025,7 @@ function CardFieldsPicker({
|
|
|
44002
44025
|
remembered,
|
|
44003
44026
|
layout
|
|
44004
44027
|
}) {
|
|
44005
|
-
const hidden = new Set(hiddenFields ?? []);
|
|
44028
|
+
const hidden = new Set(hiddenOrSystemDefault(hiddenFields, fields) ?? []);
|
|
44006
44029
|
return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("details", { className: "text-xs text-muted-foreground", "data-records-card-fields": layout, children: [
|
|
44007
44030
|
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("summary", { className: "cursor-pointer select-none", children: summary }),
|
|
44008
44031
|
/* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: "mt-1 flex flex-wrap gap-2", children: fields.map((field2) => /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("label", { className: "flex items-center gap-1", children: [
|
|
@@ -48766,7 +48789,8 @@ function selfLinkFields(fields, tableId) {
|
|
|
48766
48789
|
function orgCardFields(fields, hidden, exclude) {
|
|
48767
48790
|
const skip = new Set(exclude.filter((k) => Boolean(k)));
|
|
48768
48791
|
const usable = fields.filter((f) => !skip.has(f.key) && !["attachment", "button", "formula"].includes(String(f.type)));
|
|
48769
|
-
const
|
|
48792
|
+
const kept2 = hiddenOrSystemDefault(hidden, fields);
|
|
48793
|
+
const shown5 = kept2 === void 0 ? usable : usable.filter((f) => !kept2.includes(f.key));
|
|
48770
48794
|
return shown5.slice(0, 2);
|
|
48771
48795
|
}
|
|
48772
48796
|
function orgNotes(forest, total) {
|
|
@@ -50535,7 +50559,7 @@ function Gallery({
|
|
|
50535
50559
|
onNew,
|
|
50536
50560
|
newLabel
|
|
50537
50561
|
}) {
|
|
50538
|
-
const hidden = (0, import_react299.useMemo)(() => new Set(hiddenFields ?? []), [hiddenFields]);
|
|
50562
|
+
const hidden = (0, import_react299.useMemo)(() => new Set(hiddenOrSystemDefault(hiddenFields, fields) ?? []), [hiddenFields, fields]);
|
|
50539
50563
|
const imageField = imageKey ? fields.find((field2) => field2.key === imageKey) : void 0;
|
|
50540
50564
|
const shown5 = fields.filter((field2) => !hidden.has(field2.key) && field2.key !== imageKey && field2.key !== titleKey);
|
|
50541
50565
|
const chose = hiddenFields !== void 0;
|
|
@@ -64778,6 +64802,7 @@ function TablePage({
|
|
|
64778
64802
|
});
|
|
64779
64803
|
}, [view, looks]);
|
|
64780
64804
|
const hiddenNow = shown5?.presentation?.hiddenFields ?? [];
|
|
64805
|
+
const hiddenInList = hiddenOrSystemDefault(shown5?.presentation?.hiddenFields, allFields.data) ?? [];
|
|
64781
64806
|
const hiddenSaved = view?.presentation?.hiddenFields ?? [];
|
|
64782
64807
|
const hiddenDiffers = JSON.stringify(hiddenNow) !== JSON.stringify(hiddenSaved);
|
|
64783
64808
|
const addressNow = {
|
|
@@ -65637,12 +65662,12 @@ function TablePage({
|
|
|
65637
65662
|
tableId,
|
|
65638
65663
|
archiveAsked,
|
|
65639
65664
|
columns: view ? {
|
|
65640
|
-
hidden:
|
|
65665
|
+
hidden: hiddenInList,
|
|
65641
65666
|
order: shown5?.presentation?.columnOrder ?? null,
|
|
65642
65667
|
onChange: ({ hidden, order }) => {
|
|
65643
65668
|
const { hiddenFields: _h, columnOrder: _o, ...rest } = shown5?.presentation ?? {};
|
|
65644
65669
|
return patchView({
|
|
65645
|
-
presentation: { ...rest, ...hidden.
|
|
65670
|
+
presentation: { ...rest, ...hiddenFieldsEntry(hidden, allFields.data), ...order ? { columnOrder: order } : {} }
|
|
65646
65671
|
});
|
|
65647
65672
|
}
|
|
65648
65673
|
} : void 0
|