@flamingo-stack/openframe-frontend-core 0.0.292 → 0.0.293-snapshot.20260619104458
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-6FHO73AP.js → chunk-26PKDALD.js} +7 -79
- package/dist/chunk-26PKDALD.js.map +1 -0
- package/dist/{chunk-OXOTKEYY.cjs → chunk-4W7NYJ3B.cjs} +23 -23
- package/dist/{chunk-OXOTKEYY.cjs.map → chunk-4W7NYJ3B.cjs.map} +1 -1
- package/dist/{chunk-KBKZYJRI.cjs → chunk-5E2HOSSH.cjs} +66 -19
- package/dist/chunk-5E2HOSSH.cjs.map +1 -0
- package/dist/{chunk-CUQH4SHH.js → chunk-6GCI7JOE.js} +2 -2
- package/dist/{chunk-2NJ44RTT.cjs → chunk-6LUVYHKD.cjs} +30 -30
- package/dist/{chunk-2NJ44RTT.cjs.map → chunk-6LUVYHKD.cjs.map} +1 -1
- package/dist/{chunk-E2YXRSDG.js → chunk-6SG25O2N.js} +15 -13
- package/dist/chunk-6SG25O2N.js.map +1 -0
- package/dist/{chunk-CDJOKNCS.cjs → chunk-73QT66LJ.cjs} +25 -19
- package/dist/chunk-73QT66LJ.cjs.map +1 -0
- package/dist/{chunk-N6ZM5PYZ.js → chunk-7RIYT7ZH.js} +49 -2
- package/dist/chunk-7RIYT7ZH.js.map +1 -0
- package/dist/{chunk-FFP2A77V.cjs → chunk-AFKRDSRS.cjs} +12 -12
- package/dist/{chunk-FFP2A77V.cjs.map → chunk-AFKRDSRS.cjs.map} +1 -1
- package/dist/{chunk-PZZGDS5I.cjs → chunk-B4T3RTFX.cjs} +24 -22
- package/dist/chunk-B4T3RTFX.cjs.map +1 -0
- package/dist/{chunk-5R5OODNE.cjs → chunk-CLWQ7MHW.cjs} +40 -40
- package/dist/{chunk-5R5OODNE.cjs.map → chunk-CLWQ7MHW.cjs.map} +1 -1
- package/dist/{chunk-C667P6LZ.js → chunk-DEBURY5R.js} +13 -7
- package/dist/{chunk-C667P6LZ.js.map → chunk-DEBURY5R.js.map} +1 -1
- package/dist/{chunk-HTYUZXQP.js → chunk-E24HKKIE.js} +5 -5
- package/dist/{chunk-VK4B6UGU.js → chunk-E4XABBSU.js} +16 -8
- package/dist/{chunk-VK4B6UGU.js.map → chunk-E4XABBSU.js.map} +1 -1
- package/dist/{chunk-DUIWR7RQ.js → chunk-EJXHZX2E.js} +3 -3
- package/dist/{chunk-5PELVUFT.cjs → chunk-EYEW6PTA.cjs} +44 -36
- package/dist/chunk-EYEW6PTA.cjs.map +1 -0
- package/dist/{chunk-SLP4KXP6.js → chunk-FQJK446R.js} +8 -2
- package/dist/chunk-FQJK446R.js.map +1 -0
- package/dist/{chunk-JC5RN7ZS.cjs → chunk-FT4FCV7L.cjs} +6 -6
- package/dist/{chunk-JC5RN7ZS.cjs.map → chunk-FT4FCV7L.cjs.map} +1 -1
- package/dist/{chunk-ZHNL2IPK.cjs → chunk-J54Z3OCR.cjs} +8 -2
- package/dist/chunk-J54Z3OCR.cjs.map +1 -0
- package/dist/{chunk-Z6BK4XHH.cjs → chunk-KXCRGTRN.cjs} +10 -82
- package/dist/chunk-KXCRGTRN.cjs.map +1 -0
- package/dist/{chunk-5KD3S25X.cjs → chunk-LFGGF7OT.cjs} +139 -2
- package/dist/chunk-LFGGF7OT.cjs.map +1 -0
- package/dist/{chunk-N45M3TK3.js → chunk-NSPOYUBH.js} +2 -2
- package/dist/{chunk-TYZEMPPH.js → chunk-OQ6X7ZOC.js} +138 -1
- package/dist/chunk-OQ6X7ZOC.js.map +1 -0
- package/dist/{chunk-B2U6INNO.js → chunk-QFG4G62D.js} +4 -4
- package/dist/{chunk-IXDTNQF4.js → chunk-RT6DJB3C.js} +4 -4
- package/dist/{chunk-MDLWEJAV.cjs → chunk-V6YZGLHZ.cjs} +454 -459
- package/dist/chunk-V6YZGLHZ.cjs.map +1 -0
- package/dist/{chunk-2BMVBPC7.cjs → chunk-YIGPRLQY.cjs} +9 -9
- package/dist/{chunk-2BMVBPC7.cjs.map → chunk-YIGPRLQY.cjs.map} +1 -1
- package/dist/{chunk-5FK7X3EE.js → chunk-ZYZWD7LS.js} +9 -14
- package/dist/chunk-ZYZWD7LS.js.map +1 -0
- package/dist/components/chat/entity-cards/roadmap-card.d.ts +7 -1
- package/dist/components/chat/entity-cards/roadmap-card.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +0 -5
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-realtime-chunk-processor.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +7 -7
- package/dist/components/chat/index.js +6 -6
- package/dist/components/chat/types/api.types.d.ts +0 -6
- package/dist/components/chat/types/api.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +8 -8
- package/dist/components/contact/index.js +7 -7
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/docs/use-document-tree.d.ts.map +1 -1
- package/dist/components/embeds/index.cjs +8 -8
- package/dist/components/embeds/index.js +7 -7
- package/dist/components/faq/faq-section.d.ts.map +1 -1
- package/dist/components/faq/index.cjs +8 -8
- package/dist/components/faq/index.js +7 -7
- package/dist/components/features/index.cjs +7 -7
- package/dist/components/features/index.js +6 -6
- package/dist/components/index.cjs +214 -193
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +50 -29
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/navigation/index.js +6 -6
- package/dist/components/onboarding-guides/index.cjs +24 -24
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +8 -8
- package/dist/components/related-content/index.js +7 -7
- package/dist/components/shared/delivery/delivery-lists.d.ts.map +1 -1
- package/dist/components/shared/delivery/delivery-row.d.ts +8 -1
- package/dist/components/shared/delivery/delivery-row.d.ts.map +1 -1
- package/dist/components/shared/delivery/delivery-table.d.ts.map +1 -1
- package/dist/components/shared/roadmap/roadmap-grid.d.ts.map +1 -1
- package/dist/components/shared/roadmap/roadmap-view.d.ts.map +1 -1
- package/dist/components/tickets/help-center-card.d.ts +7 -1
- package/dist/components/tickets/help-center-card.d.ts.map +1 -1
- package/dist/components/tickets/help-center-list.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +82 -73
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +24 -15
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/tickets/ticket-center.d.ts.map +1 -1
- package/dist/components/tickets/ticket-row.d.ts +6 -1
- package/dist/components/tickets/ticket-row.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +7 -7
- package/dist/components/ui/index.js +6 -6
- package/dist/hooks/index.cjs +5 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/use-scroll-to-hash.d.ts +17 -0
- package/dist/hooks/use-scroll-to-hash.d.ts.map +1 -0
- package/dist/index.cjs +19 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -7
- package/dist/utils/dev-sections/dev-section-param-keys.d.ts +10 -0
- package/dist/utils/dev-sections/dev-section-param-keys.d.ts.map +1 -1
- package/dist/utils/index.cjs +71 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +67 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/same-page-hash-nav.d.ts +37 -0
- package/dist/utils/same-page-hash-nav.d.ts.map +1 -0
- package/dist/utils/source-icons.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/entity-cards/roadmap-card.tsx +8 -1
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +0 -8
- package/src/components/chat/hooks/use-realtime-chunk-processor.ts +1 -12
- package/src/components/chat/types/api.types.ts +0 -6
- package/src/components/docs/use-document-tree.ts +45 -3
- package/src/components/faq/faq-section.tsx +22 -9
- package/src/components/shared/delivery/delivery-lists.tsx +9 -0
- package/src/components/shared/delivery/delivery-row.tsx +15 -2
- package/src/components/shared/delivery/delivery-table.tsx +7 -1
- package/src/components/shared/roadmap/roadmap-grid.tsx +7 -0
- package/src/components/shared/roadmap/roadmap-view.tsx +11 -0
- package/src/components/tickets/help-center-card.tsx +9 -17
- package/src/components/tickets/help-center-list.tsx +13 -0
- package/src/components/tickets/ticket-center.tsx +2 -0
- package/src/components/tickets/ticket-row.tsx +7 -1
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-scroll-to-hash.ts +74 -0
- package/src/utils/.source-icons.md +1 -1
- package/src/utils/dev-sections/dev-section-param-keys.ts +14 -0
- package/src/utils/index.ts +17 -1
- package/src/utils/same-page-hash-nav.ts +115 -0
- package/src/utils/source-icons.ts +7 -1
- package/dist/chunk-5FK7X3EE.js.map +0 -1
- package/dist/chunk-5KD3S25X.cjs.map +0 -1
- package/dist/chunk-5PELVUFT.cjs.map +0 -1
- package/dist/chunk-6FHO73AP.js.map +0 -1
- package/dist/chunk-CDJOKNCS.cjs.map +0 -1
- package/dist/chunk-E2YXRSDG.js.map +0 -1
- package/dist/chunk-KBKZYJRI.cjs.map +0 -1
- package/dist/chunk-MDLWEJAV.cjs.map +0 -1
- package/dist/chunk-N6ZM5PYZ.js.map +0 -1
- package/dist/chunk-PZZGDS5I.cjs.map +0 -1
- package/dist/chunk-SLP4KXP6.js.map +0 -1
- package/dist/chunk-TYZEMPPH.js.map +0 -1
- package/dist/chunk-Z6BK4XHH.cjs.map +0 -1
- package/dist/chunk-ZHNL2IPK.cjs.map +0 -1
- /package/dist/{chunk-CUQH4SHH.js.map → chunk-6GCI7JOE.js.map} +0 -0
- /package/dist/{chunk-HTYUZXQP.js.map → chunk-E24HKKIE.js.map} +0 -0
- /package/dist/{chunk-DUIWR7RQ.js.map → chunk-EJXHZX2E.js.map} +0 -0
- /package/dist/{chunk-N45M3TK3.js.map → chunk-NSPOYUBH.js.map} +0 -0
- /package/dist/{chunk-B2U6INNO.js.map → chunk-QFG4G62D.js.map} +0 -0
- /package/dist/{chunk-IXDTNQF4.js.map → chunk-RT6DJB3C.js.map} +0 -0
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk73QT66LJcjs = require('../../chunk-73QT66LJ.cjs');
|
|
11
11
|
require('../../chunk-VFKQMAUF.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk6LUVYHKDcjs = require('../../chunk-6LUVYHKD.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -32,16 +32,20 @@ var _chunk2NJ44RTTcjs = require('../../chunk-2NJ44RTT.cjs');
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _chunkV6YZGLHZcjs = require('../../chunk-V6YZGLHZ.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkKXCRGTRNcjs = require('../../chunk-KXCRGTRN.cjs');
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
require('../../chunk-
|
|
43
|
+
|
|
44
|
+
var _chunk5E2HOSSHcjs = require('../../chunk-5E2HOSSH.cjs');
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
var _chunkLFGGF7OTcjs = require('../../chunk-LFGGF7OT.cjs');
|
|
45
49
|
require('../../chunk-27APPAJN.cjs');
|
|
46
50
|
|
|
47
51
|
|
|
@@ -52,8 +56,8 @@ require('../../chunk-PXXS27EE.cjs');
|
|
|
52
56
|
|
|
53
57
|
|
|
54
58
|
|
|
55
|
-
var
|
|
56
|
-
require('../../chunk-
|
|
59
|
+
var _chunk4W7NYJ3Bcjs = require('../../chunk-4W7NYJ3B.cjs');
|
|
60
|
+
require('../../chunk-J54Z3OCR.cjs');
|
|
57
61
|
require('../../chunk-TFSYSWPS.cjs');
|
|
58
62
|
|
|
59
63
|
|
|
@@ -116,7 +120,7 @@ function TicketOpenForm({
|
|
|
116
120
|
}) {
|
|
117
121
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
118
122
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
119
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
123
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkV6YZGLHZcjs.useChatAttachments.call(void 0, );
|
|
120
124
|
const trimmedSubject = subject.trim();
|
|
121
125
|
const trimmedContent = content.trim();
|
|
122
126
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -136,7 +140,7 @@ function TicketOpenForm({
|
|
|
136
140
|
clear();
|
|
137
141
|
}
|
|
138
142
|
};
|
|
139
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
143
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4W7NYJ3Bcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
140
144
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
141
145
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
142
146
|
/* @__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." }),
|
|
@@ -175,7 +179,7 @@ function TicketOpenForm({
|
|
|
175
179
|
}
|
|
176
180
|
),
|
|
177
181
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
178
|
-
|
|
182
|
+
_chunkV6YZGLHZcjs.Textarea,
|
|
179
183
|
{
|
|
180
184
|
id: "ticket-content",
|
|
181
185
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -199,7 +203,7 @@ function TicketOpenForm({
|
|
|
199
203
|
)
|
|
200
204
|
] }),
|
|
201
205
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
202
|
-
|
|
206
|
+
_chunkV6YZGLHZcjs.ChatAttachmentChipStrip,
|
|
203
207
|
{
|
|
204
208
|
attachments,
|
|
205
209
|
onRemove: removeAttachment,
|
|
@@ -208,7 +212,7 @@ function TicketOpenForm({
|
|
|
208
212
|
),
|
|
209
213
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
210
214
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
211
|
-
|
|
215
|
+
_chunkV6YZGLHZcjs.ChatAttachmentAddButton,
|
|
212
216
|
{
|
|
213
217
|
attachmentsEnabled: !supportSystemDown,
|
|
214
218
|
attachmentsCount: attachments.length,
|
|
@@ -246,7 +250,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
246
250
|
|
|
247
251
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
248
252
|
function useTicketEngagements(externalTicketId, enabled = true, refetchInterval = false) {
|
|
249
|
-
const identity =
|
|
253
|
+
const identity = _chunkV6YZGLHZcjs.useChatIdentity.call(void 0, );
|
|
250
254
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
251
255
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkAQOWFSMBcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
252
256
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -328,7 +332,7 @@ function TicketLinkedDeliveryCard({
|
|
|
328
332
|
{
|
|
329
333
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
330
334
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
331
|
-
|
|
335
|
+
_chunk73QT66LJcjs.DeliveryRow,
|
|
332
336
|
{
|
|
333
337
|
item,
|
|
334
338
|
href: clickup.delivery_href,
|
|
@@ -352,7 +356,7 @@ function TicketReplyComposer({
|
|
|
352
356
|
}) {
|
|
353
357
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
354
358
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
355
|
-
const attachments =
|
|
359
|
+
const attachments = _chunkV6YZGLHZcjs.useChatAttachments.call(void 0, );
|
|
356
360
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
357
361
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
358
362
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -380,7 +384,7 @@ function TicketReplyComposer({
|
|
|
380
384
|
const disabled = busy || supportSystemDown;
|
|
381
385
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
382
386
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
383
|
-
|
|
387
|
+
_chunkV6YZGLHZcjs.ChatAttachmentChipStrip,
|
|
384
388
|
{
|
|
385
389
|
attachments: attachments.attachments,
|
|
386
390
|
onRemove: attachments.removeAttachment,
|
|
@@ -389,7 +393,7 @@ function TicketReplyComposer({
|
|
|
389
393
|
}
|
|
390
394
|
),
|
|
391
395
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
392
|
-
|
|
396
|
+
_chunkV6YZGLHZcjs.ChatInput,
|
|
393
397
|
{
|
|
394
398
|
fullWidth: true,
|
|
395
399
|
autoFocus: true,
|
|
@@ -403,7 +407,7 @@ function TicketReplyComposer({
|
|
|
403
407
|
),
|
|
404
408
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
405
409
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
406
|
-
|
|
410
|
+
_chunkV6YZGLHZcjs.ChatAttachmentAddButton,
|
|
407
411
|
{
|
|
408
412
|
attachmentsEnabled: true,
|
|
409
413
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -426,13 +430,13 @@ function TicketReplyComposer({
|
|
|
426
430
|
}
|
|
427
431
|
)
|
|
428
432
|
] }),
|
|
429
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
430
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
431
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
432
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
433
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkV6YZGLHZcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkV6YZGLHZcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
434
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkV6YZGLHZcjs.AlertDialogHeader, { children: [
|
|
435
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkV6YZGLHZcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
436
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkV6YZGLHZcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
433
437
|
] }),
|
|
434
438
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
435
|
-
|
|
439
|
+
_chunkV6YZGLHZcjs.Textarea,
|
|
436
440
|
{
|
|
437
441
|
value: resolution,
|
|
438
442
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -442,9 +446,9 @@ function TicketReplyComposer({
|
|
|
442
446
|
className: "mt-2"
|
|
443
447
|
}
|
|
444
448
|
),
|
|
445
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
449
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkV6YZGLHZcjs.AlertDialogFooter, { children: [
|
|
446
450
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
447
|
-
|
|
451
|
+
_chunkV6YZGLHZcjs.AlertDialogCancel,
|
|
448
452
|
{
|
|
449
453
|
disabled: busy,
|
|
450
454
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -452,7 +456,7 @@ function TicketReplyComposer({
|
|
|
452
456
|
}
|
|
453
457
|
),
|
|
454
458
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
455
|
-
|
|
459
|
+
_chunkV6YZGLHZcjs.AlertDialogAction,
|
|
456
460
|
{
|
|
457
461
|
onClick: () => void confirmClose(),
|
|
458
462
|
disabled: busy,
|
|
@@ -522,7 +526,7 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
522
526
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
523
527
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
524
528
|
function TicketTimelinePanel({ ticket }) {
|
|
525
|
-
const identity =
|
|
529
|
+
const identity = _chunkV6YZGLHZcjs.useChatIdentity.call(void 0, );
|
|
526
530
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
527
531
|
const { engagements, isLoading } = useTicketEngagements(
|
|
528
532
|
externalId,
|
|
@@ -542,11 +546,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
542
546
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _19 => _19.user, 'optionalAccess', _20 => _20.email]) || "You";
|
|
543
547
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.avatarUrl]), () => ( void 0)) : void 0;
|
|
544
548
|
if (isLoading) {
|
|
545
|
-
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,
|
|
549
|
+
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, _chunkV6YZGLHZcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
546
550
|
}
|
|
547
551
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
548
552
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
549
|
-
|
|
553
|
+
_chunk73QT66LJcjs.EmptyState,
|
|
550
554
|
{
|
|
551
555
|
type: "generic",
|
|
552
556
|
title: "No conversation yet",
|
|
@@ -561,7 +565,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
561
565
|
const isResolution = turn.startsWith("[Resolution]");
|
|
562
566
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
563
567
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
564
|
-
|
|
568
|
+
_chunkV6YZGLHZcjs.ChatMessageRow,
|
|
565
569
|
{
|
|
566
570
|
displayName: customerName,
|
|
567
571
|
avatarUrl: customerAvatar,
|
|
@@ -590,13 +594,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
590
594
|
}
|
|
591
595
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
592
596
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
593
|
-
|
|
597
|
+
_chunkV6YZGLHZcjs.ChatMessageRow,
|
|
594
598
|
{
|
|
595
599
|
displayName: author,
|
|
596
600
|
avatarUrl: avatarSrc,
|
|
597
|
-
timeLabel: eng.createdAt ?
|
|
601
|
+
timeLabel: eng.createdAt ? _chunkKXCRGTRNcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
598
602
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
599
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
603
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkV6YZGLHZcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
600
604
|
},
|
|
601
605
|
eng.id
|
|
602
606
|
);
|
|
@@ -684,7 +688,7 @@ function AssignedAgentRow({
|
|
|
684
688
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary uppercase tracking-wider font-medium", children: "Assigned to" }),
|
|
685
689
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
686
690
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
687
|
-
|
|
691
|
+
_chunk4W7NYJ3Bcjs.SquareAvatar,
|
|
688
692
|
{
|
|
689
693
|
size: "sm",
|
|
690
694
|
variant: "round",
|
|
@@ -709,13 +713,14 @@ function TicketRow({
|
|
|
709
713
|
onSendMessage,
|
|
710
714
|
onClose,
|
|
711
715
|
onReopen,
|
|
712
|
-
onActionCollapsed
|
|
716
|
+
onActionCollapsed,
|
|
717
|
+
id
|
|
713
718
|
}) {
|
|
714
719
|
const optimistic = isOptimistic(ticket);
|
|
715
720
|
const rowRef = _react.useRef.call(void 0, null);
|
|
716
721
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
717
722
|
onToggle(ticket.id);
|
|
718
|
-
|
|
723
|
+
_chunkLFGGF7OTcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
719
724
|
adjustTargetY: (raw) => {
|
|
720
725
|
if (!rowRef.current) return raw;
|
|
721
726
|
const expandedDrawer = document.querySelector(
|
|
@@ -741,7 +746,7 @@ function TicketRow({
|
|
|
741
746
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
742
747
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
743
748
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
744
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
749
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkKXCRGTRNcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
745
750
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
746
751
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
747
752
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -749,14 +754,14 @@ function TicketRow({
|
|
|
749
754
|
// when the task exists but its status hasn't synced yet.
|
|
750
755
|
linkedTaskLabel: ticket.clickup ? ticket.clickup.status ? ticket.clickup.status.replace(/\b\w/g, (c) => c.toUpperCase()) : "Linked work" : void 0
|
|
751
756
|
};
|
|
752
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: rowRef, className: "scroll-mt-24", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
757
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: rowRef, id, className: "scroll-mt-24", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
753
758
|
Collapsible,
|
|
754
759
|
{
|
|
755
760
|
open: expanded && !optimistic,
|
|
756
761
|
className: "border-b border-ods-border last:border-b-0",
|
|
757
762
|
children: [
|
|
758
763
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
759
|
-
|
|
764
|
+
_chunkV6YZGLHZcjs.ChatTicketItem,
|
|
760
765
|
{
|
|
761
766
|
ticket: tileData,
|
|
762
767
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1325,14 +1330,14 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1325
1330
|
|
|
1326
1331
|
// src/components/tickets/ticket-center.tsx
|
|
1327
1332
|
|
|
1328
|
-
function TicketCenter({ toast: toast2 =
|
|
1329
|
-
const identity =
|
|
1333
|
+
function TicketCenter({ toast: toast2 = _chunk5E2HOSSHcjs.toast } = {}) {
|
|
1334
|
+
const identity = _chunkV6YZGLHZcjs.useChatIdentity.call(void 0, );
|
|
1330
1335
|
if (identity.isLoading) {
|
|
1331
1336
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1332
1337
|
}
|
|
1333
1338
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email])) {
|
|
1334
1339
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1335
|
-
|
|
1340
|
+
_chunk73QT66LJcjs.EmptyState,
|
|
1336
1341
|
{
|
|
1337
1342
|
type: "generic",
|
|
1338
1343
|
title: "Sign in to manage tickets",
|
|
@@ -1403,7 +1408,7 @@ function TicketCenterAuthed({
|
|
|
1403
1408
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1404
1409
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1405
1410
|
"Updated ",
|
|
1406
|
-
|
|
1411
|
+
_chunkKXCRGTRNcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1407
1412
|
] }),
|
|
1408
1413
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1409
1414
|
_chunkXXI7BNB6cjs.Button,
|
|
@@ -1419,17 +1424,18 @@ function TicketCenterAuthed({
|
|
|
1419
1424
|
)
|
|
1420
1425
|
] })
|
|
1421
1426
|
] }),
|
|
1422
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1423
|
-
|
|
1427
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4W7NYJ3Bcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1428
|
+
_chunk73QT66LJcjs.EmptyState,
|
|
1424
1429
|
{
|
|
1425
1430
|
type: "generic",
|
|
1426
1431
|
title: "No tickets yet",
|
|
1427
1432
|
description: "Open one above to start the conversation.",
|
|
1428
1433
|
showCTA: false
|
|
1429
1434
|
}
|
|
1430
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1435
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4W7NYJ3Bcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1431
1436
|
TicketRow,
|
|
1432
1437
|
{
|
|
1438
|
+
id: _chunkKXCRGTRNcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1433
1439
|
ticket,
|
|
1434
1440
|
expanded: expandedTicketId === ticket.id,
|
|
1435
1441
|
onToggle: toggleRow,
|
|
@@ -1447,7 +1453,7 @@ function TicketCenterAuthed({
|
|
|
1447
1453
|
}
|
|
1448
1454
|
function TicketCenterSkeleton() {
|
|
1449
1455
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1450
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1456
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4W7NYJ3Bcjs.Card, { className: "p-6", children: [
|
|
1451
1457
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1452
1458
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1453
1459
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1456,7 +1462,7 @@ function TicketCenterSkeleton() {
|
|
|
1456
1462
|
] });
|
|
1457
1463
|
}
|
|
1458
1464
|
function TicketListSkeleton() {
|
|
1459
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1465
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4W7NYJ3Bcjs.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: [
|
|
1460
1466
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1461
1467
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1462
1468
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1469,12 +1475,11 @@ function TicketListSkeleton() {
|
|
|
1469
1475
|
// src/components/tickets/help-center-list.tsx
|
|
1470
1476
|
|
|
1471
1477
|
|
|
1472
|
-
|
|
1478
|
+
_chunk73QT66LJcjs.init_unified_pagination.call(void 0, );
|
|
1473
1479
|
|
|
1474
1480
|
// src/components/tickets/help-center-card.tsx
|
|
1475
1481
|
|
|
1476
1482
|
|
|
1477
|
-
var STICKY_HEADER_OFFSET_PX = 96;
|
|
1478
1483
|
function HelpCenterCard({
|
|
1479
1484
|
ticket,
|
|
1480
1485
|
expanded,
|
|
@@ -1486,12 +1491,13 @@ function HelpCenterCard({
|
|
|
1486
1491
|
onReopen,
|
|
1487
1492
|
onActionCollapsed,
|
|
1488
1493
|
replyError,
|
|
1489
|
-
onClearReplyError
|
|
1494
|
+
onClearReplyError,
|
|
1495
|
+
id
|
|
1490
1496
|
}) {
|
|
1491
1497
|
const optimistic = isOptimistic(ticket);
|
|
1492
1498
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1493
1499
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1494
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1500
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkKXCRGTRNcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1495
1501
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1496
1502
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1497
1503
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1504,24 +1510,24 @@ function HelpCenterCard({
|
|
|
1504
1510
|
_react.useEffect.call(void 0, () => {
|
|
1505
1511
|
if (!isExpanded) return;
|
|
1506
1512
|
const raf = requestAnimationFrame(() => {
|
|
1507
|
-
|
|
1508
|
-
headerOffset: STICKY_HEADER_OFFSET_PX
|
|
1513
|
+
_chunkLFGGF7OTcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1514
|
+
headerOffset: _chunkLFGGF7OTcjs.STICKY_HEADER_OFFSET_PX
|
|
1509
1515
|
});
|
|
1510
1516
|
});
|
|
1511
1517
|
return () => cancelAnimationFrame(raf);
|
|
1512
1518
|
}, [isExpanded]);
|
|
1513
1519
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1514
1520
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1515
|
-
|
|
1521
|
+
_chunk4W7NYJ3Bcjs.StatusBadge,
|
|
1516
1522
|
{
|
|
1517
1523
|
text: rawStatus,
|
|
1518
|
-
colorScheme:
|
|
1524
|
+
colorScheme: _chunkKXCRGTRNcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1519
1525
|
variant: "card",
|
|
1520
1526
|
className: "border border-ods-border"
|
|
1521
1527
|
}
|
|
1522
1528
|
),
|
|
1523
1529
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1524
|
-
|
|
1530
|
+
_chunk4W7NYJ3Bcjs.StatusBadge,
|
|
1525
1531
|
{
|
|
1526
1532
|
text: priority,
|
|
1527
1533
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1534,7 +1540,8 @@ function HelpCenterCard({
|
|
|
1534
1540
|
"div",
|
|
1535
1541
|
{
|
|
1536
1542
|
ref: rowRef,
|
|
1537
|
-
|
|
1543
|
+
id,
|
|
1544
|
+
style: { scrollMarginTop: _chunkLFGGF7OTcjs.STICKY_HEADER_OFFSET_PX },
|
|
1538
1545
|
className: `border-b border-ods-border last:border-b-0 ${optimistic ? "opacity-60" : ""}`,
|
|
1539
1546
|
"aria-busy": optimistic || void 0,
|
|
1540
1547
|
children: [
|
|
@@ -1548,7 +1555,7 @@ function HelpCenterCard({
|
|
|
1548
1555
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1549
1556
|
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",
|
|
1550
1557
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1551
|
-
|
|
1558
|
+
_chunk73QT66LJcjs.DevCardRowContent,
|
|
1552
1559
|
{
|
|
1553
1560
|
title,
|
|
1554
1561
|
subtitle,
|
|
@@ -1623,7 +1630,7 @@ function HelpCenterCreateForm({
|
|
|
1623
1630
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1624
1631
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1625
1632
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1626
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1633
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkV6YZGLHZcjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1627
1634
|
"Subject",
|
|
1628
1635
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1629
1636
|
] }),
|
|
@@ -1655,7 +1662,7 @@ function HelpCenterCreateForm({
|
|
|
1655
1662
|
)
|
|
1656
1663
|
] });
|
|
1657
1664
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1658
|
-
|
|
1665
|
+
_chunk6LUVYHKDcjs.ContactForm,
|
|
1659
1666
|
{
|
|
1660
1667
|
title: "Open a new ticket",
|
|
1661
1668
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1692,8 +1699,8 @@ function HelpCenterCreateForm({
|
|
|
1692
1699
|
|
|
1693
1700
|
// src/components/tickets/help-center-list.tsx
|
|
1694
1701
|
|
|
1695
|
-
function HelpCenterList({ toast: toast2 =
|
|
1696
|
-
const identity =
|
|
1702
|
+
function HelpCenterList({ toast: toast2 = _chunk5E2HOSSHcjs.toast, backButton } = {}) {
|
|
1703
|
+
const identity = _chunkV6YZGLHZcjs.useChatIdentity.call(void 0, );
|
|
1697
1704
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1698
1705
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1699
1706
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1703,11 +1710,11 @@ function HelpCenterList({ toast: toast2 = _chunkKBKZYJRIcjs.toast, backButton }
|
|
|
1703
1710
|
const rawPage = Number(searchParams.get("page"));
|
|
1704
1711
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1705
1712
|
if (identity.isLoading) {
|
|
1706
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1713
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk73QT66LJcjs.DevSectionPage, { sectionKey: "tickets", backButton, preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk73QT66LJcjs.DevCardRowSkeletonList, {}) });
|
|
1707
1714
|
}
|
|
1708
1715
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _60 => _60.user, 'optionalAccess', _61 => _61.email])) {
|
|
1709
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1710
|
-
|
|
1716
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk73QT66LJcjs.DevSectionPage, { sectionKey: "tickets", backButton, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1717
|
+
_chunk73QT66LJcjs.EmptyState,
|
|
1711
1718
|
{
|
|
1712
1719
|
type: "generic",
|
|
1713
1720
|
title: "Sign in to manage tickets",
|
|
@@ -1815,6 +1822,7 @@ function HelpCenterListAuthed({
|
|
|
1815
1822
|
[tickets, ticketParam, setOpenTicket]
|
|
1816
1823
|
);
|
|
1817
1824
|
const merged = [...optimisticTickets, ...tickets];
|
|
1825
|
+
_chunk5E2HOSSHcjs.useScrollToHash.call(void 0, tickets, { headerOffset: _chunkLFGGF7OTcjs.STICKY_HEADER_OFFSET_PX });
|
|
1818
1826
|
const hasActiveFilters = search !== "" || status !== "" && status !== "all";
|
|
1819
1827
|
const hasResults = merged.length > 0;
|
|
1820
1828
|
const form = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1834,15 +1842,15 @@ function HelpCenterListAuthed({
|
|
|
1834
1842
|
] }),
|
|
1835
1843
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXXI7BNB6cjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1836
1844
|
] }),
|
|
1837
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1845
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk73QT66LJcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1838
1846
|
// Bridge state — background refetch in flight and the
|
|
1839
1847
|
// optimistic placeholder was just removed by the mutation
|
|
1840
1848
|
// callback. Without this branch "No tickets yet" would flash
|
|
1841
1849
|
// for ~50ms between `removeOptimistic` and the server
|
|
1842
1850
|
// response landing.
|
|
1843
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1851
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk73QT66LJcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1844
1852
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1845
|
-
|
|
1853
|
+
_chunk73QT66LJcjs.EmptyState,
|
|
1846
1854
|
{
|
|
1847
1855
|
type: "search",
|
|
1848
1856
|
title: "No tickets found",
|
|
@@ -1857,7 +1865,7 @@ function HelpCenterListAuthed({
|
|
|
1857
1865
|
}
|
|
1858
1866
|
}
|
|
1859
1867
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1860
|
-
|
|
1868
|
+
_chunk73QT66LJcjs.EmptyState,
|
|
1861
1869
|
{
|
|
1862
1870
|
type: "generic",
|
|
1863
1871
|
title: "No tickets yet",
|
|
@@ -1876,6 +1884,7 @@ function HelpCenterListAuthed({
|
|
|
1876
1884
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-card border border-ods-border rounded-[6px] overflow-clip w-full", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1877
1885
|
HelpCenterCard,
|
|
1878
1886
|
{
|
|
1887
|
+
id: _chunkKXCRGTRNcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1879
1888
|
ticket,
|
|
1880
1889
|
expanded: expandedTicketId === ticket.id,
|
|
1881
1890
|
onToggle: toggleRow,
|
|
@@ -1891,9 +1900,9 @@ function HelpCenterListAuthed({
|
|
|
1891
1900
|
ticket.id
|
|
1892
1901
|
)) })
|
|
1893
1902
|
) }),
|
|
1894
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1903
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk73QT66LJcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1895
1904
|
] });
|
|
1896
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1905
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk73QT66LJcjs.DevSectionPage, { sectionKey: "tickets", backButton, preControls: form, children: body });
|
|
1897
1906
|
}
|
|
1898
1907
|
|
|
1899
1908
|
|