@flamingo-stack/openframe-frontend-core 0.0.569 → 0.0.570
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-PLJAOZYZ.js → chunk-3H6NH2AD.js} +5 -5
- package/dist/{chunk-VNE2EHCD.cjs → chunk-3YO2ZIZL.cjs} +14 -14
- package/dist/{chunk-VNE2EHCD.cjs.map → chunk-3YO2ZIZL.cjs.map} +1 -1
- package/dist/{chunk-QY3VTOB6.cjs → chunk-4BJ4FQPG.cjs} +18 -18
- package/dist/{chunk-QY3VTOB6.cjs.map → chunk-4BJ4FQPG.cjs.map} +1 -1
- package/dist/{chunk-FE5QR7PT.js → chunk-5NVVVIHJ.js} +48 -28
- package/dist/{chunk-FE5QR7PT.js.map → chunk-5NVVVIHJ.js.map} +1 -1
- package/dist/{chunk-2DSDGWWU.cjs → chunk-6WXL6CIL.cjs} +97 -97
- package/dist/{chunk-2DSDGWWU.cjs.map → chunk-6WXL6CIL.cjs.map} +1 -1
- package/dist/{chunk-Z3SRMLMK.cjs → chunk-AQ6MIFNX.cjs} +41 -14
- package/dist/chunk-AQ6MIFNX.cjs.map +1 -0
- package/dist/{chunk-FMWIA5IH.cjs → chunk-CSCAOET4.cjs} +42 -42
- package/dist/{chunk-FMWIA5IH.cjs.map → chunk-CSCAOET4.cjs.map} +1 -1
- package/dist/{chunk-XMECOGLY.cjs → chunk-CYY2PEYQ.cjs} +3 -3
- package/dist/{chunk-XMECOGLY.cjs.map → chunk-CYY2PEYQ.cjs.map} +1 -1
- package/dist/{chunk-SMW5Z4NW.cjs → chunk-D463PBIY.cjs} +23 -23
- package/dist/{chunk-SMW5Z4NW.cjs.map → chunk-D463PBIY.cjs.map} +1 -1
- package/dist/{chunk-TDYTAED2.cjs → chunk-DP2L7US5.cjs} +3 -3
- package/dist/{chunk-TDYTAED2.cjs.map → chunk-DP2L7US5.cjs.map} +1 -1
- package/dist/{chunk-ME346OJF.cjs → chunk-GDPPFPLD.cjs} +40 -40
- package/dist/{chunk-ME346OJF.cjs.map → chunk-GDPPFPLD.cjs.map} +1 -1
- package/dist/{chunk-EBE22KOQ.cjs → chunk-HJCXSI7R.cjs} +4 -4
- package/dist/{chunk-EBE22KOQ.cjs.map → chunk-HJCXSI7R.cjs.map} +1 -1
- package/dist/{chunk-D6SBYELJ.cjs → chunk-I7CFA5DO.cjs} +32 -32
- package/dist/{chunk-D6SBYELJ.cjs.map → chunk-I7CFA5DO.cjs.map} +1 -1
- package/dist/{chunk-SW3K3JSP.cjs → chunk-IJA26YDA.cjs} +8 -8
- package/dist/{chunk-SW3K3JSP.cjs.map → chunk-IJA26YDA.cjs.map} +1 -1
- package/dist/{chunk-HOMYI5RR.js → chunk-KYDVOX5J.js} +2 -2
- package/dist/{chunk-OS5RFMW5.js → chunk-MT7IDGCM.js} +3 -3
- package/dist/{chunk-6STF67EF.js → chunk-MTORQ4LY.js} +4 -4
- package/dist/{chunk-AAROYQ4O.cjs → chunk-PS2TV7WG.cjs} +12 -12
- package/dist/{chunk-AAROYQ4O.cjs.map → chunk-PS2TV7WG.cjs.map} +1 -1
- package/dist/{chunk-P7ZENKIA.js → chunk-PTDRJCPW.js} +2 -2
- package/dist/{chunk-KO333Q2B.js → chunk-QIU5B2ZD.js} +2 -2
- package/dist/{chunk-74DB5H5T.cjs → chunk-RVCCJB6M.cjs} +165 -145
- package/dist/chunk-RVCCJB6M.cjs.map +1 -0
- package/dist/{chunk-PCL6WYYT.cjs → chunk-T4MB5TX6.cjs} +5 -5
- package/dist/{chunk-PCL6WYYT.cjs.map → chunk-T4MB5TX6.cjs.map} +1 -1
- package/dist/{chunk-3UPQAOES.js → chunk-TQER4FVN.js} +3 -3
- package/dist/{chunk-KCAGMTJ6.js → chunk-U6NPZMNT.js} +8 -8
- package/dist/{chunk-LJBNHO6B.js → chunk-VZQKENQU.js} +3 -3
- package/dist/{chunk-OWCN3BM6.js → chunk-XWMEHLDK.js} +6 -6
- package/dist/{chunk-TXEI4PES.js → chunk-YFLKONLB.js} +33 -6
- package/dist/{chunk-TXEI4PES.js.map → chunk-YFLKONLB.js.map} +1 -1
- package/dist/{chunk-C5GKBUT7.js → chunk-YYESWAAQ.js} +3 -3
- package/dist/{chunk-A2T266F3.js → chunk-Z3MSD6ZE.js} +6 -6
- package/dist/{chunk-GY22CIEF.cjs → chunk-Z7DXVKVT.cjs} +76 -76
- package/dist/{chunk-GY22CIEF.cjs.map → chunk-Z7DXVKVT.cjs.map} +1 -1
- package/dist/{chunk-4NN7V443.js → chunk-ZAYZ7JHF.js} +2 -2
- package/dist/{chunk-MZG3QQUR.js → chunk-ZTGWMXJK.js} +2 -2
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/claude-embed.d.ts.map +1 -1
- package/dist/components/embeds/embed-viewer-frame.d.ts +10 -2
- package/dist/components/embeds/embed-viewer-frame.d.ts.map +1 -1
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- 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 +138 -138
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +35 -35
- package/dist/components/meeting-scheduler/index.js +4 -4
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-claude-mirror-src.d.ts +34 -13
- package/dist/hooks/use-claude-mirror-src.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/components/embeds/claude-embed.tsx +13 -4
- package/src/components/embeds/embed-viewer-frame.tsx +27 -2
- package/src/hooks/use-claude-mirror-src.ts +79 -19
- package/dist/chunk-74DB5H5T.cjs.map +0 -1
- package/dist/chunk-Z3SRMLMK.cjs.map +0 -1
- /package/dist/{chunk-PLJAOZYZ.js.map → chunk-3H6NH2AD.js.map} +0 -0
- /package/dist/{chunk-HOMYI5RR.js.map → chunk-KYDVOX5J.js.map} +0 -0
- /package/dist/{chunk-OS5RFMW5.js.map → chunk-MT7IDGCM.js.map} +0 -0
- /package/dist/{chunk-6STF67EF.js.map → chunk-MTORQ4LY.js.map} +0 -0
- /package/dist/{chunk-P7ZENKIA.js.map → chunk-PTDRJCPW.js.map} +0 -0
- /package/dist/{chunk-KO333Q2B.js.map → chunk-QIU5B2ZD.js.map} +0 -0
- /package/dist/{chunk-3UPQAOES.js.map → chunk-TQER4FVN.js.map} +0 -0
- /package/dist/{chunk-KCAGMTJ6.js.map → chunk-U6NPZMNT.js.map} +0 -0
- /package/dist/{chunk-LJBNHO6B.js.map → chunk-VZQKENQU.js.map} +0 -0
- /package/dist/{chunk-OWCN3BM6.js.map → chunk-XWMEHLDK.js.map} +0 -0
- /package/dist/{chunk-C5GKBUT7.js.map → chunk-YYESWAAQ.js.map} +0 -0
- /package/dist/{chunk-A2T266F3.js.map → chunk-Z3MSD6ZE.js.map} +0 -0
- /package/dist/{chunk-4NN7V443.js.map → chunk-ZAYZ7JHF.js.map} +0 -0
- /package/dist/{chunk-MZG3QQUR.js.map → chunk-ZTGWMXJK.js.map} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
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 _chunkD463PBIYcjs = require('./chunk-D463PBIY.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk3YO2ZIZLcjs = require('./chunk-3YO2ZIZL.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkHJCXSI7Rcjs = require('./chunk-HJCXSI7R.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -45,14 +45,14 @@ var _chunkEBE22KOQcjs = require('./chunk-EBE22KOQ.cjs');
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var _chunkRVCCJB6Mcjs = require('./chunk-RVCCJB6M.cjs');
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkAQ6MIFNXcjs = require('./chunk-AQ6MIFNX.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
@@ -81,7 +81,7 @@ var _lucidereact = require('lucide-react');
|
|
|
81
81
|
|
|
82
82
|
_chunk7INXXQVKcjs.init_button2.call(void 0, );
|
|
83
83
|
var _jsxruntime = require('react/jsx-runtime');
|
|
84
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
84
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunkRVCCJB6Mcjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
85
85
|
function TicketOpenForm({
|
|
86
86
|
onSubmit,
|
|
87
87
|
isSubmitting,
|
|
@@ -89,10 +89,10 @@ function TicketOpenForm({
|
|
|
89
89
|
}) {
|
|
90
90
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
91
91
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
92
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
92
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkRVCCJB6Mcjs.useChatAttachments.call(void 0, );
|
|
93
93
|
const trimmedSubject = subject.trim();
|
|
94
94
|
const trimmedContent = content.trim();
|
|
95
|
-
const overCap = content.length >
|
|
95
|
+
const overCap = content.length > _chunkRVCCJB6Mcjs.TICKET_TEXT_MAX_CHARS;
|
|
96
96
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
97
97
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
98
98
|
const handleSubmit = async (e) => {
|
|
@@ -109,7 +109,7 @@ function TicketOpenForm({
|
|
|
109
109
|
clear();
|
|
110
110
|
}
|
|
111
111
|
};
|
|
112
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
112
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVCCJB6Mcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
113
113
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
114
114
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-h2 text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
115
115
|
/* @__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." }),
|
|
@@ -148,7 +148,7 @@ function TicketOpenForm({
|
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
150
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
151
|
-
|
|
151
|
+
_chunkRVCCJB6Mcjs.Textarea,
|
|
152
152
|
{
|
|
153
153
|
id: "ticket-content",
|
|
154
154
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -166,13 +166,13 @@ function TicketOpenForm({
|
|
|
166
166
|
children: [
|
|
167
167
|
content.length,
|
|
168
168
|
"/",
|
|
169
|
-
|
|
169
|
+
_chunkRVCCJB6Mcjs.TICKET_TEXT_MAX_CHARS
|
|
170
170
|
]
|
|
171
171
|
}
|
|
172
172
|
)
|
|
173
173
|
] }),
|
|
174
174
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
175
|
-
|
|
175
|
+
_chunkRVCCJB6Mcjs.ChatAttachmentChipStrip,
|
|
176
176
|
{
|
|
177
177
|
attachments,
|
|
178
178
|
onRemove: removeAttachment,
|
|
@@ -181,7 +181,7 @@ function TicketOpenForm({
|
|
|
181
181
|
),
|
|
182
182
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
183
183
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
184
|
-
|
|
184
|
+
_chunkRVCCJB6Mcjs.ChatAttachmentAddButton,
|
|
185
185
|
{
|
|
186
186
|
attachmentsEnabled: !supportSystemDown,
|
|
187
187
|
attachmentsCount: attachments.length,
|
|
@@ -220,7 +220,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
220
220
|
|
|
221
221
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
222
222
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
223
|
-
const identity =
|
|
223
|
+
const identity = _chunkRVCCJB6Mcjs.useChatIdentity.call(void 0, );
|
|
224
224
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
225
225
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkAJPGQCZ2cjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
226
226
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -240,7 +240,7 @@ function useTicketEngagements(externalTicketId, enabled = true) {
|
|
|
240
240
|
// `['ticket-engagements', id]`; focus/mount refetch is the no-stream
|
|
241
241
|
// fallback.
|
|
242
242
|
queryFn: async () => {
|
|
243
|
-
const response = await
|
|
243
|
+
const response = await _chunkAQ6MIFNXcjs.embedAuthedFetch.call(void 0, listEngagementsEndpoint, {
|
|
244
244
|
method: "POST",
|
|
245
245
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
246
246
|
});
|
|
@@ -301,7 +301,7 @@ function TicketLinkedDeliveryCard({
|
|
|
301
301
|
{
|
|
302
302
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
303
303
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
304
|
-
|
|
304
|
+
_chunk3YO2ZIZLcjs.DeliveryRow,
|
|
305
305
|
{
|
|
306
306
|
item,
|
|
307
307
|
href: clickup.delivery_href,
|
|
@@ -325,7 +325,7 @@ function TicketReplyComposer({
|
|
|
325
325
|
}) {
|
|
326
326
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
327
327
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
328
|
-
const attachments =
|
|
328
|
+
const attachments = _chunkRVCCJB6Mcjs.useChatAttachments.call(void 0, );
|
|
329
329
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
330
330
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
331
331
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -353,7 +353,7 @@ function TicketReplyComposer({
|
|
|
353
353
|
const disabled = busy || supportSystemDown;
|
|
354
354
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
355
355
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
356
|
-
|
|
356
|
+
_chunkRVCCJB6Mcjs.ChatAttachmentChipStrip,
|
|
357
357
|
{
|
|
358
358
|
attachments: attachments.attachments,
|
|
359
359
|
onRemove: attachments.removeAttachment,
|
|
@@ -362,7 +362,7 @@ function TicketReplyComposer({
|
|
|
362
362
|
}
|
|
363
363
|
),
|
|
364
364
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
365
|
-
|
|
365
|
+
_chunkRVCCJB6Mcjs.ChatInput,
|
|
366
366
|
{
|
|
367
367
|
fullWidth: true,
|
|
368
368
|
autoFocus: true,
|
|
@@ -370,13 +370,13 @@ function TicketReplyComposer({
|
|
|
370
370
|
sending: busy || attachments.hasInflightUploads,
|
|
371
371
|
disabled: supportSystemDown,
|
|
372
372
|
allowEmptySend: hasReadyFiles,
|
|
373
|
-
maxLength:
|
|
373
|
+
maxLength: _chunkRVCCJB6Mcjs.TICKET_TEXT_MAX_CHARS,
|
|
374
374
|
onSend: handleSend
|
|
375
375
|
}
|
|
376
376
|
),
|
|
377
377
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
378
378
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
379
|
-
|
|
379
|
+
_chunkRVCCJB6Mcjs.ChatAttachmentAddButton,
|
|
380
380
|
{
|
|
381
381
|
attachmentsEnabled: true,
|
|
382
382
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -399,25 +399,25 @@ function TicketReplyComposer({
|
|
|
399
399
|
}
|
|
400
400
|
)
|
|
401
401
|
] }),
|
|
402
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
403
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
404
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
405
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
402
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVCCJB6Mcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRVCCJB6Mcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
403
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRVCCJB6Mcjs.AlertDialogHeader, { children: [
|
|
404
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVCCJB6Mcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
405
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVCCJB6Mcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
406
406
|
] }),
|
|
407
407
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
408
|
-
|
|
408
|
+
_chunkRVCCJB6Mcjs.Textarea,
|
|
409
409
|
{
|
|
410
410
|
value: resolution,
|
|
411
411
|
onChange: (e) => setResolution(e.target.value),
|
|
412
412
|
placeholder: "Resolution (optional)",
|
|
413
413
|
rows: 3,
|
|
414
|
-
maxLength:
|
|
414
|
+
maxLength: _chunkRVCCJB6Mcjs.TICKET_TEXT_MAX_CHARS,
|
|
415
415
|
className: "mt-2"
|
|
416
416
|
}
|
|
417
417
|
),
|
|
418
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
418
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRVCCJB6Mcjs.AlertDialogFooter, { children: [
|
|
419
419
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
420
|
-
|
|
420
|
+
_chunkRVCCJB6Mcjs.AlertDialogCancel,
|
|
421
421
|
{
|
|
422
422
|
disabled: busy,
|
|
423
423
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -425,7 +425,7 @@ function TicketReplyComposer({
|
|
|
425
425
|
}
|
|
426
426
|
),
|
|
427
427
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
428
|
-
|
|
428
|
+
_chunkRVCCJB6Mcjs.AlertDialogAction,
|
|
429
429
|
{
|
|
430
430
|
onClick: () => void confirmClose(),
|
|
431
431
|
disabled: busy,
|
|
@@ -495,10 +495,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
495
495
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
496
496
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
497
497
|
function TicketTimelinePanel({ ticket }) {
|
|
498
|
-
const identity =
|
|
499
|
-
const externalId =
|
|
498
|
+
const identity = _chunkRVCCJB6Mcjs.useChatIdentity.call(void 0, );
|
|
499
|
+
const externalId = _chunkRVCCJB6Mcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
500
500
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
501
|
-
const live =
|
|
501
|
+
const live = _chunkRVCCJB6Mcjs.useOptionalTicketLive.call(void 0, );
|
|
502
502
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _6 => _6.setOpenTicketId]);
|
|
503
503
|
const markRead = _optionalChain([live, 'optionalAccess', _7 => _7.markRead]);
|
|
504
504
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -522,7 +522,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
522
522
|
markReadDebounceRef.current = setTimeout(() => {
|
|
523
523
|
markReadDebounceRef.current = null;
|
|
524
524
|
void markRead(externalId);
|
|
525
|
-
},
|
|
525
|
+
}, _chunkRVCCJB6Mcjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
526
526
|
}, [engagementsCount, externalId, markRead]);
|
|
527
527
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
528
528
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -537,11 +537,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
537
537
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]) || "You";
|
|
538
538
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _23 => _23.user, 'optionalAccess', _24 => _24.avatarUrl]), () => ( void 0)) : void 0;
|
|
539
539
|
if (isLoading) {
|
|
540
|
-
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,
|
|
540
|
+
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, _chunkRVCCJB6Mcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
541
541
|
}
|
|
542
542
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
543
543
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
544
|
-
|
|
544
|
+
_chunkHJCXSI7Rcjs.EmptyState,
|
|
545
545
|
{
|
|
546
546
|
type: "generic",
|
|
547
547
|
title: "No conversation yet",
|
|
@@ -556,7 +556,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
556
556
|
const isResolution = turn.startsWith("[Resolution]");
|
|
557
557
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
558
558
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
559
|
-
|
|
559
|
+
_chunkRVCCJB6Mcjs.ChatMessageRow,
|
|
560
560
|
{
|
|
561
561
|
displayName: customerName,
|
|
562
562
|
avatarUrl: customerAvatar,
|
|
@@ -585,13 +585,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
585
585
|
}
|
|
586
586
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
587
587
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
588
|
-
|
|
588
|
+
_chunkRVCCJB6Mcjs.ChatMessageRow,
|
|
589
589
|
{
|
|
590
590
|
displayName: author,
|
|
591
591
|
avatarUrl: avatarSrc,
|
|
592
|
-
timeLabel: eng.createdAt ?
|
|
592
|
+
timeLabel: eng.createdAt ? _chunkRVCCJB6Mcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
593
593
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
594
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
594
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVCCJB6Mcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
595
595
|
},
|
|
596
596
|
eng.id
|
|
597
597
|
);
|
|
@@ -679,7 +679,7 @@ function AssignedAgentRow({
|
|
|
679
679
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-h5 text-ods-text-secondary", children: "Assigned to" }),
|
|
680
680
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
681
681
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
682
|
-
|
|
682
|
+
_chunkRVCCJB6Mcjs.SquareAvatar,
|
|
683
683
|
{
|
|
684
684
|
size: "sm",
|
|
685
685
|
variant: "round",
|
|
@@ -707,11 +707,11 @@ function TicketRow({
|
|
|
707
707
|
onActionCollapsed,
|
|
708
708
|
id
|
|
709
709
|
}) {
|
|
710
|
-
const optimistic =
|
|
710
|
+
const optimistic = _chunkRVCCJB6Mcjs.isOptimistic.call(void 0, ticket);
|
|
711
711
|
const rowRef = _react.useRef.call(void 0, null);
|
|
712
712
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
713
713
|
onToggle(ticket.id);
|
|
714
|
-
|
|
714
|
+
_chunkAQ6MIFNXcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
715
715
|
adjustTargetY: (raw) => {
|
|
716
716
|
if (!rowRef.current) return raw;
|
|
717
717
|
const expandedDrawer = document.querySelector(
|
|
@@ -737,7 +737,7 @@ function TicketRow({
|
|
|
737
737
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
738
738
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
739
739
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
740
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
740
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkRVCCJB6Mcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
741
741
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
742
742
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
743
743
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -752,7 +752,7 @@ function TicketRow({
|
|
|
752
752
|
className: "border-b border-ods-border last:border-b-0",
|
|
753
753
|
children: [
|
|
754
754
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
755
|
-
|
|
755
|
+
_chunkRVCCJB6Mcjs.ChatTicketItem,
|
|
756
756
|
{
|
|
757
757
|
ticket: tileData,
|
|
758
758
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -819,7 +819,7 @@ function useTicketsList(filters) {
|
|
|
819
819
|
pageSize
|
|
820
820
|
};
|
|
821
821
|
if (statusFilter) body.status = statusFilter;
|
|
822
|
-
const response = await
|
|
822
|
+
const response = await _chunkAQ6MIFNXcjs.embedAuthedFetch.call(void 0, findTicketEndpoint, {
|
|
823
823
|
method: "POST",
|
|
824
824
|
body: JSON.stringify(body)
|
|
825
825
|
});
|
|
@@ -886,7 +886,7 @@ var MIRROR_SYNC_BACKOFF_MS = [3e3, 6e3, 12e3];
|
|
|
886
886
|
function useTicketActions(options) {
|
|
887
887
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
888
888
|
const ticketActionEndpoint = _nullishCoalesce(_chunkAJPGQCZ2cjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
889
|
-
const ticketLive =
|
|
889
|
+
const ticketLive = _chunkRVCCJB6Mcjs.useOptionalTicketLive.call(void 0, );
|
|
890
890
|
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _52 => _52.notifyTicketCreated]);
|
|
891
891
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
892
892
|
const formInFlightRef = _react.useRef.call(void 0, false);
|
|
@@ -936,7 +936,7 @@ function useTicketActions(options) {
|
|
|
936
936
|
}, []);
|
|
937
937
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
938
938
|
async (toolName, args) => {
|
|
939
|
-
const res = await
|
|
939
|
+
const res = await _chunkAQ6MIFNXcjs.embedAuthedFetch.call(void 0, ticketActionEndpoint, {
|
|
940
940
|
method: "POST",
|
|
941
941
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
942
942
|
});
|
|
@@ -1051,10 +1051,10 @@ function useTicketActions(options) {
|
|
|
1051
1051
|
..._optionalChain([input, 'access', _53 => _53.attachments, 'optionalAccess', _54 => _54.length]) ? { attachments: input.attachments } : {}
|
|
1052
1052
|
});
|
|
1053
1053
|
if (result.mirror_synced === false) {
|
|
1054
|
-
toast2(
|
|
1054
|
+
toast2(_chunkRVCCJB6Mcjs.TOAST_COPY.open_mirror_pending);
|
|
1055
1055
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
1056
1056
|
} else {
|
|
1057
|
-
toast2(
|
|
1057
|
+
toast2(_chunkRVCCJB6Mcjs.TOAST_COPY.open_success);
|
|
1058
1058
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
1059
1059
|
removeOptimistic(placeholderId);
|
|
1060
1060
|
}
|
|
@@ -1141,7 +1141,7 @@ function useTicketActions(options) {
|
|
|
1141
1141
|
...hasText ? { content_addendum: trimmed } : {},
|
|
1142
1142
|
...hasFiles ? { attachments } : {}
|
|
1143
1143
|
},
|
|
1144
|
-
|
|
1144
|
+
_chunkRVCCJB6Mcjs.TOAST_COPY.comment_success,
|
|
1145
1145
|
"send message"
|
|
1146
1146
|
);
|
|
1147
1147
|
if (ok) {
|
|
@@ -1164,13 +1164,13 @@ function useTicketActions(options) {
|
|
|
1164
1164
|
status: "CLOSED",
|
|
1165
1165
|
..._optionalChain([resolution, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]) ? { resolution: resolution.trim() } : {}
|
|
1166
1166
|
},
|
|
1167
|
-
|
|
1167
|
+
_chunkRVCCJB6Mcjs.TOAST_COPY.close_success,
|
|
1168
1168
|
"close ticket"
|
|
1169
1169
|
),
|
|
1170
1170
|
[updateTicket]
|
|
1171
1171
|
);
|
|
1172
1172
|
const reopenTicket = _react.useCallback.call(void 0,
|
|
1173
|
-
(ticket) => updateTicket(ticket, { status: "OPEN" },
|
|
1173
|
+
(ticket) => updateTicket(ticket, { status: "OPEN" }, _chunkRVCCJB6Mcjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
1174
1174
|
[updateTicket]
|
|
1175
1175
|
);
|
|
1176
1176
|
return _react.useMemo.call(void 0,
|
|
@@ -1322,14 +1322,14 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1322
1322
|
|
|
1323
1323
|
// src/components/tickets/ticket-center.tsx
|
|
1324
1324
|
|
|
1325
|
-
function TicketCenter({ toast: toast2 =
|
|
1326
|
-
const identity =
|
|
1325
|
+
function TicketCenter({ toast: toast2 = _chunkAQ6MIFNXcjs.toast } = {}) {
|
|
1326
|
+
const identity = _chunkRVCCJB6Mcjs.useChatIdentity.call(void 0, );
|
|
1327
1327
|
if (identity.isLoading) {
|
|
1328
1328
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1329
1329
|
}
|
|
1330
1330
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _62 => _62.user, 'optionalAccess', _63 => _63.email])) {
|
|
1331
1331
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1332
|
-
|
|
1332
|
+
_chunkHJCXSI7Rcjs.EmptyState,
|
|
1333
1333
|
{
|
|
1334
1334
|
type: "generic",
|
|
1335
1335
|
title: "Sign in to manage tickets",
|
|
@@ -1400,7 +1400,7 @@ function TicketCenterAuthed({
|
|
|
1400
1400
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-h6 text-ods-text-secondary", children: [
|
|
1401
1401
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1402
1402
|
"Updated ",
|
|
1403
|
-
|
|
1403
|
+
_chunkRVCCJB6Mcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1404
1404
|
] }),
|
|
1405
1405
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1406
1406
|
_chunk7INXXQVKcjs.Button,
|
|
@@ -1416,22 +1416,22 @@ function TicketCenterAuthed({
|
|
|
1416
1416
|
)
|
|
1417
1417
|
] })
|
|
1418
1418
|
] }),
|
|
1419
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1420
|
-
|
|
1419
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVCCJB6Mcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1420
|
+
_chunkHJCXSI7Rcjs.EmptyState,
|
|
1421
1421
|
{
|
|
1422
1422
|
type: "generic",
|
|
1423
1423
|
title: "No tickets yet",
|
|
1424
1424
|
description: "Open one above to start the conversation.",
|
|
1425
1425
|
showCTA: false
|
|
1426
1426
|
}
|
|
1427
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1427
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVCCJB6Mcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1428
1428
|
TicketRow,
|
|
1429
1429
|
{
|
|
1430
|
-
id:
|
|
1430
|
+
id: _chunkRVCCJB6Mcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1431
1431
|
ticket,
|
|
1432
1432
|
expanded: expandedTicketId === ticket.id,
|
|
1433
1433
|
onToggle: toggleRow,
|
|
1434
|
-
busy:
|
|
1434
|
+
busy: _chunkRVCCJB6Mcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1435
1435
|
supportSystemDown,
|
|
1436
1436
|
onSendMessage: actions.sendMessage,
|
|
1437
1437
|
onClose: actions.closeTicket,
|
|
@@ -1445,7 +1445,7 @@ function TicketCenterAuthed({
|
|
|
1445
1445
|
}
|
|
1446
1446
|
function TicketCenterSkeleton() {
|
|
1447
1447
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1448
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1448
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRVCCJB6Mcjs.Card, { className: "p-6", children: [
|
|
1449
1449
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWPPBPRFUcjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1450
1450
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWPPBPRFUcjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1451
1451
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWPPBPRFUcjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1454,7 +1454,7 @@ function TicketCenterSkeleton() {
|
|
|
1454
1454
|
] });
|
|
1455
1455
|
}
|
|
1456
1456
|
function TicketListSkeleton() {
|
|
1457
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1457
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRVCCJB6Mcjs.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: [
|
|
1458
1458
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1459
1459
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWPPBPRFUcjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1460
1460
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWPPBPRFUcjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1467,7 +1467,7 @@ function TicketListSkeleton() {
|
|
|
1467
1467
|
// src/components/tickets/help-center-list.tsx
|
|
1468
1468
|
|
|
1469
1469
|
|
|
1470
|
-
|
|
1470
|
+
_chunkHJCXSI7Rcjs.init_unified_pagination.call(void 0, );
|
|
1471
1471
|
|
|
1472
1472
|
// src/components/tickets/help-center-card.tsx
|
|
1473
1473
|
|
|
@@ -1486,10 +1486,10 @@ function HelpCenterCard({
|
|
|
1486
1486
|
onClearReplyError,
|
|
1487
1487
|
id
|
|
1488
1488
|
}) {
|
|
1489
|
-
const optimistic =
|
|
1489
|
+
const optimistic = _chunkRVCCJB6Mcjs.isOptimistic.call(void 0, ticket);
|
|
1490
1490
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1491
1491
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1492
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1492
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkRVCCJB6Mcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1493
1493
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1494
1494
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1495
1495
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1502,17 +1502,17 @@ function HelpCenterCard({
|
|
|
1502
1502
|
_react.useEffect.call(void 0, () => {
|
|
1503
1503
|
if (!isExpanded) return;
|
|
1504
1504
|
const raf = requestAnimationFrame(() => {
|
|
1505
|
-
|
|
1506
|
-
headerOffset:
|
|
1505
|
+
_chunkAQ6MIFNXcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1506
|
+
headerOffset: _chunkAQ6MIFNXcjs.STICKY_HEADER_OFFSET_PX
|
|
1507
1507
|
});
|
|
1508
1508
|
});
|
|
1509
1509
|
return () => cancelAnimationFrame(raf);
|
|
1510
1510
|
}, [isExpanded]);
|
|
1511
|
-
const live =
|
|
1511
|
+
const live = _chunkRVCCJB6Mcjs.useOptionalTicketLive.call(void 0, );
|
|
1512
1512
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1513
1513
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1514
1514
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1515
|
-
|
|
1515
|
+
_chunkRVCCJB6Mcjs.StatusBadge,
|
|
1516
1516
|
{
|
|
1517
1517
|
text: `${unreadCount} NEW`,
|
|
1518
1518
|
colorScheme: "warning",
|
|
@@ -1521,16 +1521,16 @@ function HelpCenterCard({
|
|
|
1521
1521
|
}
|
|
1522
1522
|
),
|
|
1523
1523
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1524
|
-
|
|
1524
|
+
_chunkRVCCJB6Mcjs.StatusBadge,
|
|
1525
1525
|
{
|
|
1526
1526
|
text: rawStatus,
|
|
1527
|
-
colorScheme:
|
|
1527
|
+
colorScheme: _chunkRVCCJB6Mcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1528
1528
|
variant: "card",
|
|
1529
1529
|
className: "border border-ods-border"
|
|
1530
1530
|
}
|
|
1531
1531
|
),
|
|
1532
1532
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1533
|
-
|
|
1533
|
+
_chunkRVCCJB6Mcjs.StatusBadge,
|
|
1534
1534
|
{
|
|
1535
1535
|
text: priority,
|
|
1536
1536
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1544,7 +1544,7 @@ function HelpCenterCard({
|
|
|
1544
1544
|
{
|
|
1545
1545
|
ref: rowRef,
|
|
1546
1546
|
id,
|
|
1547
|
-
style: { scrollMarginTop:
|
|
1547
|
+
style: { scrollMarginTop: _chunkAQ6MIFNXcjs.STICKY_HEADER_OFFSET_PX },
|
|
1548
1548
|
className: `border-b border-ods-border last:border-b-0 ${optimistic ? "opacity-60" : ""}`,
|
|
1549
1549
|
"aria-busy": optimistic || void 0,
|
|
1550
1550
|
children: [
|
|
@@ -1558,7 +1558,7 @@ function HelpCenterCard({
|
|
|
1558
1558
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1559
1559
|
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",
|
|
1560
1560
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1561
|
-
|
|
1561
|
+
_chunk3YO2ZIZLcjs.DevCardRowContent,
|
|
1562
1562
|
{
|
|
1563
1563
|
title,
|
|
1564
1564
|
subtitle,
|
|
@@ -1665,7 +1665,7 @@ function HelpCenterCreateForm({
|
|
|
1665
1665
|
)
|
|
1666
1666
|
] });
|
|
1667
1667
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1668
|
-
|
|
1668
|
+
_chunkD463PBIYcjs.ContactForm,
|
|
1669
1669
|
{
|
|
1670
1670
|
title: "Open a new ticket",
|
|
1671
1671
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1702,32 +1702,32 @@ function HelpCenterCreateForm({
|
|
|
1702
1702
|
|
|
1703
1703
|
// src/components/tickets/help-center-list.tsx
|
|
1704
1704
|
|
|
1705
|
-
function HelpCenterList({ toast: toast2 =
|
|
1706
|
-
const identity =
|
|
1705
|
+
function HelpCenterList({ toast: toast2 = _chunkAQ6MIFNXcjs.toast, backButton, title, shell } = {}) {
|
|
1706
|
+
const identity = _chunkRVCCJB6Mcjs.useChatIdentity.call(void 0, );
|
|
1707
1707
|
const searchParams = _chunkSSJNN5BScjs.useSearchParams.call(void 0, );
|
|
1708
1708
|
const router = _chunkSSJNN5BScjs.useRouter.call(void 0, );
|
|
1709
1709
|
const pathname = _chunkSSJNN5BScjs.usePathname.call(void 0, );
|
|
1710
|
-
const search = searchParams.get(
|
|
1710
|
+
const search = searchParams.get(_chunkRVCCJB6Mcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1711
1711
|
const status = searchParams.get("status") || "all";
|
|
1712
|
-
const ticketParam = searchParams.get(
|
|
1712
|
+
const ticketParam = searchParams.get(_chunkRVCCJB6Mcjs.TICKET_OPEN_PARAM) || "";
|
|
1713
1713
|
const rawPage = Number(searchParams.get("page"));
|
|
1714
1714
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1715
1715
|
if (identity.isLoading) {
|
|
1716
1716
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1717
|
-
|
|
1717
|
+
_chunk3YO2ZIZLcjs.DevSectionPage,
|
|
1718
1718
|
{
|
|
1719
1719
|
sectionKey: "tickets",
|
|
1720
1720
|
backButton,
|
|
1721
1721
|
title,
|
|
1722
1722
|
shell,
|
|
1723
1723
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1724
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1724
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3YO2ZIZLcjs.DevCardRowSkeletonList, {})
|
|
1725
1725
|
}
|
|
1726
1726
|
);
|
|
1727
1727
|
}
|
|
1728
1728
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1729
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1730
|
-
|
|
1729
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3YO2ZIZLcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1730
|
+
_chunkHJCXSI7Rcjs.EmptyState,
|
|
1731
1731
|
{
|
|
1732
1732
|
type: "generic",
|
|
1733
1733
|
title: "Sign in to manage tickets",
|
|
@@ -1778,8 +1778,8 @@ function HelpCenterListAuthed({
|
|
|
1778
1778
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1779
1779
|
(externalId) => {
|
|
1780
1780
|
const params = new URLSearchParams(searchParams.toString());
|
|
1781
|
-
if (externalId) params.set(
|
|
1782
|
-
else params.delete(
|
|
1781
|
+
if (externalId) params.set(_chunkRVCCJB6Mcjs.TICKET_OPEN_PARAM, externalId);
|
|
1782
|
+
else params.delete(_chunkRVCCJB6Mcjs.TICKET_OPEN_PARAM);
|
|
1783
1783
|
const qs = params.toString();
|
|
1784
1784
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1785
1785
|
},
|
|
@@ -1839,7 +1839,7 @@ function HelpCenterListAuthed({
|
|
|
1839
1839
|
[tickets, ticketParam, setOpenTicket]
|
|
1840
1840
|
);
|
|
1841
1841
|
const merged = [...optimisticTickets, ...tickets];
|
|
1842
|
-
|
|
1842
|
+
_chunkAQ6MIFNXcjs.useScrollToHash.call(void 0, tickets, { headerOffset: _chunkAQ6MIFNXcjs.STICKY_HEADER_OFFSET_PX });
|
|
1843
1843
|
const hasActiveFilters = search !== "" || status !== "" && status !== "all";
|
|
1844
1844
|
const hasResults = merged.length > 0;
|
|
1845
1845
|
const form = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1859,15 +1859,15 @@ function HelpCenterListAuthed({
|
|
|
1859
1859
|
] }),
|
|
1860
1860
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7INXXQVKcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1861
1861
|
] }),
|
|
1862
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1862
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3YO2ZIZLcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1863
1863
|
// Bridge state — background refetch in flight and the
|
|
1864
1864
|
// optimistic placeholder was just removed by the mutation
|
|
1865
1865
|
// callback. Without this branch "No tickets yet" would flash
|
|
1866
1866
|
// for ~50ms between `removeOptimistic` and the server
|
|
1867
1867
|
// response landing.
|
|
1868
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1868
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3YO2ZIZLcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1869
1869
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1870
|
-
|
|
1870
|
+
_chunkHJCXSI7Rcjs.EmptyState,
|
|
1871
1871
|
{
|
|
1872
1872
|
type: "search",
|
|
1873
1873
|
title: "No tickets found",
|
|
@@ -1882,7 +1882,7 @@ function HelpCenterListAuthed({
|
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
1884
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1885
|
-
|
|
1885
|
+
_chunkHJCXSI7Rcjs.EmptyState,
|
|
1886
1886
|
{
|
|
1887
1887
|
type: "generic",
|
|
1888
1888
|
title: "No tickets yet",
|
|
@@ -1901,11 +1901,11 @@ function HelpCenterListAuthed({
|
|
|
1901
1901
|
/* @__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,
|
|
1902
1902
|
HelpCenterCard,
|
|
1903
1903
|
{
|
|
1904
|
-
id:
|
|
1904
|
+
id: _chunkRVCCJB6Mcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1905
1905
|
ticket,
|
|
1906
1906
|
expanded: expandedTicketId === ticket.id,
|
|
1907
1907
|
onToggle: toggleRow,
|
|
1908
|
-
busy:
|
|
1908
|
+
busy: _chunkRVCCJB6Mcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1909
1909
|
supportSystemDown,
|
|
1910
1910
|
onSendMessage: actions.sendMessage,
|
|
1911
1911
|
onClose: actions.closeTicket,
|
|
@@ -1917,9 +1917,9 @@ function HelpCenterListAuthed({
|
|
|
1917
1917
|
ticket.id
|
|
1918
1918
|
)) })
|
|
1919
1919
|
) }),
|
|
1920
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1920
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJCXSI7Rcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1921
1921
|
] });
|
|
1922
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1922
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3YO2ZIZLcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1923
1923
|
}
|
|
1924
1924
|
|
|
1925
1925
|
|
|
@@ -1938,4 +1938,4 @@ function HelpCenterListAuthed({
|
|
|
1938
1938
|
|
|
1939
1939
|
|
|
1940
1940
|
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;
|
|
1941
|
-
//# sourceMappingURL=chunk-
|
|
1941
|
+
//# sourceMappingURL=chunk-6WXL6CIL.cjs.map
|