@burdenoff/microfe-proserviceworld 2026.1028.1 → 2026.1031.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/generated/global-types.d.ts +9699 -583
  2. package/dist/generated/global-types.d.ts.map +1 -1
  3. package/dist/generated/wspace-types.d.ts +18076 -2999
  4. package/dist/generated/wspace-types.d.ts.map +1 -1
  5. package/dist/proserviceworld/__tests__/schemaStub.d.ts +20 -0
  6. package/dist/proserviceworld/__tests__/schemaStub.d.ts.map +1 -0
  7. package/dist/proserviceworld/components/CredentialDirectory.js +44 -43
  8. package/dist/proserviceworld/components/CredentialDirectory.js.map +1 -1
  9. package/dist/proserviceworld/components/CredentialReminderPanel.js +5 -4
  10. package/dist/proserviceworld/components/CredentialReminderPanel.js.map +1 -1
  11. package/dist/proserviceworld/components/ui.d.ts +7 -3
  12. package/dist/proserviceworld/components/ui.d.ts.map +1 -1
  13. package/dist/proserviceworld/components/ui.js +135 -121
  14. package/dist/proserviceworld/components/ui.js.map +1 -1
  15. package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts.map +1 -1
  16. package/dist/proserviceworld/hooks/useProServiceWorldApi.js.map +1 -1
  17. package/dist/proserviceworld/hooks/useTr.d.ts +49 -8
  18. package/dist/proserviceworld/hooks/useTr.d.ts.map +1 -1
  19. package/dist/proserviceworld/hooks/useTr.js +45 -21
  20. package/dist/proserviceworld/hooks/useTr.js.map +1 -1
  21. package/dist/proserviceworld/i18n/catalog/analytics.d.ts +5 -0
  22. package/dist/proserviceworld/i18n/catalog/analytics.d.ts.map +1 -0
  23. package/dist/proserviceworld/i18n/catalog/analytics.js +271 -0
  24. package/dist/proserviceworld/i18n/catalog/analytics.js.map +1 -0
  25. package/dist/proserviceworld/i18n/catalog/common.d.ts +9 -0
  26. package/dist/proserviceworld/i18n/catalog/common.d.ts.map +1 -0
  27. package/dist/proserviceworld/i18n/catalog/common.js +163 -0
  28. package/dist/proserviceworld/i18n/catalog/common.js.map +1 -0
  29. package/dist/proserviceworld/i18n/catalog/compliance.d.ts +5 -0
  30. package/dist/proserviceworld/i18n/catalog/compliance.d.ts.map +1 -0
  31. package/dist/proserviceworld/i18n/catalog/compliance.js +157 -0
  32. package/dist/proserviceworld/i18n/catalog/compliance.js.map +1 -0
  33. package/dist/proserviceworld/i18n/catalog/conflicts.d.ts +5 -0
  34. package/dist/proserviceworld/i18n/catalog/conflicts.d.ts.map +1 -0
  35. package/dist/proserviceworld/i18n/catalog/conflicts.js +145 -0
  36. package/dist/proserviceworld/i18n/catalog/conflicts.js.map +1 -0
  37. package/dist/proserviceworld/i18n/catalog/documents.d.ts +5 -0
  38. package/dist/proserviceworld/i18n/catalog/documents.d.ts.map +1 -0
  39. package/dist/proserviceworld/i18n/catalog/documents.js +157 -0
  40. package/dist/proserviceworld/i18n/catalog/documents.js.map +1 -0
  41. package/dist/proserviceworld/i18n/catalog/enums.d.ts +10 -0
  42. package/dist/proserviceworld/i18n/catalog/enums.d.ts.map +1 -0
  43. package/dist/proserviceworld/i18n/catalog/enums.js +481 -0
  44. package/dist/proserviceworld/i18n/catalog/enums.js.map +1 -0
  45. package/dist/proserviceworld/i18n/catalog/index.d.ts +9 -0
  46. package/dist/proserviceworld/i18n/catalog/index.d.ts.map +1 -0
  47. package/dist/proserviceworld/i18n/catalog/index.js +25 -0
  48. package/dist/proserviceworld/i18n/catalog/index.js.map +1 -0
  49. package/dist/proserviceworld/i18n/catalog/invoices.d.ts +5 -0
  50. package/dist/proserviceworld/i18n/catalog/invoices.d.ts.map +1 -0
  51. package/dist/proserviceworld/i18n/catalog/invoices.js +247 -0
  52. package/dist/proserviceworld/i18n/catalog/invoices.js.map +1 -0
  53. package/dist/proserviceworld/i18n/catalog/practiceAreas.d.ts +5 -0
  54. package/dist/proserviceworld/i18n/catalog/practiceAreas.d.ts.map +1 -0
  55. package/dist/proserviceworld/i18n/catalog/practiceAreas.js +97 -0
  56. package/dist/proserviceworld/i18n/catalog/practiceAreas.js.map +1 -0
  57. package/dist/proserviceworld/i18n/catalog/time.d.ts +5 -0
  58. package/dist/proserviceworld/i18n/catalog/time.d.ts.map +1 -0
  59. package/dist/proserviceworld/i18n/catalog/time.js +301 -0
  60. package/dist/proserviceworld/i18n/catalog/time.js.map +1 -0
  61. package/dist/proserviceworld/i18n/index.d.ts +10 -9
  62. package/dist/proserviceworld/i18n/index.d.ts.map +1 -1
  63. package/dist/proserviceworld/i18n/index.js +16 -12
  64. package/dist/proserviceworld/i18n/index.js.map +1 -1
  65. package/dist/proserviceworld/i18n/types.d.ts +13 -0
  66. package/dist/proserviceworld/i18n/types.d.ts.map +1 -0
  67. package/dist/proserviceworld/i18n/types.js +18 -0
  68. package/dist/proserviceworld/i18n/types.js.map +1 -0
  69. package/dist/proserviceworld/pages/AnalyticsPage.d.ts.map +1 -1
  70. package/dist/proserviceworld/pages/AnalyticsPage.js +209 -197
  71. package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
  72. package/dist/proserviceworld/pages/ClientDetailPage.js +99 -98
  73. package/dist/proserviceworld/pages/ClientDetailPage.js.map +1 -1
  74. package/dist/proserviceworld/pages/ClientsPage.d.ts.map +1 -1
  75. package/dist/proserviceworld/pages/ClientsPage.js +181 -181
  76. package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
  77. package/dist/proserviceworld/pages/CompliancePage.d.ts.map +1 -1
  78. package/dist/proserviceworld/pages/CompliancePage.js +210 -209
  79. package/dist/proserviceworld/pages/CompliancePage.js.map +1 -1
  80. package/dist/proserviceworld/pages/ConflictsPage.d.ts.map +1 -1
  81. package/dist/proserviceworld/pages/ConflictsPage.js +139 -138
  82. package/dist/proserviceworld/pages/ConflictsPage.js.map +1 -1
  83. package/dist/proserviceworld/pages/DocumentsPage.d.ts.map +1 -1
  84. package/dist/proserviceworld/pages/DocumentsPage.js +150 -149
  85. package/dist/proserviceworld/pages/DocumentsPage.js.map +1 -1
  86. package/dist/proserviceworld/pages/EngagementDetailPage.js +105 -104
  87. package/dist/proserviceworld/pages/EngagementDetailPage.js.map +1 -1
  88. package/dist/proserviceworld/pages/EngagementsPage.d.ts.map +1 -1
  89. package/dist/proserviceworld/pages/EngagementsPage.js +137 -137
  90. package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
  91. package/dist/proserviceworld/pages/InvoicesPage.d.ts.map +1 -1
  92. package/dist/proserviceworld/pages/InvoicesPage.js +257 -256
  93. package/dist/proserviceworld/pages/InvoicesPage.js.map +1 -1
  94. package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -1
  95. package/dist/proserviceworld/pages/MattersPage.js +166 -166
  96. package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
  97. package/dist/proserviceworld/pages/PracticeAreasPage.d.ts.map +1 -1
  98. package/dist/proserviceworld/pages/PracticeAreasPage.js +100 -99
  99. package/dist/proserviceworld/pages/PracticeAreasPage.js.map +1 -1
  100. package/dist/proserviceworld/pages/PractitionerCredentialsPage.js +30 -29
  101. package/dist/proserviceworld/pages/PractitionerCredentialsPage.js.map +1 -1
  102. package/dist/proserviceworld/pages/TimePage.d.ts.map +1 -1
  103. package/dist/proserviceworld/pages/TimePage.js +343 -350
  104. package/dist/proserviceworld/pages/TimePage.js.map +1 -1
  105. package/dist/proserviceworld/utils/humanize.d.ts +3 -0
  106. package/dist/proserviceworld/utils/humanize.d.ts.map +1 -0
  107. package/dist/proserviceworld/utils/humanize.js +6 -0
  108. package/dist/proserviceworld/utils/humanize.js.map +1 -0
  109. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
1
  import { useArchiveClient as e, useClients as t, useCreateClient as n, useUpdateClient as r } from "../hooks/useProServiceWorldApi.js";
2
2
  import { useNav as i } from "../utils/nav.js";
3
3
  import { cn as a } from "../utils/cn.js";
4
- import { useTr as o } from "../hooks/useTr.js";
5
- import { Banner as s, Empty as c, ErrorState as l, Field as u, LoadingBlock as d, Modal as f, NativeSelect as p, PageHeader as m, SectionCard as h, StatusPill as g, TableWrap as _, Td as v, TextArea as y, TextInput as b, Th as x, enumOptions as S, fmtDate as C } from "../components/ui.js";
6
- import { useAnalytics as w } from "../hooks/useAnalytics.js";
7
- import { impactFeedback as T } from "../utils/native.js";
8
- import { TagPicker as E } from "../components/TagPicker.js";
9
- import { LoadMore as ee } from "../components/LoadMore.js";
4
+ import { useEnumLabel as o, useTr as s } from "../hooks/useTr.js";
5
+ import { Banner as c, Empty as l, ErrorState as u, Field as d, LoadingBlock as f, Modal as p, NativeSelect as m, PageHeader as h, SectionCard as g, StatusPill as _, TableWrap as v, Td as y, TextArea as b, TextInput as x, Th as S, enumOptions as C, fmtDate as w } from "../components/ui.js";
6
+ import { useAnalytics as T } from "../hooks/useAnalytics.js";
7
+ import { impactFeedback as E } from "../utils/native.js";
8
+ import { TagPicker as ee } from "../components/TagPicker.js";
9
+ import { LoadMore as te } from "../components/LoadMore.js";
10
10
  import { useMemo as D, useState as O } from "react";
11
- import { Archive as k, Building2 as te, ChevronRight as A, Pencil as j, Plus as M, Search as ne, User as re, Users as N } from "lucide-react";
11
+ import { Archive as k, Building2 as ne, ChevronRight as A, Pencil as j, Plus as M, Search as re, User as ie, Users as N } from "lucide-react";
12
12
  import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
13
13
  import { Button as L } from "@burdenoff/fe-libs/ui";
14
14
  //#region src/proserviceworld/pages/ClientsPage.tsx
@@ -31,62 +31,62 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
31
31
  contactPhone: "",
32
32
  notes: ""
33
33
  }, U = 25, W = () => {
34
- let e = i(), n = o(), { emitIntent: a, emitFact: u } = w(), [f, y] = O(""), [k, P] = O(""), [R, B] = O(null), [H, W] = O(!1), [q, J] = O(null), [ie, Y] = O({
34
+ let e = o(), n = i(), a = s(), { emitIntent: d, emitFact: p } = T(), [b, k] = O(""), [P, R] = O(""), [B, H] = O(null), [W, q] = O(!1), [J, Y] = O(null), [ae, X] = O({
35
35
  limit: U,
36
36
  offset: 0
37
- }), { data: X, isLoading: Z, error: Q, refetch: $ } = t({
38
- search: f.trim() || void 0,
39
- status: k || void 0,
40
- pagination: ie
41
- }), ae = r(), oe = D(() => X?.items ?? [], [X]);
37
+ }), { data: Z, isLoading: Q, error: oe, refetch: $ } = t({
38
+ search: b.trim() || void 0,
39
+ status: P || void 0,
40
+ pagination: ae
41
+ }), se = r(), ce = D(() => Z?.items ?? [], [Z]);
42
42
  return /* @__PURE__ */ I("div", {
43
43
  className: "space-y-6",
44
44
  children: [
45
- /* @__PURE__ */ F(m, {
46
- title: n("psw.clients.title", "Clients"),
47
- subtitle: n("psw.clients.subtitle", "Every person or organization your firm serves."),
45
+ /* @__PURE__ */ F(h, {
46
+ title: a("psw.clients.title", "Clients"),
47
+ subtitle: a("psw.clients.subtitle", "Every person or organization your firm serves."),
48
48
  icon: /* @__PURE__ */ F(N, { className: "h-6 w-6" }),
49
49
  actions: /* @__PURE__ */ I(L, {
50
50
  onClick: () => {
51
- T("light"), a("psw.client.create_clicked"), W(!0);
51
+ E("light"), d("psw.client.create_clicked"), q(!0);
52
52
  },
53
53
  children: [
54
54
  /* @__PURE__ */ F(M, { className: "mr-1.5 h-4 w-4" }),
55
55
  " ",
56
- n("psw.clients.new", "New client")
56
+ a("psw.clients.new", "New client")
57
57
  ]
58
58
  })
59
59
  }),
60
- q && /* @__PURE__ */ F(s, {
61
- tone: q.tone,
62
- onClose: () => J(null),
63
- children: q.text
60
+ J && /* @__PURE__ */ F(c, {
61
+ tone: J.tone,
62
+ onClose: () => Y(null),
63
+ children: J.text
64
64
  }),
65
65
  /* @__PURE__ */ I("div", {
66
66
  className: "flex flex-col gap-2 sm:flex-row sm:items-center",
67
67
  children: [/* @__PURE__ */ I("div", {
68
68
  className: "relative flex-1",
69
- children: [/* @__PURE__ */ F(ne, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ F(b, {
70
- placeholder: n("psw.clients.searchPlaceholder", "Search clients…"),
71
- value: f,
69
+ children: [/* @__PURE__ */ F(re, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ F(x, {
70
+ placeholder: a("psw.clients.searchPlaceholder", "Search clients…"),
71
+ value: b,
72
72
  onChange: (e) => {
73
- y(e.target.value), Y({
73
+ k(e.target.value), X({
74
74
  limit: U,
75
75
  offset: 0
76
76
  });
77
77
  },
78
78
  onKeyDown: (e) => {
79
- e.key === "Enter" && f.trim() && u("psw.search.performed", {
79
+ e.key === "Enter" && b.trim() && p("psw.search.performed", {
80
80
  entityType: "client",
81
- queryLength: f.trim().length
81
+ queryLength: b.trim().length
82
82
  });
83
83
  },
84
84
  className: "pl-9"
85
85
  })]
86
- }), /* @__PURE__ */ I(p, {
87
- value: k,
86
+ }), /* @__PURE__ */ I(m, {
87
+ value: P,
88
88
  onChange: (e) => {
89
- P(e.target.value), Y({
89
+ R(e.target.value), X({
90
90
  limit: U,
91
91
  offset: 0
92
92
  });
@@ -94,41 +94,41 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
94
94
  className: "sm:w-48",
95
95
  children: [/* @__PURE__ */ F("option", {
96
96
  value: "",
97
- children: n("psw.clients.allStatuses", "All statuses")
98
- }), S(z)]
97
+ children: a("psw.clients.allStatuses", "All statuses")
98
+ }), C(z, e)]
99
99
  })]
100
100
  }),
101
- Z ? /* @__PURE__ */ F(d, {}) : Q ? /* @__PURE__ */ F(l, {
102
- error: Q,
101
+ Q ? /* @__PURE__ */ F(f, {}) : oe ? /* @__PURE__ */ F(u, {
102
+ error: oe,
103
103
  onRetry: () => void $()
104
- }) : !X || X.items.length === 0 ? /* @__PURE__ */ F(c, {
105
- title: n("psw.clients.emptyTitle", "No clients yet"),
106
- description: n("psw.clients.emptyDescription", "Add your first client to start scoping engagements and matters."),
104
+ }) : !Z || Z.items.length === 0 ? /* @__PURE__ */ F(l, {
105
+ title: a("psw.clients.emptyTitle", "No clients yet"),
106
+ description: a("psw.clients.emptyDescription", "Add your first client to start scoping engagements and matters."),
107
107
  icon: /* @__PURE__ */ F(N, { className: "h-8 w-8" }),
108
108
  action: /* @__PURE__ */ I(L, {
109
- onClick: () => W(!0),
109
+ onClick: () => q(!0),
110
110
  children: [
111
111
  /* @__PURE__ */ F(M, { className: "mr-1.5 h-4 w-4" }),
112
112
  " ",
113
- n("psw.clients.new", "New client")
113
+ a("psw.clients.new", "New client")
114
114
  ]
115
115
  })
116
- }) : /* @__PURE__ */ I(h, {
117
- title: X.totalCount === 1 ? n("psw.clients.count", "{{count}} client", { count: X.totalCount }) : n("psw.clients.countPlural", "{{count}} clients", { count: X.totalCount }),
116
+ }) : /* @__PURE__ */ I(g, {
117
+ title: Z.totalCount === 1 ? a("psw.clients.count", "{{count}} client", { count: Z.totalCount }) : a("psw.clients.countPlural", "{{count}} clients", { count: Z.totalCount }),
118
118
  children: [
119
119
  /* @__PURE__ */ F("ul", {
120
120
  className: "space-y-2.5 sm:hidden",
121
- children: X.items.map((t) => /* @__PURE__ */ I("li", {
121
+ children: Z.items.map((e) => /* @__PURE__ */ I("li", {
122
122
  className: "overflow-hidden rounded-xl border border-border-seam bg-bg-canvas",
123
123
  children: [/* @__PURE__ */ I("button", {
124
124
  type: "button",
125
125
  onClick: () => {
126
- T("light"), e(`clients/${t.id}`);
126
+ E("light"), n(`clients/${e.id}`);
127
127
  },
128
128
  className: "flex w-full items-center gap-3 p-3.5 text-left transition-colors active:bg-bg-sunken/60",
129
129
  children: [
130
130
  /* @__PURE__ */ F(V, {
131
- name: t.name,
131
+ name: e.name,
132
132
  className: "h-11 w-11 text-sm"
133
133
  }),
134
134
  /* @__PURE__ */ I("span", {
@@ -136,18 +136,18 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
136
136
  children: [
137
137
  /* @__PURE__ */ F("span", {
138
138
  className: "block truncate text-sm font-semibold text-text-primary",
139
- children: t.name
139
+ children: e.name
140
140
  }),
141
141
  /* @__PURE__ */ F("span", {
142
142
  className: "mt-0.5 block truncate text-sm text-text-secondary",
143
- children: t.contactName || (t.type === "ORGANIZATION" ? n("psw.clients.typeOrganization", "Organization") : n("psw.clients.typeIndividual", "Individual"))
143
+ children: e.contactName || (e.type === "ORGANIZATION" ? a("psw.clients.typeOrganization", "Organization") : a("psw.clients.typeIndividual", "Individual"))
144
144
  }),
145
145
  /* @__PURE__ */ I("span", {
146
146
  className: "mt-1.5 flex items-center gap-2",
147
147
  children: [/* @__PURE__ */ F("span", {
148
148
  className: "truncate text-xs text-text-tertiary",
149
- children: t.industry || C(t.createdAt)
150
- }), /* @__PURE__ */ F(g, { status: t.status })]
149
+ children: e.industry || w(e.createdAt)
150
+ }), /* @__PURE__ */ F(_, { status: e.status })]
151
151
  })
152
152
  ]
153
153
  }),
@@ -157,14 +157,14 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
157
157
  className: "flex items-center justify-between gap-2 border-t border-border-seam px-3.5 py-2",
158
158
  children: [/* @__PURE__ */ F("div", {
159
159
  className: "min-w-0 flex-1",
160
- children: /* @__PURE__ */ F(E, {
160
+ children: /* @__PURE__ */ F(ee, {
161
161
  entityType: "PswClient",
162
- entityId: t.id,
163
- tags: t.tags ?? [],
164
- onChange: async (e) => {
165
- await ae.mutateAsync({
166
- id: t.id,
167
- input: { tags: e }
162
+ entityId: e.id,
163
+ tags: e.tags ?? [],
164
+ onChange: async (t) => {
165
+ await se.mutateAsync({
166
+ id: e.id,
167
+ input: { tags: t }
168
168
  }), $();
169
169
  },
170
170
  maxTags: 5
@@ -174,84 +174,84 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
174
174
  children: [/* @__PURE__ */ F(L, {
175
175
  variant: "ghost",
176
176
  size: "sm",
177
- onClick: () => B(t),
178
- "aria-label": n("psw.common.edit", "Edit"),
177
+ onClick: () => H(e),
178
+ "aria-label": a("psw.common.edit", "Edit"),
179
179
  children: /* @__PURE__ */ F(j, { className: "h-4 w-4" })
180
- }), t.status !== "ARCHIVED" && /* @__PURE__ */ F(G, {
181
- id: t.id,
182
- name: t.name,
183
- onDone: (e) => J(e ? {
180
+ }), e.status !== "ARCHIVED" && /* @__PURE__ */ F(G, {
181
+ id: e.id,
182
+ name: e.name,
183
+ onDone: (t) => Y(t ? {
184
184
  tone: "success",
185
- text: n("psw.clients.archived", "{{name}} archived.", { name: t.name })
185
+ text: a("psw.clients.archived", "{{name}} archived.", { name: e.name })
186
186
  } : {
187
187
  tone: "danger",
188
- text: n("psw.clients.archiveFailed", "Could not archive client.")
188
+ text: a("psw.clients.archiveFailed", "Could not archive client.")
189
189
  })
190
190
  })]
191
191
  })]
192
192
  })]
193
- }, t.id))
193
+ }, e.id))
194
194
  }),
195
195
  /* @__PURE__ */ F("div", {
196
196
  className: "hidden sm:block",
197
- children: /* @__PURE__ */ I(_, { children: [/* @__PURE__ */ F("thead", { children: /* @__PURE__ */ I("tr", { children: [
198
- /* @__PURE__ */ F(x, { children: n("psw.common.name", "Name") }),
199
- /* @__PURE__ */ F(x, { children: n("psw.common.type", "Type") }),
200
- /* @__PURE__ */ F(x, { children: n("psw.clients.tableIndustry", "Industry") }),
201
- /* @__PURE__ */ F(x, { children: n("psw.common.status", "Status") }),
202
- /* @__PURE__ */ F(x, { children: n("psw.common.added", "Added") }),
203
- /* @__PURE__ */ F(x, { children: n("psw.clients.tableTags", "Tags") }),
204
- /* @__PURE__ */ F(x, {
197
+ children: /* @__PURE__ */ I(v, { children: [/* @__PURE__ */ F("thead", { children: /* @__PURE__ */ I("tr", { children: [
198
+ /* @__PURE__ */ F(S, { children: a("psw.common.name", "Name") }),
199
+ /* @__PURE__ */ F(S, { children: a("psw.common.type", "Type") }),
200
+ /* @__PURE__ */ F(S, { children: a("psw.clients.tableIndustry", "Industry") }),
201
+ /* @__PURE__ */ F(S, { children: a("psw.common.status", "Status") }),
202
+ /* @__PURE__ */ F(S, { children: a("psw.common.added", "Added") }),
203
+ /* @__PURE__ */ F(S, { children: a("psw.clients.tableTags", "Tags") }),
204
+ /* @__PURE__ */ F(S, {
205
205
  className: "text-right",
206
- children: n("psw.common.actions", "Actions")
206
+ children: a("psw.common.actions", "Actions")
207
207
  })
208
- ] }) }), /* @__PURE__ */ F("tbody", { children: X.items.map((t) => /* @__PURE__ */ I("tr", {
208
+ ] }) }), /* @__PURE__ */ F("tbody", { children: Z.items.map((e) => /* @__PURE__ */ I("tr", {
209
209
  className: "group cursor-pointer transition-colors hover:bg-bg-sunken/60",
210
- onClick: () => e(`clients/${t.id}`),
210
+ onClick: () => n(`clients/${e.id}`),
211
211
  children: [
212
- /* @__PURE__ */ F(v, { children: /* @__PURE__ */ I("div", {
212
+ /* @__PURE__ */ F(y, { children: /* @__PURE__ */ I("div", {
213
213
  className: "flex items-center gap-3",
214
- children: [/* @__PURE__ */ F(V, { name: t.name }), /* @__PURE__ */ I("div", {
214
+ children: [/* @__PURE__ */ F(V, { name: e.name }), /* @__PURE__ */ I("div", {
215
215
  className: "min-w-0",
216
216
  children: [/* @__PURE__ */ I("div", {
217
217
  className: "flex items-center gap-1 font-medium text-text-primary transition-colors group-hover:text-accent",
218
218
  children: [/* @__PURE__ */ F("span", {
219
219
  className: "truncate",
220
- children: t.name
220
+ children: e.name
221
221
  }), /* @__PURE__ */ F(A, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary opacity-0 transition-opacity group-hover:opacity-100" })]
222
- }), t.contactName ? /* @__PURE__ */ F("div", {
222
+ }), e.contactName ? /* @__PURE__ */ F("div", {
223
223
  className: "truncate text-xs text-text-tertiary",
224
- children: t.contactName
224
+ children: e.contactName
225
225
  }) : null]
226
226
  })]
227
227
  }) }),
228
- /* @__PURE__ */ F(v, { children: /* @__PURE__ */ I("span", {
228
+ /* @__PURE__ */ F(y, { children: /* @__PURE__ */ I("span", {
229
229
  className: "inline-flex items-center gap-1.5 text-text-secondary",
230
- children: [t.type === "ORGANIZATION" ? /* @__PURE__ */ F(te, { className: "h-3.5 w-3.5 text-text-tertiary" }) : /* @__PURE__ */ F(re, { className: "h-3.5 w-3.5 text-text-tertiary" }), t.type === "ORGANIZATION" ? n("psw.clients.typeOrganization", "Organization") : n("psw.clients.typeIndividual", "Individual")]
230
+ children: [e.type === "ORGANIZATION" ? /* @__PURE__ */ F(ne, { className: "h-3.5 w-3.5 text-text-tertiary" }) : /* @__PURE__ */ F(ie, { className: "h-3.5 w-3.5 text-text-tertiary" }), e.type === "ORGANIZATION" ? a("psw.clients.typeOrganization", "Organization") : a("psw.clients.typeIndividual", "Individual")]
231
231
  }) }),
232
- /* @__PURE__ */ F(v, { children: t.industry || n("psw.common.dash", "—") }),
233
- /* @__PURE__ */ F(v, { children: /* @__PURE__ */ F(g, { status: t.status }) }),
234
- /* @__PURE__ */ F(v, {
232
+ /* @__PURE__ */ F(y, { children: e.industry || a("psw.common.dash", "—") }),
233
+ /* @__PURE__ */ F(y, { children: /* @__PURE__ */ F(_, { status: e.status }) }),
234
+ /* @__PURE__ */ F(y, {
235
235
  className: "whitespace-nowrap",
236
- children: C(t.createdAt)
236
+ children: w(e.createdAt)
237
237
  }),
238
- /* @__PURE__ */ F(v, { children: /* @__PURE__ */ F("div", {
238
+ /* @__PURE__ */ F(y, { children: /* @__PURE__ */ F("div", {
239
239
  onClick: (e) => e.stopPropagation(),
240
240
  role: "presentation",
241
- children: /* @__PURE__ */ F(E, {
241
+ children: /* @__PURE__ */ F(ee, {
242
242
  entityType: "PswClient",
243
- entityId: t.id,
244
- tags: t.tags ?? [],
245
- onChange: async (e) => {
246
- await ae.mutateAsync({
247
- id: t.id,
248
- input: { tags: e }
243
+ entityId: e.id,
244
+ tags: e.tags ?? [],
245
+ onChange: async (t) => {
246
+ await se.mutateAsync({
247
+ id: e.id,
248
+ input: { tags: t }
249
249
  }), $();
250
250
  },
251
251
  maxTags: 5
252
252
  })
253
253
  }) }),
254
- /* @__PURE__ */ F(v, {
254
+ /* @__PURE__ */ F(y, {
255
255
  className: "text-right",
256
256
  children: /* @__PURE__ */ I("div", {
257
257
  className: "flex justify-end gap-1",
@@ -260,56 +260,56 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
260
260
  children: [/* @__PURE__ */ F(L, {
261
261
  variant: "ghost",
262
262
  size: "sm",
263
- onClick: () => B(t),
264
- "aria-label": n("psw.common.edit", "Edit"),
263
+ onClick: () => H(e),
264
+ "aria-label": a("psw.common.edit", "Edit"),
265
265
  children: /* @__PURE__ */ F(j, { className: "h-4 w-4" })
266
- }), t.status !== "ARCHIVED" && /* @__PURE__ */ F(G, {
267
- id: t.id,
268
- name: t.name,
269
- onDone: (e) => J(e ? {
266
+ }), e.status !== "ARCHIVED" && /* @__PURE__ */ F(G, {
267
+ id: e.id,
268
+ name: e.name,
269
+ onDone: (t) => Y(t ? {
270
270
  tone: "success",
271
- text: n("psw.clients.archived", "{{name}} archived.", { name: t.name })
271
+ text: a("psw.clients.archived", "{{name}} archived.", { name: e.name })
272
272
  } : {
273
273
  tone: "danger",
274
- text: n("psw.clients.archiveFailed", "Could not archive client.")
274
+ text: a("psw.clients.archiveFailed", "Could not archive client.")
275
275
  })
276
276
  })]
277
277
  })
278
278
  })
279
279
  ]
280
- }, t.id)) })] })
280
+ }, e.id)) })] })
281
281
  }),
282
- /* @__PURE__ */ F(ee, {
283
- hasMore: X?.pageInfo?.hasMore ?? !1,
284
- loading: Z,
285
- loadedCount: oe.length,
286
- totalCount: X?.totalCount ?? oe.length,
287
- onLoadMore: () => Y((e) => ({
282
+ /* @__PURE__ */ F(te, {
283
+ hasMore: Z?.pageInfo?.hasMore ?? !1,
284
+ loading: Q,
285
+ loadedCount: ce.length,
286
+ totalCount: Z?.totalCount ?? ce.length,
287
+ onLoadMore: () => X((e) => ({
288
288
  limit: U,
289
289
  offset: e.offset + U
290
290
  }))
291
291
  })
292
292
  ]
293
293
  }),
294
- H && /* @__PURE__ */ F(K, {
295
- onClose: () => W(!1),
296
- onSaved: (e) => J({
294
+ W && /* @__PURE__ */ F(K, {
295
+ onClose: () => q(!1),
296
+ onSaved: (e) => Y({
297
297
  tone: "success",
298
- text: n("psw.clients.created", "{{name}} created.", { name: e })
298
+ text: a("psw.clients.created", "{{name}} created.", { name: e })
299
299
  })
300
300
  }),
301
- R && /* @__PURE__ */ F(K, {
302
- client: R,
303
- onClose: () => B(null),
304
- onSaved: (e) => J({
301
+ B && /* @__PURE__ */ F(K, {
302
+ client: B,
303
+ onClose: () => H(null),
304
+ onSaved: (e) => Y({
305
305
  tone: "success",
306
- text: n("psw.clients.updated", "{{name}} updated.", { name: e })
306
+ text: a("psw.clients.updated", "{{name}} updated.", { name: e })
307
307
  })
308
308
  })
309
309
  ]
310
310
  });
311
311
  }, G = ({ id: t, name: n, onDone: r }) => {
312
- let i = e(), a = o(), { emitFact: s } = w();
312
+ let i = e(), a = s(), { emitFact: o } = T();
313
313
  return /* @__PURE__ */ F(L, {
314
314
  variant: "ghost",
315
315
  size: "sm",
@@ -318,7 +318,7 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
318
318
  onClick: () => {
319
319
  window.confirm(a("psw.clients.archiveConfirm", "Archive this client? Their engagements and matters remain.")) && i.mutate(t, {
320
320
  onSuccess: (e) => {
321
- s("psw.client.archived", { clientId: t }), r(!!e);
321
+ o("psw.client.archived", { clientId: t }), r(!!e);
322
322
  },
323
323
  onError: () => r(!1)
324
324
  });
@@ -326,7 +326,7 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
326
326
  children: /* @__PURE__ */ F(k, { className: "h-4 w-4" })
327
327
  });
328
328
  }, K = ({ client: e, onClose: t, onSaved: i }) => {
329
- let a = o(), c = n(), l = r(), { emitFact: d } = w(), [m, h] = O(e ? {
329
+ let a = s(), l = o(), u = n(), f = r(), { emitFact: h } = T(), [g, _] = O(e ? {
330
330
  name: e.name,
331
331
  type: e.type,
332
332
  status: e.status,
@@ -335,121 +335,121 @@ var R = ["ORGANIZATION", "INDIVIDUAL"], z = [
335
335
  contactEmail: e.contactEmail ?? "",
336
336
  contactPhone: e.contactPhone ?? "",
337
337
  notes: e.notes ?? ""
338
- } : H), [g, _] = O(null), v = (e) => (t) => h((n) => ({
338
+ } : H), [v, y] = O(null), S = (e) => (t) => _((n) => ({
339
339
  ...n,
340
340
  [e]: t.target.value
341
- })), x = c.isPending || l.isPending, C = D(() => ({
342
- name: m.name.trim(),
343
- type: m.type,
344
- status: m.status,
345
- industry: m.industry.trim() || null,
346
- contactName: m.contactName.trim() || null,
347
- contactEmail: m.contactEmail.trim() || null,
348
- contactPhone: m.contactPhone.trim() || null,
349
- notes: m.notes.trim() || null
350
- }), [m]);
351
- return /* @__PURE__ */ F(f, {
341
+ })), w = u.isPending || f.isPending, E = D(() => ({
342
+ name: g.name.trim(),
343
+ type: g.type,
344
+ status: g.status,
345
+ industry: g.industry.trim() || null,
346
+ contactName: g.contactName.trim() || null,
347
+ contactEmail: g.contactEmail.trim() || null,
348
+ contactPhone: g.contactPhone.trim() || null,
349
+ notes: g.notes.trim() || null
350
+ }), [g]);
351
+ return /* @__PURE__ */ F(p, {
352
352
  open: !0,
353
353
  onClose: t,
354
354
  title: e ? a("psw.clients.edit", "Edit client") : a("psw.clients.newTitle", "New client"),
355
355
  footer: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(L, {
356
356
  variant: "outline",
357
357
  onClick: t,
358
- disabled: x,
358
+ disabled: w,
359
359
  children: a("psw.common.cancel", "Cancel")
360
360
  }), /* @__PURE__ */ F(L, {
361
361
  onClick: () => {
362
- if (_(null), !C.name) return _(a("psw.clients.nameRequired", "Client name is required."));
363
- let n = (e) => _(e instanceof Error ? e.message : a("psw.clients.saveFailed", "Save failed."));
364
- e ? l.mutate({
362
+ if (y(null), !E.name) return y(a("psw.clients.nameRequired", "Client name is required."));
363
+ let n = (e) => y(e instanceof Error ? e.message : a("psw.clients.saveFailed", "Save failed."));
364
+ e ? f.mutate({
365
365
  id: e.id,
366
- input: C
366
+ input: E
367
367
  }, {
368
368
  onSuccess: () => {
369
- d("psw.client.updated", { clientId: e.id }), i(C.name), t();
369
+ h("psw.client.updated", { clientId: e.id }), i(E.name), t();
370
370
  },
371
371
  onError: n
372
- }) : c.mutate(C, {
372
+ }) : u.mutate(E, {
373
373
  onSuccess: (e) => {
374
- d("psw.client.created", { clientId: e.pswCreateClient.id }), i(C.name), t();
374
+ h("psw.client.created", { clientId: e.pswCreateClient.id }), i(E.name), t();
375
375
  },
376
376
  onError: n
377
377
  });
378
378
  },
379
- disabled: x,
380
- children: x ? a("psw.common.saving", "Saving…") : e ? a("psw.common.save", "Save changes") : a("psw.common.create", "Create client")
379
+ disabled: w,
380
+ children: w ? a("psw.common.saving", "Saving…") : e ? a("psw.clients.saveChanges", "Save changes") : a("psw.clients.create", "Create client")
381
381
  })] }),
382
382
  children: /* @__PURE__ */ I("div", {
383
383
  className: "space-y-3",
384
384
  children: [
385
- g && /* @__PURE__ */ F(s, {
385
+ v && /* @__PURE__ */ F(c, {
386
386
  tone: "danger",
387
- children: g
387
+ children: v
388
388
  }),
389
- /* @__PURE__ */ F(u, {
389
+ /* @__PURE__ */ F(d, {
390
390
  label: a("psw.common.name", "Name"),
391
391
  required: !0,
392
- children: /* @__PURE__ */ F(b, {
393
- value: m.name,
394
- onChange: v("name"),
392
+ children: /* @__PURE__ */ F(x, {
393
+ value: g.name,
394
+ onChange: S("name"),
395
395
  placeholder: "Acme Holdings Ltd."
396
396
  })
397
397
  }),
398
398
  /* @__PURE__ */ I("div", {
399
399
  className: "grid grid-cols-2 gap-3",
400
- children: [/* @__PURE__ */ F(u, {
400
+ children: [/* @__PURE__ */ F(d, {
401
401
  label: a("psw.common.type", "Type"),
402
- children: /* @__PURE__ */ F(p, {
403
- value: m.type,
404
- onChange: v("type"),
405
- children: S(R)
402
+ children: /* @__PURE__ */ F(m, {
403
+ value: g.type,
404
+ onChange: S("type"),
405
+ children: C(R, l)
406
406
  })
407
- }), /* @__PURE__ */ F(u, {
407
+ }), /* @__PURE__ */ F(d, {
408
408
  label: a("psw.common.status", "Status"),
409
- children: /* @__PURE__ */ F(p, {
410
- value: m.status,
411
- onChange: v("status"),
412
- children: S(z)
409
+ children: /* @__PURE__ */ F(m, {
410
+ value: g.status,
411
+ onChange: S("status"),
412
+ children: C(z, l)
413
413
  })
414
414
  })]
415
415
  }),
416
- /* @__PURE__ */ F(u, {
416
+ /* @__PURE__ */ F(d, {
417
417
  label: a("psw.clients.industry", "Industry"),
418
- children: /* @__PURE__ */ F(b, {
419
- value: m.industry,
420
- onChange: v("industry"),
418
+ children: /* @__PURE__ */ F(x, {
419
+ value: g.industry,
420
+ onChange: S("industry"),
421
421
  placeholder: "Financial services"
422
422
  })
423
423
  }),
424
424
  /* @__PURE__ */ I("div", {
425
425
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
426
- children: [/* @__PURE__ */ F(u, {
426
+ children: [/* @__PURE__ */ F(d, {
427
427
  label: a("psw.clients.contactName", "Contact name"),
428
- children: /* @__PURE__ */ F(b, {
429
- value: m.contactName,
430
- onChange: v("contactName")
428
+ children: /* @__PURE__ */ F(x, {
429
+ value: g.contactName,
430
+ onChange: S("contactName")
431
431
  })
432
- }), /* @__PURE__ */ F(u, {
432
+ }), /* @__PURE__ */ F(d, {
433
433
  label: a("psw.clients.contactEmail", "Contact email"),
434
- children: /* @__PURE__ */ F(b, {
434
+ children: /* @__PURE__ */ F(x, {
435
435
  type: "email",
436
- value: m.contactEmail,
437
- onChange: v("contactEmail")
436
+ value: g.contactEmail,
437
+ onChange: S("contactEmail")
438
438
  })
439
439
  })]
440
440
  }),
441
- /* @__PURE__ */ F(u, {
441
+ /* @__PURE__ */ F(d, {
442
442
  label: a("psw.clients.contactPhone", "Contact phone"),
443
- children: /* @__PURE__ */ F(b, {
444
- value: m.contactPhone,
445
- onChange: v("contactPhone")
443
+ children: /* @__PURE__ */ F(x, {
444
+ value: g.contactPhone,
445
+ onChange: S("contactPhone")
446
446
  })
447
447
  }),
448
- /* @__PURE__ */ F(u, {
448
+ /* @__PURE__ */ F(d, {
449
449
  label: a("psw.clients.notes", "Notes"),
450
- children: /* @__PURE__ */ F(y, {
451
- value: m.notes,
452
- onChange: v("notes")
450
+ children: /* @__PURE__ */ F(b, {
451
+ value: g.notes,
452
+ onChange: S("notes")
453
453
  })
454
454
  })
455
455
  ]