@flamingo-stack/openframe-frontend-core 0.0.672 → 0.0.673-2406.7238.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-PSL2WBEO.cjs → chunk-26NSIJMT.cjs} +33 -33
- package/dist/{chunk-PSL2WBEO.cjs.map → chunk-26NSIJMT.cjs.map} +1 -1
- package/dist/{chunk-UOQRNZIB.cjs → chunk-6QUKYN4K.cjs} +17 -17
- package/dist/{chunk-UOQRNZIB.cjs.map → chunk-6QUKYN4K.cjs.map} +1 -1
- package/dist/{chunk-AL4I5HHB.js → chunk-BF7GZ6BS.js} +4 -4
- package/dist/{chunk-CBCETEB4.cjs → chunk-DRURJCEY.cjs} +6 -6
- package/dist/{chunk-CBCETEB4.cjs.map → chunk-DRURJCEY.cjs.map} +1 -1
- package/dist/{chunk-GV7R2NTS.cjs → chunk-G262S3Q5.cjs} +23 -23
- package/dist/{chunk-GV7R2NTS.cjs.map → chunk-G262S3Q5.cjs.map} +1 -1
- package/dist/{chunk-HVEX4BSC.cjs → chunk-HJ532KQR.cjs} +60 -45
- package/dist/chunk-HJ532KQR.cjs.map +1 -0
- package/dist/{chunk-TQPKNG2E.js → chunk-HRM6242Y.js} +3 -3
- package/dist/{chunk-HOEVEB7N.cjs → chunk-IFQMIYFO.cjs} +50 -23
- package/dist/chunk-IFQMIYFO.cjs.map +1 -0
- package/dist/{chunk-Z6E45TJM.js → chunk-IG7M3XKX.js} +5 -5
- package/dist/{chunk-EKABOXNB.js → chunk-II6ABVLK.js} +2 -2
- package/dist/{chunk-ZRIVCLPR.js → chunk-JD5TKRCU.js} +1 -1
- package/dist/chunk-JD5TKRCU.js.map +1 -0
- package/dist/{chunk-SNWAN52K.cjs → chunk-K365MY6G.cjs} +3 -3
- package/dist/{chunk-SNWAN52K.cjs.map → chunk-K365MY6G.cjs.map} +1 -1
- package/dist/{chunk-NETIHUEY.cjs → chunk-KV7W5T6U.cjs} +10 -10
- package/dist/{chunk-NETIHUEY.cjs.map → chunk-KV7W5T6U.cjs.map} +1 -1
- package/dist/{chunk-H54F476P.cjs → chunk-KYF5EONP.cjs} +3 -3
- package/dist/{chunk-H54F476P.cjs.map → chunk-KYF5EONP.cjs.map} +1 -1
- package/dist/{chunk-D55IENZJ.cjs → chunk-LCMT2GZK.cjs} +1 -1
- package/dist/chunk-LCMT2GZK.cjs.map +1 -0
- package/dist/{chunk-TFSGYKWG.js → chunk-LMUZZUYC.js} +34 -7
- package/dist/chunk-LMUZZUYC.js.map +1 -0
- package/dist/{chunk-XLJNYTUW.cjs → chunk-N6TC6IPV.cjs} +56 -55
- package/dist/chunk-N6TC6IPV.cjs.map +1 -0
- package/dist/{chunk-IBGHJLNT.js → chunk-OGOMAK7B.js} +2 -2
- package/dist/{chunk-PWPYCJ33.js → chunk-P4GUIOLP.js} +2 -2
- package/dist/{chunk-7KM34VWL.js → chunk-RRU46J3N.js} +3 -3
- package/dist/{chunk-RD3I5PBB.cjs → chunk-THSIFQGS.cjs} +15 -15
- package/dist/{chunk-RD3I5PBB.cjs.map → chunk-THSIFQGS.cjs.map} +1 -1
- package/dist/{chunk-4AZWVS7F.js → chunk-TTHBFT7Q.js} +7 -6
- package/dist/{chunk-4AZWVS7F.js.map → chunk-TTHBFT7Q.js.map} +1 -1
- package/dist/{chunk-YNGAJGYB.cjs → chunk-TZP2OXHG.cjs} +346 -6
- package/dist/chunk-TZP2OXHG.cjs.map +1 -0
- package/dist/{chunk-VZRVQEMT.cjs → chunk-U2H3C4NT.cjs} +7 -7
- package/dist/{chunk-VZRVQEMT.cjs.map → chunk-U2H3C4NT.cjs.map} +1 -1
- package/dist/{chunk-KSBDARII.js → chunk-UFMXQKVT.js} +5 -5
- package/dist/{chunk-42OVTTOM.js → chunk-UMTXGEPU.js} +18 -3
- package/dist/{chunk-42OVTTOM.js.map → chunk-UMTXGEPU.js.map} +1 -1
- package/dist/{chunk-3PVOF3IB.js → chunk-UTHZ7DLN.js} +343 -3
- package/dist/{chunk-3PVOF3IB.js.map → chunk-UTHZ7DLN.js.map} +1 -1
- package/dist/{chunk-UUOBCUHW.cjs → chunk-UXT5EK27.cjs} +3 -3
- package/dist/{chunk-UUOBCUHW.cjs.map → chunk-UXT5EK27.cjs.map} +1 -1
- package/dist/{chunk-T3KXCOB2.js → chunk-VK5737GE.js} +2 -2
- package/dist/{chunk-O5PYXQ6H.js → chunk-VKLM5UKG.js} +3 -3
- package/dist/{chunk-6S2KLT7O.js → chunk-X2DR3XNN.js} +4 -4
- package/dist/{chunk-JREG4T6K.cjs → chunk-YCYOZAB5.cjs} +3 -3
- package/dist/{chunk-JREG4T6K.cjs.map → chunk-YCYOZAB5.cjs.map} +1 -1
- package/dist/{chunk-XDTU23P4.js → chunk-YWQVL5VJ.js} +2 -2
- package/dist/{chunk-BODMICIH.cjs → chunk-Z5K4IQZU.cjs} +40 -40
- package/dist/{chunk-BODMICIH.cjs.map → chunk-Z5K4IQZU.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +15 -14
- package/dist/components/case-studies/index.cjs.map +1 -1
- package/dist/components/case-studies/index.js +6 -5
- package/dist/components/case-studies/index.js.map +1 -1
- package/dist/components/case-studies/share-experience-section.d.ts.map +1 -1
- package/dist/components/contact/contact-form.d.ts +6 -1
- package/dist/components/contact/contact-form.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/features/waitlist-form.d.ts +7 -2
- package/dist/components/features/waitlist-form.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +53 -52
- package/dist/components/help-center-pages/index.cjs.map +1 -1
- package/dist/components/help-center-pages/index.js +16 -15
- package/dist/components/help-center-pages/index.js.map +1 -1
- package/dist/components/help-center-pages/trust-center-sections.d.ts.map +1 -1
- package/dist/components/index.cjs +35 -35
- package/dist/components/index.js +14 -14
- package/dist/components/meeting-scheduler/booking-form.d.ts +4 -1
- package/dist/components/meeting-scheduler/booking-form.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +72 -37
- package/dist/components/meeting-scheduler/index.cjs.map +1 -1
- package/dist/components/meeting-scheduler/index.d.ts +5 -1
- package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.js +45 -10
- package/dist/components/meeting-scheduler/index.js.map +1 -1
- 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/tickets/help-center-create-form.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/index.js +3 -3
- package/dist/contexts/endpoints-runtime-context.d.ts +5 -0
- package/dist/contexts/endpoints-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +5 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/use-form-rescue.d.ts +37 -0
- package/dist/hooks/use-form-rescue.d.ts.map +1 -0
- package/dist/index.cjs +52 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +51 -7
- package/dist/index.js.map +1 -1
- package/dist/utils/form-rescue.cjs +123 -0
- package/dist/utils/form-rescue.cjs.map +1 -0
- package/dist/utils/form-rescue.d.ts +105 -0
- package/dist/utils/form-rescue.d.ts.map +1 -0
- package/dist/utils/form-rescue.js +101 -0
- package/dist/utils/form-rescue.js.map +1 -0
- package/dist/utils/index.cjs +119 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +99 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +7 -1
- package/src/components/case-studies/share-experience-section.tsx +1 -0
- package/src/components/contact/contact-form.tsx +38 -2
- package/src/components/features/waitlist-form.tsx +27 -2
- package/src/components/help-center-pages/trust-center-sections.tsx +1 -0
- package/src/components/meeting-scheduler/booking-form.tsx +14 -0
- package/src/components/meeting-scheduler/index.tsx +38 -3
- package/src/components/tickets/help-center-create-form.tsx +2 -0
- package/src/contexts/endpoints-runtime-context.tsx +5 -0
- package/src/hooks/__tests__/use-form-rescue.test.tsx +189 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/use-form-rescue.ts +315 -0
- package/src/utils/__tests__/form-rescue.test.ts +106 -0
- package/src/utils/form-rescue.ts +198 -0
- package/src/utils/index.ts +5 -0
- package/dist/chunk-D55IENZJ.cjs.map +0 -1
- package/dist/chunk-HOEVEB7N.cjs.map +0 -1
- package/dist/chunk-HVEX4BSC.cjs.map +0 -1
- package/dist/chunk-TFSGYKWG.js.map +0 -1
- package/dist/chunk-XLJNYTUW.cjs.map +0 -1
- package/dist/chunk-YNGAJGYB.cjs.map +0 -1
- package/dist/chunk-ZRIVCLPR.js.map +0 -1
- /package/dist/{chunk-AL4I5HHB.js.map → chunk-BF7GZ6BS.js.map} +0 -0
- /package/dist/{chunk-TQPKNG2E.js.map → chunk-HRM6242Y.js.map} +0 -0
- /package/dist/{chunk-Z6E45TJM.js.map → chunk-IG7M3XKX.js.map} +0 -0
- /package/dist/{chunk-EKABOXNB.js.map → chunk-II6ABVLK.js.map} +0 -0
- /package/dist/{chunk-IBGHJLNT.js.map → chunk-OGOMAK7B.js.map} +0 -0
- /package/dist/{chunk-PWPYCJ33.js.map → chunk-P4GUIOLP.js.map} +0 -0
- /package/dist/{chunk-7KM34VWL.js.map → chunk-RRU46J3N.js.map} +0 -0
- /package/dist/{chunk-KSBDARII.js.map → chunk-UFMXQKVT.js.map} +0 -0
- /package/dist/{chunk-T3KXCOB2.js.map → chunk-VK5737GE.js.map} +0 -0
- /package/dist/{chunk-O5PYXQ6H.js.map → chunk-VKLM5UKG.js.map} +0 -0
- /package/dist/{chunk-6S2KLT7O.js.map → chunk-X2DR3XNN.js.map} +0 -0
- /package/dist/{chunk-XDTU23P4.js.map → chunk-YWQVL5VJ.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 _chunkIFQMIYFOcjs = require('./chunk-IFQMIYFO.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkKV7W5T6Ucjs = require('./chunk-KV7W5T6U.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 _chunkK365MY6Gcjs = require('./chunk-K365MY6G.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -35,11 +35,11 @@ var _chunkSNWAN52Kcjs = require('./chunk-SNWAN52K.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkHJ532KQRcjs = require('./chunk-HJ532KQR.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunkTZP2OXHGcjs = require('./chunk-TZP2OXHG.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
@@ -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 = _chunkK365MY6Gcjs.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(_chunkK365MY6Gcjs.TOAST_COPY.open_mirror_pending);
|
|
280
280
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
281
281
|
} else {
|
|
282
|
-
toast2(
|
|
282
|
+
toast2(_chunkK365MY6Gcjs.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
|
+
_chunkK365MY6Gcjs.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
|
+
_chunkK365MY6Gcjs.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" }, _chunkK365MY6Gcjs.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(_chunkK365MY6Gcjs.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 } = _chunk3UDBK2YGcjs.useChatAttachments.call(void 0, );
|
|
617
617
|
const trimmedSubject = subject.trim();
|
|
618
618
|
const trimmedContent = content.trim();
|
|
619
|
-
const overCap = content.length >
|
|
619
|
+
const overCap = content.length > _chunkK365MY6Gcjs.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", ..._chunkHJ532KQRcjs.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
|
+
_chunkHJ532KQRcjs.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
|
+
_chunkK365MY6Gcjs.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, _chunkKV7W5T6Ucjs.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: _chunkK365MY6Gcjs.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, _chunkHJ532KQRcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHJ532KQRcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
874
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHJ532KQRcjs.AlertDialogHeader, { children: [
|
|
875
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJ532KQRcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
876
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJ532KQRcjs.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
|
+
_chunkHJ532KQRcjs.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: _chunkK365MY6Gcjs.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, _chunkHJ532KQRcjs.AlertDialogFooter, { children: [
|
|
890
890
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
891
|
-
|
|
891
|
+
_chunkHJ532KQRcjs.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
|
+
_chunkHJ532KQRcjs.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 = _chunk3UDBK2YGcjs.useChatIdentity.call(void 0, );
|
|
962
|
-
const externalId =
|
|
962
|
+
const externalId = _chunkK365MY6Gcjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
963
963
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
964
|
-
const live =
|
|
964
|
+
const live = _chunkK365MY6Gcjs.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
|
+
}, _chunkK365MY6Gcjs.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 ? _chunk3UDBK2YGcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1056
1056
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1057
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1057
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJ532KQRcjs.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 = _chunkK365MY6Gcjs.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);
|
|
@@ -1237,7 +1237,7 @@ function TicketRow({
|
|
|
1237
1237
|
|
|
1238
1238
|
// src/components/tickets/ticket-center.tsx
|
|
1239
1239
|
|
|
1240
|
-
function TicketCenter({ toast: toast2 =
|
|
1240
|
+
function TicketCenter({ toast: toast2 = _chunkTZP2OXHGcjs.toast } = {}) {
|
|
1241
1241
|
const identity = _chunk3UDBK2YGcjs.useChatIdentity.call(void 0, );
|
|
1242
1242
|
if (identity.isLoading) {
|
|
1243
1243
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
@@ -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: _chunkHJ532KQRcjs.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: _chunkK365MY6Gcjs.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 = _chunkK365MY6Gcjs.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 ? _chunk3UDBK2YGcjs.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 = _chunkK365MY6Gcjs.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
|
+
_chunkKV7W5T6Ucjs.DevCardRowContent,
|
|
1470
1470
|
{
|
|
1471
1471
|
title,
|
|
1472
1472
|
subtitle,
|
|
@@ -1567,8 +1567,9 @@ function HelpCenterCreateForm({
|
|
|
1567
1567
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1568
1568
|
] });
|
|
1569
1569
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1570
|
-
|
|
1570
|
+
_chunkIFQMIYFOcjs.ContactForm,
|
|
1571
1571
|
{
|
|
1572
|
+
rescueFormId: null,
|
|
1572
1573
|
title: "Open a new ticket",
|
|
1573
1574
|
footerText: "The support team typically responds within one business day.",
|
|
1574
1575
|
hideFields: ["name", "email", "companySize", "referralSource", "helpCategory"],
|
|
@@ -1604,30 +1605,30 @@ function HelpCenterCreateForm({
|
|
|
1604
1605
|
|
|
1605
1606
|
// src/components/tickets/help-center-list.tsx
|
|
1606
1607
|
|
|
1607
|
-
function HelpCenterList({ toast: toast2 =
|
|
1608
|
+
function HelpCenterList({ toast: toast2 = _chunkTZP2OXHGcjs.toast, backButton, title, shell } = {}) {
|
|
1608
1609
|
const identity = _chunk3UDBK2YGcjs.useChatIdentity.call(void 0, );
|
|
1609
1610
|
const searchParams = _chunkSADRZ4YIcjs.useSearchParams.call(void 0, );
|
|
1610
1611
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
1611
1612
|
const pathname = _chunkSADRZ4YIcjs.usePathname.call(void 0, );
|
|
1612
|
-
const search = searchParams.get(
|
|
1613
|
+
const search = searchParams.get(_chunkHJ532KQRcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1613
1614
|
const status = searchParams.get("status") || "all";
|
|
1614
|
-
const ticketParam = searchParams.get(
|
|
1615
|
+
const ticketParam = searchParams.get(_chunkHJ532KQRcjs.TICKET_OPEN_PARAM) || "";
|
|
1615
1616
|
const page = _chunkVTYP25OWcjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1616
1617
|
if (identity.isLoading) {
|
|
1617
1618
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1618
|
-
|
|
1619
|
+
_chunkKV7W5T6Ucjs.DevSectionPage,
|
|
1619
1620
|
{
|
|
1620
1621
|
sectionKey: "tickets",
|
|
1621
1622
|
backButton,
|
|
1622
1623
|
title,
|
|
1623
1624
|
shell,
|
|
1624
1625
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1625
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1626
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKV7W5T6Ucjs.DevCardRowSkeletonList, {})
|
|
1626
1627
|
}
|
|
1627
1628
|
);
|
|
1628
1629
|
}
|
|
1629
1630
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1630
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKV7W5T6Ucjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
1632
|
_chunk77BLJHKIcjs.EmptyState,
|
|
1632
1633
|
{
|
|
1633
1634
|
type: "generic",
|
|
@@ -1679,8 +1680,8 @@ function HelpCenterListAuthed({
|
|
|
1679
1680
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1680
1681
|
(externalId) => {
|
|
1681
1682
|
const params = new URLSearchParams(searchParams.toString());
|
|
1682
|
-
if (externalId) params.set(
|
|
1683
|
-
else params.delete(
|
|
1683
|
+
if (externalId) params.set(_chunkHJ532KQRcjs.TICKET_OPEN_PARAM, externalId);
|
|
1684
|
+
else params.delete(_chunkHJ532KQRcjs.TICKET_OPEN_PARAM);
|
|
1684
1685
|
const qs = params.toString();
|
|
1685
1686
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1686
1687
|
},
|
|
@@ -1737,7 +1738,7 @@ function HelpCenterListAuthed({
|
|
|
1737
1738
|
[tickets, ticketParam, setOpenTicket]
|
|
1738
1739
|
);
|
|
1739
1740
|
const merged = [...optimisticTickets, ...tickets];
|
|
1740
|
-
|
|
1741
|
+
_chunkTZP2OXHGcjs.useScrollToHash.call(void 0, tickets, { headerOffset: _chunkV2A4MAALcjs.STICKY_HEADER_OFFSET_PX });
|
|
1741
1742
|
const hasActiveFilters = search !== "" || status !== "" && status !== "all";
|
|
1742
1743
|
const hasResults = merged.length > 0;
|
|
1743
1744
|
const form = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1757,15 +1758,15 @@ function HelpCenterListAuthed({
|
|
|
1757
1758
|
] }),
|
|
1758
1759
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1759
1760
|
] }),
|
|
1760
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1761
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKV7W5T6Ucjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1761
1762
|
// Bridge state — background refetch in flight and the
|
|
1762
1763
|
// optimistic placeholder was just removed by the mutation
|
|
1763
1764
|
// callback. Without this branch "No tickets yet" would flash
|
|
1764
1765
|
// for ~50ms between `removeOptimistic` and the server
|
|
1765
1766
|
// response landing.
|
|
1766
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKV7W5T6Ucjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1767
1768
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1768
|
-
|
|
1769
|
+
_chunkKV7W5T6Ucjs.ListEmptyState,
|
|
1769
1770
|
{
|
|
1770
1771
|
isFiltered: hasActiveFilters,
|
|
1771
1772
|
filtered: {
|
|
@@ -1796,11 +1797,11 @@ function HelpCenterListAuthed({
|
|
|
1796
1797
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full overflow-clip rounded-[6px] border border-ods-border bg-ods-card", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1797
1798
|
HelpCenterCard,
|
|
1798
1799
|
{
|
|
1799
|
-
id:
|
|
1800
|
+
id: _chunkHJ532KQRcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1800
1801
|
ticket,
|
|
1801
1802
|
expanded: expandedTicketId === ticket.id,
|
|
1802
1803
|
onToggle: toggleRow,
|
|
1803
|
-
busy:
|
|
1804
|
+
busy: _chunkK365MY6Gcjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1804
1805
|
supportSystemDown,
|
|
1805
1806
|
onSendMessage: actions.sendMessage,
|
|
1806
1807
|
onClose: actions.closeTicket,
|
|
@@ -1814,7 +1815,7 @@ function HelpCenterListAuthed({
|
|
|
1814
1815
|
) }),
|
|
1815
1816
|
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk77BLJHKIcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1816
1817
|
] });
|
|
1817
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1818
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKV7W5T6Ucjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1818
1819
|
}
|
|
1819
1820
|
|
|
1820
1821
|
|
|
@@ -1833,4 +1834,4 @@ function HelpCenterListAuthed({
|
|
|
1833
1834
|
|
|
1834
1835
|
|
|
1835
1836
|
exports.useTicketActions = useTicketActions; exports.mapTicketActionError = mapTicketActionError; exports.useTicketsList = useTicketsList; exports.TicketOpenForm = TicketOpenForm; exports.useTicketEngagements = useTicketEngagements; exports.TicketLinkedDeliveryCard = TicketLinkedDeliveryCard; exports.TicketReplyComposer = TicketReplyComposer; exports.TicketDetailDrawer = TicketDetailDrawer; exports.TicketRow = TicketRow; exports.TicketCenter = TicketCenter; exports.HelpCenterCard = HelpCenterCard; exports.HelpCenterCreateFormSkeleton = HelpCenterCreateFormSkeleton; exports.HelpCenterCreateForm = HelpCenterCreateForm; exports.HelpCenterList = HelpCenterList;
|
|
1836
|
-
//# sourceMappingURL=chunk-
|
|
1837
|
+
//# sourceMappingURL=chunk-N6TC6IPV.cjs.map
|