@consilioweb/payload-support 0.5.1 → 0.6.0

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 (86) hide show
  1. package/dist/components/TicketConversation/components/AISummaryPanel.js +76 -0
  2. package/dist/components/TicketConversation/components/ActionPanels.js +118 -0
  3. package/dist/components/TicketConversation/components/ActivityLog.js +23 -0
  4. package/dist/components/TicketConversation/components/ClientBar.js +42 -0
  5. package/dist/components/TicketConversation/components/ClientHistory.js +137 -0
  6. package/dist/components/TicketConversation/components/CodeBlock.js +152 -0
  7. package/dist/components/TicketConversation/components/CodeBlockInserter.js +155 -0
  8. package/dist/components/TicketConversation/components/QuickActions.js +65 -0
  9. package/dist/components/TicketConversation/components/TicketHeader.js +92 -0
  10. package/dist/components/TicketConversation/components/TimeTrackingPanel.js +133 -0
  11. package/dist/components/TicketConversation/config.js +41 -0
  12. package/dist/components/TicketConversation/constants.js +96 -0
  13. package/dist/components/TicketConversation/context.js +11 -0
  14. package/dist/components/TicketConversation/hooks/useAI.js +176 -0
  15. package/dist/components/TicketConversation/hooks/useMessageActions.js +135 -0
  16. package/dist/components/TicketConversation/hooks/useReply.js +187 -0
  17. package/dist/components/TicketConversation/hooks/useTicketActions.js +230 -0
  18. package/dist/components/TicketConversation/hooks/useTimeTracking.js +122 -0
  19. package/dist/components/TicketConversation/hooks/useTranslation.js +70 -0
  20. package/dist/components/TicketConversation/index.js +1123 -0
  21. package/dist/components/TicketConversation/locales/en.json +878 -0
  22. package/dist/components/TicketConversation/locales/fr.json +878 -0
  23. package/dist/components/TicketConversation/types.js +2 -0
  24. package/dist/components/TicketConversation/utils.js +25 -0
  25. package/dist/index.cjs +2 -2
  26. package/dist/index.js +2 -2
  27. package/dist/styles/BillingView.module.scss +311 -0
  28. package/dist/styles/ChatView.module.scss +438 -0
  29. package/dist/styles/CommandPalette.module.scss +160 -0
  30. package/dist/styles/CrmView.module.scss +554 -0
  31. package/dist/styles/EmailTracking.module.scss +238 -0
  32. package/dist/styles/ImportConversation.module.scss +267 -0
  33. package/dist/styles/Layout.module.scss +55 -0
  34. package/dist/styles/Logs.module.scss +164 -0
  35. package/dist/styles/NewTicket.module.scss +143 -0
  36. package/dist/styles/PendingEmails.module.scss +629 -0
  37. package/dist/styles/SupportDashboard.module.scss +649 -0
  38. package/dist/styles/TicketDetail.module.scss +1050 -0
  39. package/dist/styles/TicketInbox.module.scss +296 -0
  40. package/dist/styles/TicketingSettings.module.scss +358 -0
  41. package/dist/styles/TimeDashboard.module.scss +287 -0
  42. package/dist/styles/_tokens.scss +78 -0
  43. package/dist/styles/theme.css +633 -0
  44. package/dist/views/BillingView/client.js +204 -0
  45. package/dist/views/BillingView/index.js +29 -0
  46. package/dist/views/ChatView/client.js +252 -0
  47. package/dist/views/ChatView/index.js +29 -0
  48. package/dist/views/CrmView/client.js +232 -0
  49. package/dist/views/CrmView/index.js +29 -0
  50. package/dist/views/EmailTrackingView/client.js +154 -0
  51. package/dist/views/EmailTrackingView/index.js +29 -0
  52. package/dist/views/ImportConversationView/client.js +204 -0
  53. package/dist/views/ImportConversationView/index.js +29 -0
  54. package/dist/views/LogsView/client.js +148 -0
  55. package/dist/views/LogsView/index.js +27 -0
  56. package/dist/views/NewTicketView/client.js +224 -0
  57. package/dist/views/NewTicketView/index.js +27 -0
  58. package/dist/views/PendingEmailsView/client.js +172 -0
  59. package/dist/views/PendingEmailsView/index.js +29 -0
  60. package/dist/views/SupportDashboardView/client.js +296 -0
  61. package/dist/views/SupportDashboardView/index.js +29 -0
  62. package/dist/views/TicketDetailView/client.js +844 -0
  63. package/dist/views/TicketDetailView/index.js +29 -0
  64. package/dist/views/TicketInboxView/client.js +294 -0
  65. package/dist/views/TicketInboxView/index.js +27 -0
  66. package/dist/views/TicketingSettingsView/TicketingSettings.module.scss +350 -0
  67. package/dist/views/TicketingSettingsView/client.js +728 -0
  68. package/dist/views/TicketingSettingsView/index.js +29 -0
  69. package/dist/views/TimeDashboardView/client.js +164 -0
  70. package/dist/views/TimeDashboardView/index.js +29 -0
  71. package/dist/views/shared/AdminViewHeader.js +67 -0
  72. package/dist/views/shared/ErrorBoundary.js +50 -0
  73. package/dist/views/shared/Skeleton.js +72 -0
  74. package/dist/views/shared/adminTokens.js +32 -0
  75. package/dist/views/shared/config.js +41 -0
  76. package/dist/views/shared/index.js +6 -0
  77. package/package.json +9 -12
  78. package/src/collections/Tickets.ts +1 -1
  79. package/src/components/TicketConversation/index.tsx +21 -2
  80. package/src/plugin.ts +3 -2
  81. package/src/styles/TicketDetail.module.scss +8 -1
  82. package/src/views/TicketingSettingsView/TicketingSettings.module.scss +350 -0
  83. package/src/views/TicketingSettingsView/client.tsx +1 -1
  84. package/dist/views.d.cts +0 -30
  85. package/dist/views.d.ts +0 -30
  86. package/src/views.ts +0 -16
@@ -0,0 +1,350 @@
1
+ .page {
2
+ max-width: 900px;
3
+ margin: 0 auto;
4
+ padding: 0 1.5rem 3rem;
5
+ }
6
+
7
+ .intro {
8
+ font-size: 0.875rem;
9
+ color: var(--theme-elevation-600);
10
+ margin-bottom: 1.5rem;
11
+ line-height: 1.5;
12
+ }
13
+
14
+ // ── Sections ──────────────────────────────────
15
+
16
+ .sectionWrapper {
17
+ border: 1px solid var(--theme-elevation-150);
18
+ border-radius: 10px;
19
+ margin-bottom: 1rem;
20
+ overflow: hidden;
21
+ background: var(--theme-elevation-0);
22
+ }
23
+
24
+ .sectionHeader {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 0.75rem;
28
+ padding: 0.875rem 1.25rem;
29
+ cursor: pointer;
30
+ user-select: none;
31
+ transition: background 150ms;
32
+
33
+ &:hover {
34
+ background: var(--theme-elevation-50);
35
+ }
36
+ }
37
+
38
+ .sectionIcon {
39
+ width: 32px;
40
+ height: 32px;
41
+ border-radius: 8px;
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ color: #fff;
46
+ flex-shrink: 0;
47
+ }
48
+
49
+ .sectionTitle {
50
+ font-weight: 600;
51
+ font-size: 0.9375rem;
52
+ color: var(--theme-text);
53
+ flex: 1;
54
+ }
55
+
56
+ .sectionChevron {
57
+ font-size: 0.625rem;
58
+ color: var(--theme-elevation-400);
59
+ transition: transform 200ms;
60
+
61
+ &.open {
62
+ transform: rotate(180deg);
63
+ }
64
+ }
65
+
66
+ .sectionBody {
67
+ padding: 1rem 1.25rem 1.25rem;
68
+ border-top: 1px solid var(--theme-elevation-100);
69
+ }
70
+
71
+ .sectionDescription {
72
+ font-size: 0.8125rem;
73
+ color: var(--theme-elevation-500);
74
+ margin: 0 0 1rem;
75
+ line-height: 1.5;
76
+ }
77
+
78
+ // ── Badges ────────────────────────────────────
79
+
80
+ .badge {
81
+ font-size: 0.6875rem;
82
+ font-weight: 600;
83
+ padding: 0.125rem 0.5rem;
84
+ border-radius: 9999px;
85
+ white-space: nowrap;
86
+ }
87
+
88
+ // ── Feature cards ─────────────────────────────
89
+
90
+ .categoryGroup {
91
+ margin-bottom: 1.25rem;
92
+ }
93
+
94
+ .categoryHeading {
95
+ font-size: 0.75rem;
96
+ font-weight: 700;
97
+ text-transform: uppercase;
98
+ letter-spacing: 0.05em;
99
+ margin: 0 0 0.5rem;
100
+ display: flex;
101
+ align-items: center;
102
+ gap: 0.5rem;
103
+ }
104
+
105
+ .categoryDot {
106
+ width: 8px;
107
+ height: 8px;
108
+ border-radius: 50%;
109
+ display: inline-block;
110
+ }
111
+
112
+ .featureList {
113
+ display: flex;
114
+ flex-direction: column;
115
+ gap: 0.375rem;
116
+ }
117
+
118
+ .featureCard {
119
+ display: flex;
120
+ align-items: center;
121
+ gap: 0.75rem;
122
+ padding: 0.75rem 1rem;
123
+ border-radius: 8px;
124
+ border: 1px solid var(--theme-elevation-150);
125
+ cursor: pointer;
126
+ transition: all 150ms;
127
+
128
+ &:hover {
129
+ background: var(--theme-elevation-50);
130
+ }
131
+
132
+ &.enabled {
133
+ border-color: var(--theme-elevation-200);
134
+ background: var(--theme-elevation-50);
135
+ }
136
+ }
137
+
138
+ .featureLabel {
139
+ font-weight: 600;
140
+ font-size: 0.8125rem;
141
+ color: var(--theme-text);
142
+ }
143
+
144
+ .featureDesc {
145
+ font-size: 0.75rem;
146
+ color: var(--theme-elevation-500);
147
+ margin-top: 0.125rem;
148
+ }
149
+
150
+ // ── Fields ────────────────────────────────────
151
+
152
+ .fieldRow {
153
+ display: flex;
154
+ align-items: flex-start;
155
+ gap: 1rem;
156
+ padding: 0.625rem 0;
157
+ }
158
+
159
+ .fieldLabel {
160
+ flex: 0 0 200px;
161
+ font-size: 0.8125rem;
162
+ font-weight: 600;
163
+ color: var(--theme-text);
164
+ padding-top: 0.5rem;
165
+ }
166
+
167
+ .fieldDescription {
168
+ font-size: 0.75rem;
169
+ color: var(--theme-elevation-500);
170
+ font-weight: 400;
171
+ margin-top: 0.125rem;
172
+ }
173
+
174
+ .fieldContent {
175
+ flex: 1;
176
+ }
177
+
178
+ .input {
179
+ width: 100%;
180
+ padding: 0.5rem 0.75rem;
181
+ border: 1px solid var(--theme-elevation-200);
182
+ border-radius: 6px;
183
+ font-size: 0.8125rem;
184
+ background: var(--theme-input-bg, var(--theme-elevation-0));
185
+ color: var(--theme-text);
186
+ outline: none;
187
+ transition: border-color 150ms;
188
+
189
+ &:focus {
190
+ border-color: var(--theme-success-500);
191
+ }
192
+ }
193
+
194
+ .inputReadonly {
195
+ composes: input;
196
+ background: var(--theme-elevation-50);
197
+ color: var(--theme-elevation-500);
198
+ cursor: not-allowed;
199
+ }
200
+
201
+ .select {
202
+ composes: input;
203
+ appearance: auto;
204
+ }
205
+
206
+ .numberInput {
207
+ composes: input;
208
+ max-width: 120px;
209
+ }
210
+
211
+ .separator {
212
+ border-top: 1px solid var(--theme-elevation-100);
213
+ margin: 1rem 0;
214
+ }
215
+
216
+ // ── Toggle rows ───────────────────────────────
217
+
218
+ .toggleRow {
219
+ display: flex;
220
+ align-items: flex-start;
221
+ gap: 0.75rem;
222
+ padding: 0.5rem 0;
223
+ }
224
+
225
+ .inlineLabel {
226
+ font-size: 0.8125rem;
227
+ font-weight: 600;
228
+ color: var(--theme-text);
229
+ }
230
+
231
+ .inlineDesc {
232
+ font-size: 0.75rem;
233
+ color: var(--theme-elevation-500);
234
+ margin-top: 0.125rem;
235
+ }
236
+
237
+ // ── SLA ───────────────────────────────────────
238
+
239
+ .slaInline {
240
+ display: flex;
241
+ align-items: center;
242
+ gap: 0.5rem;
243
+ }
244
+
245
+ .slaHint {
246
+ font-size: 0.75rem;
247
+ color: var(--theme-elevation-500);
248
+ }
249
+
250
+ // ── API Key ───────────────────────────────────
251
+
252
+ .apiKeyRow {
253
+ display: flex;
254
+ gap: 0.5rem;
255
+ }
256
+
257
+ .apiKeyToggle {
258
+ padding: 0.5rem 0.75rem;
259
+ border: 1px solid var(--theme-elevation-200);
260
+ border-radius: 6px;
261
+ background: var(--theme-elevation-50);
262
+ color: var(--theme-text);
263
+ font-size: 0.75rem;
264
+ cursor: pointer;
265
+ white-space: nowrap;
266
+ }
267
+
268
+ // ── AI sub features ───────────────────────────
269
+
270
+ .aiSubFeaturesLabel {
271
+ font-size: 0.8125rem;
272
+ font-weight: 600;
273
+ color: var(--theme-text);
274
+ margin: 0 0 0.5rem;
275
+ }
276
+
277
+ .aiToggleRow {
278
+ display: flex;
279
+ align-items: center;
280
+ gap: 0.75rem;
281
+ padding: 0.375rem 0;
282
+ }
283
+
284
+ .aiToggleLabel {
285
+ font-size: 0.8125rem;
286
+ font-weight: 500;
287
+ color: var(--theme-text);
288
+ }
289
+
290
+ .aiToggleDesc {
291
+ display: block;
292
+ font-size: 0.6875rem;
293
+ color: var(--theme-elevation-500);
294
+ }
295
+
296
+ // ── Signature ─────────────────────────────────
297
+
298
+ .signatureTextarea {
299
+ width: 100%;
300
+ padding: 0.75rem;
301
+ border: 1px solid var(--theme-elevation-200);
302
+ border-radius: 6px;
303
+ font-size: 0.8125rem;
304
+ font-family: inherit;
305
+ background: var(--theme-input-bg, var(--theme-elevation-0));
306
+ color: var(--theme-text);
307
+ resize: vertical;
308
+ outline: none;
309
+
310
+ &:focus {
311
+ border-color: var(--theme-success-500);
312
+ }
313
+ }
314
+
315
+ // ── Purge ─────────────────────────────────────
316
+
317
+ .purgeGroup {
318
+ display: flex;
319
+ flex-direction: column;
320
+ gap: 0.75rem;
321
+ }
322
+
323
+ .purgeCategory {
324
+ display: flex;
325
+ align-items: center;
326
+ gap: 1rem;
327
+ }
328
+
329
+ .purgeCategoryLabel {
330
+ font-size: 0.8125rem;
331
+ font-weight: 600;
332
+ color: var(--theme-text);
333
+ min-width: 100px;
334
+ }
335
+
336
+ .purgeButtons {
337
+ display: flex;
338
+ gap: 0.375rem;
339
+ }
340
+
341
+ // ── Bottom bar ────────────────────────────────
342
+
343
+ .bottomBar {
344
+ display: flex;
345
+ justify-content: flex-end;
346
+ gap: 0.5rem;
347
+ padding: 1.5rem 0;
348
+ border-top: 1px solid var(--theme-elevation-100);
349
+ margin-top: 1rem;
350
+ }
@@ -4,7 +4,7 @@ import React, { useState, useEffect } from 'react'
4
4
  import { Settings, Mail, Bot, Clock, Timer, Globe, FileSignature } from 'lucide-react'
5
5
  import { V, btnStyle } from '../shared/adminTokens'
6
6
  import { AdminViewHeader } from '../shared/AdminViewHeader'
7
- import { getFeatures, saveFeatures, DEFAULT_FEATURES, type TicketingFeatures } from '../TicketConversation/config'
7
+ import { getFeatures, saveFeatures, DEFAULT_FEATURES, type TicketingFeatures } from '../../components/TicketConversation/config'
8
8
  import ts from './TicketingSettings.module.scss'
9
9
 
10
10
  /* ============================================
package/dist/views.d.cts DELETED
@@ -1,30 +0,0 @@
1
- import { AdminViewServerProps } from 'payload';
2
- import React from 'react';
3
-
4
- declare const TicketInboxView: React.FC<AdminViewServerProps>;
5
-
6
- declare const TicketDetailView: React.FC<AdminViewServerProps>;
7
-
8
- declare const SupportDashboardView: React.FC<AdminViewServerProps>;
9
-
10
- declare const NewTicketView: React.FC<AdminViewServerProps>;
11
-
12
- declare const TicketingSettingsView: React.FC<AdminViewServerProps>;
13
-
14
- declare const LogsView: React.FC<AdminViewServerProps>;
15
-
16
- declare const ChatView: React.FC<AdminViewServerProps>;
17
-
18
- declare const CrmView: React.FC<AdminViewServerProps>;
19
-
20
- declare const PendingEmailsView: React.FC<AdminViewServerProps>;
21
-
22
- declare const EmailTrackingView: React.FC<AdminViewServerProps>;
23
-
24
- declare const BillingView: React.FC<AdminViewServerProps>;
25
-
26
- declare const TimeDashboardView: React.FC<AdminViewServerProps>;
27
-
28
- declare const ImportConversationView: React.FC<AdminViewServerProps>;
29
-
30
- export { BillingView, ChatView, CrmView, EmailTrackingView, ImportConversationView, LogsView, NewTicketView, PendingEmailsView, SupportDashboardView, TicketDetailView, TicketInboxView, TicketingSettingsView, TimeDashboardView };
package/dist/views.d.ts DELETED
@@ -1,30 +0,0 @@
1
- import { AdminViewServerProps } from 'payload';
2
- import React from 'react';
3
-
4
- declare const TicketInboxView: React.FC<AdminViewServerProps>;
5
-
6
- declare const TicketDetailView: React.FC<AdminViewServerProps>;
7
-
8
- declare const SupportDashboardView: React.FC<AdminViewServerProps>;
9
-
10
- declare const NewTicketView: React.FC<AdminViewServerProps>;
11
-
12
- declare const TicketingSettingsView: React.FC<AdminViewServerProps>;
13
-
14
- declare const LogsView: React.FC<AdminViewServerProps>;
15
-
16
- declare const ChatView: React.FC<AdminViewServerProps>;
17
-
18
- declare const CrmView: React.FC<AdminViewServerProps>;
19
-
20
- declare const PendingEmailsView: React.FC<AdminViewServerProps>;
21
-
22
- declare const EmailTrackingView: React.FC<AdminViewServerProps>;
23
-
24
- declare const BillingView: React.FC<AdminViewServerProps>;
25
-
26
- declare const TimeDashboardView: React.FC<AdminViewServerProps>;
27
-
28
- declare const ImportConversationView: React.FC<AdminViewServerProps>;
29
-
30
- export { BillingView, ChatView, CrmView, EmailTrackingView, ImportConversationView, LogsView, NewTicketView, PendingEmailsView, SupportDashboardView, TicketDetailView, TicketInboxView, TicketingSettingsView, TimeDashboardView };
package/src/views.ts DELETED
@@ -1,16 +0,0 @@
1
- // Admin view components — server wrappers + client components
2
- // Each view follows the pattern: index.tsx (server) + client.tsx ('use client')
3
-
4
- export { TicketInboxView } from './views/TicketInboxView'
5
- export { TicketDetailView } from './views/TicketDetailView'
6
- export { SupportDashboardView } from './views/SupportDashboardView'
7
- export { NewTicketView } from './views/NewTicketView'
8
- export { TicketingSettingsView } from './views/TicketingSettingsView'
9
- export { LogsView } from './views/LogsView'
10
- export { ChatView } from './views/ChatView'
11
- export { CrmView } from './views/CrmView'
12
- export { PendingEmailsView } from './views/PendingEmailsView'
13
- export { EmailTrackingView } from './views/EmailTrackingView'
14
- export { BillingView } from './views/BillingView'
15
- export { TimeDashboardView } from './views/TimeDashboardView'
16
- export { ImportConversationView } from './views/ImportConversationView'