@ai-matrx/records-ui 0.116.26 → 0.116.27
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 +15 -1
- package/dist/{chunk-4NJUW3VM.js → chunk-6GJLCWSO.js} +16 -7
- package/dist/chunk-6GJLCWSO.js.map +1 -0
- package/dist/index.cjs +15 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/pickers.cjs +15 -6
- package/dist/pickers.cjs.map +1 -1
- package/dist/pickers.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-4NJUW3VM.js.map +0 -1
package/dist/index.js
CHANGED
package/dist/pickers.cjs
CHANGED
|
@@ -5589,6 +5589,15 @@ function RelationPicker({ field, value, onChange, disabled, id, className, allow
|
|
|
5589
5589
|
);
|
|
5590
5590
|
}
|
|
5591
5591
|
|
|
5592
|
+
// src/readableLink.ts
|
|
5593
|
+
function readableLink(raw) {
|
|
5594
|
+
try {
|
|
5595
|
+
return decodeURI(raw).replace(/%40/gi, "@");
|
|
5596
|
+
} catch {
|
|
5597
|
+
return raw;
|
|
5598
|
+
}
|
|
5599
|
+
}
|
|
5600
|
+
|
|
5592
5601
|
// src/buttonCell.tsx
|
|
5593
5602
|
var import_react68 = require("react");
|
|
5594
5603
|
var import_design_system40 = require("@ai-matrx/design-system");
|
|
@@ -8017,7 +8026,7 @@ function RatingStars({
|
|
|
8017
8026
|
function rich(id, text, raw, format) {
|
|
8018
8027
|
switch (id) {
|
|
8019
8028
|
case "email":
|
|
8020
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("a", { href: `mailto:${text}`, className: LINK, onClick: own2, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "truncate", children: text }) });
|
|
8029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("a", { href: `mailto:${text}`, className: LINK, onClick: own2, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "truncate", children: readableLink(text) }) });
|
|
8021
8030
|
case "url":
|
|
8022
8031
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_outbound_react3.OutboundLink, { href: text.includes("://") ? text : `https://${text}`, className: LINK, onClick: own2, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "truncate", children: text }) });
|
|
8023
8032
|
case "phone":
|
|
@@ -9097,7 +9106,7 @@ function Scalar({ value, keyName, dense }) {
|
|
|
9097
9106
|
if (isImageUrl(text, keyName)) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Thumb, { src: text, size: dense ? "sm" : "md" });
|
|
9098
9107
|
if (isUrl(text)) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LinkChip, { href: text, dense });
|
|
9099
9108
|
if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(text)) {
|
|
9100
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("a", { href: `mailto:${text}`, onClick: stop, className: "text-primary underline-offset-2 hover:underline", children: text });
|
|
9109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("a", { href: `mailto:${text}`, onClick: stop, className: "text-primary underline-offset-2 hover:underline", children: readableLink(text) });
|
|
9101
9110
|
}
|
|
9102
9111
|
const date = dateWords(text);
|
|
9103
9112
|
if (date) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { title: text, children: date });
|
|
@@ -9406,7 +9415,7 @@ function renderValue(field, value, document2, labels, stillWaitingFor, look, roo
|
|
|
9406
9415
|
{
|
|
9407
9416
|
className: "inline-flex min-w-0 max-w-full items-center gap-1 rounded-md border border-border bg-muted/60 px-1.5 py-0.5 text-[11px] text-foreground hover:bg-accent",
|
|
9408
9417
|
href,
|
|
9409
|
-
title: value,
|
|
9418
|
+
title: readableLink(value),
|
|
9410
9419
|
"data-records-link-chip": "",
|
|
9411
9420
|
onClick: (event) => event.stopPropagation(),
|
|
9412
9421
|
children: [
|
|
@@ -9430,7 +9439,7 @@ function renderValue(field, value, document2, labels, stillWaitingFor, look, roo
|
|
|
9430
9439
|
);
|
|
9431
9440
|
}
|
|
9432
9441
|
if (kind === "email" && typeof value === "string") {
|
|
9433
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("a", { className: "truncate text-primary underline-offset-2 hover:underline", href: `mailto:${value}`, children: value });
|
|
9442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("a", { className: "truncate text-primary underline-offset-2 hover:underline", href: `mailto:${value}`, children: readableLink(value) });
|
|
9434
9443
|
}
|
|
9435
9444
|
if (typeof value === "boolean") {
|
|
9436
9445
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: kind === "checkbox" ? "text-sm" : "", title: value ? "Yes" : "No", children: value ? "\u2713" : "\u2014" });
|
|
@@ -12810,7 +12819,7 @@ var import_outbound_react7 = require("@ai-matrx/kit/outbound-react");
|
|
|
12810
12819
|
var import_outbound2 = require("@ai-matrx/kit/outbound");
|
|
12811
12820
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12812
12821
|
function buttonPressWords(label, pressed) {
|
|
12813
|
-
if (pressed.do === "open_url") return `${label} opened ${pressed.url}`;
|
|
12822
|
+
if (pressed.do === "open_url") return `${label} opened ${readableLink(pressed.url)}`;
|
|
12814
12823
|
if (pressed.do === "add_row") return `${label}: a row was added.`;
|
|
12815
12824
|
if (pressed.do === "run_action") {
|
|
12816
12825
|
const n = Number(pressed.result?.ran ?? 1);
|
|
@@ -13024,7 +13033,7 @@ function ButtonValue({ field, recordId, inCell, beforeSave }) {
|
|
|
13024
13033
|
said2.value ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(StructuredValueView, { structured: said2.value, label: b.label }) : null,
|
|
13025
13034
|
said2.says,
|
|
13026
13035
|
" ",
|
|
13027
|
-
said2.link ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_outbound_react7.OutboundLink, { href: said2.link, className: "text-primary underline", children: said2.link }) : null
|
|
13036
|
+
said2.link ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_outbound_react7.OutboundLink, { href: said2.link, className: "text-primary underline", children: readableLink(said2.link) }) : null
|
|
13028
13037
|
] }) : null,
|
|
13029
13038
|
said2?.kind === "needs" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
13030
13039
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { children: said2.says }),
|