@flamingo-stack/openframe-frontend-core 0.0.214 → 0.0.215
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-KDNGUYZM.cjs → chunk-2G3NXF6J.cjs} +17 -17
- package/dist/{chunk-KDNGUYZM.cjs.map → chunk-2G3NXF6J.cjs.map} +1 -1
- package/dist/{chunk-HWY35EAK.js → chunk-7PCP7YQR.js} +2 -2
- package/dist/{chunk-YZUUFTIK.cjs → chunk-D4MNFY67.cjs} +3 -2
- package/dist/chunk-D4MNFY67.cjs.map +1 -0
- package/dist/{chunk-IZL2KEH6.cjs → chunk-NGFP4RVL.cjs} +24 -24
- package/dist/{chunk-IZL2KEH6.cjs.map → chunk-NGFP4RVL.cjs.map} +1 -1
- package/dist/{chunk-5OWDOFKK.js → chunk-R6MLPU4A.js} +2 -2
- package/dist/{chunk-UKND27XC.js → chunk-WQZP3JIZ.js} +3 -2
- package/dist/{chunk-UKND27XC.js.map → chunk-WQZP3JIZ.js.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 +49 -49
- package/dist/components/index.js +2 -2
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/tickets/index.cjs +61 -61
- package/dist/components/tickets/index.js +3 -3
- 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/platform/ShellTypeBadge.tsx +2 -2
- package/dist/chunk-YZUUFTIK.cjs.map +0 -1
- /package/dist/{chunk-HWY35EAK.js.map → chunk-7PCP7YQR.js.map} +0 -0
- /package/dist/{chunk-5OWDOFKK.js.map → chunk-R6MLPU4A.js.map} +0 -0
package/dist/components/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
UnifiedPagination,
|
|
12
12
|
init_unified_pagination,
|
|
13
13
|
unified_pagination_exports
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-R6MLPU4A.js";
|
|
15
15
|
import "../chunk-4XLJWX2N.js";
|
|
16
16
|
import {
|
|
17
17
|
AIEnrichButton,
|
|
@@ -617,7 +617,7 @@ import {
|
|
|
617
617
|
useTheme,
|
|
618
618
|
useThemeToggle,
|
|
619
619
|
useUnifiedChat
|
|
620
|
-
} from "../chunk-
|
|
620
|
+
} from "../chunk-WQZP3JIZ.js";
|
|
621
621
|
import {
|
|
622
622
|
CommandApprovalToast,
|
|
623
623
|
ToastCard,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkD4MNFY67cjs = require('../../chunk-D4MNFY67.cjs');
|
|
19
19
|
require('../../chunk-WT5JV2GS.cjs');
|
|
20
20
|
require('../../chunk-24KCAECR.cjs');
|
|
21
21
|
require('../../chunk-65CPJ4SX.cjs');
|
|
@@ -46,5 +46,5 @@ require('../../chunk-VRHGVLSL.cjs');
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
exports.AppHeader =
|
|
49
|
+
exports.AppHeader = _chunkD4MNFY67cjs.AppHeader; exports.AppLayout = _chunkD4MNFY67cjs.AppLayout; exports.ClientOnlyHeader = _chunkD4MNFY67cjs.ClientOnlyHeader; exports.Header = _chunkD4MNFY67cjs.Header; exports.HeaderButton = _chunkD4MNFY67cjs.HeaderButton; exports.HeaderGlobalSearch = _chunkD4MNFY67cjs.HeaderGlobalSearch; exports.HeaderOrganizationFilter = _chunkD4MNFY67cjs.HeaderOrganizationFilter; exports.HeaderSkeleton = _chunkD4MNFY67cjs.HeaderSkeleton; exports.MobileBurgerMenu = _chunkD4MNFY67cjs.MobileBurgerMenu; exports.MobileNavPanel = _chunkD4MNFY67cjs.MobileNavPanel; exports.NavigationSidebar = _chunkD4MNFY67cjs.NavigationSidebar; exports.SlidingSidebar = _chunkD4MNFY67cjs.SlidingSidebar; exports.StickySectionNav = _chunkD4MNFY67cjs.StickySectionNav; exports.useSectionNavigation = _chunkD4MNFY67cjs.useSectionNavigation;
|
|
50
50
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk2G3NXF6Jcjs = require('../../chunk-2G3NXF6J.cjs');
|
|
13
13
|
require('../../chunk-VFKQMAUF.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkNGFP4RVLcjs = require('../../chunk-NGFP4RVL.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -36,7 +36,7 @@ var _chunkIZL2KEH6cjs = require('../../chunk-IZL2KEH6.cjs');
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkD4MNFY67cjs = require('../../chunk-D4MNFY67.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunkWT5JV2GScjs = require('../../chunk-WT5JV2GS.cjs');
|
|
@@ -99,7 +99,7 @@ function TicketOpenForm({
|
|
|
99
99
|
}) {
|
|
100
100
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
101
101
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
102
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
102
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkD4MNFY67cjs.useChatAttachments.call(void 0, );
|
|
103
103
|
const trimmedSubject = subject.trim();
|
|
104
104
|
const trimmedContent = content.trim();
|
|
105
105
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -119,7 +119,7 @@ function TicketOpenForm({
|
|
|
119
119
|
clear();
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
122
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD4MNFY67cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
123
123
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
124
124
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
125
125
|
/* @__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." }),
|
|
@@ -158,7 +158,7 @@ function TicketOpenForm({
|
|
|
158
158
|
}
|
|
159
159
|
),
|
|
160
160
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
161
|
-
|
|
161
|
+
_chunkD4MNFY67cjs.Textarea,
|
|
162
162
|
{
|
|
163
163
|
id: "ticket-content",
|
|
164
164
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -182,7 +182,7 @@ function TicketOpenForm({
|
|
|
182
182
|
)
|
|
183
183
|
] }),
|
|
184
184
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
185
|
-
|
|
185
|
+
_chunkD4MNFY67cjs.ChatAttachmentChipStrip,
|
|
186
186
|
{
|
|
187
187
|
attachments,
|
|
188
188
|
onRemove: removeAttachment,
|
|
@@ -191,7 +191,7 @@ function TicketOpenForm({
|
|
|
191
191
|
),
|
|
192
192
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
193
193
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
194
|
-
|
|
194
|
+
_chunkD4MNFY67cjs.ChatAttachmentAddButton,
|
|
195
195
|
{
|
|
196
196
|
attachmentsEnabled: !supportSystemDown,
|
|
197
197
|
attachmentsCount: attachments.length,
|
|
@@ -229,7 +229,7 @@ _chunkUXZ3ZJ3Mcjs.init_button2.call(void 0, );
|
|
|
229
229
|
|
|
230
230
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
231
231
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
232
|
-
const identity =
|
|
232
|
+
const identity = _chunkD4MNFY67cjs.useChatIdentity.call(void 0, );
|
|
233
233
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _ => _.user, 'optionalAccess', _2 => _2.email]), () => ( "anon"));
|
|
234
234
|
const queryEnabled = enabled && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _3 => _3.user, 'optionalAccess', _4 => _4.email]) && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
235
235
|
const query = _reactquery.useQuery.call(void 0, {
|
|
@@ -243,7 +243,7 @@ function useTicketEngagements(externalTicketId, enabled = true) {
|
|
|
243
243
|
refetchOnMount: "always",
|
|
244
244
|
refetchOnWindowFocus: true,
|
|
245
245
|
queryFn: async () => {
|
|
246
|
-
const response = await
|
|
246
|
+
const response = await _chunkD4MNFY67cjs.embedAuthedFetch.call(void 0, LIST_ENGAGEMENTS_ENDPOINT, {
|
|
247
247
|
method: "POST",
|
|
248
248
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
249
249
|
});
|
|
@@ -291,7 +291,7 @@ function TicketLinkedDeliveryCard({
|
|
|
291
291
|
{
|
|
292
292
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
293
293
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
294
|
-
|
|
294
|
+
_chunk2G3NXF6Jcjs.DeliveryRow,
|
|
295
295
|
{
|
|
296
296
|
item,
|
|
297
297
|
href: clickup.delivery_href,
|
|
@@ -344,7 +344,7 @@ function TicketDetailDrawer({
|
|
|
344
344
|
}
|
|
345
345
|
var TURN_SEPARATOR_RE = /[\s]{1,16}---[\s]{1,16}/g;
|
|
346
346
|
function TicketTimelinePanel({ ticket }) {
|
|
347
|
-
const identity =
|
|
347
|
+
const identity = _chunkD4MNFY67cjs.useChatIdentity.call(void 0, );
|
|
348
348
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
349
349
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
350
350
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -356,10 +356,10 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
356
356
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _20 => _20.user, 'optionalAccess', _21 => _21.avatarUrl]), () => ( void 0)) : void 0;
|
|
357
357
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
358
358
|
if (isLoading) {
|
|
359
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
359
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2G3NXF6Jcjs.ConversationCardRowSkeletonList, { rows: 2 });
|
|
360
360
|
}
|
|
361
361
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
362
|
-
|
|
362
|
+
_chunk2G3NXF6Jcjs.EmptyState,
|
|
363
363
|
{
|
|
364
364
|
type: "generic",
|
|
365
365
|
title: "No conversation yet",
|
|
@@ -374,7 +374,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
374
374
|
const role = i === 0 ? "Original message" : isResolution ? "Resolution" : `Update ${i}`;
|
|
375
375
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
376
376
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
377
|
-
|
|
377
|
+
_chunk2G3NXF6Jcjs.ConversationCardRow,
|
|
378
378
|
{
|
|
379
379
|
author: customerName,
|
|
380
380
|
role,
|
|
@@ -404,7 +404,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
404
404
|
avatarSrc = void 0;
|
|
405
405
|
}
|
|
406
406
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
407
|
-
|
|
407
|
+
_chunk2G3NXF6Jcjs.ConversationCardRow,
|
|
408
408
|
{
|
|
409
409
|
author,
|
|
410
410
|
role: "Reply",
|
|
@@ -421,7 +421,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
421
421
|
// content rendered — drawer is showing the customer's body
|
|
422
422
|
// turns + cached engagements while a background refetch is
|
|
423
423
|
// in flight. Single row keeps the placeholder modest.
|
|
424
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
424
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2G3NXF6Jcjs.ConversationCardRowSkeletonList, { rows: 1 })
|
|
425
425
|
] });
|
|
426
426
|
}
|
|
427
427
|
function mapEngagementAttachments(files) {
|
|
@@ -474,7 +474,7 @@ function OpenActions({
|
|
|
474
474
|
const [messageText, setMessageText] = _react.useState.call(void 0, "");
|
|
475
475
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
476
476
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
477
|
-
const attachments =
|
|
477
|
+
const attachments = _chunkD4MNFY67cjs.useChatAttachments.call(void 0, );
|
|
478
478
|
const disabled = busy || supportSystemDown;
|
|
479
479
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
480
480
|
const hasText = messageText.trim().length > 0;
|
|
@@ -497,7 +497,7 @@ function OpenActions({
|
|
|
497
497
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
498
498
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
499
499
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
500
|
-
|
|
500
|
+
_chunkD4MNFY67cjs.Textarea,
|
|
501
501
|
{
|
|
502
502
|
value: messageText,
|
|
503
503
|
onChange: (e) => setMessageText(e.target.value),
|
|
@@ -508,7 +508,7 @@ function OpenActions({
|
|
|
508
508
|
}
|
|
509
509
|
),
|
|
510
510
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
511
|
-
|
|
511
|
+
_chunkD4MNFY67cjs.ChatAttachmentChipStrip,
|
|
512
512
|
{
|
|
513
513
|
attachments: attachments.attachments,
|
|
514
514
|
onRemove: attachments.removeAttachment,
|
|
@@ -518,7 +518,7 @@ function OpenActions({
|
|
|
518
518
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center gap-2 flex-wrap", children: [
|
|
519
519
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
520
520
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
521
|
-
|
|
521
|
+
_chunkD4MNFY67cjs.ChatAttachmentAddButton,
|
|
522
522
|
{
|
|
523
523
|
attachmentsEnabled: !supportSystemDown,
|
|
524
524
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -553,13 +553,13 @@ function OpenActions({
|
|
|
553
553
|
] })
|
|
554
554
|
] })
|
|
555
555
|
] }),
|
|
556
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
557
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
558
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
559
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
556
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD4MNFY67cjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkD4MNFY67cjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
557
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkD4MNFY67cjs.AlertDialogHeader, { children: [
|
|
558
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD4MNFY67cjs.AlertDialogTitle, { className: "text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold", children: "Close this ticket?" }),
|
|
559
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD4MNFY67cjs.AlertDialogDescription, { className: "text-ods-text-secondary font-['DM_Sans'] text-[14px]", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
560
560
|
] }),
|
|
561
561
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
562
|
-
|
|
562
|
+
_chunkD4MNFY67cjs.Textarea,
|
|
563
563
|
{
|
|
564
564
|
value: resolution,
|
|
565
565
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -569,9 +569,9 @@ function OpenActions({
|
|
|
569
569
|
className: "mt-2"
|
|
570
570
|
}
|
|
571
571
|
),
|
|
572
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
572
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkD4MNFY67cjs.AlertDialogFooter, { children: [
|
|
573
573
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
574
|
-
|
|
574
|
+
_chunkD4MNFY67cjs.AlertDialogCancel,
|
|
575
575
|
{
|
|
576
576
|
disabled: busy,
|
|
577
577
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -579,7 +579,7 @@ function OpenActions({
|
|
|
579
579
|
}
|
|
580
580
|
),
|
|
581
581
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
582
|
-
|
|
582
|
+
_chunkD4MNFY67cjs.AlertDialogAction,
|
|
583
583
|
{
|
|
584
584
|
onClick: () => void confirmClose(),
|
|
585
585
|
disabled: busy,
|
|
@@ -609,7 +609,7 @@ function TicketRow({
|
|
|
609
609
|
const rowRef = _react.useRef.call(void 0, null);
|
|
610
610
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
611
611
|
onToggle(ticket.id);
|
|
612
|
-
|
|
612
|
+
_chunkD4MNFY67cjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
613
613
|
adjustTargetY: (raw) => {
|
|
614
614
|
if (!rowRef.current) return raw;
|
|
615
615
|
const expandedDrawer = document.querySelector(
|
|
@@ -635,7 +635,7 @@ function TicketRow({
|
|
|
635
635
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
636
636
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
637
637
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
638
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
638
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkD4MNFY67cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
639
639
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
640
640
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
641
641
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -650,7 +650,7 @@ function TicketRow({
|
|
|
650
650
|
className: "border-b border-ods-border last:border-b-0",
|
|
651
651
|
children: [
|
|
652
652
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
653
|
-
|
|
653
|
+
_chunkD4MNFY67cjs.ChatTicketItem,
|
|
654
654
|
{
|
|
655
655
|
ticket: tileData,
|
|
656
656
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -714,7 +714,7 @@ function useTicketsList(filters) {
|
|
|
714
714
|
pageSize
|
|
715
715
|
};
|
|
716
716
|
if (statusFilter) body.status = statusFilter;
|
|
717
|
-
const response = await
|
|
717
|
+
const response = await _chunkD4MNFY67cjs.embedAuthedFetch.call(void 0, FIND_TICKET_ENDPOINT, {
|
|
718
718
|
method: "POST",
|
|
719
719
|
body: JSON.stringify(body)
|
|
720
720
|
});
|
|
@@ -802,7 +802,7 @@ function useTicketActions(options) {
|
|
|
802
802
|
}, []);
|
|
803
803
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
804
804
|
async (toolName, args) => {
|
|
805
|
-
const res = await
|
|
805
|
+
const res = await _chunkD4MNFY67cjs.embedAuthedFetch.call(void 0, TICKET_ACTION_ENDPOINT, {
|
|
806
806
|
method: "POST",
|
|
807
807
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
808
808
|
});
|
|
@@ -1116,13 +1116,13 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1116
1116
|
// src/components/tickets/ticket-center.tsx
|
|
1117
1117
|
|
|
1118
1118
|
function TicketCenter({ toast: toast2 = _chunkWT5JV2GScjs.toast } = {}) {
|
|
1119
|
-
const identity =
|
|
1119
|
+
const identity = _chunkD4MNFY67cjs.useChatIdentity.call(void 0, );
|
|
1120
1120
|
if (identity.isLoading) {
|
|
1121
1121
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1122
1122
|
}
|
|
1123
1123
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _47 => _47.user, 'optionalAccess', _48 => _48.email])) {
|
|
1124
1124
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1125
|
-
|
|
1125
|
+
_chunk2G3NXF6Jcjs.EmptyState,
|
|
1126
1126
|
{
|
|
1127
1127
|
type: "generic",
|
|
1128
1128
|
title: "Sign in to manage tickets",
|
|
@@ -1193,7 +1193,7 @@ function TicketCenterAuthed({
|
|
|
1193
1193
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1194
1194
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1195
1195
|
"Updated ",
|
|
1196
|
-
|
|
1196
|
+
_chunkD4MNFY67cjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1197
1197
|
] }),
|
|
1198
1198
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1199
1199
|
_chunkUXZ3ZJ3Mcjs.Button,
|
|
@@ -1209,15 +1209,15 @@ function TicketCenterAuthed({
|
|
|
1209
1209
|
)
|
|
1210
1210
|
] })
|
|
1211
1211
|
] }),
|
|
1212
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1213
|
-
|
|
1212
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD4MNFY67cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1213
|
+
_chunk2G3NXF6Jcjs.EmptyState,
|
|
1214
1214
|
{
|
|
1215
1215
|
type: "generic",
|
|
1216
1216
|
title: "No tickets yet",
|
|
1217
1217
|
description: "Open one above to start the conversation.",
|
|
1218
1218
|
showCTA: false
|
|
1219
1219
|
}
|
|
1220
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1220
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD4MNFY67cjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1221
1221
|
TicketRow,
|
|
1222
1222
|
{
|
|
1223
1223
|
ticket,
|
|
@@ -1237,7 +1237,7 @@ function TicketCenterAuthed({
|
|
|
1237
1237
|
}
|
|
1238
1238
|
function TicketCenterSkeleton() {
|
|
1239
1239
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1240
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1240
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkD4MNFY67cjs.Card, { className: "p-6", children: [
|
|
1241
1241
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1242
1242
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1243
1243
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1246,7 +1246,7 @@ function TicketCenterSkeleton() {
|
|
|
1246
1246
|
] });
|
|
1247
1247
|
}
|
|
1248
1248
|
function TicketListSkeleton() {
|
|
1249
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1249
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD4MNFY67cjs.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: [
|
|
1250
1250
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1251
1251
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1252
1252
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1259,7 +1259,7 @@ function TicketListSkeleton() {
|
|
|
1259
1259
|
// src/components/tickets/help-center-list.tsx
|
|
1260
1260
|
|
|
1261
1261
|
|
|
1262
|
-
|
|
1262
|
+
_chunk2G3NXF6Jcjs.init_unified_pagination.call(void 0, );
|
|
1263
1263
|
|
|
1264
1264
|
// src/components/tickets/help-center-card.tsx
|
|
1265
1265
|
|
|
@@ -1279,7 +1279,7 @@ function HelpCenterCard({
|
|
|
1279
1279
|
const optimistic = isOptimistic(ticket);
|
|
1280
1280
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1281
1281
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1282
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1282
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkD4MNFY67cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1283
1283
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1284
1284
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1285
1285
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1288,7 +1288,7 @@ function HelpCenterCard({
|
|
|
1288
1288
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1289
1289
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1290
1290
|
onToggle(ticket.id);
|
|
1291
|
-
|
|
1291
|
+
_chunkD4MNFY67cjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1292
1292
|
headerOffset: STICKY_HEADER_OFFSET_PX,
|
|
1293
1293
|
adjustTargetY: (raw) => {
|
|
1294
1294
|
if (!rowRef.current) return raw;
|
|
@@ -1305,16 +1305,16 @@ function HelpCenterCard({
|
|
|
1305
1305
|
}, [onToggle, ticket.id]);
|
|
1306
1306
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1307
1307
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1308
|
-
|
|
1308
|
+
_chunkD4MNFY67cjs.StatusBadge,
|
|
1309
1309
|
{
|
|
1310
1310
|
text: rawStatus,
|
|
1311
|
-
colorScheme:
|
|
1311
|
+
colorScheme: _chunkD4MNFY67cjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1312
1312
|
variant: "card",
|
|
1313
1313
|
className: "border border-ods-border"
|
|
1314
1314
|
}
|
|
1315
1315
|
),
|
|
1316
1316
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1317
|
-
|
|
1317
|
+
_chunkD4MNFY67cjs.StatusBadge,
|
|
1318
1318
|
{
|
|
1319
1319
|
text: priority,
|
|
1320
1320
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1341,7 +1341,7 @@ function HelpCenterCard({
|
|
|
1341
1341
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1342
1342
|
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",
|
|
1343
1343
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1344
|
-
|
|
1344
|
+
_chunk2G3NXF6Jcjs.DevCardRowContent,
|
|
1345
1345
|
{
|
|
1346
1346
|
title,
|
|
1347
1347
|
subtitle,
|
|
@@ -1414,7 +1414,7 @@ function HelpCenterCreateForm({
|
|
|
1414
1414
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1415
1415
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1416
1416
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1417
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1417
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkD4MNFY67cjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1418
1418
|
"Subject",
|
|
1419
1419
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1420
1420
|
] }),
|
|
@@ -1446,7 +1446,7 @@ function HelpCenterCreateForm({
|
|
|
1446
1446
|
)
|
|
1447
1447
|
] });
|
|
1448
1448
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1449
|
-
|
|
1449
|
+
_chunkNGFP4RVLcjs.ContactForm,
|
|
1450
1450
|
{
|
|
1451
1451
|
title: "Open a new ticket",
|
|
1452
1452
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1484,7 +1484,7 @@ function HelpCenterCreateForm({
|
|
|
1484
1484
|
// src/components/tickets/help-center-list.tsx
|
|
1485
1485
|
|
|
1486
1486
|
function HelpCenterList({ toast: toast2 = _chunkWT5JV2GScjs.toast } = {}) {
|
|
1487
|
-
const identity =
|
|
1487
|
+
const identity = _chunkD4MNFY67cjs.useChatIdentity.call(void 0, );
|
|
1488
1488
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1489
1489
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1490
1490
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1493,11 +1493,11 @@ function HelpCenterList({ toast: toast2 = _chunkWT5JV2GScjs.toast } = {}) {
|
|
|
1493
1493
|
const rawPage = Number(searchParams.get("page"));
|
|
1494
1494
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1495
1495
|
if (identity.isLoading) {
|
|
1496
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1496
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2G3NXF6Jcjs.DevSectionPage, { sectionKey: "tickets", preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2G3NXF6Jcjs.DevCardRowSkeletonList, {}) });
|
|
1497
1497
|
}
|
|
1498
1498
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _49 => _49.user, 'optionalAccess', _50 => _50.email])) {
|
|
1499
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1500
|
-
|
|
1499
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2G3NXF6Jcjs.DevSectionPage, { sectionKey: "tickets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1500
|
+
_chunk2G3NXF6Jcjs.EmptyState,
|
|
1501
1501
|
{
|
|
1502
1502
|
type: "generic",
|
|
1503
1503
|
title: "Sign in to manage tickets",
|
|
@@ -1597,15 +1597,15 @@ function HelpCenterListAuthed({
|
|
|
1597
1597
|
] }),
|
|
1598
1598
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUXZ3ZJ3Mcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1599
1599
|
] }),
|
|
1600
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1600
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2G3NXF6Jcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1601
1601
|
// Bridge state — background refetch in flight and the
|
|
1602
1602
|
// optimistic placeholder was just removed by the mutation
|
|
1603
1603
|
// callback. Without this branch "No tickets yet" would flash
|
|
1604
1604
|
// for ~50ms between `removeOptimistic` and the server
|
|
1605
1605
|
// response landing.
|
|
1606
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1606
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2G3NXF6Jcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1607
1607
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1608
|
-
|
|
1608
|
+
_chunk2G3NXF6Jcjs.EmptyState,
|
|
1609
1609
|
{
|
|
1610
1610
|
type: "search",
|
|
1611
1611
|
title: "No tickets found",
|
|
@@ -1620,7 +1620,7 @@ function HelpCenterListAuthed({
|
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
1622
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1623
|
-
|
|
1623
|
+
_chunk2G3NXF6Jcjs.EmptyState,
|
|
1624
1624
|
{
|
|
1625
1625
|
type: "generic",
|
|
1626
1626
|
title: "No tickets yet",
|
|
@@ -1652,9 +1652,9 @@ function HelpCenterListAuthed({
|
|
|
1652
1652
|
ticket.id
|
|
1653
1653
|
)) })
|
|
1654
1654
|
) }),
|
|
1655
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1655
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2G3NXF6Jcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1656
1656
|
] });
|
|
1657
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1657
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2G3NXF6Jcjs.DevSectionPage, { sectionKey: "tickets", preControls: form, children: body });
|
|
1658
1658
|
}
|
|
1659
1659
|
|
|
1660
1660
|
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
EmptyState,
|
|
10
10
|
UnifiedPagination,
|
|
11
11
|
init_unified_pagination
|
|
12
|
-
} from "../../chunk-
|
|
12
|
+
} from "../../chunk-R6MLPU4A.js";
|
|
13
13
|
import "../../chunk-4XLJWX2N.js";
|
|
14
14
|
import {
|
|
15
15
|
ContactForm
|
|
16
|
-
} from "../../chunk-
|
|
16
|
+
} from "../../chunk-7PCP7YQR.js";
|
|
17
17
|
import {
|
|
18
18
|
AlertDialog,
|
|
19
19
|
AlertDialogAction,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
scrollElementIntoView,
|
|
37
37
|
useChatAttachments,
|
|
38
38
|
useChatIdentity
|
|
39
|
-
} from "../../chunk-
|
|
39
|
+
} from "../../chunk-WQZP3JIZ.js";
|
|
40
40
|
import {
|
|
41
41
|
toast
|
|
42
42
|
} from "../../chunk-HICZPTRR.js";
|