@flamingo-stack/openframe-frontend-core 0.0.671 → 0.0.672-snapshot.20260928032919
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/chat-protocol/card-marker.d.ts +12 -0
- package/dist/chat-protocol/card-marker.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +17 -0
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.d.ts +1 -0
- package/dist/chat-protocol/index.d.ts.map +1 -1
- package/dist/chat-protocol/index.js +15 -1
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/{chunk-4PVY4JJN.js → chunk-2TQ64TG3.js} +3 -3
- package/dist/{chunk-FAJUQKWQ.cjs → chunk-3EIB5PNM.cjs} +76 -75
- package/dist/chunk-3EIB5PNM.cjs.map +1 -0
- package/dist/{chunk-FUXUJSPP.cjs → chunk-3UDBK2YG.cjs} +1 -1
- package/dist/chunk-3UDBK2YG.cjs.map +1 -0
- package/dist/{chunk-G64BNLDO.js → chunk-3X6WFYSV.js} +2 -2
- package/dist/{chunk-DUZEFACP.js → chunk-4UAIOXYC.js} +3 -3
- package/dist/{chunk-SNNE34OP.js → chunk-5KD5SSP6.js} +5 -5
- package/dist/{chunk-RKUCK6MN.js → chunk-6NGIPAQ6.js} +2 -2
- package/dist/{chunk-OG2BNJ2Q.cjs → chunk-6PPEG2N4.cjs} +389 -375
- package/dist/chunk-6PPEG2N4.cjs.map +1 -0
- package/dist/{chunk-NIYIK32F.js → chunk-6ZX6TFSS.js} +18 -4
- package/dist/{chunk-NIYIK32F.js.map → chunk-6ZX6TFSS.js.map} +1 -1
- package/dist/{chunk-6C6UUOH4.js → chunk-A77HP3N6.js} +8 -7
- package/dist/{chunk-6C6UUOH4.js.map → chunk-A77HP3N6.js.map} +1 -1
- package/dist/{chunk-YNGAJGYB.cjs → chunk-AXMNWMAU.cjs} +340 -6
- package/dist/chunk-AXMNWMAU.cjs.map +1 -0
- package/dist/{chunk-PLG6LP7E.cjs → chunk-BAEHCDPI.cjs} +49 -49
- package/dist/{chunk-PLG6LP7E.cjs.map → chunk-BAEHCDPI.cjs.map} +1 -1
- package/dist/{chunk-R22IA7MP.js → chunk-BBDEIE56.js} +4 -4
- package/dist/{chunk-PQ7YC5Y6.js → chunk-D5HO3RNF.js} +3 -3
- package/dist/{chunk-II66XWU5.cjs → chunk-D6IOMPAH.cjs} +3 -3
- package/dist/{chunk-II66XWU5.cjs.map → chunk-D6IOMPAH.cjs.map} +1 -1
- package/dist/{chunk-DAGKBFZN.cjs → chunk-EQIBWG5U.cjs} +33 -33
- package/dist/{chunk-DAGKBFZN.cjs.map → chunk-EQIBWG5U.cjs.map} +1 -1
- package/dist/{chunk-3PVOF3IB.js → chunk-EVB3EO5S.js} +337 -3
- package/dist/{chunk-3PVOF3IB.js.map → chunk-EVB3EO5S.js.map} +1 -1
- package/dist/{chunk-SJZPKIW6.cjs → chunk-G64BDYU5.cjs} +12 -12
- package/dist/{chunk-SJZPKIW6.cjs.map → chunk-G64BDYU5.cjs.map} +1 -1
- package/dist/{chunk-BP542DGQ.cjs → chunk-GLPGYU6H.cjs} +55 -28
- package/dist/chunk-GLPGYU6H.cjs.map +1 -0
- package/dist/{chunk-TLLTL6LB.js → chunk-JD4U7QMG.js} +1 -1
- package/dist/chunk-JD4U7QMG.js.map +1 -0
- package/dist/{chunk-ZRIVCLPR.js → chunk-JD5TKRCU.js} +1 -1
- package/dist/chunk-JD5TKRCU.js.map +1 -0
- package/dist/{chunk-YJWR7D6O.cjs → chunk-JKIM7U7N.cjs} +3 -3
- package/dist/{chunk-YJWR7D6O.cjs.map → chunk-JKIM7U7N.cjs.map} +1 -1
- package/dist/{chunk-K3O4D7LW.js → chunk-KUASHD7Z.js} +4 -4
- package/dist/{chunk-GF5TSQ6C.cjs → chunk-KXL534EV.cjs} +10 -10
- package/dist/{chunk-GF5TSQ6C.cjs.map → chunk-KXL534EV.cjs.map} +1 -1
- package/dist/{chunk-FHTNCWIP.js → chunk-KYVFU7VQ.js} +5 -5
- package/dist/{chunk-OYMOG544.js → chunk-KZAT6VWE.js} +5 -5
- package/dist/{chunk-D55IENZJ.cjs → chunk-LCMT2GZK.cjs} +1 -1
- package/dist/chunk-LCMT2GZK.cjs.map +1 -0
- package/dist/{chunk-IJIIL6WU.js → chunk-MVU7HF5A.js} +6 -6
- package/dist/{chunk-XGXHHSDU.cjs → chunk-NYDFVUMH.cjs} +22 -22
- package/dist/{chunk-XGXHHSDU.cjs.map → chunk-NYDFVUMH.cjs.map} +1 -1
- package/dist/{chunk-STLBB6PF.js → chunk-O75Y5O3U.js} +35 -8
- package/dist/chunk-O75Y5O3U.js.map +1 -0
- package/dist/{chunk-DAWYS25M.cjs → chunk-PDNGWDJF.cjs} +17 -17
- package/dist/{chunk-DAWYS25M.cjs.map → chunk-PDNGWDJF.cjs.map} +1 -1
- package/dist/{chunk-T3ACDOVD.cjs → chunk-VRZZCL4R.cjs} +7 -7
- package/dist/{chunk-T3ACDOVD.cjs.map → chunk-VRZZCL4R.cjs.map} +1 -1
- package/dist/{chunk-XH4MRTZM.cjs → chunk-WQFT7GOC.cjs} +5 -5
- package/dist/{chunk-XH4MRTZM.cjs.map → chunk-WQFT7GOC.cjs.map} +1 -1
- package/dist/{chunk-YIDNSRPL.cjs → chunk-XGBFQ3YV.cjs} +31 -31
- package/dist/{chunk-YIDNSRPL.cjs.map → chunk-XGBFQ3YV.cjs.map} +1 -1
- package/dist/{chunk-UH3BL2OT.js → chunk-Y7TZHPS2.js} +2 -2
- package/dist/{chunk-EIAVE6SE.cjs → chunk-YKKW67A3.cjs} +10 -10
- package/dist/{chunk-EIAVE6SE.cjs.map → chunk-YKKW67A3.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +18 -17
- package/dist/components/case-studies/index.cjs.map +1 -1
- package/dist/components/case-studies/index.js +7 -6
- package/dist/components/case-studies/index.js.map +1 -1
- package/dist/components/case-studies/share-experience-section.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/contact-form.d.ts +6 -1
- package/dist/components/contact/contact-form.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +6 -6
- package/dist/components/contact/index.js +5 -5
- package/dist/components/docs/index.cjs +9 -9
- package/dist/components/docs/index.js +8 -8
- package/dist/components/embeds/index.cjs +6 -6
- package/dist/components/embeds/index.js +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/faq/index.js +5 -5
- package/dist/components/features/index.cjs +5 -5
- package/dist/components/features/index.js +4 -4
- package/dist/components/features/waitlist-form.d.ts +3 -1
- package/dist/components/features/waitlist-form.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +77 -76
- package/dist/components/help-center-pages/index.cjs.map +1 -1
- package/dist/components/help-center-pages/index.js +17 -16
- package/dist/components/help-center-pages/index.js.map +1 -1
- package/dist/components/help-center-pages/trust-center-sections.d.ts.map +1 -1
- package/dist/components/index.cjs +43 -43
- package/dist/components/index.js +15 -15
- package/dist/components/meeting-scheduler/booking-form.d.ts +4 -1
- package/dist/components/meeting-scheduler/booking-form.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +73 -39
- package/dist/components/meeting-scheduler/index.cjs.map +1 -1
- package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.js +44 -10
- package/dist/components/meeting-scheduler/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +8 -8
- package/dist/components/navigation/index.js +7 -7
- package/dist/components/onboarding-guides/index.cjs +8 -8
- package/dist/components/onboarding-guides/index.js +7 -7
- package/dist/components/tickets/help-center-create-form.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +9 -9
- package/dist/components/tickets/index.js +8 -8
- package/dist/components/ui/index.cjs +5 -5
- package/dist/components/ui/index.js +4 -4
- package/dist/contexts/endpoints-runtime-context.d.ts +5 -0
- package/dist/contexts/endpoints-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +5 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/use-form-rescue.d.ts +37 -0
- package/dist/hooks/use-form-rescue.d.ts.map +1 -0
- package/dist/index.cjs +51 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +50 -8
- package/dist/index.js.map +1 -1
- package/dist/utils/form-rescue.cjs +117 -0
- package/dist/utils/form-rescue.cjs.map +1 -0
- package/dist/utils/form-rescue.d.ts +98 -0
- package/dist/utils/form-rescue.d.ts.map +1 -0
- package/dist/utils/form-rescue.js +96 -0
- package/dist/utils/form-rescue.js.map +1 -0
- package/dist/utils/index.cjs +113 -0
- 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 +94 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +7 -1
- package/src/chat-protocol/__tests__/card-marker.test.ts +27 -1
- package/src/chat-protocol/card-marker.ts +24 -0
- package/src/chat-protocol/index.ts +3 -0
- package/src/components/case-studies/share-experience-section.tsx +1 -0
- package/src/components/contact/contact-form.tsx +38 -2
- package/src/components/features/waitlist-form.tsx +23 -2
- package/src/components/help-center-pages/trust-center-sections.tsx +1 -0
- package/src/components/meeting-scheduler/booking-form.tsx +14 -0
- package/src/components/meeting-scheduler/index.tsx +33 -3
- package/src/components/tickets/help-center-create-form.tsx +2 -0
- package/src/contexts/endpoints-runtime-context.tsx +5 -0
- package/src/hooks/__tests__/use-form-rescue.test.tsx +182 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/use-form-rescue.ts +315 -0
- package/src/utils/__tests__/form-rescue.test.ts +106 -0
- package/src/utils/form-rescue.ts +190 -0
- package/src/utils/index.ts +5 -0
- package/dist/chunk-BP542DGQ.cjs.map +0 -1
- package/dist/chunk-D55IENZJ.cjs.map +0 -1
- package/dist/chunk-FAJUQKWQ.cjs.map +0 -1
- package/dist/chunk-FUXUJSPP.cjs.map +0 -1
- package/dist/chunk-OG2BNJ2Q.cjs.map +0 -1
- package/dist/chunk-STLBB6PF.js.map +0 -1
- package/dist/chunk-TLLTL6LB.js.map +0 -1
- package/dist/chunk-YNGAJGYB.cjs.map +0 -1
- package/dist/chunk-ZRIVCLPR.js.map +0 -1
- /package/dist/{chunk-4PVY4JJN.js.map → chunk-2TQ64TG3.js.map} +0 -0
- /package/dist/{chunk-G64BNLDO.js.map → chunk-3X6WFYSV.js.map} +0 -0
- /package/dist/{chunk-DUZEFACP.js.map → chunk-4UAIOXYC.js.map} +0 -0
- /package/dist/{chunk-SNNE34OP.js.map → chunk-5KD5SSP6.js.map} +0 -0
- /package/dist/{chunk-RKUCK6MN.js.map → chunk-6NGIPAQ6.js.map} +0 -0
- /package/dist/{chunk-R22IA7MP.js.map → chunk-BBDEIE56.js.map} +0 -0
- /package/dist/{chunk-PQ7YC5Y6.js.map → chunk-D5HO3RNF.js.map} +0 -0
- /package/dist/{chunk-K3O4D7LW.js.map → chunk-KUASHD7Z.js.map} +0 -0
- /package/dist/{chunk-FHTNCWIP.js.map → chunk-KYVFU7VQ.js.map} +0 -0
- /package/dist/{chunk-OYMOG544.js.map → chunk-KZAT6VWE.js.map} +0 -0
- /package/dist/{chunk-IJIIL6WU.js.map → chunk-MVU7HF5A.js.map} +0 -0
- /package/dist/{chunk-UH3BL2OT.js.map → chunk-Y7TZHPS2.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createSseSubscription
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6ZX6TFSS.js";
|
|
5
5
|
import {
|
|
6
6
|
useChatIdentity
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JD4U7QMG.js";
|
|
8
8
|
import {
|
|
9
9
|
embedAuthedFetch
|
|
10
10
|
} from "./chunk-LZLT67PE.js";
|
|
@@ -275,4 +275,4 @@ export {
|
|
|
275
275
|
TICKET_MARK_READ_DEBOUNCE_MS,
|
|
276
276
|
TOAST_COPY
|
|
277
277
|
};
|
|
278
|
-
//# sourceMappingURL=chunk-
|
|
278
|
+
//# sourceMappingURL=chunk-2TQ64TG3.js.map
|
|
@@ -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 _chunkGLPGYU6Hcjs = require('./chunk-GLPGYU6H.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkYKKW67A3cjs = require('./chunk-YKKW67A3.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ var _chunk77BLJHKIcjs = require('./chunk-77BLJHKI.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkWQFT7GOCcjs = require('./chunk-WQFT7GOC.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -35,11 +35,11 @@ var _chunkXH4MRTZMcjs = require('./chunk-XH4MRTZM.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunk6PPEG2N4cjs = require('./chunk-6PPEG2N4.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunkAXMNWMAUcjs = require('./chunk-AXMNWMAU.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
@@ -59,7 +59,7 @@ var _chunkQVSVRG7Icjs = require('./chunk-QVSVRG7I.cjs');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunk3UDBK2YGcjs = require('./chunk-3UDBK2YG.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
@@ -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(_chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
118
|
-
const ticketLive =
|
|
118
|
+
const ticketLive = _chunkWQFT7GOCcjs.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(_chunkWQFT7GOCcjs.TOAST_COPY.open_mirror_pending);
|
|
280
280
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
281
281
|
} else {
|
|
282
|
-
toast2(
|
|
282
|
+
toast2(_chunkWQFT7GOCcjs.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
|
+
_chunkWQFT7GOCcjs.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
|
+
_chunkWQFT7GOCcjs.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" }, _chunkWQFT7GOCcjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
398
398
|
[updateTicket]
|
|
399
399
|
);
|
|
400
400
|
return _react.useMemo.call(void 0,
|
|
@@ -609,14 +609,14 @@ function useTicketsList(filters) {
|
|
|
609
609
|
// src/components/tickets/ticket-open-form.tsx
|
|
610
610
|
|
|
611
611
|
var _jsxruntime = require('react/jsx-runtime');
|
|
612
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
612
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunkWQFT7GOCcjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
613
613
|
function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
614
614
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
615
615
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
616
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
616
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunk3UDBK2YGcjs.useChatAttachments.call(void 0, );
|
|
617
617
|
const trimmedSubject = subject.trim();
|
|
618
618
|
const trimmedContent = content.trim();
|
|
619
|
-
const overCap = content.length >
|
|
619
|
+
const overCap = content.length > _chunkWQFT7GOCcjs.TICKET_TEXT_MAX_CHARS;
|
|
620
620
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
621
621
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
622
622
|
const handleSubmit = async (e) => {
|
|
@@ -633,7 +633,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
633
633
|
clear();
|
|
634
634
|
}
|
|
635
635
|
};
|
|
636
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQRUW4UXBcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ...
|
|
636
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQRUW4UXBcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ..._chunk6PPEG2N4cjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
637
637
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1 md:max-w-md", children: [
|
|
638
638
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-ods-text-primary text-h2", children: "Need Support?" }),
|
|
639
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." }),
|
|
@@ -658,7 +658,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
658
658
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
659
659
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-content", className: "mb-1 block text-ods-text-primary text-h6", children: "Your Message" }),
|
|
660
660
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
661
|
-
|
|
661
|
+
_chunk6PPEG2N4cjs.Textarea,
|
|
662
662
|
{
|
|
663
663
|
id: "ticket-content",
|
|
664
664
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -672,11 +672,11 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
672
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: [
|
|
673
673
|
content.length,
|
|
674
674
|
"/",
|
|
675
|
-
|
|
675
|
+
_chunkWQFT7GOCcjs.TICKET_TEXT_MAX_CHARS
|
|
676
676
|
] })
|
|
677
677
|
] }),
|
|
678
678
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
679
|
-
|
|
679
|
+
_chunk3UDBK2YGcjs.ChatAttachmentChipStrip,
|
|
680
680
|
{
|
|
681
681
|
attachments,
|
|
682
682
|
onRemove: removeAttachment,
|
|
@@ -685,7 +685,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
685
685
|
),
|
|
686
686
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
687
687
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
688
|
-
|
|
688
|
+
_chunk3UDBK2YGcjs.ChatAttachmentAddButton,
|
|
689
689
|
{
|
|
690
690
|
attachmentsEnabled: !supportSystemDown,
|
|
691
691
|
attachmentsCount: attachments.length,
|
|
@@ -715,7 +715,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
715
715
|
|
|
716
716
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
717
717
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
718
|
-
const identity =
|
|
718
|
+
const identity = _chunk3UDBK2YGcjs.useChatIdentity.call(void 0, );
|
|
719
719
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]), () => ( "anon"));
|
|
720
720
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
721
721
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -788,7 +788,7 @@ function TicketLinkedDeliveryCard({ clickup, className }) {
|
|
|
788
788
|
dateClosed: clickup.date_closed,
|
|
789
789
|
clickupUrl: _nullishCoalesce(clickup.clickup_url, () => ( ""))
|
|
790
790
|
};
|
|
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,
|
|
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, _chunkYKKW67A3cjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
792
792
|
}
|
|
793
793
|
|
|
794
794
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -803,7 +803,7 @@ function TicketReplyComposer({
|
|
|
803
803
|
}) {
|
|
804
804
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
805
805
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
806
|
-
const attachments =
|
|
806
|
+
const attachments = _chunk3UDBK2YGcjs.useChatAttachments.call(void 0, );
|
|
807
807
|
const { readyAttachments, clear: clearAttachments } = attachments;
|
|
808
808
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
809
809
|
const hasReadyFiles = readyAttachments.length > 0;
|
|
@@ -824,7 +824,7 @@ function TicketReplyComposer({
|
|
|
824
824
|
const disabled = busy || supportSystemDown;
|
|
825
825
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
826
826
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
827
|
-
|
|
827
|
+
_chunk3UDBK2YGcjs.ChatAttachmentChipStrip,
|
|
828
828
|
{
|
|
829
829
|
attachments: attachments.attachments,
|
|
830
830
|
onRemove: attachments.removeAttachment,
|
|
@@ -833,7 +833,7 @@ function TicketReplyComposer({
|
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
835
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
836
|
-
|
|
836
|
+
_chunk3UDBK2YGcjs.ChatInput,
|
|
837
837
|
{
|
|
838
838
|
fullWidth: true,
|
|
839
839
|
autoFocus: true,
|
|
@@ -841,13 +841,13 @@ function TicketReplyComposer({
|
|
|
841
841
|
sending: busy || attachments.hasInflightUploads,
|
|
842
842
|
disabled: supportSystemDown,
|
|
843
843
|
allowEmptySend: hasReadyFiles,
|
|
844
|
-
maxLength:
|
|
844
|
+
maxLength: _chunkWQFT7GOCcjs.TICKET_TEXT_MAX_CHARS,
|
|
845
845
|
onSend: handleSend
|
|
846
846
|
}
|
|
847
847
|
),
|
|
848
848
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-2", children: [
|
|
849
849
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
850
|
-
|
|
850
|
+
_chunk3UDBK2YGcjs.ChatAttachmentAddButton,
|
|
851
851
|
{
|
|
852
852
|
attachmentsEnabled: true,
|
|
853
853
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -870,25 +870,25 @@ function TicketReplyComposer({
|
|
|
870
870
|
}
|
|
871
871
|
)
|
|
872
872
|
] }),
|
|
873
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
874
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
875
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
876
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
873
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6PPEG2N4cjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
874
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6PPEG2N4cjs.AlertDialogHeader, { children: [
|
|
875
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
876
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
877
877
|
] }),
|
|
878
878
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
879
|
-
|
|
879
|
+
_chunk6PPEG2N4cjs.Textarea,
|
|
880
880
|
{
|
|
881
881
|
value: resolution,
|
|
882
882
|
onChange: (e) => setResolution(e.target.value),
|
|
883
883
|
placeholder: "Resolution (optional)",
|
|
884
884
|
rows: 3,
|
|
885
|
-
maxLength:
|
|
885
|
+
maxLength: _chunkWQFT7GOCcjs.TICKET_TEXT_MAX_CHARS,
|
|
886
886
|
className: "mt-2"
|
|
887
887
|
}
|
|
888
888
|
),
|
|
889
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
889
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6PPEG2N4cjs.AlertDialogFooter, { children: [
|
|
890
890
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
891
|
-
|
|
891
|
+
_chunk6PPEG2N4cjs.AlertDialogCancel,
|
|
892
892
|
{
|
|
893
893
|
disabled: busy,
|
|
894
894
|
className: "border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-border",
|
|
@@ -896,7 +896,7 @@ function TicketReplyComposer({
|
|
|
896
896
|
}
|
|
897
897
|
),
|
|
898
898
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
899
|
-
|
|
899
|
+
_chunk6PPEG2N4cjs.AlertDialogAction,
|
|
900
900
|
{
|
|
901
901
|
onClick: () => void confirmClose(),
|
|
902
902
|
disabled: busy,
|
|
@@ -958,10 +958,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
958
958
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
959
959
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
960
960
|
function TicketTimelinePanel({ ticket }) {
|
|
961
|
-
const identity =
|
|
962
|
-
const externalId =
|
|
961
|
+
const identity = _chunk3UDBK2YGcjs.useChatIdentity.call(void 0, );
|
|
962
|
+
const externalId = _chunkWQFT7GOCcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
963
963
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
964
|
-
const live =
|
|
964
|
+
const live = _chunkWQFT7GOCcjs.useOptionalTicketLive.call(void 0, );
|
|
965
965
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _25 => _25.setOpenTicketId]);
|
|
966
966
|
const markRead = _optionalChain([live, 'optionalAccess', _26 => _26.markRead]);
|
|
967
967
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -985,7 +985,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
985
985
|
markReadDebounceRef.current = setTimeout(() => {
|
|
986
986
|
markReadDebounceRef.current = null;
|
|
987
987
|
void markRead(externalId);
|
|
988
|
-
},
|
|
988
|
+
}, _chunkWQFT7GOCcjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
989
989
|
}, [engagementsCount, externalId, markRead]);
|
|
990
990
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
991
991
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -1000,7 +1000,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1000
1000
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _40 => _40.user, 'optionalAccess', _41 => _41.email]) || "You";
|
|
1001
1001
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _42 => _42.user, 'optionalAccess', _43 => _43.avatarUrl]), () => ( void 0)) : void 0;
|
|
1002
1002
|
if (isLoading) {
|
|
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,
|
|
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, _chunk3UDBK2YGcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1004
1004
|
}
|
|
1005
1005
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1006
1006
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1019,7 +1019,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1019
1019
|
const isResolution = turn.startsWith("[Resolution]");
|
|
1020
1020
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
1021
1021
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1022
|
-
|
|
1022
|
+
_chunk3UDBK2YGcjs.ChatMessageRow,
|
|
1023
1023
|
{
|
|
1024
1024
|
displayName: customerName,
|
|
1025
1025
|
avatarUrl: customerAvatar,
|
|
@@ -1048,13 +1048,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
1050
1050
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1051
|
-
|
|
1051
|
+
_chunk3UDBK2YGcjs.ChatMessageRow,
|
|
1052
1052
|
{
|
|
1053
1053
|
displayName: author,
|
|
1054
1054
|
avatarUrl: avatarSrc,
|
|
1055
|
-
timeLabel: eng.createdAt ?
|
|
1055
|
+
timeLabel: eng.createdAt ? _chunk3UDBK2YGcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1056
1056
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1057
|
-
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, _chunk6PPEG2N4cjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1058
1058
|
},
|
|
1059
1059
|
eng.id
|
|
1060
1060
|
);
|
|
@@ -1167,7 +1167,7 @@ function TicketRow({
|
|
|
1167
1167
|
onActionCollapsed,
|
|
1168
1168
|
id
|
|
1169
1169
|
}) {
|
|
1170
|
-
const optimistic =
|
|
1170
|
+
const optimistic = _chunkWQFT7GOCcjs.isOptimistic.call(void 0, ticket);
|
|
1171
1171
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1172
1172
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1173
1173
|
onToggle(ticket.id);
|
|
@@ -1195,7 +1195,7 @@ function TicketRow({
|
|
|
1195
1195
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
1196
1196
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
1197
1197
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
1198
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
1198
|
+
timeAgo: ticket.hubspot_updated_at ? _chunk3UDBK2YGcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
1199
1199
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
1200
1200
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
1201
1201
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -1205,7 +1205,7 @@ function TicketRow({
|
|
|
1205
1205
|
};
|
|
1206
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: [
|
|
1207
1207
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1208
|
-
|
|
1208
|
+
_chunk3UDBK2YGcjs.ChatTicketItem,
|
|
1209
1209
|
{
|
|
1210
1210
|
ticket: tileData,
|
|
1211
1211
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1237,8 +1237,8 @@ function TicketRow({
|
|
|
1237
1237
|
|
|
1238
1238
|
// src/components/tickets/ticket-center.tsx
|
|
1239
1239
|
|
|
1240
|
-
function TicketCenter({ toast: toast2 =
|
|
1241
|
-
const identity =
|
|
1240
|
+
function TicketCenter({ toast: toast2 = _chunkAXMNWMAUcjs.toast } = {}) {
|
|
1241
|
+
const identity = _chunk3UDBK2YGcjs.useChatIdentity.call(void 0, );
|
|
1242
1242
|
if (identity.isLoading) {
|
|
1243
1243
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1244
1244
|
}
|
|
@@ -1309,7 +1309,7 @@ function TicketCenterAuthed({
|
|
|
1309
1309
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-ods-text-secondary text-h6", children: [
|
|
1310
1310
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1311
1311
|
"Updated ",
|
|
1312
|
-
|
|
1312
|
+
_chunk3UDBK2YGcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1313
1313
|
] }),
|
|
1314
1314
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1315
1315
|
_chunkF6U2H42Lcjs.Button,
|
|
@@ -1336,11 +1336,11 @@ function TicketCenterAuthed({
|
|
|
1336
1336
|
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQRUW4UXBcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1337
1337
|
TicketRow,
|
|
1338
1338
|
{
|
|
1339
|
-
id:
|
|
1339
|
+
id: _chunk6PPEG2N4cjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1340
1340
|
ticket,
|
|
1341
1341
|
expanded: expandedTicketId === ticket.id,
|
|
1342
1342
|
onToggle: toggleRow,
|
|
1343
|
-
busy:
|
|
1343
|
+
busy: _chunkWQFT7GOCcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1344
1344
|
supportSystemDown,
|
|
1345
1345
|
onSendMessage: actions.sendMessage,
|
|
1346
1346
|
onClose: actions.closeTicket,
|
|
@@ -1394,10 +1394,10 @@ function HelpCenterCard({
|
|
|
1394
1394
|
onClearReplyError,
|
|
1395
1395
|
id
|
|
1396
1396
|
}) {
|
|
1397
|
-
const optimistic =
|
|
1397
|
+
const optimistic = _chunkWQFT7GOCcjs.isOptimistic.call(void 0, ticket);
|
|
1398
1398
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1399
1399
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1400
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1400
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunk3UDBK2YGcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1401
1401
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1402
1402
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1403
1403
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1416,7 +1416,7 @@ function HelpCenterCard({
|
|
|
1416
1416
|
});
|
|
1417
1417
|
return () => cancelAnimationFrame(raf);
|
|
1418
1418
|
}, [isExpanded]);
|
|
1419
|
-
const live =
|
|
1419
|
+
const live = _chunkWQFT7GOCcjs.useOptionalTicketLive.call(void 0, );
|
|
1420
1420
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1421
1421
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1422
1422
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1466,7 +1466,7 @@ function HelpCenterCard({
|
|
|
1466
1466
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1467
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]",
|
|
1468
1468
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1469
|
-
|
|
1469
|
+
_chunkYKKW67A3cjs.DevCardRowContent,
|
|
1470
1470
|
{
|
|
1471
1471
|
title,
|
|
1472
1472
|
subtitle,
|
|
@@ -1567,8 +1567,9 @@ function HelpCenterCreateForm({
|
|
|
1567
1567
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1568
1568
|
] });
|
|
1569
1569
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1570
|
-
|
|
1570
|
+
_chunkGLPGYU6Hcjs.ContactForm,
|
|
1571
1571
|
{
|
|
1572
|
+
rescueFormId: null,
|
|
1572
1573
|
title: "Open a new ticket",
|
|
1573
1574
|
footerText: "The support team typically responds within one business day.",
|
|
1574
1575
|
hideFields: ["name", "email", "companySize", "referralSource", "helpCategory"],
|
|
@@ -1604,30 +1605,30 @@ function HelpCenterCreateForm({
|
|
|
1604
1605
|
|
|
1605
1606
|
// src/components/tickets/help-center-list.tsx
|
|
1606
1607
|
|
|
1607
|
-
function HelpCenterList({ toast: toast2 =
|
|
1608
|
-
const identity =
|
|
1608
|
+
function HelpCenterList({ toast: toast2 = _chunkAXMNWMAUcjs.toast, backButton, title, shell } = {}) {
|
|
1609
|
+
const identity = _chunk3UDBK2YGcjs.useChatIdentity.call(void 0, );
|
|
1609
1610
|
const searchParams = _chunkSADRZ4YIcjs.useSearchParams.call(void 0, );
|
|
1610
1611
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
1611
1612
|
const pathname = _chunkSADRZ4YIcjs.usePathname.call(void 0, );
|
|
1612
|
-
const search = searchParams.get(
|
|
1613
|
+
const search = searchParams.get(_chunk6PPEG2N4cjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1613
1614
|
const status = searchParams.get("status") || "all";
|
|
1614
|
-
const ticketParam = searchParams.get(
|
|
1615
|
+
const ticketParam = searchParams.get(_chunk6PPEG2N4cjs.TICKET_OPEN_PARAM) || "";
|
|
1615
1616
|
const page = _chunkVTYP25OWcjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1616
1617
|
if (identity.isLoading) {
|
|
1617
1618
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1618
|
-
|
|
1619
|
+
_chunkYKKW67A3cjs.DevSectionPage,
|
|
1619
1620
|
{
|
|
1620
1621
|
sectionKey: "tickets",
|
|
1621
1622
|
backButton,
|
|
1622
1623
|
title,
|
|
1623
1624
|
shell,
|
|
1624
1625
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1625
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1626
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYKKW67A3cjs.DevCardRowSkeletonList, {})
|
|
1626
1627
|
}
|
|
1627
1628
|
);
|
|
1628
1629
|
}
|
|
1629
1630
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1630
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYKKW67A3cjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
1632
|
_chunk77BLJHKIcjs.EmptyState,
|
|
1632
1633
|
{
|
|
1633
1634
|
type: "generic",
|
|
@@ -1679,8 +1680,8 @@ function HelpCenterListAuthed({
|
|
|
1679
1680
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1680
1681
|
(externalId) => {
|
|
1681
1682
|
const params = new URLSearchParams(searchParams.toString());
|
|
1682
|
-
if (externalId) params.set(
|
|
1683
|
-
else params.delete(
|
|
1683
|
+
if (externalId) params.set(_chunk6PPEG2N4cjs.TICKET_OPEN_PARAM, externalId);
|
|
1684
|
+
else params.delete(_chunk6PPEG2N4cjs.TICKET_OPEN_PARAM);
|
|
1684
1685
|
const qs = params.toString();
|
|
1685
1686
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1686
1687
|
},
|
|
@@ -1737,7 +1738,7 @@ function HelpCenterListAuthed({
|
|
|
1737
1738
|
[tickets, ticketParam, setOpenTicket]
|
|
1738
1739
|
);
|
|
1739
1740
|
const merged = [...optimisticTickets, ...tickets];
|
|
1740
|
-
|
|
1741
|
+
_chunkAXMNWMAUcjs.useScrollToHash.call(void 0, tickets, { headerOffset: _chunkV2A4MAALcjs.STICKY_HEADER_OFFSET_PX });
|
|
1741
1742
|
const hasActiveFilters = search !== "" || status !== "" && status !== "all";
|
|
1742
1743
|
const hasResults = merged.length > 0;
|
|
1743
1744
|
const form = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1757,15 +1758,15 @@ function HelpCenterListAuthed({
|
|
|
1757
1758
|
] }),
|
|
1758
1759
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1759
1760
|
] }),
|
|
1760
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1761
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYKKW67A3cjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1761
1762
|
// Bridge state — background refetch in flight and the
|
|
1762
1763
|
// optimistic placeholder was just removed by the mutation
|
|
1763
1764
|
// callback. Without this branch "No tickets yet" would flash
|
|
1764
1765
|
// for ~50ms between `removeOptimistic` and the server
|
|
1765
1766
|
// response landing.
|
|
1766
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYKKW67A3cjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1767
1768
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1768
|
-
|
|
1769
|
+
_chunkYKKW67A3cjs.ListEmptyState,
|
|
1769
1770
|
{
|
|
1770
1771
|
isFiltered: hasActiveFilters,
|
|
1771
1772
|
filtered: {
|
|
@@ -1796,11 +1797,11 @@ function HelpCenterListAuthed({
|
|
|
1796
1797
|
/* @__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,
|
|
1797
1798
|
HelpCenterCard,
|
|
1798
1799
|
{
|
|
1799
|
-
id:
|
|
1800
|
+
id: _chunk6PPEG2N4cjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1800
1801
|
ticket,
|
|
1801
1802
|
expanded: expandedTicketId === ticket.id,
|
|
1802
1803
|
onToggle: toggleRow,
|
|
1803
|
-
busy:
|
|
1804
|
+
busy: _chunkWQFT7GOCcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1804
1805
|
supportSystemDown,
|
|
1805
1806
|
onSendMessage: actions.sendMessage,
|
|
1806
1807
|
onClose: actions.closeTicket,
|
|
@@ -1814,7 +1815,7 @@ function HelpCenterListAuthed({
|
|
|
1814
1815
|
) }),
|
|
1815
1816
|
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk77BLJHKIcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1816
1817
|
] });
|
|
1817
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1818
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYKKW67A3cjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1818
1819
|
}
|
|
1819
1820
|
|
|
1820
1821
|
|
|
@@ -1833,4 +1834,4 @@ function HelpCenterListAuthed({
|
|
|
1833
1834
|
|
|
1834
1835
|
|
|
1835
1836
|
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;
|
|
1836
|
-
//# sourceMappingURL=chunk-
|
|
1837
|
+
//# sourceMappingURL=chunk-3EIB5PNM.cjs.map
|