@burdenoff/microfe-support 2026.1114.1 → 2026.1118.1

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.
Files changed (206) hide show
  1. package/dist/generated/global-operations.d.ts +62 -0
  2. package/dist/generated/global-operations.js +104 -69
  3. package/dist/generated/global-operations.js.map +1 -1
  4. package/dist/generated/global-types.js +17 -15
  5. package/dist/generated/global-types.js.map +1 -1
  6. package/dist/support/SupportUserRoot.js +32 -28
  7. package/dist/support/SupportUserRoot.js.map +1 -1
  8. package/dist/support/SupportUserRoutes.d.ts +1 -0
  9. package/dist/support/SupportUserRoutes.js +31 -28
  10. package/dist/support/SupportUserRoutes.js.map +1 -1
  11. package/dist/support/components/PageLayout.js +35 -35
  12. package/dist/support/components/RouteHelpers.d.ts +2 -1
  13. package/dist/support/components/RouteHelpers.js +3 -3
  14. package/dist/support/components/RouteHelpers.js.map +1 -1
  15. package/dist/support/components/careers/RichTextEditor.js +31 -31
  16. package/dist/support/components/careers/RichTextEditor.js.map +1 -1
  17. package/dist/support/components/help/RelatedArticles.d.ts +12 -0
  18. package/dist/support/components/help/RelatedArticles.js +55 -0
  19. package/dist/support/components/help/RelatedArticles.js.map +1 -0
  20. package/dist/support/components/help/RequestDetailHeader.d.ts +18 -0
  21. package/dist/support/components/help/RequestDetailHeader.js +129 -0
  22. package/dist/support/components/help/RequestDetailHeader.js.map +1 -0
  23. package/dist/support/components/help/SatisfactionReview.d.ts +18 -0
  24. package/dist/support/components/help/SatisfactionReview.js +103 -0
  25. package/dist/support/components/help/SatisfactionReview.js.map +1 -0
  26. package/dist/support/components/help/StarRating.d.ts +16 -0
  27. package/dist/support/components/help/StarRating.js +63 -0
  28. package/dist/support/components/help/StarRating.js.map +1 -0
  29. package/dist/support/components/help/StatusGroupPill.d.ts +11 -0
  30. package/dist/support/components/help/StatusGroupPill.js +19 -0
  31. package/dist/support/components/help/StatusGroupPill.js.map +1 -0
  32. package/dist/support/components/settings/TicketCategoriesSettings.js +69 -69
  33. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  34. package/dist/support/components/tickets/MessageComposer.js +7 -7
  35. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  36. package/dist/support/components/tickets/TicketDetailHeader.js +54 -60
  37. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  38. package/dist/support/components/ui.js +1 -1
  39. package/dist/support/constants.d.ts +23 -0
  40. package/dist/support/constants.js +2 -2
  41. package/dist/support/constants.js.map +1 -1
  42. package/dist/support/hooks/useDebouncedValue.d.ts +6 -0
  43. package/dist/support/hooks/useDebouncedValue.js +12 -0
  44. package/dist/support/hooks/useDebouncedValue.js.map +1 -0
  45. package/dist/support/hooks/useKnowledgeBaseOperations.d.ts +8 -1
  46. package/dist/support/hooks/useKnowledgeBaseOperations.js +86 -81
  47. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  48. package/dist/support/hooks/useSupportVariant.d.ts +11 -0
  49. package/dist/support/hooks/useSupportVariant.js +11 -0
  50. package/dist/support/hooks/useSupportVariant.js.map +1 -0
  51. package/dist/support/hooks/useTicketCreatedToast.d.ts +16 -0
  52. package/dist/support/hooks/useTicketCreatedToast.js +25 -0
  53. package/dist/support/hooks/useTicketCreatedToast.js.map +1 -0
  54. package/dist/support/hooks/useTicketLabels.d.ts +22 -0
  55. package/dist/support/hooks/useTicketLabels.js +40 -0
  56. package/dist/support/hooks/useTicketLabels.js.map +1 -0
  57. package/dist/support/index.d.ts +1 -1
  58. package/dist/support/pages/ArticleDetailAdminPage.js +84 -84
  59. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  60. package/dist/support/pages/ArticleDetailUserPage.d.ts +5 -0
  61. package/dist/support/pages/ArticleDetailUserPage.js +133 -69
  62. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  63. package/dist/support/pages/AskForHelpPage.d.ts +11 -0
  64. package/dist/support/pages/AskForHelpPage.js +396 -0
  65. package/dist/support/pages/AskForHelpPage.js.map +1 -0
  66. package/dist/support/pages/ContactInquiriesPage.js +73 -73
  67. package/dist/support/pages/ContactInquiryDetailPage.js +47 -47
  68. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  69. package/dist/support/pages/CreateTicketPage.d.ts +4 -0
  70. package/dist/support/pages/CreateTicketPage.js +121 -117
  71. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  72. package/dist/support/pages/HelpHubPage.d.ts +9 -0
  73. package/dist/support/pages/HelpHubPage.js +272 -0
  74. package/dist/support/pages/HelpHubPage.js.map +1 -0
  75. package/dist/support/pages/JobApplicationDetailPage.js +388 -388
  76. package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
  77. package/dist/support/pages/JobApplicationsPage.js +35 -35
  78. package/dist/support/pages/JobPostingDetailPage.js +236 -236
  79. package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
  80. package/dist/support/pages/KnowledgeBaseUserPage.d.ts +6 -1
  81. package/dist/support/pages/KnowledgeBaseUserPage.js +188 -137
  82. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  83. package/dist/support/pages/MyRequestsPage.d.ts +16 -0
  84. package/dist/support/pages/MyRequestsPage.js +389 -0
  85. package/dist/support/pages/MyRequestsPage.js.map +1 -0
  86. package/dist/support/pages/TicketDetailUserPage.d.ts +5 -0
  87. package/dist/support/pages/TicketDetailUserPage.js +285 -192
  88. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  89. package/dist/support/pages/TicketListPage.d.ts +7 -0
  90. package/dist/support/pages/TicketListPage.js +150 -153
  91. package/dist/support/pages/TicketListPage.js.map +1 -1
  92. package/dist/support/providers/SupportProvider.js +8 -7
  93. package/dist/support/providers/SupportProvider.js.map +1 -1
  94. package/dist/support/store/supportStore.d.ts +5 -0
  95. package/dist/support/store/supportStore.js +1 -0
  96. package/dist/support/store/supportStore.js.map +1 -1
  97. package/dist/support/translations/en.d.ts +279 -0
  98. package/dist/support/translations/en.js +270 -1
  99. package/dist/support/translations/en.js.map +1 -1
  100. package/dist/support/types/index.d.ts +13 -0
  101. package/dist/support/utils/cameFrom.d.ts +16 -0
  102. package/dist/support/utils/cameFrom.js +22 -0
  103. package/dist/support/utils/cameFrom.js.map +1 -0
  104. package/dist/support/utils/dates.d.ts +15 -0
  105. package/dist/support/utils/dates.js +35 -0
  106. package/dist/support/utils/dates.js.map +1 -0
  107. package/dist/support/utils/reopen.d.ts +27 -0
  108. package/dist/support/utils/reopen.js +27 -0
  109. package/dist/support/utils/reopen.js.map +1 -0
  110. package/dist/support/utils/requestTechnicalDetails.d.ts +13 -0
  111. package/dist/support/utils/requestTechnicalDetails.js +38 -0
  112. package/dist/support/utils/requestTechnicalDetails.js.map +1 -0
  113. package/dist/support/utils/ticketFilters.d.ts +16 -0
  114. package/dist/support/utils/ticketFilters.js +24 -12
  115. package/dist/support/utils/ticketFilters.js.map +1 -1
  116. package/dist/support/utils/ticketStatusGroups.d.ts +20 -0
  117. package/dist/support/utils/ticketStatusGroups.js +39 -0
  118. package/dist/support/utils/ticketStatusGroups.js.map +1 -0
  119. package/package.json +2 -2
  120. package/dist/_virtual/_rolldown/runtime.js +0 -6
  121. package/dist/node_modules/@tiptap/core/dist/index.js +0 -3491
  122. package/dist/node_modules/@tiptap/core/dist/index.js.map +0 -1
  123. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -44
  124. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
  125. package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +0 -12
  126. package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js.map +0 -1
  127. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -75
  128. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
  129. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -73
  130. package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
  131. package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -78
  132. package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
  133. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -157
  134. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
  135. package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -11
  136. package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
  137. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -50
  138. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
  139. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -70
  140. package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
  141. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -49
  142. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
  143. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -70
  144. package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
  145. package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -389
  146. package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
  147. package/dist/node_modules/@tiptap/extension-list/dist/index.js +0 -967
  148. package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
  149. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -46
  150. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
  151. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -6
  152. package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +0 -1
  153. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -55
  154. package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
  155. package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -14
  156. package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
  157. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +0 -72
  158. package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
  159. package/dist/node_modules/@tiptap/extensions/dist/index.js +0 -457
  160. package/dist/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
  161. package/dist/node_modules/@tiptap/react/dist/index.js +0 -332
  162. package/dist/node_modules/@tiptap/react/dist/index.js.map +0 -1
  163. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -28
  164. package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
  165. package/dist/node_modules/fast-equals/dist/es/index.js +0 -298
  166. package/dist/node_modules/fast-equals/dist/es/index.js.map +0 -1
  167. package/dist/node_modules/linkifyjs/dist/linkify.js +0 -527
  168. package/dist/node_modules/linkifyjs/dist/linkify.js.map +0 -1
  169. package/dist/node_modules/orderedmap/dist/index.js +0 -68
  170. package/dist/node_modules/orderedmap/dist/index.js.map +0 -1
  171. package/dist/node_modules/prosemirror-commands/dist/index.js +0 -334
  172. package/dist/node_modules/prosemirror-commands/dist/index.js.map +0 -1
  173. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -112
  174. package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +0 -1
  175. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -168
  176. package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +0 -1
  177. package/dist/node_modules/prosemirror-history/dist/index.js +0 -219
  178. package/dist/node_modules/prosemirror-history/dist/index.js.map +0 -1
  179. package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -51
  180. package/dist/node_modules/prosemirror-keymap/dist/index.js.map +0 -1
  181. package/dist/node_modules/prosemirror-model/dist/index.js +0 -1775
  182. package/dist/node_modules/prosemirror-model/dist/index.js.map +0 -1
  183. package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -77
  184. package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +0 -1
  185. package/dist/node_modules/prosemirror-state/dist/index.js +0 -526
  186. package/dist/node_modules/prosemirror-state/dist/index.js.map +0 -1
  187. package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1204
  188. package/dist/node_modules/prosemirror-transform/dist/index.js.map +0 -1
  189. package/dist/node_modules/prosemirror-view/dist/index.js +0 -3355
  190. package/dist/node_modules/prosemirror-view/dist/index.js.map +0 -1
  191. package/dist/node_modules/rope-sequence/dist/index.js +0 -84
  192. package/dist/node_modules/rope-sequence/dist/index.js.map +0 -1
  193. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -55
  194. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
  195. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -53
  196. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
  197. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -53
  198. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
  199. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -45
  200. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
  201. package/dist/node_modules/use-sync-external-store/shim/index.js +0 -11
  202. package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
  203. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +0 -11
  204. package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
  205. package/dist/node_modules/w3c-keyname/index.js +0 -89
  206. package/dist/node_modules/w3c-keyname/index.js.map +0 -1
@@ -5,87 +5,100 @@ import { useKnowledgeBaseOperations as a } from "../hooks/useKnowledgeBaseOperat
5
5
  import { EmptyState as o, LoadingState as s, PageLayout as c } from "../components/PageLayout.js";
6
6
  import { useSupport as l } from "../providers/SupportProvider.js";
7
7
  import { getCategoryBadgeClass as u } from "../utils/categoryColors.js";
8
- import { useEffect as d } from "react";
9
- import { ArrowLeft as f, Calendar as p, Eye as m, Tag as h, ThumbsDown as g, ThumbsUp as _, User as v } from "lucide-react";
10
- import { useNavigate as y, useParams as b } from "react-router";
11
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
8
+ import { useIsFluidgridsVariant as d } from "../hooks/useSupportVariant.js";
9
+ import { RelatedArticles as f } from "../components/help/RelatedArticles.js";
10
+ import { joinPath as p } from "../utils/index.js";
11
+ import { ASK_FOR_HELP_FROM_PARAM as m } from "../constants.js";
12
+ import { useEffect as h, useState as g } from "react";
13
+ import { ShowTechnicalDetails as _ } from "@burdenoff/fe-libs/ui";
14
+ import { ArrowLeft as v, Calendar as y, Eye as b, MessageCircleQuestion as x, Tag as S, ThumbsDown as C, ThumbsUp as w, User as T } from "lucide-react";
15
+ import { Link as E, useLocation as D, useNavigate as O, useParams as k } from "react-router";
16
+ import { jsx as A, jsxs as j } from "react/jsx-runtime";
12
17
  // src/support/pages/ArticleDetailUserPage.tsx
13
- function C() {
14
- let { slug: C } = b(), w = y(), { basePath: T = "" } = l(), E = i(), { articleDetail: D, articleLoading: O, articleError: k, voteArticle: A, recordView: j, ratingArticle: M } = a(C);
15
- d(() => {
16
- D?.id && j(D.id);
17
- }, [D?.id, j]);
18
- let N = async (e) => {
19
- if (D) try {
20
- await A(D.id, e);
21
- } catch (e) {
22
- console.error("Failed to vote:", e);
18
+ function M() {
19
+ let { slug: M } = k(), N = O(), { basePath: P = "" } = l(), F = D(), I = i(), L = d(), { articleDetail: R, articleLoading: z, articleError: B, voteArticle: V, recordView: H, ratingArticle: U } = a(M, { publishedOnly: !0 }), [W, G] = g({ status: "idle" }), K = W.status !== "idle" && W.articleId === R?.id ? W : { status: "idle" }, q = `${P}/kb`, J = L ? I("support.helpArticle.actions.back", "Back to help articles") : I("support.article.actions.backToKnowledgeBase", "Back to Knowledge Base"), Y = `${p(P, "tickets/new")}?${new URLSearchParams({ [m]: F.pathname }).toString()}`;
20
+ h(() => {
21
+ R?.id && H(R.id);
22
+ }, [R?.id, H]);
23
+ let X = async (e) => {
24
+ if (R) try {
25
+ await V(R.id, e), G({
26
+ status: "saved",
27
+ helpful: e,
28
+ articleId: R.id
29
+ });
30
+ } catch (t) {
31
+ console.error("Failed to vote:", t), G({
32
+ status: "error",
33
+ helpful: e,
34
+ articleId: R.id
35
+ });
23
36
  }
24
- };
25
- return O ? /* @__PURE__ */ x(c, {
37
+ }, Z = K.status === "saved";
38
+ return z ? /* @__PURE__ */ A(c, {
26
39
  showHeader: !1,
27
- children: /* @__PURE__ */ x(s, { message: E("support.article.loading", "Loading article...") })
28
- }) : k || !D ? /* @__PURE__ */ x(c, {
40
+ children: /* @__PURE__ */ A(s, { message: I("support.article.loading", "Loading article...") })
41
+ }) : B || !R ? /* @__PURE__ */ A(c, {
29
42
  showHeader: !1,
30
- children: /* @__PURE__ */ x(o, {
43
+ children: /* @__PURE__ */ A(o, {
31
44
  illustration: "empty-search",
32
- title: E("support.article.notFound.title", "Article not found"),
33
- description: E("support.article.notFound.description", "The article you're looking for doesn't exist or has been removed."),
34
- action: /* @__PURE__ */ S(n, {
35
- onClick: () => w(`${T}/kb`),
36
- children: [/* @__PURE__ */ x(f, { size: 18 }), E("support.article.actions.backToKnowledgeBase", "Back to Knowledge Base")]
45
+ title: I("support.article.notFound.title", "Article not found"),
46
+ description: I("support.article.notFound.description", "The article you're looking for doesn't exist or has been removed."),
47
+ action: /* @__PURE__ */ j(n, {
48
+ onClick: () => N(q),
49
+ children: [/* @__PURE__ */ A(v, { size: 18 }), J]
37
50
  })
38
51
  })
39
- }) : /* @__PURE__ */ S("div", {
52
+ }) : /* @__PURE__ */ j("div", {
40
53
  className: "flex flex-col h-full",
41
54
  children: [
42
- /* @__PURE__ */ S("div", {
55
+ /* @__PURE__ */ j("div", {
43
56
  className: "p-6 border-b border-border-subtle",
44
57
  children: [
45
- /* @__PURE__ */ x("div", {
58
+ /* @__PURE__ */ A("div", {
46
59
  className: "flex items-center justify-between mb-4",
47
- children: /* @__PURE__ */ S(n, {
60
+ children: /* @__PURE__ */ j(n, {
48
61
  variant: "ghost",
49
62
  size: "sm",
50
- onClick: () => w(`${T}/kb`),
51
- children: [/* @__PURE__ */ x(f, { size: 20 }), E("support.article.actions.backToKnowledgeBase", "Back to Knowledge Base")]
63
+ onClick: () => N(q),
64
+ children: [/* @__PURE__ */ A(v, { size: 20 }), J]
52
65
  })
53
66
  }),
54
- /* @__PURE__ */ x("div", {
67
+ /* @__PURE__ */ A("div", {
55
68
  className: "flex items-center gap-3 mb-3",
56
- children: D.category && /* @__PURE__ */ x(t, {
69
+ children: R.category && /* @__PURE__ */ A(t, {
57
70
  variant: "outline",
58
- className: u(D.category.color),
59
- children: D.category.name
71
+ className: u(R.category.color),
72
+ children: R.category.name
60
73
  })
61
74
  }),
62
- /* @__PURE__ */ x("h1", {
75
+ /* @__PURE__ */ A("h1", {
63
76
  className: "text-2xl font-bold mb-4 text-text-primary sm:text-3xl lg:text-4xl",
64
- children: D.title
77
+ children: R.title
65
78
  }),
66
- /* @__PURE__ */ S("div", {
79
+ /* @__PURE__ */ j("div", {
67
80
  className: "flex flex-wrap items-center gap-4 text-sm text-text-secondary",
68
81
  children: [
69
- D.author && /* @__PURE__ */ S("div", {
82
+ R.author && /* @__PURE__ */ j("div", {
70
83
  className: "flex items-center gap-2",
71
- children: [/* @__PURE__ */ x(v, { size: 16 }), /* @__PURE__ */ x("span", { children: D.author.name })]
84
+ children: [/* @__PURE__ */ A(T, { size: 16 }), /* @__PURE__ */ A("span", { children: R.author.name })]
72
85
  }),
73
- D.publishedAt && /* @__PURE__ */ S("div", {
86
+ R.publishedAt && /* @__PURE__ */ j("div", {
74
87
  className: "flex items-center gap-2",
75
- children: [/* @__PURE__ */ x(p, { size: 16 }), /* @__PURE__ */ x("span", { children: new Date(D.publishedAt).toLocaleDateString() })]
88
+ children: [/* @__PURE__ */ A(y, { size: 16 }), /* @__PURE__ */ A("span", { children: new Date(R.publishedAt).toLocaleDateString() })]
76
89
  }),
77
- /* @__PURE__ */ S("div", {
90
+ !L && /* @__PURE__ */ j("div", {
78
91
  className: "flex items-center gap-2",
79
- children: [/* @__PURE__ */ x(m, { size: 16 }), /* @__PURE__ */ x("span", { children: E("support.article.views", "{{count}} views", { count: D.viewCount }) })]
92
+ children: [/* @__PURE__ */ A(b, { size: 16 }), /* @__PURE__ */ A("span", { children: I("support.article.views", "{{count}} views", { count: R.viewCount }) })]
80
93
  })
81
94
  ]
82
95
  }),
83
- D.tags && D.tags.length > 0 && /* @__PURE__ */ S("div", {
96
+ R.tags && R.tags.length > 0 && /* @__PURE__ */ j("div", {
84
97
  className: "flex flex-wrap items-center gap-2 mt-4",
85
- children: [/* @__PURE__ */ x(h, {
98
+ children: [/* @__PURE__ */ A(S, {
86
99
  size: 16,
87
100
  className: "text-text-secondary"
88
- }), D.tags.map((e) => /* @__PURE__ */ x(t, {
101
+ }), R.tags.map((e) => /* @__PURE__ */ A(t, {
89
102
  variant: "outline",
90
103
  className: "text-xs",
91
104
  children: e
@@ -93,51 +106,102 @@ function C() {
93
106
  })
94
107
  ]
95
108
  }),
96
- /* @__PURE__ */ x("div", {
109
+ /* @__PURE__ */ A("div", {
97
110
  className: "flex-1 overflow-y-auto p-6",
98
- children: /* @__PURE__ */ x("div", {
111
+ children: /* @__PURE__ */ A("div", {
99
112
  className: "max-w-4xl mx-auto",
100
- children: /* @__PURE__ */ x("div", {
113
+ children: /* @__PURE__ */ A("div", {
101
114
  className: "prose prose-lg max-w-none dark:prose-invert text-text-primary",
102
- dangerouslySetInnerHTML: { __html: e.sanitize(D.content) }
115
+ dangerouslySetInnerHTML: { __html: e.sanitize(R.content) }
103
116
  })
104
117
  })
105
118
  }),
106
- /* @__PURE__ */ x("div", {
119
+ /* @__PURE__ */ A("div", {
107
120
  className: "border-t border-border-subtle p-6 bg-bg-surface",
108
- children: /* @__PURE__ */ S(r, {
121
+ children: /* @__PURE__ */ j(r, {
109
122
  className: "max-w-4xl mx-auto p-5",
110
123
  children: [
111
- /* @__PURE__ */ x("h3", {
124
+ /* @__PURE__ */ A("h3", {
112
125
  className: "text-lg font-semibold mb-1 text-text-primary",
113
- children: E("support.article.feedback.title", "Was this article helpful?")
126
+ children: I("support.article.feedback.title", "Was this article helpful?")
114
127
  }),
115
- /* @__PURE__ */ x("p", {
128
+ /* @__PURE__ */ A("p", {
116
129
  className: "mb-4 text-sm text-text-secondary",
117
- children: E("support.article.feedback.userDescription", "Your feedback helps us improve our guides for everyone.")
130
+ children: I("support.article.feedback.userDescription", "Your feedback helps us improve our guides for everyone.")
118
131
  }),
119
- /* @__PURE__ */ S("div", {
120
- className: "flex items-center gap-4",
121
- children: [/* @__PURE__ */ S(n, {
132
+ /* @__PURE__ */ j("div", {
133
+ className: "flex flex-wrap items-center gap-4",
134
+ children: [/* @__PURE__ */ j(n, {
122
135
  variant: "outline",
123
- onClick: () => N(!0),
124
- disabled: M,
125
- className: "px-6",
126
- children: [/* @__PURE__ */ x(_, { size: 20 }), E("support.article.feedback.yes", "Yes ({{count}})", { count: D.helpfulCount })]
127
- }), /* @__PURE__ */ S(n, {
136
+ onClick: () => X(!0),
137
+ disabled: U || Z,
138
+ "aria-pressed": Z && K.helpful,
139
+ className: "min-h-11 px-6",
140
+ children: [/* @__PURE__ */ A(w, { size: 20 }), L ? I("support.helpArticle.feedback.yes", "Yes") : I("support.article.feedback.yes", "Yes ({{count}})", { count: R.helpfulCount })]
141
+ }), /* @__PURE__ */ j(n, {
128
142
  variant: "outline",
129
- onClick: () => N(!1),
130
- disabled: M,
131
- className: "px-6",
132
- children: [/* @__PURE__ */ x(g, { size: 20 }), E("support.article.feedback.no", "No ({{count}})", { count: D.notHelpfulCount })]
143
+ onClick: () => X(!1),
144
+ disabled: U || Z,
145
+ "aria-pressed": Z && !K.helpful,
146
+ className: "min-h-11 px-6",
147
+ children: [/* @__PURE__ */ A(C, { size: 20 }), L ? I("support.helpArticle.feedback.no", "No") : I("support.article.feedback.no", "No ({{count}})", { count: R.notHelpfulCount })]
133
148
  })]
149
+ }),
150
+ /* @__PURE__ */ j("div", {
151
+ "aria-live": "polite",
152
+ className: "mt-3 text-sm",
153
+ children: [
154
+ K.status === "saved" && /* @__PURE__ */ A("p", {
155
+ role: "status",
156
+ className: "text-status-success-text",
157
+ children: I("support.article.feedback.thanks", "Thanks for your feedback!")
158
+ }),
159
+ K.status === "error" && /* @__PURE__ */ A("p", {
160
+ role: "alert",
161
+ className: "text-status-error-text",
162
+ children: I("support.article.feedback.error", "We couldn't save your answer. Please try again.")
163
+ }),
164
+ L && K.status === "saved" && !K.helpful && /* @__PURE__ */ j("p", {
165
+ className: "mt-2 text-text-secondary",
166
+ children: [
167
+ I("support.helpArticle.feedback.stillStuck", "Still stuck?"),
168
+ " ",
169
+ /* @__PURE__ */ j(E, {
170
+ to: Y,
171
+ className: "inline-flex min-h-11 items-center gap-1 font-medium text-primary underline-offset-4 hover:underline",
172
+ children: [/* @__PURE__ */ A(x, {
173
+ size: 16,
174
+ "aria-hidden": "true"
175
+ }), I("support.helpArticle.feedback.contactSupport", "Contact support")]
176
+ })
177
+ ]
178
+ })
179
+ ]
180
+ }),
181
+ L && /* @__PURE__ */ A(_, {
182
+ className: "mt-3",
183
+ copyable: !0,
184
+ children: [
185
+ I("support.helpArticle.technical.views", "Views: {{count}}", { count: R.viewCount ?? 0 }),
186
+ I("support.helpArticle.technical.helpful", "Helpful: {{count}}", { count: R.helpfulCount ?? 0 }),
187
+ I("support.helpArticle.technical.notHelpful", "Not helpful: {{count}}", { count: R.notHelpfulCount ?? 0 }),
188
+ I("support.helpArticle.technical.id", "Article ID: {{id}}", { id: R.id }),
189
+ I("support.helpArticle.technical.version", "Version: {{version}}", { version: R.version ?? "" })
190
+ ].join("\n")
134
191
  })
135
192
  ]
136
193
  })
194
+ }),
195
+ L && R.categoryId && /* @__PURE__ */ A("div", {
196
+ className: "border-t border-border-subtle p-6",
197
+ children: /* @__PURE__ */ A(f, {
198
+ categoryId: R.categoryId,
199
+ currentArticleId: R.id
200
+ })
137
201
  })
138
202
  ]
139
203
  });
140
204
  }
141
- export { C as ArticleDetailUserPage };
205
+ export { M as ArticleDetailUserPage };
142
206
 
143
207
  //# sourceMappingURL=ArticleDetailUserPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArticleDetailUserPage.js","names":["DOMPurify","purify_default","ArticleDetailUserPage","useParams","navigate","useNavigate","useSupport","tr","useTr","useKnowledgeBaseOperations","slug","articleDetail","recordView","handleVote","voteArticle","helpful","error","articleLoading","PageLayout","LoadingState","articleError","EmptyState","Button","basePath","ArrowLeft","Badge","getCategoryBadgeClass","User","Calendar","Eye","Tag","tag","EmphasisPanel","ratingArticle","ThumbsUp","ThumbsDown"],"sources":["../../../src/support/pages/ArticleDetailUserPage.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { useParams, useNavigate } from 'react-router';\nimport DOMPurify from 'dompurify';\nimport { ArrowLeft, ThumbsUp, ThumbsDown, Eye, Calendar, User, Tag } from 'lucide-react';\nimport { Button, Badge, EmphasisPanel } from '../components/ui';\nimport { useTr } from '../hooks/useTr';\nimport { useKnowledgeBaseOperations } from '../hooks/useKnowledgeBaseOperations';\nimport { PageLayout, LoadingState, EmptyState } from '../components/PageLayout';\nimport { useSupport } from '../providers/SupportProvider';\nimport { getCategoryBadgeClass } from '../utils/categoryColors';\n\n/**\n * User-facing article detail page.\n *\n * Displays article content, metadata, tags, and voting feedback.\n * No admin controls (edit, publish, unpublish, archive, delete).\n */\nexport function ArticleDetailUserPage() {\n const { slug } = useParams<{ slug: string }>();\n const navigate = useNavigate();\n const { basePath = '' } = useSupport();\n const tr = useTr();\n const { articleDetail, articleLoading, articleError, voteArticle, recordView, ratingArticle } =\n useKnowledgeBaseOperations(slug);\n\n useEffect(() => {\n if (articleDetail?.id) {\n recordView(articleDetail.id);\n }\n }, [articleDetail?.id, recordView]);\n\n const handleVote = async (helpful: boolean) => {\n if (!articleDetail) return;\n try {\n await voteArticle(articleDetail.id, helpful);\n } catch (error) {\n console.error('Failed to vote:', error);\n }\n };\n\n if (articleLoading) {\n return (\n <PageLayout showHeader={false}>\n <LoadingState message={tr('support.article.loading', 'Loading article...')} />\n </PageLayout>\n );\n }\n\n if (articleError || !articleDetail) {\n return (\n <PageLayout showHeader={false}>\n <EmptyState\n illustration=\"empty-search\"\n title={tr('support.article.notFound.title', 'Article not found')}\n description={tr(\n 'support.article.notFound.description',\n \"The article you're looking for doesn't exist or has been removed.\"\n )}\n action={\n <Button onClick={() => navigate(`${basePath}/kb`)}>\n <ArrowLeft size={18} />\n {tr('support.article.actions.backToKnowledgeBase', 'Back to Knowledge Base')}\n </Button>\n }\n />\n </PageLayout>\n );\n }\n\n return (\n <div className=\"flex flex-col h-full\">\n {/* Header */}\n <div className=\"p-6 border-b border-border-subtle\">\n <div className=\"flex items-center justify-between mb-4\">\n <Button variant=\"ghost\" size=\"sm\" onClick={() => navigate(`${basePath}/kb`)}>\n <ArrowLeft size={20} />\n {tr('support.article.actions.backToKnowledgeBase', 'Back to Knowledge Base')}\n </Button>\n </div>\n\n <div className=\"flex items-center gap-3 mb-3\">\n {articleDetail.category && (\n <Badge\n variant=\"outline\"\n className={getCategoryBadgeClass(articleDetail.category.color)}\n >\n {articleDetail.category.name}\n </Badge>\n )}\n </div>\n\n <h1 className=\"text-2xl font-bold mb-4 text-text-primary sm:text-3xl lg:text-4xl\">\n {articleDetail.title}\n </h1>\n\n <div className=\"flex flex-wrap items-center gap-4 text-sm text-text-secondary\">\n {articleDetail.author && (\n <div className=\"flex items-center gap-2\">\n <User size={16} />\n <span>{articleDetail.author.name}</span>\n </div>\n )}\n {articleDetail.publishedAt && (\n <div className=\"flex items-center gap-2\">\n <Calendar size={16} />\n <span>{new Date(articleDetail.publishedAt).toLocaleDateString()}</span>\n </div>\n )}\n <div className=\"flex items-center gap-2\">\n <Eye size={16} />\n <span>\n {tr('support.article.views', '{{count}} views', {\n count: articleDetail.viewCount,\n })}\n </span>\n </div>\n </div>\n\n {articleDetail.tags && articleDetail.tags.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-2 mt-4\">\n <Tag size={16} className=\"text-text-secondary\" />\n {articleDetail.tags.map((tag: string) => (\n <Badge key={tag} variant=\"outline\" className=\"text-xs\">\n {tag}\n </Badge>\n ))}\n </div>\n )}\n </div>\n\n {/* Content */}\n <div className=\"flex-1 overflow-y-auto p-6\">\n <div className=\"max-w-4xl mx-auto\">\n <div\n className=\"prose prose-lg max-w-none dark:prose-invert text-text-primary\"\n dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(articleDetail.content) }}\n />\n </div>\n </div>\n\n {/* Feedback — the page's single emphasis zone, inviting the reader to act */}\n <div className=\"border-t border-border-subtle p-6 bg-bg-surface\">\n <EmphasisPanel className=\"max-w-4xl mx-auto p-5\">\n <h3 className=\"text-lg font-semibold mb-1 text-text-primary\">\n {tr('support.article.feedback.title', 'Was this article helpful?')}\n </h3>\n <p className=\"mb-4 text-sm text-text-secondary\">\n {tr(\n 'support.article.feedback.userDescription',\n 'Your feedback helps us improve our guides for everyone.'\n )}\n </p>\n <div className=\"flex items-center gap-4\">\n <Button\n variant=\"outline\"\n onClick={() => handleVote(true)}\n disabled={ratingArticle}\n className=\"px-6\"\n >\n <ThumbsUp size={20} />\n {tr('support.article.feedback.yes', 'Yes ({{count}})', {\n count: articleDetail.helpfulCount,\n })}\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => handleVote(false)}\n disabled={ratingArticle}\n className=\"px-6\"\n >\n <ThumbsDown size={20} />\n {tr('support.article.feedback.no', 'No ({{count}})', {\n count: articleDetail.notHelpfulCount,\n })}\n </Button>\n </div>\n </EmphasisPanel>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,SAAgBE,IAAwB;CACtC,IAAM,EAAE,YAASC,EAA4B,GACvCC,IAAWC,EAAY,GACvB,EAAE,cAAW,OAAOC,EAAW,GAC/BC,IAAKC,EAAM,GACX,EAAE,kBAAe,mBAAgB,iBAAc,gBAAa,eAAY,qBAC5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ACX,UAAAzB,EAAG,kCAAkC,2BAA2B;MAC/D,CAAA;MACJ,kBAAC,KAAD;OAAG,WAAU;OACV,UAAAA,EACC,4CACA,yDACF;MACC,CAAA;MACH,kBAAC,OAAD;OAAK,WAAU;OAAf,UAAA,CACE,kBAACe,GAAD;QACE,SAAQ;QACR,eAAeT,EAAW,EAAI;QAC9B,UAAUoB;QACV,WAAU;QAJZ,UAAA,CAME,kBAACC,GAAD,EAAU,MAAM,GAAK,CAAA,GACpB3B,EAAG,gCAAgC,mBAAmB,EACrD,OAAOI,EAAc,aACvB,CAAC,CACK;OACR,CAAA,GAAA,kBAACW,GAAD;QACE,SAAQ;QACR,eAAeT,EAAW,EAAK;QAC/B,UAAUoB;QACV,WAAU;QAJZ,UAAA,CAME,kBAACE,GAAD,EAAY,MAAM,GAAK,CAAA,GACtB5B,EAAG,+BAA+B,kBAAkB,EACnD,OAAOI,EAAc,gBACvB,CAAC,CACK;OACL,CAAA,CAAA;;KACQ;;GACZ,CAAA;EACF;;AAET"}
1
+ {"version":3,"file":"ArticleDetailUserPage.js","names":["DOMPurify","EmphasisPanel","Link","purify_default","EmphasisPanel$1","Link$1","ArticleDetailUserPage","useParams","navigate","useNavigate","useSupport","location","useLocation","tr","useTr","isFluidgrids","useIsFluidgridsVariant","useKnowledgeBaseOperations","slug","lastVote","setLastVote","useState","vote","articleDetail","knowledgeBasePath","basePath","backLabel","contactSupportPath","joinPath","ASK_FOR_HELP_FROM_PARAM","recordView","handleVote","voteArticle","helpful","error","voteSaved","articleLoading","PageLayout","LoadingState","articleError","EmptyState","Button","ArrowLeft","Badge","getCategoryBadgeClass","User","Calendar","Eye","Tag","tag","ratingArticle","ThumbsUp","ThumbsDown","MessageCircleQuestion","ShowTechnicalDetails","RelatedArticles"],"sources":["../../../src/support/pages/ArticleDetailUserPage.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { Link, useLocation, useParams, useNavigate } from 'react-router';\nimport DOMPurify from 'dompurify';\nimport {\n ArrowLeft,\n ThumbsUp,\n ThumbsDown,\n Eye,\n Calendar,\n User,\n Tag,\n MessageCircleQuestion,\n} from 'lucide-react';\nimport { ShowTechnicalDetails } from '@burdenoff/fe-libs/ui';\nimport { Button, Badge, EmphasisPanel } from '../components/ui';\nimport { useTr } from '../hooks/useTr';\nimport { useKnowledgeBaseOperations } from '../hooks/useKnowledgeBaseOperations';\nimport { PageLayout, LoadingState, EmptyState } from '../components/PageLayout';\nimport { useSupport } from '../providers/SupportProvider';\nimport { getCategoryBadgeClass } from '../utils/categoryColors';\nimport { useIsFluidgridsVariant } from '../hooks/useSupportVariant';\nimport { RelatedArticles } from '../components/help/RelatedArticles';\nimport { joinPath } from '../utils';\nimport { ASK_FOR_HELP_FROM_PARAM } from '../constants';\n\ntype VoteState =\n | { status: 'idle' }\n | { status: 'saved'; helpful: boolean; articleId: string }\n | { status: 'error'; helpful: boolean; articleId: string };\n\n/**\n * User-facing article detail page.\n *\n * Displays article content, metadata, tags, and voting feedback.\n * No admin controls (edit, publish, unpublish, archive, delete).\n * A vote shows a visible \"Thanks\" or error message.\n *\n * With the FluidGrids opt-in (`variant=\"fluidgrids\"`) the counts move behind\n * \"Show technical details\", a \"No\" vote offers \"Contact support\", and related\n * articles from the same category follow the article (BOFF-11844).\n */\nexport function ArticleDetailUserPage() {\n const { slug } = useParams<{ slug: string }>();\n const navigate = useNavigate();\n const { basePath = '' } = useSupport();\n const location = useLocation();\n const tr = useTr();\n const isFluidgrids = useIsFluidgridsVariant();\n const { articleDetail, articleLoading, articleError, voteArticle, recordView, ratingArticle } =\n useKnowledgeBaseOperations(slug, { publishedOnly: true });\n const [lastVote, setLastVote] = useState<VoteState>({ status: 'idle' });\n // A vote belongs to one article; opening another one starts fresh.\n const vote: VoteState =\n lastVote.status !== 'idle' && lastVote.articleId === articleDetail?.id\n ? lastVote\n : { status: 'idle' };\n const knowledgeBasePath = `${basePath}/kb`;\n const backLabel = isFluidgrids\n ? tr('support.helpArticle.actions.back', 'Back to help articles')\n : tr('support.article.actions.backToKnowledgeBase', 'Back to Knowledge Base');\n const contactSupportPath = `${joinPath(basePath, 'tickets/new')}?${new URLSearchParams({\n [ASK_FOR_HELP_FROM_PARAM]: location.pathname,\n }).toString()}`;\n\n useEffect(() => {\n if (articleDetail?.id) {\n recordView(articleDetail.id);\n }\n }, [articleDetail?.id, recordView]);\n\n const handleVote = async (helpful: boolean) => {\n if (!articleDetail) return;\n try {\n await voteArticle(articleDetail.id, helpful);\n setLastVote({ status: 'saved', helpful, articleId: articleDetail.id });\n } catch (error) {\n console.error('Failed to vote:', error);\n setLastVote({ status: 'error', helpful, articleId: articleDetail.id });\n }\n };\n const voteSaved = vote.status === 'saved';\n\n if (articleLoading) {\n return (\n <PageLayout showHeader={false}>\n <LoadingState message={tr('support.article.loading', 'Loading article...')} />\n </PageLayout>\n );\n }\n\n if (articleError || !articleDetail) {\n return (\n <PageLayout showHeader={false}>\n <EmptyState\n illustration=\"empty-search\"\n title={tr('support.article.notFound.title', 'Article not found')}\n description={tr(\n 'support.article.notFound.description',\n \"The article you're looking for doesn't exist or has been removed.\"\n )}\n action={\n <Button onClick={() => navigate(knowledgeBasePath)}>\n <ArrowLeft size={18} />\n {backLabel}\n </Button>\n }\n />\n </PageLayout>\n );\n }\n\n return (\n <div className=\"flex flex-col h-full\">\n {/* Header */}\n <div className=\"p-6 border-b border-border-subtle\">\n <div className=\"flex items-center justify-between mb-4\">\n <Button variant=\"ghost\" size=\"sm\" onClick={() => navigate(knowledgeBasePath)}>\n <ArrowLeft size={20} />\n {backLabel}\n </Button>\n </div>\n\n <div className=\"flex items-center gap-3 mb-3\">\n {articleDetail.category && (\n <Badge\n variant=\"outline\"\n className={getCategoryBadgeClass(articleDetail.category.color)}\n >\n {articleDetail.category.name}\n </Badge>\n )}\n </div>\n\n <h1 className=\"text-2xl font-bold mb-4 text-text-primary sm:text-3xl lg:text-4xl\">\n {articleDetail.title}\n </h1>\n\n <div className=\"flex flex-wrap items-center gap-4 text-sm text-text-secondary\">\n {articleDetail.author && (\n <div className=\"flex items-center gap-2\">\n <User size={16} />\n <span>{articleDetail.author.name}</span>\n </div>\n )}\n {articleDetail.publishedAt && (\n <div className=\"flex items-center gap-2\">\n <Calendar size={16} />\n <span>{new Date(articleDetail.publishedAt).toLocaleDateString()}</span>\n </div>\n )}\n {!isFluidgrids && (\n <div className=\"flex items-center gap-2\">\n <Eye size={16} />\n <span>\n {tr('support.article.views', '{{count}} views', {\n count: articleDetail.viewCount,\n })}\n </span>\n </div>\n )}\n </div>\n\n {articleDetail.tags && articleDetail.tags.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-2 mt-4\">\n <Tag size={16} className=\"text-text-secondary\" />\n {articleDetail.tags.map((tag: string) => (\n <Badge key={tag} variant=\"outline\" className=\"text-xs\">\n {tag}\n </Badge>\n ))}\n </div>\n )}\n </div>\n\n {/* Content */}\n <div className=\"flex-1 overflow-y-auto p-6\">\n <div className=\"max-w-4xl mx-auto\">\n <div\n className=\"prose prose-lg max-w-none dark:prose-invert text-text-primary\"\n dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(articleDetail.content) }}\n />\n </div>\n </div>\n\n {/* Feedback — the page's single emphasis zone, inviting the reader to act */}\n <div className=\"border-t border-border-subtle p-6 bg-bg-surface\">\n <EmphasisPanel className=\"max-w-4xl mx-auto p-5\">\n <h3 className=\"text-lg font-semibold mb-1 text-text-primary\">\n {tr('support.article.feedback.title', 'Was this article helpful?')}\n </h3>\n <p className=\"mb-4 text-sm text-text-secondary\">\n {tr(\n 'support.article.feedback.userDescription',\n 'Your feedback helps us improve our guides for everyone.'\n )}\n </p>\n <div className=\"flex flex-wrap items-center gap-4\">\n <Button\n variant=\"outline\"\n onClick={() => handleVote(true)}\n disabled={ratingArticle || voteSaved}\n aria-pressed={voteSaved && vote.helpful}\n className=\"min-h-11 px-6\"\n >\n <ThumbsUp size={20} />\n {isFluidgrids\n ? tr('support.helpArticle.feedback.yes', 'Yes')\n : tr('support.article.feedback.yes', 'Yes ({{count}})', {\n count: articleDetail.helpfulCount,\n })}\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => handleVote(false)}\n disabled={ratingArticle || voteSaved}\n aria-pressed={voteSaved && !vote.helpful}\n className=\"min-h-11 px-6\"\n >\n <ThumbsDown size={20} />\n {isFluidgrids\n ? tr('support.helpArticle.feedback.no', 'No')\n : tr('support.article.feedback.no', 'No ({{count}})', {\n count: articleDetail.notHelpfulCount,\n })}\n </Button>\n </div>\n <div aria-live=\"polite\" className=\"mt-3 text-sm\">\n {vote.status === 'saved' && (\n <p role=\"status\" className=\"text-status-success-text\">\n {tr('support.article.feedback.thanks', 'Thanks for your feedback!')}\n </p>\n )}\n {vote.status === 'error' && (\n <p role=\"alert\" className=\"text-status-error-text\">\n {tr(\n 'support.article.feedback.error',\n \"We couldn't save your answer. Please try again.\"\n )}\n </p>\n )}\n {isFluidgrids && vote.status === 'saved' && !vote.helpful && (\n <p className=\"mt-2 text-text-secondary\">\n {tr('support.helpArticle.feedback.stillStuck', 'Still stuck?')}{' '}\n <Link\n to={contactSupportPath}\n className=\"inline-flex min-h-11 items-center gap-1 font-medium text-primary underline-offset-4 hover:underline\"\n >\n <MessageCircleQuestion size={16} aria-hidden=\"true\" />\n {tr('support.helpArticle.feedback.contactSupport', 'Contact support')}\n </Link>\n </p>\n )}\n </div>\n {isFluidgrids && (\n <ShowTechnicalDetails className=\"mt-3\" copyable>\n {[\n tr('support.helpArticle.technical.views', 'Views: {{count}}', {\n count: articleDetail.viewCount ?? 0,\n }),\n tr('support.helpArticle.technical.helpful', 'Helpful: {{count}}', {\n count: articleDetail.helpfulCount ?? 0,\n }),\n tr('support.helpArticle.technical.notHelpful', 'Not helpful: {{count}}', {\n count: articleDetail.notHelpfulCount ?? 0,\n }),\n tr('support.helpArticle.technical.id', 'Article ID: {{id}}', {\n id: articleDetail.id,\n }),\n tr('support.helpArticle.technical.version', 'Version: {{version}}', {\n version: articleDetail.version ?? '',\n }),\n ].join('\\n')}\n </ShowTechnicalDetails>\n )}\n </EmphasisPanel>\n </div>\n\n {isFluidgrids && articleDetail.categoryId && (\n <div className=\"border-t border-border-subtle p-6\">\n <RelatedArticles\n categoryId={articleDetail.categoryId}\n currentArticleId={articleDetail.id}\n />\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyCA,SAAgBM,IAAwB;CACtC,IAAM,EAAE,YAASC,EAA4B,GACvCC,IAAWC,EAAY,GACvB,EAAE,cAAW,OAAOC,EAAW,GAC/BC,IAAWC,EAAY,GACvBC,IAAKC,EAAM,GACXC,IAAeC,EAAuB,GACtC,EAAE,kBAAe,mBAAgB,iBAAc,gBAAa,eAAY,qBAC5EC,EAA2BC,GAAM,EAAE,eAAe,GAAK,CAAC,GACpD,CAACC,GAAUC,KAAeC,EAAoB,EAAE,QAAQ,OAAO,CAAC,GAEhEC,IACJH,EAAS,WAAW,UAAUA,EAAS,cAAcI,GAAe,KAChEJ,IACA,EAAE,QAAQ,OAAO,GACjBK,IAAoB,GAAGC,EAAS,MAChCC,IAAYX,IACdF,EAAG,oCAAoC,uBAAuB,IAC9DA,EAAG,+CAA+C,wBAAwB,GACxEc,IAAqB,GAAGC,EAASH,GAAU,aAAa,EAAE,GAAG,IAAI,gBAAgB,GACpFI,IAA0BlB,EAAS,SACtC,CAAC,CAAC,CAAC,SAAS;CAEZ,QAAgB;EACd,AAAIY,GAAe,MACjBO,EAAWP,EAAc,EAAE;CAE/B,GAAG,CAACA,GAAe,IAAIO,CAAU,CAAC;CAElC,IAAMC,IAAa,OAAO,MAAqB;EAC7C,IAAKR,GACL,IAAI;GAEF,AADA,MAAMS,EAAYT,EAAc,IAAIU,CAAO,GAC3Cb,EAAY;IAAE,QAAQ;IAAS;IAAS,WAAWG,EAAc;GAAG,CAAC;EACvE,SAASW,GAAO;GAEd,AADA,QAAQ,MAAM,mBAAmBA,CAAK,GACtCd,EAAY;IAAE,QAAQ;IAAS;IAAS,WAAWG,EAAc;GAAG,CA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DV,EAAG,4CAA4C,0BAA0B,EACvE,OAAOU,EAAc,mBAAmB,EAC1C,CAAC;QACDV,EAAG,oCAAoC,sBAAsB,EAC3D,IAAIU,EAAc,GACpB,CAAC;QACDV,EAAG,yCAAyC,wBAAwB,EAClE,SAASU,EAAc,WAAW,GACpC,CAAC;OACH,CAAC,CAAC,KAAK,IAAI;MACS,CAAA;KAEX;;GACZ,CAAA;GAEJR,KAAgBQ,EAAc,cAC7B,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAACgC,GAAD;KACE,YAAYhC,EAAc;KAC1B,kBAAkBA,EAAc;IACjC,CAAA;GACE,CAAA;EAEJ;;AAET"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * FluidGrids "Ask for help" (BOFF-11844): the short request form.
3
+ *
4
+ * Level 1 is Subject, Description, "What's this about?" and attachments;
5
+ * Priority (default Normal) and the formatting note sit under "More options".
6
+ * Errors show inline next to the field on blur and on submit. Up to three
7
+ * matching articles are suggested while the subject is typed. After the
8
+ * request is created the page opens it straight away and the request page
9
+ * shows the "sent" toast.
10
+ */
11
+ export declare function AskForHelpPage(): import('react').JSX.Element;