@flamingo-stack/openframe-frontend-core 0.0.503 → 0.0.504-snapshot.20260801181709
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-SGWPW2AO.cjs → chunk-2A74VRAF.cjs} +18 -18
- package/dist/{chunk-SGWPW2AO.cjs.map → chunk-2A74VRAF.cjs.map} +1 -1
- package/dist/{chunk-LILQJ3UZ.cjs → chunk-3ENGUBJP.cjs} +1 -1
- package/dist/chunk-3ENGUBJP.cjs.map +1 -0
- package/dist/{chunk-AWDHRIL3.cjs → chunk-4ST2BOWJ.cjs} +75 -75
- package/dist/{chunk-AWDHRIL3.cjs.map → chunk-4ST2BOWJ.cjs.map} +1 -1
- package/dist/{chunk-SFJRMBJC.js → chunk-5SVNA7IU.js} +2 -2
- package/dist/{chunk-OAWFYZZT.js → chunk-7DOSAJDK.js} +3 -3
- package/dist/{chunk-J4T5ZBWG.cjs → chunk-BZRP54IO.cjs} +19 -19
- package/dist/{chunk-J4T5ZBWG.cjs.map → chunk-BZRP54IO.cjs.map} +1 -1
- package/dist/{chunk-BZF63JXP.js → chunk-CRJVO4KO.js} +6 -6
- package/dist/{chunk-5RIHLXEP.cjs → chunk-DDVQ5NKK.cjs} +33 -33
- package/dist/{chunk-5RIHLXEP.cjs.map → chunk-DDVQ5NKK.cjs.map} +1 -1
- package/dist/{chunk-HR6F6IP4.js → chunk-DIKJLAMY.js} +78 -43
- package/dist/chunk-DIKJLAMY.js.map +1 -0
- package/dist/{chunk-VO2ZONMR.js → chunk-FNTFWP2A.js} +3 -3
- package/dist/{chunk-2OXJ6NHI.cjs → chunk-GJZ42TTG.cjs} +7 -7
- package/dist/{chunk-2OXJ6NHI.cjs.map → chunk-GJZ42TTG.cjs.map} +1 -1
- package/dist/{chunk-JIZJDAXI.cjs → chunk-GXRVBKYX.cjs} +12 -12
- package/dist/{chunk-JIZJDAXI.cjs.map → chunk-GXRVBKYX.cjs.map} +1 -1
- package/dist/{chunk-F7AD5CUU.js → chunk-H3N4P3CG.js} +3 -3
- package/dist/chunk-H3N4P3CG.js.map +1 -0
- package/dist/{chunk-VCPTU4IW.js → chunk-HWER6KGU.js} +7 -7
- package/dist/{chunk-4SR2QHMB.js → chunk-ITVWX5HX.js} +3 -3
- package/dist/{chunk-FFXNRJ5S.cjs → chunk-LOBR7IC6.cjs} +6 -6
- package/dist/chunk-LOBR7IC6.cjs.map +1 -0
- package/dist/{chunk-72DF3QTA.cjs → chunk-MJQ263KS.cjs} +14 -14
- package/dist/{chunk-72DF3QTA.cjs.map → chunk-MJQ263KS.cjs.map} +1 -1
- package/dist/{chunk-FTOVZ7O2.js → chunk-NPO6CHCR.js} +7 -7
- package/dist/{chunk-XV5SXALY.js → chunk-NT5FX7GZ.js} +3 -3
- package/dist/{chunk-UCV4LFUG.cjs → chunk-NY75FKN6.cjs} +40 -40
- package/dist/{chunk-UCV4LFUG.cjs.map → chunk-NY75FKN6.cjs.map} +1 -1
- package/dist/{chunk-4UNQMYP7.cjs → chunk-O32Y4E4R.cjs} +3 -3
- package/dist/{chunk-4UNQMYP7.cjs.map → chunk-O32Y4E4R.cjs.map} +1 -1
- package/dist/{chunk-CLQEBWV7.js → chunk-QE55ROZW.js} +4 -4
- package/dist/{chunk-WHJGRRK2.js → chunk-QW7SW5HY.js} +52 -43
- package/dist/chunk-QW7SW5HY.js.map +1 -0
- package/dist/{chunk-JGXAVNZQ.js → chunk-R6CKL7IR.js} +2464 -1886
- package/dist/chunk-R6CKL7IR.js.map +1 -0
- package/dist/{chunk-L5CI57RM.cjs → chunk-T3BF6JTQ.cjs} +52 -43
- package/dist/chunk-T3BF6JTQ.cjs.map +1 -0
- package/dist/{chunk-G43CEISB.js → chunk-TA3VJ2QO.js} +4 -4
- package/dist/{chunk-7L2RVINX.cjs → chunk-TRS4CIAS.cjs} +35 -35
- package/dist/{chunk-7L2RVINX.cjs.map → chunk-TRS4CIAS.cjs.map} +1 -1
- package/dist/{chunk-DMXB3VE2.cjs → chunk-U3YLML53.cjs} +1837 -1259
- package/dist/chunk-U3YLML53.cjs.map +1 -0
- package/dist/{chunk-3T4SMJM5.cjs → chunk-VDKNUC3N.cjs} +181 -146
- package/dist/chunk-VDKNUC3N.cjs.map +1 -0
- package/dist/{chunk-RR3Z52X5.cjs → chunk-W3QCFQ56.cjs} +42 -42
- package/dist/{chunk-RR3Z52X5.cjs.map → chunk-W3QCFQ56.cjs.map} +1 -1
- package/dist/{chunk-VYEDTVIZ.js → chunk-XJPMTJAR.js} +4 -4
- package/dist/{chunk-6GT557KN.js → chunk-XKIA4XVE.js} +1 -1
- package/dist/chunk-XKIA4XVE.js.map +1 -0
- package/dist/components/case-studies/index.cjs +11 -11
- package/dist/components/case-studies/index.js +5 -5
- package/dist/components/chat/index.cjs +5 -5
- package/dist/components/chat/index.js +4 -4
- package/dist/components/contact/index.cjs +6 -6
- package/dist/components/contact/index.js +5 -5
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/docs/index.js +7 -7
- package/dist/components/embeds/index.cjs +6 -6
- package/dist/components/embeds/index.js +5 -5
- package/dist/components/faq/index.cjs +7 -7
- package/dist/components/faq/index.js +6 -6
- package/dist/components/features/index.cjs +5 -5
- package/dist/components/features/index.js +4 -4
- package/dist/components/help-center-pages/index.cjs +24 -24
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +169 -165
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +17 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/app-header.d.ts +8 -0
- package/dist/components/navigation/app-header.d.ts.map +1 -1
- package/dist/components/navigation/header-button.d.ts +5 -1
- package/dist/components/navigation/header-button.d.ts.map +1 -1
- package/dist/components/navigation/header.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +9 -5
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.d.ts +4 -0
- package/dist/components/navigation/index.d.ts.map +1 -1
- package/dist/components/navigation/index.js +8 -4
- package/dist/components/navigation/mingo-ai-button.d.ts.map +1 -1
- package/dist/components/navigation/navigation-sidebar-item.d.ts.map +1 -1
- package/dist/components/navigation/ticket-alerts-button.d.ts +29 -0
- package/dist/components/navigation/ticket-alerts-button.d.ts.map +1 -0
- package/dist/components/navigation/top-navigation.d.ts +5 -1
- package/dist/components/navigation/top-navigation.d.ts.map +1 -1
- package/dist/components/navigation/unread-dot.d.ts +19 -0
- package/dist/components/navigation/unread-dot.d.ts.map +1 -0
- package/dist/components/onboarding-guides/index.cjs +9 -9
- package/dist/components/onboarding-guides/index.js +8 -8
- package/dist/components/related-content/index.cjs +7 -7
- package/dist/components/related-content/index.js +6 -6
- package/dist/components/tickets/help-center-card.d.ts.map +1 -1
- package/dist/components/tickets/hooks/use-ticket-actions.d.ts.map +1 -1
- package/dist/components/tickets/hooks/use-ticket-engagements.d.ts +1 -9
- package/dist/components/tickets/hooks/use-ticket-engagements.d.ts.map +1 -1
- package/dist/components/tickets/hooks/use-tickets-list.d.ts +0 -7
- package/dist/components/tickets/hooks/use-tickets-list.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +15 -8
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.d.ts +2 -1
- package/dist/components/tickets/index.d.ts.map +1 -1
- package/dist/components/tickets/index.js +14 -7
- package/dist/components/tickets/ticket-detail-drawer.d.ts.map +1 -1
- package/dist/components/tickets/ticket-live-provider.d.ts +58 -0
- package/dist/components/tickets/ticket-live-provider.d.ts.map +1 -0
- package/dist/components/tickets/types.d.ts +58 -11
- package/dist/components/tickets/types.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts +6 -5
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +50 -50
- package/dist/components/ui/file-manager/index.js +1 -1
- package/dist/components/ui/index.cjs +5 -5
- package/dist/components/ui/index.js +4 -4
- package/dist/contexts/chat-runtime-context.d.ts +8 -0
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +3 -3
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/ui/use-header-height.d.ts.map +1 -1
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -4
- package/dist/types/navigation.d.ts +10 -0
- package/dist/types/navigation.d.ts.map +1 -1
- package/dist/utils/index.cjs +171 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +171 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/sse-subscription.d.ts +60 -0
- package/dist/utils/sse-subscription.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/features/time-tracker/time-tracker-header-button.tsx +1 -1
- package/src/components/navigation/app-header.tsx +36 -20
- package/src/components/navigation/header-button.tsx +18 -2
- package/src/components/navigation/header-mingo-button.tsx +2 -2
- package/src/components/navigation/header-skeleton.tsx +4 -4
- package/src/components/navigation/header.tsx +41 -21
- package/src/components/navigation/index.ts +4 -0
- package/src/components/navigation/mingo-ai-button.tsx +23 -22
- package/src/components/navigation/mobile-burger-menu.tsx +3 -3
- package/src/components/navigation/navigation-sidebar-item.tsx +2 -3
- package/src/components/navigation/ticket-alerts-button.tsx +61 -0
- package/src/components/navigation/top-navigation.tsx +17 -1
- package/src/components/navigation/unread-dot.tsx +34 -0
- package/src/components/tickets/.types.md +1 -2
- package/src/components/tickets/help-center-card.tsx +16 -0
- package/src/components/tickets/help-center-list.tsx +6 -6
- package/src/components/tickets/hooks/.use-ticket-engagements.md +3 -12
- package/src/components/tickets/hooks/.use-tickets-list.md +0 -2
- package/src/components/tickets/hooks/use-ticket-actions.ts +9 -0
- package/src/components/tickets/hooks/use-ticket-engagements.ts +4 -13
- package/src/components/tickets/hooks/use-tickets-list.ts +2 -13
- package/src/components/tickets/index.ts +10 -0
- package/src/components/tickets/ticket-detail-drawer.tsx +45 -13
- package/src/components/tickets/ticket-live-provider.tsx +474 -0
- package/src/components/tickets/types.ts +62 -11
- package/src/components/ui/button/button.tsx +165 -133
- package/src/contexts/chat-runtime-context.tsx +8 -0
- package/src/hooks/ui/use-header-height.ts +3 -1
- package/src/stories/TopNavigation.stories.tsx +20 -1
- package/src/types/navigation.ts +10 -0
- package/src/utils/index.ts +12 -0
- package/src/utils/sse-subscription.ts +276 -0
- package/dist/chunk-3T4SMJM5.cjs.map +0 -1
- package/dist/chunk-6GT557KN.js.map +0 -1
- package/dist/chunk-DMXB3VE2.cjs.map +0 -1
- package/dist/chunk-F7AD5CUU.js.map +0 -1
- package/dist/chunk-FFXNRJ5S.cjs.map +0 -1
- package/dist/chunk-HR6F6IP4.js.map +0 -1
- package/dist/chunk-JGXAVNZQ.js.map +0 -1
- package/dist/chunk-L5CI57RM.cjs.map +0 -1
- package/dist/chunk-LILQJ3UZ.cjs.map +0 -1
- package/dist/chunk-WHJGRRK2.js.map +0 -1
- /package/dist/{chunk-SFJRMBJC.js.map → chunk-5SVNA7IU.js.map} +0 -0
- /package/dist/{chunk-OAWFYZZT.js.map → chunk-7DOSAJDK.js.map} +0 -0
- /package/dist/{chunk-BZF63JXP.js.map → chunk-CRJVO4KO.js.map} +0 -0
- /package/dist/{chunk-VO2ZONMR.js.map → chunk-FNTFWP2A.js.map} +0 -0
- /package/dist/{chunk-VCPTU4IW.js.map → chunk-HWER6KGU.js.map} +0 -0
- /package/dist/{chunk-4SR2QHMB.js.map → chunk-ITVWX5HX.js.map} +0 -0
- /package/dist/{chunk-FTOVZ7O2.js.map → chunk-NPO6CHCR.js.map} +0 -0
- /package/dist/{chunk-XV5SXALY.js.map → chunk-NT5FX7GZ.js.map} +0 -0
- /package/dist/{chunk-CLQEBWV7.js.map → chunk-QE55ROZW.js.map} +0 -0
- /package/dist/{chunk-G43CEISB.js.map → chunk-TA3VJ2QO.js.map} +0 -0
- /package/dist/{chunk-VYEDTVIZ.js.map → chunk-XJPMTJAR.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDDVQ5NKKcjs = require('./chunk-DDVQ5NKK.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ var _chunk5RIHLXEPcjs = require('./chunk-5RIHLXEP.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkBZRP54IOcjs = require('./chunk-BZRP54IO.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -37,17 +37,18 @@ var _chunkJ4T5ZBWGcjs = require('./chunk-J4T5ZBWG.cjs');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var _chunkDMXB3VE2cjs = require('./chunk-DMXB3VE2.cjs');
|
|
41
40
|
|
|
41
|
+
var _chunkU3YLML53cjs = require('./chunk-U3YLML53.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var _chunkFFXNRJ5Scjs = require('./chunk-FFXNRJ5S.cjs');
|
|
48
47
|
|
|
48
|
+
var _chunkLOBR7IC6cjs = require('./chunk-LOBR7IC6.cjs');
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
|
|
51
|
+
var _chunk3ENGUBJPcjs = require('./chunk-3ENGUBJP.cjs');
|
|
51
52
|
|
|
52
53
|
|
|
53
54
|
|
|
@@ -58,24 +59,24 @@ var _chunkSSJNN5BScjs = require('./chunk-SSJNN5BS.cjs');
|
|
|
58
59
|
|
|
59
60
|
|
|
60
61
|
|
|
61
|
-
var
|
|
62
|
+
var _chunkT3BF6JTQcjs = require('./chunk-T3BF6JTQ.cjs');
|
|
62
63
|
|
|
63
64
|
// src/components/tickets/ticket-center.tsx
|
|
64
65
|
var _react = require('react');
|
|
65
66
|
var _reactquery = require('@tanstack/react-query');
|
|
66
|
-
|
|
67
|
+
_chunkT3BF6JTQcjs.init_button2.call(void 0, );
|
|
67
68
|
var _lucidereact = require('lucide-react');
|
|
68
69
|
|
|
69
70
|
// src/components/tickets/ticket-open-form.tsx
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
_chunkT3BF6JTQcjs.init_button2.call(void 0, );
|
|
72
73
|
|
|
73
74
|
// src/components/tickets/types.ts
|
|
74
75
|
function isOptimistic(t) {
|
|
75
76
|
return t._optimistic === true;
|
|
76
77
|
}
|
|
77
78
|
var TICKET_TEXT_MAX_CHARS = 5e3;
|
|
78
|
-
var
|
|
79
|
+
var TICKET_MARK_READ_DEBOUNCE_MS = 2e3;
|
|
79
80
|
var TOAST_COPY = {
|
|
80
81
|
open_success: { title: "Ticket opened", description: "We received your message and will follow up shortly." },
|
|
81
82
|
open_mirror_pending: { title: "Ticket opened", description: "Syncing \u2014 your ticket will appear momentarily." },
|
|
@@ -96,7 +97,7 @@ function TicketOpenForm({
|
|
|
96
97
|
}) {
|
|
97
98
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
98
99
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
99
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
100
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkU3YLML53cjs.useChatAttachments.call(void 0, );
|
|
100
101
|
const trimmedSubject = subject.trim();
|
|
101
102
|
const trimmedContent = content.trim();
|
|
102
103
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -116,7 +117,7 @@ function TicketOpenForm({
|
|
|
116
117
|
clear();
|
|
117
118
|
}
|
|
118
119
|
};
|
|
119
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
120
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU3YLML53cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
120
121
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
121
122
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-h2 text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
122
123
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h6", children: "Can't find what you're looking for? Submit a support ticket below \u2014 we'll follow up shortly." }),
|
|
@@ -133,7 +134,7 @@ function TicketOpenForm({
|
|
|
133
134
|
}
|
|
134
135
|
),
|
|
135
136
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
136
|
-
|
|
137
|
+
_chunkT3BF6JTQcjs.Input,
|
|
137
138
|
{
|
|
138
139
|
id: "ticket-subject",
|
|
139
140
|
type: "text",
|
|
@@ -155,7 +156,7 @@ function TicketOpenForm({
|
|
|
155
156
|
}
|
|
156
157
|
),
|
|
157
158
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
158
|
-
|
|
159
|
+
_chunkU3YLML53cjs.Textarea,
|
|
159
160
|
{
|
|
160
161
|
id: "ticket-content",
|
|
161
162
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -179,7 +180,7 @@ function TicketOpenForm({
|
|
|
179
180
|
)
|
|
180
181
|
] }),
|
|
181
182
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
182
|
-
|
|
183
|
+
_chunkU3YLML53cjs.ChatAttachmentChipStrip,
|
|
183
184
|
{
|
|
184
185
|
attachments,
|
|
185
186
|
onRemove: removeAttachment,
|
|
@@ -188,7 +189,7 @@ function TicketOpenForm({
|
|
|
188
189
|
),
|
|
189
190
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
190
191
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
191
|
-
|
|
192
|
+
_chunkU3YLML53cjs.ChatAttachmentAddButton,
|
|
192
193
|
{
|
|
193
194
|
attachmentsEnabled: !supportSystemDown,
|
|
194
195
|
attachmentsCount: attachments.length,
|
|
@@ -197,7 +198,7 @@ function TicketOpenForm({
|
|
|
197
198
|
}
|
|
198
199
|
),
|
|
199
200
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
200
|
-
|
|
201
|
+
_chunkT3BF6JTQcjs.Button,
|
|
201
202
|
{
|
|
202
203
|
type: "submit",
|
|
203
204
|
disabled: !canSubmit,
|
|
@@ -219,16 +220,17 @@ var Collapsible = CollapsiblePrimitive.Root;
|
|
|
219
220
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
220
221
|
|
|
221
222
|
// src/components/tickets/ticket-detail-drawer.tsx
|
|
222
|
-
|
|
223
|
+
_chunkT3BF6JTQcjs.init_button2.call(void 0, );
|
|
224
|
+
|
|
223
225
|
var _usesticktobottom = require('use-stick-to-bottom');
|
|
224
226
|
|
|
225
227
|
// src/components/tickets/hooks/use-ticket-engagements.ts
|
|
226
228
|
|
|
227
229
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
228
|
-
function useTicketEngagements(externalTicketId, enabled = true
|
|
229
|
-
const identity =
|
|
230
|
+
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
231
|
+
const identity = _chunkU3YLML53cjs.useChatIdentity.call(void 0, );
|
|
230
232
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
231
|
-
const listEngagementsEndpoint = _nullishCoalesce(
|
|
233
|
+
const listEngagementsEndpoint = _nullishCoalesce(_chunk3ENGUBJPcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
232
234
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
233
235
|
const queryEnabled = fetchable && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _4 => _4.user, 'optionalAccess', _5 => _5.email]);
|
|
234
236
|
const query = _reactquery.useQuery.call(void 0, {
|
|
@@ -241,13 +243,12 @@ function useTicketEngagements(externalTicketId, enabled = true, refetchInterval
|
|
|
241
243
|
gcTime: 0,
|
|
242
244
|
refetchOnMount: "always",
|
|
243
245
|
refetchOnWindowFocus: true,
|
|
244
|
-
//
|
|
245
|
-
//
|
|
246
|
-
//
|
|
247
|
-
//
|
|
248
|
-
refetchInterval,
|
|
246
|
+
// NO interval polling (deleted 2026-08): new agent replies arrive via
|
|
247
|
+
// `TicketLiveProvider`'s stream-driven invalidation of
|
|
248
|
+
// `['ticket-engagements', id]`; focus/mount refetch is the no-stream
|
|
249
|
+
// fallback.
|
|
249
250
|
queryFn: async () => {
|
|
250
|
-
const response = await
|
|
251
|
+
const response = await _chunkLOBR7IC6cjs.embedAuthedFetch.call(void 0, listEngagementsEndpoint, {
|
|
251
252
|
method: "POST",
|
|
252
253
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
253
254
|
});
|
|
@@ -308,7 +309,7 @@ function TicketLinkedDeliveryCard({
|
|
|
308
309
|
{
|
|
309
310
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
310
311
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
311
|
-
|
|
312
|
+
_chunkBZRP54IOcjs.DeliveryRow,
|
|
312
313
|
{
|
|
313
314
|
item,
|
|
314
315
|
href: clickup.delivery_href,
|
|
@@ -320,7 +321,7 @@ function TicketLinkedDeliveryCard({
|
|
|
320
321
|
}
|
|
321
322
|
|
|
322
323
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
323
|
-
|
|
324
|
+
_chunkT3BF6JTQcjs.init_button2.call(void 0, );
|
|
324
325
|
|
|
325
326
|
|
|
326
327
|
function TicketReplyComposer({
|
|
@@ -332,7 +333,7 @@ function TicketReplyComposer({
|
|
|
332
333
|
}) {
|
|
333
334
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
334
335
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
335
|
-
const attachments =
|
|
336
|
+
const attachments = _chunkU3YLML53cjs.useChatAttachments.call(void 0, );
|
|
336
337
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
337
338
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
338
339
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -360,7 +361,7 @@ function TicketReplyComposer({
|
|
|
360
361
|
const disabled = busy || supportSystemDown;
|
|
361
362
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
362
363
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
363
|
-
|
|
364
|
+
_chunkU3YLML53cjs.ChatAttachmentChipStrip,
|
|
364
365
|
{
|
|
365
366
|
attachments: attachments.attachments,
|
|
366
367
|
onRemove: attachments.removeAttachment,
|
|
@@ -369,7 +370,7 @@ function TicketReplyComposer({
|
|
|
369
370
|
}
|
|
370
371
|
),
|
|
371
372
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
372
|
-
|
|
373
|
+
_chunkU3YLML53cjs.ChatInput,
|
|
373
374
|
{
|
|
374
375
|
fullWidth: true,
|
|
375
376
|
autoFocus: true,
|
|
@@ -383,7 +384,7 @@ function TicketReplyComposer({
|
|
|
383
384
|
),
|
|
384
385
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
385
386
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
386
|
-
|
|
387
|
+
_chunkU3YLML53cjs.ChatAttachmentAddButton,
|
|
387
388
|
{
|
|
388
389
|
attachmentsEnabled: true,
|
|
389
390
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -394,7 +395,7 @@ function TicketReplyComposer({
|
|
|
394
395
|
),
|
|
395
396
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex-1 min-w-0" }),
|
|
396
397
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
397
|
-
|
|
398
|
+
_chunkT3BF6JTQcjs.Button,
|
|
398
399
|
{
|
|
399
400
|
type: "button",
|
|
400
401
|
variant: "transparent",
|
|
@@ -406,13 +407,13 @@ function TicketReplyComposer({
|
|
|
406
407
|
}
|
|
407
408
|
)
|
|
408
409
|
] }),
|
|
409
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
410
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
411
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
412
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
410
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU3YLML53cjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkU3YLML53cjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
411
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkU3YLML53cjs.AlertDialogHeader, { children: [
|
|
412
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU3YLML53cjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
413
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU3YLML53cjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
413
414
|
] }),
|
|
414
415
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
415
|
-
|
|
416
|
+
_chunkU3YLML53cjs.Textarea,
|
|
416
417
|
{
|
|
417
418
|
value: resolution,
|
|
418
419
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -422,9 +423,9 @@ function TicketReplyComposer({
|
|
|
422
423
|
className: "mt-2"
|
|
423
424
|
}
|
|
424
425
|
),
|
|
425
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
426
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkU3YLML53cjs.AlertDialogFooter, { children: [
|
|
426
427
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
427
|
-
|
|
428
|
+
_chunkU3YLML53cjs.AlertDialogCancel,
|
|
428
429
|
{
|
|
429
430
|
disabled: busy,
|
|
430
431
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -432,7 +433,7 @@ function TicketReplyComposer({
|
|
|
432
433
|
}
|
|
433
434
|
),
|
|
434
435
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
435
|
-
|
|
436
|
+
_chunkU3YLML53cjs.AlertDialogAction,
|
|
436
437
|
{
|
|
437
438
|
onClick: () => void confirmClose(),
|
|
438
439
|
disabled: busy,
|
|
@@ -502,31 +503,53 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
502
503
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
503
504
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
504
505
|
function TicketTimelinePanel({ ticket }) {
|
|
505
|
-
const identity =
|
|
506
|
+
const identity = _chunkU3YLML53cjs.useChatIdentity.call(void 0, );
|
|
506
507
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
507
|
-
const { engagements, isLoading } = useTicketEngagements(
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
);
|
|
508
|
+
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
509
|
+
const live = _chunkU3YLML53cjs.useOptionalTicketLive.call(void 0, );
|
|
510
|
+
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _6 => _6.setOpenTicketId]);
|
|
511
|
+
const markRead = _optionalChain([live, 'optionalAccess', _7 => _7.markRead]);
|
|
512
|
+
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
513
|
+
_react.useEffect.call(void 0, () => {
|
|
514
|
+
if (!externalId || !setOpenTicketId || !markRead) return;
|
|
515
|
+
setOpenTicketId(externalId);
|
|
516
|
+
void markRead(externalId);
|
|
517
|
+
return () => {
|
|
518
|
+
if (markReadDebounceRef.current) {
|
|
519
|
+
clearTimeout(markReadDebounceRef.current);
|
|
520
|
+
markReadDebounceRef.current = null;
|
|
521
|
+
void markRead(externalId);
|
|
522
|
+
}
|
|
523
|
+
setOpenTicketId(null);
|
|
524
|
+
};
|
|
525
|
+
}, [externalId, setOpenTicketId, markRead]);
|
|
526
|
+
const engagementsCount = engagements.length;
|
|
527
|
+
_react.useEffect.call(void 0, () => {
|
|
528
|
+
if (!externalId || !markRead || engagementsCount === 0) return;
|
|
529
|
+
if (markReadDebounceRef.current) clearTimeout(markReadDebounceRef.current);
|
|
530
|
+
markReadDebounceRef.current = setTimeout(() => {
|
|
531
|
+
markReadDebounceRef.current = null;
|
|
532
|
+
void markRead(externalId);
|
|
533
|
+
}, TICKET_MARK_READ_DEBOUNCE_MS);
|
|
534
|
+
}, [engagementsCount, externalId, markRead]);
|
|
512
535
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
513
536
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
514
537
|
const customerEngagementBodies = new Set(
|
|
515
538
|
engagements.filter((e) => e.authorRole === "customer").map((e) => (_nullishCoalesce(e.body, () => ( ""))).trim()).filter(Boolean)
|
|
516
539
|
);
|
|
517
540
|
const suppressBodyTurnZero = bodyTurns.length > 0 && customerEngagementBodies.has(bodyTurns[0]);
|
|
518
|
-
const sessionEmailLower = _nullishCoalesce(_optionalChain([identity, 'access',
|
|
541
|
+
const sessionEmailLower = _nullishCoalesce(_optionalChain([identity, 'access', _8 => _8.user, 'optionalAccess', _9 => _9.email, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11(), 'access', _12 => _12.toLowerCase, 'call', _13 => _13()]), () => ( null));
|
|
519
542
|
const isViewerTheCustomer = !!sessionEmailLower && ticket.customer_emails.some((e) => e.trim().toLowerCase() === sessionEmailLower);
|
|
520
|
-
const viewerName = _optionalChain([identity, 'access',
|
|
521
|
-
const ticketCustomerName = _optionalChain([ticket, 'access',
|
|
522
|
-
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access',
|
|
523
|
-
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access',
|
|
543
|
+
const viewerName = _optionalChain([identity, 'access', _14 => _14.user, 'optionalAccess', _15 => _15.name, 'optionalAccess', _16 => _16.trim, 'call', _17 => _17()]) || null;
|
|
544
|
+
const ticketCustomerName = _optionalChain([ticket, 'access', _18 => _18.customer_name, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || null;
|
|
545
|
+
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]) || "You";
|
|
546
|
+
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _23 => _23.user, 'optionalAccess', _24 => _24.avatarUrl]), () => ( void 0)) : void 0;
|
|
524
547
|
if (isLoading) {
|
|
525
|
-
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,
|
|
548
|
+
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, _chunkU3YLML53cjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
526
549
|
}
|
|
527
550
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
528
551
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
529
|
-
|
|
552
|
+
_chunkBZRP54IOcjs.EmptyState,
|
|
530
553
|
{
|
|
531
554
|
type: "generic",
|
|
532
555
|
title: "No conversation yet",
|
|
@@ -541,7 +564,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
541
564
|
const isResolution = turn.startsWith("[Resolution]");
|
|
542
565
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
543
566
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
544
|
-
|
|
567
|
+
_chunkU3YLML53cjs.ChatMessageRow,
|
|
545
568
|
{
|
|
546
569
|
displayName: customerName,
|
|
547
570
|
avatarUrl: customerAvatar,
|
|
@@ -552,12 +575,12 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
552
575
|
}),
|
|
553
576
|
engagements.map((eng) => {
|
|
554
577
|
const isCustomer = eng.authorRole === "customer";
|
|
555
|
-
const isOwnReply = isCustomer && !!eng.authorId && !!_optionalChain([identity, 'access',
|
|
578
|
+
const isOwnReply = isCustomer && !!eng.authorId && !!_optionalChain([identity, 'access', _25 => _25.user, 'optionalAccess', _26 => _26.email]) && eng.authorId.toLowerCase() === identity.user.email.toLowerCase();
|
|
556
579
|
let author;
|
|
557
580
|
let avatarSrc;
|
|
558
581
|
if (isCustomer && isOwnReply) {
|
|
559
|
-
author = _optionalChain([identity, 'access',
|
|
560
|
-
avatarSrc = _nullishCoalesce(_optionalChain([identity, 'access',
|
|
582
|
+
author = _optionalChain([identity, 'access', _27 => _27.user, 'optionalAccess', _28 => _28.name, 'optionalAccess', _29 => _29.trim, 'call', _30 => _30()]) || customerName;
|
|
583
|
+
avatarSrc = _nullishCoalesce(_optionalChain([identity, 'access', _31 => _31.user, 'optionalAccess', _32 => _32.avatarUrl]), () => ( void 0));
|
|
561
584
|
} else if (isCustomer) {
|
|
562
585
|
author = ticketCustomerName || "Customer";
|
|
563
586
|
avatarSrc = void 0;
|
|
@@ -570,13 +593,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
570
593
|
}
|
|
571
594
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
572
595
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
573
|
-
|
|
596
|
+
_chunkU3YLML53cjs.ChatMessageRow,
|
|
574
597
|
{
|
|
575
598
|
displayName: author,
|
|
576
599
|
avatarUrl: avatarSrc,
|
|
577
|
-
timeLabel: eng.createdAt ?
|
|
600
|
+
timeLabel: eng.createdAt ? _chunkU3YLML53cjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
578
601
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
579
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
602
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU3YLML53cjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
580
603
|
},
|
|
581
604
|
eng.id
|
|
582
605
|
);
|
|
@@ -591,7 +614,7 @@ function mapEngagementAttachments(files) {
|
|
|
591
614
|
// Show an inline thumbnail for image attachments (the signed `url` is a
|
|
592
615
|
// viewable URL). Non-images fall back to the file-type icon. SquareAvatar
|
|
593
616
|
// degrades to initials on a broken/expired image URL.
|
|
594
|
-
thumbnailSrc: f.url && (_nullishCoalesce(_optionalChain([f, 'access',
|
|
617
|
+
thumbnailSrc: f.url && (_nullishCoalesce(_optionalChain([f, 'access', _33 => _33.mime, 'optionalAccess', _34 => _34.startsWith, 'call', _35 => _35("image/")]), () => ( false))) ? f.url : void 0,
|
|
595
618
|
onDownload: f.url ? () => window.open(f.url, "_blank", "noopener,noreferrer") : void 0
|
|
596
619
|
}));
|
|
597
620
|
}
|
|
@@ -615,7 +638,7 @@ function ReopenAction({
|
|
|
615
638
|
void await onReopen(ticketRef);
|
|
616
639
|
};
|
|
617
640
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
618
|
-
|
|
641
|
+
_chunkT3BF6JTQcjs.Button,
|
|
619
642
|
{
|
|
620
643
|
type: "button",
|
|
621
644
|
variant: "outline",
|
|
@@ -640,7 +663,7 @@ function ReplyFailureBanner({
|
|
|
640
663
|
children: [
|
|
641
664
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium leading-snug", children: error.message }),
|
|
642
665
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
643
|
-
|
|
666
|
+
_chunkT3BF6JTQcjs.Button,
|
|
644
667
|
{
|
|
645
668
|
type: "button",
|
|
646
669
|
variant: "transparent",
|
|
@@ -657,18 +680,18 @@ function ReplyFailureBanner({
|
|
|
657
680
|
function AssignedAgentRow({
|
|
658
681
|
assignedOwner
|
|
659
682
|
}) {
|
|
660
|
-
const trimmedName = _optionalChain([assignedOwner, 'optionalAccess',
|
|
661
|
-
const emailFallback = _optionalChain([assignedOwner, 'optionalAccess',
|
|
683
|
+
const trimmedName = _optionalChain([assignedOwner, 'optionalAccess', _36 => _36.name, 'optionalAccess', _37 => _37.trim, 'call', _38 => _38()]) || null;
|
|
684
|
+
const emailFallback = _optionalChain([assignedOwner, 'optionalAccess', _39 => _39.email, 'optionalAccess', _40 => _40.trim, 'call', _41 => _41()]) || null;
|
|
662
685
|
const displayLabel = _nullishCoalesce(trimmedName, () => ( (emailFallback ? emailFallback.split("@")[0] : null)));
|
|
663
686
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 text-h6", children: [
|
|
664
687
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-h5 text-ods-text-secondary", children: "Assigned to" }),
|
|
665
688
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
666
689
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
667
|
-
|
|
690
|
+
_chunkU3YLML53cjs.SquareAvatar,
|
|
668
691
|
{
|
|
669
692
|
size: "sm",
|
|
670
693
|
variant: "round",
|
|
671
|
-
src: _nullishCoalesce(_optionalChain([assignedOwner, 'optionalAccess',
|
|
694
|
+
src: _nullishCoalesce(_optionalChain([assignedOwner, 'optionalAccess', _42 => _42.avatarUrl]), () => ( void 0)),
|
|
672
695
|
alt: displayLabel,
|
|
673
696
|
fallback: displayLabel
|
|
674
697
|
}
|
|
@@ -696,7 +719,7 @@ function TicketRow({
|
|
|
696
719
|
const rowRef = _react.useRef.call(void 0, null);
|
|
697
720
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
698
721
|
onToggle(ticket.id);
|
|
699
|
-
|
|
722
|
+
_chunkLOBR7IC6cjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
700
723
|
adjustTargetY: (raw) => {
|
|
701
724
|
if (!rowRef.current) return raw;
|
|
702
725
|
const expandedDrawer = document.querySelector(
|
|
@@ -722,7 +745,7 @@ function TicketRow({
|
|
|
722
745
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
723
746
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
724
747
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
725
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
748
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkU3YLML53cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
726
749
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
727
750
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
728
751
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -737,7 +760,7 @@ function TicketRow({
|
|
|
737
760
|
className: "border-b border-ods-border last:border-b-0",
|
|
738
761
|
children: [
|
|
739
762
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
740
|
-
|
|
763
|
+
_chunkU3YLML53cjs.ChatTicketItem,
|
|
741
764
|
{
|
|
742
765
|
ticket: tileData,
|
|
743
766
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -774,7 +797,7 @@ function TicketRow({
|
|
|
774
797
|
var FIND_TICKET_ENDPOINT = "/api/chat/agent/find-ticket";
|
|
775
798
|
var DEFAULT_PAGE_SIZE = 20;
|
|
776
799
|
function useTicketsList(filters) {
|
|
777
|
-
const findTicketEndpoint = _nullishCoalesce(
|
|
800
|
+
const findTicketEndpoint = _nullishCoalesce(_chunk3ENGUBJPcjs.useRequiredChatRuntime.call(void 0, ).endpoints.findTicketUrl, () => ( FIND_TICKET_ENDPOINT));
|
|
778
801
|
const customerEmail = filters.customerEmail;
|
|
779
802
|
const search = (_nullishCoalesce(filters.search, () => ( ""))).trim();
|
|
780
803
|
const status = (_nullishCoalesce(filters.status, () => ( ""))).trim().toLowerCase();
|
|
@@ -783,7 +806,6 @@ function useTicketsList(filters) {
|
|
|
783
806
|
const pageSize = Math.max(1, Math.min(100, Math.floor(_nullishCoalesce(filters.pageSize, () => ( DEFAULT_PAGE_SIZE))) || DEFAULT_PAGE_SIZE));
|
|
784
807
|
const enabled = !!customerEmail;
|
|
785
808
|
const identityKey = customerEmail || "anon";
|
|
786
|
-
const refetchInterval = _nullishCoalesce(filters.refetchInterval, () => ( false));
|
|
787
809
|
const query = _reactquery.useQuery.call(void 0, {
|
|
788
810
|
queryKey: ["tickets", "self", identityKey, search, statusFilter, page, pageSize],
|
|
789
811
|
enabled,
|
|
@@ -796,10 +818,8 @@ function useTicketsList(filters) {
|
|
|
796
818
|
gcTime: 0,
|
|
797
819
|
refetchOnMount: "always",
|
|
798
820
|
refetchOnWindowFocus: true,
|
|
799
|
-
//
|
|
800
|
-
//
|
|
801
|
-
// pauses on a hidden tab — no wasted requests when the user tabs away.
|
|
802
|
-
refetchInterval,
|
|
821
|
+
// NO interval polling (deleted 2026-08): live freshness is push-driven
|
|
822
|
+
// — `TicketLiveProvider` invalidates `['tickets']` on stream events.
|
|
803
823
|
queryFn: async () => {
|
|
804
824
|
const body = {
|
|
805
825
|
query: search,
|
|
@@ -807,7 +827,7 @@ function useTicketsList(filters) {
|
|
|
807
827
|
pageSize
|
|
808
828
|
};
|
|
809
829
|
if (statusFilter) body.status = statusFilter;
|
|
810
|
-
const response = await
|
|
830
|
+
const response = await _chunkLOBR7IC6cjs.embedAuthedFetch.call(void 0, findTicketEndpoint, {
|
|
811
831
|
method: "POST",
|
|
812
832
|
body: JSON.stringify(body)
|
|
813
833
|
});
|
|
@@ -819,12 +839,12 @@ function useTicketsList(filters) {
|
|
|
819
839
|
}
|
|
820
840
|
});
|
|
821
841
|
const data = query.data;
|
|
822
|
-
const totalCount = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
823
|
-
const echoedPage = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
824
|
-
const echoedPageSize = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
825
|
-
const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
842
|
+
const totalCount = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _43 => _43.totalCount]), () => ( _optionalChain([data, 'optionalAccess', _44 => _44.count]))), () => ( (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _45 => _45.tickets, 'optionalAccess', _46 => _46.length]), () => ( 0)))));
|
|
843
|
+
const echoedPage = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _47 => _47.page]), () => ( page));
|
|
844
|
+
const echoedPageSize = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _48 => _48.pageSize]), () => ( pageSize));
|
|
845
|
+
const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _49 => _49.totalPages]), () => ( Math.max(1, Math.ceil(totalCount / echoedPageSize))));
|
|
826
846
|
return {
|
|
827
|
-
tickets: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
847
|
+
tickets: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _50 => _50.tickets]), () => ( [])),
|
|
828
848
|
// Loading-state-truth = `data === undefined`. TanStack v5's
|
|
829
849
|
// `isPending` / `isLoading` flags can be `false` in transient
|
|
830
850
|
// windows where the query is enabled-but-fetch-not-yet-fired
|
|
@@ -846,7 +866,7 @@ function useTicketsList(filters) {
|
|
|
846
866
|
// - Background refetch with existing data: data !== undefined → no load
|
|
847
867
|
// - Filter-change refetch landing on empty results: data?.tickets===[]
|
|
848
868
|
// + isFetching → bridge skeleton (the `||` branch)
|
|
849
|
-
isLoading: enabled && (data === void 0 || query.isFetching && (_nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
869
|
+
isLoading: enabled && (data === void 0 || query.isFetching && (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _51 => _51.tickets]), () => ( []))).length === 0),
|
|
850
870
|
isFetching: query.isFetching,
|
|
851
871
|
error: _nullishCoalesce(query.error, () => ( null)),
|
|
852
872
|
refetch: () => {
|
|
@@ -873,7 +893,9 @@ var REPLY_BANNER_CODES = /* @__PURE__ */ new Set([
|
|
|
873
893
|
var MIRROR_SYNC_BACKOFF_MS = [3e3, 6e3, 12e3];
|
|
874
894
|
function useTicketActions(options) {
|
|
875
895
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
876
|
-
const ticketActionEndpoint = _nullishCoalesce(
|
|
896
|
+
const ticketActionEndpoint = _nullishCoalesce(_chunk3ENGUBJPcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
897
|
+
const ticketLive = _chunkU3YLML53cjs.useOptionalTicketLive.call(void 0, );
|
|
898
|
+
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _52 => _52.notifyTicketCreated]);
|
|
877
899
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
878
900
|
const formInFlightRef = _react.useRef.call(void 0, false);
|
|
879
901
|
const [isSubmittingForm, setIsSubmittingForm] = _react.useState.call(void 0, false);
|
|
@@ -922,7 +944,7 @@ function useTicketActions(options) {
|
|
|
922
944
|
}, []);
|
|
923
945
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
924
946
|
async (toolName, args) => {
|
|
925
|
-
const res = await
|
|
947
|
+
const res = await _chunkLOBR7IC6cjs.embedAuthedFetch.call(void 0, ticketActionEndpoint, {
|
|
926
948
|
method: "POST",
|
|
927
949
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
928
950
|
});
|
|
@@ -1034,7 +1056,7 @@ function useTicketActions(options) {
|
|
|
1034
1056
|
const result = await executeTicketAction("create_ticket", {
|
|
1035
1057
|
subject: input.subject.trim(),
|
|
1036
1058
|
content: input.content.trim(),
|
|
1037
|
-
..._optionalChain([input, 'access',
|
|
1059
|
+
..._optionalChain([input, 'access', _53 => _53.attachments, 'optionalAccess', _54 => _54.length]) ? { attachments: input.attachments } : {}
|
|
1038
1060
|
});
|
|
1039
1061
|
if (result.mirror_synced === false) {
|
|
1040
1062
|
toast2(TOAST_COPY.open_mirror_pending);
|
|
@@ -1044,6 +1066,7 @@ function useTicketActions(options) {
|
|
|
1044
1066
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
1045
1067
|
removeOptimistic(placeholderId);
|
|
1046
1068
|
}
|
|
1069
|
+
_optionalChain([notifyTicketCreated, 'optionalCall', _55 => _55()]);
|
|
1047
1070
|
return true;
|
|
1048
1071
|
});
|
|
1049
1072
|
} catch (err) {
|
|
@@ -1063,6 +1086,7 @@ function useTicketActions(options) {
|
|
|
1063
1086
|
queryClient,
|
|
1064
1087
|
toast2,
|
|
1065
1088
|
watchMirrorSync,
|
|
1089
|
+
notifyTicketCreated,
|
|
1066
1090
|
surfaceError
|
|
1067
1091
|
]
|
|
1068
1092
|
);
|
|
@@ -1146,7 +1170,7 @@ function useTicketActions(options) {
|
|
|
1146
1170
|
ticket,
|
|
1147
1171
|
{
|
|
1148
1172
|
status: "CLOSED",
|
|
1149
|
-
..._optionalChain([resolution, 'optionalAccess',
|
|
1173
|
+
..._optionalChain([resolution, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]) ? { resolution: resolution.trim() } : {}
|
|
1150
1174
|
},
|
|
1151
1175
|
TOAST_COPY.close_success,
|
|
1152
1176
|
"close ticket"
|
|
@@ -1219,7 +1243,7 @@ function mapTicketActionError(err) {
|
|
|
1219
1243
|
removeRowFromCache: false
|
|
1220
1244
|
};
|
|
1221
1245
|
case "RATE_LIMITED": {
|
|
1222
|
-
const retryAfterRaw = _optionalChain([err, 'access',
|
|
1246
|
+
const retryAfterRaw = _optionalChain([err, 'access', _58 => _58.response, 'optionalAccess', _59 => _59.headers, 'access', _60 => _60.get, 'call', _61 => _61("Retry-After")]);
|
|
1223
1247
|
const retryAfterSeconds = retryAfterRaw ? parseInt(retryAfterRaw, 10) : void 0;
|
|
1224
1248
|
return {
|
|
1225
1249
|
code: err.code,
|
|
@@ -1306,14 +1330,14 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1306
1330
|
|
|
1307
1331
|
// src/components/tickets/ticket-center.tsx
|
|
1308
1332
|
|
|
1309
|
-
function TicketCenter({ toast: toast2 =
|
|
1310
|
-
const identity =
|
|
1333
|
+
function TicketCenter({ toast: toast2 = _chunkLOBR7IC6cjs.toast } = {}) {
|
|
1334
|
+
const identity = _chunkU3YLML53cjs.useChatIdentity.call(void 0, );
|
|
1311
1335
|
if (identity.isLoading) {
|
|
1312
1336
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1313
1337
|
}
|
|
1314
|
-
if (identity.authTier === "anon" || !_optionalChain([identity, 'access',
|
|
1338
|
+
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _62 => _62.user, 'optionalAccess', _63 => _63.email])) {
|
|
1315
1339
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1316
|
-
|
|
1340
|
+
_chunkBZRP54IOcjs.EmptyState,
|
|
1317
1341
|
{
|
|
1318
1342
|
type: "generic",
|
|
1319
1343
|
title: "Sign in to manage tickets",
|
|
@@ -1384,10 +1408,10 @@ function TicketCenterAuthed({
|
|
|
1384
1408
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-h6 text-ods-text-secondary", children: [
|
|
1385
1409
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1386
1410
|
"Updated ",
|
|
1387
|
-
|
|
1411
|
+
_chunkU3YLML53cjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1388
1412
|
] }),
|
|
1389
1413
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1390
|
-
|
|
1414
|
+
_chunkT3BF6JTQcjs.Button,
|
|
1391
1415
|
{
|
|
1392
1416
|
type: "button",
|
|
1393
1417
|
variant: "transparent",
|
|
@@ -1400,18 +1424,18 @@ function TicketCenterAuthed({
|
|
|
1400
1424
|
)
|
|
1401
1425
|
] })
|
|
1402
1426
|
] }),
|
|
1403
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1404
|
-
|
|
1427
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU3YLML53cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1428
|
+
_chunkBZRP54IOcjs.EmptyState,
|
|
1405
1429
|
{
|
|
1406
1430
|
type: "generic",
|
|
1407
1431
|
title: "No tickets yet",
|
|
1408
1432
|
description: "Open one above to start the conversation.",
|
|
1409
1433
|
showCTA: false
|
|
1410
1434
|
}
|
|
1411
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1435
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU3YLML53cjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1412
1436
|
TicketRow,
|
|
1413
1437
|
{
|
|
1414
|
-
id:
|
|
1438
|
+
id: _chunkU3YLML53cjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1415
1439
|
ticket,
|
|
1416
1440
|
expanded: expandedTicketId === ticket.id,
|
|
1417
1441
|
onToggle: toggleRow,
|
|
@@ -1429,29 +1453,29 @@ function TicketCenterAuthed({
|
|
|
1429
1453
|
}
|
|
1430
1454
|
function TicketCenterSkeleton() {
|
|
1431
1455
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1432
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1433
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1434
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1435
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1456
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkU3YLML53cjs.Card, { className: "p-6", children: [
|
|
1457
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT3BF6JTQcjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1458
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT3BF6JTQcjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1459
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT3BF6JTQcjs.Skeleton, { className: "h-24 w-full" })
|
|
1436
1460
|
] }),
|
|
1437
1461
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {})
|
|
1438
1462
|
] });
|
|
1439
1463
|
}
|
|
1440
1464
|
function TicketListSkeleton() {
|
|
1441
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1465
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU3YLML53cjs.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: [
|
|
1442
1466
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1443
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1444
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1467
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT3BF6JTQcjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1468
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT3BF6JTQcjs.Skeleton, { className: "h-3 w-full" })
|
|
1445
1469
|
] }),
|
|
1446
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1447
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1470
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT3BF6JTQcjs.Skeleton, { className: "h-8 w-20" }),
|
|
1471
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT3BF6JTQcjs.Skeleton, { className: "h-8 w-16" })
|
|
1448
1472
|
] }, i)) });
|
|
1449
1473
|
}
|
|
1450
1474
|
|
|
1451
1475
|
// src/components/tickets/help-center-list.tsx
|
|
1452
1476
|
|
|
1453
1477
|
|
|
1454
|
-
|
|
1478
|
+
_chunkBZRP54IOcjs.init_unified_pagination.call(void 0, );
|
|
1455
1479
|
|
|
1456
1480
|
// src/components/tickets/help-center-card.tsx
|
|
1457
1481
|
|
|
@@ -1473,7 +1497,7 @@ function HelpCenterCard({
|
|
|
1473
1497
|
const optimistic = isOptimistic(ticket);
|
|
1474
1498
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1475
1499
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1476
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1500
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkU3YLML53cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1477
1501
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1478
1502
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1479
1503
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1486,24 +1510,35 @@ function HelpCenterCard({
|
|
|
1486
1510
|
_react.useEffect.call(void 0, () => {
|
|
1487
1511
|
if (!isExpanded) return;
|
|
1488
1512
|
const raf = requestAnimationFrame(() => {
|
|
1489
|
-
|
|
1490
|
-
headerOffset:
|
|
1513
|
+
_chunkLOBR7IC6cjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1514
|
+
headerOffset: _chunkLOBR7IC6cjs.STICKY_HEADER_OFFSET_PX
|
|
1491
1515
|
});
|
|
1492
1516
|
});
|
|
1493
1517
|
return () => cancelAnimationFrame(raf);
|
|
1494
1518
|
}, [isExpanded]);
|
|
1519
|
+
const live = _chunkU3YLML53cjs.useOptionalTicketLive.call(void 0, );
|
|
1520
|
+
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1495
1521
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1522
|
+
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1523
|
+
_chunkU3YLML53cjs.StatusBadge,
|
|
1524
|
+
{
|
|
1525
|
+
text: `${unreadCount} NEW`,
|
|
1526
|
+
colorScheme: "warning",
|
|
1527
|
+
variant: "card",
|
|
1528
|
+
className: "border border-ods-border"
|
|
1529
|
+
}
|
|
1530
|
+
),
|
|
1496
1531
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1497
|
-
|
|
1532
|
+
_chunkU3YLML53cjs.StatusBadge,
|
|
1498
1533
|
{
|
|
1499
1534
|
text: rawStatus,
|
|
1500
|
-
colorScheme:
|
|
1535
|
+
colorScheme: _chunkU3YLML53cjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1501
1536
|
variant: "card",
|
|
1502
1537
|
className: "border border-ods-border"
|
|
1503
1538
|
}
|
|
1504
1539
|
),
|
|
1505
1540
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1506
|
-
|
|
1541
|
+
_chunkU3YLML53cjs.StatusBadge,
|
|
1507
1542
|
{
|
|
1508
1543
|
text: priority,
|
|
1509
1544
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1517,7 +1552,7 @@ function HelpCenterCard({
|
|
|
1517
1552
|
{
|
|
1518
1553
|
ref: rowRef,
|
|
1519
1554
|
id,
|
|
1520
|
-
style: { scrollMarginTop:
|
|
1555
|
+
style: { scrollMarginTop: _chunkLOBR7IC6cjs.STICKY_HEADER_OFFSET_PX },
|
|
1521
1556
|
className: `border-b border-ods-border last:border-b-0 ${optimistic ? "opacity-60" : ""}`,
|
|
1522
1557
|
"aria-busy": optimistic || void 0,
|
|
1523
1558
|
children: [
|
|
@@ -1531,7 +1566,7 @@ function HelpCenterCard({
|
|
|
1531
1566
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1532
1567
|
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",
|
|
1533
1568
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1534
|
-
|
|
1569
|
+
_chunkBZRP54IOcjs.DevCardRowContent,
|
|
1535
1570
|
{
|
|
1536
1571
|
title,
|
|
1537
1572
|
subtitle,
|
|
@@ -1606,12 +1641,12 @@ function HelpCenterCreateForm({
|
|
|
1606
1641
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1607
1642
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1608
1643
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1609
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1644
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkU3YLML53cjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1610
1645
|
"Subject",
|
|
1611
1646
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1612
1647
|
] }),
|
|
1613
1648
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1614
|
-
|
|
1649
|
+
_chunkT3BF6JTQcjs.Input,
|
|
1615
1650
|
{
|
|
1616
1651
|
id: "help-center-subject",
|
|
1617
1652
|
type: "text",
|
|
@@ -1638,7 +1673,7 @@ function HelpCenterCreateForm({
|
|
|
1638
1673
|
)
|
|
1639
1674
|
] });
|
|
1640
1675
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1641
|
-
|
|
1676
|
+
_chunkDDVQ5NKKcjs.ContactForm,
|
|
1642
1677
|
{
|
|
1643
1678
|
title: "Open a new ticket",
|
|
1644
1679
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1675,8 +1710,8 @@ function HelpCenterCreateForm({
|
|
|
1675
1710
|
|
|
1676
1711
|
// src/components/tickets/help-center-list.tsx
|
|
1677
1712
|
|
|
1678
|
-
function HelpCenterList({ toast: toast2 =
|
|
1679
|
-
const identity =
|
|
1713
|
+
function HelpCenterList({ toast: toast2 = _chunkLOBR7IC6cjs.toast, backButton, title, shell } = {}) {
|
|
1714
|
+
const identity = _chunkU3YLML53cjs.useChatIdentity.call(void 0, );
|
|
1680
1715
|
const searchParams = _chunkSSJNN5BScjs.useSearchParams.call(void 0, );
|
|
1681
1716
|
const router = _chunkSSJNN5BScjs.useRouter.call(void 0, );
|
|
1682
1717
|
const pathname = _chunkSSJNN5BScjs.usePathname.call(void 0, );
|
|
@@ -1687,20 +1722,20 @@ function HelpCenterList({ toast: toast2 = _chunkFFXNRJ5Scjs.toast, backButton, t
|
|
|
1687
1722
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1688
1723
|
if (identity.isLoading) {
|
|
1689
1724
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1690
|
-
|
|
1725
|
+
_chunkBZRP54IOcjs.DevSectionPage,
|
|
1691
1726
|
{
|
|
1692
1727
|
sectionKey: "tickets",
|
|
1693
1728
|
backButton,
|
|
1694
1729
|
title,
|
|
1695
1730
|
shell,
|
|
1696
1731
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1697
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1732
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBZRP54IOcjs.DevCardRowSkeletonList, {})
|
|
1698
1733
|
}
|
|
1699
1734
|
);
|
|
1700
1735
|
}
|
|
1701
|
-
if (identity.authTier === "anon" || !_optionalChain([identity, 'access',
|
|
1702
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1703
|
-
|
|
1736
|
+
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1737
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBZRP54IOcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1738
|
+
_chunkBZRP54IOcjs.EmptyState,
|
|
1704
1739
|
{
|
|
1705
1740
|
type: "generic",
|
|
1706
1741
|
title: "Sign in to manage tickets",
|
|
@@ -1709,7 +1744,7 @@ function HelpCenterList({ toast: toast2 = _chunkFFXNRJ5Scjs.toast, backButton, t
|
|
|
1709
1744
|
}
|
|
1710
1745
|
) });
|
|
1711
1746
|
}
|
|
1712
|
-
const sessionName = [_optionalChain([identity, 'access',
|
|
1747
|
+
const sessionName = [_optionalChain([identity, 'access', _68 => _68.user, 'optionalAccess', _69 => _69.firstName]), _optionalChain([identity, 'access', _70 => _70.user, 'optionalAccess', _71 => _71.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identity, 'access', _72 => _72.user, 'optionalAccess', _73 => _73.email, 'optionalAccess', _74 => _74.split, 'call', _75 => _75("@"), 'access', _76 => _76[0]]) || "Customer";
|
|
1713
1748
|
const sessionEmail = identity.user.email;
|
|
1714
1749
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1715
1750
|
HelpCenterListAuthed,
|
|
@@ -1768,14 +1803,14 @@ function HelpCenterListAuthed({
|
|
|
1768
1803
|
customerEmail: sessionEmail,
|
|
1769
1804
|
search,
|
|
1770
1805
|
status,
|
|
1771
|
-
page
|
|
1772
|
-
//
|
|
1773
|
-
//
|
|
1774
|
-
//
|
|
1775
|
-
//
|
|
1776
|
-
|
|
1806
|
+
page
|
|
1807
|
+
// No interval polling (deleted 2026-08): `TicketLiveProvider`
|
|
1808
|
+
// invalidates `['tickets']` on stream events; focus/mount refetch
|
|
1809
|
+
// covers hosts without a stream. Disclosed trade-off: a bare
|
|
1810
|
+
// status/pipeline change with no accompanying reply has no live
|
|
1811
|
+
// path until the next event/focus/reconnect.
|
|
1777
1812
|
});
|
|
1778
|
-
const expandedTicketId = ticketParam && _optionalChain([tickets, 'access',
|
|
1813
|
+
const expandedTicketId = ticketParam && _optionalChain([tickets, 'access', _77 => _77.find, 'call', _78 => _78((t) => t.external_id === ticketParam), 'optionalAccess', _79 => _79.id]) || null;
|
|
1779
1814
|
const prependOptimistic = _react.useCallback.call(void 0, (placeholder) => {
|
|
1780
1815
|
setOptimisticTickets((prev) => [placeholder, ...prev]);
|
|
1781
1816
|
}, []);
|
|
@@ -1806,13 +1841,13 @@ function HelpCenterListAuthed({
|
|
|
1806
1841
|
const toggleRow = _react.useCallback.call(void 0,
|
|
1807
1842
|
(id) => {
|
|
1808
1843
|
const t = tickets.find((x) => x.id === id);
|
|
1809
|
-
if (!_optionalChain([t, 'optionalAccess',
|
|
1844
|
+
if (!_optionalChain([t, 'optionalAccess', _80 => _80.external_id])) return;
|
|
1810
1845
|
setOpenTicket(t.external_id === ticketParam ? null : t.external_id);
|
|
1811
1846
|
},
|
|
1812
1847
|
[tickets, ticketParam, setOpenTicket]
|
|
1813
1848
|
);
|
|
1814
1849
|
const merged = [...optimisticTickets, ...tickets];
|
|
1815
|
-
|
|
1850
|
+
_chunkLOBR7IC6cjs.useScrollToHash.call(void 0, tickets, { headerOffset: _chunkLOBR7IC6cjs.STICKY_HEADER_OFFSET_PX });
|
|
1816
1851
|
const hasActiveFilters = search !== "" || status !== "" && status !== "all";
|
|
1817
1852
|
const hasResults = merged.length > 0;
|
|
1818
1853
|
const form = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1830,17 +1865,17 @@ function HelpCenterListAuthed({
|
|
|
1830
1865
|
"Couldn\u2019t load your tickets. ",
|
|
1831
1866
|
error.message
|
|
1832
1867
|
] }),
|
|
1833
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1868
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT3BF6JTQcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1834
1869
|
] }),
|
|
1835
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1870
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBZRP54IOcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1836
1871
|
// Bridge state — background refetch in flight and the
|
|
1837
1872
|
// optimistic placeholder was just removed by the mutation
|
|
1838
1873
|
// callback. Without this branch "No tickets yet" would flash
|
|
1839
1874
|
// for ~50ms between `removeOptimistic` and the server
|
|
1840
1875
|
// response landing.
|
|
1841
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1876
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBZRP54IOcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1842
1877
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1843
|
-
|
|
1878
|
+
_chunkBZRP54IOcjs.EmptyState,
|
|
1844
1879
|
{
|
|
1845
1880
|
type: "search",
|
|
1846
1881
|
title: "No tickets found",
|
|
@@ -1855,7 +1890,7 @@ function HelpCenterListAuthed({
|
|
|
1855
1890
|
}
|
|
1856
1891
|
}
|
|
1857
1892
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1858
|
-
|
|
1893
|
+
_chunkBZRP54IOcjs.EmptyState,
|
|
1859
1894
|
{
|
|
1860
1895
|
type: "generic",
|
|
1861
1896
|
title: "No tickets yet",
|
|
@@ -1874,7 +1909,7 @@ function HelpCenterListAuthed({
|
|
|
1874
1909
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-card border border-ods-border rounded-[6px] overflow-clip w-full", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1875
1910
|
HelpCenterCard,
|
|
1876
1911
|
{
|
|
1877
|
-
id:
|
|
1912
|
+
id: _chunkU3YLML53cjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1878
1913
|
ticket,
|
|
1879
1914
|
expanded: expandedTicketId === ticket.id,
|
|
1880
1915
|
onToggle: toggleRow,
|
|
@@ -1890,9 +1925,9 @@ function HelpCenterListAuthed({
|
|
|
1890
1925
|
ticket.id
|
|
1891
1926
|
)) })
|
|
1892
1927
|
) }),
|
|
1893
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1928
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBZRP54IOcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1894
1929
|
] });
|
|
1895
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1930
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBZRP54IOcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1896
1931
|
}
|
|
1897
1932
|
|
|
1898
1933
|
|
|
@@ -1913,4 +1948,4 @@ function HelpCenterListAuthed({
|
|
|
1913
1948
|
|
|
1914
1949
|
|
|
1915
1950
|
exports.isOptimistic = isOptimistic; exports.TOAST_COPY = TOAST_COPY; exports.TicketOpenForm = TicketOpenForm; exports.useTicketEngagements = useTicketEngagements; exports.TicketLinkedDeliveryCard = TicketLinkedDeliveryCard; exports.TicketReplyComposer = TicketReplyComposer; exports.TicketDetailDrawer = TicketDetailDrawer; exports.TicketRow = TicketRow; exports.useTicketsList = useTicketsList; exports.useTicketActions = useTicketActions; exports.mapTicketActionError = mapTicketActionError; exports.TicketCenter = TicketCenter; exports.HelpCenterCard = HelpCenterCard; exports.HelpCenterCreateFormSkeleton = HelpCenterCreateFormSkeleton; exports.HelpCenterCreateForm = HelpCenterCreateForm; exports.HelpCenterList = HelpCenterList;
|
|
1916
|
-
//# sourceMappingURL=chunk-
|
|
1951
|
+
//# sourceMappingURL=chunk-VDKNUC3N.cjs.map
|