@flamingo-stack/openframe-frontend-core 0.0.271 → 0.0.272
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-3DYASQEL.js → chunk-4SNHFZQT.js} +3 -3
- package/dist/{chunk-CICK3FUU.cjs → chunk-7NJUPRN6.cjs} +7 -2
- package/dist/chunk-7NJUPRN6.cjs.map +1 -0
- package/dist/{chunk-ICOMPUMX.js → chunk-BSOHVQ7X.js} +6 -1
- package/dist/chunk-BSOHVQ7X.js.map +1 -0
- package/dist/{chunk-YH74UZRG.cjs → chunk-EEMZBQ7O.cjs} +25 -25
- package/dist/{chunk-YH74UZRG.cjs.map → chunk-EEMZBQ7O.cjs.map} +1 -1
- package/dist/{chunk-FC6YVRUW.cjs → chunk-IXRPEMZP.cjs} +15 -15
- package/dist/{chunk-FC6YVRUW.cjs.map → chunk-IXRPEMZP.cjs.map} +1 -1
- package/dist/{chunk-J35EWU2W.js → chunk-MCCYGAPE.js} +2 -2
- package/dist/{chunk-P7JHUX4X.js → chunk-N5MCKGAB.js} +2 -2
- package/dist/{chunk-5CTV435G.cjs → chunk-Q32JUFIK.cjs} +880 -810
- package/dist/chunk-Q32JUFIK.cjs.map +1 -0
- package/dist/{chunk-56V4MC32.js → chunk-UQCB2CP7.js} +35 -6
- package/dist/chunk-UQCB2CP7.js.map +1 -0
- package/dist/{chunk-LELTRQZV.cjs → chunk-V5OZQF4B.cjs} +69 -40
- package/dist/chunk-V5OZQF4B.cjs.map +1 -0
- package/dist/{chunk-BCPLTDRW.js → chunk-VFMMVGA4.js} +3280 -3210
- package/dist/chunk-VFMMVGA4.js.map +1 -0
- package/dist/{chunk-AA77CC2Y.cjs → chunk-XDGDCO3I.cjs} +12 -12
- package/dist/{chunk-AA77CC2Y.cjs.map → chunk-XDGDCO3I.cjs.map} +1 -1
- package/dist/components/chat/entity-cards/index.d.ts +2 -0
- package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/what-i-shipped-card.d.ts +43 -0
- package/dist/components/chat/entity-cards/what-i-shipped-card.d.ts.map +1 -0
- package/dist/components/chat/index.cjs +7 -3
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +6 -2
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/form.d.ts +3 -1
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/index.cjs +88 -98
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +10 -20
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/onboarding-guides/index.cjs +22 -22
- package/dist/components/onboarding-guides/index.js +2 -2
- package/dist/components/related-content/index.cjs +4 -4
- package/dist/components/related-content/index.js +3 -3
- package/dist/components/related-content/related-content-section.d.ts +13 -1
- package/dist/components/related-content/related-content-section.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +62 -62
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/index.cjs +7 -3
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +6 -2
- package/dist/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -2
- package/dist/utils/format.d.ts +8 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/index.cjs +5 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-container.tsx +1 -1
- package/src/components/chat/entity-cards/index.ts +2 -0
- package/src/components/chat/entity-cards/what-i-shipped-card.tsx +109 -0
- package/src/components/related-content/related-content-section.tsx +70 -4
- package/src/utils/format.ts +15 -0
- package/src/utils/index.ts +1 -0
- package/dist/chunk-56V4MC32.js.map +0 -1
- package/dist/chunk-5CTV435G.cjs.map +0 -1
- package/dist/chunk-BCPLTDRW.js.map +0 -1
- package/dist/chunk-CICK3FUU.cjs.map +0 -1
- package/dist/chunk-ICOMPUMX.js.map +0 -1
- package/dist/chunk-LELTRQZV.cjs.map +0 -1
- /package/dist/{chunk-3DYASQEL.js.map → chunk-4SNHFZQT.js.map} +0 -0
- /package/dist/{chunk-J35EWU2W.js.map → chunk-MCCYGAPE.js.map} +0 -0
- /package/dist/{chunk-P7JHUX4X.js.map → chunk-N5MCKGAB.js.map} +0 -0
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkIXRPEMZPcjs = require('../../chunk-IXRPEMZP.cjs');
|
|
11
11
|
require('../../chunk-VFKQMAUF.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkEEMZBQ7Ocjs = require('../../chunk-EEMZBQ7O.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -35,7 +35,7 @@ var _chunkYH74UZRGcjs = require('../../chunk-YH74UZRG.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkQ32JUFIKcjs = require('../../chunk-Q32JUFIK.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
var _chunkQLWBBCI5cjs = require('../../chunk-QLWBBCI5.cjs');
|
|
@@ -52,7 +52,7 @@ require('../../chunk-PXXS27EE.cjs');
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunk7NJUPRN6cjs = require('../../chunk-7NJUPRN6.cjs');
|
|
56
56
|
require('../../chunk-DAAFVOTL.cjs');
|
|
57
57
|
require('../../chunk-MEAR2WHS.cjs');
|
|
58
58
|
require('../../chunk-XL4V2PYG.cjs');
|
|
@@ -111,7 +111,7 @@ function TicketOpenForm({
|
|
|
111
111
|
}) {
|
|
112
112
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
113
113
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
114
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
114
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkQ32JUFIKcjs.useChatAttachments.call(void 0, );
|
|
115
115
|
const trimmedSubject = subject.trim();
|
|
116
116
|
const trimmedContent = content.trim();
|
|
117
117
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -131,7 +131,7 @@ function TicketOpenForm({
|
|
|
131
131
|
clear();
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
134
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7NJUPRN6cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
135
135
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
136
136
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
137
137
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-sm", children: "Can't find what you're looking for? Submit a support ticket below \u2014 we'll follow up shortly." }),
|
|
@@ -170,7 +170,7 @@ function TicketOpenForm({
|
|
|
170
170
|
}
|
|
171
171
|
),
|
|
172
172
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
173
|
-
|
|
173
|
+
_chunkQ32JUFIKcjs.Textarea,
|
|
174
174
|
{
|
|
175
175
|
id: "ticket-content",
|
|
176
176
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -194,7 +194,7 @@ function TicketOpenForm({
|
|
|
194
194
|
)
|
|
195
195
|
] }),
|
|
196
196
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
197
|
-
|
|
197
|
+
_chunkQ32JUFIKcjs.ChatAttachmentChipStrip,
|
|
198
198
|
{
|
|
199
199
|
attachments,
|
|
200
200
|
onRemove: removeAttachment,
|
|
@@ -203,7 +203,7 @@ function TicketOpenForm({
|
|
|
203
203
|
),
|
|
204
204
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
205
205
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
206
|
-
|
|
206
|
+
_chunkQ32JUFIKcjs.ChatAttachmentAddButton,
|
|
207
207
|
{
|
|
208
208
|
attachmentsEnabled: !supportSystemDown,
|
|
209
209
|
attachmentsCount: attachments.length,
|
|
@@ -241,7 +241,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
241
241
|
|
|
242
242
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
243
243
|
function useTicketEngagements(externalTicketId, enabled = true, refetchInterval = false) {
|
|
244
|
-
const identity =
|
|
244
|
+
const identity = _chunkQ32JUFIKcjs.useChatIdentity.call(void 0, );
|
|
245
245
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
246
246
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
247
247
|
const queryEnabled = fetchable && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _4 => _4.user, 'optionalAccess', _5 => _5.email]);
|
|
@@ -261,7 +261,7 @@ function useTicketEngagements(externalTicketId, enabled = true, refetchInterval
|
|
|
261
261
|
// so polling pauses on a hidden tab.
|
|
262
262
|
refetchInterval,
|
|
263
263
|
queryFn: async () => {
|
|
264
|
-
const response = await
|
|
264
|
+
const response = await _chunkQ32JUFIKcjs.embedAuthedFetch.call(void 0, LIST_ENGAGEMENTS_ENDPOINT, {
|
|
265
265
|
method: "POST",
|
|
266
266
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
267
267
|
});
|
|
@@ -322,7 +322,7 @@ function TicketLinkedDeliveryCard({
|
|
|
322
322
|
{
|
|
323
323
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
324
324
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
325
|
-
|
|
325
|
+
_chunkIXRPEMZPcjs.DeliveryRow,
|
|
326
326
|
{
|
|
327
327
|
item,
|
|
328
328
|
href: clickup.delivery_href,
|
|
@@ -346,7 +346,7 @@ function TicketReplyComposer({
|
|
|
346
346
|
}) {
|
|
347
347
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
348
348
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
349
|
-
const attachments =
|
|
349
|
+
const attachments = _chunkQ32JUFIKcjs.useChatAttachments.call(void 0, );
|
|
350
350
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
351
351
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
352
352
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -374,7 +374,7 @@ function TicketReplyComposer({
|
|
|
374
374
|
const disabled = busy || supportSystemDown;
|
|
375
375
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
376
376
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
377
|
-
|
|
377
|
+
_chunkQ32JUFIKcjs.ChatAttachmentChipStrip,
|
|
378
378
|
{
|
|
379
379
|
attachments: attachments.attachments,
|
|
380
380
|
onRemove: attachments.removeAttachment,
|
|
@@ -383,7 +383,7 @@ function TicketReplyComposer({
|
|
|
383
383
|
}
|
|
384
384
|
),
|
|
385
385
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
386
|
-
|
|
386
|
+
_chunkQ32JUFIKcjs.ChatInput,
|
|
387
387
|
{
|
|
388
388
|
fullWidth: true,
|
|
389
389
|
autoFocus: true,
|
|
@@ -397,7 +397,7 @@ function TicketReplyComposer({
|
|
|
397
397
|
),
|
|
398
398
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
399
399
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
400
|
-
|
|
400
|
+
_chunkQ32JUFIKcjs.ChatAttachmentAddButton,
|
|
401
401
|
{
|
|
402
402
|
attachmentsEnabled: true,
|
|
403
403
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -420,13 +420,13 @@ function TicketReplyComposer({
|
|
|
420
420
|
}
|
|
421
421
|
)
|
|
422
422
|
] }),
|
|
423
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
424
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
425
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
426
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
423
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQ32JUFIKcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQ32JUFIKcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
424
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQ32JUFIKcjs.AlertDialogHeader, { children: [
|
|
425
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQ32JUFIKcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
426
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQ32JUFIKcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
427
427
|
] }),
|
|
428
428
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
429
|
-
|
|
429
|
+
_chunkQ32JUFIKcjs.Textarea,
|
|
430
430
|
{
|
|
431
431
|
value: resolution,
|
|
432
432
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -436,9 +436,9 @@ function TicketReplyComposer({
|
|
|
436
436
|
className: "mt-2"
|
|
437
437
|
}
|
|
438
438
|
),
|
|
439
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
439
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQ32JUFIKcjs.AlertDialogFooter, { children: [
|
|
440
440
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
441
|
-
|
|
441
|
+
_chunkQ32JUFIKcjs.AlertDialogCancel,
|
|
442
442
|
{
|
|
443
443
|
disabled: busy,
|
|
444
444
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -446,7 +446,7 @@ function TicketReplyComposer({
|
|
|
446
446
|
}
|
|
447
447
|
),
|
|
448
448
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
449
|
-
|
|
449
|
+
_chunkQ32JUFIKcjs.AlertDialogAction,
|
|
450
450
|
{
|
|
451
451
|
onClick: () => void confirmClose(),
|
|
452
452
|
disabled: busy,
|
|
@@ -516,7 +516,7 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
516
516
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
517
517
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
518
518
|
function TicketTimelinePanel({ ticket }) {
|
|
519
|
-
const identity =
|
|
519
|
+
const identity = _chunkQ32JUFIKcjs.useChatIdentity.call(void 0, );
|
|
520
520
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
521
521
|
const { engagements, isLoading } = useTicketEngagements(
|
|
522
522
|
externalId,
|
|
@@ -536,11 +536,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
536
536
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _19 => _19.user, 'optionalAccess', _20 => _20.email]) || "You";
|
|
537
537
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.avatarUrl]), () => ( void 0)) : void 0;
|
|
538
538
|
if (isLoading) {
|
|
539
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${TICKET_FEED_FRAME} ${TICKET_FEED_HEIGHT}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: TICKET_FEED_INNER, children: Array.from({ length: TICKET_FEED_SKELETON_ROWS }, (_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
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, _chunkQ32JUFIKcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
540
540
|
}
|
|
541
541
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
542
542
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
543
|
-
|
|
543
|
+
_chunkIXRPEMZPcjs.EmptyState,
|
|
544
544
|
{
|
|
545
545
|
type: "generic",
|
|
546
546
|
title: "No conversation yet",
|
|
@@ -555,7 +555,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
555
555
|
const isResolution = turn.startsWith("[Resolution]");
|
|
556
556
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
557
557
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
558
|
-
|
|
558
|
+
_chunkQ32JUFIKcjs.ChatMessageRow,
|
|
559
559
|
{
|
|
560
560
|
displayName: customerName,
|
|
561
561
|
avatarUrl: customerAvatar,
|
|
@@ -584,13 +584,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
584
584
|
}
|
|
585
585
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
586
586
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
587
|
-
|
|
587
|
+
_chunkQ32JUFIKcjs.ChatMessageRow,
|
|
588
588
|
{
|
|
589
589
|
displayName: author,
|
|
590
590
|
avatarUrl: avatarSrc,
|
|
591
|
-
timeLabel: eng.createdAt ?
|
|
591
|
+
timeLabel: eng.createdAt ? _chunkQ32JUFIKcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
592
592
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
593
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
593
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQ32JUFIKcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
594
594
|
},
|
|
595
595
|
eng.id
|
|
596
596
|
);
|
|
@@ -678,7 +678,7 @@ function AssignedAgentRow({
|
|
|
678
678
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary uppercase tracking-wider font-medium", children: "Assigned to" }),
|
|
679
679
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
680
680
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
681
|
-
|
|
681
|
+
_chunk7NJUPRN6cjs.SquareAvatar,
|
|
682
682
|
{
|
|
683
683
|
size: "sm",
|
|
684
684
|
variant: "round",
|
|
@@ -735,7 +735,7 @@ function TicketRow({
|
|
|
735
735
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
736
736
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
737
737
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
738
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
738
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkQ32JUFIKcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
739
739
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
740
740
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
741
741
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -750,7 +750,7 @@ function TicketRow({
|
|
|
750
750
|
className: "border-b border-ods-border last:border-b-0",
|
|
751
751
|
children: [
|
|
752
752
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
753
|
-
|
|
753
|
+
_chunkQ32JUFIKcjs.ChatTicketItem,
|
|
754
754
|
{
|
|
755
755
|
ticket: tileData,
|
|
756
756
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -819,7 +819,7 @@ function useTicketsList(filters) {
|
|
|
819
819
|
pageSize
|
|
820
820
|
};
|
|
821
821
|
if (statusFilter) body.status = statusFilter;
|
|
822
|
-
const response = await
|
|
822
|
+
const response = await _chunkQ32JUFIKcjs.embedAuthedFetch.call(void 0, FIND_TICKET_ENDPOINT, {
|
|
823
823
|
method: "POST",
|
|
824
824
|
body: JSON.stringify(body)
|
|
825
825
|
});
|
|
@@ -933,7 +933,7 @@ function useTicketActions(options) {
|
|
|
933
933
|
}, []);
|
|
934
934
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
935
935
|
async (toolName, args) => {
|
|
936
|
-
const res = await
|
|
936
|
+
const res = await _chunkQ32JUFIKcjs.embedAuthedFetch.call(void 0, TICKET_ACTION_ENDPOINT, {
|
|
937
937
|
method: "POST",
|
|
938
938
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
939
939
|
});
|
|
@@ -1318,13 +1318,13 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1318
1318
|
// src/components/tickets/ticket-center.tsx
|
|
1319
1319
|
|
|
1320
1320
|
function TicketCenter({ toast: toast2 = _chunkQLWBBCI5cjs.toast } = {}) {
|
|
1321
|
-
const identity =
|
|
1321
|
+
const identity = _chunkQ32JUFIKcjs.useChatIdentity.call(void 0, );
|
|
1322
1322
|
if (identity.isLoading) {
|
|
1323
1323
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1324
1324
|
}
|
|
1325
1325
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email])) {
|
|
1326
1326
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1327
|
-
|
|
1327
|
+
_chunkIXRPEMZPcjs.EmptyState,
|
|
1328
1328
|
{
|
|
1329
1329
|
type: "generic",
|
|
1330
1330
|
title: "Sign in to manage tickets",
|
|
@@ -1395,7 +1395,7 @@ function TicketCenterAuthed({
|
|
|
1395
1395
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1396
1396
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1397
1397
|
"Updated ",
|
|
1398
|
-
|
|
1398
|
+
_chunkQ32JUFIKcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1399
1399
|
] }),
|
|
1400
1400
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1401
1401
|
_chunkN5UOJC3Vcjs.Button,
|
|
@@ -1411,15 +1411,15 @@ function TicketCenterAuthed({
|
|
|
1411
1411
|
)
|
|
1412
1412
|
] })
|
|
1413
1413
|
] }),
|
|
1414
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1415
|
-
|
|
1414
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7NJUPRN6cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1415
|
+
_chunkIXRPEMZPcjs.EmptyState,
|
|
1416
1416
|
{
|
|
1417
1417
|
type: "generic",
|
|
1418
1418
|
title: "No tickets yet",
|
|
1419
1419
|
description: "Open one above to start the conversation.",
|
|
1420
1420
|
showCTA: false
|
|
1421
1421
|
}
|
|
1422
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1422
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7NJUPRN6cjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1423
1423
|
TicketRow,
|
|
1424
1424
|
{
|
|
1425
1425
|
ticket,
|
|
@@ -1439,7 +1439,7 @@ function TicketCenterAuthed({
|
|
|
1439
1439
|
}
|
|
1440
1440
|
function TicketCenterSkeleton() {
|
|
1441
1441
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1442
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1442
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk7NJUPRN6cjs.Card, { className: "p-6", children: [
|
|
1443
1443
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1444
1444
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1445
1445
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1448,7 +1448,7 @@ function TicketCenterSkeleton() {
|
|
|
1448
1448
|
] });
|
|
1449
1449
|
}
|
|
1450
1450
|
function TicketListSkeleton() {
|
|
1451
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1451
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7NJUPRN6cjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "h-20 px-4 flex items-center gap-4 border-b border-ods-border last:border-b-0", children: [
|
|
1452
1452
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1453
1453
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1454
1454
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1461,7 +1461,7 @@ function TicketListSkeleton() {
|
|
|
1461
1461
|
// src/components/tickets/help-center-list.tsx
|
|
1462
1462
|
|
|
1463
1463
|
|
|
1464
|
-
|
|
1464
|
+
_chunkIXRPEMZPcjs.init_unified_pagination.call(void 0, );
|
|
1465
1465
|
|
|
1466
1466
|
// src/components/tickets/help-center-card.tsx
|
|
1467
1467
|
|
|
@@ -1483,7 +1483,7 @@ function HelpCenterCard({
|
|
|
1483
1483
|
const optimistic = isOptimistic(ticket);
|
|
1484
1484
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1485
1485
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1486
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1486
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkQ32JUFIKcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1487
1487
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1488
1488
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1489
1489
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1504,16 +1504,16 @@ function HelpCenterCard({
|
|
|
1504
1504
|
}, [isExpanded]);
|
|
1505
1505
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1506
1506
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1507
|
-
|
|
1507
|
+
_chunk7NJUPRN6cjs.StatusBadge,
|
|
1508
1508
|
{
|
|
1509
1509
|
text: rawStatus,
|
|
1510
|
-
colorScheme:
|
|
1510
|
+
colorScheme: _chunkQ32JUFIKcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1511
1511
|
variant: "card",
|
|
1512
1512
|
className: "border border-ods-border"
|
|
1513
1513
|
}
|
|
1514
1514
|
),
|
|
1515
1515
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1516
|
-
|
|
1516
|
+
_chunk7NJUPRN6cjs.StatusBadge,
|
|
1517
1517
|
{
|
|
1518
1518
|
text: priority,
|
|
1519
1519
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1540,7 +1540,7 @@ function HelpCenterCard({
|
|
|
1540
1540
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1541
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",
|
|
1542
1542
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1543
|
-
|
|
1543
|
+
_chunkIXRPEMZPcjs.DevCardRowContent,
|
|
1544
1544
|
{
|
|
1545
1545
|
title,
|
|
1546
1546
|
subtitle,
|
|
@@ -1615,7 +1615,7 @@ function HelpCenterCreateForm({
|
|
|
1615
1615
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1616
1616
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1617
1617
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1618
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1618
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQ32JUFIKcjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1619
1619
|
"Subject",
|
|
1620
1620
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1621
1621
|
] }),
|
|
@@ -1647,7 +1647,7 @@ function HelpCenterCreateForm({
|
|
|
1647
1647
|
)
|
|
1648
1648
|
] });
|
|
1649
1649
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1650
|
-
|
|
1650
|
+
_chunkEEMZBQ7Ocjs.ContactForm,
|
|
1651
1651
|
{
|
|
1652
1652
|
title: "Open a new ticket",
|
|
1653
1653
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1685,7 +1685,7 @@ function HelpCenterCreateForm({
|
|
|
1685
1685
|
// src/components/tickets/help-center-list.tsx
|
|
1686
1686
|
|
|
1687
1687
|
function HelpCenterList({ toast: toast2 = _chunkQLWBBCI5cjs.toast } = {}) {
|
|
1688
|
-
const identity =
|
|
1688
|
+
const identity = _chunkQ32JUFIKcjs.useChatIdentity.call(void 0, );
|
|
1689
1689
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1690
1690
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1691
1691
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1695,11 +1695,11 @@ function HelpCenterList({ toast: toast2 = _chunkQLWBBCI5cjs.toast } = {}) {
|
|
|
1695
1695
|
const rawPage = Number(searchParams.get("page"));
|
|
1696
1696
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1697
1697
|
if (identity.isLoading) {
|
|
1698
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1698
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIXRPEMZPcjs.DevSectionPage, { sectionKey: "tickets", preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIXRPEMZPcjs.DevCardRowSkeletonList, {}) });
|
|
1699
1699
|
}
|
|
1700
1700
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _60 => _60.user, 'optionalAccess', _61 => _61.email])) {
|
|
1701
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1702
|
-
|
|
1701
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIXRPEMZPcjs.DevSectionPage, { sectionKey: "tickets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1702
|
+
_chunkIXRPEMZPcjs.EmptyState,
|
|
1703
1703
|
{
|
|
1704
1704
|
type: "generic",
|
|
1705
1705
|
title: "Sign in to manage tickets",
|
|
@@ -1824,15 +1824,15 @@ function HelpCenterListAuthed({
|
|
|
1824
1824
|
] }),
|
|
1825
1825
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkN5UOJC3Vcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1826
1826
|
] }),
|
|
1827
|
-
!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, _chunkIXRPEMZPcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1828
1828
|
// Bridge state — background refetch in flight and the
|
|
1829
1829
|
// optimistic placeholder was just removed by the mutation
|
|
1830
1830
|
// callback. Without this branch "No tickets yet" would flash
|
|
1831
1831
|
// for ~50ms between `removeOptimistic` and the server
|
|
1832
1832
|
// response landing.
|
|
1833
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1833
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIXRPEMZPcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1834
1834
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1835
|
-
|
|
1835
|
+
_chunkIXRPEMZPcjs.EmptyState,
|
|
1836
1836
|
{
|
|
1837
1837
|
type: "search",
|
|
1838
1838
|
title: "No tickets found",
|
|
@@ -1847,7 +1847,7 @@ function HelpCenterListAuthed({
|
|
|
1847
1847
|
}
|
|
1848
1848
|
}
|
|
1849
1849
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1850
|
-
|
|
1850
|
+
_chunkIXRPEMZPcjs.EmptyState,
|
|
1851
1851
|
{
|
|
1852
1852
|
type: "generic",
|
|
1853
1853
|
title: "No tickets yet",
|
|
@@ -1881,9 +1881,9 @@ function HelpCenterListAuthed({
|
|
|
1881
1881
|
ticket.id
|
|
1882
1882
|
)) })
|
|
1883
1883
|
) }),
|
|
1884
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1884
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIXRPEMZPcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1885
1885
|
] });
|
|
1886
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1886
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIXRPEMZPcjs.DevSectionPage, { sectionKey: "tickets", preControls: form, children: body });
|
|
1887
1887
|
}
|
|
1888
1888
|
|
|
1889
1889
|
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
EmptyState,
|
|
8
8
|
UnifiedPagination,
|
|
9
9
|
init_unified_pagination
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-4SNHFZQT.js";
|
|
11
11
|
import "../../chunk-4XLJWX2N.js";
|
|
12
12
|
import {
|
|
13
13
|
ContactForm
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-MCCYGAPE.js";
|
|
15
15
|
import {
|
|
16
16
|
AlertDialog,
|
|
17
17
|
AlertDialogAction,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
getStatusColorScheme,
|
|
36
36
|
useChatAttachments,
|
|
37
37
|
useChatIdentity
|
|
38
|
-
} from "../../chunk-
|
|
38
|
+
} from "../../chunk-VFMMVGA4.js";
|
|
39
39
|
import {
|
|
40
40
|
toast
|
|
41
41
|
} from "../../chunk-ZMFT5XOB.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
Card,
|
|
53
53
|
SquareAvatar,
|
|
54
54
|
StatusBadge
|
|
55
|
-
} from "../../chunk-
|
|
55
|
+
} from "../../chunk-BSOHVQ7X.js";
|
|
56
56
|
import "../../chunk-ZXZJSTNV.js";
|
|
57
57
|
import "../../chunk-4YKGXZ7W.js";
|
|
58
58
|
import "../../chunk-LXC6P2EO.js";
|