qt-ui-kit 1.0.48 → 1.0.50

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.mjs CHANGED
@@ -11180,6 +11180,7 @@ var IntegrationService = /* @__PURE__ */ ((IntegrationService6) => {
11180
11180
  IntegrationService6["MSMAIL"] = "microsoft_mail";
11181
11181
  IntegrationService6["MSCAL"] = "microsoft_calendar";
11182
11182
  IntegrationService6["AJIRA"] = "atlassian_jira";
11183
+ IntegrationService6["CLKUP"] = "clickup";
11183
11184
  return IntegrationService6;
11184
11185
  })(IntegrationService || {});
11185
11186
  var BaseIconName = /* @__PURE__ */ ((BaseIconName2) => {
@@ -16037,7 +16038,11 @@ function SingleEvent({
16037
16038
  "div",
16038
16039
  {
16039
16040
  className: "flex flex-col rounded-3xl bg-qtneutral-200 py-4 px-4 gap-4 h-min",
16040
- onClick: () => setExpanded(!expanded),
16041
+ onClick: (e) => {
16042
+ if (e.target === e.currentTarget) {
16043
+ setExpanded(!expanded);
16044
+ }
16045
+ },
16041
16046
  children: [
16042
16047
  /* @__PURE__ */ jsxs20("div", { className: "flex gap-2 place-items-center", children: [
16043
16048
  /* @__PURE__ */ jsx30(
@@ -16148,7 +16153,11 @@ function EventCard({
16148
16153
  }
16149
16154
 
16150
16155
  // src/components/organisms/message_body/email_body.tsx
16156
+ import DOMPurify from "dompurify";
16151
16157
  import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
16158
+ function isHtml(content) {
16159
+ return /<\/?[a-z][\s\S]*>/i.test(content);
16160
+ }
16152
16161
  function EmailBody({
16153
16162
  subjectLine,
16154
16163
  to,
@@ -16164,13 +16173,20 @@ function EmailBody({
16164
16173
  /* @__PURE__ */ jsx32(MetadataRow, { metadata: [`Subject: ${subjectLine}`] }),
16165
16174
  /* @__PURE__ */ jsx32(MetadataRow, { metadata: [`To: ${to}`] }),
16166
16175
  /* @__PURE__ */ jsx32(MetadataRow, { metadata: [`Date: ${date}`] }),
16167
- /* @__PURE__ */ jsx32(MetadataRow, { metadata: [`from: ${from}`] }),
16176
+ /* @__PURE__ */ jsx32(MetadataRow, { metadata: [`From: ${from}`] }),
16168
16177
  /* @__PURE__ */ jsx32(MetadataRow, { metadata: [`CC: ${CC}`] }),
16169
16178
  /* @__PURE__ */ jsx32(MetadataRow, { metadata: [`BCC: ${BCC}`] }),
16170
16179
  /* @__PURE__ */ jsx32(MetadataRow, { metadata: [`Attachments: ${attachments}`] })
16171
16180
  ] }),
16172
16181
  /* @__PURE__ */ jsx32("hr", { className: "text-qtneutral-500" }),
16173
- /* @__PURE__ */ jsx32("div", { className: "body-medium", children: body })
16182
+ /* @__PURE__ */ jsx32("div", { className: "body-medium prose break-all", children: body ? isHtml(body) ? /* @__PURE__ */ jsx32(
16183
+ "div",
16184
+ {
16185
+ dangerouslySetInnerHTML: {
16186
+ __html: DOMPurify.sanitize(body)
16187
+ }
16188
+ }
16189
+ ) : /* @__PURE__ */ jsx32("pre", { className: "whitespace-pre-wrap", children: body }) : null })
16174
16190
  ] });
16175
16191
  }
16176
16192
 
@@ -16197,7 +16213,10 @@ function MarkdownRenderer({ content, truncated }) {
16197
16213
  return /* @__PURE__ */ jsx34(
16198
16214
  "div",
16199
16215
  {
16200
- className: clsx8("flex flex-col markdown", truncated && "line-clamp-3"),
16216
+ className: clsx8(
16217
+ "flex flex-col markdown break-all",
16218
+ truncated && "line-clamp-3"
16219
+ ),
16201
16220
  children: /* @__PURE__ */ jsx34(ReactMarkdown, { remarkPlugins: [remarkGfm], children: content })
16202
16221
  }
16203
16222
  );