@flamingo-stack/openframe-frontend-core 0.0.761 → 0.0.763
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-7Z4EQOIX.cjs → chunk-22XAPV6N.cjs} +35 -35
- package/dist/{chunk-AXBVN5SW.cjs → chunk-2IFCRPNP.cjs} +38 -38
- package/dist/{chunk-TIV74DVS.cjs → chunk-3JUIDOHB.cjs} +43 -43
- package/dist/{chunk-CSJO7ZGN.cjs → chunk-3RYIF4OW.cjs} +3 -3
- package/dist/{chunk-35BJY5RR.cjs → chunk-47GZ33ND.cjs} +44 -44
- package/dist/{chunk-HQYWVNQL.cjs → chunk-4NGXJA3V.cjs} +4 -4
- package/dist/{chunk-GLQBCQOF.cjs → chunk-66FQUWKF.cjs} +59 -59
- package/dist/{chunk-LOM3S64Z.cjs → chunk-6XCE2VLH.cjs} +8 -8
- package/dist/{chunk-B7AOUPBV.cjs → chunk-AXGTRPF6.cjs} +20 -20
- package/dist/{chunk-6T6O36LT.cjs → chunk-CEJDHCFZ.cjs} +89 -89
- package/dist/{chunk-2ANICXS7.cjs → chunk-E4LA4BEH.cjs} +21 -21
- package/dist/{chunk-JHQNUWFM.cjs → chunk-EQZXJUYV.cjs} +3 -3
- package/dist/{chunk-LU7TD6QS.cjs → chunk-FQSXZC2K.cjs} +3 -3
- package/dist/{chunk-GKRHGVB4.cjs → chunk-G5NCY5IE.cjs} +100 -100
- package/dist/{chunk-QU5K52OP.cjs → chunk-GY2JESOC.cjs} +2 -2
- package/dist/{chunk-LOFDIDSD.cjs → chunk-GZKWF6NH.cjs} +9 -9
- package/dist/{chunk-NOFJH7MA.cjs → chunk-IJMPXTGV.cjs} +14 -14
- package/dist/{chunk-4EM7HIIM.cjs → chunk-IUIDZS6W.cjs} +574 -567
- package/dist/{chunk-VAZTFCVY.cjs → chunk-J4P47JHM.cjs} +20 -20
- package/dist/{chunk-G6IK3HC5.cjs → chunk-LUNXHJ53.cjs} +32 -32
- package/dist/{chunk-WBOHLXFC.cjs → chunk-LVKUMVUJ.cjs} +2 -2
- package/dist/{chunk-L2IQESTQ.cjs → chunk-M7YZGRAV.cjs} +2 -2
- package/dist/{chunk-R34JD6NP.cjs → chunk-MWLD6NXV.cjs} +3 -3
- package/dist/{chunk-W2RM764D.cjs → chunk-NET74KSQ.cjs} +5 -4
- package/dist/{chunk-B27XV2TC.cjs → chunk-NS64LMVE.cjs} +10 -10
- package/dist/{chunk-OBXZDUC3.cjs → chunk-O2VRIGDI.cjs} +83 -83
- package/dist/{chunk-QYLIHZKZ.cjs → chunk-OJJ4RL2T.cjs} +4 -4
- package/dist/{chunk-F64VMOIB.cjs → chunk-PE26VSWT.cjs} +19 -19
- package/dist/{chunk-D252ICCO.cjs → chunk-QCO32MEE.cjs} +17 -17
- package/dist/{chunk-KTPR66EE.cjs → chunk-R3TWQ3ZJ.cjs} +10 -0
- package/dist/{chunk-VUSXDMCE.cjs → chunk-RM6AHNM4.cjs} +7 -7
- package/dist/{chunk-T4BBZ5ST.cjs → chunk-RO72PRQI.cjs} +2 -2
- package/dist/{chunk-H45OTVYI.cjs → chunk-SU3EXXVC.cjs} +22 -22
- package/dist/{chunk-WI2OTGKC.cjs → chunk-SVP6DJFL.cjs} +2 -2
- package/dist/{chunk-SUHPBFNU.cjs → chunk-TQPQKBBL.cjs} +242 -240
- package/dist/{chunk-5E6JHOGX.cjs → chunk-TSJUL6IH.cjs} +3 -3
- package/dist/{chunk-EMSOBT6R.cjs → chunk-UUBHKQOH.cjs} +6 -6
- package/dist/{chunk-VUWPLQBY.cjs → chunk-XCH7SPGI.cjs} +44 -44
- package/dist/{chunk-6M54EVOA.cjs → chunk-ZUF5WDGE.cjs} +28 -28
- package/dist/{cloud-tenants-BDGV4N2T.cjs → cloud-tenants-4AGSRBJ2.cjs} +22 -22
- package/dist/components/case-studies/index.cjs +36 -36
- package/dist/components/chat/index.cjs +15 -15
- package/dist/components/contact/index.cjs +23 -23
- package/dist/components/docs/index.cjs +26 -26
- package/dist/components/embeds/index.cjs +23 -23
- package/dist/components/faq/index.cjs +24 -24
- package/dist/components/features/index.cjs +24 -22
- package/dist/components/features/walkthrough-video.d.ts +7 -0
- package/dist/components/features/walkthrough-video.d.ts.map +1 -1
- package/dist/components/features/walkthrough-video.js +9 -1
- package/dist/components/help-center-pages/index.cjs +125 -125
- package/dist/components/index.cjs +85 -83
- package/dist/components/meeting-scheduler/index.cjs +77 -77
- package/dist/components/navigation/index.cjs +25 -25
- package/dist/components/onboarding-guides/index.cjs +25 -25
- package/dist/components/product-demo/index.cjs +9 -9
- package/dist/components/related-content/index.cjs +10 -10
- package/dist/components/tickets/index.cjs +28 -28
- package/dist/components/ui/index.cjs +22 -22
- package/dist/{devices-Q5YHMXGV.cjs → devices-FKRZIBJP.cjs} +23 -23
- package/dist/{embeddable-chat-ST5IR6VN.cjs → embeddable-chat-HWQSP3DY.cjs} +93 -93
- package/dist/hooks/index.cjs +8 -8
- package/dist/index.cjs +30 -28
- package/dist/{knowledge-UJTJT36J.cjs → knowledge-25CBYZ7E.cjs} +23 -23
- package/dist/{logs-WMNITBLM.cjs → logs-HQ7NDBVV.cjs} +30 -30
- package/dist/platform-domains.cjs +2 -0
- package/dist/platform-domains.d.ts.map +1 -1
- package/dist/platform-domains.js +2 -0
- package/dist/{policies-TRXVBOH7.cjs → policies-2RV2CQD3.cjs} +26 -26
- package/dist/{remote-session-SKNXYG6K.cjs → remote-session-F72S6I7J.cjs} +9 -9
- package/dist/{scripts-HECY7XDL.cjs → scripts-32EM4WDI.cjs} +29 -29
- package/dist/{software-update-NNFLEMYD.cjs → software-update-WVIARIUG.cjs} +26 -26
- package/dist/{tickets-board-B2FH7Z4B.cjs → tickets-board-4PBXPSGJ.cjs} +12 -12
- package/dist/types/platform.d.ts +1 -1
- package/dist/types/platform.d.ts.map +1 -1
- package/dist/utils/index.cjs +13 -0
- package/dist/utils/platform-config.d.ts.map +1 -1
- package/dist/utils/platform-config.js +1 -0
- package/dist/utils/platform-identity.cjs +10 -0
- package/dist/utils/platform-identity.d.ts +3 -2
- package/dist/utils/platform-identity.d.ts.map +1 -1
- package/dist/utils/platform-identity.js +10 -0
- package/package.json +1 -1
- package/src/components/features/walkthrough-video.tsx +17 -0
- package/src/platform-domains.ts +2 -0
- package/src/styles/README.md +1 -0
- package/src/styles/ods-colors.css +16 -0
- package/src/types/platform.ts +1 -0
- package/src/utils/platform-config.tsx +1 -0
- package/src/utils/platform-identity.ts +19 -2
|
@@ -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 _chunkZUF5WDGEcjs = require('./chunk-ZUF5WDGE.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -9,18 +9,18 @@ var _chunk6M54EVOAcjs = require('./chunk-6M54EVOA.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkSU3EXXVCcjs = require('./chunk-SU3EXXVC.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkTSJUL6IHcjs = require('./chunk-TSJUL6IH.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk4NGXJA3Vcjs = require('./chunk-4NGXJA3V.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -33,11 +33,11 @@ var _chunkHQYWVNQLcjs = require('./chunk-HQYWVNQL.cjs');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkIUIDZS6Wcjs = require('./chunk-IUIDZS6W.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkXCH7SPGIcjs = require('./chunk-XCH7SPGI.cjs');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
@@ -46,23 +46,23 @@ var _chunkVUWPLQBYcjs = require('./chunk-VUWPLQBY.cjs');
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
var
|
|
49
|
+
var _chunkCEJDHCFZcjs = require('./chunk-CEJDHCFZ.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkTQPQKBBLcjs = require('./chunk-TQPQKBBL.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkPE26VSWTcjs = require('./chunk-PE26VSWT.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
var
|
|
61
|
+
var _chunkGZKWF6NHcjs = require('./chunk-GZKWF6NH.cjs');
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
var
|
|
65
|
+
var _chunk3RYIF4OWcjs = require('./chunk-3RYIF4OW.cjs');
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
var _chunkJKX2C3I2cjs = require('./chunk-JKX2C3I2.cjs');
|
|
@@ -76,10 +76,10 @@ var _chunk7DNL734Scjs = require('./chunk-7DNL734S.cjs');
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
var
|
|
79
|
+
var _chunk22XAPV6Ncjs = require('./chunk-22XAPV6N.cjs');
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _chunkEQZXJUYVcjs = require('./chunk-EQZXJUYV.cjs');
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
|
|
@@ -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 = _chunk4NGXJA3Vcjs.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(_chunk4NGXJA3Vcjs.TOAST_COPY.open_mirror_pending);
|
|
299
299
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
300
300
|
} else {
|
|
301
|
-
toast2(
|
|
301
|
+
toast2(_chunk4NGXJA3Vcjs.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
|
+
_chunk4NGXJA3Vcjs.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
|
+
_chunk4NGXJA3Vcjs.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" }, _chunk4NGXJA3Vcjs.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(_chunk4NGXJA3Vcjs.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 } = _chunkTQPQKBBLcjs.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 > _chunk4NGXJA3Vcjs.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,
|
|
650
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk22XAPV6Ncjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ..._chunkCEJDHCFZcjs.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
|
+
_chunkIUIDZS6Wcjs.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
|
+
_chunk4NGXJA3Vcjs.TICKET_TEXT_MAX_CHARS
|
|
690
690
|
] })
|
|
691
691
|
] }),
|
|
692
692
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
693
|
-
|
|
693
|
+
_chunkTQPQKBBLcjs.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
|
+
_chunkTQPQKBBLcjs.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 = _chunkTQPQKBBLcjs.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: `${
|
|
805
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${_chunk22XAPV6Ncjs.CONTENT_CARD_SKELETON_FRAME_CLASS} ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSU3EXXVCcjs.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 = _chunkTQPQKBBLcjs.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
|
+
_chunkTQPQKBBLcjs.ChatAttachmentChipStrip,
|
|
842
842
|
{
|
|
843
843
|
attachments: attachments.attachments,
|
|
844
844
|
onRemove: attachments.removeAttachment,
|
|
@@ -847,7 +847,7 @@ function TicketReplyComposer({
|
|
|
847
847
|
}
|
|
848
848
|
),
|
|
849
849
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
850
|
-
|
|
850
|
+
_chunkGZKWF6NHcjs.ChatInput,
|
|
851
851
|
{
|
|
852
852
|
fullWidth: true,
|
|
853
853
|
autoFocus: true,
|
|
@@ -855,13 +855,13 @@ function TicketReplyComposer({
|
|
|
855
855
|
sending: busy || attachments.hasInflightUploads,
|
|
856
856
|
disabled: supportSystemDown,
|
|
857
857
|
allowEmptySend: hasReadyFiles,
|
|
858
|
-
maxLength:
|
|
858
|
+
maxLength: _chunk4NGXJA3Vcjs.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
|
+
_chunkTQPQKBBLcjs.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, _chunkIUIDZS6Wcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkIUIDZS6Wcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
888
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkIUIDZS6Wcjs.AlertDialogHeader, { children: [
|
|
889
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIUIDZS6Wcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
890
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIUIDZS6Wcjs.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
|
+
_chunkIUIDZS6Wcjs.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: _chunk4NGXJA3Vcjs.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, _chunkIUIDZS6Wcjs.AlertDialogFooter, { children: [
|
|
904
904
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
905
|
-
|
|
905
|
+
_chunkIUIDZS6Wcjs.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
|
+
_chunkIUIDZS6Wcjs.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 = _chunkTQPQKBBLcjs.useChatIdentity.call(void 0, );
|
|
976
|
+
const externalId = _chunk4NGXJA3Vcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
977
977
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
978
|
-
const live =
|
|
978
|
+
const live = _chunk4NGXJA3Vcjs.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
|
+
}, _chunk4NGXJA3Vcjs.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,11 +1014,11 @@ 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, _chunkCEJDHCFZcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1018
1018
|
}
|
|
1019
1019
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1020
1020
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1021
|
-
|
|
1021
|
+
_chunkTSJUL6IHcjs.EmptyState,
|
|
1022
1022
|
{
|
|
1023
1023
|
type: "generic",
|
|
1024
1024
|
title: "No conversation yet",
|
|
@@ -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
|
+
_chunkCEJDHCFZcjs.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
|
+
_chunkCEJDHCFZcjs.ChatMessageRow,
|
|
1066
1066
|
{
|
|
1067
1067
|
displayName: author,
|
|
1068
1068
|
avatarUrl: avatarSrc,
|
|
1069
|
-
timeLabel: eng.createdAt ?
|
|
1069
|
+
timeLabel: eng.createdAt ? _chunkPE26VSWTcjs.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, _chunkIUIDZS6Wcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1072
1072
|
},
|
|
1073
1073
|
eng.id
|
|
1074
1074
|
);
|
|
@@ -1153,7 +1153,7 @@ function AssignedAgentRow({ assignedOwner }) {
|
|
|
1153
1153
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary text-h5", children: "Assigned to" }),
|
|
1154
1154
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 font-medium text-ods-text-primary", children: [
|
|
1155
1155
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1156
|
-
|
|
1156
|
+
_chunkEQZXJUYVcjs.SquareAvatar,
|
|
1157
1157
|
{
|
|
1158
1158
|
size: "sm",
|
|
1159
1159
|
variant: "round",
|
|
@@ -1181,11 +1181,11 @@ function TicketRow({
|
|
|
1181
1181
|
onActionCollapsed,
|
|
1182
1182
|
id
|
|
1183
1183
|
}) {
|
|
1184
|
-
const optimistic =
|
|
1184
|
+
const optimistic = _chunk4NGXJA3Vcjs.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);
|
|
1188
|
-
|
|
1188
|
+
_chunk3RYIF4OWcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1189
1189
|
adjustTargetY: (raw) => {
|
|
1190
1190
|
if (!rowRef.current) return raw;
|
|
1191
1191
|
const expandedDrawer = document.querySelector('div[id^="ticket-drawer-"]');
|
|
@@ -1209,7 +1209,7 @@ function TicketRow({
|
|
|
1209
1209
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
1210
1210
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
1211
1211
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
1212
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
1212
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkPE26VSWTcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
1213
1213
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
1214
1214
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
1215
1215
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -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
|
+
_chunkCEJDHCFZcjs.ChatTicketItem,
|
|
1223
1223
|
{
|
|
1224
1224
|
ticket: tileData,
|
|
1225
1225
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1251,14 +1251,14 @@ function TicketRow({
|
|
|
1251
1251
|
|
|
1252
1252
|
// src/components/tickets/ticket-center.tsx
|
|
1253
1253
|
|
|
1254
|
-
function TicketCenter({ toast: toast2 =
|
|
1255
|
-
const identity =
|
|
1254
|
+
function TicketCenter({ toast: toast2 = _chunkXCH7SPGIcjs.toast } = {}) {
|
|
1255
|
+
const identity = _chunkTQPQKBBLcjs.useChatIdentity.call(void 0, );
|
|
1256
1256
|
if (identity.isLoading) {
|
|
1257
1257
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1258
1258
|
}
|
|
1259
1259
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _63 => _63.user, 'optionalAccess', _64 => _64.email])) {
|
|
1260
1260
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1261
|
-
|
|
1261
|
+
_chunkTSJUL6IHcjs.EmptyState,
|
|
1262
1262
|
{
|
|
1263
1263
|
type: "generic",
|
|
1264
1264
|
title: "Sign in to manage tickets",
|
|
@@ -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 = _chunkSU3EXXVCcjs.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, _chunkIUIDZS6Wcjs.DataSyncLine, { sync, inline: true }),
|
|
1326
1326
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1327
1327
|
_chunk2QMBXGMQcjs.Button,
|
|
1328
1328
|
{
|
|
@@ -1337,22 +1337,22 @@ function TicketCenterAuthed({
|
|
|
1337
1337
|
)
|
|
1338
1338
|
] })
|
|
1339
1339
|
] }),
|
|
1340
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1341
|
-
|
|
1340
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk22XAPV6Ncjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1341
|
+
_chunkTSJUL6IHcjs.EmptyState,
|
|
1342
1342
|
{
|
|
1343
1343
|
type: "generic",
|
|
1344
1344
|
title: "No tickets yet",
|
|
1345
1345
|
description: "Open one above to start the conversation.",
|
|
1346
1346
|
showCTA: false
|
|
1347
1347
|
}
|
|
1348
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1348
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk22XAPV6Ncjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1349
1349
|
TicketRow,
|
|
1350
1350
|
{
|
|
1351
|
-
id:
|
|
1351
|
+
id: _chunkCEJDHCFZcjs.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: _chunk4NGXJA3Vcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1356
1356
|
supportSystemDown,
|
|
1357
1357
|
onSendMessage: actions.sendMessage,
|
|
1358
1358
|
onClose: actions.closeTicket,
|
|
@@ -1368,7 +1368,7 @@ function TicketCenterSkeleton({
|
|
|
1368
1368
|
region = true
|
|
1369
1369
|
} = {}) {
|
|
1370
1370
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkNO5UJLLQcjs.LoadingRegion, { label: "Loading tickets", announce: region, className: "flex flex-col gap-6", children: [
|
|
1371
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1371
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk22XAPV6Ncjs.Card, { className: "p-6", children: [
|
|
1372
1372
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "mb-4 h-7 w-48" }),
|
|
1373
1373
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "mb-3 h-10 w-full" }),
|
|
1374
1374
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-24 w-full" })
|
|
@@ -1377,7 +1377,7 @@ function TicketCenterSkeleton({
|
|
|
1377
1377
|
] });
|
|
1378
1378
|
}
|
|
1379
1379
|
function TicketListSkeleton() {
|
|
1380
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1380
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk22XAPV6Ncjs.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: [
|
|
1381
1381
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
1382
1382
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-4 w-2/3" }),
|
|
1383
1383
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH3RYUTNDcjs.UnifiedSkeleton, { className: "h-3 w-full" })
|
|
@@ -1408,10 +1408,10 @@ function HelpCenterCard({
|
|
|
1408
1408
|
onClearReplyError,
|
|
1409
1409
|
id
|
|
1410
1410
|
}) {
|
|
1411
|
-
const optimistic =
|
|
1411
|
+
const optimistic = _chunk4NGXJA3Vcjs.isOptimistic.call(void 0, ticket);
|
|
1412
1412
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1413
1413
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1414
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1414
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkPE26VSWTcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1415
1415
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1416
1416
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1417
1417
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1424,17 +1424,17 @@ function HelpCenterCard({
|
|
|
1424
1424
|
_react.useEffect.call(void 0, () => {
|
|
1425
1425
|
if (!isExpanded) return void 0;
|
|
1426
1426
|
const raf = requestAnimationFrame(() => {
|
|
1427
|
-
|
|
1428
|
-
headerOffset:
|
|
1427
|
+
_chunk3RYIF4OWcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1428
|
+
headerOffset: _chunk3RYIF4OWcjs.STICKY_HEADER_OFFSET_PX
|
|
1429
1429
|
});
|
|
1430
1430
|
});
|
|
1431
1431
|
return () => cancelAnimationFrame(raf);
|
|
1432
1432
|
}, [isExpanded]);
|
|
1433
|
-
const live =
|
|
1433
|
+
const live = _chunk4NGXJA3Vcjs.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,
|
|
1437
|
-
|
|
1437
|
+
_chunk22XAPV6Ncjs.StatusBadge,
|
|
1438
1438
|
{
|
|
1439
1439
|
text: `${unreadCount} NEW`,
|
|
1440
1440
|
colorScheme: "warning",
|
|
@@ -1443,16 +1443,16 @@ function HelpCenterCard({
|
|
|
1443
1443
|
}
|
|
1444
1444
|
),
|
|
1445
1445
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1446
|
-
|
|
1446
|
+
_chunk22XAPV6Ncjs.StatusBadge,
|
|
1447
1447
|
{
|
|
1448
1448
|
text: rawStatus,
|
|
1449
|
-
colorScheme:
|
|
1449
|
+
colorScheme: _chunk22XAPV6Ncjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1450
1450
|
variant: "card",
|
|
1451
1451
|
className: "border border-ods-border"
|
|
1452
1452
|
}
|
|
1453
1453
|
),
|
|
1454
1454
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1455
|
-
|
|
1455
|
+
_chunk22XAPV6Ncjs.StatusBadge,
|
|
1456
1456
|
{
|
|
1457
1457
|
text: priority,
|
|
1458
1458
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1466,7 +1466,7 @@ function HelpCenterCard({
|
|
|
1466
1466
|
{
|
|
1467
1467
|
ref: rowRef,
|
|
1468
1468
|
id,
|
|
1469
|
-
style: { scrollMarginTop:
|
|
1469
|
+
style: { scrollMarginTop: _chunk3RYIF4OWcjs.STICKY_HEADER_OFFSET_PX },
|
|
1470
1470
|
className: `border-b border-ods-border last:border-b-0 ${optimistic ? "opacity-60" : ""}`,
|
|
1471
1471
|
"aria-busy": optimistic || void 0,
|
|
1472
1472
|
children: [
|
|
@@ -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
|
+
_chunkSU3EXXVCcjs.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
|
+
_chunkZUF5WDGEcjs.ContactForm,
|
|
1595
1595
|
{
|
|
1596
1596
|
rescue: null,
|
|
1597
1597
|
title: "Open a new ticket",
|
|
@@ -1629,31 +1629,31 @@ function HelpCenterCreateForm({
|
|
|
1629
1629
|
|
|
1630
1630
|
// src/components/tickets/help-center-list.tsx
|
|
1631
1631
|
|
|
1632
|
-
function HelpCenterList({ toast: toast2 =
|
|
1633
|
-
const identity =
|
|
1632
|
+
function HelpCenterList({ toast: toast2 = _chunkXCH7SPGIcjs.toast, backButton, title, shell } = {}) {
|
|
1633
|
+
const identity = _chunkTQPQKBBLcjs.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(_chunkCEJDHCFZcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1638
1638
|
const status = searchParams.get("status") || "all";
|
|
1639
|
-
const ticketParam = searchParams.get(
|
|
1639
|
+
const ticketParam = searchParams.get(_chunkCEJDHCFZcjs.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
|
+
_chunkSU3EXXVCcjs.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, _chunkSU3EXXVCcjs.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,
|
|
1656
|
-
|
|
1655
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSU3EXXVCcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1656
|
+
_chunkTSJUL6IHcjs.EmptyState,
|
|
1657
1657
|
{
|
|
1658
1658
|
type: "generic",
|
|
1659
1659
|
title: "Sign in to manage tickets",
|
|
@@ -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(_chunkCEJDHCFZcjs.TICKET_OPEN_PARAM, externalId);
|
|
1708
|
+
else params.delete(_chunkCEJDHCFZcjs.TICKET_OPEN_PARAM);
|
|
1709
1709
|
const qs = params.toString();
|
|
1710
1710
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1711
1711
|
},
|
|
@@ -1762,7 +1762,7 @@ function HelpCenterListAuthed({
|
|
|
1762
1762
|
[tickets, ticketParam, setOpenTicket]
|
|
1763
1763
|
);
|
|
1764
1764
|
const merged = [...optimisticTickets, ...tickets];
|
|
1765
|
-
|
|
1765
|
+
_chunkXCH7SPGIcjs.useScrollToHash.call(void 0, tickets, { headerOffset: _chunk3RYIF4OWcjs.STICKY_HEADER_OFFSET_PX });
|
|
1766
1766
|
const hasActiveFilters = search !== "" || status !== "" && status !== "all";
|
|
1767
1767
|
const hasResults = merged.length > 0;
|
|
1768
1768
|
const form = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -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, _chunkSU3EXXVCcjs.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, _chunkSU3EXXVCcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1792
1792
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1793
|
-
|
|
1793
|
+
_chunkSU3EXXVCcjs.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: _chunkCEJDHCFZcjs.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: _chunk4NGXJA3Vcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1829
1829
|
supportSystemDown,
|
|
1830
1830
|
onSendMessage: actions.sendMessage,
|
|
1831
1831
|
onClose: actions.closeTicket,
|
|
@@ -1837,9 +1837,9 @@ function HelpCenterListAuthed({
|
|
|
1837
1837
|
ticket.id
|
|
1838
1838
|
)) })
|
|
1839
1839
|
) }),
|
|
1840
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1840
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTSJUL6IHcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1841
1841
|
] });
|
|
1842
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1842
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkSU3EXXVCcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1843
1843
|
}
|
|
1844
1844
|
|
|
1845
1845
|
|