@flamingo-stack/openframe-frontend-core 0.0.726 → 0.0.728
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-3UZET2G7.js → chunk-2F4DO7DS.js} +2 -2
- package/dist/{chunk-X2PG6XWF.cjs → chunk-32QAIKXR.cjs} +9 -9
- package/dist/{chunk-Q2G7NVFH.cjs → chunk-33QHEG7K.cjs} +289 -285
- package/dist/{chunk-VPABPC2M.cjs → chunk-4ICMFNCJ.cjs} +29 -56
- package/dist/{chunk-MZY6LBM5.cjs → chunk-5K3QUH7C.cjs} +3 -3
- package/dist/{chunk-AZKVHJA5.js → chunk-66XG5RFJ.js} +2 -2
- package/dist/{chunk-DXDLCYCM.cjs → chunk-7N6M77PI.cjs} +3 -3
- package/dist/{chunk-4ND65E2B.cjs → chunk-7VYBSCCL.cjs} +35 -35
- package/dist/{chunk-R3BOJNZI.cjs → chunk-APJCBQ7X.cjs} +16 -16
- package/dist/{chunk-RVSNXG6J.cjs → chunk-CELBOIKC.cjs} +488 -421
- package/dist/{chunk-MZ3TMXIX.cjs → chunk-CI7KWY6L.cjs} +3 -3
- package/dist/{chunk-COFT3YPA.js → chunk-EM3WCK2K.js} +5 -5
- package/dist/{chunk-YVWJ3TRY.js → chunk-GEUUDNCI.js} +5 -5
- package/dist/{chunk-SCTS3EMJ.js → chunk-GINCQZMM.js} +3 -3
- package/dist/{chunk-4VRHDFF2.js → chunk-HP4C2DFL.js} +1 -1
- package/dist/{chunk-NLWIBA55.js → chunk-HTQJSW3Y.js} +3 -3
- package/dist/{chunk-EHYAOIE4.cjs → chunk-OKEJY2GC.cjs} +8 -8
- package/dist/{chunk-RSE3MU4G.cjs → chunk-OYU7QNLQ.cjs} +11 -11
- package/dist/{chunk-NZYMMYWN.js → chunk-QL4RUHKU.js} +1 -1
- package/dist/{chunk-5SWQ2ZU5.cjs → chunk-RMXLHYEG.cjs} +26 -26
- package/dist/{chunk-MM66P4X4.js → chunk-SKEW5NMJ.js} +22 -49
- package/dist/{chunk-XEIDJ6SL.cjs → chunk-SSXQYS5K.cjs} +65 -65
- package/dist/{chunk-3XDVGHL4.js → chunk-TYMLEI2I.js} +2 -2
- package/dist/{chunk-SBPPM65Y.js → chunk-UF3NFAQK.js} +265 -198
- package/dist/{chunk-FMFCPX3R.cjs → chunk-UJZ5Y3RK.cjs} +33 -33
- package/dist/{chunk-C5KMQLJP.js → chunk-URYLQ4MC.js} +15 -11
- package/dist/{chunk-MQ3ZM7FJ.js → chunk-VGRQK7YS.js} +1 -1
- package/dist/{chunk-JYJBL7GD.js → chunk-XYSKJ7GA.js} +1 -1
- package/dist/{chunk-Z3VAFLYK.cjs → chunk-YREYU6DY.cjs} +9 -9
- package/dist/{chunk-VKR56R3U.js → chunk-ZDGK2TNJ.js} +3 -3
- package/dist/{cloud-tenants-5JTQ2ENQ.cjs → cloud-tenants-XP3L6PWO.cjs} +3 -3
- package/dist/{cloud-tenants-NH7VE7KE.js → cloud-tenants-XVVFCOK2.js} +2 -2
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/assistant-ask-prompts.d.ts +34 -14
- package/dist/components/chat/assistant-ask-prompts.d.ts.map +1 -1
- package/dist/components/chat/hooks/index.d.ts +1 -1
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-ask-prompts.d.ts +34 -7
- package/dist/components/chat/hooks/use-ask-prompts.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -4
- package/dist/components/chat/index.js +3 -5
- 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/faq-ask-card.d.ts +8 -11
- package/dist/components/faq/faq-ask-card.d.ts.map +1 -1
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/auth/auth-benefits-panel.d.ts +3 -1
- package/dist/components/features/auth/auth-benefits-panel.d.ts.map +1 -1
- package/dist/components/features/auth/auth-shell.d.ts +3 -1
- package/dist/components/features/auth/auth-shell.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +71 -71
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +35 -37
- package/dist/components/index.js +14 -16
- package/dist/components/meeting-scheduler/index.cjs +19 -19
- 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 +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/product-demo/index.cjs +6 -6
- package/dist/components/product-demo/index.js +6 -6
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -5
- package/dist/components/ui/index.js +4 -6
- package/dist/{devices-PV76NGQO.cjs → devices-MMHLY67A.cjs} +4 -4
- package/dist/{devices-OC7JEI6U.js → devices-S7PJJI66.js} +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +14 -14
- package/dist/{knowledge-5AYFIVKD.cjs → knowledge-LJNFAJNE.cjs} +4 -4
- package/dist/{knowledge-L7WQ7IEP.js → knowledge-WW3LOQKN.js} +2 -2
- package/dist/{logs-4F77RJXJ.cjs → logs-F4ZVNUKQ.cjs} +11 -11
- package/dist/{logs-MGFHGVIE.js → logs-I4DMHQDA.js} +2 -2
- package/dist/{policies-VCGM3C5Z.cjs → policies-KZXFXGD7.cjs} +7 -7
- package/dist/{policies-WRDZFNIB.js → policies-RX55V46V.js} +2 -2
- package/dist/{software-update-YD2MNL3K.cjs → software-update-4A242VDB.cjs} +6 -6
- package/dist/{software-update-WVG2GDZO.js → software-update-VI7FQYR4.js} +2 -2
- package/dist/utils/index.cjs +8 -6
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +6 -5
- package/dist/utils/trial.d.ts +17 -9
- package/dist/utils/trial.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/assistant-ask-prompts.tsx +84 -39
- package/src/components/chat/hooks/index.ts +3 -2
- package/src/components/chat/hooks/use-ask-prompts.ts +140 -56
- package/src/components/faq/faq-ask-card.tsx +22 -67
- package/src/components/features/auth/auth-benefits-panel.tsx +15 -8
- package/src/components/features/auth/auth-shell.tsx +4 -2
- package/src/utils/index.ts +1 -1
- package/src/utils/trial.ts +16 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
PageShell
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-URYLQ4MC.js";
|
|
5
5
|
import {
|
|
6
6
|
PageLayout
|
|
7
7
|
} from "./chunk-TU5LEF6A.js";
|
|
@@ -9,18 +9,13 @@ import {
|
|
|
9
9
|
useScrollToHash
|
|
10
10
|
} from "./chunk-2TXGR7IK.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
AskCard,
|
|
12
|
+
AssistantAskPrompts,
|
|
14
13
|
assistantAvailable,
|
|
15
14
|
faqItemAnchor,
|
|
16
15
|
faqSectionSlug,
|
|
17
|
-
parseFaqHash
|
|
18
|
-
|
|
19
|
-
useAssistantOpen,
|
|
20
|
-
useShownAskPromptIds
|
|
21
|
-
} from "./chunk-SBPPM65Y.js";
|
|
16
|
+
parseFaqHash
|
|
17
|
+
} from "./chunk-UF3NFAQK.js";
|
|
22
18
|
import {
|
|
23
|
-
AssistantRuntimeContext,
|
|
24
19
|
useAssistantRuntime
|
|
25
20
|
} from "./chunk-AFTRPEXO.js";
|
|
26
21
|
import {
|
|
@@ -50,7 +45,7 @@ import {
|
|
|
50
45
|
} from "./chunk-7RXWKTAP.js";
|
|
51
46
|
|
|
52
47
|
// src/components/faq/faq-section.tsx
|
|
53
|
-
import { useCallback, useEffect, useMemo
|
|
48
|
+
import { useCallback, useEffect, useMemo, useRef, useState as useState3 } from "react";
|
|
54
49
|
|
|
55
50
|
// src/components/faq-accordion.tsx
|
|
56
51
|
import { useState } from "react";
|
|
@@ -119,51 +114,29 @@ function FaqAccordion({ items, defaultOpenIds = [] }) {
|
|
|
119
114
|
}
|
|
120
115
|
|
|
121
116
|
// src/components/faq/faq-ask-card.tsx
|
|
122
|
-
import {
|
|
117
|
+
import { useState as useState2 } from "react";
|
|
123
118
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
124
|
-
var DEFAULT_ASK_CARD = {
|
|
125
|
-
title: "Still deciding?",
|
|
126
|
-
description: "{assistant} answers from our docs and customer stories."
|
|
127
|
-
};
|
|
128
119
|
var PICK_ROOT_MARGIN = "600px";
|
|
129
|
-
var fillAssistant = (text, name) => text.split("{assistant}").join(name);
|
|
130
120
|
function faqAskCardShown(assistant) {
|
|
131
121
|
return assistantAvailable(assistant) && !!assistant.name;
|
|
132
122
|
}
|
|
133
123
|
function FaqAskCard({ topic, exclude, count, title, description, onOpen }) {
|
|
134
|
-
const assistant = useAssistantRuntime();
|
|
135
124
|
const { ref, inView } = useInView({ rootMargin: PICK_ROOT_MARGIN });
|
|
136
125
|
const [reached, setReached] = useState2(false);
|
|
137
126
|
if (inView && !reached) setReached(true);
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
const slots = count ?? assistant?.askCard?.count ?? ASK_PROMPTS_DEFAULT_COUNT;
|
|
141
|
-
const { prompts, isLoading, supported } = useAskPrompts({
|
|
142
|
-
topic,
|
|
143
|
-
count: slots,
|
|
144
|
-
exclude: excluded ?? void 0,
|
|
145
|
-
enabled: reached && excluded !== null
|
|
146
|
-
});
|
|
147
|
-
const open = useAssistantOpen(topic, onOpen);
|
|
148
|
-
const scoped = useMemo(() => assistant ? { ...assistant, open } : null, [assistant, open]);
|
|
149
|
-
if (!faqAskCardShown(assistant) || !assistant.name) return null;
|
|
150
|
-
const name = assistant.name;
|
|
151
|
-
const cardDescription = description ?? assistant.askCard?.description ?? DEFAULT_ASK_CARD.description;
|
|
152
|
-
return /* @__PURE__ */ jsx2(AssistantRuntimeContext.Provider, { value: scoped, children: /* @__PURE__ */ jsx2("div", { ref, children: /* @__PURE__ */ jsx2(
|
|
153
|
-
AskCard,
|
|
127
|
+
return /* @__PURE__ */ jsx2("div", { ref, children: /* @__PURE__ */ jsx2(
|
|
128
|
+
AssistantAskPrompts,
|
|
154
129
|
{
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
onOpen: open,
|
|
164
|
-
onAsk: (prompt) => assistant.onAsk?.({ promptId: prompt.id, topic })
|
|
130
|
+
variant: "card",
|
|
131
|
+
topic,
|
|
132
|
+
count,
|
|
133
|
+
exclude,
|
|
134
|
+
enabled: reached,
|
|
135
|
+
title,
|
|
136
|
+
description,
|
|
137
|
+
onOpen
|
|
165
138
|
}
|
|
166
|
-
) })
|
|
139
|
+
) });
|
|
167
140
|
}
|
|
168
141
|
|
|
169
142
|
// src/components/faq/json-ld.ts
|
|
@@ -229,7 +202,7 @@ function GroupedFaqList({
|
|
|
229
202
|
aside
|
|
230
203
|
}) {
|
|
231
204
|
const CategoryHeading = categoryHeadingAs;
|
|
232
|
-
const navGroups =
|
|
205
|
+
const navGroups = useMemo(() => groups.filter((g) => g.slug), [groups]);
|
|
233
206
|
const [activeSlug, setActiveSlug] = useState3(navGroups[0]?.slug ?? null);
|
|
234
207
|
const slugKey = navGroups.map((g) => g.slug).join("|");
|
|
235
208
|
const navGroupsRef = useRef(navGroups);
|
|
@@ -271,7 +244,7 @@ function GroupedFaqList({
|
|
|
271
244
|
window.addEventListener("hashchange", refresh);
|
|
272
245
|
return () => window.removeEventListener("hashchange", refresh);
|
|
273
246
|
}, []);
|
|
274
|
-
const defaultOpenByGroupKey =
|
|
247
|
+
const defaultOpenByGroupKey = useMemo(() => {
|
|
275
248
|
if (hashTarget?.kind !== "item") return null;
|
|
276
249
|
const targetId = hashTarget.rawId;
|
|
277
250
|
const result = /* @__PURE__ */ new Map();
|
|
@@ -368,13 +341,13 @@ function FaqSection({
|
|
|
368
341
|
const askTopic = ask === false ? void 0 : ask?.topic || entityType;
|
|
369
342
|
const aside = asideProp ?? (ask !== false && askTopic && faqAskCardShown(assistant) ? /* @__PURE__ */ jsx3(FaqAskCard, { ...ask, topic: askTopic }) : void 0);
|
|
370
343
|
const url = buildFaqsUrl(entityType, entityId, minResults, apiBaseUrl);
|
|
371
|
-
const initialData =
|
|
344
|
+
const initialData = useMemo(
|
|
372
345
|
() => initialFaqs ? { faqs: initialFaqs } : void 0,
|
|
373
346
|
[initialFaqs]
|
|
374
347
|
);
|
|
375
348
|
const { data, isLoading, error } = useSelfFetch(url, { initialData });
|
|
376
|
-
const faqs =
|
|
377
|
-
const groups =
|
|
349
|
+
const faqs = useMemo(() => data?.faqs ?? [], [data?.faqs]);
|
|
350
|
+
const groups = useMemo(() => faqs.length > 0 ? groupFaqsBySection(faqs) : [], [faqs]);
|
|
378
351
|
const headingNode = heading === void 0 ? /* @__PURE__ */ jsx3("h2", { className: SECTION_HEADING_CLASS, children: DEFAULT_HEADING_TEXT }) : heading;
|
|
379
352
|
if (error) return null;
|
|
380
353
|
if (!isLoading && faqs.length === 0) return null;
|
|
@@ -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 _chunkOKEJY2GCcjs = require('./chunk-OKEJY2GC.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkYREYU6DYcjs = require('./chunk-YREYU6DY.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ var _chunkZSOFLPQNcjs = require('./chunk-ZSOFLPQN.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunk5K3QUH7Ccjs = require('./chunk-5K3QUH7C.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -31,7 +31,7 @@ var _chunkMZY6LBM5cjs = require('./chunk-MZY6LBM5.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunk33QHEG7Kcjs = require('./chunk-33QHEG7K.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -48,7 +48,7 @@ var _chunk4LY6R4TNcjs = require('./chunk-4LY6R4TN.cjs');
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunkCELBOIKCcjs = require('./chunk-CELBOIKC.cjs');
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
var _chunkHP4UUBJCcjs = require('./chunk-HP4UUBJC.cjs');
|
|
@@ -122,7 +122,7 @@ var TicketActionFailure = class extends Error {
|
|
|
122
122
|
function useTicketActions(options) {
|
|
123
123
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
124
124
|
const ticketActionEndpoint = _nullishCoalesce(_chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
125
|
-
const ticketLive =
|
|
125
|
+
const ticketLive = _chunk5K3QUH7Ccjs.useOptionalTicketLive.call(void 0, );
|
|
126
126
|
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _2 => _2.notifyTicketCreated]);
|
|
127
127
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
128
128
|
const formInFlightRef = _react.useRef.call(void 0, null);
|
|
@@ -283,10 +283,10 @@ function useTicketActions(options) {
|
|
|
283
283
|
..._optionalChain([input, 'access', _3 => _3.attachments, 'optionalAccess', _4 => _4.length]) ? { attachments: input.attachments } : {}
|
|
284
284
|
});
|
|
285
285
|
if (result.mirror_synced === false) {
|
|
286
|
-
toast2(
|
|
286
|
+
toast2(_chunk5K3QUH7Ccjs.TOAST_COPY.open_mirror_pending);
|
|
287
287
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
288
288
|
} else {
|
|
289
|
-
toast2(
|
|
289
|
+
toast2(_chunk5K3QUH7Ccjs.TOAST_COPY.open_success);
|
|
290
290
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
291
291
|
removeOptimistic(placeholderId);
|
|
292
292
|
}
|
|
@@ -372,7 +372,7 @@ function useTicketActions(options) {
|
|
|
372
372
|
...hasText ? { content_addendum: trimmed } : {},
|
|
373
373
|
...hasFiles ? { attachments } : {}
|
|
374
374
|
},
|
|
375
|
-
|
|
375
|
+
_chunk5K3QUH7Ccjs.TOAST_COPY.comment_success,
|
|
376
376
|
"send message"
|
|
377
377
|
);
|
|
378
378
|
if (ok) {
|
|
@@ -395,13 +395,13 @@ function useTicketActions(options) {
|
|
|
395
395
|
status: "CLOSED",
|
|
396
396
|
..._optionalChain([resolution, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ? { resolution: resolution.trim() } : {}
|
|
397
397
|
},
|
|
398
|
-
|
|
398
|
+
_chunk5K3QUH7Ccjs.TOAST_COPY.close_success,
|
|
399
399
|
"close ticket"
|
|
400
400
|
),
|
|
401
401
|
[updateTicket]
|
|
402
402
|
);
|
|
403
403
|
const reopenTicket = _react.useCallback.call(void 0,
|
|
404
|
-
(ticket) => updateTicket(ticket, { status: "OPEN" },
|
|
404
|
+
(ticket) => updateTicket(ticket, { status: "OPEN" }, _chunk5K3QUH7Ccjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
405
405
|
[updateTicket]
|
|
406
406
|
);
|
|
407
407
|
return _react.useMemo.call(void 0,
|
|
@@ -616,14 +616,14 @@ function useTicketsList(filters) {
|
|
|
616
616
|
// src/components/tickets/ticket-open-form.tsx
|
|
617
617
|
|
|
618
618
|
var _jsxruntime = require('react/jsx-runtime');
|
|
619
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
619
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunk5K3QUH7Ccjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
620
620
|
function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
621
621
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
622
622
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
623
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
623
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkCELBOIKCcjs.useChatAttachments.call(void 0, );
|
|
624
624
|
const trimmedSubject = subject.trim();
|
|
625
625
|
const trimmedContent = content.trim();
|
|
626
|
-
const overCap = content.length >
|
|
626
|
+
const overCap = content.length > _chunk5K3QUH7Ccjs.TICKET_TEXT_MAX_CHARS;
|
|
627
627
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
628
628
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
629
629
|
const handleSubmit = async (e) => {
|
|
@@ -640,7 +640,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
640
640
|
clear();
|
|
641
641
|
}
|
|
642
642
|
};
|
|
643
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHEQ4GPYEcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ...
|
|
643
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHEQ4GPYEcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ..._chunkCELBOIKCcjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
644
644
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1 md:max-w-md", children: [
|
|
645
645
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-ods-text-primary text-h2", children: "Need Support?" }),
|
|
646
646
|
/* @__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." }),
|
|
@@ -665,7 +665,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
665
665
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
666
666
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-content", className: "mb-1 block text-ods-text-primary text-h6", children: "Your Message" }),
|
|
667
667
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
668
|
-
|
|
668
|
+
_chunk33QHEG7Kcjs.Textarea,
|
|
669
669
|
{
|
|
670
670
|
id: "ticket-content",
|
|
671
671
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -679,11 +679,11 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
679
679
|
showCounter && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: `mt-1 text-right text-h6 ${overCap ? "text-ods-error" : "text-ods-text-secondary"}`, children: [
|
|
680
680
|
content.length,
|
|
681
681
|
"/",
|
|
682
|
-
|
|
682
|
+
_chunk5K3QUH7Ccjs.TICKET_TEXT_MAX_CHARS
|
|
683
683
|
] })
|
|
684
684
|
] }),
|
|
685
685
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
686
|
-
|
|
686
|
+
_chunkCELBOIKCcjs.ChatAttachmentChipStrip,
|
|
687
687
|
{
|
|
688
688
|
attachments,
|
|
689
689
|
onRemove: removeAttachment,
|
|
@@ -692,7 +692,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
692
692
|
),
|
|
693
693
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
694
694
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
695
|
-
|
|
695
|
+
_chunkCELBOIKCcjs.ChatAttachmentAddButton,
|
|
696
696
|
{
|
|
697
697
|
attachmentsEnabled: !supportSystemDown,
|
|
698
698
|
attachmentsCount: attachments.length,
|
|
@@ -722,7 +722,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
722
722
|
|
|
723
723
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
724
724
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
725
|
-
const identity =
|
|
725
|
+
const identity = _chunkCELBOIKCcjs.useChatIdentity.call(void 0, );
|
|
726
726
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]), () => ( "anon"));
|
|
727
727
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
728
728
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -795,7 +795,7 @@ function TicketLinkedDeliveryCard({ clickup, className }) {
|
|
|
795
795
|
dateClosed: clickup.date_closed,
|
|
796
796
|
clickupUrl: _nullishCoalesce(clickup.clickup_url, () => ( ""))
|
|
797
797
|
};
|
|
798
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${_chunkHEQ4GPYEcjs.CONTENT_CARD_SKELETON_FRAME_CLASS} ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
798
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${_chunkHEQ4GPYEcjs.CONTENT_CARD_SKELETON_FRAME_CLASS} ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYREYU6DYcjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
799
799
|
}
|
|
800
800
|
|
|
801
801
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -810,7 +810,7 @@ function TicketReplyComposer({
|
|
|
810
810
|
}) {
|
|
811
811
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
812
812
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
813
|
-
const attachments =
|
|
813
|
+
const attachments = _chunkCELBOIKCcjs.useChatAttachments.call(void 0, );
|
|
814
814
|
const { readyAttachments, clear: clearAttachments } = attachments;
|
|
815
815
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
816
816
|
const hasReadyFiles = readyAttachments.length > 0;
|
|
@@ -831,7 +831,7 @@ function TicketReplyComposer({
|
|
|
831
831
|
const disabled = busy || supportSystemDown;
|
|
832
832
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
833
833
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
834
|
-
|
|
834
|
+
_chunkCELBOIKCcjs.ChatAttachmentChipStrip,
|
|
835
835
|
{
|
|
836
836
|
attachments: attachments.attachments,
|
|
837
837
|
onRemove: attachments.removeAttachment,
|
|
@@ -848,13 +848,13 @@ function TicketReplyComposer({
|
|
|
848
848
|
sending: busy || attachments.hasInflightUploads,
|
|
849
849
|
disabled: supportSystemDown,
|
|
850
850
|
allowEmptySend: hasReadyFiles,
|
|
851
|
-
maxLength:
|
|
851
|
+
maxLength: _chunk5K3QUH7Ccjs.TICKET_TEXT_MAX_CHARS,
|
|
852
852
|
onSend: handleSend
|
|
853
853
|
}
|
|
854
854
|
),
|
|
855
855
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-2", children: [
|
|
856
856
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
857
|
-
|
|
857
|
+
_chunkCELBOIKCcjs.ChatAttachmentAddButton,
|
|
858
858
|
{
|
|
859
859
|
attachmentsEnabled: true,
|
|
860
860
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -877,25 +877,25 @@ function TicketReplyComposer({
|
|
|
877
877
|
}
|
|
878
878
|
)
|
|
879
879
|
] }),
|
|
880
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
881
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
882
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
883
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
880
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk33QHEG7Kcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk33QHEG7Kcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
881
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk33QHEG7Kcjs.AlertDialogHeader, { children: [
|
|
882
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk33QHEG7Kcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
883
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk33QHEG7Kcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
884
884
|
] }),
|
|
885
885
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
886
|
-
|
|
886
|
+
_chunk33QHEG7Kcjs.Textarea,
|
|
887
887
|
{
|
|
888
888
|
value: resolution,
|
|
889
889
|
onChange: (e) => setResolution(e.target.value),
|
|
890
890
|
placeholder: "Resolution (optional)",
|
|
891
891
|
rows: 3,
|
|
892
|
-
maxLength:
|
|
892
|
+
maxLength: _chunk5K3QUH7Ccjs.TICKET_TEXT_MAX_CHARS,
|
|
893
893
|
className: "mt-2"
|
|
894
894
|
}
|
|
895
895
|
),
|
|
896
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
896
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk33QHEG7Kcjs.AlertDialogFooter, { children: [
|
|
897
897
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
898
|
-
|
|
898
|
+
_chunk33QHEG7Kcjs.AlertDialogCancel,
|
|
899
899
|
{
|
|
900
900
|
disabled: busy,
|
|
901
901
|
className: "border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-border",
|
|
@@ -903,7 +903,7 @@ function TicketReplyComposer({
|
|
|
903
903
|
}
|
|
904
904
|
),
|
|
905
905
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
906
|
-
|
|
906
|
+
_chunk33QHEG7Kcjs.AlertDialogAction,
|
|
907
907
|
{
|
|
908
908
|
onClick: () => void confirmClose(),
|
|
909
909
|
disabled: busy,
|
|
@@ -965,10 +965,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
965
965
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
966
966
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
967
967
|
function TicketTimelinePanel({ ticket }) {
|
|
968
|
-
const identity =
|
|
969
|
-
const externalId =
|
|
968
|
+
const identity = _chunkCELBOIKCcjs.useChatIdentity.call(void 0, );
|
|
969
|
+
const externalId = _chunk5K3QUH7Ccjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
970
970
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
971
|
-
const live =
|
|
971
|
+
const live = _chunk5K3QUH7Ccjs.useOptionalTicketLive.call(void 0, );
|
|
972
972
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _25 => _25.setOpenTicketId]);
|
|
973
973
|
const markRead = _optionalChain([live, 'optionalAccess', _26 => _26.markRead]);
|
|
974
974
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -992,7 +992,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
992
992
|
markReadDebounceRef.current = setTimeout(() => {
|
|
993
993
|
markReadDebounceRef.current = null;
|
|
994
994
|
void markRead(externalId);
|
|
995
|
-
},
|
|
995
|
+
}, _chunk5K3QUH7Ccjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
996
996
|
}, [engagementsCount, externalId, markRead]);
|
|
997
997
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
998
998
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -1007,7 +1007,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1007
1007
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _40 => _40.user, 'optionalAccess', _41 => _41.email]) || "You";
|
|
1008
1008
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _42 => _42.user, 'optionalAccess', _43 => _43.avatarUrl]), () => ( void 0)) : void 0;
|
|
1009
1009
|
if (isLoading) {
|
|
1010
|
-
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,
|
|
1010
|
+
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, _chunkCELBOIKCcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1011
1011
|
}
|
|
1012
1012
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1013
1013
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1026,7 +1026,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1026
1026
|
const isResolution = turn.startsWith("[Resolution]");
|
|
1027
1027
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
1028
1028
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1029
|
-
|
|
1029
|
+
_chunkCELBOIKCcjs.ChatMessageRow,
|
|
1030
1030
|
{
|
|
1031
1031
|
displayName: customerName,
|
|
1032
1032
|
avatarUrl: customerAvatar,
|
|
@@ -1055,13 +1055,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
1057
1057
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1058
|
-
|
|
1058
|
+
_chunkCELBOIKCcjs.ChatMessageRow,
|
|
1059
1059
|
{
|
|
1060
1060
|
displayName: author,
|
|
1061
1061
|
avatarUrl: avatarSrc,
|
|
1062
1062
|
timeLabel: eng.createdAt ? _chunkHP4UUBJCcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1063
1063
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1064
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1064
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk33QHEG7Kcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1065
1065
|
},
|
|
1066
1066
|
eng.id
|
|
1067
1067
|
);
|
|
@@ -1174,7 +1174,7 @@ function TicketRow({
|
|
|
1174
1174
|
onActionCollapsed,
|
|
1175
1175
|
id
|
|
1176
1176
|
}) {
|
|
1177
|
-
const optimistic =
|
|
1177
|
+
const optimistic = _chunk5K3QUH7Ccjs.isOptimistic.call(void 0, ticket);
|
|
1178
1178
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1179
1179
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1180
1180
|
onToggle(ticket.id);
|
|
@@ -1212,7 +1212,7 @@ function TicketRow({
|
|
|
1212
1212
|
};
|
|
1213
1213
|
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: [
|
|
1214
1214
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1215
|
-
|
|
1215
|
+
_chunkCELBOIKCcjs.ChatTicketItem,
|
|
1216
1216
|
{
|
|
1217
1217
|
ticket: tileData,
|
|
1218
1218
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1245,7 +1245,7 @@ function TicketRow({
|
|
|
1245
1245
|
// src/components/tickets/ticket-center.tsx
|
|
1246
1246
|
|
|
1247
1247
|
function TicketCenter({ toast: toast2 = _chunk4LY6R4TNcjs.toast } = {}) {
|
|
1248
|
-
const identity =
|
|
1248
|
+
const identity = _chunkCELBOIKCcjs.useChatIdentity.call(void 0, );
|
|
1249
1249
|
if (identity.isLoading) {
|
|
1250
1250
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1251
1251
|
}
|
|
@@ -1343,11 +1343,11 @@ function TicketCenterAuthed({
|
|
|
1343
1343
|
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHEQ4GPYEcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1344
1344
|
TicketRow,
|
|
1345
1345
|
{
|
|
1346
|
-
id:
|
|
1346
|
+
id: _chunkCELBOIKCcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1347
1347
|
ticket,
|
|
1348
1348
|
expanded: expandedTicketId === ticket.id,
|
|
1349
1349
|
onToggle: toggleRow,
|
|
1350
|
-
busy:
|
|
1350
|
+
busy: _chunk5K3QUH7Ccjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1351
1351
|
supportSystemDown,
|
|
1352
1352
|
onSendMessage: actions.sendMessage,
|
|
1353
1353
|
onClose: actions.closeTicket,
|
|
@@ -1401,7 +1401,7 @@ function HelpCenterCard({
|
|
|
1401
1401
|
onClearReplyError,
|
|
1402
1402
|
id
|
|
1403
1403
|
}) {
|
|
1404
|
-
const optimistic =
|
|
1404
|
+
const optimistic = _chunk5K3QUH7Ccjs.isOptimistic.call(void 0, ticket);
|
|
1405
1405
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1406
1406
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1407
1407
|
const relativeUpdated = ticket.hubspot_updated_at ? _chunkHP4UUBJCcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
@@ -1423,7 +1423,7 @@ function HelpCenterCard({
|
|
|
1423
1423
|
});
|
|
1424
1424
|
return () => cancelAnimationFrame(raf);
|
|
1425
1425
|
}, [isExpanded]);
|
|
1426
|
-
const live =
|
|
1426
|
+
const live = _chunk5K3QUH7Ccjs.useOptionalTicketLive.call(void 0, );
|
|
1427
1427
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1428
1428
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1429
1429
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1473,7 +1473,7 @@ function HelpCenterCard({
|
|
|
1473
1473
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1474
1474
|
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 content-md:p-[16px]",
|
|
1475
1475
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1476
|
-
|
|
1476
|
+
_chunkYREYU6DYcjs.DevCardRowContent,
|
|
1477
1477
|
{
|
|
1478
1478
|
title,
|
|
1479
1479
|
subtitle,
|
|
@@ -1574,7 +1574,7 @@ function HelpCenterCreateForm({
|
|
|
1574
1574
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1575
1575
|
] });
|
|
1576
1576
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1577
|
-
|
|
1577
|
+
_chunkOKEJY2GCcjs.ContactForm,
|
|
1578
1578
|
{
|
|
1579
1579
|
rescue: null,
|
|
1580
1580
|
title: "Open a new ticket",
|
|
@@ -1613,29 +1613,29 @@ function HelpCenterCreateForm({
|
|
|
1613
1613
|
// src/components/tickets/help-center-list.tsx
|
|
1614
1614
|
|
|
1615
1615
|
function HelpCenterList({ toast: toast2 = _chunk4LY6R4TNcjs.toast, backButton, title, shell } = {}) {
|
|
1616
|
-
const identity =
|
|
1616
|
+
const identity = _chunkCELBOIKCcjs.useChatIdentity.call(void 0, );
|
|
1617
1617
|
const searchParams = _chunk7DNL734Scjs.useSearchParams.call(void 0, );
|
|
1618
1618
|
const router = _chunk7DNL734Scjs.useRouter.call(void 0, );
|
|
1619
1619
|
const pathname = _chunk7DNL734Scjs.usePathname.call(void 0, );
|
|
1620
|
-
const search = searchParams.get(
|
|
1620
|
+
const search = searchParams.get(_chunkCELBOIKCcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1621
1621
|
const status = searchParams.get("status") || "all";
|
|
1622
|
-
const ticketParam = searchParams.get(
|
|
1622
|
+
const ticketParam = searchParams.get(_chunkCELBOIKCcjs.TICKET_OPEN_PARAM) || "";
|
|
1623
1623
|
const page = _chunk7GRPR7XAcjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1624
1624
|
if (identity.isLoading) {
|
|
1625
1625
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1626
|
-
|
|
1626
|
+
_chunkYREYU6DYcjs.DevSectionPage,
|
|
1627
1627
|
{
|
|
1628
1628
|
sectionKey: "tickets",
|
|
1629
1629
|
backButton,
|
|
1630
1630
|
title,
|
|
1631
1631
|
shell,
|
|
1632
1632
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1633
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1633
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYREYU6DYcjs.DevCardRowSkeletonList, {})
|
|
1634
1634
|
}
|
|
1635
1635
|
);
|
|
1636
1636
|
}
|
|
1637
1637
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1638
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1638
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYREYU6DYcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1639
1639
|
_chunkZSOFLPQNcjs.EmptyState,
|
|
1640
1640
|
{
|
|
1641
1641
|
type: "generic",
|
|
@@ -1687,8 +1687,8 @@ function HelpCenterListAuthed({
|
|
|
1687
1687
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1688
1688
|
(externalId) => {
|
|
1689
1689
|
const params = new URLSearchParams(searchParams.toString());
|
|
1690
|
-
if (externalId) params.set(
|
|
1691
|
-
else params.delete(
|
|
1690
|
+
if (externalId) params.set(_chunkCELBOIKCcjs.TICKET_OPEN_PARAM, externalId);
|
|
1691
|
+
else params.delete(_chunkCELBOIKCcjs.TICKET_OPEN_PARAM);
|
|
1692
1692
|
const qs = params.toString();
|
|
1693
1693
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1694
1694
|
},
|
|
@@ -1765,15 +1765,15 @@ function HelpCenterListAuthed({
|
|
|
1765
1765
|
] }),
|
|
1766
1766
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHQIOMFJHcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1767
1767
|
] }),
|
|
1768
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1768
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYREYU6DYcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1769
1769
|
// Bridge state — background refetch in flight and the
|
|
1770
1770
|
// optimistic placeholder was just removed by the mutation
|
|
1771
1771
|
// callback. Without this branch "No tickets yet" would flash
|
|
1772
1772
|
// for ~50ms between `removeOptimistic` and the server
|
|
1773
1773
|
// response landing.
|
|
1774
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1774
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYREYU6DYcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1775
1775
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1776
|
-
|
|
1776
|
+
_chunkYREYU6DYcjs.ListEmptyState,
|
|
1777
1777
|
{
|
|
1778
1778
|
isFiltered: hasActiveFilters,
|
|
1779
1779
|
filtered: {
|
|
@@ -1804,11 +1804,11 @@ function HelpCenterListAuthed({
|
|
|
1804
1804
|
/* @__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,
|
|
1805
1805
|
HelpCenterCard,
|
|
1806
1806
|
{
|
|
1807
|
-
id:
|
|
1807
|
+
id: _chunkCELBOIKCcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1808
1808
|
ticket,
|
|
1809
1809
|
expanded: expandedTicketId === ticket.id,
|
|
1810
1810
|
onToggle: toggleRow,
|
|
1811
|
-
busy:
|
|
1811
|
+
busy: _chunk5K3QUH7Ccjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1812
1812
|
supportSystemDown,
|
|
1813
1813
|
onSendMessage: actions.sendMessage,
|
|
1814
1814
|
onClose: actions.closeTicket,
|
|
@@ -1822,7 +1822,7 @@ function HelpCenterListAuthed({
|
|
|
1822
1822
|
) }),
|
|
1823
1823
|
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZSOFLPQNcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1824
1824
|
] });
|
|
1825
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1825
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYREYU6DYcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1826
1826
|
}
|
|
1827
1827
|
|
|
1828
1828
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
HoneypotField,
|
|
4
4
|
Textarea
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-URYLQ4MC.js";
|
|
6
6
|
import {
|
|
7
7
|
Select,
|
|
8
8
|
SelectContent,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
ChatAttachmentChipStrip,
|
|
21
21
|
HUBSPOT_DO_NOT_COLLECT_FORM_PROPS,
|
|
22
22
|
useChatAttachments
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UF3NFAQK.js";
|
|
24
24
|
import {
|
|
25
25
|
SECTION_HEADING_CLASS,
|
|
26
26
|
accentSentenceMarks
|