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 CHANGED
@@ -16280,8 +16280,6 @@ function MetadataRow({ metadata }) {
16280
16280
 
16281
16281
  // src/components/organisms/message_body/email_body.tsx
16282
16282
  var import_dompurify = __toESM(require("dompurify"));
16283
- var import_react_markdown = __toESM(require("react-markdown"));
16284
- var import_rehype_raw = __toESM(require("rehype-raw"));
16285
16283
  var import_jsx_runtime31 = require("react/jsx-runtime");
16286
16284
  function EmailBody({
16287
16285
  subjectLine,
@@ -16293,7 +16291,7 @@ function EmailBody({
16293
16291
  attachments,
16294
16292
  body
16295
16293
  }) {
16296
- const clean = import_dompurify.default.sanitize(body ?? "");
16294
+ const safeText = import_dompurify.default.sanitize(body ? body.replace(/\n/g, "<br>") : "");
16297
16295
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl overflow-auto", children: [
16298
16296
  /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
16299
16297
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MetadataRow, { metadata: [`Subject: ${subjectLine}`] }),
@@ -16306,14 +16304,12 @@ function EmailBody({
16306
16304
  ] }),
16307
16305
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("hr", { className: "text-qtneutral-500" }),
16308
16306
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "body-medium prose break-all whitespace-pre-line", children: body && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
16309
- import_react_markdown.default,
16307
+ "iframe",
16310
16308
  {
16311
- children: body,
16312
- rehypePlugins: [import_rehype_raw.default],
16313
- components: {
16314
- img: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("img", { style: { maxWidth: "100%" }, ...props })
16315
- // Apply custom components/styling
16316
- }
16309
+ srcDoc: `<div style="font-family: sans-serif;">${safeText}</div>`,
16310
+ sandbox: "allow-popups",
16311
+ style: { border: 0, width: "100%" },
16312
+ title: "Plain Text Email"
16317
16313
  }
16318
16314
  ) })
16319
16315
  ] });
@@ -16335,7 +16331,7 @@ function EmojiPill({ emoji, count }) {
16335
16331
 
16336
16332
  // src/util/utilcomponents.tsx
16337
16333
  var import_clsx9 = __toESM(require("clsx"));
16338
- var import_react_markdown2 = __toESM(require("react-markdown"));
16334
+ var import_react_markdown = __toESM(require("react-markdown"));
16339
16335
  var import_remark_gfm = __toESM(require("remark-gfm"));
16340
16336
  var import_jsx_runtime33 = require("react/jsx-runtime");
16341
16337
  function MarkdownRenderer({ content, truncated }) {
@@ -16346,7 +16342,7 @@ function MarkdownRenderer({ content, truncated }) {
16346
16342
  "flex flex-col markdown break-all",
16347
16343
  truncated && "line-clamp-3"
16348
16344
  ),
16349
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_markdown2.default, { remarkPlugins: [import_remark_gfm.default], children: content })
16345
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default], children: content })
16350
16346
  }
16351
16347
  );
16352
16348
  }
@@ -16443,7 +16439,7 @@ function ChatBubble({
16443
16439
  children: name ? name[0].toUpperCase() : ""
16444
16440
  }
16445
16441
  ),
16446
- uniqueEmojis.entries().map(([e, c]) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(EmojiPill, { emoji: e, count: c }))
16442
+ Array.from(uniqueEmojis.entries()).map(([e, c]) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(EmojiPill, { emoji: e, count: c }, e))
16447
16443
  ] })
16448
16444
  ]
16449
16445
  }
@@ -16453,7 +16449,7 @@ function ChatBubble({
16453
16449
  // src/components/organisms/message_body/chat_body.tsx
16454
16450
  var import_jsx_runtime35 = require("react/jsx-runtime");
16455
16451
  function ChatBody({ messages }) {
16456
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "p-4 rounded-2xl w-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col place-content-center gap-4", children: messages && messages.map((msg) => {
16452
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "p-4 rounded-2xl w-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col place-content-center gap-4", children: messages && Array.from(messages).map((msg) => {
16457
16453
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
16458
16454
  ChatBubble,
16459
16455
  {
@@ -16519,7 +16515,7 @@ function TicketBody({
16519
16515
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { children: related || "None" }),
16520
16516
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { children: description || "None" })
16521
16517
  ] }),
16522
- comments && comments.map((c, i) => {
16518
+ comments && Array.from(comments).map((c, i) => {
16523
16519
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex col-span-2 flex-col gap-2 w-full", children: [
16524
16520
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("hr", { className: "text-qtneutral-500" }),
16525
16521
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `${i == 0 ? "body-bold" : "body "}`, children: `${i == 0 ? "New" : ""} Comment` }),