@consilioweb/payload-support 1.1.1 → 2.0.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 (99) hide show
  1. package/README.md +4 -0
  2. package/dist/components/TicketConversation/components/AISummaryPanel.cjs +22 -14
  3. package/dist/components/TicketConversation/components/AISummaryPanel.js +23 -16
  4. package/dist/components/TicketConversation/components/ActionPanels.cjs +5 -5
  5. package/dist/components/TicketConversation/components/ActionPanels.js +5 -5
  6. package/dist/components/TicketConversation/components/ClientBar.cjs +1 -1
  7. package/dist/components/TicketConversation/components/ClientBar.js +1 -1
  8. package/dist/components/TicketConversation/components/QuickActions.cjs +2 -2
  9. package/dist/components/TicketConversation/components/QuickActions.js +2 -2
  10. package/dist/components/TicketConversation/components/TicketHeader.cjs +1 -1
  11. package/dist/components/TicketConversation/components/TicketHeader.js +1 -1
  12. package/dist/components/TicketConversation/index.cjs +10 -10
  13. package/dist/components/TicketConversation/index.js +10 -10
  14. package/dist/index.cjs +709 -173
  15. package/dist/index.d.cts +165 -3
  16. package/dist/index.d.ts +165 -3
  17. package/dist/index.js +702 -175
  18. package/dist/styles/ChatView.module.scss +1 -1
  19. package/dist/styles/TicketDetail.module.scss +3 -3
  20. package/dist/styles/_tokens.scss +1 -1
  21. package/dist/styles/theme.css +6 -6
  22. package/dist/views/TicketingSettingsView/client.cjs +3 -3
  23. package/dist/views/TicketingSettingsView/client.js +3 -3
  24. package/package.json +9 -9
  25. package/src/__tests__/aiSummaryRendering.test.ts +21 -0
  26. package/src/__tests__/authResponses.test.ts +69 -0
  27. package/src/__tests__/capabilities.test.ts +71 -0
  28. package/src/__tests__/generateTrackingToken.test.ts +18 -4
  29. package/src/__tests__/integration/core-behaviors.test.ts +23 -0
  30. package/src/__tests__/rateLimiter.test.ts +60 -66
  31. package/src/__tests__/trackOpenEndpoint.test.ts +54 -0
  32. package/src/__tests__/webhookSecurity.test.ts +58 -0
  33. package/src/collections/PendingEmails.ts +2 -1
  34. package/src/collections/SupportClients.ts +43 -1
  35. package/src/collections/SupportCounters.ts +14 -0
  36. package/src/collections/SupportRateLimits.ts +20 -0
  37. package/src/collections/TicketMessages.ts +76 -0
  38. package/src/collections/Tickets.ts +179 -39
  39. package/src/collections/index.ts +2 -0
  40. package/src/components/TicketConversation/components/AISummaryPanel.tsx +26 -13
  41. package/src/components/TicketConversation/components/ActionPanels.tsx +5 -5
  42. package/src/components/TicketConversation/components/ClientBar.tsx +1 -1
  43. package/src/components/TicketConversation/components/QuickActions.tsx +2 -2
  44. package/src/components/TicketConversation/components/TicketHeader.tsx +1 -1
  45. package/src/components/TicketConversation/index.tsx +10 -10
  46. package/src/endpoints/admin-chat.ts +4 -4
  47. package/src/endpoints/ai-agent.ts +6 -1
  48. package/src/endpoints/ai.ts +10 -5
  49. package/src/endpoints/auth-2fa.ts +6 -7
  50. package/src/endpoints/auto-close.ts +2 -1
  51. package/src/endpoints/capabilities.ts +144 -0
  52. package/src/endpoints/channels.ts +2 -1
  53. package/src/endpoints/chat.ts +6 -6
  54. package/src/endpoints/chatbot.ts +4 -4
  55. package/src/endpoints/client-intelligence.ts +13 -4
  56. package/src/endpoints/import-conversation.ts +6 -5
  57. package/src/endpoints/index.ts +35 -14
  58. package/src/endpoints/invite-collaborator.ts +4 -4
  59. package/src/endpoints/login.ts +4 -5
  60. package/src/endpoints/oauth-google.ts +1 -1
  61. package/src/endpoints/process-digests.ts +2 -1
  62. package/src/endpoints/process-scheduled.ts +2 -1
  63. package/src/endpoints/process-snooze.ts +2 -1
  64. package/src/endpoints/resend-notification.ts +4 -4
  65. package/src/endpoints/send-reminder.ts +4 -4
  66. package/src/endpoints/ticket-synthesis.ts +17 -2
  67. package/src/endpoints/track-open.ts +44 -21
  68. package/src/endpoints/transfer-ticket.ts +4 -4
  69. package/src/index.ts +7 -0
  70. package/src/plugin.ts +16 -1
  71. package/src/portal/LiveChat.tsx +1 -1
  72. package/src/portal/auth/ChatWidget.tsx +4 -4
  73. package/src/portal/auth/ChatbotWidget.tsx +4 -4
  74. package/src/portal/auth/dashboard/DashboardClient.tsx +2 -2
  75. package/src/portal/auth/faq/FAQSearch.tsx +1 -1
  76. package/src/portal/auth/faq/page.tsx +2 -2
  77. package/src/portal/auth/profile/page.tsx +17 -17
  78. package/src/portal/auth/tickets/detail/CloseTicketButton.tsx +1 -1
  79. package/src/portal/auth/tickets/detail/MarkSolutionButton.tsx +1 -1
  80. package/src/portal/auth/tickets/detail/ReopenTicketButton.tsx +1 -1
  81. package/src/portal/auth/tickets/detail/SatisfactionForm.tsx +3 -3
  82. package/src/portal/auth/tickets/detail/TicketReplyForm.tsx +3 -3
  83. package/src/portal/auth/tickets/detail/page.tsx +5 -5
  84. package/src/portal/auth/tickets/new/page.tsx +8 -8
  85. package/src/portal/forgot-password/page.tsx +3 -3
  86. package/src/portal/layout.tsx +5 -2
  87. package/src/portal/login/page.tsx +7 -7
  88. package/src/portal/page.tsx +9 -9
  89. package/src/portal/register/page.tsx +4 -4
  90. package/src/portal/reset-password/page.tsx +3 -3
  91. package/src/styles/ChatView.module.scss +1 -1
  92. package/src/styles/TicketDetail.module.scss +3 -3
  93. package/src/styles/_tokens.scss +1 -1
  94. package/src/styles/theme.css +6 -6
  95. package/src/types.ts +71 -0
  96. package/src/utils/rateLimiter.ts +131 -38
  97. package/src/utils/slugs.ts +4 -0
  98. package/src/utils/webhookSecurity.ts +81 -0
  99. package/src/views/TicketingSettingsView/client.tsx +3 -3
package/README.md CHANGED
@@ -371,6 +371,10 @@ npm run typecheck && npm test && npm run build
371
371
 
372
372
  See [CHANGELOG.md](CHANGELOG.md) for the full history.
373
373
 
374
+ ### [1.1.1] — 2026-06-26
375
+
376
+ - 🐛 **Fix client ticket reopen**: allow clients to set `waiting_support` (the status the portal's "Reopen" button sends). It was silently rejected, leaving the ticket `resolved`.
377
+
374
378
  ### [1.1.0] — 2026-06-25
375
379
 
376
380
  - 🎯 **Per-team SLA policies & dashboards** (team policy overrides the default, `?teamId=` scoping).
@@ -3,6 +3,21 @@
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
4
  var constants = require('../constants');
5
5
 
6
+ function renderAiSummary(summary) {
7
+ const lines = summary.split("\n");
8
+ const result = [];
9
+ lines.forEach((line, lineIndex) => {
10
+ if (lineIndex > 0) result.push(/* @__PURE__ */ jsxRuntime.jsx("br", {}, `break-${lineIndex}`));
11
+ line.split(/(\*\*.*?\*\*)/g).filter(Boolean).forEach((part, partIndex) => {
12
+ if (part.startsWith("**") && part.endsWith("**")) {
13
+ result.push(/* @__PURE__ */ jsxRuntime.jsx("strong", { children: part.slice(2, -2) }, `${lineIndex}-${partIndex}`));
14
+ } else {
15
+ result.push(part);
16
+ }
17
+ });
18
+ });
19
+ return result;
20
+ }
6
21
  function AISummaryPanel({
7
22
  showAiSummary,
8
23
  setShowAiSummary,
@@ -22,7 +37,7 @@ function AISummaryPanel({
22
37
  if (!showAiSummary && !aiSummary) handleAiGenerate();
23
38
  },
24
39
  style: {
25
- ...constants.s.ghostBtn("#7c3aed", false),
40
+ ...constants.s.ghostBtn("#17807c", false),
26
41
  fontSize: "12px",
27
42
  display: "inline-flex",
28
43
  alignItems: "center",
@@ -35,18 +50,18 @@ function AISummaryPanel({
35
50
  marginTop: "10px",
36
51
  padding: "14px 18px",
37
52
  borderRadius: "8px",
38
- backgroundColor: "#faf5ff",
39
- border: "1px solid #e9d5ff"
53
+ backgroundColor: "#eef8f7",
54
+ border: "1px solid #b8dcda"
40
55
  }, children: [
41
56
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "10px" }, children: [
42
- /* @__PURE__ */ jsxRuntime.jsx("h4", { style: { fontSize: "13px", fontWeight: 600, color: "#7c3aed", margin: 0 }, children: "Synth\xE8se IA" }),
57
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { style: { fontSize: "13px", fontWeight: 600, color: "#17807c", margin: 0 }, children: "Synth\xE8se IA" }),
43
58
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "6px" }, children: [
44
59
  /* @__PURE__ */ jsxRuntime.jsx(
45
60
  "button",
46
61
  {
47
62
  onClick: handleAiGenerate,
48
63
  disabled: aiGenerating,
49
- style: { ...constants.s.outlineBtn("#7c3aed", aiGenerating), fontSize: "11px", padding: "4px 10px" },
64
+ style: { ...constants.s.outlineBtn("#17807c", aiGenerating), fontSize: "11px", padding: "4px 10px" },
50
65
  children: aiGenerating ? "G\xE9n\xE9ration..." : "R\xE9g\xE9n\xE9rer"
51
66
  }
52
67
  ),
@@ -61,17 +76,10 @@ function AISummaryPanel({
61
76
  )
62
77
  ] })
63
78
  ] }),
64
- aiGenerating ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", gap: "10px", color: "#7c3aed", fontSize: "13px" }, children: "Analyse de la conversation en cours..." }) : aiSummary ? /* @__PURE__ */ jsxRuntime.jsx(
65
- "div",
66
- {
67
- style: { fontSize: "13px", lineHeight: "1.7", color: "#1e1b4b", whiteSpace: "pre-wrap" },
68
- dangerouslySetInnerHTML: {
69
- __html: aiSummary.replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\n/g, "<br/>")
70
- }
71
- }
72
- ) : /* @__PURE__ */ jsxRuntime.jsx("p", { style: { color: "#999", fontStyle: "italic", fontSize: "13px", margin: 0 }, children: `Cliquez sur "R\xE9g\xE9n\xE9rer" pour lancer l'analyse` })
79
+ aiGenerating ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", gap: "10px", color: "#17807c", fontSize: "13px" }, children: "Analyse de la conversation en cours..." }) : aiSummary ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: "13px", lineHeight: "1.7", color: "#1e1b4b", whiteSpace: "pre-wrap" }, children: renderAiSummary(aiSummary) }) : /* @__PURE__ */ jsxRuntime.jsx("p", { style: { color: "#999", fontStyle: "italic", fontSize: "13px", margin: 0 }, children: `Cliquez sur "R\xE9g\xE9n\xE9rer" pour lancer l'analyse` })
73
80
  ] })
74
81
  ] });
75
82
  }
76
83
 
77
84
  exports.AISummaryPanel = AISummaryPanel;
85
+ exports.renderAiSummary = renderAiSummary;
@@ -1,7 +1,22 @@
1
1
  "use client";
2
- import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { s } from '../constants.js';
4
4
 
5
+ function renderAiSummary(summary) {
6
+ const lines = summary.split("\n");
7
+ const result = [];
8
+ lines.forEach((line, lineIndex) => {
9
+ if (lineIndex > 0) result.push(/* @__PURE__ */ jsx("br", {}, `break-${lineIndex}`));
10
+ line.split(/(\*\*.*?\*\*)/g).filter(Boolean).forEach((part, partIndex) => {
11
+ if (part.startsWith("**") && part.endsWith("**")) {
12
+ result.push(/* @__PURE__ */ jsx("strong", { children: part.slice(2, -2) }, `${lineIndex}-${partIndex}`));
13
+ } else {
14
+ result.push(part);
15
+ }
16
+ });
17
+ });
18
+ return result;
19
+ }
5
20
  function AISummaryPanel({
6
21
  showAiSummary,
7
22
  setShowAiSummary,
@@ -21,7 +36,7 @@ function AISummaryPanel({
21
36
  if (!showAiSummary && !aiSummary) handleAiGenerate();
22
37
  },
23
38
  style: {
24
- ...s.ghostBtn("#7c3aed", false),
39
+ ...s.ghostBtn("#17807c", false),
25
40
  fontSize: "12px",
26
41
  display: "inline-flex",
27
42
  alignItems: "center",
@@ -34,18 +49,18 @@ function AISummaryPanel({
34
49
  marginTop: "10px",
35
50
  padding: "14px 18px",
36
51
  borderRadius: "8px",
37
- backgroundColor: "#faf5ff",
38
- border: "1px solid #e9d5ff"
52
+ backgroundColor: "#eef8f7",
53
+ border: "1px solid #b8dcda"
39
54
  }, children: [
40
55
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "10px" }, children: [
41
- /* @__PURE__ */ jsx("h4", { style: { fontSize: "13px", fontWeight: 600, color: "#7c3aed", margin: 0 }, children: "Synth\xE8se IA" }),
56
+ /* @__PURE__ */ jsx("h4", { style: { fontSize: "13px", fontWeight: 600, color: "#17807c", margin: 0 }, children: "Synth\xE8se IA" }),
42
57
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "6px" }, children: [
43
58
  /* @__PURE__ */ jsx(
44
59
  "button",
45
60
  {
46
61
  onClick: handleAiGenerate,
47
62
  disabled: aiGenerating,
48
- style: { ...s.outlineBtn("#7c3aed", aiGenerating), fontSize: "11px", padding: "4px 10px" },
63
+ style: { ...s.outlineBtn("#17807c", aiGenerating), fontSize: "11px", padding: "4px 10px" },
49
64
  children: aiGenerating ? "G\xE9n\xE9ration..." : "R\xE9g\xE9n\xE9rer"
50
65
  }
51
66
  ),
@@ -60,17 +75,9 @@ function AISummaryPanel({
60
75
  )
61
76
  ] })
62
77
  ] }),
63
- aiGenerating ? /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "10px", color: "#7c3aed", fontSize: "13px" }, children: "Analyse de la conversation en cours..." }) : aiSummary ? /* @__PURE__ */ jsx(
64
- "div",
65
- {
66
- style: { fontSize: "13px", lineHeight: "1.7", color: "#1e1b4b", whiteSpace: "pre-wrap" },
67
- dangerouslySetInnerHTML: {
68
- __html: aiSummary.replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\n/g, "<br/>")
69
- }
70
- }
71
- ) : /* @__PURE__ */ jsx("p", { style: { color: "#999", fontStyle: "italic", fontSize: "13px", margin: 0 }, children: `Cliquez sur "R\xE9g\xE9n\xE9rer" pour lancer l'analyse` })
78
+ aiGenerating ? /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "10px", color: "#17807c", fontSize: "13px" }, children: "Analyse de la conversation en cours..." }) : aiSummary ? /* @__PURE__ */ jsx("div", { style: { fontSize: "13px", lineHeight: "1.7", color: "#1e1b4b", whiteSpace: "pre-wrap" }, children: renderAiSummary(aiSummary) }) : /* @__PURE__ */ jsx("p", { style: { color: "#999", fontStyle: "italic", fontSize: "13px", margin: 0 }, children: `Cliquez sur "R\xE9g\xE9n\xE9rer" pour lancer l'analyse` })
72
79
  ] })
73
80
  ] });
74
81
  }
75
82
 
76
- export { AISummaryPanel };
83
+ export { AISummaryPanel, renderAiSummary };
@@ -92,7 +92,7 @@ function ExtMessagePanel({
92
92
  file.name,
93
93
  /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => setExtMsgFiles((prev) => prev.filter((_, idx) => idx !== i)), style: { border: "none", background: "none", color: "#ef4444", fontWeight: 700, cursor: "pointer", fontSize: "14px", lineHeight: 1 }, children: "\xD7" })
94
94
  ] }, i)) }),
95
- /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: handleSendExtMsg, disabled: sendingExtMsg || !extMsgBody.trim(), style: constants.s.btn("#818cf8", sendingExtMsg || !extMsgBody.trim()), children: sendingExtMsg ? "Ajout..." : "Ajouter (sans notification)" })
95
+ /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: handleSendExtMsg, disabled: sendingExtMsg || !extMsgBody.trim(), style: constants.s.btn("#1d2b4d", sendingExtMsg || !extMsgBody.trim()), children: sendingExtMsg ? "Ajout..." : "Ajouter (sans notification)" })
96
96
  ] });
97
97
  }
98
98
  const REMINDER_DELAYS = [
@@ -167,12 +167,12 @@ function ReminderPanel({
167
167
  ] });
168
168
  }
169
169
  function SnoozePanel({ snoozeSaving, handleSnooze }) {
170
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "14px 18px", borderRadius: "8px", backgroundColor: "#faf5ff", border: "1px solid #e9d5ff", marginBottom: "14px" }, children: [
170
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "14px 18px", borderRadius: "8px", backgroundColor: "#eef8f7", border: "1px solid #b8dcda", marginBottom: "14px" }, children: [
171
171
  /* @__PURE__ */ jsxRuntime.jsx("h4", { style: { fontSize: "13px", fontWeight: 600, marginBottom: "10px", color: "#5b21b6" }, children: "Snooze \u2014 masquer temporairement" }),
172
172
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", alignItems: "center" }, children: [
173
- /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => handleSnooze(1), disabled: snoozeSaving, style: { ...constants.s.outlineBtn("#8b5cf6", snoozeSaving), fontSize: "12px" }, children: "1 jour" }),
174
- /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => handleSnooze(3), disabled: snoozeSaving, style: { ...constants.s.outlineBtn("#8b5cf6", snoozeSaving), fontSize: "12px" }, children: "3 jours" }),
175
- /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => handleSnooze(7), disabled: snoozeSaving, style: { ...constants.s.outlineBtn("#8b5cf6", snoozeSaving), fontSize: "12px" }, children: "1 semaine" }),
173
+ /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => handleSnooze(1), disabled: snoozeSaving, style: { ...constants.s.outlineBtn("#17807c", snoozeSaving), fontSize: "12px" }, children: "1 jour" }),
174
+ /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => handleSnooze(3), disabled: snoozeSaving, style: { ...constants.s.outlineBtn("#17807c", snoozeSaving), fontSize: "12px" }, children: "3 jours" }),
175
+ /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => handleSnooze(7), disabled: snoozeSaving, style: { ...constants.s.outlineBtn("#17807c", snoozeSaving), fontSize: "12px" }, children: "1 semaine" }),
176
176
  /* @__PURE__ */ jsxRuntime.jsx(
177
177
  "input",
178
178
  {
@@ -91,7 +91,7 @@ function ExtMessagePanel({
91
91
  file.name,
92
92
  /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setExtMsgFiles((prev) => prev.filter((_, idx) => idx !== i)), style: { border: "none", background: "none", color: "#ef4444", fontWeight: 700, cursor: "pointer", fontSize: "14px", lineHeight: 1 }, children: "\xD7" })
93
93
  ] }, i)) }),
94
- /* @__PURE__ */ jsx("button", { onClick: handleSendExtMsg, disabled: sendingExtMsg || !extMsgBody.trim(), style: s.btn("#818cf8", sendingExtMsg || !extMsgBody.trim()), children: sendingExtMsg ? "Ajout..." : "Ajouter (sans notification)" })
94
+ /* @__PURE__ */ jsx("button", { onClick: handleSendExtMsg, disabled: sendingExtMsg || !extMsgBody.trim(), style: s.btn("#1d2b4d", sendingExtMsg || !extMsgBody.trim()), children: sendingExtMsg ? "Ajout..." : "Ajouter (sans notification)" })
95
95
  ] });
96
96
  }
97
97
  const REMINDER_DELAYS = [
@@ -166,12 +166,12 @@ function ReminderPanel({
166
166
  ] });
167
167
  }
168
168
  function SnoozePanel({ snoozeSaving, handleSnooze }) {
169
- return /* @__PURE__ */ jsxs("div", { style: { padding: "14px 18px", borderRadius: "8px", backgroundColor: "#faf5ff", border: "1px solid #e9d5ff", marginBottom: "14px" }, children: [
169
+ return /* @__PURE__ */ jsxs("div", { style: { padding: "14px 18px", borderRadius: "8px", backgroundColor: "#eef8f7", border: "1px solid #b8dcda", marginBottom: "14px" }, children: [
170
170
  /* @__PURE__ */ jsx("h4", { style: { fontSize: "13px", fontWeight: 600, marginBottom: "10px", color: "#5b21b6" }, children: "Snooze \u2014 masquer temporairement" }),
171
171
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", alignItems: "center" }, children: [
172
- /* @__PURE__ */ jsx("button", { onClick: () => handleSnooze(1), disabled: snoozeSaving, style: { ...s.outlineBtn("#8b5cf6", snoozeSaving), fontSize: "12px" }, children: "1 jour" }),
173
- /* @__PURE__ */ jsx("button", { onClick: () => handleSnooze(3), disabled: snoozeSaving, style: { ...s.outlineBtn("#8b5cf6", snoozeSaving), fontSize: "12px" }, children: "3 jours" }),
174
- /* @__PURE__ */ jsx("button", { onClick: () => handleSnooze(7), disabled: snoozeSaving, style: { ...s.outlineBtn("#8b5cf6", snoozeSaving), fontSize: "12px" }, children: "1 semaine" }),
172
+ /* @__PURE__ */ jsx("button", { onClick: () => handleSnooze(1), disabled: snoozeSaving, style: { ...s.outlineBtn("#17807c", snoozeSaving), fontSize: "12px" }, children: "1 jour" }),
173
+ /* @__PURE__ */ jsx("button", { onClick: () => handleSnooze(3), disabled: snoozeSaving, style: { ...s.outlineBtn("#17807c", snoozeSaving), fontSize: "12px" }, children: "3 jours" }),
174
+ /* @__PURE__ */ jsx("button", { onClick: () => handleSnooze(7), disabled: snoozeSaving, style: { ...s.outlineBtn("#17807c", snoozeSaving), fontSize: "12px" }, children: "1 semaine" }),
175
175
  /* @__PURE__ */ jsx(
176
176
  "input",
177
177
  {
@@ -31,7 +31,7 @@ function ClientBar({ client }) {
31
31
  {
32
32
  type: "button",
33
33
  onClick: () => window.open(`/api/admin/impersonate?clientId=${client.id}`, "_blank"),
34
- style: { ...constants.s.ghostBtn("#7c3aed"), fontSize: "11px", padding: "4px 10px" },
34
+ style: { ...constants.s.ghostBtn("#17807c"), fontSize: "11px", padding: "4px 10px" },
35
35
  title: "Se connecter au portail support en tant que ce client",
36
36
  children: "Voir en tant que client"
37
37
  }
@@ -30,7 +30,7 @@ function ClientBar({ client }) {
30
30
  {
31
31
  type: "button",
32
32
  onClick: () => window.open(`/api/admin/impersonate?clientId=${client.id}`, "_blank"),
33
- style: { ...s.ghostBtn("#7c3aed"), fontSize: "11px", padding: "4px 10px" },
33
+ style: { ...s.ghostBtn("#17807c"), fontSize: "11px", padding: "4px 10px" },
34
34
  title: "Se connecter au portail support en tant que ce client",
35
35
  children: "Voir en tant que client"
36
36
  }
@@ -41,11 +41,11 @@ function QuickActions({
41
41
  },
42
42
  a.status
43
43
  )),
44
- snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onCancelSnooze, disabled: snoozeSaving, style: { ...constants.s.ghostBtn("#7c3aed", snoozeSaving), fontSize: "12px", padding: "5px 10px" }, children: "Annuler snooze" }),
44
+ snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onCancelSnooze, disabled: snoozeSaving, style: { ...constants.s.ghostBtn("#17807c", snoozeSaving), fontSize: "12px", padding: "5px 10px" }, children: "Annuler snooze" }),
45
45
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: { borderLeft: `1px solid ${constants.C.border}`, height: "20px", margin: "0 4px" } }),
46
46
  /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onToggleMerge, style: constants.s.ghostBtn("#be185d"), children: "Fusionner" }),
47
47
  /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onToggleExtMsg, style: constants.s.ghostBtn("#4f46e5"), children: "+ Message re\xE7u" }),
48
- /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onToggleSnooze, style: constants.s.ghostBtn("#7c3aed"), children: "Snooze" }),
48
+ /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onToggleSnooze, style: constants.s.ghostBtn("#17807c"), children: "Snooze" }),
49
49
  showReminderButton && /* @__PURE__ */ jsxRuntime.jsxs("button", { onClick: onToggleReminder, style: constants.s.ghostBtn("#ea580c"), children: [
50
50
  "\u23F0",
51
51
  " Relancer"
@@ -40,11 +40,11 @@ function QuickActions({
40
40
  },
41
41
  a.status
42
42
  )),
43
- snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsx("button", { onClick: onCancelSnooze, disabled: snoozeSaving, style: { ...s.ghostBtn("#7c3aed", snoozeSaving), fontSize: "12px", padding: "5px 10px" }, children: "Annuler snooze" }),
43
+ snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsx("button", { onClick: onCancelSnooze, disabled: snoozeSaving, style: { ...s.ghostBtn("#17807c", snoozeSaving), fontSize: "12px", padding: "5px 10px" }, children: "Annuler snooze" }),
44
44
  /* @__PURE__ */ jsx("span", { style: { borderLeft: `1px solid ${C.border}`, height: "20px", margin: "0 4px" } }),
45
45
  /* @__PURE__ */ jsx("button", { onClick: onToggleMerge, style: s.ghostBtn("#be185d"), children: "Fusionner" }),
46
46
  /* @__PURE__ */ jsx("button", { onClick: onToggleExtMsg, style: s.ghostBtn("#4f46e5"), children: "+ Message re\xE7u" }),
47
- /* @__PURE__ */ jsx("button", { onClick: onToggleSnooze, style: s.ghostBtn("#7c3aed"), children: "Snooze" }),
47
+ /* @__PURE__ */ jsx("button", { onClick: onToggleSnooze, style: s.ghostBtn("#17807c"), children: "Snooze" }),
48
48
  showReminderButton && /* @__PURE__ */ jsxs("button", { onClick: onToggleReminder, style: s.ghostBtn("#ea580c"), children: [
49
49
  "\u23F0",
50
50
  " Relancer"
@@ -53,7 +53,7 @@ function TicketHeader({
53
53
  chatSession.slice(0, 16),
54
54
  "..."
55
55
  ] }),
56
- snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: constants.s.badge("#f5f3ff", "#7c3aed"), children: [
56
+ snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: constants.s.badge("#eef8f7", "#17807c"), children: [
57
57
  "Snooz\xE9 ",
58
58
  new Date(snoozeUntil).toLocaleDateString("fr-FR", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" })
59
59
  ] }),
@@ -52,7 +52,7 @@ function TicketHeader({
52
52
  chatSession.slice(0, 16),
53
53
  "..."
54
54
  ] }),
55
- snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsxs("span", { style: s.badge("#f5f3ff", "#7c3aed"), children: [
55
+ snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsxs("span", { style: s.badge("#eef8f7", "#17807c"), children: [
56
56
  "Snooz\xE9 ",
57
57
  new Date(snoozeUntil).toLocaleDateString("fr-FR", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" })
58
58
  ] }),
@@ -505,7 +505,7 @@ const TicketConversation = () => {
505
505
  createdDate,
506
506
  " \u2014 r\xE9dig\xE9 le ",
507
507
  scheduledDate !== createdDate ? scheduledDate : createdDate
508
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { style: constants.s.badge("#f3e8ff", "#7c3aed"), children: [
508
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { style: constants.s.badge("#eef8f7", "#17807c"), children: [
509
509
  "\u23F0",
510
510
  " R\xE9dig\xE9 le ",
511
511
  createdDate,
@@ -703,13 +703,13 @@ const TicketConversation = () => {
703
703
  gap: 8,
704
704
  padding: "8px 12px",
705
705
  fontSize: 12,
706
- color: "#7c3aed",
706
+ color: "#17807c",
707
707
  fontWeight: 500
708
708
  }, children: [
709
709
  /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "flex", gap: 2 }, children: [
710
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#7c3aed", animation: "bounce 1s infinite", animationDelay: "0ms" } }),
711
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#7c3aed", animation: "bounce 1s infinite", animationDelay: "150ms" } }),
712
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#7c3aed", animation: "bounce 1s infinite", animationDelay: "300ms" } })
710
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#17807c", animation: "bounce 1s infinite", animationDelay: "0ms" } }),
711
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#17807c", animation: "bounce 1s infinite", animationDelay: "150ms" } }),
712
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#17807c", animation: "bounce 1s infinite", animationDelay: "300ms" } })
713
713
  ] }),
714
714
  clientTypingName || "Client",
715
715
  " est en train d'\xE9crire..."
@@ -760,7 +760,7 @@ const TicketConversation = () => {
760
760
  {
761
761
  onClick: handleAiSuggestReply,
762
762
  disabled: aiReplying || messages.length === 0,
763
- style: { ...constants.s.outlineBtn("#7c3aed", aiReplying || messages.length === 0), fontSize: "11px", padding: "3px 10px", borderRadius: "14px" },
763
+ style: { ...constants.s.outlineBtn("#17807c", aiReplying || messages.length === 0), fontSize: "11px", padding: "3px 10px", borderRadius: "14px" },
764
764
  children: aiReplying ? "G\xE9n\xE9ration..." : "Suggestion IA"
765
765
  }
766
766
  ),
@@ -892,14 +892,14 @@ const TicketConversation = () => {
892
892
  {
893
893
  onClick: () => setShowSchedule(!showSchedule),
894
894
  disabled: !replyBody.trim() && !replyHtml,
895
- style: { ...constants.s.outlineBtn("#7c3aed", !replyBody.trim() && !replyHtml), fontSize: "12px", padding: "8px 12px" },
895
+ style: { ...constants.s.outlineBtn("#17807c", !replyBody.trim() && !replyHtml), fontSize: "12px", padding: "8px 12px" },
896
896
  title: "Programmer l'envoi \xE0 une date/heure pr\xE9cise",
897
897
  children: "\u23F0"
898
898
  }
899
899
  )
900
900
  ] }),
901
- showSchedule && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "center", marginTop: "8px", padding: "10px 14px", borderRadius: "8px", backgroundColor: "#faf5ff", border: "1px solid #e9d5ff" }, children: [
902
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "12px", fontWeight: 600, color: "#7c3aed" }, children: "Programmer pour :" }),
901
+ showSchedule && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "center", marginTop: "8px", padding: "10px 14px", borderRadius: "8px", backgroundColor: "#eef8f7", border: "1px solid #b8dcda" }, children: [
902
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "12px", fontWeight: 600, color: "#17807c" }, children: "Programmer pour :" }),
903
903
  /* @__PURE__ */ jsxRuntime.jsx(
904
904
  "input",
905
905
  {
@@ -915,7 +915,7 @@ const TicketConversation = () => {
915
915
  {
916
916
  onClick: handleScheduleReply,
917
917
  disabled: sending || !scheduleDate || !replyBody.trim() && !replyHtml,
918
- style: { ...constants.s.btn("#7c3aed", sending || !scheduleDate || !replyBody.trim() && !replyHtml), fontSize: "12px", padding: "6px 14px" },
918
+ style: { ...constants.s.btn("#17807c", sending || !scheduleDate || !replyBody.trim() && !replyHtml), fontSize: "12px", padding: "6px 14px" },
919
919
  children: sending ? "..." : "\u23F0 Programmer"
920
920
  }
921
921
  ),
@@ -500,7 +500,7 @@ const TicketConversation = () => {
500
500
  createdDate,
501
501
  " \u2014 r\xE9dig\xE9 le ",
502
502
  scheduledDate !== createdDate ? scheduledDate : createdDate
503
- ] }) : /* @__PURE__ */ jsxs("span", { style: s.badge("#f3e8ff", "#7c3aed"), children: [
503
+ ] }) : /* @__PURE__ */ jsxs("span", { style: s.badge("#eef8f7", "#17807c"), children: [
504
504
  "\u23F0",
505
505
  " R\xE9dig\xE9 le ",
506
506
  createdDate,
@@ -698,13 +698,13 @@ const TicketConversation = () => {
698
698
  gap: 8,
699
699
  padding: "8px 12px",
700
700
  fontSize: 12,
701
- color: "#7c3aed",
701
+ color: "#17807c",
702
702
  fontWeight: 500
703
703
  }, children: [
704
704
  /* @__PURE__ */ jsxs("span", { style: { display: "flex", gap: 2 }, children: [
705
- /* @__PURE__ */ jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#7c3aed", animation: "bounce 1s infinite", animationDelay: "0ms" } }),
706
- /* @__PURE__ */ jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#7c3aed", animation: "bounce 1s infinite", animationDelay: "150ms" } }),
707
- /* @__PURE__ */ jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#7c3aed", animation: "bounce 1s infinite", animationDelay: "300ms" } })
705
+ /* @__PURE__ */ jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#17807c", animation: "bounce 1s infinite", animationDelay: "0ms" } }),
706
+ /* @__PURE__ */ jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#17807c", animation: "bounce 1s infinite", animationDelay: "150ms" } }),
707
+ /* @__PURE__ */ jsx("span", { style: { width: 5, height: 5, borderRadius: "50%", backgroundColor: "#17807c", animation: "bounce 1s infinite", animationDelay: "300ms" } })
708
708
  ] }),
709
709
  clientTypingName || "Client",
710
710
  " est en train d'\xE9crire..."
@@ -755,7 +755,7 @@ const TicketConversation = () => {
755
755
  {
756
756
  onClick: handleAiSuggestReply,
757
757
  disabled: aiReplying || messages.length === 0,
758
- style: { ...s.outlineBtn("#7c3aed", aiReplying || messages.length === 0), fontSize: "11px", padding: "3px 10px", borderRadius: "14px" },
758
+ style: { ...s.outlineBtn("#17807c", aiReplying || messages.length === 0), fontSize: "11px", padding: "3px 10px", borderRadius: "14px" },
759
759
  children: aiReplying ? "G\xE9n\xE9ration..." : "Suggestion IA"
760
760
  }
761
761
  ),
@@ -887,14 +887,14 @@ const TicketConversation = () => {
887
887
  {
888
888
  onClick: () => setShowSchedule(!showSchedule),
889
889
  disabled: !replyBody.trim() && !replyHtml,
890
- style: { ...s.outlineBtn("#7c3aed", !replyBody.trim() && !replyHtml), fontSize: "12px", padding: "8px 12px" },
890
+ style: { ...s.outlineBtn("#17807c", !replyBody.trim() && !replyHtml), fontSize: "12px", padding: "8px 12px" },
891
891
  title: "Programmer l'envoi \xE0 une date/heure pr\xE9cise",
892
892
  children: "\u23F0"
893
893
  }
894
894
  )
895
895
  ] }),
896
- showSchedule && /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "center", marginTop: "8px", padding: "10px 14px", borderRadius: "8px", backgroundColor: "#faf5ff", border: "1px solid #e9d5ff" }, children: [
897
- /* @__PURE__ */ jsx("span", { style: { fontSize: "12px", fontWeight: 600, color: "#7c3aed" }, children: "Programmer pour :" }),
896
+ showSchedule && /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "center", marginTop: "8px", padding: "10px 14px", borderRadius: "8px", backgroundColor: "#eef8f7", border: "1px solid #b8dcda" }, children: [
897
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "12px", fontWeight: 600, color: "#17807c" }, children: "Programmer pour :" }),
898
898
  /* @__PURE__ */ jsx(
899
899
  "input",
900
900
  {
@@ -910,7 +910,7 @@ const TicketConversation = () => {
910
910
  {
911
911
  onClick: handleScheduleReply,
912
912
  disabled: sending || !scheduleDate || !replyBody.trim() && !replyHtml,
913
- style: { ...s.btn("#7c3aed", sending || !scheduleDate || !replyBody.trim() && !replyHtml), fontSize: "12px", padding: "6px 14px" },
913
+ style: { ...s.btn("#17807c", sending || !scheduleDate || !replyBody.trim() && !replyHtml), fontSize: "12px", padding: "6px 14px" },
914
914
  children: sending ? "..." : "\u23F0 Programmer"
915
915
  }
916
916
  ),