@burdenoff/microfe-govcitizenhub 2026.827.1 → 2026.830.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.
- package/dist/govcitizenhub/GovCitizenHubRoot.d.ts.map +1 -1
- package/dist/govcitizenhub/GovCitizenHubRoot.js +69 -61
- package/dist/govcitizenhub/GovCitizenHubRoot.js.map +1 -1
- package/dist/govcitizenhub/components/StateViews.d.ts.map +1 -1
- package/dist/govcitizenhub/components/StateViews.js +36 -29
- package/dist/govcitizenhub/components/StateViews.js.map +1 -1
- package/dist/govcitizenhub/pages/DashboardPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/DashboardPage.js +107 -102
- package/dist/govcitizenhub/pages/DashboardPage.js.map +1 -1
- package/dist/govcitizenhub/pages/services/ServicesPage.d.ts.map +1 -1
- package/dist/govcitizenhub/pages/services/ServicesPage.js +93 -95
- package/dist/govcitizenhub/pages/services/ServicesPage.js.map +1 -1
- package/dist/shared/hooks/useTr.d.ts +17 -0
- package/dist/shared/hooks/useTr.d.ts.map +1 -0
- package/dist/shared/hooks/useTr.js +14 -0
- package/dist/shared/hooks/useTr.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GovCitizenHubRoot.d.ts","sourceRoot":"","sources":["../../src/govcitizenhub/GovCitizenHubRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA6B,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GovCitizenHubRoot.d.ts","sourceRoot":"","sources":["../../src/govcitizenhub/GovCitizenHubRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA6B,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAoB3E,OAAO,KAAK,EAAE,sBAAsB,EAAW,MAAM,SAAS,CAAC;AA4D/D,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAqHxD,CAAC"}
|
|
@@ -1,17 +1,39 @@
|
|
|
1
1
|
import { joinPath as e } from "./utils/navigation.js";
|
|
2
2
|
import { GovCitizenHubProvider as t } from "./context/GovCitizenHubContext.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { useTr as n } from "../shared/hooks/useTr.js";
|
|
4
|
+
import { GovCitizenHubRoutes as r } from "./GovCitizenHubRoutes.js";
|
|
5
|
+
import { Component as i, useEffect as a } from "react";
|
|
6
|
+
import { QueryClient as o, QueryClientProvider as s } from "@tanstack/react-query";
|
|
7
|
+
import { FeatureFlagProvider as c } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
8
|
+
import { BadgeCheck as l, Briefcase as u, Building2 as d, CreditCard as f, FileText as p, FolderOpen as m, Landmark as h, LayoutDashboard as g, MessageSquareWarning as _, ShieldQuestion as v } from "lucide-react";
|
|
9
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
9
10
|
//#region src/govcitizenhub/GovCitizenHubRoot.tsx
|
|
10
|
-
var
|
|
11
|
+
var x = new o({ defaultOptions: { queries: {
|
|
11
12
|
staleTime: 60 * 1e3,
|
|
12
13
|
retry: 1,
|
|
13
14
|
refetchOnWindowFocus: !1
|
|
14
|
-
} } }),
|
|
15
|
+
} } }), S = ({ message: e }) => {
|
|
16
|
+
let t = n();
|
|
17
|
+
return /* @__PURE__ */ b("div", {
|
|
18
|
+
className: "m-4 rounded-xl border border-border-seam bg-bg-surface p-6",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ y("h2", {
|
|
21
|
+
className: "text-lg font-semibold text-status-error-text",
|
|
22
|
+
children: t("govcitizenhub.errorTitle", "Something went wrong")
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ y("p", {
|
|
25
|
+
className: "mt-2 text-sm text-text-secondary",
|
|
26
|
+
children: e ?? t("govcitizenhub.errorFallback", "Unknown error")
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ y("button", {
|
|
29
|
+
type: "button",
|
|
30
|
+
onClick: () => window.location.reload(),
|
|
31
|
+
className: "mt-4 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
32
|
+
children: t("common.reload", "Reload")
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}, C = class extends i {
|
|
15
37
|
constructor(e) {
|
|
16
38
|
super(e), this.state = {
|
|
17
39
|
hasError: !1,
|
|
@@ -26,133 +48,119 @@ var b = new a({ defaultOptions: { queries: {
|
|
|
26
48
|
}
|
|
27
49
|
componentDidCatch(e, t) {}
|
|
28
50
|
render() {
|
|
29
|
-
return this.state.hasError ? /* @__PURE__ */ y(
|
|
30
|
-
className: "m-4 rounded-xl border border-border-seam bg-bg-surface p-6",
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ v("h2", {
|
|
33
|
-
className: "text-lg font-semibold text-status-error-text",
|
|
34
|
-
children: "Something went wrong"
|
|
35
|
-
}),
|
|
36
|
-
/* @__PURE__ */ v("p", {
|
|
37
|
-
className: "mt-2 text-sm text-text-secondary",
|
|
38
|
-
children: this.state.message ?? "Unknown error"
|
|
39
|
-
}),
|
|
40
|
-
/* @__PURE__ */ v("button", {
|
|
41
|
-
type: "button",
|
|
42
|
-
onClick: () => window.location.reload(),
|
|
43
|
-
className: "mt-4 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
44
|
-
children: "Reload"
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
}) : this.props.children;
|
|
51
|
+
return this.state.hasError ? /* @__PURE__ */ y(S, { message: this.state.message }) : this.props.children;
|
|
48
52
|
}
|
|
49
|
-
},
|
|
50
|
-
let { registerNavItems:
|
|
51
|
-
return
|
|
52
|
-
if (
|
|
53
|
+
}, w = (i) => {
|
|
54
|
+
let { registerNavItems: o, registerFooterItems: b, basePath: S = "/" } = i, w = n();
|
|
55
|
+
return a(() => {
|
|
56
|
+
if (o) return o([
|
|
53
57
|
{
|
|
54
58
|
id: "govcitizenhub-dashboard",
|
|
55
|
-
label: "Dashboard",
|
|
59
|
+
label: w("govcitizenhub.dashboard", "Dashboard"),
|
|
56
60
|
path: e(S, ""),
|
|
57
|
-
icon: /* @__PURE__ */
|
|
61
|
+
icon: /* @__PURE__ */ y(g, { size: 20 }),
|
|
58
62
|
order: 0,
|
|
59
63
|
group: "products"
|
|
60
64
|
},
|
|
61
65
|
{
|
|
62
66
|
id: "govcitizenhub-services",
|
|
63
|
-
label: "Services",
|
|
67
|
+
label: w("govcitizenhub.services", "Services"),
|
|
64
68
|
path: e(S, "services"),
|
|
65
|
-
icon: /* @__PURE__ */
|
|
69
|
+
icon: /* @__PURE__ */ y(u, { size: 20 }),
|
|
66
70
|
order: 1,
|
|
67
71
|
group: "products"
|
|
68
72
|
},
|
|
69
73
|
{
|
|
70
74
|
id: "govcitizenhub-applications",
|
|
71
|
-
label: "Applications",
|
|
75
|
+
label: w("govcitizenhub.applications", "Applications"),
|
|
72
76
|
path: e(S, "applications"),
|
|
73
|
-
icon: /* @__PURE__ */
|
|
77
|
+
icon: /* @__PURE__ */ y(p, { size: 20 }),
|
|
74
78
|
order: 2,
|
|
75
79
|
group: "products"
|
|
76
80
|
},
|
|
77
81
|
{
|
|
78
82
|
id: "govcitizenhub-agencies",
|
|
79
|
-
label: "Agencies",
|
|
83
|
+
label: w("govcitizenhub.agencies", "Agencies"),
|
|
80
84
|
path: e(S, "agencies"),
|
|
81
|
-
icon: /* @__PURE__ */
|
|
85
|
+
icon: /* @__PURE__ */ y(d, { size: 20 }),
|
|
82
86
|
order: 3,
|
|
83
87
|
group: "products"
|
|
84
88
|
},
|
|
85
89
|
{
|
|
86
90
|
id: "govcitizenhub-documents",
|
|
87
|
-
label: "Documents",
|
|
91
|
+
label: w("govcitizenhub.documents", "Documents"),
|
|
88
92
|
path: e(S, "documents"),
|
|
89
|
-
icon: /* @__PURE__ */
|
|
93
|
+
icon: /* @__PURE__ */ y(m, { size: 20 }),
|
|
90
94
|
order: 4,
|
|
91
95
|
group: "products"
|
|
92
96
|
},
|
|
93
97
|
{
|
|
94
98
|
id: "govcitizenhub-payments",
|
|
95
|
-
label: "Payments",
|
|
99
|
+
label: w("govcitizenhub.payments", "Payments"),
|
|
96
100
|
path: e(S, "payments"),
|
|
97
|
-
icon: /* @__PURE__ */
|
|
101
|
+
icon: /* @__PURE__ */ y(f, { size: 20 }),
|
|
98
102
|
order: 5,
|
|
99
103
|
group: "products"
|
|
100
104
|
},
|
|
101
105
|
{
|
|
102
106
|
id: "govcitizenhub-permits",
|
|
103
|
-
label: "Permits",
|
|
107
|
+
label: w("govcitizenhub.permits", "Permits"),
|
|
104
108
|
path: e(S, "permits"),
|
|
105
|
-
icon: /* @__PURE__ */
|
|
109
|
+
icon: /* @__PURE__ */ y(l, { size: 20 }),
|
|
106
110
|
order: 6,
|
|
107
111
|
group: "products"
|
|
108
112
|
},
|
|
109
113
|
{
|
|
110
114
|
id: "govcitizenhub-verify",
|
|
111
|
-
label: "Verify Permit",
|
|
115
|
+
label: w("govcitizenhub.verifyPermit", "Verify Permit"),
|
|
112
116
|
path: e(S, "permits/verify"),
|
|
113
|
-
icon: /* @__PURE__ */ v
|
|
117
|
+
icon: /* @__PURE__ */ y(v, { size: 20 }),
|
|
114
118
|
order: 7,
|
|
115
119
|
group: "products"
|
|
116
120
|
},
|
|
117
121
|
{
|
|
118
122
|
id: "govcitizenhub-grievances",
|
|
119
|
-
label: "Grievances",
|
|
123
|
+
label: w("govcitizenhub.grievances", "Grievances"),
|
|
120
124
|
path: e(S, "grievances"),
|
|
121
|
-
icon: /* @__PURE__ */
|
|
125
|
+
icon: /* @__PURE__ */ y(_, { size: 20 }),
|
|
122
126
|
order: 8,
|
|
123
127
|
group: "products"
|
|
124
128
|
},
|
|
125
129
|
{
|
|
126
130
|
id: "govcitizenhub-intelligence",
|
|
127
|
-
label: "Community Intelligence",
|
|
131
|
+
label: w("govcitizenhub.communityIntelligence", "Community Intelligence"),
|
|
128
132
|
path: e(S, "intelligence"),
|
|
129
|
-
icon: /* @__PURE__ */
|
|
133
|
+
icon: /* @__PURE__ */ y(h, { size: 20 }),
|
|
130
134
|
order: 9,
|
|
131
135
|
group: "products"
|
|
132
136
|
}
|
|
133
137
|
]);
|
|
134
|
-
}, [
|
|
135
|
-
|
|
138
|
+
}, [
|
|
139
|
+
o,
|
|
140
|
+
S,
|
|
141
|
+
w
|
|
142
|
+
]), a(() => {
|
|
143
|
+
if (b) return b([{
|
|
136
144
|
id: "govcitizenhub-status",
|
|
137
|
-
label: "GovCitizenHub Ready",
|
|
145
|
+
label: w("govcitizenhub.readyStatus", "GovCitizenHub Ready"),
|
|
138
146
|
type: "status",
|
|
139
147
|
section: "left",
|
|
140
148
|
order: 10
|
|
141
149
|
}]);
|
|
142
|
-
}, [
|
|
143
|
-
client:
|
|
144
|
-
children: /* @__PURE__ */
|
|
150
|
+
}, [b, w]), /* @__PURE__ */ y(s, {
|
|
151
|
+
client: x,
|
|
152
|
+
children: /* @__PURE__ */ y(c, {
|
|
145
153
|
workspaceId: null,
|
|
146
154
|
gateway: "global",
|
|
147
155
|
defaultEnabled: !0,
|
|
148
|
-
children: /* @__PURE__ */
|
|
149
|
-
...
|
|
150
|
-
children: /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ y(C, { children: /* @__PURE__ */ y(t, {
|
|
157
|
+
...i,
|
|
158
|
+
children: /* @__PURE__ */ y(r, {})
|
|
151
159
|
}) })
|
|
152
160
|
})
|
|
153
161
|
});
|
|
154
162
|
};
|
|
155
163
|
//#endregion
|
|
156
|
-
export {
|
|
164
|
+
export { w as GovCitizenHubRoot };
|
|
157
165
|
|
|
158
166
|
//# sourceMappingURL=GovCitizenHubRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GovCitizenHubRoot.js","names":[],"sources":["../../src/govcitizenhub/GovCitizenHubRoot.tsx"],"sourcesContent":["/**\n * GovCitizenHub Root Component\n * @module govcitizenhub\n *\n * Host-contract entry point. Registers the product's sidebar nav (matching the\n * app-shell static NavRegistration block so the two are one source of truth) and\n * mounts the routed pages inside the shared QueryClient + FeatureFlag providers.\n */\n\nimport { Component, type ErrorInfo, type FC, type ReactNode } from 'react';\nimport { useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport {\n LayoutDashboard,\n Briefcase,\n FileText,\n Building2,\n FolderOpen,\n CreditCard,\n BadgeCheck,\n ShieldQuestion,\n MessageSquareWarning,\n Landmark,\n} from 'lucide-react';\nimport { GovCitizenHubProvider } from './context/GovCitizenHubContext';\nimport { GovCitizenHubRoutes } from './GovCitizenHubRoutes';\nimport { joinPath } from './utils/navigation';\nimport type { GovCitizenHubRootProps, NavItem } from './types';\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 60 * 1000,\n retry: 1,\n refetchOnWindowFocus: false,\n },\n },\n});\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n message: string | null;\n}\n\
|
|
1
|
+
{"version":3,"file":"GovCitizenHubRoot.js","names":[],"sources":["../../src/govcitizenhub/GovCitizenHubRoot.tsx"],"sourcesContent":["/**\n * GovCitizenHub Root Component\n * @module govcitizenhub\n *\n * Host-contract entry point. Registers the product's sidebar nav (matching the\n * app-shell static NavRegistration block so the two are one source of truth) and\n * mounts the routed pages inside the shared QueryClient + FeatureFlag providers.\n */\n\nimport { Component, type ErrorInfo, type FC, type ReactNode } from 'react';\nimport { useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport {\n LayoutDashboard,\n Briefcase,\n FileText,\n Building2,\n FolderOpen,\n CreditCard,\n BadgeCheck,\n ShieldQuestion,\n MessageSquareWarning,\n Landmark,\n} from 'lucide-react';\nimport { GovCitizenHubProvider } from './context/GovCitizenHubContext';\nimport { GovCitizenHubRoutes } from './GovCitizenHubRoutes';\nimport { joinPath } from './utils/navigation';\nimport { useTr } from '../shared/hooks/useTr';\nimport type { GovCitizenHubRootProps, NavItem } from './types';\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 60 * 1000,\n retry: 1,\n refetchOnWindowFocus: false,\n },\n },\n});\n\ninterface ErrorBoundaryState {\n hasError: boolean;\n message: string | null;\n}\n\nconst ErrorFallback: FC<{ message: string | null }> = ({ message }) => {\n const tr = useTr();\n return (\n <div className=\"m-4 rounded-xl border border-border-seam bg-bg-surface p-6\">\n <h2 className=\"text-lg font-semibold text-status-error-text\">\n {tr('govcitizenhub.errorTitle', 'Something went wrong')}\n </h2>\n <p className=\"mt-2 text-sm text-text-secondary\">\n {message ?? tr('govcitizenhub.errorFallback', 'Unknown error')}\n </p>\n <button\n type=\"button\"\n onClick={() => window.location.reload()}\n className=\"mt-4 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90\"\n >\n {tr('common.reload', 'Reload')}\n </button>\n </div>\n );\n};\n\nclass GovErrorBoundary extends Component<{ children: ReactNode }, ErrorBoundaryState> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, message: null };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return { hasError: true, message: error.message };\n }\n\n componentDidCatch(_error: Error, _info: ErrorInfo) {\n // Surfaced in the fallback; no external logger wired here.\n }\n\n render() {\n if (this.state.hasError) {\n return <ErrorFallback message={this.state.message} />;\n }\n return this.props.children;\n }\n}\n\nexport const GovCitizenHubRoot: FC<GovCitizenHubRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const tr = useTr();\n\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'govcitizenhub-dashboard',\n label: tr('govcitizenhub.dashboard', 'Dashboard'),\n path: joinPath(basePath, ''),\n icon: <LayoutDashboard size={20} />,\n order: 0,\n group: 'products',\n },\n {\n id: 'govcitizenhub-services',\n label: tr('govcitizenhub.services', 'Services'),\n path: joinPath(basePath, 'services'),\n icon: <Briefcase size={20} />,\n order: 1,\n group: 'products',\n },\n {\n id: 'govcitizenhub-applications',\n label: tr('govcitizenhub.applications', 'Applications'),\n path: joinPath(basePath, 'applications'),\n icon: <FileText size={20} />,\n order: 2,\n group: 'products',\n },\n {\n id: 'govcitizenhub-agencies',\n label: tr('govcitizenhub.agencies', 'Agencies'),\n path: joinPath(basePath, 'agencies'),\n icon: <Building2 size={20} />,\n order: 3,\n group: 'products',\n },\n {\n id: 'govcitizenhub-documents',\n label: tr('govcitizenhub.documents', 'Documents'),\n path: joinPath(basePath, 'documents'),\n icon: <FolderOpen size={20} />,\n order: 4,\n group: 'products',\n },\n {\n id: 'govcitizenhub-payments',\n label: tr('govcitizenhub.payments', 'Payments'),\n path: joinPath(basePath, 'payments'),\n icon: <CreditCard size={20} />,\n order: 5,\n group: 'products',\n },\n {\n id: 'govcitizenhub-permits',\n label: tr('govcitizenhub.permits', 'Permits'),\n path: joinPath(basePath, 'permits'),\n icon: <BadgeCheck size={20} />,\n order: 6,\n group: 'products',\n },\n {\n id: 'govcitizenhub-verify',\n label: tr('govcitizenhub.verifyPermit', 'Verify Permit'),\n path: joinPath(basePath, 'permits/verify'),\n icon: <ShieldQuestion size={20} />,\n order: 7,\n group: 'products',\n },\n {\n id: 'govcitizenhub-grievances',\n label: tr('govcitizenhub.grievances', 'Grievances'),\n path: joinPath(basePath, 'grievances'),\n icon: <MessageSquareWarning size={20} />,\n order: 8,\n group: 'products',\n },\n {\n id: 'govcitizenhub-intelligence',\n label: tr('govcitizenhub.communityIntelligence', 'Community Intelligence'),\n path: joinPath(basePath, 'intelligence'),\n icon: <Landmark size={20} />,\n order: 9,\n group: 'products',\n },\n ];\n\n return registerNavItems(navItems);\n }, [registerNavItems, basePath, tr]);\n\n useEffect(() => {\n if (!registerFooterItems) return;\n return registerFooterItems([\n {\n id: 'govcitizenhub-status',\n label: tr('govcitizenhub.readyStatus', 'GovCitizenHub Ready'),\n type: 'status',\n section: 'left',\n order: 10,\n },\n ]);\n }, [registerFooterItems, tr]);\n\n return (\n <QueryClientProvider client={queryClient}>\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <GovErrorBoundary>\n <GovCitizenHubProvider {...props}>\n <GovCitizenHubRoutes />\n </GovCitizenHubProvider>\n </GovErrorBoundary>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateViews.d.ts","sourceRoot":"","sources":["../../../src/govcitizenhub/components/StateViews.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StateViews.d.ts","sourceRoot":"","sources":["../../../src/govcitizenhub/components/StateViews.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM3C,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAQ5C,CAAC;AAEF,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAgCxC,CAAC;AAEF,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAWpC,CAAC"}
|
|
@@ -1,34 +1,41 @@
|
|
|
1
1
|
import { cn as e } from "../utils/cn.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useTr as t } from "../../shared/hooks/useTr.js";
|
|
3
|
+
import { AlertCircle as n } from "lucide-react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Spinner as a } from "@burdenoff/fe-libs/ui";
|
|
5
6
|
//#region src/govcitizenhub/components/StateViews.tsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
className: "
|
|
10
|
-
children:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
className: "
|
|
21
|
-
children:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
7
|
+
var o = ({ label: n, className: o }) => {
|
|
8
|
+
let s = t();
|
|
9
|
+
return /* @__PURE__ */ i("div", {
|
|
10
|
+
className: e("flex min-h-[40vh] flex-col items-center justify-center gap-3", o),
|
|
11
|
+
children: [/* @__PURE__ */ r(a, { size: "lg" }), /* @__PURE__ */ r("p", {
|
|
12
|
+
className: "text-sm text-text-secondary",
|
|
13
|
+
children: n ?? s("common.loading", "Loading…")
|
|
14
|
+
})]
|
|
15
|
+
});
|
|
16
|
+
}, s = ({ title: a, message: o, onRetry: s, className: c }) => {
|
|
17
|
+
let l = t();
|
|
18
|
+
return /* @__PURE__ */ i("div", {
|
|
19
|
+
className: e("flex min-h-[40vh] flex-col items-center justify-center gap-4 text-center", c),
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ r(n, { className: "h-10 w-10 text-status-error-text" }),
|
|
22
|
+
/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("h2", {
|
|
23
|
+
className: "text-lg font-semibold text-text-primary",
|
|
24
|
+
children: a ?? l("govcitizenhub.errorTitle", "Something went wrong")
|
|
25
|
+
}), o && /* @__PURE__ */ r("p", {
|
|
26
|
+
className: "mt-1 max-w-md text-sm text-text-secondary",
|
|
27
|
+
children: o
|
|
28
|
+
})] }),
|
|
29
|
+
s && /* @__PURE__ */ r("button", {
|
|
30
|
+
type: "button",
|
|
31
|
+
onClick: s,
|
|
32
|
+
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
33
|
+
children: l("common.retry", "Retry")
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
};
|
|
31
38
|
//#endregion
|
|
32
|
-
export {
|
|
39
|
+
export { s as ErrorView, o as LoadingView };
|
|
33
40
|
|
|
34
41
|
//# sourceMappingURL=StateViews.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateViews.js","names":[],"sources":["../../../src/govcitizenhub/components/StateViews.tsx"],"sourcesContent":["/**\n * Shared loading / error / section state views\n * @module govcitizenhub/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { AlertCircle } from 'lucide-react';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface LoadingViewProps {\n label?: string;\n className?: string;\n}\n\nexport const LoadingView: FC<LoadingViewProps> = ({ label
|
|
1
|
+
{"version":3,"file":"StateViews.js","names":[],"sources":["../../../src/govcitizenhub/components/StateViews.tsx"],"sourcesContent":["/**\n * Shared loading / error / section state views\n * @module govcitizenhub/components\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { AlertCircle } from 'lucide-react';\nimport { Spinner } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { useTr } from '../../shared/hooks/useTr';\n\ninterface LoadingViewProps {\n label?: string;\n className?: string;\n}\n\nexport const LoadingView: FC<LoadingViewProps> = ({ label, className }) => {\n const tr = useTr();\n return (\n <div className={cn('flex min-h-[40vh] flex-col items-center justify-center gap-3', className)}>\n <Spinner size=\"lg\" />\n <p className=\"text-sm text-text-secondary\">{label ?? tr('common.loading', 'Loading…')}</p>\n </div>\n );\n};\n\ninterface ErrorViewProps {\n title?: string;\n message?: string;\n onRetry?: () => void;\n className?: string;\n}\n\nexport const ErrorView: FC<ErrorViewProps> = ({\n title,\n message,\n onRetry,\n className,\n}) => {\n const tr = useTr();\n return (\n <div\n className={cn(\n 'flex min-h-[40vh] flex-col items-center justify-center gap-4 text-center',\n className\n )}\n >\n <AlertCircle className=\"h-10 w-10 text-status-error-text\" />\n <div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {title ?? tr('govcitizenhub.errorTitle', 'Something went wrong')}\n </h2>\n {message && <p className=\"mt-1 max-w-md text-sm text-text-secondary\">{message}</p>}\n </div>\n {onRetry && (\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90\"\n >\n {tr('common.retry', 'Retry')}\n </button>\n )}\n </div>\n );\n};\n\ninterface SectionProps {\n title: string;\n description?: string;\n action?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport const Section: FC<SectionProps> = ({ title, description, action, children, className }) => (\n <section className={cn('mt-8 first:mt-0', className)}>\n <div className=\"mb-3 flex items-end justify-between gap-3\">\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">{title}</h2>\n {description && <p className=\"mt-0.5 text-sm text-text-secondary\">{description}</p>}\n </div>\n {action && <div className=\"shrink-0\">{action}</div>}\n </div>\n {children}\n </section>\n);\n"],"mappings":";;;;;;AAgBA,IAAa,KAAqC,EAAE,UAAO,mBAAgB;CACzE,IAAM,IAAK,EAAM;CACjB,OACE,kBAAC,OAAD;EAAK,WAAW,EAAG,gEAAgE,CAAS;YAA5F,CACE,kBAAC,GAAD,EAAS,MAAK,KAAM,CAAA,GACpB,kBAAC,KAAD;GAAG,WAAU;aAA+B,KAAS,EAAG,kBAAkB,UAAU;EAAK,CAAA,CACtF;;AAET,GASa,KAAiC,EAC5C,UACA,YACA,YACA,mBACI;CACJ,IAAM,IAAK,EAAM;CACjB,OACE,kBAAC,OAAD;EACE,WAAW,EACT,4EACA,CACF;YAJF;GAME,kBAAC,GAAD,EAAa,WAAU,mCAAoC,CAAA;GAC3D,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;cACX,KAAS,EAAG,4BAA4B,sBAAsB;GAC7D,CAAA,GACH,KAAW,kBAAC,KAAD;IAAG,WAAU;cAA6C;GAAW,CAAA,CAC9E,EAAA,CAAA;GACJ,KACC,kBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,WAAU;cAET,EAAG,gBAAgB,OAAO;GACrB,CAAA;EAEP;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardPage.d.ts","sourceRoot":"","sources":["../../../src/govcitizenhub/pages/DashboardPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"DashboardPage.d.ts","sourceRoot":"","sources":["../../../src/govcitizenhub/pages/DashboardPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgHH,wBAAgB,aAAa,4CAgY5B"}
|