@flamingo-stack/openframe-frontend-core 0.0.759 → 0.0.761
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-4IXA5CJT.cjs → chunk-4EM7HIIM.cjs} +105 -105
- package/dist/{chunk-WBSYC6EY.cjs → chunk-6M54EVOA.cjs} +9 -9
- package/dist/{chunk-XXM74P3N.cjs → chunk-6T6O36LT.cjs} +16 -16
- package/dist/{chunk-DHFQECP3.cjs → chunk-B7AOUPBV.cjs} +11 -11
- package/dist/{chunk-G7RDJACG.cjs → chunk-D252ICCO.cjs} +4 -4
- package/dist/{chunk-I4W4DQ6C.cjs → chunk-EMSOBT6R.cjs} +4 -4
- package/dist/{chunk-SYACKQYF.cjs → chunk-G6IK3HC5.cjs} +17 -17
- package/dist/{chunk-6VDOHVYE.cjs → chunk-GKRHGVB4.cjs} +68 -68
- package/dist/{chunk-S23DIVIP.cjs → chunk-GLQBCQOF.cjs} +26 -26
- package/dist/{chunk-CDA2MY7U.cjs → chunk-H45OTVYI.cjs} +10 -10
- package/dist/{chunk-F7WIKBRI.cjs → chunk-HQYWVNQL.cjs} +4 -4
- package/dist/{chunk-SIOSQMIB.cjs → chunk-LOM3S64Z.cjs} +3 -3
- package/dist/{chunk-EFCX5SYN.cjs → chunk-NOFJH7MA.cjs} +6 -6
- package/dist/{chunk-WGFTIEHY.cjs → chunk-OBXZDUC3.cjs} +43 -43
- package/dist/{chunk-QTYSYEHK.cjs → chunk-SUHPBFNU.cjs} +11 -6
- package/dist/{chunk-O75A3FBT.cjs → chunk-TIV74DVS.cjs} +36 -36
- package/dist/{chunk-7ITYKDJN.cjs → chunk-VAZTFCVY.cjs} +7 -7
- package/dist/{cloud-tenants-YUMG3O36.cjs → cloud-tenants-BDGV4N2T.cjs} +4 -4
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.js +9 -6
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.js +2 -0
- package/dist/components/chat/chat-sidebar.js +1 -1
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/types/component.types.d.ts +10 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/help-center-pages/index.cjs +56 -56
- package/dist/components/index.cjs +36 -36
- package/dist/components/meeting-scheduler/index.cjs +22 -22
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/navigation/navigation-sidebar-item.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/product-demo/index.cjs +7 -7
- package/dist/components/tickets/index.cjs +9 -9
- package/dist/components/ui/index.cjs +4 -4
- package/dist/{devices-EFDFNWIV.cjs → devices-Q5YHMXGV.cjs} +5 -5
- package/dist/{embeddable-chat-LTXUQWEK.cjs → embeddable-chat-ST5IR6VN.cjs} +66 -66
- package/dist/index.cjs +8 -8
- package/dist/{knowledge-UT2XI45N.cjs → knowledge-UJTJT36J.cjs} +5 -5
- package/dist/{logs-ZTYEI35Y.cjs → logs-WMNITBLM.cjs} +12 -12
- package/dist/{policies-S3IF2U3D.cjs → policies-TRXVBOH7.cjs} +8 -8
- package/dist/{scripts-IZWNCX5A.cjs → scripts-HECY7XDL.cjs} +9 -9
- package/dist/{software-update-6T4GFJPA.cjs → software-update-NNFLEMYD.cjs} +7 -7
- package/package.json +1 -1
- package/src/components/chat/chat-message-enhanced.tsx +19 -9
- package/src/components/chat/chat-message-list.tsx +2 -0
- package/src/components/chat/chat-sidebar.tsx +1 -1
- package/src/components/chat/types/component.types.ts +10 -0
- package/src/components/navigation/navigation-sidebar-item.tsx +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk6M54EVOAcjs = require('./chunk-6M54EVOA.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ var _chunkWBSYC6EYcjs = require('./chunk-WBSYC6EY.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkH45OTVYIcjs = require('./chunk-H45OTVYI.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -20,7 +20,7 @@ var _chunk5E6JHOGXcjs = require('./chunk-5E6JHOGX.cjs');
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkHQYWVNQLcjs = require('./chunk-HQYWVNQL.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -33,7 +33,7 @@ var _chunkF7WIKBRIcjs = require('./chunk-F7WIKBRI.cjs');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunk4EM7HIIMcjs = require('./chunk-4EM7HIIM.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
@@ -46,13 +46,13 @@ var _chunkVUWPLQBYcjs = require('./chunk-VUWPLQBY.cjs');
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunk6T6O36LTcjs = require('./chunk-6T6O36LT.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkSUHPBFNUcjs = require('./chunk-SUHPBFNU.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
var _chunkF64VMOIBcjs = require('./chunk-F64VMOIB.cjs');
|
|
@@ -134,7 +134,7 @@ var TicketActionFailure = class extends Error {
|
|
|
134
134
|
function useTicketActions(options) {
|
|
135
135
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
136
136
|
const ticketActionEndpoint = _nullishCoalesce(_chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
137
|
-
const ticketLive =
|
|
137
|
+
const ticketLive = _chunkHQYWVNQLcjs.useOptionalTicketLive.call(void 0, );
|
|
138
138
|
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _2 => _2.notifyTicketCreated]);
|
|
139
139
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
140
140
|
const formInFlightRef = _react.useRef.call(void 0, null);
|
|
@@ -295,10 +295,10 @@ function useTicketActions(options) {
|
|
|
295
295
|
..._optionalChain([input, 'access', _3 => _3.attachments, 'optionalAccess', _4 => _4.length]) ? { attachments: input.attachments } : {}
|
|
296
296
|
});
|
|
297
297
|
if (result.mirror_synced === false) {
|
|
298
|
-
toast2(
|
|
298
|
+
toast2(_chunkHQYWVNQLcjs.TOAST_COPY.open_mirror_pending);
|
|
299
299
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
300
300
|
} else {
|
|
301
|
-
toast2(
|
|
301
|
+
toast2(_chunkHQYWVNQLcjs.TOAST_COPY.open_success);
|
|
302
302
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
303
303
|
removeOptimistic(placeholderId);
|
|
304
304
|
}
|
|
@@ -384,7 +384,7 @@ function useTicketActions(options) {
|
|
|
384
384
|
...hasText ? { content_addendum: trimmed } : {},
|
|
385
385
|
...hasFiles ? { attachments } : {}
|
|
386
386
|
},
|
|
387
|
-
|
|
387
|
+
_chunkHQYWVNQLcjs.TOAST_COPY.comment_success,
|
|
388
388
|
"send message"
|
|
389
389
|
);
|
|
390
390
|
if (ok) {
|
|
@@ -407,13 +407,13 @@ function useTicketActions(options) {
|
|
|
407
407
|
status: "CLOSED",
|
|
408
408
|
..._optionalChain([resolution, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ? { resolution: resolution.trim() } : {}
|
|
409
409
|
},
|
|
410
|
-
|
|
410
|
+
_chunkHQYWVNQLcjs.TOAST_COPY.close_success,
|
|
411
411
|
"close ticket"
|
|
412
412
|
),
|
|
413
413
|
[updateTicket]
|
|
414
414
|
);
|
|
415
415
|
const reopenTicket = _react.useCallback.call(void 0,
|
|
416
|
-
(ticket) => updateTicket(ticket, { status: "OPEN" },
|
|
416
|
+
(ticket) => updateTicket(ticket, { status: "OPEN" }, _chunkHQYWVNQLcjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
417
417
|
[updateTicket]
|
|
418
418
|
);
|
|
419
419
|
return _react.useMemo.call(void 0,
|
|
@@ -623,14 +623,14 @@ function useTicketsList(filters) {
|
|
|
623
623
|
// src/components/tickets/ticket-open-form.tsx
|
|
624
624
|
|
|
625
625
|
var _jsxruntime = require('react/jsx-runtime');
|
|
626
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
626
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunkHQYWVNQLcjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
627
627
|
function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
628
628
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
629
629
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
630
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
630
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkSUHPBFNUcjs.useChatAttachments.call(void 0, );
|
|
631
631
|
const trimmedSubject = subject.trim();
|
|
632
632
|
const trimmedContent = content.trim();
|
|
633
|
-
const overCap = content.length >
|
|
633
|
+
const overCap = content.length > _chunkHQYWVNQLcjs.TICKET_TEXT_MAX_CHARS;
|
|
634
634
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
635
635
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
636
636
|
const handleSubmit = async (e) => {
|
|
@@ -647,7 +647,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
647
647
|
clear();
|
|
648
648
|
}
|
|
649
649
|
};
|
|
650
|
-
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", ...
|
|
650
|
+
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", ..._chunk6T6O36LTcjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
651
651
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1 md:max-w-md", children: [
|
|
652
652
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-ods-text-primary text-h2", children: "Need Support?" }),
|
|
653
653
|
/* @__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." }),
|
|
@@ -672,7 +672,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
672
672
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
673
673
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-content", className: "mb-1 block text-ods-text-primary text-h6", children: "Your Message" }),
|
|
674
674
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
675
|
-
|
|
675
|
+
_chunk4EM7HIIMcjs.Textarea,
|
|
676
676
|
{
|
|
677
677
|
id: "ticket-content",
|
|
678
678
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -686,11 +686,11 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
686
686
|
showCounter && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: `mt-1 text-right text-h6 ${overCap ? "text-ods-error" : "text-ods-text-secondary"}`, children: [
|
|
687
687
|
content.length,
|
|
688
688
|
"/",
|
|
689
|
-
|
|
689
|
+
_chunkHQYWVNQLcjs.TICKET_TEXT_MAX_CHARS
|
|
690
690
|
] })
|
|
691
691
|
] }),
|
|
692
692
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
693
|
-
|
|
693
|
+
_chunkSUHPBFNUcjs.ChatAttachmentChipStrip,
|
|
694
694
|
{
|
|
695
695
|
attachments,
|
|
696
696
|
onRemove: removeAttachment,
|
|
@@ -699,7 +699,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
699
699
|
),
|
|
700
700
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
701
701
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
702
|
-
|
|
702
|
+
_chunkSUHPBFNUcjs.ChatAttachmentAddButton,
|
|
703
703
|
{
|
|
704
704
|
attachmentsEnabled: !supportSystemDown,
|
|
705
705
|
attachmentsCount: attachments.length,
|
|
@@ -729,7 +729,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
729
729
|
|
|
730
730
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
731
731
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
732
|
-
const identity =
|
|
732
|
+
const identity = _chunkSUHPBFNUcjs.useChatIdentity.call(void 0, );
|
|
733
733
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _22 => _22.user, 'optionalAccess', _23 => _23.email]), () => ( "anon"));
|
|
734
734
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
735
735
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -802,7 +802,7 @@ function TicketLinkedDeliveryCard({ clickup, className }) {
|
|
|
802
802
|
dateClosed: clickup.date_closed,
|
|
803
803
|
clickupUrl: _nullishCoalesce(clickup.clickup_url, () => ( ""))
|
|
804
804
|
};
|
|
805
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${_chunk7Z4EQOIXcjs.CONTENT_CARD_SKELETON_FRAME_CLASS} ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
805
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${_chunk7Z4EQOIXcjs.CONTENT_CARD_SKELETON_FRAME_CLASS} ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH45OTVYIcjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
806
806
|
}
|
|
807
807
|
|
|
808
808
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -817,7 +817,7 @@ function TicketReplyComposer({
|
|
|
817
817
|
}) {
|
|
818
818
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
819
819
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
820
|
-
const attachments =
|
|
820
|
+
const attachments = _chunkSUHPBFNUcjs.useChatAttachments.call(void 0, );
|
|
821
821
|
const { readyAttachments, clear: clearAttachments } = attachments;
|
|
822
822
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
823
823
|
const hasReadyFiles = readyAttachments.length > 0;
|
|
@@ -838,7 +838,7 @@ function TicketReplyComposer({
|
|
|
838
838
|
const disabled = busy || supportSystemDown;
|
|
839
839
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
840
840
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
841
|
-
|
|
841
|
+
_chunkSUHPBFNUcjs.ChatAttachmentChipStrip,
|
|
842
842
|
{
|
|
843
843
|
attachments: attachments.attachments,
|
|
844
844
|
onRemove: attachments.removeAttachment,
|
|
@@ -855,13 +855,13 @@ function TicketReplyComposer({
|
|
|
855
855
|
sending: busy || attachments.hasInflightUploads,
|
|
856
856
|
disabled: supportSystemDown,
|
|
857
857
|
allowEmptySend: hasReadyFiles,
|
|
858
|
-
maxLength:
|
|
858
|
+
maxLength: _chunkHQYWVNQLcjs.TICKET_TEXT_MAX_CHARS,
|
|
859
859
|
onSend: handleSend
|
|
860
860
|
}
|
|
861
861
|
),
|
|
862
862
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-2", children: [
|
|
863
863
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
864
|
-
|
|
864
|
+
_chunkSUHPBFNUcjs.ChatAttachmentAddButton,
|
|
865
865
|
{
|
|
866
866
|
attachmentsEnabled: true,
|
|
867
867
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -884,25 +884,25 @@ function TicketReplyComposer({
|
|
|
884
884
|
}
|
|
885
885
|
)
|
|
886
886
|
] }),
|
|
887
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
888
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
889
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
890
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
887
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4EM7HIIMcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4EM7HIIMcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
888
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4EM7HIIMcjs.AlertDialogHeader, { children: [
|
|
889
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4EM7HIIMcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
890
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4EM7HIIMcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
891
891
|
] }),
|
|
892
892
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
893
|
-
|
|
893
|
+
_chunk4EM7HIIMcjs.Textarea,
|
|
894
894
|
{
|
|
895
895
|
value: resolution,
|
|
896
896
|
onChange: (e) => setResolution(e.target.value),
|
|
897
897
|
placeholder: "Resolution (optional)",
|
|
898
898
|
rows: 3,
|
|
899
|
-
maxLength:
|
|
899
|
+
maxLength: _chunkHQYWVNQLcjs.TICKET_TEXT_MAX_CHARS,
|
|
900
900
|
className: "mt-2"
|
|
901
901
|
}
|
|
902
902
|
),
|
|
903
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
903
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk4EM7HIIMcjs.AlertDialogFooter, { children: [
|
|
904
904
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
905
|
-
|
|
905
|
+
_chunk4EM7HIIMcjs.AlertDialogCancel,
|
|
906
906
|
{
|
|
907
907
|
disabled: busy,
|
|
908
908
|
className: "border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-border",
|
|
@@ -910,7 +910,7 @@ function TicketReplyComposer({
|
|
|
910
910
|
}
|
|
911
911
|
),
|
|
912
912
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
913
|
-
|
|
913
|
+
_chunk4EM7HIIMcjs.AlertDialogAction,
|
|
914
914
|
{
|
|
915
915
|
onClick: () => void confirmClose(),
|
|
916
916
|
disabled: busy,
|
|
@@ -972,10 +972,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
972
972
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
973
973
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
974
974
|
function TicketTimelinePanel({ ticket }) {
|
|
975
|
-
const identity =
|
|
976
|
-
const externalId =
|
|
975
|
+
const identity = _chunkSUHPBFNUcjs.useChatIdentity.call(void 0, );
|
|
976
|
+
const externalId = _chunkHQYWVNQLcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
977
977
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
978
|
-
const live =
|
|
978
|
+
const live = _chunkHQYWVNQLcjs.useOptionalTicketLive.call(void 0, );
|
|
979
979
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _26 => _26.setOpenTicketId]);
|
|
980
980
|
const markRead = _optionalChain([live, 'optionalAccess', _27 => _27.markRead]);
|
|
981
981
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -999,7 +999,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
999
999
|
markReadDebounceRef.current = setTimeout(() => {
|
|
1000
1000
|
markReadDebounceRef.current = null;
|
|
1001
1001
|
void markRead(externalId);
|
|
1002
|
-
},
|
|
1002
|
+
}, _chunkHQYWVNQLcjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
1003
1003
|
}, [engagementsCount, externalId, markRead]);
|
|
1004
1004
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
1005
1005
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -1014,7 +1014,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1014
1014
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _41 => _41.user, 'optionalAccess', _42 => _42.email]) || "You";
|
|
1015
1015
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _43 => _43.user, 'optionalAccess', _44 => _44.avatarUrl]), () => ( void 0)) : void 0;
|
|
1016
1016
|
if (isLoading) {
|
|
1017
|
-
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,
|
|
1017
|
+
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, _chunk6T6O36LTcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1018
1018
|
}
|
|
1019
1019
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1020
1020
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1033,7 +1033,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1033
1033
|
const isResolution = turn.startsWith("[Resolution]");
|
|
1034
1034
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
1035
1035
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1036
|
-
|
|
1036
|
+
_chunk6T6O36LTcjs.ChatMessageRow,
|
|
1037
1037
|
{
|
|
1038
1038
|
displayName: customerName,
|
|
1039
1039
|
avatarUrl: customerAvatar,
|
|
@@ -1062,13 +1062,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
1064
1064
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1065
|
-
|
|
1065
|
+
_chunk6T6O36LTcjs.ChatMessageRow,
|
|
1066
1066
|
{
|
|
1067
1067
|
displayName: author,
|
|
1068
1068
|
avatarUrl: avatarSrc,
|
|
1069
1069
|
timeLabel: eng.createdAt ? _chunkF64VMOIBcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1070
1070
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1071
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1071
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4EM7HIIMcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1072
1072
|
},
|
|
1073
1073
|
eng.id
|
|
1074
1074
|
);
|
|
@@ -1181,7 +1181,7 @@ function TicketRow({
|
|
|
1181
1181
|
onActionCollapsed,
|
|
1182
1182
|
id
|
|
1183
1183
|
}) {
|
|
1184
|
-
const optimistic =
|
|
1184
|
+
const optimistic = _chunkHQYWVNQLcjs.isOptimistic.call(void 0, ticket);
|
|
1185
1185
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1186
1186
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1187
1187
|
onToggle(ticket.id);
|
|
@@ -1219,7 +1219,7 @@ function TicketRow({
|
|
|
1219
1219
|
};
|
|
1220
1220
|
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: [
|
|
1221
1221
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1222
|
-
|
|
1222
|
+
_chunk6T6O36LTcjs.ChatTicketItem,
|
|
1223
1223
|
{
|
|
1224
1224
|
ticket: tileData,
|
|
1225
1225
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1252,7 +1252,7 @@ function TicketRow({
|
|
|
1252
1252
|
// src/components/tickets/ticket-center.tsx
|
|
1253
1253
|
|
|
1254
1254
|
function TicketCenter({ toast: toast2 = _chunkVUWPLQBYcjs.toast } = {}) {
|
|
1255
|
-
const identity =
|
|
1255
|
+
const identity = _chunkSUHPBFNUcjs.useChatIdentity.call(void 0, );
|
|
1256
1256
|
if (identity.isLoading) {
|
|
1257
1257
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1258
1258
|
}
|
|
@@ -1307,7 +1307,7 @@ function TicketCenterAuthed({
|
|
|
1307
1307
|
const toggleRow = _react.useCallback.call(void 0, (id) => {
|
|
1308
1308
|
setExpandedTicketId((prev) => prev === id ? null : id);
|
|
1309
1309
|
}, []);
|
|
1310
|
-
const syncInPage =
|
|
1310
|
+
const syncInPage = _chunkH45OTVYIcjs.usePageDataSync.call(void 0, sync, isLoading);
|
|
1311
1311
|
const merged = [...optimisticTickets, ...tickets];
|
|
1312
1312
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1313
1313
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1322,7 +1322,7 @@ function TicketCenterAuthed({
|
|
|
1322
1322
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
1323
1323
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h5", children: "Your Current Tickets" }),
|
|
1324
1324
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-ods-text-secondary text-h6", children: [
|
|
1325
|
-
!syncInPage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1325
|
+
!syncInPage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4EM7HIIMcjs.DataSyncLine, { sync, inline: true }),
|
|
1326
1326
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1327
1327
|
_chunk2QMBXGMQcjs.Button,
|
|
1328
1328
|
{
|
|
@@ -1348,11 +1348,11 @@ function TicketCenterAuthed({
|
|
|
1348
1348
|
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7Z4EQOIXcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1349
1349
|
TicketRow,
|
|
1350
1350
|
{
|
|
1351
|
-
id:
|
|
1351
|
+
id: _chunk6T6O36LTcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1352
1352
|
ticket,
|
|
1353
1353
|
expanded: expandedTicketId === ticket.id,
|
|
1354
1354
|
onToggle: toggleRow,
|
|
1355
|
-
busy:
|
|
1355
|
+
busy: _chunkHQYWVNQLcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1356
1356
|
supportSystemDown,
|
|
1357
1357
|
onSendMessage: actions.sendMessage,
|
|
1358
1358
|
onClose: actions.closeTicket,
|
|
@@ -1408,7 +1408,7 @@ function HelpCenterCard({
|
|
|
1408
1408
|
onClearReplyError,
|
|
1409
1409
|
id
|
|
1410
1410
|
}) {
|
|
1411
|
-
const optimistic =
|
|
1411
|
+
const optimistic = _chunkHQYWVNQLcjs.isOptimistic.call(void 0, ticket);
|
|
1412
1412
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1413
1413
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1414
1414
|
const relativeUpdated = ticket.hubspot_updated_at ? _chunkF64VMOIBcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
@@ -1430,7 +1430,7 @@ function HelpCenterCard({
|
|
|
1430
1430
|
});
|
|
1431
1431
|
return () => cancelAnimationFrame(raf);
|
|
1432
1432
|
}, [isExpanded]);
|
|
1433
|
-
const live =
|
|
1433
|
+
const live = _chunkHQYWVNQLcjs.useOptionalTicketLive.call(void 0, );
|
|
1434
1434
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _65 => _65.unreadByTicket, 'access', _66 => _66[ticket.external_id]]) || 0;
|
|
1435
1435
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1436
1436
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1480,7 +1480,7 @@ function HelpCenterCard({
|
|
|
1480
1480
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1481
1481
|
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]",
|
|
1482
1482
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1483
|
-
|
|
1483
|
+
_chunkH45OTVYIcjs.DevCardRowContent,
|
|
1484
1484
|
{
|
|
1485
1485
|
title,
|
|
1486
1486
|
subtitle,
|
|
@@ -1591,7 +1591,7 @@ function HelpCenterCreateForm({
|
|
|
1591
1591
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1592
1592
|
] });
|
|
1593
1593
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1594
|
-
|
|
1594
|
+
_chunk6M54EVOAcjs.ContactForm,
|
|
1595
1595
|
{
|
|
1596
1596
|
rescue: null,
|
|
1597
1597
|
title: "Open a new ticket",
|
|
@@ -1630,29 +1630,29 @@ function HelpCenterCreateForm({
|
|
|
1630
1630
|
// src/components/tickets/help-center-list.tsx
|
|
1631
1631
|
|
|
1632
1632
|
function HelpCenterList({ toast: toast2 = _chunkVUWPLQBYcjs.toast, backButton, title, shell } = {}) {
|
|
1633
|
-
const identity =
|
|
1633
|
+
const identity = _chunkSUHPBFNUcjs.useChatIdentity.call(void 0, );
|
|
1634
1634
|
const searchParams = _chunk7DNL734Scjs.useSearchParams.call(void 0, );
|
|
1635
1635
|
const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
|
|
1636
1636
|
const pathname = _chunk7DNL734Scjs.usePathname.call(void 0, );
|
|
1637
|
-
const search = searchParams.get(
|
|
1637
|
+
const search = searchParams.get(_chunk6T6O36LTcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1638
1638
|
const status = searchParams.get("status") || "all";
|
|
1639
|
-
const ticketParam = searchParams.get(
|
|
1639
|
+
const ticketParam = searchParams.get(_chunk6T6O36LTcjs.TICKET_OPEN_PARAM) || "";
|
|
1640
1640
|
const page = _chunkBLH2SFOOcjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1641
1641
|
if (identity.isLoading) {
|
|
1642
1642
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1643
|
-
|
|
1643
|
+
_chunkH45OTVYIcjs.DevSectionPage,
|
|
1644
1644
|
{
|
|
1645
1645
|
sectionKey: "tickets",
|
|
1646
1646
|
backButton,
|
|
1647
1647
|
title,
|
|
1648
1648
|
shell,
|
|
1649
1649
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1650
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1650
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH45OTVYIcjs.DevCardRowSkeletonList, {})
|
|
1651
1651
|
}
|
|
1652
1652
|
);
|
|
1653
1653
|
}
|
|
1654
1654
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _67 => _67.user, 'optionalAccess', _68 => _68.email])) {
|
|
1655
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1655
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH45OTVYIcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1656
1656
|
_chunk5E6JHOGXcjs.EmptyState,
|
|
1657
1657
|
{
|
|
1658
1658
|
type: "generic",
|
|
@@ -1704,8 +1704,8 @@ function HelpCenterListAuthed({
|
|
|
1704
1704
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1705
1705
|
(externalId) => {
|
|
1706
1706
|
const params = new URLSearchParams(searchParams.toString());
|
|
1707
|
-
if (externalId) params.set(
|
|
1708
|
-
else params.delete(
|
|
1707
|
+
if (externalId) params.set(_chunk6T6O36LTcjs.TICKET_OPEN_PARAM, externalId);
|
|
1708
|
+
else params.delete(_chunk6T6O36LTcjs.TICKET_OPEN_PARAM);
|
|
1709
1709
|
const qs = params.toString();
|
|
1710
1710
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1711
1711
|
},
|
|
@@ -1782,15 +1782,15 @@ function HelpCenterListAuthed({
|
|
|
1782
1782
|
] }),
|
|
1783
1783
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2QMBXGMQcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1784
1784
|
] }),
|
|
1785
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1785
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH45OTVYIcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1786
1786
|
// Bridge state — background refetch in flight and the
|
|
1787
1787
|
// optimistic placeholder was just removed by the mutation
|
|
1788
1788
|
// callback. Without this branch "No tickets yet" would flash
|
|
1789
1789
|
// for ~50ms between `removeOptimistic` and the server
|
|
1790
1790
|
// response landing.
|
|
1791
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1791
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH45OTVYIcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1792
1792
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1793
|
-
|
|
1793
|
+
_chunkH45OTVYIcjs.ListEmptyState,
|
|
1794
1794
|
{
|
|
1795
1795
|
isFiltered: hasActiveFilters,
|
|
1796
1796
|
filtered: {
|
|
@@ -1821,11 +1821,11 @@ function HelpCenterListAuthed({
|
|
|
1821
1821
|
/* @__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,
|
|
1822
1822
|
HelpCenterCard,
|
|
1823
1823
|
{
|
|
1824
|
-
id:
|
|
1824
|
+
id: _chunk6T6O36LTcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1825
1825
|
ticket,
|
|
1826
1826
|
expanded: expandedTicketId === ticket.id,
|
|
1827
1827
|
onToggle: toggleRow,
|
|
1828
|
-
busy:
|
|
1828
|
+
busy: _chunkHQYWVNQLcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1829
1829
|
supportSystemDown,
|
|
1830
1830
|
onSendMessage: actions.sendMessage,
|
|
1831
1831
|
onClose: actions.closeTicket,
|
|
@@ -1839,7 +1839,7 @@ function HelpCenterListAuthed({
|
|
|
1839
1839
|
) }),
|
|
1840
1840
|
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5E6JHOGXcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1841
1841
|
] });
|
|
1842
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1842
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH45OTVYIcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1843
1843
|
}
|
|
1844
1844
|
|
|
1845
1845
|
|