@burdenoff/microfe-govcitizenhub 2026.716.1 → 2026.720.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 (41) hide show
  1. package/dist/govcitizenhub/components/StatusBadge.d.ts.map +1 -1
  2. package/dist/govcitizenhub/components/StatusBadge.js.map +1 -1
  3. package/dist/govcitizenhub/hooks/useGovApi.d.ts +10 -6
  4. package/dist/govcitizenhub/hooks/useGovApi.d.ts.map +1 -1
  5. package/dist/govcitizenhub/hooks/useGovApi.js +67 -35
  6. package/dist/govcitizenhub/hooks/useGovApi.js.map +1 -1
  7. package/dist/govcitizenhub/pages/DashboardPage.d.ts.map +1 -1
  8. package/dist/govcitizenhub/pages/DashboardPage.js +152 -88
  9. package/dist/govcitizenhub/pages/DashboardPage.js.map +1 -1
  10. package/dist/govcitizenhub/pages/applications/ApplicationsPage.d.ts.map +1 -1
  11. package/dist/govcitizenhub/pages/applications/ApplicationsPage.js +273 -220
  12. package/dist/govcitizenhub/pages/applications/ApplicationsPage.js.map +1 -1
  13. package/dist/govcitizenhub/types/index.d.ts +38 -0
  14. package/dist/govcitizenhub/types/index.d.ts.map +1 -1
  15. package/dist/stories/Avatar.stories.d.ts +11 -0
  16. package/dist/stories/Avatar.stories.d.ts.map +1 -0
  17. package/dist/stories/FilterTabs.stories.d.ts +9 -0
  18. package/dist/stories/FilterTabs.stories.d.ts.map +1 -0
  19. package/dist/stories/KeyValueList.stories.d.ts +10 -0
  20. package/dist/stories/KeyValueList.stories.d.ts.map +1 -0
  21. package/dist/stories/Pagination.stories.d.ts +10 -0
  22. package/dist/stories/Pagination.stories.d.ts.map +1 -0
  23. package/dist/stories/SectionCard.stories.d.ts +10 -0
  24. package/dist/stories/SectionCard.stories.d.ts.map +1 -0
  25. package/dist/stories/SlaBadge.stories.d.ts +12 -0
  26. package/dist/stories/SlaBadge.stories.d.ts.map +1 -0
  27. package/dist/stories/StateViews.stories.d.ts +9 -0
  28. package/dist/stories/StateViews.stories.d.ts.map +1 -0
  29. package/dist/stories/StatusStepper.stories.d.ts +10 -0
  30. package/dist/stories/StatusStepper.stories.d.ts.map +1 -0
  31. package/dist/stories/SummaryStrip.stories.d.ts +9 -0
  32. package/dist/stories/SummaryStrip.stories.d.ts.map +1 -0
  33. package/dist/stories/Timeline.stories.d.ts +8 -0
  34. package/dist/stories/Timeline.stories.d.ts.map +1 -0
  35. package/dist/types/assistant.d.ts +9 -2
  36. package/dist/types/assistant.d.ts.map +1 -1
  37. package/dist/utils/pageContext.d.ts +6 -0
  38. package/dist/utils/pageContext.d.ts.map +1 -1
  39. package/dist/utils/pageContext.js +54 -30
  40. package/dist/utils/pageContext.js.map +1 -1
  41. package/package.json +4 -3
@@ -1,30 +1,31 @@
1
1
  import { useGovCitizenHub as e } from "../../context/GovCitizenHubContext.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { formatDate as n } from "../../utils/formatters.js";
4
- import { StatusBadge as r } from "../../components/StatusBadge.js";
5
- import { EmptyState as i } from "../../components/EmptyState.js";
2
+ import { cn as t } from "../../utils/cn.js";
3
+ import { PageLayout as n } from "../../components/PageLayout.js";
4
+ import { formatDate as r } from "../../utils/formatters.js";
5
+ import { StatusBadge as i } from "../../components/StatusBadge.js";
6
+ import { EmptyState as a } from "../../components/EmptyState.js";
6
7
  import "../../context/index.js";
7
- import { useGovApplications as a, useGovDashboardSummary as o, useGovServices as s } from "../../hooks/useGovApi.js";
8
- import { useCursorPager as c } from "../../hooks/useCursorPager.js";
8
+ import { useGovApplicationSlaSummary as o, useGovApplications as s, useGovDashboardSummary as c, useGovServices as l } from "../../hooks/useGovApi.js";
9
+ import { useCursorPager as u } from "../../hooks/useCursorPager.js";
9
10
  import "../../hooks/index.js";
10
- import { FilterTabs as l } from "../../components/FilterTabs.js";
11
- import { ErrorView as u } from "../../components/StateViews.js";
12
- import { SlaBadge as d } from "../../components/SlaBadge.js";
13
- import { AssigneeChip as f } from "../../components/Avatar.js";
14
- import { SummaryStrip as p } from "../../components/SummaryStrip.js";
15
- import { Pagination as m } from "../../components/Pagination.js";
16
- import { useMemo as h, useState as g } from "react";
17
- import { ChevronRight as _, CircleCheck as v, Clock as y, Plus as b, Search as x, TriangleAlert as S } from "lucide-react";
18
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
19
- import { Button as E, GlassCard as D, Input as O, Skeleton as k } from "@burdenoff/fe-libs/ui";
11
+ import { FilterTabs as d } from "../../components/FilterTabs.js";
12
+ import { ErrorView as f } from "../../components/StateViews.js";
13
+ import { SlaBadge as p } from "../../components/SlaBadge.js";
14
+ import { AssigneeChip as m } from "../../components/Avatar.js";
15
+ import { SummaryStrip as h } from "../../components/SummaryStrip.js";
16
+ import { Pagination as g } from "../../components/Pagination.js";
17
+ import { useMemo as _, useState as v } from "react";
18
+ import { ChevronRight as y, CircleCheck as b, Clock as x, Plus as S, Search as C, TriangleAlert as w, UserCheck as T } from "lucide-react";
19
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
20
+ import { Button as k, GlassCard as A, Input as j, Skeleton as M } from "@burdenoff/fe-libs/ui";
20
21
  //#region src/govcitizenhub/pages/applications/ApplicationsPage.tsx
21
- var A = 15;
22
- function j(e) {
22
+ var N = 15;
23
+ function P(e) {
23
24
  if (!e) return;
24
25
  let t = [e.firstName, e.lastName].filter(Boolean).join(" ").trim();
25
26
  return e.name?.trim() || t || e.username?.trim() || e.email;
26
27
  }
27
- var M = (e) => e.slice(0, 8), N = [
28
+ var F = (e) => e.slice(0, 8), ee = [
28
29
  {
29
30
  value: "ALL",
30
31
  label: "All"
@@ -53,41 +54,41 @@ var M = (e) => e.slice(0, 8), N = [
53
54
  value: "DRAFT",
54
55
  label: "Draft"
55
56
  }
56
- ], P = new Set([
57
+ ], I = new Set([
57
58
  "APPROVED",
58
59
  "REJECTED",
59
60
  "WITHDRAWN"
60
61
  ]);
61
- function F(e) {
62
+ function L(e) {
62
63
  let t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime();
63
64
  return Math.round((t(e) - t(/* @__PURE__ */ new Date())) / 864e5);
64
65
  }
65
- function I(e) {
66
- if (P.has(e.status) || !e.dueDate) return "none";
66
+ function R(e) {
67
+ if (I.has(e.status) || !e.dueDate) return "none";
67
68
  let t = new Date(e.dueDate);
68
69
  if (Number.isNaN(t.getTime())) return "none";
69
- let n = F(t);
70
+ let n = L(t);
70
71
  return n < 0 ? "overdue" : n <= 2 ? "duesoon" : "ontrack";
71
72
  }
72
- function L({ assignedToId: e, currentUser: t }) {
73
- return e ? t?.id && e === t.id ? /* @__PURE__ */ w(f, {
74
- name: j(t) ?? "You",
73
+ function z({ assignedToId: e, currentUser: t }) {
74
+ return e ? t?.id && e === t.id ? /* @__PURE__ */ D(m, {
75
+ name: P(t) ?? "You",
75
76
  src: t.avatar,
76
77
  subtitle: "You"
77
- }) : /* @__PURE__ */ w(f, {
78
+ }) : /* @__PURE__ */ D(m, {
78
79
  name: "Assigned officer",
79
- subtitle: `#${M(e)}`
80
- }) : /* @__PURE__ */ T("span", {
80
+ subtitle: `#${F(e)}`
81
+ }) : /* @__PURE__ */ O("span", {
81
82
  className: "inline-flex items-center gap-2 text-sm text-text-muted",
82
- children: [/* @__PURE__ */ w("span", {
83
+ children: [/* @__PURE__ */ D("span", {
83
84
  "aria-hidden": "true",
84
85
  className: "inline-flex size-8 items-center justify-center rounded-full border border-dashed border-border-seam text-text-muted",
85
- children: /* @__PURE__ */ w(b, { className: "size-3.5" })
86
+ children: /* @__PURE__ */ D(S, { className: "size-3.5" })
86
87
  }), "Unassigned"]
87
88
  });
88
89
  }
89
- function R({ app: e, serviceName: t, currentUser: i, onOpen: a }) {
90
- return /* @__PURE__ */ T("tr", {
90
+ function B({ app: e, serviceName: t, currentUser: n, onOpen: a }) {
91
+ return /* @__PURE__ */ O("tr", {
91
92
  role: "button",
92
93
  tabIndex: 0,
93
94
  "aria-label": `Open application ${e.reference}`,
@@ -97,119 +98,120 @@ function R({ app: e, serviceName: t, currentUser: i, onOpen: a }) {
97
98
  },
98
99
  className: "group cursor-pointer align-middle outline-none transition-colors hover:bg-bg-sunken focus-visible:bg-bg-sunken",
99
100
  children: [
100
- /* @__PURE__ */ T("td", {
101
+ /* @__PURE__ */ O("td", {
101
102
  className: "px-4 py-3",
102
- children: [/* @__PURE__ */ w("span", {
103
+ children: [/* @__PURE__ */ D("span", {
103
104
  className: "block truncate font-medium text-action-primary-text",
104
105
  children: e.reference
105
- }), /* @__PURE__ */ T("span", {
106
+ }), /* @__PURE__ */ O("span", {
106
107
  className: "text-xs text-text-muted",
107
- children: ["Filed ", n(e.createdAt)]
108
+ children: ["Filed ", r(e.createdAt)]
108
109
  })]
109
110
  }),
110
- /* @__PURE__ */ w("td", {
111
+ /* @__PURE__ */ D("td", {
111
112
  className: "px-4 py-3 text-sm text-text-secondary",
112
- children: /* @__PURE__ */ w("span", {
113
+ children: /* @__PURE__ */ D("span", {
113
114
  className: "line-clamp-1",
114
115
  children: t ?? "—"
115
116
  })
116
117
  }),
117
- /* @__PURE__ */ w("td", {
118
+ /* @__PURE__ */ D("td", {
118
119
  className: "px-4 py-3",
119
- children: /* @__PURE__ */ w(r, { status: e.priority })
120
+ children: /* @__PURE__ */ D(i, { status: e.priority })
120
121
  }),
121
- /* @__PURE__ */ w("td", {
122
+ /* @__PURE__ */ D("td", {
122
123
  className: "px-4 py-3",
123
- children: /* @__PURE__ */ w(L, {
124
+ children: /* @__PURE__ */ D(z, {
124
125
  assignedToId: e.assignedToId,
125
- currentUser: i
126
+ currentUser: n
126
127
  })
127
128
  }),
128
- /* @__PURE__ */ w("td", {
129
+ /* @__PURE__ */ D("td", {
129
130
  className: "px-4 py-3",
130
- children: /* @__PURE__ */ T("div", {
131
+ children: /* @__PURE__ */ O("div", {
131
132
  className: "flex flex-col gap-0.5",
132
- children: [/* @__PURE__ */ w(d, {
133
+ children: [/* @__PURE__ */ D(p, {
133
134
  dueDate: e.dueDate,
134
135
  status: e.status
135
- }), e.dueDate && /* @__PURE__ */ T("span", {
136
+ }), e.dueDate && /* @__PURE__ */ O("span", {
136
137
  className: "text-xs text-text-muted",
137
- children: ["Due ", n(e.dueDate)]
138
+ children: ["Due ", r(e.dueDate)]
138
139
  })]
139
140
  })
140
141
  }),
141
- /* @__PURE__ */ w("td", {
142
+ /* @__PURE__ */ D("td", {
142
143
  className: "px-4 py-3",
143
- children: /* @__PURE__ */ w(r, { status: e.status })
144
+ children: /* @__PURE__ */ D(i, { status: e.status })
144
145
  }),
145
- /* @__PURE__ */ w("td", {
146
+ /* @__PURE__ */ D("td", {
146
147
  className: "px-4 py-3 text-right",
147
- children: /* @__PURE__ */ w(_, { className: "ml-auto size-4 shrink-0 text-text-muted transition-transform group-hover:translate-x-0.5" })
148
+ children: /* @__PURE__ */ D(y, { className: "ml-auto size-4 shrink-0 text-text-muted transition-transform group-hover:translate-x-0.5" })
148
149
  })
149
150
  ]
150
151
  });
151
152
  }
152
- function z({ app: e, serviceName: t, currentUser: i, onOpen: a }) {
153
- return /* @__PURE__ */ T("button", {
153
+ function V({ app: e, serviceName: t, currentUser: n, onOpen: a }) {
154
+ return /* @__PURE__ */ O("button", {
154
155
  type: "button",
155
156
  onClick: a,
156
157
  "aria-label": `Open application ${e.reference}`,
157
158
  className: "flex w-full flex-col gap-2 px-4 py-4 text-left outline-none transition-colors hover:bg-bg-sunken focus-visible:bg-bg-sunken",
158
159
  children: [
159
- /* @__PURE__ */ T("div", {
160
+ /* @__PURE__ */ O("div", {
160
161
  className: "flex items-center justify-between gap-2",
161
- children: [/* @__PURE__ */ T("span", {
162
+ children: [/* @__PURE__ */ O("span", {
162
163
  className: "min-w-0",
163
- children: [/* @__PURE__ */ w("span", {
164
+ children: [/* @__PURE__ */ D("span", {
164
165
  className: "block truncate font-medium text-action-primary-text",
165
166
  children: e.reference
166
- }), /* @__PURE__ */ T("span", {
167
+ }), /* @__PURE__ */ O("span", {
167
168
  className: "text-xs text-text-muted",
168
- children: ["Filed ", n(e.createdAt)]
169
+ children: ["Filed ", r(e.createdAt)]
169
170
  })]
170
- }), /* @__PURE__ */ w(r, { status: e.status })]
171
+ }), /* @__PURE__ */ D(i, { status: e.status })]
171
172
  }),
172
- /* @__PURE__ */ w("div", {
173
+ /* @__PURE__ */ D("div", {
173
174
  className: "text-sm text-text-secondary",
174
175
  children: t ?? "—"
175
176
  }),
176
- /* @__PURE__ */ T("div", {
177
+ /* @__PURE__ */ O("div", {
177
178
  className: "flex flex-wrap items-center gap-2",
178
179
  children: [
179
- /* @__PURE__ */ w(r, { status: e.priority }),
180
- /* @__PURE__ */ w(d, {
180
+ /* @__PURE__ */ D(i, { status: e.priority }),
181
+ /* @__PURE__ */ D(p, {
181
182
  dueDate: e.dueDate,
182
183
  status: e.status
183
184
  }),
184
- /* @__PURE__ */ w(L, {
185
+ /* @__PURE__ */ D(z, {
185
186
  assignedToId: e.assignedToId,
186
- currentUser: i
187
+ currentUser: n
187
188
  })
188
189
  ]
189
190
  })
190
191
  ]
191
192
  });
192
193
  }
193
- function B() {
194
- let { navigateTo: n, currentUser: r } = e(), d = c(), [f, _] = g("ALL"), [j, M] = g(""), { data: P, isLoading: F, isError: L, refetch: B } = a({
195
- status: f === "ALL" ? void 0 : f,
194
+ function H() {
195
+ let { navigateTo: r, currentUser: i } = e(), p = u(), [m, y] = v("ALL"), [P, F] = v(""), [I, L] = v(!1), { data: z, isLoading: H, isError: U, refetch: W } = s({
196
+ status: m === "ALL" ? void 0 : m,
197
+ assignedToId: I ? i?.id : void 0,
196
198
  pagination: {
197
- limit: A,
198
- cursor: d.cursor
199
+ limit: N,
200
+ cursor: p.cursor
199
201
  }
200
- }), V = s({ pagination: { limit: 100 } }), H = o(), U = h(() => P?.items ?? [], [P]), W = h(() => {
202
+ }), G = l({ pagination: { limit: 100 } }), K = c(), q = o(), J = _(() => z?.items ?? [], [z]), Y = _(() => {
201
203
  let e = /* @__PURE__ */ new Map();
202
- return V.data?.items.forEach((t) => e.set(t.id, t.name)), e;
203
- }, [V.data]), G = h(() => {
204
+ return G.data?.items.forEach((t) => e.set(t.id, t.name)), e;
205
+ }, [G.data]), X = _(() => {
204
206
  let e = /* @__PURE__ */ new Map();
205
- return H.data?.applicationsByStatus.forEach((t) => e.set(t.status, t.count)), e;
206
- }, [H.data]), K = N.map((e) => ({
207
+ return K.data?.applicationsByStatus.forEach((t) => e.set(t.status, t.count)), e;
208
+ }, [K.data]), Z = ee.map((e) => ({
207
209
  ...e,
208
- count: e.value === "ALL" ? H.data?.applicationsTotal : G.get(e.value)
209
- })), q = h(() => {
210
+ count: e.value === "ALL" ? K.data?.applicationsTotal : X.get(e.value)
211
+ })), Q = _(() => {
210
212
  let e = 0, t = 0, n = 0;
211
- for (let r of U) {
212
- let i = I(r);
213
+ for (let r of J) {
214
+ let i = R(r);
213
215
  i === "ontrack" ? e += 1 : i === "duesoon" ? t += 1 : i === "overdue" && (n += 1);
214
216
  }
215
217
  return {
@@ -217,174 +219,225 @@ function B() {
217
219
  duesoon: t,
218
220
  overdue: n
219
221
  };
220
- }, [U]), J = [
222
+ }, [J]), te = [
221
223
  {
222
224
  label: "On track",
223
- value: q.ontrack,
224
- icon: /* @__PURE__ */ w(v, {}),
225
+ value: Q.ontrack,
226
+ icon: /* @__PURE__ */ D(b, {}),
225
227
  tone: "success"
226
228
  },
227
229
  {
228
230
  label: "Due soon",
229
- value: q.duesoon,
230
- icon: /* @__PURE__ */ w(y, {}),
231
+ value: Q.duesoon,
232
+ icon: /* @__PURE__ */ D(x, {}),
231
233
  tone: "warning"
232
234
  },
233
235
  {
234
236
  label: "Overdue",
235
- value: q.overdue,
236
- icon: /* @__PURE__ */ w(S, {}),
237
+ value: Q.overdue,
238
+ icon: /* @__PURE__ */ D(w, {}),
237
239
  tone: "error"
238
240
  }
239
- ], Y = h(() => {
240
- let e = j.trim().toLowerCase();
241
- return e ? U.filter((t) => {
242
- let n = W.get(t.serviceId) ?? "";
241
+ ], ne = [
242
+ {
243
+ label: "On track",
244
+ value: q.data?.onTrack ?? 0,
245
+ icon: /* @__PURE__ */ D(b, {}),
246
+ tone: "success"
247
+ },
248
+ {
249
+ label: "Due soon",
250
+ value: q.data?.dueSoon ?? 0,
251
+ icon: /* @__PURE__ */ D(x, {}),
252
+ tone: "warning"
253
+ },
254
+ {
255
+ label: "Overdue",
256
+ value: q.data?.overdue ?? 0,
257
+ icon: /* @__PURE__ */ D(w, {}),
258
+ tone: "error"
259
+ }
260
+ ], $ = _(() => {
261
+ let e = P.trim().toLowerCase();
262
+ return e ? J.filter((t) => {
263
+ let n = Y.get(t.serviceId) ?? "";
243
264
  return t.reference.toLowerCase().includes(e) || n.toLowerCase().includes(e) || t.status.toLowerCase().includes(e);
244
- }) : U;
265
+ }) : J;
245
266
  }, [
246
- U,
247
- j,
248
- W
267
+ J,
268
+ P,
269
+ Y
249
270
  ]);
250
- return /* @__PURE__ */ T(t, {
271
+ return /* @__PURE__ */ O(n, {
251
272
  title: "Applications",
252
273
  titleGradient: !0,
253
274
  description: "Citizen applications moving through review, decision, and fulfilment.",
254
- actions: /* @__PURE__ */ T(E, {
255
- onClick: () => n("applications/new"),
256
- children: [/* @__PURE__ */ w(b, { className: "mr-1.5 h-4 w-4" }), " New application"]
275
+ actions: /* @__PURE__ */ O(k, {
276
+ onClick: () => r("applications/new"),
277
+ children: [/* @__PURE__ */ D(S, { className: "mr-1.5 h-4 w-4" }), " New application"]
257
278
  }),
258
- children: [/* @__PURE__ */ T("div", {
259
- className: "mb-5 flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
260
- children: [/* @__PURE__ */ w(l, {
261
- options: K,
262
- value: f,
263
- onChange: (e) => {
264
- _(e), M(""), d.reset();
265
- }
266
- }), /* @__PURE__ */ T("div", {
267
- className: "relative lg:w-80",
268
- children: [/* @__PURE__ */ w(x, {
269
- className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-muted",
270
- "aria-hidden": "true"
271
- }), /* @__PURE__ */ w(O, {
272
- value: j,
273
- onChange: (e) => M(e.target.value),
274
- placeholder: "Search by reference or service…",
275
- "aria-label": "Search applications on this page",
276
- className: "pl-9"
279
+ children: [
280
+ /* @__PURE__ */ O("div", {
281
+ className: "mb-5 flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",
282
+ children: [/* @__PURE__ */ O("div", {
283
+ className: "flex flex-wrap items-center gap-2",
284
+ children: [/* @__PURE__ */ D(d, {
285
+ options: Z,
286
+ value: m,
287
+ onChange: (e) => {
288
+ y(e), F(""), p.reset();
289
+ }
290
+ }), /* @__PURE__ */ O("button", {
291
+ type: "button",
292
+ disabled: !i?.id,
293
+ "aria-pressed": I,
294
+ onClick: () => {
295
+ L((e) => !e), p.reset();
296
+ },
297
+ title: i?.id ? void 0 : "Sign in to filter your queue",
298
+ className: t("inline-flex items-center gap-1.5 rounded-xl border px-3 py-1.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50", I ? "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-seam bg-bg-surface text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
299
+ children: [/* @__PURE__ */ D(T, {
300
+ className: "size-3.5",
301
+ "aria-hidden": "true"
302
+ }), "My queue"]
303
+ })]
304
+ }), /* @__PURE__ */ O("div", {
305
+ className: "relative lg:w-80",
306
+ children: [/* @__PURE__ */ D(C, {
307
+ className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-text-muted",
308
+ "aria-hidden": "true"
309
+ }), /* @__PURE__ */ D(j, {
310
+ value: P,
311
+ onChange: (e) => F(e.target.value),
312
+ placeholder: "Search by reference or service…",
313
+ "aria-label": "Search applications on this page",
314
+ className: "pl-9"
315
+ })]
277
316
  })]
278
- })]
279
- }), F ? /* @__PURE__ */ w("div", {
280
- className: "space-y-3",
281
- children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ w(k, { className: "h-16 w-full rounded-card" }, t))
282
- }) : L ? /* @__PURE__ */ w(u, {
283
- message: "We couldn't load applications.",
284
- onRetry: () => B()
285
- }) : U.length === 0 && d.page === 0 ? /* @__PURE__ */ w(i, {
286
- illustration: "empty-data",
287
- title: "No applications found",
288
- description: f === "ALL" ? "File the first application from a published service." : "No applications match this status.",
289
- action: /* @__PURE__ */ T(E, {
290
- onClick: () => n("applications/new"),
291
- children: [/* @__PURE__ */ w(b, { className: "mr-1.5 h-4 w-4" }), " New application"]
292
- })
293
- }) : /* @__PURE__ */ T(C, { children: [
294
- /* @__PURE__ */ T("div", {
295
- className: "mb-4",
296
- children: [/* @__PURE__ */ T("div", {
317
+ }),
318
+ /* @__PURE__ */ O("div", {
319
+ className: "mb-5",
320
+ children: [/* @__PURE__ */ O("div", {
297
321
  className: "mb-2 flex items-center gap-2",
298
- children: [/* @__PURE__ */ w("h2", {
322
+ children: [/* @__PURE__ */ D("h2", {
299
323
  className: "text-sm font-semibold text-text-primary",
300
- children: "SLA on this page"
301
- }), /* @__PURE__ */ T("span", {
324
+ children: "SLA across all applications"
325
+ }), /* @__PURE__ */ D("span", {
302
326
  className: "text-xs text-text-muted",
303
- children: [
304
- "Based on due date · ",
305
- U.length,
306
- " shown"
307
- ]
327
+ children: "Corpus-wide, backend-computed"
308
328
  })]
309
- }), /* @__PURE__ */ w(p, { stats: J })]
329
+ }), q.isLoading ? /* @__PURE__ */ D(M, { className: "h-16 w-full rounded-card" }) : /* @__PURE__ */ D(h, { stats: ne })]
310
330
  }),
311
- /* @__PURE__ */ w(D, {
312
- treatment: "plain",
313
- className: "overflow-hidden border-border-seam p-0",
314
- children: Y.length === 0 ? /* @__PURE__ */ T("p", {
315
- className: "px-5 py-10 text-center text-sm text-text-secondary",
316
- children: [
317
- "No applications on this page match “",
318
- j,
319
- "”."
320
- ]
321
- }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
322
- className: "hidden overflow-x-auto md:block",
323
- children: /* @__PURE__ */ T("table", {
324
- className: "w-full text-left text-sm",
325
- children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
326
- className: "border-b border-border-seam text-xs font-medium uppercase tracking-wide text-text-muted",
331
+ H ? /* @__PURE__ */ D("div", {
332
+ className: "space-y-3",
333
+ children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ D(M, { className: "h-16 w-full rounded-card" }, t))
334
+ }) : U ? /* @__PURE__ */ D(f, {
335
+ message: "We couldn't load applications.",
336
+ onRetry: () => W()
337
+ }) : J.length === 0 && p.page === 0 ? /* @__PURE__ */ D(a, {
338
+ illustration: "empty-data",
339
+ title: "No applications found",
340
+ description: I ? "Nothing is currently assigned to you for this status." : m === "ALL" ? "File the first application from a published service." : "No applications match this status.",
341
+ action: /* @__PURE__ */ O(k, {
342
+ onClick: () => r("applications/new"),
343
+ children: [/* @__PURE__ */ D(S, { className: "mr-1.5 h-4 w-4" }), " New application"]
344
+ })
345
+ }) : /* @__PURE__ */ O(E, { children: [
346
+ /* @__PURE__ */ O("div", {
347
+ className: "mb-4",
348
+ children: [/* @__PURE__ */ O("div", {
349
+ className: "mb-2 flex items-center gap-2",
350
+ children: [/* @__PURE__ */ D("h2", {
351
+ className: "text-sm font-semibold text-text-primary",
352
+ children: "SLA on this page"
353
+ }), /* @__PURE__ */ O("span", {
354
+ className: "text-xs text-text-muted",
327
355
  children: [
328
- /* @__PURE__ */ w("th", {
329
- className: "px-4 py-2.5 font-medium",
330
- children: "Reference"
331
- }),
332
- /* @__PURE__ */ w("th", {
333
- className: "px-4 py-2.5 font-medium",
334
- children: "Service"
335
- }),
336
- /* @__PURE__ */ w("th", {
337
- className: "px-4 py-2.5 font-medium",
338
- children: "Priority"
339
- }),
340
- /* @__PURE__ */ w("th", {
341
- className: "px-4 py-2.5 font-medium",
342
- children: "Assigned officer"
343
- }),
344
- /* @__PURE__ */ w("th", {
345
- className: "px-4 py-2.5 font-medium",
346
- children: "Due date (SLA)"
347
- }),
348
- /* @__PURE__ */ w("th", {
349
- className: "px-4 py-2.5 font-medium",
350
- children: "Status"
351
- }),
352
- /* @__PURE__ */ w("th", {
353
- className: "px-4 py-2.5",
354
- "aria-hidden": "true"
355
- })
356
+ "Based on due date · ",
357
+ J.length,
358
+ " shown"
356
359
  ]
357
- }) }), /* @__PURE__ */ w("tbody", {
358
- className: "divide-y divide-border-subtle",
359
- children: Y.map((e) => /* @__PURE__ */ w(R, {
360
- app: e,
361
- serviceName: W.get(e.serviceId),
362
- currentUser: r,
363
- onOpen: () => n(`applications/${e.id}`)
364
- }, e.id))
365
360
  })]
366
- })
367
- }), /* @__PURE__ */ w("ul", {
368
- className: "divide-y divide-border-subtle md:hidden",
369
- children: Y.map((e) => /* @__PURE__ */ w("li", { children: /* @__PURE__ */ w(z, {
370
- app: e,
371
- serviceName: W.get(e.serviceId),
372
- currentUser: r,
373
- onOpen: () => n(`applications/${e.id}`)
374
- }) }, e.id))
375
- })] })
376
- }),
377
- /* @__PURE__ */ w(m, {
378
- page: d.page,
379
- pageSize: A,
380
- itemCount: U.length,
381
- hasMore: P?.pageInfo.hasMore ?? !1,
382
- onPageChange: (e) => d.onPageChange(e, P?.pageInfo.cursor)
383
- })
384
- ] })]
361
+ }), /* @__PURE__ */ D(h, { stats: te })]
362
+ }),
363
+ /* @__PURE__ */ D(A, {
364
+ treatment: "plain",
365
+ className: "overflow-hidden border-border-seam p-0",
366
+ children: $.length === 0 ? /* @__PURE__ */ O("p", {
367
+ className: "px-5 py-10 text-center text-sm text-text-secondary",
368
+ children: [
369
+ "No applications on this page match “",
370
+ P,
371
+ "”."
372
+ ]
373
+ }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", {
374
+ className: "hidden overflow-x-auto md:block",
375
+ children: /* @__PURE__ */ O("table", {
376
+ className: "w-full text-left text-sm",
377
+ children: [/* @__PURE__ */ D("thead", { children: /* @__PURE__ */ O("tr", {
378
+ className: "border-b border-border-seam text-xs font-medium uppercase tracking-wide text-text-muted",
379
+ children: [
380
+ /* @__PURE__ */ D("th", {
381
+ className: "px-4 py-2.5 font-medium",
382
+ children: "Reference"
383
+ }),
384
+ /* @__PURE__ */ D("th", {
385
+ className: "px-4 py-2.5 font-medium",
386
+ children: "Service"
387
+ }),
388
+ /* @__PURE__ */ D("th", {
389
+ className: "px-4 py-2.5 font-medium",
390
+ children: "Priority"
391
+ }),
392
+ /* @__PURE__ */ D("th", {
393
+ className: "px-4 py-2.5 font-medium",
394
+ children: "Assigned officer"
395
+ }),
396
+ /* @__PURE__ */ D("th", {
397
+ className: "px-4 py-2.5 font-medium",
398
+ children: "Due date (SLA)"
399
+ }),
400
+ /* @__PURE__ */ D("th", {
401
+ className: "px-4 py-2.5 font-medium",
402
+ children: "Status"
403
+ }),
404
+ /* @__PURE__ */ D("th", {
405
+ className: "px-4 py-2.5",
406
+ "aria-hidden": "true"
407
+ })
408
+ ]
409
+ }) }), /* @__PURE__ */ D("tbody", {
410
+ className: "divide-y divide-border-subtle",
411
+ children: $.map((e) => /* @__PURE__ */ D(B, {
412
+ app: e,
413
+ serviceName: Y.get(e.serviceId),
414
+ currentUser: i,
415
+ onOpen: () => r(`applications/${e.id}`)
416
+ }, e.id))
417
+ })]
418
+ })
419
+ }), /* @__PURE__ */ D("ul", {
420
+ className: "divide-y divide-border-subtle md:hidden",
421
+ children: $.map((e) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */ D(V, {
422
+ app: e,
423
+ serviceName: Y.get(e.serviceId),
424
+ currentUser: i,
425
+ onOpen: () => r(`applications/${e.id}`)
426
+ }) }, e.id))
427
+ })] })
428
+ }),
429
+ /* @__PURE__ */ D(g, {
430
+ page: p.page,
431
+ pageSize: N,
432
+ itemCount: J.length,
433
+ hasMore: z?.pageInfo.hasMore ?? !1,
434
+ onPageChange: (e) => p.onPageChange(e, z?.pageInfo.cursor)
435
+ })
436
+ ] })
437
+ ]
385
438
  });
386
439
  }
387
440
  //#endregion
388
- export { B as ApplicationsPage };
441
+ export { H as ApplicationsPage };
389
442
 
390
443
  //# sourceMappingURL=ApplicationsPage.js.map