@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.
- package/dist/generated/global-operations.d.ts +62 -0
- package/dist/generated/global-operations.js +104 -69
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js +17 -15
- package/dist/generated/global-types.js.map +1 -1
- package/dist/support/SupportUserRoot.js +32 -28
- package/dist/support/SupportUserRoot.js.map +1 -1
- package/dist/support/SupportUserRoutes.d.ts +1 -0
- package/dist/support/SupportUserRoutes.js +31 -28
- package/dist/support/SupportUserRoutes.js.map +1 -1
- package/dist/support/components/PageLayout.js +35 -35
- package/dist/support/components/RouteHelpers.d.ts +2 -1
- package/dist/support/components/RouteHelpers.js +3 -3
- package/dist/support/components/RouteHelpers.js.map +1 -1
- package/dist/support/components/careers/RichTextEditor.js +31 -31
- package/dist/support/components/careers/RichTextEditor.js.map +1 -1
- package/dist/support/components/help/RelatedArticles.d.ts +12 -0
- package/dist/support/components/help/RelatedArticles.js +55 -0
- package/dist/support/components/help/RelatedArticles.js.map +1 -0
- package/dist/support/components/help/RequestDetailHeader.d.ts +18 -0
- package/dist/support/components/help/RequestDetailHeader.js +129 -0
- package/dist/support/components/help/RequestDetailHeader.js.map +1 -0
- package/dist/support/components/help/SatisfactionReview.d.ts +18 -0
- package/dist/support/components/help/SatisfactionReview.js +103 -0
- package/dist/support/components/help/SatisfactionReview.js.map +1 -0
- package/dist/support/components/help/StarRating.d.ts +16 -0
- package/dist/support/components/help/StarRating.js +63 -0
- package/dist/support/components/help/StarRating.js.map +1 -0
- package/dist/support/components/help/StatusGroupPill.d.ts +11 -0
- package/dist/support/components/help/StatusGroupPill.js +19 -0
- package/dist/support/components/help/StatusGroupPill.js.map +1 -0
- package/dist/support/components/settings/TicketCategoriesSettings.js +69 -69
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +7 -7
- package/dist/support/components/tickets/MessageComposer.js.map +1 -1
- package/dist/support/components/tickets/TicketDetailHeader.js +54 -60
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
- package/dist/support/components/ui.js +1 -1
- package/dist/support/constants.d.ts +23 -0
- package/dist/support/constants.js +2 -2
- package/dist/support/constants.js.map +1 -1
- package/dist/support/hooks/useDebouncedValue.d.ts +6 -0
- package/dist/support/hooks/useDebouncedValue.js +12 -0
- package/dist/support/hooks/useDebouncedValue.js.map +1 -0
- package/dist/support/hooks/useKnowledgeBaseOperations.d.ts +8 -1
- package/dist/support/hooks/useKnowledgeBaseOperations.js +86 -81
- package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
- package/dist/support/hooks/useSupportVariant.d.ts +11 -0
- package/dist/support/hooks/useSupportVariant.js +11 -0
- package/dist/support/hooks/useSupportVariant.js.map +1 -0
- package/dist/support/hooks/useTicketCreatedToast.d.ts +16 -0
- package/dist/support/hooks/useTicketCreatedToast.js +25 -0
- package/dist/support/hooks/useTicketCreatedToast.js.map +1 -0
- package/dist/support/hooks/useTicketLabels.d.ts +22 -0
- package/dist/support/hooks/useTicketLabels.js +40 -0
- package/dist/support/hooks/useTicketLabels.js.map +1 -0
- package/dist/support/index.d.ts +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +84 -84
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.d.ts +5 -0
- package/dist/support/pages/ArticleDetailUserPage.js +133 -69
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/AskForHelpPage.d.ts +11 -0
- package/dist/support/pages/AskForHelpPage.js +396 -0
- package/dist/support/pages/AskForHelpPage.js.map +1 -0
- package/dist/support/pages/ContactInquiriesPage.js +73 -73
- package/dist/support/pages/ContactInquiryDetailPage.js +47 -47
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.d.ts +4 -0
- package/dist/support/pages/CreateTicketPage.js +121 -117
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/HelpHubPage.d.ts +9 -0
- package/dist/support/pages/HelpHubPage.js +272 -0
- package/dist/support/pages/HelpHubPage.js.map +1 -0
- package/dist/support/pages/JobApplicationDetailPage.js +388 -388
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +35 -35
- package/dist/support/pages/JobPostingDetailPage.js +236 -236
- package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.d.ts +6 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +188 -137
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/MyRequestsPage.d.ts +16 -0
- package/dist/support/pages/MyRequestsPage.js +389 -0
- package/dist/support/pages/MyRequestsPage.js.map +1 -0
- package/dist/support/pages/TicketDetailUserPage.d.ts +5 -0
- package/dist/support/pages/TicketDetailUserPage.js +285 -192
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.d.ts +7 -0
- package/dist/support/pages/TicketListPage.js +150 -153
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/dist/support/providers/SupportProvider.js +8 -7
- package/dist/support/providers/SupportProvider.js.map +1 -1
- package/dist/support/store/supportStore.d.ts +5 -0
- package/dist/support/store/supportStore.js +1 -0
- package/dist/support/store/supportStore.js.map +1 -1
- package/dist/support/translations/en.d.ts +279 -0
- package/dist/support/translations/en.js +270 -1
- package/dist/support/translations/en.js.map +1 -1
- package/dist/support/types/index.d.ts +13 -0
- package/dist/support/utils/cameFrom.d.ts +16 -0
- package/dist/support/utils/cameFrom.js +22 -0
- package/dist/support/utils/cameFrom.js.map +1 -0
- package/dist/support/utils/dates.d.ts +15 -0
- package/dist/support/utils/dates.js +35 -0
- package/dist/support/utils/dates.js.map +1 -0
- package/dist/support/utils/reopen.d.ts +27 -0
- package/dist/support/utils/reopen.js +27 -0
- package/dist/support/utils/reopen.js.map +1 -0
- package/dist/support/utils/requestTechnicalDetails.d.ts +13 -0
- package/dist/support/utils/requestTechnicalDetails.js +38 -0
- package/dist/support/utils/requestTechnicalDetails.js.map +1 -0
- package/dist/support/utils/ticketFilters.d.ts +16 -0
- package/dist/support/utils/ticketFilters.js +24 -12
- package/dist/support/utils/ticketFilters.js.map +1 -1
- package/dist/support/utils/ticketStatusGroups.d.ts +20 -0
- package/dist/support/utils/ticketStatusGroups.js +39 -0
- package/dist/support/utils/ticketStatusGroups.js.map +1 -0
- package/package.json +2 -2
- package/dist/_virtual/_rolldown/runtime.js +0 -6
- package/dist/node_modules/@tiptap/core/dist/index.js +0 -3491
- package/dist/node_modules/@tiptap/core/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -44
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
- package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +0 -12
- package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -75
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -73
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -78
- package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -157
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -11
- package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -50
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -70
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -49
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -70
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -389
- package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +0 -967
- package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -46
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -6
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -55
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -14
- package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +0 -72
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extensions/dist/index.js +0 -457
- package/dist/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/react/dist/index.js +0 -332
- package/dist/node_modules/@tiptap/react/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -28
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +0 -298
- package/dist/node_modules/fast-equals/dist/es/index.js.map +0 -1
- package/dist/node_modules/linkifyjs/dist/linkify.js +0 -527
- package/dist/node_modules/linkifyjs/dist/linkify.js.map +0 -1
- package/dist/node_modules/orderedmap/dist/index.js +0 -68
- package/dist/node_modules/orderedmap/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-commands/dist/index.js +0 -334
- package/dist/node_modules/prosemirror-commands/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -112
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -168
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-history/dist/index.js +0 -219
- package/dist/node_modules/prosemirror-history/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -51
- package/dist/node_modules/prosemirror-keymap/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-model/dist/index.js +0 -1775
- package/dist/node_modules/prosemirror-model/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -77
- package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-state/dist/index.js +0 -526
- package/dist/node_modules/prosemirror-state/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1204
- package/dist/node_modules/prosemirror-transform/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-view/dist/index.js +0 -3355
- package/dist/node_modules/prosemirror-view/dist/index.js.map +0 -1
- package/dist/node_modules/rope-sequence/dist/index.js +0 -84
- package/dist/node_modules/rope-sequence/dist/index.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -55
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -53
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -53
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -45
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -11
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js +0 -11
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
- package/dist/node_modules/w3c-keyname/index.js +0 -89
- package/dist/node_modules/w3c-keyname/index.js.map +0 -1
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { Button as e, GlassCard as t, Input as n, PagePurpose as r } from "../components/ui.js";
|
|
2
|
+
import { PageLayout as i } from "../components/PageLayout.js";
|
|
3
|
+
import { NotificationToast as a } from "../components/NotificationToast.js";
|
|
4
|
+
import { useDebouncedValue as ee } from "../hooks/useDebouncedValue.js";
|
|
5
|
+
import { useNotification as te } from "../hooks/useNotification.js";
|
|
6
|
+
import { useTicketLabels as ne } from "../hooks/useTicketLabels.js";
|
|
7
|
+
import { useTicketOperations as re } from "../hooks/useTicketOperations.js";
|
|
8
|
+
import { useTr as o } from "../hooks/useTr.js";
|
|
9
|
+
import { useSupport as s } from "../providers/SupportProvider.js";
|
|
10
|
+
import { joinPath as c } from "../utils/index.js";
|
|
11
|
+
import { SUPPORT_ATTACHMENT_ACCEPT as ie, partitionAttachments as ae, rejectedAttachmentsMessage as l } from "../utils/attachments.js";
|
|
12
|
+
import { readCameFrom as oe } from "../utils/cameFrom.js";
|
|
13
|
+
import { cn as u } from "../utils/cn.js";
|
|
14
|
+
import { extractErrorMessage as se } from "../utils/errors.js";
|
|
15
|
+
import { uploadSupportAttachmentFiles as ce } from "../utils/supportFiles.js";
|
|
16
|
+
import { ATTACHMENTS_FAILED_PARAM as le, TICKET_CREATED_PARAM as ue } from "../constants.js";
|
|
17
|
+
import { useGetTicketCategoriesQuery as de, useSearchKnowledgeBaseQuery as fe } from "../../generated/global-operations.js";
|
|
18
|
+
import { SupportTicketPriority as d } from "../../generated/global-types.js";
|
|
19
|
+
import { useId as pe, useMemo as me, useRef as f, useState as p } from "react";
|
|
20
|
+
import { NativeSelect as he, OptionalFields as ge } from "@burdenoff/fe-libs/ui";
|
|
21
|
+
import { ArrowLeft as _e, BookOpen as ve, Loader2 as ye, Paperclip as m, Send as be, X as xe } from "lucide-react";
|
|
22
|
+
import { Link as Se, useLocation as Ce, useNavigate as we, useSearchParams as Te } from "react-router";
|
|
23
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
24
|
+
// src/support/pages/AskForHelpPage.tsx
|
|
25
|
+
var v = "__none__", y = 3, Ee = 3, De = [
|
|
26
|
+
d.Low,
|
|
27
|
+
d.Normal,
|
|
28
|
+
d.High,
|
|
29
|
+
d.Critical
|
|
30
|
+
], b = "w-full rounded-lg border bg-bg-surface px-4 py-3 text-text-primary transition-colors placeholder:text-text-secondary focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20";
|
|
31
|
+
function x(e, t) {
|
|
32
|
+
let n = {}, r = e.subject.trim(), i = e.description.trim();
|
|
33
|
+
return r ? r.length < 5 && (n.subject = t("support.createTicket.validation.subjectMin", "Subject must be at least {{min}} characters long.", { min: 5 })) : n.subject = t("support.askForHelp.validation.subjectRequired", "Add a subject."), i ? i.length < 10 && (n.description = t("support.createTicket.validation.descriptionMin", "Description must be at least {{min}} characters long.", { min: 10 })) : n.description = t("support.askForHelp.validation.descriptionRequired", "Tell us what's happening."), n;
|
|
34
|
+
}
|
|
35
|
+
function S() {
|
|
36
|
+
let S = we(), C = Ce(), [w] = Te(), { basePath: T = "" } = s(), E = o(), Oe = ne(), { createTicket: ke, createTicketLoading: D, updateTicket: Ae } = re(), { notification: je, notify: O } = te(), k = pe(), A = f(null), j = f(null), [M, N] = p({
|
|
37
|
+
subject: "",
|
|
38
|
+
description: "",
|
|
39
|
+
categoryId: void 0,
|
|
40
|
+
priority: d.Normal
|
|
41
|
+
}), [Me, P] = p({}), [Ne, Pe] = p(!1), [F, I] = p([]), L = f(0), [R, z] = p(null), B = c(T, "tickets"), V = oe(w, C.state), { data: Fe, loading: Ie } = de({ variables: {
|
|
42
|
+
filter: { isActive: !0 },
|
|
43
|
+
limit: 100,
|
|
44
|
+
offset: 0
|
|
45
|
+
} }), Le = [...Fe?.ticketCategories?.nodes ?? []].sort((e, t) => e.displayOrder - t.displayOrder), H = ee(M.subject.trim(), 300), U = H.length >= Ee, { data: Re } = fe({
|
|
46
|
+
variables: {
|
|
47
|
+
query: H,
|
|
48
|
+
limit: y
|
|
49
|
+
},
|
|
50
|
+
skip: !U
|
|
51
|
+
}), W = U ? (Re?.searchKnowledgeBase ?? []).slice(0, y) : [], G = me(() => x(M, E), [M, E]), K = (e) => Ne || Me[e] ? G[e] : void 0, q = K("subject"), J = K("description"), ze = async (e) => {
|
|
52
|
+
if (e.preventDefault(), Pe(!0), G.subject) A.current?.focus();
|
|
53
|
+
else if (G.description) j.current?.focus();
|
|
54
|
+
else try {
|
|
55
|
+
let e = await ke({
|
|
56
|
+
subject: M.subject.trim(),
|
|
57
|
+
description: M.description.trim(),
|
|
58
|
+
priority: M.priority,
|
|
59
|
+
categoryId: M.categoryId,
|
|
60
|
+
...V ? { metadata: { cameFrom: V } } : {}
|
|
61
|
+
});
|
|
62
|
+
if (!e) return;
|
|
63
|
+
if (F.length > 0) try {
|
|
64
|
+
let t = await ce({
|
|
65
|
+
ticketId: e.id,
|
|
66
|
+
files: F.map((e) => e.file),
|
|
67
|
+
onFileProgress: (e, t) => {
|
|
68
|
+
t < 100 && z(e);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
await Ae(e.id, { metadata: {
|
|
72
|
+
...V ? { cameFrom: V } : {},
|
|
73
|
+
initialAttachmentIds: t.files.map((e) => e.id)
|
|
74
|
+
} }), z(null);
|
|
75
|
+
} catch (t) {
|
|
76
|
+
z(null), console.error("[support] ask for help: attachments failed", t);
|
|
77
|
+
let n = new URLSearchParams({ [le]: "1" });
|
|
78
|
+
S(c(T, `tickets/${e.id}?${n.toString()}`));
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
let t = new URLSearchParams({ [ue]: "1" });
|
|
82
|
+
S(c(T, `tickets/${e.id}?${t.toString()}`));
|
|
83
|
+
} catch (e) {
|
|
84
|
+
O("error", se(e, E("support.askForHelp.errors.sendFailed", "We couldn't send your request. Please try again.")), 6e3);
|
|
85
|
+
}
|
|
86
|
+
}, Be = (e) => {
|
|
87
|
+
let t = Array.from(e.target.files || []), { accepted: n, rejected: r } = ae(t);
|
|
88
|
+
if (n.length > 0) {
|
|
89
|
+
let e = n.map((e) => (L.current += 1, {
|
|
90
|
+
id: L.current,
|
|
91
|
+
file: e
|
|
92
|
+
}));
|
|
93
|
+
I((t) => [...t, ...e]);
|
|
94
|
+
}
|
|
95
|
+
r.length > 0 && O("error", l(r), 6e3), e.target.value = "";
|
|
96
|
+
}, Y = `${k}-subject`, X = `${k}-description`, Z = `${k}-category`, Q = `${k}-attachments`, Ve = `${k}-priority`, $ = `${k}-suggestions`;
|
|
97
|
+
return /* @__PURE__ */ _(i, {
|
|
98
|
+
showHeader: !1,
|
|
99
|
+
maxWidth: "md",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ g(a, { notification: je }),
|
|
102
|
+
/* @__PURE__ */ _("div", {
|
|
103
|
+
className: "flex items-start gap-3",
|
|
104
|
+
children: [/* @__PURE__ */ g(e, {
|
|
105
|
+
variant: "ghost",
|
|
106
|
+
size: "sm",
|
|
107
|
+
onClick: () => S(B),
|
|
108
|
+
className: "min-h-11 min-w-11 p-2",
|
|
109
|
+
"aria-label": E("support.askForHelp.actions.back", "Back to my support requests"),
|
|
110
|
+
children: /* @__PURE__ */ g(_e, {
|
|
111
|
+
size: 20,
|
|
112
|
+
"aria-hidden": "true"
|
|
113
|
+
})
|
|
114
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
|
|
115
|
+
className: "text-2xl font-bold text-text-primary",
|
|
116
|
+
children: E("support.askForHelp.title", "Ask for help")
|
|
117
|
+
}), /* @__PURE__ */ g("p", {
|
|
118
|
+
className: "text-sm text-text-secondary",
|
|
119
|
+
children: E("support.askForHelp.subtitle", "Tell us what's going on and our team will reply here.")
|
|
120
|
+
})] })]
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ g(r, {
|
|
123
|
+
className: "max-w-2xl",
|
|
124
|
+
children: E("support.askForHelp.purpose", "The clearer the subject and description, the faster we can help. A screenshot often explains the problem best.")
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ _("form", {
|
|
127
|
+
onSubmit: ze,
|
|
128
|
+
noValidate: !0,
|
|
129
|
+
className: "max-w-2xl space-y-6",
|
|
130
|
+
children: [/* @__PURE__ */ _(t, {
|
|
131
|
+
treatment: "glass",
|
|
132
|
+
className: "space-y-6 p-4 sm:p-6",
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ _("div", { children: [
|
|
135
|
+
/* @__PURE__ */ _("label", {
|
|
136
|
+
htmlFor: Y,
|
|
137
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
138
|
+
children: [
|
|
139
|
+
E("support.askForHelp.labels.subject", "Subject"),
|
|
140
|
+
" ",
|
|
141
|
+
/* @__PURE__ */ g("span", {
|
|
142
|
+
"aria-hidden": "true",
|
|
143
|
+
className: "text-status-error-text",
|
|
144
|
+
children: "*"
|
|
145
|
+
})
|
|
146
|
+
]
|
|
147
|
+
}),
|
|
148
|
+
/* @__PURE__ */ g(n, {
|
|
149
|
+
ref: A,
|
|
150
|
+
id: Y,
|
|
151
|
+
"data-tour": "support-ticket-subject",
|
|
152
|
+
type: "text",
|
|
153
|
+
required: !0,
|
|
154
|
+
"aria-required": "true",
|
|
155
|
+
"aria-invalid": q ? !0 : void 0,
|
|
156
|
+
"aria-describedby": q ? `${Y}-error` : void 0,
|
|
157
|
+
value: M.subject,
|
|
158
|
+
onChange: (e) => N((t) => ({
|
|
159
|
+
...t,
|
|
160
|
+
subject: e.target.value
|
|
161
|
+
})),
|
|
162
|
+
onBlur: () => P((e) => ({
|
|
163
|
+
...e,
|
|
164
|
+
subject: !0
|
|
165
|
+
})),
|
|
166
|
+
className: q ? "border-status-error-border" : void 0,
|
|
167
|
+
placeholder: E("support.askForHelp.placeholders.subject", "For example: Slack messages are not arriving")
|
|
168
|
+
}),
|
|
169
|
+
q && /* @__PURE__ */ g("p", {
|
|
170
|
+
id: `${Y}-error`,
|
|
171
|
+
className: "mt-2 text-sm text-status-error-text",
|
|
172
|
+
children: q
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ g("div", {
|
|
175
|
+
"aria-live": "polite",
|
|
176
|
+
children: W.length > 0 && /* @__PURE__ */ _("section", {
|
|
177
|
+
"aria-labelledby": $,
|
|
178
|
+
className: "mt-3 rounded-lg border border-border-subtle bg-bg-sunken p-3",
|
|
179
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
180
|
+
id: $,
|
|
181
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wider text-text-secondary",
|
|
182
|
+
children: E("support.askForHelp.suggestions.title", "These articles might help")
|
|
183
|
+
}), /* @__PURE__ */ g("ul", {
|
|
184
|
+
className: "space-y-1",
|
|
185
|
+
children: W.map((e) => /* @__PURE__ */ g("li", { children: /* @__PURE__ */ _(Se, {
|
|
186
|
+
to: c(T, `kb/articles/${encodeURIComponent(e.slug)}`),
|
|
187
|
+
target: "_blank",
|
|
188
|
+
rel: "noopener noreferrer",
|
|
189
|
+
className: "flex min-h-11 items-center gap-2 rounded-md px-2 text-sm font-medium text-primary hover:bg-bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ g(ve, {
|
|
192
|
+
size: 16,
|
|
193
|
+
"aria-hidden": "true",
|
|
194
|
+
className: "shrink-0"
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ g("span", {
|
|
197
|
+
className: "min-w-0 truncate",
|
|
198
|
+
children: e.title
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ g("span", {
|
|
201
|
+
className: "sr-only",
|
|
202
|
+
children: E("support.askForHelp.suggestions.newTab", "(opens in a new tab)")
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
}) }, e.id))
|
|
206
|
+
})]
|
|
207
|
+
})
|
|
208
|
+
})
|
|
209
|
+
] }),
|
|
210
|
+
/* @__PURE__ */ _("div", { children: [
|
|
211
|
+
/* @__PURE__ */ _("label", {
|
|
212
|
+
htmlFor: X,
|
|
213
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
214
|
+
children: [
|
|
215
|
+
E("support.askForHelp.labels.description", "Description"),
|
|
216
|
+
" ",
|
|
217
|
+
/* @__PURE__ */ g("span", {
|
|
218
|
+
"aria-hidden": "true",
|
|
219
|
+
className: "text-status-error-text",
|
|
220
|
+
children: "*"
|
|
221
|
+
})
|
|
222
|
+
]
|
|
223
|
+
}),
|
|
224
|
+
/* @__PURE__ */ g("textarea", {
|
|
225
|
+
ref: j,
|
|
226
|
+
id: X,
|
|
227
|
+
"data-tour": "support-ticket-description",
|
|
228
|
+
required: !0,
|
|
229
|
+
"aria-required": "true",
|
|
230
|
+
"aria-invalid": J ? !0 : void 0,
|
|
231
|
+
"aria-describedby": J ? `${X}-error` : void 0,
|
|
232
|
+
rows: 6,
|
|
233
|
+
value: M.description,
|
|
234
|
+
onChange: (e) => N((t) => ({
|
|
235
|
+
...t,
|
|
236
|
+
description: e.target.value
|
|
237
|
+
})),
|
|
238
|
+
onBlur: () => P((e) => ({
|
|
239
|
+
...e,
|
|
240
|
+
description: !0
|
|
241
|
+
})),
|
|
242
|
+
className: u(b, J && "border-status-error-border"),
|
|
243
|
+
placeholder: E("support.askForHelp.placeholders.description", "What were you trying to do, and what happened instead?")
|
|
244
|
+
}),
|
|
245
|
+
J && /* @__PURE__ */ g("p", {
|
|
246
|
+
id: `${X}-error`,
|
|
247
|
+
className: "mt-2 text-sm text-status-error-text",
|
|
248
|
+
children: J
|
|
249
|
+
})
|
|
250
|
+
] }),
|
|
251
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
252
|
+
htmlFor: Z,
|
|
253
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
254
|
+
children: E("support.askForHelp.labels.category", "What's this about?")
|
|
255
|
+
}), /* @__PURE__ */ g("div", {
|
|
256
|
+
"data-tour": "support-ticket-category",
|
|
257
|
+
children: /* @__PURE__ */ g(he, {
|
|
258
|
+
id: Z,
|
|
259
|
+
name: "categoryId",
|
|
260
|
+
className: "min-h-11",
|
|
261
|
+
value: M.categoryId ?? "",
|
|
262
|
+
placeholder: Ie ? E("support.askForHelp.category.loading", "Loading topics…") : E("support.askForHelp.category.placeholder", "Choose a topic (optional)"),
|
|
263
|
+
title: E("support.askForHelp.labels.category", "What's this about?"),
|
|
264
|
+
options: [{
|
|
265
|
+
value: v,
|
|
266
|
+
label: E("support.askForHelp.category.notSure", "Not sure")
|
|
267
|
+
}, ...Le.map((e) => ({
|
|
268
|
+
value: e.id,
|
|
269
|
+
label: e.name
|
|
270
|
+
}))],
|
|
271
|
+
onValueChange: (e) => N((t) => ({
|
|
272
|
+
...t,
|
|
273
|
+
categoryId: e === v || e === "" ? void 0 : e
|
|
274
|
+
}))
|
|
275
|
+
})
|
|
276
|
+
})] }),
|
|
277
|
+
/* @__PURE__ */ _("div", { children: [
|
|
278
|
+
/* @__PURE__ */ g("span", {
|
|
279
|
+
id: Q,
|
|
280
|
+
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
281
|
+
children: E("support.askForHelp.labels.attachments", "Add a screenshot or file")
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ _("label", {
|
|
284
|
+
"data-tour": "support-ticket-attachments",
|
|
285
|
+
className: "flex min-h-11 cursor-pointer items-center justify-center gap-2 rounded-lg border border-dashed border-border-subtle bg-bg-sunken p-4 text-sm text-text-secondary transition-colors hover:text-text-primary focus-within:ring-2 focus-within:ring-primary",
|
|
286
|
+
children: [
|
|
287
|
+
/* @__PURE__ */ g(m, {
|
|
288
|
+
size: 16,
|
|
289
|
+
"aria-hidden": "true"
|
|
290
|
+
}),
|
|
291
|
+
/* @__PURE__ */ g("span", { children: E("support.askForHelp.attachments.choose", "Choose files") }),
|
|
292
|
+
/* @__PURE__ */ g("input", {
|
|
293
|
+
type: "file",
|
|
294
|
+
multiple: !0,
|
|
295
|
+
"aria-labelledby": Q,
|
|
296
|
+
className: "sr-only",
|
|
297
|
+
accept: ie,
|
|
298
|
+
onChange: Be
|
|
299
|
+
})
|
|
300
|
+
]
|
|
301
|
+
}),
|
|
302
|
+
F.length > 0 && /* @__PURE__ */ g("ul", {
|
|
303
|
+
className: "mt-3 flex flex-wrap gap-2",
|
|
304
|
+
children: F.map(({ id: e, file: t }) => /* @__PURE__ */ _("li", {
|
|
305
|
+
className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface py-1 pl-3 text-sm text-text-primary",
|
|
306
|
+
children: [
|
|
307
|
+
/* @__PURE__ */ g(m, {
|
|
308
|
+
size: 14,
|
|
309
|
+
"aria-hidden": "true"
|
|
310
|
+
}),
|
|
311
|
+
/* @__PURE__ */ g("span", {
|
|
312
|
+
className: "max-w-60 truncate",
|
|
313
|
+
children: t.name
|
|
314
|
+
}),
|
|
315
|
+
/* @__PURE__ */ g("button", {
|
|
316
|
+
type: "button",
|
|
317
|
+
className: "flex min-h-11 min-w-11 items-center justify-center rounded text-text-secondary hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
318
|
+
onClick: () => I((t) => t.filter((t) => t.id !== e)),
|
|
319
|
+
"aria-label": E("support.createTicket.attachments.remove", "Remove attachment {{fileName}}", { fileName: t.name }),
|
|
320
|
+
children: /* @__PURE__ */ g(xe, {
|
|
321
|
+
size: 16,
|
|
322
|
+
"aria-hidden": "true"
|
|
323
|
+
})
|
|
324
|
+
})
|
|
325
|
+
]
|
|
326
|
+
}, e))
|
|
327
|
+
}),
|
|
328
|
+
/* @__PURE__ */ g("p", {
|
|
329
|
+
"aria-live": "polite",
|
|
330
|
+
className: "mt-2 text-xs text-text-secondary",
|
|
331
|
+
children: R ? E("support.createTicket.attachments.uploading", "Uploading {{fileName}}...", { fileName: R }) : null
|
|
332
|
+
})
|
|
333
|
+
] }),
|
|
334
|
+
/* @__PURE__ */ g(ge, {
|
|
335
|
+
storageKey: "support.askForHelp",
|
|
336
|
+
children: /* @__PURE__ */ _("fieldset", { children: [
|
|
337
|
+
/* @__PURE__ */ g("legend", {
|
|
338
|
+
id: Ve,
|
|
339
|
+
className: "mb-2 text-sm font-medium text-text-primary",
|
|
340
|
+
children: E("support.askForHelp.labels.priority", "Priority")
|
|
341
|
+
}),
|
|
342
|
+
/* @__PURE__ */ g("div", {
|
|
343
|
+
"data-tour": "support-ticket-priority",
|
|
344
|
+
className: "grid grid-cols-2 gap-2 sm:grid-cols-4",
|
|
345
|
+
children: De.map((e) => /* @__PURE__ */ _("label", {
|
|
346
|
+
className: u("flex min-h-11 cursor-pointer items-center justify-center rounded-lg border px-3 text-sm font-medium transition-colors", "focus-within:ring-2 focus-within:ring-primary", M.priority === e ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
|
|
347
|
+
children: [/* @__PURE__ */ g("input", {
|
|
348
|
+
type: "radio",
|
|
349
|
+
name: `${k}-priority-choice`,
|
|
350
|
+
value: e,
|
|
351
|
+
checked: M.priority === e,
|
|
352
|
+
onChange: () => N((t) => ({
|
|
353
|
+
...t,
|
|
354
|
+
priority: e
|
|
355
|
+
})),
|
|
356
|
+
className: "sr-only"
|
|
357
|
+
}), Oe.priority[e]]
|
|
358
|
+
}, e))
|
|
359
|
+
}),
|
|
360
|
+
/* @__PURE__ */ g("p", {
|
|
361
|
+
className: "mt-2 text-xs text-text-secondary",
|
|
362
|
+
children: E("support.askForHelp.priorityHint", "Most questions are Normal. Choose Critical only when you are completely blocked.")
|
|
363
|
+
})
|
|
364
|
+
] })
|
|
365
|
+
})
|
|
366
|
+
]
|
|
367
|
+
}), /* @__PURE__ */ _("div", {
|
|
368
|
+
className: "flex flex-col gap-3 sm:flex-row",
|
|
369
|
+
children: [/* @__PURE__ */ g(e, {
|
|
370
|
+
type: "submit",
|
|
371
|
+
"data-tour": "support-ticket-submit",
|
|
372
|
+
disabled: D,
|
|
373
|
+
className: "min-h-11 flex-1",
|
|
374
|
+
children: D ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(ye, {
|
|
375
|
+
size: 18,
|
|
376
|
+
"aria-hidden": "true",
|
|
377
|
+
className: "animate-spin"
|
|
378
|
+
}), E("support.askForHelp.actions.sending", "Sending…")] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(be, {
|
|
379
|
+
size: 18,
|
|
380
|
+
"aria-hidden": "true"
|
|
381
|
+
}), E("support.askForHelp.actions.send", "Send request")] })
|
|
382
|
+
}), /* @__PURE__ */ g(e, {
|
|
383
|
+
type: "button",
|
|
384
|
+
variant: "outline",
|
|
385
|
+
className: "min-h-11",
|
|
386
|
+
onClick: () => S(B),
|
|
387
|
+
children: E("support.createTicket.actions.cancel", "Cancel")
|
|
388
|
+
})]
|
|
389
|
+
})]
|
|
390
|
+
})
|
|
391
|
+
]
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
export { S as AskForHelpPage };
|
|
395
|
+
|
|
396
|
+
//# sourceMappingURL=AskForHelpPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AskForHelpPage.js","names":["PagePurpose","Link","_Fragment","PagePurpose$1","Link$1","NO_CATEGORY","SUGGESTION_LIMIT","MIN_SUGGESTION_QUERY_LENGTH","PRIORITY_ORDER","SupportTicketPriority","FIELD_CLASS","validateAskForHelpForm","errors","subject","values","description","tr","AskForHelpPage","navigate","useNavigate","location","useLocation","searchParams","useSearchParams","useSupport","useTr","labels","useTicketLabels","useTicketOperations","useNotification","formId","useId","subjectRef","useRef","descriptionRef","form","setForm","useState","touched","setTouched","submitAttempted","setSubmitAttempted","attachedFiles","setAttachedFiles","nextAttachmentIdRef","uploadingFileName","setUploadingFileName","requestsPath","joinPath","basePath","cameFrom","readCameFrom","categoriesData","categoriesLoading","useGetTicketCategoriesQuery","categories","first","second","suggestionQuery","useDebouncedValue","suggestionsActive","suggestionsData","useSearchKnowledgeBaseQuery","suggestions","useMemo","visibleError","field","subjectError","descriptionError","handleSubmit","event","ticket","createTicket","uploadResult","uploadSupportAttachmentFiles","attached","progress","fileName","updateTicket","file","uploadError","failedParams","ATTACHMENTS_FAILED_PARAM","createdParams","TICKET_CREATED_PARAM","error","extractErrorMessage","handleFileChange","files","partitionAttachments","accepted","withIds","current","rejected","notify","rejectedAttachmentsMessage","subjectId","descriptionId","categoryId","attachmentsLabelId","priorityLabelId","suggestionsHeadingId","PageLayout","NotificationToast","Button","ArrowLeft","GlassCard","Input","article","BookOpen","cn","NativeSelect","category","value","Paperclip","SUPPORT_ATTACHMENT_ACCEPT","id","X","OptionalFields","priority","createTicketLoading","Fragment","Loader2","Send"],"sources":["../../../src/support/pages/AskForHelpPage.tsx"],"sourcesContent":["import { useId, useMemo, useRef, useState } from 'react';\nimport { Link, useLocation, useNavigate, useSearchParams } from 'react-router';\nimport { ArrowLeft, BookOpen, Loader2, Paperclip, Send, X } from 'lucide-react';\nimport { NativeSelect, OptionalFields } from '@burdenoff/fe-libs/ui';\nimport { Button, GlassCard, Input, PagePurpose } from '../components/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { NotificationToast } from '../components/NotificationToast';\nimport { useDebouncedValue } from '../hooks/useDebouncedValue';\nimport { useNotification } from '../hooks/useNotification';\nimport { useTicketLabels } from '../hooks/useTicketLabels';\nimport { useTicketOperations } from '../hooks/useTicketOperations';\nimport { useTr } from '../hooks/useTr';\nimport { useSupport } from '../providers/SupportProvider';\nimport { joinPath } from '../utils';\nimport {\n SUPPORT_ATTACHMENT_ACCEPT,\n partitionAttachments,\n rejectedAttachmentsMessage,\n} from '../utils/attachments';\nimport { readCameFrom } from '../utils/cameFrom';\nimport { cn } from '../utils/cn';\nimport { extractErrorMessage } from '../utils/errors';\nimport { uploadSupportAttachmentFiles } from '../utils/supportFiles';\nimport {\n ATTACHMENTS_FAILED_PARAM,\n MIN_DESCRIPTION_LENGTH,\n MIN_SUBJECT_LENGTH,\n TICKET_CREATED_PARAM,\n} from '../constants';\nimport {\n useGetTicketCategoriesQuery,\n useSearchKnowledgeBaseQuery,\n} from '../../generated/global-operations';\nimport {\n SupportTicketPriority,\n type KnowledgeBaseArticle,\n type TicketCategory,\n} from '../../generated/global-types';\n\n/** Value of the \"Not sure\" topic, which sends no category. */\nconst NO_CATEGORY = '__none__';\n/** How many suggested articles show under the subject. */\nconst SUGGESTION_LIMIT = 3;\n/** Shortest subject worth searching articles for. */\nconst MIN_SUGGESTION_QUERY_LENGTH = 3;\n\nconst PRIORITY_ORDER: readonly SupportTicketPriority[] = [\n SupportTicketPriority.Low,\n SupportTicketPriority.Normal,\n SupportTicketPriority.High,\n SupportTicketPriority.Critical,\n];\n\nconst FIELD_CLASS =\n 'w-full rounded-lg border bg-bg-surface px-4 py-3 text-text-primary transition-colors placeholder:text-text-secondary focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20';\n\ntype FieldName = 'subject' | 'description';\ntype FieldErrors = Partial<Record<FieldName, string>>;\n\ninterface AskForHelpForm {\n subject: string;\n description: string;\n categoryId: string | undefined;\n priority: SupportTicketPriority;\n}\n\ntype SuggestedArticle = Pick<KnowledgeBaseArticle, 'id' | 'slug' | 'title'>;\n\ntype Translate = ReturnType<typeof useTr>;\n\n/** An attached file with a stable id, so the chip list can key on it. */\ninterface AttachedFile {\n id: number;\n file: File;\n}\n\n/** Inline field errors for the form; an empty object means it can be sent. */\nfunction validateAskForHelpForm(values: AskForHelpForm, tr: Translate): FieldErrors {\n const errors: FieldErrors = {};\n const subject = values.subject.trim();\n const description = values.description.trim();\n if (!subject) {\n errors.subject = tr('support.askForHelp.validation.subjectRequired', 'Add a subject.');\n } else if (subject.length < MIN_SUBJECT_LENGTH) {\n errors.subject = tr(\n 'support.createTicket.validation.subjectMin',\n 'Subject must be at least {{min}} characters long.',\n { min: MIN_SUBJECT_LENGTH }\n );\n }\n if (!description) {\n errors.description = tr(\n 'support.askForHelp.validation.descriptionRequired',\n \"Tell us what's happening.\"\n );\n } else if (description.length < MIN_DESCRIPTION_LENGTH) {\n errors.description = tr(\n 'support.createTicket.validation.descriptionMin',\n 'Description must be at least {{min}} characters long.',\n { min: MIN_DESCRIPTION_LENGTH }\n );\n }\n return errors;\n}\n\n/**\n * FluidGrids \"Ask for help\" (BOFF-11844): the short request form.\n *\n * Level 1 is Subject, Description, \"What's this about?\" and attachments;\n * Priority (default Normal) and the formatting note sit under \"More options\".\n * Errors show inline next to the field on blur and on submit. Up to three\n * matching articles are suggested while the subject is typed. After the\n * request is created the page opens it straight away and the request page\n * shows the \"sent\" toast.\n */\nexport function AskForHelpPage() {\n const navigate = useNavigate();\n const location = useLocation();\n const [searchParams] = useSearchParams();\n const { basePath = '' } = useSupport();\n const tr = useTr();\n const labels = useTicketLabels();\n const { createTicket, createTicketLoading, updateTicket } = useTicketOperations();\n const { notification, notify } = useNotification();\n const formId = useId();\n const subjectRef = useRef<HTMLInputElement>(null);\n const descriptionRef = useRef<HTMLTextAreaElement>(null);\n\n const [form, setForm] = useState<AskForHelpForm>({\n subject: '',\n description: '',\n categoryId: undefined,\n priority: SupportTicketPriority.Normal,\n });\n const [touched, setTouched] = useState<Partial<Record<FieldName, boolean>>>({});\n const [submitAttempted, setSubmitAttempted] = useState(false);\n const [attachedFiles, setAttachedFiles] = useState<AttachedFile[]>([]);\n const nextAttachmentIdRef = useRef(0);\n const [uploadingFileName, setUploadingFileName] = useState<string | null>(null);\n\n const requestsPath = joinPath(basePath, 'tickets');\n const cameFrom = readCameFrom(searchParams, location.state);\n\n const { data: categoriesData, loading: categoriesLoading } = useGetTicketCategoriesQuery({\n variables: { filter: { isActive: true }, limit: 100, offset: 0 },\n });\n const categories: TicketCategory[] = [...(categoriesData?.ticketCategories?.nodes ?? [])].sort(\n (first: TicketCategory, second: TicketCategory) => first.displayOrder - second.displayOrder\n );\n\n const suggestionQuery = useDebouncedValue(form.subject.trim(), 300);\n const suggestionsActive = suggestionQuery.length >= MIN_SUGGESTION_QUERY_LENGTH;\n // The generated hook is called directly: the knowledge-base operations hook\n // writes search results into the shared store, which the help articles page\n // reads, and these suggestions must not leak into it.\n const { data: suggestionsData } = useSearchKnowledgeBaseQuery({\n variables: { query: suggestionQuery, limit: SUGGESTION_LIMIT },\n skip: !suggestionsActive,\n });\n const suggestions: SuggestedArticle[] = suggestionsActive\n ? (suggestionsData?.searchKnowledgeBase ?? []).slice(0, SUGGESTION_LIMIT)\n : [];\n\n const errors = useMemo(() => validateAskForHelpForm(form, tr), [form, tr]);\n const visibleError = (field: FieldName): string | undefined =>\n submitAttempted || touched[field] ? errors[field] : undefined;\n const subjectError = visibleError('subject');\n const descriptionError = visibleError('description');\n\n const handleSubmit = async (event: React.FormEvent) => {\n event.preventDefault();\n setSubmitAttempted(true);\n if (errors.subject) {\n subjectRef.current?.focus();\n return;\n }\n if (errors.description) {\n descriptionRef.current?.focus();\n return;\n }\n\n try {\n const ticket = await createTicket({\n subject: form.subject.trim(),\n description: form.description.trim(),\n priority: form.priority,\n categoryId: form.categoryId,\n ...(cameFrom ? { metadata: { cameFrom } } : {}),\n });\n if (!ticket) {\n return;\n }\n\n if (attachedFiles.length > 0) {\n try {\n const uploadResult = await uploadSupportAttachmentFiles({\n ticketId: ticket.id,\n files: attachedFiles.map((attached) => attached.file),\n onFileProgress: (fileName, progress) => {\n if (progress < 100) {\n setUploadingFileName(fileName);\n }\n },\n });\n // Send cameFrom again with the attachment ids so the hidden context\n // survives even if the server ever replaced metadata on update\n // instead of merging it.\n await updateTicket(ticket.id, {\n metadata: {\n ...(cameFrom ? { cameFrom } : {}),\n initialAttachmentIds: uploadResult.files.map((file) => file.id),\n },\n });\n setUploadingFileName(null);\n } catch (uploadError) {\n setUploadingFileName(null);\n // Only a code-level flag goes in the URL, never server error text;\n // the request page composes the message (useAttachmentsFailedToast).\n console.error('[support] ask for help: attachments failed', uploadError);\n const failedParams = new URLSearchParams({ [ATTACHMENTS_FAILED_PARAM]: '1' });\n navigate(joinPath(basePath, `tickets/${ticket.id}?${failedParams.toString()}`));\n return;\n }\n }\n\n const createdParams = new URLSearchParams({ [TICKET_CREATED_PARAM]: '1' });\n navigate(joinPath(basePath, `tickets/${ticket.id}?${createdParams.toString()}`));\n } catch (error) {\n notify(\n 'error',\n extractErrorMessage(\n error,\n tr(\n 'support.askForHelp.errors.sendFailed',\n \"We couldn't send your request. Please try again.\"\n )\n ),\n 6000\n );\n }\n };\n\n const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const files = Array.from(event.target.files || []);\n const { accepted, rejected } = partitionAttachments(files);\n if (accepted.length > 0) {\n const withIds = accepted.map((file) => {\n nextAttachmentIdRef.current += 1;\n return { id: nextAttachmentIdRef.current, file };\n });\n setAttachedFiles((current) => [...current, ...withIds]);\n }\n if (rejected.length > 0) {\n notify('error', rejectedAttachmentsMessage(rejected), 6000);\n }\n event.target.value = '';\n };\n\n const subjectId = `${formId}-subject`;\n const descriptionId = `${formId}-description`;\n const categoryId = `${formId}-category`;\n const attachmentsLabelId = `${formId}-attachments`;\n const priorityLabelId = `${formId}-priority`;\n const suggestionsHeadingId = `${formId}-suggestions`;\n\n return (\n <PageLayout showHeader={false} maxWidth=\"md\">\n <NotificationToast notification={notification} />\n\n <div className=\"flex items-start gap-3\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => navigate(requestsPath)}\n className=\"min-h-11 min-w-11 p-2\"\n aria-label={tr('support.askForHelp.actions.back', 'Back to my support requests')}\n >\n <ArrowLeft size={20} aria-hidden=\"true\" />\n </Button>\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">\n {tr('support.askForHelp.title', 'Ask for help')}\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'support.askForHelp.subtitle',\n \"Tell us what's going on and our team will reply here.\"\n )}\n </p>\n </div>\n </div>\n\n <PagePurpose className=\"max-w-2xl\">\n {tr(\n 'support.askForHelp.purpose',\n 'The clearer the subject and description, the faster we can help. A screenshot often explains the problem best.'\n )}\n </PagePurpose>\n\n <form onSubmit={handleSubmit} noValidate className=\"max-w-2xl space-y-6\">\n <GlassCard treatment=\"glass\" className=\"space-y-6 p-4 sm:p-6\">\n <div>\n <label htmlFor={subjectId} className=\"mb-2 block text-sm font-medium text-text-primary\">\n {tr('support.askForHelp.labels.subject', 'Subject')}{' '}\n <span aria-hidden=\"true\" className=\"text-status-error-text\">\n *\n </span>\n </label>\n <Input\n ref={subjectRef}\n id={subjectId}\n data-tour=\"support-ticket-subject\"\n type=\"text\"\n required\n aria-required=\"true\"\n aria-invalid={subjectError ? true : undefined}\n aria-describedby={subjectError ? `${subjectId}-error` : undefined}\n value={form.subject}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setForm((current) => ({ ...current, subject: e.target.value }))\n }\n onBlur={() => setTouched((current) => ({ ...current, subject: true }))}\n className={subjectError ? 'border-status-error-border' : undefined}\n placeholder={tr(\n 'support.askForHelp.placeholders.subject',\n 'For example: Slack messages are not arriving'\n )}\n />\n {subjectError && (\n <p id={`${subjectId}-error`} className=\"mt-2 text-sm text-status-error-text\">\n {subjectError}\n </p>\n )}\n\n <div aria-live=\"polite\">\n {suggestions.length > 0 && (\n <section\n aria-labelledby={suggestionsHeadingId}\n className=\"mt-3 rounded-lg border border-border-subtle bg-bg-sunken p-3\"\n >\n <h2\n id={suggestionsHeadingId}\n className=\"mb-2 text-xs font-semibold uppercase tracking-wider text-text-secondary\"\n >\n {tr('support.askForHelp.suggestions.title', 'These articles might help')}\n </h2>\n <ul className=\"space-y-1\">\n {suggestions.map((article) => (\n <li key={article.id}>\n <Link\n to={joinPath(basePath, `kb/articles/${encodeURIComponent(article.slug)}`)}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex min-h-11 items-center gap-2 rounded-md px-2 text-sm font-medium text-primary hover:bg-bg-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary\"\n >\n <BookOpen size={16} aria-hidden=\"true\" className=\"shrink-0\" />\n <span className=\"min-w-0 truncate\">{article.title}</span>\n <span className=\"sr-only\">\n {tr('support.askForHelp.suggestions.newTab', '(opens in a new tab)')}\n </span>\n </Link>\n </li>\n ))}\n </ul>\n </section>\n )}\n </div>\n </div>\n\n <div>\n <label\n htmlFor={descriptionId}\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.askForHelp.labels.description', 'Description')}{' '}\n <span aria-hidden=\"true\" className=\"text-status-error-text\">\n *\n </span>\n </label>\n <textarea\n ref={descriptionRef}\n id={descriptionId}\n data-tour=\"support-ticket-description\"\n required\n aria-required=\"true\"\n aria-invalid={descriptionError ? true : undefined}\n aria-describedby={descriptionError ? `${descriptionId}-error` : undefined}\n rows={6}\n value={form.description}\n onChange={(e) => setForm((current) => ({ ...current, description: e.target.value }))}\n onBlur={() => setTouched((current) => ({ ...current, description: true }))}\n className={cn(FIELD_CLASS, descriptionError && 'border-status-error-border')}\n placeholder={tr(\n 'support.askForHelp.placeholders.description',\n 'What were you trying to do, and what happened instead?'\n )}\n />\n {descriptionError && (\n <p id={`${descriptionId}-error`} className=\"mt-2 text-sm text-status-error-text\">\n {descriptionError}\n </p>\n )}\n </div>\n\n <div>\n <label\n htmlFor={categoryId}\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.askForHelp.labels.category', \"What's this about?\")}\n </label>\n <div data-tour=\"support-ticket-category\">\n <NativeSelect\n id={categoryId}\n name=\"categoryId\"\n className=\"min-h-11\"\n value={form.categoryId ?? ''}\n placeholder={\n categoriesLoading\n ? tr('support.askForHelp.category.loading', 'Loading topics…')\n : tr('support.askForHelp.category.placeholder', 'Choose a topic (optional)')\n }\n title={tr('support.askForHelp.labels.category', \"What's this about?\")}\n options={[\n {\n value: NO_CATEGORY,\n label: tr('support.askForHelp.category.notSure', 'Not sure'),\n },\n ...categories.map((category) => ({ value: category.id, label: category.name })),\n ]}\n onValueChange={(value) =>\n setForm((current) => ({\n ...current,\n categoryId: value === NO_CATEGORY || value === '' ? undefined : value,\n }))\n }\n />\n </div>\n </div>\n\n <div>\n <span\n id={attachmentsLabelId}\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n {tr('support.askForHelp.labels.attachments', 'Add a screenshot or file')}\n </span>\n <label\n data-tour=\"support-ticket-attachments\"\n className=\"flex min-h-11 cursor-pointer items-center justify-center gap-2 rounded-lg border border-dashed border-border-subtle bg-bg-sunken p-4 text-sm text-text-secondary transition-colors hover:text-text-primary focus-within:ring-2 focus-within:ring-primary\"\n >\n <Paperclip size={16} aria-hidden=\"true\" />\n <span>{tr('support.askForHelp.attachments.choose', 'Choose files')}</span>\n <input\n type=\"file\"\n multiple\n aria-labelledby={attachmentsLabelId}\n className=\"sr-only\"\n accept={SUPPORT_ATTACHMENT_ACCEPT}\n onChange={handleFileChange}\n />\n </label>\n\n {attachedFiles.length > 0 && (\n <ul className=\"mt-3 flex flex-wrap gap-2\">\n {attachedFiles.map(({ id, file }) => (\n <li\n key={id}\n className=\"flex items-center gap-2 rounded-lg border border-border-subtle bg-bg-surface py-1 pl-3 text-sm text-text-primary\"\n >\n <Paperclip size={14} aria-hidden=\"true\" />\n <span className=\"max-w-60 truncate\">{file.name}</span>\n <button\n type=\"button\"\n className=\"flex min-h-11 min-w-11 items-center justify-center rounded text-text-secondary hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary\"\n onClick={() =>\n setAttachedFiles((current) =>\n current.filter((attached) => attached.id !== id)\n )\n }\n aria-label={tr(\n 'support.createTicket.attachments.remove',\n 'Remove attachment {{fileName}}',\n { fileName: file.name }\n )}\n >\n <X size={16} aria-hidden=\"true\" />\n </button>\n </li>\n ))}\n </ul>\n )}\n\n <p aria-live=\"polite\" className=\"mt-2 text-xs text-text-secondary\">\n {uploadingFileName\n ? tr('support.createTicket.attachments.uploading', 'Uploading {{fileName}}...', {\n fileName: uploadingFileName,\n })\n : null}\n </p>\n </div>\n\n <OptionalFields storageKey=\"support.askForHelp\">\n <fieldset>\n <legend id={priorityLabelId} className=\"mb-2 text-sm font-medium text-text-primary\">\n {tr('support.askForHelp.labels.priority', 'Priority')}\n </legend>\n <div\n data-tour=\"support-ticket-priority\"\n className=\"grid grid-cols-2 gap-2 sm:grid-cols-4\"\n >\n {PRIORITY_ORDER.map((priority) => (\n <label\n key={priority}\n className={cn(\n 'flex min-h-11 cursor-pointer items-center justify-center rounded-lg border px-3 text-sm font-medium transition-colors',\n 'focus-within:ring-2 focus-within:ring-primary',\n form.priority === priority\n ? 'border-primary bg-action-primary-bg text-action-primary-text'\n : 'border-border-subtle bg-bg-surface text-text-secondary hover:bg-bg-sunken hover:text-text-primary'\n )}\n >\n <input\n type=\"radio\"\n name={`${formId}-priority-choice`}\n value={priority}\n checked={form.priority === priority}\n onChange={() => setForm((current) => ({ ...current, priority }))}\n className=\"sr-only\"\n />\n {labels.priority[priority]}\n </label>\n ))}\n </div>\n <p className=\"mt-2 text-xs text-text-secondary\">\n {tr(\n 'support.askForHelp.priorityHint',\n 'Most questions are Normal. Choose Critical only when you are completely blocked.'\n )}\n </p>\n </fieldset>\n </OptionalFields>\n </GlassCard>\n\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <Button\n type=\"submit\"\n data-tour=\"support-ticket-submit\"\n disabled={createTicketLoading}\n className=\"min-h-11 flex-1\"\n >\n {createTicketLoading ? (\n <>\n <Loader2 size={18} aria-hidden=\"true\" className=\"animate-spin\" />\n {tr('support.askForHelp.actions.sending', 'Sending…')}\n </>\n ) : (\n <>\n <Send size={18} aria-hidden=\"true\" />\n {tr('support.askForHelp.actions.send', 'Send request')}\n </>\n )}\n </Button>\n <Button\n type=\"button\"\n variant=\"outline\"\n className=\"min-h-11\"\n onClick={() => navigate(requestsPath)}\n >\n {tr('support.createTicket.actions.cancel', 'Cancel')}\n </Button>\n </div>\n </form>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwCA,IAAMK,IAAc,YAEdC,IAAmB,GAEnBC,KAA8B,GAE9BC,KAAmD;CACvDC,EAAsB;CACtBA,EAAsB;CACtBA,EAAsB;CACtBA,EAAsB;AACxB,GAEMC,IACJ;AAuBF,SAASC,EAAuB,GAAwB,GAA4B;CAClF,IAAMC,IAAsB,CAAC,GACvBC,IAAUC,EAAO,QAAQ,KAAK,GAC9BC,IAAcD,EAAO,YAAY,KAAK;CAsB5C,OArBKD,IAEMA,EAAQ,SAAA,MACjB,EAAO,UAAUG,EACf,8CACA,qDACA,EAAE,KAAA,EAAwB,CAC5B,KANA,EAAO,UAAUA,EAAG,iDAAiD,gBAAgB,GAQlFD,IAKMA,EAAY,SAAA,OACrB,EAAO,cAAcC,EACnB,kDACA,yDACA,EAAE,KAAA,GAA4B,CAChC,KATA,EAAO,cAAcA,EACnB,qDACA,2BACF,GAQKJ;AACT;AAYA,SAAgBK,IAAiB;CAC/B,IAAMC,IAAWC,GAAY,GACvBC,IAAWC,GAAY,GACvB,CAACC,KAAgBC,GAAgB,GACjC,EAAE,cAAW,OAAOC,EAAW,GAC/BR,IAAKS,EAAM,GACXC,KAASC,GAAgB,GACzB,EAAE,kBAAc,wBAAqB,qBAAiBC,GAAoB,GAC1E,EAAE,kBAAc,cAAWC,GAAgB,GAC3CC,IAASC,GAAM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