@flamingo-stack/openframe-frontend-core 0.0.752 → 0.0.754
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/build/export-map.json +1 -1
- package/dist/{chunk-OXEAN3EQ.cjs → chunk-35BJY5RR.cjs} +44 -44
- package/dist/{chunk-ZYRRRKSZ.cjs → chunk-5E6JHOGX.cjs} +3 -3
- package/dist/{chunk-35RU25PJ.cjs → chunk-7Z4EQOIX.cjs} +44 -44
- package/dist/{chunk-4PEG4JTM.cjs → chunk-B27XV2TC.cjs} +6 -6
- package/dist/{chunk-4OTCQEP3.cjs → chunk-BLZIUELR.cjs} +11 -11
- package/dist/{chunk-KBJSZFBZ.cjs → chunk-BQQ3JGEO.cjs} +3 -3
- package/dist/{chunk-RDH63XXW.cjs → chunk-DW5OKTUP.cjs} +34 -34
- package/dist/{chunk-KUVYVAS2.cjs → chunk-EDSFLB7J.cjs} +19 -17
- package/dist/{chunk-WQCLN27R.cjs → chunk-FAFFWYEH.cjs} +4 -4
- package/dist/{chunk-P4ODFQGA.cjs → chunk-GQYCVZJI.cjs} +4 -4
- package/dist/{chunk-Y6PVZRYL.cjs → chunk-IVAAQSOU.cjs} +12 -12
- package/dist/{chunk-EUQJ7QHW.cjs → chunk-JXACH52M.cjs} +4 -4
- package/dist/{chunk-JI6NRWCC.cjs → chunk-MOEILCEX.cjs} +13 -13
- package/dist/{chunk-IPVJAML5.cjs → chunk-OGKV5NOP.cjs} +69 -69
- package/dist/{chunk-OXCGQV6B.cjs → chunk-RTQN35EP.cjs} +153 -146
- package/dist/{chunk-EM4OEWCM.cjs → chunk-SDF5UUTE.cjs} +749 -608
- package/dist/{chunk-7OEVVMAU.cjs → chunk-T4BBZ5ST.cjs} +2 -2
- package/dist/{chunk-XADJG35G.cjs → chunk-TBDVF4SN.cjs} +31 -31
- package/dist/{chunk-G44V3UGE.cjs → chunk-TPJTFN7O.cjs} +81 -81
- package/dist/{chunk-J5G4CF2V.cjs → chunk-U4I3QR2A.cjs} +16 -16
- package/dist/{chunk-U2AE4UG7.cjs → chunk-UNRNLSG4.cjs} +2 -2
- package/dist/{chunk-ZVOXBSDP.cjs → chunk-WBOHLXFC.cjs} +2 -2
- package/dist/{chunk-VD3XBUQR.cjs → chunk-YSFOYBYC.cjs} +158 -158
- package/dist/{chunk-7WEGXNNS.cjs → chunk-ZNV5FE4T.cjs} +30 -30
- package/dist/{cloud-tenants-WAOMZZQ2.cjs → cloud-tenants-5OTPO7FL.cjs} +7 -7
- package/dist/components/announcement-bar.d.ts +1 -1
- package/dist/components/announcement-bar.d.ts.map +1 -1
- package/dist/components/announcement-bar.js +3 -1
- package/dist/components/case-studies/index.cjs +20 -20
- package/dist/components/chat/chat-dialog-menu-items.js +6 -6
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.js +3 -0
- package/dist/components/chat/chat-panel-context.d.ts +3 -0
- package/dist/components/chat/chat-panel-context.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.d.ts +20 -0
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.js +78 -8
- package/dist/components/chat/hooks/index.d.ts +1 -0
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/index.js +1 -0
- package/dist/components/chat/hooks/use-what-to-ask.d.ts +69 -0
- package/dist/components/chat/hooks/use-what-to-ask.d.ts.map +1 -0
- package/dist/components/chat/hooks/use-what-to-ask.js +106 -0
- package/dist/components/chat/index.cjs +13 -5
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -0
- package/dist/components/chat/mingo-chat-header.d.ts +4 -2
- package/dist/components/chat/mingo-chat-header.d.ts.map +1 -1
- package/dist/components/chat/mingo-chat-header.js +7 -2
- package/dist/components/chat/suggestions-display.d.ts +11 -0
- package/dist/components/chat/suggestions-display.d.ts.map +1 -0
- package/dist/components/chat/suggestions-display.js +27 -0
- package/dist/components/chat/types/message.types.d.ts +27 -1
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
- package/dist/components/chat/utils/extract-incomplete-message-state.js +2 -0
- package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
- package/dist/components/chat/utils/message-segment-accumulator.js +3 -0
- package/dist/components/contact/index.cjs +8 -8
- package/dist/components/docs/index.cjs +11 -11
- package/dist/components/embeds/index.cjs +8 -8
- package/dist/components/faq/index.cjs +9 -9
- package/dist/components/features/index.cjs +7 -7
- package/dist/components/help-center-pages/index.cjs +84 -84
- package/dist/components/index.cjs +66 -56
- package/dist/components/meeting-scheduler/index.cjs +31 -31
- package/dist/components/navigation/index.cjs +10 -10
- package/dist/components/onboarding-guides/index.cjs +10 -10
- package/dist/components/product-demo/index.cjs +7 -7
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/tickets/index.cjs +13 -13
- package/dist/components/ui/index.cjs +15 -7
- package/dist/{devices-VFEPXW2N.cjs → devices-MBGMD7BO.cjs} +8 -8
- package/dist/{embeddable-chat-BYQBABDV.cjs → embeddable-chat-CMEHSDV7.cjs} +163 -91
- package/dist/index.cjs +23 -11
- package/dist/{knowledge-4TE7AWZX.cjs → knowledge-LO5RK6PM.cjs} +8 -8
- package/dist/{logs-3B2P3JXN.cjs → logs-QRGJSZ4G.cjs} +15 -15
- package/dist/{policies-DVI6V22X.cjs → policies-OIQDO6F5.cjs} +11 -11
- package/dist/{scripts-JJ2BVYQ5.cjs → scripts-XULUNPDV.cjs} +12 -12
- package/dist/{software-update-BN23RATE.cjs → software-update-SRF55434.cjs} +10 -10
- package/dist/types/announcement.cjs +2 -0
- package/dist/types/announcement.d.ts +21 -0
- package/dist/types/announcement.d.ts.map +1 -1
- package/dist/types/announcement.js +2 -0
- package/dist/types/index.cjs +2 -0
- package/dist/utils/announcement-surface.d.ts +8 -0
- package/dist/utils/announcement-surface.d.ts.map +1 -0
- package/dist/utils/announcement-surface.js +7 -0
- package/dist/utils/index.cjs +7 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
- package/src/components/announcement-bar.tsx +9 -1
- package/src/components/chat/chat-dialog-menu-items.tsx +6 -6
- package/src/components/chat/chat-message-enhanced.tsx +3 -0
- package/src/components/chat/chat-panel-context.tsx +3 -0
- package/src/components/chat/embeddable-chat.tsx +132 -9
- package/src/components/chat/hooks/index.ts +1 -0
- package/src/components/chat/hooks/use-what-to-ask.ts +203 -0
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/mingo-chat-header.tsx +11 -4
- package/src/components/chat/suggestions-display.tsx +41 -0
- package/src/components/chat/types/message.types.ts +31 -1
- package/src/components/chat/utils/extract-incomplete-message-state.ts +2 -0
- package/src/components/chat/utils/message-segment-accumulator.ts +4 -0
- package/src/types/announcement.ts +22 -0
- package/src/utils/announcement-surface.ts +14 -0
- package/src/utils/index.ts +2 -0
|
@@ -1,25 +1,25 @@
|
|
|
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 _chunkBLZIUELRcjs = require('./chunk-BLZIUELR.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkU4I3QR2Acjs = require('./chunk-U4I3QR2A.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunk5E6JHOGXcjs = require('./chunk-5E6JHOGX.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkJXACH52Mcjs = require('./chunk-JXACH52M.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -31,7 +31,7 @@ var _chunkEUQJ7QHWcjs = require('./chunk-EUQJ7QHW.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkYSFOYBYCcjs = require('./chunk-YSFOYBYC.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -44,13 +44,13 @@ var _chunkVUWPLQBYcjs = require('./chunk-VUWPLQBY.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkRTQN35EPcjs = require('./chunk-RTQN35EP.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
var
|
|
53
|
+
var _chunkSDF5UUTEcjs = require('./chunk-SDF5UUTE.cjs');
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
var _chunkLVO7FALWcjs = require('./chunk-LVO7FALW.cjs');
|
|
@@ -74,7 +74,7 @@ var _chunk7DNL734Scjs = require('./chunk-7DNL734S.cjs');
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
var
|
|
77
|
+
var _chunk7Z4EQOIXcjs = require('./chunk-7Z4EQOIX.cjs');
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
var _chunkJHQNUWFMcjs = require('./chunk-JHQNUWFM.cjs');
|
|
@@ -132,7 +132,7 @@ var TicketActionFailure = class extends Error {
|
|
|
132
132
|
function useTicketActions(options) {
|
|
133
133
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
134
134
|
const ticketActionEndpoint = _nullishCoalesce(_chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
135
|
-
const ticketLive =
|
|
135
|
+
const ticketLive = _chunkJXACH52Mcjs.useOptionalTicketLive.call(void 0, );
|
|
136
136
|
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _2 => _2.notifyTicketCreated]);
|
|
137
137
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
138
138
|
const formInFlightRef = _react.useRef.call(void 0, null);
|
|
@@ -293,10 +293,10 @@ function useTicketActions(options) {
|
|
|
293
293
|
..._optionalChain([input, 'access', _3 => _3.attachments, 'optionalAccess', _4 => _4.length]) ? { attachments: input.attachments } : {}
|
|
294
294
|
});
|
|
295
295
|
if (result.mirror_synced === false) {
|
|
296
|
-
toast2(
|
|
296
|
+
toast2(_chunkJXACH52Mcjs.TOAST_COPY.open_mirror_pending);
|
|
297
297
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
298
298
|
} else {
|
|
299
|
-
toast2(
|
|
299
|
+
toast2(_chunkJXACH52Mcjs.TOAST_COPY.open_success);
|
|
300
300
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
301
301
|
removeOptimistic(placeholderId);
|
|
302
302
|
}
|
|
@@ -382,7 +382,7 @@ function useTicketActions(options) {
|
|
|
382
382
|
...hasText ? { content_addendum: trimmed } : {},
|
|
383
383
|
...hasFiles ? { attachments } : {}
|
|
384
384
|
},
|
|
385
|
-
|
|
385
|
+
_chunkJXACH52Mcjs.TOAST_COPY.comment_success,
|
|
386
386
|
"send message"
|
|
387
387
|
);
|
|
388
388
|
if (ok) {
|
|
@@ -405,13 +405,13 @@ function useTicketActions(options) {
|
|
|
405
405
|
status: "CLOSED",
|
|
406
406
|
..._optionalChain([resolution, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ? { resolution: resolution.trim() } : {}
|
|
407
407
|
},
|
|
408
|
-
|
|
408
|
+
_chunkJXACH52Mcjs.TOAST_COPY.close_success,
|
|
409
409
|
"close ticket"
|
|
410
410
|
),
|
|
411
411
|
[updateTicket]
|
|
412
412
|
);
|
|
413
413
|
const reopenTicket = _react.useCallback.call(void 0,
|
|
414
|
-
(ticket) => updateTicket(ticket, { status: "OPEN" },
|
|
414
|
+
(ticket) => updateTicket(ticket, { status: "OPEN" }, _chunkJXACH52Mcjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
415
415
|
[updateTicket]
|
|
416
416
|
);
|
|
417
417
|
return _react.useMemo.call(void 0,
|
|
@@ -620,14 +620,14 @@ function useTicketsList(filters) {
|
|
|
620
620
|
// src/components/tickets/ticket-open-form.tsx
|
|
621
621
|
|
|
622
622
|
var _jsxruntime = require('react/jsx-runtime');
|
|
623
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
623
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunkJXACH52Mcjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
624
624
|
function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
625
625
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
626
626
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
627
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
627
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkSDF5UUTEcjs.useChatAttachments.call(void 0, );
|
|
628
628
|
const trimmedSubject = subject.trim();
|
|
629
629
|
const trimmedContent = content.trim();
|
|
630
|
-
const overCap = content.length >
|
|
630
|
+
const overCap = content.length > _chunkJXACH52Mcjs.TICKET_TEXT_MAX_CHARS;
|
|
631
631
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
632
632
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
633
633
|
const handleSubmit = async (e) => {
|
|
@@ -644,7 +644,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
644
644
|
clear();
|
|
645
645
|
}
|
|
646
646
|
};
|
|
647
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
647
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7Z4EQOIXcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ..._chunkRTQN35EPcjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
648
648
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1 md:max-w-md", children: [
|
|
649
649
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-ods-text-primary text-h2", children: "Need Support?" }),
|
|
650
650
|
/* @__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." }),
|
|
@@ -669,7 +669,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
669
669
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
670
670
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-content", className: "mb-1 block text-ods-text-primary text-h6", children: "Your Message" }),
|
|
671
671
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
672
|
-
|
|
672
|
+
_chunkYSFOYBYCcjs.Textarea,
|
|
673
673
|
{
|
|
674
674
|
id: "ticket-content",
|
|
675
675
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -683,11 +683,11 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
683
683
|
showCounter && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: `mt-1 text-right text-h6 ${overCap ? "text-ods-error" : "text-ods-text-secondary"}`, children: [
|
|
684
684
|
content.length,
|
|
685
685
|
"/",
|
|
686
|
-
|
|
686
|
+
_chunkJXACH52Mcjs.TICKET_TEXT_MAX_CHARS
|
|
687
687
|
] })
|
|
688
688
|
] }),
|
|
689
689
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
690
|
-
|
|
690
|
+
_chunkSDF5UUTEcjs.ChatAttachmentChipStrip,
|
|
691
691
|
{
|
|
692
692
|
attachments,
|
|
693
693
|
onRemove: removeAttachment,
|
|
@@ -696,7 +696,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
696
696
|
),
|
|
697
697
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
698
698
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
699
|
-
|
|
699
|
+
_chunkSDF5UUTEcjs.ChatAttachmentAddButton,
|
|
700
700
|
{
|
|
701
701
|
attachmentsEnabled: !supportSystemDown,
|
|
702
702
|
attachmentsCount: attachments.length,
|
|
@@ -726,7 +726,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
726
726
|
|
|
727
727
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
728
728
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
729
|
-
const identity =
|
|
729
|
+
const identity = _chunkSDF5UUTEcjs.useChatIdentity.call(void 0, );
|
|
730
730
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]), () => ( "anon"));
|
|
731
731
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
732
732
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -799,7 +799,7 @@ function TicketLinkedDeliveryCard({ clickup, className }) {
|
|
|
799
799
|
dateClosed: clickup.date_closed,
|
|
800
800
|
clickupUrl: _nullishCoalesce(clickup.clickup_url, () => ( ""))
|
|
801
801
|
};
|
|
802
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${
|
|
802
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${_chunk7Z4EQOIXcjs.CONTENT_CARD_SKELETON_FRAME_CLASS} ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU4I3QR2Acjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
803
803
|
}
|
|
804
804
|
|
|
805
805
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -814,7 +814,7 @@ function TicketReplyComposer({
|
|
|
814
814
|
}) {
|
|
815
815
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
816
816
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
817
|
-
const attachments =
|
|
817
|
+
const attachments = _chunkSDF5UUTEcjs.useChatAttachments.call(void 0, );
|
|
818
818
|
const { readyAttachments, clear: clearAttachments } = attachments;
|
|
819
819
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
820
820
|
const hasReadyFiles = readyAttachments.length > 0;
|
|
@@ -835,7 +835,7 @@ function TicketReplyComposer({
|
|
|
835
835
|
const disabled = busy || supportSystemDown;
|
|
836
836
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
837
837
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
838
|
-
|
|
838
|
+
_chunkSDF5UUTEcjs.ChatAttachmentChipStrip,
|
|
839
839
|
{
|
|
840
840
|
attachments: attachments.attachments,
|
|
841
841
|
onRemove: attachments.removeAttachment,
|
|
@@ -852,13 +852,13 @@ function TicketReplyComposer({
|
|
|
852
852
|
sending: busy || attachments.hasInflightUploads,
|
|
853
853
|
disabled: supportSystemDown,
|
|
854
854
|
allowEmptySend: hasReadyFiles,
|
|
855
|
-
maxLength:
|
|
855
|
+
maxLength: _chunkJXACH52Mcjs.TICKET_TEXT_MAX_CHARS,
|
|
856
856
|
onSend: handleSend
|
|
857
857
|
}
|
|
858
858
|
),
|
|
859
859
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-2", children: [
|
|
860
860
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
861
|
-
|
|
861
|
+
_chunkSDF5UUTEcjs.ChatAttachmentAddButton,
|
|
862
862
|
{
|
|
863
863
|
attachmentsEnabled: true,
|
|
864
864
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -881,25 +881,25 @@ function TicketReplyComposer({
|
|
|
881
881
|
}
|
|
882
882
|
)
|
|
883
883
|
] }),
|
|
884
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
885
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
886
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
887
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
884
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYSFOYBYCcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkYSFOYBYCcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
885
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkYSFOYBYCcjs.AlertDialogHeader, { children: [
|
|
886
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYSFOYBYCcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
887
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYSFOYBYCcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
888
888
|
] }),
|
|
889
889
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
890
|
-
|
|
890
|
+
_chunkYSFOYBYCcjs.Textarea,
|
|
891
891
|
{
|
|
892
892
|
value: resolution,
|
|
893
893
|
onChange: (e) => setResolution(e.target.value),
|
|
894
894
|
placeholder: "Resolution (optional)",
|
|
895
895
|
rows: 3,
|
|
896
|
-
maxLength:
|
|
896
|
+
maxLength: _chunkJXACH52Mcjs.TICKET_TEXT_MAX_CHARS,
|
|
897
897
|
className: "mt-2"
|
|
898
898
|
}
|
|
899
899
|
),
|
|
900
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
900
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkYSFOYBYCcjs.AlertDialogFooter, { children: [
|
|
901
901
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
902
|
-
|
|
902
|
+
_chunkYSFOYBYCcjs.AlertDialogCancel,
|
|
903
903
|
{
|
|
904
904
|
disabled: busy,
|
|
905
905
|
className: "border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-border",
|
|
@@ -907,7 +907,7 @@ function TicketReplyComposer({
|
|
|
907
907
|
}
|
|
908
908
|
),
|
|
909
909
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
910
|
-
|
|
910
|
+
_chunkYSFOYBYCcjs.AlertDialogAction,
|
|
911
911
|
{
|
|
912
912
|
onClick: () => void confirmClose(),
|
|
913
913
|
disabled: busy,
|
|
@@ -969,10 +969,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
969
969
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
970
970
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
971
971
|
function TicketTimelinePanel({ ticket }) {
|
|
972
|
-
const identity =
|
|
973
|
-
const externalId =
|
|
972
|
+
const identity = _chunkSDF5UUTEcjs.useChatIdentity.call(void 0, );
|
|
973
|
+
const externalId = _chunkJXACH52Mcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
974
974
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
975
|
-
const live =
|
|
975
|
+
const live = _chunkJXACH52Mcjs.useOptionalTicketLive.call(void 0, );
|
|
976
976
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _25 => _25.setOpenTicketId]);
|
|
977
977
|
const markRead = _optionalChain([live, 'optionalAccess', _26 => _26.markRead]);
|
|
978
978
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -996,7 +996,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
996
996
|
markReadDebounceRef.current = setTimeout(() => {
|
|
997
997
|
markReadDebounceRef.current = null;
|
|
998
998
|
void markRead(externalId);
|
|
999
|
-
},
|
|
999
|
+
}, _chunkJXACH52Mcjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
1000
1000
|
}, [engagementsCount, externalId, markRead]);
|
|
1001
1001
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
1002
1002
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -1011,11 +1011,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1011
1011
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _40 => _40.user, 'optionalAccess', _41 => _41.email]) || "You";
|
|
1012
1012
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _42 => _42.user, 'optionalAccess', _43 => _43.avatarUrl]), () => ( void 0)) : void 0;
|
|
1013
1013
|
if (isLoading) {
|
|
1014
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${TICKET_FEED_FRAME} ${TICKET_FEED_HEIGHT}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNO5UJLLQcjs.LoadingRegion, { label: "Loading messages", className: TICKET_FEED_INNER, children: Array.from({ length: TICKET_FEED_SKELETON_ROWS }, (_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1014
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${TICKET_FEED_FRAME} ${TICKET_FEED_HEIGHT}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNO5UJLLQcjs.LoadingRegion, { label: "Loading messages", className: TICKET_FEED_INNER, children: Array.from({ length: TICKET_FEED_SKELETON_ROWS }, (_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRTQN35EPcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1015
1015
|
}
|
|
1016
1016
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1017
1017
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1018
|
-
|
|
1018
|
+
_chunk5E6JHOGXcjs.EmptyState,
|
|
1019
1019
|
{
|
|
1020
1020
|
type: "generic",
|
|
1021
1021
|
title: "No conversation yet",
|
|
@@ -1030,7 +1030,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1030
1030
|
const isResolution = turn.startsWith("[Resolution]");
|
|
1031
1031
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
1032
1032
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1033
|
-
|
|
1033
|
+
_chunkRTQN35EPcjs.ChatMessageRow,
|
|
1034
1034
|
{
|
|
1035
1035
|
displayName: customerName,
|
|
1036
1036
|
avatarUrl: customerAvatar,
|
|
@@ -1059,13 +1059,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
1061
1061
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1062
|
-
|
|
1062
|
+
_chunkRTQN35EPcjs.ChatMessageRow,
|
|
1063
1063
|
{
|
|
1064
1064
|
displayName: author,
|
|
1065
1065
|
avatarUrl: avatarSrc,
|
|
1066
1066
|
timeLabel: eng.createdAt ? _chunkLVO7FALWcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1067
1067
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1068
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1068
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYSFOYBYCcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1069
1069
|
},
|
|
1070
1070
|
eng.id
|
|
1071
1071
|
);
|
|
@@ -1178,7 +1178,7 @@ function TicketRow({
|
|
|
1178
1178
|
onActionCollapsed,
|
|
1179
1179
|
id
|
|
1180
1180
|
}) {
|
|
1181
|
-
const optimistic =
|
|
1181
|
+
const optimistic = _chunkJXACH52Mcjs.isOptimistic.call(void 0, ticket);
|
|
1182
1182
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1183
1183
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1184
1184
|
onToggle(ticket.id);
|
|
@@ -1216,7 +1216,7 @@ function TicketRow({
|
|
|
1216
1216
|
};
|
|
1217
1217
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: rowRef, id, className: "scroll-mt-24", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Collapsible, { open: expanded && !optimistic, className: "border-b border-ods-border last:border-b-0", children: [
|
|
1218
1218
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1219
|
-
|
|
1219
|
+
_chunkRTQN35EPcjs.ChatTicketItem,
|
|
1220
1220
|
{
|
|
1221
1221
|
ticket: tileData,
|
|
1222
1222
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1249,13 +1249,13 @@ function TicketRow({
|
|
|
1249
1249
|
// src/components/tickets/ticket-center.tsx
|
|
1250
1250
|
|
|
1251
1251
|
function TicketCenter({ toast: toast2 = _chunkVUWPLQBYcjs.toast } = {}) {
|
|
1252
|
-
const identity =
|
|
1252
|
+
const identity = _chunkSDF5UUTEcjs.useChatIdentity.call(void 0, );
|
|
1253
1253
|
if (identity.isLoading) {
|
|
1254
1254
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1255
1255
|
}
|
|
1256
1256
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _62 => _62.user, 'optionalAccess', _63 => _63.email])) {
|
|
1257
1257
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1258
|
-
|
|
1258
|
+
_chunk5E6JHOGXcjs.EmptyState,
|
|
1259
1259
|
{
|
|
1260
1260
|
type: "generic",
|
|
1261
1261
|
title: "Sign in to manage tickets",
|
|
@@ -1336,22 +1336,22 @@ function TicketCenterAuthed({
|
|
|
1336
1336
|
)
|
|
1337
1337
|
] })
|
|
1338
1338
|
] }),
|
|
1339
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1340
|
-
|
|
1339
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7Z4EQOIXcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1340
|
+
_chunk5E6JHOGXcjs.EmptyState,
|
|
1341
1341
|
{
|
|
1342
1342
|
type: "generic",
|
|
1343
1343
|
title: "No tickets yet",
|
|
1344
1344
|
description: "Open one above to start the conversation.",
|
|
1345
1345
|
showCTA: false
|
|
1346
1346
|
}
|
|
1347
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1347
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7Z4EQOIXcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1348
1348
|
TicketRow,
|
|
1349
1349
|
{
|
|
1350
|
-
id:
|
|
1350
|
+
id: _chunkRTQN35EPcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1351
1351
|
ticket,
|
|
1352
1352
|
expanded: expandedTicketId === ticket.id,
|
|
1353
1353
|
onToggle: toggleRow,
|
|
1354
|
-
busy:
|
|
1354
|
+
busy: _chunkJXACH52Mcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1355
1355
|
supportSystemDown,
|
|
1356
1356
|
onSendMessage: actions.sendMessage,
|
|
1357
1357
|
onClose: actions.closeTicket,
|
|
@@ -1367,7 +1367,7 @@ function TicketCenterSkeleton({
|
|
|
1367
1367
|
region = true
|
|
1368
1368
|
} = {}) {
|
|
1369
1369
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNO5UJLLQcjs.LoadingRegion, { label: "Loading tickets", announce: region, className: "flex flex-col gap-6", children: [
|
|
1370
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1370
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk7Z4EQOIXcjs.Card, { className: "p-6", children: [
|
|
1371
1371
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "mb-4 h-7 w-48" }),
|
|
1372
1372
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "mb-3 h-10 w-full" }),
|
|
1373
1373
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-24 w-full" })
|
|
@@ -1376,7 +1376,7 @@ function TicketCenterSkeleton({
|
|
|
1376
1376
|
] });
|
|
1377
1377
|
}
|
|
1378
1378
|
function TicketListSkeleton() {
|
|
1379
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1379
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7Z4EQOIXcjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-20 items-center gap-4 border-b border-ods-border px-4 last:border-b-0", children: [
|
|
1380
1380
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
1381
1381
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-4 w-2/3" }),
|
|
1382
1382
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-3 w-full" })
|
|
@@ -1407,7 +1407,7 @@ function HelpCenterCard({
|
|
|
1407
1407
|
onClearReplyError,
|
|
1408
1408
|
id
|
|
1409
1409
|
}) {
|
|
1410
|
-
const optimistic =
|
|
1410
|
+
const optimistic = _chunkJXACH52Mcjs.isOptimistic.call(void 0, ticket);
|
|
1411
1411
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1412
1412
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1413
1413
|
const relativeUpdated = ticket.hubspot_updated_at ? _chunkLVO7FALWcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
@@ -1429,11 +1429,11 @@ function HelpCenterCard({
|
|
|
1429
1429
|
});
|
|
1430
1430
|
return () => cancelAnimationFrame(raf);
|
|
1431
1431
|
}, [isExpanded]);
|
|
1432
|
-
const live =
|
|
1432
|
+
const live = _chunkJXACH52Mcjs.useOptionalTicketLive.call(void 0, );
|
|
1433
1433
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1434
1434
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1435
1435
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1436
|
-
|
|
1436
|
+
_chunk7Z4EQOIXcjs.StatusBadge,
|
|
1437
1437
|
{
|
|
1438
1438
|
text: `${unreadCount} NEW`,
|
|
1439
1439
|
colorScheme: "warning",
|
|
@@ -1442,16 +1442,16 @@ function HelpCenterCard({
|
|
|
1442
1442
|
}
|
|
1443
1443
|
),
|
|
1444
1444
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1445
|
-
|
|
1445
|
+
_chunk7Z4EQOIXcjs.StatusBadge,
|
|
1446
1446
|
{
|
|
1447
1447
|
text: rawStatus,
|
|
1448
|
-
colorScheme:
|
|
1448
|
+
colorScheme: _chunk7Z4EQOIXcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1449
1449
|
variant: "card",
|
|
1450
1450
|
className: "border border-ods-border"
|
|
1451
1451
|
}
|
|
1452
1452
|
),
|
|
1453
1453
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1454
|
-
|
|
1454
|
+
_chunk7Z4EQOIXcjs.StatusBadge,
|
|
1455
1455
|
{
|
|
1456
1456
|
text: priority,
|
|
1457
1457
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1479,7 +1479,7 @@ function HelpCenterCard({
|
|
|
1479
1479
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1480
1480
|
className: "w-full p-[12px] text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-accent disabled:cursor-default content-md:p-[16px]",
|
|
1481
1481
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1482
|
-
|
|
1482
|
+
_chunkU4I3QR2Acjs.DevCardRowContent,
|
|
1483
1483
|
{
|
|
1484
1484
|
title,
|
|
1485
1485
|
subtitle,
|
|
@@ -1590,7 +1590,7 @@ function HelpCenterCreateForm({
|
|
|
1590
1590
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1591
1591
|
] });
|
|
1592
1592
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1593
|
-
|
|
1593
|
+
_chunkBLZIUELRcjs.ContactForm,
|
|
1594
1594
|
{
|
|
1595
1595
|
rescue: null,
|
|
1596
1596
|
title: "Open a new ticket",
|
|
@@ -1629,30 +1629,30 @@ function HelpCenterCreateForm({
|
|
|
1629
1629
|
// src/components/tickets/help-center-list.tsx
|
|
1630
1630
|
|
|
1631
1631
|
function HelpCenterList({ toast: toast2 = _chunkVUWPLQBYcjs.toast, backButton, title, shell } = {}) {
|
|
1632
|
-
const identity =
|
|
1632
|
+
const identity = _chunkSDF5UUTEcjs.useChatIdentity.call(void 0, );
|
|
1633
1633
|
const searchParams = _chunk7DNL734Scjs.useSearchParams.call(void 0, );
|
|
1634
1634
|
const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
|
|
1635
1635
|
const pathname = _chunk7DNL734Scjs.usePathname.call(void 0, );
|
|
1636
|
-
const search = searchParams.get(
|
|
1636
|
+
const search = searchParams.get(_chunkRTQN35EPcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1637
1637
|
const status = searchParams.get("status") || "all";
|
|
1638
|
-
const ticketParam = searchParams.get(
|
|
1638
|
+
const ticketParam = searchParams.get(_chunkRTQN35EPcjs.TICKET_OPEN_PARAM) || "";
|
|
1639
1639
|
const page = _chunkBLH2SFOOcjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1640
1640
|
if (identity.isLoading) {
|
|
1641
1641
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1642
|
-
|
|
1642
|
+
_chunkU4I3QR2Acjs.DevSectionPage,
|
|
1643
1643
|
{
|
|
1644
1644
|
sectionKey: "tickets",
|
|
1645
1645
|
backButton,
|
|
1646
1646
|
title,
|
|
1647
1647
|
shell,
|
|
1648
1648
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1649
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1649
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU4I3QR2Acjs.DevCardRowSkeletonList, {})
|
|
1650
1650
|
}
|
|
1651
1651
|
);
|
|
1652
1652
|
}
|
|
1653
1653
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1654
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1655
|
-
|
|
1654
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU4I3QR2Acjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1655
|
+
_chunk5E6JHOGXcjs.EmptyState,
|
|
1656
1656
|
{
|
|
1657
1657
|
type: "generic",
|
|
1658
1658
|
title: "Sign in to manage tickets",
|
|
@@ -1703,8 +1703,8 @@ function HelpCenterListAuthed({
|
|
|
1703
1703
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1704
1704
|
(externalId) => {
|
|
1705
1705
|
const params = new URLSearchParams(searchParams.toString());
|
|
1706
|
-
if (externalId) params.set(
|
|
1707
|
-
else params.delete(
|
|
1706
|
+
if (externalId) params.set(_chunkRTQN35EPcjs.TICKET_OPEN_PARAM, externalId);
|
|
1707
|
+
else params.delete(_chunkRTQN35EPcjs.TICKET_OPEN_PARAM);
|
|
1708
1708
|
const qs = params.toString();
|
|
1709
1709
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1710
1710
|
},
|
|
@@ -1781,15 +1781,15 @@ function HelpCenterListAuthed({
|
|
|
1781
1781
|
] }),
|
|
1782
1782
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2QMBXGMQcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1783
1783
|
] }),
|
|
1784
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1784
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU4I3QR2Acjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1785
1785
|
// Bridge state — background refetch in flight and the
|
|
1786
1786
|
// optimistic placeholder was just removed by the mutation
|
|
1787
1787
|
// callback. Without this branch "No tickets yet" would flash
|
|
1788
1788
|
// for ~50ms between `removeOptimistic` and the server
|
|
1789
1789
|
// response landing.
|
|
1790
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1790
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU4I3QR2Acjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1791
1791
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1792
|
-
|
|
1792
|
+
_chunkU4I3QR2Acjs.ListEmptyState,
|
|
1793
1793
|
{
|
|
1794
1794
|
isFiltered: hasActiveFilters,
|
|
1795
1795
|
filtered: {
|
|
@@ -1820,11 +1820,11 @@ function HelpCenterListAuthed({
|
|
|
1820
1820
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full overflow-clip rounded-[6px] border border-ods-border bg-ods-card", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1821
1821
|
HelpCenterCard,
|
|
1822
1822
|
{
|
|
1823
|
-
id:
|
|
1823
|
+
id: _chunkRTQN35EPcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1824
1824
|
ticket,
|
|
1825
1825
|
expanded: expandedTicketId === ticket.id,
|
|
1826
1826
|
onToggle: toggleRow,
|
|
1827
|
-
busy:
|
|
1827
|
+
busy: _chunkJXACH52Mcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1828
1828
|
supportSystemDown,
|
|
1829
1829
|
onSendMessage: actions.sendMessage,
|
|
1830
1830
|
onClose: actions.closeTicket,
|
|
@@ -1836,9 +1836,9 @@ function HelpCenterListAuthed({
|
|
|
1836
1836
|
ticket.id
|
|
1837
1837
|
)) })
|
|
1838
1838
|
) }),
|
|
1839
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1839
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5E6JHOGXcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1840
1840
|
] });
|
|
1841
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1841
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU4I3QR2Acjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1842
1842
|
}
|
|
1843
1843
|
|
|
1844
1844
|
|