@burdenoff/microfe-support 2026.519.1 → 2026.521.1

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 (83) hide show
  1. package/dist/generated/global-operations.js +18 -48
  2. package/dist/generated/global-operations.js.map +1 -1
  3. package/dist/generated/global-types.js.map +1 -1
  4. package/dist/index.js +8 -7
  5. package/dist/node_modules/marked/lib/marked.esm.js +1 -1
  6. package/dist/support/SupportAdminRoot.js +35 -26
  7. package/dist/support/SupportAdminRoot.js.map +1 -1
  8. package/dist/support/SupportUserRoot.js +29 -20
  9. package/dist/support/SupportUserRoot.js.map +1 -1
  10. package/dist/support/components/NotificationToast.js +1 -1
  11. package/dist/support/components/NotificationToast.js.map +1 -1
  12. package/dist/support/components/analytics/CategoryBreakdown.js +22 -37
  13. package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
  14. package/dist/support/components/analytics/PriorityBreakdown.js +28 -33
  15. package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
  16. package/dist/support/components/analytics/TopAgents.js +35 -42
  17. package/dist/support/components/analytics/TopAgents.js.map +1 -1
  18. package/dist/support/components/kb/ArticleForm.js +26 -13
  19. package/dist/support/components/kb/ArticleForm.js.map +1 -1
  20. package/dist/support/components/settings/CannedResponsesSettings.js +9 -7
  21. package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
  22. package/dist/support/components/settings/SLAPoliciesSettings.js +10 -8
  23. package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
  24. package/dist/support/components/settings/TicketCategoriesSettings.js +169 -168
  25. package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
  26. package/dist/support/components/tickets/MessageComposer.js +4 -3
  27. package/dist/support/components/tickets/MessageComposer.js.map +1 -1
  28. package/dist/support/components/tickets/MessageThread.js +1 -1
  29. package/dist/support/components/tickets/MessageThread.js.map +1 -1
  30. package/dist/support/components/tickets/TicketDetailHeader.js +41 -52
  31. package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
  32. package/dist/support/components/tickets/TicketHeader.js +70 -80
  33. package/dist/support/components/tickets/TicketHeader.js.map +1 -1
  34. package/dist/support/components/tickets/TicketSidebar.js +77 -82
  35. package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
  36. package/dist/support/events/rybbit.js +35 -0
  37. package/dist/support/events/rybbit.js.map +1 -0
  38. package/dist/support/hooks/useAnalyticsOperations.js +41 -41
  39. package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
  40. package/dist/support/hooks/useKnowledgeBaseOperations.js +50 -52
  41. package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
  42. package/dist/support/hooks/useTicketListOperations.js +51 -0
  43. package/dist/support/hooks/useTicketListOperations.js.map +1 -0
  44. package/dist/support/hooks/useTicketOperations.js +74 -109
  45. package/dist/support/hooks/useTicketOperations.js.map +1 -1
  46. package/dist/support/index.js +2 -1
  47. package/dist/support/pages/ArticleDetailAdminPage.js +148 -151
  48. package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
  49. package/dist/support/pages/ArticleDetailUserPage.js +67 -72
  50. package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
  51. package/dist/support/pages/ContactInquiriesPage.js +128 -123
  52. package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
  53. package/dist/support/pages/ContactInquiryDetailPage.js +154 -96
  54. package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
  55. package/dist/support/pages/CreateArticlePage.js +42 -42
  56. package/dist/support/pages/CreateArticlePage.js.map +1 -1
  57. package/dist/support/pages/CreateTicketPage.js +20 -11
  58. package/dist/support/pages/CreateTicketPage.js.map +1 -1
  59. package/dist/support/pages/EditArticlePage.js +66 -64
  60. package/dist/support/pages/EditArticlePage.js.map +1 -1
  61. package/dist/support/pages/KnowledgeBaseAdminPage.js +80 -85
  62. package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
  63. package/dist/support/pages/KnowledgeBaseUserPage.js +73 -78
  64. package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
  65. package/dist/support/pages/SettingsPage.js +3 -3
  66. package/dist/support/pages/SettingsPage.js.map +1 -1
  67. package/dist/support/pages/TicketDetailAdminPage.js +28 -21
  68. package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
  69. package/dist/support/pages/TicketDetailUserPage.js +121 -111
  70. package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
  71. package/dist/support/pages/TicketListPage.js +170 -196
  72. package/dist/support/pages/TicketListPage.js.map +1 -1
  73. package/dist/support/store/supportStore.js +43 -34
  74. package/dist/support/store/supportStore.js.map +1 -1
  75. package/dist/support/utils/categoryColors.js +64 -0
  76. package/dist/support/utils/categoryColors.js.map +1 -0
  77. package/dist/support/utils/index.js +38 -26
  78. package/dist/support/utils/index.js.map +1 -1
  79. package/dist/support/utils/ticketFilters.js +43 -0
  80. package/dist/support/utils/ticketFilters.js.map +1 -0
  81. package/dist/support/utils/uiTokens.js +44 -0
  82. package/dist/support/utils/uiTokens.js.map +1 -0
  83. package/package.json +1 -1
@@ -1,24 +1,25 @@
1
- import { useGetContactInquiriesQuery as e } from "../../generated/global-operations.js";
2
- import { useEffect as t, useState as n } from "react";
3
- import { AlertCircle as r, ChevronDown as i, Filter as a, Loader2 as o, Mail as s, Search as c } from "lucide-react";
4
- import { useLocation as l, useNavigate as u } from "react-router-dom";
5
- import { graphqlFetch as d } from "@burdenoff/fe-libs/shared/graphql/fetch";
6
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
1
+ import { humanizeCategory as e } from "../utils/index.js";
2
+ import { useGetContactInquiriesQuery as t } from "../../generated/global-operations.js";
3
+ import { useEffect as n, useState as r } from "react";
4
+ import { AlertCircle as i, ChevronDown as a, Filter as o, Loader2 as s, Mail as c, Search as l } from "lucide-react";
5
+ import { useLocation as u, useNavigate as d } from "react-router-dom";
6
+ import { graphqlFetch as f } from "@burdenoff/fe-libs/shared/graphql/fetch";
7
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
7
8
  //#region src/support/pages/ContactInquiriesPage.tsx
8
- var h = {
9
+ var g = {
9
10
  NEW: "bg-status-info-bg-subtle text-status-info-text",
10
11
  REVIEWED: "bg-status-warning-bg-subtle text-status-warning-text",
11
12
  CONVERTED: "bg-status-success-bg-subtle text-status-success-text",
12
13
  SPAM: "bg-status-error-bg-subtle text-status-error-text",
13
14
  ARCHIVED: "bg-bg-sunken text-text-secondary"
14
- }, g = {
15
+ }, _ = {
15
16
  NEW: "New",
16
17
  REVIEWED: "Reviewed",
17
18
  CONVERTED: "Converted",
18
19
  SPAM: "Spam",
19
20
  ARCHIVED: "Archived"
20
21
  };
21
- function _(e) {
22
+ function v(e) {
22
23
  return new Date(e).toLocaleDateString("en-US", {
23
24
  month: "short",
24
25
  day: "numeric",
@@ -27,279 +28,283 @@ function _(e) {
27
28
  minute: "2-digit"
28
29
  });
29
30
  }
30
- function v() {
31
- let v = u(), y = l().search, [b, x] = n(""), [S, C] = n(""), [w, T] = n(""), [E, D] = n(!1), [O, k] = n({}), A = {};
32
- b && (A.search = b), S && (A.status = S), w && (A.productId = w);
33
- let { data: j, loading: M, error: N, fetchMore: P } = e({
31
+ function y() {
32
+ let y = d(), b = u().search, [x, S] = r(""), [C, w] = r(""), [T, E] = r(""), [D, O] = r(!1), [k, A] = r({}), j = {};
33
+ x && (j.search = x), C && (j.status = C), T && (j.productId = T);
34
+ let { data: M, loading: N, error: P, fetchMore: F } = t({
34
35
  variables: {
35
- filter: A,
36
+ filter: j,
36
37
  limit: 50,
37
38
  offset: 0
38
39
  },
39
40
  fetchPolicy: "cache-and-network"
40
- }), F = j?.contactInquiries?.items ?? [], I = j?.contactInquiries?.total ?? 0, L = j?.contactInquiries?.hasMore ?? !1, R = Array.from(new Set(F.map((e) => e.productId).filter(Boolean)));
41
- return t(() => {
42
- let e = R.filter((e) => !O[e]);
41
+ }), I = M?.contactInquiries?.items ?? [], L = M?.contactInquiries?.total ?? 0, R = M?.contactInquiries?.hasMore ?? !1, z = Array.from(new Set(I.map((e) => e.productId).filter(Boolean)));
42
+ return n(() => {
43
+ let e = z.filter((e) => !k[e]);
43
44
  e.length !== 0 && e.forEach((e) => {
44
- d({
45
+ f({
45
46
  gateway: "global",
46
47
  query: "query($id: ID!) { platformProduct(id: $id) { name } }",
47
48
  variables: { id: e }
48
49
  }).then((t) => {
49
50
  let n = t.data?.platformProduct?.name;
50
- n && k((t) => ({
51
+ n && A((t) => ({
51
52
  ...t,
52
53
  [e]: n
53
54
  }));
54
55
  }).catch(() => {});
55
56
  });
56
- }, [R.join(",")]), M && F.length === 0 ? /* @__PURE__ */ m("div", {
57
- className: "p-6",
58
- children: [/* @__PURE__ */ m("div", {
57
+ }, [z.join(",")]), N && I.length === 0 ? /* @__PURE__ */ h("div", {
58
+ className: "p-3 sm:p-6",
59
+ children: [/* @__PURE__ */ h("div", {
59
60
  className: "flex items-center gap-3 mb-6",
60
- children: [/* @__PURE__ */ p(s, {
61
+ children: [/* @__PURE__ */ m(c, {
61
62
  size: 24,
62
63
  className: "text-text-primary"
63
- }), /* @__PURE__ */ p("h1", {
64
+ }), /* @__PURE__ */ m("h1", {
64
65
  className: "text-2xl font-bold text-text-primary",
65
66
  children: "Contact Inquiries"
66
67
  })]
67
- }), /* @__PURE__ */ m("div", {
68
+ }), /* @__PURE__ */ h("div", {
68
69
  className: "flex flex-col items-center justify-center py-16",
69
- children: [/* @__PURE__ */ p(o, {
70
+ children: [/* @__PURE__ */ m(s, {
70
71
  size: 32,
71
72
  className: "animate-spin text-text-secondary mb-4"
72
- }), /* @__PURE__ */ p("p", {
73
+ }), /* @__PURE__ */ m("p", {
73
74
  className: "text-sm text-text-secondary",
74
75
  children: "Loading inquiries..."
75
76
  })]
76
77
  })]
77
- }) : N ? /* @__PURE__ */ m("div", {
78
- className: "p-6",
79
- children: [/* @__PURE__ */ m("div", {
78
+ }) : P ? /* @__PURE__ */ h("div", {
79
+ className: "p-3 sm:p-6",
80
+ children: [/* @__PURE__ */ h("div", {
80
81
  className: "flex items-center gap-3 mb-6",
81
- children: [/* @__PURE__ */ p(s, {
82
+ children: [/* @__PURE__ */ m(c, {
82
83
  size: 24,
83
84
  className: "text-text-primary"
84
- }), /* @__PURE__ */ p("h1", {
85
+ }), /* @__PURE__ */ m("h1", {
85
86
  className: "text-2xl font-bold text-text-primary",
86
87
  children: "Contact Inquiries"
87
88
  })]
88
- }), /* @__PURE__ */ m("div", {
89
+ }), /* @__PURE__ */ h("div", {
89
90
  className: "flex flex-col items-center justify-center py-16 text-center",
90
91
  children: [
91
- /* @__PURE__ */ p("div", {
92
+ /* @__PURE__ */ m("div", {
92
93
  className: "p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4",
93
- children: /* @__PURE__ */ p(r, { size: 48 })
94
+ children: /* @__PURE__ */ m(i, { size: 48 })
94
95
  }),
95
- /* @__PURE__ */ p("h3", {
96
+ /* @__PURE__ */ m("h3", {
96
97
  className: "text-lg font-semibold text-text-primary mb-2",
97
98
  children: "Failed to load inquiries"
98
99
  }),
99
- /* @__PURE__ */ p("p", {
100
+ /* @__PURE__ */ m("p", {
100
101
  className: "text-sm text-text-secondary",
101
- children: N.message
102
+ children: P.message
102
103
  })
103
104
  ]
104
105
  })]
105
- }) : /* @__PURE__ */ m("div", {
106
- className: "p-6",
106
+ }) : /* @__PURE__ */ h("div", {
107
+ className: "p-3 sm:p-6",
107
108
  children: [
108
- /* @__PURE__ */ p("div", {
109
- className: "flex items-center justify-between mb-6",
110
- children: /* @__PURE__ */ m("div", {
109
+ /* @__PURE__ */ m("div", {
110
+ className: "flex flex-col gap-3 mb-6 sm:flex-row sm:items-center sm:justify-between",
111
+ children: /* @__PURE__ */ h("div", {
111
112
  className: "flex items-center gap-3",
112
113
  children: [
113
- /* @__PURE__ */ p(s, {
114
+ /* @__PURE__ */ m(c, {
114
115
  size: 24,
115
116
  className: "text-text-primary"
116
117
  }),
117
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
118
+ /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h1", {
118
119
  className: "text-2xl font-bold text-text-primary",
119
120
  children: "Contact Inquiries"
120
- }), /* @__PURE__ */ p("p", {
121
+ }), /* @__PURE__ */ m("p", {
121
122
  className: "text-sm text-text-secondary",
122
123
  children: "Website contact form submissions"
123
124
  })] }),
124
- /* @__PURE__ */ p("span", {
125
+ /* @__PURE__ */ m("span", {
125
126
  className: "ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-muted text-text-secondary",
126
- children: I
127
+ children: L
127
128
  })
128
129
  ]
129
130
  })
130
131
  }),
131
- /* @__PURE__ */ m("div", {
132
+ /* @__PURE__ */ h("div", {
132
133
  className: "flex flex-col sm:flex-row gap-3 mb-6",
133
- children: [/* @__PURE__ */ m("div", {
134
+ children: [/* @__PURE__ */ h("div", {
134
135
  className: "relative flex-1",
135
- children: [/* @__PURE__ */ p(c, {
136
+ children: [/* @__PURE__ */ m(l, {
136
137
  size: 16,
137
138
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
138
- }), /* @__PURE__ */ p("input", {
139
+ }), /* @__PURE__ */ m("input", {
139
140
  type: "text",
140
141
  placeholder: "Search by name, email, or subject...",
141
- value: b,
142
- onChange: (e) => x(e.target.value),
142
+ value: x,
143
+ onChange: (e) => S(e.target.value),
143
144
  className: "w-full pl-9 pr-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-accent/50"
144
145
  })]
145
- }), /* @__PURE__ */ m("button", {
146
- onClick: () => D(!E),
147
- className: "inline-flex items-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors",
146
+ }), /* @__PURE__ */ h("button", {
147
+ onClick: () => O(!D),
148
+ className: "min-h-11 inline-flex items-center justify-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors",
148
149
  children: [
149
- /* @__PURE__ */ p(a, { size: 16 }),
150
+ /* @__PURE__ */ m(o, { size: 16 }),
150
151
  "Filters",
151
- /* @__PURE__ */ p(i, {
152
+ /* @__PURE__ */ m(a, {
152
153
  size: 14,
153
- className: E ? "rotate-180 transition-transform" : "transition-transform"
154
+ className: D ? "rotate-180 transition-transform" : "transition-transform"
154
155
  })
155
156
  ]
156
157
  })]
157
158
  }),
158
- E && /* @__PURE__ */ p("div", {
159
+ D && /* @__PURE__ */ m("div", {
159
160
  className: "mb-6 p-4 bg-surface border border-default rounded-lg",
160
- children: /* @__PURE__ */ m("div", {
161
- className: "flex flex-wrap gap-4",
162
- children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
161
+ children: /* @__PURE__ */ h("div", {
162
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
163
+ children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
163
164
  className: "block text-xs font-medium text-text-secondary mb-1",
164
165
  children: "Status"
165
- }), /* @__PURE__ */ m("select", {
166
- value: S,
167
- onChange: (e) => C(e.target.value),
168
- className: "px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
166
+ }), /* @__PURE__ */ h("select", {
167
+ value: C,
168
+ onChange: (e) => w(e.target.value),
169
+ className: "min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
169
170
  children: [
170
- /* @__PURE__ */ p("option", {
171
+ /* @__PURE__ */ m("option", {
171
172
  value: "",
172
173
  children: "All statuses"
173
174
  }),
174
- /* @__PURE__ */ p("option", {
175
+ /* @__PURE__ */ m("option", {
175
176
  value: "NEW",
176
177
  children: "New"
177
178
  }),
178
- /* @__PURE__ */ p("option", {
179
+ /* @__PURE__ */ m("option", {
179
180
  value: "REVIEWED",
180
181
  children: "Reviewed"
181
182
  }),
182
- /* @__PURE__ */ p("option", {
183
+ /* @__PURE__ */ m("option", {
183
184
  value: "CONVERTED",
184
185
  children: "Converted"
185
186
  }),
186
- /* @__PURE__ */ p("option", {
187
+ /* @__PURE__ */ m("option", {
187
188
  value: "SPAM",
188
189
  children: "Spam"
189
190
  }),
190
- /* @__PURE__ */ p("option", {
191
+ /* @__PURE__ */ m("option", {
191
192
  value: "ARCHIVED",
192
193
  children: "Archived"
193
194
  })
194
195
  ]
195
- })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
196
+ })] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
196
197
  className: "block text-xs font-medium text-text-secondary mb-1",
197
198
  children: "Product"
198
- }), /* @__PURE__ */ m("select", {
199
- value: w,
200
- onChange: (e) => T(e.target.value),
201
- className: "px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
202
- children: [/* @__PURE__ */ p("option", {
199
+ }), /* @__PURE__ */ h("select", {
200
+ value: T,
201
+ onChange: (e) => E(e.target.value),
202
+ className: "min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
203
+ children: [/* @__PURE__ */ m("option", {
203
204
  value: "",
204
205
  children: "All products"
205
- }), R.map((e) => /* @__PURE__ */ p("option", {
206
+ }), z.map((e) => /* @__PURE__ */ m("option", {
206
207
  value: e,
207
- children: O[e] || e
208
+ children: k[e] || e
208
209
  }, e))]
209
210
  })] })]
210
211
  })
211
212
  }),
212
- F.length === 0 ? /* @__PURE__ */ m("div", {
213
+ I.length === 0 ? /* @__PURE__ */ h("div", {
213
214
  className: "flex flex-col items-center justify-center py-16 text-center",
214
215
  children: [
215
- /* @__PURE__ */ p("div", {
216
+ /* @__PURE__ */ m("div", {
216
217
  className: "p-4 rounded-2xl bg-muted mb-4",
217
- children: /* @__PURE__ */ p(s, {
218
+ children: /* @__PURE__ */ m(c, {
218
219
  size: 48,
219
220
  className: "text-text-secondary opacity-50"
220
221
  })
221
222
  }),
222
- /* @__PURE__ */ p("h3", {
223
+ /* @__PURE__ */ m("h3", {
223
224
  className: "text-lg font-semibold text-text-primary mb-2",
224
225
  children: "No inquiries yet"
225
226
  }),
226
- /* @__PURE__ */ p("p", {
227
+ /* @__PURE__ */ m("p", {
227
228
  className: "text-sm text-text-secondary",
228
229
  children: "Contact form submissions from your product websites will appear here."
229
230
  })
230
231
  ]
231
- }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
232
+ }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
232
233
  className: "space-y-3",
233
- children: F.map((e) => /* @__PURE__ */ p("button", {
234
- onClick: () => v(`/support/inquiries/${e.id}${y}`),
234
+ children: I.map((t) => /* @__PURE__ */ m("button", {
235
+ onClick: () => y(`/support/inquiries/${t.id}${b}`),
235
236
  className: "w-full text-left p-4 bg-surface border border-default rounded-lg hover:bg-muted/50 hover:border-accent/30 transition-all duration-200 group",
236
- children: /* @__PURE__ */ m("div", {
237
- className: "flex items-start justify-between gap-4",
238
- children: [/* @__PURE__ */ m("div", {
237
+ children: /* @__PURE__ */ h("div", {
238
+ className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
239
+ children: [/* @__PURE__ */ h("div", {
239
240
  className: "flex-1 min-w-0",
240
241
  children: [
241
- /* @__PURE__ */ m("div", {
242
+ /* @__PURE__ */ h("div", {
242
243
  className: "flex items-center gap-2 mb-1",
243
244
  children: [
244
- /* @__PURE__ */ p("h3", {
245
+ /* @__PURE__ */ m("h3", {
245
246
  className: "text-sm font-semibold text-text-primary truncate group-hover:text-accent transition-colors",
246
- children: e.subject
247
+ children: t.subject
247
248
  }),
248
- /* @__PURE__ */ p("span", {
249
- className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${h[e.status] || h.NEW}`,
250
- children: g[e.status] || e.status
249
+ /* @__PURE__ */ m("span", {
250
+ className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${g[t.status] || g.NEW}`,
251
+ children: _[t.status] || t.status
251
252
  }),
252
- e.productId && O[e.productId] && /* @__PURE__ */ p("span", {
253
+ t.productId && k[t.productId] && /* @__PURE__ */ m("span", {
253
254
  className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple",
254
- title: `Product: ${O[e.productId]}`,
255
- children: O[e.productId]
255
+ title: `Product: ${k[t.productId]}`,
256
+ children: k[t.productId]
257
+ }),
258
+ t.category && /* @__PURE__ */ m("span", {
259
+ className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-blue-subtle text-accent-blue",
260
+ children: e(t.category)
256
261
  })
257
262
  ]
258
263
  }),
259
- /* @__PURE__ */ m("p", {
264
+ /* @__PURE__ */ h("p", {
260
265
  className: "text-sm text-text-secondary mb-1",
261
266
  children: [
262
- /* @__PURE__ */ p("span", {
267
+ /* @__PURE__ */ m("span", {
263
268
  className: "font-medium",
264
- children: e.name
269
+ children: t.name
265
270
  }),
266
- /* @__PURE__ */ p("span", {
271
+ /* @__PURE__ */ m("span", {
267
272
  className: "mx-1.5 text-text-secondary/50",
268
273
  children: "·"
269
274
  }),
270
- /* @__PURE__ */ p("span", { children: e.email }),
271
- e.company && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
275
+ /* @__PURE__ */ m("span", { children: t.email }),
276
+ t.company && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("span", {
272
277
  className: "mx-1.5 text-text-secondary/50",
273
278
  children: "·"
274
- }), /* @__PURE__ */ p("span", { children: e.company })] })
279
+ }), /* @__PURE__ */ m("span", { children: t.company })] })
275
280
  ]
276
281
  }),
277
- /* @__PURE__ */ p("p", {
282
+ /* @__PURE__ */ m("p", {
278
283
  className: "text-xs text-text-secondary truncate",
279
- children: e.message
284
+ children: t.message
280
285
  })
281
286
  ]
282
- }), /* @__PURE__ */ p("div", {
283
- className: "text-xs text-text-secondary whitespace-nowrap",
284
- children: _(e.createdAt)
287
+ }), /* @__PURE__ */ m("div", {
288
+ className: "text-xs text-text-secondary sm:whitespace-nowrap",
289
+ children: v(t.createdAt)
285
290
  })]
286
291
  })
287
- }, e.id))
288
- }), L && /* @__PURE__ */ p("div", {
292
+ }, t.id))
293
+ }), R && /* @__PURE__ */ m("div", {
289
294
  className: "flex justify-center mt-6",
290
- children: /* @__PURE__ */ m("button", {
295
+ children: /* @__PURE__ */ h("button", {
291
296
  onClick: () => {
292
- L && P({
293
- variables: { offset: F.length },
297
+ R && F({
298
+ variables: { offset: I.length },
294
299
  updateQuery: (e, { fetchMoreResult: t }) => t ? { contactInquiries: {
295
300
  ...t.contactInquiries,
296
301
  items: [...e.contactInquiries?.items ?? [], ...t.contactInquiries?.items ?? []]
297
302
  } } : e
298
303
  });
299
304
  },
300
- disabled: M,
301
- className: "inline-flex items-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors disabled:opacity-50",
302
- children: [M ? /* @__PURE__ */ p(o, {
305
+ disabled: N,
306
+ className: "min-h-11 inline-flex items-center justify-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors disabled:opacity-50",
307
+ children: [N ? /* @__PURE__ */ m(s, {
303
308
  size: 14,
304
309
  className: "animate-spin"
305
310
  }) : null, "Load more"]
@@ -309,6 +314,6 @@ function v() {
309
314
  });
310
315
  }
311
316
  //#endregion
312
- export { v as ContactInquiriesPage };
317
+ export { y as ContactInquiriesPage };
313
318
 
314
319
  //# sourceMappingURL=ContactInquiriesPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContactInquiriesPage.js","names":[],"sources":["../../../src/support/pages/ContactInquiriesPage.tsx"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { useNavigate, useLocation } from 'react-router-dom';\nimport { Mail, Search, Filter, Loader2, AlertCircle, ChevronDown } from 'lucide-react';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport {\n useGetContactInquiriesQuery,\n type GetContactInquiriesQuery,\n} from '../../generated/global-operations';\nimport type { ContactInquiryStatus, ContactInquiryFilterInput } from '../../generated/global-types';\n\ntype ContactInquiry = GetContactInquiriesQuery['contactInquiries']['items'][number];\n\nconst statusColors: Record<string, string> = {\n NEW: 'bg-status-info-bg-subtle text-status-info-text',\n REVIEWED: 'bg-status-warning-bg-subtle text-status-warning-text',\n CONVERTED: 'bg-status-success-bg-subtle text-status-success-text',\n SPAM: 'bg-status-error-bg-subtle text-status-error-text',\n ARCHIVED: 'bg-bg-sunken text-text-secondary',\n};\n\nconst statusLabels: Record<string, string> = {\n NEW: 'New',\n REVIEWED: 'Reviewed',\n CONVERTED: 'Converted',\n SPAM: 'Spam',\n ARCHIVED: 'Archived',\n};\n\nfunction formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nexport function ContactInquiriesPage() {\n const navigate = useNavigate();\n const location = useLocation();\n const queryParams = location.search;\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<ContactInquiryStatus | ''>('');\n const [productFilter, setProductFilter] = useState('');\n const [showFilters, setShowFilters] = useState(false);\n const [productNames, setProductNames] = useState<Record<string, string>>({});\n\n const filter: ContactInquiryFilterInput = {};\n if (search) filter.search = search;\n if (statusFilter) filter.status = statusFilter;\n if (productFilter) filter.productId = productFilter;\n\n const { data, loading, error, fetchMore } = useGetContactInquiriesQuery({\n variables: { filter, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n const inquiries = data?.contactInquiries?.items ?? [];\n const total = data?.contactInquiries?.total ?? 0;\n const hasMore = data?.contactInquiries?.hasMore ?? false;\n\n // Fetch product names for the filter dropdown\n const productIds = Array.from(\n new Set(inquiries.map((i: ContactInquiry) => i.productId).filter(Boolean))\n ) as string[];\n useEffect(() => {\n const unknownIds = productIds.filter((pid) => !productNames[pid]);\n if (unknownIds.length === 0) return;\n unknownIds.forEach((pid) => {\n graphqlFetch<{ platformProduct?: { name?: string } }>({\n gateway: 'global',\n query: 'query($id: ID!) { platformProduct(id: $id) { name } }',\n variables: { id: pid },\n })\n .then((result) => {\n const name = result.data?.platformProduct?.name;\n if (name) setProductNames((prev) => ({ ...prev, [pid]: name }));\n })\n .catch(() => {});\n });\n }, [productIds.join(',')]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const loadMore = () => {\n if (!hasMore) return;\n fetchMore({\n variables: { offset: inquiries.length },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n return {\n contactInquiries: {\n ...fetchMoreResult.contactInquiries,\n items: [\n ...(prev.contactInquiries?.items ?? []),\n ...(fetchMoreResult.contactInquiries?.items ?? []),\n ],\n },\n };\n },\n });\n };\n\n // Loading state\n if (loading && inquiries.length === 0) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Mail size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16\">\n <Loader2 size={32} className=\"animate-spin text-text-secondary mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading inquiries...</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Mail size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">Failed to load inquiries</h3>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-3\">\n <Mail size={24} className=\"text-text-primary\" />\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n <p className=\"text-sm text-text-secondary\">Website contact form submissions</p>\n </div>\n <span className=\"ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-muted text-text-secondary\">\n {total}\n </span>\n </div>\n </div>\n\n {/* Toolbar */}\n <div className=\"flex flex-col sm:flex-row gap-3 mb-6\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search\n size={16}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <input\n type=\"text\"\n placeholder=\"Search by name, email, or subject...\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"w-full pl-9 pr-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n />\n </div>\n\n {/* Filter toggle */}\n <button\n onClick={() => setShowFilters(!showFilters)}\n className=\"inline-flex items-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors\"\n >\n <Filter size={16} />\n Filters\n <ChevronDown\n size={14}\n className={showFilters ? 'rotate-180 transition-transform' : 'transition-transform'}\n />\n </button>\n </div>\n\n {/* Filters panel */}\n {showFilters && (\n <div className=\"mb-6 p-4 bg-surface border border-default rounded-lg\">\n <div className=\"flex flex-wrap gap-4\">\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">Status</label>\n <select\n value={statusFilter}\n onChange={(e) => setStatusFilter(e.target.value as ContactInquiryStatus | '')}\n className=\"px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All statuses</option>\n <option value=\"NEW\">New</option>\n <option value=\"REVIEWED\">Reviewed</option>\n <option value=\"CONVERTED\">Converted</option>\n <option value=\"SPAM\">Spam</option>\n <option value=\"ARCHIVED\">Archived</option>\n </select>\n </div>\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">Product</label>\n <select\n value={productFilter}\n onChange={(e) => setProductFilter(e.target.value)}\n className=\"px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All products</option>\n {productIds.map((pid) => (\n <option key={pid} value={pid}>\n {productNames[pid] || pid}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n\n {/* Empty state */}\n {inquiries.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-muted mb-4\">\n <Mail size={48} className=\"text-text-secondary opacity-50\" />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">No inquiries yet</h3>\n <p className=\"text-sm text-text-secondary\">\n Contact form submissions from your product websites will appear here.\n </p>\n </div>\n ) : (\n <>\n {/* Inquiry list */}\n <div className=\"space-y-3\">\n {inquiries.map((inquiry: ContactInquiry) => (\n <button\n key={inquiry.id}\n onClick={() => navigate(`/support/inquiries/${inquiry.id}${queryParams}`)}\n className=\"w-full text-left p-4 bg-surface border border-default rounded-lg hover:bg-muted/50 hover:border-accent/30 transition-all duration-200 group\"\n >\n <div className=\"flex items-start justify-between gap-4\">\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 mb-1\">\n <h3 className=\"text-sm font-semibold text-text-primary truncate group-hover:text-accent transition-colors\">\n {inquiry.subject}\n </h3>\n <span\n className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${statusColors[inquiry.status] || statusColors.NEW}`}\n >\n {statusLabels[inquiry.status] || inquiry.status}\n </span>\n {inquiry.productId && productNames[inquiry.productId] && (\n <span\n className=\"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple\"\n title={`Product: ${productNames[inquiry.productId]}`}\n >\n {productNames[inquiry.productId]}\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary mb-1\">\n <span className=\"font-medium\">{inquiry.name}</span>\n <span className=\"mx-1.5 text-text-secondary/50\">&middot;</span>\n <span>{inquiry.email}</span>\n {inquiry.company && (\n <>\n <span className=\"mx-1.5 text-text-secondary/50\">&middot;</span>\n <span>{inquiry.company}</span>\n </>\n )}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{inquiry.message}</p>\n </div>\n <div className=\"text-xs text-text-secondary whitespace-nowrap\">\n {formatDate(inquiry.createdAt)}\n </div>\n </div>\n </button>\n ))}\n </div>\n\n {/* Load more */}\n {hasMore && (\n <div className=\"flex justify-center mt-6\">\n <button\n onClick={loadMore}\n disabled={loading}\n className=\"inline-flex items-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors disabled:opacity-50\"\n >\n {loading ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Load more\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAYA,IAAM,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;CACX,EAEK,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;CACX;AAED,SAAS,EAAW,GAA4B;AAC9C,QAAO,IAAI,KAAK,EAAW,CAAC,mBAAmB,SAAS;EACtD,OAAO;EACP,KAAK;EACL,MAAM;EACN,MAAM;EACN,QAAQ;EACT,CAAC;;AAGJ,SAAgB,IAAuB;CACrC,IAAM,IAAW,GAAa,EAExB,IADW,GAAa,CACD,QACvB,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAc,KAAmB,EAAoC,GAAG,EACzE,CAAC,GAAe,KAAoB,EAAS,GAAG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7MS;AAChB,WACL,EAAU;OACR,WAAW,EAAE,QAAQ,EAAU,QAAQ;OACvC,cAAc,GAAM,EAAE,yBACf,IACE,EACL,kBAAkB;QAChB,GAAG,EAAgB;QACnB,OAAO,CACL,GAAI,EAAK,kBAAkB,SAAS,EAAE,EACtC,GAAI,EAAgB,kBAAkB,SAAS,EAAE,CAClD;QACF,EACF,GAT4B;OAWhC,CAAC;;KA8LU,UAAU;KACV,WAAU;eAHZ,CAKG,IAAU,kBAAC,GAAD;MAAS,MAAM;MAAI,WAAU;MAAiB,CAAA,GAAG,MAAK,YAE1D;;IACL,CAAA,CAEP,EAAA,CAAA;GAED"}
1
+ {"version":3,"file":"ContactInquiriesPage.js","names":[],"sources":["../../../src/support/pages/ContactInquiriesPage.tsx"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { useNavigate, useLocation } from 'react-router-dom';\nimport { Mail, Search, Filter, Loader2, AlertCircle, ChevronDown } from 'lucide-react';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport {\n useGetContactInquiriesQuery,\n type GetContactInquiriesQuery,\n} from '../../generated/global-operations';\nimport type { ContactInquiryStatus, ContactInquiryFilterInput } from '../../generated/global-types';\nimport { humanizeCategory } from '../utils';\n\ntype ContactInquiry = GetContactInquiriesQuery['contactInquiries']['items'][number];\n\nconst statusColors: Record<string, string> = {\n NEW: 'bg-status-info-bg-subtle text-status-info-text',\n REVIEWED: 'bg-status-warning-bg-subtle text-status-warning-text',\n CONVERTED: 'bg-status-success-bg-subtle text-status-success-text',\n SPAM: 'bg-status-error-bg-subtle text-status-error-text',\n ARCHIVED: 'bg-bg-sunken text-text-secondary',\n};\n\nconst statusLabels: Record<string, string> = {\n NEW: 'New',\n REVIEWED: 'Reviewed',\n CONVERTED: 'Converted',\n SPAM: 'Spam',\n ARCHIVED: 'Archived',\n};\n\nfunction formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nexport function ContactInquiriesPage() {\n const navigate = useNavigate();\n const location = useLocation();\n const queryParams = location.search;\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<ContactInquiryStatus | ''>('');\n const [productFilter, setProductFilter] = useState('');\n const [showFilters, setShowFilters] = useState(false);\n const [productNames, setProductNames] = useState<Record<string, string>>({});\n\n const filter: ContactInquiryFilterInput = {};\n if (search) filter.search = search;\n if (statusFilter) filter.status = statusFilter;\n if (productFilter) filter.productId = productFilter;\n\n const { data, loading, error, fetchMore } = useGetContactInquiriesQuery({\n variables: { filter, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n const inquiries = data?.contactInquiries?.items ?? [];\n const total = data?.contactInquiries?.total ?? 0;\n const hasMore = data?.contactInquiries?.hasMore ?? false;\n\n // Fetch product names for the filter dropdown\n const productIds = Array.from(\n new Set(inquiries.map((i: ContactInquiry) => i.productId).filter(Boolean))\n ) as string[];\n useEffect(() => {\n const unknownIds = productIds.filter((pid) => !productNames[pid]);\n if (unknownIds.length === 0) return;\n unknownIds.forEach((pid) => {\n graphqlFetch<{ platformProduct?: { name?: string } }>({\n gateway: 'global',\n query: 'query($id: ID!) { platformProduct(id: $id) { name } }',\n variables: { id: pid },\n })\n .then((result) => {\n const name = result.data?.platformProduct?.name;\n if (name) setProductNames((prev) => ({ ...prev, [pid]: name }));\n })\n .catch(() => {});\n });\n }, [productIds.join(',')]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const loadMore = () => {\n if (!hasMore) return;\n fetchMore({\n variables: { offset: inquiries.length },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n return {\n contactInquiries: {\n ...fetchMoreResult.contactInquiries,\n items: [\n ...(prev.contactInquiries?.items ?? []),\n ...(fetchMoreResult.contactInquiries?.items ?? []),\n ],\n },\n };\n },\n });\n };\n\n // Loading state\n if (loading && inquiries.length === 0) {\n return (\n <div className=\"p-3 sm:p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Mail size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16\">\n <Loader2 size={32} className=\"animate-spin text-text-secondary mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading inquiries...</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-3 sm:p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Mail size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">Failed to load inquiries</h3>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-3 sm:p-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-3 mb-6 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-3\">\n <Mail size={24} className=\"text-text-primary\" />\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n <p className=\"text-sm text-text-secondary\">Website contact form submissions</p>\n </div>\n <span className=\"ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-muted text-text-secondary\">\n {total}\n </span>\n </div>\n </div>\n\n {/* Toolbar */}\n <div className=\"flex flex-col sm:flex-row gap-3 mb-6\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search\n size={16}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <input\n type=\"text\"\n placeholder=\"Search by name, email, or subject...\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"w-full pl-9 pr-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n />\n </div>\n\n {/* Filter toggle */}\n <button\n onClick={() => setShowFilters(!showFilters)}\n className=\"min-h-11 inline-flex items-center justify-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors\"\n >\n <Filter size={16} />\n Filters\n <ChevronDown\n size={14}\n className={showFilters ? 'rotate-180 transition-transform' : 'transition-transform'}\n />\n </button>\n </div>\n\n {/* Filters panel */}\n {showFilters && (\n <div className=\"mb-6 p-4 bg-surface border border-default rounded-lg\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">Status</label>\n <select\n value={statusFilter}\n onChange={(e) => setStatusFilter(e.target.value as ContactInquiryStatus | '')}\n className=\"min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All statuses</option>\n <option value=\"NEW\">New</option>\n <option value=\"REVIEWED\">Reviewed</option>\n <option value=\"CONVERTED\">Converted</option>\n <option value=\"SPAM\">Spam</option>\n <option value=\"ARCHIVED\">Archived</option>\n </select>\n </div>\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">Product</label>\n <select\n value={productFilter}\n onChange={(e) => setProductFilter(e.target.value)}\n className=\"min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All products</option>\n {productIds.map((pid) => (\n <option key={pid} value={pid}>\n {productNames[pid] || pid}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n\n {/* Empty state */}\n {inquiries.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-muted mb-4\">\n <Mail size={48} className=\"text-text-secondary opacity-50\" />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">No inquiries yet</h3>\n <p className=\"text-sm text-text-secondary\">\n Contact form submissions from your product websites will appear here.\n </p>\n </div>\n ) : (\n <>\n {/* Inquiry list */}\n <div className=\"space-y-3\">\n {inquiries.map((inquiry: ContactInquiry) => (\n <button\n key={inquiry.id}\n onClick={() => navigate(`/support/inquiries/${inquiry.id}${queryParams}`)}\n className=\"w-full text-left p-4 bg-surface border border-default rounded-lg hover:bg-muted/50 hover:border-accent/30 transition-all duration-200 group\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 mb-1\">\n <h3 className=\"text-sm font-semibold text-text-primary truncate group-hover:text-accent transition-colors\">\n {inquiry.subject}\n </h3>\n <span\n className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${statusColors[inquiry.status] || statusColors.NEW}`}\n >\n {statusLabels[inquiry.status] || inquiry.status}\n </span>\n {inquiry.productId && productNames[inquiry.productId] && (\n <span\n className=\"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple\"\n title={`Product: ${productNames[inquiry.productId]}`}\n >\n {productNames[inquiry.productId]}\n </span>\n )}\n {inquiry.category && (\n <span className=\"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-blue-subtle text-accent-blue\">\n {humanizeCategory(inquiry.category)}\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary mb-1\">\n <span className=\"font-medium\">{inquiry.name}</span>\n <span className=\"mx-1.5 text-text-secondary/50\">&middot;</span>\n <span>{inquiry.email}</span>\n {inquiry.company && (\n <>\n <span className=\"mx-1.5 text-text-secondary/50\">&middot;</span>\n <span>{inquiry.company}</span>\n </>\n )}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{inquiry.message}</p>\n </div>\n <div className=\"text-xs text-text-secondary sm:whitespace-nowrap\">\n {formatDate(inquiry.createdAt)}\n </div>\n </div>\n </button>\n ))}\n </div>\n\n {/* Load more */}\n {hasMore && (\n <div className=\"flex justify-center mt-6\">\n <button\n onClick={loadMore}\n disabled={loading}\n className=\"min-h-11 inline-flex items-center justify-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors disabled:opacity-50\"\n >\n {loading ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Load more\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAaA,IAAM,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;CACX,EAEK,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;CACX;AAED,SAAS,EAAW,GAA4B;AAC9C,QAAO,IAAI,KAAK,EAAW,CAAC,mBAAmB,SAAS;EACtD,OAAO;EACP,KAAK;EACL,MAAM;EACN,MAAM;EACN,QAAQ;EACT,CAAC;;AAGJ,SAAgB,IAAuB;CACrC,IAAM,IAAW,GAAa,EAExB,IADW,GAAa,CACD,QACvB,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAc,KAAmB,EAAoC,GAAG,EACzE,CAAC,GAAe,KAAoB,EAAS,GAAG,EAChD,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAc,KAAmB,EAAiC,EAAE,CAAC,EAEtE,IAAoC,EAAE;AAG5C,CAFI,MAAQ,EAAO,SAAS,IACxB,MAAc,EAAO,SAAS,IAC9B,MAAe,EAAO,YAAY;CAEtC,IAAM,EAAE,SAAM,YAAS,UAAO,iBAAc,EAA4B;EACtE,WAAW;GAAE;GAAQ,OAAO;GAAI,QAAQ;GAAG;EAC3C,aAAa;EACd,CAAC,EAEI,IAAY,GAAM,kBAAkB,SAAS,EAAE,EAC/C,IAAQ,GAAM,kBAAkB,SAAS,G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