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