@ai-matrx/records-ui 0.116.35 → 0.116.37
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 +21 -1
- package/dist/{chunk-IL66BADF.js → chunk-HGPMJHRJ.js} +4 -1
- package/dist/{chunk-IL66BADF.js.map → chunk-HGPMJHRJ.js.map} +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +4 -0
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -182,7 +182,7 @@ import {
|
|
|
182
182
|
withoutAddition,
|
|
183
183
|
withoutLeadingBlank,
|
|
184
184
|
workedOutErrorFor
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-HGPMJHRJ.js";
|
|
186
186
|
import {
|
|
187
187
|
CHART_PLOT_PX,
|
|
188
188
|
EMBEDDED_ROW_PX,
|
|
@@ -32585,10 +32585,11 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
|
|
|
32585
32585
|
);
|
|
32586
32586
|
const stored = useMemo60(() => draft ? (forms ?? []).find((f) => f.id === draft.id) ?? null : null, [draft, forms]);
|
|
32587
32587
|
const dirty = Boolean(draft && stored && !sameForm(draft, stored));
|
|
32588
|
+
const lastSaved = useRef43(null);
|
|
32588
32589
|
useEffect85(() => {
|
|
32589
32590
|
if (!draft || !stored) return;
|
|
32590
32591
|
const timer = window.setTimeout(() => {
|
|
32591
|
-
if (sameForm(draft, stored)) dropKeptDraft(formDraftKey(draft.id), { storage: "local" });
|
|
32592
|
+
if (sameForm(draft, stored) || lastSaved.current && sameForm(draft, lastSaved.current)) dropKeptDraft(formDraftKey(draft.id), { storage: "local" });
|
|
32592
32593
|
else keepDraft(formDraftKey(draft.id), keptSpecOf(draft), { storage: "local" });
|
|
32593
32594
|
}, 300);
|
|
32594
32595
|
return () => window.clearTimeout(timer);
|
|
@@ -32648,6 +32649,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
|
|
|
32648
32649
|
setRefused(written.error);
|
|
32649
32650
|
return false;
|
|
32650
32651
|
}
|
|
32652
|
+
lastSaved.current = draft;
|
|
32651
32653
|
dropKeptDraft(formDraftKey(draft.id), { storage: "local" });
|
|
32652
32654
|
setRestoredAt(null);
|
|
32653
32655
|
setSaved("Saved");
|