@flamingo-stack/openframe-frontend-core 0.0.670 → 0.0.671
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-K6WL2OWX.js → chunk-4PVY4JJN.js} +2 -2
- package/dist/{chunk-BRGO4IEB.js → chunk-6C6UUOH4.js} +5 -5
- package/dist/{chunk-57QY7D22.cjs → chunk-BP542DGQ.cjs} +17 -17
- package/dist/{chunk-57QY7D22.cjs.map → chunk-BP542DGQ.cjs.map} +1 -1
- package/dist/{chunk-S25GQVXN.cjs → chunk-DAGKBFZN.cjs} +33 -33
- package/dist/{chunk-S25GQVXN.cjs.map → chunk-DAGKBFZN.cjs.map} +1 -1
- package/dist/{chunk-NTZGJZZS.cjs → chunk-DAWYS25M.cjs} +13 -13
- package/dist/{chunk-NTZGJZZS.cjs.map → chunk-DAWYS25M.cjs.map} +1 -1
- package/dist/{chunk-R4NCUO7Y.js → chunk-DUZEFACP.js} +2 -2
- package/dist/{chunk-BUPLBCTW.cjs → chunk-EIAVE6SE.cjs} +10 -10
- package/dist/{chunk-BUPLBCTW.cjs.map → chunk-EIAVE6SE.cjs.map} +1 -1
- package/dist/{chunk-7YZZJYJN.cjs → chunk-FAJUQKWQ.cjs} +51 -51
- package/dist/{chunk-7YZZJYJN.cjs.map → chunk-FAJUQKWQ.cjs.map} +1 -1
- package/dist/{chunk-7BOZ3CRQ.js → chunk-FHTNCWIP.js} +3 -3
- package/dist/{chunk-QSUYGCBR.js → chunk-G64BNLDO.js} +2 -2
- package/dist/{chunk-NGMOFWQL.cjs → chunk-GF5TSQ6C.cjs} +3 -3
- package/dist/{chunk-NGMOFWQL.cjs.map → chunk-GF5TSQ6C.cjs.map} +1 -1
- package/dist/{chunk-DFM7NCZR.cjs → chunk-II66XWU5.cjs} +3 -3
- package/dist/{chunk-DFM7NCZR.cjs.map → chunk-II66XWU5.cjs.map} +1 -1
- package/dist/{chunk-JB44GMRU.js → chunk-IJIIL6WU.js} +4 -4
- package/dist/{chunk-BZ6RAT7K.js → chunk-K3O4D7LW.js} +2 -2
- package/dist/{chunk-X4JE3QHN.js → chunk-NIYIK32F.js} +3 -1
- package/dist/{chunk-X4JE3QHN.js.map → chunk-NIYIK32F.js.map} +1 -1
- package/dist/{chunk-BQUWZQF6.cjs → chunk-OG2BNJ2Q.cjs} +210 -208
- package/dist/chunk-OG2BNJ2Q.cjs.map +1 -0
- package/dist/{chunk-BP52HUNB.js → chunk-OYMOG544.js} +5 -5
- package/dist/{chunk-YCEVKQHL.cjs → chunk-PLG6LP7E.cjs} +36 -36
- package/dist/{chunk-YCEVKQHL.cjs.map → chunk-PLG6LP7E.cjs.map} +1 -1
- package/dist/{chunk-U7UVD2D2.js → chunk-PQ7YC5Y6.js} +2 -2
- package/dist/{chunk-7A6EJEL5.js → chunk-R22IA7MP.js} +2 -2
- package/dist/{chunk-DQVEL4YO.js → chunk-RKUCK6MN.js} +2 -2
- package/dist/{chunk-4RJ5M6EJ.cjs → chunk-SJZPKIW6.cjs} +4 -4
- package/dist/{chunk-4RJ5M6EJ.cjs.map → chunk-SJZPKIW6.cjs.map} +1 -1
- package/dist/{chunk-IO3EXNLR.js → chunk-SNNE34OP.js} +4 -4
- package/dist/{chunk-RLVSORQW.js → chunk-STLBB6PF.js} +2 -2
- package/dist/{chunk-LC4U5JGM.cjs → chunk-T3ACDOVD.cjs} +4 -4
- package/dist/{chunk-LC4U5JGM.cjs.map → chunk-T3ACDOVD.cjs.map} +1 -1
- package/dist/{chunk-QZGGA47F.js → chunk-UH3BL2OT.js} +2 -2
- package/dist/{chunk-CTVFAT6X.cjs → chunk-XGXHHSDU.cjs} +17 -17
- package/dist/{chunk-CTVFAT6X.cjs.map → chunk-XGXHHSDU.cjs.map} +1 -1
- package/dist/{chunk-P4H2NRQB.cjs → chunk-XH4MRTZM.cjs} +3 -3
- package/dist/{chunk-P4H2NRQB.cjs.map → chunk-XH4MRTZM.cjs.map} +1 -1
- package/dist/{chunk-6CEXIIVF.cjs → chunk-YIDNSRPL.cjs} +18 -18
- package/dist/{chunk-6CEXIIVF.cjs.map → chunk-YIDNSRPL.cjs.map} +1 -1
- package/dist/{chunk-K77Z3E4Y.cjs → chunk-YJWR7D6O.cjs} +3 -3
- package/dist/{chunk-K77Z3E4Y.cjs.map → chunk-YJWR7D6O.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +11 -11
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +49 -49
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +31 -31
- package/dist/components/index.js +12 -12
- package/dist/components/meeting-scheduler/index.cjs +21 -21
- package/dist/components/meeting-scheduler/index.js +1 -1
- package/dist/components/navigation/index.cjs +5 -5
- package/dist/components/navigation/index.js +4 -4
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/search-input.d.ts +5 -1
- package/dist/components/ui/search-input.d.ts.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.js +5 -5
- package/dist/types/design-doc.d.ts +2 -0
- package/dist/types/design-doc.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/search-input-submit-on-clear.test.tsx +32 -0
- package/src/components/ui/search-input.tsx +7 -1
- package/src/types/design-doc.ts +5 -1
- package/dist/chunk-BQUWZQF6.cjs.map +0 -1
- /package/dist/{chunk-K6WL2OWX.js.map → chunk-4PVY4JJN.js.map} +0 -0
- /package/dist/{chunk-BRGO4IEB.js.map → chunk-6C6UUOH4.js.map} +0 -0
- /package/dist/{chunk-R4NCUO7Y.js.map → chunk-DUZEFACP.js.map} +0 -0
- /package/dist/{chunk-7BOZ3CRQ.js.map → chunk-FHTNCWIP.js.map} +0 -0
- /package/dist/{chunk-QSUYGCBR.js.map → chunk-G64BNLDO.js.map} +0 -0
- /package/dist/{chunk-JB44GMRU.js.map → chunk-IJIIL6WU.js.map} +0 -0
- /package/dist/{chunk-BZ6RAT7K.js.map → chunk-K3O4D7LW.js.map} +0 -0
- /package/dist/{chunk-BP52HUNB.js.map → chunk-OYMOG544.js.map} +0 -0
- /package/dist/{chunk-U7UVD2D2.js.map → chunk-PQ7YC5Y6.js.map} +0 -0
- /package/dist/{chunk-7A6EJEL5.js.map → chunk-R22IA7MP.js.map} +0 -0
- /package/dist/{chunk-DQVEL4YO.js.map → chunk-RKUCK6MN.js.map} +0 -0
- /package/dist/{chunk-IO3EXNLR.js.map → chunk-SNNE34OP.js.map} +0 -0
- /package/dist/{chunk-RLVSORQW.js.map → chunk-STLBB6PF.js.map} +0 -0
- /package/dist/{chunk-QZGGA47F.js.map → chunk-UH3BL2OT.js.map} +0 -0
|
@@ -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 _chunkBP542DGQcjs = require('./chunk-BP542DGQ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkEIAVE6SEcjs = require('./chunk-EIAVE6SE.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 _chunkXH4MRTZMcjs = require('./chunk-XH4MRTZM.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -35,7 +35,7 @@ var _chunkP4H2NRQBcjs = require('./chunk-P4H2NRQB.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkOG2BNJ2Qcjs = require('./chunk-OG2BNJ2Q.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
@@ -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 = _chunkXH4MRTZMcjs.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(_chunkXH4MRTZMcjs.TOAST_COPY.open_mirror_pending);
|
|
280
280
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
281
281
|
} else {
|
|
282
|
-
toast2(
|
|
282
|
+
toast2(_chunkXH4MRTZMcjs.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
|
+
_chunkXH4MRTZMcjs.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
|
+
_chunkXH4MRTZMcjs.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" }, _chunkXH4MRTZMcjs.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(_chunkXH4MRTZMcjs.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
616
|
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkFUXUJSPPcjs.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 > _chunkXH4MRTZMcjs.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", ..._chunkOG2BNJ2Qcjs.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
|
+
_chunkOG2BNJ2Qcjs.Textarea,
|
|
662
662
|
{
|
|
663
663
|
id: "ticket-content",
|
|
664
664
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -672,7 +672,7 @@ 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
|
+
_chunkXH4MRTZMcjs.TICKET_TEXT_MAX_CHARS
|
|
676
676
|
] })
|
|
677
677
|
] }),
|
|
678
678
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -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, _chunkEIAVE6SEcjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
792
792
|
}
|
|
793
793
|
|
|
794
794
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -841,7 +841,7 @@ function TicketReplyComposer({
|
|
|
841
841
|
sending: busy || attachments.hasInflightUploads,
|
|
842
842
|
disabled: supportSystemDown,
|
|
843
843
|
allowEmptySend: hasReadyFiles,
|
|
844
|
-
maxLength:
|
|
844
|
+
maxLength: _chunkXH4MRTZMcjs.TICKET_TEXT_MAX_CHARS,
|
|
845
845
|
onSend: handleSend
|
|
846
846
|
}
|
|
847
847
|
),
|
|
@@ -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, _chunkOG2BNJ2Qcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkOG2BNJ2Qcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
874
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkOG2BNJ2Qcjs.AlertDialogHeader, { children: [
|
|
875
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOG2BNJ2Qcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
876
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOG2BNJ2Qcjs.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
|
+
_chunkOG2BNJ2Qcjs.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: _chunkXH4MRTZMcjs.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, _chunkOG2BNJ2Qcjs.AlertDialogFooter, { children: [
|
|
890
890
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
891
|
-
|
|
891
|
+
_chunkOG2BNJ2Qcjs.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
|
+
_chunkOG2BNJ2Qcjs.AlertDialogAction,
|
|
900
900
|
{
|
|
901
901
|
onClick: () => void confirmClose(),
|
|
902
902
|
disabled: busy,
|
|
@@ -959,9 +959,9 @@ 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
961
|
const identity = _chunkFUXUJSPPcjs.useChatIdentity.call(void 0, );
|
|
962
|
-
const externalId =
|
|
962
|
+
const externalId = _chunkXH4MRTZMcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
963
963
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
964
|
-
const live =
|
|
964
|
+
const live = _chunkXH4MRTZMcjs.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
|
+
}, _chunkXH4MRTZMcjs.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) : [];
|
|
@@ -1054,7 +1054,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1054
1054
|
avatarUrl: avatarSrc,
|
|
1055
1055
|
timeLabel: eng.createdAt ? _chunkFUXUJSPPcjs.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, _chunkOG2BNJ2Qcjs.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 = _chunkXH4MRTZMcjs.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);
|
|
@@ -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: _chunkOG2BNJ2Qcjs.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: _chunkXH4MRTZMcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1344
1344
|
supportSystemDown,
|
|
1345
1345
|
onSendMessage: actions.sendMessage,
|
|
1346
1346
|
onClose: actions.closeTicket,
|
|
@@ -1394,7 +1394,7 @@ function HelpCenterCard({
|
|
|
1394
1394
|
onClearReplyError,
|
|
1395
1395
|
id
|
|
1396
1396
|
}) {
|
|
1397
|
-
const optimistic =
|
|
1397
|
+
const optimistic = _chunkXH4MRTZMcjs.isOptimistic.call(void 0, ticket);
|
|
1398
1398
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1399
1399
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1400
1400
|
const relativeUpdated = ticket.hubspot_updated_at ? _chunkFUXUJSPPcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
@@ -1416,7 +1416,7 @@ function HelpCenterCard({
|
|
|
1416
1416
|
});
|
|
1417
1417
|
return () => cancelAnimationFrame(raf);
|
|
1418
1418
|
}, [isExpanded]);
|
|
1419
|
-
const live =
|
|
1419
|
+
const live = _chunkXH4MRTZMcjs.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
|
+
_chunkEIAVE6SEcjs.DevCardRowContent,
|
|
1470
1470
|
{
|
|
1471
1471
|
title,
|
|
1472
1472
|
subtitle,
|
|
@@ -1567,7 +1567,7 @@ 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
|
+
_chunkBP542DGQcjs.ContactForm,
|
|
1571
1571
|
{
|
|
1572
1572
|
title: "Open a new ticket",
|
|
1573
1573
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1609,25 +1609,25 @@ function HelpCenterList({ toast: toast2 = _chunkYNGAJGYBcjs.toast, backButton, t
|
|
|
1609
1609
|
const searchParams = _chunkSADRZ4YIcjs.useSearchParams.call(void 0, );
|
|
1610
1610
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
1611
1611
|
const pathname = _chunkSADRZ4YIcjs.usePathname.call(void 0, );
|
|
1612
|
-
const search = searchParams.get(
|
|
1612
|
+
const search = searchParams.get(_chunkOG2BNJ2Qcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1613
1613
|
const status = searchParams.get("status") || "all";
|
|
1614
|
-
const ticketParam = searchParams.get(
|
|
1614
|
+
const ticketParam = searchParams.get(_chunkOG2BNJ2Qcjs.TICKET_OPEN_PARAM) || "";
|
|
1615
1615
|
const page = _chunkVTYP25OWcjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1616
1616
|
if (identity.isLoading) {
|
|
1617
1617
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1618
|
-
|
|
1618
|
+
_chunkEIAVE6SEcjs.DevSectionPage,
|
|
1619
1619
|
{
|
|
1620
1620
|
sectionKey: "tickets",
|
|
1621
1621
|
backButton,
|
|
1622
1622
|
title,
|
|
1623
1623
|
shell,
|
|
1624
1624
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1625
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1625
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEIAVE6SEcjs.DevCardRowSkeletonList, {})
|
|
1626
1626
|
}
|
|
1627
1627
|
);
|
|
1628
1628
|
}
|
|
1629
1629
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1630
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1630
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEIAVE6SEcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
1631
|
_chunk77BLJHKIcjs.EmptyState,
|
|
1632
1632
|
{
|
|
1633
1633
|
type: "generic",
|
|
@@ -1679,8 +1679,8 @@ function HelpCenterListAuthed({
|
|
|
1679
1679
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1680
1680
|
(externalId) => {
|
|
1681
1681
|
const params = new URLSearchParams(searchParams.toString());
|
|
1682
|
-
if (externalId) params.set(
|
|
1683
|
-
else params.delete(
|
|
1682
|
+
if (externalId) params.set(_chunkOG2BNJ2Qcjs.TICKET_OPEN_PARAM, externalId);
|
|
1683
|
+
else params.delete(_chunkOG2BNJ2Qcjs.TICKET_OPEN_PARAM);
|
|
1684
1684
|
const qs = params.toString();
|
|
1685
1685
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1686
1686
|
},
|
|
@@ -1757,15 +1757,15 @@ function HelpCenterListAuthed({
|
|
|
1757
1757
|
] }),
|
|
1758
1758
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1759
1759
|
] }),
|
|
1760
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1760
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEIAVE6SEcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1761
1761
|
// Bridge state — background refetch in flight and the
|
|
1762
1762
|
// optimistic placeholder was just removed by the mutation
|
|
1763
1763
|
// callback. Without this branch "No tickets yet" would flash
|
|
1764
1764
|
// for ~50ms between `removeOptimistic` and the server
|
|
1765
1765
|
// response landing.
|
|
1766
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1766
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEIAVE6SEcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1767
1767
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1768
|
-
|
|
1768
|
+
_chunkEIAVE6SEcjs.ListEmptyState,
|
|
1769
1769
|
{
|
|
1770
1770
|
isFiltered: hasActiveFilters,
|
|
1771
1771
|
filtered: {
|
|
@@ -1796,11 +1796,11 @@ function HelpCenterListAuthed({
|
|
|
1796
1796
|
/* @__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
1797
|
HelpCenterCard,
|
|
1798
1798
|
{
|
|
1799
|
-
id:
|
|
1799
|
+
id: _chunkOG2BNJ2Qcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1800
1800
|
ticket,
|
|
1801
1801
|
expanded: expandedTicketId === ticket.id,
|
|
1802
1802
|
onToggle: toggleRow,
|
|
1803
|
-
busy:
|
|
1803
|
+
busy: _chunkXH4MRTZMcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1804
1804
|
supportSystemDown,
|
|
1805
1805
|
onSendMessage: actions.sendMessage,
|
|
1806
1806
|
onClose: actions.closeTicket,
|
|
@@ -1814,7 +1814,7 @@ function HelpCenterListAuthed({
|
|
|
1814
1814
|
) }),
|
|
1815
1815
|
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk77BLJHKIcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1816
1816
|
] });
|
|
1817
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1817
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEIAVE6SEcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1818
1818
|
}
|
|
1819
1819
|
|
|
1820
1820
|
|
|
@@ -1833,4 +1833,4 @@ function HelpCenterListAuthed({
|
|
|
1833
1833
|
|
|
1834
1834
|
|
|
1835
1835
|
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-
|
|
1836
|
+
//# sourceMappingURL=chunk-FAJUQKWQ.cjs.map
|