@ai-matrx/records-ui 0.115.100 → 0.115.101
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 +13 -1
- package/dist/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/pickers.cjs +11 -3
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +11 -3
- package/dist/pickers.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records-ui
|
|
2
2
|
|
|
3
|
-
## 0.115.
|
|
3
|
+
## 0.115.101
|
|
4
4
|
|
|
5
5
|
UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
|
|
6
6
|
Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/records-ui/src`.
|
|
7
7
|
|
|
8
|
+
## 0.115.100
|
|
9
|
+
|
|
10
|
+
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
|
11
|
+
so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
|
|
12
|
+
Diff: `git diff a97ec09caf 6902500e6b -- apps/shared/records-ui/src`
|
|
13
|
+
|
|
14
|
+
Changed shipped source files (4):
|
|
15
|
+
- `apps/shared/records-ui/src/Grid.tsx`
|
|
16
|
+
- `apps/shared/records-ui/src/gridEditing.tsx`
|
|
17
|
+
- `apps/shared/records-ui/src/gridOpen.tsx`
|
|
18
|
+
- `apps/shared/records-ui/src/values.tsx`
|
|
19
|
+
|
|
8
20
|
## 0.115.99
|
|
9
21
|
|
|
10
22
|
SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
|
package/dist/index.cjs
CHANGED
|
@@ -14478,9 +14478,8 @@ function renderValue(field2, value, document2, labels, stillWaitingFor, look, ro
|
|
|
14478
14478
|
if (Array.isArray(value)) {
|
|
14479
14479
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "flex flex-wrap gap-1", children: value.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_design_system40.Badge, { variant: "secondary", className: "text-[11px]", children: scalarText(field2, item, labels) }, `${String(item)}-${i}`)) });
|
|
14480
14480
|
}
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
}
|
|
14481
|
+
const pictureAt = imageAddressOf(field2, value);
|
|
14482
|
+
if (pictureAt) return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ImageUrlValue, { url: pictureAt, alt: field2.label || field2.key, room });
|
|
14484
14483
|
if (kind2 === "url" && typeof value === "string") {
|
|
14485
14484
|
const href = value.includes("://") ? value : `https://${value}`;
|
|
14486
14485
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(LinkPreviewCard, { url: href, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
@@ -14530,6 +14529,15 @@ function isImageUrl2(value) {
|
|
|
14530
14529
|
}
|
|
14531
14530
|
return /\.(png|jpe?g|gif|webp|avif|svg|bmp|ico)$/i.test(url.pathname) || /\/(images?|img)\//i.test(url.pathname);
|
|
14532
14531
|
}
|
|
14532
|
+
function imageAddressOf(field2, value) {
|
|
14533
|
+
if (typeof value !== "string") return null;
|
|
14534
|
+
const kind2 = editorKindFor(field2);
|
|
14535
|
+
if (kind2 !== "text" && kind2 !== "url") return null;
|
|
14536
|
+
const text = value.trim();
|
|
14537
|
+
if (isImageUrl2(text)) return text;
|
|
14538
|
+
const named = /(^|[^a-z])(logo|image|img|photo|picture|avatar|thumbnail|headshot)s?([^a-z]|$)/i.test(`${field2.label ?? ""} ${field2.key}`);
|
|
14539
|
+
return named && /^https?:\/\/[^\s]+$/i.test(text) ? text : null;
|
|
14540
|
+
}
|
|
14533
14541
|
function ImageUrlValue({ url, alt, room }) {
|
|
14534
14542
|
const host = useRecordsUi();
|
|
14535
14543
|
const box = room === "full" ? "size-24" : "size-6";
|
|
@@ -14669,6 +14677,8 @@ function RecordValue({
|
|
|
14669
14677
|
}
|
|
14670
14678
|
}
|
|
14671
14679
|
}
|
|
14680
|
+
const pictureAt = value !== null && value !== void 0 && !(0, import_core10.wholeValueOf)(document2, field2.key) && !envelopeFor(document2, field2.key)?.absent ? imageAddressOf(field2, value) : null;
|
|
14681
|
+
if (pictureAt) return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ImageUrlValue, { url: pictureAt, alt: field2.label || field2.key, room });
|
|
14672
14682
|
const shown5 = format ?? formatForField(field2);
|
|
14673
14683
|
const shape = shown5 && (shown5.id === "date" || shown5.id === "datetime") && isDateField(field2) ? dateFormatFor(field2, value) : void 0;
|
|
14674
14684
|
const dated = shape ? { ...shape, ...shown5?.options ? { options: shown5.options } : {} } : void 0;
|