@burdenoff/microfe-technospam 2026.827.1 → 2026.828.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/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/technospam/TechnoSpamRoutes.d.ts.map +1 -1
- package/dist/technospam/TechnoSpamRoutes.js +89 -88
- package/dist/technospam/TechnoSpamRoutes.js.map +1 -1
- package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts +25 -0
- package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts.map +1 -0
- package/dist/technospam/components/TechnoSpamErrorBoundary.js +31 -0
- package/dist/technospam/components/TechnoSpamErrorBoundary.js.map +1 -0
- package/dist/technospam/components/index.d.ts +1 -0
- package/dist/technospam/components/index.d.ts.map +1 -1
- package/dist/technospam/components/index.js +1 -0
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js +7 -7
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js.map +1 -1
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js +1 -1
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsPortfolioPagePage.js +2 -2
- package/dist/technospam/pages/ApplicationsPortfolioPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +1 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesMyLearningPagePage.js +1 -1
- package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
- package/dist/technospam/pages/DashboardDashboardPagePage.js +1 -1
- package/dist/technospam/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js +1 -1
- package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.js +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.js +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
- package/dist/technospam/pages/StudyPlannerStudyPlannerPagePage.js +1 -1
- package/dist/technospam/pages/StudyPlannerStudyPlannerPagePage.js.map +1 -1
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/package.json +8 -2
|
@@ -1,222 +1,223 @@
|
|
|
1
1
|
import { useTechnoSpamPageView as e } from "./hooks/useTechnoSpamPageView.js";
|
|
2
2
|
import { EmptyView as t } from "./components/StateViews.js";
|
|
3
|
+
import { TechnoSpamErrorBoundary as n } from "./components/TechnoSpamErrorBoundary.js";
|
|
3
4
|
import "./components/index.js";
|
|
4
|
-
import { DashboardDashboardPagePage as
|
|
5
|
-
import { Suspense as
|
|
6
|
-
import { Loader2 as
|
|
7
|
-
import { Navigate as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { FeatureGate as
|
|
5
|
+
import { DashboardDashboardPagePage as r } from "./pages/DashboardDashboardPagePage.js";
|
|
6
|
+
import { Suspense as i, lazy as a, useMemo as o } from "react";
|
|
7
|
+
import { Loader2 as s, ShieldAlert as c } from "lucide-react";
|
|
8
|
+
import { Navigate as l, Route as u, Routes as d, useLocation as f } from "react-router";
|
|
9
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
|
+
import { FeatureGate as h } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
10
11
|
//#region src/technospam/TechnoSpamRoutes.tsx
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
return /* @__PURE__ */
|
|
12
|
+
var g = a(() => import("./pages/DashboardDashboardPagePage.js").then((e) => ({ default: e.DashboardDashboardPagePage }))), _ = a(() => import("./pages/CoursesCoursesPagePage.js").then((e) => ({ default: e.CoursesCoursesPagePage }))), v = a(() => import("./pages/CoursesCourseDetailsPagePage.js").then((e) => ({ default: e.CoursesCourseDetailsPagePage }))), y = a(() => import("./pages/CoursesMyLearningPagePage.js").then((e) => ({ default: e.CoursesMyLearningPagePage }))), b = a(() => import("./pages/ApplicationsProblemsPagePage.js").then((e) => ({ default: e.ApplicationsProblemsPagePage }))), x = a(() => import("./pages/ApplicationsProblemDetailsPagePage.js").then((e) => ({ default: e.ApplicationsProblemDetailsPagePage }))), S = a(() => import("./pages/MentorshipMentorsPagePage.js").then((e) => ({ default: e.MentorshipMentorsPagePage }))), C = a(() => import("./pages/MentorshipMentorProfilePagePage.js").then((e) => ({ default: e.MentorshipMentorProfilePagePage }))), w = a(() => import("./pages/MentorshipSessionsPagePage.js").then((e) => ({ default: e.MentorshipSessionsPagePage }))), T = a(() => import("./pages/HackathonsHackathonsPagePage.js").then((e) => ({ default: e.HackathonsHackathonsPagePage }))), E = a(() => import("./pages/HackathonsHackathonDetailsPagePage.js").then((e) => ({ default: e.HackathonsHackathonDetailsPagePage }))), D = a(() => import("./pages/AnalyticsAnalyticsPagePage.js").then((e) => ({ default: e.AnalyticsAnalyticsPagePage }))), O = a(() => import("./pages/AdminAdminDashboardPagePage.js").then((e) => ({ default: e.AdminAdminDashboardPagePage }))), k = a(() => import("./pages/StudyPlannerStudyPlannerPagePage.js").then((e) => ({ default: e.StudyPlannerStudyPlannerPagePage }))), A = a(() => import("./pages/ApplicationsPortfolioPagePage.js").then((e) => ({ default: e.ApplicationsPortfolioPagePage })));
|
|
13
|
+
function j() {
|
|
14
|
+
return /* @__PURE__ */ p("div", {
|
|
14
15
|
className: "flex h-full min-h-[40vh] items-center justify-center",
|
|
15
|
-
children: /* @__PURE__ */
|
|
16
|
+
children: /* @__PURE__ */ p(s, {
|
|
16
17
|
className: "animate-spin text-text-muted",
|
|
17
18
|
size: 28
|
|
18
19
|
})
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
function M() {
|
|
23
|
+
return /* @__PURE__ */ p("div", {
|
|
23
24
|
className: "flex h-full min-h-[40vh] items-center justify-center p-6",
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
icon: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ p(t, {
|
|
26
|
+
icon: /* @__PURE__ */ p(c, { size: 28 }),
|
|
26
27
|
title: "Feature not available",
|
|
27
28
|
description: "This TechnoSpam feature is currently disabled for your workspace."
|
|
28
29
|
})
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
return /* @__PURE__ */
|
|
32
|
+
function N(e, t) {
|
|
33
|
+
return /* @__PURE__ */ p(h, {
|
|
33
34
|
flag: e,
|
|
34
35
|
defaultValue: !0,
|
|
35
|
-
fallback: /* @__PURE__ */
|
|
36
|
+
fallback: /* @__PURE__ */ p(M, {}),
|
|
36
37
|
children: t
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
function N() {
|
|
40
|
-
let { pathname: t } = d();
|
|
41
|
-
e(a(() => t.includes("/courses/course-details") ? "course-details" : t.includes("/courses/my-learning") ? "my-learning" : t.includes("/courses") ? "courses" : t.includes("/applications/problem-details") ? "problem-details" : t.includes("/applications/portfolio") ? "portfolio" : t.includes("/applications") ? "problems" : t.includes("/study-planner") ? "study-planner" : t.includes("/mentorship/mentor-profile") ? "mentor-profile" : t.includes("/mentorship/sessions") ? "sessions" : t.includes("/mentorship") ? "mentors" : t.includes("/hackathons/hackathon-details") ? "hackathon-details" : t.includes("/hackathons") ? "hackathons" : t.includes("/analytics") ? "analytics" : t.includes("/admin") ? "admin" : "dashboard", [t]));
|
|
42
|
-
}
|
|
43
40
|
function P() {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
let { pathname: t } = f();
|
|
42
|
+
e(o(() => t.includes("/courses/course-details") ? "course-details" : t.includes("/courses/my-learning") ? "my-learning" : t.includes("/courses") ? "courses" : t.includes("/applications/problem-details") ? "problem-details" : t.includes("/applications/portfolio") ? "portfolio" : t.includes("/applications") ? "problems" : t.includes("/study-planner") ? "study-planner" : t.includes("/mentorship/mentor-profile") ? "mentor-profile" : t.includes("/mentorship/sessions") ? "sessions" : t.includes("/mentorship") ? "mentors" : t.includes("/hackathons/hackathon-details") ? "hackathon-details" : t.includes("/hackathons") ? "hackathons" : t.includes("/analytics") ? "analytics" : t.includes("/admin") ? "admin" : "dashboard", [t]));
|
|
43
|
+
}
|
|
44
|
+
function F() {
|
|
45
|
+
return P(), /* @__PURE__ */ p(i, {
|
|
46
|
+
fallback: /* @__PURE__ */ p(j, {}),
|
|
47
|
+
children: /* @__PURE__ */ p(n, { children: /* @__PURE__ */ m(d, { children: [
|
|
48
|
+
/* @__PURE__ */ p(u, {
|
|
48
49
|
index: !0,
|
|
49
|
-
element:
|
|
50
|
+
element: N("technospam.dashboard", /* @__PURE__ */ p(r, {}))
|
|
50
51
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ p(u, {
|
|
52
53
|
path: "dashboard/dashboard-page",
|
|
53
|
-
element:
|
|
54
|
+
element: N("technospam.dashboard", /* @__PURE__ */ p(g, {}))
|
|
54
55
|
}),
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ p(u, {
|
|
56
57
|
path: "courses/courses-page",
|
|
57
|
-
element:
|
|
58
|
+
element: N("technospam.courses", /* @__PURE__ */ p(_, {}))
|
|
58
59
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ p(u, {
|
|
60
61
|
path: "courses/course-details-page",
|
|
61
|
-
element:
|
|
62
|
+
element: N("technospam.courses", /* @__PURE__ */ p(v, {}))
|
|
62
63
|
}),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ p(u, {
|
|
64
65
|
path: "courses/my-learning-page",
|
|
65
|
-
element:
|
|
66
|
+
element: N("technospam.courses", /* @__PURE__ */ p(y, {}))
|
|
66
67
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ p(u, {
|
|
68
69
|
path: "courses/instructors-page",
|
|
69
|
-
element: /* @__PURE__ */
|
|
70
|
+
element: /* @__PURE__ */ p(l, {
|
|
70
71
|
to: "../courses/courses-page",
|
|
71
72
|
replace: !0
|
|
72
73
|
})
|
|
73
74
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ p(u, {
|
|
75
76
|
path: "courses/instructor-profile-page",
|
|
76
|
-
element: /* @__PURE__ */
|
|
77
|
+
element: /* @__PURE__ */ p(l, {
|
|
77
78
|
to: "../courses/courses-page",
|
|
78
79
|
replace: !0
|
|
79
80
|
})
|
|
80
81
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ p(u, {
|
|
82
83
|
path: "applications/problems-page",
|
|
83
|
-
element:
|
|
84
|
+
element: N("technospam.problems", /* @__PURE__ */ p(b, {}))
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ p(u, {
|
|
86
87
|
path: "applications/problem-details-page",
|
|
87
|
-
element:
|
|
88
|
+
element: N("technospam.problems", /* @__PURE__ */ p(x, {}))
|
|
88
89
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ p(u, {
|
|
90
91
|
path: "applications/solutions-page",
|
|
91
|
-
element: /* @__PURE__ */
|
|
92
|
+
element: /* @__PURE__ */ p(l, {
|
|
92
93
|
to: "../applications/problems-page",
|
|
93
94
|
replace: !0
|
|
94
95
|
})
|
|
95
96
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ p(u, {
|
|
97
98
|
path: "applications/portfolio-page",
|
|
98
|
-
element:
|
|
99
|
+
element: N("technospam.portfolio", /* @__PURE__ */ p(A, {}))
|
|
99
100
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ p(u, {
|
|
101
102
|
path: "mentorship/mentors-page",
|
|
102
|
-
element:
|
|
103
|
+
element: N("technospam.mentorship", /* @__PURE__ */ p(S, {}))
|
|
103
104
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ p(u, {
|
|
105
106
|
path: "mentorship/mentor-profile-page",
|
|
106
|
-
element:
|
|
107
|
+
element: N("technospam.mentorship", /* @__PURE__ */ p(C, {}))
|
|
107
108
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ p(u, {
|
|
109
110
|
path: "mentorship/sessions-page",
|
|
110
|
-
element:
|
|
111
|
+
element: N("technospam.mentorship", /* @__PURE__ */ p(w, {}))
|
|
111
112
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ p(u, {
|
|
113
114
|
path: "mentorship/mentorship-page",
|
|
114
|
-
element: /* @__PURE__ */
|
|
115
|
+
element: /* @__PURE__ */ p(l, {
|
|
115
116
|
to: "../mentorship/mentors-page",
|
|
116
117
|
replace: !0
|
|
117
118
|
})
|
|
118
119
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ p(u, {
|
|
120
121
|
path: "mentorship/bookings-page",
|
|
121
|
-
element: /* @__PURE__ */
|
|
122
|
+
element: /* @__PURE__ */ p(l, {
|
|
122
123
|
to: "../mentorship/sessions-page",
|
|
123
124
|
replace: !0
|
|
124
125
|
})
|
|
125
126
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ p(u, {
|
|
127
128
|
path: "hackathons/hackathons-page",
|
|
128
|
-
element:
|
|
129
|
+
element: N("technospam.hackathons", /* @__PURE__ */ p(T, {}))
|
|
129
130
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ p(u, {
|
|
131
132
|
path: "hackathons/hackathon-details-page",
|
|
132
|
-
element:
|
|
133
|
+
element: N("technospam.hackathons", /* @__PURE__ */ p(E, {}))
|
|
133
134
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ p(u, {
|
|
135
136
|
path: "hackathons/events-page",
|
|
136
|
-
element: /* @__PURE__ */
|
|
137
|
+
element: /* @__PURE__ */ p(l, {
|
|
137
138
|
to: "../hackathons/hackathons-page",
|
|
138
139
|
replace: !0
|
|
139
140
|
})
|
|
140
141
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ p(u, {
|
|
142
143
|
path: "hackathons/teams-page",
|
|
143
|
-
element: /* @__PURE__ */
|
|
144
|
+
element: /* @__PURE__ */ p(l, {
|
|
144
145
|
to: "../hackathons/hackathons-page",
|
|
145
146
|
replace: !0
|
|
146
147
|
})
|
|
147
148
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ p(u, {
|
|
149
150
|
path: "analytics/analytics-page",
|
|
150
|
-
element:
|
|
151
|
+
element: N("technospam.analytics", /* @__PURE__ */ p(D, {}))
|
|
151
152
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ p(u, {
|
|
153
154
|
path: "analytics/progress-page",
|
|
154
|
-
element: /* @__PURE__ */
|
|
155
|
+
element: /* @__PURE__ */ p(l, {
|
|
155
156
|
to: "../analytics/analytics-page",
|
|
156
157
|
replace: !0
|
|
157
158
|
})
|
|
158
159
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ p(u, {
|
|
160
161
|
path: "analytics/achievements-page",
|
|
161
|
-
element: /* @__PURE__ */
|
|
162
|
+
element: /* @__PURE__ */ p(l, {
|
|
162
163
|
to: "../analytics/analytics-page",
|
|
163
164
|
replace: !0
|
|
164
165
|
})
|
|
165
166
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ p(u, {
|
|
167
168
|
path: "analytics/reports-page",
|
|
168
|
-
element: /* @__PURE__ */
|
|
169
|
+
element: /* @__PURE__ */ p(l, {
|
|
169
170
|
to: "../analytics/analytics-page",
|
|
170
171
|
replace: !0
|
|
171
172
|
})
|
|
172
173
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ p(u, {
|
|
174
175
|
path: "admin/admin-dashboard-page",
|
|
175
|
-
element:
|
|
176
|
+
element: N("technospam.admin", /* @__PURE__ */ p(O, {}))
|
|
176
177
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ p(u, {
|
|
178
179
|
path: "admin/audit-reports-page",
|
|
179
|
-
element: /* @__PURE__ */
|
|
180
|
+
element: /* @__PURE__ */ p(l, {
|
|
180
181
|
to: "../admin/admin-dashboard-page",
|
|
181
182
|
replace: !0
|
|
182
183
|
})
|
|
183
184
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ p(u, {
|
|
185
186
|
path: "study-planner/study-planner-page",
|
|
186
|
-
element:
|
|
187
|
+
element: N("technospam.studyPlanner", /* @__PURE__ */ p(k, {}))
|
|
187
188
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ p(u, {
|
|
189
190
|
path: "study-planner/*",
|
|
190
|
-
element: /* @__PURE__ */
|
|
191
|
+
element: /* @__PURE__ */ p(l, {
|
|
191
192
|
to: "../study-planner/study-planner-page",
|
|
192
193
|
replace: !0
|
|
193
194
|
})
|
|
194
195
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ p(u, {
|
|
196
197
|
path: "open-source/*",
|
|
197
|
-
element: /* @__PURE__ */
|
|
198
|
+
element: /* @__PURE__ */ p(l, {
|
|
198
199
|
to: "../dashboard/dashboard-page",
|
|
199
200
|
replace: !0
|
|
200
201
|
})
|
|
201
202
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ p(u, {
|
|
203
204
|
path: "knowledge-base/*",
|
|
204
|
-
element: /* @__PURE__ */
|
|
205
|
+
element: /* @__PURE__ */ p(l, {
|
|
205
206
|
to: "../dashboard/dashboard-page",
|
|
206
207
|
replace: !0
|
|
207
208
|
})
|
|
208
209
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ p(u, {
|
|
210
211
|
path: "*",
|
|
211
|
-
element: /* @__PURE__ */
|
|
212
|
+
element: /* @__PURE__ */ p(l, {
|
|
212
213
|
to: "../dashboard/dashboard-page",
|
|
213
214
|
replace: !0
|
|
214
215
|
})
|
|
215
216
|
})
|
|
216
|
-
] })
|
|
217
|
+
] }) })
|
|
217
218
|
});
|
|
218
219
|
}
|
|
219
220
|
//#endregion
|
|
220
|
-
export {
|
|
221
|
+
export { F as TechnoSpamRoutes };
|
|
221
222
|
|
|
222
223
|
//# sourceMappingURL=TechnoSpamRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TechnoSpamRoutes.js","names":[],"sources":["../../src/technospam/TechnoSpamRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, useMemo } from 'react';\nimport { Navigate, Route, Routes, useLocation } from 'react-router';\nimport { Loader2, ShieldAlert } from 'lucide-react';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useTechnoSpamPageView } from './hooks/useTechnoSpamPageView';\nimport { EmptyView } from './components';\n\n/**\n * TechnoSpam routes — every page is backed by the real wspace-technospam-svc\n * (Tec* fields). Modules with no backend (open source, knowledge base,\n * standalone instructors, extra analytics/admin sub-pages) were removed\n * during the backend-reconciliation rebuild; their old paths redirect to\n * the nearest live page so stale links never 404.\n *\n * study-planner (BOFF-4415) and applications/portfolio-page (BOFF-4432) are\n * real pages again as of this pass — see their page components' honesty\n * notes for exactly what is/isn't AI and what's deferred.\n */\n\nimport { DashboardDashboardPagePage as IndexPage } from './pages/DashboardDashboardPagePage';\n\nconst DashboardDashboardPagePage = lazy(() =>\n import('./pages/DashboardDashboardPagePage').then((m) => ({\n default: m.DashboardDashboardPagePage,\n }))\n);\nconst CoursesCoursesPagePage = lazy(() =>\n import('./pages/CoursesCoursesPagePage').then((m) => ({ default: m.CoursesCoursesPagePage }))\n);\nconst CoursesCourseDetailsPagePage = lazy(() =>\n import('./pages/CoursesCourseDetailsPagePage').then((m) => ({\n default: m.CoursesCourseDetailsPagePage,\n }))\n);\nconst CoursesMyLearningPagePage = lazy(() =>\n import('./pages/CoursesMyLearningPagePage').then((m) => ({\n default: m.CoursesMyLearningPagePage,\n }))\n);\nconst ApplicationsProblemsPagePage = lazy(() =>\n import('./pages/ApplicationsProblemsPagePage').then((m) => ({\n default: m.ApplicationsProblemsPagePage,\n }))\n);\nconst ApplicationsProblemDetailsPagePage = lazy(() =>\n import('./pages/ApplicationsProblemDetailsPagePage').then((m) => ({\n default: m.ApplicationsProblemDetailsPagePage,\n }))\n);\nconst MentorshipMentorsPagePage = lazy(() =>\n import('./pages/MentorshipMentorsPagePage').then((m) => ({\n default: m.MentorshipMentorsPagePage,\n }))\n);\nconst MentorshipMentorProfilePagePage = lazy(() =>\n import('./pages/MentorshipMentorProfilePagePage').then((m) => ({\n default: m.MentorshipMentorProfilePagePage,\n }))\n);\nconst MentorshipSessionsPagePage = lazy(() =>\n import('./pages/MentorshipSessionsPagePage').then((m) => ({\n default: m.MentorshipSessionsPagePage,\n }))\n);\nconst HackathonsHackathonsPagePage = lazy(() =>\n import('./pages/HackathonsHackathonsPagePage').then((m) => ({\n default: m.HackathonsHackathonsPagePage,\n }))\n);\nconst HackathonsHackathonDetailsPagePage = lazy(() =>\n import('./pages/HackathonsHackathonDetailsPagePage').then((m) => ({\n default: m.HackathonsHackathonDetailsPagePage,\n }))\n);\nconst AnalyticsAnalyticsPagePage = lazy(() =>\n import('./pages/AnalyticsAnalyticsPagePage').then((m) => ({\n default: m.AnalyticsAnalyticsPagePage,\n }))\n);\nconst AdminAdminDashboardPagePage = lazy(() =>\n import('./pages/AdminAdminDashboardPagePage').then((m) => ({\n default: m.AdminAdminDashboardPagePage,\n }))\n);\nconst StudyPlannerStudyPlannerPagePage = lazy(() =>\n import('./pages/StudyPlannerStudyPlannerPagePage').then((m) => ({\n default: m.StudyPlannerStudyPlannerPagePage,\n }))\n);\nconst ApplicationsPortfolioPagePage = lazy(() =>\n import('./pages/ApplicationsPortfolioPagePage').then((m) => ({\n default: m.ApplicationsPortfolioPagePage,\n }))\n);\n\nfunction PageLoader() {\n return (\n <div className=\"flex h-full min-h-[40vh] items-center justify-center\">\n <Loader2 className=\"animate-spin text-text-muted\" size={28} />\n </div>\n );\n}\n\nfunction FeatureDisabledFallback() {\n return (\n <div className=\"flex h-full min-h-[40vh] items-center justify-center p-6\">\n <EmptyView\n icon={<ShieldAlert size={28} />}\n title=\"Feature not available\"\n description=\"This TechnoSpam feature is currently disabled for your workspace.\"\n />\n </div>\n );\n}\n\nfunction gated(flag: string, element: React.ReactNode): React.ReactElement {\n return (\n <FeatureGate flag={flag} defaultValue={true} fallback={<FeatureDisabledFallback />}>\n {element}\n </FeatureGate>\n );\n}\n\nfunction useTrackedPageView() {\n const { pathname } = useLocation();\n const page = useMemo(() => {\n if (pathname.includes('/courses/course-details')) return 'course-details';\n if (pathname.includes('/courses/my-learning')) return 'my-learning';\n if (pathname.includes('/courses')) return 'courses';\n if (pathname.includes('/applications/problem-details')) return 'problem-details';\n if (pathname.includes('/applications/portfolio')) return 'portfolio';\n if (pathname.includes('/applications')) return 'problems';\n if (pathname.includes('/study-planner')) return 'study-planner';\n if (pathname.includes('/mentorship/mentor-profile')) return 'mentor-profile';\n if (pathname.includes('/mentorship/sessions')) return 'sessions';\n if (pathname.includes('/mentorship')) return 'mentors';\n if (pathname.includes('/hackathons/hackathon-details')) return 'hackathon-details';\n if (pathname.includes('/hackathons')) return 'hackathons';\n if (pathname.includes('/analytics')) return 'analytics';\n if (pathname.includes('/admin')) return 'admin';\n return 'dashboard';\n }, [pathname]);\n useTechnoSpamPageView(page);\n}\n\nexport function TechnoSpamRoutes() {\n useTrackedPageView();\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={gated('technospam.dashboard', <IndexPage />)} />\n <Route\n path=\"dashboard/dashboard-page\"\n element={gated('technospam.dashboard', <DashboardDashboardPagePage />)}\n />\n\n {/* Courses */}\n <Route\n path=\"courses/courses-page\"\n element={gated('technospam.courses', <CoursesCoursesPagePage />)}\n />\n <Route\n path=\"courses/course-details-page\"\n element={gated('technospam.courses', <CoursesCourseDetailsPagePage />)}\n />\n <Route\n path=\"courses/my-learning-page\"\n element={gated('technospam.courses', <CoursesMyLearningPagePage />)}\n />\n <Route\n path=\"courses/instructors-page\"\n element={<Navigate to=\"../courses/courses-page\" replace />}\n />\n <Route\n path=\"courses/instructor-profile-page\"\n element={<Navigate to=\"../courses/courses-page\" replace />}\n />\n\n {/* Practice (applications) */}\n <Route\n path=\"applications/problems-page\"\n element={gated('technospam.problems', <ApplicationsProblemsPagePage />)}\n />\n <Route\n path=\"applications/problem-details-page\"\n element={gated('technospam.problems', <ApplicationsProblemDetailsPagePage />)}\n />\n <Route\n path=\"applications/solutions-page\"\n element={<Navigate to=\"../applications/problems-page\" replace />}\n />\n <Route\n path=\"applications/portfolio-page\"\n element={gated('technospam.portfolio', <ApplicationsPortfolioPagePage />)}\n />\n\n {/* Mentorship */}\n <Route\n path=\"mentorship/mentors-page\"\n element={gated('technospam.mentorship', <MentorshipMentorsPagePage />)}\n />\n <Route\n path=\"mentorship/mentor-profile-page\"\n element={gated('technospam.mentorship', <MentorshipMentorProfilePagePage />)}\n />\n <Route\n path=\"mentorship/sessions-page\"\n element={gated('technospam.mentorship', <MentorshipSessionsPagePage />)}\n />\n <Route\n path=\"mentorship/mentorship-page\"\n element={<Navigate to=\"../mentorship/mentors-page\" replace />}\n />\n <Route\n path=\"mentorship/bookings-page\"\n element={<Navigate to=\"../mentorship/sessions-page\" replace />}\n />\n\n {/* Hackathons */}\n <Route\n path=\"hackathons/hackathons-page\"\n element={gated('technospam.hackathons', <HackathonsHackathonsPagePage />)}\n />\n <Route\n path=\"hackathons/hackathon-details-page\"\n element={gated('technospam.hackathons', <HackathonsHackathonDetailsPagePage />)}\n />\n <Route\n path=\"hackathons/events-page\"\n element={<Navigate to=\"../hackathons/hackathons-page\" replace />}\n />\n <Route\n path=\"hackathons/teams-page\"\n element={<Navigate to=\"../hackathons/hackathons-page\" replace />}\n />\n\n {/* Analytics */}\n <Route\n path=\"analytics/analytics-page\"\n element={gated('technospam.analytics', <AnalyticsAnalyticsPagePage />)}\n />\n <Route\n path=\"analytics/progress-page\"\n element={<Navigate to=\"../analytics/analytics-page\" replace />}\n />\n <Route\n path=\"analytics/achievements-page\"\n element={<Navigate to=\"../analytics/analytics-page\" replace />}\n />\n <Route\n path=\"analytics/reports-page\"\n element={<Navigate to=\"../analytics/analytics-page\" replace />}\n />\n\n {/* Admin */}\n <Route\n path=\"admin/admin-dashboard-page\"\n element={gated('technospam.admin', <AdminAdminDashboardPagePage />)}\n />\n <Route\n path=\"admin/audit-reports-page\"\n element={<Navigate to=\"../admin/admin-dashboard-page\" replace />}\n />\n\n {/*\n * Study Planner (BOFF-4415): a real, deterministic (non-AI)\n * scheduler now lives at study-planner/study-planner-page — see\n * StudyPlannerStudyPlannerPagePage's honesty note. This single page\n * intentionally consolidates what the nav scaffolding originally\n * anticipated as several separate pages (plans list, plan details,\n * edit, learning paths, goals) — those richer standalone views,\n * plus true AI/adaptive re-planning (BOFF-3874/3895), remain\n * deferred. Any other study-planner/* sub-path falls back here\n * rather than to the dashboard, since the real page now exists.\n */}\n <Route\n path=\"study-planner/study-planner-page\"\n element={gated('technospam.studyPlanner', <StudyPlannerStudyPlannerPagePage />)}\n />\n <Route\n path=\"study-planner/*\"\n element={<Navigate to=\"../study-planner/study-planner-page\" replace />}\n />\n {/*\n * Removed modules → dashboard.\n *\n * open-source and knowledge-base were never shipped and have no nav\n * entries anymore (BOFF-3086) — these redirects are a defensive\n * fallback for stale bookmarks/links only.\n */}\n <Route\n path=\"open-source/*\"\n element={<Navigate to=\"../dashboard/dashboard-page\" replace />}\n />\n <Route\n path=\"knowledge-base/*\"\n element={<Navigate to=\"../dashboard/dashboard-page\" replace />}\n />\n\n <Route path=\"*\" element={<Navigate to=\"../dashboard/dashboard-page\" replace />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;AAqBA,IAAM,IAA6B,QACjC,OAAO,yCAAsC,MAAM,OAAO,EACxD,SAAS,EAAE,4BACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAC9F,EACK,IAA+B,QACnC,OAAO,2CAAwC,MAAM,OAAO,EAC1D,SAAS,EAAE,8BACZ,EAAE,CACJ,EACK,IAA4B,QAChC,OAAO,wCAAqC,MAAM,OAAO,EACvD,SAAS,EAAE,2BACZ,EAAE,CACJ,EACK,IAA+B,QACnC,OAAO,2CAAwC,MAAM,OAAO,EAC1D,SAAS,EAAE,8BACZ,EAAE,CACJ,EACK,IAAqC,QACzC,OAAO,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CAAA;IAC9D,CAAA;GAEF,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD;KAAU,IAAG;KAA8B,SAAA;KAAU,CAAA;IAAI,CAAA;GAC3E,EAAA,CAAA;EACA,CAAA"}
|
|
1
|
+
{"version":3,"file":"TechnoSpamRoutes.js","names":[],"sources":["../../src/technospam/TechnoSpamRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, useMemo } from 'react';\nimport { Navigate, Route, Routes, useLocation } from 'react-router';\nimport { Loader2, ShieldAlert } from 'lucide-react';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useTechnoSpamPageView } from './hooks/useTechnoSpamPageView';\nimport { EmptyView, TechnoSpamErrorBoundary } from './components';\n\n/**\n * TechnoSpam routes — every page is backed by the real wspace-technospam-svc\n * (Tec* fields). Modules with no backend (open source, knowledge base,\n * standalone instructors, extra analytics/admin sub-pages) were removed\n * during the backend-reconciliation rebuild; their old paths redirect to\n * the nearest live page so stale links never 404.\n *\n * study-planner (BOFF-4415) and applications/portfolio-page (BOFF-4432) are\n * real pages again as of this pass — see their page components' honesty\n * notes for exactly what is/isn't AI and what's deferred.\n */\n\nimport { DashboardDashboardPagePage as IndexPage } from './pages/DashboardDashboardPagePage';\n\nconst DashboardDashboardPagePage = lazy(() =>\n import('./pages/DashboardDashboardPagePage').then((m) => ({\n default: m.DashboardDashboardPagePage,\n }))\n);\nconst CoursesCoursesPagePage = lazy(() =>\n import('./pages/CoursesCoursesPagePage').then((m) => ({ default: m.CoursesCoursesPagePage }))\n);\nconst CoursesCourseDetailsPagePage = lazy(() =>\n import('./pages/CoursesCourseDetailsPagePage').then((m) => ({\n default: m.CoursesCourseDetailsPagePage,\n }))\n);\nconst CoursesMyLearningPagePage = lazy(() =>\n import('./pages/CoursesMyLearningPagePage').then((m) => ({\n default: m.CoursesMyLearningPagePage,\n }))\n);\nconst ApplicationsProblemsPagePage = lazy(() =>\n import('./pages/ApplicationsProblemsPagePage').then((m) => ({\n default: m.ApplicationsProblemsPagePage,\n }))\n);\nconst ApplicationsProblemDetailsPagePage = lazy(() =>\n import('./pages/ApplicationsProblemDetailsPagePage').then((m) => ({\n default: m.ApplicationsProblemDetailsPagePage,\n }))\n);\nconst MentorshipMentorsPagePage = lazy(() =>\n import('./pages/MentorshipMentorsPagePage').then((m) => ({\n default: m.MentorshipMentorsPagePage,\n }))\n);\nconst MentorshipMentorProfilePagePage = lazy(() =>\n import('./pages/MentorshipMentorProfilePagePage').then((m) => ({\n default: m.MentorshipMentorProfilePagePage,\n }))\n);\nconst MentorshipSessionsPagePage = lazy(() =>\n import('./pages/MentorshipSessionsPagePage').then((m) => ({\n default: m.MentorshipSessionsPagePage,\n }))\n);\nconst HackathonsHackathonsPagePage = lazy(() =>\n import('./pages/HackathonsHackathonsPagePage').then((m) => ({\n default: m.HackathonsHackathonsPagePage,\n }))\n);\nconst HackathonsHackathonDetailsPagePage = lazy(() =>\n import('./pages/HackathonsHackathonDetailsPagePage').then((m) => ({\n default: m.HackathonsHackathonDetailsPagePage,\n }))\n);\nconst AnalyticsAnalyticsPagePage = lazy(() =>\n import('./pages/AnalyticsAnalyticsPagePage').then((m) => ({\n default: m.AnalyticsAnalyticsPagePage,\n }))\n);\nconst AdminAdminDashboardPagePage = lazy(() =>\n import('./pages/AdminAdminDashboardPagePage').then((m) => ({\n default: m.AdminAdminDashboardPagePage,\n }))\n);\nconst StudyPlannerStudyPlannerPagePage = lazy(() =>\n import('./pages/StudyPlannerStudyPlannerPagePage').then((m) => ({\n default: m.StudyPlannerStudyPlannerPagePage,\n }))\n);\nconst ApplicationsPortfolioPagePage = lazy(() =>\n import('./pages/ApplicationsPortfolioPagePage').then((m) => ({\n default: m.ApplicationsPortfolioPagePage,\n }))\n);\n\nfunction PageLoader() {\n return (\n <div className=\"flex h-full min-h-[40vh] items-center justify-center\">\n <Loader2 className=\"animate-spin text-text-muted\" size={28} />\n </div>\n );\n}\n\nfunction FeatureDisabledFallback() {\n return (\n <div className=\"flex h-full min-h-[40vh] items-center justify-center p-6\">\n <EmptyView\n icon={<ShieldAlert size={28} />}\n title=\"Feature not available\"\n description=\"This TechnoSpam feature is currently disabled for your workspace.\"\n />\n </div>\n );\n}\n\nfunction gated(flag: string, element: React.ReactNode): React.ReactElement {\n return (\n <FeatureGate flag={flag} defaultValue={true} fallback={<FeatureDisabledFallback />}>\n {element}\n </FeatureGate>\n );\n}\n\nfunction useTrackedPageView() {\n const { pathname } = useLocation();\n const page = useMemo(() => {\n if (pathname.includes('/courses/course-details')) return 'course-details';\n if (pathname.includes('/courses/my-learning')) return 'my-learning';\n if (pathname.includes('/courses')) return 'courses';\n if (pathname.includes('/applications/problem-details')) return 'problem-details';\n if (pathname.includes('/applications/portfolio')) return 'portfolio';\n if (pathname.includes('/applications')) return 'problems';\n if (pathname.includes('/study-planner')) return 'study-planner';\n if (pathname.includes('/mentorship/mentor-profile')) return 'mentor-profile';\n if (pathname.includes('/mentorship/sessions')) return 'sessions';\n if (pathname.includes('/mentorship')) return 'mentors';\n if (pathname.includes('/hackathons/hackathon-details')) return 'hackathon-details';\n if (pathname.includes('/hackathons')) return 'hackathons';\n if (pathname.includes('/analytics')) return 'analytics';\n if (pathname.includes('/admin')) return 'admin';\n return 'dashboard';\n }, [pathname]);\n useTechnoSpamPageView(page);\n}\n\nexport function TechnoSpamRoutes() {\n useTrackedPageView();\n return (\n <Suspense fallback={<PageLoader />}>\n <TechnoSpamErrorBoundary>\n <Routes>\n <Route index element={gated('technospam.dashboard', <IndexPage />)} />\n <Route\n path=\"dashboard/dashboard-page\"\n element={gated('technospam.dashboard', <DashboardDashboardPagePage />)}\n />\n\n {/* Courses */}\n <Route\n path=\"courses/courses-page\"\n element={gated('technospam.courses', <CoursesCoursesPagePage />)}\n />\n <Route\n path=\"courses/course-details-page\"\n element={gated('technospam.courses', <CoursesCourseDetailsPagePage />)}\n />\n <Route\n path=\"courses/my-learning-page\"\n element={gated('technospam.courses', <CoursesMyLearningPagePage />)}\n />\n <Route\n path=\"courses/instructors-page\"\n element={<Navigate to=\"../courses/courses-page\" replace />}\n />\n <Route\n path=\"courses/instructor-profile-page\"\n element={<Navigate to=\"../courses/courses-page\" replace />}\n />\n\n {/* Practice (applications) */}\n <Route\n path=\"applications/problems-page\"\n element={gated('technospam.problems', <ApplicationsProblemsPagePage />)}\n />\n <Route\n path=\"applications/problem-details-page\"\n element={gated('technospam.problems', <ApplicationsProblemDetailsPagePage />)}\n />\n <Route\n path=\"applications/solutions-page\"\n element={<Navigate to=\"../applications/problems-page\" replace />}\n />\n <Route\n path=\"applications/portfolio-page\"\n element={gated('technospam.portfolio', <ApplicationsPortfolioPagePage />)}\n />\n\n {/* Mentorship */}\n <Route\n path=\"mentorship/mentors-page\"\n element={gated('technospam.mentorship', <MentorshipMentorsPagePage />)}\n />\n <Route\n path=\"mentorship/mentor-profile-page\"\n element={gated('technospam.mentorship', <MentorshipMentorProfilePagePage />)}\n />\n <Route\n path=\"mentorship/sessions-page\"\n element={gated('technospam.mentorship', <MentorshipSessionsPagePage />)}\n />\n <Route\n path=\"mentorship/mentorship-page\"\n element={<Navigate to=\"../mentorship/mentors-page\" replace />}\n />\n <Route\n path=\"mentorship/bookings-page\"\n element={<Navigate to=\"../mentorship/sessions-page\" replace />}\n />\n\n {/* Hackathons */}\n <Route\n path=\"hackathons/hackathons-page\"\n element={gated('technospam.hackathons', <HackathonsHackathonsPagePage />)}\n />\n <Route\n path=\"hackathons/hackathon-details-page\"\n element={gated('technospam.hackathons', <HackathonsHackathonDetailsPagePage />)}\n />\n <Route\n path=\"hackathons/events-page\"\n element={<Navigate to=\"../hackathons/hackathons-page\" replace />}\n />\n <Route\n path=\"hackathons/teams-page\"\n element={<Navigate to=\"../hackathons/hackathons-page\" replace />}\n />\n\n {/* Analytics */}\n <Route\n path=\"analytics/analytics-page\"\n element={gated('technospam.analytics', <AnalyticsAnalyticsPagePage />)}\n />\n <Route\n path=\"analytics/progress-page\"\n element={<Navigate to=\"../analytics/analytics-page\" replace />}\n />\n <Route\n path=\"analytics/achievements-page\"\n element={<Navigate to=\"../analytics/analytics-page\" replace />}\n />\n <Route\n path=\"analytics/reports-page\"\n element={<Navigate to=\"../analytics/analytics-page\" replace />}\n />\n\n {/* Admin */}\n <Route\n path=\"admin/admin-dashboard-page\"\n element={gated('technospam.admin', <AdminAdminDashboardPagePage />)}\n />\n <Route\n path=\"admin/audit-reports-page\"\n element={<Navigate to=\"../admin/admin-dashboard-page\" replace />}\n />\n\n {/*\n * Study Planner (BOFF-4415): a real, deterministic (non-AI)\n * scheduler now lives at study-planner/study-planner-page — see\n * StudyPlannerStudyPlannerPagePage's honesty note. This single page\n * intentionally consolidates what the nav scaffolding originally\n * anticipated as several separate pages (plans list, plan details,\n * edit, learning paths, goals) — those richer standalone views,\n * plus true AI/adaptive re-planning (BOFF-3874/3895), remain\n * deferred. Any other study-planner/* sub-path falls back here\n * rather than to the dashboard, since the real page now exists.\n */}\n <Route\n path=\"study-planner/study-planner-page\"\n element={gated('technospam.studyPlanner', <StudyPlannerStudyPlannerPagePage />)}\n />\n <Route\n path=\"study-planner/*\"\n element={<Navigate to=\"../study-planner/study-planner-page\" replace />}\n />\n {/*\n * Removed modules → dashboard.\n *\n * open-source and knowledge-base were never shipped and have no nav\n * entries anymore (BOFF-3086) — these redirects are a defensive\n * fallback for stale bookmarks/links only.\n */}\n <Route\n path=\"open-source/*\"\n element={<Navigate to=\"../dashboard/dashboard-page\" replace />}\n />\n <Route\n path=\"knowledge-base/*\"\n element={<Navigate to=\"../dashboard/dashboard-page\" replace />}\n />\n\n <Route path=\"*\" element={<Navigate to=\"../dashboard/dashboard-page\" replace />} />\n </Routes>\n </TechnoSpamErrorBoundary>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;;AAqBA,IAAM,IAA6B,QACjC,OAAO,yCAAsC,MAAM,OAAO,EACxD,SAAS,EAAE,4BACZ,EAAE,CACJ,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAA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,kBAAC,GAAD,EAAoC,CAAA,CAAC;IAC/E,CAAA;GACF,kBAAC,GAAD;IACE,MAAK;IACL,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAsC,SAAA;KAAU,CAAA;IACtE,CAAA;GAQF,kBAAC,GAAD;IACE,MAAK;IACL,SAAS,kBAAC,GAAD;KAAU,IAAG;KAA8B,SAAA;KAAU,CAAA;IAC9D,CAAA;GACF,kBAAC,GAAD;IACE,MAAK;IACL,SAAS,kBAAC,GAAD;KAAU,IAAG;KAA8B,SAAA;KAAU,CAAA;IAC9D,CAAA;GAEF,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD;KAAU,IAAG;KAA8B,SAAA;KAAU,CAAA;IAAI,CAAA;GAC3E,EAAA,CAAA,EACe,CAAA;EACjB,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
title?: string;
|
|
6
|
+
}
|
|
7
|
+
interface State {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
error: Error | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Per-route error boundary for the TechnoSpam MFE.
|
|
13
|
+
*
|
|
14
|
+
* Catches render errors inside TechnoSpam pages (e.g. a GraphQL response with
|
|
15
|
+
* an unexpectedly null connection field) and renders an explicit error state
|
|
16
|
+
* inside the module chrome instead of letting the error bubble to the root
|
|
17
|
+
* boundary or leaving the content area blank.
|
|
18
|
+
*/
|
|
19
|
+
export declare class TechnoSpamErrorBoundary extends Component<Props, State> {
|
|
20
|
+
constructor(props: Props);
|
|
21
|
+
static getDerivedStateFromError(error: Error): State;
|
|
22
|
+
render(): ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=TechnoSpamErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TechnoSpamErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/technospam/components/TechnoSpamErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlD,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,qBAAa,uBAAwB,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBACtD,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;IAIpD,MAAM,IAAI,SAAS;CAapB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ErrorView as e } from "./StateViews.js";
|
|
2
|
+
import { Component as t } from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/technospam/components/TechnoSpamErrorBoundary.tsx
|
|
5
|
+
var r = class extends t {
|
|
6
|
+
constructor(e) {
|
|
7
|
+
super(e), this.state = {
|
|
8
|
+
hasError: !1,
|
|
9
|
+
error: null
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
static getDerivedStateFromError(e) {
|
|
13
|
+
return {
|
|
14
|
+
hasError: !0,
|
|
15
|
+
error: e
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return this.state.hasError ? /* @__PURE__ */ n("div", {
|
|
20
|
+
className: "flex h-full min-h-[50vh] items-center justify-center p-6",
|
|
21
|
+
children: /* @__PURE__ */ n(e, {
|
|
22
|
+
title: this.props.title ?? "Couldn't load this page",
|
|
23
|
+
error: this.state.error ?? void 0
|
|
24
|
+
})
|
|
25
|
+
}) : this.props.children;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { r as TechnoSpamErrorBoundary };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=TechnoSpamErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TechnoSpamErrorBoundary.js","names":[],"sources":["../../../src/technospam/components/TechnoSpamErrorBoundary.tsx"],"sourcesContent":["import { Component, type ReactNode } from 'react';\nimport { ErrorView } from './StateViews';\n\ninterface Props {\n children: ReactNode;\n title?: string;\n}\n\ninterface State {\n hasError: boolean;\n error: Error | null;\n}\n\n/**\n * Per-route error boundary for the TechnoSpam MFE.\n *\n * Catches render errors inside TechnoSpam pages (e.g. a GraphQL response with\n * an unexpectedly null connection field) and renders an explicit error state\n * inside the module chrome instead of letting the error bubble to the root\n * boundary or leaving the content area blank.\n */\nexport class TechnoSpamErrorBoundary extends Component<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error): State {\n return { hasError: true, error };\n }\n\n render(): ReactNode {\n if (this.state.hasError) {\n return (\n <div className=\"flex h-full min-h-[50vh] items-center justify-center p-6\">\n <ErrorView\n title={this.props.title ?? \"Couldn't load this page\"}\n error={this.state.error ?? undefined}\n />\n </div>\n );\n }\n return this.props.children;\n }\n}\n"],"mappings":";;;;AAqBA,IAAa,IAAb,cAA6C,EAAwB;CACnE,YAAY,GAAc;AAExB,EADA,MAAM,EAAM,EACZ,KAAK,QAAQ;GAAE,UAAU;GAAO,OAAO;GAAM;;CAG/C,OAAO,yBAAyB,GAAqB;AACnD,SAAO;GAAE,UAAU;GAAM;GAAO;;CAGlC,SAAoB;AAWlB,SAVI,KAAK,MAAM,WAEX,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,GAAD;IACE,OAAO,KAAK,MAAM,SAAS;IAC3B,OAAO,KAAK,MAAM,SAAS,KAAA;IAC3B,CAAA;GACE,CAAA,GAGH,KAAK,MAAM"}
|
|
@@ -8,4 +8,5 @@ export { TagStrip } from './TagStrip';
|
|
|
8
8
|
export { TagInput } from './TagInput';
|
|
9
9
|
export { UpgradeGate, PremiumBadge } from './UpgradeGate';
|
|
10
10
|
export { CodePanel, IoBlock, TestResultsPanel } from './SubmissionViews';
|
|
11
|
+
export { TechnoSpamErrorBoundary } from './TechnoSpamErrorBoundary';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/technospam/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/technospam/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -199,7 +199,7 @@ function Ie({ lesson: e, onSaved: t, onCancel: n }) {
|
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
201
|
function Le({ courseId: e }) {
|
|
202
|
-
let { data: t, loading: n, refetch: r } = O(e), [i, { loading: a }] = T(), [o] = z(), [c, l] = B(null), [d, f] = B(null), [p, h] = B(""), [g, _] = B("ARTICLE"), [y, b] = B(""), [x, S] = B(""), [C, w] = B(!1), E = [...t?.tecListLessons
|
|
202
|
+
let { data: t, loading: n, refetch: r } = O(e), [i, { loading: a }] = T(), [o] = z(), [c, l] = B(null), [d, f] = B(null), [p, h] = B(""), [g, _] = B("ARTICLE"), [y, b] = B(""), [x, S] = B(""), [C, w] = B(!1), E = [...t?.tecListLessons?.items ?? []].sort((e, t) => e.position - t.position), D = async (e) => {
|
|
203
203
|
f(e.id);
|
|
204
204
|
try {
|
|
205
205
|
let t = await o({ variables: {
|
|
@@ -435,7 +435,7 @@ function Re({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
|
|
|
435
435
|
});
|
|
436
436
|
}
|
|
437
437
|
function ze({ problemId: e }) {
|
|
438
|
-
let { data: t, loading: n, refetch: r } = L({ problemId: e }), [i] = D(), [a] = N(), [o, s] = B(null), [c, l] = B(!1), d = t?.tecListSubmissions
|
|
438
|
+
let { data: t, loading: n, refetch: r } = L({ problemId: e }), [i] = D(), [a] = N(), [o, s] = B(null), [c, l] = B(!1), d = t?.tecListSubmissions?.items ?? [], f = c ? d.filter((e) => e.verdict === "PENDING") : d, p = d.filter((e) => e.verdict === "PENDING").length, h = async (e, t) => {
|
|
439
439
|
s(e);
|
|
440
440
|
try {
|
|
441
441
|
(await i({ variables: {
|
|
@@ -498,7 +498,7 @@ function ze({ problemId: e }) {
|
|
|
498
498
|
});
|
|
499
499
|
}
|
|
500
500
|
function Be({ hackathon: e }) {
|
|
501
|
-
let { data: t, loading: n, refetch: r } = R(e.id), [i] = P(), [a, o] = B(null), [s, c] = B({}), l = t?.tecListTeams
|
|
501
|
+
let { data: t, loading: n, refetch: r } = R(e.id), [i] = P(), [a, o] = B(null), [s, c] = B({}), l = t?.tecListTeams?.items ?? [], u = async (e, t) => {
|
|
502
502
|
let n = Math.max(0, Number(s[e] ?? "0") || 0);
|
|
503
503
|
o(e);
|
|
504
504
|
try {
|
|
@@ -624,7 +624,7 @@ function Be({ hackathon: e }) {
|
|
|
624
624
|
});
|
|
625
625
|
}
|
|
626
626
|
function Ve() {
|
|
627
|
-
let { data: e, loading: t, error: n, refetch: r } = S({}), [o, { loading: c }] = C(), [l] = j(), [g] = b(), [_, y] = B(!1), [x, w] = B(null), [T, E] = B(null), [D, ee] = B(""), [O, k] = B(""), [te, A] = B(""), [M, N] = B(""), [P, F] = B("BEGINNER"), [I, L] = B(""), [R, z] = B([]), V = e?.tecListCourses
|
|
627
|
+
let { data: e, loading: t, error: n, refetch: r } = S({}), [o, { loading: c }] = C(), [l] = j(), [g] = b(), [_, y] = B(!1), [x, w] = B(null), [T, E] = B(null), [D, ee] = B(""), [O, k] = B(""), [te, A] = B(""), [M, N] = B(""), [P, F] = B("BEGINNER"), [I, L] = B(""), [R, z] = B([]), V = e?.tecListCourses?.items ?? [], U = () => {
|
|
628
628
|
ee(""), k(""), A(""), N(""), F("BEGINNER"), L(""), z([]), y(!1);
|
|
629
629
|
}, re = async () => {
|
|
630
630
|
let e = D.trim();
|
|
@@ -819,7 +819,7 @@ function Ve() {
|
|
|
819
819
|
});
|
|
820
820
|
}
|
|
821
821
|
function He() {
|
|
822
|
-
let { data: e, loading: t, error: n, refetch: r } = A({}), [a, { loading: o }] = E(), [s] = M(), [c, l] = B(!1), [h, g] = B(null), [_, y] = B(null), [b, x] = B(""), [S, C] = B(""), [w, T] = B(""), [D, ee] = B(""), [O, k] = B("EASY"), [te, j] = B(""), [N, P] = B(""), [F, I] = B(""), L = e?.tecListProblems
|
|
822
|
+
let { data: e, loading: t, error: n, refetch: r } = A({}), [a, { loading: o }] = E(), [s] = M(), [c, l] = B(!1), [h, g] = B(null), [_, y] = B(null), [b, x] = B(""), [S, C] = B(""), [w, T] = B(""), [D, ee] = B(""), [O, k] = B("EASY"), [te, j] = B(""), [N, P] = B(""), [F, I] = B(""), L = e?.tecListProblems?.items ?? [], R = () => {
|
|
823
823
|
x(""), C(""), T(""), ee(""), k("EASY"), j(""), P(""), I(""), l(!1);
|
|
824
824
|
}, z = async () => {
|
|
825
825
|
let e = b.trim();
|
|
@@ -1002,7 +1002,7 @@ function He() {
|
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
1004
|
function Ue() {
|
|
1005
|
-
let { data: e, loading: t, error: n, refetch: r } = ee({}), [a, { loading: s }] = w(), [l] = te(), [u] = F(), [g] = I(), [_] = x(), [y, b] = B(!1), [S, C] = B(null), [T, E] = B(null), [D, O] = B(""), [k, A] = B(""), [j, M] = B(""), [N, P] = B(""), [L, R] = B(""), [z, ne] = B(""), [H, U] = B(""), [re, ae] = B(""), [oe, ce] = B([]), W = e?.tecListHackathons
|
|
1005
|
+
let { data: e, loading: t, error: n, refetch: r } = ee({}), [a, { loading: s }] = w(), [l] = te(), [u] = F(), [g] = I(), [_] = x(), [y, b] = B(!1), [S, C] = B(null), [T, E] = B(null), [D, O] = B(""), [k, A] = B(""), [j, M] = B(""), [N, P] = B(""), [L, R] = B(""), [z, ne] = B(""), [H, U] = B(""), [re, ae] = B(""), [oe, ce] = B([]), W = e?.tecListHackathons?.items ?? [], ue = () => {
|
|
1006
1006
|
O(""), A(""), M(""), P(""), R(""), ne(""), U(""), ae(""), ce([]), b(!1);
|
|
1007
1007
|
}, fe = async () => {
|
|
1008
1008
|
let e = D.trim();
|
|
@@ -1215,7 +1215,7 @@ function Ue() {
|
|
|
1215
1215
|
});
|
|
1216
1216
|
}
|
|
1217
1217
|
function We() {
|
|
1218
|
-
let { data: e, loading: t, error: n, refetch: r } = k({}), [a] = y(), [o, s] = B(null), c = e?.tecListMentors
|
|
1218
|
+
let { data: e, loading: t, error: n, refetch: r } = k({}), [a] = y(), [o, s] = B(null), c = e?.tecListMentors?.items ?? [], u = c.filter((e) => e.status === "PENDING").length, h = async (e) => {
|
|
1219
1219
|
s(e);
|
|
1220
1220
|
try {
|
|
1221
1221
|
(await a({ variables: { id: e } })).data?.tecApproveMentor && (v.success("Mentor approved", "They can now accept mentees."), await r());
|