@burdenoff/microfe-atheletebridge 2026.1031.3 → 2026.1103.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/atheletebridge/AthleteBridgeRoot.d.ts.map +1 -1
- package/dist/atheletebridge/AthleteBridgeRoot.js +63 -47
- package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
- package/dist/atheletebridge/AthleteBridgeRoutes.d.ts.map +1 -1
- package/dist/atheletebridge/AthleteBridgeRoutes.js +62 -6
- package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
- package/dist/atheletebridge/components/StatusBadge.d.ts.map +1 -1
- package/dist/atheletebridge/components/StatusBadge.js +13 -1
- package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
- package/dist/atheletebridge/components/registration/PaymentSummaryPanel.d.ts +6 -0
- package/dist/atheletebridge/components/registration/PaymentSummaryPanel.d.ts.map +1 -0
- package/dist/atheletebridge/components/registration/PaymentSummaryPanel.js +104 -0
- package/dist/atheletebridge/components/registration/PaymentSummaryPanel.js.map +1 -0
- package/dist/atheletebridge/components/registration/RegistrationEntryFields.d.ts +15 -0
- package/dist/atheletebridge/components/registration/RegistrationEntryFields.d.ts.map +1 -0
- package/dist/atheletebridge/components/registration/RegistrationEntryFields.js +236 -0
- package/dist/atheletebridge/components/registration/RegistrationEntryFields.js.map +1 -0
- package/dist/atheletebridge/components/registration/entryRules.d.ts +23 -0
- package/dist/atheletebridge/components/registration/entryRules.d.ts.map +1 -0
- package/dist/atheletebridge/components/registration/entryRules.js +29 -0
- package/dist/atheletebridge/components/registration/entryRules.js.map +1 -0
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.d.ts +11 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.d.ts.map +1 -1
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +95 -47
- package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
- package/dist/atheletebridge/hooks/useRegistrationApi.d.ts +54 -0
- package/dist/atheletebridge/hooks/useRegistrationApi.d.ts.map +1 -0
- package/dist/atheletebridge/hooks/useRegistrationApi.js +265 -0
- package/dist/atheletebridge/hooks/useRegistrationApi.js.map +1 -0
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.d.ts +3 -1
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.d.ts.map +1 -1
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +278 -123
- package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -1
- package/dist/atheletebridge/pages/registrations/MyRegistrationsPage.d.ts +10 -0
- package/dist/atheletebridge/pages/registrations/MyRegistrationsPage.d.ts.map +1 -0
- package/dist/atheletebridge/pages/registrations/MyRegistrationsPage.js +89 -0
- package/dist/atheletebridge/pages/registrations/MyRegistrationsPage.js.map +1 -0
- package/dist/atheletebridge/pages/registrations/RecordRegistrationPage.d.ts +10 -0
- package/dist/atheletebridge/pages/registrations/RecordRegistrationPage.d.ts.map +1 -0
- package/dist/atheletebridge/pages/registrations/RecordRegistrationPage.js +94 -0
- package/dist/atheletebridge/pages/registrations/RecordRegistrationPage.js.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegisterPage.d.ts +11 -0
- package/dist/atheletebridge/pages/registrations/RegisterPage.d.ts.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegisterPage.js +160 -0
- package/dist/atheletebridge/pages/registrations/RegisterPage.js.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.d.ts +10 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.d.ts.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js +602 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormBuilderPage.js.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.d.ts +9 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.d.ts.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js +317 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormDetailPage.js.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormsListPage.d.ts +9 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormsListPage.d.ts.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormsListPage.js +127 -0
- package/dist/atheletebridge/pages/registrations/RegistrationFormsListPage.js.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.d.ts +11 -0
- package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.d.ts.map +1 -0
- package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js +411 -0
- package/dist/atheletebridge/pages/registrations/RegistrationSubmissionPage.js.map +1 -0
- package/dist/atheletebridge/types/index.d.ts +13 -0
- package/dist/atheletebridge/types/index.d.ts.map +1 -1
- package/dist/atheletebridge/types/registration.d.ts +220 -0
- package/dist/atheletebridge/types/registration.d.ts.map +1 -0
- package/dist/atheletebridge/utils/datetime.js +8 -1
- package/dist/atheletebridge/utils/datetime.js.map +1 -1
- package/dist/atheletebridge/utils/fixtureLifecycle.d.ts +38 -0
- package/dist/atheletebridge/utils/fixtureLifecycle.d.ts.map +1 -0
- package/dist/atheletebridge/utils/fixtureLifecycle.js +30 -0
- package/dist/atheletebridge/utils/fixtureLifecycle.js.map +1 -0
- package/dist/atheletebridge/utils/money.d.ts +22 -0
- package/dist/atheletebridge/utils/money.d.ts.map +1 -0
- package/dist/atheletebridge/utils/money.js +38 -0
- package/dist/atheletebridge/utils/money.js.map +1 -0
- package/dist/atheletebridge/utils/registration.d.ts +17 -0
- package/dist/atheletebridge/utils/registration.d.ts.map +1 -0
- package/dist/atheletebridge/utils/registration.js +25 -0
- package/dist/atheletebridge/utils/registration.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AthleteBridgeRoot.d.ts","sourceRoot":"","sources":["../../src/atheletebridge/AthleteBridgeRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AthleteBridgeRoot.d.ts","sourceRoot":"","sources":["../../src/atheletebridge/AthleteBridgeRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAsBhC,OAAO,KAAK,EAAE,sBAAsB,EAAW,MAAM,SAAS,CAAC;AAY/D,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAyJxD,CAAC"}
|
|
@@ -5,123 +5,139 @@ import { ToastViewport as r } from "./components/ToastViewport.js";
|
|
|
5
5
|
import { useEffect as i } from "react";
|
|
6
6
|
import { QueryClient as a, QueryClientProvider as o } from "@tanstack/react-query";
|
|
7
7
|
import { FeatureFlagProvider as s } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
8
|
-
import { BarChart3 as c, CalendarDays as l, ClipboardCheck as u,
|
|
9
|
-
import { jsx as
|
|
8
|
+
import { BarChart3 as c, CalendarDays as l, ClipboardCheck as u, ClipboardList as d, Cpu as f, Dumbbell as p, Gauge as m, LayoutDashboard as h, Swords as g, Ticket as _, Trophy as v, Users as y } from "lucide-react";
|
|
9
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
10
10
|
//#region src/atheletebridge/AthleteBridgeRoot.tsx
|
|
11
|
-
var
|
|
11
|
+
var S = new a({ defaultOptions: { queries: {
|
|
12
12
|
staleTime: 300 * 1e3,
|
|
13
13
|
retry: 1
|
|
14
|
-
} } }),
|
|
15
|
-
let { registerNavItems:
|
|
14
|
+
} } }), C = (a) => {
|
|
15
|
+
let { registerNavItems: C, registerFooterItems: w, basePath: T = "/", workspaceId: E } = a, D = e(), O = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
16
16
|
return i(() => {
|
|
17
|
-
if (
|
|
17
|
+
if (C) return C([
|
|
18
18
|
{
|
|
19
19
|
id: "atheletebridge-dashboard",
|
|
20
|
-
label:
|
|
21
|
-
path:
|
|
22
|
-
icon: /* @__PURE__ */
|
|
20
|
+
label: D("atheletebridge.nav.dashboard", "Dashboard"),
|
|
21
|
+
path: O(T, ""),
|
|
22
|
+
icon: /* @__PURE__ */ b(h, { size: 20 }),
|
|
23
23
|
order: 1,
|
|
24
24
|
group: "main"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
id: "atheletebridge-teams",
|
|
28
|
-
label:
|
|
29
|
-
path:
|
|
30
|
-
icon: /* @__PURE__ */
|
|
28
|
+
label: D("atheletebridge.nav.teams", "Teams"),
|
|
29
|
+
path: O(T, "teams"),
|
|
30
|
+
icon: /* @__PURE__ */ b(y, { size: 20 }),
|
|
31
31
|
order: 10,
|
|
32
32
|
group: "roster"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
id: "atheletebridge-fixtures",
|
|
36
|
-
label:
|
|
37
|
-
path:
|
|
38
|
-
icon: /* @__PURE__ */
|
|
36
|
+
label: D("atheletebridge.nav.fixtures", "Fixtures"),
|
|
37
|
+
path: O(T, "fixtures"),
|
|
38
|
+
icon: /* @__PURE__ */ b(l, { size: 20 }),
|
|
39
39
|
order: 11,
|
|
40
40
|
group: "roster"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: "atheletebridge-standings",
|
|
44
|
-
label:
|
|
45
|
-
path:
|
|
46
|
-
icon: /* @__PURE__ */ v
|
|
44
|
+
label: D("atheletebridge.nav.standings", "Standings"),
|
|
45
|
+
path: O(T, "standings"),
|
|
46
|
+
icon: /* @__PURE__ */ b(v, { size: 20 }),
|
|
47
47
|
order: 12,
|
|
48
48
|
group: "roster"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
id: "atheletebridge-tournaments",
|
|
52
|
-
label:
|
|
53
|
-
path:
|
|
54
|
-
icon: /* @__PURE__ */
|
|
52
|
+
label: D("atheletebridge.nav.tournaments", "Tournaments"),
|
|
53
|
+
path: O(T, "tournaments"),
|
|
54
|
+
icon: /* @__PURE__ */ b(g, { size: 20 }),
|
|
55
55
|
order: 13,
|
|
56
56
|
group: "roster"
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
id: "atheletebridge-registrations",
|
|
60
|
+
label: D("atheletebridge.nav.registrations", "Registrations"),
|
|
61
|
+
path: O(T, "registrations"),
|
|
62
|
+
icon: /* @__PURE__ */ b(d, { size: 20 }),
|
|
63
|
+
order: 14,
|
|
64
|
+
group: "roster"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: "atheletebridge-my-registrations",
|
|
68
|
+
label: D("atheletebridge.nav.myRegistrations", "My registrations"),
|
|
69
|
+
path: O(T, "my-registrations"),
|
|
70
|
+
icon: /* @__PURE__ */ b(_, { size: 20 }),
|
|
71
|
+
order: 15,
|
|
72
|
+
group: "roster"
|
|
73
|
+
},
|
|
58
74
|
{
|
|
59
75
|
id: "atheletebridge-programs",
|
|
60
|
-
label:
|
|
61
|
-
path:
|
|
62
|
-
icon: /* @__PURE__ */
|
|
76
|
+
label: D("atheletebridge.nav.programs", "Programs"),
|
|
77
|
+
path: O(T, "programs"),
|
|
78
|
+
icon: /* @__PURE__ */ b(p, { size: 20 }),
|
|
63
79
|
order: 20,
|
|
64
80
|
group: "training"
|
|
65
81
|
},
|
|
66
82
|
{
|
|
67
83
|
id: "atheletebridge-sessions",
|
|
68
|
-
label:
|
|
69
|
-
path:
|
|
70
|
-
icon: /* @__PURE__ */
|
|
84
|
+
label: D("atheletebridge.nav.sessions", "Sessions"),
|
|
85
|
+
path: O(T, "sessions"),
|
|
86
|
+
icon: /* @__PURE__ */ b(u, { size: 20 }),
|
|
71
87
|
order: 21,
|
|
72
88
|
group: "training"
|
|
73
89
|
},
|
|
74
90
|
{
|
|
75
91
|
id: "atheletebridge-performance",
|
|
76
|
-
label:
|
|
77
|
-
path:
|
|
78
|
-
icon: /* @__PURE__ */
|
|
92
|
+
label: D("atheletebridge.nav.performance", "Performance"),
|
|
93
|
+
path: O(T, "performance"),
|
|
94
|
+
icon: /* @__PURE__ */ b(m, { size: 20 }),
|
|
79
95
|
order: 22,
|
|
80
96
|
group: "training"
|
|
81
97
|
},
|
|
82
98
|
{
|
|
83
99
|
id: "atheletebridge-analytics",
|
|
84
|
-
label:
|
|
85
|
-
path:
|
|
86
|
-
icon: /* @__PURE__ */
|
|
100
|
+
label: D("atheletebridge.nav.analytics", "Analytics"),
|
|
101
|
+
path: O(T, "analytics"),
|
|
102
|
+
icon: /* @__PURE__ */ b(c, { size: 20 }),
|
|
87
103
|
order: 23,
|
|
88
104
|
group: "training"
|
|
89
105
|
},
|
|
90
106
|
{
|
|
91
107
|
id: "atheletebridge-ai",
|
|
92
|
-
label:
|
|
93
|
-
path:
|
|
94
|
-
icon: /* @__PURE__ */
|
|
108
|
+
label: D("atheletebridge.nav.ai", "AI Operations"),
|
|
109
|
+
path: O(T, "ai"),
|
|
110
|
+
icon: /* @__PURE__ */ b(f, { size: 20 }),
|
|
95
111
|
order: 24,
|
|
96
112
|
group: "training"
|
|
97
113
|
}
|
|
98
114
|
]);
|
|
99
115
|
}, [
|
|
100
|
-
x,
|
|
101
116
|
C,
|
|
102
|
-
T
|
|
117
|
+
T,
|
|
118
|
+
D
|
|
103
119
|
]), i(() => {
|
|
104
|
-
if (
|
|
120
|
+
if (w) return w([{
|
|
105
121
|
id: "atheletebridge-status",
|
|
106
|
-
label:
|
|
122
|
+
label: D("atheletebridge.footer.ready", "AthleteBridge Ready"),
|
|
107
123
|
type: "status",
|
|
108
124
|
order: 10,
|
|
109
125
|
section: "left"
|
|
110
126
|
}]);
|
|
111
|
-
}, [
|
|
112
|
-
client:
|
|
113
|
-
children: /* @__PURE__ */
|
|
114
|
-
workspaceId:
|
|
127
|
+
}, [w, D]), /* @__PURE__ */ b(o, {
|
|
128
|
+
client: S,
|
|
129
|
+
children: /* @__PURE__ */ b(s, {
|
|
130
|
+
workspaceId: E ?? null,
|
|
115
131
|
gateway: "global",
|
|
116
132
|
defaultEnabled: !0,
|
|
117
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ x(t, {
|
|
118
134
|
...a,
|
|
119
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ b(n, {}), /* @__PURE__ */ b(r, {})]
|
|
120
136
|
})
|
|
121
137
|
})
|
|
122
138
|
});
|
|
123
139
|
};
|
|
124
140
|
//#endregion
|
|
125
|
-
export {
|
|
141
|
+
export { C as AthleteBridgeRoot };
|
|
126
142
|
|
|
127
143
|
//# sourceMappingURL=AthleteBridgeRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AthleteBridgeRoot.js","names":[],"sources":["../../src/atheletebridge/AthleteBridgeRoot.tsx"],"sourcesContent":["/**\n * AthleteBridge Root Component\n * @module atheletebridge\n *\n * The single Root export consumed by the host app shell. The export name and\n * props (AthleteBridgeRootProps) are the host contract and must not change —\n * only the internal nav config, provider tree, and routes are product-specific.\n */\n\nimport type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { useAbTranslate } from './i18n';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport {\n LayoutDashboard,\n Users,\n CalendarDays,\n Trophy,\n Dumbbell,\n ClipboardCheck,\n Gauge,\n BarChart3,\n Swords,\n Cpu,\n} from 'lucide-react';\nimport { AthleteBridgeProvider } from './context/AthleteBridgeContext';\nimport { AthleteBridgeRoutes } from './AthleteBridgeRoutes';\nimport { ToastViewport } from './components/ToastViewport';\nimport type { AthleteBridgeRootProps, NavItem } from './types';\n\n// Create a query client for this microfrontend\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000,\n retry: 1,\n },\n },\n});\n\nexport const AthleteBridgeRoot: FC<AthleteBridgeRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/', workspaceId } = props;\n const t = useAbTranslate();\n\n // Helper to join paths correctly\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with shell on mount\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'atheletebridge-dashboard',\n label: t('atheletebridge.nav.dashboard', 'Dashboard'),\n path: joinPath(basePath, ''),\n icon: <LayoutDashboard size={20} />,\n order: 1,\n group: 'main',\n },\n {\n id: 'atheletebridge-teams',\n label: t('atheletebridge.nav.teams', 'Teams'),\n path: joinPath(basePath, 'teams'),\n icon: <Users size={20} />,\n order: 10,\n group: 'roster',\n },\n {\n id: 'atheletebridge-fixtures',\n label: t('atheletebridge.nav.fixtures', 'Fixtures'),\n path: joinPath(basePath, 'fixtures'),\n icon: <CalendarDays size={20} />,\n order: 11,\n group: 'roster',\n },\n {\n id: 'atheletebridge-standings',\n label: t('atheletebridge.nav.standings', 'Standings'),\n path: joinPath(basePath, 'standings'),\n icon: <Trophy size={20} />,\n order: 12,\n group: 'roster',\n },\n {\n id: 'atheletebridge-tournaments',\n label: t('atheletebridge.nav.tournaments', 'Tournaments'),\n path: joinPath(basePath, 'tournaments'),\n icon: <Swords size={20} />,\n order: 13,\n group: 'roster',\n },\n {\n id: 'atheletebridge-programs',\n label: t('atheletebridge.nav.programs', 'Programs'),\n path: joinPath(basePath, 'programs'),\n icon: <Dumbbell size={20} />,\n order: 20,\n group: 'training',\n },\n {\n id: 'atheletebridge-sessions',\n label: t('atheletebridge.nav.sessions', 'Sessions'),\n path: joinPath(basePath, 'sessions'),\n icon: <ClipboardCheck size={20} />,\n order: 21,\n group: 'training',\n },\n {\n id: 'atheletebridge-performance',\n label: t('atheletebridge.nav.performance', 'Performance'),\n path: joinPath(basePath, 'performance'),\n icon: <Gauge size={20} />,\n order: 22,\n group: 'training',\n },\n {\n id: 'atheletebridge-analytics',\n label: t('atheletebridge.nav.analytics', 'Analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart3 size={20} />,\n order: 23,\n group: 'training',\n },\n {\n id: 'atheletebridge-ai',\n label: t('atheletebridge.nav.ai', 'AI Operations'),\n path: joinPath(basePath, 'ai'),\n icon: <Cpu size={20} />,\n order: 24,\n group: 'training',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, t]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'atheletebridge-status',\n label: t('atheletebridge.footer.ready', 'AthleteBridge Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, t]);\n\n return (\n <QueryClientProvider client={queryClient}>\n {/*\n * The host-supplied workspaceId MUST be forwarded: FeatureFlagProvider\n * skips the evaluation fetch entirely when it is null, which collapses\n * every gate onto its defaultValue and makes per-workspace/per-tenant\n * overrides unresolvable. defaultEnabled stays true so an outage of the\n * flag service degrades open rather than hiding shipped modules.\n */}\n <FeatureFlagProvider workspaceId={workspaceId ?? null} gateway=\"global\" defaultEnabled={true}>\n <AthleteBridgeProvider {...props}>\n <AthleteBridgeRoutes />\n <ToastViewport />\n </AthleteBridgeProvider>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AthleteBridgeRoot.js","names":[],"sources":["../../src/atheletebridge/AthleteBridgeRoot.tsx"],"sourcesContent":["/**\n * AthleteBridge Root Component\n * @module atheletebridge\n *\n * The single Root export consumed by the host app shell. The export name and\n * props (AthleteBridgeRootProps) are the host contract and must not change —\n * only the internal nav config, provider tree, and routes are product-specific.\n */\n\nimport type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { useAbTranslate } from './i18n';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport {\n LayoutDashboard,\n Users,\n CalendarDays,\n Trophy,\n Dumbbell,\n ClipboardCheck,\n Gauge,\n BarChart3,\n Swords,\n Cpu,\n ClipboardList,\n Ticket,\n} from 'lucide-react';\nimport { AthleteBridgeProvider } from './context/AthleteBridgeContext';\nimport { AthleteBridgeRoutes } from './AthleteBridgeRoutes';\nimport { ToastViewport } from './components/ToastViewport';\nimport type { AthleteBridgeRootProps, NavItem } from './types';\n\n// Create a query client for this microfrontend\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000,\n retry: 1,\n },\n },\n});\n\nexport const AthleteBridgeRoot: FC<AthleteBridgeRootProps> = (props) => {\n const { registerNavItems, registerFooterItems, basePath = '/', workspaceId } = props;\n const t = useAbTranslate();\n\n // Helper to join paths correctly\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with shell on mount\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'atheletebridge-dashboard',\n label: t('atheletebridge.nav.dashboard', 'Dashboard'),\n path: joinPath(basePath, ''),\n icon: <LayoutDashboard size={20} />,\n order: 1,\n group: 'main',\n },\n {\n id: 'atheletebridge-teams',\n label: t('atheletebridge.nav.teams', 'Teams'),\n path: joinPath(basePath, 'teams'),\n icon: <Users size={20} />,\n order: 10,\n group: 'roster',\n },\n {\n id: 'atheletebridge-fixtures',\n label: t('atheletebridge.nav.fixtures', 'Fixtures'),\n path: joinPath(basePath, 'fixtures'),\n icon: <CalendarDays size={20} />,\n order: 11,\n group: 'roster',\n },\n {\n id: 'atheletebridge-standings',\n label: t('atheletebridge.nav.standings', 'Standings'),\n path: joinPath(basePath, 'standings'),\n icon: <Trophy size={20} />,\n order: 12,\n group: 'roster',\n },\n {\n id: 'atheletebridge-tournaments',\n label: t('atheletebridge.nav.tournaments', 'Tournaments'),\n path: joinPath(basePath, 'tournaments'),\n icon: <Swords size={20} />,\n order: 13,\n group: 'roster',\n },\n {\n id: 'atheletebridge-registrations',\n label: t('atheletebridge.nav.registrations', 'Registrations'),\n path: joinPath(basePath, 'registrations'),\n icon: <ClipboardList size={20} />,\n order: 14,\n group: 'roster',\n },\n {\n id: 'atheletebridge-my-registrations',\n label: t('atheletebridge.nav.myRegistrations', 'My registrations'),\n path: joinPath(basePath, 'my-registrations'),\n icon: <Ticket size={20} />,\n order: 15,\n group: 'roster',\n },\n {\n id: 'atheletebridge-programs',\n label: t('atheletebridge.nav.programs', 'Programs'),\n path: joinPath(basePath, 'programs'),\n icon: <Dumbbell size={20} />,\n order: 20,\n group: 'training',\n },\n {\n id: 'atheletebridge-sessions',\n label: t('atheletebridge.nav.sessions', 'Sessions'),\n path: joinPath(basePath, 'sessions'),\n icon: <ClipboardCheck size={20} />,\n order: 21,\n group: 'training',\n },\n {\n id: 'atheletebridge-performance',\n label: t('atheletebridge.nav.performance', 'Performance'),\n path: joinPath(basePath, 'performance'),\n icon: <Gauge size={20} />,\n order: 22,\n group: 'training',\n },\n {\n id: 'atheletebridge-analytics',\n label: t('atheletebridge.nav.analytics', 'Analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart3 size={20} />,\n order: 23,\n group: 'training',\n },\n {\n id: 'atheletebridge-ai',\n label: t('atheletebridge.nav.ai', 'AI Operations'),\n path: joinPath(basePath, 'ai'),\n icon: <Cpu size={20} />,\n order: 24,\n group: 'training',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, t]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: 'atheletebridge-status',\n label: t('atheletebridge.footer.ready', 'AthleteBridge Ready'),\n type: 'status' as const,\n order: 10,\n section: 'left' as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, t]);\n\n return (\n <QueryClientProvider client={queryClient}>\n {/*\n * The host-supplied workspaceId MUST be forwarded: FeatureFlagProvider\n * skips the evaluation fetch entirely when it is null, which collapses\n * every gate onto its defaultValue and makes per-workspace/per-tenant\n * overrides unresolvable. defaultEnabled stays true so an outage of the\n * flag service degrades open rather than hiding shipped modules.\n */}\n <FeatureFlagProvider workspaceId={workspaceId ?? null} gateway=\"global\" defaultEnabled={true}>\n <AthleteBridgeProvider {...props}>\n <AthleteBridgeRoutes />\n <ToastViewport />\n </AthleteBridgeProvider>\n </FeatureFlagProvider>\n </QueryClientProvider>\n );\n};\n"],"mappings":";;;;;;;;;;AAkCA,IAAM,IAAc,IAAI,EAAY,EAClC,gBAAgB,EACd,SAAS;CACP,WAAW,MAAS;CACpB,OAAO;AACT,EACF,EACF,CAAC,GAEY,KAAiD,MAAU;CACtE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,KAAK,mBAAgB,GACzE,IAAI,EAAe,GAGnB,KAAY,GAAc,OACZ,EAAK,SAAS,GAAG,IAAI,EAAK,MAAM,GAAG,EAAE,IAAI,MACzC,EAAK,WAAW,GAAG,IAAI,IAAO,IAAI;CAiItD,OA5HA,QAAgB;EACT,OAsGL,OADgB,EAAiB;GAlG/B;IACE,IAAI;IACJ,OAAO,EAAE,gCAAgC,WAAW;IACpD,MAAM,EAAS,GAAU,EAAE;IAC3B,MAAM,kBAAC,GAAD,EAAiB,MAAM,GAAK,CAAA;IAClC,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAE,4BAA4B,OAAO;IAC5C,MAAM,EAAS,GAAU,OAAO;IAChC,MAAM,kBAAC,GAAD,EAAO,MAAM,GAAK,CAAA;IACxB,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,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;IACE,IAAI;IACJ,OAAO,EAAE,gCAAgC,WAAW;IACpD,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAW,MAAM,GAAK,CAAA;IAC5B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAE,yBAAyB,eAAe;IACjD,MAAM,EAAS,GAAU,IAAI;IAC7B,MAAM,kBAAC,GAAD,EAAK,MAAM,GAAK,CAAA;IACtB,OAAO;IACP,OAAO;GACT;EAG+B,CAC1B;CACT,GAAG;EAAC;EAAkB;EAAU;CAAC,CAAC,GAGlC,QAAgB;EACT,OAaL,OADgB,EAAoB,CATlC;GACE,IAAI;GACJ,OAAO,EAAE,+BAA+B,qBAAqB;GAC7D,MAAM;GACN,OAAO;GACP,SAAS;EACX,CAGkC,CAC7B;CACT,GAAG,CAAC,GAAqB,CAAC,CAAC,GAGzB,kBAAC,GAAD;EAAqB,QAAQ;YAQ3B,kBAAC,GAAD;GAAqB,aAAa,KAAe;GAAM,SAAQ;GAAS,gBAAgB;aACtF,kBAAC,GAAD;IAAuB,GAAI;cAA3B,CACE,kBAAC,GAAD,CAAsB,CAAA,GACtB,kBAAC,GAAD,CAAgB,CAAA,CACK;;EACJ,CAAA;CACF,CAAA;AAEzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AthleteBridgeRoutes.d.ts","sourceRoot":"","sources":["../../src/atheletebridge/AthleteBridgeRoutes.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AthleteBridgeRoutes.d.ts","sourceRoot":"","sources":["../../src/atheletebridge/AthleteBridgeRoutes.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAoIhD,eAAO,MAAM,mBAAmB,EAAE,EAoRjC,CAAC"}
|
|
@@ -7,15 +7,15 @@ import { Loader2 as o } from "lucide-react";
|
|
|
7
7
|
import { Navigate as s, Route as c, Routes as l, useLocation as u } from "react-router";
|
|
8
8
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
9
|
//#region src/atheletebridge/AthleteBridgeRoutes.tsx
|
|
10
|
-
var p = i(() => import("./pages/onboarding/OnboardingPage.js").then((e) => ({ default: e.OnboardingPage }))), m = i(() => import("./pages/teams/TeamsListPage.js").then((e) => ({ default: e.TeamsListPage }))), h = i(() => import("./pages/teams/TeamDetailPage.js").then((e) => ({ default: e.TeamDetailPage }))), g = i(() => import("./pages/teams/TeamFormPage.js").then((e) => ({ default: e.TeamFormPage }))), _ = i(() => import("./pages/fixtures/FixturesListPage.js").then((e) => ({ default: e.FixturesListPage }))), v = i(() => import("./pages/fixtures/FixtureDetailPage.js").then((e) => ({ default: e.FixtureDetailPage }))), y = i(() => import("./pages/fixtures/FixtureFormPage.js").then((e) => ({ default: e.FixtureFormPage }))), b = i(() => import("./pages/StandingsPage.js").then((e) => ({ default: e.StandingsPage }))), x = i(() => import("./pages/programs/ProgramsListPage.js").then((e) => ({ default: e.ProgramsListPage }))), S = i(() => import("./pages/programs/ProgramDetailPage.js").then((e) => ({ default: e.ProgramDetailPage }))), C = i(() => import("./pages/programs/ProgramFormPage.js").then((e) => ({ default: e.ProgramFormPage }))), w = i(() => import("./pages/sessions/SessionsListPage.js").then((e) => ({ default: e.SessionsListPage }))), T = i(() => import("./pages/sessions/SessionDetailPage.js").then((e) => ({ default: e.SessionDetailPage }))), E = i(() => import("./pages/sessions/SessionFormPage.js").then((e) => ({ default: e.SessionFormPage }))), D = i(() => import("./pages/performance/PerformancePage.js").then((e) => ({ default: e.PerformancePage }))), O = i(() => import("./pages/athletes/AthleteProfilePage.js").then((e) => ({ default: e.AthleteProfilePage }))), k = i(() => import("./pages/analytics/CoachAnalyticsPage.js").then((e) => ({ default: e.CoachAnalyticsPage }))), A = i(() => import("./pages/ai/AiOperationsPage.js").then((e) => ({ default: e.AiOperationsPage }))), j = i(() => import("./pages/tournaments/TournamentBracketPage.js").then((e) => ({ default: e.TournamentBracketPage }))), M = () => /* @__PURE__ */ d("div", {
|
|
10
|
+
var p = i(() => import("./pages/onboarding/OnboardingPage.js").then((e) => ({ default: e.OnboardingPage }))), m = i(() => import("./pages/teams/TeamsListPage.js").then((e) => ({ default: e.TeamsListPage }))), h = i(() => import("./pages/teams/TeamDetailPage.js").then((e) => ({ default: e.TeamDetailPage }))), g = i(() => import("./pages/teams/TeamFormPage.js").then((e) => ({ default: e.TeamFormPage }))), _ = i(() => import("./pages/fixtures/FixturesListPage.js").then((e) => ({ default: e.FixturesListPage }))), v = i(() => import("./pages/fixtures/FixtureDetailPage.js").then((e) => ({ default: e.FixtureDetailPage }))), y = i(() => import("./pages/fixtures/FixtureFormPage.js").then((e) => ({ default: e.FixtureFormPage }))), b = i(() => import("./pages/StandingsPage.js").then((e) => ({ default: e.StandingsPage }))), x = i(() => import("./pages/programs/ProgramsListPage.js").then((e) => ({ default: e.ProgramsListPage }))), S = i(() => import("./pages/programs/ProgramDetailPage.js").then((e) => ({ default: e.ProgramDetailPage }))), C = i(() => import("./pages/programs/ProgramFormPage.js").then((e) => ({ default: e.ProgramFormPage }))), w = i(() => import("./pages/sessions/SessionsListPage.js").then((e) => ({ default: e.SessionsListPage }))), T = i(() => import("./pages/sessions/SessionDetailPage.js").then((e) => ({ default: e.SessionDetailPage }))), E = i(() => import("./pages/sessions/SessionFormPage.js").then((e) => ({ default: e.SessionFormPage }))), D = i(() => import("./pages/performance/PerformancePage.js").then((e) => ({ default: e.PerformancePage }))), O = i(() => import("./pages/athletes/AthleteProfilePage.js").then((e) => ({ default: e.AthleteProfilePage }))), k = i(() => import("./pages/analytics/CoachAnalyticsPage.js").then((e) => ({ default: e.CoachAnalyticsPage }))), A = i(() => import("./pages/ai/AiOperationsPage.js").then((e) => ({ default: e.AiOperationsPage }))), j = i(() => import("./pages/tournaments/TournamentBracketPage.js").then((e) => ({ default: e.TournamentBracketPage }))), M = i(() => import("./pages/registrations/RegistrationFormsListPage.js").then((e) => ({ default: e.RegistrationFormsListPage }))), N = i(() => import("./pages/registrations/RegistrationFormBuilderPage.js").then((e) => ({ default: e.RegistrationFormBuilderPage }))), P = i(() => import("./pages/registrations/RegistrationFormDetailPage.js").then((e) => ({ default: e.RegistrationFormDetailPage }))), F = i(() => import("./pages/registrations/RegistrationSubmissionPage.js").then((e) => ({ default: e.RegistrationSubmissionPage }))), I = i(() => import("./pages/registrations/RecordRegistrationPage.js").then((e) => ({ default: e.RecordRegistrationPage }))), L = i(() => import("./pages/registrations/RegisterPage.js").then((e) => ({ default: e.RegisterPage }))), R = i(() => import("./pages/registrations/MyRegistrationsPage.js").then((e) => ({ default: e.MyRegistrationsPage }))), z = () => /* @__PURE__ */ d("div", {
|
|
11
11
|
className: "flex min-h-[400px] items-center justify-center",
|
|
12
12
|
children: /* @__PURE__ */ d(o, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
13
|
-
}),
|
|
14
|
-
let { basePath: i, isStandalone: o } = e(),
|
|
15
|
-
return
|
|
13
|
+
}), B = () => {
|
|
14
|
+
let { basePath: i, isStandalone: o } = e(), B = u(), V = i === "/" ? "" : (i ?? "").replace(/\/$/, "");
|
|
15
|
+
return V && !o && !(B.pathname === V || B.pathname.startsWith(V + "/")) ? null : /* @__PURE__ */ d("div", {
|
|
16
16
|
className: "flex min-h-full flex-col",
|
|
17
17
|
children: /* @__PURE__ */ f(r, {
|
|
18
|
-
fallback: /* @__PURE__ */ d(
|
|
18
|
+
fallback: /* @__PURE__ */ d(z, {}),
|
|
19
19
|
children: [/* @__PURE__ */ d(t, {}), /* @__PURE__ */ f(l, { children: [
|
|
20
20
|
/* @__PURE__ */ d(c, {
|
|
21
21
|
index: !0,
|
|
@@ -89,6 +89,62 @@ var p = i(() => import("./pages/onboarding/OnboardingPage.js").then((e) => ({ de
|
|
|
89
89
|
children: /* @__PURE__ */ d(v, {})
|
|
90
90
|
})
|
|
91
91
|
}),
|
|
92
|
+
/* @__PURE__ */ d(c, {
|
|
93
|
+
path: "registrations",
|
|
94
|
+
element: /* @__PURE__ */ d(a, {
|
|
95
|
+
flag: "atheletebridge.registrations.enabled",
|
|
96
|
+
defaultValue: !0,
|
|
97
|
+
children: /* @__PURE__ */ d(M, {})
|
|
98
|
+
})
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ d(c, {
|
|
101
|
+
path: "registrations/new",
|
|
102
|
+
element: /* @__PURE__ */ d(a, {
|
|
103
|
+
flag: "atheletebridge.registrations.enabled",
|
|
104
|
+
defaultValue: !0,
|
|
105
|
+
children: /* @__PURE__ */ d(N, {})
|
|
106
|
+
})
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ d(c, {
|
|
109
|
+
path: "registrations/:id",
|
|
110
|
+
element: /* @__PURE__ */ d(a, {
|
|
111
|
+
flag: "atheletebridge.registrations.enabled",
|
|
112
|
+
defaultValue: !0,
|
|
113
|
+
children: /* @__PURE__ */ d(P, {})
|
|
114
|
+
})
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ d(c, {
|
|
117
|
+
path: "registrations/:id/edit",
|
|
118
|
+
element: /* @__PURE__ */ d(a, {
|
|
119
|
+
flag: "atheletebridge.registrations.enabled",
|
|
120
|
+
defaultValue: !0,
|
|
121
|
+
children: /* @__PURE__ */ d(N, {})
|
|
122
|
+
})
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ d(c, {
|
|
125
|
+
path: "registrations/:id/record",
|
|
126
|
+
element: /* @__PURE__ */ d(a, {
|
|
127
|
+
flag: "atheletebridge.registrations.enabled",
|
|
128
|
+
defaultValue: !0,
|
|
129
|
+
children: /* @__PURE__ */ d(I, {})
|
|
130
|
+
})
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ d(c, {
|
|
133
|
+
path: "registrations/:id/submissions/:submissionId",
|
|
134
|
+
element: /* @__PURE__ */ d(a, {
|
|
135
|
+
flag: "atheletebridge.registrations.enabled",
|
|
136
|
+
defaultValue: !0,
|
|
137
|
+
children: /* @__PURE__ */ d(F, {})
|
|
138
|
+
})
|
|
139
|
+
}),
|
|
140
|
+
/* @__PURE__ */ d(c, {
|
|
141
|
+
path: "register/:slug",
|
|
142
|
+
element: /* @__PURE__ */ d(L, {})
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ d(c, {
|
|
145
|
+
path: "my-registrations",
|
|
146
|
+
element: /* @__PURE__ */ d(R, {})
|
|
147
|
+
}),
|
|
92
148
|
/* @__PURE__ */ d(c, {
|
|
93
149
|
path: "standings",
|
|
94
150
|
element: /* @__PURE__ */ d(a, {
|
|
@@ -197,6 +253,6 @@ var p = i(() => import("./pages/onboarding/OnboardingPage.js").then((e) => ({ de
|
|
|
197
253
|
});
|
|
198
254
|
};
|
|
199
255
|
//#endregion
|
|
200
|
-
export {
|
|
256
|
+
export { B as AthleteBridgeRoutes };
|
|
201
257
|
|
|
202
258
|
//# sourceMappingURL=AthleteBridgeRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AthleteBridgeRoutes.js","names":[],"sources":["../../src/atheletebridge/AthleteBridgeRoutes.tsx"],"sourcesContent":["/**\n * AthleteBridge Routes\n * @module atheletebridge\n *\n * Real sports-domain routes wired to the deployed `wspace-atheletebridge-svc`\n * GraphQL contract. Dashboard is eager; entity pages are lazy.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router';\nimport { Loader2 } from 'lucide-react';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useAthleteBridge } from './context/AthleteBridgeContext';\nimport { RouteAnalytics } from './components/RouteAnalytics';\n\n// Eager — primary landing\nimport { DashboardPage } from './pages/DashboardPage';\n\n// Onboarding (first-run wizard: sport → team → role)\nconst OnboardingPage = lazy(() =>\n import('./pages/onboarding/OnboardingPage').then((m) => ({ default: m.OnboardingPage }))\n);\n\n// Teams\nconst TeamsListPage = lazy(() =>\n import('./pages/teams/TeamsListPage').then((m) => ({ default: m.TeamsListPage }))\n);\nconst TeamDetailPage = lazy(() =>\n import('./pages/teams/TeamDetailPage').then((m) => ({ default: m.TeamDetailPage }))\n);\nconst TeamFormPage = lazy(() =>\n import('./pages/teams/TeamFormPage').then((m) => ({ default: m.TeamFormPage }))\n);\n\n// Fixtures\nconst FixturesListPage = lazy(() =>\n import('./pages/fixtures/FixturesListPage').then((m) => ({ default: m.FixturesListPage }))\n);\nconst FixtureDetailPage = lazy(() =>\n import('./pages/fixtures/FixtureDetailPage').then((m) => ({ default: m.FixtureDetailPage }))\n);\nconst FixtureFormPage = lazy(() =>\n import('./pages/fixtures/FixtureFormPage').then((m) => ({ default: m.FixtureFormPage }))\n);\n\n// Standings\nconst StandingsPage = lazy(() =>\n import('./pages/StandingsPage').then((m) => ({ default: m.StandingsPage }))\n);\n\n// Programs\nconst ProgramsListPage = lazy(() =>\n import('./pages/programs/ProgramsListPage').then((m) => ({ default: m.ProgramsListPage }))\n);\nconst ProgramDetailPage = lazy(() =>\n import('./pages/programs/ProgramDetailPage').then((m) => ({ default: m.ProgramDetailPage }))\n);\nconst ProgramFormPage = lazy(() =>\n import('./pages/programs/ProgramFormPage').then((m) => ({ default: m.ProgramFormPage }))\n);\n\n// Sessions\nconst SessionsListPage = lazy(() =>\n import('./pages/sessions/SessionsListPage').then((m) => ({ default: m.SessionsListPage }))\n);\nconst SessionDetailPage = lazy(() =>\n import('./pages/sessions/SessionDetailPage').then((m) => ({ default: m.SessionDetailPage }))\n);\nconst SessionFormPage = lazy(() =>\n import('./pages/sessions/SessionFormPage').then((m) => ({ default: m.SessionFormPage }))\n);\n\n// Performance\nconst PerformancePage = lazy(() =>\n import('./pages/performance/PerformancePage').then((m) => ({ default: m.PerformancePage }))\n);\n\n// Athlete profile\nconst AthleteProfilePage = lazy(() =>\n import('./pages/athletes/AthleteProfilePage').then((m) => ({ default: m.AthleteProfilePage }))\n);\n\n// Coach analytics\nconst CoachAnalyticsPage = lazy(() =>\n import('./pages/analytics/CoachAnalyticsPage').then((m) => ({ default: m.CoachAnalyticsPage }))\n);\n\n// AI operations (model picker, decision ledger, decision cards)\nconst AiOperationsPage = lazy(() =>\n import('./pages/ai/AiOperationsPage').then((m) => ({ default: m.AiOperationsPage }))\n);\n\n// Tournaments (esports bracket)\nconst TournamentBracketPage = lazy(() =>\n import('./pages/tournaments/TournamentBracketPage').then((m) => ({\n default: m.TournamentBracketPage,\n }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Loader2 className=\"h-8 w-8 animate-spin text-text-secondary\" />\n </div>\n);\n\nexport const AthleteBridgeRoutes: FC = () => {\n const { basePath, isStandalone } = useAthleteBridge();\n const location = useLocation();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render when the path matches basePath (integrated mode).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <RouteAnalytics />\n <Routes>\n {/* Dashboard */}\n <Route index element={<DashboardPage />} />\n\n {/*\n Onboarding — the first-run wizard. Intentionally NOT behind a\n FeatureGate: it only collects sport/team/role and writes through the\n same `athCreateTeam` / `athAddMember` the gated Teams pages use, so a\n flag here would gate nothing that `atheletebridge.teams.enabled` does\n not already gate at the destination.\n */}\n <Route path=\"onboarding\" element={<OnboardingPage />} />\n\n {/* Teams */}\n <Route\n path=\"teams\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <TeamsListPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"teams/new\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <TeamFormPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"teams/:id\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <TeamDetailPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"teams/:id/edit\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <TeamFormPage />\n </FeatureGate>\n }\n />\n\n {/* Athlete profile (reached from a team roster) */}\n <Route\n path=\"teams/:teamId/athletes/:memberId\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <AthleteProfilePage />\n </FeatureGate>\n }\n />\n\n {/* Fixtures */}\n <Route\n path=\"fixtures\"\n element={\n <FeatureGate flag=\"atheletebridge.fixtures.enabled\" defaultValue={true}>\n <FixturesListPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"fixtures/new\"\n element={\n <FeatureGate flag=\"atheletebridge.fixtures.enabled\" defaultValue={true}>\n <FixtureFormPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"fixtures/:id\"\n element={\n <FeatureGate flag=\"atheletebridge.fixtures.enabled\" defaultValue={true}>\n <FixtureDetailPage />\n </FeatureGate>\n }\n />\n\n {/* Standings */}\n <Route\n path=\"standings\"\n element={\n <FeatureGate flag=\"atheletebridge.standings.enabled\" defaultValue={true}>\n <StandingsPage />\n </FeatureGate>\n }\n />\n\n {/* Programs */}\n <Route\n path=\"programs\"\n element={\n <FeatureGate flag=\"atheletebridge.programs.enabled\" defaultValue={true}>\n <ProgramsListPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"programs/new\"\n element={\n <FeatureGate flag=\"atheletebridge.programs.enabled\" defaultValue={true}>\n <ProgramFormPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"programs/:id\"\n element={\n <FeatureGate flag=\"atheletebridge.programs.enabled\" defaultValue={true}>\n <ProgramDetailPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"programs/:id/edit\"\n element={\n <FeatureGate flag=\"atheletebridge.programs.enabled\" defaultValue={true}>\n <ProgramFormPage />\n </FeatureGate>\n }\n />\n\n {/* Sessions */}\n <Route\n path=\"sessions\"\n element={\n <FeatureGate flag=\"atheletebridge.sessions.enabled\" defaultValue={true}>\n <SessionsListPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"sessions/new\"\n element={\n <FeatureGate flag=\"atheletebridge.sessions.enabled\" defaultValue={true}>\n <SessionFormPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"sessions/:id\"\n element={\n <FeatureGate flag=\"atheletebridge.sessions.enabled\" defaultValue={true}>\n <SessionDetailPage />\n </FeatureGate>\n }\n />\n\n {/* Performance */}\n <Route\n path=\"performance\"\n element={\n <FeatureGate flag=\"atheletebridge.performance.enabled\" defaultValue={true}>\n <PerformancePage />\n </FeatureGate>\n }\n />\n\n {/* Analytics */}\n <Route\n path=\"analytics\"\n element={\n <FeatureGate flag=\"atheletebridge.analytics.enabled\" defaultValue={true}>\n <CoachAnalyticsPage />\n </FeatureGate>\n }\n />\n\n {/* AI operations */}\n <Route\n path=\"ai\"\n element={\n <FeatureGate flag=\"atheletebridge.ai.enabled\" defaultValue={true}>\n <AiOperationsPage />\n </FeatureGate>\n }\n />\n\n {/* Tournaments (esports bracket) */}\n <Route\n path=\"tournaments\"\n element={\n <FeatureGate flag=\"atheletebridge.tournaments.enabled\" defaultValue={true}>\n <TournamentBracketPage />\n </FeatureGate>\n }\n />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\".\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAmBA,IAAM,IAAiB,QACrB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACzF,GAGM,IAAgB,QACpB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAClF,GACM,IAAiB,QACrB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACpF,GACM,I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es.tsx"],"sourcesContent":["/**\n * AthleteBridge Routes\n * @module atheletebridge\n *\n * Real sports-domain routes wired to the deployed `wspace-atheletebridge-svc`\n * GraphQL contract. Dashboard is eager; entity pages are lazy.\n */\n\nimport { type FC, lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router';\nimport { Loader2 } from 'lucide-react';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useAthleteBridge } from './context/AthleteBridgeContext';\nimport { RouteAnalytics } from './components/RouteAnalytics';\n\n// Eager — primary landing\nimport { DashboardPage } from './pages/DashboardPage';\n\n// Onboarding (first-run wizard: sport → team → role)\nconst OnboardingPage = lazy(() =>\n import('./pages/onboarding/OnboardingPage').then((m) => ({ default: m.OnboardingPage }))\n);\n\n// Teams\nconst TeamsListPage = lazy(() =>\n import('./pages/teams/TeamsListPage').then((m) => ({ default: m.TeamsListPage }))\n);\nconst TeamDetailPage = lazy(() =>\n import('./pages/teams/TeamDetailPage').then((m) => ({ default: m.TeamDetailPage }))\n);\nconst TeamFormPage = lazy(() =>\n import('./pages/teams/TeamFormPage').then((m) => ({ default: m.TeamFormPage }))\n);\n\n// Fixtures\nconst FixturesListPage = lazy(() =>\n import('./pages/fixtures/FixturesListPage').then((m) => ({ default: m.FixturesListPage }))\n);\nconst FixtureDetailPage = lazy(() =>\n import('./pages/fixtures/FixtureDetailPage').then((m) => ({ default: m.FixtureDetailPage }))\n);\nconst FixtureFormPage = lazy(() =>\n import('./pages/fixtures/FixtureFormPage').then((m) => ({ default: m.FixtureFormPage }))\n);\n\n// Standings\nconst StandingsPage = lazy(() =>\n import('./pages/StandingsPage').then((m) => ({ default: m.StandingsPage }))\n);\n\n// Programs\nconst ProgramsListPage = lazy(() =>\n import('./pages/programs/ProgramsListPage').then((m) => ({ default: m.ProgramsListPage }))\n);\nconst ProgramDetailPage = lazy(() =>\n import('./pages/programs/ProgramDetailPage').then((m) => ({ default: m.ProgramDetailPage }))\n);\nconst ProgramFormPage = lazy(() =>\n import('./pages/programs/ProgramFormPage').then((m) => ({ default: m.ProgramFormPage }))\n);\n\n// Sessions\nconst SessionsListPage = lazy(() =>\n import('./pages/sessions/SessionsListPage').then((m) => ({ default: m.SessionsListPage }))\n);\nconst SessionDetailPage = lazy(() =>\n import('./pages/sessions/SessionDetailPage').then((m) => ({ default: m.SessionDetailPage }))\n);\nconst SessionFormPage = lazy(() =>\n import('./pages/sessions/SessionFormPage').then((m) => ({ default: m.SessionFormPage }))\n);\n\n// Performance\nconst PerformancePage = lazy(() =>\n import('./pages/performance/PerformancePage').then((m) => ({ default: m.PerformancePage }))\n);\n\n// Athlete profile\nconst AthleteProfilePage = lazy(() =>\n import('./pages/athletes/AthleteProfilePage').then((m) => ({ default: m.AthleteProfilePage }))\n);\n\n// Coach analytics\nconst CoachAnalyticsPage = lazy(() =>\n import('./pages/analytics/CoachAnalyticsPage').then((m) => ({ default: m.CoachAnalyticsPage }))\n);\n\n// AI operations (model picker, decision ledger, decision cards)\nconst AiOperationsPage = lazy(() =>\n import('./pages/ai/AiOperationsPage').then((m) => ({ default: m.AiOperationsPage }))\n);\n\n// Tournaments (esports bracket)\nconst TournamentBracketPage = lazy(() =>\n import('./pages/tournaments/TournamentBracketPage').then((m) => ({\n default: m.TournamentBracketPage,\n }))\n);\n\n// Club registration & payments (BOFF-4135)\nconst RegistrationFormsListPage = lazy(() =>\n import('./pages/registrations/RegistrationFormsListPage').then((m) => ({\n default: m.RegistrationFormsListPage,\n }))\n);\nconst RegistrationFormBuilderPage = lazy(() =>\n import('./pages/registrations/RegistrationFormBuilderPage').then((m) => ({\n default: m.RegistrationFormBuilderPage,\n }))\n);\nconst RegistrationFormDetailPage = lazy(() =>\n import('./pages/registrations/RegistrationFormDetailPage').then((m) => ({\n default: m.RegistrationFormDetailPage,\n }))\n);\nconst RegistrationSubmissionPage = lazy(() =>\n import('./pages/registrations/RegistrationSubmissionPage').then((m) => ({\n default: m.RegistrationSubmissionPage,\n }))\n);\nconst RecordRegistrationPage = lazy(() =>\n import('./pages/registrations/RecordRegistrationPage').then((m) => ({\n default: m.RecordRegistrationPage,\n }))\n);\nconst RegisterPage = lazy(() =>\n import('./pages/registrations/RegisterPage').then((m) => ({ default: m.RegisterPage }))\n);\nconst MyRegistrationsPage = lazy(() =>\n import('./pages/registrations/MyRegistrationsPage').then((m) => ({\n default: m.MyRegistrationsPage,\n }))\n);\n\nconst PageLoader: FC = () => (\n <div className=\"flex min-h-[400px] items-center justify-center\">\n <Loader2 className=\"h-8 w-8 animate-spin text-text-secondary\" />\n </div>\n);\n\nexport const AthleteBridgeRoutes: FC = () => {\n const { basePath, isStandalone } = useAthleteBridge();\n const location = useLocation();\n\n const normalizedBasePath = basePath === '/' ? '' : (basePath ?? '').replace(/\\/$/, '');\n\n // Guard: only render when the path matches basePath (integrated mode).\n if (normalizedBasePath && !isStandalone) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <div className=\"flex min-h-full flex-col\">\n <Suspense fallback={<PageLoader />}>\n <RouteAnalytics />\n <Routes>\n {/* Dashboard */}\n <Route index element={<DashboardPage />} />\n\n {/*\n Onboarding — the first-run wizard. Intentionally NOT behind a\n FeatureGate: it only collects sport/team/role and writes through the\n same `athCreateTeam` / `athAddMember` the gated Teams pages use, so a\n flag here would gate nothing that `atheletebridge.teams.enabled` does\n not already gate at the destination.\n */}\n <Route path=\"onboarding\" element={<OnboardingPage />} />\n\n {/* Teams */}\n <Route\n path=\"teams\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <TeamsListPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"teams/new\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <TeamFormPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"teams/:id\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <TeamDetailPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"teams/:id/edit\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <TeamFormPage />\n </FeatureGate>\n }\n />\n\n {/* Athlete profile (reached from a team roster) */}\n <Route\n path=\"teams/:teamId/athletes/:memberId\"\n element={\n <FeatureGate flag=\"atheletebridge.teams.enabled\" defaultValue={true}>\n <AthleteProfilePage />\n </FeatureGate>\n }\n />\n\n {/* Fixtures */}\n <Route\n path=\"fixtures\"\n element={\n <FeatureGate flag=\"atheletebridge.fixtures.enabled\" defaultValue={true}>\n <FixturesListPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"fixtures/new\"\n element={\n <FeatureGate flag=\"atheletebridge.fixtures.enabled\" defaultValue={true}>\n <FixtureFormPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"fixtures/:id\"\n element={\n <FeatureGate flag=\"atheletebridge.fixtures.enabled\" defaultValue={true}>\n <FixtureDetailPage />\n </FeatureGate>\n }\n />\n\n {/* Club registration & payments (BOFF-4135) */}\n <Route\n path=\"registrations\"\n element={\n <FeatureGate flag=\"atheletebridge.registrations.enabled\" defaultValue={true}>\n <RegistrationFormsListPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"registrations/new\"\n element={\n <FeatureGate flag=\"atheletebridge.registrations.enabled\" defaultValue={true}>\n <RegistrationFormBuilderPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"registrations/:id\"\n element={\n <FeatureGate flag=\"atheletebridge.registrations.enabled\" defaultValue={true}>\n <RegistrationFormDetailPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"registrations/:id/edit\"\n element={\n <FeatureGate flag=\"atheletebridge.registrations.enabled\" defaultValue={true}>\n <RegistrationFormBuilderPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"registrations/:id/record\"\n element={\n <FeatureGate flag=\"atheletebridge.registrations.enabled\" defaultValue={true}>\n <RecordRegistrationPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"registrations/:id/submissions/:submissionId\"\n element={\n <FeatureGate flag=\"atheletebridge.registrations.enabled\" defaultValue={true}>\n <RegistrationSubmissionPage />\n </FeatureGate>\n }\n />\n {/*\n Family-facing share link + \"my registrations\": self-scoped at the\n gateway (any signed-in user), so deliberately not behind the staff\n feature flag — a club's published link must keep working.\n */}\n <Route path=\"register/:slug\" element={<RegisterPage />} />\n <Route path=\"my-registrations\" element={<MyRegistrationsPage />} />\n\n {/* Standings */}\n <Route\n path=\"standings\"\n element={\n <FeatureGate flag=\"atheletebridge.standings.enabled\" defaultValue={true}>\n <StandingsPage />\n </FeatureGate>\n }\n />\n\n {/* Programs */}\n <Route\n path=\"programs\"\n element={\n <FeatureGate flag=\"atheletebridge.programs.enabled\" defaultValue={true}>\n <ProgramsListPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"programs/new\"\n element={\n <FeatureGate flag=\"atheletebridge.programs.enabled\" defaultValue={true}>\n <ProgramFormPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"programs/:id\"\n element={\n <FeatureGate flag=\"atheletebridge.programs.enabled\" defaultValue={true}>\n <ProgramDetailPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"programs/:id/edit\"\n element={\n <FeatureGate flag=\"atheletebridge.programs.enabled\" defaultValue={true}>\n <ProgramFormPage />\n </FeatureGate>\n }\n />\n\n {/* Sessions */}\n <Route\n path=\"sessions\"\n element={\n <FeatureGate flag=\"atheletebridge.sessions.enabled\" defaultValue={true}>\n <SessionsListPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"sessions/new\"\n element={\n <FeatureGate flag=\"atheletebridge.sessions.enabled\" defaultValue={true}>\n <SessionFormPage />\n </FeatureGate>\n }\n />\n <Route\n path=\"sessions/:id\"\n element={\n <FeatureGate flag=\"atheletebridge.sessions.enabled\" defaultValue={true}>\n <SessionDetailPage />\n </FeatureGate>\n }\n />\n\n {/* Performance */}\n <Route\n path=\"performance\"\n element={\n <FeatureGate flag=\"atheletebridge.performance.enabled\" defaultValue={true}>\n <PerformancePage />\n </FeatureGate>\n }\n />\n\n {/* Analytics */}\n <Route\n path=\"analytics\"\n element={\n <FeatureGate flag=\"atheletebridge.analytics.enabled\" defaultValue={true}>\n <CoachAnalyticsPage />\n </FeatureGate>\n }\n />\n\n {/* AI operations */}\n <Route\n path=\"ai\"\n element={\n <FeatureGate flag=\"atheletebridge.ai.enabled\" defaultValue={true}>\n <AiOperationsPage />\n </FeatureGate>\n }\n />\n\n {/* Tournaments (esports bracket) */}\n <Route\n path=\"tournaments\"\n element={\n <FeatureGate flag=\"atheletebridge.tournaments.enabled\" defaultValue={true}>\n <TournamentBracketPage />\n </FeatureGate>\n }\n />\n\n {/* Fallback */}\n <Route path=\"*\" element={<Navigate to=\".\" replace />} />\n </Routes>\n </Suspense>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAmBA,IAAM,IAAiB,QACrB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACzF,GAGM,IAAgB,QACpB,OAAO,kCAA+B,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAClF,GACM,IAAiB,QACrB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,CACpF,GACM,IAAe,QACnB,OAAO,iCAA8B,MAAM,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAChF,GAGM,IAAmB,QACvB,OAAO,wCAAqC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAC3F,GACM,IAAoB,QACxB,OAAO,yCAAsC,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAC7F,GACM,IAAkB,QACtB,OAAO,uCAAoC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CACzF,GAGM,IAAgB,QACpB,OAAO,4BAAyB,MAAM,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAC5E,GAGM,IAAmB,QACvB,OAAO,wCAA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AAkC,cAAc;gBAChE,kBAAC,GAAD,CAAmB,CAAA;KACR,CAAA;IAEhB,CAAA;IACD,kBAAC,GAAD;KACE,MAAK;KACL,SACE,kBAAC,GAAD;MAAa,MAAK;MAAkC,cAAc;gBAChE,kBAAC,GAAD,CAAkB,CAAA;KACP,CAAA;IAEhB,CAAA;IACD,kBAAC,GAAD;KACE,MAAK;KACL,SACE,kBAAC,GAAD;MAAa,MAAK;MAAkC,cAAc;gBAChE,kBAAC,GAAD,CAAoB,CAAA;KACT,CAAA;IAEhB,CAAA;IAGD,kBAAC,GAAD;KACE,MAAK;KACL,SACE,kBAAC,GAAD;MAAa,MAAK;MAAqC,cAAc;gBACnE,kBAAC,GAAD,CAAkB,CAAA;KACP,CAAA;IAEhB,CAAA;IAGD,kBAAC,GAAD;KACE,MAAK;KACL,SACE,kBAAC,GAAD;MAAa,MAAK;MAAmC,cAAc;gBACjE,kBAAC,GAAD,CAAqB,CAAA;KACV,CAAA;IAEhB,CAAA;IAGD,kBAAC,GAAD;KACE,MAAK;KACL,SACE,kBAAC,GAAD;MAAa,MAAK;MAA4B,cAAc;gBAC1D,kBAAC,GAAD,CAAmB,CAAA;KACR,CAAA;IAEhB,CAAA;IAGD,kBAAC,GAAD;KACE,MAAK;KACL,SACE,kBAAC,GAAD;MAAa,MAAK;MAAqC,cAAc;gBACnE,kBAAC,GAAD,CAAwB,CAAA;KACb,CAAA;IAEhB,CAAA;IAGD,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAI,SAAA;KAAS,CAAA;IAAI,CAAA;GACjD,EAAA,CAAA,CACA;;CACP,CAAA;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../../src/atheletebridge/components/StatusBadge.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAE7F,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../../src/atheletebridge/components/StatusBadge.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAE7F,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6ED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA0B5C,CAAC"}
|
|
@@ -35,7 +35,19 @@ var r = {
|
|
|
35
35
|
planned: "info",
|
|
36
36
|
skipped: "secondary",
|
|
37
37
|
succeeded: "success",
|
|
38
|
-
failed: "destructive"
|
|
38
|
+
failed: "destructive",
|
|
39
|
+
closed: "secondary",
|
|
40
|
+
submitted: "info",
|
|
41
|
+
accepted: "success",
|
|
42
|
+
declined: "destructive",
|
|
43
|
+
withdrawn: "secondary",
|
|
44
|
+
not_required: "secondary",
|
|
45
|
+
unpaid: "warning",
|
|
46
|
+
partially_paid: "warning",
|
|
47
|
+
paid: "success",
|
|
48
|
+
refunded: "secondary",
|
|
49
|
+
recorded: "success",
|
|
50
|
+
voided: "secondary"
|
|
39
51
|
};
|
|
40
52
|
function o(e) {
|
|
41
53
|
return e.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/atheletebridge/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module atheletebridge/components\n *\n * A colored badge based on a domain status value, with semantic-token color\n * mapping for the AthleteBridge lifecycle states (teams, members, fixtures,\n * programs, sessions, workouts). Uses semantic tokens only — never raw colors.\n */\n\nimport type { FC } from 'react';\nimport { cn } from '../utils/cn';\n\ntype BadgeVariant = 'success' | 'warning' | 'destructive' | 'secondary' | 'info' | 'outline';\n\ninterface StatusBadgeProps {\n status: string;\n /**\n * Force a specific variant, overriding the auto status→color mapping. Useful\n * where the same status string reads differently by context (e.g. a cancelled\n * coaching session shown grey rather than the default destructive red).\n */\n variant?: BadgeVariant;\n className?: string;\n}\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-status-success-bg-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n destructive: 'bg-status-error-bg-subtle text-status-error-text',\n secondary: 'bg-bg-sunken text-text-secondary',\n info: 'bg-[var(--color-accent-soft)] text-text-primary',\n outline: 'border border-border-seam text-text-primary',\n};\n\n// Statuses that represent a \"live\" / in-progress condition get a subtle,\n// opacity-only glow pulse (reduced-motion safe via motion-safe:).\nconst liveStatuses = new Set(['live', 'active', 'confirmed', 'in_progress']);\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Team status\n forming: 'warning',\n active: 'success',\n inactive: 'secondary',\n archived: 'secondary',\n\n // Member status\n trial: 'info',\n injured: 'warning',\n suspended: 'destructive',\n released: 'secondary',\n\n // Fixture status\n scheduled: 'info',\n live: 'success',\n completed: 'success',\n postponed: 'warning',\n cancelled: 'destructive',\n\n // Program status\n draft: 'secondary',\n published: 'success',\n\n // Session status\n requested: 'warning',\n confirmed: 'info',\n no_show: 'destructive',\n\n // Workout status\n planned: 'info',\n skipped: 'secondary',\n\n // AI agent-run status (AthAgentRunStatus). A failed run must never read as a\n // neutral grey chip — an invisible failure is how the last outage stayed\n // unnoticed for months.\n succeeded: 'success',\n failed: 'destructive',\n};\n\nfunction formatStatusLabel(status: string): string {\n return status\n .replace(/_/g, ' ')\n .toLowerCase()\n .replace(/\\b\\w/g, (char) => char.toUpperCase());\n}\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({\n status,\n variant: variantOverride,\n className,\n}) => {\n const key = status.toLowerCase();\n const variant = variantOverride ?? statusVariantMap[key] ?? 'secondary';\n const isLive = liveStatuses.has(key);\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',\n variantStyles[variant],\n className\n )}\n >\n {isLive && (\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 rounded-full bg-current motion-safe:animate-vc-glow-pulse\"\n />\n )}\n {formatStatusLabel(status)}\n </span>\n );\n};\n"],"mappings":";;;AAyBA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;AACX,GAIM,IAAe,IAAI,IAAI;CAAC;CAAQ;CAAU;CAAa;AAAa,CAAC,GAErE,IAAiD;CAErD,SAAS;CACT,QAAQ;CACR,UAAU;CACV,UAAU;CAGV,OAAO;CACP,SAAS;CACT,WAAW;CACX,UAAU;CAGV,WAAW;CACX,MAAM;CACN,WAAW;CACX,WAAW;CACX,WAAW;CAGX,OAAO;CACP,WAAW;CAGX,WAAW;CACX,WAAW;CACX,SAAS;CAGT,SAAS;CACT,SAAS;CAKT,WAAW;CACX,QAAQ;AACV;AAEA,SAAS,EAAkB,GAAwB;CACjD,OAAO,EACJ,QAAQ,MAAM,GAAG,EACjB,YAAY,EACZ,QAAQ,UAAU,MAAS,EAAK,YAAY,CAAC;AAClD;AAEA,IAAa,KAAqC,EAChD,WACA,SAAS,GACT,mBACI;CACJ,IAAM,IAAM,EAAO,YAAY,GACzB,IAAU,KAAmB,EAAiB,MAAQ,aACtD,IAAS,EAAa,IAAI,CAAG;CAEnC,OACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAc,IACd,CACF;YALF,CAOG,KACC,kBAAC,QAAD;GACE,eAAY;GACZ,WAAU;EACX,CAAA,GAEF,EAAkB,CAAM,CACrB;;AAEV"}
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/atheletebridge/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module atheletebridge/components\n *\n * A colored badge based on a domain status value, with semantic-token color\n * mapping for the AthleteBridge lifecycle states (teams, members, fixtures,\n * programs, sessions, workouts). Uses semantic tokens only — never raw colors.\n */\n\nimport type { FC } from 'react';\nimport { cn } from '../utils/cn';\n\ntype BadgeVariant = 'success' | 'warning' | 'destructive' | 'secondary' | 'info' | 'outline';\n\ninterface StatusBadgeProps {\n status: string;\n /**\n * Force a specific variant, overriding the auto status→color mapping. Useful\n * where the same status string reads differently by context (e.g. a cancelled\n * coaching session shown grey rather than the default destructive red).\n */\n variant?: BadgeVariant;\n className?: string;\n}\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-status-success-bg-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n destructive: 'bg-status-error-bg-subtle text-status-error-text',\n secondary: 'bg-bg-sunken text-text-secondary',\n info: 'bg-[var(--color-accent-soft)] text-text-primary',\n outline: 'border border-border-seam text-text-primary',\n};\n\n// Statuses that represent a \"live\" / in-progress condition get a subtle,\n// opacity-only glow pulse (reduced-motion safe via motion-safe:).\nconst liveStatuses = new Set(['live', 'active', 'confirmed', 'in_progress']);\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Team status\n forming: 'warning',\n active: 'success',\n inactive: 'secondary',\n archived: 'secondary',\n\n // Member status\n trial: 'info',\n injured: 'warning',\n suspended: 'destructive',\n released: 'secondary',\n\n // Fixture status\n scheduled: 'info',\n live: 'success',\n completed: 'success',\n postponed: 'warning',\n cancelled: 'destructive',\n\n // Program status\n draft: 'secondary',\n published: 'success',\n\n // Session status\n requested: 'warning',\n confirmed: 'info',\n no_show: 'destructive',\n\n // Workout status\n planned: 'info',\n skipped: 'secondary',\n\n // AI agent-run status (AthAgentRunStatus). A failed run must never read as a\n // neutral grey chip — an invisible failure is how the last outage stayed\n // unnoticed for months.\n succeeded: 'success',\n failed: 'destructive',\n\n // Registration forms / submissions / payments (BOFF-4135). `draft`,\n // `published` and `archived` are shared with the program lifecycle above.\n closed: 'secondary',\n submitted: 'info',\n accepted: 'success',\n declined: 'destructive',\n withdrawn: 'secondary',\n not_required: 'secondary',\n unpaid: 'warning',\n partially_paid: 'warning',\n paid: 'success',\n refunded: 'secondary',\n recorded: 'success',\n voided: 'secondary',\n};\n\nfunction formatStatusLabel(status: string): string {\n return status\n .replace(/_/g, ' ')\n .toLowerCase()\n .replace(/\\b\\w/g, (char) => char.toUpperCase());\n}\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({\n status,\n variant: variantOverride,\n className,\n}) => {\n const key = status.toLowerCase();\n const variant = variantOverride ?? statusVariantMap[key] ?? 'secondary';\n const isLive = liveStatuses.has(key);\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',\n variantStyles[variant],\n className\n )}\n >\n {isLive && (\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 rounded-full bg-current motion-safe:animate-vc-glow-pulse\"\n />\n )}\n {formatStatusLabel(status)}\n </span>\n );\n};\n"],"mappings":";;;AAyBA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;AACX,GAIM,IAAe,IAAI,IAAI;CAAC;CAAQ;CAAU;CAAa;AAAa,CAAC,GAErE,IAAiD;CAErD,SAAS;CACT,QAAQ;CACR,UAAU;CACV,UAAU;CAGV,OAAO;CACP,SAAS;CACT,WAAW;CACX,UAAU;CAGV,WAAW;CACX,MAAM;CACN,WAAW;CACX,WAAW;CACX,WAAW;CAGX,OAAO;CACP,WAAW;CAGX,WAAW;CACX,WAAW;CACX,SAAS;CAGT,SAAS;CACT,SAAS;CAKT,WAAW;CACX,QAAQ;CAIR,QAAQ;CACR,WAAW;CACX,UAAU;CACV,UAAU;CACV,WAAW;CACX,cAAc;CACd,QAAQ;CACR,gBAAgB;CAChB,MAAM;CACN,UAAU;CACV,UAAU;CACV,QAAQ;AACV;AAEA,SAAS,EAAkB,GAAwB;CACjD,OAAO,EACJ,QAAQ,MAAM,GAAG,EACjB,YAAY,EACZ,QAAQ,UAAU,MAAS,EAAK,YAAY,CAAC;AAClD;AAEA,IAAa,KAAqC,EAChD,WACA,SAAS,GACT,mBACI;CACJ,IAAM,IAAM,EAAO,YAAY,GACzB,IAAU,KAAmB,EAAiB,MAAQ,aACtD,IAAS,EAAa,IAAI,CAAG;CAEnC,OACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAc,IACd,CACF;YALF,CAOG,KACC,kBAAC,QAAD;GACE,eAAY;GACZ,WAAU;EACX,CAAA,GAEF,EAAkB,CAAM,CACrB;;AAEV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaymentSummaryPanel.d.ts","sourceRoot":"","sources":["../../../../src/atheletebridge/components/registration/PaymentSummaryPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CA0EvD,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { MetricsCard as e } from "../MetricsCard.js";
|
|
2
|
+
import { useRegistrationPaymentSummary as t } from "../../hooks/useRegistrationApi.js";
|
|
3
|
+
import { formatMoney as n } from "../../utils/money.js";
|
|
4
|
+
import { CircleDollarSign as r, ClipboardList as i, HandCoins as a, Hourglass as o } from "lucide-react";
|
|
5
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
//#region src/atheletebridge/components/registration/PaymentSummaryPanel.tsx
|
|
7
|
+
var l = ({ formId: l }) => {
|
|
8
|
+
let u = t(l);
|
|
9
|
+
if (!u.data) return null;
|
|
10
|
+
let d = u.data, f = d.totals.length > 0 ? d.totals : null;
|
|
11
|
+
return /* @__PURE__ */ c("section", {
|
|
12
|
+
"aria-label": "Fee reconciliation",
|
|
13
|
+
className: "mb-6 space-y-3",
|
|
14
|
+
"data-testid": "registration-summary",
|
|
15
|
+
children: [/* @__PURE__ */ c("div", {
|
|
16
|
+
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ s(e, {
|
|
19
|
+
icon: /* @__PURE__ */ s(i, { className: "h-5 w-5" }),
|
|
20
|
+
value: d.submissionCount,
|
|
21
|
+
label: `Registrations (${d.acceptedCount} accepted)`
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ s(e, {
|
|
24
|
+
icon: /* @__PURE__ */ s(a, { className: "h-5 w-5" }),
|
|
25
|
+
value: d.paidCount,
|
|
26
|
+
label: "Paid in full",
|
|
27
|
+
tone: "success"
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ s(e, {
|
|
30
|
+
icon: /* @__PURE__ */ s(o, { className: "h-5 w-5" }),
|
|
31
|
+
value: d.unpaidCount + d.partiallyPaidCount,
|
|
32
|
+
label: `Awaiting payment (${d.partiallyPaidCount} partial)`
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ s(e, {
|
|
35
|
+
icon: /* @__PURE__ */ s(r, { className: "h-5 w-5" }),
|
|
36
|
+
value: d.notRequiredCount + d.refundedCount,
|
|
37
|
+
label: "Free or refunded"
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}), f && /* @__PURE__ */ s("div", {
|
|
41
|
+
className: "overflow-x-auto rounded-lg border border-border-seam",
|
|
42
|
+
children: /* @__PURE__ */ c("table", {
|
|
43
|
+
className: "w-full text-sm",
|
|
44
|
+
children: [/* @__PURE__ */ s("thead", {
|
|
45
|
+
className: "bg-bg-sunken text-left text-xs uppercase tracking-wide text-text-secondary",
|
|
46
|
+
children: /* @__PURE__ */ c("tr", { children: [
|
|
47
|
+
/* @__PURE__ */ s("th", {
|
|
48
|
+
className: "px-4 py-2 font-medium",
|
|
49
|
+
children: "Currency"
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ s("th", {
|
|
52
|
+
className: "px-4 py-2 text-right font-medium",
|
|
53
|
+
children: "Due"
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ s("th", {
|
|
56
|
+
className: "px-4 py-2 text-right font-medium",
|
|
57
|
+
children: "Collected"
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ s("th", {
|
|
60
|
+
className: "px-4 py-2 text-right font-medium",
|
|
61
|
+
children: "Refunded"
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ s("th", {
|
|
64
|
+
className: "px-4 py-2 text-right font-medium",
|
|
65
|
+
children: "Outstanding"
|
|
66
|
+
})
|
|
67
|
+
] })
|
|
68
|
+
}), /* @__PURE__ */ s("tbody", {
|
|
69
|
+
className: "divide-y divide-border-seam",
|
|
70
|
+
children: f.map((e) => /* @__PURE__ */ c("tr", {
|
|
71
|
+
className: "text-text-primary",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ s("td", {
|
|
74
|
+
className: "px-4 py-2 font-medium",
|
|
75
|
+
children: e.currency
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ s("td", {
|
|
78
|
+
className: "px-4 py-2 text-right tabular-nums",
|
|
79
|
+
children: n(e.amountDue, e.currency)
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ s("td", {
|
|
82
|
+
className: "px-4 py-2 text-right tabular-nums",
|
|
83
|
+
children: n(e.amountCollected, e.currency)
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ s("td", {
|
|
86
|
+
className: "px-4 py-2 text-right tabular-nums",
|
|
87
|
+
children: n(e.amountRefunded, e.currency)
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ s("td", {
|
|
90
|
+
className: "px-4 py-2 text-right font-semibold tabular-nums",
|
|
91
|
+
"data-testid": "summary-outstanding",
|
|
92
|
+
children: n(e.amountOutstanding, e.currency)
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
}, e.currency))
|
|
96
|
+
})]
|
|
97
|
+
})
|
|
98
|
+
})]
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
//#endregion
|
|
102
|
+
export { l as PaymentSummaryPanel };
|
|
103
|
+
|
|
104
|
+
//# sourceMappingURL=PaymentSummaryPanel.js.map
|