@flamingo-stack/openframe-frontend-core 0.0.583 → 0.0.584-1973.5420.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/chat-protocol/events.d.ts +8 -2
- package/dist/chat-protocol/events.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +177 -0
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.js +177 -0
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
- package/dist/chat-protocol/source-metadata.d.ts +3 -0
- package/dist/chat-protocol/source-metadata.d.ts.map +1 -0
- package/dist/{chunk-EATPU5EF.cjs → chunk-3MAG3EG4.cjs} +9 -9
- package/dist/{chunk-EATPU5EF.cjs.map → chunk-3MAG3EG4.cjs.map} +1 -1
- package/dist/{chunk-IKUSKKFZ.cjs → chunk-4TZOFXPH.cjs} +712 -432
- package/dist/chunk-4TZOFXPH.cjs.map +1 -0
- package/dist/{chunk-WMRXB6RS.js → chunk-54WRMPCY.js} +3 -3
- package/dist/{chunk-WTC6QQNX.cjs → chunk-7IVT56YY.cjs} +3 -3
- package/dist/{chunk-WTC6QQNX.cjs.map → chunk-7IVT56YY.cjs.map} +1 -1
- package/dist/{chunk-PFKWJ6PJ.js → chunk-AQW2PDRS.js} +2 -2
- package/dist/{chunk-DROXHJVZ.js → chunk-AVVKXNGI.js} +2 -2
- package/dist/{chunk-YNLIXABT.cjs → chunk-CE6CA6EM.cjs} +43 -43
- package/dist/{chunk-YNLIXABT.cjs.map → chunk-CE6CA6EM.cjs.map} +1 -1
- package/dist/{chunk-TRD2YICZ.cjs → chunk-CGLQLBMQ.cjs} +21 -21
- package/dist/{chunk-TRD2YICZ.cjs.map → chunk-CGLQLBMQ.cjs.map} +1 -1
- package/dist/{chunk-XWBND4G5.js → chunk-CO4WRST6.js} +301 -21
- package/dist/chunk-CO4WRST6.js.map +1 -0
- package/dist/{chunk-IJVWKLJK.cjs → chunk-DHLD3JXN.cjs} +69 -69
- package/dist/{chunk-IJVWKLJK.cjs.map → chunk-DHLD3JXN.cjs.map} +1 -1
- package/dist/{chunk-M6ZUEBDK.cjs → chunk-F2EN6MXN.cjs} +159 -159
- package/dist/{chunk-M6ZUEBDK.cjs.map → chunk-F2EN6MXN.cjs.map} +1 -1
- package/dist/{chunk-J3EEL6YC.js → chunk-FH2FH337.js} +5 -5
- package/dist/{chunk-L26MD32B.js → chunk-GDHI3JN5.js} +3 -3
- package/dist/{chunk-VWHEXQ64.js → chunk-GFIH73Q3.js} +3 -3
- package/dist/{chunk-R5A3MGMY.js → chunk-H6GYY5CB.js} +3 -3
- package/dist/{chunk-FCLM2RXI.js → chunk-HGJAUYHW.js} +2 -2
- package/dist/{chunk-RBDVHLT5.cjs → chunk-HKKQCVVY.cjs} +22 -22
- package/dist/{chunk-RBDVHLT5.cjs.map → chunk-HKKQCVVY.cjs.map} +1 -1
- package/dist/{chunk-KDWNMFX4.cjs → chunk-JEMGFSC2.cjs} +24 -24
- package/dist/{chunk-KDWNMFX4.cjs.map → chunk-JEMGFSC2.cjs.map} +1 -1
- package/dist/{chunk-BTBW4L2W.cjs → chunk-JX6RSSZP.cjs} +33 -33
- package/dist/{chunk-BTBW4L2W.cjs.map → chunk-JX6RSSZP.cjs.map} +1 -1
- package/dist/{chunk-WHNC7C76.js → chunk-KN2ZCZQ7.js} +5 -5
- package/dist/{chunk-WBTKXNKZ.cjs → chunk-MYVHYVQM.cjs} +10 -10
- package/dist/{chunk-WBTKXNKZ.cjs.map → chunk-MYVHYVQM.cjs.map} +1 -1
- package/dist/{chunk-3TNM6SDP.cjs → chunk-PI3BNDCW.cjs} +15 -15
- package/dist/{chunk-3TNM6SDP.cjs.map → chunk-PI3BNDCW.cjs.map} +1 -1
- package/dist/{chunk-XZ3MKTJZ.js → chunk-PWI66GZF.js} +2 -2
- package/dist/{chunk-IFPGXSMZ.cjs → chunk-RTI3TYMX.cjs} +3 -3
- package/dist/{chunk-IFPGXSMZ.cjs.map → chunk-RTI3TYMX.cjs.map} +1 -1
- package/dist/{chunk-6BI3AYBY.cjs → chunk-SS2TCIKA.cjs} +4 -4
- package/dist/{chunk-6BI3AYBY.cjs.map → chunk-SS2TCIKA.cjs.map} +1 -1
- package/dist/{chunk-HIHPWVKP.js → chunk-T35JA5XV.js} +5 -5
- package/dist/{chunk-EZ5VU5WS.js → chunk-TLZ7HTXP.js} +2 -2
- package/dist/{chunk-OCXFFGFA.cjs → chunk-UZUG7QZ3.cjs} +10 -10
- package/dist/{chunk-OCXFFGFA.cjs.map → chunk-UZUG7QZ3.cjs.map} +1 -1
- package/dist/{chunk-3RR67XC2.cjs → chunk-W46U5J3H.cjs} +5 -5
- package/dist/{chunk-3RR67XC2.cjs.map → chunk-W46U5J3H.cjs.map} +1 -1
- package/dist/{chunk-IOP7BCRQ.js → chunk-WFF5JMQ2.js} +6 -6
- package/dist/{chunk-AJLF6MBD.js → chunk-X4HLHN36.js} +3 -3
- package/dist/{chunk-PMA7DVQR.js → chunk-ZWB64HOD.js} +4 -4
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- 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/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts +4 -1
- package/dist/components/chat/hooks/use-nats-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts +2 -28
- package/dist/components/chat/hooks/use-sse-chat-adapter.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
- package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +2 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +35 -1
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/types/unified-chat-state.types.d.ts +3 -3
- package/dist/components/chat/types/unified-chat-state.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chat-source-metadata.d.ts +5 -0
- package/dist/components/chat/utils/chat-source-metadata.d.ts.map +1 -0
- package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +36 -36
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +21 -21
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +130 -0
- package/src/chat-protocol/events.ts +9 -1
- package/src/chat-protocol/nats-decoder.ts +7 -0
- package/src/chat-protocol/source-metadata.ts +187 -0
- package/src/components/chat/__tests__/chat-message-streaming-memo.test.tsx +86 -0
- package/src/components/chat/__tests__/embeddable-chat-sources.test.tsx +171 -0
- package/src/components/chat/__tests__/tool-execution-display.test.tsx +93 -0
- package/src/components/chat/chat-message-enhanced.tsx +28 -13
- package/src/components/chat/chat-message-list.tsx +1 -0
- package/src/components/chat/embeddable-chat.tsx +10 -1
- package/src/components/chat/entity-cards/__tests__/dispatch-video-refs.test.tsx +74 -0
- package/src/components/chat/entity-cards/dispatch.tsx +48 -11
- package/src/components/chat/hooks/use-nats-chat-adapter.ts +7 -0
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +2 -29
- package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +56 -0
- package/src/components/chat/stream/chat-stream-reducer.ts +31 -0
- package/src/components/chat/tool-execution-display.tsx +5 -2
- package/src/components/chat/types/component.types.ts +2 -0
- package/src/components/chat/types/message.types.ts +39 -0
- package/src/components/chat/types/unified-chat-state.types.ts +4 -3
- package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +57 -0
- package/src/components/chat/utils/chat-source-metadata.ts +19 -0
- package/src/components/chat/utils/process-historical-messages.ts +19 -1
- package/dist/chunk-IKUSKKFZ.cjs.map +0 -1
- package/dist/chunk-XWBND4G5.js.map +0 -1
- /package/dist/{chunk-WMRXB6RS.js.map → chunk-54WRMPCY.js.map} +0 -0
- /package/dist/{chunk-PFKWJ6PJ.js.map → chunk-AQW2PDRS.js.map} +0 -0
- /package/dist/{chunk-DROXHJVZ.js.map → chunk-AVVKXNGI.js.map} +0 -0
- /package/dist/{chunk-J3EEL6YC.js.map → chunk-FH2FH337.js.map} +0 -0
- /package/dist/{chunk-L26MD32B.js.map → chunk-GDHI3JN5.js.map} +0 -0
- /package/dist/{chunk-VWHEXQ64.js.map → chunk-GFIH73Q3.js.map} +0 -0
- /package/dist/{chunk-R5A3MGMY.js.map → chunk-H6GYY5CB.js.map} +0 -0
- /package/dist/{chunk-FCLM2RXI.js.map → chunk-HGJAUYHW.js.map} +0 -0
- /package/dist/{chunk-WHNC7C76.js.map → chunk-KN2ZCZQ7.js.map} +0 -0
- /package/dist/{chunk-XZ3MKTJZ.js.map → chunk-PWI66GZF.js.map} +0 -0
- /package/dist/{chunk-HIHPWVKP.js.map → chunk-T35JA5XV.js.map} +0 -0
- /package/dist/{chunk-EZ5VU5WS.js.map → chunk-TLZ7HTXP.js.map} +0 -0
- /package/dist/{chunk-IOP7BCRQ.js.map → chunk-WFF5JMQ2.js.map} +0 -0
- /package/dist/{chunk-AJLF6MBD.js.map → chunk-X4HLHN36.js.map} +0 -0
- /package/dist/{chunk-PMA7DVQR.js.map → chunk-ZWB64HOD.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkCGLQLBMQcjs = require('./chunk-CGLQLBMQ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkUZUG7QZ3cjs = require('./chunk-UZUG7QZ3.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ var _chunkS4CLML75cjs = require('./chunk-S4CLML75.cjs');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkW46U5J3Hcjs = require('./chunk-W46U5J3H.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -33,7 +33,7 @@ var _chunk3RR67XC2cjs = require('./chunk-3RR67XC2.cjs');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkF2EN6MXNcjs = require('./chunk-F2EN6MXN.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
@@ -51,7 +51,7 @@ var _chunkIKDC3R7Vcjs = require('./chunk-IKDC3R7V.cjs');
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var
|
|
54
|
+
var _chunk4TZOFXPHcjs = require('./chunk-4TZOFXPH.cjs');
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
@@ -107,7 +107,7 @@ var TicketActionFailure = class extends Error {
|
|
|
107
107
|
function useTicketActions(options) {
|
|
108
108
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
109
109
|
const ticketActionEndpoint = _nullishCoalesce(_chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
110
|
-
const ticketLive =
|
|
110
|
+
const ticketLive = _chunkW46U5J3Hcjs.useOptionalTicketLive.call(void 0, );
|
|
111
111
|
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _2 => _2.notifyTicketCreated]);
|
|
112
112
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
113
113
|
const formInFlightRef = _react.useRef.call(void 0, null);
|
|
@@ -268,10 +268,10 @@ function useTicketActions(options) {
|
|
|
268
268
|
..._optionalChain([input, 'access', _3 => _3.attachments, 'optionalAccess', _4 => _4.length]) ? { attachments: input.attachments } : {}
|
|
269
269
|
});
|
|
270
270
|
if (result.mirror_synced === false) {
|
|
271
|
-
toast2(
|
|
271
|
+
toast2(_chunkW46U5J3Hcjs.TOAST_COPY.open_mirror_pending);
|
|
272
272
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
273
273
|
} else {
|
|
274
|
-
toast2(
|
|
274
|
+
toast2(_chunkW46U5J3Hcjs.TOAST_COPY.open_success);
|
|
275
275
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
276
276
|
removeOptimistic(placeholderId);
|
|
277
277
|
}
|
|
@@ -357,7 +357,7 @@ function useTicketActions(options) {
|
|
|
357
357
|
...hasText ? { content_addendum: trimmed } : {},
|
|
358
358
|
...hasFiles ? { attachments } : {}
|
|
359
359
|
},
|
|
360
|
-
|
|
360
|
+
_chunkW46U5J3Hcjs.TOAST_COPY.comment_success,
|
|
361
361
|
"send message"
|
|
362
362
|
);
|
|
363
363
|
if (ok) {
|
|
@@ -380,13 +380,13 @@ function useTicketActions(options) {
|
|
|
380
380
|
status: "CLOSED",
|
|
381
381
|
..._optionalChain([resolution, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ? { resolution: resolution.trim() } : {}
|
|
382
382
|
},
|
|
383
|
-
|
|
383
|
+
_chunkW46U5J3Hcjs.TOAST_COPY.close_success,
|
|
384
384
|
"close ticket"
|
|
385
385
|
),
|
|
386
386
|
[updateTicket]
|
|
387
387
|
);
|
|
388
388
|
const reopenTicket = _react.useCallback.call(void 0,
|
|
389
|
-
(ticket) => updateTicket(ticket, { status: "OPEN" },
|
|
389
|
+
(ticket) => updateTicket(ticket, { status: "OPEN" }, _chunkW46U5J3Hcjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
390
390
|
[updateTicket]
|
|
391
391
|
);
|
|
392
392
|
return _react.useMemo.call(void 0,
|
|
@@ -611,14 +611,14 @@ function useTicketsList(filters) {
|
|
|
611
611
|
// src/components/tickets/ticket-open-form.tsx
|
|
612
612
|
|
|
613
613
|
var _jsxruntime = require('react/jsx-runtime');
|
|
614
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
614
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunkW46U5J3Hcjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
615
615
|
function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
616
616
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
617
617
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
618
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
618
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunk4TZOFXPHcjs.useChatAttachments.call(void 0, );
|
|
619
619
|
const trimmedSubject = subject.trim();
|
|
620
620
|
const trimmedContent = content.trim();
|
|
621
|
-
const overCap = content.length >
|
|
621
|
+
const overCap = content.length > _chunkW46U5J3Hcjs.TICKET_TEXT_MAX_CHARS;
|
|
622
622
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
623
623
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
624
624
|
const handleSubmit = async (e) => {
|
|
@@ -660,7 +660,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
660
660
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
661
661
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-content", className: "mb-1 block text-ods-text-primary text-h6", children: "Your Message" }),
|
|
662
662
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
663
|
-
|
|
663
|
+
_chunkF2EN6MXNcjs.Textarea,
|
|
664
664
|
{
|
|
665
665
|
id: "ticket-content",
|
|
666
666
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -674,11 +674,11 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
674
674
|
showCounter && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: `mt-1 text-right text-h6 ${overCap ? "text-ods-error" : "text-ods-text-secondary"}`, children: [
|
|
675
675
|
content.length,
|
|
676
676
|
"/",
|
|
677
|
-
|
|
677
|
+
_chunkW46U5J3Hcjs.TICKET_TEXT_MAX_CHARS
|
|
678
678
|
] })
|
|
679
679
|
] }),
|
|
680
680
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
681
|
-
|
|
681
|
+
_chunk4TZOFXPHcjs.ChatAttachmentChipStrip,
|
|
682
682
|
{
|
|
683
683
|
attachments,
|
|
684
684
|
onRemove: removeAttachment,
|
|
@@ -687,7 +687,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
687
687
|
),
|
|
688
688
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
689
689
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
690
|
-
|
|
690
|
+
_chunk4TZOFXPHcjs.ChatAttachmentAddButton,
|
|
691
691
|
{
|
|
692
692
|
attachmentsEnabled: !supportSystemDown,
|
|
693
693
|
attachmentsCount: attachments.length,
|
|
@@ -717,7 +717,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
717
717
|
|
|
718
718
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
719
719
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
720
|
-
const identity =
|
|
720
|
+
const identity = _chunk4TZOFXPHcjs.useChatIdentity.call(void 0, );
|
|
721
721
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]), () => ( "anon"));
|
|
722
722
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkRDTOMWDNcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
723
723
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -790,7 +790,7 @@ function TicketLinkedDeliveryCard({ clickup, className }) {
|
|
|
790
790
|
dateClosed: clickup.date_closed,
|
|
791
791
|
clickupUrl: _nullishCoalesce(clickup.clickup_url, () => ( ""))
|
|
792
792
|
};
|
|
793
|
-
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,
|
|
793
|
+
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, _chunkUZUG7QZ3cjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
794
794
|
}
|
|
795
795
|
|
|
796
796
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -805,7 +805,7 @@ function TicketReplyComposer({
|
|
|
805
805
|
}) {
|
|
806
806
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
807
807
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
808
|
-
const attachments =
|
|
808
|
+
const attachments = _chunk4TZOFXPHcjs.useChatAttachments.call(void 0, );
|
|
809
809
|
const { readyAttachments, clear: clearAttachments } = attachments;
|
|
810
810
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
811
811
|
const hasReadyFiles = readyAttachments.length > 0;
|
|
@@ -826,7 +826,7 @@ function TicketReplyComposer({
|
|
|
826
826
|
const disabled = busy || supportSystemDown;
|
|
827
827
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
828
828
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
829
|
-
|
|
829
|
+
_chunk4TZOFXPHcjs.ChatAttachmentChipStrip,
|
|
830
830
|
{
|
|
831
831
|
attachments: attachments.attachments,
|
|
832
832
|
onRemove: attachments.removeAttachment,
|
|
@@ -835,7 +835,7 @@ function TicketReplyComposer({
|
|
|
835
835
|
}
|
|
836
836
|
),
|
|
837
837
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
838
|
-
|
|
838
|
+
_chunk4TZOFXPHcjs.ChatInput,
|
|
839
839
|
{
|
|
840
840
|
fullWidth: true,
|
|
841
841
|
autoFocus: true,
|
|
@@ -843,13 +843,13 @@ function TicketReplyComposer({
|
|
|
843
843
|
sending: busy || attachments.hasInflightUploads,
|
|
844
844
|
disabled: supportSystemDown,
|
|
845
845
|
allowEmptySend: hasReadyFiles,
|
|
846
|
-
maxLength:
|
|
846
|
+
maxLength: _chunkW46U5J3Hcjs.TICKET_TEXT_MAX_CHARS,
|
|
847
847
|
onSend: handleSend
|
|
848
848
|
}
|
|
849
849
|
),
|
|
850
850
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-2", children: [
|
|
851
851
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
852
|
-
|
|
852
|
+
_chunk4TZOFXPHcjs.ChatAttachmentAddButton,
|
|
853
853
|
{
|
|
854
854
|
attachmentsEnabled: true,
|
|
855
855
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -872,25 +872,25 @@ function TicketReplyComposer({
|
|
|
872
872
|
}
|
|
873
873
|
)
|
|
874
874
|
] }),
|
|
875
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
876
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
877
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
878
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
875
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF2EN6MXNcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkF2EN6MXNcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
876
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkF2EN6MXNcjs.AlertDialogHeader, { children: [
|
|
877
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF2EN6MXNcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
878
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF2EN6MXNcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
879
879
|
] }),
|
|
880
880
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
881
|
-
|
|
881
|
+
_chunkF2EN6MXNcjs.Textarea,
|
|
882
882
|
{
|
|
883
883
|
value: resolution,
|
|
884
884
|
onChange: (e) => setResolution(e.target.value),
|
|
885
885
|
placeholder: "Resolution (optional)",
|
|
886
886
|
rows: 3,
|
|
887
|
-
maxLength:
|
|
887
|
+
maxLength: _chunkW46U5J3Hcjs.TICKET_TEXT_MAX_CHARS,
|
|
888
888
|
className: "mt-2"
|
|
889
889
|
}
|
|
890
890
|
),
|
|
891
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
891
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkF2EN6MXNcjs.AlertDialogFooter, { children: [
|
|
892
892
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
893
|
-
|
|
893
|
+
_chunkF2EN6MXNcjs.AlertDialogCancel,
|
|
894
894
|
{
|
|
895
895
|
disabled: busy,
|
|
896
896
|
className: "border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-border",
|
|
@@ -898,7 +898,7 @@ function TicketReplyComposer({
|
|
|
898
898
|
}
|
|
899
899
|
),
|
|
900
900
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
901
|
-
|
|
901
|
+
_chunkF2EN6MXNcjs.AlertDialogAction,
|
|
902
902
|
{
|
|
903
903
|
onClick: () => void confirmClose(),
|
|
904
904
|
disabled: busy,
|
|
@@ -960,10 +960,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
960
960
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
961
961
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
962
962
|
function TicketTimelinePanel({ ticket }) {
|
|
963
|
-
const identity =
|
|
964
|
-
const externalId =
|
|
963
|
+
const identity = _chunk4TZOFXPHcjs.useChatIdentity.call(void 0, );
|
|
964
|
+
const externalId = _chunkW46U5J3Hcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
965
965
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
966
|
-
const live =
|
|
966
|
+
const live = _chunkW46U5J3Hcjs.useOptionalTicketLive.call(void 0, );
|
|
967
967
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _25 => _25.setOpenTicketId]);
|
|
968
968
|
const markRead = _optionalChain([live, 'optionalAccess', _26 => _26.markRead]);
|
|
969
969
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -987,7 +987,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
987
987
|
markReadDebounceRef.current = setTimeout(() => {
|
|
988
988
|
markReadDebounceRef.current = null;
|
|
989
989
|
void markRead(externalId);
|
|
990
|
-
},
|
|
990
|
+
}, _chunkW46U5J3Hcjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
991
991
|
}, [engagementsCount, externalId, markRead]);
|
|
992
992
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
993
993
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -1002,7 +1002,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1002
1002
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _40 => _40.user, 'optionalAccess', _41 => _41.email]) || "You";
|
|
1003
1003
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _42 => _42.user, 'optionalAccess', _43 => _43.avatarUrl]), () => ( void 0)) : void 0;
|
|
1004
1004
|
if (isLoading) {
|
|
1005
|
-
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,
|
|
1005
|
+
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, _chunk4TZOFXPHcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1006
1006
|
}
|
|
1007
1007
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1008
1008
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1021,7 +1021,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1021
1021
|
const isResolution = turn.startsWith("[Resolution]");
|
|
1022
1022
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
1023
1023
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1024
|
-
|
|
1024
|
+
_chunk4TZOFXPHcjs.ChatMessageRow,
|
|
1025
1025
|
{
|
|
1026
1026
|
displayName: customerName,
|
|
1027
1027
|
avatarUrl: customerAvatar,
|
|
@@ -1050,13 +1050,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1050
1050
|
}
|
|
1051
1051
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
1052
1052
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1053
|
-
|
|
1053
|
+
_chunk4TZOFXPHcjs.ChatMessageRow,
|
|
1054
1054
|
{
|
|
1055
1055
|
displayName: author,
|
|
1056
1056
|
avatarUrl: avatarSrc,
|
|
1057
|
-
timeLabel: eng.createdAt ?
|
|
1057
|
+
timeLabel: eng.createdAt ? _chunk4TZOFXPHcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1058
1058
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1059
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1059
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF2EN6MXNcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1060
1060
|
},
|
|
1061
1061
|
eng.id
|
|
1062
1062
|
);
|
|
@@ -1169,7 +1169,7 @@ function TicketRow({
|
|
|
1169
1169
|
onActionCollapsed,
|
|
1170
1170
|
id
|
|
1171
1171
|
}) {
|
|
1172
|
-
const optimistic =
|
|
1172
|
+
const optimistic = _chunkW46U5J3Hcjs.isOptimistic.call(void 0, ticket);
|
|
1173
1173
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1174
1174
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1175
1175
|
onToggle(ticket.id);
|
|
@@ -1197,7 +1197,7 @@ function TicketRow({
|
|
|
1197
1197
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
1198
1198
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
1199
1199
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
1200
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
1200
|
+
timeAgo: ticket.hubspot_updated_at ? _chunk4TZOFXPHcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
1201
1201
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
1202
1202
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
1203
1203
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -1207,7 +1207,7 @@ function TicketRow({
|
|
|
1207
1207
|
};
|
|
1208
1208
|
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: [
|
|
1209
1209
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1210
|
-
|
|
1210
|
+
_chunk4TZOFXPHcjs.ChatTicketItem,
|
|
1211
1211
|
{
|
|
1212
1212
|
ticket: tileData,
|
|
1213
1213
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1240,7 +1240,7 @@ function TicketRow({
|
|
|
1240
1240
|
// src/components/tickets/ticket-center.tsx
|
|
1241
1241
|
|
|
1242
1242
|
function TicketCenter({ toast: toast2 = _chunkLEISUAHFcjs.toast } = {}) {
|
|
1243
|
-
const identity =
|
|
1243
|
+
const identity = _chunk4TZOFXPHcjs.useChatIdentity.call(void 0, );
|
|
1244
1244
|
if (identity.isLoading) {
|
|
1245
1245
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1246
1246
|
}
|
|
@@ -1311,7 +1311,7 @@ function TicketCenterAuthed({
|
|
|
1311
1311
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-ods-text-secondary text-h6", children: [
|
|
1312
1312
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1313
1313
|
"Updated ",
|
|
1314
|
-
|
|
1314
|
+
_chunk4TZOFXPHcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1315
1315
|
] }),
|
|
1316
1316
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1317
1317
|
_chunkYHNIPSG6cjs.Button,
|
|
@@ -1338,11 +1338,11 @@ function TicketCenterAuthed({
|
|
|
1338
1338
|
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNNFQLTJ3cjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1339
1339
|
TicketRow,
|
|
1340
1340
|
{
|
|
1341
|
-
id:
|
|
1341
|
+
id: _chunkF2EN6MXNcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1342
1342
|
ticket,
|
|
1343
1343
|
expanded: expandedTicketId === ticket.id,
|
|
1344
1344
|
onToggle: toggleRow,
|
|
1345
|
-
busy:
|
|
1345
|
+
busy: _chunkW46U5J3Hcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1346
1346
|
supportSystemDown,
|
|
1347
1347
|
onSendMessage: actions.sendMessage,
|
|
1348
1348
|
onClose: actions.closeTicket,
|
|
@@ -1396,10 +1396,10 @@ function HelpCenterCard({
|
|
|
1396
1396
|
onClearReplyError,
|
|
1397
1397
|
id
|
|
1398
1398
|
}) {
|
|
1399
|
-
const optimistic =
|
|
1399
|
+
const optimistic = _chunkW46U5J3Hcjs.isOptimistic.call(void 0, ticket);
|
|
1400
1400
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1401
1401
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1402
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1402
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunk4TZOFXPHcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1403
1403
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1404
1404
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1405
1405
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1418,7 +1418,7 @@ function HelpCenterCard({
|
|
|
1418
1418
|
});
|
|
1419
1419
|
return () => cancelAnimationFrame(raf);
|
|
1420
1420
|
}, [isExpanded]);
|
|
1421
|
-
const live =
|
|
1421
|
+
const live = _chunkW46U5J3Hcjs.useOptionalTicketLive.call(void 0, );
|
|
1422
1422
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1423
1423
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1424
1424
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1468,7 +1468,7 @@ function HelpCenterCard({
|
|
|
1468
1468
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1469
1469
|
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]",
|
|
1470
1470
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1471
|
-
|
|
1471
|
+
_chunkUZUG7QZ3cjs.DevCardRowContent,
|
|
1472
1472
|
{
|
|
1473
1473
|
title,
|
|
1474
1474
|
subtitle,
|
|
@@ -1568,7 +1568,7 @@ function HelpCenterCreateForm({
|
|
|
1568
1568
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1569
1569
|
] });
|
|
1570
1570
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1571
|
-
|
|
1571
|
+
_chunkCGLQLBMQcjs.ContactForm,
|
|
1572
1572
|
{
|
|
1573
1573
|
title: "Open a new ticket",
|
|
1574
1574
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1606,30 +1606,30 @@ function HelpCenterCreateForm({
|
|
|
1606
1606
|
// src/components/tickets/help-center-list.tsx
|
|
1607
1607
|
|
|
1608
1608
|
function HelpCenterList({ toast: toast2 = _chunkLEISUAHFcjs.toast, backButton, title, shell } = {}) {
|
|
1609
|
-
const identity =
|
|
1609
|
+
const identity = _chunk4TZOFXPHcjs.useChatIdentity.call(void 0, );
|
|
1610
1610
|
const searchParams = _chunkSADRZ4YIcjs.useSearchParams.call(void 0, );
|
|
1611
1611
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
1612
1612
|
const pathname = _chunkSADRZ4YIcjs.usePathname.call(void 0, );
|
|
1613
|
-
const search = searchParams.get(
|
|
1613
|
+
const search = searchParams.get(_chunkF2EN6MXNcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1614
1614
|
const status = searchParams.get("status") || "all";
|
|
1615
|
-
const ticketParam = searchParams.get(
|
|
1615
|
+
const ticketParam = searchParams.get(_chunkF2EN6MXNcjs.TICKET_OPEN_PARAM) || "";
|
|
1616
1616
|
const rawPage = Number(searchParams.get("page"));
|
|
1617
1617
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1618
1618
|
if (identity.isLoading) {
|
|
1619
1619
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1620
|
-
|
|
1620
|
+
_chunkUZUG7QZ3cjs.DevSectionPage,
|
|
1621
1621
|
{
|
|
1622
1622
|
sectionKey: "tickets",
|
|
1623
1623
|
backButton,
|
|
1624
1624
|
title,
|
|
1625
1625
|
shell,
|
|
1626
1626
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1627
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1627
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUZUG7QZ3cjs.DevCardRowSkeletonList, {})
|
|
1628
1628
|
}
|
|
1629
1629
|
);
|
|
1630
1630
|
}
|
|
1631
1631
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1632
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1632
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUZUG7QZ3cjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1633
1633
|
_chunkS4CLML75cjs.EmptyState,
|
|
1634
1634
|
{
|
|
1635
1635
|
type: "generic",
|
|
@@ -1681,8 +1681,8 @@ function HelpCenterListAuthed({
|
|
|
1681
1681
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1682
1682
|
(externalId) => {
|
|
1683
1683
|
const params = new URLSearchParams(searchParams.toString());
|
|
1684
|
-
if (externalId) params.set(
|
|
1685
|
-
else params.delete(
|
|
1684
|
+
if (externalId) params.set(_chunkF2EN6MXNcjs.TICKET_OPEN_PARAM, externalId);
|
|
1685
|
+
else params.delete(_chunkF2EN6MXNcjs.TICKET_OPEN_PARAM);
|
|
1686
1686
|
const qs = params.toString();
|
|
1687
1687
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1688
1688
|
},
|
|
@@ -1759,13 +1759,13 @@ function HelpCenterListAuthed({
|
|
|
1759
1759
|
] }),
|
|
1760
1760
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYHNIPSG6cjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1761
1761
|
] }),
|
|
1762
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1762
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUZUG7QZ3cjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1763
1763
|
// Bridge state — background refetch in flight and the
|
|
1764
1764
|
// optimistic placeholder was just removed by the mutation
|
|
1765
1765
|
// callback. Without this branch "No tickets yet" would flash
|
|
1766
1766
|
// for ~50ms between `removeOptimistic` and the server
|
|
1767
1767
|
// response landing.
|
|
1768
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1768
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUZUG7QZ3cjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1769
1769
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1770
1770
|
_chunkS4CLML75cjs.EmptyState,
|
|
1771
1771
|
{
|
|
@@ -1801,11 +1801,11 @@ function HelpCenterListAuthed({
|
|
|
1801
1801
|
/* @__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,
|
|
1802
1802
|
HelpCenterCard,
|
|
1803
1803
|
{
|
|
1804
|
-
id:
|
|
1804
|
+
id: _chunkF2EN6MXNcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1805
1805
|
ticket,
|
|
1806
1806
|
expanded: expandedTicketId === ticket.id,
|
|
1807
1807
|
onToggle: toggleRow,
|
|
1808
|
-
busy:
|
|
1808
|
+
busy: _chunkW46U5J3Hcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1809
1809
|
supportSystemDown,
|
|
1810
1810
|
onSendMessage: actions.sendMessage,
|
|
1811
1811
|
onClose: actions.closeTicket,
|
|
@@ -1819,7 +1819,7 @@ function HelpCenterListAuthed({
|
|
|
1819
1819
|
) }),
|
|
1820
1820
|
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkS4CLML75cjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1821
1821
|
] });
|
|
1822
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1822
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUZUG7QZ3cjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1823
1823
|
}
|
|
1824
1824
|
|
|
1825
1825
|
|
|
@@ -1838,4 +1838,4 @@ function HelpCenterListAuthed({
|
|
|
1838
1838
|
|
|
1839
1839
|
|
|
1840
1840
|
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;
|
|
1841
|
-
//# sourceMappingURL=chunk-
|
|
1841
|
+
//# sourceMappingURL=chunk-DHLD3JXN.cjs.map
|