@ai-matrx/records-ui 0.102.9 → 0.102.11
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/index.cjs +52 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +172 -151
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +5 -3
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +6 -4
- package/dist/pickers.js.map +1 -1
- package/package.json +4 -4
package/dist/pickers.js
CHANGED
|
@@ -4642,7 +4642,7 @@ import { formatPhone as formatPhone2 } from "@ai-matrx/design-system/field-forma
|
|
|
4642
4642
|
|
|
4643
4643
|
// src/ReferenceChips.tsx
|
|
4644
4644
|
import { entityRefsOf as entityRefsOf2 } from "@ai-matrx/records";
|
|
4645
|
-
import { Badge as Badge4, cn as cn16 } from "@ai-matrx/design-system";
|
|
4645
|
+
import { Badge as Badge4, Skeleton, cn as cn16 } from "@ai-matrx/design-system";
|
|
4646
4646
|
|
|
4647
4647
|
// src/kindValues.ts
|
|
4648
4648
|
import { tryDecodeDirective } from "@ai-matrx/content-ir/directives";
|
|
@@ -4738,9 +4738,11 @@ function PageGlyph() {
|
|
|
4738
4738
|
}
|
|
4739
4739
|
function ReferenceChip({ reference, waiting }) {
|
|
4740
4740
|
const host = useRecordsUi();
|
|
4741
|
+
const look = useEmbeddedLook();
|
|
4742
|
+
const pending = reference.label == null && reference.token === "record" && !waiting && !host.renderReference;
|
|
4743
|
+
const pendingMark = /* @__PURE__ */ jsx23(Skeleton, { "aria-label": "Loading", "data-records-reference-pending": "", className: "inline-block h-3 w-16 shrink-0 rounded-sm align-middle" });
|
|
4741
4744
|
const words = reference.label ?? (reference.token === "record" ? waiting ?? "Loading\u2026" : WITHHELD_ENTITY_LABEL);
|
|
4742
4745
|
const drawn = host.renderReference ? host.renderReference({ ...reference, label: reference.label ?? words }) : null;
|
|
4743
|
-
const look = useEmbeddedLook();
|
|
4744
4746
|
if (look?.plainRelation) {
|
|
4745
4747
|
return /* @__PURE__ */ jsxs20(
|
|
4746
4748
|
"span",
|
|
@@ -4755,7 +4757,7 @@ function ReferenceChip({ reference, waiting }) {
|
|
|
4755
4757
|
title: reference.archived ? ARCHIVED_REFERENCE_TIP : words,
|
|
4756
4758
|
children: [
|
|
4757
4759
|
/* @__PURE__ */ jsx23("span", { "aria-hidden": "true", "data-records-reference-icon": "", className: "inline-flex size-4 shrink-0 items-center justify-center text-muted-foreground", children: glyphOf(reference.icon) ? /* @__PURE__ */ jsx23("span", { className: "text-sm leading-none", children: reference.icon }) : reference.icon && host.renderIcon?.(reference.icon) || /* @__PURE__ */ jsx23(PageGlyph, {}) }),
|
|
4758
|
-
drawn ?? /* @__PURE__ */ jsx23("span", { className: "truncate", children: words }),
|
|
4760
|
+
drawn ?? (pending ? pendingMark : /* @__PURE__ */ jsx23("span", { className: "truncate", children: words })),
|
|
4759
4761
|
reference.archived ? /* @__PURE__ */ jsx23("span", { className: "shrink-0 text-muted-foreground", children: ARCHIVED_REFERENCE_WORD }) : null
|
|
4760
4762
|
]
|
|
4761
4763
|
}
|
|
@@ -4773,7 +4775,7 @@ function ReferenceChip({ reference, waiting }) {
|
|
|
4773
4775
|
"data-records-reference-archived": reference.archived ? "" : void 0,
|
|
4774
4776
|
title: reference.archived ? ARCHIVED_REFERENCE_TIP : words,
|
|
4775
4777
|
children: [
|
|
4776
|
-
drawn ?? /* @__PURE__ */ jsx23("span", { className: "truncate", children: words }),
|
|
4778
|
+
drawn ?? (pending ? pendingMark : /* @__PURE__ */ jsx23("span", { className: "truncate", children: words })),
|
|
4777
4779
|
reference.archived ? /* @__PURE__ */ jsx23("span", { className: "shrink-0 text-muted-foreground", children: ARCHIVED_REFERENCE_WORD }) : null
|
|
4778
4780
|
]
|
|
4779
4781
|
}
|