@flamingo-stack/openframe-frontend-core 0.0.274 → 0.0.275
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/{chunk-XDGDCO3I.cjs → chunk-5LOLBUZG.cjs} +45 -44
- package/dist/chunk-5LOLBUZG.cjs.map +1 -0
- package/dist/{chunk-4YKGXZ7W.js → chunk-7AH75KFQ.js} +1 -1
- package/dist/chunk-7AH75KFQ.js.map +1 -0
- package/dist/{chunk-CYMMGPPV.js → chunk-CTBL56EC.js} +41 -5
- package/dist/chunk-CTBL56EC.js.map +1 -0
- package/dist/{chunk-2KHFSSFZ.cjs → chunk-DBJZF2OV.cjs} +15 -15
- package/dist/{chunk-2KHFSSFZ.cjs.map → chunk-DBJZF2OV.cjs.map} +1 -1
- package/dist/{chunk-4DYXV3E7.cjs → chunk-DEAWHNYW.cjs} +1177 -1223
- package/dist/chunk-DEAWHNYW.cjs.map +1 -0
- package/dist/{chunk-WU6PMH5L.cjs → chunk-E6RCVOQG.cjs} +41 -43
- package/dist/chunk-E6RCVOQG.cjs.map +1 -0
- package/dist/{chunk-FLIWL6V4.js → chunk-EINXNG5D.js} +4 -4
- package/dist/{chunk-OPSZNW3I.js → chunk-EKWPIEHH.js} +3031 -3077
- package/dist/chunk-EKWPIEHH.js.map +1 -0
- package/dist/{chunk-N5MCKGAB.js → chunk-FDHKJJPK.js} +34 -33
- package/dist/{chunk-N5MCKGAB.js.map → chunk-FDHKJJPK.js.map} +1 -1
- package/dist/{chunk-BSOHVQ7X.js → chunk-GHWOQUB4.js} +366 -391
- package/dist/chunk-GHWOQUB4.js.map +1 -0
- package/dist/{chunk-T7AJBKZP.cjs → chunk-GVSTRN36.cjs} +5 -2
- package/dist/chunk-GVSTRN36.cjs.map +1 -0
- package/dist/{chunk-L4LAAA5Q.js → chunk-IMNGGLKL.js} +5 -2
- package/dist/chunk-IMNGGLKL.js.map +1 -0
- package/dist/{chunk-VASNLWPZ.js → chunk-NY7OG2OJ.js} +5 -7
- package/dist/{chunk-VASNLWPZ.js.map → chunk-NY7OG2OJ.js.map} +1 -1
- package/dist/{chunk-5QJQAFTP.cjs → chunk-OKDCUJOZ.cjs} +48 -12
- package/dist/chunk-OKDCUJOZ.cjs.map +1 -0
- package/dist/{chunk-MEAR2WHS.cjs → chunk-PC7YOZ4I.cjs} +1 -1
- package/dist/chunk-PC7YOZ4I.cjs.map +1 -0
- package/dist/{chunk-QLWBBCI5.cjs → chunk-Q2ITV3NY.cjs} +5 -4
- package/dist/chunk-Q2ITV3NY.cjs.map +1 -0
- package/dist/chunk-RGALV4UX.js +433 -0
- package/dist/chunk-RGALV4UX.js.map +1 -0
- package/dist/{chunk-W5KBDFCR.cjs → chunk-SA4ZTD3G.cjs} +30 -30
- package/dist/{chunk-W5KBDFCR.cjs.map → chunk-SA4ZTD3G.cjs.map} +1 -1
- package/dist/{chunk-GL5X6VVC.js → chunk-T4XXYAYY.js} +4 -4
- package/dist/{chunk-ZMFT5XOB.js → chunk-UXJCZOLA.js} +4 -3
- package/dist/chunk-UXJCZOLA.js.map +1 -0
- package/dist/{chunk-7NJUPRN6.cjs → chunk-XCPBD2PG.cjs} +183 -208
- package/dist/chunk-XCPBD2PG.cjs.map +1 -0
- package/dist/chunk-ZSUNQJRO.cjs +433 -0
- package/dist/chunk-ZSUNQJRO.cjs.map +1 -0
- package/dist/components/chat/chat-message-row.d.ts +1 -1
- package/dist/components/chat/chat-message-row.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +10 -11
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +12 -13
- package/dist/components/contact/index.cjs +7 -9
- package/dist/components/contact/index.cjs.map +1 -1
- package/dist/components/contact/index.js +6 -8
- package/dist/components/faq/faq-document-page.d.ts +21 -0
- package/dist/components/faq/faq-document-page.d.ts.map +1 -0
- package/dist/components/faq/index.cjs +22 -5
- package/dist/components/faq/index.cjs.map +1 -1
- package/dist/components/faq/index.d.ts +1 -0
- package/dist/components/faq/index.d.ts.map +1 -1
- package/dist/components/faq/index.js +21 -4
- package/dist/components/features/index.cjs +6 -8
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +5 -7
- package/dist/components/index.cjs +304 -309
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +249 -254
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/article-detail-layout.d.ts +21 -9
- package/dist/components/layout/article-detail-layout.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +6 -8
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.js +5 -7
- package/dist/components/onboarding-guides/index.cjs +33 -46
- package/dist/components/onboarding-guides/index.cjs.map +1 -1
- package/dist/components/onboarding-guides/index.js +11 -24
- package/dist/components/onboarding-guides/index.js.map +1 -1
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -1
- package/dist/components/related-content/index.cjs +8 -10
- package/dist/components/related-content/index.cjs.map +1 -1
- package/dist/components/related-content/index.js +7 -9
- package/dist/components/shared/delivery/delivery-lists.d.ts.map +1 -1
- package/dist/components/shared/detail-page-skeleton.d.ts +6 -1
- package/dist/components/shared/detail-page-skeleton.d.ts.map +1 -1
- package/dist/components/shared/legal-document/use-legal-docs.d.ts.map +1 -1
- package/dist/components/shared/product-release/release-detail-page.d.ts.map +1 -1
- package/dist/components/shared/roadmap/roadmap-grid.d.ts.map +1 -1
- package/dist/components/shared/roadmap/use-roadmap-voting.d.ts.map +1 -1
- package/dist/components/tickets/help-center-list.d.ts +9 -1
- package/dist/components/tickets/help-center-list.d.ts.map +1 -1
- package/dist/components/tickets/hooks/use-ticket-actions.d.ts.map +1 -1
- package/dist/components/tickets/hooks/use-ticket-engagements.d.ts.map +1 -1
- package/dist/components/tickets/hooks/use-tickets-list.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +81 -76
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +27 -22
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/ui/index.cjs +12 -15
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +24 -27
- package/dist/contexts/chat-runtime-context.d.ts +9 -0
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +3 -3
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/use-contact-submission.d.ts.map +1 -1
- package/dist/hooks/use-self-fetch.d.ts.map +1 -1
- package/dist/index.cjs +11 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +32 -36
- package/dist/utils/embed-authed-fetch.d.ts +7 -0
- package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
- package/dist/utils/embed-content-fetch.d.ts +2 -0
- package/dist/utils/embed-content-fetch.d.ts.map +1 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-message-row.tsx +12 -2
- package/src/components/faq/faq-document-page.tsx +69 -0
- package/src/components/faq/index.ts +1 -0
- package/src/components/layout/article-detail-layout.tsx +24 -11
- package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +21 -16
- package/src/components/shared/delivery/delivery-lists.tsx +3 -2
- package/src/components/shared/detail-page-skeleton.tsx +18 -10
- package/src/components/shared/legal-document/use-legal-docs.ts +2 -1
- package/src/components/shared/product-release/release-detail-page.tsx +27 -17
- package/src/components/shared/roadmap/roadmap-grid.tsx +2 -1
- package/src/components/shared/roadmap/use-roadmap-voting.ts +3 -2
- package/src/components/tickets/help-center-list.tsx +12 -4
- package/src/components/tickets/hooks/use-ticket-actions.ts +7 -2
- package/src/components/tickets/hooks/use-ticket-engagements.ts +6 -1
- package/src/components/tickets/hooks/use-tickets-list.ts +7 -1
- package/src/components/tickets/ticket-detail-drawer.tsx +1 -0
- package/src/contexts/chat-runtime-context.tsx +9 -0
- package/src/hooks/use-contact-submission.ts +2 -1
- package/src/hooks/use-self-fetch.ts +2 -1
- package/src/styles/index.css +1 -0
- package/src/styles/ods-page-shell.css +29 -0
- package/src/utils/embed-authed-fetch.ts +10 -0
- package/src/utils/embed-content-fetch.ts +30 -0
- package/dist/chunk-4DYXV3E7.cjs.map +0 -1
- package/dist/chunk-4YKGXZ7W.js.map +0 -1
- package/dist/chunk-5QJQAFTP.cjs.map +0 -1
- package/dist/chunk-722TTRIJ.cjs +0 -29
- package/dist/chunk-722TTRIJ.cjs.map +0 -1
- package/dist/chunk-7NJUPRN6.cjs.map +0 -1
- package/dist/chunk-BSOHVQ7X.js.map +0 -1
- package/dist/chunk-CYMMGPPV.js.map +0 -1
- package/dist/chunk-DAAFVOTL.cjs +0 -172
- package/dist/chunk-DAAFVOTL.cjs.map +0 -1
- package/dist/chunk-L4LAAA5Q.js.map +0 -1
- package/dist/chunk-MEAR2WHS.cjs.map +0 -1
- package/dist/chunk-OO4ZGDRO.js +0 -29
- package/dist/chunk-OO4ZGDRO.js.map +0 -1
- package/dist/chunk-OPSZNW3I.js.map +0 -1
- package/dist/chunk-QLWBBCI5.cjs.map +0 -1
- package/dist/chunk-T2URJAX2.js +0 -169
- package/dist/chunk-T2URJAX2.js.map +0 -1
- package/dist/chunk-T7AJBKZP.cjs.map +0 -1
- package/dist/chunk-WU6PMH5L.cjs.map +0 -1
- package/dist/chunk-XDGDCO3I.cjs.map +0 -1
- package/dist/chunk-Y2B6WDU6.cjs +0 -169
- package/dist/chunk-Y2B6WDU6.cjs.map +0 -1
- package/dist/chunk-ZMFT5XOB.js.map +0 -1
- package/dist/chunk-ZXZJSTNV.js +0 -172
- package/dist/chunk-ZXZJSTNV.js.map +0 -1
- /package/dist/{chunk-FLIWL6V4.js.map → chunk-EINXNG5D.js.map} +0 -0
- /package/dist/{chunk-GL5X6VVC.js.map → chunk-T4XXYAYY.js.map} +0 -0
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkDBJZF2OVcjs = require('../../chunk-DBJZF2OV.cjs');
|
|
11
11
|
require('../../chunk-VFKQMAUF.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkSA4ZTD3Gcjs = require('../../chunk-SA4ZTD3G.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -35,16 +35,13 @@ var _chunkW5KBDFCRcjs = require('../../chunk-W5KBDFCR.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkDEAWHNYWcjs = require('../../chunk-DEAWHNYW.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunkQ2ITV3NYcjs = require('../../chunk-Q2ITV3NY.cjs');
|
|
42
42
|
require('../../chunk-27APPAJN.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var _chunkY2B6WDU6cjs = require('../../chunk-Y2B6WDU6.cjs');
|
|
46
|
-
|
|
47
|
-
|
|
48
45
|
|
|
49
46
|
var _chunk6JINAOI7cjs = require('../../chunk-6JINAOI7.cjs');
|
|
50
47
|
require('../../chunk-PXXS27EE.cjs');
|
|
@@ -52,9 +49,13 @@ require('../../chunk-PXXS27EE.cjs');
|
|
|
52
49
|
|
|
53
50
|
|
|
54
51
|
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
var _chunkXCPBD2PGcjs = require('../../chunk-XCPBD2PG.cjs');
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
var _chunkZSUNQJROcjs = require('../../chunk-ZSUNQJRO.cjs');
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
var _chunkPC7YOZ4Icjs = require('../../chunk-PC7YOZ4I.cjs');
|
|
58
59
|
require('../../chunk-XL4V2PYG.cjs');
|
|
59
60
|
require('../../chunk-BZFW3FOF.cjs');
|
|
60
61
|
|
|
@@ -62,7 +63,6 @@ require('../../chunk-BZFW3FOF.cjs');
|
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
var _chunkG7UE6RKVcjs = require('../../chunk-G7UE6RKV.cjs');
|
|
65
|
-
require('../../chunk-722TTRIJ.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
@@ -111,7 +111,7 @@ function TicketOpenForm({
|
|
|
111
111
|
}) {
|
|
112
112
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
113
113
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
114
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
114
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkDEAWHNYWcjs.useChatAttachments.call(void 0, );
|
|
115
115
|
const trimmedSubject = subject.trim();
|
|
116
116
|
const trimmedContent = content.trim();
|
|
117
117
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -131,7 +131,7 @@ function TicketOpenForm({
|
|
|
131
131
|
clear();
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
134
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXCPBD2PGcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
135
135
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
136
136
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
137
137
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-sm", children: "Can't find what you're looking for? Submit a support ticket below \u2014 we'll follow up shortly." }),
|
|
@@ -170,7 +170,7 @@ function TicketOpenForm({
|
|
|
170
170
|
}
|
|
171
171
|
),
|
|
172
172
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
173
|
-
|
|
173
|
+
_chunkDEAWHNYWcjs.Textarea,
|
|
174
174
|
{
|
|
175
175
|
id: "ticket-content",
|
|
176
176
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -194,7 +194,7 @@ function TicketOpenForm({
|
|
|
194
194
|
)
|
|
195
195
|
] }),
|
|
196
196
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
197
|
-
|
|
197
|
+
_chunkDEAWHNYWcjs.ChatAttachmentChipStrip,
|
|
198
198
|
{
|
|
199
199
|
attachments,
|
|
200
200
|
onRemove: removeAttachment,
|
|
@@ -203,7 +203,7 @@ function TicketOpenForm({
|
|
|
203
203
|
),
|
|
204
204
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
205
205
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
206
|
-
|
|
206
|
+
_chunkDEAWHNYWcjs.ChatAttachmentAddButton,
|
|
207
207
|
{
|
|
208
208
|
attachmentsEnabled: !supportSystemDown,
|
|
209
209
|
attachmentsCount: attachments.length,
|
|
@@ -241,8 +241,9 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
241
241
|
|
|
242
242
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
243
243
|
function useTicketEngagements(externalTicketId, enabled = true, refetchInterval = false) {
|
|
244
|
-
const identity =
|
|
244
|
+
const identity = _chunkDEAWHNYWcjs.useChatIdentity.call(void 0, );
|
|
245
245
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
246
|
+
const listEngagementsEndpoint = _nullishCoalesce(_chunkPC7YOZ4Icjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
246
247
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
247
248
|
const queryEnabled = fetchable && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _4 => _4.user, 'optionalAccess', _5 => _5.email]);
|
|
248
249
|
const query = _reactquery.useQuery.call(void 0, {
|
|
@@ -261,7 +262,7 @@ function useTicketEngagements(externalTicketId, enabled = true, refetchInterval
|
|
|
261
262
|
// so polling pauses on a hidden tab.
|
|
262
263
|
refetchInterval,
|
|
263
264
|
queryFn: async () => {
|
|
264
|
-
const response = await
|
|
265
|
+
const response = await _chunkZSUNQJROcjs.embedAuthedFetch.call(void 0, listEngagementsEndpoint, {
|
|
265
266
|
method: "POST",
|
|
266
267
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
267
268
|
});
|
|
@@ -322,7 +323,7 @@ function TicketLinkedDeliveryCard({
|
|
|
322
323
|
{
|
|
323
324
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
324
325
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
325
|
-
|
|
326
|
+
_chunkDBJZF2OVcjs.DeliveryRow,
|
|
326
327
|
{
|
|
327
328
|
item,
|
|
328
329
|
href: clickup.delivery_href,
|
|
@@ -346,7 +347,7 @@ function TicketReplyComposer({
|
|
|
346
347
|
}) {
|
|
347
348
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
348
349
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
349
|
-
const attachments =
|
|
350
|
+
const attachments = _chunkDEAWHNYWcjs.useChatAttachments.call(void 0, );
|
|
350
351
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
351
352
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
352
353
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -374,7 +375,7 @@ function TicketReplyComposer({
|
|
|
374
375
|
const disabled = busy || supportSystemDown;
|
|
375
376
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
376
377
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
377
|
-
|
|
378
|
+
_chunkDEAWHNYWcjs.ChatAttachmentChipStrip,
|
|
378
379
|
{
|
|
379
380
|
attachments: attachments.attachments,
|
|
380
381
|
onRemove: attachments.removeAttachment,
|
|
@@ -383,7 +384,7 @@ function TicketReplyComposer({
|
|
|
383
384
|
}
|
|
384
385
|
),
|
|
385
386
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
386
|
-
|
|
387
|
+
_chunkDEAWHNYWcjs.ChatInput,
|
|
387
388
|
{
|
|
388
389
|
fullWidth: true,
|
|
389
390
|
autoFocus: true,
|
|
@@ -397,7 +398,7 @@ function TicketReplyComposer({
|
|
|
397
398
|
),
|
|
398
399
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
399
400
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
400
|
-
|
|
401
|
+
_chunkDEAWHNYWcjs.ChatAttachmentAddButton,
|
|
401
402
|
{
|
|
402
403
|
attachmentsEnabled: true,
|
|
403
404
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -420,13 +421,13 @@ function TicketReplyComposer({
|
|
|
420
421
|
}
|
|
421
422
|
)
|
|
422
423
|
] }),
|
|
423
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
424
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
425
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
426
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
424
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDEAWHNYWcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkDEAWHNYWcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
425
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkDEAWHNYWcjs.AlertDialogHeader, { children: [
|
|
426
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDEAWHNYWcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
427
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDEAWHNYWcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
427
428
|
] }),
|
|
428
429
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
429
|
-
|
|
430
|
+
_chunkDEAWHNYWcjs.Textarea,
|
|
430
431
|
{
|
|
431
432
|
value: resolution,
|
|
432
433
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -436,9 +437,9 @@ function TicketReplyComposer({
|
|
|
436
437
|
className: "mt-2"
|
|
437
438
|
}
|
|
438
439
|
),
|
|
439
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
440
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkDEAWHNYWcjs.AlertDialogFooter, { children: [
|
|
440
441
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
441
|
-
|
|
442
|
+
_chunkDEAWHNYWcjs.AlertDialogCancel,
|
|
442
443
|
{
|
|
443
444
|
disabled: busy,
|
|
444
445
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -446,7 +447,7 @@ function TicketReplyComposer({
|
|
|
446
447
|
}
|
|
447
448
|
),
|
|
448
449
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
449
|
-
|
|
450
|
+
_chunkDEAWHNYWcjs.AlertDialogAction,
|
|
450
451
|
{
|
|
451
452
|
onClick: () => void confirmClose(),
|
|
452
453
|
disabled: busy,
|
|
@@ -516,7 +517,7 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
516
517
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
517
518
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
518
519
|
function TicketTimelinePanel({ ticket }) {
|
|
519
|
-
const identity =
|
|
520
|
+
const identity = _chunkDEAWHNYWcjs.useChatIdentity.call(void 0, );
|
|
520
521
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
521
522
|
const { engagements, isLoading } = useTicketEngagements(
|
|
522
523
|
externalId,
|
|
@@ -536,11 +537,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
536
537
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _19 => _19.user, 'optionalAccess', _20 => _20.email]) || "You";
|
|
537
538
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.avatarUrl]), () => ( void 0)) : void 0;
|
|
538
539
|
if (isLoading) {
|
|
539
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${TICKET_FEED_FRAME} ${TICKET_FEED_HEIGHT}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: TICKET_FEED_INNER, children: Array.from({ length: TICKET_FEED_SKELETON_ROWS }, (_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
540
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${TICKET_FEED_FRAME} ${TICKET_FEED_HEIGHT}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: TICKET_FEED_INNER, children: Array.from({ length: TICKET_FEED_SKELETON_ROWS }, (_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDEAWHNYWcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
540
541
|
}
|
|
541
542
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
542
543
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
543
|
-
|
|
544
|
+
_chunkDBJZF2OVcjs.EmptyState,
|
|
544
545
|
{
|
|
545
546
|
type: "generic",
|
|
546
547
|
title: "No conversation yet",
|
|
@@ -555,7 +556,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
555
556
|
const isResolution = turn.startsWith("[Resolution]");
|
|
556
557
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
557
558
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
558
|
-
|
|
559
|
+
_chunkDEAWHNYWcjs.ChatMessageRow,
|
|
559
560
|
{
|
|
560
561
|
displayName: customerName,
|
|
561
562
|
avatarUrl: customerAvatar,
|
|
@@ -584,13 +585,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
584
585
|
}
|
|
585
586
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
586
587
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
587
|
-
|
|
588
|
+
_chunkDEAWHNYWcjs.ChatMessageRow,
|
|
588
589
|
{
|
|
589
590
|
displayName: author,
|
|
590
591
|
avatarUrl: avatarSrc,
|
|
591
|
-
timeLabel: eng.createdAt ?
|
|
592
|
+
timeLabel: eng.createdAt ? _chunkDEAWHNYWcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
592
593
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
593
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
594
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDEAWHNYWcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
594
595
|
},
|
|
595
596
|
eng.id
|
|
596
597
|
);
|
|
@@ -678,7 +679,7 @@ function AssignedAgentRow({
|
|
|
678
679
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary uppercase tracking-wider font-medium", children: "Assigned to" }),
|
|
679
680
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
680
681
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
681
|
-
|
|
682
|
+
_chunkXCPBD2PGcjs.SquareAvatar,
|
|
682
683
|
{
|
|
683
684
|
size: "sm",
|
|
684
685
|
variant: "round",
|
|
@@ -709,7 +710,7 @@ function TicketRow({
|
|
|
709
710
|
const rowRef = _react.useRef.call(void 0, null);
|
|
710
711
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
711
712
|
onToggle(ticket.id);
|
|
712
|
-
|
|
713
|
+
_chunkDEAWHNYWcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
713
714
|
adjustTargetY: (raw) => {
|
|
714
715
|
if (!rowRef.current) return raw;
|
|
715
716
|
const expandedDrawer = document.querySelector(
|
|
@@ -735,7 +736,7 @@ function TicketRow({
|
|
|
735
736
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
736
737
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
737
738
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
738
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
739
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkDEAWHNYWcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
739
740
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
740
741
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
741
742
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -750,7 +751,7 @@ function TicketRow({
|
|
|
750
751
|
className: "border-b border-ods-border last:border-b-0",
|
|
751
752
|
children: [
|
|
752
753
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
753
|
-
|
|
754
|
+
_chunkDEAWHNYWcjs.ChatTicketItem,
|
|
754
755
|
{
|
|
755
756
|
ticket: tileData,
|
|
756
757
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -787,6 +788,7 @@ function TicketRow({
|
|
|
787
788
|
var FIND_TICKET_ENDPOINT = "/api/chat/agent/find-ticket";
|
|
788
789
|
var DEFAULT_PAGE_SIZE = 20;
|
|
789
790
|
function useTicketsList(filters) {
|
|
791
|
+
const findTicketEndpoint = _nullishCoalesce(_chunkPC7YOZ4Icjs.useRequiredChatRuntime.call(void 0, ).endpoints.findTicketUrl, () => ( FIND_TICKET_ENDPOINT));
|
|
790
792
|
const customerEmail = filters.customerEmail;
|
|
791
793
|
const search = (_nullishCoalesce(filters.search, () => ( ""))).trim();
|
|
792
794
|
const status = (_nullishCoalesce(filters.status, () => ( ""))).trim().toLowerCase();
|
|
@@ -819,7 +821,7 @@ function useTicketsList(filters) {
|
|
|
819
821
|
pageSize
|
|
820
822
|
};
|
|
821
823
|
if (statusFilter) body.status = statusFilter;
|
|
822
|
-
const response = await
|
|
824
|
+
const response = await _chunkZSUNQJROcjs.embedAuthedFetch.call(void 0, findTicketEndpoint, {
|
|
823
825
|
method: "POST",
|
|
824
826
|
body: JSON.stringify(body)
|
|
825
827
|
});
|
|
@@ -885,6 +887,7 @@ var REPLY_BANNER_CODES = /* @__PURE__ */ new Set([
|
|
|
885
887
|
var MIRROR_SYNC_BACKOFF_MS = [3e3, 6e3, 12e3];
|
|
886
888
|
function useTicketActions(options) {
|
|
887
889
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
890
|
+
const ticketActionEndpoint = _nullishCoalesce(_chunkPC7YOZ4Icjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
888
891
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
889
892
|
const formInFlightRef = _react.useRef.call(void 0, false);
|
|
890
893
|
const [isSubmittingForm, setIsSubmittingForm] = _react.useState.call(void 0, false);
|
|
@@ -933,7 +936,7 @@ function useTicketActions(options) {
|
|
|
933
936
|
}, []);
|
|
934
937
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
935
938
|
async (toolName, args) => {
|
|
936
|
-
const res = await
|
|
939
|
+
const res = await _chunkZSUNQJROcjs.embedAuthedFetch.call(void 0, ticketActionEndpoint, {
|
|
937
940
|
method: "POST",
|
|
938
941
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
939
942
|
});
|
|
@@ -945,7 +948,7 @@ function useTicketActions(options) {
|
|
|
945
948
|
}
|
|
946
949
|
return body;
|
|
947
950
|
},
|
|
948
|
-
[]
|
|
951
|
+
[ticketActionEndpoint]
|
|
949
952
|
);
|
|
950
953
|
const watchMirrorSync = _react.useCallback.call(void 0,
|
|
951
954
|
(placeholderId, expectedTicketId) => {
|
|
@@ -1317,14 +1320,14 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1317
1320
|
|
|
1318
1321
|
// src/components/tickets/ticket-center.tsx
|
|
1319
1322
|
|
|
1320
|
-
function TicketCenter({ toast: toast2 =
|
|
1321
|
-
const identity =
|
|
1323
|
+
function TicketCenter({ toast: toast2 = _chunkQ2ITV3NYcjs.toast } = {}) {
|
|
1324
|
+
const identity = _chunkDEAWHNYWcjs.useChatIdentity.call(void 0, );
|
|
1322
1325
|
if (identity.isLoading) {
|
|
1323
1326
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1324
1327
|
}
|
|
1325
1328
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email])) {
|
|
1326
1329
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1327
|
-
|
|
1330
|
+
_chunkDBJZF2OVcjs.EmptyState,
|
|
1328
1331
|
{
|
|
1329
1332
|
type: "generic",
|
|
1330
1333
|
title: "Sign in to manage tickets",
|
|
@@ -1395,7 +1398,7 @@ function TicketCenterAuthed({
|
|
|
1395
1398
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1396
1399
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1397
1400
|
"Updated ",
|
|
1398
|
-
|
|
1401
|
+
_chunkDEAWHNYWcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1399
1402
|
] }),
|
|
1400
1403
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1401
1404
|
_chunkN5UOJC3Vcjs.Button,
|
|
@@ -1411,15 +1414,15 @@ function TicketCenterAuthed({
|
|
|
1411
1414
|
)
|
|
1412
1415
|
] })
|
|
1413
1416
|
] }),
|
|
1414
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1415
|
-
|
|
1417
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXCPBD2PGcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1418
|
+
_chunkDBJZF2OVcjs.EmptyState,
|
|
1416
1419
|
{
|
|
1417
1420
|
type: "generic",
|
|
1418
1421
|
title: "No tickets yet",
|
|
1419
1422
|
description: "Open one above to start the conversation.",
|
|
1420
1423
|
showCTA: false
|
|
1421
1424
|
}
|
|
1422
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1425
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXCPBD2PGcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1423
1426
|
TicketRow,
|
|
1424
1427
|
{
|
|
1425
1428
|
ticket,
|
|
@@ -1439,7 +1442,7 @@ function TicketCenterAuthed({
|
|
|
1439
1442
|
}
|
|
1440
1443
|
function TicketCenterSkeleton() {
|
|
1441
1444
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1442
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1445
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkXCPBD2PGcjs.Card, { className: "p-6", children: [
|
|
1443
1446
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1444
1447
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1445
1448
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1448,7 +1451,7 @@ function TicketCenterSkeleton() {
|
|
|
1448
1451
|
] });
|
|
1449
1452
|
}
|
|
1450
1453
|
function TicketListSkeleton() {
|
|
1451
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1454
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXCPBD2PGcjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "h-20 px-4 flex items-center gap-4 border-b border-ods-border last:border-b-0", children: [
|
|
1452
1455
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1453
1456
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1454
1457
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1461,7 +1464,7 @@ function TicketListSkeleton() {
|
|
|
1461
1464
|
// src/components/tickets/help-center-list.tsx
|
|
1462
1465
|
|
|
1463
1466
|
|
|
1464
|
-
|
|
1467
|
+
_chunkDBJZF2OVcjs.init_unified_pagination.call(void 0, );
|
|
1465
1468
|
|
|
1466
1469
|
// src/components/tickets/help-center-card.tsx
|
|
1467
1470
|
|
|
@@ -1483,7 +1486,7 @@ function HelpCenterCard({
|
|
|
1483
1486
|
const optimistic = isOptimistic(ticket);
|
|
1484
1487
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1485
1488
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1486
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1489
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkDEAWHNYWcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1487
1490
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1488
1491
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1489
1492
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1496,7 +1499,7 @@ function HelpCenterCard({
|
|
|
1496
1499
|
_react.useEffect.call(void 0, () => {
|
|
1497
1500
|
if (!isExpanded) return;
|
|
1498
1501
|
const raf = requestAnimationFrame(() => {
|
|
1499
|
-
|
|
1502
|
+
_chunkDEAWHNYWcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1500
1503
|
headerOffset: STICKY_HEADER_OFFSET_PX
|
|
1501
1504
|
});
|
|
1502
1505
|
});
|
|
@@ -1504,16 +1507,16 @@ function HelpCenterCard({
|
|
|
1504
1507
|
}, [isExpanded]);
|
|
1505
1508
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1506
1509
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1507
|
-
|
|
1510
|
+
_chunkXCPBD2PGcjs.StatusBadge,
|
|
1508
1511
|
{
|
|
1509
1512
|
text: rawStatus,
|
|
1510
|
-
colorScheme:
|
|
1513
|
+
colorScheme: _chunkDEAWHNYWcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1511
1514
|
variant: "card",
|
|
1512
1515
|
className: "border border-ods-border"
|
|
1513
1516
|
}
|
|
1514
1517
|
),
|
|
1515
1518
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1516
|
-
|
|
1519
|
+
_chunkXCPBD2PGcjs.StatusBadge,
|
|
1517
1520
|
{
|
|
1518
1521
|
text: priority,
|
|
1519
1522
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1540,7 +1543,7 @@ function HelpCenterCard({
|
|
|
1540
1543
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1541
1544
|
className: "w-full text-left p-[12px] md:p-[16px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent focus-visible:ring-inset disabled:cursor-default",
|
|
1542
1545
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1543
|
-
|
|
1546
|
+
_chunkDBJZF2OVcjs.DevCardRowContent,
|
|
1544
1547
|
{
|
|
1545
1548
|
title,
|
|
1546
1549
|
subtitle,
|
|
@@ -1615,7 +1618,7 @@ function HelpCenterCreateForm({
|
|
|
1615
1618
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1616
1619
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1617
1620
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1618
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1621
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkDEAWHNYWcjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1619
1622
|
"Subject",
|
|
1620
1623
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1621
1624
|
] }),
|
|
@@ -1647,7 +1650,7 @@ function HelpCenterCreateForm({
|
|
|
1647
1650
|
)
|
|
1648
1651
|
] });
|
|
1649
1652
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1650
|
-
|
|
1653
|
+
_chunkSA4ZTD3Gcjs.ContactForm,
|
|
1651
1654
|
{
|
|
1652
1655
|
title: "Open a new ticket",
|
|
1653
1656
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1684,8 +1687,8 @@ function HelpCenterCreateForm({
|
|
|
1684
1687
|
|
|
1685
1688
|
// src/components/tickets/help-center-list.tsx
|
|
1686
1689
|
|
|
1687
|
-
function HelpCenterList({ toast: toast2 =
|
|
1688
|
-
const identity =
|
|
1690
|
+
function HelpCenterList({ toast: toast2 = _chunkQ2ITV3NYcjs.toast, backButton } = {}) {
|
|
1691
|
+
const identity = _chunkDEAWHNYWcjs.useChatIdentity.call(void 0, );
|
|
1689
1692
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1690
1693
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1691
1694
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1695,11 +1698,11 @@ function HelpCenterList({ toast: toast2 = _chunkQLWBBCI5cjs.toast } = {}) {
|
|
|
1695
1698
|
const rawPage = Number(searchParams.get("page"));
|
|
1696
1699
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1697
1700
|
if (identity.isLoading) {
|
|
1698
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1701
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBJZF2OVcjs.DevSectionPage, { sectionKey: "tickets", backButton, preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBJZF2OVcjs.DevCardRowSkeletonList, {}) });
|
|
1699
1702
|
}
|
|
1700
1703
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _60 => _60.user, 'optionalAccess', _61 => _61.email])) {
|
|
1701
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1702
|
-
|
|
1704
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBJZF2OVcjs.DevSectionPage, { sectionKey: "tickets", backButton, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1705
|
+
_chunkDBJZF2OVcjs.EmptyState,
|
|
1703
1706
|
{
|
|
1704
1707
|
type: "generic",
|
|
1705
1708
|
title: "Sign in to manage tickets",
|
|
@@ -1722,7 +1725,8 @@ function HelpCenterList({ toast: toast2 = _chunkQLWBBCI5cjs.toast } = {}) {
|
|
|
1722
1725
|
pathname,
|
|
1723
1726
|
toast: toast2,
|
|
1724
1727
|
sessionName,
|
|
1725
|
-
sessionEmail
|
|
1728
|
+
sessionEmail,
|
|
1729
|
+
backButton
|
|
1726
1730
|
}
|
|
1727
1731
|
);
|
|
1728
1732
|
}
|
|
@@ -1736,7 +1740,8 @@ function HelpCenterListAuthed({
|
|
|
1736
1740
|
pathname,
|
|
1737
1741
|
toast: toast2,
|
|
1738
1742
|
sessionName,
|
|
1739
|
-
sessionEmail
|
|
1743
|
+
sessionEmail,
|
|
1744
|
+
backButton
|
|
1740
1745
|
}) {
|
|
1741
1746
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
1742
1747
|
const [optimisticTickets, setOptimisticTickets] = _react.useState.call(void 0, []);
|
|
@@ -1824,15 +1829,15 @@ function HelpCenterListAuthed({
|
|
|
1824
1829
|
] }),
|
|
1825
1830
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN5UOJC3Vcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1826
1831
|
] }),
|
|
1827
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1832
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBJZF2OVcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1828
1833
|
// Bridge state — background refetch in flight and the
|
|
1829
1834
|
// optimistic placeholder was just removed by the mutation
|
|
1830
1835
|
// callback. Without this branch "No tickets yet" would flash
|
|
1831
1836
|
// for ~50ms between `removeOptimistic` and the server
|
|
1832
1837
|
// response landing.
|
|
1833
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1838
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBJZF2OVcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1834
1839
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1835
|
-
|
|
1840
|
+
_chunkDBJZF2OVcjs.EmptyState,
|
|
1836
1841
|
{
|
|
1837
1842
|
type: "search",
|
|
1838
1843
|
title: "No tickets found",
|
|
@@ -1847,7 +1852,7 @@ function HelpCenterListAuthed({
|
|
|
1847
1852
|
}
|
|
1848
1853
|
}
|
|
1849
1854
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1850
|
-
|
|
1855
|
+
_chunkDBJZF2OVcjs.EmptyState,
|
|
1851
1856
|
{
|
|
1852
1857
|
type: "generic",
|
|
1853
1858
|
title: "No tickets yet",
|
|
@@ -1881,9 +1886,9 @@ function HelpCenterListAuthed({
|
|
|
1881
1886
|
ticket.id
|
|
1882
1887
|
)) })
|
|
1883
1888
|
) }),
|
|
1884
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1889
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBJZF2OVcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1885
1890
|
] });
|
|
1886
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1891
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBJZF2OVcjs.DevSectionPage, { sectionKey: "tickets", backButton, preControls: form, children: body });
|
|
1887
1892
|
}
|
|
1888
1893
|
|
|
1889
1894
|
|