@flamingo-stack/openframe-frontend-core 0.0.596-2034.5687.1 → 0.0.596
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-SQXNSIGS.cjs → chunk-4S5E7NOM.cjs} +5 -5
- package/dist/{chunk-SQXNSIGS.cjs.map → chunk-4S5E7NOM.cjs.map} +1 -1
- package/dist/{chunk-MRW4QU2L.js → chunk-6EBKO275.js} +3 -3
- package/dist/{chunk-5JMMSSMV.js → chunk-7L5ROE3Z.js} +3 -3
- package/dist/{chunk-PHNFKPWJ.js → chunk-AVIZUQRW.js} +2 -2
- package/dist/{chunk-XW4JIRYE.cjs → chunk-AYVTVUZT.cjs} +15 -15
- package/dist/{chunk-XW4JIRYE.cjs.map → chunk-AYVTVUZT.cjs.map} +1 -1
- package/dist/{chunk-KQ2X5FUP.cjs → chunk-B3NX4GZS.cjs} +3 -3
- package/dist/{chunk-KQ2X5FUP.cjs.map → chunk-B3NX4GZS.cjs.map} +1 -1
- package/dist/{chunk-Y3VGUQIW.cjs → chunk-DVSTM6QK.cjs} +33 -33
- package/dist/{chunk-Y3VGUQIW.cjs.map → chunk-DVSTM6QK.cjs.map} +1 -1
- package/dist/{chunk-WVSUQTPS.cjs → chunk-EQ3DAGD7.cjs} +43 -43
- package/dist/{chunk-WVSUQTPS.cjs.map → chunk-EQ3DAGD7.cjs.map} +1 -1
- package/dist/{chunk-H7NBAAIH.cjs → chunk-FCNICDWP.cjs} +9 -9
- package/dist/{chunk-H7NBAAIH.cjs.map → chunk-FCNICDWP.cjs.map} +1 -1
- package/dist/{chunk-6QBKSVAZ.cjs → chunk-FV5VGJE6.cjs} +3 -3
- package/dist/{chunk-6QBKSVAZ.cjs.map → chunk-FV5VGJE6.cjs.map} +1 -1
- package/dist/{chunk-XIEV46BX.js → chunk-GOD47MJM.js} +6 -4
- package/dist/{chunk-XIEV46BX.js.map → chunk-GOD47MJM.js.map} +1 -1
- package/dist/{chunk-PMIKKJMI.js → chunk-HFJSBIXL.js} +3 -3
- package/dist/{chunk-R6IV75YP.cjs → chunk-IMIR5V6E.cjs} +26 -24
- package/dist/chunk-IMIR5V6E.cjs.map +1 -0
- package/dist/{chunk-MEHPKLH5.js → chunk-KU3JQWYJ.js} +5 -5
- package/dist/{chunk-36PHDSTO.js → chunk-MF324FSD.js} +30 -30
- package/dist/chunk-MF324FSD.js.map +1 -0
- package/dist/{chunk-KJ4O6NSF.js → chunk-MGBWMZEL.js} +2 -2
- package/dist/{chunk-DYTFM2MX.cjs → chunk-MIC4HHVZ.cjs} +23 -21
- package/dist/chunk-MIC4HHVZ.cjs.map +1 -0
- package/dist/{chunk-PWXQBKFP.js → chunk-N7SFQMCH.js} +2 -2
- package/dist/{chunk-VNQ2LF6G.cjs → chunk-OEDUVTPT.cjs} +10 -10
- package/dist/{chunk-VNQ2LF6G.cjs.map → chunk-OEDUVTPT.cjs.map} +1 -1
- package/dist/{chunk-BTRH2YFY.cjs → chunk-OGTXZFFE.cjs} +71 -70
- package/dist/chunk-OGTXZFFE.cjs.map +1 -0
- package/dist/{chunk-EWBOBUCM.js → chunk-P2SECY3U.js} +5 -5
- package/dist/{chunk-NM5Q56PX.js → chunk-PTXOWFRB.js} +8 -7
- package/dist/chunk-PTXOWFRB.js.map +1 -0
- package/dist/{chunk-VZMCNCW5.js → chunk-PYWF5JJW.js} +5 -5
- package/dist/{chunk-JF56KVHW.cjs → chunk-R5IWJONE.cjs} +187 -187
- package/dist/chunk-R5IWJONE.cjs.map +1 -0
- package/dist/{chunk-2VGIM6WY.js → chunk-SSSZ64YG.js} +5 -3
- package/dist/chunk-SSSZ64YG.js.map +1 -0
- package/dist/{chunk-E2ALHISW.cjs → chunk-SXVGFJ24.cjs} +22 -22
- package/dist/{chunk-E2ALHISW.cjs.map → chunk-SXVGFJ24.cjs.map} +1 -1
- package/dist/{chunk-AOANH6ZJ.js → chunk-TRJJMZSQ.js} +2 -2
- package/dist/{chunk-47IZN43H.js → chunk-VD3ZAA2O.js} +3 -3
- package/dist/{chunk-E7MTTLKC.js → chunk-VNSRNVPD.js} +2 -2
- package/dist/{chunk-E7MTTLKC.js.map → chunk-VNSRNVPD.js.map} +1 -1
- package/dist/{chunk-SSUJ4Z62.cjs → chunk-WRWXND3X.cjs} +10 -10
- package/dist/{chunk-SSUJ4Z62.cjs.map → chunk-WRWXND3X.cjs.map} +1 -1
- package/dist/{chunk-L7GNBUXF.cjs → chunk-YBPFIXV4.cjs} +2 -2
- package/dist/{chunk-L7GNBUXF.cjs.map → chunk-YBPFIXV4.cjs.map} +1 -1
- package/dist/{chunk-26GIURMP.cjs → chunk-YNO4DEXK.cjs} +4 -4
- package/dist/{chunk-26GIURMP.cjs.map → chunk-YNO4DEXK.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/contact-form.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/auth/terms-agreement-label.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +38 -38
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/booking-form.d.ts +8 -4
- package/dist/components/meeting-scheduler/booking-form.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +53 -38
- package/dist/components/meeting-scheduler/index.cjs.map +1 -1
- package/dist/components/meeting-scheduler/index.d.ts +12 -1
- package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.js +31 -16
- package/dist/components/meeting-scheduler/index.js.map +1 -1
- package/dist/components/navigation/header-global-search.d.ts.map +1 -1
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/tickets/ticket-open-form.d.ts.map +1 -1
- package/dist/components/ui/admin-form-modal.d.ts.map +1 -1
- package/dist/components/ui/benefit-card.d.ts +1 -1
- package/dist/components/ui/benefit-card.d.ts.map +1 -1
- package/dist/components/ui/checkbox-block.d.ts +2 -1
- package/dist/components/ui/checkbox-block.d.ts.map +1 -1
- package/dist/components/ui/icon-tile.d.ts +3 -2
- package/dist/components/ui/icon-tile.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui/policy-link.d.ts +9 -1
- package/dist/components/ui/policy-link.d.ts.map +1 -1
- package/dist/index.cjs +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/utils/hubspot-collected-forms.d.ts +22 -0
- package/dist/utils/hubspot-collected-forms.d.ts.map +1 -0
- package/dist/utils/hubspot-meetings-convention.d.ts +3 -1
- package/dist/utils/hubspot-meetings-convention.d.ts.map +1 -1
- package/dist/utils/index.cjs +5 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -2
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/meeting-scheduler-details-first.test.tsx +25 -4
- package/src/components/contact/contact-form.tsx +2 -0
- package/src/components/features/auth/terms-agreement-label.tsx +6 -16
- package/src/components/features/video-center-badge.tsx +2 -2
- package/src/components/meeting-scheduler/booking-form.tsx +22 -7
- package/src/components/meeting-scheduler/index.tsx +39 -17
- package/src/components/navigation/header-global-search.tsx +2 -0
- package/src/components/tickets/ticket-open-form.tsx +2 -1
- package/src/components/ui/admin-form-modal.tsx +2 -0
- package/src/components/ui/benefit-card.tsx +5 -1
- package/src/components/ui/checkbox-block.tsx +4 -1
- package/src/components/ui/icon-tile.tsx +3 -2
- package/src/components/ui/policy-link.tsx +18 -2
- package/src/styles/app-globals.css +1 -1
- package/src/styles/index.css +1 -0
- package/src/styles/ods-effects.css +53 -0
- package/src/utils/hubspot-collected-forms.ts +19 -0
- package/src/utils/hubspot-meetings-convention.ts +4 -2
- package/src/utils/index.ts +1 -0
- package/dist/chunk-2VGIM6WY.js.map +0 -1
- package/dist/chunk-36PHDSTO.js.map +0 -1
- package/dist/chunk-BTRH2YFY.cjs.map +0 -1
- package/dist/chunk-DYTFM2MX.cjs.map +0 -1
- package/dist/chunk-JF56KVHW.cjs.map +0 -1
- package/dist/chunk-NM5Q56PX.js.map +0 -1
- package/dist/chunk-R6IV75YP.cjs.map +0 -1
- /package/dist/{chunk-MRW4QU2L.js.map → chunk-6EBKO275.js.map} +0 -0
- /package/dist/{chunk-5JMMSSMV.js.map → chunk-7L5ROE3Z.js.map} +0 -0
- /package/dist/{chunk-PHNFKPWJ.js.map → chunk-AVIZUQRW.js.map} +0 -0
- /package/dist/{chunk-PMIKKJMI.js.map → chunk-HFJSBIXL.js.map} +0 -0
- /package/dist/{chunk-MEHPKLH5.js.map → chunk-KU3JQWYJ.js.map} +0 -0
- /package/dist/{chunk-KJ4O6NSF.js.map → chunk-MGBWMZEL.js.map} +0 -0
- /package/dist/{chunk-PWXQBKFP.js.map → chunk-N7SFQMCH.js.map} +0 -0
- /package/dist/{chunk-EWBOBUCM.js.map → chunk-P2SECY3U.js.map} +0 -0
- /package/dist/{chunk-VZMCNCW5.js.map → chunk-PYWF5JJW.js.map} +0 -0
- /package/dist/{chunk-AOANH6ZJ.js.map → chunk-TRJJMZSQ.js.map} +0 -0
- /package/dist/{chunk-47IZN43H.js.map → chunk-VD3ZAA2O.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
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 _chunkMIC4HHVZcjs = require('./chunk-MIC4HHVZ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkWRWXND3Xcjs = require('./chunk-WRWXND3X.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ var _chunkO4VZOA2Qcjs = require('./chunk-O4VZOA2Q.cjs');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunk4S5E7NOMcjs = require('./chunk-4S5E7NOM.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -33,7 +33,8 @@ var _chunkSQXNSIGScjs = require('./chunk-SQXNSIGS.cjs');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
var _chunkR5IWJONEcjs = require('./chunk-R5IWJONE.cjs');
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
|
|
@@ -57,7 +58,7 @@ var _chunkN6HNK25Acjs = require('./chunk-N6HNK25A.cjs');
|
|
|
57
58
|
|
|
58
59
|
|
|
59
60
|
|
|
60
|
-
var
|
|
61
|
+
var _chunkYBPFIXV4cjs = require('./chunk-YBPFIXV4.cjs');
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
|
|
@@ -113,7 +114,7 @@ var TicketActionFailure = class extends Error {
|
|
|
113
114
|
function useTicketActions(options) {
|
|
114
115
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
115
116
|
const ticketActionEndpoint = _nullishCoalesce(_chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
116
|
-
const ticketLive =
|
|
117
|
+
const ticketLive = _chunk4S5E7NOMcjs.useOptionalTicketLive.call(void 0, );
|
|
117
118
|
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _2 => _2.notifyTicketCreated]);
|
|
118
119
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
119
120
|
const formInFlightRef = _react.useRef.call(void 0, null);
|
|
@@ -274,10 +275,10 @@ function useTicketActions(options) {
|
|
|
274
275
|
..._optionalChain([input, 'access', _3 => _3.attachments, 'optionalAccess', _4 => _4.length]) ? { attachments: input.attachments } : {}
|
|
275
276
|
});
|
|
276
277
|
if (result.mirror_synced === false) {
|
|
277
|
-
toast2(
|
|
278
|
+
toast2(_chunk4S5E7NOMcjs.TOAST_COPY.open_mirror_pending);
|
|
278
279
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
279
280
|
} else {
|
|
280
|
-
toast2(
|
|
281
|
+
toast2(_chunk4S5E7NOMcjs.TOAST_COPY.open_success);
|
|
281
282
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
282
283
|
removeOptimistic(placeholderId);
|
|
283
284
|
}
|
|
@@ -363,7 +364,7 @@ function useTicketActions(options) {
|
|
|
363
364
|
...hasText ? { content_addendum: trimmed } : {},
|
|
364
365
|
...hasFiles ? { attachments } : {}
|
|
365
366
|
},
|
|
366
|
-
|
|
367
|
+
_chunk4S5E7NOMcjs.TOAST_COPY.comment_success,
|
|
367
368
|
"send message"
|
|
368
369
|
);
|
|
369
370
|
if (ok) {
|
|
@@ -386,13 +387,13 @@ function useTicketActions(options) {
|
|
|
386
387
|
status: "CLOSED",
|
|
387
388
|
..._optionalChain([resolution, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ? { resolution: resolution.trim() } : {}
|
|
388
389
|
},
|
|
389
|
-
|
|
390
|
+
_chunk4S5E7NOMcjs.TOAST_COPY.close_success,
|
|
390
391
|
"close ticket"
|
|
391
392
|
),
|
|
392
393
|
[updateTicket]
|
|
393
394
|
);
|
|
394
395
|
const reopenTicket = _react.useCallback.call(void 0,
|
|
395
|
-
(ticket) => updateTicket(ticket, { status: "OPEN" },
|
|
396
|
+
(ticket) => updateTicket(ticket, { status: "OPEN" }, _chunk4S5E7NOMcjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
396
397
|
[updateTicket]
|
|
397
398
|
);
|
|
398
399
|
return _react.useMemo.call(void 0,
|
|
@@ -617,14 +618,14 @@ function useTicketsList(filters) {
|
|
|
617
618
|
// src/components/tickets/ticket-open-form.tsx
|
|
618
619
|
|
|
619
620
|
var _jsxruntime = require('react/jsx-runtime');
|
|
620
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
621
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunk4S5E7NOMcjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
621
622
|
function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
622
623
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
623
624
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
624
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
625
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkYBPFIXV4cjs.useChatAttachments.call(void 0, );
|
|
625
626
|
const trimmedSubject = subject.trim();
|
|
626
627
|
const trimmedContent = content.trim();
|
|
627
|
-
const overCap = content.length >
|
|
628
|
+
const overCap = content.length > _chunk4S5E7NOMcjs.TICKET_TEXT_MAX_CHARS;
|
|
628
629
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
629
630
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
630
631
|
const handleSubmit = async (e) => {
|
|
@@ -641,7 +642,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
641
642
|
clear();
|
|
642
643
|
}
|
|
643
644
|
};
|
|
644
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWCBRZCU4cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", children: [
|
|
645
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWCBRZCU4cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ..._chunkR5IWJONEcjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
645
646
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1 md:max-w-md", children: [
|
|
646
647
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-ods-text-primary text-h2", children: "Need Support?" }),
|
|
647
648
|
/* @__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." }),
|
|
@@ -666,7 +667,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
666
667
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
667
668
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-content", className: "mb-1 block text-ods-text-primary text-h6", children: "Your Message" }),
|
|
668
669
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
669
|
-
|
|
670
|
+
_chunkR5IWJONEcjs.Textarea,
|
|
670
671
|
{
|
|
671
672
|
id: "ticket-content",
|
|
672
673
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -680,11 +681,11 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
680
681
|
showCounter && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: `mt-1 text-right text-h6 ${overCap ? "text-ods-error" : "text-ods-text-secondary"}`, children: [
|
|
681
682
|
content.length,
|
|
682
683
|
"/",
|
|
683
|
-
|
|
684
|
+
_chunk4S5E7NOMcjs.TICKET_TEXT_MAX_CHARS
|
|
684
685
|
] })
|
|
685
686
|
] }),
|
|
686
687
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
687
|
-
|
|
688
|
+
_chunkYBPFIXV4cjs.ChatAttachmentChipStrip,
|
|
688
689
|
{
|
|
689
690
|
attachments,
|
|
690
691
|
onRemove: removeAttachment,
|
|
@@ -693,7 +694,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
693
694
|
),
|
|
694
695
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
695
696
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
696
|
-
|
|
697
|
+
_chunkYBPFIXV4cjs.ChatAttachmentAddButton,
|
|
697
698
|
{
|
|
698
699
|
attachmentsEnabled: !supportSystemDown,
|
|
699
700
|
attachmentsCount: attachments.length,
|
|
@@ -723,7 +724,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
723
724
|
|
|
724
725
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
725
726
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
726
|
-
const identity =
|
|
727
|
+
const identity = _chunkYBPFIXV4cjs.useChatIdentity.call(void 0, );
|
|
727
728
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]), () => ( "anon"));
|
|
728
729
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
729
730
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -796,7 +797,7 @@ function TicketLinkedDeliveryCard({ clickup, className }) {
|
|
|
796
797
|
dateClosed: clickup.date_closed,
|
|
797
798
|
clickupUrl: _nullishCoalesce(clickup.clickup_url, () => ( ""))
|
|
798
799
|
};
|
|
799
|
-
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,
|
|
800
|
+
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, _chunkWRWXND3Xcjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
800
801
|
}
|
|
801
802
|
|
|
802
803
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -811,7 +812,7 @@ function TicketReplyComposer({
|
|
|
811
812
|
}) {
|
|
812
813
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
813
814
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
814
|
-
const attachments =
|
|
815
|
+
const attachments = _chunkYBPFIXV4cjs.useChatAttachments.call(void 0, );
|
|
815
816
|
const { readyAttachments, clear: clearAttachments } = attachments;
|
|
816
817
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
817
818
|
const hasReadyFiles = readyAttachments.length > 0;
|
|
@@ -832,7 +833,7 @@ function TicketReplyComposer({
|
|
|
832
833
|
const disabled = busy || supportSystemDown;
|
|
833
834
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
834
835
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
835
|
-
|
|
836
|
+
_chunkYBPFIXV4cjs.ChatAttachmentChipStrip,
|
|
836
837
|
{
|
|
837
838
|
attachments: attachments.attachments,
|
|
838
839
|
onRemove: attachments.removeAttachment,
|
|
@@ -841,7 +842,7 @@ function TicketReplyComposer({
|
|
|
841
842
|
}
|
|
842
843
|
),
|
|
843
844
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
844
|
-
|
|
845
|
+
_chunkYBPFIXV4cjs.ChatInput,
|
|
845
846
|
{
|
|
846
847
|
fullWidth: true,
|
|
847
848
|
autoFocus: true,
|
|
@@ -849,13 +850,13 @@ function TicketReplyComposer({
|
|
|
849
850
|
sending: busy || attachments.hasInflightUploads,
|
|
850
851
|
disabled: supportSystemDown,
|
|
851
852
|
allowEmptySend: hasReadyFiles,
|
|
852
|
-
maxLength:
|
|
853
|
+
maxLength: _chunk4S5E7NOMcjs.TICKET_TEXT_MAX_CHARS,
|
|
853
854
|
onSend: handleSend
|
|
854
855
|
}
|
|
855
856
|
),
|
|
856
857
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-2", children: [
|
|
857
858
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
858
|
-
|
|
859
|
+
_chunkYBPFIXV4cjs.ChatAttachmentAddButton,
|
|
859
860
|
{
|
|
860
861
|
attachmentsEnabled: true,
|
|
861
862
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -878,25 +879,25 @@ function TicketReplyComposer({
|
|
|
878
879
|
}
|
|
879
880
|
)
|
|
880
881
|
] }),
|
|
881
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
882
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
883
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
884
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
882
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5IWJONEcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5IWJONEcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
883
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5IWJONEcjs.AlertDialogHeader, { children: [
|
|
884
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5IWJONEcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
885
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5IWJONEcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
885
886
|
] }),
|
|
886
887
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
887
|
-
|
|
888
|
+
_chunkR5IWJONEcjs.Textarea,
|
|
888
889
|
{
|
|
889
890
|
value: resolution,
|
|
890
891
|
onChange: (e) => setResolution(e.target.value),
|
|
891
892
|
placeholder: "Resolution (optional)",
|
|
892
893
|
rows: 3,
|
|
893
|
-
maxLength:
|
|
894
|
+
maxLength: _chunk4S5E7NOMcjs.TICKET_TEXT_MAX_CHARS,
|
|
894
895
|
className: "mt-2"
|
|
895
896
|
}
|
|
896
897
|
),
|
|
897
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
898
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5IWJONEcjs.AlertDialogFooter, { children: [
|
|
898
899
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
899
|
-
|
|
900
|
+
_chunkR5IWJONEcjs.AlertDialogCancel,
|
|
900
901
|
{
|
|
901
902
|
disabled: busy,
|
|
902
903
|
className: "border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-border",
|
|
@@ -904,7 +905,7 @@ function TicketReplyComposer({
|
|
|
904
905
|
}
|
|
905
906
|
),
|
|
906
907
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
907
|
-
|
|
908
|
+
_chunkR5IWJONEcjs.AlertDialogAction,
|
|
908
909
|
{
|
|
909
910
|
onClick: () => void confirmClose(),
|
|
910
911
|
disabled: busy,
|
|
@@ -966,10 +967,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
966
967
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
967
968
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
968
969
|
function TicketTimelinePanel({ ticket }) {
|
|
969
|
-
const identity =
|
|
970
|
-
const externalId =
|
|
970
|
+
const identity = _chunkYBPFIXV4cjs.useChatIdentity.call(void 0, );
|
|
971
|
+
const externalId = _chunk4S5E7NOMcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
971
972
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
972
|
-
const live =
|
|
973
|
+
const live = _chunk4S5E7NOMcjs.useOptionalTicketLive.call(void 0, );
|
|
973
974
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _25 => _25.setOpenTicketId]);
|
|
974
975
|
const markRead = _optionalChain([live, 'optionalAccess', _26 => _26.markRead]);
|
|
975
976
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -993,7 +994,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
993
994
|
markReadDebounceRef.current = setTimeout(() => {
|
|
994
995
|
markReadDebounceRef.current = null;
|
|
995
996
|
void markRead(externalId);
|
|
996
|
-
},
|
|
997
|
+
}, _chunk4S5E7NOMcjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
997
998
|
}, [engagementsCount, externalId, markRead]);
|
|
998
999
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
999
1000
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -1008,7 +1009,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1008
1009
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _40 => _40.user, 'optionalAccess', _41 => _41.email]) || "You";
|
|
1009
1010
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _42 => _42.user, 'optionalAccess', _43 => _43.avatarUrl]), () => ( void 0)) : void 0;
|
|
1010
1011
|
if (isLoading) {
|
|
1011
|
-
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,
|
|
1012
|
+
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, _chunkYBPFIXV4cjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1012
1013
|
}
|
|
1013
1014
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1014
1015
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1027,7 +1028,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1027
1028
|
const isResolution = turn.startsWith("[Resolution]");
|
|
1028
1029
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
1029
1030
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1030
|
-
|
|
1031
|
+
_chunkYBPFIXV4cjs.ChatMessageRow,
|
|
1031
1032
|
{
|
|
1032
1033
|
displayName: customerName,
|
|
1033
1034
|
avatarUrl: customerAvatar,
|
|
@@ -1056,13 +1057,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1056
1057
|
}
|
|
1057
1058
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
1058
1059
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1059
|
-
|
|
1060
|
+
_chunkYBPFIXV4cjs.ChatMessageRow,
|
|
1060
1061
|
{
|
|
1061
1062
|
displayName: author,
|
|
1062
1063
|
avatarUrl: avatarSrc,
|
|
1063
|
-
timeLabel: eng.createdAt ?
|
|
1064
|
+
timeLabel: eng.createdAt ? _chunkYBPFIXV4cjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1064
1065
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1065
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1066
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5IWJONEcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1066
1067
|
},
|
|
1067
1068
|
eng.id
|
|
1068
1069
|
);
|
|
@@ -1175,7 +1176,7 @@ function TicketRow({
|
|
|
1175
1176
|
onActionCollapsed,
|
|
1176
1177
|
id
|
|
1177
1178
|
}) {
|
|
1178
|
-
const optimistic =
|
|
1179
|
+
const optimistic = _chunk4S5E7NOMcjs.isOptimistic.call(void 0, ticket);
|
|
1179
1180
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1180
1181
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1181
1182
|
onToggle(ticket.id);
|
|
@@ -1203,7 +1204,7 @@ function TicketRow({
|
|
|
1203
1204
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
1204
1205
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
1205
1206
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
1206
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
1207
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkYBPFIXV4cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
1207
1208
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
1208
1209
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
1209
1210
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -1213,7 +1214,7 @@ function TicketRow({
|
|
|
1213
1214
|
};
|
|
1214
1215
|
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: [
|
|
1215
1216
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1216
|
-
|
|
1217
|
+
_chunkYBPFIXV4cjs.ChatTicketItem,
|
|
1217
1218
|
{
|
|
1218
1219
|
ticket: tileData,
|
|
1219
1220
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1246,7 +1247,7 @@ function TicketRow({
|
|
|
1246
1247
|
// src/components/tickets/ticket-center.tsx
|
|
1247
1248
|
|
|
1248
1249
|
function TicketCenter({ toast: toast2 = _chunkM4YQUHORcjs.toast } = {}) {
|
|
1249
|
-
const identity =
|
|
1250
|
+
const identity = _chunkYBPFIXV4cjs.useChatIdentity.call(void 0, );
|
|
1250
1251
|
if (identity.isLoading) {
|
|
1251
1252
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1252
1253
|
}
|
|
@@ -1317,7 +1318,7 @@ function TicketCenterAuthed({
|
|
|
1317
1318
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-ods-text-secondary text-h6", children: [
|
|
1318
1319
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1319
1320
|
"Updated ",
|
|
1320
|
-
|
|
1321
|
+
_chunkYBPFIXV4cjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1321
1322
|
] }),
|
|
1322
1323
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1323
1324
|
_chunkCJBSU3XBcjs.Button,
|
|
@@ -1344,11 +1345,11 @@ function TicketCenterAuthed({
|
|
|
1344
1345
|
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWCBRZCU4cjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1345
1346
|
TicketRow,
|
|
1346
1347
|
{
|
|
1347
|
-
id:
|
|
1348
|
+
id: _chunkR5IWJONEcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1348
1349
|
ticket,
|
|
1349
1350
|
expanded: expandedTicketId === ticket.id,
|
|
1350
1351
|
onToggle: toggleRow,
|
|
1351
|
-
busy:
|
|
1352
|
+
busy: _chunk4S5E7NOMcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1352
1353
|
supportSystemDown,
|
|
1353
1354
|
onSendMessage: actions.sendMessage,
|
|
1354
1355
|
onClose: actions.closeTicket,
|
|
@@ -1402,10 +1403,10 @@ function HelpCenterCard({
|
|
|
1402
1403
|
onClearReplyError,
|
|
1403
1404
|
id
|
|
1404
1405
|
}) {
|
|
1405
|
-
const optimistic =
|
|
1406
|
+
const optimistic = _chunk4S5E7NOMcjs.isOptimistic.call(void 0, ticket);
|
|
1406
1407
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1407
1408
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1408
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1409
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkYBPFIXV4cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1409
1410
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1410
1411
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1411
1412
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1424,7 +1425,7 @@ function HelpCenterCard({
|
|
|
1424
1425
|
});
|
|
1425
1426
|
return () => cancelAnimationFrame(raf);
|
|
1426
1427
|
}, [isExpanded]);
|
|
1427
|
-
const live =
|
|
1428
|
+
const live = _chunk4S5E7NOMcjs.useOptionalTicketLive.call(void 0, );
|
|
1428
1429
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1429
1430
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1430
1431
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1474,7 +1475,7 @@ function HelpCenterCard({
|
|
|
1474
1475
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1475
1476
|
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]",
|
|
1476
1477
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1477
|
-
|
|
1478
|
+
_chunkWRWXND3Xcjs.DevCardRowContent,
|
|
1478
1479
|
{
|
|
1479
1480
|
title,
|
|
1480
1481
|
subtitle,
|
|
@@ -1575,7 +1576,7 @@ function HelpCenterCreateForm({
|
|
|
1575
1576
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1576
1577
|
] });
|
|
1577
1578
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1578
|
-
|
|
1579
|
+
_chunkMIC4HHVZcjs.ContactForm,
|
|
1579
1580
|
{
|
|
1580
1581
|
title: "Open a new ticket",
|
|
1581
1582
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1613,29 +1614,29 @@ function HelpCenterCreateForm({
|
|
|
1613
1614
|
// src/components/tickets/help-center-list.tsx
|
|
1614
1615
|
|
|
1615
1616
|
function HelpCenterList({ toast: toast2 = _chunkM4YQUHORcjs.toast, backButton, title, shell } = {}) {
|
|
1616
|
-
const identity =
|
|
1617
|
+
const identity = _chunkYBPFIXV4cjs.useChatIdentity.call(void 0, );
|
|
1617
1618
|
const searchParams = _chunkSADRZ4YIcjs.useSearchParams.call(void 0, );
|
|
1618
1619
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
1619
1620
|
const pathname = _chunkSADRZ4YIcjs.usePathname.call(void 0, );
|
|
1620
|
-
const search = searchParams.get(
|
|
1621
|
+
const search = searchParams.get(_chunkR5IWJONEcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1621
1622
|
const status = searchParams.get("status") || "all";
|
|
1622
|
-
const ticketParam = searchParams.get(
|
|
1623
|
+
const ticketParam = searchParams.get(_chunkR5IWJONEcjs.TICKET_OPEN_PARAM) || "";
|
|
1623
1624
|
const page = _chunkH64ZHSYRcjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1624
1625
|
if (identity.isLoading) {
|
|
1625
1626
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1626
|
-
|
|
1627
|
+
_chunkWRWXND3Xcjs.DevSectionPage,
|
|
1627
1628
|
{
|
|
1628
1629
|
sectionKey: "tickets",
|
|
1629
1630
|
backButton,
|
|
1630
1631
|
title,
|
|
1631
1632
|
shell,
|
|
1632
1633
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1633
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1634
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWRWXND3Xcjs.DevCardRowSkeletonList, {})
|
|
1634
1635
|
}
|
|
1635
1636
|
);
|
|
1636
1637
|
}
|
|
1637
1638
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1638
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1639
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWRWXND3Xcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1639
1640
|
_chunkO4VZOA2Qcjs.EmptyState,
|
|
1640
1641
|
{
|
|
1641
1642
|
type: "generic",
|
|
@@ -1687,8 +1688,8 @@ function HelpCenterListAuthed({
|
|
|
1687
1688
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1688
1689
|
(externalId) => {
|
|
1689
1690
|
const params = new URLSearchParams(searchParams.toString());
|
|
1690
|
-
if (externalId) params.set(
|
|
1691
|
-
else params.delete(
|
|
1691
|
+
if (externalId) params.set(_chunkR5IWJONEcjs.TICKET_OPEN_PARAM, externalId);
|
|
1692
|
+
else params.delete(_chunkR5IWJONEcjs.TICKET_OPEN_PARAM);
|
|
1692
1693
|
const qs = params.toString();
|
|
1693
1694
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1694
1695
|
},
|
|
@@ -1765,13 +1766,13 @@ function HelpCenterListAuthed({
|
|
|
1765
1766
|
] }),
|
|
1766
1767
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCJBSU3XBcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1767
1768
|
] }),
|
|
1768
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1769
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWRWXND3Xcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1769
1770
|
// Bridge state — background refetch in flight and the
|
|
1770
1771
|
// optimistic placeholder was just removed by the mutation
|
|
1771
1772
|
// callback. Without this branch "No tickets yet" would flash
|
|
1772
1773
|
// for ~50ms between `removeOptimistic` and the server
|
|
1773
1774
|
// response landing.
|
|
1774
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1775
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWRWXND3Xcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1775
1776
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1776
1777
|
_chunkO4VZOA2Qcjs.EmptyState,
|
|
1777
1778
|
{
|
|
@@ -1807,11 +1808,11 @@ function HelpCenterListAuthed({
|
|
|
1807
1808
|
/* @__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,
|
|
1808
1809
|
HelpCenterCard,
|
|
1809
1810
|
{
|
|
1810
|
-
id:
|
|
1811
|
+
id: _chunkR5IWJONEcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1811
1812
|
ticket,
|
|
1812
1813
|
expanded: expandedTicketId === ticket.id,
|
|
1813
1814
|
onToggle: toggleRow,
|
|
1814
|
-
busy:
|
|
1815
|
+
busy: _chunk4S5E7NOMcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1815
1816
|
supportSystemDown,
|
|
1816
1817
|
onSendMessage: actions.sendMessage,
|
|
1817
1818
|
onClose: actions.closeTicket,
|
|
@@ -1825,7 +1826,7 @@ function HelpCenterListAuthed({
|
|
|
1825
1826
|
) }),
|
|
1826
1827
|
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO4VZOA2Qcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1827
1828
|
] });
|
|
1828
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1829
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWRWXND3Xcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1829
1830
|
}
|
|
1830
1831
|
|
|
1831
1832
|
|
|
@@ -1844,4 +1845,4 @@ function HelpCenterListAuthed({
|
|
|
1844
1845
|
|
|
1845
1846
|
|
|
1846
1847
|
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;
|
|
1847
|
-
//# sourceMappingURL=chunk-
|
|
1848
|
+
//# sourceMappingURL=chunk-OGTXZFFE.cjs.map
|