@flamingo-stack/openframe-frontend-core 0.0.260 → 0.0.261
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-LCYDTEEK.cjs → chunk-2XUWR7AH.cjs} +18 -16
- package/dist/chunk-2XUWR7AH.cjs.map +1 -0
- package/dist/{chunk-FBH73RRM.cjs → chunk-36HLBLDK.cjs} +297 -295
- package/dist/chunk-36HLBLDK.cjs.map +1 -0
- package/dist/{chunk-CBIQDPHK.js → chunk-6AIXHYBZ.js} +5 -3
- package/dist/{chunk-CBIQDPHK.js.map → chunk-6AIXHYBZ.js.map} +1 -1
- package/dist/{chunk-EB76VWM4.cjs → chunk-7MNBE7XA.cjs} +2 -95
- package/dist/chunk-7MNBE7XA.cjs.map +1 -0
- package/dist/{chunk-KQQDN2WK.cjs → chunk-A56L7UQG.cjs} +12 -12
- package/dist/{chunk-KQQDN2WK.cjs.map → chunk-A56L7UQG.cjs.map} +1 -1
- package/dist/{chunk-2VZQJIVA.js → chunk-ALEKX56R.js} +3 -3
- package/dist/{chunk-NNDLCSGR.cjs → chunk-C3FAOQAH.cjs} +25 -25
- package/dist/{chunk-NNDLCSGR.cjs.map → chunk-C3FAOQAH.cjs.map} +1 -1
- package/dist/chunk-ERFO4JFK.js +104 -0
- package/dist/chunk-ERFO4JFK.js.map +1 -0
- package/dist/{chunk-LQKMMVCC.js → chunk-GBUGYHDY.js} +14 -3
- package/dist/chunk-GBUGYHDY.js.map +1 -0
- package/dist/{chunk-D4ESVTUT.cjs → chunk-J5R3QIOJ.cjs} +14 -3
- package/dist/chunk-J5R3QIOJ.cjs.map +1 -0
- package/dist/chunk-TT2VBR7P.cjs +104 -0
- package/dist/chunk-TT2VBR7P.cjs.map +1 -0
- package/dist/{chunk-ACJPRIZC.js → chunk-TZ3PV5NT.js} +2 -2
- package/dist/{chunk-RUMSS73U.js → chunk-U7UDESAU.js} +7 -5
- package/dist/{chunk-RUMSS73U.js.map → chunk-U7UDESAU.js.map} +1 -1
- package/dist/{chunk-NAOTZAKM.js → chunk-URJQGMNH.js} +247 -340
- package/dist/chunk-URJQGMNH.js.map +1 -0
- package/dist/{chunk-AIQ4DGO7.cjs → chunk-XKA7UFED.cjs} +34 -34
- package/dist/{chunk-AIQ4DGO7.cjs.map → chunk-XKA7UFED.cjs.map} +1 -1
- package/dist/{chunk-YMZZ5THD.js → chunk-YC357BPF.js} +2 -2
- package/dist/components/chat/index.cjs +4 -3
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +3 -2
- package/dist/components/contact/index.cjs +5 -4
- package/dist/components/contact/index.cjs.map +1 -1
- package/dist/components/contact/index.js +4 -3
- package/dist/components/faq/index.cjs +3 -2
- package/dist/components/faq/index.cjs.map +1 -1
- package/dist/components/faq/index.js +2 -1
- package/dist/components/faq-accordion.d.ts +4 -3
- package/dist/components/faq-accordion.d.ts.map +1 -1
- package/dist/components/features/entity-tag-badges.d.ts +1 -0
- package/dist/components/features/entity-tag-badges.d.ts.map +1 -1
- package/dist/components/features/index.cjs +8 -4
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +7 -3
- package/dist/components/index.cjs +85 -81
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +13 -9
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +4 -3
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.js +3 -2
- package/dist/components/onboarding-guides/index.cjs +25 -23
- package/dist/components/onboarding-guides/index.cjs.map +1 -1
- package/dist/components/onboarding-guides/index.js +5 -3
- package/dist/components/onboarding-guides/index.js.map +1 -1
- package/dist/components/related-content/index.cjs +5 -4
- package/dist/components/related-content/index.cjs.map +1 -1
- package/dist/components/related-content/index.js +4 -3
- package/dist/components/tickets/index.cjs +67 -65
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +8 -6
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/ui/index.cjs +7 -5
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +6 -4
- package/dist/index.cjs +10 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -5
- package/package.json +1 -1
- package/src/components/faq-accordion.tsx +12 -7
- package/src/components/features/entity-tag-badges.tsx +4 -1
- package/dist/chunk-D4ESVTUT.cjs.map +0 -1
- package/dist/chunk-EB76VWM4.cjs.map +0 -1
- package/dist/chunk-FBH73RRM.cjs.map +0 -1
- package/dist/chunk-LCYDTEEK.cjs.map +0 -1
- package/dist/chunk-LQKMMVCC.js.map +0 -1
- package/dist/chunk-NAOTZAKM.js.map +0 -1
- /package/dist/{chunk-2VZQJIVA.js.map → chunk-ALEKX56R.js.map} +0 -0
- /package/dist/{chunk-ACJPRIZC.js.map → chunk-TZ3PV5NT.js.map} +0 -0
- /package/dist/{chunk-YMZZ5THD.js.map → chunk-YC357BPF.js.map} +0 -0
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk2XUWR7AHcjs = require('../../chunk-2XUWR7AH.cjs');
|
|
11
11
|
require('../../chunk-VFKQMAUF.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkC3FAOQAHcjs = require('../../chunk-C3FAOQAH.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -36,7 +36,7 @@ var _chunkNNDLCSGRcjs = require('../../chunk-NNDLCSGR.cjs');
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunk36HLBLDKcjs = require('../../chunk-36HLBLDK.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunk3DC6MHW6cjs = require('../../chunk-3DC6MHW6.cjs');
|
|
@@ -50,8 +50,7 @@ require('../../chunk-PXXS27EE.cjs');
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
var _chunkEB76VWM4cjs = require('../../chunk-EB76VWM4.cjs');
|
|
53
|
+
var _chunk7MNBE7XAcjs = require('../../chunk-7MNBE7XA.cjs');
|
|
55
54
|
require('../../chunk-DAAFVOTL.cjs');
|
|
56
55
|
require('../../chunk-MEAR2WHS.cjs');
|
|
57
56
|
require('../../chunk-XL4V2PYG.cjs');
|
|
@@ -63,6 +62,9 @@ require('../../chunk-BZFW3FOF.cjs');
|
|
|
63
62
|
var _chunkG7UE6RKVcjs = require('../../chunk-G7UE6RKV.cjs');
|
|
64
63
|
|
|
65
64
|
|
|
65
|
+
var _chunkTT2VBR7Pcjs = require('../../chunk-TT2VBR7P.cjs');
|
|
66
|
+
|
|
67
|
+
|
|
66
68
|
|
|
67
69
|
var _chunkN5UOJC3Vcjs = require('../../chunk-N5UOJC3V.cjs');
|
|
68
70
|
require('../../chunk-WBR7H6E3.cjs');
|
|
@@ -109,7 +111,7 @@ function TicketOpenForm({
|
|
|
109
111
|
}) {
|
|
110
112
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
111
113
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
112
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
114
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunk36HLBLDKcjs.useChatAttachments.call(void 0, );
|
|
113
115
|
const trimmedSubject = subject.trim();
|
|
114
116
|
const trimmedContent = content.trim();
|
|
115
117
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -129,7 +131,7 @@ function TicketOpenForm({
|
|
|
129
131
|
clear();
|
|
130
132
|
}
|
|
131
133
|
};
|
|
132
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
134
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7MNBE7XAcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
133
135
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
134
136
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
135
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." }),
|
|
@@ -168,7 +170,7 @@ function TicketOpenForm({
|
|
|
168
170
|
}
|
|
169
171
|
),
|
|
170
172
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
171
|
-
|
|
173
|
+
_chunk36HLBLDKcjs.Textarea,
|
|
172
174
|
{
|
|
173
175
|
id: "ticket-content",
|
|
174
176
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -192,7 +194,7 @@ function TicketOpenForm({
|
|
|
192
194
|
)
|
|
193
195
|
] }),
|
|
194
196
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
195
|
-
|
|
197
|
+
_chunk36HLBLDKcjs.ChatAttachmentChipStrip,
|
|
196
198
|
{
|
|
197
199
|
attachments,
|
|
198
200
|
onRemove: removeAttachment,
|
|
@@ -201,7 +203,7 @@ function TicketOpenForm({
|
|
|
201
203
|
),
|
|
202
204
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
203
205
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
204
|
-
|
|
206
|
+
_chunk36HLBLDKcjs.ChatAttachmentAddButton,
|
|
205
207
|
{
|
|
206
208
|
attachmentsEnabled: !supportSystemDown,
|
|
207
209
|
attachmentsCount: attachments.length,
|
|
@@ -239,7 +241,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
239
241
|
|
|
240
242
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
241
243
|
function useTicketEngagements(externalTicketId, enabled = true, refetchInterval = false) {
|
|
242
|
-
const identity =
|
|
244
|
+
const identity = _chunk36HLBLDKcjs.useChatIdentity.call(void 0, );
|
|
243
245
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
244
246
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
245
247
|
const queryEnabled = fetchable && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _4 => _4.user, 'optionalAccess', _5 => _5.email]);
|
|
@@ -259,7 +261,7 @@ function useTicketEngagements(externalTicketId, enabled = true, refetchInterval
|
|
|
259
261
|
// so polling pauses on a hidden tab.
|
|
260
262
|
refetchInterval,
|
|
261
263
|
queryFn: async () => {
|
|
262
|
-
const response = await
|
|
264
|
+
const response = await _chunk36HLBLDKcjs.embedAuthedFetch.call(void 0, LIST_ENGAGEMENTS_ENDPOINT, {
|
|
263
265
|
method: "POST",
|
|
264
266
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
265
267
|
});
|
|
@@ -320,7 +322,7 @@ function TicketLinkedDeliveryCard({
|
|
|
320
322
|
{
|
|
321
323
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
322
324
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
323
|
-
|
|
325
|
+
_chunk2XUWR7AHcjs.DeliveryRow,
|
|
324
326
|
{
|
|
325
327
|
item,
|
|
326
328
|
href: clickup.delivery_href,
|
|
@@ -344,7 +346,7 @@ function TicketReplyComposer({
|
|
|
344
346
|
}) {
|
|
345
347
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
346
348
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
347
|
-
const attachments =
|
|
349
|
+
const attachments = _chunk36HLBLDKcjs.useChatAttachments.call(void 0, );
|
|
348
350
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
349
351
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
350
352
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -372,7 +374,7 @@ function TicketReplyComposer({
|
|
|
372
374
|
const disabled = busy || supportSystemDown;
|
|
373
375
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
374
376
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
375
|
-
|
|
377
|
+
_chunk36HLBLDKcjs.ChatAttachmentChipStrip,
|
|
376
378
|
{
|
|
377
379
|
attachments: attachments.attachments,
|
|
378
380
|
onRemove: attachments.removeAttachment,
|
|
@@ -381,7 +383,7 @@ function TicketReplyComposer({
|
|
|
381
383
|
}
|
|
382
384
|
),
|
|
383
385
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
384
|
-
|
|
386
|
+
_chunk36HLBLDKcjs.ChatInput,
|
|
385
387
|
{
|
|
386
388
|
fullWidth: true,
|
|
387
389
|
autoFocus: true,
|
|
@@ -395,7 +397,7 @@ function TicketReplyComposer({
|
|
|
395
397
|
),
|
|
396
398
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
397
399
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
398
|
-
|
|
400
|
+
_chunk36HLBLDKcjs.ChatAttachmentAddButton,
|
|
399
401
|
{
|
|
400
402
|
attachmentsEnabled: true,
|
|
401
403
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -418,13 +420,13 @@ function TicketReplyComposer({
|
|
|
418
420
|
}
|
|
419
421
|
)
|
|
420
422
|
] }),
|
|
421
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
422
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
423
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
424
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
423
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk36HLBLDKcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk36HLBLDKcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
424
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk36HLBLDKcjs.AlertDialogHeader, { children: [
|
|
425
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk36HLBLDKcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
426
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk36HLBLDKcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
425
427
|
] }),
|
|
426
428
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
427
|
-
|
|
429
|
+
_chunk36HLBLDKcjs.Textarea,
|
|
428
430
|
{
|
|
429
431
|
value: resolution,
|
|
430
432
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -434,9 +436,9 @@ function TicketReplyComposer({
|
|
|
434
436
|
className: "mt-2"
|
|
435
437
|
}
|
|
436
438
|
),
|
|
437
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
439
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk36HLBLDKcjs.AlertDialogFooter, { children: [
|
|
438
440
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
439
|
-
|
|
441
|
+
_chunk36HLBLDKcjs.AlertDialogCancel,
|
|
440
442
|
{
|
|
441
443
|
disabled: busy,
|
|
442
444
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -444,7 +446,7 @@ function TicketReplyComposer({
|
|
|
444
446
|
}
|
|
445
447
|
),
|
|
446
448
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
447
|
-
|
|
449
|
+
_chunk36HLBLDKcjs.AlertDialogAction,
|
|
448
450
|
{
|
|
449
451
|
onClick: () => void confirmClose(),
|
|
450
452
|
disabled: busy,
|
|
@@ -514,7 +516,7 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
514
516
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
515
517
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
516
518
|
function TicketTimelinePanel({ ticket }) {
|
|
517
|
-
const identity =
|
|
519
|
+
const identity = _chunk36HLBLDKcjs.useChatIdentity.call(void 0, );
|
|
518
520
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
519
521
|
const { engagements, isLoading } = useTicketEngagements(
|
|
520
522
|
externalId,
|
|
@@ -534,11 +536,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
534
536
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _19 => _19.user, 'optionalAccess', _20 => _20.email]) || "You";
|
|
535
537
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.avatarUrl]), () => ( void 0)) : void 0;
|
|
536
538
|
if (isLoading) {
|
|
537
|
-
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,
|
|
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, _chunk36HLBLDKcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
538
540
|
}
|
|
539
541
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
540
542
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
541
|
-
|
|
543
|
+
_chunk2XUWR7AHcjs.EmptyState,
|
|
542
544
|
{
|
|
543
545
|
type: "generic",
|
|
544
546
|
title: "No conversation yet",
|
|
@@ -553,7 +555,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
553
555
|
const isResolution = turn.startsWith("[Resolution]");
|
|
554
556
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
555
557
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
556
|
-
|
|
558
|
+
_chunk36HLBLDKcjs.ChatMessageRow,
|
|
557
559
|
{
|
|
558
560
|
displayName: customerName,
|
|
559
561
|
avatarUrl: customerAvatar,
|
|
@@ -582,13 +584,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
582
584
|
}
|
|
583
585
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
584
586
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
585
|
-
|
|
587
|
+
_chunk36HLBLDKcjs.ChatMessageRow,
|
|
586
588
|
{
|
|
587
589
|
displayName: author,
|
|
588
590
|
avatarUrl: avatarSrc,
|
|
589
|
-
timeLabel: eng.createdAt ?
|
|
591
|
+
timeLabel: eng.createdAt ? _chunk36HLBLDKcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
590
592
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
591
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
593
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk36HLBLDKcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
592
594
|
},
|
|
593
595
|
eng.id
|
|
594
596
|
);
|
|
@@ -676,7 +678,7 @@ function AssignedAgentRow({
|
|
|
676
678
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary uppercase tracking-wider font-medium", children: "Assigned to" }),
|
|
677
679
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
678
680
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
679
|
-
|
|
681
|
+
_chunk7MNBE7XAcjs.SquareAvatar,
|
|
680
682
|
{
|
|
681
683
|
size: "sm",
|
|
682
684
|
variant: "round",
|
|
@@ -707,7 +709,7 @@ function TicketRow({
|
|
|
707
709
|
const rowRef = _react.useRef.call(void 0, null);
|
|
708
710
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
709
711
|
onToggle(ticket.id);
|
|
710
|
-
|
|
712
|
+
_chunk36HLBLDKcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
711
713
|
adjustTargetY: (raw) => {
|
|
712
714
|
if (!rowRef.current) return raw;
|
|
713
715
|
const expandedDrawer = document.querySelector(
|
|
@@ -733,7 +735,7 @@ function TicketRow({
|
|
|
733
735
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
734
736
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
735
737
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
736
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
738
|
+
timeAgo: ticket.hubspot_updated_at ? _chunk36HLBLDKcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
737
739
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
738
740
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
739
741
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -748,7 +750,7 @@ function TicketRow({
|
|
|
748
750
|
className: "border-b border-ods-border last:border-b-0",
|
|
749
751
|
children: [
|
|
750
752
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
751
|
-
|
|
753
|
+
_chunk36HLBLDKcjs.ChatTicketItem,
|
|
752
754
|
{
|
|
753
755
|
ticket: tileData,
|
|
754
756
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -817,7 +819,7 @@ function useTicketsList(filters) {
|
|
|
817
819
|
pageSize
|
|
818
820
|
};
|
|
819
821
|
if (statusFilter) body.status = statusFilter;
|
|
820
|
-
const response = await
|
|
822
|
+
const response = await _chunk36HLBLDKcjs.embedAuthedFetch.call(void 0, FIND_TICKET_ENDPOINT, {
|
|
821
823
|
method: "POST",
|
|
822
824
|
body: JSON.stringify(body)
|
|
823
825
|
});
|
|
@@ -931,7 +933,7 @@ function useTicketActions(options) {
|
|
|
931
933
|
}, []);
|
|
932
934
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
933
935
|
async (toolName, args) => {
|
|
934
|
-
const res = await
|
|
936
|
+
const res = await _chunk36HLBLDKcjs.embedAuthedFetch.call(void 0, TICKET_ACTION_ENDPOINT, {
|
|
935
937
|
method: "POST",
|
|
936
938
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
937
939
|
});
|
|
@@ -1316,13 +1318,13 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1316
1318
|
// src/components/tickets/ticket-center.tsx
|
|
1317
1319
|
|
|
1318
1320
|
function TicketCenter({ toast: toast2 = _chunk3DC6MHW6cjs.toast } = {}) {
|
|
1319
|
-
const identity =
|
|
1321
|
+
const identity = _chunk36HLBLDKcjs.useChatIdentity.call(void 0, );
|
|
1320
1322
|
if (identity.isLoading) {
|
|
1321
1323
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1322
1324
|
}
|
|
1323
1325
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email])) {
|
|
1324
1326
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1325
|
-
|
|
1327
|
+
_chunk2XUWR7AHcjs.EmptyState,
|
|
1326
1328
|
{
|
|
1327
1329
|
type: "generic",
|
|
1328
1330
|
title: "Sign in to manage tickets",
|
|
@@ -1393,7 +1395,7 @@ function TicketCenterAuthed({
|
|
|
1393
1395
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1394
1396
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1395
1397
|
"Updated ",
|
|
1396
|
-
|
|
1398
|
+
_chunk36HLBLDKcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1397
1399
|
] }),
|
|
1398
1400
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1399
1401
|
_chunkN5UOJC3Vcjs.Button,
|
|
@@ -1409,15 +1411,15 @@ function TicketCenterAuthed({
|
|
|
1409
1411
|
)
|
|
1410
1412
|
] })
|
|
1411
1413
|
] }),
|
|
1412
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1413
|
-
|
|
1414
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7MNBE7XAcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1415
|
+
_chunk2XUWR7AHcjs.EmptyState,
|
|
1414
1416
|
{
|
|
1415
1417
|
type: "generic",
|
|
1416
1418
|
title: "No tickets yet",
|
|
1417
1419
|
description: "Open one above to start the conversation.",
|
|
1418
1420
|
showCTA: false
|
|
1419
1421
|
}
|
|
1420
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1422
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7MNBE7XAcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1421
1423
|
TicketRow,
|
|
1422
1424
|
{
|
|
1423
1425
|
ticket,
|
|
@@ -1437,7 +1439,7 @@ function TicketCenterAuthed({
|
|
|
1437
1439
|
}
|
|
1438
1440
|
function TicketCenterSkeleton() {
|
|
1439
1441
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1440
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1442
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk7MNBE7XAcjs.Card, { className: "p-6", children: [
|
|
1441
1443
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1442
1444
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1443
1445
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1446,7 +1448,7 @@ function TicketCenterSkeleton() {
|
|
|
1446
1448
|
] });
|
|
1447
1449
|
}
|
|
1448
1450
|
function TicketListSkeleton() {
|
|
1449
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1451
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7MNBE7XAcjs.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: [
|
|
1450
1452
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1451
1453
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1452
1454
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1459,7 +1461,7 @@ function TicketListSkeleton() {
|
|
|
1459
1461
|
// src/components/tickets/help-center-list.tsx
|
|
1460
1462
|
|
|
1461
1463
|
|
|
1462
|
-
|
|
1464
|
+
_chunk2XUWR7AHcjs.init_unified_pagination.call(void 0, );
|
|
1463
1465
|
|
|
1464
1466
|
// src/components/tickets/help-center-card.tsx
|
|
1465
1467
|
|
|
@@ -1481,7 +1483,7 @@ function HelpCenterCard({
|
|
|
1481
1483
|
const optimistic = isOptimistic(ticket);
|
|
1482
1484
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1483
1485
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1484
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1486
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunk36HLBLDKcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1485
1487
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1486
1488
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1487
1489
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1494,7 +1496,7 @@ function HelpCenterCard({
|
|
|
1494
1496
|
_react.useEffect.call(void 0, () => {
|
|
1495
1497
|
if (!isExpanded) return;
|
|
1496
1498
|
const raf = requestAnimationFrame(() => {
|
|
1497
|
-
|
|
1499
|
+
_chunk36HLBLDKcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1498
1500
|
headerOffset: STICKY_HEADER_OFFSET_PX
|
|
1499
1501
|
});
|
|
1500
1502
|
});
|
|
@@ -1502,16 +1504,16 @@ function HelpCenterCard({
|
|
|
1502
1504
|
}, [isExpanded]);
|
|
1503
1505
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1504
1506
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1505
|
-
|
|
1507
|
+
_chunkTT2VBR7Pcjs.StatusBadge,
|
|
1506
1508
|
{
|
|
1507
1509
|
text: rawStatus,
|
|
1508
|
-
colorScheme:
|
|
1510
|
+
colorScheme: _chunk36HLBLDKcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1509
1511
|
variant: "card",
|
|
1510
1512
|
className: "border border-ods-border"
|
|
1511
1513
|
}
|
|
1512
1514
|
),
|
|
1513
1515
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1514
|
-
|
|
1516
|
+
_chunkTT2VBR7Pcjs.StatusBadge,
|
|
1515
1517
|
{
|
|
1516
1518
|
text: priority,
|
|
1517
1519
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1538,7 +1540,7 @@ function HelpCenterCard({
|
|
|
1538
1540
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1539
1541
|
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",
|
|
1540
1542
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1541
|
-
|
|
1543
|
+
_chunk2XUWR7AHcjs.DevCardRowContent,
|
|
1542
1544
|
{
|
|
1543
1545
|
title,
|
|
1544
1546
|
subtitle,
|
|
@@ -1613,7 +1615,7 @@ function HelpCenterCreateForm({
|
|
|
1613
1615
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1614
1616
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1615
1617
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1616
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1618
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk36HLBLDKcjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1617
1619
|
"Subject",
|
|
1618
1620
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1619
1621
|
] }),
|
|
@@ -1645,7 +1647,7 @@ function HelpCenterCreateForm({
|
|
|
1645
1647
|
)
|
|
1646
1648
|
] });
|
|
1647
1649
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1648
|
-
|
|
1650
|
+
_chunkC3FAOQAHcjs.ContactForm,
|
|
1649
1651
|
{
|
|
1650
1652
|
title: "Open a new ticket",
|
|
1651
1653
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1683,7 +1685,7 @@ function HelpCenterCreateForm({
|
|
|
1683
1685
|
// src/components/tickets/help-center-list.tsx
|
|
1684
1686
|
|
|
1685
1687
|
function HelpCenterList({ toast: toast2 = _chunk3DC6MHW6cjs.toast } = {}) {
|
|
1686
|
-
const identity =
|
|
1688
|
+
const identity = _chunk36HLBLDKcjs.useChatIdentity.call(void 0, );
|
|
1687
1689
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1688
1690
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1689
1691
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1693,11 +1695,11 @@ function HelpCenterList({ toast: toast2 = _chunk3DC6MHW6cjs.toast } = {}) {
|
|
|
1693
1695
|
const rawPage = Number(searchParams.get("page"));
|
|
1694
1696
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1695
1697
|
if (identity.isLoading) {
|
|
1696
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1698
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2XUWR7AHcjs.DevSectionPage, { sectionKey: "tickets", preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2XUWR7AHcjs.DevCardRowSkeletonList, {}) });
|
|
1697
1699
|
}
|
|
1698
1700
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _60 => _60.user, 'optionalAccess', _61 => _61.email])) {
|
|
1699
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1700
|
-
|
|
1701
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2XUWR7AHcjs.DevSectionPage, { sectionKey: "tickets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1702
|
+
_chunk2XUWR7AHcjs.EmptyState,
|
|
1701
1703
|
{
|
|
1702
1704
|
type: "generic",
|
|
1703
1705
|
title: "Sign in to manage tickets",
|
|
@@ -1822,15 +1824,15 @@ function HelpCenterListAuthed({
|
|
|
1822
1824
|
] }),
|
|
1823
1825
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN5UOJC3Vcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1824
1826
|
] }),
|
|
1825
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1827
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2XUWR7AHcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1826
1828
|
// Bridge state — background refetch in flight and the
|
|
1827
1829
|
// optimistic placeholder was just removed by the mutation
|
|
1828
1830
|
// callback. Without this branch "No tickets yet" would flash
|
|
1829
1831
|
// for ~50ms between `removeOptimistic` and the server
|
|
1830
1832
|
// response landing.
|
|
1831
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1833
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2XUWR7AHcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1832
1834
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1833
|
-
|
|
1835
|
+
_chunk2XUWR7AHcjs.EmptyState,
|
|
1834
1836
|
{
|
|
1835
1837
|
type: "search",
|
|
1836
1838
|
title: "No tickets found",
|
|
@@ -1845,7 +1847,7 @@ function HelpCenterListAuthed({
|
|
|
1845
1847
|
}
|
|
1846
1848
|
}
|
|
1847
1849
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1848
|
-
|
|
1850
|
+
_chunk2XUWR7AHcjs.EmptyState,
|
|
1849
1851
|
{
|
|
1850
1852
|
type: "generic",
|
|
1851
1853
|
title: "No tickets yet",
|
|
@@ -1879,9 +1881,9 @@ function HelpCenterListAuthed({
|
|
|
1879
1881
|
ticket.id
|
|
1880
1882
|
)) })
|
|
1881
1883
|
) }),
|
|
1882
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1884
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2XUWR7AHcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1883
1885
|
] });
|
|
1884
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1886
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2XUWR7AHcjs.DevSectionPage, { sectionKey: "tickets", preControls: form, children: body });
|
|
1885
1887
|
}
|
|
1886
1888
|
|
|
1887
1889
|
|