@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,629 +0,0 @@
1
- // Pending Emails — Clean admin view, 2026
2
- // Uses Payload CSS variables for dark mode support
3
-
4
- $font-stack: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
5
- $blue: #2563eb;
6
- $green: #16a34a;
7
- $amber: #d97706;
8
- $orange: #ea580c;
9
- $red: #dc2626;
10
- $radius-sm: 6px;
11
- $radius-md: 8px;
12
- $radius-lg: 12px;
13
- $radius-pill: 20px;
14
-
15
- // ── Page layout ──────────────────────────────────────────────
16
- .page {
17
- max-width: 1920px;
18
- margin: 0 auto;
19
- padding: 20px 24px;
20
- font-family: $font-stack;
21
- }
22
-
23
- .loadingWrap {
24
- padding: 40px 24px;
25
- }
26
-
27
- // ── Header ───────────────────────────────────────────────────
28
- .header {
29
- display: flex;
30
- justify-content: space-between;
31
- align-items: flex-start;
32
- margin-bottom: 20px;
33
- gap: 16px;
34
- }
35
-
36
- .headerLeft {
37
- display: flex;
38
- flex-direction: column;
39
- gap: 4px;
40
- }
41
-
42
- .title {
43
- font-size: 24px;
44
- font-weight: 800;
45
- color: var(--theme-text);
46
- margin: 0;
47
- display: flex;
48
- align-items: center;
49
- gap: 10px;
50
- }
51
-
52
- .titleIcon {
53
- color: $blue;
54
- display: flex;
55
- align-items: center;
56
- }
57
-
58
- .subtitle {
59
- color: var(--theme-elevation-500);
60
- margin: 0;
61
- font-size: 14px;
62
- }
63
-
64
- .pendingBadge {
65
- font-size: 13px;
66
- font-weight: 700;
67
- padding: 6px 14px;
68
- border-radius: $radius-pill;
69
- background-color: $orange;
70
- color: #fff;
71
- white-space: nowrap;
72
- }
73
-
74
- // ── Tabs ─────────────────────────────────────────────────────
75
- .tabs {
76
- display: flex;
77
- gap: 0;
78
- margin-bottom: 20px;
79
- border-bottom: 1px solid var(--theme-elevation-150, #f1f5f9);
80
- }
81
-
82
- .tab {
83
- padding: 10px 20px;
84
- border: none;
85
- cursor: pointer;
86
- font-size: 13px;
87
- font-weight: 600;
88
- border-bottom: 2px solid transparent;
89
- color: var(--theme-elevation-500);
90
- background: transparent;
91
- transition: color 100ms, border-color 100ms;
92
-
93
- &:hover {
94
- color: var(--theme-text);
95
- }
96
- }
97
-
98
- .tabActive {
99
- color: $blue;
100
- border-bottom-color: $blue;
101
- }
102
-
103
- // ── Empty state ──────────────────────────────────────────────
104
- .empty {
105
- text-align: center;
106
- padding: 60px 20px;
107
- color: var(--theme-elevation-400);
108
- font-size: 14px;
109
- font-weight: 500;
110
- }
111
-
112
- // ── Email card ───────────────────────────────────────────────
113
- .card {
114
- border: 1px solid var(--theme-elevation-200);
115
- border-radius: $radius-md;
116
- background: var(--theme-elevation-0, #fff);
117
- padding: 16px;
118
- margin-bottom: 10px;
119
- transition: border-color 150ms, box-shadow 150ms;
120
-
121
- &:hover {
122
- border-color: var(--theme-elevation-300);
123
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
124
- }
125
- }
126
-
127
- .cardProcessing {
128
- opacity: 0.6;
129
- pointer-events: none;
130
- }
131
-
132
- .cardHeader {
133
- display: flex;
134
- justify-content: space-between;
135
- align-items: flex-start;
136
- gap: 12px;
137
- }
138
-
139
- .cardInfo {
140
- flex: 1;
141
- min-width: 0;
142
- }
143
-
144
- .senderRow {
145
- display: flex;
146
- align-items: center;
147
- gap: 8px;
148
- margin-bottom: 4px;
149
- }
150
-
151
- .senderName {
152
- font-weight: 600;
153
- font-size: 14px;
154
- color: var(--theme-text);
155
- }
156
-
157
- .senderEmail {
158
- font-size: 12px;
159
- color: var(--theme-elevation-500);
160
- }
161
-
162
- .cardSubject {
163
- font-size: 15px;
164
- font-weight: 600;
165
- color: var(--theme-text);
166
- margin-bottom: 4px;
167
- }
168
-
169
- .cardMeta {
170
- display: flex;
171
- align-items: center;
172
- gap: 10px;
173
- font-size: 12px;
174
- color: var(--theme-elevation-500);
175
- }
176
-
177
- .attachment {
178
- display: flex;
179
- align-items: center;
180
- gap: 3px;
181
- }
182
-
183
- // ── Status badge (processed/ignored) ─────────────────────────
184
- .statusBadge {
185
- font-size: 11px;
186
- font-weight: 700;
187
- padding: 4px 10px;
188
- border-radius: $radius-pill;
189
- color: #fff;
190
- white-space: nowrap;
191
- flex-shrink: 0;
192
- }
193
-
194
- .statusProcessed {
195
- background-color: $green;
196
- }
197
-
198
- .statusIgnored {
199
- background-color: var(--theme-elevation-400);
200
- }
201
-
202
- // ── Suggestion badges ────────────────────────────────────────
203
- .suggestions {
204
- display: flex;
205
- flex-wrap: wrap;
206
- gap: 6px;
207
- margin-top: 8px;
208
- }
209
-
210
- .suggestionChip {
211
- font-size: 11px;
212
- font-weight: 600;
213
- padding: 3px 8px;
214
- border-radius: $radius-pill;
215
- }
216
-
217
- .suggestionHigh {
218
- background-color: #dcfce7;
219
- color: $green;
220
- }
221
-
222
- .suggestionMedium {
223
- background-color: #fef3c7;
224
- color: $amber;
225
- }
226
-
227
- .suggestionLow {
228
- background-color: var(--theme-elevation-100);
229
- color: var(--theme-elevation-500);
230
- }
231
-
232
- // ── Body preview ─────────────────────────────────────────────
233
- .bodySection {
234
- margin-top: 10px;
235
- }
236
-
237
- .bodyText {
238
- font-size: 13px;
239
- color: var(--theme-elevation-500);
240
- line-height: 1.5;
241
- }
242
-
243
- .bodyExpanded {
244
- white-space: pre-wrap;
245
- }
246
-
247
- .expandBtn {
248
- background: none;
249
- border: none;
250
- cursor: pointer;
251
- color: $blue;
252
- font-size: 12px;
253
- font-weight: 600;
254
- margin-top: 4px;
255
- display: flex;
256
- align-items: center;
257
- gap: 4px;
258
- padding: 0;
259
- transition: opacity 100ms;
260
-
261
- &:hover {
262
- opacity: 0.8;
263
- }
264
- }
265
-
266
- // ── Action buttons ───────────────────────────────────────────
267
- .actions {
268
- display: flex;
269
- gap: 8px;
270
- margin-top: 12px;
271
- }
272
-
273
- .actionBtn {
274
- display: inline-flex;
275
- align-items: center;
276
- gap: 4px;
277
- padding: 6px 12px;
278
- border-radius: $radius-sm;
279
- border: 1px solid var(--theme-elevation-200);
280
- color: #fff;
281
- font-weight: 600;
282
- font-size: 12px;
283
- cursor: pointer;
284
- white-space: nowrap;
285
- transition: opacity 100ms, transform 80ms;
286
-
287
- &:hover {
288
- opacity: 0.9;
289
- transform: translateY(-1px);
290
- }
291
-
292
- &:active {
293
- transform: translateY(0);
294
- }
295
-
296
- &:disabled {
297
- cursor: not-allowed;
298
- opacity: 0.5;
299
- transform: none;
300
- }
301
- }
302
-
303
- .btnCreate {
304
- background-color: $green;
305
- }
306
-
307
- .btnLink {
308
- background-color: $blue;
309
- }
310
-
311
- .btnIgnore {
312
- background-color: var(--theme-elevation-400);
313
- }
314
-
315
- // ── Modal overlay ────────────────────────────────────────────
316
- .overlay {
317
- position: fixed;
318
- inset: 0;
319
- z-index: 1000;
320
- display: flex;
321
- align-items: center;
322
- justify-content: center;
323
- background-color: rgba(0, 0, 0, 0.5);
324
- backdrop-filter: blur(2px);
325
- }
326
-
327
- .modal {
328
- background: var(--theme-elevation-0, #fff);
329
- border: 1px solid var(--theme-elevation-200);
330
- border-radius: $radius-lg;
331
- padding: 24px;
332
- width: 560px;
333
- max-height: 80vh;
334
- overflow: auto;
335
- box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
336
- }
337
-
338
- .modalHeader {
339
- display: flex;
340
- justify-content: space-between;
341
- align-items: center;
342
- margin-bottom: 16px;
343
- }
344
-
345
- .modalTitle {
346
- margin: 0;
347
- font-size: 16px;
348
- font-weight: 600;
349
- color: var(--theme-text);
350
- }
351
-
352
- .modalClose {
353
- background: none;
354
- border: none;
355
- cursor: pointer;
356
- color: var(--theme-elevation-500);
357
- padding: 4px;
358
- border-radius: 4px;
359
- display: flex;
360
- transition: color 100ms;
361
-
362
- &:hover {
363
- color: var(--theme-text);
364
- }
365
- }
366
-
367
- // ── Modal section labels ─────────────────────────────────────
368
- .sectionLabel {
369
- font-size: 12px;
370
- font-weight: 700;
371
- color: var(--theme-elevation-500);
372
- text-transform: uppercase;
373
- letter-spacing: 0.5px;
374
- margin-bottom: 8px;
375
- }
376
-
377
- .sectionBlock {
378
- margin-bottom: 16px;
379
- }
380
-
381
- // ── Suggestion / result row (modal) ──────────────────────────
382
- .resultRow {
383
- display: flex;
384
- align-items: center;
385
- gap: 8px;
386
- width: 100%;
387
- padding: 10px 12px;
388
- border-radius: $radius-sm;
389
- border: 1px solid var(--theme-elevation-200);
390
- background: var(--theme-elevation-50);
391
- cursor: pointer;
392
- margin-bottom: 6px;
393
- text-align: left;
394
- color: var(--theme-text);
395
- transition: border-color 100ms, background 100ms;
396
-
397
- &:hover {
398
- border-color: var(--theme-elevation-300);
399
- background: var(--theme-elevation-100);
400
- }
401
- }
402
-
403
- .resultTicketNum {
404
- font-weight: 700;
405
- color: $blue;
406
- white-space: nowrap;
407
- font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
408
- font-size: 12px;
409
- }
410
-
411
- .resultSubject {
412
- flex: 1;
413
- font-size: 13px;
414
- overflow: hidden;
415
- text-overflow: ellipsis;
416
- white-space: nowrap;
417
- }
418
-
419
- .scoreBadge {
420
- font-size: 11px;
421
- font-weight: 600;
422
- padding: 2px 8px;
423
- border-radius: $radius-pill;
424
- color: #fff;
425
- }
426
-
427
- .scoreHigh {
428
- background-color: $green;
429
- }
430
-
431
- .scoreMedium {
432
- background-color: $amber;
433
- }
434
-
435
- .scoreLow {
436
- background-color: var(--theme-elevation-500);
437
- }
438
-
439
- // ── Detected client row ──────────────────────────────────────
440
- .detectedRow {
441
- @extend .resultRow;
442
- border: 2px solid $green;
443
-
444
- &:hover {
445
- border-color: $green;
446
- }
447
- }
448
-
449
- .detectedLabel {
450
- flex: 1;
451
- }
452
-
453
- .detectedName {
454
- font-weight: 600;
455
- }
456
-
457
- .detectedEmail {
458
- font-size: 12px;
459
- color: var(--theme-elevation-500);
460
- margin-left: 8px;
461
- }
462
-
463
- .useBtn {
464
- font-size: 11px;
465
- font-weight: 600;
466
- padding: 2px 8px;
467
- border-radius: $radius-pill;
468
- background-color: $green;
469
- color: #fff;
470
- }
471
-
472
- // ── Client result row ────────────────────────────────────────
473
- .clientResultLabel {
474
- flex: 1;
475
- }
476
-
477
- .clientResultName {
478
- font-weight: 600;
479
- font-size: 13px;
480
- }
481
-
482
- .clientResultEmail {
483
- font-size: 12px;
484
- color: var(--theme-elevation-500);
485
- margin-left: 8px;
486
- }
487
-
488
- // ── Search input (modals) ────────────────────────────────────
489
- .searchWrap {
490
- position: relative;
491
- margin-bottom: 12px;
492
- }
493
-
494
- .searchIcon {
495
- position: absolute;
496
- left: 10px;
497
- top: 10px;
498
- color: var(--theme-elevation-400);
499
- pointer-events: none;
500
- }
501
-
502
- .searchInput {
503
- width: 100%;
504
- padding: 8px 12px 8px 34px;
505
- border-radius: $radius-sm;
506
- border: 1px solid var(--theme-elevation-200);
507
- background: var(--theme-elevation-50);
508
- color: var(--theme-text);
509
- font-size: 13px;
510
- box-sizing: border-box;
511
- transition: border-color 150ms, box-shadow 150ms;
512
-
513
- &:focus {
514
- outline: none;
515
- border-color: $blue;
516
- box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
517
- }
518
-
519
- &::placeholder {
520
- color: var(--theme-elevation-400);
521
- }
522
- }
523
-
524
- .searchingHint {
525
- font-size: 13px;
526
- color: var(--theme-elevation-500);
527
- padding: 8px;
528
- }
529
-
530
- .noResults {
531
- font-size: 13px;
532
- color: var(--theme-elevation-500);
533
- padding: 8px;
534
- }
535
-
536
- // ── Separator + create toggle ────────────────────────────────
537
- .separator {
538
- border-top: 1px solid var(--theme-elevation-200);
539
- margin: 16px 0;
540
- padding-top: 16px;
541
- }
542
-
543
- .createToggle {
544
- display: flex;
545
- align-items: center;
546
- gap: 6px;
547
- background: none;
548
- border: none;
549
- cursor: pointer;
550
- color: $blue;
551
- font-size: 13px;
552
- font-weight: 600;
553
- padding: 0;
554
- transition: opacity 100ms;
555
-
556
- &:hover {
557
- opacity: 0.8;
558
- }
559
- }
560
-
561
- // ── Create client form ───────────────────────────────────────
562
- .createForm {
563
- display: flex;
564
- flex-direction: column;
565
- gap: 10px;
566
- }
567
-
568
- .createFormRow {
569
- display: flex;
570
- gap: 8px;
571
- }
572
-
573
- .formInput {
574
- width: 100%;
575
- padding: 8px 12px;
576
- border-radius: $radius-sm;
577
- border: 1px solid var(--theme-elevation-200);
578
- background: var(--theme-elevation-50);
579
- color: var(--theme-text);
580
- font-size: 13px;
581
- box-sizing: border-box;
582
- transition: border-color 150ms, box-shadow 150ms;
583
-
584
- &:focus {
585
- outline: none;
586
- border-color: $blue;
587
- box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
588
- }
589
-
590
- &::placeholder {
591
- color: var(--theme-elevation-400);
592
- }
593
- }
594
-
595
- .formInputHalf {
596
- @extend .formInput;
597
- width: 50%;
598
- }
599
-
600
- .formError {
601
- font-size: 12px;
602
- color: $red;
603
- padding: 6px 10px;
604
- border-radius: $radius-sm;
605
- background-color: #fef2f2;
606
- border: 1px solid $red;
607
- }
608
-
609
- .submitBtn {
610
- padding: 8px 14px;
611
- border-radius: $radius-sm;
612
- border: 1px solid var(--theme-elevation-200);
613
- background-color: $green;
614
- color: #fff;
615
- font-weight: 600;
616
- font-size: 13px;
617
- cursor: pointer;
618
- white-space: nowrap;
619
- transition: opacity 100ms;
620
-
621
- &:hover {
622
- opacity: 0.9;
623
- }
624
-
625
- &:disabled {
626
- cursor: not-allowed;
627
- opacity: 0.5;
628
- }
629
- }