@flamingo-stack/openframe-frontend-core 0.0.299 → 0.0.300
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-2FI3USTC.js +43 -0
- package/dist/chunk-2FI3USTC.js.map +1 -0
- package/dist/{chunk-54KNMC2R.cjs → chunk-2ZHDP22R.cjs} +3 -3
- package/dist/{chunk-54KNMC2R.cjs.map → chunk-2ZHDP22R.cjs.map} +1 -1
- package/dist/{chunk-X26HXH3L.cjs → chunk-5VVNE6I5.cjs} +7 -7
- package/dist/{chunk-X26HXH3L.cjs.map → chunk-5VVNE6I5.cjs.map} +1 -1
- package/dist/{chunk-57HYFVTZ.cjs → chunk-735DLFS4.cjs} +29 -29
- package/dist/{chunk-57HYFVTZ.cjs.map → chunk-735DLFS4.cjs.map} +1 -1
- package/dist/{chunk-RY62M66O.js → chunk-7EMOBUB2.js} +2 -2
- package/dist/{chunk-WDWGFUT2.js → chunk-APWW3GPU.js} +6 -6
- package/dist/{chunk-5MLYCLOI.js → chunk-CZ2EJKPA.js} +5 -9
- package/dist/chunk-CZ2EJKPA.js.map +1 -0
- package/dist/{chunk-Q77BDAR7.cjs → chunk-E2XQ5AX7.cjs} +36 -36
- package/dist/{chunk-Q77BDAR7.cjs.map → chunk-E2XQ5AX7.cjs.map} +1 -1
- package/dist/{chunk-56X3EFTG.cjs → chunk-FM7OPH5J.cjs} +19 -19
- package/dist/{chunk-56X3EFTG.cjs.map → chunk-FM7OPH5J.cjs.map} +1 -1
- package/dist/{chunk-WMSTJAZT.cjs → chunk-G56GYN7Z.cjs} +47 -15
- package/dist/chunk-G56GYN7Z.cjs.map +1 -0
- package/dist/{chunk-PQEQUMSS.cjs → chunk-JCU4YVFY.cjs} +16 -16
- package/dist/{chunk-PQEQUMSS.cjs.map → chunk-JCU4YVFY.cjs.map} +1 -1
- package/dist/{chunk-2QG57XOJ.js → chunk-JQ2EYXWR.js} +42 -10
- package/dist/chunk-JQ2EYXWR.js.map +1 -0
- package/dist/{chunk-PI4WSYQV.js → chunk-JQLC2FVM.js} +2 -2
- package/dist/{chunk-XG2KGQ76.cjs → chunk-K2LINTWC.cjs} +40 -40
- package/dist/{chunk-XG2KGQ76.cjs.map → chunk-K2LINTWC.cjs.map} +1 -1
- package/dist/{chunk-DVHQGII5.js → chunk-K3F3AXCC.js} +4 -4
- package/dist/{chunk-N4DEX22O.js → chunk-KNX4OEU5.js} +2 -2
- package/dist/{chunk-BL6XZ2XD.cjs → chunk-LXXZDZGG.cjs} +616 -620
- package/dist/chunk-LXXZDZGG.cjs.map +1 -0
- package/dist/{chunk-PLNR6BHN.cjs → chunk-MFZP6ZJ5.cjs} +7 -7
- package/dist/{chunk-PLNR6BHN.cjs.map → chunk-MFZP6ZJ5.cjs.map} +1 -1
- package/dist/chunk-N2DVKXN4.cjs +43 -0
- package/dist/chunk-N2DVKXN4.cjs.map +1 -0
- package/dist/{chunk-B2IN2IND.js → chunk-OZW6GJKN.js} +4 -4
- package/dist/{chunk-NEVMYN4G.js → chunk-QSPEFQSN.js} +3 -3
- package/dist/{chunk-QE5CNWPF.js → chunk-SYNOZPQC.js} +3 -3
- package/dist/{chunk-67WXHSCX.cjs → chunk-XTQFETF6.cjs} +13 -13
- package/dist/{chunk-67WXHSCX.cjs.map → chunk-XTQFETF6.cjs.map} +1 -1
- package/dist/{chunk-XKIO5K5N.js → chunk-ZLLGC2RZ.js} +3 -3
- package/dist/components/case-studies/index.cjs +10 -11
- package/dist/components/case-studies/index.cjs.map +1 -1
- package/dist/components/case-studies/index.js +4 -5
- package/dist/components/case-studies/index.js.map +1 -1
- package/dist/components/chat/entity-cards/admin-content-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/blog-card.d.ts +2 -2
- package/dist/components/chat/entity-cards/blog-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/blog-image-placeholder.d.ts +1 -1
- package/dist/components/chat/entity-cards/case-study-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts +4 -3
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/use-entity-card-placeholder.d.ts +4 -3
- package/dist/components/chat/entity-cards/use-entity-card-placeholder.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/what-i-shipped-card.d.ts +1 -1
- package/dist/components/chat/index.cjs +4 -5
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +3 -4
- package/dist/components/contact/index.cjs +5 -6
- package/dist/components/contact/index.cjs.map +1 -1
- package/dist/components/contact/index.js +4 -5
- package/dist/components/docs/index.cjs +7 -8
- package/dist/components/docs/index.cjs.map +1 -1
- package/dist/components/docs/index.js +6 -7
- package/dist/components/embeds/index.cjs +5 -6
- package/dist/components/embeds/index.cjs.map +1 -1
- package/dist/components/embeds/index.js +4 -5
- package/dist/components/embeds/og-link-preview.d.ts +2 -2
- package/dist/components/faq/index.cjs +6 -7
- package/dist/components/faq/index.cjs.map +1 -1
- package/dist/components/faq/index.js +5 -6
- package/dist/components/features/index.cjs +4 -5
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +3 -4
- package/dist/components/index.cjs +193 -195
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +12 -14
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +4 -5
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.js +3 -4
- package/dist/components/onboarding-guides/index.cjs +44 -41
- package/dist/components/onboarding-guides/index.cjs.map +1 -1
- package/dist/components/onboarding-guides/index.js +11 -8
- package/dist/components/onboarding-guides/index.js.map +1 -1
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -1
- package/dist/components/related-content/index.cjs +6 -7
- package/dist/components/related-content/index.cjs.map +1 -1
- package/dist/components/related-content/index.js +5 -6
- package/dist/components/tickets/index.cjs +75 -76
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +5 -6
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/ui/index.cjs +4 -5
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +3 -4
- package/dist/contexts/chat-runtime-context.d.ts +17 -13
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -4
- package/dist/contexts/index.cjs.map +1 -1
- package/dist/contexts/index.js +3 -5
- package/dist/contexts/index.js.map +1 -1
- package/dist/hooks/index.cjs +3 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -4
- package/dist/hooks/use-og-placeholder-url.d.ts +27 -0
- package/dist/hooks/use-og-placeholder-url.d.ts.map +1 -0
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- package/dist/utils/index.cjs +26 -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 +26 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/og-placeholder.d.ts +59 -0
- package/dist/utils/og-placeholder.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/chat/entity-cards/admin-content-card.tsx +1 -1
- package/src/components/chat/entity-cards/blog-card.tsx +2 -2
- package/src/components/chat/entity-cards/blog-image-placeholder.tsx +1 -1
- package/src/components/chat/entity-cards/case-study-card.tsx +1 -1
- package/src/components/chat/entity-cards/onboarding-guide-card.tsx +4 -3
- package/src/components/chat/entity-cards/use-entity-card-placeholder.ts +13 -26
- package/src/components/chat/entity-cards/what-i-shipped-card.tsx +1 -1
- package/src/components/embeds/og-link-preview.tsx +2 -2
- package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +4 -2
- package/src/contexts/chat-runtime-context.tsx +17 -13
- package/src/hooks/index.ts +2 -2
- package/src/hooks/use-og-placeholder-url.ts +46 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/og-placeholder.ts +105 -0
- package/dist/chunk-27APPAJN.cjs +0 -24
- package/dist/chunk-27APPAJN.cjs.map +0 -1
- package/dist/chunk-2QG57XOJ.js.map +0 -1
- package/dist/chunk-5MLYCLOI.js.map +0 -1
- package/dist/chunk-BL6XZ2XD.cjs.map +0 -1
- package/dist/chunk-IZ7JSBFP.js +0 -24
- package/dist/chunk-IZ7JSBFP.js.map +0 -1
- package/dist/chunk-L6PSSIUQ.cjs +0 -24
- package/dist/chunk-L6PSSIUQ.cjs.map +0 -1
- package/dist/chunk-MJNXIEV2.js +0 -24
- package/dist/chunk-MJNXIEV2.js.map +0 -1
- package/dist/chunk-WMSTJAZT.cjs.map +0 -1
- package/dist/hooks/use-og-placeholder.d.ts +0 -31
- package/dist/hooks/use-og-placeholder.d.ts.map +0 -1
- package/src/hooks/use-og-placeholder.ts +0 -45
- /package/dist/{chunk-RY62M66O.js.map → chunk-7EMOBUB2.js.map} +0 -0
- /package/dist/{chunk-WDWGFUT2.js.map → chunk-APWW3GPU.js.map} +0 -0
- /package/dist/{chunk-PI4WSYQV.js.map → chunk-JQLC2FVM.js.map} +0 -0
- /package/dist/{chunk-DVHQGII5.js.map → chunk-K3F3AXCC.js.map} +0 -0
- /package/dist/{chunk-N4DEX22O.js.map → chunk-KNX4OEU5.js.map} +0 -0
- /package/dist/{chunk-B2IN2IND.js.map → chunk-OZW6GJKN.js.map} +0 -0
- /package/dist/{chunk-NEVMYN4G.js.map → chunk-QSPEFQSN.js.map} +0 -0
- /package/dist/{chunk-QE5CNWPF.js.map → chunk-SYNOZPQC.js.map} +0 -0
- /package/dist/{chunk-XKIO5K5N.js.map → chunk-ZLLGC2RZ.js.map} +0 -0
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkJCU4YVFYcjs = require('../../chunk-JCU4YVFY.cjs');
|
|
11
11
|
require('../../chunk-VFKQMAUF.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk735DLFS4cjs = require('../../chunk-735DLFS4.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -38,18 +38,17 @@ var _chunk57HYFVTZcjs = require('../../chunk-57HYFVTZ.cjs');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunkLXXZDZGGcjs = require('../../chunk-LXXZDZGG.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
var
|
|
48
|
+
var _chunkG56GYN7Zcjs = require('../../chunk-G56GYN7Z.cjs');
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
52
|
-
require('../../chunk-27APPAJN.cjs');
|
|
51
|
+
var _chunkN2DVKXN4cjs = require('../../chunk-N2DVKXN4.cjs');
|
|
53
52
|
require('../../chunk-BZFW3FOF.cjs');
|
|
54
53
|
|
|
55
54
|
|
|
@@ -108,7 +107,7 @@ function TicketOpenForm({
|
|
|
108
107
|
}) {
|
|
109
108
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
110
109
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
111
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
110
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkLXXZDZGGcjs.useChatAttachments.call(void 0, );
|
|
112
111
|
const trimmedSubject = subject.trim();
|
|
113
112
|
const trimmedContent = content.trim();
|
|
114
113
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -128,7 +127,7 @@ function TicketOpenForm({
|
|
|
128
127
|
clear();
|
|
129
128
|
}
|
|
130
129
|
};
|
|
131
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
130
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLXXZDZGGcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
132
131
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
133
132
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
134
133
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-sm", children: "Can't find what you're looking for? Submit a support ticket below \u2014 we'll follow up shortly." }),
|
|
@@ -167,7 +166,7 @@ function TicketOpenForm({
|
|
|
167
166
|
}
|
|
168
167
|
),
|
|
169
168
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
170
|
-
|
|
169
|
+
_chunkLXXZDZGGcjs.Textarea,
|
|
171
170
|
{
|
|
172
171
|
id: "ticket-content",
|
|
173
172
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -191,7 +190,7 @@ function TicketOpenForm({
|
|
|
191
190
|
)
|
|
192
191
|
] }),
|
|
193
192
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
194
|
-
|
|
193
|
+
_chunkLXXZDZGGcjs.ChatAttachmentChipStrip,
|
|
195
194
|
{
|
|
196
195
|
attachments,
|
|
197
196
|
onRemove: removeAttachment,
|
|
@@ -200,7 +199,7 @@ function TicketOpenForm({
|
|
|
200
199
|
),
|
|
201
200
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
202
201
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
203
|
-
|
|
202
|
+
_chunkLXXZDZGGcjs.ChatAttachmentAddButton,
|
|
204
203
|
{
|
|
205
204
|
attachmentsEnabled: !supportSystemDown,
|
|
206
205
|
attachmentsCount: attachments.length,
|
|
@@ -238,9 +237,9 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
238
237
|
|
|
239
238
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
240
239
|
function useTicketEngagements(externalTicketId, enabled = true, refetchInterval = false) {
|
|
241
|
-
const identity =
|
|
240
|
+
const identity = _chunkLXXZDZGGcjs.useChatIdentity.call(void 0, );
|
|
242
241
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
243
|
-
const listEngagementsEndpoint = _nullishCoalesce(
|
|
242
|
+
const listEngagementsEndpoint = _nullishCoalesce(_chunkN2DVKXN4cjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
244
243
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
245
244
|
const queryEnabled = fetchable && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _4 => _4.user, 'optionalAccess', _5 => _5.email]);
|
|
246
245
|
const query = _reactquery.useQuery.call(void 0, {
|
|
@@ -259,7 +258,7 @@ function useTicketEngagements(externalTicketId, enabled = true, refetchInterval
|
|
|
259
258
|
// so polling pauses on a hidden tab.
|
|
260
259
|
refetchInterval,
|
|
261
260
|
queryFn: async () => {
|
|
262
|
-
const response = await
|
|
261
|
+
const response = await _chunkG56GYN7Zcjs.embedAuthedFetch.call(void 0, listEngagementsEndpoint, {
|
|
263
262
|
method: "POST",
|
|
264
263
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
265
264
|
});
|
|
@@ -320,7 +319,7 @@ function TicketLinkedDeliveryCard({
|
|
|
320
319
|
{
|
|
321
320
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
322
321
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
323
|
-
|
|
322
|
+
_chunkJCU4YVFYcjs.DeliveryRow,
|
|
324
323
|
{
|
|
325
324
|
item,
|
|
326
325
|
href: clickup.delivery_href,
|
|
@@ -344,7 +343,7 @@ function TicketReplyComposer({
|
|
|
344
343
|
}) {
|
|
345
344
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
346
345
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
347
|
-
const attachments =
|
|
346
|
+
const attachments = _chunkLXXZDZGGcjs.useChatAttachments.call(void 0, );
|
|
348
347
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
349
348
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
350
349
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -372,7 +371,7 @@ function TicketReplyComposer({
|
|
|
372
371
|
const disabled = busy || supportSystemDown;
|
|
373
372
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
374
373
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
375
|
-
|
|
374
|
+
_chunkLXXZDZGGcjs.ChatAttachmentChipStrip,
|
|
376
375
|
{
|
|
377
376
|
attachments: attachments.attachments,
|
|
378
377
|
onRemove: attachments.removeAttachment,
|
|
@@ -381,7 +380,7 @@ function TicketReplyComposer({
|
|
|
381
380
|
}
|
|
382
381
|
),
|
|
383
382
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
384
|
-
|
|
383
|
+
_chunkLXXZDZGGcjs.ChatInput,
|
|
385
384
|
{
|
|
386
385
|
fullWidth: true,
|
|
387
386
|
autoFocus: true,
|
|
@@ -395,7 +394,7 @@ function TicketReplyComposer({
|
|
|
395
394
|
),
|
|
396
395
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
397
396
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
398
|
-
|
|
397
|
+
_chunkLXXZDZGGcjs.ChatAttachmentAddButton,
|
|
399
398
|
{
|
|
400
399
|
attachmentsEnabled: true,
|
|
401
400
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -418,13 +417,13 @@ function TicketReplyComposer({
|
|
|
418
417
|
}
|
|
419
418
|
)
|
|
420
419
|
] }),
|
|
421
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
422
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
423
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
424
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
420
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLXXZDZGGcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLXXZDZGGcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
421
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLXXZDZGGcjs.AlertDialogHeader, { children: [
|
|
422
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLXXZDZGGcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
423
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLXXZDZGGcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
425
424
|
] }),
|
|
426
425
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
427
|
-
|
|
426
|
+
_chunkLXXZDZGGcjs.Textarea,
|
|
428
427
|
{
|
|
429
428
|
value: resolution,
|
|
430
429
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -434,9 +433,9 @@ function TicketReplyComposer({
|
|
|
434
433
|
className: "mt-2"
|
|
435
434
|
}
|
|
436
435
|
),
|
|
437
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
436
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLXXZDZGGcjs.AlertDialogFooter, { children: [
|
|
438
437
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
439
|
-
|
|
438
|
+
_chunkLXXZDZGGcjs.AlertDialogCancel,
|
|
440
439
|
{
|
|
441
440
|
disabled: busy,
|
|
442
441
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -444,7 +443,7 @@ function TicketReplyComposer({
|
|
|
444
443
|
}
|
|
445
444
|
),
|
|
446
445
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
447
|
-
|
|
446
|
+
_chunkLXXZDZGGcjs.AlertDialogAction,
|
|
448
447
|
{
|
|
449
448
|
onClick: () => void confirmClose(),
|
|
450
449
|
disabled: busy,
|
|
@@ -514,7 +513,7 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
514
513
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
515
514
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
516
515
|
function TicketTimelinePanel({ ticket }) {
|
|
517
|
-
const identity =
|
|
516
|
+
const identity = _chunkLXXZDZGGcjs.useChatIdentity.call(void 0, );
|
|
518
517
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
519
518
|
const { engagements, isLoading } = useTicketEngagements(
|
|
520
519
|
externalId,
|
|
@@ -534,11 +533,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
534
533
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _19 => _19.user, 'optionalAccess', _20 => _20.email]) || "You";
|
|
535
534
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.avatarUrl]), () => ( void 0)) : void 0;
|
|
536
535
|
if (isLoading) {
|
|
537
|
-
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,
|
|
536
|
+
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, _chunkLXXZDZGGcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
538
537
|
}
|
|
539
538
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
540
539
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
541
|
-
|
|
540
|
+
_chunkJCU4YVFYcjs.EmptyState,
|
|
542
541
|
{
|
|
543
542
|
type: "generic",
|
|
544
543
|
title: "No conversation yet",
|
|
@@ -553,7 +552,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
553
552
|
const isResolution = turn.startsWith("[Resolution]");
|
|
554
553
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
555
554
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
556
|
-
|
|
555
|
+
_chunkLXXZDZGGcjs.ChatMessageRow,
|
|
557
556
|
{
|
|
558
557
|
displayName: customerName,
|
|
559
558
|
avatarUrl: customerAvatar,
|
|
@@ -582,13 +581,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
582
581
|
}
|
|
583
582
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
584
583
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
585
|
-
|
|
584
|
+
_chunkLXXZDZGGcjs.ChatMessageRow,
|
|
586
585
|
{
|
|
587
586
|
displayName: author,
|
|
588
587
|
avatarUrl: avatarSrc,
|
|
589
|
-
timeLabel: eng.createdAt ?
|
|
588
|
+
timeLabel: eng.createdAt ? _chunkLXXZDZGGcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
590
589
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
591
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
590
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLXXZDZGGcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
592
591
|
},
|
|
593
592
|
eng.id
|
|
594
593
|
);
|
|
@@ -676,7 +675,7 @@ function AssignedAgentRow({
|
|
|
676
675
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary uppercase tracking-wider font-medium", children: "Assigned to" }),
|
|
677
676
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
678
677
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
679
|
-
|
|
678
|
+
_chunkLXXZDZGGcjs.SquareAvatar,
|
|
680
679
|
{
|
|
681
680
|
size: "sm",
|
|
682
681
|
variant: "round",
|
|
@@ -708,7 +707,7 @@ function TicketRow({
|
|
|
708
707
|
const rowRef = _react.useRef.call(void 0, null);
|
|
709
708
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
710
709
|
onToggle(ticket.id);
|
|
711
|
-
|
|
710
|
+
_chunkG56GYN7Zcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
712
711
|
adjustTargetY: (raw) => {
|
|
713
712
|
if (!rowRef.current) return raw;
|
|
714
713
|
const expandedDrawer = document.querySelector(
|
|
@@ -734,7 +733,7 @@ function TicketRow({
|
|
|
734
733
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
735
734
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
736
735
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
737
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
736
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkLXXZDZGGcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
738
737
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
739
738
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
740
739
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -749,7 +748,7 @@ function TicketRow({
|
|
|
749
748
|
className: "border-b border-ods-border last:border-b-0",
|
|
750
749
|
children: [
|
|
751
750
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
752
|
-
|
|
751
|
+
_chunkLXXZDZGGcjs.ChatTicketItem,
|
|
753
752
|
{
|
|
754
753
|
ticket: tileData,
|
|
755
754
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -786,7 +785,7 @@ function TicketRow({
|
|
|
786
785
|
var FIND_TICKET_ENDPOINT = "/api/chat/agent/find-ticket";
|
|
787
786
|
var DEFAULT_PAGE_SIZE = 20;
|
|
788
787
|
function useTicketsList(filters) {
|
|
789
|
-
const findTicketEndpoint = _nullishCoalesce(
|
|
788
|
+
const findTicketEndpoint = _nullishCoalesce(_chunkN2DVKXN4cjs.useRequiredChatRuntime.call(void 0, ).endpoints.findTicketUrl, () => ( FIND_TICKET_ENDPOINT));
|
|
790
789
|
const customerEmail = filters.customerEmail;
|
|
791
790
|
const search = (_nullishCoalesce(filters.search, () => ( ""))).trim();
|
|
792
791
|
const status = (_nullishCoalesce(filters.status, () => ( ""))).trim().toLowerCase();
|
|
@@ -819,7 +818,7 @@ function useTicketsList(filters) {
|
|
|
819
818
|
pageSize
|
|
820
819
|
};
|
|
821
820
|
if (statusFilter) body.status = statusFilter;
|
|
822
|
-
const response = await
|
|
821
|
+
const response = await _chunkG56GYN7Zcjs.embedAuthedFetch.call(void 0, findTicketEndpoint, {
|
|
823
822
|
method: "POST",
|
|
824
823
|
body: JSON.stringify(body)
|
|
825
824
|
});
|
|
@@ -885,7 +884,7 @@ var REPLY_BANNER_CODES = /* @__PURE__ */ new Set([
|
|
|
885
884
|
var MIRROR_SYNC_BACKOFF_MS = [3e3, 6e3, 12e3];
|
|
886
885
|
function useTicketActions(options) {
|
|
887
886
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
888
|
-
const ticketActionEndpoint = _nullishCoalesce(
|
|
887
|
+
const ticketActionEndpoint = _nullishCoalesce(_chunkN2DVKXN4cjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
889
888
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
890
889
|
const formInFlightRef = _react.useRef.call(void 0, false);
|
|
891
890
|
const [isSubmittingForm, setIsSubmittingForm] = _react.useState.call(void 0, false);
|
|
@@ -934,7 +933,7 @@ function useTicketActions(options) {
|
|
|
934
933
|
}, []);
|
|
935
934
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
936
935
|
async (toolName, args) => {
|
|
937
|
-
const res = await
|
|
936
|
+
const res = await _chunkG56GYN7Zcjs.embedAuthedFetch.call(void 0, ticketActionEndpoint, {
|
|
938
937
|
method: "POST",
|
|
939
938
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
940
939
|
});
|
|
@@ -1318,14 +1317,14 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1318
1317
|
|
|
1319
1318
|
// src/components/tickets/ticket-center.tsx
|
|
1320
1319
|
|
|
1321
|
-
function TicketCenter({ toast: toast2 =
|
|
1322
|
-
const identity =
|
|
1320
|
+
function TicketCenter({ toast: toast2 = _chunkG56GYN7Zcjs.toast } = {}) {
|
|
1321
|
+
const identity = _chunkLXXZDZGGcjs.useChatIdentity.call(void 0, );
|
|
1323
1322
|
if (identity.isLoading) {
|
|
1324
1323
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1325
1324
|
}
|
|
1326
1325
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email])) {
|
|
1327
1326
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1328
|
-
|
|
1327
|
+
_chunkJCU4YVFYcjs.EmptyState,
|
|
1329
1328
|
{
|
|
1330
1329
|
type: "generic",
|
|
1331
1330
|
title: "Sign in to manage tickets",
|
|
@@ -1396,7 +1395,7 @@ function TicketCenterAuthed({
|
|
|
1396
1395
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1397
1396
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1398
1397
|
"Updated ",
|
|
1399
|
-
|
|
1398
|
+
_chunkLXXZDZGGcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1400
1399
|
] }),
|
|
1401
1400
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1402
1401
|
_chunkFQOTC3UUcjs.Button,
|
|
@@ -1412,18 +1411,18 @@ function TicketCenterAuthed({
|
|
|
1412
1411
|
)
|
|
1413
1412
|
] })
|
|
1414
1413
|
] }),
|
|
1415
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1416
|
-
|
|
1414
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLXXZDZGGcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1415
|
+
_chunkJCU4YVFYcjs.EmptyState,
|
|
1417
1416
|
{
|
|
1418
1417
|
type: "generic",
|
|
1419
1418
|
title: "No tickets yet",
|
|
1420
1419
|
description: "Open one above to start the conversation.",
|
|
1421
1420
|
showCTA: false
|
|
1422
1421
|
}
|
|
1423
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1422
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLXXZDZGGcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1424
1423
|
TicketRow,
|
|
1425
1424
|
{
|
|
1426
|
-
id:
|
|
1425
|
+
id: _chunkLXXZDZGGcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1427
1426
|
ticket,
|
|
1428
1427
|
expanded: expandedTicketId === ticket.id,
|
|
1429
1428
|
onToggle: toggleRow,
|
|
@@ -1441,7 +1440,7 @@ function TicketCenterAuthed({
|
|
|
1441
1440
|
}
|
|
1442
1441
|
function TicketCenterSkeleton() {
|
|
1443
1442
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1444
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1443
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLXXZDZGGcjs.Card, { className: "p-6", children: [
|
|
1445
1444
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFQOTC3UUcjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1446
1445
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFQOTC3UUcjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1447
1446
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFQOTC3UUcjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1450,7 +1449,7 @@ function TicketCenterSkeleton() {
|
|
|
1450
1449
|
] });
|
|
1451
1450
|
}
|
|
1452
1451
|
function TicketListSkeleton() {
|
|
1453
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1452
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLXXZDZGGcjs.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: [
|
|
1454
1453
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1455
1454
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFQOTC3UUcjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1456
1455
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFQOTC3UUcjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1463,7 +1462,7 @@ function TicketListSkeleton() {
|
|
|
1463
1462
|
// src/components/tickets/help-center-list.tsx
|
|
1464
1463
|
|
|
1465
1464
|
|
|
1466
|
-
|
|
1465
|
+
_chunkJCU4YVFYcjs.init_unified_pagination.call(void 0, );
|
|
1467
1466
|
|
|
1468
1467
|
// src/components/tickets/help-center-card.tsx
|
|
1469
1468
|
|
|
@@ -1485,7 +1484,7 @@ function HelpCenterCard({
|
|
|
1485
1484
|
const optimistic = isOptimistic(ticket);
|
|
1486
1485
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1487
1486
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1488
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1487
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkLXXZDZGGcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1489
1488
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1490
1489
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1491
1490
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1498,24 +1497,24 @@ function HelpCenterCard({
|
|
|
1498
1497
|
_react.useEffect.call(void 0, () => {
|
|
1499
1498
|
if (!isExpanded) return;
|
|
1500
1499
|
const raf = requestAnimationFrame(() => {
|
|
1501
|
-
|
|
1502
|
-
headerOffset:
|
|
1500
|
+
_chunkG56GYN7Zcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1501
|
+
headerOffset: _chunkG56GYN7Zcjs.STICKY_HEADER_OFFSET_PX
|
|
1503
1502
|
});
|
|
1504
1503
|
});
|
|
1505
1504
|
return () => cancelAnimationFrame(raf);
|
|
1506
1505
|
}, [isExpanded]);
|
|
1507
1506
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1508
1507
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1509
|
-
|
|
1508
|
+
_chunkLXXZDZGGcjs.StatusBadge,
|
|
1510
1509
|
{
|
|
1511
1510
|
text: rawStatus,
|
|
1512
|
-
colorScheme:
|
|
1511
|
+
colorScheme: _chunkLXXZDZGGcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1513
1512
|
variant: "card",
|
|
1514
1513
|
className: "border border-ods-border"
|
|
1515
1514
|
}
|
|
1516
1515
|
),
|
|
1517
1516
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1518
|
-
|
|
1517
|
+
_chunkLXXZDZGGcjs.StatusBadge,
|
|
1519
1518
|
{
|
|
1520
1519
|
text: priority,
|
|
1521
1520
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1529,7 +1528,7 @@ function HelpCenterCard({
|
|
|
1529
1528
|
{
|
|
1530
1529
|
ref: rowRef,
|
|
1531
1530
|
id,
|
|
1532
|
-
style: { scrollMarginTop:
|
|
1531
|
+
style: { scrollMarginTop: _chunkG56GYN7Zcjs.STICKY_HEADER_OFFSET_PX },
|
|
1533
1532
|
className: `border-b border-ods-border last:border-b-0 ${optimistic ? "opacity-60" : ""}`,
|
|
1534
1533
|
"aria-busy": optimistic || void 0,
|
|
1535
1534
|
children: [
|
|
@@ -1543,7 +1542,7 @@ function HelpCenterCard({
|
|
|
1543
1542
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1544
1543
|
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",
|
|
1545
1544
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1546
|
-
|
|
1545
|
+
_chunkJCU4YVFYcjs.DevCardRowContent,
|
|
1547
1546
|
{
|
|
1548
1547
|
title,
|
|
1549
1548
|
subtitle,
|
|
@@ -1618,7 +1617,7 @@ function HelpCenterCreateForm({
|
|
|
1618
1617
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1619
1618
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1620
1619
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1621
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1620
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLXXZDZGGcjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1622
1621
|
"Subject",
|
|
1623
1622
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1624
1623
|
] }),
|
|
@@ -1650,7 +1649,7 @@ function HelpCenterCreateForm({
|
|
|
1650
1649
|
)
|
|
1651
1650
|
] });
|
|
1652
1651
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1653
|
-
|
|
1652
|
+
_chunk735DLFS4cjs.ContactForm,
|
|
1654
1653
|
{
|
|
1655
1654
|
title: "Open a new ticket",
|
|
1656
1655
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1687,8 +1686,8 @@ function HelpCenterCreateForm({
|
|
|
1687
1686
|
|
|
1688
1687
|
// src/components/tickets/help-center-list.tsx
|
|
1689
1688
|
|
|
1690
|
-
function HelpCenterList({ toast: toast2 =
|
|
1691
|
-
const identity =
|
|
1689
|
+
function HelpCenterList({ toast: toast2 = _chunkG56GYN7Zcjs.toast, backButton } = {}) {
|
|
1690
|
+
const identity = _chunkLXXZDZGGcjs.useChatIdentity.call(void 0, );
|
|
1692
1691
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1693
1692
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1694
1693
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1698,11 +1697,11 @@ function HelpCenterList({ toast: toast2 = _chunkWMSTJAZTcjs.toast, backButton }
|
|
|
1698
1697
|
const rawPage = Number(searchParams.get("page"));
|
|
1699
1698
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1700
1699
|
if (identity.isLoading) {
|
|
1701
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1700
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJCU4YVFYcjs.DevSectionPage, { sectionKey: "tickets", backButton, preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJCU4YVFYcjs.DevCardRowSkeletonList, {}) });
|
|
1702
1701
|
}
|
|
1703
1702
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _60 => _60.user, 'optionalAccess', _61 => _61.email])) {
|
|
1704
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1705
|
-
|
|
1703
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJCU4YVFYcjs.DevSectionPage, { sectionKey: "tickets", backButton, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1704
|
+
_chunkJCU4YVFYcjs.EmptyState,
|
|
1706
1705
|
{
|
|
1707
1706
|
type: "generic",
|
|
1708
1707
|
title: "Sign in to manage tickets",
|
|
@@ -1810,7 +1809,7 @@ function HelpCenterListAuthed({
|
|
|
1810
1809
|
[tickets, ticketParam, setOpenTicket]
|
|
1811
1810
|
);
|
|
1812
1811
|
const merged = [...optimisticTickets, ...tickets];
|
|
1813
|
-
|
|
1812
|
+
_chunkG56GYN7Zcjs.useScrollToHash.call(void 0, tickets, { headerOffset: _chunkG56GYN7Zcjs.STICKY_HEADER_OFFSET_PX });
|
|
1814
1813
|
const hasActiveFilters = search !== "" || status !== "" && status !== "all";
|
|
1815
1814
|
const hasResults = merged.length > 0;
|
|
1816
1815
|
const form = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1830,15 +1829,15 @@ function HelpCenterListAuthed({
|
|
|
1830
1829
|
] }),
|
|
1831
1830
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFQOTC3UUcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1832
1831
|
] }),
|
|
1833
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1832
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJCU4YVFYcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1834
1833
|
// Bridge state — background refetch in flight and the
|
|
1835
1834
|
// optimistic placeholder was just removed by the mutation
|
|
1836
1835
|
// callback. Without this branch "No tickets yet" would flash
|
|
1837
1836
|
// for ~50ms between `removeOptimistic` and the server
|
|
1838
1837
|
// response landing.
|
|
1839
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1838
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJCU4YVFYcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1840
1839
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1841
|
-
|
|
1840
|
+
_chunkJCU4YVFYcjs.EmptyState,
|
|
1842
1841
|
{
|
|
1843
1842
|
type: "search",
|
|
1844
1843
|
title: "No tickets found",
|
|
@@ -1853,7 +1852,7 @@ function HelpCenterListAuthed({
|
|
|
1853
1852
|
}
|
|
1854
1853
|
}
|
|
1855
1854
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1856
|
-
|
|
1855
|
+
_chunkJCU4YVFYcjs.EmptyState,
|
|
1857
1856
|
{
|
|
1858
1857
|
type: "generic",
|
|
1859
1858
|
title: "No tickets yet",
|
|
@@ -1872,7 +1871,7 @@ function HelpCenterListAuthed({
|
|
|
1872
1871
|
/* @__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,
|
|
1873
1872
|
HelpCenterCard,
|
|
1874
1873
|
{
|
|
1875
|
-
id:
|
|
1874
|
+
id: _chunkLXXZDZGGcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1876
1875
|
ticket,
|
|
1877
1876
|
expanded: expandedTicketId === ticket.id,
|
|
1878
1877
|
onToggle: toggleRow,
|
|
@@ -1888,9 +1887,9 @@ function HelpCenterListAuthed({
|
|
|
1888
1887
|
ticket.id
|
|
1889
1888
|
)) })
|
|
1890
1889
|
) }),
|
|
1891
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1890
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJCU4YVFYcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1892
1891
|
] });
|
|
1893
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1892
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJCU4YVFYcjs.DevSectionPage, { sectionKey: "tickets", backButton, preControls: form, children: body });
|
|
1894
1893
|
}
|
|
1895
1894
|
|
|
1896
1895
|
|