@flamingo-stack/openframe-frontend-core 0.0.685 → 0.0.686-2463.7461.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-T6KWNJDW.js → chunk-22RSJ57Z.js} +470 -465
- package/dist/chunk-22RSJ57Z.js.map +1 -0
- package/dist/{chunk-65KTXRBY.js → chunk-2G2CB7ZZ.js} +6 -6
- package/dist/{chunk-K2HZG4RM.cjs → chunk-2OD2PPNO.cjs} +32 -32
- package/dist/{chunk-K2HZG4RM.cjs.map → chunk-2OD2PPNO.cjs.map} +1 -1
- package/dist/{chunk-HMXUOLZR.cjs → chunk-3DO76UAB.cjs} +20 -20
- package/dist/{chunk-HMXUOLZR.cjs.map → chunk-3DO76UAB.cjs.map} +1 -1
- package/dist/{chunk-XW7MUIW4.js → chunk-3NIZ2VLQ.js} +3 -3
- package/dist/{chunk-5LJZPJHX.cjs → chunk-4LBCUBVL.cjs} +59 -59
- package/dist/{chunk-5LJZPJHX.cjs.map → chunk-4LBCUBVL.cjs.map} +1 -1
- package/dist/{chunk-ZF4Z36G4.js → chunk-4RJQMOQW.js} +7 -7
- package/dist/{chunk-TJI5V5BR.cjs → chunk-AF4XOURN.cjs} +7 -7
- package/dist/{chunk-TJI5V5BR.cjs.map → chunk-AF4XOURN.cjs.map} +1 -1
- package/dist/{chunk-7XF63THA.js → chunk-ASBBGP36.js} +6 -6
- package/dist/{chunk-O7LOZW4R.js → chunk-C5TFPMOM.js} +5 -5
- package/dist/{chunk-CMQXPD5C.cjs → chunk-GETQTNRV.cjs} +28 -28
- package/dist/{chunk-CMQXPD5C.cjs.map → chunk-GETQTNRV.cjs.map} +1 -1
- package/dist/{chunk-TUG7IT6H.js → chunk-HLEXYTOE.js} +2 -2
- package/dist/{chunk-M4HYIXP6.cjs → chunk-IBUFFKAK.cjs} +399 -383
- package/dist/chunk-IBUFFKAK.cjs.map +1 -0
- package/dist/{chunk-GXV6UEVY.js → chunk-IELOPDTA.js} +3 -3
- package/dist/{chunk-T4DUTP5C.cjs → chunk-II5GVLTN.cjs} +5 -5
- package/dist/{chunk-T4DUTP5C.cjs.map → chunk-II5GVLTN.cjs.map} +1 -1
- package/dist/{chunk-B32YLOYQ.js → chunk-JBJZL5PI.js} +4 -4
- package/dist/{chunk-UT333EOT.js → chunk-LCOMNQLX.js} +4 -4
- package/dist/{chunk-VDPCK437.js → chunk-MHTB67ZH.js} +21 -5
- package/dist/{chunk-VDPCK437.js.map → chunk-MHTB67ZH.js.map} +1 -1
- package/dist/{chunk-EFBMNVSH.cjs → chunk-MZAZUSPQ.cjs} +15 -15
- package/dist/{chunk-EFBMNVSH.cjs.map → chunk-MZAZUSPQ.cjs.map} +1 -1
- package/dist/{chunk-C3B36OYZ.cjs → chunk-N3I53B5W.cjs} +3 -3
- package/dist/{chunk-C3B36OYZ.cjs.map → chunk-N3I53B5W.cjs.map} +1 -1
- package/dist/{chunk-WJK2EETW.js → chunk-NINO3PI7.js} +2 -2
- package/dist/{chunk-YCTVLN47.cjs → chunk-P4SBHO7U.cjs} +10 -10
- package/dist/{chunk-YCTVLN47.cjs.map → chunk-P4SBHO7U.cjs.map} +1 -1
- package/dist/{chunk-PSQKD6ZN.js → chunk-PG65AE3I.js} +3 -3
- package/dist/{chunk-DQOQ3KTP.cjs → chunk-QNWQQ4RT.cjs} +78 -73
- package/dist/chunk-QNWQQ4RT.cjs.map +1 -0
- package/dist/{chunk-BZ2XOEHW.js → chunk-QOH45QSE.js} +3 -3
- package/dist/{chunk-DWXWEGGO.cjs → chunk-QTXDXHMD.cjs} +22 -22
- package/dist/{chunk-DWXWEGGO.cjs.map → chunk-QTXDXHMD.cjs.map} +1 -1
- package/dist/{chunk-B25CF3PO.cjs → chunk-RBCMBRI7.cjs} +30 -30
- package/dist/{chunk-B25CF3PO.cjs.map → chunk-RBCMBRI7.cjs.map} +1 -1
- package/dist/{chunk-QHLJSB2J.cjs → chunk-RKH7DEDF.cjs} +12 -12
- package/dist/{chunk-QHLJSB2J.cjs.map → chunk-RKH7DEDF.cjs.map} +1 -1
- package/dist/{chunk-Y7ZYOQNB.js → chunk-RSMAVO2Z.js} +3 -3
- package/dist/{chunk-A3CSQB4A.cjs → chunk-SI77HF4U.cjs} +1247 -805
- package/dist/chunk-SI77HF4U.cjs.map +1 -0
- package/dist/{chunk-GHLGXFNU.js → chunk-U6JC3RS2.js} +3 -3
- package/dist/{chunk-B5N3AHPG.cjs → chunk-UBXEETWQ.cjs} +81 -81
- package/dist/{chunk-B5N3AHPG.cjs.map → chunk-UBXEETWQ.cjs.map} +1 -1
- package/dist/{chunk-N4Z6X5BV.js → chunk-WFH52OVQ.js} +5 -5
- package/dist/{chunk-U3IXG7TR.cjs → chunk-WJX3ZSOE.cjs} +33 -33
- package/dist/{chunk-U3IXG7TR.cjs.map → chunk-WJX3ZSOE.cjs.map} +1 -1
- package/dist/{chunk-XGX6JSEU.js → chunk-YPXXXX6R.js} +2086 -1644
- package/dist/chunk-YPXXXX6R.js.map +1 -0
- package/dist/{chunk-P2ASEPA2.cjs → chunk-ZS3YCJYY.cjs} +6 -6
- package/dist/{chunk-P2ASEPA2.cjs.map → chunk-ZS3YCJYY.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/ai-assistant-info.d.ts.map +1 -1
- package/dist/components/chat/approval-request-message.d.ts.map +1 -1
- package/dist/components/chat/chat-appearance-context.d.ts +9 -0
- package/dist/components/chat/chat-appearance-context.d.ts.map +1 -0
- package/dist/components/chat/chat-input.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/chat-nav-sidebar.d.ts +50 -0
- package/dist/components/chat/chat-nav-sidebar.d.ts.map +1 -0
- package/dist/components/chat/chat-top-navigation.d.ts +29 -0
- package/dist/components/chat/chat-top-navigation.d.ts.map +1 -0
- package/dist/components/chat/error-message-display.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +21 -3
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +6 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +20 -2
- package/dist/components/chat/msp-organization-card.d.ts +7 -1
- package/dist/components/chat/msp-organization-card.d.ts.map +1 -1
- package/dist/components/chat/onboarding-carousel.d.ts +29 -0
- package/dist/components/chat/onboarding-carousel.d.ts.map +1 -0
- package/dist/components/chat/system-event-message.d.ts +14 -0
- package/dist/components/chat/system-event-message.d.ts.map +1 -0
- package/dist/components/chat/types/chat.types.d.ts +13 -0
- package/dist/components/chat/types/chat.types.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +20 -1
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/docs/index.js +7 -7
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/help-center-pages/index.cjs +91 -91
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +73 -55
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +33 -15
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +41 -41
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/navigation/index.js +6 -6
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/avatar-stack.d.ts +5 -1
- package/dist/components/ui/avatar-stack.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +22 -4
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +21 -3
- package/dist/components/ui/reopen-ticket-request-modal.d.ts +4 -1
- package/dist/components/ui/reopen-ticket-request-modal.d.ts.map +1 -1
- package/dist/components/ui/tab-navigation.d.ts +7 -0
- package/dist/components/ui/tab-navigation.d.ts.map +1 -1
- package/dist/index.cjs +27 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/__tests__/chat-appearance.test.tsx +79 -0
- package/src/components/chat/__tests__/onboarding-carousel.test.tsx +56 -0
- package/src/components/chat/ai-assistant-info.tsx +7 -1
- package/src/components/chat/approval-request-message.tsx +6 -1
- package/src/components/chat/chat-appearance-context.tsx +15 -0
- package/src/components/chat/chat-input.tsx +26 -1
- package/src/components/chat/chat-message-enhanced.tsx +180 -142
- package/src/components/chat/chat-message-list.tsx +169 -164
- package/src/components/chat/chat-nav-sidebar.tsx +163 -0
- package/src/components/chat/chat-top-navigation.tsx +109 -0
- package/src/components/chat/error-message-display.tsx +21 -3
- package/src/components/chat/index.ts +6 -0
- package/src/components/chat/msp-organization-card.tsx +35 -0
- package/src/components/chat/onboarding-carousel.tsx +162 -0
- package/src/components/chat/system-event-message.tsx +54 -0
- package/src/components/chat/types/chat.types.ts +15 -0
- package/src/components/chat/types/component.types.ts +20 -0
- package/src/components/ui/__tests__/avatar-stack.test.tsx +25 -0
- package/src/components/ui/__tests__/tab-navigation.test.tsx +56 -2
- package/src/components/ui/avatar-stack.tsx +15 -5
- package/src/components/ui/reopen-ticket-request-modal.tsx +6 -2
- package/src/components/ui/tab-navigation.tsx +23 -0
- package/src/stories/FaeLayoutV2.stories.tsx +150 -0
- package/src/stories/FaeOnboardingV2.stories.tsx +68 -0
- package/src/stories/FaeThreadV2.stories.tsx +192 -0
- package/src/stories/fae-brand-decorator.tsx +28 -0
- package/src/styles/ods-colors.css +10 -0
- package/src/styles/ods-effects.css +13 -0
- package/dist/chunk-A3CSQB4A.cjs.map +0 -1
- package/dist/chunk-DQOQ3KTP.cjs.map +0 -1
- package/dist/chunk-M4HYIXP6.cjs.map +0 -1
- package/dist/chunk-T6KWNJDW.js.map +0 -1
- package/dist/chunk-XGX6JSEU.js.map +0 -1
- /package/dist/{chunk-65KTXRBY.js.map → chunk-2G2CB7ZZ.js.map} +0 -0
- /package/dist/{chunk-XW7MUIW4.js.map → chunk-3NIZ2VLQ.js.map} +0 -0
- /package/dist/{chunk-ZF4Z36G4.js.map → chunk-4RJQMOQW.js.map} +0 -0
- /package/dist/{chunk-7XF63THA.js.map → chunk-ASBBGP36.js.map} +0 -0
- /package/dist/{chunk-O7LOZW4R.js.map → chunk-C5TFPMOM.js.map} +0 -0
- /package/dist/{chunk-TUG7IT6H.js.map → chunk-HLEXYTOE.js.map} +0 -0
- /package/dist/{chunk-GXV6UEVY.js.map → chunk-IELOPDTA.js.map} +0 -0
- /package/dist/{chunk-B32YLOYQ.js.map → chunk-JBJZL5PI.js.map} +0 -0
- /package/dist/{chunk-UT333EOT.js.map → chunk-LCOMNQLX.js.map} +0 -0
- /package/dist/{chunk-WJK2EETW.js.map → chunk-NINO3PI7.js.map} +0 -0
- /package/dist/{chunk-PSQKD6ZN.js.map → chunk-PG65AE3I.js.map} +0 -0
- /package/dist/{chunk-BZ2XOEHW.js.map → chunk-QOH45QSE.js.map} +0 -0
- /package/dist/{chunk-Y7ZYOQNB.js.map → chunk-RSMAVO2Z.js.map} +0 -0
- /package/dist/{chunk-GHLGXFNU.js.map → chunk-U6JC3RS2.js.map} +0 -0
- /package/dist/{chunk-N4Z6X5BV.js.map → chunk-WFH52OVQ.js.map} +0 -0
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
StatusFilterComponent,
|
|
11
11
|
TASK_TYPE_LABELS,
|
|
12
12
|
TASK_TYPE_TEXT_COLORS
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MHTB67ZH.js";
|
|
14
14
|
import {
|
|
15
15
|
usePathname,
|
|
16
16
|
useRouter,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
AvatarStack,
|
|
21
21
|
StatusBadge,
|
|
22
22
|
getStatusColorScheme
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-22RSJ57Z.js";
|
|
24
24
|
import {
|
|
25
25
|
next_link_default
|
|
26
26
|
} from "./chunk-BTROSBHF.js";
|
|
@@ -302,4 +302,4 @@ export {
|
|
|
302
302
|
DevCardRowSkeletonList,
|
|
303
303
|
DeliveryRow
|
|
304
304
|
};
|
|
305
|
-
//# sourceMappingURL=chunk-
|
|
305
|
+
//# sourceMappingURL=chunk-U6JC3RS2.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 _chunkQTXDXHMDcjs = require('./chunk-QTXDXHMD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkMZAZUSPQcjs = require('./chunk-MZAZUSPQ.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ var _chunkNMXL34Z2cjs = require('./chunk-NMXL34Z2.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkII5GVLTNcjs = require('./chunk-II5GVLTN.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -35,7 +35,7 @@ var _chunkT4DUTP5Ccjs = require('./chunk-T4DUTP5C.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkIBUFFKAKcjs = require('./chunk-IBUFFKAK.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
@@ -55,7 +55,7 @@ var _chunkJGVJRUGBcjs = require('./chunk-JGVJRUGB.cjs');
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkSI77HF4Ucjs = require('./chunk-SI77HF4U.cjs');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
@@ -70,7 +70,7 @@ var _chunkSADRZ4YIcjs = require('./chunk-SADRZ4YI.cjs');
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
var
|
|
73
|
+
var _chunkQNWQQ4RTcjs = require('./chunk-QNWQQ4RT.cjs');
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
var _chunkYCKGUQA2cjs = require('./chunk-YCKGUQA2.cjs');
|
|
@@ -113,7 +113,7 @@ var TicketActionFailure = class extends Error {
|
|
|
113
113
|
function useTicketActions(options) {
|
|
114
114
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
115
115
|
const ticketActionEndpoint = _nullishCoalesce(_chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
116
|
-
const ticketLive =
|
|
116
|
+
const ticketLive = _chunkII5GVLTNcjs.useOptionalTicketLive.call(void 0, );
|
|
117
117
|
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _2 => _2.notifyTicketCreated]);
|
|
118
118
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
119
119
|
const formInFlightRef = _react.useRef.call(void 0, null);
|
|
@@ -274,10 +274,10 @@ function useTicketActions(options) {
|
|
|
274
274
|
..._optionalChain([input, 'access', _3 => _3.attachments, 'optionalAccess', _4 => _4.length]) ? { attachments: input.attachments } : {}
|
|
275
275
|
});
|
|
276
276
|
if (result.mirror_synced === false) {
|
|
277
|
-
toast2(
|
|
277
|
+
toast2(_chunkII5GVLTNcjs.TOAST_COPY.open_mirror_pending);
|
|
278
278
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
279
279
|
} else {
|
|
280
|
-
toast2(
|
|
280
|
+
toast2(_chunkII5GVLTNcjs.TOAST_COPY.open_success);
|
|
281
281
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
282
282
|
removeOptimistic(placeholderId);
|
|
283
283
|
}
|
|
@@ -363,7 +363,7 @@ function useTicketActions(options) {
|
|
|
363
363
|
...hasText ? { content_addendum: trimmed } : {},
|
|
364
364
|
...hasFiles ? { attachments } : {}
|
|
365
365
|
},
|
|
366
|
-
|
|
366
|
+
_chunkII5GVLTNcjs.TOAST_COPY.comment_success,
|
|
367
367
|
"send message"
|
|
368
368
|
);
|
|
369
369
|
if (ok) {
|
|
@@ -386,13 +386,13 @@ function useTicketActions(options) {
|
|
|
386
386
|
status: "CLOSED",
|
|
387
387
|
..._optionalChain([resolution, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ? { resolution: resolution.trim() } : {}
|
|
388
388
|
},
|
|
389
|
-
|
|
389
|
+
_chunkII5GVLTNcjs.TOAST_COPY.close_success,
|
|
390
390
|
"close ticket"
|
|
391
391
|
),
|
|
392
392
|
[updateTicket]
|
|
393
393
|
);
|
|
394
394
|
const reopenTicket = _react.useCallback.call(void 0,
|
|
395
|
-
(ticket) => updateTicket(ticket, { status: "OPEN" },
|
|
395
|
+
(ticket) => updateTicket(ticket, { status: "OPEN" }, _chunkII5GVLTNcjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
396
396
|
[updateTicket]
|
|
397
397
|
);
|
|
398
398
|
return _react.useMemo.call(void 0,
|
|
@@ -607,14 +607,14 @@ function useTicketsList(filters) {
|
|
|
607
607
|
// src/components/tickets/ticket-open-form.tsx
|
|
608
608
|
|
|
609
609
|
var _jsxruntime = require('react/jsx-runtime');
|
|
610
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
610
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunkII5GVLTNcjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
611
611
|
function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
612
612
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
613
613
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
614
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
614
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkSI77HF4Ucjs.useChatAttachments.call(void 0, );
|
|
615
615
|
const trimmedSubject = subject.trim();
|
|
616
616
|
const trimmedContent = content.trim();
|
|
617
|
-
const overCap = content.length >
|
|
617
|
+
const overCap = content.length > _chunkII5GVLTNcjs.TICKET_TEXT_MAX_CHARS;
|
|
618
618
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
619
619
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
620
620
|
const handleSubmit = async (e) => {
|
|
@@ -631,7 +631,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
631
631
|
clear();
|
|
632
632
|
}
|
|
633
633
|
};
|
|
634
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
634
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQNWQQ4RTcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ..._chunkIBUFFKAKcjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
635
635
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1 md:max-w-md", children: [
|
|
636
636
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-ods-text-primary text-h2", children: "Need Support?" }),
|
|
637
637
|
/* @__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." }),
|
|
@@ -656,7 +656,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
656
656
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
657
657
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-content", className: "mb-1 block text-ods-text-primary text-h6", children: "Your Message" }),
|
|
658
658
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
659
|
-
|
|
659
|
+
_chunkIBUFFKAKcjs.Textarea,
|
|
660
660
|
{
|
|
661
661
|
id: "ticket-content",
|
|
662
662
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -670,11 +670,11 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
670
670
|
showCounter && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: `mt-1 text-right text-h6 ${overCap ? "text-ods-error" : "text-ods-text-secondary"}`, children: [
|
|
671
671
|
content.length,
|
|
672
672
|
"/",
|
|
673
|
-
|
|
673
|
+
_chunkII5GVLTNcjs.TICKET_TEXT_MAX_CHARS
|
|
674
674
|
] })
|
|
675
675
|
] }),
|
|
676
676
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
677
|
-
|
|
677
|
+
_chunkSI77HF4Ucjs.ChatAttachmentChipStrip,
|
|
678
678
|
{
|
|
679
679
|
attachments,
|
|
680
680
|
onRemove: removeAttachment,
|
|
@@ -683,7 +683,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
683
683
|
),
|
|
684
684
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
685
685
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
686
|
-
|
|
686
|
+
_chunkSI77HF4Ucjs.ChatAttachmentAddButton,
|
|
687
687
|
{
|
|
688
688
|
attachmentsEnabled: !supportSystemDown,
|
|
689
689
|
attachmentsCount: attachments.length,
|
|
@@ -713,7 +713,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
713
713
|
|
|
714
714
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
715
715
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
716
|
-
const identity =
|
|
716
|
+
const identity = _chunkSI77HF4Ucjs.useChatIdentity.call(void 0, );
|
|
717
717
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]), () => ( "anon"));
|
|
718
718
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
719
719
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -786,7 +786,7 @@ function TicketLinkedDeliveryCard({ clickup, className }) {
|
|
|
786
786
|
dateClosed: clickup.date_closed,
|
|
787
787
|
clickupUrl: _nullishCoalesce(clickup.clickup_url, () => ( ""))
|
|
788
788
|
};
|
|
789
|
-
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,
|
|
789
|
+
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, _chunkMZAZUSPQcjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
790
790
|
}
|
|
791
791
|
|
|
792
792
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -801,7 +801,7 @@ function TicketReplyComposer({
|
|
|
801
801
|
}) {
|
|
802
802
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
803
803
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
804
|
-
const attachments =
|
|
804
|
+
const attachments = _chunkSI77HF4Ucjs.useChatAttachments.call(void 0, );
|
|
805
805
|
const { readyAttachments, clear: clearAttachments } = attachments;
|
|
806
806
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
807
807
|
const hasReadyFiles = readyAttachments.length > 0;
|
|
@@ -822,7 +822,7 @@ function TicketReplyComposer({
|
|
|
822
822
|
const disabled = busy || supportSystemDown;
|
|
823
823
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
824
824
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
825
|
-
|
|
825
|
+
_chunkSI77HF4Ucjs.ChatAttachmentChipStrip,
|
|
826
826
|
{
|
|
827
827
|
attachments: attachments.attachments,
|
|
828
828
|
onRemove: attachments.removeAttachment,
|
|
@@ -831,7 +831,7 @@ function TicketReplyComposer({
|
|
|
831
831
|
}
|
|
832
832
|
),
|
|
833
833
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
834
|
-
|
|
834
|
+
_chunkSI77HF4Ucjs.ChatInput,
|
|
835
835
|
{
|
|
836
836
|
fullWidth: true,
|
|
837
837
|
autoFocus: true,
|
|
@@ -839,13 +839,13 @@ function TicketReplyComposer({
|
|
|
839
839
|
sending: busy || attachments.hasInflightUploads,
|
|
840
840
|
disabled: supportSystemDown,
|
|
841
841
|
allowEmptySend: hasReadyFiles,
|
|
842
|
-
maxLength:
|
|
842
|
+
maxLength: _chunkII5GVLTNcjs.TICKET_TEXT_MAX_CHARS,
|
|
843
843
|
onSend: handleSend
|
|
844
844
|
}
|
|
845
845
|
),
|
|
846
846
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-2", children: [
|
|
847
847
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
848
|
-
|
|
848
|
+
_chunkSI77HF4Ucjs.ChatAttachmentAddButton,
|
|
849
849
|
{
|
|
850
850
|
attachmentsEnabled: true,
|
|
851
851
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -868,25 +868,25 @@ function TicketReplyComposer({
|
|
|
868
868
|
}
|
|
869
869
|
)
|
|
870
870
|
] }),
|
|
871
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
872
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
873
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
874
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
871
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIBUFFKAKcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkIBUFFKAKcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
872
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkIBUFFKAKcjs.AlertDialogHeader, { children: [
|
|
873
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIBUFFKAKcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
874
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIBUFFKAKcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
875
875
|
] }),
|
|
876
876
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
877
|
-
|
|
877
|
+
_chunkIBUFFKAKcjs.Textarea,
|
|
878
878
|
{
|
|
879
879
|
value: resolution,
|
|
880
880
|
onChange: (e) => setResolution(e.target.value),
|
|
881
881
|
placeholder: "Resolution (optional)",
|
|
882
882
|
rows: 3,
|
|
883
|
-
maxLength:
|
|
883
|
+
maxLength: _chunkII5GVLTNcjs.TICKET_TEXT_MAX_CHARS,
|
|
884
884
|
className: "mt-2"
|
|
885
885
|
}
|
|
886
886
|
),
|
|
887
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
887
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkIBUFFKAKcjs.AlertDialogFooter, { children: [
|
|
888
888
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
889
|
-
|
|
889
|
+
_chunkIBUFFKAKcjs.AlertDialogCancel,
|
|
890
890
|
{
|
|
891
891
|
disabled: busy,
|
|
892
892
|
className: "border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-border",
|
|
@@ -894,7 +894,7 @@ function TicketReplyComposer({
|
|
|
894
894
|
}
|
|
895
895
|
),
|
|
896
896
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
897
|
-
|
|
897
|
+
_chunkIBUFFKAKcjs.AlertDialogAction,
|
|
898
898
|
{
|
|
899
899
|
onClick: () => void confirmClose(),
|
|
900
900
|
disabled: busy,
|
|
@@ -956,10 +956,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
956
956
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
957
957
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
958
958
|
function TicketTimelinePanel({ ticket }) {
|
|
959
|
-
const identity =
|
|
960
|
-
const externalId =
|
|
959
|
+
const identity = _chunkSI77HF4Ucjs.useChatIdentity.call(void 0, );
|
|
960
|
+
const externalId = _chunkII5GVLTNcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
961
961
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
962
|
-
const live =
|
|
962
|
+
const live = _chunkII5GVLTNcjs.useOptionalTicketLive.call(void 0, );
|
|
963
963
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _25 => _25.setOpenTicketId]);
|
|
964
964
|
const markRead = _optionalChain([live, 'optionalAccess', _26 => _26.markRead]);
|
|
965
965
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -983,7 +983,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
983
983
|
markReadDebounceRef.current = setTimeout(() => {
|
|
984
984
|
markReadDebounceRef.current = null;
|
|
985
985
|
void markRead(externalId);
|
|
986
|
-
},
|
|
986
|
+
}, _chunkII5GVLTNcjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
987
987
|
}, [engagementsCount, externalId, markRead]);
|
|
988
988
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
989
989
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -998,7 +998,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
998
998
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _40 => _40.user, 'optionalAccess', _41 => _41.email]) || "You";
|
|
999
999
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _42 => _42.user, 'optionalAccess', _43 => _43.avatarUrl]), () => ( void 0)) : void 0;
|
|
1000
1000
|
if (isLoading) {
|
|
1001
|
-
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,
|
|
1001
|
+
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, _chunkSI77HF4Ucjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1002
1002
|
}
|
|
1003
1003
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1004
1004
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1017,7 +1017,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1017
1017
|
const isResolution = turn.startsWith("[Resolution]");
|
|
1018
1018
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
1019
1019
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1020
|
-
|
|
1020
|
+
_chunkSI77HF4Ucjs.ChatMessageRow,
|
|
1021
1021
|
{
|
|
1022
1022
|
displayName: customerName,
|
|
1023
1023
|
avatarUrl: customerAvatar,
|
|
@@ -1046,13 +1046,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
1048
1048
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1049
|
-
|
|
1049
|
+
_chunkSI77HF4Ucjs.ChatMessageRow,
|
|
1050
1050
|
{
|
|
1051
1051
|
displayName: author,
|
|
1052
1052
|
avatarUrl: avatarSrc,
|
|
1053
|
-
timeLabel: eng.createdAt ?
|
|
1053
|
+
timeLabel: eng.createdAt ? _chunkSI77HF4Ucjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1054
1054
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1055
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1055
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIBUFFKAKcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1056
1056
|
},
|
|
1057
1057
|
eng.id
|
|
1058
1058
|
);
|
|
@@ -1137,7 +1137,7 @@ function AssignedAgentRow({ assignedOwner }) {
|
|
|
1137
1137
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary text-h5", children: "Assigned to" }),
|
|
1138
1138
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 font-medium text-ods-text-primary", children: [
|
|
1139
1139
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1140
|
-
|
|
1140
|
+
_chunkQNWQQ4RTcjs.SquareAvatar,
|
|
1141
1141
|
{
|
|
1142
1142
|
size: "sm",
|
|
1143
1143
|
variant: "round",
|
|
@@ -1165,7 +1165,7 @@ function TicketRow({
|
|
|
1165
1165
|
onActionCollapsed,
|
|
1166
1166
|
id
|
|
1167
1167
|
}) {
|
|
1168
|
-
const optimistic =
|
|
1168
|
+
const optimistic = _chunkII5GVLTNcjs.isOptimistic.call(void 0, ticket);
|
|
1169
1169
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1170
1170
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1171
1171
|
onToggle(ticket.id);
|
|
@@ -1193,7 +1193,7 @@ function TicketRow({
|
|
|
1193
1193
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
1194
1194
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
1195
1195
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
1196
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
1196
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkSI77HF4Ucjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
1197
1197
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
1198
1198
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
1199
1199
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -1203,7 +1203,7 @@ function TicketRow({
|
|
|
1203
1203
|
};
|
|
1204
1204
|
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: [
|
|
1205
1205
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1206
|
-
|
|
1206
|
+
_chunkSI77HF4Ucjs.ChatTicketItem,
|
|
1207
1207
|
{
|
|
1208
1208
|
ticket: tileData,
|
|
1209
1209
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1236,7 +1236,7 @@ function TicketRow({
|
|
|
1236
1236
|
// src/components/tickets/ticket-center.tsx
|
|
1237
1237
|
|
|
1238
1238
|
function TicketCenter({ toast: toast2 = _chunkXF5TJ4P2cjs.toast } = {}) {
|
|
1239
|
-
const identity =
|
|
1239
|
+
const identity = _chunkSI77HF4Ucjs.useChatIdentity.call(void 0, );
|
|
1240
1240
|
if (identity.isLoading) {
|
|
1241
1241
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1242
1242
|
}
|
|
@@ -1307,7 +1307,7 @@ function TicketCenterAuthed({
|
|
|
1307
1307
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-ods-text-secondary text-h6", children: [
|
|
1308
1308
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1309
1309
|
"Updated ",
|
|
1310
|
-
|
|
1310
|
+
_chunkSI77HF4Ucjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1311
1311
|
] }),
|
|
1312
1312
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1313
1313
|
_chunkF6U2H42Lcjs.Button,
|
|
@@ -1323,7 +1323,7 @@ function TicketCenterAuthed({
|
|
|
1323
1323
|
)
|
|
1324
1324
|
] })
|
|
1325
1325
|
] }),
|
|
1326
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1326
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQNWQQ4RTcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1327
1327
|
_chunkNMXL34Z2cjs.EmptyState,
|
|
1328
1328
|
{
|
|
1329
1329
|
type: "generic",
|
|
@@ -1331,14 +1331,14 @@ function TicketCenterAuthed({
|
|
|
1331
1331
|
description: "Open one above to start the conversation.",
|
|
1332
1332
|
showCTA: false
|
|
1333
1333
|
}
|
|
1334
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1334
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQNWQQ4RTcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1335
1335
|
TicketRow,
|
|
1336
1336
|
{
|
|
1337
|
-
id:
|
|
1337
|
+
id: _chunkIBUFFKAKcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1338
1338
|
ticket,
|
|
1339
1339
|
expanded: expandedTicketId === ticket.id,
|
|
1340
1340
|
onToggle: toggleRow,
|
|
1341
|
-
busy:
|
|
1341
|
+
busy: _chunkII5GVLTNcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1342
1342
|
supportSystemDown,
|
|
1343
1343
|
onSendMessage: actions.sendMessage,
|
|
1344
1344
|
onClose: actions.closeTicket,
|
|
@@ -1352,7 +1352,7 @@ function TicketCenterAuthed({
|
|
|
1352
1352
|
}
|
|
1353
1353
|
function TicketCenterSkeleton() {
|
|
1354
1354
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1355
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1355
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkQNWQQ4RTcjs.Card, { className: "p-6", children: [
|
|
1356
1356
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKWX65373cjs.Skeleton, { className: "mb-4 h-7 w-48" }),
|
|
1357
1357
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKWX65373cjs.Skeleton, { className: "mb-3 h-10 w-full" }),
|
|
1358
1358
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKWX65373cjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1361,7 +1361,7 @@ function TicketCenterSkeleton() {
|
|
|
1361
1361
|
] });
|
|
1362
1362
|
}
|
|
1363
1363
|
function TicketListSkeleton() {
|
|
1364
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1364
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQNWQQ4RTcjs.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: [
|
|
1365
1365
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
1366
1366
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKWX65373cjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1367
1367
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKWX65373cjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1392,10 +1392,10 @@ function HelpCenterCard({
|
|
|
1392
1392
|
onClearReplyError,
|
|
1393
1393
|
id
|
|
1394
1394
|
}) {
|
|
1395
|
-
const optimistic =
|
|
1395
|
+
const optimistic = _chunkII5GVLTNcjs.isOptimistic.call(void 0, ticket);
|
|
1396
1396
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1397
1397
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1398
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1398
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkSI77HF4Ucjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1399
1399
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1400
1400
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1401
1401
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1414,11 +1414,11 @@ function HelpCenterCard({
|
|
|
1414
1414
|
});
|
|
1415
1415
|
return () => cancelAnimationFrame(raf);
|
|
1416
1416
|
}, [isExpanded]);
|
|
1417
|
-
const live =
|
|
1417
|
+
const live = _chunkII5GVLTNcjs.useOptionalTicketLive.call(void 0, );
|
|
1418
1418
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1419
1419
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1420
1420
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1421
|
-
|
|
1421
|
+
_chunkQNWQQ4RTcjs.StatusBadge,
|
|
1422
1422
|
{
|
|
1423
1423
|
text: `${unreadCount} NEW`,
|
|
1424
1424
|
colorScheme: "warning",
|
|
@@ -1427,16 +1427,16 @@ function HelpCenterCard({
|
|
|
1427
1427
|
}
|
|
1428
1428
|
),
|
|
1429
1429
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1430
|
-
|
|
1430
|
+
_chunkQNWQQ4RTcjs.StatusBadge,
|
|
1431
1431
|
{
|
|
1432
1432
|
text: rawStatus,
|
|
1433
|
-
colorScheme:
|
|
1433
|
+
colorScheme: _chunkQNWQQ4RTcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1434
1434
|
variant: "card",
|
|
1435
1435
|
className: "border border-ods-border"
|
|
1436
1436
|
}
|
|
1437
1437
|
),
|
|
1438
1438
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1439
|
-
|
|
1439
|
+
_chunkQNWQQ4RTcjs.StatusBadge,
|
|
1440
1440
|
{
|
|
1441
1441
|
text: priority,
|
|
1442
1442
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1464,7 +1464,7 @@ function HelpCenterCard({
|
|
|
1464
1464
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1465
1465
|
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]",
|
|
1466
1466
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1467
|
-
|
|
1467
|
+
_chunkMZAZUSPQcjs.DevCardRowContent,
|
|
1468
1468
|
{
|
|
1469
1469
|
title,
|
|
1470
1470
|
subtitle,
|
|
@@ -1565,7 +1565,7 @@ function HelpCenterCreateForm({
|
|
|
1565
1565
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1566
1566
|
] });
|
|
1567
1567
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1568
|
-
|
|
1568
|
+
_chunkQTXDXHMDcjs.ContactForm,
|
|
1569
1569
|
{
|
|
1570
1570
|
rescue: null,
|
|
1571
1571
|
title: "Open a new ticket",
|
|
@@ -1604,29 +1604,29 @@ function HelpCenterCreateForm({
|
|
|
1604
1604
|
// src/components/tickets/help-center-list.tsx
|
|
1605
1605
|
|
|
1606
1606
|
function HelpCenterList({ toast: toast2 = _chunkXF5TJ4P2cjs.toast, backButton, title, shell } = {}) {
|
|
1607
|
-
const identity =
|
|
1607
|
+
const identity = _chunkSI77HF4Ucjs.useChatIdentity.call(void 0, );
|
|
1608
1608
|
const searchParams = _chunkSADRZ4YIcjs.useSearchParams.call(void 0, );
|
|
1609
1609
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
1610
1610
|
const pathname = _chunkSADRZ4YIcjs.usePathname.call(void 0, );
|
|
1611
|
-
const search = searchParams.get(
|
|
1611
|
+
const search = searchParams.get(_chunkIBUFFKAKcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1612
1612
|
const status = searchParams.get("status") || "all";
|
|
1613
|
-
const ticketParam = searchParams.get(
|
|
1613
|
+
const ticketParam = searchParams.get(_chunkIBUFFKAKcjs.TICKET_OPEN_PARAM) || "";
|
|
1614
1614
|
const page = _chunkJGVJRUGBcjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1615
1615
|
if (identity.isLoading) {
|
|
1616
1616
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1617
|
-
|
|
1617
|
+
_chunkMZAZUSPQcjs.DevSectionPage,
|
|
1618
1618
|
{
|
|
1619
1619
|
sectionKey: "tickets",
|
|
1620
1620
|
backButton,
|
|
1621
1621
|
title,
|
|
1622
1622
|
shell,
|
|
1623
1623
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1624
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1624
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMZAZUSPQcjs.DevCardRowSkeletonList, {})
|
|
1625
1625
|
}
|
|
1626
1626
|
);
|
|
1627
1627
|
}
|
|
1628
1628
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1629
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1629
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMZAZUSPQcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1630
1630
|
_chunkNMXL34Z2cjs.EmptyState,
|
|
1631
1631
|
{
|
|
1632
1632
|
type: "generic",
|
|
@@ -1678,8 +1678,8 @@ function HelpCenterListAuthed({
|
|
|
1678
1678
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1679
1679
|
(externalId) => {
|
|
1680
1680
|
const params = new URLSearchParams(searchParams.toString());
|
|
1681
|
-
if (externalId) params.set(
|
|
1682
|
-
else params.delete(
|
|
1681
|
+
if (externalId) params.set(_chunkIBUFFKAKcjs.TICKET_OPEN_PARAM, externalId);
|
|
1682
|
+
else params.delete(_chunkIBUFFKAKcjs.TICKET_OPEN_PARAM);
|
|
1683
1683
|
const qs = params.toString();
|
|
1684
1684
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1685
1685
|
},
|
|
@@ -1756,15 +1756,15 @@ function HelpCenterListAuthed({
|
|
|
1756
1756
|
] }),
|
|
1757
1757
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1758
1758
|
] }),
|
|
1759
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1759
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMZAZUSPQcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1760
1760
|
// Bridge state — background refetch in flight and the
|
|
1761
1761
|
// optimistic placeholder was just removed by the mutation
|
|
1762
1762
|
// callback. Without this branch "No tickets yet" would flash
|
|
1763
1763
|
// for ~50ms between `removeOptimistic` and the server
|
|
1764
1764
|
// response landing.
|
|
1765
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1765
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMZAZUSPQcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1766
1766
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1767
|
-
|
|
1767
|
+
_chunkMZAZUSPQcjs.ListEmptyState,
|
|
1768
1768
|
{
|
|
1769
1769
|
isFiltered: hasActiveFilters,
|
|
1770
1770
|
filtered: {
|
|
@@ -1795,11 +1795,11 @@ function HelpCenterListAuthed({
|
|
|
1795
1795
|
/* @__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,
|
|
1796
1796
|
HelpCenterCard,
|
|
1797
1797
|
{
|
|
1798
|
-
id:
|
|
1798
|
+
id: _chunkIBUFFKAKcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1799
1799
|
ticket,
|
|
1800
1800
|
expanded: expandedTicketId === ticket.id,
|
|
1801
1801
|
onToggle: toggleRow,
|
|
1802
|
-
busy:
|
|
1802
|
+
busy: _chunkII5GVLTNcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1803
1803
|
supportSystemDown,
|
|
1804
1804
|
onSendMessage: actions.sendMessage,
|
|
1805
1805
|
onClose: actions.closeTicket,
|
|
@@ -1813,7 +1813,7 @@ function HelpCenterListAuthed({
|
|
|
1813
1813
|
) }),
|
|
1814
1814
|
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNMXL34Z2cjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1815
1815
|
] });
|
|
1816
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1816
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMZAZUSPQcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1817
1817
|
}
|
|
1818
1818
|
|
|
1819
1819
|
|
|
@@ -1832,4 +1832,4 @@ function HelpCenterListAuthed({
|
|
|
1832
1832
|
|
|
1833
1833
|
|
|
1834
1834
|
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;
|
|
1835
|
-
//# sourceMappingURL=chunk-
|
|
1835
|
+
//# sourceMappingURL=chunk-UBXEETWQ.cjs.map
|