@flamingo-stack/openframe-frontend-core 0.0.215 → 0.0.216
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-2V4SACHE.js +302 -0
- package/dist/chunk-2V4SACHE.js.map +1 -0
- package/dist/chunk-572WQWIX.cjs +348 -0
- package/dist/chunk-572WQWIX.cjs.map +1 -0
- package/dist/{chunk-WT5JV2GS.cjs → chunk-5V6MSE3B.cjs} +39 -39
- package/dist/chunk-5V6MSE3B.cjs.map +1 -0
- package/dist/{chunk-WQZP3JIZ.js → chunk-CDLYRFDE.js} +1894 -1472
- package/dist/chunk-CDLYRFDE.js.map +1 -0
- package/dist/chunk-GVNQAGXB.js +232 -0
- package/dist/chunk-GVNQAGXB.js.map +1 -0
- package/dist/{chunk-P5EE2VJX.cjs → chunk-HOHDXYPR.cjs} +1 -1
- package/dist/chunk-HOHDXYPR.cjs.map +1 -0
- package/dist/chunk-IH76P5R6.cjs +232 -0
- package/dist/chunk-IH76P5R6.cjs.map +1 -0
- package/dist/{chunk-24KCAECR.cjs → chunk-JJR27M56.cjs} +3 -3
- package/dist/{chunk-24KCAECR.cjs.map → chunk-JJR27M56.cjs.map} +1 -1
- package/dist/chunk-K4DFAVSO.cjs +302 -0
- package/dist/chunk-K4DFAVSO.cjs.map +1 -0
- package/dist/{chunk-HICZPTRR.js → chunk-LCLTCCXS.js} +14 -14
- package/dist/chunk-LCLTCCXS.js.map +1 -0
- package/dist/{chunk-VFKQMAUF.cjs → chunk-OB45JHDY.cjs} +3 -3
- package/dist/{chunk-VFKQMAUF.cjs.map → chunk-OB45JHDY.cjs.map} +1 -1
- package/dist/{chunk-4XLJWX2N.js → chunk-ORJREQ2W.js} +4 -4
- package/dist/{chunk-7PCP7YQR.js → chunk-QTKU6ULP.js} +6 -6
- package/dist/{chunk-CIPO6DXK.js → chunk-QY75VKAS.js} +5 -5
- package/dist/{chunk-ZG2YY5E7.js → chunk-RFONYT63.js} +1 -1
- package/dist/chunk-RFONYT63.js.map +1 -0
- package/dist/{chunk-NGFP4RVL.cjs → chunk-SMCG2CCC.cjs} +30 -30
- package/dist/{chunk-NGFP4RVL.cjs.map → chunk-SMCG2CCC.cjs.map} +1 -1
- package/dist/{chunk-MX5MIFWA.js → chunk-UEBM4PC4.js} +5 -5
- package/dist/chunk-VC3ND5RB.js +348 -0
- package/dist/chunk-VC3ND5RB.js.map +1 -0
- package/dist/{chunk-UXZ3ZJ3M.cjs → chunk-XDPSSE4O.cjs} +4 -4
- package/dist/{chunk-UXZ3ZJ3M.cjs.map → chunk-XDPSSE4O.cjs.map} +1 -1
- package/dist/{chunk-D4MNFY67.cjs → chunk-ZGTDUPTW.cjs} +1316 -894
- package/dist/chunk-ZGTDUPTW.cjs.map +1 -0
- package/dist/components/chat/entity-cards/blog-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/blog-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/case-study-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/case-study-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/customer-interview-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/customer-interview-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/investor-update-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/investor-update-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/program-card.d.ts +1 -1
- package/dist/components/chat/entity-cards/program-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/use-entity-card-link.d.ts +14 -0
- package/dist/components/chat/entity-cards/use-entity-card-link.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/use-entity-card-placeholder.d.ts +13 -0
- package/dist/components/chat/entity-cards/use-entity-card-placeholder.d.ts.map +1 -0
- package/dist/components/chat/index.cjs +11 -11
- package/dist/components/chat/index.js +10 -10
- package/dist/components/contact/index.cjs +12 -12
- package/dist/components/contact/index.js +11 -11
- package/dist/components/features/captions-url.d.ts +18 -0
- package/dist/components/features/captions-url.d.ts.map +1 -0
- package/dist/components/features/index.cjs +23 -11
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.d.ts +2 -0
- package/dist/components/features/index.d.ts.map +1 -1
- package/dist/components/features/index.js +24 -12
- package/dist/components/features/mux-origins.cjs +10 -0
- package/dist/components/features/mux-origins.cjs.map +1 -0
- package/dist/components/features/mux-origins.d.ts +26 -0
- package/dist/components/features/mux-origins.d.ts.map +1 -0
- package/dist/components/features/mux-origins.js +7 -0
- package/dist/components/features/mux-origins.js.map +1 -0
- package/dist/components/features/notifications/index.d.ts +2 -0
- package/dist/components/features/notifications/index.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-drawer.d.ts +2 -1
- package/dist/components/features/notifications/notification-drawer.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-popups.d.ts +10 -0
- package/dist/components/features/notifications/notification-popups.d.ts.map +1 -0
- package/dist/components/features/notifications/notifications-context.d.ts +8 -1
- package/dist/components/features/notifications/notifications-context.d.ts.map +1 -1
- package/dist/components/features/notifications/types.d.ts +1 -0
- package/dist/components/features/notifications/types.d.ts.map +1 -1
- package/dist/components/features/use-video-warmup.d.ts +53 -0
- package/dist/components/features/use-video-warmup.d.ts.map +1 -0
- package/dist/components/icons/index.cjs +3 -3
- package/dist/components/icons/index.js +2 -2
- package/dist/components/icons-v2-generated/index.cjs +2 -2
- package/dist/components/icons-v2-generated/index.cjs.map +1 -1
- package/dist/components/icons-v2-generated/index.js +4 -4
- package/dist/components/index.cjs +132 -102
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +94 -64
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +11 -11
- package/dist/components/navigation/index.js +10 -10
- package/dist/components/onboarding-guides/build-default-href.d.ts +15 -0
- package/dist/components/onboarding-guides/build-default-href.d.ts.map +1 -0
- package/dist/components/onboarding-guides/hooks/use-onboarding-guides.d.ts +28 -0
- package/dist/components/onboarding-guides/hooks/use-onboarding-guides.d.ts.map +1 -0
- package/dist/components/onboarding-guides/index.cjs +373 -0
- package/dist/components/onboarding-guides/index.cjs.map +1 -0
- package/dist/components/onboarding-guides/index.d.ts +25 -0
- package/dist/components/onboarding-guides/index.d.ts.map +1 -0
- package/dist/components/onboarding-guides/index.js +373 -0
- package/dist/components/onboarding-guides/index.js.map +1 -0
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts +52 -0
- package/dist/components/onboarding-guides/onboarding-guide-detail-view.d.ts.map +1 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-skeleton.d.ts +17 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-skeleton.d.ts.map +1 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-view.d.ts +43 -0
- package/dist/components/onboarding-guides/onboarding-guides-catalog-view.d.ts.map +1 -0
- package/dist/components/shared/doc-search/doc-search-bar.d.ts +59 -0
- package/dist/components/shared/doc-search/doc-search-bar.d.ts.map +1 -0
- package/dist/components/shared/doc-search/doc-search-result-row.d.ts +18 -0
- package/dist/components/shared/doc-search/doc-search-result-row.d.ts.map +1 -0
- package/dist/components/shared/doc-search/format-relative-path.d.ts +10 -0
- package/dist/components/shared/doc-search/format-relative-path.d.ts.map +1 -0
- package/dist/components/shared/doc-search/index.d.ts +8 -0
- package/dist/components/shared/doc-search/index.d.ts.map +1 -0
- package/dist/components/shared/doc-search/map-doc-search-results.d.ts +15 -0
- package/dist/components/shared/doc-search/map-doc-search-results.d.ts.map +1 -0
- package/dist/components/shared/doc-search/resolve-search-result-action.d.ts +37 -0
- package/dist/components/shared/doc-search/resolve-search-result-action.d.ts.map +1 -0
- package/dist/components/shared/doc-search/types.d.ts +29 -0
- package/dist/components/shared/doc-search/types.d.ts.map +1 -0
- package/dist/components/shared/doc-search/use-doc-search.d.ts +46 -0
- package/dist/components/shared/doc-search/use-doc-search.d.ts.map +1 -0
- package/dist/components/tickets/help-center-card.d.ts +5 -1
- package/dist/components/tickets/help-center-card.d.ts.map +1 -1
- package/dist/components/tickets/hooks/use-ticket-actions.d.ts +8 -0
- package/dist/components/tickets/hooks/use-ticket-actions.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +316 -145
- package/dist/components/tickets/index.cjs.map +1 -1
- package/dist/components/tickets/index.js +237 -66
- package/dist/components/tickets/index.js.map +1 -1
- package/dist/components/tickets/ticket-detail-drawer.d.ts +11 -2
- package/dist/components/tickets/ticket-detail-drawer.d.ts.map +1 -1
- package/dist/components/tickets/types.d.ts +50 -1
- package/dist/components/tickets/types.d.ts.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +51 -51
- package/dist/components/ui/file-manager/index.cjs.map +1 -1
- package/dist/components/ui/file-manager/index.js +2 -2
- package/dist/components/ui/filter-pill-row.d.ts +20 -0
- package/dist/components/ui/filter-pill-row.d.ts.map +1 -0
- package/dist/components/ui/index.cjs +16 -14
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +21 -19
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/contexts/chat-runtime-context.d.ts +42 -0
- package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/embed-shims/index.cjs +3 -3
- package/dist/embed-shims/index.cjs.map +1 -1
- package/dist/embed-shims/index.js +5 -5
- package/dist/hooks/index.cjs +6 -6
- package/dist/hooks/index.js +5 -5
- package/dist/index.cjs +28 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +59 -45
- package/dist/utils/dev-sections/openframe-dev-sections.d.ts +2 -2
- package/dist/utils/dev-sections/openframe-dev-sections.d.ts.map +1 -1
- package/dist/utils/index.cjs +11 -5
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +11 -5
- package/dist/utils/index.js.map +1 -1
- package/package.json +13 -1
- package/src/components/chat/entity-cards/blog-card.tsx +17 -5
- package/src/components/chat/entity-cards/case-study-card.tsx +23 -1
- package/src/components/chat/entity-cards/customer-interview-card.tsx +23 -1
- package/src/components/chat/entity-cards/dispatch.tsx +21 -0
- package/src/components/chat/entity-cards/investor-update-card.tsx +23 -1
- package/src/components/chat/entity-cards/onboarding-guide-card.tsx +30 -4
- package/src/components/chat/entity-cards/program-card.tsx +17 -3
- package/src/components/chat/entity-cards/use-entity-card-link.ts +66 -0
- package/src/components/chat/entity-cards/use-entity-card-placeholder.ts +50 -0
- package/src/components/features/captions-url.ts +25 -0
- package/src/components/features/index.ts +2 -0
- package/src/components/features/mux-origins.ts +27 -0
- package/src/components/features/notifications/index.ts +2 -0
- package/src/components/features/notifications/notification-drawer.tsx +100 -16
- package/src/components/features/notifications/notification-popups.tsx +105 -0
- package/src/components/features/notifications/notifications-context.tsx +16 -0
- package/src/components/features/notifications/types.ts +1 -0
- package/src/components/features/use-video-warmup.ts +176 -0
- package/src/components/index.ts +5 -0
- package/src/components/onboarding-guides/build-default-href.ts +16 -0
- package/src/components/onboarding-guides/hooks/use-onboarding-guides.ts +90 -0
- package/src/components/onboarding-guides/index.ts +39 -0
- package/src/components/onboarding-guides/onboarding-guide-detail-view.tsx +215 -0
- package/src/components/onboarding-guides/onboarding-guides-catalog-skeleton.tsx +62 -0
- package/src/components/onboarding-guides/onboarding-guides-catalog-view.tsx +230 -0
- package/src/components/shared/doc-search/doc-search-bar.tsx +100 -0
- package/src/components/shared/doc-search/doc-search-result-row.tsx +73 -0
- package/src/components/shared/doc-search/format-relative-path.ts +17 -0
- package/src/components/shared/doc-search/index.ts +24 -0
- package/src/components/shared/doc-search/map-doc-search-results.ts +113 -0
- package/src/components/shared/doc-search/resolve-search-result-action.ts +68 -0
- package/src/components/shared/doc-search/types.ts +28 -0
- package/src/components/shared/doc-search/use-doc-search.ts +263 -0
- package/src/components/tickets/help-center-card.tsx +8 -0
- package/src/components/tickets/help-center-list.tsx +17 -3
- package/src/components/tickets/hooks/use-ticket-actions.ts +210 -14
- package/src/components/tickets/ticket-detail-drawer.tsx +145 -5
- package/src/components/tickets/types.ts +55 -0
- package/src/components/ui/filter-pill-row.tsx +72 -0
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/simple-markdown-renderer.tsx +24 -1
- package/src/components/ui/toaster.tsx +3 -3
- package/src/contexts/chat-runtime-context.tsx +41 -0
- package/src/stories/NotificationDrawer.stories.tsx +18 -2
- package/src/utils/dev-sections/openframe-dev-sections.ts +12 -5
- package/dist/chunk-2G3NXF6J.cjs +0 -521
- package/dist/chunk-2G3NXF6J.cjs.map +0 -1
- package/dist/chunk-D4MNFY67.cjs.map +0 -1
- package/dist/chunk-HICZPTRR.js.map +0 -1
- package/dist/chunk-P5EE2VJX.cjs.map +0 -1
- package/dist/chunk-R6MLPU4A.js +0 -521
- package/dist/chunk-R6MLPU4A.js.map +0 -1
- package/dist/chunk-WQZP3JIZ.js.map +0 -1
- package/dist/chunk-WT5JV2GS.cjs.map +0 -1
- package/dist/chunk-ZG2YY5E7.js.map +0 -1
- /package/dist/{chunk-4XLJWX2N.js.map → chunk-ORJREQ2W.js.map} +0 -0
- /package/dist/{chunk-7PCP7YQR.js.map → chunk-QTKU6ULP.js.map} +0 -0
- /package/dist/{chunk-CIPO6DXK.js.map → chunk-QY75VKAS.js.map} +0 -0
- /package/dist/{chunk-MX5MIFWA.js.map → chunk-UEBM4PC4.js.map} +0 -0
|
@@ -4,17 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkK4DFAVSOcjs = require('../../chunk-K4DFAVSO.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
var _chunk2G3NXF6Jcjs = require('../../chunk-2G3NXF6J.cjs');
|
|
13
|
-
require('../../chunk-VFKQMAUF.cjs');
|
|
14
13
|
|
|
14
|
+
var _chunkIH76P5R6cjs = require('../../chunk-IH76P5R6.cjs');
|
|
15
|
+
require('../../chunk-OB45JHDY.cjs');
|
|
15
16
|
|
|
16
|
-
var _chunkNGFP4RVLcjs = require('../../chunk-NGFP4RVL.cjs');
|
|
17
17
|
|
|
18
|
+
var _chunkSMCG2CCCcjs = require('../../chunk-SMCG2CCC.cjs');
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
|
|
@@ -36,43 +37,45 @@ var _chunkNGFP4RVLcjs = require('../../chunk-NGFP4RVL.cjs');
|
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
|
|
39
|
-
var _chunkD4MNFY67cjs = require('../../chunk-D4MNFY67.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
43
|
-
require('../../chunk-24KCAECR.cjs');
|
|
44
|
-
require('../../chunk-65CPJ4SX.cjs');
|
|
45
|
-
require('../../chunk-XQFFGR6U.cjs');
|
|
46
|
-
require('../../chunk-P5EE2VJX.cjs');
|
|
47
|
-
require('../../chunk-27APPAJN.cjs');
|
|
42
|
+
var _chunkZGTDUPTWcjs = require('../../chunk-ZGTDUPTW.cjs');
|
|
48
43
|
require('../../chunk-XL4V2PYG.cjs');
|
|
49
44
|
require('../../chunk-BZFW3FOF.cjs');
|
|
50
45
|
|
|
51
46
|
|
|
52
47
|
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
require('../../chunk-
|
|
49
|
+
|
|
50
|
+
var _chunkXDPSSE4Ocjs = require('../../chunk-XDPSSE4O.cjs');
|
|
51
|
+
require('../../chunk-WBR7H6E3.cjs');
|
|
56
52
|
|
|
57
53
|
|
|
54
|
+
var _chunk5V6MSE3Bcjs = require('../../chunk-5V6MSE3B.cjs');
|
|
58
55
|
|
|
59
56
|
|
|
60
57
|
|
|
61
|
-
|
|
58
|
+
|
|
59
|
+
var _chunkG7UE6RKVcjs = require('../../chunk-G7UE6RKV.cjs');
|
|
60
|
+
require('../../chunk-JJR27M56.cjs');
|
|
62
61
|
require('../../chunk-664KA5FI.cjs');
|
|
62
|
+
require('../../chunk-65CPJ4SX.cjs');
|
|
63
63
|
require('../../chunk-WZW7C7TF.cjs');
|
|
64
|
-
require('../../chunk-
|
|
64
|
+
require('../../chunk-XQFFGR6U.cjs');
|
|
65
|
+
require('../../chunk-HOHDXYPR.cjs');
|
|
66
|
+
require('../../chunk-27APPAJN.cjs');
|
|
67
|
+
require('../../chunk-OZ3GH6OQ.cjs');
|
|
65
68
|
require('../../chunk-VRHGVLSL.cjs');
|
|
66
69
|
|
|
67
70
|
// src/components/tickets/ticket-center.tsx
|
|
68
71
|
var _react = require('react');
|
|
69
72
|
var _reactquery = require('@tanstack/react-query');
|
|
70
|
-
|
|
73
|
+
_chunkXDPSSE4Ocjs.init_button2.call(void 0, );
|
|
71
74
|
var _lucidereact = require('lucide-react');
|
|
72
75
|
|
|
73
76
|
// src/components/tickets/ticket-open-form.tsx
|
|
74
77
|
|
|
75
|
-
|
|
78
|
+
_chunkXDPSSE4Ocjs.init_button2.call(void 0, );
|
|
76
79
|
|
|
77
80
|
// src/components/tickets/types.ts
|
|
78
81
|
function isOptimistic(t) {
|
|
@@ -99,7 +102,7 @@ function TicketOpenForm({
|
|
|
99
102
|
}) {
|
|
100
103
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
101
104
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
102
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
105
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkZGTDUPTWcjs.useChatAttachments.call(void 0, );
|
|
103
106
|
const trimmedSubject = subject.trim();
|
|
104
107
|
const trimmedContent = content.trim();
|
|
105
108
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -119,7 +122,7 @@ function TicketOpenForm({
|
|
|
119
122
|
clear();
|
|
120
123
|
}
|
|
121
124
|
};
|
|
122
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
125
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZGTDUPTWcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
123
126
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
124
127
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
125
128
|
/* @__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." }),
|
|
@@ -136,7 +139,7 @@ function TicketOpenForm({
|
|
|
136
139
|
}
|
|
137
140
|
),
|
|
138
141
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
139
|
-
|
|
142
|
+
_chunkXDPSSE4Ocjs.Input,
|
|
140
143
|
{
|
|
141
144
|
id: "ticket-subject",
|
|
142
145
|
type: "text",
|
|
@@ -158,7 +161,7 @@ function TicketOpenForm({
|
|
|
158
161
|
}
|
|
159
162
|
),
|
|
160
163
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
161
|
-
|
|
164
|
+
_chunkZGTDUPTWcjs.Textarea,
|
|
162
165
|
{
|
|
163
166
|
id: "ticket-content",
|
|
164
167
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -182,7 +185,7 @@ function TicketOpenForm({
|
|
|
182
185
|
)
|
|
183
186
|
] }),
|
|
184
187
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
185
|
-
|
|
188
|
+
_chunkZGTDUPTWcjs.ChatAttachmentChipStrip,
|
|
186
189
|
{
|
|
187
190
|
attachments,
|
|
188
191
|
onRemove: removeAttachment,
|
|
@@ -191,7 +194,7 @@ function TicketOpenForm({
|
|
|
191
194
|
),
|
|
192
195
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
193
196
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
194
|
-
|
|
197
|
+
_chunkZGTDUPTWcjs.ChatAttachmentAddButton,
|
|
195
198
|
{
|
|
196
199
|
attachmentsEnabled: !supportSystemDown,
|
|
197
200
|
attachmentsCount: attachments.length,
|
|
@@ -200,7 +203,7 @@ function TicketOpenForm({
|
|
|
200
203
|
}
|
|
201
204
|
),
|
|
202
205
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
203
|
-
|
|
206
|
+
_chunkXDPSSE4Ocjs.Button,
|
|
204
207
|
{
|
|
205
208
|
type: "submit",
|
|
206
209
|
disabled: !canSubmit,
|
|
@@ -222,14 +225,14 @@ var Collapsible = CollapsiblePrimitive.Root;
|
|
|
222
225
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
223
226
|
|
|
224
227
|
// src/components/tickets/ticket-detail-drawer.tsx
|
|
225
|
-
|
|
228
|
+
_chunkXDPSSE4Ocjs.init_button2.call(void 0, );
|
|
226
229
|
|
|
227
230
|
|
|
228
231
|
// src/components/tickets/hooks/use-ticket-engagements.ts
|
|
229
232
|
|
|
230
233
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
231
234
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
232
|
-
const identity =
|
|
235
|
+
const identity = _chunkZGTDUPTWcjs.useChatIdentity.call(void 0, );
|
|
233
236
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _ => _.user, 'optionalAccess', _2 => _2.email]), () => ( "anon"));
|
|
234
237
|
const queryEnabled = enabled && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _3 => _3.user, 'optionalAccess', _4 => _4.email]) && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
235
238
|
const query = _reactquery.useQuery.call(void 0, {
|
|
@@ -243,7 +246,7 @@ function useTicketEngagements(externalTicketId, enabled = true) {
|
|
|
243
246
|
refetchOnMount: "always",
|
|
244
247
|
refetchOnWindowFocus: true,
|
|
245
248
|
queryFn: async () => {
|
|
246
|
-
const response = await
|
|
249
|
+
const response = await _chunkZGTDUPTWcjs.embedAuthedFetch.call(void 0, LIST_ENGAGEMENTS_ENDPOINT, {
|
|
247
250
|
method: "POST",
|
|
248
251
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
249
252
|
});
|
|
@@ -291,7 +294,7 @@ function TicketLinkedDeliveryCard({
|
|
|
291
294
|
{
|
|
292
295
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
293
296
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
294
|
-
|
|
297
|
+
_chunkK4DFAVSOcjs.DeliveryRow,
|
|
295
298
|
{
|
|
296
299
|
item,
|
|
297
300
|
href: clickup.delivery_href,
|
|
@@ -311,40 +314,52 @@ function TicketDetailDrawer({
|
|
|
311
314
|
onSendMessage,
|
|
312
315
|
onClose,
|
|
313
316
|
onReopen,
|
|
314
|
-
onActionCollapsed
|
|
317
|
+
onActionCollapsed,
|
|
318
|
+
replyError,
|
|
319
|
+
onClearReplyError
|
|
315
320
|
}) {
|
|
316
321
|
const isClosed = (_nullishCoalesce(ticket.status, () => ( ""))).toUpperCase() === "CLOSED";
|
|
317
322
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-ods-card border-t border-ods-border px-4 py-4 flex flex-col gap-4", children: [
|
|
323
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AssignedAgentRow, { assignedOwner: ticket.assignedOwner }),
|
|
318
324
|
ticket.clickup && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketLinkedDeliveryCard, { clickup: ticket.clickup }),
|
|
319
325
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
320
326
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs font-medium text-ods-text-secondary mb-2 uppercase tracking-wider", children: "Conversation" }),
|
|
321
327
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketTimelinePanel, { ticket })
|
|
322
328
|
] }),
|
|
323
|
-
/* @__PURE__ */ _jsxruntime.
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
329
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border-t border-ods-border pt-4", children: [
|
|
330
|
+
replyError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
331
|
+
ReplyFailureBanner,
|
|
332
|
+
{
|
|
333
|
+
error: replyError,
|
|
334
|
+
onDismiss: _nullishCoalesce(onClearReplyError, () => ( (() => void 0)))
|
|
335
|
+
}
|
|
336
|
+
),
|
|
337
|
+
isClosed ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
338
|
+
ReopenAction,
|
|
339
|
+
{
|
|
340
|
+
ticketRef: { id: ticket.id, external_id: ticket.external_id },
|
|
341
|
+
busy,
|
|
342
|
+
supportSystemDown,
|
|
343
|
+
onReopen,
|
|
344
|
+
onActionCollapsed
|
|
345
|
+
}
|
|
346
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
347
|
+
OpenActions,
|
|
348
|
+
{
|
|
349
|
+
ticket,
|
|
350
|
+
busy,
|
|
351
|
+
supportSystemDown,
|
|
352
|
+
onSendMessage,
|
|
353
|
+
onClose,
|
|
354
|
+
onActionCollapsed
|
|
355
|
+
}
|
|
356
|
+
)
|
|
357
|
+
] })
|
|
343
358
|
] });
|
|
344
359
|
}
|
|
345
360
|
var TURN_SEPARATOR_RE = /[\s]{1,16}---[\s]{1,16}/g;
|
|
346
361
|
function TicketTimelinePanel({ ticket }) {
|
|
347
|
-
const identity =
|
|
362
|
+
const identity = _chunkZGTDUPTWcjs.useChatIdentity.call(void 0, );
|
|
348
363
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
349
364
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
350
365
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -356,10 +371,10 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
356
371
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _20 => _20.user, 'optionalAccess', _21 => _21.avatarUrl]), () => ( void 0)) : void 0;
|
|
357
372
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
358
373
|
if (isLoading) {
|
|
359
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
374
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIH76P5R6cjs.ConversationCardRowSkeletonList, { rows: 2 });
|
|
360
375
|
}
|
|
361
376
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
362
|
-
|
|
377
|
+
_chunkK4DFAVSOcjs.EmptyState,
|
|
363
378
|
{
|
|
364
379
|
type: "generic",
|
|
365
380
|
title: "No conversation yet",
|
|
@@ -374,7 +389,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
374
389
|
const role = i === 0 ? "Original message" : isResolution ? "Resolution" : `Update ${i}`;
|
|
375
390
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
376
391
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
377
|
-
|
|
392
|
+
_chunkIH76P5R6cjs.ConversationCardRow,
|
|
378
393
|
{
|
|
379
394
|
author: customerName,
|
|
380
395
|
role,
|
|
@@ -404,7 +419,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
404
419
|
avatarSrc = void 0;
|
|
405
420
|
}
|
|
406
421
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
407
|
-
|
|
422
|
+
_chunkIH76P5R6cjs.ConversationCardRow,
|
|
408
423
|
{
|
|
409
424
|
author,
|
|
410
425
|
role: "Reply",
|
|
@@ -421,7 +436,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
421
436
|
// content rendered — drawer is showing the customer's body
|
|
422
437
|
// turns + cached engagements while a background refetch is
|
|
423
438
|
// in flight. Single row keeps the placeholder modest.
|
|
424
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
439
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIH76P5R6cjs.ConversationCardRowSkeletonList, { rows: 1 })
|
|
425
440
|
] });
|
|
426
441
|
}
|
|
427
442
|
function mapEngagementAttachments(files) {
|
|
@@ -449,11 +464,10 @@ function ReopenAction({
|
|
|
449
464
|
onActionCollapsed
|
|
450
465
|
}) {
|
|
451
466
|
const handleReopen = async () => {
|
|
452
|
-
|
|
453
|
-
if (ok) onActionCollapsed();
|
|
467
|
+
void await onReopen(ticketRef);
|
|
454
468
|
};
|
|
455
469
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
456
|
-
|
|
470
|
+
_chunkXDPSSE4Ocjs.Button,
|
|
457
471
|
{
|
|
458
472
|
type: "button",
|
|
459
473
|
onClick: () => void handleReopen(),
|
|
@@ -474,7 +488,7 @@ function OpenActions({
|
|
|
474
488
|
const [messageText, setMessageText] = _react.useState.call(void 0, "");
|
|
475
489
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
476
490
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
477
|
-
const attachments =
|
|
491
|
+
const attachments = _chunkZGTDUPTWcjs.useChatAttachments.call(void 0, );
|
|
478
492
|
const disabled = busy || supportSystemDown;
|
|
479
493
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
480
494
|
const hasText = messageText.trim().length > 0;
|
|
@@ -490,14 +504,13 @@ function OpenActions({
|
|
|
490
504
|
};
|
|
491
505
|
const confirmClose = async () => {
|
|
492
506
|
setCloseDialogOpen(false);
|
|
493
|
-
|
|
507
|
+
await onClose(ticketRef, resolution.trim() || void 0);
|
|
494
508
|
setResolution("");
|
|
495
|
-
if (ok) onActionCollapsed();
|
|
496
509
|
};
|
|
497
510
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
498
511
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
499
512
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
500
|
-
|
|
513
|
+
_chunkZGTDUPTWcjs.Textarea,
|
|
501
514
|
{
|
|
502
515
|
value: messageText,
|
|
503
516
|
onChange: (e) => setMessageText(e.target.value),
|
|
@@ -508,7 +521,7 @@ function OpenActions({
|
|
|
508
521
|
}
|
|
509
522
|
),
|
|
510
523
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
511
|
-
|
|
524
|
+
_chunkZGTDUPTWcjs.ChatAttachmentChipStrip,
|
|
512
525
|
{
|
|
513
526
|
attachments: attachments.attachments,
|
|
514
527
|
onRemove: attachments.removeAttachment,
|
|
@@ -518,7 +531,7 @@ function OpenActions({
|
|
|
518
531
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center gap-2 flex-wrap", children: [
|
|
519
532
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
520
533
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
521
|
-
|
|
534
|
+
_chunkZGTDUPTWcjs.ChatAttachmentAddButton,
|
|
522
535
|
{
|
|
523
536
|
attachmentsEnabled: !supportSystemDown,
|
|
524
537
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -530,7 +543,7 @@ function OpenActions({
|
|
|
530
543
|
] }),
|
|
531
544
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
|
|
532
545
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
533
|
-
|
|
546
|
+
_chunkXDPSSE4Ocjs.Button,
|
|
534
547
|
{
|
|
535
548
|
type: "button",
|
|
536
549
|
variant: "transparent",
|
|
@@ -541,7 +554,7 @@ function OpenActions({
|
|
|
541
554
|
}
|
|
542
555
|
),
|
|
543
556
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
544
|
-
|
|
557
|
+
_chunkXDPSSE4Ocjs.Button,
|
|
545
558
|
{
|
|
546
559
|
type: "button",
|
|
547
560
|
onClick: () => void sendMessage(),
|
|
@@ -553,13 +566,13 @@ function OpenActions({
|
|
|
553
566
|
] })
|
|
554
567
|
] })
|
|
555
568
|
] }),
|
|
556
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
557
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
558
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
559
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
569
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZGTDUPTWcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZGTDUPTWcjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
570
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZGTDUPTWcjs.AlertDialogHeader, { children: [
|
|
571
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZGTDUPTWcjs.AlertDialogTitle, { className: "text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold", children: "Close this ticket?" }),
|
|
572
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZGTDUPTWcjs.AlertDialogDescription, { className: "text-ods-text-secondary font-['DM_Sans'] text-[14px]", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
560
573
|
] }),
|
|
561
574
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
562
|
-
|
|
575
|
+
_chunkZGTDUPTWcjs.Textarea,
|
|
563
576
|
{
|
|
564
577
|
value: resolution,
|
|
565
578
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -569,9 +582,9 @@ function OpenActions({
|
|
|
569
582
|
className: "mt-2"
|
|
570
583
|
}
|
|
571
584
|
),
|
|
572
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
585
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZGTDUPTWcjs.AlertDialogFooter, { children: [
|
|
573
586
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
574
|
-
|
|
587
|
+
_chunkZGTDUPTWcjs.AlertDialogCancel,
|
|
575
588
|
{
|
|
576
589
|
disabled: busy,
|
|
577
590
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -579,7 +592,7 @@ function OpenActions({
|
|
|
579
592
|
}
|
|
580
593
|
),
|
|
581
594
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
582
|
-
|
|
595
|
+
_chunkZGTDUPTWcjs.AlertDialogAction,
|
|
583
596
|
{
|
|
584
597
|
onClick: () => void confirmClose(),
|
|
585
598
|
disabled: busy,
|
|
@@ -591,6 +604,56 @@ function OpenActions({
|
|
|
591
604
|
] }) })
|
|
592
605
|
] });
|
|
593
606
|
}
|
|
607
|
+
function ReplyFailureBanner({
|
|
608
|
+
error,
|
|
609
|
+
onDismiss
|
|
610
|
+
}) {
|
|
611
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
612
|
+
"div",
|
|
613
|
+
{
|
|
614
|
+
role: "status",
|
|
615
|
+
"aria-live": "polite",
|
|
616
|
+
className: "mb-3 flex items-start gap-3 rounded-md border border-ods-attention-red-error bg-ods-attention-red-error-secondary px-3 py-2 text-sm text-ods-attention-red-error",
|
|
617
|
+
children: [
|
|
618
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium leading-snug", children: error.message }),
|
|
619
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
620
|
+
_chunkXDPSSE4Ocjs.Button,
|
|
621
|
+
{
|
|
622
|
+
type: "button",
|
|
623
|
+
variant: "transparent",
|
|
624
|
+
onClick: onDismiss,
|
|
625
|
+
"aria-label": "Dismiss reply failure",
|
|
626
|
+
className: "ml-auto px-2 py-0.5 text-xs font-medium uppercase tracking-wider text-ods-attention-red-error hover:bg-ods-attention-red-error/10 border-transparent",
|
|
627
|
+
children: "Dismiss"
|
|
628
|
+
}
|
|
629
|
+
)
|
|
630
|
+
]
|
|
631
|
+
}
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
function AssignedAgentRow({
|
|
635
|
+
assignedOwner
|
|
636
|
+
}) {
|
|
637
|
+
const trimmedName = _optionalChain([assignedOwner, 'optionalAccess', _30 => _30.name, 'optionalAccess', _31 => _31.trim, 'call', _32 => _32()]) || null;
|
|
638
|
+
const emailFallback = _optionalChain([assignedOwner, 'optionalAccess', _33 => _33.email, 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]) || null;
|
|
639
|
+
const displayLabel = _nullishCoalesce(trimmedName, () => ( (emailFallback ? emailFallback.split("@")[0] : null)));
|
|
640
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 text-xs", children: [
|
|
641
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary uppercase tracking-wider font-medium", children: "Assigned to" }),
|
|
642
|
+
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
643
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
644
|
+
_chunkZGTDUPTWcjs.SquareAvatar,
|
|
645
|
+
{
|
|
646
|
+
size: "sm",
|
|
647
|
+
variant: "round",
|
|
648
|
+
src: _nullishCoalesce(_optionalChain([assignedOwner, 'optionalAccess', _36 => _36.avatarUrl]), () => ( void 0)),
|
|
649
|
+
alt: displayLabel,
|
|
650
|
+
fallback: displayLabel
|
|
651
|
+
}
|
|
652
|
+
),
|
|
653
|
+
displayLabel
|
|
654
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary italic", children: "Unassigned" })
|
|
655
|
+
] });
|
|
656
|
+
}
|
|
594
657
|
|
|
595
658
|
// src/components/tickets/ticket-row.tsx
|
|
596
659
|
|
|
@@ -609,7 +672,7 @@ function TicketRow({
|
|
|
609
672
|
const rowRef = _react.useRef.call(void 0, null);
|
|
610
673
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
611
674
|
onToggle(ticket.id);
|
|
612
|
-
|
|
675
|
+
_chunkZGTDUPTWcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
613
676
|
adjustTargetY: (raw) => {
|
|
614
677
|
if (!rowRef.current) return raw;
|
|
615
678
|
const expandedDrawer = document.querySelector(
|
|
@@ -635,7 +698,7 @@ function TicketRow({
|
|
|
635
698
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
636
699
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
637
700
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
638
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
701
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkZGTDUPTWcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
639
702
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
640
703
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
641
704
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -650,7 +713,7 @@ function TicketRow({
|
|
|
650
713
|
className: "border-b border-ods-border last:border-b-0",
|
|
651
714
|
children: [
|
|
652
715
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
653
|
-
|
|
716
|
+
_chunkZGTDUPTWcjs.ChatTicketItem,
|
|
654
717
|
{
|
|
655
718
|
ticket: tileData,
|
|
656
719
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -714,7 +777,7 @@ function useTicketsList(filters) {
|
|
|
714
777
|
pageSize
|
|
715
778
|
};
|
|
716
779
|
if (statusFilter) body.status = statusFilter;
|
|
717
|
-
const response = await
|
|
780
|
+
const response = await _chunkZGTDUPTWcjs.embedAuthedFetch.call(void 0, FIND_TICKET_ENDPOINT, {
|
|
718
781
|
method: "POST",
|
|
719
782
|
body: JSON.stringify(body)
|
|
720
783
|
});
|
|
@@ -726,12 +789,12 @@ function useTicketsList(filters) {
|
|
|
726
789
|
}
|
|
727
790
|
});
|
|
728
791
|
const data = query.data;
|
|
729
|
-
const totalCount = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
730
|
-
const echoedPage = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
731
|
-
const echoedPageSize = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
732
|
-
const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
792
|
+
const totalCount = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _37 => _37.totalCount]), () => ( _optionalChain([data, 'optionalAccess', _38 => _38.count]))), () => ( (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _39 => _39.tickets, 'optionalAccess', _40 => _40.length]), () => ( 0)))));
|
|
793
|
+
const echoedPage = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _41 => _41.page]), () => ( page));
|
|
794
|
+
const echoedPageSize = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _42 => _42.pageSize]), () => ( pageSize));
|
|
795
|
+
const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _43 => _43.totalPages]), () => ( Math.max(1, Math.ceil(totalCount / echoedPageSize))));
|
|
733
796
|
return {
|
|
734
|
-
tickets: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
797
|
+
tickets: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _44 => _44.tickets]), () => ( [])),
|
|
735
798
|
// Loading-state-truth = `data === undefined`. TanStack v5's
|
|
736
799
|
// `isPending` / `isLoading` flags can be `false` in transient
|
|
737
800
|
// windows where the query is enabled-but-fetch-not-yet-fired
|
|
@@ -753,7 +816,7 @@ function useTicketsList(filters) {
|
|
|
753
816
|
// - Background refetch with existing data: data !== undefined → no load
|
|
754
817
|
// - Filter-change refetch landing on empty results: data?.tickets===[]
|
|
755
818
|
// + isFetching → bridge skeleton (the `||` branch)
|
|
756
|
-
isLoading: enabled && (data === void 0 || query.isFetching && (_nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
819
|
+
isLoading: enabled && (data === void 0 || query.isFetching && (_nullishCoalesce(_optionalChain([data, 'optionalAccess', _45 => _45.tickets]), () => ( []))).length === 0),
|
|
757
820
|
isFetching: query.isFetching,
|
|
758
821
|
error: _nullishCoalesce(query.error, () => ( null)),
|
|
759
822
|
refetch: () => {
|
|
@@ -771,6 +834,12 @@ function useTicketsList(filters) {
|
|
|
771
834
|
|
|
772
835
|
|
|
773
836
|
var TICKET_ACTION_ENDPOINT = "/api/chat/agent/ticket-action";
|
|
837
|
+
var REPLY_BANNER_CODES = /* @__PURE__ */ new Set([
|
|
838
|
+
"HUBSPOT_5XX",
|
|
839
|
+
"HUBSPOT_400_VALIDATION",
|
|
840
|
+
"HUBSPOT_404_THREAD",
|
|
841
|
+
"HUBSPOT_REPLY_UNKNOWN"
|
|
842
|
+
]);
|
|
774
843
|
var MIRROR_SYNC_BACKOFF_MS = [3e3, 6e3, 12e3];
|
|
775
844
|
function useTicketActions(options) {
|
|
776
845
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
@@ -785,6 +854,26 @@ function useTicketActions(options) {
|
|
|
785
854
|
setBusyRows(new Set(busyRowsRef.current));
|
|
786
855
|
}, []);
|
|
787
856
|
const isRowBusy = _react.useCallback.call(void 0, (id) => busyRows.has(id), [busyRows]);
|
|
857
|
+
const [replyErrorByTicket, setReplyErrorByTicket] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
|
|
858
|
+
const setReplyError = _react.useCallback.call(void 0,
|
|
859
|
+
(externalId, mapped) => {
|
|
860
|
+
setReplyErrorByTicket((prev) => {
|
|
861
|
+
const next = new Map(prev);
|
|
862
|
+
if (mapped) next.set(externalId, mapped);
|
|
863
|
+
else next.delete(externalId);
|
|
864
|
+
return next;
|
|
865
|
+
});
|
|
866
|
+
},
|
|
867
|
+
[]
|
|
868
|
+
);
|
|
869
|
+
const replyErrorFor = _react.useCallback.call(void 0,
|
|
870
|
+
(externalId) => _nullishCoalesce(replyErrorByTicket.get(externalId), () => ( null)),
|
|
871
|
+
[replyErrorByTicket]
|
|
872
|
+
);
|
|
873
|
+
const clearReplyError = _react.useCallback.call(void 0,
|
|
874
|
+
(externalId) => setReplyError(externalId, null),
|
|
875
|
+
[setReplyError]
|
|
876
|
+
);
|
|
788
877
|
const watcherControllersRef = _react.useRef.call(void 0, /* @__PURE__ */ new Map());
|
|
789
878
|
_react.useEffect.call(void 0, () => {
|
|
790
879
|
return () => {
|
|
@@ -802,7 +891,7 @@ function useTicketActions(options) {
|
|
|
802
891
|
}, []);
|
|
803
892
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
804
893
|
async (toolName, args) => {
|
|
805
|
-
const res = await
|
|
894
|
+
const res = await _chunkZGTDUPTWcjs.embedAuthedFetch.call(void 0, TICKET_ACTION_ENDPOINT, {
|
|
806
895
|
method: "POST",
|
|
807
896
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
808
897
|
});
|
|
@@ -862,9 +951,11 @@ function useTicketActions(options) {
|
|
|
862
951
|
},
|
|
863
952
|
[queryClient, removeOptimistic, toast2]
|
|
864
953
|
);
|
|
954
|
+
const lastUpdateErrorRef = _react.useRef.call(void 0, null);
|
|
865
955
|
const surfaceError = _react.useCallback.call(void 0,
|
|
866
956
|
(err, action) => {
|
|
867
957
|
const mapped = mapTicketActionError(err);
|
|
958
|
+
lastUpdateErrorRef.current = mapped;
|
|
868
959
|
if (mapped.supportSystemDown) onSupportSystemDown();
|
|
869
960
|
toast2({
|
|
870
961
|
title: `Could not ${action}`,
|
|
@@ -899,6 +990,10 @@ function useTicketActions(options) {
|
|
|
899
990
|
// seconds via the mirror refetch. Drawer uses live chat
|
|
900
991
|
// identity for own-replies during this window anyway.
|
|
901
992
|
customer_name: null,
|
|
993
|
+
// No assignee until the real ticket lands. Drawer renders
|
|
994
|
+
// "Unassigned" for this brief window.
|
|
995
|
+
assigned_to: null,
|
|
996
|
+
assignedOwner: null,
|
|
902
997
|
hubspot_updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
903
998
|
_optimistic: true
|
|
904
999
|
};
|
|
@@ -908,7 +1003,7 @@ function useTicketActions(options) {
|
|
|
908
1003
|
const result = await executeTicketAction("create_ticket", {
|
|
909
1004
|
subject: input.subject.trim(),
|
|
910
1005
|
content: input.content.trim(),
|
|
911
|
-
..._optionalChain([input, 'access',
|
|
1006
|
+
..._optionalChain([input, 'access', _46 => _46.attachments, 'optionalAccess', _47 => _47.length]) ? { attachments: input.attachments } : {}
|
|
912
1007
|
});
|
|
913
1008
|
if (result.mirror_synced === false) {
|
|
914
1009
|
toast2(TOAST_COPY.open_mirror_pending);
|
|
@@ -951,10 +1046,23 @@ function useTicketActions(options) {
|
|
|
951
1046
|
ticket_id: ticket.external_id
|
|
952
1047
|
});
|
|
953
1048
|
toast2(successCopy);
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
queryClient.
|
|
957
|
-
|
|
1049
|
+
const statusUpdate = _nullishCoalesce(serverArgs.status, () => ( null));
|
|
1050
|
+
if (statusUpdate) {
|
|
1051
|
+
queryClient.setQueriesData(
|
|
1052
|
+
{ queryKey: ["tickets"] },
|
|
1053
|
+
(prev) => {
|
|
1054
|
+
if (!prev || !Array.isArray(prev.tickets)) return prev;
|
|
1055
|
+
let mutated = false;
|
|
1056
|
+
const nextTickets = prev.tickets.map((t) => {
|
|
1057
|
+
if (t.id !== ticket.id || t.status === statusUpdate) return t;
|
|
1058
|
+
mutated = true;
|
|
1059
|
+
return { ...t, status: statusUpdate };
|
|
1060
|
+
});
|
|
1061
|
+
return mutated ? { ...prev, tickets: nextTickets } : prev;
|
|
1062
|
+
}
|
|
1063
|
+
);
|
|
1064
|
+
}
|
|
1065
|
+
await queryClient.invalidateQueries({ queryKey: ["ticket-engagements"] });
|
|
958
1066
|
return true;
|
|
959
1067
|
});
|
|
960
1068
|
} catch (err) {
|
|
@@ -974,12 +1082,13 @@ function useTicketActions(options) {
|
|
|
974
1082
|
[setRowBusy, enqueue, executeTicketAction, queryClient, toast2, surfaceError, removeTicketFromCache]
|
|
975
1083
|
);
|
|
976
1084
|
const sendMessage = _react.useCallback.call(void 0,
|
|
977
|
-
(ticket, text, attachments) => {
|
|
1085
|
+
async (ticket, text, attachments) => {
|
|
978
1086
|
const trimmed = text.trim();
|
|
979
1087
|
const hasText = trimmed.length > 0;
|
|
980
1088
|
const hasFiles = attachments.length > 0;
|
|
981
|
-
if (!hasText && !hasFiles) return
|
|
982
|
-
|
|
1089
|
+
if (!hasText && !hasFiles) return false;
|
|
1090
|
+
lastUpdateErrorRef.current = null;
|
|
1091
|
+
const ok = await updateTicket(
|
|
983
1092
|
ticket,
|
|
984
1093
|
{
|
|
985
1094
|
...hasText ? { content_addendum: trimmed } : {},
|
|
@@ -988,15 +1097,25 @@ function useTicketActions(options) {
|
|
|
988
1097
|
TOAST_COPY.comment_success,
|
|
989
1098
|
"send message"
|
|
990
1099
|
);
|
|
1100
|
+
if (ok) {
|
|
1101
|
+
clearReplyError(ticket.external_id);
|
|
1102
|
+
} else {
|
|
1103
|
+
const mapped = lastUpdateErrorRef.current;
|
|
1104
|
+
if (mapped && REPLY_BANNER_CODES.has(mapped.code)) {
|
|
1105
|
+
setReplyError(ticket.external_id, mapped);
|
|
1106
|
+
}
|
|
1107
|
+
lastUpdateErrorRef.current = null;
|
|
1108
|
+
}
|
|
1109
|
+
return ok;
|
|
991
1110
|
},
|
|
992
|
-
[updateTicket]
|
|
1111
|
+
[updateTicket, clearReplyError, setReplyError]
|
|
993
1112
|
);
|
|
994
1113
|
const closeTicket = _react.useCallback.call(void 0,
|
|
995
1114
|
(ticket, resolution) => updateTicket(
|
|
996
1115
|
ticket,
|
|
997
1116
|
{
|
|
998
1117
|
status: "CLOSED",
|
|
999
|
-
..._optionalChain([resolution, 'optionalAccess',
|
|
1118
|
+
..._optionalChain([resolution, 'optionalAccess', _48 => _48.trim, 'call', _49 => _49()]) ? { resolution: resolution.trim() } : {}
|
|
1000
1119
|
},
|
|
1001
1120
|
TOAST_COPY.close_success,
|
|
1002
1121
|
"close ticket"
|
|
@@ -1014,9 +1133,20 @@ function useTicketActions(options) {
|
|
|
1014
1133
|
closeTicket,
|
|
1015
1134
|
reopenTicket,
|
|
1016
1135
|
isSubmittingForm,
|
|
1017
|
-
isRowBusy
|
|
1136
|
+
isRowBusy,
|
|
1137
|
+
replyErrorFor,
|
|
1138
|
+
clearReplyError
|
|
1018
1139
|
}),
|
|
1019
|
-
[
|
|
1140
|
+
[
|
|
1141
|
+
submitTicket,
|
|
1142
|
+
sendMessage,
|
|
1143
|
+
closeTicket,
|
|
1144
|
+
reopenTicket,
|
|
1145
|
+
isSubmittingForm,
|
|
1146
|
+
isRowBusy,
|
|
1147
|
+
replyErrorFor,
|
|
1148
|
+
clearReplyError
|
|
1149
|
+
]
|
|
1020
1150
|
);
|
|
1021
1151
|
}
|
|
1022
1152
|
var TicketActionFailure = class extends Error {
|
|
@@ -1058,7 +1188,7 @@ function mapTicketActionError(err) {
|
|
|
1058
1188
|
removeRowFromCache: false
|
|
1059
1189
|
};
|
|
1060
1190
|
case "RATE_LIMITED": {
|
|
1061
|
-
const retryAfterRaw = _optionalChain([err, 'access',
|
|
1191
|
+
const retryAfterRaw = _optionalChain([err, 'access', _50 => _50.response, 'optionalAccess', _51 => _51.headers, 'access', _52 => _52.get, 'call', _53 => _53("Retry-After")]);
|
|
1062
1192
|
const retryAfterSeconds = retryAfterRaw ? parseInt(retryAfterRaw, 10) : void 0;
|
|
1063
1193
|
return {
|
|
1064
1194
|
code: err.code,
|
|
@@ -1075,6 +1205,34 @@ function mapTicketActionError(err) {
|
|
|
1075
1205
|
supportSystemDown: false,
|
|
1076
1206
|
removeRowFromCache: false
|
|
1077
1207
|
};
|
|
1208
|
+
case "HUBSPOT_5XX":
|
|
1209
|
+
return {
|
|
1210
|
+
code: err.code,
|
|
1211
|
+
message: "We couldn't reach the support system. Your reply wasn't sent \u2014 please retry in a moment.",
|
|
1212
|
+
supportSystemDown: false,
|
|
1213
|
+
removeRowFromCache: false
|
|
1214
|
+
};
|
|
1215
|
+
case "HUBSPOT_400_VALIDATION":
|
|
1216
|
+
return {
|
|
1217
|
+
code: err.code,
|
|
1218
|
+
message: "Your reply was rejected. Please rephrase or remove unsupported content and try again.",
|
|
1219
|
+
supportSystemDown: false,
|
|
1220
|
+
removeRowFromCache: false
|
|
1221
|
+
};
|
|
1222
|
+
case "HUBSPOT_404_THREAD":
|
|
1223
|
+
return {
|
|
1224
|
+
code: err.code,
|
|
1225
|
+
message: "This conversation is no longer accepting replies. Open a new ticket to continue.",
|
|
1226
|
+
supportSystemDown: false,
|
|
1227
|
+
removeRowFromCache: false
|
|
1228
|
+
};
|
|
1229
|
+
case "HUBSPOT_REPLY_UNKNOWN":
|
|
1230
|
+
return {
|
|
1231
|
+
code: err.code,
|
|
1232
|
+
message: "Your reply didn't go through. Please retry.",
|
|
1233
|
+
supportSystemDown: false,
|
|
1234
|
+
removeRowFromCache: false
|
|
1235
|
+
};
|
|
1078
1236
|
default:
|
|
1079
1237
|
return {
|
|
1080
1238
|
code: "UNKNOWN",
|
|
@@ -1098,9 +1256,11 @@ function cryptoRandomId() {
|
|
|
1098
1256
|
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
1099
1257
|
}
|
|
1100
1258
|
function cacheContainsTicket(queryClient, expectedTicketId) {
|
|
1101
|
-
const entries = queryClient.getQueriesData({
|
|
1259
|
+
const entries = queryClient.getQueriesData({
|
|
1260
|
+
queryKey: ["tickets"]
|
|
1261
|
+
});
|
|
1102
1262
|
for (const [, data] of entries) {
|
|
1103
|
-
if (Array.isArray(data) && data.some((t) => t.external_id === expectedTicketId)) {
|
|
1263
|
+
if (data && Array.isArray(data.tickets) && data.tickets.some((t) => t.external_id === expectedTicketId)) {
|
|
1104
1264
|
return true;
|
|
1105
1265
|
}
|
|
1106
1266
|
}
|
|
@@ -1115,14 +1275,14 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1115
1275
|
|
|
1116
1276
|
// src/components/tickets/ticket-center.tsx
|
|
1117
1277
|
|
|
1118
|
-
function TicketCenter({ toast: toast2 =
|
|
1119
|
-
const identity =
|
|
1278
|
+
function TicketCenter({ toast: toast2 = _chunk5V6MSE3Bcjs.toast } = {}) {
|
|
1279
|
+
const identity = _chunkZGTDUPTWcjs.useChatIdentity.call(void 0, );
|
|
1120
1280
|
if (identity.isLoading) {
|
|
1121
1281
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1122
1282
|
}
|
|
1123
|
-
if (identity.authTier === "anon" || !_optionalChain([identity, 'access',
|
|
1283
|
+
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _54 => _54.user, 'optionalAccess', _55 => _55.email])) {
|
|
1124
1284
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1125
|
-
|
|
1285
|
+
_chunkK4DFAVSOcjs.EmptyState,
|
|
1126
1286
|
{
|
|
1127
1287
|
type: "generic",
|
|
1128
1288
|
title: "Sign in to manage tickets",
|
|
@@ -1193,10 +1353,10 @@ function TicketCenterAuthed({
|
|
|
1193
1353
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1194
1354
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1195
1355
|
"Updated ",
|
|
1196
|
-
|
|
1356
|
+
_chunkZGTDUPTWcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1197
1357
|
] }),
|
|
1198
1358
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1199
|
-
|
|
1359
|
+
_chunkXDPSSE4Ocjs.Button,
|
|
1200
1360
|
{
|
|
1201
1361
|
type: "button",
|
|
1202
1362
|
variant: "transparent",
|
|
@@ -1209,15 +1369,15 @@ function TicketCenterAuthed({
|
|
|
1209
1369
|
)
|
|
1210
1370
|
] })
|
|
1211
1371
|
] }),
|
|
1212
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1213
|
-
|
|
1372
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZGTDUPTWcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1373
|
+
_chunkK4DFAVSOcjs.EmptyState,
|
|
1214
1374
|
{
|
|
1215
1375
|
type: "generic",
|
|
1216
1376
|
title: "No tickets yet",
|
|
1217
1377
|
description: "Open one above to start the conversation.",
|
|
1218
1378
|
showCTA: false
|
|
1219
1379
|
}
|
|
1220
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1380
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZGTDUPTWcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1221
1381
|
TicketRow,
|
|
1222
1382
|
{
|
|
1223
1383
|
ticket,
|
|
@@ -1237,29 +1397,29 @@ function TicketCenterAuthed({
|
|
|
1237
1397
|
}
|
|
1238
1398
|
function TicketCenterSkeleton() {
|
|
1239
1399
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1240
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1241
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1242
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1243
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1400
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZGTDUPTWcjs.Card, { className: "p-6", children: [
|
|
1401
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXDPSSE4Ocjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1402
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXDPSSE4Ocjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1403
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXDPSSE4Ocjs.Skeleton, { className: "h-24 w-full" })
|
|
1244
1404
|
] }),
|
|
1245
1405
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {})
|
|
1246
1406
|
] });
|
|
1247
1407
|
}
|
|
1248
1408
|
function TicketListSkeleton() {
|
|
1249
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1409
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZGTDUPTWcjs.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: [
|
|
1250
1410
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1251
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1252
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1411
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXDPSSE4Ocjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1412
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXDPSSE4Ocjs.Skeleton, { className: "h-3 w-full" })
|
|
1253
1413
|
] }),
|
|
1254
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1255
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1414
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXDPSSE4Ocjs.Skeleton, { className: "h-8 w-20" }),
|
|
1415
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXDPSSE4Ocjs.Skeleton, { className: "h-8 w-16" })
|
|
1256
1416
|
] }, i)) });
|
|
1257
1417
|
}
|
|
1258
1418
|
|
|
1259
1419
|
// src/components/tickets/help-center-list.tsx
|
|
1260
1420
|
|
|
1261
1421
|
|
|
1262
|
-
|
|
1422
|
+
_chunkK4DFAVSOcjs.init_unified_pagination.call(void 0, );
|
|
1263
1423
|
|
|
1264
1424
|
// src/components/tickets/help-center-card.tsx
|
|
1265
1425
|
|
|
@@ -1274,12 +1434,14 @@ function HelpCenterCard({
|
|
|
1274
1434
|
onSendMessage,
|
|
1275
1435
|
onClose,
|
|
1276
1436
|
onReopen,
|
|
1277
|
-
onActionCollapsed
|
|
1437
|
+
onActionCollapsed,
|
|
1438
|
+
replyError,
|
|
1439
|
+
onClearReplyError
|
|
1278
1440
|
}) {
|
|
1279
1441
|
const optimistic = isOptimistic(ticket);
|
|
1280
1442
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1281
1443
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1282
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1444
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkZGTDUPTWcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1283
1445
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1284
1446
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1285
1447
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1288,7 +1450,7 @@ function HelpCenterCard({
|
|
|
1288
1450
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1289
1451
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1290
1452
|
onToggle(ticket.id);
|
|
1291
|
-
|
|
1453
|
+
_chunkZGTDUPTWcjs.scrollElementIntoView.call(void 0, rowRef.current, {
|
|
1292
1454
|
headerOffset: STICKY_HEADER_OFFSET_PX,
|
|
1293
1455
|
adjustTargetY: (raw) => {
|
|
1294
1456
|
if (!rowRef.current) return raw;
|
|
@@ -1305,16 +1467,16 @@ function HelpCenterCard({
|
|
|
1305
1467
|
}, [onToggle, ticket.id]);
|
|
1306
1468
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1307
1469
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1308
|
-
|
|
1470
|
+
_chunkZGTDUPTWcjs.StatusBadge,
|
|
1309
1471
|
{
|
|
1310
1472
|
text: rawStatus,
|
|
1311
|
-
colorScheme:
|
|
1473
|
+
colorScheme: _chunkZGTDUPTWcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1312
1474
|
variant: "card",
|
|
1313
1475
|
className: "border border-ods-border"
|
|
1314
1476
|
}
|
|
1315
1477
|
),
|
|
1316
1478
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1317
|
-
|
|
1479
|
+
_chunkZGTDUPTWcjs.StatusBadge,
|
|
1318
1480
|
{
|
|
1319
1481
|
text: priority,
|
|
1320
1482
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1341,7 +1503,7 @@ function HelpCenterCard({
|
|
|
1341
1503
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1342
1504
|
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",
|
|
1343
1505
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1344
|
-
|
|
1506
|
+
_chunkIH76P5R6cjs.DevCardRowContent,
|
|
1345
1507
|
{
|
|
1346
1508
|
title,
|
|
1347
1509
|
subtitle,
|
|
@@ -1361,7 +1523,9 @@ function HelpCenterCard({
|
|
|
1361
1523
|
onSendMessage,
|
|
1362
1524
|
onClose,
|
|
1363
1525
|
onReopen,
|
|
1364
|
-
onActionCollapsed
|
|
1526
|
+
onActionCollapsed,
|
|
1527
|
+
replyError,
|
|
1528
|
+
onClearReplyError
|
|
1365
1529
|
}
|
|
1366
1530
|
) })
|
|
1367
1531
|
]
|
|
@@ -1414,12 +1578,12 @@ function HelpCenterCreateForm({
|
|
|
1414
1578
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1415
1579
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1416
1580
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1417
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1581
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZGTDUPTWcjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1418
1582
|
"Subject",
|
|
1419
1583
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1420
1584
|
] }),
|
|
1421
1585
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1422
|
-
|
|
1586
|
+
_chunkXDPSSE4Ocjs.Input,
|
|
1423
1587
|
{
|
|
1424
1588
|
id: "help-center-subject",
|
|
1425
1589
|
type: "text",
|
|
@@ -1446,7 +1610,7 @@ function HelpCenterCreateForm({
|
|
|
1446
1610
|
)
|
|
1447
1611
|
] });
|
|
1448
1612
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1449
|
-
|
|
1613
|
+
_chunkSMCG2CCCcjs.ContactForm,
|
|
1450
1614
|
{
|
|
1451
1615
|
title: "Open a new ticket",
|
|
1452
1616
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1483,8 +1647,8 @@ function HelpCenterCreateForm({
|
|
|
1483
1647
|
|
|
1484
1648
|
// src/components/tickets/help-center-list.tsx
|
|
1485
1649
|
|
|
1486
|
-
function HelpCenterList({ toast: toast2 =
|
|
1487
|
-
const identity =
|
|
1650
|
+
function HelpCenterList({ toast: toast2 = _chunk5V6MSE3Bcjs.toast } = {}) {
|
|
1651
|
+
const identity = _chunkZGTDUPTWcjs.useChatIdentity.call(void 0, );
|
|
1488
1652
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1489
1653
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1490
1654
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1493,11 +1657,11 @@ function HelpCenterList({ toast: toast2 = _chunkWT5JV2GScjs.toast } = {}) {
|
|
|
1493
1657
|
const rawPage = Number(searchParams.get("page"));
|
|
1494
1658
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1495
1659
|
if (identity.isLoading) {
|
|
1496
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1660
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIH76P5R6cjs.DevSectionPage, { sectionKey: "tickets", preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIH76P5R6cjs.DevCardRowSkeletonList, {}) });
|
|
1497
1661
|
}
|
|
1498
|
-
if (identity.authTier === "anon" || !_optionalChain([identity, 'access',
|
|
1499
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1500
|
-
|
|
1662
|
+
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _56 => _56.user, 'optionalAccess', _57 => _57.email])) {
|
|
1663
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIH76P5R6cjs.DevSectionPage, { sectionKey: "tickets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1664
|
+
_chunkK4DFAVSOcjs.EmptyState,
|
|
1501
1665
|
{
|
|
1502
1666
|
type: "generic",
|
|
1503
1667
|
title: "Sign in to manage tickets",
|
|
@@ -1506,7 +1670,7 @@ function HelpCenterList({ toast: toast2 = _chunkWT5JV2GScjs.toast } = {}) {
|
|
|
1506
1670
|
}
|
|
1507
1671
|
) });
|
|
1508
1672
|
}
|
|
1509
|
-
const sessionName = [_optionalChain([identity, 'access',
|
|
1673
|
+
const sessionName = [_optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.firstName]), _optionalChain([identity, 'access', _60 => _60.user, 'optionalAccess', _61 => _61.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identity, 'access', _62 => _62.user, 'optionalAccess', _63 => _63.email, 'optionalAccess', _64 => _64.split, 'call', _65 => _65("@"), 'access', _66 => _66[0]]) || "Customer";
|
|
1510
1674
|
const sessionEmail = identity.user.email;
|
|
1511
1675
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1512
1676
|
HelpCenterListAuthed,
|
|
@@ -1561,7 +1725,12 @@ function HelpCenterListAuthed({
|
|
|
1561
1725
|
(ticketId) => {
|
|
1562
1726
|
queryClient.setQueriesData(
|
|
1563
1727
|
{ queryKey: ["tickets"] },
|
|
1564
|
-
(prev) =>
|
|
1728
|
+
(prev) => {
|
|
1729
|
+
if (!prev || !Array.isArray(prev.tickets)) return prev;
|
|
1730
|
+
const nextTickets = prev.tickets.filter((t) => t.id !== ticketId);
|
|
1731
|
+
if (nextTickets.length === prev.tickets.length) return prev;
|
|
1732
|
+
return { ...prev, tickets: nextTickets };
|
|
1733
|
+
}
|
|
1565
1734
|
);
|
|
1566
1735
|
setExpandedTicketId((prev) => prev === ticketId ? null : prev);
|
|
1567
1736
|
},
|
|
@@ -1595,17 +1764,17 @@ function HelpCenterListAuthed({
|
|
|
1595
1764
|
"Couldn\u2019t load your tickets. ",
|
|
1596
1765
|
error.message
|
|
1597
1766
|
] }),
|
|
1598
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXDPSSE4Ocjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1599
1768
|
] }),
|
|
1600
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1769
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIH76P5R6cjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1601
1770
|
// Bridge state — background refetch in flight and the
|
|
1602
1771
|
// optimistic placeholder was just removed by the mutation
|
|
1603
1772
|
// callback. Without this branch "No tickets yet" would flash
|
|
1604
1773
|
// for ~50ms between `removeOptimistic` and the server
|
|
1605
1774
|
// response landing.
|
|
1606
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1775
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIH76P5R6cjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1607
1776
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1608
|
-
|
|
1777
|
+
_chunkK4DFAVSOcjs.EmptyState,
|
|
1609
1778
|
{
|
|
1610
1779
|
type: "search",
|
|
1611
1780
|
title: "No tickets found",
|
|
@@ -1620,7 +1789,7 @@ function HelpCenterListAuthed({
|
|
|
1620
1789
|
}
|
|
1621
1790
|
}
|
|
1622
1791
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1623
|
-
|
|
1792
|
+
_chunkK4DFAVSOcjs.EmptyState,
|
|
1624
1793
|
{
|
|
1625
1794
|
type: "generic",
|
|
1626
1795
|
title: "No tickets yet",
|
|
@@ -1647,14 +1816,16 @@ function HelpCenterListAuthed({
|
|
|
1647
1816
|
onSendMessage: actions.sendMessage,
|
|
1648
1817
|
onClose: actions.closeTicket,
|
|
1649
1818
|
onReopen: actions.reopenTicket,
|
|
1650
|
-
onActionCollapsed: () => setExpandedTicketId(null)
|
|
1819
|
+
onActionCollapsed: () => setExpandedTicketId(null),
|
|
1820
|
+
replyError: actions.replyErrorFor(ticket.external_id),
|
|
1821
|
+
onClearReplyError: () => actions.clearReplyError(ticket.external_id)
|
|
1651
1822
|
},
|
|
1652
1823
|
ticket.id
|
|
1653
1824
|
)) })
|
|
1654
1825
|
) }),
|
|
1655
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1826
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK4DFAVSOcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1656
1827
|
] });
|
|
1657
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1828
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIH76P5R6cjs.DevSectionPage, { sectionKey: "tickets", preControls: form, children: body });
|
|
1658
1829
|
}
|
|
1659
1830
|
|
|
1660
1831
|
|