@flamingo-stack/openframe-frontend-core 0.0.644 → 0.0.645-2219.6362.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{chunk-IXD6SHQ6.js → chunk-2SNL36JV.js} +6 -6
- package/dist/{chunk-FOSIR4QF.js → chunk-3DWDJ54N.js} +5 -5
- package/dist/{chunk-YB6FI2G3.js → chunk-3SMLYVM2.js} +1 -1
- package/dist/{chunk-YB6FI2G3.js.map → chunk-3SMLYVM2.js.map} +1 -1
- package/dist/{chunk-UKV52KAP.cjs → chunk-3WLHNR2G.cjs} +44 -44
- package/dist/{chunk-UKV52KAP.cjs.map → chunk-3WLHNR2G.cjs.map} +1 -1
- package/dist/{chunk-FAD5WURS.cjs → chunk-4GZZYHG5.cjs} +124 -124
- package/dist/{chunk-FAD5WURS.cjs.map → chunk-4GZZYHG5.cjs.map} +1 -1
- package/dist/{chunk-4EEUB62O.js → chunk-4HVWGYHI.js} +2 -2
- package/dist/{chunk-RFFF2EYD.cjs → chunk-5F5WKIDW.cjs} +15 -15
- package/dist/{chunk-RFFF2EYD.cjs.map → chunk-5F5WKIDW.cjs.map} +1 -1
- package/dist/{chunk-G5U4JP45.js → chunk-5ONM3FHQ.js} +4 -4
- package/dist/{chunk-GELNUDBT.cjs → chunk-77BLJHKI.cjs} +10 -10
- package/dist/{chunk-GELNUDBT.cjs.map → chunk-77BLJHKI.cjs.map} +1 -1
- package/dist/{chunk-KJWPAJRT.js → chunk-7EI3NES7.js} +3 -3
- package/dist/{chunk-C5Y5T6GC.cjs → chunk-AHC2CQDD.cjs} +20 -20
- package/dist/{chunk-C5Y5T6GC.cjs.map → chunk-AHC2CQDD.cjs.map} +1 -1
- package/dist/{chunk-MCQAOIUK.cjs → chunk-BH34E2RJ.cjs} +37 -37
- package/dist/{chunk-MCQAOIUK.cjs.map → chunk-BH34E2RJ.cjs.map} +1 -1
- package/dist/{chunk-TGUA3C4U.cjs → chunk-BWGV4TI5.cjs} +9 -9
- package/dist/{chunk-TGUA3C4U.cjs.map → chunk-BWGV4TI5.cjs.map} +1 -1
- package/dist/{chunk-I57XLISO.js → chunk-CLVJC6SI.js} +195 -15
- package/dist/chunk-CLVJC6SI.js.map +1 -0
- package/dist/{chunk-27RD5XTP.js → chunk-CYXV5HPV.js} +5 -5
- package/dist/{chunk-4WVWRFGP.js → chunk-DEIYPXGD.js} +9 -9
- package/dist/{chunk-3IXDZI3R.cjs → chunk-DOVVKQMZ.cjs} +3 -3
- package/dist/{chunk-3IXDZI3R.cjs.map → chunk-DOVVKQMZ.cjs.map} +1 -1
- package/dist/{chunk-KOQCA5X5.cjs → chunk-DWJREJRA.cjs} +5 -5
- package/dist/{chunk-KOQCA5X5.cjs.map → chunk-DWJREJRA.cjs.map} +1 -1
- package/dist/{chunk-TTVOBWAH.js → chunk-EADBLRNF.js} +5 -5
- package/dist/{chunk-MRIOYSXH.js → chunk-EBDCDHOT.js} +5 -5
- package/dist/{chunk-RNMGKAS6.js → chunk-EDNZ2HN3.js} +15 -15
- package/dist/{chunk-7R2DIGG4.cjs → chunk-EX5PJGVA.cjs} +76 -76
- package/dist/{chunk-7R2DIGG4.cjs.map → chunk-EX5PJGVA.cjs.map} +1 -1
- package/dist/{chunk-GBEUGDZG.cjs → chunk-F6U2H42L.cjs} +23 -23
- package/dist/{chunk-GBEUGDZG.cjs.map → chunk-F6U2H42L.cjs.map} +1 -1
- package/dist/{chunk-KEKN76JR.js → chunk-FRQ2DE5Z.js} +5 -5
- package/dist/{chunk-JOV64HW5.js → chunk-GRBZC5N3.js} +3 -3
- package/dist/{chunk-CHIHYC7Q.cjs → chunk-GSD62VAY.cjs} +21 -21
- package/dist/{chunk-CHIHYC7Q.cjs.map → chunk-GSD62VAY.cjs.map} +1 -1
- package/dist/{chunk-LPMDCQLL.js → chunk-H3EJDISW.js} +2 -2
- package/dist/{chunk-3DGRXC74.js → chunk-HQBC7YRF.js} +5 -5
- package/dist/{chunk-VE52MSYC.js → chunk-IERXOVIS.js} +8 -8
- package/dist/{chunk-KOLVBEW5.js → chunk-IWISVG4P.js} +3 -3
- package/dist/{chunk-GNKM6R55.cjs → chunk-JH5P72AF.cjs} +25 -25
- package/dist/{chunk-GNKM6R55.cjs.map → chunk-JH5P72AF.cjs.map} +1 -1
- package/dist/{chunk-LCK7T2RM.cjs → chunk-JU6SBF3C.cjs} +13 -13
- package/dist/{chunk-LCK7T2RM.cjs.map → chunk-JU6SBF3C.cjs.map} +1 -1
- package/dist/{chunk-OMSUWB6A.cjs → chunk-K72YMLCU.cjs} +118 -118
- package/dist/{chunk-OMSUWB6A.cjs.map → chunk-K72YMLCU.cjs.map} +1 -1
- package/dist/{chunk-CBXZSTAG.cjs → chunk-KHHFMHYE.cjs} +973 -793
- package/dist/chunk-KHHFMHYE.cjs.map +1 -0
- package/dist/{chunk-F2KBCLUG.js → chunk-KKSSA4CS.js} +2 -2
- package/dist/{chunk-IIXB5REN.cjs → chunk-KL3Z26IS.cjs} +16 -16
- package/dist/{chunk-IIXB5REN.cjs.map → chunk-KL3Z26IS.cjs.map} +1 -1
- package/dist/{chunk-FKBM6U43.js → chunk-LZLT67PE.js} +2 -2
- package/dist/{chunk-B3Z3RJRW.js → chunk-M4AD2PHE.js} +5 -5
- package/dist/{chunk-BVQEU5JB.js → chunk-MT5A25AX.js} +2 -2
- package/dist/{chunk-UEXIMEVU.js → chunk-N7IAE3DN.js} +10 -10
- package/dist/{chunk-DCCY54LU.cjs → chunk-O2SLSYJC.cjs} +14 -14
- package/dist/{chunk-DCCY54LU.cjs.map → chunk-O2SLSYJC.cjs.map} +1 -1
- package/dist/{chunk-3UBT2OIX.cjs → chunk-O3YNMOIS.cjs} +74 -74
- package/dist/{chunk-3UBT2OIX.cjs.map → chunk-O3YNMOIS.cjs.map} +1 -1
- package/dist/{chunk-HOGOQA2X.js → chunk-O7LA444D.js} +3 -3
- package/dist/{chunk-PFV4DAX5.js → chunk-OBBAT4AU.js} +10 -10
- package/dist/{chunk-B5IFXCRF.cjs → chunk-OPNEE5XD.cjs} +41 -41
- package/dist/{chunk-B5IFXCRF.cjs.map → chunk-OPNEE5XD.cjs.map} +1 -1
- package/dist/chunk-OXB6LRBK.js +20 -0
- package/dist/chunk-OXB6LRBK.js.map +1 -0
- package/dist/{chunk-SKABQX44.js → chunk-QP7Z4EN7.js} +7 -7
- package/dist/{chunk-HPWLIYRL.js → chunk-REDPQ7F6.js} +14 -14
- package/dist/{chunk-OVXYX47B.cjs → chunk-TIYVK2BE.cjs} +19 -19
- package/dist/{chunk-OVXYX47B.cjs.map → chunk-TIYVK2BE.cjs.map} +1 -1
- package/dist/{chunk-UPKZU6QU.cjs → chunk-U2YLMFJK.cjs} +1 -1
- package/dist/{chunk-UPKZU6QU.cjs.map → chunk-U2YLMFJK.cjs.map} +1 -1
- package/dist/{chunk-7Q5XXPCB.js → chunk-UF5VXOVZ.js} +14 -14
- package/dist/{chunk-65EVGKFV.cjs → chunk-UOOA73XL.cjs} +14 -14
- package/dist/{chunk-65EVGKFV.cjs.map → chunk-UOOA73XL.cjs.map} +1 -1
- package/dist/{chunk-CCWI3622.cjs → chunk-VTYP25OW.cjs} +4 -4
- package/dist/{chunk-CCWI3622.cjs.map → chunk-VTYP25OW.cjs.map} +1 -1
- package/dist/{chunk-RB6L5EGM.cjs → chunk-WDFDZSAK.cjs} +1131 -1131
- package/dist/{chunk-RB6L5EGM.cjs.map → chunk-WDFDZSAK.cjs.map} +1 -1
- package/dist/{chunk-T3C3JLGV.cjs → chunk-WKX7DYFM.cjs} +8 -8
- package/dist/{chunk-T3C3JLGV.cjs.map → chunk-WKX7DYFM.cjs.map} +1 -1
- package/dist/{chunk-S2KMNFFN.js → chunk-WWPANZTL.js} +7 -7
- package/dist/chunk-X7CEWD6V.cjs +20 -0
- package/dist/chunk-X7CEWD6V.cjs.map +1 -0
- package/dist/{chunk-5JUTGEZE.js → chunk-XBTZOO74.js} +2 -2
- package/dist/{chunk-RWURXICE.cjs → chunk-XGD6SCHN.cjs} +44 -44
- package/dist/{chunk-RWURXICE.cjs.map → chunk-XGD6SCHN.cjs.map} +1 -1
- package/dist/{chunk-EHAYNUOL.cjs → chunk-XOGD2AME.cjs} +3 -3
- package/dist/{chunk-EHAYNUOL.cjs.map → chunk-XOGD2AME.cjs.map} +1 -1
- package/dist/{chunk-N6HNK25A.cjs → chunk-YWUZL3RT.cjs} +11 -11
- package/dist/{chunk-N6HNK25A.cjs.map → chunk-YWUZL3RT.cjs.map} +1 -1
- package/dist/{chunk-LZYPSDFE.cjs → chunk-ZC7BVCDJ.cjs} +90 -90
- package/dist/{chunk-LZYPSDFE.cjs.map → chunk-ZC7BVCDJ.cjs.map} +1 -1
- package/dist/components/calendar.cjs +10 -10
- package/dist/components/calendar.js +2 -2
- package/dist/components/case-studies/index.cjs +30 -30
- package/dist/components/case-studies/index.js +14 -14
- package/dist/components/chat/embeddable-chat.d.ts +1 -1
- package/dist/components/chat/index.cjs +9 -9
- package/dist/components/chat/index.js +8 -8
- package/dist/components/chat/utils/source-row-cta.d.ts +1 -1
- package/dist/components/command.d.ts +7 -7
- package/dist/components/contact/index.cjs +15 -15
- package/dist/components/contact/index.js +14 -14
- package/dist/components/docs/index.cjs +18 -18
- package/dist/components/docs/index.js +17 -17
- package/dist/components/embeds/index.cjs +15 -15
- package/dist/components/embeds/index.js +14 -14
- package/dist/components/faq/index.cjs +16 -16
- package/dist/components/faq/index.js +15 -15
- package/dist/components/features/index.cjs +14 -14
- package/dist/components/features/index.js +13 -13
- package/dist/components/help-center-pages/index.cjs +37 -37
- package/dist/components/help-center-pages/index.js +28 -28
- package/dist/components/icons/index.cjs +3 -3
- package/dist/components/icons/index.js +2 -2
- package/dist/components/index.cjs +115 -115
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +31 -31
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +119 -119
- package/dist/components/meeting-scheduler/index.js +15 -15
- package/dist/components/navigation/index.cjs +17 -17
- package/dist/components/navigation/index.js +16 -16
- package/dist/components/onboarding-guides/index.cjs +18 -18
- package/dist/components/onboarding-guides/index.js +17 -17
- package/dist/components/related-content/index.cjs +10 -10
- package/dist/components/related-content/index.js +9 -9
- package/dist/components/resizable.d.ts +1 -1
- package/dist/components/tickets/index.cjs +19 -19
- package/dist/components/tickets/index.js +18 -18
- package/dist/components/ui/file-manager/index.cjs +57 -57
- package/dist/components/ui/file-manager/index.js +4 -4
- package/dist/components/ui/index.cjs +14 -14
- package/dist/components/ui/index.js +13 -13
- package/dist/contexts/chat-runtime-context.d.ts +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +7 -7
- package/dist/hooks/index.js +6 -6
- package/dist/index.cjs +36 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -22
- package/dist/index.js.map +1 -1
- package/dist/platform-domains.cjs +43 -0
- package/dist/platform-domains.cjs.map +1 -1
- package/dist/platform-domains.d.ts +59 -4
- package/dist/platform-domains.d.ts.map +1 -1
- package/dist/platform-domains.js +39 -1
- package/dist/platform-domains.js.map +1 -1
- package/dist/types/index.cjs +0 -104
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js +0 -104
- package/dist/types/index.js.map +1 -1
- package/dist/utils/cn.d.ts +0 -21
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/index.cjs +53 -25
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +49 -25
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/platform-domains.test.ts +116 -0
- package/src/components/chat/embeddable-chat.tsx +2 -2
- package/src/components/chat/utils/__tests__/source-row-cta.test.ts +2 -2
- package/src/components/chat/utils/source-row-cta.ts +4 -4
- package/src/components/made-with-love.tsx +2 -2
- package/src/contexts/chat-runtime-context.tsx +1 -1
- package/src/platform-domains.ts +96 -4
- package/src/utils/.cn.md +3 -23
- package/src/utils/cn.ts +0 -47
- package/src/utils/index.ts +9 -2
- package/dist/chunk-23V5BSHD.cjs +0 -169
- package/dist/chunk-23V5BSHD.cjs.map +0 -1
- package/dist/chunk-CBXZSTAG.cjs.map +0 -1
- package/dist/chunk-I57XLISO.js.map +0 -1
- package/dist/chunk-O4MCCKKN.js +0 -169
- package/dist/chunk-O4MCCKKN.js.map +0 -1
- /package/dist/{chunk-IXD6SHQ6.js.map → chunk-2SNL36JV.js.map} +0 -0
- /package/dist/{chunk-FOSIR4QF.js.map → chunk-3DWDJ54N.js.map} +0 -0
- /package/dist/{chunk-4EEUB62O.js.map → chunk-4HVWGYHI.js.map} +0 -0
- /package/dist/{chunk-G5U4JP45.js.map → chunk-5ONM3FHQ.js.map} +0 -0
- /package/dist/{chunk-KJWPAJRT.js.map → chunk-7EI3NES7.js.map} +0 -0
- /package/dist/{chunk-27RD5XTP.js.map → chunk-CYXV5HPV.js.map} +0 -0
- /package/dist/{chunk-4WVWRFGP.js.map → chunk-DEIYPXGD.js.map} +0 -0
- /package/dist/{chunk-TTVOBWAH.js.map → chunk-EADBLRNF.js.map} +0 -0
- /package/dist/{chunk-MRIOYSXH.js.map → chunk-EBDCDHOT.js.map} +0 -0
- /package/dist/{chunk-RNMGKAS6.js.map → chunk-EDNZ2HN3.js.map} +0 -0
- /package/dist/{chunk-KEKN76JR.js.map → chunk-FRQ2DE5Z.js.map} +0 -0
- /package/dist/{chunk-JOV64HW5.js.map → chunk-GRBZC5N3.js.map} +0 -0
- /package/dist/{chunk-LPMDCQLL.js.map → chunk-H3EJDISW.js.map} +0 -0
- /package/dist/{chunk-3DGRXC74.js.map → chunk-HQBC7YRF.js.map} +0 -0
- /package/dist/{chunk-VE52MSYC.js.map → chunk-IERXOVIS.js.map} +0 -0
- /package/dist/{chunk-KOLVBEW5.js.map → chunk-IWISVG4P.js.map} +0 -0
- /package/dist/{chunk-F2KBCLUG.js.map → chunk-KKSSA4CS.js.map} +0 -0
- /package/dist/{chunk-FKBM6U43.js.map → chunk-LZLT67PE.js.map} +0 -0
- /package/dist/{chunk-B3Z3RJRW.js.map → chunk-M4AD2PHE.js.map} +0 -0
- /package/dist/{chunk-BVQEU5JB.js.map → chunk-MT5A25AX.js.map} +0 -0
- /package/dist/{chunk-UEXIMEVU.js.map → chunk-N7IAE3DN.js.map} +0 -0
- /package/dist/{chunk-HOGOQA2X.js.map → chunk-O7LA444D.js.map} +0 -0
- /package/dist/{chunk-PFV4DAX5.js.map → chunk-OBBAT4AU.js.map} +0 -0
- /package/dist/{chunk-SKABQX44.js.map → chunk-QP7Z4EN7.js.map} +0 -0
- /package/dist/{chunk-HPWLIYRL.js.map → chunk-REDPQ7F6.js.map} +0 -0
- /package/dist/{chunk-7Q5XXPCB.js.map → chunk-UF5VXOVZ.js.map} +0 -0
- /package/dist/{chunk-S2KMNFFN.js.map → chunk-WWPANZTL.js.map} +0 -0
- /package/dist/{chunk-5JUTGEZE.js.map → chunk-XBTZOO74.js.map} +0 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkOPNEE5XDcjs = require('./chunk-OPNEE5XD.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkAHC2CQDDcjs = require('./chunk-AHC2CQDD.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunk77BLJHKIcjs = require('./chunk-77BLJHKI.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkBWGV4TI5cjs = require('./chunk-BWGV4TI5.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -35,20 +35,20 @@ var _chunkTGUA3C4Ucjs = require('./chunk-TGUA3C4U.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkWDFDZSAKcjs = require('./chunk-WDFDZSAK.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _chunkJH5P72AFcjs = require('./chunk-JH5P72AF.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkVTYP25OWcjs = require('./chunk-VTYP25OW.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunkYWUZL3RTcjs = require('./chunk-YWUZL3RT.cjs');
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
@@ -59,7 +59,7 @@ var _chunkN6HNK25Acjs = require('./chunk-N6HNK25A.cjs');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkKHHFMHYEcjs = require('./chunk-KHHFMHYE.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
@@ -74,20 +74,20 @@ var _chunkSADRZ4YIcjs = require('./chunk-SADRZ4YI.cjs');
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
var
|
|
77
|
+
var _chunkEX5PJGVAcjs = require('./chunk-EX5PJGVA.cjs');
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
var
|
|
80
|
+
var _chunkXOGD2AMEcjs = require('./chunk-XOGD2AME.cjs');
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunkU2YLMFJKcjs = require('./chunk-U2YLMFJK.cjs');
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
var
|
|
87
|
+
var _chunkGSD62VAYcjs = require('./chunk-GSD62VAY.cjs');
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
var
|
|
90
|
+
var _chunkF6U2H42Lcjs = require('./chunk-F6U2H42L.cjs');
|
|
91
91
|
|
|
92
92
|
// src/components/tickets/ticket-center.tsx
|
|
93
93
|
var _reactquery = require('@tanstack/react-query');
|
|
@@ -114,8 +114,8 @@ var TicketActionFailure = class extends Error {
|
|
|
114
114
|
};
|
|
115
115
|
function useTicketActions(options) {
|
|
116
116
|
const queryClient = _reactquery.useQueryClient.call(void 0, );
|
|
117
|
-
const ticketActionEndpoint = _nullishCoalesce(
|
|
118
|
-
const ticketLive =
|
|
117
|
+
const ticketActionEndpoint = _nullishCoalesce(_chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, ).endpoints.ticketActionUrl, () => ( TICKET_ACTION_ENDPOINT));
|
|
118
|
+
const ticketLive = _chunkBWGV4TI5cjs.useOptionalTicketLive.call(void 0, );
|
|
119
119
|
const notifyTicketCreated = _optionalChain([ticketLive, 'optionalAccess', _2 => _2.notifyTicketCreated]);
|
|
120
120
|
const { prependOptimistic, removeOptimistic, removeTicketFromCache, toast: toast2, onSupportSystemDown } = options;
|
|
121
121
|
const formInFlightRef = _react.useRef.call(void 0, null);
|
|
@@ -160,7 +160,7 @@ function useTicketActions(options) {
|
|
|
160
160
|
}, []);
|
|
161
161
|
const executeTicketAction = _react.useCallback.call(void 0,
|
|
162
162
|
async (toolName, args) => {
|
|
163
|
-
const res = await
|
|
163
|
+
const res = await _chunkXOGD2AMEcjs.embedAuthedFetch.call(void 0, ticketActionEndpoint, {
|
|
164
164
|
method: "POST",
|
|
165
165
|
body: JSON.stringify({ tool_name: toolName, args })
|
|
166
166
|
});
|
|
@@ -276,10 +276,10 @@ function useTicketActions(options) {
|
|
|
276
276
|
..._optionalChain([input, 'access', _3 => _3.attachments, 'optionalAccess', _4 => _4.length]) ? { attachments: input.attachments } : {}
|
|
277
277
|
});
|
|
278
278
|
if (result.mirror_synced === false) {
|
|
279
|
-
toast2(
|
|
279
|
+
toast2(_chunkBWGV4TI5cjs.TOAST_COPY.open_mirror_pending);
|
|
280
280
|
watchMirrorSync(placeholderId, result.ticket_id);
|
|
281
281
|
} else {
|
|
282
|
-
toast2(
|
|
282
|
+
toast2(_chunkBWGV4TI5cjs.TOAST_COPY.open_success);
|
|
283
283
|
await queryClient.invalidateQueries({ queryKey: ["tickets"] });
|
|
284
284
|
removeOptimistic(placeholderId);
|
|
285
285
|
}
|
|
@@ -365,7 +365,7 @@ function useTicketActions(options) {
|
|
|
365
365
|
...hasText ? { content_addendum: trimmed } : {},
|
|
366
366
|
...hasFiles ? { attachments } : {}
|
|
367
367
|
},
|
|
368
|
-
|
|
368
|
+
_chunkBWGV4TI5cjs.TOAST_COPY.comment_success,
|
|
369
369
|
"send message"
|
|
370
370
|
);
|
|
371
371
|
if (ok) {
|
|
@@ -388,13 +388,13 @@ function useTicketActions(options) {
|
|
|
388
388
|
status: "CLOSED",
|
|
389
389
|
..._optionalChain([resolution, 'optionalAccess', _6 => _6.trim, 'call', _7 => _7()]) ? { resolution: resolution.trim() } : {}
|
|
390
390
|
},
|
|
391
|
-
|
|
391
|
+
_chunkBWGV4TI5cjs.TOAST_COPY.close_success,
|
|
392
392
|
"close ticket"
|
|
393
393
|
),
|
|
394
394
|
[updateTicket]
|
|
395
395
|
);
|
|
396
396
|
const reopenTicket = _react.useCallback.call(void 0,
|
|
397
|
-
(ticket) => updateTicket(ticket, { status: "OPEN" },
|
|
397
|
+
(ticket) => updateTicket(ticket, { status: "OPEN" }, _chunkBWGV4TI5cjs.TOAST_COPY.reopen_success, "reopen ticket"),
|
|
398
398
|
[updateTicket]
|
|
399
399
|
);
|
|
400
400
|
return _react.useMemo.call(void 0,
|
|
@@ -533,13 +533,13 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
533
533
|
var FIND_TICKET_ENDPOINT = "/api/chat/agent/find-ticket";
|
|
534
534
|
var DEFAULT_PAGE_SIZE = 20;
|
|
535
535
|
function useTicketsList(filters) {
|
|
536
|
-
const findTicketEndpoint = _nullishCoalesce(
|
|
536
|
+
const findTicketEndpoint = _nullishCoalesce(_chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, ).endpoints.findTicketUrl, () => ( FIND_TICKET_ENDPOINT));
|
|
537
537
|
const customerEmail = filters.customerEmail;
|
|
538
538
|
const search = (_nullishCoalesce(filters.search, () => ( ""))).trim();
|
|
539
539
|
const status = (_nullishCoalesce(filters.status, () => ( ""))).trim().toLowerCase();
|
|
540
540
|
const statusFilter = status && status !== "all" ? status : "";
|
|
541
|
-
const page =
|
|
542
|
-
const pageSize =
|
|
541
|
+
const page = _chunkVTYP25OWcjs.positiveInt.call(void 0, filters.page, 1);
|
|
542
|
+
const pageSize = _chunkVTYP25OWcjs.positiveInt.call(void 0, filters.pageSize, DEFAULT_PAGE_SIZE, { max: _chunkVTYP25OWcjs.PAGE_PARAM_LIMITS.maxPageSize });
|
|
543
543
|
const enabled = !!customerEmail;
|
|
544
544
|
const identityKey = customerEmail || "anon";
|
|
545
545
|
const query = _reactquery.useQuery.call(void 0, {
|
|
@@ -563,7 +563,7 @@ function useTicketsList(filters) {
|
|
|
563
563
|
pageSize
|
|
564
564
|
};
|
|
565
565
|
if (statusFilter) body.status = statusFilter;
|
|
566
|
-
const response = await
|
|
566
|
+
const response = await _chunkXOGD2AMEcjs.embedAuthedFetch.call(void 0, findTicketEndpoint, {
|
|
567
567
|
method: "POST",
|
|
568
568
|
body: JSON.stringify(body)
|
|
569
569
|
});
|
|
@@ -578,7 +578,7 @@ function useTicketsList(filters) {
|
|
|
578
578
|
const totalCount = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _12 => _12.totalCount]), () => ( _optionalChain([data, 'optionalAccess', _13 => _13.count]))), () => ( _optionalChain([data, 'optionalAccess', _14 => _14.tickets, 'optionalAccess', _15 => _15.length]))), () => ( 0));
|
|
579
579
|
const echoedPage = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _16 => _16.page]), () => ( page));
|
|
580
580
|
const echoedPageSize = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _17 => _17.pageSize]), () => ( pageSize));
|
|
581
|
-
const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _18 => _18.totalPages]), () => (
|
|
581
|
+
const totalPages = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _18 => _18.totalPages]), () => ( _chunkVTYP25OWcjs.pageCount.call(void 0, totalCount, echoedPageSize)));
|
|
582
582
|
return {
|
|
583
583
|
tickets: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _19 => _19.tickets]), () => ( [])),
|
|
584
584
|
// Loading-state-truth = `data === undefined`. TanStack v5's
|
|
@@ -609,14 +609,14 @@ function useTicketsList(filters) {
|
|
|
609
609
|
// src/components/tickets/ticket-open-form.tsx
|
|
610
610
|
|
|
611
611
|
var _jsxruntime = require('react/jsx-runtime');
|
|
612
|
-
var COUNTER_VISIBLE_AT = Math.floor(
|
|
612
|
+
var COUNTER_VISIBLE_AT = Math.floor(_chunkBWGV4TI5cjs.TICKET_TEXT_MAX_CHARS * 0.8);
|
|
613
613
|
function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
614
614
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
615
615
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
616
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
616
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkKHHFMHYEcjs.useChatAttachments.call(void 0, );
|
|
617
617
|
const trimmedSubject = subject.trim();
|
|
618
618
|
const trimmedContent = content.trim();
|
|
619
|
-
const overCap = content.length >
|
|
619
|
+
const overCap = content.length > _chunkBWGV4TI5cjs.TICKET_TEXT_MAX_CHARS;
|
|
620
620
|
const showCounter = content.length >= COUNTER_VISIBLE_AT;
|
|
621
621
|
const canSubmit = !isSubmitting && !supportSystemDown && !hasInflightUploads && trimmedSubject.length > 0 && trimmedContent.length > 0 && !overCap;
|
|
622
622
|
const handleSubmit = async (e) => {
|
|
@@ -633,7 +633,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
633
633
|
clear();
|
|
634
634
|
}
|
|
635
635
|
};
|
|
636
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
636
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-6 md:flex-row", ..._chunkWDFDZSAKcjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
637
637
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "min-w-0 flex-1 md:max-w-md", children: [
|
|
638
638
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "mb-2 text-ods-text-primary text-h2", children: "Need Support?" }),
|
|
639
639
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h6", children: "Can't find what you're looking for? Submit a support ticket below \u2014 we'll follow up shortly." }),
|
|
@@ -643,7 +643,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
643
643
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
644
644
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-subject", className: "mb-1 block text-ods-text-primary text-h6", children: "Ticket Subject" }),
|
|
645
645
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
646
|
-
|
|
646
|
+
_chunkYWUZL3RTcjs.Input,
|
|
647
647
|
{
|
|
648
648
|
id: "ticket-subject",
|
|
649
649
|
type: "text",
|
|
@@ -658,7 +658,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
658
658
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
659
659
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "ticket-content", className: "mb-1 block text-ods-text-primary text-h6", children: "Your Message" }),
|
|
660
660
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
661
|
-
|
|
661
|
+
_chunkWDFDZSAKcjs.Textarea,
|
|
662
662
|
{
|
|
663
663
|
id: "ticket-content",
|
|
664
664
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -672,11 +672,11 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
672
672
|
showCounter && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: `mt-1 text-right text-h6 ${overCap ? "text-ods-error" : "text-ods-text-secondary"}`, children: [
|
|
673
673
|
content.length,
|
|
674
674
|
"/",
|
|
675
|
-
|
|
675
|
+
_chunkBWGV4TI5cjs.TICKET_TEXT_MAX_CHARS
|
|
676
676
|
] })
|
|
677
677
|
] }),
|
|
678
678
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
679
|
-
|
|
679
|
+
_chunkKHHFMHYEcjs.ChatAttachmentChipStrip,
|
|
680
680
|
{
|
|
681
681
|
attachments,
|
|
682
682
|
onRemove: removeAttachment,
|
|
@@ -685,7 +685,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
685
685
|
),
|
|
686
686
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
687
687
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
688
|
-
|
|
688
|
+
_chunkKHHFMHYEcjs.ChatAttachmentAddButton,
|
|
689
689
|
{
|
|
690
690
|
attachmentsEnabled: !supportSystemDown,
|
|
691
691
|
attachmentsCount: attachments.length,
|
|
@@ -693,7 +693,7 @@ function TicketOpenForm({ onSubmit, isSubmitting, supportSystemDown }) {
|
|
|
693
693
|
disabled: isSubmitting
|
|
694
694
|
}
|
|
695
695
|
),
|
|
696
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
696
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { type: "submit", disabled: !canSubmit, loading: isSubmitting, children: "Open Ticket" })
|
|
697
697
|
] })
|
|
698
698
|
] })
|
|
699
699
|
] }) });
|
|
@@ -715,9 +715,9 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
715
715
|
|
|
716
716
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
717
717
|
function useTicketEngagements(externalTicketId, enabled = true) {
|
|
718
|
-
const identity =
|
|
718
|
+
const identity = _chunkKHHFMHYEcjs.useChatIdentity.call(void 0, );
|
|
719
719
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.email]), () => ( "anon"));
|
|
720
|
-
const listEngagementsEndpoint = _nullishCoalesce(
|
|
720
|
+
const listEngagementsEndpoint = _nullishCoalesce(_chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
721
721
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
722
722
|
const queryEnabled = fetchable && identity.authTier !== "anon" && !!_optionalChain([identity, 'access', _23 => _23.user, 'optionalAccess', _24 => _24.email]);
|
|
723
723
|
const query = _reactquery.useQuery.call(void 0, {
|
|
@@ -735,7 +735,7 @@ function useTicketEngagements(externalTicketId, enabled = true) {
|
|
|
735
735
|
// `['ticket-engagements', id]`; focus/mount refetch is the no-stream
|
|
736
736
|
// fallback.
|
|
737
737
|
queryFn: async () => {
|
|
738
|
-
const response = await
|
|
738
|
+
const response = await _chunkXOGD2AMEcjs.embedAuthedFetch.call(void 0, listEngagementsEndpoint, {
|
|
739
739
|
method: "POST",
|
|
740
740
|
body: JSON.stringify({ ticket_id: externalTicketId })
|
|
741
741
|
});
|
|
@@ -788,7 +788,7 @@ function TicketLinkedDeliveryCard({ clickup, className }) {
|
|
|
788
788
|
dateClosed: clickup.date_closed,
|
|
789
789
|
clickupUrl: _nullishCoalesce(clickup.clickup_url, () => ( ""))
|
|
790
790
|
};
|
|
791
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `overflow-hidden rounded-md border border-ods-border bg-ods-bg ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
791
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `overflow-hidden rounded-md border border-ods-border bg-ods-bg ${_nullishCoalesce(className, () => ( ""))}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHC2CQDDcjs.DeliveryRow, { item, href: clickup.delivery_href, caption: "Linked delivery" }) });
|
|
792
792
|
}
|
|
793
793
|
|
|
794
794
|
// src/components/tickets/ticket-reply-composer.tsx
|
|
@@ -803,7 +803,7 @@ function TicketReplyComposer({
|
|
|
803
803
|
}) {
|
|
804
804
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
805
805
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
806
|
-
const attachments =
|
|
806
|
+
const attachments = _chunkKHHFMHYEcjs.useChatAttachments.call(void 0, );
|
|
807
807
|
const { readyAttachments, clear: clearAttachments } = attachments;
|
|
808
808
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
809
809
|
const hasReadyFiles = readyAttachments.length > 0;
|
|
@@ -824,7 +824,7 @@ function TicketReplyComposer({
|
|
|
824
824
|
const disabled = busy || supportSystemDown;
|
|
825
825
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
826
826
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
827
|
-
|
|
827
|
+
_chunkKHHFMHYEcjs.ChatAttachmentChipStrip,
|
|
828
828
|
{
|
|
829
829
|
attachments: attachments.attachments,
|
|
830
830
|
onRemove: attachments.removeAttachment,
|
|
@@ -833,7 +833,7 @@ function TicketReplyComposer({
|
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
835
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
836
|
-
|
|
836
|
+
_chunkKHHFMHYEcjs.ChatInput,
|
|
837
837
|
{
|
|
838
838
|
fullWidth: true,
|
|
839
839
|
autoFocus: true,
|
|
@@ -841,13 +841,13 @@ function TicketReplyComposer({
|
|
|
841
841
|
sending: busy || attachments.hasInflightUploads,
|
|
842
842
|
disabled: supportSystemDown,
|
|
843
843
|
allowEmptySend: hasReadyFiles,
|
|
844
|
-
maxLength:
|
|
844
|
+
maxLength: _chunkBWGV4TI5cjs.TICKET_TEXT_MAX_CHARS,
|
|
845
845
|
onSend: handleSend
|
|
846
846
|
}
|
|
847
847
|
),
|
|
848
848
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-center gap-2", children: [
|
|
849
849
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
850
|
-
|
|
850
|
+
_chunkKHHFMHYEcjs.ChatAttachmentAddButton,
|
|
851
851
|
{
|
|
852
852
|
attachmentsEnabled: true,
|
|
853
853
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -858,7 +858,7 @@ function TicketReplyComposer({
|
|
|
858
858
|
),
|
|
859
859
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 flex-1" }),
|
|
860
860
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
861
|
-
|
|
861
|
+
_chunkF6U2H42Lcjs.Button,
|
|
862
862
|
{
|
|
863
863
|
type: "button",
|
|
864
864
|
variant: "transparent",
|
|
@@ -870,25 +870,25 @@ function TicketReplyComposer({
|
|
|
870
870
|
}
|
|
871
871
|
)
|
|
872
872
|
] }),
|
|
873
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
874
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
875
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
876
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
873
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWDFDZSAKcjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWDFDZSAKcjs.AlertDialogContent, { className: "border-ods-border bg-ods-card", children: [
|
|
874
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWDFDZSAKcjs.AlertDialogHeader, { children: [
|
|
875
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWDFDZSAKcjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
876
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWDFDZSAKcjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
877
877
|
] }),
|
|
878
878
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
879
|
-
|
|
879
|
+
_chunkWDFDZSAKcjs.Textarea,
|
|
880
880
|
{
|
|
881
881
|
value: resolution,
|
|
882
882
|
onChange: (e) => setResolution(e.target.value),
|
|
883
883
|
placeholder: "Resolution (optional)",
|
|
884
884
|
rows: 3,
|
|
885
|
-
maxLength:
|
|
885
|
+
maxLength: _chunkBWGV4TI5cjs.TICKET_TEXT_MAX_CHARS,
|
|
886
886
|
className: "mt-2"
|
|
887
887
|
}
|
|
888
888
|
),
|
|
889
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
889
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWDFDZSAKcjs.AlertDialogFooter, { children: [
|
|
890
890
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
891
|
-
|
|
891
|
+
_chunkWDFDZSAKcjs.AlertDialogCancel,
|
|
892
892
|
{
|
|
893
893
|
disabled: busy,
|
|
894
894
|
className: "border-ods-border bg-transparent text-ods-text-primary hover:bg-ods-border",
|
|
@@ -896,7 +896,7 @@ function TicketReplyComposer({
|
|
|
896
896
|
}
|
|
897
897
|
),
|
|
898
898
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
899
|
-
|
|
899
|
+
_chunkWDFDZSAKcjs.AlertDialogAction,
|
|
900
900
|
{
|
|
901
901
|
onClick: () => void confirmClose(),
|
|
902
902
|
disabled: busy,
|
|
@@ -958,10 +958,10 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
958
958
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
959
959
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
960
960
|
function TicketTimelinePanel({ ticket }) {
|
|
961
|
-
const identity =
|
|
962
|
-
const externalId =
|
|
961
|
+
const identity = _chunkKHHFMHYEcjs.useChatIdentity.call(void 0, );
|
|
962
|
+
const externalId = _chunkBWGV4TI5cjs.isOptimistic.call(void 0, ticket) ? null : ticket.external_id;
|
|
963
963
|
const { engagements, isLoading } = useTicketEngagements(externalId, !!externalId);
|
|
964
|
-
const live =
|
|
964
|
+
const live = _chunkBWGV4TI5cjs.useOptionalTicketLive.call(void 0, );
|
|
965
965
|
const setOpenTicketId = _optionalChain([live, 'optionalAccess', _25 => _25.setOpenTicketId]);
|
|
966
966
|
const markRead = _optionalChain([live, 'optionalAccess', _26 => _26.markRead]);
|
|
967
967
|
const markReadDebounceRef = _react.useRef.call(void 0, null);
|
|
@@ -985,7 +985,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
985
985
|
markReadDebounceRef.current = setTimeout(() => {
|
|
986
986
|
markReadDebounceRef.current = null;
|
|
987
987
|
void markRead(externalId);
|
|
988
|
-
},
|
|
988
|
+
}, _chunkBWGV4TI5cjs.TICKET_MARK_READ_DEBOUNCE_MS);
|
|
989
989
|
}, [engagementsCount, externalId, markRead]);
|
|
990
990
|
const { scrollRef, contentRef } = _usesticktobottom.useStickToBottom.call(void 0, { initial: "instant", resize: "smooth" });
|
|
991
991
|
const bodyTurns = ticket.body ? ticket.body.split(TURN_SEPARATOR_RE).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -1000,11 +1000,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1000
1000
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _40 => _40.user, 'optionalAccess', _41 => _41.email]) || "You";
|
|
1001
1001
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _42 => _42.user, 'optionalAccess', _43 => _43.avatarUrl]), () => ( void 0)) : void 0;
|
|
1002
1002
|
if (isLoading) {
|
|
1003
|
-
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,
|
|
1003
|
+
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, _chunkKHHFMHYEcjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
1004
1004
|
}
|
|
1005
1005
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
1006
1006
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1007
|
-
|
|
1007
|
+
_chunk77BLJHKIcjs.EmptyState,
|
|
1008
1008
|
{
|
|
1009
1009
|
type: "generic",
|
|
1010
1010
|
title: "No conversation yet",
|
|
@@ -1019,7 +1019,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1019
1019
|
const isResolution = turn.startsWith("[Resolution]");
|
|
1020
1020
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
1021
1021
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1022
|
-
|
|
1022
|
+
_chunkKHHFMHYEcjs.ChatMessageRow,
|
|
1023
1023
|
{
|
|
1024
1024
|
displayName: customerName,
|
|
1025
1025
|
avatarUrl: customerAvatar,
|
|
@@ -1048,13 +1048,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
1050
1050
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1051
|
-
|
|
1051
|
+
_chunkKHHFMHYEcjs.ChatMessageRow,
|
|
1052
1052
|
{
|
|
1053
1053
|
displayName: author,
|
|
1054
1054
|
avatarUrl: avatarSrc,
|
|
1055
|
-
timeLabel: eng.createdAt ?
|
|
1055
|
+
timeLabel: eng.createdAt ? _chunkKHHFMHYEcjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
1056
1056
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
1057
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1057
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWDFDZSAKcjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
1058
1058
|
},
|
|
1059
1059
|
eng.id
|
|
1060
1060
|
);
|
|
@@ -1095,7 +1095,7 @@ function ReopenAction({
|
|
|
1095
1095
|
void await onReopen(ticketRef);
|
|
1096
1096
|
};
|
|
1097
1097
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1098
|
-
|
|
1098
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1099
1099
|
{
|
|
1100
1100
|
type: "button",
|
|
1101
1101
|
variant: "outline",
|
|
@@ -1117,7 +1117,7 @@ function ReplyFailureBanner({ error, onDismiss }) {
|
|
|
1117
1117
|
children: [
|
|
1118
1118
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium leading-snug", children: error.message }),
|
|
1119
1119
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1120
|
-
|
|
1120
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1121
1121
|
{
|
|
1122
1122
|
type: "button",
|
|
1123
1123
|
variant: "transparent",
|
|
@@ -1139,7 +1139,7 @@ function AssignedAgentRow({ assignedOwner }) {
|
|
|
1139
1139
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary text-h5", children: "Assigned to" }),
|
|
1140
1140
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 font-medium text-ods-text-primary", children: [
|
|
1141
1141
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1142
|
-
|
|
1142
|
+
_chunkEX5PJGVAcjs.SquareAvatar,
|
|
1143
1143
|
{
|
|
1144
1144
|
size: "sm",
|
|
1145
1145
|
variant: "round",
|
|
@@ -1167,7 +1167,7 @@ function TicketRow({
|
|
|
1167
1167
|
onActionCollapsed,
|
|
1168
1168
|
id
|
|
1169
1169
|
}) {
|
|
1170
|
-
const optimistic =
|
|
1170
|
+
const optimistic = _chunkBWGV4TI5cjs.isOptimistic.call(void 0, ticket);
|
|
1171
1171
|
const rowRef = _react.useRef.call(void 0, null);
|
|
1172
1172
|
const handleClick = _react.useCallback.call(void 0, () => {
|
|
1173
1173
|
onToggle(ticket.id);
|
|
@@ -1195,7 +1195,7 @@ function TicketRow({
|
|
|
1195
1195
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
1196
1196
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
1197
1197
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
1198
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
1198
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkKHHFMHYEcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
1199
1199
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
1200
1200
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
1201
1201
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -1205,7 +1205,7 @@ function TicketRow({
|
|
|
1205
1205
|
};
|
|
1206
1206
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: rowRef, id, className: "scroll-mt-24", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Collapsible, { open: expanded && !optimistic, className: "border-b border-ods-border last:border-b-0", children: [
|
|
1207
1207
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1208
|
-
|
|
1208
|
+
_chunkKHHFMHYEcjs.ChatTicketItem,
|
|
1209
1209
|
{
|
|
1210
1210
|
ticket: tileData,
|
|
1211
1211
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1237,14 +1237,14 @@ function TicketRow({
|
|
|
1237
1237
|
|
|
1238
1238
|
// src/components/tickets/ticket-center.tsx
|
|
1239
1239
|
|
|
1240
|
-
function TicketCenter({ toast: toast2 =
|
|
1241
|
-
const identity =
|
|
1240
|
+
function TicketCenter({ toast: toast2 = _chunkJH5P72AFcjs.toast } = {}) {
|
|
1241
|
+
const identity = _chunkKHHFMHYEcjs.useChatIdentity.call(void 0, );
|
|
1242
1242
|
if (identity.isLoading) {
|
|
1243
1243
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1244
1244
|
}
|
|
1245
1245
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _62 => _62.user, 'optionalAccess', _63 => _63.email])) {
|
|
1246
1246
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1247
|
-
|
|
1247
|
+
_chunk77BLJHKIcjs.EmptyState,
|
|
1248
1248
|
{
|
|
1249
1249
|
type: "generic",
|
|
1250
1250
|
title: "Sign in to manage tickets",
|
|
@@ -1309,10 +1309,10 @@ function TicketCenterAuthed({
|
|
|
1309
1309
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-ods-text-secondary text-h6", children: [
|
|
1310
1310
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1311
1311
|
"Updated ",
|
|
1312
|
-
|
|
1312
|
+
_chunkKHHFMHYEcjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1313
1313
|
] }),
|
|
1314
1314
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1315
|
-
|
|
1315
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1316
1316
|
{
|
|
1317
1317
|
type: "button",
|
|
1318
1318
|
variant: "transparent",
|
|
@@ -1325,22 +1325,22 @@ function TicketCenterAuthed({
|
|
|
1325
1325
|
)
|
|
1326
1326
|
] })
|
|
1327
1327
|
] }),
|
|
1328
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1329
|
-
|
|
1328
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1329
|
+
_chunk77BLJHKIcjs.EmptyState,
|
|
1330
1330
|
{
|
|
1331
1331
|
type: "generic",
|
|
1332
1332
|
title: "No tickets yet",
|
|
1333
1333
|
description: "Open one above to start the conversation.",
|
|
1334
1334
|
showCTA: false
|
|
1335
1335
|
}
|
|
1336
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1336
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1337
1337
|
TicketRow,
|
|
1338
1338
|
{
|
|
1339
|
-
id:
|
|
1339
|
+
id: _chunkWDFDZSAKcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1340
1340
|
ticket,
|
|
1341
1341
|
expanded: expandedTicketId === ticket.id,
|
|
1342
1342
|
onToggle: toggleRow,
|
|
1343
|
-
busy:
|
|
1343
|
+
busy: _chunkBWGV4TI5cjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1344
1344
|
supportSystemDown,
|
|
1345
1345
|
onSendMessage: actions.sendMessage,
|
|
1346
1346
|
onClose: actions.closeTicket,
|
|
@@ -1354,22 +1354,22 @@ function TicketCenterAuthed({
|
|
|
1354
1354
|
}
|
|
1355
1355
|
function TicketCenterSkeleton() {
|
|
1356
1356
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1357
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1358
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1359
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1360
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1357
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEX5PJGVAcjs.Card, { className: "p-6", children: [
|
|
1358
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSD62VAYcjs.Skeleton, { className: "mb-4 h-7 w-48" }),
|
|
1359
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSD62VAYcjs.Skeleton, { className: "mb-3 h-10 w-full" }),
|
|
1360
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSD62VAYcjs.Skeleton, { className: "h-24 w-full" })
|
|
1361
1361
|
] }),
|
|
1362
1362
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {})
|
|
1363
1363
|
] });
|
|
1364
1364
|
}
|
|
1365
1365
|
function TicketListSkeleton() {
|
|
1366
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1366
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-20 items-center gap-4 border-b border-ods-border px-4 last:border-b-0", children: [
|
|
1367
1367
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
1368
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1369
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1368
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSD62VAYcjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1369
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSD62VAYcjs.Skeleton, { className: "h-3 w-full" })
|
|
1370
1370
|
] }),
|
|
1371
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1372
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1371
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSD62VAYcjs.Skeleton, { className: "h-8 w-20" }),
|
|
1372
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSD62VAYcjs.Skeleton, { className: "h-8 w-16" })
|
|
1373
1373
|
] }, i)) });
|
|
1374
1374
|
}
|
|
1375
1375
|
|
|
@@ -1394,10 +1394,10 @@ function HelpCenterCard({
|
|
|
1394
1394
|
onClearReplyError,
|
|
1395
1395
|
id
|
|
1396
1396
|
}) {
|
|
1397
|
-
const optimistic =
|
|
1397
|
+
const optimistic = _chunkBWGV4TI5cjs.isOptimistic.call(void 0, ticket);
|
|
1398
1398
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1399
1399
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1400
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1400
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkKHHFMHYEcjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1401
1401
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1402
1402
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1403
1403
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1416,11 +1416,11 @@ function HelpCenterCard({
|
|
|
1416
1416
|
});
|
|
1417
1417
|
return () => cancelAnimationFrame(raf);
|
|
1418
1418
|
}, [isExpanded]);
|
|
1419
|
-
const live =
|
|
1419
|
+
const live = _chunkBWGV4TI5cjs.useOptionalTicketLive.call(void 0, );
|
|
1420
1420
|
const unreadCount = !optimistic && ticket.external_id && _optionalChain([live, 'optionalAccess', _64 => _64.unreadByTicket, 'access', _65 => _65[ticket.external_id]]) || 0;
|
|
1421
1421
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1422
1422
|
unreadCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1423
|
-
|
|
1423
|
+
_chunkEX5PJGVAcjs.StatusBadge,
|
|
1424
1424
|
{
|
|
1425
1425
|
text: `${unreadCount} NEW`,
|
|
1426
1426
|
colorScheme: "warning",
|
|
@@ -1429,16 +1429,16 @@ function HelpCenterCard({
|
|
|
1429
1429
|
}
|
|
1430
1430
|
),
|
|
1431
1431
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1432
|
-
|
|
1432
|
+
_chunkEX5PJGVAcjs.StatusBadge,
|
|
1433
1433
|
{
|
|
1434
1434
|
text: rawStatus,
|
|
1435
|
-
colorScheme:
|
|
1435
|
+
colorScheme: _chunkEX5PJGVAcjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1436
1436
|
variant: "card",
|
|
1437
1437
|
className: "border border-ods-border"
|
|
1438
1438
|
}
|
|
1439
1439
|
),
|
|
1440
1440
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1441
|
-
|
|
1441
|
+
_chunkEX5PJGVAcjs.StatusBadge,
|
|
1442
1442
|
{
|
|
1443
1443
|
text: priority,
|
|
1444
1444
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1466,7 +1466,7 @@ function HelpCenterCard({
|
|
|
1466
1466
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1467
1467
|
className: "w-full p-[12px] text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-accent disabled:cursor-default md:p-[16px]",
|
|
1468
1468
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1469
|
-
|
|
1469
|
+
_chunkAHC2CQDDcjs.DevCardRowContent,
|
|
1470
1470
|
{
|
|
1471
1471
|
title,
|
|
1472
1472
|
subtitle,
|
|
@@ -1541,12 +1541,12 @@ function HelpCenterCreateForm({
|
|
|
1541
1541
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1542
1542
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1543
1543
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1544
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1544
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGSD62VAYcjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1545
1545
|
"Subject",
|
|
1546
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1546
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYWUZL3RTcjs.RequiredMark, {})
|
|
1547
1547
|
] }),
|
|
1548
1548
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1549
|
-
|
|
1549
|
+
_chunkYWUZL3RTcjs.Input,
|
|
1550
1550
|
{
|
|
1551
1551
|
id: "help-center-subject",
|
|
1552
1552
|
type: "text",
|
|
@@ -1567,7 +1567,7 @@ function HelpCenterCreateForm({
|
|
|
1567
1567
|
subjectError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { id: "help-center-subject-error", className: "mt-1 text-ods-error text-h6", children: subjectError })
|
|
1568
1568
|
] });
|
|
1569
1569
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1570
|
-
|
|
1570
|
+
_chunkOPNEE5XDcjs.ContactForm,
|
|
1571
1571
|
{
|
|
1572
1572
|
title: "Open a new ticket",
|
|
1573
1573
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1604,31 +1604,31 @@ function HelpCenterCreateForm({
|
|
|
1604
1604
|
|
|
1605
1605
|
// src/components/tickets/help-center-list.tsx
|
|
1606
1606
|
|
|
1607
|
-
function HelpCenterList({ toast: toast2 =
|
|
1608
|
-
const identity =
|
|
1607
|
+
function HelpCenterList({ toast: toast2 = _chunkJH5P72AFcjs.toast, backButton, title, shell } = {}) {
|
|
1608
|
+
const identity = _chunkKHHFMHYEcjs.useChatIdentity.call(void 0, );
|
|
1609
1609
|
const searchParams = _chunkSADRZ4YIcjs.useSearchParams.call(void 0, );
|
|
1610
1610
|
const router = _chunkSADRZ4YIcjs.useRouter.call(void 0, );
|
|
1611
1611
|
const pathname = _chunkSADRZ4YIcjs.usePathname.call(void 0, );
|
|
1612
|
-
const search = searchParams.get(
|
|
1612
|
+
const search = searchParams.get(_chunkWDFDZSAKcjs.DEV_SECTION_PARAM_KEYS.search) || "";
|
|
1613
1613
|
const status = searchParams.get("status") || "all";
|
|
1614
|
-
const ticketParam = searchParams.get(
|
|
1615
|
-
const page =
|
|
1614
|
+
const ticketParam = searchParams.get(_chunkWDFDZSAKcjs.TICKET_OPEN_PARAM) || "";
|
|
1615
|
+
const page = _chunkVTYP25OWcjs.positiveInt.call(void 0, searchParams.get("page"), 1);
|
|
1616
1616
|
if (identity.isLoading) {
|
|
1617
1617
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1618
|
-
|
|
1618
|
+
_chunkAHC2CQDDcjs.DevSectionPage,
|
|
1619
1619
|
{
|
|
1620
1620
|
sectionKey: "tickets",
|
|
1621
1621
|
backButton,
|
|
1622
1622
|
title,
|
|
1623
1623
|
shell,
|
|
1624
1624
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1625
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1625
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHC2CQDDcjs.DevCardRowSkeletonList, {})
|
|
1626
1626
|
}
|
|
1627
1627
|
);
|
|
1628
1628
|
}
|
|
1629
1629
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _66 => _66.user, 'optionalAccess', _67 => _67.email])) {
|
|
1630
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
|
-
|
|
1630
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHC2CQDDcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
|
+
_chunk77BLJHKIcjs.EmptyState,
|
|
1632
1632
|
{
|
|
1633
1633
|
type: "generic",
|
|
1634
1634
|
title: "Sign in to manage tickets",
|
|
@@ -1679,8 +1679,8 @@ function HelpCenterListAuthed({
|
|
|
1679
1679
|
const setOpenTicket = _react.useCallback.call(void 0,
|
|
1680
1680
|
(externalId) => {
|
|
1681
1681
|
const params = new URLSearchParams(searchParams.toString());
|
|
1682
|
-
if (externalId) params.set(
|
|
1683
|
-
else params.delete(
|
|
1682
|
+
if (externalId) params.set(_chunkWDFDZSAKcjs.TICKET_OPEN_PARAM, externalId);
|
|
1683
|
+
else params.delete(_chunkWDFDZSAKcjs.TICKET_OPEN_PARAM);
|
|
1684
1684
|
const qs = params.toString();
|
|
1685
1685
|
router.replace(qs ? `${pathname}?${qs}` : pathname, { scroll: false });
|
|
1686
1686
|
},
|
|
@@ -1737,7 +1737,7 @@ function HelpCenterListAuthed({
|
|
|
1737
1737
|
[tickets, ticketParam, setOpenTicket]
|
|
1738
1738
|
);
|
|
1739
1739
|
const merged = [...optimisticTickets, ...tickets];
|
|
1740
|
-
|
|
1740
|
+
_chunkJH5P72AFcjs.useScrollToHash.call(void 0, tickets, { headerOffset: _chunkTLLJIGTPcjs.STICKY_HEADER_OFFSET_PX });
|
|
1741
1741
|
const hasActiveFilters = search !== "" || status !== "" && status !== "all";
|
|
1742
1742
|
const hasResults = merged.length > 0;
|
|
1743
1743
|
const form = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1755,17 +1755,17 @@ function HelpCenterListAuthed({
|
|
|
1755
1755
|
"Couldn\u2019t load your tickets. ",
|
|
1756
1756
|
error.message
|
|
1757
1757
|
] }),
|
|
1758
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1758
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1759
1759
|
] }),
|
|
1760
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1760
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHC2CQDDcjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1761
1761
|
// Bridge state — background refetch in flight and the
|
|
1762
1762
|
// optimistic placeholder was just removed by the mutation
|
|
1763
1763
|
// callback. Without this branch "No tickets yet" would flash
|
|
1764
1764
|
// for ~50ms between `removeOptimistic` and the server
|
|
1765
1765
|
// response landing.
|
|
1766
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1766
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHC2CQDDcjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1767
1767
|
) : !hasResults ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1768
|
-
|
|
1768
|
+
_chunkAHC2CQDDcjs.ListEmptyState,
|
|
1769
1769
|
{
|
|
1770
1770
|
isFiltered: hasActiveFilters,
|
|
1771
1771
|
filtered: {
|
|
@@ -1796,11 +1796,11 @@ function HelpCenterListAuthed({
|
|
|
1796
1796
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full overflow-clip rounded-[6px] border border-ods-border bg-ods-card", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1797
1797
|
HelpCenterCard,
|
|
1798
1798
|
{
|
|
1799
|
-
id:
|
|
1799
|
+
id: _chunkWDFDZSAKcjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1800
1800
|
ticket,
|
|
1801
1801
|
expanded: expandedTicketId === ticket.id,
|
|
1802
1802
|
onToggle: toggleRow,
|
|
1803
|
-
busy:
|
|
1803
|
+
busy: _chunkBWGV4TI5cjs.isOptimistic.call(void 0, ticket) ? false : actions.isRowBusy(ticket.id),
|
|
1804
1804
|
supportSystemDown,
|
|
1805
1805
|
onSendMessage: actions.sendMessage,
|
|
1806
1806
|
onClose: actions.closeTicket,
|
|
@@ -1812,9 +1812,9 @@ function HelpCenterListAuthed({
|
|
|
1812
1812
|
ticket.id
|
|
1813
1813
|
)) })
|
|
1814
1814
|
) }),
|
|
1815
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1815
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk77BLJHKIcjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1816
1816
|
] });
|
|
1817
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1817
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHC2CQDDcjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1818
1818
|
}
|
|
1819
1819
|
|
|
1820
1820
|
|
|
@@ -1833,4 +1833,4 @@ function HelpCenterListAuthed({
|
|
|
1833
1833
|
|
|
1834
1834
|
|
|
1835
1835
|
exports.useTicketActions = useTicketActions; exports.mapTicketActionError = mapTicketActionError; exports.useTicketsList = useTicketsList; exports.TicketOpenForm = TicketOpenForm; exports.useTicketEngagements = useTicketEngagements; exports.TicketLinkedDeliveryCard = TicketLinkedDeliveryCard; exports.TicketReplyComposer = TicketReplyComposer; exports.TicketDetailDrawer = TicketDetailDrawer; exports.TicketRow = TicketRow; exports.TicketCenter = TicketCenter; exports.HelpCenterCard = HelpCenterCard; exports.HelpCenterCreateFormSkeleton = HelpCenterCreateFormSkeleton; exports.HelpCenterCreateForm = HelpCenterCreateForm; exports.HelpCenterList = HelpCenterList;
|
|
1836
|
-
//# sourceMappingURL=chunk-
|
|
1836
|
+
//# sourceMappingURL=chunk-4GZZYHG5.cjs.map
|