@consilioweb/payload-support 0.6.1 → 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.
- package/dist/components/TicketConversation/components/AISummaryPanel.cjs +77 -0
- package/dist/components/TicketConversation/components/AISummaryPanel.js +76 -0
- package/dist/components/TicketConversation/components/ActionPanels.cjs +121 -0
- package/dist/components/TicketConversation/components/ActionPanels.js +118 -0
- package/dist/components/TicketConversation/components/ActivityLog.cjs +24 -0
- package/dist/components/TicketConversation/components/ActivityLog.js +23 -0
- package/dist/components/TicketConversation/components/ClientBar.cjs +43 -0
- package/dist/components/TicketConversation/components/ClientBar.js +42 -0
- package/dist/components/TicketConversation/components/ClientHistory.cjs +138 -0
- package/dist/components/TicketConversation/components/ClientHistory.js +137 -0
- package/dist/components/TicketConversation/components/CodeBlock.cjs +154 -0
- package/dist/components/TicketConversation/components/CodeBlock.js +152 -0
- package/dist/components/TicketConversation/components/CodeBlockInserter.cjs +156 -0
- package/dist/components/TicketConversation/components/CodeBlockInserter.js +155 -0
- package/dist/components/TicketConversation/components/QuickActions.cjs +66 -0
- package/dist/components/TicketConversation/components/QuickActions.js +65 -0
- package/dist/components/TicketConversation/components/TicketHeader.cjs +93 -0
- package/dist/components/TicketConversation/components/TicketHeader.js +92 -0
- package/dist/components/TicketConversation/components/TimeTrackingPanel.cjs +134 -0
- package/dist/components/TicketConversation/components/TimeTrackingPanel.js +133 -0
- package/dist/components/TicketConversation/config.cjs +44 -0
- package/dist/components/TicketConversation/config.js +41 -0
- package/dist/components/TicketConversation/constants.cjs +100 -0
- package/dist/components/TicketConversation/constants.js +96 -0
- package/dist/components/TicketConversation/context.cjs +13 -0
- package/dist/components/TicketConversation/context.js +11 -0
- package/dist/components/TicketConversation/hooks/useAI.cjs +177 -0
- package/dist/components/TicketConversation/hooks/useAI.js +176 -0
- package/dist/components/TicketConversation/hooks/useMessageActions.cjs +136 -0
- package/dist/components/TicketConversation/hooks/useMessageActions.js +135 -0
- package/dist/components/TicketConversation/hooks/useReply.cjs +188 -0
- package/dist/components/TicketConversation/hooks/useReply.js +187 -0
- package/dist/components/TicketConversation/hooks/useTicketActions.cjs +231 -0
- package/dist/components/TicketConversation/hooks/useTicketActions.js +230 -0
- package/dist/components/TicketConversation/hooks/useTimeTracking.cjs +123 -0
- package/dist/components/TicketConversation/hooks/useTimeTracking.js +122 -0
- package/dist/components/TicketConversation/hooks/useTranslation.cjs +78 -0
- package/dist/components/TicketConversation/hooks/useTranslation.js +70 -0
- package/dist/components/TicketConversation/index.cjs +1128 -0
- package/dist/components/TicketConversation/index.js +1123 -0
- package/dist/components/TicketConversation/locales/en.json +878 -0
- package/dist/components/TicketConversation/locales/fr.json +878 -0
- package/dist/components/TicketConversation/types.cjs +2 -0
- package/dist/components/TicketConversation/types.js +2 -0
- package/dist/components/TicketConversation/utils.cjs +27 -0
- package/dist/components/TicketConversation/utils.js +25 -0
- package/dist/styles/BillingView.module.scss +311 -0
- package/dist/styles/ChatView.module.scss +438 -0
- package/dist/styles/CommandPalette.module.scss +160 -0
- package/dist/styles/CrmView.module.scss +554 -0
- package/dist/styles/EmailTracking.module.scss +238 -0
- package/dist/styles/ImportConversation.module.scss +267 -0
- package/dist/styles/Layout.module.scss +55 -0
- package/dist/styles/Logs.module.scss +164 -0
- package/dist/styles/NewTicket.module.scss +143 -0
- package/dist/styles/PendingEmails.module.scss +629 -0
- package/dist/styles/SupportDashboard.module.scss +649 -0
- package/dist/styles/TicketDetail.module.scss +1050 -0
- package/dist/styles/TicketInbox.module.scss +296 -0
- package/dist/styles/TicketingSettings.module.scss +358 -0
- package/dist/styles/TimeDashboard.module.scss +287 -0
- package/dist/styles/_tokens.scss +78 -0
- package/dist/{components/TicketConversation.css → styles/theme.css} +326 -13
- package/dist/views/BillingView/client.cjs +209 -0
- package/dist/views/BillingView/client.js +204 -0
- package/dist/views/BillingView/index.cjs +34 -0
- package/dist/views/BillingView/index.js +29 -0
- package/dist/views/ChatView/client.cjs +253 -0
- package/dist/views/ChatView/client.js +252 -0
- package/dist/views/ChatView/index.cjs +34 -0
- package/dist/views/ChatView/index.js +29 -0
- package/dist/views/CrmView/client.cjs +233 -0
- package/dist/views/CrmView/client.js +232 -0
- package/dist/views/CrmView/index.cjs +34 -0
- package/dist/views/CrmView/index.js +29 -0
- package/dist/views/EmailTrackingView/client.cjs +159 -0
- package/dist/views/EmailTrackingView/client.js +154 -0
- package/dist/views/EmailTrackingView/index.cjs +34 -0
- package/dist/views/EmailTrackingView/index.js +29 -0
- package/dist/views/ImportConversationView/client.cjs +205 -0
- package/dist/views/ImportConversationView/client.js +204 -0
- package/dist/views/ImportConversationView/index.cjs +34 -0
- package/dist/views/ImportConversationView/index.js +29 -0
- package/dist/views/LogsView/client.cjs +149 -0
- package/dist/views/LogsView/client.js +148 -0
- package/dist/views/LogsView/index.cjs +32 -0
- package/dist/views/LogsView/index.js +27 -0
- package/dist/views/NewTicketView/client.cjs +229 -0
- package/dist/views/NewTicketView/client.js +224 -0
- package/dist/views/NewTicketView/index.cjs +32 -0
- package/dist/views/NewTicketView/index.js +27 -0
- package/dist/views/PendingEmailsView/client.cjs +173 -0
- package/dist/views/PendingEmailsView/client.js +172 -0
- package/dist/views/PendingEmailsView/index.cjs +34 -0
- package/dist/views/PendingEmailsView/index.js +29 -0
- package/dist/views/SupportDashboardView/client.cjs +301 -0
- package/dist/views/SupportDashboardView/client.js +296 -0
- package/dist/views/SupportDashboardView/index.cjs +34 -0
- package/dist/views/SupportDashboardView/index.js +29 -0
- package/dist/views/TicketDetailView/client.cjs +850 -0
- package/dist/views/TicketDetailView/client.js +844 -0
- package/dist/views/TicketDetailView/index.cjs +34 -0
- package/dist/views/TicketDetailView/index.js +29 -0
- package/dist/views/TicketInboxView/client.cjs +299 -0
- package/dist/views/TicketInboxView/client.js +294 -0
- package/dist/views/TicketInboxView/index.cjs +32 -0
- package/dist/views/TicketInboxView/index.js +27 -0
- package/dist/{views.css → views/TicketingSettingsView/TicketingSettings.module.scss} +138 -66
- package/dist/views/TicketingSettingsView/client.cjs +733 -0
- package/dist/views/TicketingSettingsView/client.js +728 -0
- package/dist/views/TicketingSettingsView/index.cjs +34 -0
- package/dist/views/TicketingSettingsView/index.js +29 -0
- package/dist/views/TimeDashboardView/client.cjs +169 -0
- package/dist/views/TimeDashboardView/client.js +164 -0
- package/dist/views/TimeDashboardView/index.cjs +34 -0
- package/dist/views/TimeDashboardView/index.js +29 -0
- package/dist/views/shared/AdminViewHeader.cjs +68 -0
- package/dist/views/shared/AdminViewHeader.js +67 -0
- package/dist/views/shared/ErrorBoundary.cjs +55 -0
- package/dist/views/shared/ErrorBoundary.js +50 -0
- package/dist/views/shared/Skeleton.cjs +77 -0
- package/dist/views/shared/Skeleton.js +72 -0
- package/dist/views/shared/adminTokens.cjs +34 -0
- package/dist/views/shared/adminTokens.js +31 -0
- package/dist/views/shared/config.cjs +44 -0
- package/dist/views/shared/config.js +40 -0
- package/dist/views/shared/index.cjs +58 -0
- package/dist/views/shared/index.js +5 -0
- package/dist/views.cjs +77 -6175
- package/dist/views.d.cts +13 -30
- package/dist/views.d.ts +13 -30
- package/dist/views.js +13 -6165
- package/package.json +2 -2
- package/dist/components/TicketConversation.js +0 -3004
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
9
|
+
|
|
10
|
+
class AdminErrorBoundary extends React__default.default.Component {
|
|
11
|
+
constructor(props) {
|
|
12
|
+
super(props);
|
|
13
|
+
this.state = { hasError: false, error: null };
|
|
14
|
+
}
|
|
15
|
+
static getDerivedStateFromError(error) {
|
|
16
|
+
return { hasError: true, error };
|
|
17
|
+
}
|
|
18
|
+
componentDidCatch(error, errorInfo) {
|
|
19
|
+
console.error(`[${this.props.viewName || "AdminView"}] Error:`, error, errorInfo);
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
if (this.state.hasError) {
|
|
23
|
+
if (this.props.fallback) {
|
|
24
|
+
return this.props.fallback;
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
27
|
+
padding: "40px",
|
|
28
|
+
textAlign: "center",
|
|
29
|
+
color: "#dc2626"
|
|
30
|
+
}, children: [
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: { marginBottom: "16px", fontSize: "18px" }, children: "Une erreur est survenue" }),
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "24px", color: "#6b7280", fontSize: "14px" }, children: this.state.error?.message || "Erreur inattendue" }),
|
|
33
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34
|
+
"button",
|
|
35
|
+
{
|
|
36
|
+
onClick: () => this.setState({ hasError: false, error: null }),
|
|
37
|
+
style: {
|
|
38
|
+
padding: "8px 20px",
|
|
39
|
+
backgroundColor: "#2563eb",
|
|
40
|
+
color: "#fff",
|
|
41
|
+
border: "none",
|
|
42
|
+
borderRadius: "6px",
|
|
43
|
+
cursor: "pointer",
|
|
44
|
+
fontSize: "14px"
|
|
45
|
+
},
|
|
46
|
+
children: "Reessayer"
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
return this.props.children;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
exports.AdminErrorBoundary = AdminErrorBoundary;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
class AdminErrorBoundary extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.state = { hasError: false, error: null };
|
|
9
|
+
}
|
|
10
|
+
static getDerivedStateFromError(error) {
|
|
11
|
+
return { hasError: true, error };
|
|
12
|
+
}
|
|
13
|
+
componentDidCatch(error, errorInfo) {
|
|
14
|
+
console.error(`[${this.props.viewName || "AdminView"}] Error:`, error, errorInfo);
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
if (this.state.hasError) {
|
|
18
|
+
if (this.props.fallback) {
|
|
19
|
+
return this.props.fallback;
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", { style: {
|
|
22
|
+
padding: "40px",
|
|
23
|
+
textAlign: "center",
|
|
24
|
+
color: "#dc2626"
|
|
25
|
+
}, children: [
|
|
26
|
+
/* @__PURE__ */ jsx("h2", { style: { marginBottom: "16px", fontSize: "18px" }, children: "Une erreur est survenue" }),
|
|
27
|
+
/* @__PURE__ */ jsx("p", { style: { marginBottom: "24px", color: "#6b7280", fontSize: "14px" }, children: this.state.error?.message || "Erreur inattendue" }),
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
"button",
|
|
30
|
+
{
|
|
31
|
+
onClick: () => this.setState({ hasError: false, error: null }),
|
|
32
|
+
style: {
|
|
33
|
+
padding: "8px 20px",
|
|
34
|
+
backgroundColor: "#2563eb",
|
|
35
|
+
color: "#fff",
|
|
36
|
+
border: "none",
|
|
37
|
+
borderRadius: "6px",
|
|
38
|
+
cursor: "pointer",
|
|
39
|
+
fontSize: "14px"
|
|
40
|
+
},
|
|
41
|
+
children: "Reessayer"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
return this.props.children;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { AdminErrorBoundary };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
|
|
6
|
+
const styleId = "skeleton-shimmer-style";
|
|
7
|
+
function injectSkeletonStyles() {
|
|
8
|
+
if (typeof document === "undefined") return;
|
|
9
|
+
if (document.getElementById(styleId)) return;
|
|
10
|
+
const style = document.createElement("style");
|
|
11
|
+
style.id = styleId;
|
|
12
|
+
style.textContent = `
|
|
13
|
+
@keyframes skeleton-shimmer {
|
|
14
|
+
0% { background-position: 200% 0; }
|
|
15
|
+
100% { background-position: -200% 0; }
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
document.head.appendChild(style);
|
|
19
|
+
}
|
|
20
|
+
function Skeleton({ width = "100%", height = "20px", borderRadius = "4px", style }) {
|
|
21
|
+
react.useEffect(() => {
|
|
22
|
+
injectSkeletonStyles();
|
|
23
|
+
}, []);
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
style: {
|
|
28
|
+
width,
|
|
29
|
+
height,
|
|
30
|
+
borderRadius,
|
|
31
|
+
background: "linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%)",
|
|
32
|
+
backgroundSize: "200% 100%",
|
|
33
|
+
animation: "skeleton-shimmer 1.5s infinite",
|
|
34
|
+
...style
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
function SkeletonText({ lines = 3, width = "100%" }) {
|
|
40
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "8px", width }, children: Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { height: "16px", width: i === lines - 1 ? "60%" : "100%" }, i)) });
|
|
41
|
+
}
|
|
42
|
+
function SkeletonCard({ height = "200px" }) {
|
|
43
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
44
|
+
border: "1px solid #e5e7eb",
|
|
45
|
+
borderRadius: "8px",
|
|
46
|
+
padding: "20px",
|
|
47
|
+
display: "flex",
|
|
48
|
+
flexDirection: "column",
|
|
49
|
+
gap: "12px",
|
|
50
|
+
minHeight: height
|
|
51
|
+
}, children: [
|
|
52
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { height: "24px", width: "40%" }),
|
|
53
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonText, { lines: 3 }),
|
|
54
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { height: "32px", width: "120px", borderRadius: "6px" })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
function SkeletonTable({ rows = 5, columns = 4 }) {
|
|
58
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%" }, children: [
|
|
59
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: "16px", padding: "12px 0", borderBottom: "2px solid #e5e7eb" }, children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { height: "16px", width: `${100 / columns}%` }, i)) }),
|
|
60
|
+
Array.from({ length: rows }).map((_, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: "16px", padding: "12px 0", borderBottom: "1px solid #f3f4f6" }, children: Array.from({ length: columns }).map((_2, colIdx) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { height: "14px", width: `${100 / columns}%` }, colIdx)) }, rowIdx))
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
63
|
+
function SkeletonDashboard() {
|
|
64
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "24px", padding: "20px 0" }, children: [
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))", gap: "16px" }, children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "20px", border: "1px solid #e5e7eb", borderRadius: "8px" }, children: [
|
|
66
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { height: "14px", width: "60%", style: { marginBottom: "8px" } }),
|
|
67
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { height: "32px", width: "40%" })
|
|
68
|
+
] }, i)) }),
|
|
69
|
+
/* @__PURE__ */ jsxRuntime.jsx(SkeletonTable, { rows: 5, columns: 4 })
|
|
70
|
+
] });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
exports.Skeleton = Skeleton;
|
|
74
|
+
exports.SkeletonCard = SkeletonCard;
|
|
75
|
+
exports.SkeletonDashboard = SkeletonDashboard;
|
|
76
|
+
exports.SkeletonTable = SkeletonTable;
|
|
77
|
+
exports.SkeletonText = SkeletonText;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
const styleId = "skeleton-shimmer-style";
|
|
6
|
+
function injectSkeletonStyles() {
|
|
7
|
+
if (typeof document === "undefined") return;
|
|
8
|
+
if (document.getElementById(styleId)) return;
|
|
9
|
+
const style = document.createElement("style");
|
|
10
|
+
style.id = styleId;
|
|
11
|
+
style.textContent = `
|
|
12
|
+
@keyframes skeleton-shimmer {
|
|
13
|
+
0% { background-position: 200% 0; }
|
|
14
|
+
100% { background-position: -200% 0; }
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
document.head.appendChild(style);
|
|
18
|
+
}
|
|
19
|
+
function Skeleton({ width = "100%", height = "20px", borderRadius = "4px", style }) {
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
injectSkeletonStyles();
|
|
22
|
+
}, []);
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
style: {
|
|
27
|
+
width,
|
|
28
|
+
height,
|
|
29
|
+
borderRadius,
|
|
30
|
+
background: "linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%)",
|
|
31
|
+
backgroundSize: "200% 100%",
|
|
32
|
+
animation: "skeleton-shimmer 1.5s infinite",
|
|
33
|
+
...style
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function SkeletonText({ lines = 3, width = "100%" }) {
|
|
39
|
+
return /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "8px", width }, children: Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { height: "16px", width: i === lines - 1 ? "60%" : "100%" }, i)) });
|
|
40
|
+
}
|
|
41
|
+
function SkeletonCard({ height = "200px" }) {
|
|
42
|
+
return /* @__PURE__ */ jsxs("div", { style: {
|
|
43
|
+
border: "1px solid #e5e7eb",
|
|
44
|
+
borderRadius: "8px",
|
|
45
|
+
padding: "20px",
|
|
46
|
+
display: "flex",
|
|
47
|
+
flexDirection: "column",
|
|
48
|
+
gap: "12px",
|
|
49
|
+
minHeight: height
|
|
50
|
+
}, children: [
|
|
51
|
+
/* @__PURE__ */ jsx(Skeleton, { height: "24px", width: "40%" }),
|
|
52
|
+
/* @__PURE__ */ jsx(SkeletonText, { lines: 3 }),
|
|
53
|
+
/* @__PURE__ */ jsx(Skeleton, { height: "32px", width: "120px", borderRadius: "6px" })
|
|
54
|
+
] });
|
|
55
|
+
}
|
|
56
|
+
function SkeletonTable({ rows = 5, columns = 4 }) {
|
|
57
|
+
return /* @__PURE__ */ jsxs("div", { style: { width: "100%" }, children: [
|
|
58
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "16px", padding: "12px 0", borderBottom: "2px solid #e5e7eb" }, children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { height: "16px", width: `${100 / columns}%` }, i)) }),
|
|
59
|
+
Array.from({ length: rows }).map((_, rowIdx) => /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "16px", padding: "12px 0", borderBottom: "1px solid #f3f4f6" }, children: Array.from({ length: columns }).map((_2, colIdx) => /* @__PURE__ */ jsx(Skeleton, { height: "14px", width: `${100 / columns}%` }, colIdx)) }, rowIdx))
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
function SkeletonDashboard() {
|
|
63
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "24px", padding: "20px 0" }, children: [
|
|
64
|
+
/* @__PURE__ */ jsx("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))", gap: "16px" }, children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ jsxs("div", { style: { padding: "20px", border: "1px solid #e5e7eb", borderRadius: "8px" }, children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Skeleton, { height: "14px", width: "60%", style: { marginBottom: "8px" } }),
|
|
66
|
+
/* @__PURE__ */ jsx(Skeleton, { height: "32px", width: "40%" })
|
|
67
|
+
] }, i)) }),
|
|
68
|
+
/* @__PURE__ */ jsx(SkeletonTable, { rows: 5, columns: 4 })
|
|
69
|
+
] });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { Skeleton, SkeletonCard, SkeletonDashboard, SkeletonTable, SkeletonText };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const V = {
|
|
4
|
+
text: "var(--theme-text)",
|
|
5
|
+
textSecondary: "var(--theme-elevation-500)",
|
|
6
|
+
bg: "var(--theme-elevation-50)",
|
|
7
|
+
bgCard: "var(--theme-elevation-100)",
|
|
8
|
+
border: "var(--theme-elevation-300)",
|
|
9
|
+
// Professional palette
|
|
10
|
+
blue: "#2563eb",
|
|
11
|
+
amber: "#d97706",
|
|
12
|
+
orange: "#ea580c",
|
|
13
|
+
green: "#16a34a",
|
|
14
|
+
red: "#dc2626",
|
|
15
|
+
// Legacy aliases (backward compat for views not yet updated)
|
|
16
|
+
cyan: "#2563eb",
|
|
17
|
+
yellow: "#d97706"
|
|
18
|
+
};
|
|
19
|
+
const btnStyle = (bg, opts) => ({
|
|
20
|
+
padding: opts?.small ? "6px 12px" : "8px 14px",
|
|
21
|
+
borderRadius: 6,
|
|
22
|
+
border: `1px solid var(--theme-elevation-300)`,
|
|
23
|
+
backgroundColor: bg,
|
|
24
|
+
color: "#fff",
|
|
25
|
+
fontWeight: 600,
|
|
26
|
+
fontSize: opts?.small ? 12 : 13,
|
|
27
|
+
cursor: opts?.disabled ? "not-allowed" : "pointer",
|
|
28
|
+
opacity: opts?.disabled ? 0.5 : 1,
|
|
29
|
+
textDecoration: "none",
|
|
30
|
+
whiteSpace: "nowrap"
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
exports.V = V;
|
|
34
|
+
exports.btnStyle = btnStyle;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const V = {
|
|
2
|
+
text: "var(--theme-text)",
|
|
3
|
+
textSecondary: "var(--theme-elevation-500)",
|
|
4
|
+
bg: "var(--theme-elevation-50)",
|
|
5
|
+
bgCard: "var(--theme-elevation-100)",
|
|
6
|
+
border: "var(--theme-elevation-300)",
|
|
7
|
+
// Professional palette
|
|
8
|
+
blue: "#2563eb",
|
|
9
|
+
amber: "#d97706",
|
|
10
|
+
orange: "#ea580c",
|
|
11
|
+
green: "#16a34a",
|
|
12
|
+
red: "#dc2626",
|
|
13
|
+
// Legacy aliases (backward compat for views not yet updated)
|
|
14
|
+
cyan: "#2563eb",
|
|
15
|
+
yellow: "#d97706"
|
|
16
|
+
};
|
|
17
|
+
const btnStyle = (bg, opts) => ({
|
|
18
|
+
padding: opts?.small ? "6px 12px" : "8px 14px",
|
|
19
|
+
borderRadius: 6,
|
|
20
|
+
border: `1px solid var(--theme-elevation-300)`,
|
|
21
|
+
backgroundColor: bg,
|
|
22
|
+
color: "#fff",
|
|
23
|
+
fontWeight: 600,
|
|
24
|
+
fontSize: opts?.small ? 12 : 13,
|
|
25
|
+
cursor: opts?.disabled ? "not-allowed" : "pointer",
|
|
26
|
+
opacity: opts?.disabled ? 0.5 : 1,
|
|
27
|
+
textDecoration: "none",
|
|
28
|
+
whiteSpace: "nowrap"
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export { V, btnStyle };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_FEATURES = {
|
|
4
|
+
timeTracking: true,
|
|
5
|
+
ai: true,
|
|
6
|
+
satisfaction: true,
|
|
7
|
+
chat: true,
|
|
8
|
+
emailTracking: true,
|
|
9
|
+
canned: true,
|
|
10
|
+
merge: true,
|
|
11
|
+
snooze: true,
|
|
12
|
+
externalMessages: true,
|
|
13
|
+
clientHistory: true,
|
|
14
|
+
activityLog: true,
|
|
15
|
+
splitTicket: true,
|
|
16
|
+
scheduledReplies: true,
|
|
17
|
+
autoClose: true,
|
|
18
|
+
autoCloseDays: 7,
|
|
19
|
+
roundRobin: false
|
|
20
|
+
};
|
|
21
|
+
const STORAGE_KEY = "ticketing_features";
|
|
22
|
+
function getFeatures() {
|
|
23
|
+
if (typeof window === "undefined") return DEFAULT_FEATURES;
|
|
24
|
+
try {
|
|
25
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
|
26
|
+
if (stored) {
|
|
27
|
+
const parsed = JSON.parse(stored);
|
|
28
|
+
return { ...DEFAULT_FEATURES, ...parsed };
|
|
29
|
+
}
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
return DEFAULT_FEATURES;
|
|
33
|
+
}
|
|
34
|
+
function saveFeatures(features) {
|
|
35
|
+
if (typeof window === "undefined") return;
|
|
36
|
+
try {
|
|
37
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(features));
|
|
38
|
+
} catch {
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
exports.DEFAULT_FEATURES = DEFAULT_FEATURES;
|
|
43
|
+
exports.getFeatures = getFeatures;
|
|
44
|
+
exports.saveFeatures = saveFeatures;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const DEFAULT_FEATURES = {
|
|
2
|
+
timeTracking: true,
|
|
3
|
+
ai: true,
|
|
4
|
+
satisfaction: true,
|
|
5
|
+
chat: true,
|
|
6
|
+
emailTracking: true,
|
|
7
|
+
canned: true,
|
|
8
|
+
merge: true,
|
|
9
|
+
snooze: true,
|
|
10
|
+
externalMessages: true,
|
|
11
|
+
clientHistory: true,
|
|
12
|
+
activityLog: true,
|
|
13
|
+
splitTicket: true,
|
|
14
|
+
scheduledReplies: true,
|
|
15
|
+
autoClose: true,
|
|
16
|
+
autoCloseDays: 7,
|
|
17
|
+
roundRobin: false
|
|
18
|
+
};
|
|
19
|
+
const STORAGE_KEY = "ticketing_features";
|
|
20
|
+
function getFeatures() {
|
|
21
|
+
if (typeof window === "undefined") return DEFAULT_FEATURES;
|
|
22
|
+
try {
|
|
23
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
|
24
|
+
if (stored) {
|
|
25
|
+
const parsed = JSON.parse(stored);
|
|
26
|
+
return { ...DEFAULT_FEATURES, ...parsed };
|
|
27
|
+
}
|
|
28
|
+
} catch {
|
|
29
|
+
}
|
|
30
|
+
return DEFAULT_FEATURES;
|
|
31
|
+
}
|
|
32
|
+
function saveFeatures(features) {
|
|
33
|
+
if (typeof window === "undefined") return;
|
|
34
|
+
try {
|
|
35
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(features));
|
|
36
|
+
} catch {
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { DEFAULT_FEATURES, getFeatures, saveFeatures };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ErrorBoundary = require('./ErrorBoundary');
|
|
4
|
+
var adminTokens = require('./adminTokens');
|
|
5
|
+
var AdminViewHeader = require('./AdminViewHeader');
|
|
6
|
+
var Skeleton = require('./Skeleton');
|
|
7
|
+
var config = require('./config');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "AdminErrorBoundary", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return ErrorBoundary.AdminErrorBoundary; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "V", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return adminTokens.V; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "btnStyle", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return adminTokens.btnStyle; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "AdminViewHeader", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return AdminViewHeader.AdminViewHeader; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "Skeleton", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return Skeleton.Skeleton; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "SkeletonCard", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return Skeleton.SkeletonCard; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "SkeletonDashboard", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return Skeleton.SkeletonDashboard; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "SkeletonTable", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return Skeleton.SkeletonTable; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "SkeletonText", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return Skeleton.SkeletonText; }
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "DEFAULT_FEATURES", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return config.DEFAULT_FEATURES; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "getFeatures", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return config.getFeatures; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "saveFeatures", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return config.saveFeatures; }
|
|
58
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { AdminErrorBoundary } from './ErrorBoundary';
|
|
2
|
+
export { V, btnStyle } from './adminTokens';
|
|
3
|
+
export { AdminViewHeader } from './AdminViewHeader';
|
|
4
|
+
export { Skeleton, SkeletonCard, SkeletonDashboard, SkeletonTable, SkeletonText } from './Skeleton';
|
|
5
|
+
export { DEFAULT_FEATURES, getFeatures, saveFeatures } from './config';
|