@flamingo-stack/openframe-frontend-core 0.0.641 → 0.0.642-2204.6308.1
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-TBDJQBPA.cjs → chunk-3DFAGD5C.cjs} +59 -59
- package/dist/{chunk-TBDJQBPA.cjs.map → chunk-3DFAGD5C.cjs.map} +1 -1
- package/dist/{chunk-TXLDKXRG.cjs → chunk-3G7MMZIU.cjs} +6 -6
- package/dist/{chunk-TXLDKXRG.cjs.map → chunk-3G7MMZIU.cjs.map} +1 -1
- package/dist/{chunk-I7AIORKQ.js → chunk-4DQZ2TOA.js} +3 -3
- package/dist/{chunk-5SNH6YV7.cjs → chunk-5CEQO3VK.cjs} +29 -29
- package/dist/{chunk-5SNH6YV7.cjs.map → chunk-5CEQO3VK.cjs.map} +1 -1
- package/dist/{chunk-OF5MAFYS.js → chunk-6OAKIE7E.js} +2 -2
- package/dist/{chunk-L35UOSEQ.cjs → chunk-7BVIL6SO.cjs} +15 -15
- package/dist/{chunk-L35UOSEQ.cjs.map → chunk-7BVIL6SO.cjs.map} +1 -1
- package/dist/{chunk-WX45U6RU.js → chunk-B5UDLUAY.js} +4 -4
- package/dist/{chunk-BGSBHH4X.cjs → chunk-BYJHTHP7.cjs} +145 -150
- package/dist/chunk-BYJHTHP7.cjs.map +1 -0
- package/dist/{chunk-WX7AXSVK.cjs → chunk-BZVPQBTJ.cjs} +22 -22
- package/dist/{chunk-WX7AXSVK.cjs.map → chunk-BZVPQBTJ.cjs.map} +1 -1
- package/dist/{chunk-IHMTMFNO.js → chunk-CJQENU3P.js} +3 -3
- package/dist/{chunk-2NRLRRMR.cjs → chunk-EIZAYFJG.cjs} +1 -2
- package/dist/chunk-EIZAYFJG.cjs.map +1 -0
- package/dist/{chunk-MULT7VMK.js → chunk-FKXA5M2O.js} +4 -4
- package/dist/{chunk-VPP6BJPP.cjs → chunk-GAMXLFVO.cjs} +11 -11
- package/dist/{chunk-VPP6BJPP.cjs.map → chunk-GAMXLFVO.cjs.map} +1 -1
- package/dist/{chunk-7GH4I7AL.js → chunk-HQHGPQGL.js} +6 -6
- package/dist/{chunk-VHWABKMC.cjs → chunk-ICBCUOWB.cjs} +33 -33
- package/dist/{chunk-VHWABKMC.cjs.map → chunk-ICBCUOWB.cjs.map} +1 -1
- package/dist/{chunk-5C22ZEZL.js → chunk-IUC6DXSH.js} +3 -3
- package/dist/{chunk-YTP6LQCB.cjs → chunk-J7G22DOL.cjs} +81 -91
- package/dist/chunk-J7G22DOL.cjs.map +1 -0
- package/dist/{chunk-62CT5VGY.js → chunk-JZDWYATY.js} +6 -6
- package/dist/{chunk-RRIKLBHD.js → chunk-KQ3GWJTV.js} +2 -7
- package/dist/{chunk-RRIKLBHD.js.map → chunk-KQ3GWJTV.js.map} +1 -1
- package/dist/{chunk-7EIUV3EV.cjs → chunk-LFCA7Q6N.cjs} +5 -5
- package/dist/{chunk-7EIUV3EV.cjs.map → chunk-LFCA7Q6N.cjs.map} +1 -1
- package/dist/{chunk-RLVMVUCV.js → chunk-MQF6L2YR.js} +5 -5
- package/dist/{chunk-6FMSRRZM.js → chunk-MVCMQ4FE.js} +3 -3
- package/dist/{chunk-DVCDYMSZ.js → chunk-N3NPUKSB.js} +7 -17
- package/dist/chunk-N3NPUKSB.js.map +1 -0
- package/dist/{chunk-VXZQZZJD.cjs → chunk-P3KGQ5I5.cjs} +10 -10
- package/dist/{chunk-VXZQZZJD.cjs.map → chunk-P3KGQ5I5.cjs.map} +1 -1
- package/dist/{chunk-TBKPAIIK.cjs → chunk-QCBDRVPP.cjs} +20 -20
- package/dist/{chunk-TBKPAIIK.cjs.map → chunk-QCBDRVPP.cjs.map} +1 -1
- package/dist/{chunk-3IPL6G7S.js → chunk-QOOZ2XYR.js} +1 -2
- package/dist/{chunk-3IPL6G7S.js.map → chunk-QOOZ2XYR.js.map} +1 -1
- package/dist/{chunk-ZUX7B27J.cjs → chunk-RZFQJRBA.cjs} +199 -199
- package/dist/{chunk-ZUX7B27J.cjs.map → chunk-RZFQJRBA.cjs.map} +1 -1
- package/dist/{chunk-WZK4NMFB.js → chunk-T7YPVVRY.js} +3 -3
- package/dist/{chunk-3LXJEXPH.js → chunk-TDI5TPLV.js} +2 -2
- package/dist/{chunk-GOCM2TRB.js → chunk-TIZA2HM6.js} +5 -5
- package/dist/{chunk-YPM65MEQ.js → chunk-TUPJGQ42.js} +3 -3
- package/dist/{chunk-RDEBYNLG.cjs → chunk-U7BPVYBA.cjs} +3 -3
- package/dist/{chunk-RDEBYNLG.cjs.map → chunk-U7BPVYBA.cjs.map} +1 -1
- package/dist/{chunk-MI7XL4QH.js → chunk-VISEICVF.js} +3 -3
- package/dist/{chunk-NC7JJCZX.cjs → chunk-VVARNDTE.cjs} +28 -28
- package/dist/{chunk-NC7JJCZX.cjs.map → chunk-VVARNDTE.cjs.map} +1 -1
- package/dist/{chunk-RJCIXHIN.cjs → chunk-YQTVZX4Q.cjs} +6 -6
- package/dist/{chunk-RJCIXHIN.cjs.map → chunk-YQTVZX4Q.cjs.map} +1 -1
- package/dist/{chunk-SE6YRE3R.cjs → chunk-ZQPC5K6H.cjs} +32 -32
- package/dist/{chunk-SE6YRE3R.cjs.map → chunk-ZQPC5K6H.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/docs/index.js +7 -7
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/help-center-pages/index.cjs +24 -24
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +53 -53
- package/dist/components/index.js +15 -15
- package/dist/components/meeting-scheduler/index.cjs +34 -34
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/navigation/index.js +6 -6
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/hooks/use-tickets-list.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/index.js +3 -3
- package/dist/index.cjs +8 -8
- package/dist/index.js +7 -7
- package/dist/utils/index.cjs +0 -3
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +0 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/list-url.d.ts.map +1 -1
- package/dist/utils/source-icons.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/entity-cards/dispatch.tsx +1 -3
- package/src/components/tickets/hooks/use-tickets-list.ts +0 -10
- package/src/utils/__tests__/list-url.test.ts +1 -2
- package/src/utils/list-url.ts +0 -1
- package/src/utils/source-icons.ts +0 -3
- package/dist/chunk-2NRLRRMR.cjs.map +0 -1
- package/dist/chunk-BGSBHH4X.cjs.map +0 -1
- package/dist/chunk-DVCDYMSZ.js.map +0 -1
- package/dist/chunk-YTP6LQCB.cjs.map +0 -1
- /package/dist/{chunk-I7AIORKQ.js.map → chunk-4DQZ2TOA.js.map} +0 -0
- /package/dist/{chunk-OF5MAFYS.js.map → chunk-6OAKIE7E.js.map} +0 -0
- /package/dist/{chunk-WX45U6RU.js.map → chunk-B5UDLUAY.js.map} +0 -0
- /package/dist/{chunk-IHMTMFNO.js.map → chunk-CJQENU3P.js.map} +0 -0
- /package/dist/{chunk-MULT7VMK.js.map → chunk-FKXA5M2O.js.map} +0 -0
- /package/dist/{chunk-7GH4I7AL.js.map → chunk-HQHGPQGL.js.map} +0 -0
- /package/dist/{chunk-5C22ZEZL.js.map → chunk-IUC6DXSH.js.map} +0 -0
- /package/dist/{chunk-62CT5VGY.js.map → chunk-JZDWYATY.js.map} +0 -0
- /package/dist/{chunk-RLVMVUCV.js.map → chunk-MQF6L2YR.js.map} +0 -0
- /package/dist/{chunk-6FMSRRZM.js.map → chunk-MVCMQ4FE.js.map} +0 -0
- /package/dist/{chunk-WZK4NMFB.js.map → chunk-T7YPVVRY.js.map} +0 -0
- /package/dist/{chunk-3LXJEXPH.js.map → chunk-TDI5TPLV.js.map} +0 -0
- /package/dist/{chunk-GOCM2TRB.js.map → chunk-TIZA2HM6.js.map} +0 -0
- /package/dist/{chunk-YPM65MEQ.js.map → chunk-TUPJGQ42.js.map} +0 -0
- /package/dist/{chunk-MI7XL4QH.js.map → chunk-VISEICVF.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
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 _chunkBZVPQBTJcjs = require('./chunk-BZVPQBTJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk7BVIL6SOcjs = require('./chunk-7BVIL6SO.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ var _chunkGELNUDBTcjs = require('./chunk-GELNUDBT.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkLFCA7Q6Ncjs = require('./chunk-LFCA7Q6N.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -35,7 +35,7 @@ var _chunk7EIUV3EVcjs = require('./chunk-7EIUV3EV.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkRZFQJRBAcjs = require('./chunk-RZFQJRBA.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
@@ -59,7 +59,7 @@ var _chunkN6HNK25Acjs = require('./chunk-N6HNK25A.cjs');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkBYJHTHP7cjs = require('./chunk-BYJHTHP7.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
@@ -74,7 +74,7 @@ var _chunkSADRZ4YIcjs = require('./chunk-SADRZ4YI.cjs');
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
var
|
|
77
|
+
var _chunkEIZAYFJGcjs = require('./chunk-EIZAYFJG.cjs');
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
var _chunkEHAYNUOLcjs = require('./chunk-EHAYNUOL.cjs');
|
|
@@ -115,7 +115,7 @@ var TicketActionFailure = class extends Error {
|
|
|
115
115
|
function useTicketActions(options) {
|
|
116
116
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
117
117
|
const ticketActionEndpoint = _nullishCoalesce(_chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
118
|
-
const ticketLive =
|
|
118
|
+
const ticketLive = _chunkLFCA7Q6Ncjs.useOptionalTicketLive.call(void 0, );
|
|
119
119
|
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _2 => _2.notifyTicketCreated]);
|
|
120
120
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
121
121
|
const formInFlightRef = _react.useRef.call(void 0, null);
|
|
@@ -276,10 +276,10 @@ function useTicketActions(options) {
|
|
|
276
276
|
..._optionalChain([input, 'access', _3 => _3.attachments, 'optionalAccess', _4 => _4.length]) ? { attachments: input.attachments } : {}
|
|
277
277
|
});
|
|
278
278
|
if (result.mirror_synced === false) {
|
|
279
|
-
toast2(
|
|
279
|
+
toast2(_chunkLFCA7Q6Ncjs.TOAST_COPY.open_mirror_pending);
|
|
280
280
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
281
281
|
} else {
|
|
282
|
-
toast2(
|
|
282
|
+
toast2(_chunkLFCA7Q6Ncjs.TOAST_COPY.open_success);
|
|
283
283
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
284
284
|
removeOptimistic(placeholderId);
|
|
285
285
|
}
|
|
@@ -365,7 +365,7 @@ function useTicketActions(options) {
|
|
|
365
365
|
...hasText ? { content_addendum: trimmed } : {},
|
|
366
366
|
...hasFiles ? { attachments } : {}
|
|
367
367
|
},
|
|
368
|
-
|
|
368
|
+
_chunkLFCA7Q6Ncjs.TOAST_COPY.comment_success,
|
|
369
369
|
"send message"
|
|
370
370
|
);
|
|
371
371
|
if (ok) {
|
|
@@ -388,13 +388,13 @@ function useTicketActions(options) {
|
|
|
388
388
|
status: "CLOSED",
|
|
389
389
|
..._optionalChain([resolution, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ? { resolution: resolution.trim() } : {}
|
|
390
390
|
},
|
|
391
|
-
|
|
391
|
+
_chunkLFCA7Q6Ncjs.TOAST_COPY.close_success,
|
|
392
392
|
"close ticket"
|
|
393
393
|
),
|
|
394
394
|
[updateTicket]
|
|
395
395
|
);
|
|
396
396
|
const reopenTicket = _react.useCallback.call(void 0,
|
|
397
|
-
(ticket) => updateTicket(ticket, { status: "OPEN" },
|
|
397
|
+
(ticket) => updateTicket(ticket, { status: "OPEN" }, _chunkLFCA7Q6Ncjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
398
398
|
[updateTicket]
|
|
399
399
|
);
|
|
400
400
|
return _react.useMemo.call(void 0,
|
|
@@ -592,16 +592,6 @@ function useTicketsList(filters) {
|
|
|
592
592
|
// - Background refetch with existing data: data !== undefined → no load
|
|
593
593
|
// - Filter-change refetch landing on empty results: data?.tickets===[]
|
|
594
594
|
// + isFetching → bridge skeleton (the `||` branch)
|
|
595
|
-
// Loading-state-truth = `data === undefined`. TanStack v5's
|
|
596
|
-
// `isPending` / `isLoading` flags can be `false` in transient
|
|
597
|
-
// windows where the query is enabled-but-fetch-not-yet-fired
|
|
598
|
-
// OR where stale-data exists from a sibling cache slot. Treating
|
|
599
|
-
// "no data for THIS query slot yet" as the universal loading
|
|
600
|
-
// signal can't lie:
|
|
601
|
-
// - Initial render after enabled flips: data === undefined → load
|
|
602
|
-
// - Background refetch with existing data: data !== undefined → no load
|
|
603
|
-
// - Filter-change refetch landing on empty results: data?.tickets===[]
|
|
604
|
-
// + isFetching → bridge skeleton (the `||` branch)
|
|
605
595
|
isLoading: enabled && (data === void 0 || query.isFetching && (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _20 => _20.tickets]), () => ( []))).length === 0),
|
|
606
596
|
isFetching: query.isFetching,
|
|
607
597
|
error: _nullishCoalesce(query.error, () => ( null)),
|
|
@@ -619,14 +609,14 @@ function useTicketsList(filters) {
|
|
|
619
609
|
// src/components/tickets/ticket-open-form.tsx
|
|
620
610
|
|
|
621
611
|
var _jsxruntime = require('react/jsx-runtime');
|
|
622
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
612
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunkLFCA7Q6Ncjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
623
613
|
function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
624
614
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
625
615
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
626
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
616
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkBYJHTHP7cjs.useChatAttachments.call(void 0, );
|
|
627
617
|
const trimmedSubject = subject.trim();
|
|
628
618
|
const trimmedContent = content.trim();
|
|
629
|
-
const overCap = content.length >
|
|
619
|
+
const overCap = content.length > _chunkLFCA7Q6Ncjs.TICKET_TEXT_MAX_CHARS;
|
|
630
620
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
631
621
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
632
622
|
const handleSubmit = async (e) => {
|
|
@@ -643,7 +633,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
643
633
|
clear();
|
|
644
634
|
}
|
|
645
635
|
};
|
|
646
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
636
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEIZAYFJGcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ..._chunkRZFQJRBAcjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
647
637
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1 md:max-w-md", children: [
|
|
648
638
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-ods-text-primary text-h2", children: "Need Support?" }),
|
|
649
639
|
/* @__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." }),
|
|
@@ -668,7 +658,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
668
658
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
669
659
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-content", className: "mb-1 block text-ods-text-primary text-h6", children: "Your Message" }),
|
|
670
660
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
671
|
-
|
|
661
|
+
_chunkRZFQJRBAcjs.Textarea,
|
|
672
662
|
{
|
|
673
663
|
id: "ticket-content",
|
|
674
664
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -682,11 +672,11 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
682
672
|
showCounter && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: `mt-1 text-right text-h6 ${overCap ? "text-ods-error" : "text-ods-text-secondary"}`, children: [
|
|
683
673
|
content.length,
|
|
684
674
|
"/",
|
|
685
|
-
|
|
675
|
+
_chunkLFCA7Q6Ncjs.TICKET_TEXT_MAX_CHARS
|
|
686
676
|
] })
|
|
687
677
|
] }),
|
|
688
678
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
689
|
-
|
|
679
|
+
_chunkBYJHTHP7cjs.ChatAttachmentChipStrip,
|
|
690
680
|
{
|
|
691
681
|
attachments,
|
|
692
682
|
onRemove: removeAttachment,
|
|
@@ -695,7 +685,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
695
685
|
),
|
|
696
686
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
697
687
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
698
|
-
|
|
688
|
+
_chunkBYJHTHP7cjs.ChatAttachmentAddButton,
|
|
699
689
|
{
|
|
700
690
|
attachmentsEnabled: !supportSystemDown,
|
|
701
691
|
attachmentsCount: attachments.length,
|
|
@@ -725,7 +715,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
725
715
|
|
|
726
716
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
727
717
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
728
|
-
const identity =
|
|
718
|
+
const identity = _chunkBYJHTHP7cjs.useChatIdentity.call(void 0, );
|
|
729
719
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]), () => ( "anon"));
|
|
730
720
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkUPKZU6QUcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
731
721
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -798,7 +788,7 @@ function TicketLinkedDeliveryCard({ clickup, className }) {
|
|
|
798
788
|
dateClosed: clickup.date_closed,
|
|
799
789
|
clickupUrl: _nullishCoalesce(clickup.clickup_url, () => ( ""))
|
|
800
790
|
};
|
|
801
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `overflow-hidden rounded-md border border-ods-border bg-ods-bg ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
791
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `overflow-hidden rounded-md border border-ods-border bg-ods-bg ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7BVIL6SOcjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
802
792
|
}
|
|
803
793
|
|
|
804
794
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -813,7 +803,7 @@ function TicketReplyComposer({
|
|
|
813
803
|
}) {
|
|
814
804
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
815
805
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
816
|
-
const attachments =
|
|
806
|
+
const attachments = _chunkBYJHTHP7cjs.useChatAttachments.call(void 0, );
|
|
817
807
|
const { readyAttachments, clear: clearAttachments } = attachments;
|
|
818
808
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
819
809
|
const hasReadyFiles = readyAttachments.length > 0;
|
|
@@ -834,7 +824,7 @@ function TicketReplyComposer({
|
|
|
834
824
|
const disabled = busy || supportSystemDown;
|
|
835
825
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
836
826
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
837
|
-
|
|
827
|
+
_chunkBYJHTHP7cjs.ChatAttachmentChipStrip,
|
|
838
828
|
{
|
|
839
829
|
attachments: attachments.attachments,
|
|
840
830
|
onRemove: attachments.removeAttachment,
|
|
@@ -843,7 +833,7 @@ function TicketReplyComposer({
|
|
|
843
833
|
}
|
|
844
834
|
),
|
|
845
835
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
846
|
-
|
|
836
|
+
_chunkBYJHTHP7cjs.ChatInput,
|
|
847
837
|
{
|
|
848
838
|
fullWidth: true,
|
|
849
839
|
autoFocus: true,
|
|
@@ -851,13 +841,13 @@ function TicketReplyComposer({
|
|
|
851
841
|
sending: busy || attachments.hasInflightUploads,
|
|
852
842
|
disabled: supportSystemDown,
|
|
853
843
|
allowEmptySend: hasReadyFiles,
|
|
854
|
-
maxLength:
|
|
844
|
+
maxLength: _chunkLFCA7Q6Ncjs.TICKET_TEXT_MAX_CHARS,
|
|
855
845
|
onSend: handleSend
|
|
856
846
|
}
|
|
857
847
|
),
|
|
858
848
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-2", children: [
|
|
859
849
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
860
|
-
|
|
850
|
+
_chunkBYJHTHP7cjs.ChatAttachmentAddButton,
|
|
861
851
|
{
|
|
862
852
|
attachmentsEnabled: true,
|
|
863
853
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -880,25 +870,25 @@ function TicketReplyComposer({
|
|
|
880
870
|
}
|
|
881
871
|
)
|
|
882
872
|
] }),
|
|
883
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
884
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
885
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
886
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
873
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRZFQJRBAcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRZFQJRBAcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
874
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRZFQJRBAcjs.AlertDialogHeader, { children: [
|
|
875
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRZFQJRBAcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
876
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRZFQJRBAcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
887
877
|
] }),
|
|
888
878
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
889
|
-
|
|
879
|
+
_chunkRZFQJRBAcjs.Textarea,
|
|
890
880
|
{
|
|
891
881
|
value: resolution,
|
|
892
882
|
onChange: (e) => setResolution(e.target.value),
|
|
893
883
|
placeholder: "Resolution (optional)",
|
|
894
884
|
rows: 3,
|
|
895
|
-
maxLength:
|
|
885
|
+
maxLength: _chunkLFCA7Q6Ncjs.TICKET_TEXT_MAX_CHARS,
|
|
896
886
|
className: "mt-2"
|
|
897
887
|
}
|
|
898
888
|
),
|
|
899
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
889
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkRZFQJRBAcjs.AlertDialogFooter, { children: [
|
|
900
890
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
901
|
-
|
|
891
|
+
_chunkRZFQJRBAcjs.AlertDialogCancel,
|
|
902
892
|
{
|
|
903
893
|
disabled: busy,
|
|
904
894
|
className: "border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-border",
|
|
@@ -906,7 +896,7 @@ function TicketReplyComposer({
|
|
|
906
896
|
}
|
|
907
897
|
),
|
|
908
898
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
909
|
-
|
|
899
|
+
_chunkRZFQJRBAcjs.AlertDialogAction,
|
|
910
900
|
{
|
|
911
901
|
onClick: () => void confirmClose(),
|
|
912
902
|
disabled: busy,
|
|
@@ -968,10 +958,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
968
958
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
969
959
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
970
960
|
function TicketTimelinePanel({ ticket }) {
|
|
971
|
-
const identity =
|
|
972
|
-
const externalId =
|
|
961
|
+
const identity = _chunkBYJHTHP7cjs.useChatIdentity.call(void 0, );
|
|
962
|
+
const externalId = _chunkLFCA7Q6Ncjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
973
963
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
974
|
-
const live =
|
|
964
|
+
const live = _chunkLFCA7Q6Ncjs.useOptionalTicketLive.call(void 0, );
|
|
975
965
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _25 => _25.setOpenTicketId]);
|
|
976
966
|
const markRead = _optionalChain([live, 'optionalAccess', _26 => _26.markRead]);
|
|
977
967
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -995,7 +985,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
995
985
|
markReadDebounceRef.current = setTimeout(() => {
|
|
996
986
|
markReadDebounceRef.current = null;
|
|
997
987
|
void markRead(externalId);
|
|
998
|
-
},
|
|
988
|
+
}, _chunkLFCA7Q6Ncjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
999
989
|
}, [engagementsCount, externalId, markRead]);
|
|
1000
990
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
1001
991
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -1010,7 +1000,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1010
1000
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _40 => _40.user, 'optionalAccess', _41 => _41.email]) || "You";
|
|
1011
1001
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _42 => _42.user, 'optionalAccess', _43 => _43.avatarUrl]), () => ( void 0)) : void 0;
|
|
1012
1002
|
if (isLoading) {
|
|
1013
|
-
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,
|
|
1003
|
+
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, _chunkBYJHTHP7cjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1014
1004
|
}
|
|
1015
1005
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1016
1006
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1029,7 +1019,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1029
1019
|
const isResolution = turn.startsWith("[Resolution]");
|
|
1030
1020
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
1031
1021
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1032
|
-
|
|
1022
|
+
_chunkBYJHTHP7cjs.ChatMessageRow,
|
|
1033
1023
|
{
|
|
1034
1024
|
displayName: customerName,
|
|
1035
1025
|
avatarUrl: customerAvatar,
|
|
@@ -1058,13 +1048,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1058
1048
|
}
|
|
1059
1049
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
1060
1050
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1061
|
-
|
|
1051
|
+
_chunkBYJHTHP7cjs.ChatMessageRow,
|
|
1062
1052
|
{
|
|
1063
1053
|
displayName: author,
|
|
1064
1054
|
avatarUrl: avatarSrc,
|
|
1065
|
-
timeLabel: eng.createdAt ?
|
|
1055
|
+
timeLabel: eng.createdAt ? _chunkBYJHTHP7cjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1066
1056
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1067
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1057
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRZFQJRBAcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1068
1058
|
},
|
|
1069
1059
|
eng.id
|
|
1070
1060
|
);
|
|
@@ -1149,7 +1139,7 @@ function AssignedAgentRow({ assignedOwner }) {
|
|
|
1149
1139
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary text-h5", children: "Assigned to" }),
|
|
1150
1140
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 font-medium text-ods-text-primary", children: [
|
|
1151
1141
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1152
|
-
|
|
1142
|
+
_chunkEIZAYFJGcjs.SquareAvatar,
|
|
1153
1143
|
{
|
|
1154
1144
|
size: "sm",
|
|
1155
1145
|
variant: "round",
|
|
@@ -1177,7 +1167,7 @@ function TicketRow({
|
|
|
1177
1167
|
onActionCollapsed,
|
|
1178
1168
|
id
|
|
1179
1169
|
}) {
|
|
1180
|
-
const optimistic =
|
|
1170
|
+
const optimistic = _chunkLFCA7Q6Ncjs.isOptimistic.call(void 0, ticket);
|
|
1181
1171
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1182
1172
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1183
1173
|
onToggle(ticket.id);
|
|
@@ -1205,7 +1195,7 @@ function TicketRow({
|
|
|
1205
1195
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
1206
1196
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
1207
1197
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
1208
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
1198
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkBYJHTHP7cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
1209
1199
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
1210
1200
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
1211
1201
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -1215,7 +1205,7 @@ function TicketRow({
|
|
|
1215
1205
|
};
|
|
1216
1206
|
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: [
|
|
1217
1207
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1218
|
-
|
|
1208
|
+
_chunkBYJHTHP7cjs.ChatTicketItem,
|
|
1219
1209
|
{
|
|
1220
1210
|
ticket: tileData,
|
|
1221
1211
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1248,7 +1238,7 @@ function TicketRow({
|
|
|
1248
1238
|
// src/components/tickets/ticket-center.tsx
|
|
1249
1239
|
|
|
1250
1240
|
function TicketCenter({ toast: toast2 = _chunkGNKM6R55cjs.toast } = {}) {
|
|
1251
|
-
const identity =
|
|
1241
|
+
const identity = _chunkBYJHTHP7cjs.useChatIdentity.call(void 0, );
|
|
1252
1242
|
if (identity.isLoading) {
|
|
1253
1243
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1254
1244
|
}
|
|
@@ -1319,7 +1309,7 @@ function TicketCenterAuthed({
|
|
|
1319
1309
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-ods-text-secondary text-h6", children: [
|
|
1320
1310
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1321
1311
|
"Updated ",
|
|
1322
|
-
|
|
1312
|
+
_chunkBYJHTHP7cjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1323
1313
|
] }),
|
|
1324
1314
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1325
1315
|
_chunkGBEUGDZGcjs.Button,
|
|
@@ -1335,7 +1325,7 @@ function TicketCenterAuthed({
|
|
|
1335
1325
|
)
|
|
1336
1326
|
] })
|
|
1337
1327
|
] }),
|
|
1338
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1328
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEIZAYFJGcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1339
1329
|
_chunkGELNUDBTcjs.EmptyState,
|
|
1340
1330
|
{
|
|
1341
1331
|
type: "generic",
|
|
@@ -1343,14 +1333,14 @@ function TicketCenterAuthed({
|
|
|
1343
1333
|
description: "Open one above to start the conversation.",
|
|
1344
1334
|
showCTA: false
|
|
1345
1335
|
}
|
|
1346
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1336
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEIZAYFJGcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1347
1337
|
TicketRow,
|
|
1348
1338
|
{
|
|
1349
|
-
id:
|
|
1339
|
+
id: _chunkRZFQJRBAcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1350
1340
|
ticket,
|
|
1351
1341
|
expanded: expandedTicketId === ticket.id,
|
|
1352
1342
|
onToggle: toggleRow,
|
|
1353
|
-
busy:
|
|
1343
|
+
busy: _chunkLFCA7Q6Ncjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1354
1344
|
supportSystemDown,
|
|
1355
1345
|
onSendMessage: actions.sendMessage,
|
|
1356
1346
|
onClose: actions.closeTicket,
|
|
@@ -1364,7 +1354,7 @@ function TicketCenterAuthed({
|
|
|
1364
1354
|
}
|
|
1365
1355
|
function TicketCenterSkeleton() {
|
|
1366
1356
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1367
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1357
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEIZAYFJGcjs.Card, { className: "p-6", children: [
|
|
1368
1358
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCHIHYC7Qcjs.Skeleton, { className: "mb-4 h-7 w-48" }),
|
|
1369
1359
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCHIHYC7Qcjs.Skeleton, { className: "mb-3 h-10 w-full" }),
|
|
1370
1360
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCHIHYC7Qcjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1373,7 +1363,7 @@ function TicketCenterSkeleton() {
|
|
|
1373
1363
|
] });
|
|
1374
1364
|
}
|
|
1375
1365
|
function TicketListSkeleton() {
|
|
1376
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1366
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEIZAYFJGcjs.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: [
|
|
1377
1367
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
1378
1368
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCHIHYC7Qcjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1379
1369
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCHIHYC7Qcjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1404,10 +1394,10 @@ function HelpCenterCard({
|
|
|
1404
1394
|
onClearReplyError,
|
|
1405
1395
|
id
|
|
1406
1396
|
}) {
|
|
1407
|
-
const optimistic =
|
|
1397
|
+
const optimistic = _chunkLFCA7Q6Ncjs.isOptimistic.call(void 0, ticket);
|
|
1408
1398
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1409
1399
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1410
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1400
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkBYJHTHP7cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1411
1401
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1412
1402
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1413
1403
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1426,11 +1416,11 @@ function HelpCenterCard({
|
|
|
1426
1416
|
});
|
|
1427
1417
|
return () => cancelAnimationFrame(raf);
|
|
1428
1418
|
}, [isExpanded]);
|
|
1429
|
-
const live =
|
|
1419
|
+
const live = _chunkLFCA7Q6Ncjs.useOptionalTicketLive.call(void 0, );
|
|
1430
1420
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1431
1421
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1432
1422
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1433
|
-
|
|
1423
|
+
_chunkEIZAYFJGcjs.StatusBadge,
|
|
1434
1424
|
{
|
|
1435
1425
|
text: `${unreadCount} NEW`,
|
|
1436
1426
|
colorScheme: "warning",
|
|
@@ -1439,16 +1429,16 @@ function HelpCenterCard({
|
|
|
1439
1429
|
}
|
|
1440
1430
|
),
|
|
1441
1431
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1442
|
-
|
|
1432
|
+
_chunkEIZAYFJGcjs.StatusBadge,
|
|
1443
1433
|
{
|
|
1444
1434
|
text: rawStatus,
|
|
1445
|
-
colorScheme:
|
|
1435
|
+
colorScheme: _chunkEIZAYFJGcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1446
1436
|
variant: "card",
|
|
1447
1437
|
className: "border border-ods-border"
|
|
1448
1438
|
}
|
|
1449
1439
|
),
|
|
1450
1440
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1451
|
-
|
|
1441
|
+
_chunkEIZAYFJGcjs.StatusBadge,
|
|
1452
1442
|
{
|
|
1453
1443
|
text: priority,
|
|
1454
1444
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1476,7 +1466,7 @@ function HelpCenterCard({
|
|
|
1476
1466
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1477
1467
|
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 md:p-[16px]",
|
|
1478
1468
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1479
|
-
|
|
1469
|
+
_chunk7BVIL6SOcjs.DevCardRowContent,
|
|
1480
1470
|
{
|
|
1481
1471
|
title,
|
|
1482
1472
|
subtitle,
|
|
@@ -1577,7 +1567,7 @@ function HelpCenterCreateForm({
|
|
|
1577
1567
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1578
1568
|
] });
|
|
1579
1569
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1580
|
-
|
|
1570
|
+
_chunkBZVPQBTJcjs.ContactForm,
|
|
1581
1571
|
{
|
|
1582
1572
|
title: "Open a new ticket",
|
|
1583
1573
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1615,29 +1605,29 @@ function HelpCenterCreateForm({
|
|
|
1615
1605
|
// src/components/tickets/help-center-list.tsx
|
|
1616
1606
|
|
|
1617
1607
|
function HelpCenterList({ toast: toast2 = _chunkGNKM6R55cjs.toast, backButton, title, shell } = {}) {
|
|
1618
|
-
const identity =
|
|
1608
|
+
const identity = _chunkBYJHTHP7cjs.useChatIdentity.call(void 0, );
|
|
1619
1609
|
const searchParams = _chunkSADRZ4YIcjs.useSearchParams.call(void 0, );
|
|
1620
1610
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
1621
1611
|
const pathname = _chunkSADRZ4YIcjs.usePathname.call(void 0, );
|
|
1622
|
-
const search = searchParams.get(
|
|
1612
|
+
const search = searchParams.get(_chunkRZFQJRBAcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1623
1613
|
const status = searchParams.get("status") || "all";
|
|
1624
|
-
const ticketParam = searchParams.get(
|
|
1614
|
+
const ticketParam = searchParams.get(_chunkRZFQJRBAcjs.TICKET_OPEN_PARAM) || "";
|
|
1625
1615
|
const page = _chunkCCWI3622cjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1626
1616
|
if (identity.isLoading) {
|
|
1627
1617
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1628
|
-
|
|
1618
|
+
_chunk7BVIL6SOcjs.DevSectionPage,
|
|
1629
1619
|
{
|
|
1630
1620
|
sectionKey: "tickets",
|
|
1631
1621
|
backButton,
|
|
1632
1622
|
title,
|
|
1633
1623
|
shell,
|
|
1634
1624
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1635
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1625
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7BVIL6SOcjs.DevCardRowSkeletonList, {})
|
|
1636
1626
|
}
|
|
1637
1627
|
);
|
|
1638
1628
|
}
|
|
1639
1629
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1640
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1630
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7BVIL6SOcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1641
1631
|
_chunkGELNUDBTcjs.EmptyState,
|
|
1642
1632
|
{
|
|
1643
1633
|
type: "generic",
|
|
@@ -1689,8 +1679,8 @@ function HelpCenterListAuthed({
|
|
|
1689
1679
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1690
1680
|
(externalId) => {
|
|
1691
1681
|
const params = new URLSearchParams(searchParams.toString());
|
|
1692
|
-
if (externalId) params.set(
|
|
1693
|
-
else params.delete(
|
|
1682
|
+
if (externalId) params.set(_chunkRZFQJRBAcjs.TICKET_OPEN_PARAM, externalId);
|
|
1683
|
+
else params.delete(_chunkRZFQJRBAcjs.TICKET_OPEN_PARAM);
|
|
1694
1684
|
const qs = params.toString();
|
|
1695
1685
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1696
1686
|
},
|
|
@@ -1767,15 +1757,15 @@ function HelpCenterListAuthed({
|
|
|
1767
1757
|
] }),
|
|
1768
1758
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGBEUGDZGcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1769
1759
|
] }),
|
|
1770
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1760
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7BVIL6SOcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1771
1761
|
// Bridge state — background refetch in flight and the
|
|
1772
1762
|
// optimistic placeholder was just removed by the mutation
|
|
1773
1763
|
// callback. Without this branch "No tickets yet" would flash
|
|
1774
1764
|
// for ~50ms between `removeOptimistic` and the server
|
|
1775
1765
|
// response landing.
|
|
1776
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1766
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7BVIL6SOcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1777
1767
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1778
|
-
|
|
1768
|
+
_chunk7BVIL6SOcjs.ListEmptyState,
|
|
1779
1769
|
{
|
|
1780
1770
|
isFiltered: hasActiveFilters,
|
|
1781
1771
|
filtered: {
|
|
@@ -1806,11 +1796,11 @@ function HelpCenterListAuthed({
|
|
|
1806
1796
|
/* @__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,
|
|
1807
1797
|
HelpCenterCard,
|
|
1808
1798
|
{
|
|
1809
|
-
id:
|
|
1799
|
+
id: _chunkRZFQJRBAcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1810
1800
|
ticket,
|
|
1811
1801
|
expanded: expandedTicketId === ticket.id,
|
|
1812
1802
|
onToggle: toggleRow,
|
|
1813
|
-
busy:
|
|
1803
|
+
busy: _chunkLFCA7Q6Ncjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1814
1804
|
supportSystemDown,
|
|
1815
1805
|
onSendMessage: actions.sendMessage,
|
|
1816
1806
|
onClose: actions.closeTicket,
|
|
@@ -1824,7 +1814,7 @@ function HelpCenterListAuthed({
|
|
|
1824
1814
|
) }),
|
|
1825
1815
|
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGELNUDBTcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1826
1816
|
] });
|
|
1827
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1817
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7BVIL6SOcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1828
1818
|
}
|
|
1829
1819
|
|
|
1830
1820
|
|
|
@@ -1843,4 +1833,4 @@ function HelpCenterListAuthed({
|
|
|
1843
1833
|
|
|
1844
1834
|
|
|
1845
1835
|
exports.useTicketActions = useTicketActions; exports.mapTicketActionError = mapTicketActionError; exports.useTicketsList = useTicketsList; exports.TicketOpenForm = TicketOpenForm; exports.useTicketEngagements = useTicketEngagements; exports.TicketLinkedDeliveryCard = TicketLinkedDeliveryCard; exports.TicketReplyComposer = TicketReplyComposer; exports.TicketDetailDrawer = TicketDetailDrawer; exports.TicketRow = TicketRow; exports.TicketCenter = TicketCenter; exports.HelpCenterCard = HelpCenterCard; exports.HelpCenterCreateFormSkeleton = HelpCenterCreateFormSkeleton; exports.HelpCenterCreateForm = HelpCenterCreateForm; exports.HelpCenterList = HelpCenterList;
|
|
1846
|
-
//# sourceMappingURL=chunk-
|
|
1836
|
+
//# sourceMappingURL=chunk-J7G22DOL.cjs.map
|