@ai-matrx/records-ui 0.96.0 → 0.100.1
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 +96 -0
- package/dist/index.cjs +10179 -8422
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +255 -14
- package/dist/index.d.ts +255 -14
- package/dist/index.js +11542 -9752
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +19 -4
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +18 -3
- package/dist/pickers.js.map +1 -1
- package/package.json +4 -4
package/dist/pickers.js
CHANGED
|
@@ -4582,8 +4582,21 @@ function KindValueCell({
|
|
|
4582
4582
|
return /* @__PURE__ */ jsx22("span", { className: cn15("flex min-w-0 flex-wrap gap-1"), "data-records-kind-value": kv.kind, title: JSON.stringify(kv.value), children: named.length > 0 ? named.map((w, i) => /* @__PURE__ */ jsx22(Badge4, { variant: "secondary", className: "px-1.5 py-0 text-[11px] font-normal", children: w }, `${w}-${i}`)) : /* @__PURE__ */ jsx22(Badge4, { variant: "outline", className: "px-1.5 py-0 text-[11px] font-normal", children: kindLabel(kv.kind) }) });
|
|
4583
4583
|
}
|
|
4584
4584
|
|
|
4585
|
+
// src/formulaNames.ts
|
|
4586
|
+
import { sourceArchivedOf } from "@ai-matrx/records";
|
|
4587
|
+
var FORMULA_INPUT_KEYS = "__formula_input_keys";
|
|
4588
|
+
function formulaSourceArchived(field, document2) {
|
|
4589
|
+
const keys = (field.config ?? {})[FORMULA_INPUT_KEYS];
|
|
4590
|
+
if (!Array.isArray(keys) || !document2) return null;
|
|
4591
|
+
for (const key of keys) {
|
|
4592
|
+
const state = sourceArchivedOf(document2[String(key)]);
|
|
4593
|
+
if (state) return state;
|
|
4594
|
+
}
|
|
4595
|
+
return null;
|
|
4596
|
+
}
|
|
4597
|
+
|
|
4585
4598
|
// src/values.tsx
|
|
4586
|
-
import { newerKindWords, sourceArchivedOf } from "@ai-matrx/records";
|
|
4599
|
+
import { newerKindWords, sourceArchivedOf as sourceArchivedOf2 } from "@ai-matrx/records";
|
|
4587
4600
|
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4588
4601
|
function statusMark(field, item, document2) {
|
|
4589
4602
|
const mark = statusMarkOf(field, item, document2);
|
|
@@ -4637,7 +4650,7 @@ function SourceArchivedValue({ state }) {
|
|
|
4637
4650
|
}
|
|
4638
4651
|
var ABSENCE_WORDS = ABSENCE_WORD_LABEL;
|
|
4639
4652
|
function renderValue(field, value, document2, labels, stillWaitingFor) {
|
|
4640
|
-
const archivedSource =
|
|
4653
|
+
const archivedSource = sourceArchivedOf2(value);
|
|
4641
4654
|
if (archivedSource) return /* @__PURE__ */ jsx23(SourceArchivedValue, { state: archivedSource });
|
|
4642
4655
|
const envelope = envelopeFor(document2, field.key);
|
|
4643
4656
|
if (envelope?.absent) {
|
|
@@ -4648,6 +4661,8 @@ function renderValue(field, value, document2, labels, stillWaitingFor) {
|
|
|
4648
4661
|
if (gone) {
|
|
4649
4662
|
return /* @__PURE__ */ jsx23("span", { className: "text-xs italic text-muted-foreground", title: `It pointed at ${gone}`, children: "The record this pointed at no longer exists" });
|
|
4650
4663
|
}
|
|
4664
|
+
const archivedInput = formulaSourceArchived(field, document2);
|
|
4665
|
+
if (archivedInput) return /* @__PURE__ */ jsx23(SourceArchivedValue, { state: archivedInput });
|
|
4651
4666
|
const computed = computedEmptyOf(field, document2);
|
|
4652
4667
|
if (computed?.sentence) return /* @__PURE__ */ jsx23("span", { className: "text-xs italic text-muted-foreground", children: computed.sentence });
|
|
4653
4668
|
if (computed?.words) return /* @__PURE__ */ jsx23("span", { "data-records-empty-why": computed.kind, children: computed.words });
|
|
@@ -4738,7 +4753,7 @@ function renderValue(field, value, document2, labels, stillWaitingFor) {
|
|
|
4738
4753
|
}
|
|
4739
4754
|
function scalarText(field, value, labels, stillWaitingFor) {
|
|
4740
4755
|
if (value === null || value === void 0) return "\u2014";
|
|
4741
|
-
if (
|
|
4756
|
+
if (sourceArchivedOf2(value)) return SOURCE_ARCHIVED_WORDS;
|
|
4742
4757
|
if (isSignatureField(field)) return signatureWords(value) ?? "\u2014";
|
|
4743
4758
|
const newerWords = newerKindWords(field, value);
|
|
4744
4759
|
if (newerWords !== null) return newerWords;
|