@ai-matrx/records-ui 0.115.42 → 0.115.43
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/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -35106,10 +35106,12 @@ function TimelineView({
|
|
|
35106
35106
|
const named = (key) => key && fields.some((f) => f.key === key) ? key : null;
|
|
35107
35107
|
const startChosen = "startKey" in picked ? picked.startKey ?? null : has(dates, startKey) ?? named(startKey) ?? onlyCandidate(dates);
|
|
35108
35108
|
const endCandidates = useMemo57(() => dates.filter((f) => f.key !== startChosen), [dates, startChosen]);
|
|
35109
|
+
const baselineKeys = useMemo57(() => new Set([gantt?.baselineStart ?? "baseline_start", gantt?.baselineEnd ?? "baseline_end"].filter((k) => Boolean(k))), [gantt]);
|
|
35110
|
+
const endAutoCandidates = useMemo57(() => endCandidates.filter((f) => !baselineKeys.has(f.key)), [endCandidates, baselineKeys]);
|
|
35109
35111
|
const endAuto = useMemo57(() => {
|
|
35110
|
-
const only = onlyCandidate(
|
|
35112
|
+
const only = onlyCandidate(endAutoCandidates);
|
|
35111
35113
|
return only && startChosen && endFollowsStart(rows, startChosen, only) ? only : null;
|
|
35112
|
-
}, [
|
|
35114
|
+
}, [endAutoCandidates, rows, startChosen]);
|
|
35113
35115
|
const endChosen = "endKey" in picked ? picked.endKey ?? null : has(endCandidates, endKey) ?? (endKey !== startChosen ? named(endKey) : null) ?? (endKey === void 0 ? endAuto : null);
|
|
35114
35116
|
const groupCandidates = useMemo57(() => groupableFields(fields), [fields]);
|
|
35115
35117
|
const groupChosen = "groupKey" in picked ? picked.groupKey ?? null : has(groupCandidates, groupKey);
|
|
@@ -39242,6 +39244,14 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
|
|
|
39242
39244
|
}, 250);
|
|
39243
39245
|
if (!event.over || !views) return;
|
|
39244
39246
|
const writes = planViewDrop(views, String(event.active.id), String(event.over.id));
|
|
39247
|
+
if (writes.length > 0) {
|
|
39248
|
+
const next = views.map((v) => {
|
|
39249
|
+
const w = writes.find((x) => x.id === v.id);
|
|
39250
|
+
return w ? { ...v, position: w.position, ..."section" in w ? { section: w.section ?? null } : {} } : v;
|
|
39251
|
+
});
|
|
39252
|
+
setViews(next);
|
|
39253
|
+
onViews?.(next);
|
|
39254
|
+
}
|
|
39245
39255
|
for (const w of writes) {
|
|
39246
39256
|
const written = await saveViewPatch(client, tableId, w.id, { position: w.position, ..."section" in w ? { section: w.section ?? null } : {} });
|
|
39247
39257
|
if (!written.ok) {
|