@flamingo-stack/openframe-frontend-core 0.0.285 → 0.0.286
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-3MCHAFHB.js +89 -0
- package/dist/chunk-3MCHAFHB.js.map +1 -0
- package/dist/{chunk-IMNGGLKL.js → chunk-3ZXUQQL4.js} +2 -2
- package/dist/{chunk-44ZFLMYC.cjs → chunk-4WACBTZU.cjs} +30 -30
- package/dist/{chunk-44ZFLMYC.cjs.map → chunk-4WACBTZU.cjs.map} +1 -1
- package/dist/{chunk-23UOJUDF.js → chunk-5BTZOVDQ.js} +4 -4
- package/dist/chunk-5KD3S25X.cjs +312 -0
- package/dist/chunk-5KD3S25X.cjs.map +1 -0
- package/dist/chunk-6N26CURS.cjs +2417 -0
- package/dist/chunk-6N26CURS.cjs.map +1 -0
- package/dist/{chunk-XX7P4IL2.js → chunk-7NM7DEUK.js} +4 -143
- package/dist/chunk-7NM7DEUK.js.map +1 -0
- package/dist/chunk-BBZ7AX5H.cjs +290 -0
- package/dist/chunk-BBZ7AX5H.cjs.map +1 -0
- package/dist/chunk-C6SCWXDP.js +290 -0
- package/dist/chunk-C6SCWXDP.js.map +1 -0
- package/dist/{chunk-GVSTRN36.cjs → chunk-D3LEFMOA.cjs} +3 -3
- package/dist/{chunk-GVSTRN36.cjs.map → chunk-D3LEFMOA.cjs.map} +1 -1
- package/dist/{chunk-P45Q4QCU.cjs → chunk-D5YY5U6J.cjs} +19 -15
- package/dist/chunk-D5YY5U6J.cjs.map +1 -0
- package/dist/chunk-DDAT4RKX.js +2417 -0
- package/dist/chunk-DDAT4RKX.js.map +1 -0
- package/dist/{chunk-PVXCVPJD.cjs → chunk-EI4WALN2.cjs} +67 -1626
- package/dist/chunk-EI4WALN2.cjs.map +1 -0
- package/dist/{chunk-ZIODAAFY.cjs → chunk-EL5GCMPU.cjs} +20 -159
- package/dist/chunk-EL5GCMPU.cjs.map +1 -0
- package/dist/{chunk-VQW7CEGS.js → chunk-FSBDVT6R.js} +1831 -3672
- package/dist/chunk-FSBDVT6R.js.map +1 -0
- package/dist/{chunk-DPKUSBQH.cjs → chunk-GDF2R2ER.cjs} +1073 -2914
- package/dist/chunk-GDF2R2ER.cjs.map +1 -0
- package/dist/chunk-HLQW7MWJ.cjs +1594 -0
- package/dist/chunk-HLQW7MWJ.cjs.map +1 -0
- package/dist/chunk-I6ZPGKZ2.cjs +151 -0
- package/dist/chunk-I6ZPGKZ2.cjs.map +1 -0
- package/dist/{chunk-J66U3LPZ.cjs → chunk-KBKZYJRI.cjs} +33 -332
- package/dist/chunk-KBKZYJRI.cjs.map +1 -0
- package/dist/{chunk-USPATRSC.js → chunk-N6ZM5PYZ.js} +45 -344
- package/dist/chunk-N6ZM5PYZ.js.map +1 -0
- package/dist/{chunk-RGALV4UX.js → chunk-POKKCWKF.js} +3 -82
- package/dist/chunk-POKKCWKF.js.map +1 -0
- package/dist/{chunk-XDI5JSWB.cjs → chunk-QCKN37OP.cjs} +45 -41
- package/dist/chunk-QCKN37OP.cjs.map +1 -0
- package/dist/{chunk-KNCDUWY2.js → chunk-QF2X6PTD.js} +10 -6
- package/dist/{chunk-KNCDUWY2.js.map → chunk-QF2X6PTD.js.map} +1 -1
- package/dist/{chunk-Z3V2SGQZ.js → chunk-R2KT5GDD.js} +324 -1883
- package/dist/chunk-R2KT5GDD.js.map +1 -0
- package/dist/{chunk-RJUGNL2A.cjs → chunk-RQ6RTBKF.cjs} +16 -12
- package/dist/chunk-RQ6RTBKF.cjs.map +1 -0
- package/dist/chunk-TFSYSWPS.cjs +89 -0
- package/dist/chunk-TFSYSWPS.cjs.map +1 -0
- package/dist/chunk-TYZEMPPH.js +312 -0
- package/dist/chunk-TYZEMPPH.js.map +1 -0
- package/dist/{chunk-O5N57CRV.js → chunk-VCQ3CTYK.js} +12 -8
- package/dist/{chunk-O5N57CRV.js.map → chunk-VCQ3CTYK.js.map} +1 -1
- package/dist/chunk-VRSXJ5QJ.js +1599 -0
- package/dist/chunk-VRSXJ5QJ.js.map +1 -0
- package/dist/{chunk-53CFL7PH.js → chunk-XQL4WDML.js} +11 -7
- package/dist/{chunk-53CFL7PH.js.map → chunk-XQL4WDML.js.map} +1 -1
- package/dist/chunk-Y4JNA4W6.cjs +1599 -0
- package/dist/chunk-Y4JNA4W6.cjs.map +1 -0
- package/dist/{chunk-ZSUNQJRO.cjs → chunk-YETA25JW.cjs} +2 -81
- package/dist/chunk-YETA25JW.cjs.map +1 -0
- package/dist/chunk-YVB3VDIQ.js +1594 -0
- package/dist/chunk-YVB3VDIQ.js.map +1 -0
- package/dist/chunk-ZLN6SM2U.js +151 -0
- package/dist/chunk-ZLN6SM2U.js.map +1 -0
- package/dist/components/chat/chat-attachment-bar.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +12 -6
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.js +45 -39
- package/dist/components/contact/index.cjs +11 -7
- package/dist/components/contact/index.cjs.map +1 -1
- package/dist/components/contact/index.js +10 -6
- package/dist/components/docs/doc-navigation-context.d.ts +39 -0
- package/dist/components/docs/doc-navigation-context.d.ts.map +1 -0
- package/dist/components/docs/doc-viewer.d.ts +66 -0
- package/dist/components/docs/doc-viewer.d.ts.map +1 -0
- package/dist/components/docs/index.cjs +34 -0
- package/dist/components/docs/index.cjs.map +1 -0
- package/dist/components/docs/index.d.ts +8 -0
- package/dist/components/docs/index.d.ts.map +1 -0
- package/dist/components/docs/index.js +34 -0
- package/dist/components/docs/index.js.map +1 -0
- package/dist/components/docs/use-document-tree.d.ts +41 -0
- package/dist/components/docs/use-document-tree.d.ts.map +1 -0
- package/dist/components/docs/use-scroll-spy.d.ts +16 -0
- package/dist/components/docs/use-scroll-spy.d.ts.map +1 -0
- package/dist/components/embeds/embed-iframe.d.ts +29 -0
- package/dist/components/embeds/embed-iframe.d.ts.map +1 -0
- package/dist/components/embeds/figma-embed.d.ts +27 -0
- package/dist/components/embeds/figma-embed.d.ts.map +1 -0
- package/dist/components/embeds/google-sheets-viewer.d.ts +8 -0
- package/dist/components/embeds/google-sheets-viewer.d.ts.map +1 -0
- package/dist/components/embeds/index.cjs +37 -0
- package/dist/components/embeds/index.cjs.map +1 -0
- package/dist/components/embeds/index.d.ts +9 -0
- package/dist/components/embeds/index.d.ts.map +1 -0
- package/dist/components/embeds/index.js +37 -0
- package/dist/components/embeds/index.js.map +1 -0
- package/dist/components/embeds/pdf-viewer.d.ts +10 -0
- package/dist/components/embeds/pdf-viewer.d.ts.map +1 -0
- package/dist/components/faq/index.cjs +12 -8
- package/dist/components/faq/index.cjs.map +1 -1
- package/dist/components/faq/index.js +11 -7
- package/dist/components/features/index.cjs +10 -6
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +9 -5
- package/dist/components/index.cjs +247 -1120
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +645 -1518
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +15 -6
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.d.ts +2 -0
- package/dist/components/navigation/index.d.ts.map +1 -1
- package/dist/components/navigation/index.js +15 -6
- package/dist/components/navigation/multi-level-navigation.d.ts +28 -0
- package/dist/components/navigation/multi-level-navigation.d.ts.map +1 -0
- package/dist/components/onboarding-guides/index.cjs +34 -29
- package/dist/components/onboarding-guides/index.cjs.map +1 -1
- package/dist/components/onboarding-guides/index.js +13 -8
- package/dist/components/onboarding-guides/index.js.map +1 -1
- package/dist/components/related-content/index.cjs +12 -8
- package/dist/components/related-content/index.cjs.map +1 -1
- package/dist/components/related-content/index.js +11 -7
- package/dist/components/tickets/index.cjs +75 -70
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +16 -11
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/ui/index.cjs +12 -6
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +65 -59
- package/dist/embed-shims/index.cjs +3 -3
- package/dist/embed-shims/index.cjs.map +1 -1
- package/dist/embed-shims/index.js +8 -8
- package/dist/hooks/index.cjs +6 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +7 -4
- package/dist/index.cjs +62 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +257 -201
- package/dist/types/doc-source.cjs +4 -0
- package/dist/types/doc-source.cjs.map +1 -0
- package/dist/types/doc-source.d.ts +86 -0
- package/dist/types/doc-source.d.ts.map +1 -0
- package/dist/types/doc-source.js +3 -0
- package/dist/types/doc-source.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/doc-path-utils.d.ts +24 -0
- package/dist/utils/doc-path-utils.d.ts.map +1 -0
- package/dist/utils/doc-tree-nav.d.ts +35 -0
- package/dist/utils/doc-tree-nav.d.ts.map +1 -0
- package/dist/utils/embed-url-converters.d.ts +16 -0
- package/dist/utils/embed-url-converters.d.ts.map +1 -0
- package/dist/utils/format.d.ts +9 -0
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/index.cjs +297 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +7 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +276 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/markdown-section-extractor.d.ts +23 -0
- package/dist/utils/markdown-section-extractor.d.ts.map +1 -0
- package/dist/utils/markdown-to-plain.d.ts +32 -0
- package/dist/utils/markdown-to-plain.d.ts.map +1 -0
- package/dist/utils/tree-builder.d.ts +30 -0
- package/dist/utils/tree-builder.d.ts.map +1 -0
- package/package.json +19 -1
- package/src/components/chat/chat-attachment-bar.tsx +6 -11
- package/src/components/docs/doc-navigation-context.tsx +123 -0
- package/src/components/docs/doc-viewer.tsx +345 -0
- package/src/components/docs/index.ts +12 -0
- package/src/components/docs/use-document-tree.ts +427 -0
- package/src/components/docs/use-scroll-spy.ts +93 -0
- package/src/components/embeds/embed-iframe.tsx +103 -0
- package/src/components/embeds/figma-embed.tsx +147 -0
- package/src/components/embeds/google-sheets-viewer.tsx +54 -0
- package/src/components/embeds/index.ts +11 -0
- package/src/components/embeds/pdf-viewer.tsx +64 -0
- package/src/components/index.ts +2 -0
- package/src/components/navigation/index.ts +5 -0
- package/src/components/navigation/multi-level-navigation.tsx +358 -0
- package/src/types/doc-source.ts +88 -0
- package/src/types/index.ts +4 -0
- package/src/utils/doc-path-utils.ts +47 -0
- package/src/utils/doc-tree-nav.ts +111 -0
- package/src/utils/embed-url-converters.ts +77 -0
- package/src/utils/format.ts +16 -0
- package/src/utils/index.ts +11 -0
- package/src/utils/markdown-section-extractor.ts +106 -0
- package/src/utils/markdown-to-plain.ts +69 -0
- package/src/utils/tree-builder.ts +114 -0
- package/dist/chunk-DPKUSBQH.cjs.map +0 -1
- package/dist/chunk-J66U3LPZ.cjs.map +0 -1
- package/dist/chunk-P45Q4QCU.cjs.map +0 -1
- package/dist/chunk-PVXCVPJD.cjs.map +0 -1
- package/dist/chunk-RGALV4UX.js.map +0 -1
- package/dist/chunk-RJUGNL2A.cjs.map +0 -1
- package/dist/chunk-USPATRSC.js.map +0 -1
- package/dist/chunk-VQW7CEGS.js.map +0 -1
- package/dist/chunk-XDI5JSWB.cjs.map +0 -1
- package/dist/chunk-XX7P4IL2.js.map +0 -1
- package/dist/chunk-Z3V2SGQZ.js.map +0 -1
- package/dist/chunk-ZIODAAFY.cjs.map +0 -1
- package/dist/chunk-ZSUNQJRO.cjs.map +0 -1
- /package/dist/{chunk-IMNGGLKL.js.map → chunk-3ZXUQQL4.js.map} +0 -0
- /package/dist/{chunk-23UOJUDF.js.map → chunk-5BTZOVDQ.js.map} +0 -0
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkD5YY5U6Jcjs = require('../../chunk-D5YY5U6J.cjs');
|
|
11
11
|
require('../../chunk-VFKQMAUF.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk4WACBTZUcjs = require('../../chunk-4WACBTZU.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -32,13 +32,16 @@ var _chunk44ZFLMYCcjs = require('../../chunk-44ZFLMYC.cjs');
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
var _chunkGDF2R2ERcjs = require('../../chunk-GDF2R2ER.cjs');
|
|
35
36
|
|
|
36
37
|
|
|
37
38
|
|
|
38
|
-
var _chunkDPKUSBQHcjs = require('../../chunk-DPKUSBQH.cjs');
|
|
39
39
|
|
|
40
|
+
var _chunk6N26CURScjs = require('../../chunk-6N26CURS.cjs');
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
|
|
43
|
+
var _chunkKBKZYJRIcjs = require('../../chunk-KBKZYJRI.cjs');
|
|
44
|
+
require('../../chunk-5KD3S25X.cjs');
|
|
42
45
|
require('../../chunk-27APPAJN.cjs');
|
|
43
46
|
|
|
44
47
|
|
|
@@ -49,20 +52,22 @@ require('../../chunk-PXXS27EE.cjs');
|
|
|
49
52
|
|
|
50
53
|
|
|
51
54
|
|
|
52
|
-
var
|
|
55
|
+
var _chunkEI4WALN2cjs = require('../../chunk-EI4WALN2.cjs');
|
|
56
|
+
require('../../chunk-Y4JNA4W6.cjs');
|
|
57
|
+
require('../../chunk-TFSYSWPS.cjs');
|
|
53
58
|
|
|
54
59
|
|
|
55
|
-
var
|
|
60
|
+
var _chunkYETA25JWcjs = require('../../chunk-YETA25JW.cjs');
|
|
56
61
|
|
|
57
62
|
|
|
58
63
|
var _chunkAQOWFSMBcjs = require('../../chunk-AQOWFSMB.cjs');
|
|
59
|
-
require('../../chunk-XL4V2PYG.cjs');
|
|
60
|
-
require('../../chunk-BZFW3FOF.cjs');
|
|
61
64
|
|
|
62
65
|
|
|
63
66
|
|
|
64
67
|
|
|
65
68
|
var _chunkG7UE6RKVcjs = require('../../chunk-G7UE6RKV.cjs');
|
|
69
|
+
require('../../chunk-XL4V2PYG.cjs');
|
|
70
|
+
require('../../chunk-BZFW3FOF.cjs');
|
|
66
71
|
|
|
67
72
|
|
|
68
73
|
|
|
@@ -111,7 +116,7 @@ function TicketOpenForm({
|
|
|
111
116
|
}) {
|
|
112
117
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
113
118
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
114
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
119
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkGDF2R2ERcjs.useChatAttachments.call(void 0, );
|
|
115
120
|
const trimmedSubject = subject.trim();
|
|
116
121
|
const trimmedContent = content.trim();
|
|
117
122
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -131,7 +136,7 @@ function TicketOpenForm({
|
|
|
131
136
|
clear();
|
|
132
137
|
}
|
|
133
138
|
};
|
|
134
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
139
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEI4WALN2cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
135
140
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
136
141
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
137
142
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-sm", children: "Can't find what you're looking for? Submit a support ticket below \u2014 we'll follow up shortly." }),
|
|
@@ -170,7 +175,7 @@ function TicketOpenForm({
|
|
|
170
175
|
}
|
|
171
176
|
),
|
|
172
177
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
173
|
-
|
|
178
|
+
_chunkGDF2R2ERcjs.Textarea,
|
|
174
179
|
{
|
|
175
180
|
id: "ticket-content",
|
|
176
181
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -194,7 +199,7 @@ function TicketOpenForm({
|
|
|
194
199
|
)
|
|
195
200
|
] }),
|
|
196
201
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
197
|
-
|
|
202
|
+
_chunkGDF2R2ERcjs.ChatAttachmentChipStrip,
|
|
198
203
|
{
|
|
199
204
|
attachments,
|
|
200
205
|
onRemove: removeAttachment,
|
|
@@ -203,7 +208,7 @@ function TicketOpenForm({
|
|
|
203
208
|
),
|
|
204
209
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
205
210
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
206
|
-
|
|
211
|
+
_chunkGDF2R2ERcjs.ChatAttachmentAddButton,
|
|
207
212
|
{
|
|
208
213
|
attachmentsEnabled: !supportSystemDown,
|
|
209
214
|
attachmentsCount: attachments.length,
|
|
@@ -241,7 +246,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
241
246
|
|
|
242
247
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
243
248
|
function useTicketEngagements(externalTicketId, enabled = true, refetchInterval = false) {
|
|
244
|
-
const identity =
|
|
249
|
+
const identity = _chunkGDF2R2ERcjs.useChatIdentity.call(void 0, );
|
|
245
250
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
246
251
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkAQOWFSMBcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
247
252
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -262,7 +267,7 @@ function useTicketEngagements(externalTicketId, enabled = true, refetchInterval
|
|
|
262
267
|
// so polling pauses on a hidden tab.
|
|
263
268
|
refetchInterval,
|
|
264
269
|
queryFn: async () => {
|
|
265
|
-
const response = await
|
|
270
|
+
const response = await _chunkYETA25JWcjs.embedAuthedFetch.call(void 0, listEngagementsEndpoint, {
|
|
266
271
|
method: "POST",
|
|
267
272
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
268
273
|
});
|
|
@@ -323,7 +328,7 @@ function TicketLinkedDeliveryCard({
|
|
|
323
328
|
{
|
|
324
329
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
325
330
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
326
|
-
|
|
331
|
+
_chunkD5YY5U6Jcjs.DeliveryRow,
|
|
327
332
|
{
|
|
328
333
|
item,
|
|
329
334
|
href: clickup.delivery_href,
|
|
@@ -347,7 +352,7 @@ function TicketReplyComposer({
|
|
|
347
352
|
}) {
|
|
348
353
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
349
354
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
350
|
-
const attachments =
|
|
355
|
+
const attachments = _chunkGDF2R2ERcjs.useChatAttachments.call(void 0, );
|
|
351
356
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
352
357
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
353
358
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -375,7 +380,7 @@ function TicketReplyComposer({
|
|
|
375
380
|
const disabled = busy || supportSystemDown;
|
|
376
381
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
377
382
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
378
|
-
|
|
383
|
+
_chunkGDF2R2ERcjs.ChatAttachmentChipStrip,
|
|
379
384
|
{
|
|
380
385
|
attachments: attachments.attachments,
|
|
381
386
|
onRemove: attachments.removeAttachment,
|
|
@@ -384,7 +389,7 @@ function TicketReplyComposer({
|
|
|
384
389
|
}
|
|
385
390
|
),
|
|
386
391
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
387
|
-
|
|
392
|
+
_chunkGDF2R2ERcjs.ChatInput,
|
|
388
393
|
{
|
|
389
394
|
fullWidth: true,
|
|
390
395
|
autoFocus: true,
|
|
@@ -398,7 +403,7 @@ function TicketReplyComposer({
|
|
|
398
403
|
),
|
|
399
404
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
400
405
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
401
|
-
|
|
406
|
+
_chunkGDF2R2ERcjs.ChatAttachmentAddButton,
|
|
402
407
|
{
|
|
403
408
|
attachmentsEnabled: true,
|
|
404
409
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -421,13 +426,13 @@ function TicketReplyComposer({
|
|
|
421
426
|
}
|
|
422
427
|
)
|
|
423
428
|
] }),
|
|
424
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
425
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
426
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
427
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
429
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGDF2R2ERcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGDF2R2ERcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
430
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGDF2R2ERcjs.AlertDialogHeader, { children: [
|
|
431
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGDF2R2ERcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
432
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGDF2R2ERcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
428
433
|
] }),
|
|
429
434
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
430
|
-
|
|
435
|
+
_chunkGDF2R2ERcjs.Textarea,
|
|
431
436
|
{
|
|
432
437
|
value: resolution,
|
|
433
438
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -437,9 +442,9 @@ function TicketReplyComposer({
|
|
|
437
442
|
className: "mt-2"
|
|
438
443
|
}
|
|
439
444
|
),
|
|
440
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
445
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGDF2R2ERcjs.AlertDialogFooter, { children: [
|
|
441
446
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
442
|
-
|
|
447
|
+
_chunkGDF2R2ERcjs.AlertDialogCancel,
|
|
443
448
|
{
|
|
444
449
|
disabled: busy,
|
|
445
450
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -447,7 +452,7 @@ function TicketReplyComposer({
|
|
|
447
452
|
}
|
|
448
453
|
),
|
|
449
454
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
450
|
-
|
|
455
|
+
_chunkGDF2R2ERcjs.AlertDialogAction,
|
|
451
456
|
{
|
|
452
457
|
onClick: () => void confirmClose(),
|
|
453
458
|
disabled: busy,
|
|
@@ -517,7 +522,7 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
517
522
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
518
523
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
519
524
|
function TicketTimelinePanel({ ticket }) {
|
|
520
|
-
const identity =
|
|
525
|
+
const identity = _chunkGDF2R2ERcjs.useChatIdentity.call(void 0, );
|
|
521
526
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
522
527
|
const { engagements, isLoading } = useTicketEngagements(
|
|
523
528
|
externalId,
|
|
@@ -537,11 +542,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
537
542
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _19 => _19.user, 'optionalAccess', _20 => _20.email]) || "You";
|
|
538
543
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.avatarUrl]), () => ( void 0)) : void 0;
|
|
539
544
|
if (isLoading) {
|
|
540
|
-
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,
|
|
545
|
+
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, _chunkGDF2R2ERcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
541
546
|
}
|
|
542
547
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
543
548
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
544
|
-
|
|
549
|
+
_chunkD5YY5U6Jcjs.EmptyState,
|
|
545
550
|
{
|
|
546
551
|
type: "generic",
|
|
547
552
|
title: "No conversation yet",
|
|
@@ -556,7 +561,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
556
561
|
const isResolution = turn.startsWith("[Resolution]");
|
|
557
562
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
558
563
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
559
|
-
|
|
564
|
+
_chunkGDF2R2ERcjs.ChatMessageRow,
|
|
560
565
|
{
|
|
561
566
|
displayName: customerName,
|
|
562
567
|
avatarUrl: customerAvatar,
|
|
@@ -585,13 +590,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
585
590
|
}
|
|
586
591
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
587
592
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
588
|
-
|
|
593
|
+
_chunkGDF2R2ERcjs.ChatMessageRow,
|
|
589
594
|
{
|
|
590
595
|
displayName: author,
|
|
591
596
|
avatarUrl: avatarSrc,
|
|
592
|
-
timeLabel: eng.createdAt ?
|
|
597
|
+
timeLabel: eng.createdAt ? _chunk6N26CURScjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
593
598
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
594
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
599
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGDF2R2ERcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
595
600
|
},
|
|
596
601
|
eng.id
|
|
597
602
|
);
|
|
@@ -679,7 +684,7 @@ function AssignedAgentRow({
|
|
|
679
684
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary uppercase tracking-wider font-medium", children: "Assigned to" }),
|
|
680
685
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
681
686
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
682
|
-
|
|
687
|
+
_chunkEI4WALN2cjs.SquareAvatar,
|
|
683
688
|
{
|
|
684
689
|
size: "sm",
|
|
685
690
|
variant: "round",
|
|
@@ -710,7 +715,7 @@ function TicketRow({
|
|
|
710
715
|
const rowRef = _react.useRef.call(void 0, null);
|
|
711
716
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
712
717
|
onToggle(ticket.id);
|
|
713
|
-
|
|
718
|
+
_chunk6N26CURScjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
714
719
|
adjustTargetY: (raw) => {
|
|
715
720
|
if (!rowRef.current) return raw;
|
|
716
721
|
const expandedDrawer = document.querySelector(
|
|
@@ -736,7 +741,7 @@ function TicketRow({
|
|
|
736
741
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
737
742
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
738
743
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
739
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
744
|
+
timeAgo: ticket.hubspot_updated_at ? _chunk6N26CURScjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
740
745
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
741
746
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
742
747
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -751,7 +756,7 @@ function TicketRow({
|
|
|
751
756
|
className: "border-b border-ods-border last:border-b-0",
|
|
752
757
|
children: [
|
|
753
758
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
754
|
-
|
|
759
|
+
_chunkGDF2R2ERcjs.ChatTicketItem,
|
|
755
760
|
{
|
|
756
761
|
ticket: tileData,
|
|
757
762
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -821,7 +826,7 @@ function useTicketsList(filters) {
|
|
|
821
826
|
pageSize
|
|
822
827
|
};
|
|
823
828
|
if (statusFilter) body.status = statusFilter;
|
|
824
|
-
const response = await
|
|
829
|
+
const response = await _chunkYETA25JWcjs.embedAuthedFetch.call(void 0, findTicketEndpoint, {
|
|
825
830
|
method: "POST",
|
|
826
831
|
body: JSON.stringify(body)
|
|
827
832
|
});
|
|
@@ -936,7 +941,7 @@ function useTicketActions(options) {
|
|
|
936
941
|
}, []);
|
|
937
942
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
938
943
|
async (toolName, args) => {
|
|
939
|
-
const res = await
|
|
944
|
+
const res = await _chunkYETA25JWcjs.embedAuthedFetch.call(void 0, ticketActionEndpoint, {
|
|
940
945
|
method: "POST",
|
|
941
946
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
942
947
|
});
|
|
@@ -1320,14 +1325,14 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1320
1325
|
|
|
1321
1326
|
// src/components/tickets/ticket-center.tsx
|
|
1322
1327
|
|
|
1323
|
-
function TicketCenter({ toast: toast2 =
|
|
1324
|
-
const identity =
|
|
1328
|
+
function TicketCenter({ toast: toast2 = _chunkKBKZYJRIcjs.toast } = {}) {
|
|
1329
|
+
const identity = _chunkGDF2R2ERcjs.useChatIdentity.call(void 0, );
|
|
1325
1330
|
if (identity.isLoading) {
|
|
1326
1331
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1327
1332
|
}
|
|
1328
1333
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email])) {
|
|
1329
1334
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1330
|
-
|
|
1335
|
+
_chunkD5YY5U6Jcjs.EmptyState,
|
|
1331
1336
|
{
|
|
1332
1337
|
type: "generic",
|
|
1333
1338
|
title: "Sign in to manage tickets",
|
|
@@ -1398,7 +1403,7 @@ function TicketCenterAuthed({
|
|
|
1398
1403
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1399
1404
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1400
1405
|
"Updated ",
|
|
1401
|
-
|
|
1406
|
+
_chunk6N26CURScjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1402
1407
|
] }),
|
|
1403
1408
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1404
1409
|
_chunkXXI7BNB6cjs.Button,
|
|
@@ -1414,15 +1419,15 @@ function TicketCenterAuthed({
|
|
|
1414
1419
|
)
|
|
1415
1420
|
] })
|
|
1416
1421
|
] }),
|
|
1417
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1418
|
-
|
|
1422
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEI4WALN2cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1423
|
+
_chunkD5YY5U6Jcjs.EmptyState,
|
|
1419
1424
|
{
|
|
1420
1425
|
type: "generic",
|
|
1421
1426
|
title: "No tickets yet",
|
|
1422
1427
|
description: "Open one above to start the conversation.",
|
|
1423
1428
|
showCTA: false
|
|
1424
1429
|
}
|
|
1425
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1430
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEI4WALN2cjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1426
1431
|
TicketRow,
|
|
1427
1432
|
{
|
|
1428
1433
|
ticket,
|
|
@@ -1442,7 +1447,7 @@ function TicketCenterAuthed({
|
|
|
1442
1447
|
}
|
|
1443
1448
|
function TicketCenterSkeleton() {
|
|
1444
1449
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1445
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1450
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEI4WALN2cjs.Card, { className: "p-6", children: [
|
|
1446
1451
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1447
1452
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1448
1453
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1451,7 +1456,7 @@ function TicketCenterSkeleton() {
|
|
|
1451
1456
|
] });
|
|
1452
1457
|
}
|
|
1453
1458
|
function TicketListSkeleton() {
|
|
1454
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1459
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEI4WALN2cjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "h-20 px-4 flex items-center gap-4 border-b border-ods-border last:border-b-0", children: [
|
|
1455
1460
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1456
1461
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1457
1462
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6JINAOI7cjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1464,7 +1469,7 @@ function TicketListSkeleton() {
|
|
|
1464
1469
|
// src/components/tickets/help-center-list.tsx
|
|
1465
1470
|
|
|
1466
1471
|
|
|
1467
|
-
|
|
1472
|
+
_chunkD5YY5U6Jcjs.init_unified_pagination.call(void 0, );
|
|
1468
1473
|
|
|
1469
1474
|
// src/components/tickets/help-center-card.tsx
|
|
1470
1475
|
|
|
@@ -1486,7 +1491,7 @@ function HelpCenterCard({
|
|
|
1486
1491
|
const optimistic = isOptimistic(ticket);
|
|
1487
1492
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1488
1493
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1489
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1494
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunk6N26CURScjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1490
1495
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1491
1496
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1492
1497
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1499,7 +1504,7 @@ function HelpCenterCard({
|
|
|
1499
1504
|
_react.useEffect.call(void 0, () => {
|
|
1500
1505
|
if (!isExpanded) return;
|
|
1501
1506
|
const raf = requestAnimationFrame(() => {
|
|
1502
|
-
|
|
1507
|
+
_chunk6N26CURScjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1503
1508
|
headerOffset: STICKY_HEADER_OFFSET_PX
|
|
1504
1509
|
});
|
|
1505
1510
|
});
|
|
@@ -1507,16 +1512,16 @@ function HelpCenterCard({
|
|
|
1507
1512
|
}, [isExpanded]);
|
|
1508
1513
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1509
1514
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1510
|
-
|
|
1515
|
+
_chunkEI4WALN2cjs.StatusBadge,
|
|
1511
1516
|
{
|
|
1512
1517
|
text: rawStatus,
|
|
1513
|
-
colorScheme:
|
|
1518
|
+
colorScheme: _chunk6N26CURScjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1514
1519
|
variant: "card",
|
|
1515
1520
|
className: "border border-ods-border"
|
|
1516
1521
|
}
|
|
1517
1522
|
),
|
|
1518
1523
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1519
|
-
|
|
1524
|
+
_chunkEI4WALN2cjs.StatusBadge,
|
|
1520
1525
|
{
|
|
1521
1526
|
text: priority,
|
|
1522
1527
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1543,7 +1548,7 @@ function HelpCenterCard({
|
|
|
1543
1548
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1544
1549
|
className: "w-full text-left p-[12px] md:p-[16px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent focus-visible:ring-inset disabled:cursor-default",
|
|
1545
1550
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1546
|
-
|
|
1551
|
+
_chunkD5YY5U6Jcjs.DevCardRowContent,
|
|
1547
1552
|
{
|
|
1548
1553
|
title,
|
|
1549
1554
|
subtitle,
|
|
@@ -1618,7 +1623,7 @@ function HelpCenterCreateForm({
|
|
|
1618
1623
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1619
1624
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1620
1625
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1621
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1626
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGDF2R2ERcjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1622
1627
|
"Subject",
|
|
1623
1628
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1624
1629
|
] }),
|
|
@@ -1650,7 +1655,7 @@ function HelpCenterCreateForm({
|
|
|
1650
1655
|
)
|
|
1651
1656
|
] });
|
|
1652
1657
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1653
|
-
|
|
1658
|
+
_chunk4WACBTZUcjs.ContactForm,
|
|
1654
1659
|
{
|
|
1655
1660
|
title: "Open a new ticket",
|
|
1656
1661
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1687,8 +1692,8 @@ function HelpCenterCreateForm({
|
|
|
1687
1692
|
|
|
1688
1693
|
// src/components/tickets/help-center-list.tsx
|
|
1689
1694
|
|
|
1690
|
-
function HelpCenterList({ toast: toast2 =
|
|
1691
|
-
const identity =
|
|
1695
|
+
function HelpCenterList({ toast: toast2 = _chunkKBKZYJRIcjs.toast, backButton } = {}) {
|
|
1696
|
+
const identity = _chunkGDF2R2ERcjs.useChatIdentity.call(void 0, );
|
|
1692
1697
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1693
1698
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1694
1699
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1698,11 +1703,11 @@ function HelpCenterList({ toast: toast2 = _chunkJ66U3LPZcjs.toast, backButton }
|
|
|
1698
1703
|
const rawPage = Number(searchParams.get("page"));
|
|
1699
1704
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1700
1705
|
if (identity.isLoading) {
|
|
1701
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1706
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD5YY5U6Jcjs.DevSectionPage, { sectionKey: "tickets", backButton, preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD5YY5U6Jcjs.DevCardRowSkeletonList, {}) });
|
|
1702
1707
|
}
|
|
1703
1708
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _60 => _60.user, 'optionalAccess', _61 => _61.email])) {
|
|
1704
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1705
|
-
|
|
1709
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD5YY5U6Jcjs.DevSectionPage, { sectionKey: "tickets", backButton, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1710
|
+
_chunkD5YY5U6Jcjs.EmptyState,
|
|
1706
1711
|
{
|
|
1707
1712
|
type: "generic",
|
|
1708
1713
|
title: "Sign in to manage tickets",
|
|
@@ -1829,15 +1834,15 @@ function HelpCenterListAuthed({
|
|
|
1829
1834
|
] }),
|
|
1830
1835
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXXI7BNB6cjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1831
1836
|
] }),
|
|
1832
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1837
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD5YY5U6Jcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1833
1838
|
// Bridge state — background refetch in flight and the
|
|
1834
1839
|
// optimistic placeholder was just removed by the mutation
|
|
1835
1840
|
// callback. Without this branch "No tickets yet" would flash
|
|
1836
1841
|
// for ~50ms between `removeOptimistic` and the server
|
|
1837
1842
|
// response landing.
|
|
1838
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1843
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD5YY5U6Jcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1839
1844
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1840
|
-
|
|
1845
|
+
_chunkD5YY5U6Jcjs.EmptyState,
|
|
1841
1846
|
{
|
|
1842
1847
|
type: "search",
|
|
1843
1848
|
title: "No tickets found",
|
|
@@ -1852,7 +1857,7 @@ function HelpCenterListAuthed({
|
|
|
1852
1857
|
}
|
|
1853
1858
|
}
|
|
1854
1859
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1855
|
-
|
|
1860
|
+
_chunkD5YY5U6Jcjs.EmptyState,
|
|
1856
1861
|
{
|
|
1857
1862
|
type: "generic",
|
|
1858
1863
|
title: "No tickets yet",
|
|
@@ -1886,9 +1891,9 @@ function HelpCenterListAuthed({
|
|
|
1886
1891
|
ticket.id
|
|
1887
1892
|
)) })
|
|
1888
1893
|
) }),
|
|
1889
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1894
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD5YY5U6Jcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1890
1895
|
] });
|
|
1891
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1896
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkD5YY5U6Jcjs.DevSectionPage, { sectionKey: "tickets", backButton, preControls: form, children: body });
|
|
1892
1897
|
}
|
|
1893
1898
|
|
|
1894
1899
|
|