@burdenoff/microfe-technospam 2026.1102.1 → 2026.1102.3
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/generated/wspace-types.d.ts +7468 -141
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/node_modules/@codemirror/autocomplete/dist/index.js +527 -0
- package/dist/node_modules/@codemirror/autocomplete/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/commands/dist/index.js +1108 -0
- package/dist/node_modules/@codemirror/commands/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/lang-go/dist/index.js +206 -0
- package/dist/node_modules/@codemirror/lang-go/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/lang-javascript/dist/index.js +321 -0
- package/dist/node_modules/@codemirror/lang-javascript/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/lang-python/dist/index.js +265 -0
- package/dist/node_modules/@codemirror/lang-python/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/language/dist/index.js +957 -0
- package/dist/node_modules/@codemirror/language/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/legacy-modes/mode/ruby.js +164 -0
- package/dist/node_modules/@codemirror/legacy-modes/mode/ruby.js.map +1 -0
- package/dist/node_modules/@codemirror/legacy-modes/mode/shell.js +109 -0
- package/dist/node_modules/@codemirror/legacy-modes/mode/shell.js.map +1 -0
- package/dist/node_modules/@codemirror/state/dist/index.js +1739 -0
- package/dist/node_modules/@codemirror/state/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/streamparser/dist/index.js +70 -0
- package/dist/node_modules/@codemirror/streamparser/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/view/dist/index.js +5427 -0
- package/dist/node_modules/@codemirror/view/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/common/dist/index.js +896 -0
- package/dist/node_modules/@lezer/common/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/go/dist/index.js +215 -0
- package/dist/node_modules/@lezer/go/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/highlight/dist/index.js +395 -0
- package/dist/node_modules/@lezer/highlight/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/javascript/dist/index.js +437 -0
- package/dist/node_modules/@lezer/javascript/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/lr/dist/index.js +842 -0
- package/dist/node_modules/@lezer/lr/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/python/dist/index.js +352 -0
- package/dist/node_modules/@lezer/python/dist/index.js.map +1 -0
- package/dist/node_modules/@marijn/find-cluster-break/src/index.js +66 -0
- package/dist/node_modules/@marijn/find-cluster-break/src/index.js.map +1 -0
- package/dist/node_modules/style-mod/src/style-mod.js +74 -0
- package/dist/node_modules/style-mod/src/style-mod.js.map +1 -0
- package/dist/node_modules/w3c-keyname/index.js +90 -0
- package/dist/node_modules/w3c-keyname/index.js.map +1 -0
- package/dist/stories/fixtures/technospamFixtures.d.ts.map +1 -1
- package/dist/stories/journeys/Problems.stories.d.ts.map +1 -1
- package/dist/technospam/TechnoSpamRoot.d.ts.map +1 -1
- package/dist/technospam/TechnoSpamRoot.js +187 -178
- package/dist/technospam/TechnoSpamRoot.js.map +1 -1
- package/dist/technospam/api/technospamApi.d.ts +39 -0
- package/dist/technospam/api/technospamApi.d.ts.map +1 -1
- package/dist/technospam/api/technospamApi.js +184 -150
- package/dist/technospam/api/technospamApi.js.map +1 -1
- package/dist/technospam/components/MediaCover.js +2 -2
- package/dist/technospam/components/MediaCover.js.map +1 -1
- package/dist/technospam/components/MobileSectionTabs.d.ts +9 -0
- package/dist/technospam/components/MobileSectionTabs.d.ts.map +1 -0
- package/dist/technospam/components/MobileSectionTabs.js +43 -0
- package/dist/technospam/components/MobileSectionTabs.js.map +1 -0
- package/dist/technospam/components/PageLayout.d.ts +7 -1
- package/dist/technospam/components/PageLayout.d.ts.map +1 -1
- package/dist/technospam/components/PageLayout.js +40 -28
- package/dist/technospam/components/PageLayout.js.map +1 -1
- package/dist/technospam/components/SubmissionViews.d.ts +6 -2
- package/dist/technospam/components/SubmissionViews.d.ts.map +1 -1
- package/dist/technospam/components/SubmissionViews.js +6 -5
- package/dist/technospam/components/SubmissionViews.js.map +1 -1
- package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts +6 -0
- package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts.map +1 -1
- package/dist/technospam/components/TechnoSpamErrorBoundary.js +2 -2
- package/dist/technospam/components/TechnoSpamErrorBoundary.js.map +1 -1
- package/dist/technospam/components/editor/CodeEditor.d.ts +26 -0
- package/dist/technospam/components/editor/CodeEditor.d.ts.map +1 -0
- package/dist/technospam/components/editor/CodeEditor.js +102 -0
- package/dist/technospam/components/editor/CodeEditor.js.map +1 -0
- package/dist/technospam/components/editor/RunOutputPanel.d.ts +14 -0
- package/dist/technospam/components/editor/RunOutputPanel.d.ts.map +1 -0
- package/dist/technospam/components/editor/RunOutputPanel.js +127 -0
- package/dist/technospam/components/editor/RunOutputPanel.js.map +1 -0
- package/dist/technospam/components/editor/editorLanguages.d.ts +11 -0
- package/dist/technospam/components/editor/editorLanguages.d.ts.map +1 -0
- package/dist/technospam/components/editor/editorLanguages.js +30 -0
- package/dist/technospam/components/editor/editorLanguages.js.map +1 -0
- package/dist/technospam/components/editor/editorTheme.d.ts +11 -0
- package/dist/technospam/components/editor/editorTheme.d.ts.map +1 -0
- package/dist/technospam/components/editor/editorTheme.js +120 -0
- package/dist/technospam/components/editor/editorTheme.js.map +1 -0
- package/dist/technospam/components/lesson/SaveCourseOffline.js +6 -6
- package/dist/technospam/hooks/usePhoneLayout.d.ts +18 -0
- package/dist/technospam/hooks/usePhoneLayout.d.ts.map +1 -0
- package/dist/technospam/hooks/usePhoneLayout.js +14 -0
- package/dist/technospam/hooks/usePhoneLayout.js.map +1 -0
- package/dist/technospam/hooks/useSolutionRunner.d.ts +35 -0
- package/dist/technospam/hooks/useSolutionRunner.d.ts.map +1 -0
- package/dist/technospam/hooks/useSolutionRunner.js +66 -0
- package/dist/technospam/hooks/useSolutionRunner.js.map +1 -0
- package/dist/technospam/hooks/useTechnoSpamAnalytics.d.ts +1 -1
- package/dist/technospam/hooks/useTechnoSpamAnalytics.d.ts.map +1 -1
- package/dist/technospam/hooks/useTechnoSpamAnalytics.js.map +1 -1
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js +1 -1
- package/dist/technospam/pages/AdminAdminDashboardPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +416 -263
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js +89 -87
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +3 -3
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js +117 -81
- 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.d.ts.map +1 -1
- package/dist/technospam/pages/DashboardDashboardPagePage.js +21 -17
- package/dist/technospam/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js +3 -3
- package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorProfilePagePage.js +4 -4
- package/dist/technospam/pages/MentorshipMentorProfilePagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.js +6 -4
- 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/types/index.d.ts +7 -0
- package/dist/technospam/types/index.d.ts.map +1 -1
- package/dist/technospam/utils/mobileTabs.d.ts +45 -0
- package/dist/technospam/utils/mobileTabs.d.ts.map +1 -0
- package/dist/technospam/utils/mobileTabs.js +70 -0
- package/dist/technospam/utils/mobileTabs.js.map +1 -0
- package/dist/test/matchMedia.d.ts +6 -0
- package/dist/test/matchMedia.d.ts.map +1 -0
- package/package.json +16 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorshipMentorsPagePage.js","names":[],"sources":["../../../src/technospam/pages/MentorshipMentorsPagePage.tsx"],"sourcesContent":["import { createElement, useMemo, useState } from 'react';\nimport { Award, MessageSquare, Search, Sparkles, Star, UserPlus, Users, X } from 'lucide-react';\nimport { Badge, Button, GlassCard, Input, Textarea } from '@burdenoff/fe-libs/ui';\nimport {\n EmptyView,\n ErrorView,\n LoadMore,\n LoadingGrid,\n PageLayout,\n StatCard,\n coverGradient,\n topicIcon,\n} from '../components';\nimport { useTechnoSpam, useTechnoSpamNavigate } from '../providers/TechnoSpamProvider';\nimport {\n pageArg,\n useBecomeMentor,\n useMentorsQuery,\n usePageLimit,\n type TecMentor,\n} from '../api/technospamApi';\nimport { formatMoneyFromMinorUnits } from '../utils/format';\nimport { cn } from '../utils/cn';\nimport { notify } from '../lib/toast';\nimport { useTechnoSpamAnalytics } from '../hooks/useTechnoSpamAnalytics';\nimport { useTr } from '../hooks/useTr';\n\n/** Circular gradient medallion standing in for a mentor avatar, with a live\n * \"accepting\" presence dot — mirrors the directory mockup within the dark theme. */\nfunction MentorMedallion({ mentor, size = 'md' }: { mentor: TecMentor; size?: 'md' | 'lg' }) {\n const box = size === 'lg' ? 'h-20 w-20' : 'h-16 w-16';\n return (\n <div className=\"relative shrink-0\">\n <span\n className={cn(\n 'flex items-center justify-center rounded-full bg-gradient-to-br text-white shadow-md ring-1 ring-white/15',\n box,\n coverGradient(mentor.headline)\n )}\n >\n {createElement(topicIcon(mentor.expertise.join(' ') || mentor.headline), {\n size: size === 'lg' ? 32 : 26,\n strokeWidth: 1.7,\n })}\n </span>\n {mentor.isAcceptingMentees ? (\n <span className=\"absolute -bottom-0.5 -right-0.5 h-4 w-4 rounded-full border-2 border-bg-surface bg-status-success-text\" />\n ) : null}\n </div>\n );\n}\n\nfunction MentorCard({ mentor, onOpen }: { mentor: TecMentor; onOpen: () => void }) {\n const tr = useTr();\n return (\n <GlassCard\n data-testid=\"mentor-card\"\n className=\"group flex cursor-pointer flex-col gap-4 p-5 transition-all duration-200 hover:-translate-y-1 hover:shadow-lg\"\n onClick={onOpen}\n >\n <div className=\"flex items-start gap-4\">\n <MentorMedallion mentor={mentor} />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold text-text-primary group-hover:text-accent-primary\">\n {mentor.headline}\n </h3>\n {mentor.role ? (\n <p className=\"mt-0.5 truncate text-xs font-medium text-text-secondary\">{mentor.role}</p>\n ) : null}\n {mentor.isAcceptingMentees ? (\n <Badge\n variant=\"outline\"\n className=\"mt-1.5 inline-flex items-center gap-1.5 border-status-success-border bg-status-success-bg-subtle text-status-success-text\"\n >\n <span className=\"h-1.5 w-1.5 rounded-full bg-status-success-text\" />{' '}\n {tr('technospam.common.acceptingMentees', 'Accepting mentees')}\n </Badge>\n ) : (\n <Badge\n variant=\"outline\"\n className=\"mt-1.5 border-border-seam bg-bg-sunken text-text-secondary\"\n >\n {tr('technospam.common.notAcceptingMentees', 'Not accepting')}\n </Badge>\n )}\n </div>\n </div>\n\n {mentor.bio ? <p className=\"line-clamp-2 text-sm text-text-secondary\">{mentor.bio}</p> : null}\n\n {mentor.expertise.length ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {mentor.expertise.slice(0, 4).map((skill) => (\n <Badge key={skill} variant=\"secondary\" className=\"text-[11px]\">\n {skill}\n </Badge>\n ))}\n {mentor.expertise.length > 4 ? (\n <span className=\"self-center text-xs text-text-muted\">\n +{mentor.expertise.length - 4}\n </span>\n ) : null}\n </div>\n ) : null}\n\n <div className=\"mt-auto grid grid-cols-3 divide-x divide-border-seam rounded-xl border border-border-seam bg-bg-sunken text-center\">\n <div className=\"px-2 py-2.5\">\n <div className=\"flex items-center justify-center gap-1 text-sm font-semibold text-text-primary\">\n <Star size={13} className=\"text-accent-teal\" />\n {mentor.ratingAvg > 0 ? mentor.ratingAvg.toFixed(1) : 'New'}\n </div>\n <div className=\"text-[11px] text-text-muted\">\n {tr('technospam.common.rating', 'rating')}\n </div>\n </div>\n <div className=\"px-2 py-2.5\">\n <div className=\"text-sm font-semibold text-text-primary\">{mentor.sessionsCount}</div>\n <div className=\"text-[11px] text-text-muted\">\n {tr('technospam.common.sessions', 'sessions')}\n </div>\n </div>\n <div className=\"px-2 py-2.5\">\n <div className=\"text-sm font-semibold text-text-primary\">\n {formatMoneyFromMinorUnits(mentor.hourlyRate, mentor.currency)}\n </div>\n <div className=\"text-[11px] text-text-muted\">\n {tr('technospam.common.perHour', '/ hr')}\n </div>\n </div>\n </div>\n\n <Button\n className=\"w-full\"\n onClick={(e) => {\n e.stopPropagation();\n onOpen();\n }}\n >\n {tr('technospam.common.viewProfile', 'View profile')}\n </Button>\n </GlassCard>\n );\n}\n\nfunction BecomeMentorForm({\n onClose,\n onDone,\n workspaceId,\n}: {\n onClose: () => void;\n onDone: () => void;\n workspaceId?: string;\n}) {\n const [headline, setHeadline] = useState('');\n const [role, setRole] = useState('');\n const [bio, setBio] = useState('');\n const [expertise, setExpertise] = useState('');\n const [hourlyRate, setHourlyRate] = useState('');\n const [currency, setCurrency] = useState('USD');\n const [becomeMentor, { loading }] = useBecomeMentor();\n const { emit } = useTechnoSpamAnalytics();\n\n const canSubmit = headline.trim().length > 0 && !loading;\n\n const handleSubmit = async () => {\n if (!canSubmit) return;\n const input: {\n headline: string;\n role?: string;\n bio?: string;\n expertise?: string[];\n hourlyRate?: number;\n currency?: string;\n } = { headline: headline.trim() };\n if (role.trim()) input.role = role.trim();\n if (bio.trim()) input.bio = bio.trim();\n const exp = expertise\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean);\n if (exp.length) input.expertise = exp;\n // The form collects a dollars-and-cents rate (e.g. \"50\" or \"49.99\") but\n // TecMentor.hourlyRate is stored in the smallest currency unit (cents)\n // so BOFF-4433's fee math never loses precision to floating point --\n // convert here rather than storing the raw dollar figure as if it were\n // cents (which would under-charge/under-pay by 100x).\n const rateDollars = Number.parseFloat(hourlyRate);\n if (!Number.isNaN(rateDollars) && rateDollars >= 0) {\n input.hourlyRate = Math.round(rateDollars * 100);\n }\n if (currency.trim()) input.currency = currency.trim().toUpperCase();\n\n emit('technospam.mentor.become_mentor_clicked', { workspaceId });\n const res = await becomeMentor({ variables: { input } });\n if (res.data?.tecBecomeMentor) {\n emit('technospam.mentor.became_mentor', {\n workspaceId,\n entityId: res.data.tecBecomeMentor.id,\n entityType: 'TEC_MENTOR',\n });\n notify.success('Mentor profile created', 'Your profile is pending review.');\n onDone();\n }\n };\n\n return (\n <GlassCard className=\"mb-6 p-5\">\n <div className=\"mb-4 flex items-start justify-between gap-3\">\n <div className=\"flex items-center gap-3\">\n <span className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-accent-primary to-accent-indigo text-white shadow-sm\">\n <UserPlus size={20} />\n </span>\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">Become a mentor</h2>\n <p className=\"text-sm text-text-secondary\">\n Share your expertise and start mentoring builders in the community.\n </p>\n </div>\n </div>\n <Button variant=\"ghost\" size=\"sm\" onClick={onClose} aria-label=\"Close\">\n <X size={16} />\n </Button>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4\">\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Headline <span className=\"text-status-error-text\">*</span>\n </label>\n <Input\n placeholder=\"e.g. Staff Engineer · Distributed systems & career growth\"\n value={headline}\n onChange={(e) => setHeadline(e.target.value)}\n />\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Role & company\n </label>\n <Input\n placeholder=\"e.g. Staff Engineer @ Acme\"\n value={role}\n onChange={(e) => setRole(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">\n Shown as a subtitle under your headline. Optional.\n </p>\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Bio</label>\n <Textarea\n rows={3}\n placeholder=\"Tell mentees about your experience and how you can help.\"\n value={bio}\n onChange={(e) => setBio(e.target.value)}\n />\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Expertise</label>\n <Input\n placeholder=\"React, System design, Career coaching\"\n value={expertise}\n onChange={(e) => setExpertise(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">Comma-separated topics.</p>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Hourly rate\n </label>\n <Input\n type=\"number\"\n min={0}\n step={0.01}\n placeholder=\"0.00\"\n value={hourlyRate}\n onChange={(e) => setHourlyRate(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">\n Dollars per hour (e.g. 50 or 49.99). Leave 0 for free.\n </p>\n </div>\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Currency</label>\n <Input\n placeholder=\"USD\"\n value={currency}\n onChange={(e) => setCurrency(e.target.value)}\n />\n </div>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button onClick={handleSubmit} disabled={!canSubmit}>\n <UserPlus size={16} /> {loading ? 'Submitting…' : 'Submit profile'}\n </Button>\n <Button variant=\"outline\" onClick={onClose} disabled={loading}>\n Cancel\n </Button>\n </div>\n </div>\n </GlassCard>\n );\n}\n\nexport function MentorshipMentorsPagePage() {\n const navigate = useTechnoSpamNavigate();\n const { currentUser, workspaceId } = useTechnoSpam();\n const { emit } = useTechnoSpamAnalytics();\n const tr = useTr();\n const [search, setSearch] = useState('');\n const [showForm, setShowForm] = useState(false);\n\n const { limit, more } = usePageLimit();\n const { data, loading, error, refetch } = useMentorsQuery({\n status: 'ACTIVE',\n pagination: pageArg(limit),\n });\n\n const mentors = data?.tecListMentors?.items ?? [];\n const hasMore = data?.tecListMentors?.pageInfo?.hasMore ?? false;\n const userId = currentUser?.id;\n const alreadyMentor = Boolean(userId && mentors.some((m) => m.userId === userId));\n\n const filtered = useMemo(() => {\n const q = search.trim().toLowerCase();\n if (!q) return mentors;\n return mentors.filter(\n (m) =>\n m.headline.toLowerCase().includes(q) ||\n m.expertise.some((skill) => skill.toLowerCase().includes(q))\n );\n }, [mentors, search]);\n\n const accepting = mentors.filter((m) => m.isAcceptingMentees).length;\n const totalSessions = mentors.reduce((s, m) => s + m.sessionsCount, 0);\n const rated = mentors.filter((m) => m.ratingAvg > 0);\n const avgRating = rated.length\n ? (rated.reduce((s, m) => s + m.ratingAvg, 0) / rated.length).toFixed(1)\n : '—';\n\n return (\n <PageLayout\n hero\n title={tr('technospam.mentorship.findAMentorTitle', 'Find a Mentor')}\n description={tr(\n 'technospam.mentorship.description',\n 'Connect with experienced builders for 1:1 guidance, code review, and career coaching.'\n )}\n actions={\n <Button variant=\"outline\" onClick={() => navigate('/mentorship/sessions-page')}>\n <MessageSquare size={16} /> {tr('technospam.common.mySessions', 'My sessions')}\n </Button>\n }\n >\n {alreadyMentor ? (\n <GlassCard className=\"mb-6 flex items-center gap-3 p-4\">\n <span className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-status-success-bg-subtle text-status-success-text\">\n <Award size={20} />\n </span>\n <div>\n <div className=\"text-sm font-semibold text-text-primary\">You're a mentor</div>\n <div className=\"text-xs text-text-secondary\">\n Your mentor profile is live. Mentees can request sessions with you.\n </div>\n </div>\n </GlassCard>\n ) : showForm ? (\n <BecomeMentorForm\n onClose={() => setShowForm(false)}\n onDone={() => {\n setShowForm(false);\n void refetch();\n }}\n workspaceId={workspaceId}\n />\n ) : null}\n\n <div className=\"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <StatCard\n label={tr('technospam.mentorship.statMentors', 'Mentors')}\n value={mentors.length}\n icon={Users}\n tone=\"blue\"\n />\n <StatCard\n label={tr('technospam.mentorship.statAcceptingMentees', 'Accepting mentees')}\n value={accepting}\n icon={Sparkles}\n tone=\"green\"\n />\n <StatCard\n label={tr('technospam.mentorship.statAvgRating', 'Avg rating')}\n value={avgRating}\n icon={Star}\n tone=\"amber\"\n />\n <StatCard\n label={tr('technospam.mentorship.statTotalSessions', 'Total sessions')}\n value={totalSessions}\n icon={MessageSquare}\n tone=\"purple\"\n />\n </div>\n\n <div className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"relative w-full sm:w-80\">\n <Search\n className=\"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-text-muted\"\n size={16}\n />\n <Input\n className=\"pl-9\"\n aria-label={tr('technospam.mentorship.searchLabel', 'Search mentors')}\n placeholder={tr(\n 'technospam.mentorship.searchPlaceholder',\n 'Search by headline or expertise…'\n )}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n {!alreadyMentor && !showForm ? (\n <Button onClick={() => setShowForm(true)}>\n <UserPlus size={16} /> {tr('technospam.common.becomeAMentor', 'Become a mentor')}\n </Button>\n ) : null}\n </div>\n\n {loading && !mentors.length ? (\n <LoadingGrid />\n ) : error ? (\n <ErrorView\n title={tr('technospam.common.errorLoadMentors', \"Couldn't load mentors\")}\n error={error}\n />\n ) : filtered.length === 0 ? (\n <EmptyView\n icon={<Users size={26} />}\n title={\n search\n ? tr('technospam.mentorship.emptySearchTitle', 'No matching mentors')\n : tr('technospam.mentorship.emptyDefaultTitle', 'No mentors yet')\n }\n description={\n search\n ? tr('technospam.mentorship.emptySearchDesc', 'Try a different search term.')\n : tr(\n 'technospam.mentorship.emptyDefaultDesc',\n 'Active mentors will appear here. TechnoSpam is pre-launch — be one of the first to sign up.'\n )\n }\n action={\n !search && !alreadyMentor ? (\n <Button onClick={() => setShowForm(true)}>\n {tr('technospam.common.becomeAMentor', 'Become a mentor')}\n </Button>\n ) : undefined\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {filtered.map((mentor) => (\n <MentorCard\n key={mentor.id}\n mentor={mentor}\n onOpen={() => {\n emit('technospam.mentor.viewed', {\n workspaceId,\n entityId: mentor.id,\n entityType: 'TEC_MENTOR',\n });\n navigate(`/mentorship/mentor-profile-page?id=${mentor.id}`);\n }}\n />\n ))}\n </div>\n )}\n <LoadMore hasMore={hasMore} loading={loading} onClick={more} />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,SAAS,EAAgB,EAAE,WAAQ,UAAO,QAAmD;AAE3F,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,QAAD;GACE,WAAW,EACT,6GALI,MAAS,OAAO,cAAc,aAOlC,EAAc,EAAO,SAAS,CAC/B;aAEA,EAAc,EAAU,EAAO,UAAU,KAAK,IAAI,IAAI,EAAO,SAAS,EAAE;IACvE,MAAM,MAAS,OAAO,KAAK;IAC3B,aAAa;IACd,CAAC;GACG,CAAA,EACN,EAAO,qBACN,kBAAC,QAAD,EAAM,WAAU,0GAA2G,CAAA,GACzH,KACA;;;AAIV,SAAS,EAAW,EAAE,WAAQ,aAAqD;CACjF,IAAM,IAAK,GAAO;AAClB,QACE,kBAAC,GAAD;EACE,eAAY;EACZ,WAAU;EACV,SAAS;YAHX;GAKE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAyB,WAAU,CAAA,EACnC,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,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,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;;MAAE,EAAG,mCAAmC,kBAAkB;MACzE;SACP,KACA;;GAEL,KAAW,CAAC,EAAQ,SACnB,kBAAC,GAAD,EAAe,CAAA,GACb,IACF,kBAAC,GAAD;IACE,OAAO,EAAG,sCAAsC,wBAAwB;IACjE;IACP,CAAA,GACA,EAAS,WAAW,IACtB,kBAAC,GAAD;IACE,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;IACzB,OACE,IACI,EAAG,0CAA0C,sBAAsB,GACnE,EAAG,2CAA2C,iBAAiB;IAErE,aACE,IACI,EAAG,yCAAyC,+BAA+B,GAC3E,EACE,0CACA,8FACD;IAEP,QACE,CAAC,KAAU,CAAC,IACV,kBAAC,GAAD;KAAQ,eAAe,EAAY,GAAK;eACrC,EAAG,mCAAmC,kBAAkB;KAClD,CAAA,GACP,KAAA;IAEN,CAAA,GAEF,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAS,KAAK,MACb,kBAAC,GAAD;KAEU;KACR,cAAc;AAMZ,MALA,EAAK,4BAA4B;OAC/B;OACA,UAAU,EAAO;OACjB,YAAY;OACb,CAAC,EACF,EAAS,sCAAsC,EAAO,KAAK;;KAE7D,EAVK,EAAO,GAUZ,CACF;IACE,CAAA;GAER,kBAAC,GAAD;IAAmB;IAAkB;IAAS,SAAS;IAAQ,CAAA;GACpD"}
|
|
1
|
+
{"version":3,"file":"MentorshipMentorsPagePage.js","names":[],"sources":["../../../src/technospam/pages/MentorshipMentorsPagePage.tsx"],"sourcesContent":["import { createElement, useMemo, useState } from 'react';\nimport { Award, MessageSquare, Search, Sparkles, Star, UserPlus, Users, X } from 'lucide-react';\nimport { Badge, Button, GlassCard, Input, Textarea } from '@burdenoff/fe-libs/ui';\nimport {\n EmptyView,\n ErrorView,\n LoadMore,\n LoadingGrid,\n PageLayout,\n StatCard,\n coverGradient,\n topicIcon,\n} from '../components';\nimport { useTechnoSpam, useTechnoSpamNavigate } from '../providers/TechnoSpamProvider';\nimport {\n pageArg,\n useBecomeMentor,\n useMentorsQuery,\n usePageLimit,\n type TecMentor,\n} from '../api/technospamApi';\nimport { formatMoneyFromMinorUnits } from '../utils/format';\nimport { cn } from '../utils/cn';\nimport { notify } from '../lib/toast';\nimport { useTechnoSpamAnalytics } from '../hooks/useTechnoSpamAnalytics';\nimport { useTr } from '../hooks/useTr';\n\n/** Circular gradient medallion standing in for a mentor avatar, with a live\n * \"accepting\" presence dot — mirrors the directory mockup within the dark theme. */\nfunction MentorMedallion({ mentor, size = 'md' }: { mentor: TecMentor; size?: 'md' | 'lg' }) {\n const box = size === 'lg' ? 'h-20 w-20' : 'h-16 w-16';\n return (\n <div className=\"relative shrink-0\">\n <span\n className={cn(\n 'flex items-center justify-center rounded-full bg-gradient-to-br text-action-primary-text shadow-md ring-1 ring-action-primary-text/15',\n box,\n coverGradient(mentor.headline)\n )}\n >\n {createElement(topicIcon(mentor.expertise.join(' ') || mentor.headline), {\n size: size === 'lg' ? 32 : 26,\n strokeWidth: 1.7,\n })}\n </span>\n {mentor.isAcceptingMentees ? (\n <span className=\"absolute -bottom-0.5 -right-0.5 h-4 w-4 rounded-full border-2 border-bg-surface bg-status-success-text\" />\n ) : null}\n </div>\n );\n}\n\nfunction MentorCard({ mentor, onOpen }: { mentor: TecMentor; onOpen: () => void }) {\n const tr = useTr();\n return (\n <GlassCard\n data-testid=\"mentor-card\"\n className=\"group flex cursor-pointer flex-col gap-3 p-4 transition-all duration-200 hover:-translate-y-1 hover:shadow-lg sm:gap-4 sm:p-5\"\n onClick={onOpen}\n >\n <div className=\"flex items-start gap-4\">\n <MentorMedallion mentor={mentor} />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold text-text-primary group-hover:text-accent-primary\">\n {mentor.headline}\n </h3>\n {mentor.role ? (\n <p className=\"mt-0.5 truncate text-xs font-medium text-text-secondary\">{mentor.role}</p>\n ) : null}\n {mentor.isAcceptingMentees ? (\n <Badge\n variant=\"outline\"\n className=\"mt-1.5 inline-flex items-center gap-1.5 border-status-success-border bg-status-success-bg-subtle text-status-success-text\"\n >\n <span className=\"h-1.5 w-1.5 rounded-full bg-status-success-text\" />{' '}\n {tr('technospam.common.acceptingMentees', 'Accepting mentees')}\n </Badge>\n ) : (\n <Badge\n variant=\"outline\"\n className=\"mt-1.5 border-border-seam bg-bg-sunken text-text-secondary\"\n >\n {tr('technospam.common.notAcceptingMentees', 'Not accepting')}\n </Badge>\n )}\n </div>\n </div>\n\n {mentor.bio ? <p className=\"line-clamp-2 text-sm text-text-secondary\">{mentor.bio}</p> : null}\n\n {mentor.expertise.length ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {mentor.expertise.slice(0, 4).map((skill) => (\n <Badge key={skill} variant=\"secondary\" className=\"text-[11px]\">\n {skill}\n </Badge>\n ))}\n {mentor.expertise.length > 4 ? (\n <span className=\"self-center text-xs text-text-muted\">\n +{mentor.expertise.length - 4}\n </span>\n ) : null}\n </div>\n ) : null}\n\n <div className=\"mt-auto grid grid-cols-3 divide-x divide-border-seam rounded-xl border border-border-seam bg-bg-sunken text-center\">\n <div className=\"px-2 py-2.5\">\n <div className=\"flex items-center justify-center gap-1 text-sm font-semibold text-text-primary\">\n <Star size={13} className=\"text-accent-teal\" />\n {mentor.ratingAvg > 0 ? mentor.ratingAvg.toFixed(1) : 'New'}\n </div>\n <div className=\"text-[11px] text-text-muted\">\n {tr('technospam.common.rating', 'rating')}\n </div>\n </div>\n <div className=\"px-2 py-2.5\">\n <div className=\"text-sm font-semibold text-text-primary\">{mentor.sessionsCount}</div>\n <div className=\"text-[11px] text-text-muted\">\n {tr('technospam.common.sessions', 'sessions')}\n </div>\n </div>\n <div className=\"px-2 py-2.5\">\n <div className=\"text-sm font-semibold text-text-primary\">\n {formatMoneyFromMinorUnits(mentor.hourlyRate, mentor.currency)}\n </div>\n <div className=\"text-[11px] text-text-muted\">\n {tr('technospam.common.perHour', '/ hr')}\n </div>\n </div>\n </div>\n\n <Button\n className=\"w-full\"\n onClick={(e) => {\n e.stopPropagation();\n onOpen();\n }}\n >\n {tr('technospam.common.viewProfile', 'View profile')}\n </Button>\n </GlassCard>\n );\n}\n\nfunction BecomeMentorForm({\n onClose,\n onDone,\n workspaceId,\n}: {\n onClose: () => void;\n onDone: () => void;\n workspaceId?: string;\n}) {\n const [headline, setHeadline] = useState('');\n const [role, setRole] = useState('');\n const [bio, setBio] = useState('');\n const [expertise, setExpertise] = useState('');\n const [hourlyRate, setHourlyRate] = useState('');\n const [currency, setCurrency] = useState('USD');\n const [becomeMentor, { loading }] = useBecomeMentor();\n const { emit } = useTechnoSpamAnalytics();\n\n const canSubmit = headline.trim().length > 0 && !loading;\n\n const handleSubmit = async () => {\n if (!canSubmit) return;\n const input: {\n headline: string;\n role?: string;\n bio?: string;\n expertise?: string[];\n hourlyRate?: number;\n currency?: string;\n } = { headline: headline.trim() };\n if (role.trim()) input.role = role.trim();\n if (bio.trim()) input.bio = bio.trim();\n const exp = expertise\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean);\n if (exp.length) input.expertise = exp;\n // The form collects a dollars-and-cents rate (e.g. \"50\" or \"49.99\") but\n // TecMentor.hourlyRate is stored in the smallest currency unit (cents)\n // so BOFF-4433's fee math never loses precision to floating point --\n // convert here rather than storing the raw dollar figure as if it were\n // cents (which would under-charge/under-pay by 100x).\n const rateDollars = Number.parseFloat(hourlyRate);\n if (!Number.isNaN(rateDollars) && rateDollars >= 0) {\n input.hourlyRate = Math.round(rateDollars * 100);\n }\n if (currency.trim()) input.currency = currency.trim().toUpperCase();\n\n emit('technospam.mentor.become_mentor_clicked', { workspaceId });\n const res = await becomeMentor({ variables: { input } });\n if (res.data?.tecBecomeMentor) {\n emit('technospam.mentor.became_mentor', {\n workspaceId,\n entityId: res.data.tecBecomeMentor.id,\n entityType: 'TEC_MENTOR',\n });\n notify.success('Mentor profile created', 'Your profile is pending review.');\n onDone();\n }\n };\n\n return (\n <GlassCard className=\"mb-6 p-5\">\n <div className=\"mb-4 flex items-start justify-between gap-3\">\n <div className=\"flex items-center gap-3\">\n <span className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-accent-primary to-accent-indigo text-action-primary-text shadow-sm\">\n <UserPlus size={20} />\n </span>\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">Become a mentor</h2>\n <p className=\"text-sm text-text-secondary\">\n Share your expertise and start mentoring builders in the community.\n </p>\n </div>\n </div>\n <Button variant=\"ghost\" size=\"sm\" onClick={onClose} aria-label=\"Close\">\n <X size={16} />\n </Button>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4\">\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Headline <span className=\"text-status-error-text\">*</span>\n </label>\n <Input\n placeholder=\"e.g. Staff Engineer · Distributed systems & career growth\"\n value={headline}\n onChange={(e) => setHeadline(e.target.value)}\n />\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Role & company\n </label>\n <Input\n placeholder=\"e.g. Staff Engineer @ Acme\"\n value={role}\n onChange={(e) => setRole(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">\n Shown as a subtitle under your headline. Optional.\n </p>\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Bio</label>\n <Textarea\n rows={3}\n placeholder=\"Tell mentees about your experience and how you can help.\"\n value={bio}\n onChange={(e) => setBio(e.target.value)}\n />\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Expertise</label>\n <Input\n placeholder=\"React, System design, Career coaching\"\n value={expertise}\n onChange={(e) => setExpertise(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">Comma-separated topics.</p>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Hourly rate\n </label>\n <Input\n type=\"number\"\n min={0}\n step={0.01}\n placeholder=\"0.00\"\n value={hourlyRate}\n onChange={(e) => setHourlyRate(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">\n Dollars per hour (e.g. 50 or 49.99). Leave 0 for free.\n </p>\n </div>\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Currency</label>\n <Input\n placeholder=\"USD\"\n value={currency}\n onChange={(e) => setCurrency(e.target.value)}\n />\n </div>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button onClick={handleSubmit} disabled={!canSubmit}>\n <UserPlus size={16} /> {loading ? 'Submitting…' : 'Submit profile'}\n </Button>\n <Button variant=\"outline\" onClick={onClose} disabled={loading}>\n Cancel\n </Button>\n </div>\n </div>\n </GlassCard>\n );\n}\n\nexport function MentorshipMentorsPagePage() {\n const navigate = useTechnoSpamNavigate();\n const { currentUser, workspaceId } = useTechnoSpam();\n const { emit } = useTechnoSpamAnalytics();\n const tr = useTr();\n const [search, setSearch] = useState('');\n const [showForm, setShowForm] = useState(false);\n\n const { limit, more } = usePageLimit();\n const { data, loading, error, refetch } = useMentorsQuery({\n status: 'ACTIVE',\n pagination: pageArg(limit),\n });\n\n const mentors = data?.tecListMentors?.items ?? [];\n const hasMore = data?.tecListMentors?.pageInfo?.hasMore ?? false;\n const userId = currentUser?.id;\n const alreadyMentor = Boolean(userId && mentors.some((m) => m.userId === userId));\n\n const filtered = useMemo(() => {\n const q = search.trim().toLowerCase();\n if (!q) return mentors;\n return mentors.filter(\n (m) =>\n m.headline.toLowerCase().includes(q) ||\n m.expertise.some((skill) => skill.toLowerCase().includes(q))\n );\n }, [mentors, search]);\n\n const accepting = mentors.filter((m) => m.isAcceptingMentees).length;\n const totalSessions = mentors.reduce((s, m) => s + m.sessionsCount, 0);\n const rated = mentors.filter((m) => m.ratingAvg > 0);\n const avgRating = rated.length\n ? (rated.reduce((s, m) => s + m.ratingAvg, 0) / rated.length).toFixed(1)\n : '—';\n\n return (\n <PageLayout\n hero\n mobileSection\n title={tr('technospam.mentorship.findAMentorTitle', 'Find a Mentor')}\n description={tr(\n 'technospam.mentorship.description',\n 'Connect with experienced builders for 1:1 guidance, code review, and career coaching.'\n )}\n actions={\n <Button variant=\"outline\" onClick={() => navigate('/mentorship/sessions-page')}>\n <MessageSquare size={16} /> {tr('technospam.common.mySessions', 'My sessions')}\n </Button>\n }\n >\n {alreadyMentor ? (\n <GlassCard className=\"mb-6 flex items-center gap-3 p-4\">\n <span className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-status-success-bg-subtle text-status-success-text\">\n <Award size={20} />\n </span>\n <div>\n <div className=\"text-sm font-semibold text-text-primary\">You're a mentor</div>\n <div className=\"text-xs text-text-secondary\">\n Your mentor profile is live. Mentees can request sessions with you.\n </div>\n </div>\n </GlassCard>\n ) : showForm ? (\n <BecomeMentorForm\n onClose={() => setShowForm(false)}\n onDone={() => {\n setShowForm(false);\n void refetch();\n }}\n workspaceId={workspaceId}\n />\n ) : null}\n\n {/* Directory stats are a desktop summary; phones go straight to the cards. */}\n <div className=\"mb-5 hidden grid-cols-2 gap-3 sm:grid sm:grid-cols-4\">\n <StatCard\n label={tr('technospam.mentorship.statMentors', 'Mentors')}\n value={mentors.length}\n icon={Users}\n tone=\"blue\"\n />\n <StatCard\n label={tr('technospam.mentorship.statAcceptingMentees', 'Accepting mentees')}\n value={accepting}\n icon={Sparkles}\n tone=\"green\"\n />\n <StatCard\n label={tr('technospam.mentorship.statAvgRating', 'Avg rating')}\n value={avgRating}\n icon={Star}\n tone=\"amber\"\n />\n <StatCard\n label={tr('technospam.mentorship.statTotalSessions', 'Total sessions')}\n value={totalSessions}\n icon={MessageSquare}\n tone=\"purple\"\n />\n </div>\n\n <div className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"relative w-full sm:w-80\">\n <Search\n className=\"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-text-muted\"\n size={16}\n />\n <Input\n className=\"pl-9\"\n aria-label={tr('technospam.mentorship.searchLabel', 'Search mentors')}\n placeholder={tr(\n 'technospam.mentorship.searchPlaceholder',\n 'Search by headline or expertise…'\n )}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n {!alreadyMentor && !showForm ? (\n <Button className=\"min-h-11 sm:min-h-0\" onClick={() => setShowForm(true)}>\n <UserPlus size={16} /> {tr('technospam.common.becomeAMentor', 'Become a mentor')}\n </Button>\n ) : null}\n </div>\n\n {loading && !mentors.length ? (\n <LoadingGrid />\n ) : error ? (\n <ErrorView\n title={tr('technospam.common.errorLoadMentors', \"Couldn't load mentors\")}\n error={error}\n />\n ) : filtered.length === 0 ? (\n <EmptyView\n icon={<Users size={26} />}\n title={\n search\n ? tr('technospam.mentorship.emptySearchTitle', 'No matching mentors')\n : tr('technospam.mentorship.emptyDefaultTitle', 'No mentors yet')\n }\n description={\n search\n ? tr('technospam.mentorship.emptySearchDesc', 'Try a different search term.')\n : tr(\n 'technospam.mentorship.emptyDefaultDesc',\n 'Active mentors will appear here. TechnoSpam is pre-launch — be one of the first to sign up.'\n )\n }\n action={\n !search && !alreadyMentor ? (\n <Button onClick={() => setShowForm(true)}>\n {tr('technospam.common.becomeAMentor', 'Become a mentor')}\n </Button>\n ) : undefined\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {filtered.map((mentor) => (\n <MentorCard\n key={mentor.id}\n mentor={mentor}\n onOpen={() => {\n emit('technospam.mentor.viewed', {\n workspaceId,\n entityId: mentor.id,\n entityType: 'TEC_MENTOR',\n });\n navigate(`/mentorship/mentor-profile-page?id=${mentor.id}`);\n }}\n />\n ))}\n </div>\n )}\n <LoadMore hasMore={hasMore} loading={loading} onClick={more} />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,SAAS,EAAgB,EAAE,WAAQ,UAAO,QAAmD;AAE3F,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,Q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,UAAU,EAAO;OACjB,YAAY;OACb,CAAC,EACF,EAAS,sCAAsC,EAAO,KAAK;;KAE7D,EAVK,EAAO,GAUZ,CACF;IACE,CAAA;GAER,kBAAC,GAAD;IAAmB;IAAkB;IAAS,SAAS;IAAQ,CAAA;GACpD"}
|
|
@@ -34,7 +34,7 @@ function V({ session: e, showMentor: t, isMentor: n, onCancel: r, onConfirm: a,
|
|
|
34
34
|
children: [/* @__PURE__ */ N("div", {
|
|
35
35
|
className: "flex items-start gap-3",
|
|
36
36
|
children: [/* @__PURE__ */ M("span", {
|
|
37
|
-
className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent-primary to-accent-purple text-
|
|
37
|
+
className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent-primary to-accent-purple text-action-primary-text shadow-sm",
|
|
38
38
|
children: /* @__PURE__ */ M(A, { size: 18 })
|
|
39
39
|
}), /* @__PURE__ */ N("div", {
|
|
40
40
|
className: "min-w-0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorshipSessionsPagePage.js","names":[],"sources":["../../../src/technospam/pages/MentorshipSessionsPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n CalendarClock,\n Check,\n CheckCircle2,\n Clock,\n MessageSquare,\n Users,\n Video,\n X,\n} from 'lucide-react';\nimport {\n Button,\n GlassCard,\n Input,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { TAB_PANEL_FOCUS_CLASS } from '../lib/a11y';\nimport {\n EmptyView,\n ErrorView,\n LoadingRows,\n PageLayout,\n StatCard,\n StatusBadge,\n} from '../components';\nimport { useTechnoSpam, useTechnoSpamNavigate } from '../providers/TechnoSpamProvider';\nimport {\n useCancelSession,\n useCompleteSession,\n useConfirmSession,\n useMentorsQuery,\n useSessionsQuery,\n type TecMentorSession,\n} from '../api/technospamApi';\nimport { formatDateTime, formatDuration } from '../utils/format';\nimport { notify } from '../lib/toast';\nimport { useTechnoSpamAnalytics } from '../hooks/useTechnoSpamAnalytics';\nimport {\n FOCUSED_CARD_CLASS,\n focusableCardProps,\n useFocusedRecordParam,\n} from '../hooks/useFocusedRecordParam';\nimport { FOCUS_PARAMS } from '../utils/pageContext';\nimport { cn } from '../utils/cn';\nimport { useTr } from '../hooks/useTr';\n\ntype Perspective = 'mentee' | 'mentor';\n\nconst CANCELLABLE = new Set(['REQUESTED', 'CONFIRMED']);\n\nfunction SessionRow({\n session,\n showMentor,\n isMentor,\n onCancel,\n onConfirm,\n onComplete,\n busy,\n focused,\n onFocusChange,\n}: {\n session: TecMentorSession;\n showMentor: boolean;\n isMentor: boolean;\n onCancel: (id: string) => void;\n onConfirm: (id: string, meetingUrl: string) => Promise<void>;\n onComplete: (id: string, rating: number, feedback: string) => Promise<void>;\n busy: boolean;\n /** True when this is the session the page (and the assistant) is focused on. */\n focused: boolean;\n onFocusChange: (id: string | null) => void;\n}) {\n // Acting on a session focuses it, so \"cancel this session\" names this one.\n const focus = () => onFocusChange(session.id);\n const toggleFocus = () => onFocusChange(focused ? null : session.id);\n const canCancel = CANCELLABLE.has(session.status);\n const [mode, setMode] = useState<'none' | 'confirm' | 'complete'>('none');\n const [meetingUrl, setMeetingUrl] = useState('');\n const [rating, setRating] = useState('5');\n const [feedback, setFeedback] = useState('');\n\n const submitConfirm = async () => {\n await onConfirm(session.id, meetingUrl.trim());\n setMode('none');\n setMeetingUrl('');\n };\n const submitComplete = async () => {\n await onComplete(session.id, Math.min(5, Math.max(1, Number(rating) || 5)), feedback.trim());\n setMode('none');\n };\n\n return (\n <GlassCard\n className={cn(\n 'flex cursor-pointer flex-col gap-3 p-4 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md',\n focused && FOCUSED_CARD_CLASS\n )}\n {...focusableCardProps(focused, toggleFocus)}\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-start gap-3\">\n <span className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent-primary to-accent-purple text-white shadow-sm\">\n <Video size={18} />\n </span>\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n aria-pressed={focused}\n onClick={toggleFocus}\n className=\"truncate text-left text-sm font-semibold text-text-primary hover:text-accent-primary\"\n >\n {session.topic}\n </button>\n <StatusBadge status={session.status} />\n {session.rating ? (\n <span className=\"text-xs text-text-muted\">★ {session.rating}/5</span>\n ) : null}\n </div>\n {showMentor && session.mentor?.headline ? (\n <div className=\"mt-0.5 truncate text-xs text-text-secondary\">\n with {session.mentor.headline}\n </div>\n ) : null}\n <div className=\"mt-1 flex flex-wrap items-center gap-3 text-xs text-text-muted\">\n <span className=\"inline-flex items-center gap-1\">\n <CalendarClock size={13} /> {formatDateTime(session.scheduledAt)}\n </span>\n <span className=\"inline-flex items-center gap-1\">\n <Clock size={13} /> {formatDuration(session.durationMinutes)}\n </span>\n </div>\n {session.agenda ? (\n <p className=\"mt-1 line-clamp-2 text-xs text-text-secondary\">{session.agenda}</p>\n ) : null}\n </div>\n </div>\n <div className=\"flex shrink-0 flex-wrap items-center gap-2\">\n {session.meetingUrl ? (\n <Button\n size=\"sm\"\n onClick={() => window.open(session.meetingUrl ?? '', '_blank', 'noopener,noreferrer')}\n >\n <Video size={15} /> Join\n </Button>\n ) : null}\n {isMentor && session.status === 'REQUESTED' ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n focus();\n setMode(mode === 'confirm' ? 'none' : 'confirm');\n }}\n >\n <Check size={15} /> Confirm\n </Button>\n ) : null}\n {isMentor && session.status === 'CONFIRMED' ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n focus();\n setMode(mode === 'complete' ? 'none' : 'complete');\n }}\n >\n <CheckCircle2 size={15} /> Mark complete\n </Button>\n ) : null}\n {canCancel ? (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => {\n focus();\n onCancel(session.id);\n }}\n disabled={busy}\n >\n <X size={15} /> Cancel\n </Button>\n ) : null}\n </div>\n </div>\n\n {mode === 'confirm' ? (\n <div className=\"flex flex-col gap-2 rounded-lg border border-border-seam bg-bg-sunken p-3 sm:flex-row sm:items-center\">\n <Input\n className=\"flex-1\"\n placeholder=\"Meeting link (e.g. https://meet.…)\"\n value={meetingUrl}\n onChange={(e) => setMeetingUrl(e.target.value)}\n />\n <Button size=\"sm\" onClick={submitConfirm} disabled={busy}>\n Confirm session\n </Button>\n </div>\n ) : null}\n {mode === 'complete' ? (\n <div className=\"flex flex-col gap-2 rounded-lg border border-border-seam bg-bg-sunken p-3\">\n <div className=\"flex items-center gap-2\">\n <label className=\"text-xs text-text-secondary\">Rating (1–5)</label>\n <Input\n type=\"number\"\n min={1}\n max={5}\n className=\"w-20\"\n value={rating}\n onChange={(e) => setRating(e.target.value)}\n />\n </div>\n <Input\n placeholder=\"Feedback for the mentee (optional)\"\n value={feedback}\n onChange={(e) => setFeedback(e.target.value)}\n />\n <div>\n <Button size=\"sm\" onClick={submitComplete} disabled={busy}>\n Complete session\n </Button>\n </div>\n </div>\n ) : null}\n </GlassCard>\n );\n}\n\nfunction SessionsList({\n loading,\n error,\n sessions,\n showMentor,\n emptyTitle,\n emptyDescription,\n emptyAction,\n isMentor,\n onCancel,\n onConfirm,\n onComplete,\n busyId,\n focusedId,\n onFocusChange,\n}: {\n loading: boolean;\n error?: { message?: string };\n sessions: TecMentorSession[];\n showMentor: boolean;\n emptyTitle: string;\n emptyDescription: string;\n emptyAction?: React.ReactNode;\n isMentor: boolean;\n onCancel: (id: string) => void;\n onConfirm: (id: string, meetingUrl: string) => Promise<void>;\n onComplete: (id: string, rating: number, feedback: string) => Promise<void>;\n busyId: string | null;\n focusedId: string | null;\n onFocusChange: (id: string | null) => void;\n}) {\n if (loading && sessions.length === 0) return <LoadingRows count={3} height=\"h-24\" />;\n if (error) return <ErrorView title=\"Couldn't load sessions\" error={error} />;\n if (sessions.length === 0) {\n return (\n <EmptyView\n icon={<MessageSquare size={26} />}\n title={emptyTitle}\n description={emptyDescription}\n action={emptyAction}\n />\n );\n }\n const sorted = [...sessions].sort(\n (a, b) => new Date(b.scheduledAt).getTime() - new Date(a.scheduledAt).getTime()\n );\n return (\n <div className=\"space-y-3\">\n {sorted.map((session) => (\n <SessionRow\n key={session.id}\n session={session}\n showMentor={showMentor}\n isMentor={isMentor}\n onCancel={onCancel}\n onConfirm={onConfirm}\n onComplete={onComplete}\n busy={busyId === session.id}\n focused={focusedId === session.id}\n onFocusChange={onFocusChange}\n />\n ))}\n </div>\n );\n}\n\nexport function MentorshipSessionsPagePage() {\n const navigate = useTechnoSpamNavigate();\n const { currentUser, workspaceId } = useTechnoSpam();\n const { emit } = useTechnoSpamAnalytics();\n const tr = useTr();\n const [tab, setTab] = useState<Perspective>('mentee');\n const [cancellingId, setCancellingId] = useState<string | null>(null);\n // The focused session lives in `?sessionId=` so the assistant's page context\n // names it (\"cancel this session\") and a reload keeps it focused.\n const [focusedSessionId, setFocusedSessionId] = useFocusedRecordParam(FOCUS_PARAMS.session);\n\n const menteeId = currentUser?.id;\n\n // As mentee: sessions the current user booked.\n const menteeQ = useSessionsQuery(menteeId ? { menteeId } : {});\n\n // Resolve whether the current user is a mentor, to load their mentor sessions.\n const mentorsQ = useMentorsQuery({});\n const myMentor = mentorsQ.data?.tecListMentors?.items.find((m) => m.userId === currentUser?.id);\n const mentorId = myMentor?.id;\n const mentorQ = useSessionsQuery(mentorId ? { mentorId } : {});\n\n const [cancelSession] = useCancelSession();\n const [confirmSession] = useConfirmSession();\n const [completeSession] = useCompleteSession();\n\n const menteeSessions = menteeId ? (menteeQ.data?.tecListSessions?.items ?? []) : [];\n const mentorSessions = mentorId ? (mentorQ.data?.tecListSessions?.items ?? []) : [];\n const allSessions = [...menteeSessions, ...mentorSessions];\n const upcomingCount = allSessions.filter(\n (s) => s.status === 'REQUESTED' || s.status === 'CONFIRMED'\n ).length;\n const completedCount = allSessions.filter((s) => s.status === 'COMPLETED').length;\n\n const handleCancel = async (id: string) => {\n setCancellingId(id);\n emit('technospam.session.cancel_clicked', {\n workspaceId,\n entityId: id,\n entityType: 'TEC_MENTOR_SESSION',\n });\n try {\n const res = await cancelSession({ variables: { id } });\n if (res.data?.tecCancelSession) {\n emit('technospam.session.cancelled', {\n workspaceId,\n entityId: id,\n entityType: 'TEC_MENTOR_SESSION',\n });\n notify.success('Session cancelled', 'The session has been cancelled.');\n }\n } finally {\n setCancellingId(null);\n }\n };\n\n const handleConfirm = async (id: string, meetingUrl: string) => {\n setCancellingId(id);\n try {\n const res = await confirmSession({\n variables: { id, meetingUrl: meetingUrl || undefined },\n });\n if (res.data?.tecConfirmSession) {\n notify.success('Session confirmed', 'The mentee has been notified.');\n await mentorQ.refetch();\n }\n } finally {\n setCancellingId(null);\n }\n };\n\n const handleComplete = async (id: string, rating: number, feedback: string) => {\n setCancellingId(id);\n emit('technospam.session.complete_clicked', {\n workspaceId,\n entityId: id,\n entityType: 'TEC_MENTOR_SESSION',\n });\n try {\n const res = await completeSession({\n variables: { id, rating, feedback: feedback || undefined },\n });\n if (res.data?.tecCompleteSession) {\n emit('technospam.session.completed', {\n workspaceId,\n entityId: id,\n entityType: 'TEC_MENTOR_SESSION',\n });\n notify.success('Session completed', 'Nice work — the session is wrapped up.');\n await mentorQ.refetch();\n }\n } finally {\n setCancellingId(null);\n }\n };\n\n if (!currentUser?.id) {\n return (\n <PageLayout\n hero\n title={tr('technospam.mentorship.sessionsTitle', 'My Sessions')}\n description={tr(\n 'technospam.mentorship.sessionsDescription',\n 'Track your mentorship sessions.'\n )}\n >\n <EmptyView\n icon={<MessageSquare size={26} />}\n title={tr('technospam.mentorship.signInTitle', 'Sign in to view your sessions')}\n description={tr(\n 'technospam.mentorship.signInDesc',\n \"Your booked and hosted mentorship sessions will appear here once you're signed in.\"\n )}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n hero\n title={tr('technospam.mentorship.sessionsTitle', 'My Sessions')}\n description={tr(\n 'technospam.mentorship.sessionsDescription',\n \"Manage the mentorship sessions you've booked and the ones you host.\"\n )}\n actions={\n <Button variant=\"outline\" onClick={() => navigate('/mentorship/mentors-page')}>\n <Users size={16} /> {tr('technospam.common.findMentor', 'Find a mentor')}\n </Button>\n }\n >\n <div className=\"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <StatCard\n label={tr('technospam.mentorship.statAsMentee', 'As mentee')}\n value={menteeSessions.length}\n icon={MessageSquare}\n tone=\"blue\"\n />\n <StatCard\n label={tr('technospam.mentorship.statAsMentor', 'As mentor')}\n value={mentorId ? mentorSessions.length : 0}\n icon={Users}\n tone=\"purple\"\n />\n <StatCard\n label={tr('technospam.mentorship.statUpcoming', 'Upcoming')}\n value={upcomingCount}\n icon={CalendarClock}\n tone=\"teal\"\n />\n <StatCard\n label={tr('technospam.mentorship.statCompleted', 'Completed')}\n value={completedCount}\n icon={CheckCircle2}\n tone=\"green\"\n />\n </div>\n\n {/* The tabs filter one list, so that list is their tab panel: Radix points every\n trigger's aria-controls at a panel id, and without a TabsContent the id\n resolved to nothing (axe aria-valid-attr-value, critical; BOFF-3157). */}\n <Tabs value={tab} onValueChange={(v) => setTab(v as Perspective)} className=\"gap-4\">\n <TabsList>\n <TabsTrigger value=\"mentee\">\n {tr('technospam.mentorship.tabAsMentee', 'As mentee')}\n </TabsTrigger>\n <TabsTrigger value=\"mentor\">\n {tr('technospam.mentorship.tabAsMentor', 'As mentor')}\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value={tab} className={TAB_PANEL_FOCUS_CLASS}>\n {tab === 'mentee' ? (\n <SessionsList\n loading={menteeQ.loading}\n error={menteeQ.error}\n sessions={menteeSessions}\n showMentor\n emptyTitle={tr(\n 'technospam.mentorship.noSessionsBookedTitle',\n 'No sessions booked yet'\n )}\n emptyDescription={tr(\n 'technospam.mentorship.noSessionsBookedDesc',\n 'Find a mentor and request a session to get personalized guidance.'\n )}\n emptyAction={\n <Button onClick={() => navigate('/mentorship/mentors-page')}>\n {tr('technospam.common.findMentor', 'Find a mentor')}\n </Button>\n }\n isMentor={false}\n onCancel={handleCancel}\n onConfirm={handleConfirm}\n onComplete={handleComplete}\n busyId={cancellingId}\n focusedId={focusedSessionId}\n onFocusChange={setFocusedSessionId}\n />\n ) : mentorsQ.loading && !myMentor ? (\n <LoadingRows count={3} height=\"h-24\" />\n ) : !mentorId ? (\n <EmptyView\n icon={<Users size={26} />}\n title={tr('technospam.mentorship.notAMentorTitle', \"You're not a mentor yet\")}\n description={tr(\n 'technospam.mentorship.notAMentorDesc',\n 'Create a mentor profile to start hosting sessions and helping others build.'\n )}\n action={\n <Button onClick={() => navigate('/mentorship/mentors-page')}>\n {tr('technospam.common.becomeAMentor', 'Become a mentor')}\n </Button>\n }\n />\n ) : (\n <SessionsList\n loading={mentorQ.loading}\n error={mentorQ.error}\n sessions={mentorSessions}\n showMentor={false}\n emptyTitle={tr(\n 'technospam.mentorship.noSessionsToHostTitle',\n 'No sessions to host yet'\n )}\n emptyDescription={tr(\n 'technospam.mentorship.noSessionsToHostDesc',\n 'When mentees request time with you, their sessions will show up here.'\n )}\n isMentor\n onCancel={handleCancel}\n onConfirm={handleConfirm}\n onComplete={handleComplete}\n busyId={cancellingId}\n focusedId={focusedSessionId}\n onFocusChange={setFocusedSessionId}\n />\n )}\n </TabsContent>\n </Tabs>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoDA,IAAM,IAAc,IAAI,IAAI,CAAC,aAAa,YAAY,CAAC;AAEvD,SAAS,EAAW,EAClB,YACA,eACA,aACA,aACA,cACA,eACA,SACA,YACA,oBAYC;CAED,IAAM,UAAc,EAAc,EAAQ,GAAG,EACvC,UAAoB,EAAc,IAAU,OAAO,EAAQ,GAAG,EAC9D,IAAY,EAAY,IAAI,EAAQ,OAAO,EAC3C,CAAC,GAAM,KAAW,EAA0C,OAAO,EACnE,CAAC,G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AwBQ,CAAA,CACT;KACI;MA/IX,kBAAC,GAAD;EACE,MAAA;EACA,OAAO,EAAG,uCAAuC,cAAc;EAC/D,aAAa,EACX,6CACA,kCACD;YAED,kBAAC,GAAD;GACE,MAAM,kBAAC,GAAD,EAAe,MAAM,IAAM,CAAA;GACjC,OAAO,EAAG,qCAAqC,gCAAgC;GAC/E,aAAa,EACX,oCACA,qFACD;GACD,CAAA;EACS,CAAA"}
|
|
1
|
+
{"version":3,"file":"MentorshipSessionsPagePage.js","names":[],"sources":["../../../src/technospam/pages/MentorshipSessionsPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n CalendarClock,\n Check,\n CheckCircle2,\n Clock,\n MessageSquare,\n Users,\n Video,\n X,\n} from 'lucide-react';\nimport {\n Button,\n GlassCard,\n Input,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n} from '@burdenoff/fe-libs/ui';\nimport { TAB_PANEL_FOCUS_CLASS } from '../lib/a11y';\nimport {\n EmptyView,\n ErrorView,\n LoadingRows,\n PageLayout,\n StatCard,\n StatusBadge,\n} from '../components';\nimport { useTechnoSpam, useTechnoSpamNavigate } from '../providers/TechnoSpamProvider';\nimport {\n useCancelSession,\n useCompleteSession,\n useConfirmSession,\n useMentorsQuery,\n useSessionsQuery,\n type TecMentorSession,\n} from '../api/technospamApi';\nimport { formatDateTime, formatDuration } from '../utils/format';\nimport { notify } from '../lib/toast';\nimport { useTechnoSpamAnalytics } from '../hooks/useTechnoSpamAnalytics';\nimport {\n FOCUSED_CARD_CLASS,\n focusableCardProps,\n useFocusedRecordParam,\n} from '../hooks/useFocusedRecordParam';\nimport { FOCUS_PARAMS } from '../utils/pageContext';\nimport { cn } from '../utils/cn';\nimport { useTr } from '../hooks/useTr';\n\ntype Perspective = 'mentee' | 'mentor';\n\nconst CANCELLABLE = new Set(['REQUESTED', 'CONFIRMED']);\n\nfunction SessionRow({\n session,\n showMentor,\n isMentor,\n onCancel,\n onConfirm,\n onComplete,\n busy,\n focused,\n onFocusChange,\n}: {\n session: TecMentorSession;\n showMentor: boolean;\n isMentor: boolean;\n onCancel: (id: string) => void;\n onConfirm: (id: string, meetingUrl: string) => Promise<void>;\n onComplete: (id: string, rating: number, feedback: string) => Promise<void>;\n busy: boolean;\n /** True when this is the session the page (and the assistant) is focused on. */\n focused: boolean;\n onFocusChange: (id: string | null) => void;\n}) {\n // Acting on a session focuses it, so \"cancel this session\" names this one.\n const focus = () => onFocusChange(session.id);\n const toggleFocus = () => onFocusChange(focused ? null : session.id);\n const canCancel = CANCELLABLE.has(session.status);\n const [mode, setMode] = useState<'none' | 'confirm' | 'complete'>('none');\n const [meetingUrl, setMeetingUrl] = useState('');\n const [rating, setRating] = useState('5');\n const [feedback, setFeedback] = useState('');\n\n const submitConfirm = async () => {\n await onConfirm(session.id, meetingUrl.trim());\n setMode('none');\n setMeetingUrl('');\n };\n const submitComplete = async () => {\n await onComplete(session.id, Math.min(5, Math.max(1, Number(rating) || 5)), feedback.trim());\n setMode('none');\n };\n\n return (\n <GlassCard\n className={cn(\n 'flex cursor-pointer flex-col gap-3 p-4 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md',\n focused && FOCUSED_CARD_CLASS\n )}\n {...focusableCardProps(focused, toggleFocus)}\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-start gap-3\">\n <span className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent-primary to-accent-purple text-action-primary-text shadow-sm\">\n <Video size={18} />\n </span>\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <button\n type=\"button\"\n aria-pressed={focused}\n onClick={toggleFocus}\n className=\"truncate text-left text-sm font-semibold text-text-primary hover:text-accent-primary\"\n >\n {session.topic}\n </button>\n <StatusBadge status={session.status} />\n {session.rating ? (\n <span className=\"text-xs text-text-muted\">★ {session.rating}/5</span>\n ) : null}\n </div>\n {showMentor && session.mentor?.headline ? (\n <div className=\"mt-0.5 truncate text-xs text-text-secondary\">\n with {session.mentor.headline}\n </div>\n ) : null}\n <div className=\"mt-1 flex flex-wrap items-center gap-3 text-xs text-text-muted\">\n <span className=\"inline-flex items-center gap-1\">\n <CalendarClock size={13} /> {formatDateTime(session.scheduledAt)}\n </span>\n <span className=\"inline-flex items-center gap-1\">\n <Clock size={13} /> {formatDuration(session.durationMinutes)}\n </span>\n </div>\n {session.agenda ? (\n <p className=\"mt-1 line-clamp-2 text-xs text-text-secondary\">{session.agenda}</p>\n ) : null}\n </div>\n </div>\n <div className=\"flex shrink-0 flex-wrap items-center gap-2\">\n {session.meetingUrl ? (\n <Button\n size=\"sm\"\n onClick={() => window.open(session.meetingUrl ?? '', '_blank', 'noopener,noreferrer')}\n >\n <Video size={15} /> Join\n </Button>\n ) : null}\n {isMentor && session.status === 'REQUESTED' ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n focus();\n setMode(mode === 'confirm' ? 'none' : 'confirm');\n }}\n >\n <Check size={15} /> Confirm\n </Button>\n ) : null}\n {isMentor && session.status === 'CONFIRMED' ? (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => {\n focus();\n setMode(mode === 'complete' ? 'none' : 'complete');\n }}\n >\n <CheckCircle2 size={15} /> Mark complete\n </Button>\n ) : null}\n {canCancel ? (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => {\n focus();\n onCancel(session.id);\n }}\n disabled={busy}\n >\n <X size={15} /> Cancel\n </Button>\n ) : null}\n </div>\n </div>\n\n {mode === 'confirm' ? (\n <div className=\"flex flex-col gap-2 rounded-lg border border-border-seam bg-bg-sunken p-3 sm:flex-row sm:items-center\">\n <Input\n className=\"flex-1\"\n placeholder=\"Meeting link (e.g. https://meet.…)\"\n value={meetingUrl}\n onChange={(e) => setMeetingUrl(e.target.value)}\n />\n <Button size=\"sm\" onClick={submitConfirm} disabled={busy}>\n Confirm session\n </Button>\n </div>\n ) : null}\n {mode === 'complete' ? (\n <div className=\"flex flex-col gap-2 rounded-lg border border-border-seam bg-bg-sunken p-3\">\n <div className=\"flex items-center gap-2\">\n <label className=\"text-xs text-text-secondary\">Rating (1–5)</label>\n <Input\n type=\"number\"\n min={1}\n max={5}\n className=\"w-20\"\n value={rating}\n onChange={(e) => setRating(e.target.value)}\n />\n </div>\n <Input\n placeholder=\"Feedback for the mentee (optional)\"\n value={feedback}\n onChange={(e) => setFeedback(e.target.value)}\n />\n <div>\n <Button size=\"sm\" onClick={submitComplete} disabled={busy}>\n Complete session\n </Button>\n </div>\n </div>\n ) : null}\n </GlassCard>\n );\n}\n\nfunction SessionsList({\n loading,\n error,\n sessions,\n showMentor,\n emptyTitle,\n emptyDescription,\n emptyAction,\n isMentor,\n onCancel,\n onConfirm,\n onComplete,\n busyId,\n focusedId,\n onFocusChange,\n}: {\n loading: boolean;\n error?: { message?: string };\n sessions: TecMentorSession[];\n showMentor: boolean;\n emptyTitle: string;\n emptyDescription: string;\n emptyAction?: React.ReactNode;\n isMentor: boolean;\n onCancel: (id: string) => void;\n onConfirm: (id: string, meetingUrl: string) => Promise<void>;\n onComplete: (id: string, rating: number, feedback: string) => Promise<void>;\n busyId: string | null;\n focusedId: string | null;\n onFocusChange: (id: string | null) => void;\n}) {\n if (loading && sessions.length === 0) return <LoadingRows count={3} height=\"h-24\" />;\n if (error) return <ErrorView title=\"Couldn't load sessions\" error={error} />;\n if (sessions.length === 0) {\n return (\n <EmptyView\n icon={<MessageSquare size={26} />}\n title={emptyTitle}\n description={emptyDescription}\n action={emptyAction}\n />\n );\n }\n const sorted = [...sessions].sort(\n (a, b) => new Date(b.scheduledAt).getTime() - new Date(a.scheduledAt).getTime()\n );\n return (\n <div className=\"space-y-3\">\n {sorted.map((session) => (\n <SessionRow\n key={session.id}\n session={session}\n showMentor={showMentor}\n isMentor={isMentor}\n onCancel={onCancel}\n onConfirm={onConfirm}\n onComplete={onComplete}\n busy={busyId === session.id}\n focused={focusedId === session.id}\n onFocusChange={onFocusChange}\n />\n ))}\n </div>\n );\n}\n\nexport function MentorshipSessionsPagePage() {\n const navigate = useTechnoSpamNavigate();\n const { currentUser, workspaceId } = useTechnoSpam();\n const { emit } = useTechnoSpamAnalytics();\n const tr = useTr();\n const [tab, setTab] = useState<Perspective>('mentee');\n const [cancellingId, setCancellingId] = useState<string | null>(null);\n // The focused session lives in `?sessionId=` so the assistant's page context\n // names it (\"cancel this session\") and a reload keeps it focused.\n const [focusedSessionId, setFocusedSessionId] = useFocusedRecordParam(FOCUS_PARAMS.session);\n\n const menteeId = currentUser?.id;\n\n // As mentee: sessions the current user booked.\n const menteeQ = useSessionsQuery(menteeId ? { menteeId } : {});\n\n // Resolve whether the current user is a mentor, to load their mentor sessions.\n const mentorsQ = useMentorsQuery({});\n const myMentor = mentorsQ.data?.tecListMentors?.items.find((m) => m.userId === currentUser?.id);\n const mentorId = myMentor?.id;\n const mentorQ = useSessionsQuery(mentorId ? { mentorId } : {});\n\n const [cancelSession] = useCancelSession();\n const [confirmSession] = useConfirmSession();\n const [completeSession] = useCompleteSession();\n\n const menteeSessions = menteeId ? (menteeQ.data?.tecListSessions?.items ?? []) : [];\n const mentorSessions = mentorId ? (mentorQ.data?.tecListSessions?.items ?? []) : [];\n const allSessions = [...menteeSessions, ...mentorSessions];\n const upcomingCount = allSessions.filter(\n (s) => s.status === 'REQUESTED' || s.status === 'CONFIRMED'\n ).length;\n const completedCount = allSessions.filter((s) => s.status === 'COMPLETED').length;\n\n const handleCancel = async (id: string) => {\n setCancellingId(id);\n emit('technospam.session.cancel_clicked', {\n workspaceId,\n entityId: id,\n entityType: 'TEC_MENTOR_SESSION',\n });\n try {\n const res = await cancelSession({ variables: { id } });\n if (res.data?.tecCancelSession) {\n emit('technospam.session.cancelled', {\n workspaceId,\n entityId: id,\n entityType: 'TEC_MENTOR_SESSION',\n });\n notify.success('Session cancelled', 'The session has been cancelled.');\n }\n } finally {\n setCancellingId(null);\n }\n };\n\n const handleConfirm = async (id: string, meetingUrl: string) => {\n setCancellingId(id);\n try {\n const res = await confirmSession({\n variables: { id, meetingUrl: meetingUrl || undefined },\n });\n if (res.data?.tecConfirmSession) {\n notify.success('Session confirmed', 'The mentee has been notified.');\n await mentorQ.refetch();\n }\n } finally {\n setCancellingId(null);\n }\n };\n\n const handleComplete = async (id: string, rating: number, feedback: string) => {\n setCancellingId(id);\n emit('technospam.session.complete_clicked', {\n workspaceId,\n entityId: id,\n entityType: 'TEC_MENTOR_SESSION',\n });\n try {\n const res = await completeSession({\n variables: { id, rating, feedback: feedback || undefined },\n });\n if (res.data?.tecCompleteSession) {\n emit('technospam.session.completed', {\n workspaceId,\n entityId: id,\n entityType: 'TEC_MENTOR_SESSION',\n });\n notify.success('Session completed', 'Nice work — the session is wrapped up.');\n await mentorQ.refetch();\n }\n } finally {\n setCancellingId(null);\n }\n };\n\n if (!currentUser?.id) {\n return (\n <PageLayout\n hero\n title={tr('technospam.mentorship.sessionsTitle', 'My Sessions')}\n description={tr(\n 'technospam.mentorship.sessionsDescription',\n 'Track your mentorship sessions.'\n )}\n >\n <EmptyView\n icon={<MessageSquare size={26} />}\n title={tr('technospam.mentorship.signInTitle', 'Sign in to view your sessions')}\n description={tr(\n 'technospam.mentorship.signInDesc',\n \"Your booked and hosted mentorship sessions will appear here once you're signed in.\"\n )}\n />\n </PageLayout>\n );\n }\n\n return (\n <PageLayout\n hero\n title={tr('technospam.mentorship.sessionsTitle', 'My Sessions')}\n description={tr(\n 'technospam.mentorship.sessionsDescription',\n \"Manage the mentorship sessions you've booked and the ones you host.\"\n )}\n actions={\n <Button variant=\"outline\" onClick={() => navigate('/mentorship/mentors-page')}>\n <Users size={16} /> {tr('technospam.common.findMentor', 'Find a mentor')}\n </Button>\n }\n >\n <div className=\"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <StatCard\n label={tr('technospam.mentorship.statAsMentee', 'As mentee')}\n value={menteeSessions.length}\n icon={MessageSquare}\n tone=\"blue\"\n />\n <StatCard\n label={tr('technospam.mentorship.statAsMentor', 'As mentor')}\n value={mentorId ? mentorSessions.length : 0}\n icon={Users}\n tone=\"purple\"\n />\n <StatCard\n label={tr('technospam.mentorship.statUpcoming', 'Upcoming')}\n value={upcomingCount}\n icon={CalendarClock}\n tone=\"teal\"\n />\n <StatCard\n label={tr('technospam.mentorship.statCompleted', 'Completed')}\n value={completedCount}\n icon={CheckCircle2}\n tone=\"green\"\n />\n </div>\n\n {/* The tabs filter one list, so that list is their tab panel: Radix points every\n trigger's aria-controls at a panel id, and without a TabsContent the id\n resolved to nothing (axe aria-valid-attr-value, critical; BOFF-3157). */}\n <Tabs value={tab} onValueChange={(v) => setTab(v as Perspective)} className=\"gap-4\">\n <TabsList>\n <TabsTrigger value=\"mentee\">\n {tr('technospam.mentorship.tabAsMentee', 'As mentee')}\n </TabsTrigger>\n <TabsTrigger value=\"mentor\">\n {tr('technospam.mentorship.tabAsMentor', 'As mentor')}\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value={tab} className={TAB_PANEL_FOCUS_CLASS}>\n {tab === 'mentee' ? (\n <SessionsList\n loading={menteeQ.loading}\n error={menteeQ.error}\n sessions={menteeSessions}\n showMentor\n emptyTitle={tr(\n 'technospam.mentorship.noSessionsBookedTitle',\n 'No sessions booked yet'\n )}\n emptyDescription={tr(\n 'technospam.mentorship.noSessionsBookedDesc',\n 'Find a mentor and request a session to get personalized guidance.'\n )}\n emptyAction={\n <Button onClick={() => navigate('/mentorship/mentors-page')}>\n {tr('technospam.common.findMentor', 'Find a mentor')}\n </Button>\n }\n isMentor={false}\n onCancel={handleCancel}\n onConfirm={handleConfirm}\n onComplete={handleComplete}\n busyId={cancellingId}\n focusedId={focusedSessionId}\n onFocusChange={setFocusedSessionId}\n />\n ) : mentorsQ.loading && !myMentor ? (\n <LoadingRows count={3} height=\"h-24\" />\n ) : !mentorId ? (\n <EmptyView\n icon={<Users size={26} />}\n title={tr('technospam.mentorship.notAMentorTitle', \"You're not a mentor yet\")}\n description={tr(\n 'technospam.mentorship.notAMentorDesc',\n 'Create a mentor profile to start hosting sessions and helping others build.'\n )}\n action={\n <Button onClick={() => navigate('/mentorship/mentors-page')}>\n {tr('technospam.common.becomeAMentor', 'Become a mentor')}\n </Button>\n }\n />\n ) : (\n <SessionsList\n loading={mentorQ.loading}\n error={mentorQ.error}\n sessions={mentorSessions}\n showMentor={false}\n emptyTitle={tr(\n 'technospam.mentorship.noSessionsToHostTitle',\n 'No sessions to host yet'\n )}\n emptyDescription={tr(\n 'technospam.mentorship.noSessionsToHostDesc',\n 'When mentees request time with you, their sessions will show up here.'\n )}\n isMentor\n onCancel={handleCancel}\n onConfirm={handleConfirm}\n onComplete={handleComplete}\n busyId={cancellingId}\n focusedId={focusedSessionId}\n onFocusChange={setFocusedSessionId}\n />\n )}\n </TabsContent>\n </Tabs>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoDA,IAAM,IAAc,IAAI,IAAI,CAAC,aAAa,YAAY,CAAC;AAEvD,SAAS,EAAW,EAClB,YACA,eACA,aACA,aACA,cACA,eACA,SACA,YACA,oBAYC;CAED,IAAM,UAAc,EAAc,EAAQ,GAAG,EACvC,UAAoB,EAAc,IAAU,OAAO,EAAQ,GAAG,EAC9D,IAAY,EAAY,IAAI,EAAQ,OAAO,EAC3C,CAAC,GAAM,KAAW,EAA0C,OAAO,EACnE,CAAC,GAAY,KAAiB,EAAS,GAAG,EAC1C,CAAC,GAAQ,KAAa,EAAS,IAAI,EACnC,CAAC,GAAU,KAAe,EAAS,GAAG,EAEtC,IAAgB,YAAY;AAGhC,EAFA,MAAM,EAAU,EAAQ,IAAI,EAAW,MAAM,CAAC,EAC9C,EAAQ,OAAO,EACf,EAAc,GAAG;IAEb,IAAiB,YAAY;AAEjC,EADA,MAAM,EAAW,EAAQ,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,OAAO,EAAO,IAAI,EAAE,CAAC,EAAE,EAAS,MAAM,CAAC,EAC5F,EAAQ,O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AD;KACE,SAAS,EAAQ;KACjB,OAAO,EAAQ;KACf,UAAU;KACV,YAAA;KACA,YAAY,EACV,+CACA,yBACD;KACD,kBAAkB,EAChB,8CACA,oEACD;KACD,aACE,kBAAC,GAAD;MAAQ,eAAe,EAAS,2BAA2B;gBACxD,EAAG,gCAAgC,gBAAgB;MAC7C,CAAA;KAEX,UAAU;KACV,UAAU;KACV,WAAW;KACX,YAAY;KACZ,QAAQ;KACR,WAAW;KACX,eAAe;KACf,CAAA,GACA,EAAS,WAAW,CAAC,IACvB,kBAAC,GAAD;KAAa,OAAO;KAAG,QAAO;KAAS,CAAA,GACpC,IAeH,kBAAC,GAAD;KACE,SAAS,EAAQ;KACjB,OAAO,EAAQ;KACf,UAAU;KACV,YAAY;KACZ,YAAY,EACV,+CACA,0BACD;KACD,kBAAkB,EAChB,8CACA,wEACD;KACD,UAAA;KACA,UAAU;KACV,WAAW;KACX,YAAY;KACZ,QAAQ;KACR,WAAW;KACX,eAAe;KACf,CAAA,GAlCF,kBAAC,GAAD;KACE,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;KACzB,OAAO,EAAG,yCAAyC,0BAA0B;KAC7E,aAAa,EACX,wCACA,8EACD;KACD,QACE,kBAAC,GAAD;MAAQ,eAAe,EAAS,2BAA2B;gBACxD,EAAG,mCAAmC,kBAAkB;MAClD,CAAA;KAEX,CAAA;IAwBQ,CAAA,CACT;KACI;MA/IX,kBAAC,GAAD;EACE,MAAA;EACA,OAAO,EAAG,uCAAuC,cAAc;EAC/D,aAAa,EACX,6CACA,kCACD;YAED,kBAAC,GAAD;GACE,MAAM,kBAAC,GAAD,EAAe,MAAM,IAAM,CAAA;GACjC,OAAO,EAAG,qCAAqC,gCAAgC;GAC/E,aAAa,EACX,oCACA,qFACD;GACD,CAAA;EACS,CAAA"}
|
|
@@ -8,6 +8,13 @@ export interface NavItem {
|
|
|
8
8
|
order?: number;
|
|
9
9
|
group?: string;
|
|
10
10
|
children?: NavItem[];
|
|
11
|
+
/** Match `path` exactly instead of as a prefix when deciding the active item. */
|
|
12
|
+
exact?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Installed-app bottom tab ranking. The host shell owns the TechnoSpam tabs;
|
|
15
|
+
* the module never sets this itself (kept so tests can assert that).
|
|
16
|
+
*/
|
|
17
|
+
mobilePriority?: number;
|
|
11
18
|
}
|
|
12
19
|
export interface FooterItem {
|
|
13
20
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/technospam/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/technospam/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,M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AC;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The four learner journeys the phone layouts are built around (BOFF-4108,
|
|
3
|
+
* mockups technospam-18/19/22): Home, Courses, Practice and Mentors. Profile
|
|
4
|
+
* is the shell's own "More" tab, which already carries settings and the
|
|
5
|
+
* account menu, so it is not duplicated here.
|
|
6
|
+
*/
|
|
7
|
+
export type MobileTabId = 'home' | 'courses' | 'practice' | 'mentors';
|
|
8
|
+
export interface MobileTabDef {
|
|
9
|
+
id: MobileTabId;
|
|
10
|
+
labelKey: string;
|
|
11
|
+
label: string;
|
|
12
|
+
/** Module-relative section prefix; every page under it lights the tab up. */
|
|
13
|
+
section: string;
|
|
14
|
+
/** Module-relative page the tab opens. */
|
|
15
|
+
home: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const MOBILE_TABS: readonly MobileTabDef[];
|
|
18
|
+
/**
|
|
19
|
+
* Which phone tab owns `pathname`. The module index (`/technospam`) renders the
|
|
20
|
+
* dashboard, so it belongs to Home; anything outside the four sections
|
|
21
|
+
* (hackathons, analytics, study planner, admin) belongs to no tab.
|
|
22
|
+
*/
|
|
23
|
+
export declare function activeMobileTab(pathname: string, basePath: string): MobileTabId | null;
|
|
24
|
+
/** Absolute path a tab navigates to, under the MFE's basePath. */
|
|
25
|
+
export declare function mobileTabTarget(tab: MobileTabDef, basePath: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Child ids of the "TechnoSpam" sidebar item that the bottom tabs replace in
|
|
28
|
+
* the installed app. Dropping them keeps the shell's "More" sheet from
|
|
29
|
+
* listing (and lighting up for) the same pages the tabs already cover.
|
|
30
|
+
*/
|
|
31
|
+
export declare const NATIVE_TAB_COVERED_CHILD_IDS: ReadonlySet<string>;
|
|
32
|
+
/** Practice pages covered by the Practice tab; the rest of Applications stays in More. */
|
|
33
|
+
export declare const NATIVE_TAB_COVERED_GRANDCHILD_IDS: ReadonlySet<string>;
|
|
34
|
+
interface TreeItem {
|
|
35
|
+
id: string;
|
|
36
|
+
children?: TreeItem[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Remove the tab-covered sections from the module's nav children. Sections
|
|
40
|
+
* left with no children (Applications without its practice pages keeps
|
|
41
|
+
* Portfolio, so it survives) are dropped too.
|
|
42
|
+
*/
|
|
43
|
+
export declare function withoutTabCoveredItems<T extends TreeItem>(children: readonly T[]): T[];
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=mobileTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobileTabs.d.ts","sourceRoot":"","sources":["../../../src/technospam/utils/mobileTabs.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEtE,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,WAAW,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,YAAY,EA6B9C,CAAC;AAOF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAYtF;AAED,kEAAkE;AAClE,wBAAgB,eAAe,CAAC,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,CAK3D,CAAC;AAEH,0FAA0F;AAC1F,eAAO,MAAM,iCAAiC,EAAE,WAAW,CAAC,MAAM,CAIhE,CAAC;AAEH,UAAU,QAAQ;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAatF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
//#region src/technospam/utils/mobileTabs.ts
|
|
2
|
+
var e = [
|
|
3
|
+
{
|
|
4
|
+
id: "home",
|
|
5
|
+
labelKey: "technospam.mobile.tabs.home",
|
|
6
|
+
label: "Home",
|
|
7
|
+
section: "dashboard",
|
|
8
|
+
home: "dashboard/dashboard-page"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: "courses",
|
|
12
|
+
labelKey: "technospam.mobile.tabs.courses",
|
|
13
|
+
label: "Courses",
|
|
14
|
+
section: "courses",
|
|
15
|
+
home: "courses/courses-page"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "practice",
|
|
19
|
+
labelKey: "technospam.mobile.tabs.practice",
|
|
20
|
+
label: "Practice",
|
|
21
|
+
section: "applications",
|
|
22
|
+
home: "applications/problems-page"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "mentors",
|
|
26
|
+
labelKey: "technospam.mobile.tabs.mentors",
|
|
27
|
+
label: "Mentors",
|
|
28
|
+
section: "mentorship",
|
|
29
|
+
home: "mentorship/mentors-page"
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
function t(e) {
|
|
33
|
+
return e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e;
|
|
34
|
+
}
|
|
35
|
+
function n(n, r) {
|
|
36
|
+
let i = t(r), a = (i && i !== "/" && (n === i || n.startsWith(`${i}/`)) ? n.slice(i.length) : n).replace(/^\/+/, "").replace(/\/+$/, "");
|
|
37
|
+
if (a === "") return "home";
|
|
38
|
+
for (let t of e) if (a === t.section || a.startsWith(`${t.section}/`)) return t.id;
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
var r = new Set([
|
|
42
|
+
"technospam-home",
|
|
43
|
+
"technospam-dashboard-section",
|
|
44
|
+
"technospam-courses",
|
|
45
|
+
"technospam-mentorship"
|
|
46
|
+
]), i = new Set([
|
|
47
|
+
"technospam-applications-problems-page",
|
|
48
|
+
"technospam-applications-problem-details-page",
|
|
49
|
+
"technospam-applications-solutions-page"
|
|
50
|
+
]);
|
|
51
|
+
function a(e) {
|
|
52
|
+
let t = [];
|
|
53
|
+
for (let n of e) {
|
|
54
|
+
if (r.has(n.id)) continue;
|
|
55
|
+
if (!n.children) {
|
|
56
|
+
t.push(n);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
let e = n.children.filter((e) => !i.has(e.id));
|
|
60
|
+
e.length !== 0 && t.push({
|
|
61
|
+
...n,
|
|
62
|
+
children: e
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return t;
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { e as MOBILE_TABS, n as activeMobileTab, a as withoutTabCoveredItems };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=mobileTabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobileTabs.js","names":[],"sources":["../../../src/technospam/utils/mobileTabs.ts"],"sourcesContent":["import { joinPath } from './navigation';\n\n/**\n * The four learner journeys the phone layouts are built around (BOFF-4108,\n * mockups technospam-18/19/22): Home, Courses, Practice and Mentors. Profile\n * is the shell's own \"More\" tab, which already carries settings and the\n * account menu, so it is not duplicated here.\n */\nexport type MobileTabId = 'home' | 'courses' | 'practice' | 'mentors';\n\nexport interface MobileTabDef {\n id: MobileTabId;\n labelKey: string;\n label: string;\n /** Module-relative section prefix; every page under it lights the tab up. */\n section: string;\n /** Module-relative page the tab opens. */\n home: string;\n}\n\nexport const MOBILE_TABS: readonly MobileTabDef[] = [\n {\n id: 'home',\n labelKey: 'technospam.mobile.tabs.home',\n label: 'Home',\n section: 'dashboard',\n home: 'dashboard/dashboard-page',\n },\n {\n id: 'courses',\n labelKey: 'technospam.mobile.tabs.courses',\n label: 'Courses',\n section: 'courses',\n home: 'courses/courses-page',\n },\n {\n id: 'practice',\n labelKey: 'technospam.mobile.tabs.practice',\n label: 'Practice',\n section: 'applications',\n home: 'applications/problems-page',\n },\n {\n id: 'mentors',\n labelKey: 'technospam.mobile.tabs.mentors',\n label: 'Mentors',\n section: 'mentorship',\n home: 'mentorship/mentors-page',\n },\n];\n\n/** Strip a trailing slash so `/technospam/` and `/technospam` compare equal. */\nfunction trimBase(basePath: string): string {\n return basePath.length > 1 && basePath.endsWith('/') ? basePath.slice(0, -1) : basePath;\n}\n\n/**\n * Which phone tab owns `pathname`. The module index (`/technospam`) renders the\n * dashboard, so it belongs to Home; anything outside the four sections\n * (hackathons, analytics, study planner, admin) belongs to no tab.\n */\nexport function activeMobileTab(pathname: string, basePath: string): MobileTabId | null {\n const base = trimBase(basePath);\n const rel =\n base && base !== '/' && (pathname === base || pathname.startsWith(`${base}/`))\n ? pathname.slice(base.length)\n : pathname;\n const clean = rel.replace(/^\\/+/, '').replace(/\\/+$/, '');\n if (clean === '') return 'home';\n for (const tab of MOBILE_TABS) {\n if (clean === tab.section || clean.startsWith(`${tab.section}/`)) return tab.id;\n }\n return null;\n}\n\n/** Absolute path a tab navigates to, under the MFE's basePath. */\nexport function mobileTabTarget(tab: MobileTabDef, basePath: string): string {\n return joinPath(basePath, tab.home);\n}\n\n/**\n * Child ids of the \"TechnoSpam\" sidebar item that the bottom tabs replace in\n * the installed app. Dropping them keeps the shell's \"More\" sheet from\n * listing (and lighting up for) the same pages the tabs already cover.\n */\nexport const NATIVE_TAB_COVERED_CHILD_IDS: ReadonlySet<string> = new Set([\n 'technospam-home',\n 'technospam-dashboard-section',\n 'technospam-courses',\n 'technospam-mentorship',\n]);\n\n/** Practice pages covered by the Practice tab; the rest of Applications stays in More. */\nexport const NATIVE_TAB_COVERED_GRANDCHILD_IDS: ReadonlySet<string> = new Set([\n 'technospam-applications-problems-page',\n 'technospam-applications-problem-details-page',\n 'technospam-applications-solutions-page',\n]);\n\ninterface TreeItem {\n id: string;\n children?: TreeItem[];\n}\n\n/**\n * Remove the tab-covered sections from the module's nav children. Sections\n * left with no children (Applications without its practice pages keeps\n * Portfolio, so it survives) are dropped too.\n */\nexport function withoutTabCoveredItems<T extends TreeItem>(children: readonly T[]): T[] {\n const out: T[] = [];\n for (const child of children) {\n if (NATIVE_TAB_COVERED_CHILD_IDS.has(child.id)) continue;\n if (!child.children) {\n out.push(child);\n continue;\n }\n const kept = child.children.filter((c) => !NATIVE_TAB_COVERED_GRANDCHILD_IDS.has(c.id));\n if (kept.length === 0) continue;\n out.push({ ...child, children: kept });\n }\n return out;\n}\n"],"mappings":";AAoBA,IAAa,IAAuC;CAClD;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACD;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,SAAS;EACT,MAAM;EACP;CACF;AAGD,SAAS,EAAS,GAA0B;AAC1C,QAAO,EAAS,SAAS,KAAK,EAAS,SAAS,IAAI,GAAG,EAAS,MAAM,GAAG,GAAG,GAAG;;AAQjF,SAAgB,EAAgB,GAAkB,GAAsC;CACtF,IAAM,IAAO,EAAS,EAAS,EAKzB,KAHJ,KAAQ,MAAS,QAAQ,MAAa,KAAQ,EAAS,WAAW,GAAG,EAAK,GAAG,IACzE,EAAS,MAAM,EAAK,OAAO,GAC3B,GACY,QAAQ,QAAQ,GAAG,CAAC,QAAQ,QAAQ,GAAG;AACzD,KAAI,MAAU,GAAI,QAAO;AACzB,MAAK,IAAM,KAAO,EAChB,KAAI,MAAU,EAAI,WAAW,EAAM,WAAW,GAAG,EAAI,QAAQ,GAAG,CAAE,QAAO,EAAI;AAE/E,QAAO;;AAaT,IAAa,IAAoD,IAAI,IAAI;CACvE;CACA;CACA;CACA;CACD,CAAC,EAGW,IAAyD,IAAI,IAAI;CAC5E;CACA;CACA;CACD,CAAC;AAYF,SAAgB,EAA2C,GAA6B;CACtF,IAAM,IAAW,EAAE;AACnB,MAAK,IAAM,KAAS,GAAU;AAC5B,MAAI,EAA6B,IAAI,EAAM,GAAG,CAAE;AAChD,MAAI,CAAC,EAAM,UAAU;AACnB,KAAI,KAAK,EAAM;AACf;;EAEF,IAAM,IAAO,EAAM,SAAS,QAAQ,MAAM,CAAC,EAAkC,IAAI,EAAE,GAAG,CAAC;AACnF,IAAK,WAAW,KACpB,EAAI,KAAK;GAAE,GAAG;GAAO,UAAU;GAAM,CAAC;;AAExC,QAAO"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function installMatchMedia(): void;
|
|
2
|
+
/** Set the width the next render's media queries are evaluated against. */
|
|
3
|
+
export declare function setTestViewportWidth(width: number): void;
|
|
4
|
+
/** Restore the default desktop width. */
|
|
5
|
+
export declare function resetTestViewport(): void;
|
|
6
|
+
//# sourceMappingURL=matchMedia.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchMedia.d.ts","sourceRoot":"","sources":["../../src/test/matchMedia.ts"],"names":[],"mappings":"AAyBA,wBAAgB,iBAAiB,IAAI,IAAI,CAexC;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAExD;AAED,yCAAyC;AACzC,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-technospam",
|
|
3
|
-
"version": "2026.1102.
|
|
3
|
+
"version": "2026.1102.3",
|
|
4
4
|
"description": "Burdenoff TechnoSpam Microfrontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -51,18 +51,28 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@apollo/client": "^4.0.11",
|
|
54
|
-
"@burdenoff/fe-libs": "2026.
|
|
54
|
+
"@burdenoff/fe-libs": "2026.1029.2",
|
|
55
|
+
"@codemirror/autocomplete": "6.20.3",
|
|
56
|
+
"@codemirror/commands": "6.11.1",
|
|
57
|
+
"@codemirror/lang-go": "6.0.1",
|
|
58
|
+
"@codemirror/lang-javascript": "6.2.5",
|
|
59
|
+
"@codemirror/lang-python": "6.2.1",
|
|
60
|
+
"@codemirror/language": "6.13.1",
|
|
61
|
+
"@codemirror/legacy-modes": "6.5.5",
|
|
62
|
+
"@codemirror/state": "6.7.6",
|
|
63
|
+
"@codemirror/view": "6.43.14",
|
|
64
|
+
"@lezer/highlight": "1.2.5",
|
|
55
65
|
"@tanstack/react-query": "^5.90.16",
|
|
56
66
|
"clsx": "^2.1.1",
|
|
67
|
+
"framer-motion": "^12.0.0",
|
|
57
68
|
"graphql": "^16.10.0",
|
|
58
69
|
"lucide-react": "^0.468.0",
|
|
59
70
|
"react": "^19.0.0",
|
|
60
71
|
"react-dom": "^19.0.0",
|
|
61
72
|
"react-router": "^8.3.0",
|
|
62
|
-
"tailwind-merge": "^3.4.0",
|
|
63
|
-
"zustand": "^5.0.3",
|
|
64
73
|
"recharts": "^2.15.0",
|
|
65
|
-
"
|
|
74
|
+
"tailwind-merge": "^3.4.0",
|
|
75
|
+
"zustand": "^5.0.3"
|
|
66
76
|
},
|
|
67
77
|
"devDependencies": {
|
|
68
78
|
"@axe-core/playwright": "4.11.0",
|
|
@@ -115,7 +125,7 @@
|
|
|
115
125
|
"access": "public"
|
|
116
126
|
},
|
|
117
127
|
"overrides": {
|
|
118
|
-
"@burdenoff/fe-libs": "2026.
|
|
128
|
+
"@burdenoff/fe-libs": "2026.1029.2",
|
|
119
129
|
"lodash": ">=4.17.21",
|
|
120
130
|
"lodash-es": ">=4.17.21",
|
|
121
131
|
"dompurify": ">=3.3.4",
|