@consilioweb/payload-support 0.6.0 → 0.6.2

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 (85) hide show
  1. package/dist/{styles/theme.css → components/TicketConversation.css} +13 -326
  2. package/dist/components/TicketConversation.js +3004 -0
  3. package/dist/index.cjs +11 -11
  4. package/dist/index.js +11 -11
  5. package/dist/views/BillingView/client.cjs +209 -0
  6. package/dist/views/BillingView/index.cjs +34 -0
  7. package/dist/views/ChatView/client.cjs +253 -0
  8. package/dist/views/ChatView/index.cjs +34 -0
  9. package/dist/views/CrmView/client.cjs +233 -0
  10. package/dist/views/CrmView/index.cjs +34 -0
  11. package/dist/views/EmailTrackingView/client.cjs +159 -0
  12. package/dist/views/EmailTrackingView/index.cjs +34 -0
  13. package/dist/views/ImportConversationView/client.cjs +205 -0
  14. package/dist/views/ImportConversationView/index.cjs +34 -0
  15. package/dist/views/LogsView/client.cjs +149 -0
  16. package/dist/views/LogsView/index.cjs +32 -0
  17. package/dist/views/NewTicketView/client.cjs +229 -0
  18. package/dist/views/NewTicketView/index.cjs +32 -0
  19. package/dist/views/PendingEmailsView/client.cjs +173 -0
  20. package/dist/views/PendingEmailsView/index.cjs +34 -0
  21. package/dist/views/SupportDashboardView/client.cjs +301 -0
  22. package/dist/views/SupportDashboardView/index.cjs +34 -0
  23. package/dist/views/TicketDetailView/client.cjs +850 -0
  24. package/dist/views/TicketDetailView/index.cjs +34 -0
  25. package/dist/views/TicketInboxView/client.cjs +299 -0
  26. package/dist/views/TicketInboxView/index.cjs +32 -0
  27. package/dist/views/TicketingSettingsView/client.cjs +733 -0
  28. package/dist/views/TicketingSettingsView/index.cjs +34 -0
  29. package/dist/views/TimeDashboardView/client.cjs +169 -0
  30. package/dist/views/TimeDashboardView/index.cjs +34 -0
  31. package/dist/views/shared/AdminViewHeader.cjs +68 -0
  32. package/dist/views/shared/ErrorBoundary.cjs +55 -0
  33. package/dist/views/shared/Skeleton.cjs +77 -0
  34. package/dist/views/shared/adminTokens.cjs +34 -0
  35. package/dist/views/shared/adminTokens.js +0 -1
  36. package/dist/{components/TicketConversation/config.js → views/shared/config.cjs} +5 -2
  37. package/dist/views/shared/config.js +0 -1
  38. package/dist/views/shared/index.cjs +58 -0
  39. package/dist/views/shared/index.js +0 -1
  40. package/dist/views.cjs +86 -0
  41. package/dist/views.d.cts +13 -0
  42. package/dist/views.d.ts +13 -0
  43. package/dist/views.js +13 -0
  44. package/package.json +14 -7
  45. package/src/plugin.ts +11 -11
  46. package/src/views.ts +17 -0
  47. package/dist/components/TicketConversation/components/AISummaryPanel.js +0 -76
  48. package/dist/components/TicketConversation/components/ActionPanels.js +0 -118
  49. package/dist/components/TicketConversation/components/ActivityLog.js +0 -23
  50. package/dist/components/TicketConversation/components/ClientBar.js +0 -42
  51. package/dist/components/TicketConversation/components/ClientHistory.js +0 -137
  52. package/dist/components/TicketConversation/components/CodeBlock.js +0 -152
  53. package/dist/components/TicketConversation/components/CodeBlockInserter.js +0 -155
  54. package/dist/components/TicketConversation/components/QuickActions.js +0 -65
  55. package/dist/components/TicketConversation/components/TicketHeader.js +0 -92
  56. package/dist/components/TicketConversation/components/TimeTrackingPanel.js +0 -133
  57. package/dist/components/TicketConversation/constants.js +0 -96
  58. package/dist/components/TicketConversation/context.js +0 -11
  59. package/dist/components/TicketConversation/hooks/useAI.js +0 -176
  60. package/dist/components/TicketConversation/hooks/useMessageActions.js +0 -135
  61. package/dist/components/TicketConversation/hooks/useReply.js +0 -187
  62. package/dist/components/TicketConversation/hooks/useTicketActions.js +0 -230
  63. package/dist/components/TicketConversation/hooks/useTimeTracking.js +0 -122
  64. package/dist/components/TicketConversation/hooks/useTranslation.js +0 -70
  65. package/dist/components/TicketConversation/index.js +0 -1123
  66. package/dist/components/TicketConversation/locales/en.json +0 -878
  67. package/dist/components/TicketConversation/locales/fr.json +0 -878
  68. package/dist/components/TicketConversation/types.js +0 -2
  69. package/dist/components/TicketConversation/utils.js +0 -25
  70. package/dist/styles/BillingView.module.scss +0 -311
  71. package/dist/styles/ChatView.module.scss +0 -438
  72. package/dist/styles/CommandPalette.module.scss +0 -160
  73. package/dist/styles/CrmView.module.scss +0 -554
  74. package/dist/styles/EmailTracking.module.scss +0 -238
  75. package/dist/styles/ImportConversation.module.scss +0 -267
  76. package/dist/styles/Layout.module.scss +0 -55
  77. package/dist/styles/Logs.module.scss +0 -164
  78. package/dist/styles/NewTicket.module.scss +0 -143
  79. package/dist/styles/PendingEmails.module.scss +0 -629
  80. package/dist/styles/SupportDashboard.module.scss +0 -649
  81. package/dist/styles/TicketDetail.module.scss +0 -1050
  82. package/dist/styles/TicketInbox.module.scss +0 -296
  83. package/dist/styles/TicketingSettings.module.scss +0 -358
  84. package/dist/styles/TimeDashboard.module.scss +0 -287
  85. package/dist/styles/_tokens.scss +0 -78
@@ -1,438 +0,0 @@
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
- }
@@ -1,160 +0,0 @@
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
- }