qt-ui-kit 1.0.83 → 1.0.85
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/dist/index.js +11 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -15
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +4 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -16253,8 +16253,6 @@ function MetadataRow({ metadata }) {
|
|
|
16253
16253
|
|
|
16254
16254
|
// src/components/organisms/message_body/email_body.tsx
|
|
16255
16255
|
import DOMPurify from "dompurify";
|
|
16256
|
-
import ReactMarkdown from "react-markdown";
|
|
16257
|
-
import rehypeRaw from "rehype-raw";
|
|
16258
16256
|
import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
16259
16257
|
function EmailBody({
|
|
16260
16258
|
subjectLine,
|
|
@@ -16266,7 +16264,7 @@ function EmailBody({
|
|
|
16266
16264
|
attachments,
|
|
16267
16265
|
body
|
|
16268
16266
|
}) {
|
|
16269
|
-
const
|
|
16267
|
+
const safeText = DOMPurify.sanitize(body ? body.replace(/\n/g, "<br>") : "");
|
|
16270
16268
|
return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl overflow-auto", children: [
|
|
16271
16269
|
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-0.5", children: [
|
|
16272
16270
|
/* @__PURE__ */ jsx31(MetadataRow, { metadata: [`Subject: ${subjectLine}`] }),
|
|
@@ -16279,14 +16277,12 @@ function EmailBody({
|
|
|
16279
16277
|
] }),
|
|
16280
16278
|
/* @__PURE__ */ jsx31("hr", { className: "text-qtneutral-500" }),
|
|
16281
16279
|
/* @__PURE__ */ jsx31("div", { className: "body-medium prose break-all whitespace-pre-line", children: body && /* @__PURE__ */ jsx31(
|
|
16282
|
-
|
|
16280
|
+
"iframe",
|
|
16283
16281
|
{
|
|
16284
|
-
|
|
16285
|
-
|
|
16286
|
-
|
|
16287
|
-
|
|
16288
|
-
// Apply custom components/styling
|
|
16289
|
-
}
|
|
16282
|
+
srcDoc: `<div style="font-family: sans-serif;">${safeText}</div>`,
|
|
16283
|
+
sandbox: "allow-popups",
|
|
16284
|
+
style: { border: 0, width: "100%" },
|
|
16285
|
+
title: "Plain Text Email"
|
|
16290
16286
|
}
|
|
16291
16287
|
) })
|
|
16292
16288
|
] });
|
|
@@ -16308,7 +16304,7 @@ function EmojiPill({ emoji, count }) {
|
|
|
16308
16304
|
|
|
16309
16305
|
// src/util/utilcomponents.tsx
|
|
16310
16306
|
import clsx9 from "clsx";
|
|
16311
|
-
import
|
|
16307
|
+
import ReactMarkdown from "react-markdown";
|
|
16312
16308
|
import remarkGfm from "remark-gfm";
|
|
16313
16309
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
16314
16310
|
function MarkdownRenderer({ content, truncated }) {
|
|
@@ -16319,7 +16315,7 @@ function MarkdownRenderer({ content, truncated }) {
|
|
|
16319
16315
|
"flex flex-col markdown break-all",
|
|
16320
16316
|
truncated && "line-clamp-3"
|
|
16321
16317
|
),
|
|
16322
|
-
children: /* @__PURE__ */ jsx33(
|
|
16318
|
+
children: /* @__PURE__ */ jsx33(ReactMarkdown, { remarkPlugins: [remarkGfm], children: content })
|
|
16323
16319
|
}
|
|
16324
16320
|
);
|
|
16325
16321
|
}
|
|
@@ -16416,7 +16412,7 @@ function ChatBubble({
|
|
|
16416
16412
|
children: name ? name[0].toUpperCase() : ""
|
|
16417
16413
|
}
|
|
16418
16414
|
),
|
|
16419
|
-
uniqueEmojis.entries().map(([e, c]) => /* @__PURE__ */ jsx34(EmojiPill, { emoji: e, count: c }))
|
|
16415
|
+
Array.from(uniqueEmojis.entries()).map(([e, c]) => /* @__PURE__ */ jsx34(EmojiPill, { emoji: e, count: c }, e))
|
|
16420
16416
|
] })
|
|
16421
16417
|
]
|
|
16422
16418
|
}
|
|
@@ -16426,7 +16422,7 @@ function ChatBubble({
|
|
|
16426
16422
|
// src/components/organisms/message_body/chat_body.tsx
|
|
16427
16423
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
16428
16424
|
function ChatBody({ messages }) {
|
|
16429
|
-
return /* @__PURE__ */ jsx35("div", { className: "p-4 rounded-2xl w-full", children: /* @__PURE__ */ jsx35("div", { className: "flex flex-col place-content-center gap-4", children: messages && messages.map((msg) => {
|
|
16425
|
+
return /* @__PURE__ */ jsx35("div", { className: "p-4 rounded-2xl w-full", children: /* @__PURE__ */ jsx35("div", { className: "flex flex-col place-content-center gap-4", children: messages && Array.from(messages).map((msg) => {
|
|
16430
16426
|
return /* @__PURE__ */ jsx35(
|
|
16431
16427
|
ChatBubble,
|
|
16432
16428
|
{
|
|
@@ -16492,7 +16488,7 @@ function TicketBody({
|
|
|
16492
16488
|
/* @__PURE__ */ jsx36("div", { children: related || "None" }),
|
|
16493
16489
|
/* @__PURE__ */ jsx36("div", { children: description || "None" })
|
|
16494
16490
|
] }),
|
|
16495
|
-
comments && comments.map((c, i) => {
|
|
16491
|
+
comments && Array.from(comments).map((c, i) => {
|
|
16496
16492
|
return /* @__PURE__ */ jsxs26("div", { className: "flex col-span-2 flex-col gap-2 w-full", children: [
|
|
16497
16493
|
/* @__PURE__ */ jsx36("hr", { className: "text-qtneutral-500" }),
|
|
16498
16494
|
/* @__PURE__ */ jsx36("div", { className: `${i == 0 ? "body-bold" : "body "}`, children: `${i == 0 ? "New" : ""} Comment` }),
|