@flamingo-stack/openframe-frontend-core 0.0.245 → 0.0.246
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-MP5HOP7N.cjs → chunk-3JRA55FZ.cjs} +9 -9
- package/dist/{chunk-MP5HOP7N.cjs.map → chunk-3JRA55FZ.cjs.map} +1 -1
- package/dist/{chunk-7ZHFCEJH.js → chunk-DB4HW42V.js} +2 -2
- package/dist/{chunk-CZITXP77.cjs → chunk-ESADULCN.cjs} +7 -4
- package/dist/chunk-ESADULCN.cjs.map +1 -0
- package/dist/{chunk-BKPS6M2F.cjs → chunk-GMFDA36U.cjs} +10 -10
- package/dist/{chunk-BKPS6M2F.cjs.map → chunk-GMFDA36U.cjs.map} +1 -1
- package/dist/{chunk-JJV3XGCY.js → chunk-LXDA67PW.js} +2 -2
- package/dist/{chunk-FRRMXLU5.js → chunk-NZST65RV.js} +7 -4
- package/dist/chunk-NZST65RV.js.map +1 -0
- package/dist/{chunk-DUZBTUXF.cjs → chunk-P2G5X6AW.cjs} +25 -25
- package/dist/{chunk-DUZBTUXF.cjs.map → chunk-P2G5X6AW.cjs.map} +1 -1
- package/dist/{chunk-ML2ROCYA.cjs → chunk-PINAV6VJ.cjs} +29 -29
- package/dist/{chunk-ML2ROCYA.cjs.map → chunk-PINAV6VJ.cjs.map} +1 -1
- package/dist/{chunk-SEVJT2HP.js → chunk-QRGODKEG.js} +2 -2
- package/dist/{chunk-GIDH6UL4.js → chunk-VI7GW7PE.js} +2 -2
- package/dist/{chunk-VXP553WT.cjs → chunk-YJVDQZ5Y.cjs} +7 -7
- package/dist/{chunk-VXP553WT.cjs.map → chunk-YJVDQZ5Y.cjs.map} +1 -1
- package/dist/{chunk-V35PZSUA.js → chunk-ZXECERJ4.js} +2 -2
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/index.cjs +75 -75
- package/dist/components/index.js +5 -5
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +23 -23
- package/dist/components/onboarding-guides/index.js +3 -3
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +64 -64
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/chat/entity-cards/onboarding-guide-card.tsx +18 -3
- package/dist/chunk-CZITXP77.cjs.map +0 -1
- package/dist/chunk-FRRMXLU5.js.map +0 -1
- /package/dist/{chunk-7ZHFCEJH.js.map → chunk-DB4HW42V.js.map} +0 -0
- /package/dist/{chunk-JJV3XGCY.js.map → chunk-LXDA67PW.js.map} +0 -0
- /package/dist/{chunk-SEVJT2HP.js.map → chunk-QRGODKEG.js.map} +0 -0
- /package/dist/{chunk-GIDH6UL4.js.map → chunk-VI7GW7PE.js.map} +0 -0
- /package/dist/{chunk-V35PZSUA.js.map → chunk-ZXECERJ4.js.map} +0 -0
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk3JRA55FZcjs = require('../../chunk-3JRA55FZ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkYJVDQZ5Ycjs = require('../../chunk-YJVDQZ5Y.cjs');
|
|
13
13
|
require('../../chunk-VFKQMAUF.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkP2G5X6AWcjs = require('../../chunk-P2G5X6AW.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -41,7 +41,7 @@ var _chunkDUZBTUXFcjs = require('../../chunk-DUZBTUXF.cjs');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunkESADULCNcjs = require('../../chunk-ESADULCN.cjs');
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
var _chunk27VVOBDBcjs = require('../../chunk-27VVOBDB.cjs');
|
|
@@ -106,7 +106,7 @@ function TicketOpenForm({
|
|
|
106
106
|
}) {
|
|
107
107
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
108
108
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
109
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
109
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkESADULCNcjs.useChatAttachments.call(void 0, );
|
|
110
110
|
const trimmedSubject = subject.trim();
|
|
111
111
|
const trimmedContent = content.trim();
|
|
112
112
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -126,7 +126,7 @@ function TicketOpenForm({
|
|
|
126
126
|
clear();
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
129
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkESADULCNcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
130
130
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
131
131
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
132
132
|
/* @__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." }),
|
|
@@ -165,7 +165,7 @@ function TicketOpenForm({
|
|
|
165
165
|
}
|
|
166
166
|
),
|
|
167
167
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
168
|
-
|
|
168
|
+
_chunkESADULCNcjs.Textarea,
|
|
169
169
|
{
|
|
170
170
|
id: "ticket-content",
|
|
171
171
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -189,7 +189,7 @@ function TicketOpenForm({
|
|
|
189
189
|
)
|
|
190
190
|
] }),
|
|
191
191
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
192
|
-
|
|
192
|
+
_chunkESADULCNcjs.ChatAttachmentChipStrip,
|
|
193
193
|
{
|
|
194
194
|
attachments,
|
|
195
195
|
onRemove: removeAttachment,
|
|
@@ -198,7 +198,7 @@ function TicketOpenForm({
|
|
|
198
198
|
),
|
|
199
199
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
200
200
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
201
|
-
|
|
201
|
+
_chunkESADULCNcjs.ChatAttachmentAddButton,
|
|
202
202
|
{
|
|
203
203
|
attachmentsEnabled: !supportSystemDown,
|
|
204
204
|
attachmentsCount: attachments.length,
|
|
@@ -236,7 +236,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
236
236
|
|
|
237
237
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
238
238
|
function useTicketEngagements(externalTicketId, enabled = true, refetchInterval = false) {
|
|
239
|
-
const identity =
|
|
239
|
+
const identity = _chunkESADULCNcjs.useChatIdentity.call(void 0, );
|
|
240
240
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
241
241
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
242
242
|
const queryEnabled = fetchable && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _4 => _4.user, 'optionalAccess', _5 => _5.email]);
|
|
@@ -256,7 +256,7 @@ function useTicketEngagements(externalTicketId, enabled = true, refetchInterval
|
|
|
256
256
|
// so polling pauses on a hidden tab.
|
|
257
257
|
refetchInterval,
|
|
258
258
|
queryFn: async () => {
|
|
259
|
-
const response = await
|
|
259
|
+
const response = await _chunkESADULCNcjs.embedAuthedFetch.call(void 0, LIST_ENGAGEMENTS_ENDPOINT, {
|
|
260
260
|
method: "POST",
|
|
261
261
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
262
262
|
});
|
|
@@ -317,7 +317,7 @@ function TicketLinkedDeliveryCard({
|
|
|
317
317
|
{
|
|
318
318
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
319
319
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
320
|
-
|
|
320
|
+
_chunk3JRA55FZcjs.DeliveryRow,
|
|
321
321
|
{
|
|
322
322
|
item,
|
|
323
323
|
href: clickup.delivery_href,
|
|
@@ -341,7 +341,7 @@ function TicketReplyComposer({
|
|
|
341
341
|
}) {
|
|
342
342
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
343
343
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
344
|
-
const attachments =
|
|
344
|
+
const attachments = _chunkESADULCNcjs.useChatAttachments.call(void 0, );
|
|
345
345
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
346
346
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
347
347
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -369,7 +369,7 @@ function TicketReplyComposer({
|
|
|
369
369
|
const disabled = busy || supportSystemDown;
|
|
370
370
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
371
371
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
372
|
-
|
|
372
|
+
_chunkESADULCNcjs.ChatAttachmentChipStrip,
|
|
373
373
|
{
|
|
374
374
|
attachments: attachments.attachments,
|
|
375
375
|
onRemove: attachments.removeAttachment,
|
|
@@ -378,7 +378,7 @@ function TicketReplyComposer({
|
|
|
378
378
|
}
|
|
379
379
|
),
|
|
380
380
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
381
|
-
|
|
381
|
+
_chunkESADULCNcjs.ChatInput,
|
|
382
382
|
{
|
|
383
383
|
fullWidth: true,
|
|
384
384
|
autoFocus: true,
|
|
@@ -392,7 +392,7 @@ function TicketReplyComposer({
|
|
|
392
392
|
),
|
|
393
393
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
394
394
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
395
|
-
|
|
395
|
+
_chunkESADULCNcjs.ChatAttachmentAddButton,
|
|
396
396
|
{
|
|
397
397
|
attachmentsEnabled: true,
|
|
398
398
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -415,13 +415,13 @@ function TicketReplyComposer({
|
|
|
415
415
|
}
|
|
416
416
|
)
|
|
417
417
|
] }),
|
|
418
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
419
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
420
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
421
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
418
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkESADULCNcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkESADULCNcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
419
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkESADULCNcjs.AlertDialogHeader, { children: [
|
|
420
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkESADULCNcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
421
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkESADULCNcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
422
422
|
] }),
|
|
423
423
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
424
|
-
|
|
424
|
+
_chunkESADULCNcjs.Textarea,
|
|
425
425
|
{
|
|
426
426
|
value: resolution,
|
|
427
427
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -431,9 +431,9 @@ function TicketReplyComposer({
|
|
|
431
431
|
className: "mt-2"
|
|
432
432
|
}
|
|
433
433
|
),
|
|
434
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
434
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkESADULCNcjs.AlertDialogFooter, { children: [
|
|
435
435
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
436
|
-
|
|
436
|
+
_chunkESADULCNcjs.AlertDialogCancel,
|
|
437
437
|
{
|
|
438
438
|
disabled: busy,
|
|
439
439
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -441,7 +441,7 @@ function TicketReplyComposer({
|
|
|
441
441
|
}
|
|
442
442
|
),
|
|
443
443
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
444
|
-
|
|
444
|
+
_chunkESADULCNcjs.AlertDialogAction,
|
|
445
445
|
{
|
|
446
446
|
onClick: () => void confirmClose(),
|
|
447
447
|
disabled: busy,
|
|
@@ -511,7 +511,7 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
511
511
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
512
512
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
513
513
|
function TicketTimelinePanel({ ticket }) {
|
|
514
|
-
const identity =
|
|
514
|
+
const identity = _chunkESADULCNcjs.useChatIdentity.call(void 0, );
|
|
515
515
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
516
516
|
const { engagements, isLoading } = useTicketEngagements(
|
|
517
517
|
externalId,
|
|
@@ -531,11 +531,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
531
531
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _19 => _19.user, 'optionalAccess', _20 => _20.email]) || "You";
|
|
532
532
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.avatarUrl]), () => ( void 0)) : void 0;
|
|
533
533
|
if (isLoading) {
|
|
534
|
-
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,
|
|
534
|
+
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, _chunkESADULCNcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
535
535
|
}
|
|
536
536
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
537
537
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
538
|
-
|
|
538
|
+
_chunk3JRA55FZcjs.EmptyState,
|
|
539
539
|
{
|
|
540
540
|
type: "generic",
|
|
541
541
|
title: "No conversation yet",
|
|
@@ -550,7 +550,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
550
550
|
const isResolution = turn.startsWith("[Resolution]");
|
|
551
551
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
552
552
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
553
|
-
|
|
553
|
+
_chunkESADULCNcjs.ChatMessageRow,
|
|
554
554
|
{
|
|
555
555
|
displayName: customerName,
|
|
556
556
|
avatarUrl: customerAvatar,
|
|
@@ -579,13 +579,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
579
579
|
}
|
|
580
580
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
581
581
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
582
|
-
|
|
582
|
+
_chunkESADULCNcjs.ChatMessageRow,
|
|
583
583
|
{
|
|
584
584
|
displayName: author,
|
|
585
585
|
avatarUrl: avatarSrc,
|
|
586
|
-
timeLabel: eng.createdAt ?
|
|
586
|
+
timeLabel: eng.createdAt ? _chunkESADULCNcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
587
587
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
588
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
588
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkESADULCNcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
589
589
|
},
|
|
590
590
|
eng.id
|
|
591
591
|
);
|
|
@@ -673,7 +673,7 @@ function AssignedAgentRow({
|
|
|
673
673
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary uppercase tracking-wider font-medium", children: "Assigned to" }),
|
|
674
674
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
675
675
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
676
|
-
|
|
676
|
+
_chunkESADULCNcjs.SquareAvatar,
|
|
677
677
|
{
|
|
678
678
|
size: "sm",
|
|
679
679
|
variant: "round",
|
|
@@ -704,7 +704,7 @@ function TicketRow({
|
|
|
704
704
|
const rowRef = _react.useRef.call(void 0, null);
|
|
705
705
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
706
706
|
onToggle(ticket.id);
|
|
707
|
-
|
|
707
|
+
_chunkESADULCNcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
708
708
|
adjustTargetY: (raw) => {
|
|
709
709
|
if (!rowRef.current) return raw;
|
|
710
710
|
const expandedDrawer = document.querySelector(
|
|
@@ -730,7 +730,7 @@ function TicketRow({
|
|
|
730
730
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
731
731
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
732
732
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
733
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
733
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkESADULCNcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
734
734
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
735
735
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
736
736
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -745,7 +745,7 @@ function TicketRow({
|
|
|
745
745
|
className: "border-b border-ods-border last:border-b-0",
|
|
746
746
|
children: [
|
|
747
747
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
748
|
-
|
|
748
|
+
_chunkESADULCNcjs.ChatTicketItem,
|
|
749
749
|
{
|
|
750
750
|
ticket: tileData,
|
|
751
751
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -814,7 +814,7 @@ function useTicketsList(filters) {
|
|
|
814
814
|
pageSize
|
|
815
815
|
};
|
|
816
816
|
if (statusFilter) body.status = statusFilter;
|
|
817
|
-
const response = await
|
|
817
|
+
const response = await _chunkESADULCNcjs.embedAuthedFetch.call(void 0, FIND_TICKET_ENDPOINT, {
|
|
818
818
|
method: "POST",
|
|
819
819
|
body: JSON.stringify(body)
|
|
820
820
|
});
|
|
@@ -928,7 +928,7 @@ function useTicketActions(options) {
|
|
|
928
928
|
}, []);
|
|
929
929
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
930
930
|
async (toolName, args) => {
|
|
931
|
-
const res = await
|
|
931
|
+
const res = await _chunkESADULCNcjs.embedAuthedFetch.call(void 0, TICKET_ACTION_ENDPOINT, {
|
|
932
932
|
method: "POST",
|
|
933
933
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
934
934
|
});
|
|
@@ -1313,13 +1313,13 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1313
1313
|
// src/components/tickets/ticket-center.tsx
|
|
1314
1314
|
|
|
1315
1315
|
function TicketCenter({ toast: toast2 = _chunk27VVOBDBcjs.toast } = {}) {
|
|
1316
|
-
const identity =
|
|
1316
|
+
const identity = _chunkESADULCNcjs.useChatIdentity.call(void 0, );
|
|
1317
1317
|
if (identity.isLoading) {
|
|
1318
1318
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1319
1319
|
}
|
|
1320
1320
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email])) {
|
|
1321
1321
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1322
|
-
|
|
1322
|
+
_chunk3JRA55FZcjs.EmptyState,
|
|
1323
1323
|
{
|
|
1324
1324
|
type: "generic",
|
|
1325
1325
|
title: "Sign in to manage tickets",
|
|
@@ -1390,7 +1390,7 @@ function TicketCenterAuthed({
|
|
|
1390
1390
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1391
1391
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1392
1392
|
"Updated ",
|
|
1393
|
-
|
|
1393
|
+
_chunkESADULCNcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1394
1394
|
] }),
|
|
1395
1395
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1396
1396
|
_chunkGRTZ23GLcjs.Button,
|
|
@@ -1406,15 +1406,15 @@ function TicketCenterAuthed({
|
|
|
1406
1406
|
)
|
|
1407
1407
|
] })
|
|
1408
1408
|
] }),
|
|
1409
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1410
|
-
|
|
1409
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkESADULCNcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1410
|
+
_chunk3JRA55FZcjs.EmptyState,
|
|
1411
1411
|
{
|
|
1412
1412
|
type: "generic",
|
|
1413
1413
|
title: "No tickets yet",
|
|
1414
1414
|
description: "Open one above to start the conversation.",
|
|
1415
1415
|
showCTA: false
|
|
1416
1416
|
}
|
|
1417
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1417
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkESADULCNcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1418
1418
|
TicketRow,
|
|
1419
1419
|
{
|
|
1420
1420
|
ticket,
|
|
@@ -1434,7 +1434,7 @@ function TicketCenterAuthed({
|
|
|
1434
1434
|
}
|
|
1435
1435
|
function TicketCenterSkeleton() {
|
|
1436
1436
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1437
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1437
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkESADULCNcjs.Card, { className: "p-6", children: [
|
|
1438
1438
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRTZ23GLcjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1439
1439
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRTZ23GLcjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1440
1440
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRTZ23GLcjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1443,7 +1443,7 @@ function TicketCenterSkeleton() {
|
|
|
1443
1443
|
] });
|
|
1444
1444
|
}
|
|
1445
1445
|
function TicketListSkeleton() {
|
|
1446
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1446
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkESADULCNcjs.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: [
|
|
1447
1447
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1448
1448
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRTZ23GLcjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1449
1449
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRTZ23GLcjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1456,7 +1456,7 @@ function TicketListSkeleton() {
|
|
|
1456
1456
|
// src/components/tickets/help-center-list.tsx
|
|
1457
1457
|
|
|
1458
1458
|
|
|
1459
|
-
|
|
1459
|
+
_chunk3JRA55FZcjs.init_unified_pagination.call(void 0, );
|
|
1460
1460
|
|
|
1461
1461
|
// src/components/tickets/help-center-card.tsx
|
|
1462
1462
|
|
|
@@ -1478,7 +1478,7 @@ function HelpCenterCard({
|
|
|
1478
1478
|
const optimistic = isOptimistic(ticket);
|
|
1479
1479
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1480
1480
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1481
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1481
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkESADULCNcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1482
1482
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1483
1483
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1484
1484
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1491,7 +1491,7 @@ function HelpCenterCard({
|
|
|
1491
1491
|
_react.useEffect.call(void 0, () => {
|
|
1492
1492
|
if (!isExpanded) return;
|
|
1493
1493
|
const raf = requestAnimationFrame(() => {
|
|
1494
|
-
|
|
1494
|
+
_chunkESADULCNcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1495
1495
|
headerOffset: STICKY_HEADER_OFFSET_PX
|
|
1496
1496
|
});
|
|
1497
1497
|
});
|
|
@@ -1499,16 +1499,16 @@ function HelpCenterCard({
|
|
|
1499
1499
|
}, [isExpanded]);
|
|
1500
1500
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1501
1501
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1502
|
-
|
|
1502
|
+
_chunkESADULCNcjs.StatusBadge,
|
|
1503
1503
|
{
|
|
1504
1504
|
text: rawStatus,
|
|
1505
|
-
colorScheme:
|
|
1505
|
+
colorScheme: _chunkESADULCNcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1506
1506
|
variant: "card",
|
|
1507
1507
|
className: "border border-ods-border"
|
|
1508
1508
|
}
|
|
1509
1509
|
),
|
|
1510
1510
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1511
|
-
|
|
1511
|
+
_chunkESADULCNcjs.StatusBadge,
|
|
1512
1512
|
{
|
|
1513
1513
|
text: priority,
|
|
1514
1514
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1535,7 +1535,7 @@ function HelpCenterCard({
|
|
|
1535
1535
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1536
1536
|
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",
|
|
1537
1537
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1538
|
-
|
|
1538
|
+
_chunkYJVDQZ5Ycjs.DevCardRowContent,
|
|
1539
1539
|
{
|
|
1540
1540
|
title,
|
|
1541
1541
|
subtitle,
|
|
@@ -1610,7 +1610,7 @@ function HelpCenterCreateForm({
|
|
|
1610
1610
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1611
1611
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1612
1612
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1613
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1613
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkESADULCNcjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1614
1614
|
"Subject",
|
|
1615
1615
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1616
1616
|
] }),
|
|
@@ -1642,7 +1642,7 @@ function HelpCenterCreateForm({
|
|
|
1642
1642
|
)
|
|
1643
1643
|
] });
|
|
1644
1644
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1645
|
-
|
|
1645
|
+
_chunkP2G5X6AWcjs.ContactForm,
|
|
1646
1646
|
{
|
|
1647
1647
|
title: "Open a new ticket",
|
|
1648
1648
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1680,7 +1680,7 @@ function HelpCenterCreateForm({
|
|
|
1680
1680
|
// src/components/tickets/help-center-list.tsx
|
|
1681
1681
|
|
|
1682
1682
|
function HelpCenterList({ toast: toast2 = _chunk27VVOBDBcjs.toast } = {}) {
|
|
1683
|
-
const identity =
|
|
1683
|
+
const identity = _chunkESADULCNcjs.useChatIdentity.call(void 0, );
|
|
1684
1684
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1685
1685
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1686
1686
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1690,11 +1690,11 @@ function HelpCenterList({ toast: toast2 = _chunk27VVOBDBcjs.toast } = {}) {
|
|
|
1690
1690
|
const rawPage = Number(searchParams.get("page"));
|
|
1691
1691
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1692
1692
|
if (identity.isLoading) {
|
|
1693
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1693
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYJVDQZ5Ycjs.DevSectionPage, { sectionKey: "tickets", preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYJVDQZ5Ycjs.DevCardRowSkeletonList, {}) });
|
|
1694
1694
|
}
|
|
1695
1695
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _60 => _60.user, 'optionalAccess', _61 => _61.email])) {
|
|
1696
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1697
|
-
|
|
1696
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYJVDQZ5Ycjs.DevSectionPage, { sectionKey: "tickets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1697
|
+
_chunk3JRA55FZcjs.EmptyState,
|
|
1698
1698
|
{
|
|
1699
1699
|
type: "generic",
|
|
1700
1700
|
title: "Sign in to manage tickets",
|
|
@@ -1819,15 +1819,15 @@ function HelpCenterListAuthed({
|
|
|
1819
1819
|
] }),
|
|
1820
1820
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGRTZ23GLcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1821
1821
|
] }),
|
|
1822
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1822
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYJVDQZ5Ycjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1823
1823
|
// Bridge state — background refetch in flight and the
|
|
1824
1824
|
// optimistic placeholder was just removed by the mutation
|
|
1825
1825
|
// callback. Without this branch "No tickets yet" would flash
|
|
1826
1826
|
// for ~50ms between `removeOptimistic` and the server
|
|
1827
1827
|
// response landing.
|
|
1828
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1828
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYJVDQZ5Ycjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1829
1829
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1830
|
-
|
|
1830
|
+
_chunk3JRA55FZcjs.EmptyState,
|
|
1831
1831
|
{
|
|
1832
1832
|
type: "search",
|
|
1833
1833
|
title: "No tickets found",
|
|
@@ -1842,7 +1842,7 @@ function HelpCenterListAuthed({
|
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
1844
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1845
|
-
|
|
1845
|
+
_chunk3JRA55FZcjs.EmptyState,
|
|
1846
1846
|
{
|
|
1847
1847
|
type: "generic",
|
|
1848
1848
|
title: "No tickets yet",
|
|
@@ -1876,9 +1876,9 @@ function HelpCenterListAuthed({
|
|
|
1876
1876
|
ticket.id
|
|
1877
1877
|
)) })
|
|
1878
1878
|
) }),
|
|
1879
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1879
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3JRA55FZcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1880
1880
|
] });
|
|
1881
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1881
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYJVDQZ5Ycjs.DevSectionPage, { sectionKey: "tickets", preControls: form, children: body });
|
|
1882
1882
|
}
|
|
1883
1883
|
|
|
1884
1884
|
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
EmptyState,
|
|
5
5
|
UnifiedPagination,
|
|
6
6
|
init_unified_pagination
|
|
7
|
-
} from "../../chunk-
|
|
7
|
+
} from "../../chunk-QRGODKEG.js";
|
|
8
8
|
import {
|
|
9
9
|
DevCardRowContent,
|
|
10
10
|
DevCardRowSkeletonList,
|
|
11
11
|
DevSectionPage
|
|
12
|
-
} from "../../chunk-
|
|
12
|
+
} from "../../chunk-LXDA67PW.js";
|
|
13
13
|
import "../../chunk-4XLJWX2N.js";
|
|
14
14
|
import {
|
|
15
15
|
ContactForm
|
|
16
|
-
} from "../../chunk-
|
|
16
|
+
} from "../../chunk-DB4HW42V.js";
|
|
17
17
|
import {
|
|
18
18
|
AlertDialog,
|
|
19
19
|
AlertDialogAction,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
scrollElementIntoView,
|
|
42
42
|
useChatAttachments,
|
|
43
43
|
useChatIdentity
|
|
44
|
-
} from "../../chunk-
|
|
44
|
+
} from "../../chunk-NZST65RV.js";
|
|
45
45
|
import {
|
|
46
46
|
toast
|
|
47
47
|
} from "../../chunk-UECRKCKH.js";
|