@ai-matrx/records 0.98.11 → 0.98.12
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 +6 -0
- package/dist/core/index.cjs +8 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +8 -1
- package/dist/core/index.js.map +1 -1
- package/dist/first-page/index.cjs +7 -0
- package/dist/first-page/index.cjs.map +1 -1
- package/dist/first-page/index.d.cts +4 -0
- package/dist/first-page/index.d.ts +4 -0
- package/dist/first-page/index.js +7 -0
- package/dist/first-page/index.js.map +1 -1
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +8 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +8 -1
- package/dist/react/index.js.map +1 -1
- package/dist/views/index.cjs +41 -0
- package/dist/views/index.cjs.map +1 -1
- package/dist/views/index.d.cts +28 -1
- package/dist/views/index.d.ts +28 -1
- package/dist/views/index.js +41 -0
- package/dist/views/index.js.map +1 -1
- package/package.json +2 -2
package/dist/react/index.js
CHANGED
|
@@ -13456,6 +13456,13 @@ function tableRenderSchema(facts) {
|
|
|
13456
13456
|
function refuse4(code, message, hint) {
|
|
13457
13457
|
return { ok: false, error: { code, message, hint, ours: true } };
|
|
13458
13458
|
}
|
|
13459
|
+
function displacedSource(envelope) {
|
|
13460
|
+
if (envelope.src) return { src: envelope.src };
|
|
13461
|
+
const by = envelope.actor === "agent" ? "an agent" : envelope.actor === "system" ? "the system" : envelope.actor ? "a person" : null;
|
|
13462
|
+
if (by === null) return {};
|
|
13463
|
+
const day = typeof envelope.at === "string" && envelope.at.length >= 10 ? ` on ${envelope.at.slice(0, 10)}` : "";
|
|
13464
|
+
return { src: { name: `Entered by ${by}${day}` } };
|
|
13465
|
+
}
|
|
13459
13466
|
function alternatePatch(document, field_key, alternate_index, rank) {
|
|
13460
13467
|
const block = document._values ?? {};
|
|
13461
13468
|
const envelope = block[field_key];
|
|
@@ -13471,7 +13478,7 @@ function alternatePatch(document, field_key, alternate_index, rank) {
|
|
|
13471
13478
|
const taken = new Set(kept.map((a) => a.rank));
|
|
13472
13479
|
let rank2 = 1;
|
|
13473
13480
|
while (taken.has(rank2)) rank2 += 1;
|
|
13474
|
-
next.push({ value: current, ...envelope
|
|
13481
|
+
next.push({ value: current, ...displacedSource(envelope), rank: rank2 });
|
|
13475
13482
|
}
|
|
13476
13483
|
const { ver: _ver, actor: _actor, at: _at, on_behalf_of: _on, absent: _absent, alternates: _alts, src: _src, ...rest } = envelope;
|
|
13477
13484
|
const changed = { ...rest, ...chosen.src ? { src: chosen.src } : {} };
|