@consilioweb/payload-support 0.6.2 → 0.6.3

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.
Files changed (65) hide show
  1. package/dist/components/TicketConversation/components/AISummaryPanel.cjs +77 -0
  2. package/dist/components/TicketConversation/components/AISummaryPanel.js +76 -0
  3. package/dist/components/TicketConversation/components/ActionPanels.cjs +121 -0
  4. package/dist/components/TicketConversation/components/ActionPanels.js +118 -0
  5. package/dist/components/TicketConversation/components/ActivityLog.cjs +24 -0
  6. package/dist/components/TicketConversation/components/ActivityLog.js +23 -0
  7. package/dist/components/TicketConversation/components/ClientBar.cjs +43 -0
  8. package/dist/components/TicketConversation/components/ClientBar.js +42 -0
  9. package/dist/components/TicketConversation/components/ClientHistory.cjs +138 -0
  10. package/dist/components/TicketConversation/components/ClientHistory.js +137 -0
  11. package/dist/components/TicketConversation/components/CodeBlock.cjs +154 -0
  12. package/dist/components/TicketConversation/components/CodeBlock.js +152 -0
  13. package/dist/components/TicketConversation/components/CodeBlockInserter.cjs +156 -0
  14. package/dist/components/TicketConversation/components/CodeBlockInserter.js +155 -0
  15. package/dist/components/TicketConversation/components/QuickActions.cjs +66 -0
  16. package/dist/components/TicketConversation/components/QuickActions.js +65 -0
  17. package/dist/components/TicketConversation/components/TicketHeader.cjs +93 -0
  18. package/dist/components/TicketConversation/components/TicketHeader.js +92 -0
  19. package/dist/components/TicketConversation/components/TimeTrackingPanel.cjs +134 -0
  20. package/dist/components/TicketConversation/components/TimeTrackingPanel.js +133 -0
  21. package/dist/components/TicketConversation/config.cjs +44 -0
  22. package/dist/components/TicketConversation/config.js +41 -0
  23. package/dist/components/TicketConversation/constants.cjs +100 -0
  24. package/dist/components/TicketConversation/constants.js +96 -0
  25. package/dist/components/TicketConversation/context.cjs +13 -0
  26. package/dist/components/TicketConversation/context.js +11 -0
  27. package/dist/components/TicketConversation/hooks/useAI.cjs +177 -0
  28. package/dist/components/TicketConversation/hooks/useAI.js +176 -0
  29. package/dist/components/TicketConversation/hooks/useMessageActions.cjs +136 -0
  30. package/dist/components/TicketConversation/hooks/useMessageActions.js +135 -0
  31. package/dist/components/TicketConversation/hooks/useReply.cjs +188 -0
  32. package/dist/components/TicketConversation/hooks/useReply.js +187 -0
  33. package/dist/components/TicketConversation/hooks/useTicketActions.cjs +231 -0
  34. package/dist/components/TicketConversation/hooks/useTicketActions.js +230 -0
  35. package/dist/components/TicketConversation/hooks/useTimeTracking.cjs +123 -0
  36. package/dist/components/TicketConversation/hooks/useTimeTracking.js +122 -0
  37. package/dist/components/TicketConversation/hooks/useTranslation.cjs +78 -0
  38. package/dist/components/TicketConversation/hooks/useTranslation.js +70 -0
  39. package/dist/components/TicketConversation/index.cjs +1128 -0
  40. package/dist/components/TicketConversation/index.js +1123 -0
  41. package/dist/components/TicketConversation/locales/en.json +878 -0
  42. package/dist/components/TicketConversation/locales/fr.json +878 -0
  43. package/dist/components/TicketConversation/types.cjs +2 -0
  44. package/dist/components/TicketConversation/types.js +2 -0
  45. package/dist/components/TicketConversation/utils.cjs +27 -0
  46. package/dist/components/TicketConversation/utils.js +25 -0
  47. package/dist/styles/BillingView.module.scss +311 -0
  48. package/dist/styles/ChatView.module.scss +438 -0
  49. package/dist/styles/CommandPalette.module.scss +160 -0
  50. package/dist/styles/CrmView.module.scss +554 -0
  51. package/dist/styles/EmailTracking.module.scss +238 -0
  52. package/dist/styles/ImportConversation.module.scss +267 -0
  53. package/dist/styles/Layout.module.scss +55 -0
  54. package/dist/styles/Logs.module.scss +164 -0
  55. package/dist/styles/NewTicket.module.scss +143 -0
  56. package/dist/styles/PendingEmails.module.scss +629 -0
  57. package/dist/styles/SupportDashboard.module.scss +649 -0
  58. package/dist/styles/TicketDetail.module.scss +1050 -0
  59. package/dist/styles/TicketInbox.module.scss +296 -0
  60. package/dist/styles/TicketingSettings.module.scss +358 -0
  61. package/dist/styles/TimeDashboard.module.scss +287 -0
  62. package/dist/styles/_tokens.scss +78 -0
  63. package/dist/{components/TicketConversation.css → styles/theme.css} +326 -13
  64. package/package.json +2 -2
  65. package/dist/components/TicketConversation.js +0 -3004
@@ -0,0 +1,438 @@
1
+ // ChatView — Live chat admin panel
2
+ // Uses Payload CMS CSS variables for dark mode compatibility
3
+
4
+ $font-stack: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
5
+
6
+ .page {
7
+ max-width: 1920px;
8
+ margin: 0 auto;
9
+ padding: 0 24px 40px;
10
+ font-family: $font-stack;
11
+ }
12
+
13
+ // ─── HEADER ───
14
+ .header {
15
+ display: flex;
16
+ align-items: center;
17
+ gap: 14px;
18
+ padding: 20px 0 16px;
19
+ border-bottom: 1px solid var(--theme-elevation-150, #f1f5f9);
20
+ margin-bottom: 20px;
21
+ }
22
+
23
+ .title {
24
+ font-size: 24px;
25
+ font-weight: 800;
26
+ color: var(--theme-text);
27
+ margin: 0;
28
+ }
29
+
30
+ .subtitle {
31
+ font-size: 13px;
32
+ color: var(--theme-elevation-500);
33
+ margin: 4px 0 0;
34
+ }
35
+
36
+ // ─── MAIN LAYOUT ───
37
+ .container {
38
+ display: flex;
39
+ gap: 16px;
40
+ height: calc(100vh - 220px);
41
+ min-height: 500px;
42
+ }
43
+
44
+ // ─── SESSIONS SIDEBAR ───
45
+ .sidebar {
46
+ width: 340px;
47
+ min-width: 280px;
48
+ border: 1px solid var(--theme-elevation-150, #f1f5f9);
49
+ border-radius: 12px;
50
+ background: var(--theme-elevation-0, #fff);
51
+ display: flex;
52
+ flex-direction: column;
53
+ overflow: hidden;
54
+ }
55
+
56
+ .tabs {
57
+ display: flex;
58
+ border-bottom: 1px solid var(--theme-elevation-150, #f1f5f9);
59
+ }
60
+
61
+ .tab {
62
+ flex: 1;
63
+ padding: 11px 12px;
64
+ font-weight: 600;
65
+ font-size: 11px;
66
+ text-transform: uppercase;
67
+ letter-spacing: 0.04em;
68
+ border: none;
69
+ cursor: pointer;
70
+ color: var(--theme-elevation-500);
71
+ background: none;
72
+ position: relative;
73
+ transition: color 100ms;
74
+
75
+ &:hover {
76
+ color: var(--theme-text);
77
+ }
78
+
79
+ &::after {
80
+ content: '';
81
+ position: absolute;
82
+ bottom: 0;
83
+ left: 12px;
84
+ right: 12px;
85
+ height: 2px;
86
+ border-radius: 2px;
87
+ background: transparent;
88
+ transition: background 100ms;
89
+ }
90
+ }
91
+
92
+ .tabActive {
93
+ color: var(--theme-text);
94
+
95
+ &::after {
96
+ background: #2563eb;
97
+ }
98
+ }
99
+
100
+ .sessionList {
101
+ flex: 1;
102
+ overflow-y: auto;
103
+ }
104
+
105
+ .emptyState {
106
+ padding: 32px 20px;
107
+ text-align: center;
108
+ color: var(--theme-elevation-400);
109
+ font-size: 13px;
110
+ font-weight: 500;
111
+ }
112
+
113
+ .loadingState {
114
+ padding: 20px;
115
+ }
116
+
117
+ // ─── SESSION ITEM ───
118
+ .sessionItem {
119
+ display: block;
120
+ width: 100%;
121
+ text-align: left;
122
+ padding: 12px 14px;
123
+ border: none;
124
+ border-bottom: 1px solid var(--theme-elevation-100, #f8fafc);
125
+ cursor: pointer;
126
+ background: none;
127
+ transition: background 80ms;
128
+
129
+ &:hover {
130
+ background: var(--theme-elevation-50);
131
+ }
132
+
133
+ &:last-child {
134
+ border-bottom: none;
135
+ }
136
+ }
137
+
138
+ .sessionItemActive {
139
+ background: var(--theme-elevation-100);
140
+
141
+ &:hover {
142
+ background: var(--theme-elevation-100);
143
+ }
144
+ }
145
+
146
+ .sessionHeader {
147
+ display: flex;
148
+ justify-content: space-between;
149
+ align-items: center;
150
+ margin-bottom: 2px;
151
+ }
152
+
153
+ .sessionName {
154
+ font-weight: 600;
155
+ font-size: 13px;
156
+ color: var(--theme-text);
157
+ }
158
+
159
+ .unreadBadge {
160
+ background: #ef4444;
161
+ color: #fff;
162
+ border-radius: 10px;
163
+ padding: 2px 7px;
164
+ font-size: 10px;
165
+ font-weight: 700;
166
+ min-width: 18px;
167
+ text-align: center;
168
+ }
169
+
170
+ .sessionCompany {
171
+ font-size: 11px;
172
+ color: var(--theme-elevation-400);
173
+ margin-bottom: 2px;
174
+ }
175
+
176
+ .sessionPreview {
177
+ font-size: 12px;
178
+ color: var(--theme-elevation-500);
179
+ white-space: nowrap;
180
+ overflow: hidden;
181
+ text-overflow: ellipsis;
182
+ }
183
+
184
+ .sessionRating {
185
+ color: #d97706;
186
+ }
187
+
188
+ .sessionMeta {
189
+ font-size: 10px;
190
+ color: var(--theme-elevation-400);
191
+ margin-top: 3px;
192
+ }
193
+
194
+ // ─── CHAT PANEL ───
195
+ .chatPanel {
196
+ flex: 1;
197
+ border: 1px solid var(--theme-elevation-150, #f1f5f9);
198
+ border-radius: 12px;
199
+ background: var(--theme-elevation-0, #fff);
200
+ display: flex;
201
+ flex-direction: column;
202
+ overflow: hidden;
203
+ min-width: 0;
204
+ }
205
+
206
+ .chatEmpty {
207
+ flex: 1;
208
+ display: flex;
209
+ align-items: center;
210
+ justify-content: center;
211
+ color: var(--theme-elevation-400);
212
+ font-size: 14px;
213
+ font-weight: 500;
214
+ }
215
+
216
+ // ─── CHAT HEADER ───
217
+ .chatHeader {
218
+ padding: 12px 16px;
219
+ border-bottom: 1px solid var(--theme-elevation-150, #f1f5f9);
220
+ display: flex;
221
+ justify-content: space-between;
222
+ align-items: center;
223
+ }
224
+
225
+ .chatSessionId {
226
+ font-weight: 600;
227
+ font-size: 14px;
228
+ color: var(--theme-text);
229
+ }
230
+
231
+ .closeBtn {
232
+ padding: 6px 14px;
233
+ border-radius: 6px;
234
+ border: 1px solid var(--theme-elevation-200);
235
+ background: none;
236
+ color: var(--theme-elevation-500);
237
+ font-weight: 600;
238
+ font-size: 12px;
239
+ cursor: pointer;
240
+ transition: all 100ms;
241
+
242
+ &:hover {
243
+ background: #fef2f2;
244
+ border-color: #fecaca;
245
+ color: #dc2626;
246
+ }
247
+ }
248
+
249
+ // ─── MESSAGES ───
250
+ .messagesArea {
251
+ flex: 1;
252
+ overflow-y: auto;
253
+ padding: 16px;
254
+ display: flex;
255
+ flex-direction: column;
256
+ gap: 8px;
257
+ }
258
+
259
+ .messageRow {
260
+ display: flex;
261
+ }
262
+
263
+ .messageRowClient {
264
+ justify-content: flex-start;
265
+ }
266
+
267
+ .messageRowAgent {
268
+ justify-content: flex-end;
269
+ }
270
+
271
+ .messageRowSystem {
272
+ justify-content: center;
273
+ }
274
+
275
+ // ─── BUBBLES ───
276
+ .bubble {
277
+ max-width: 70%;
278
+ padding: 10px 14px;
279
+ border-radius: 12px;
280
+ border: 1px solid var(--theme-elevation-150, #f1f5f9);
281
+ }
282
+
283
+ .bubbleClient {
284
+ background: var(--theme-elevation-50);
285
+ border-color: var(--theme-elevation-200);
286
+ border-bottom-left-radius: 4px;
287
+ }
288
+
289
+ .bubbleAgent {
290
+ background: #2563eb;
291
+ border-color: #2563eb;
292
+ color: #fff;
293
+ border-bottom-right-radius: 4px;
294
+
295
+ .bubbleSender { color: rgba(255, 255, 255, 0.7); }
296
+ .bubbleTime { color: rgba(255, 255, 255, 0.5); }
297
+ }
298
+
299
+ .bubbleSystem {
300
+ background: var(--theme-elevation-100);
301
+ border-color: var(--theme-elevation-200);
302
+ padding: 6px 14px;
303
+ font-size: 12px;
304
+ color: var(--theme-elevation-500);
305
+ border-radius: 8px;
306
+ max-width: 80%;
307
+ }
308
+
309
+ .bubbleRating {
310
+ background: #fffbeb;
311
+ border: 1px solid #fcd34d;
312
+ border-radius: 12px;
313
+ padding: 12px 18px;
314
+ max-width: 80%;
315
+ text-align: center;
316
+ }
317
+
318
+ .ratingStars {
319
+ font-size: 26px;
320
+ letter-spacing: 4px;
321
+ margin-bottom: 4px;
322
+ }
323
+
324
+ .ratingComment {
325
+ font-size: 13px;
326
+ font-weight: 600;
327
+ color: var(--theme-text);
328
+ margin-bottom: 2px;
329
+ }
330
+
331
+ .ratingMeta {
332
+ font-size: 11px;
333
+ color: var(--theme-elevation-400);
334
+ margin-top: 4px;
335
+ }
336
+
337
+ .bubbleSender {
338
+ font-size: 10px;
339
+ font-weight: 700;
340
+ margin-bottom: 4px;
341
+ opacity: 0.7;
342
+ color: var(--theme-elevation-500);
343
+ }
344
+
345
+ .bubbleBody {
346
+ font-size: 13px;
347
+ white-space: pre-wrap;
348
+ line-height: 1.5;
349
+ word-break: break-word;
350
+ }
351
+
352
+ .bubbleTime {
353
+ font-size: 10px;
354
+ margin-top: 4px;
355
+ opacity: 0.5;
356
+ text-align: right;
357
+ color: var(--theme-elevation-400);
358
+ }
359
+
360
+ // ─── COMPOSER ───
361
+ .composer {
362
+ padding: 12px;
363
+ border-top: 1px solid var(--theme-elevation-150, #f1f5f9);
364
+ display: flex;
365
+ flex-direction: column;
366
+ gap: 8px;
367
+ }
368
+
369
+ .cannedSelect {
370
+ padding: 6px 10px;
371
+ border-radius: 6px;
372
+ border: 1px solid var(--theme-elevation-200);
373
+ font-size: 12px;
374
+ font-weight: 600;
375
+ background: none;
376
+ color: var(--theme-elevation-500);
377
+ cursor: pointer;
378
+ transition: all 80ms;
379
+
380
+ &:hover {
381
+ border-color: var(--theme-elevation-300);
382
+ }
383
+
384
+ &:focus {
385
+ outline: none;
386
+ border-color: #2563eb;
387
+ box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
388
+ }
389
+ }
390
+
391
+ .composerRow {
392
+ display: flex;
393
+ gap: 8px;
394
+ }
395
+
396
+ .composerInput {
397
+ flex: 1;
398
+ padding: 10px 14px;
399
+ border-radius: 8px;
400
+ border: 1px solid var(--theme-elevation-200);
401
+ font-size: 14px;
402
+ font-family: $font-stack;
403
+ background: none;
404
+ color: var(--theme-text);
405
+ transition: border-color 150ms, box-shadow 150ms;
406
+
407
+ &::placeholder {
408
+ color: var(--theme-elevation-400);
409
+ }
410
+
411
+ &:focus {
412
+ outline: none;
413
+ border-color: #2563eb;
414
+ box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
415
+ }
416
+ }
417
+
418
+ .sendBtn {
419
+ padding: 10px 20px;
420
+ border-radius: 8px;
421
+ border: none;
422
+ background: #2563eb;
423
+ color: #fff;
424
+ font-weight: 700;
425
+ font-size: 13px;
426
+ cursor: pointer;
427
+ transition: background 100ms, opacity 100ms;
428
+ white-space: nowrap;
429
+
430
+ &:hover {
431
+ background: #1d4ed8;
432
+ }
433
+
434
+ &:disabled {
435
+ opacity: 0.4;
436
+ cursor: not-allowed;
437
+ }
438
+ }
@@ -0,0 +1,160 @@
1
+ // Command Palette — ⌘K global search
2
+
3
+ .overlay {
4
+ position: fixed;
5
+ inset: 0;
6
+ z-index: 9999;
7
+ background: rgba(0, 0, 0, 0.4);
8
+ backdrop-filter: blur(2px);
9
+ display: flex;
10
+ align-items: flex-start;
11
+ justify-content: center;
12
+ padding-top: 15vh;
13
+ }
14
+
15
+ .palette {
16
+ width: 580px;
17
+ max-height: 70vh;
18
+ background: var(--theme-elevation-0, #fff);
19
+ border-radius: 14px;
20
+ border: 1px solid var(--theme-elevation-200);
21
+ box-shadow: 0 16px 48px rgba(0, 0, 0, 0.16);
22
+ overflow: hidden;
23
+ display: flex;
24
+ flex-direction: column;
25
+ }
26
+
27
+ .inputWrap {
28
+ display: flex;
29
+ align-items: center;
30
+ padding: 14px 18px;
31
+ border-bottom: 1px solid var(--theme-elevation-150, #f1f5f9);
32
+ gap: 10px;
33
+ }
34
+
35
+ .searchIcon {
36
+ font-size: 18px;
37
+ color: var(--theme-elevation-400);
38
+ flex-shrink: 0;
39
+ }
40
+
41
+ .input {
42
+ flex: 1;
43
+ border: none;
44
+ background: none;
45
+ font-size: 16px;
46
+ color: var(--theme-text);
47
+ outline: none;
48
+ font-family: inherit;
49
+ &::placeholder { color: var(--theme-elevation-400); }
50
+ }
51
+
52
+ .hint {
53
+ font-size: 11px;
54
+ font-weight: 600;
55
+ color: var(--theme-elevation-400);
56
+ padding: 2px 6px;
57
+ border-radius: 4px;
58
+ border: 1px solid var(--theme-elevation-200);
59
+ background: var(--theme-elevation-50);
60
+ }
61
+
62
+ .results {
63
+ flex: 1;
64
+ overflow-y: auto;
65
+ padding: 8px;
66
+ }
67
+
68
+ .section {
69
+ margin-bottom: 8px;
70
+ }
71
+
72
+ .sectionTitle {
73
+ font-size: 10px;
74
+ font-weight: 700;
75
+ text-transform: uppercase;
76
+ letter-spacing: 0.06em;
77
+ color: var(--theme-elevation-400);
78
+ padding: 6px 10px 4px;
79
+ }
80
+
81
+ .item {
82
+ display: flex;
83
+ align-items: center;
84
+ gap: 10px;
85
+ padding: 10px 12px;
86
+ border-radius: 8px;
87
+ cursor: pointer;
88
+ text-decoration: none;
89
+ color: inherit;
90
+ transition: background 60ms;
91
+
92
+ &:hover, &.itemActive {
93
+ background: var(--theme-elevation-100);
94
+ }
95
+ }
96
+
97
+ .itemIcon {
98
+ width: 28px;
99
+ height: 28px;
100
+ border-radius: 6px;
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+ font-size: 13px;
105
+ flex-shrink: 0;
106
+ }
107
+
108
+ .itemContent {
109
+ flex: 1;
110
+ min-width: 0;
111
+ }
112
+
113
+ .itemTitle {
114
+ font-size: 13px;
115
+ font-weight: 600;
116
+ color: var(--theme-text);
117
+ overflow: hidden;
118
+ text-overflow: ellipsis;
119
+ white-space: nowrap;
120
+ }
121
+
122
+ .itemSub {
123
+ font-size: 11px;
124
+ color: var(--theme-elevation-500);
125
+ margin-top: 1px;
126
+ }
127
+
128
+ .itemBadge {
129
+ font-size: 10px;
130
+ font-weight: 700;
131
+ padding: 2px 8px;
132
+ border-radius: 4px;
133
+ white-space: nowrap;
134
+ }
135
+
136
+ .empty {
137
+ padding: 32px 16px;
138
+ text-align: center;
139
+ color: var(--theme-elevation-400);
140
+ font-size: 13px;
141
+ }
142
+
143
+ .footer {
144
+ padding: 8px 14px;
145
+ border-top: 1px solid var(--theme-elevation-150, #f1f5f9);
146
+ display: flex;
147
+ gap: 16px;
148
+ font-size: 11px;
149
+ color: var(--theme-elevation-400);
150
+
151
+ kbd {
152
+ font-family: inherit;
153
+ padding: 1px 5px;
154
+ border-radius: 3px;
155
+ border: 1px solid var(--theme-elevation-200);
156
+ background: var(--theme-elevation-50);
157
+ font-size: 10px;
158
+ font-weight: 700;
159
+ }
160
+ }