@burdenoff/microfe-technospam 2026.1101.1 → 2026.1101.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/stories/journeys/Courses.stories.d.ts +5 -0
- package/dist/stories/journeys/Courses.stories.d.ts.map +1 -1
- package/dist/stories/journeys/Mentorship.stories.d.ts +5 -0
- package/dist/stories/journeys/Mentorship.stories.d.ts.map +1 -1
- package/dist/stories/journeys/Problems.stories.d.ts.map +1 -1
- package/dist/technospam/api/technospamApi.d.ts +15 -0
- package/dist/technospam/api/technospamApi.d.ts.map +1 -1
- package/dist/technospam/api/technospamApi.js +200 -151
- package/dist/technospam/api/technospamApi.js.map +1 -1
- package/dist/technospam/components/CardOpenButton.d.ts +26 -0
- package/dist/technospam/components/CardOpenButton.d.ts.map +1 -0
- package/dist/technospam/components/CardOpenButton.js +15 -0
- package/dist/technospam/components/CardOpenButton.js.map +1 -0
- package/dist/technospam/components/ProblemsTable.d.ts +19 -0
- package/dist/technospam/components/ProblemsTable.d.ts.map +1 -0
- package/dist/technospam/components/ProblemsTable.js +117 -0
- package/dist/technospam/components/ProblemsTable.js.map +1 -0
- package/dist/technospam/components/index.d.ts +2 -0
- package/dist/technospam/components/index.d.ts.map +1 -1
- package/dist/technospam/components/index.js +3 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +38 -38
- 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 +197 -144
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +195 -195
- 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 +87 -84
- package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesLessonPlayerPagePage.js +36 -36
- package/dist/technospam/pages/CoursesLessonPlayerPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js +75 -72
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.js +1 -0
- package/dist/technospam/pages/MentorshipMentorsPagePage.js.map +1 -1
- package/dist/technospam/utils/problemCatalog.d.ts +27 -0
- package/dist/technospam/utils/problemCatalog.d.ts.map +1 -0
- package/dist/technospam/utils/problemCatalog.js +68 -0
- package/dist/technospam/utils/problemCatalog.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HackathonsHackathonsPagePage.js","names":[],"sources":["../../../src/technospam/pages/HackathonsHackathonsPagePage.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\nimport { Award, CalendarDays, Search, Sparkles, Trophy, Users } from 'lucide-react';\nimport {\n Badge,\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 LoadMore,\n LoadingGrid,\n MediaCover,\n PageLayout,\n StatCard,\n StatusBadge,\n} from '../components';\nimport { useTechnoSpam, useTechnoSpamNavigate } from '../providers/TechnoSpamProvider';\nimport {\n pageArg,\n useHackathonsQuery,\n usePageLimit,\n type TecHackathon,\n type TecHackathonStatus,\n} from '../api/technospamApi';\nimport { formatDate, formatMoney } from '../utils/format';\nimport { useTechnoSpamAnalytics } from '../hooks/useTechnoSpamAnalytics';\nimport { useTr } from '../hooks/useTr';\n\nfunction HackathonCard({ hackathon, onOpen }: { hackathon: TecHackathon; onOpen: () => void }) {\n const tr = useTr();\n return (\n <GlassCard\n className=\"group flex cursor-pointer flex-col overflow-hidden transition-all duration-200 hover:-translate-y-1 hover:shadow-lg\"\n onClick={onOpen}\n >\n <MediaCover height=\"h-32\" seed={hackathon.theme ?? hackathon.id} icon={Trophy}>\n <StatusBadge status={hackathon.status} />\n </MediaCover>\n <div className=\"flex flex-1 flex-col gap-3 p-4\">\n <div className=\"min-w-0\">\n <h3 className=\"truncate text-base font-semibold text-text-primary group-hover:text-accent-primary\">\n {hackathon.title}\n </h3>\n {hackathon.theme ? (\n <p className=\"mt-1 line-clamp-2 text-sm text-text-secondary\">{hackathon.theme}</p>\n ) : null}\n </div>\n\n <div className=\"mt-auto flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-text-muted\">\n <span className=\"inline-flex items-center gap-1\">\n <CalendarDays size={13} /> {formatDate(hackathon.startAt)} –{' '}\n {formatDate(hackathon.endAt)}\n </span>\n <span className=\"inline-flex items-center gap-1\">\n <Users size={13} />{' '}\n {tr('technospam.hackathons.teamSize', 'Team of {{size}}', {\n size: hackathon.maxTeamSize,\n })}\n </span>\n </div>\n\n <div className=\"flex items-center gap-1.5 text-sm font-medium text-accent-teal\">\n <Award size={15} />{' '}\n {tr('technospam.hackathons.prizePool', '{{prize}} prize pool', {\n prize: formatMoney(hackathon.prizePool, hackathon.currency),\n })}\n </div>\n\n {hackathon.tags.length ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {hackathon.tags.slice(0, 4).map((t) => (\n <Badge key={t} variant=\"secondary\" className=\"text-[11px]\">\n {t}\n </Badge>\n ))}\n </div>\n ) : null}\n </div>\n </GlassCard>\n );\n}\n\nexport function HackathonsHackathonsPagePage() {\n const navigate = useTechnoSpamNavigate();\n const { workspaceId } = useTechnoSpam();\n const { emit } = useTechnoSpamAnalytics();\n const tr = useTr();\n const [status, setStatus] = useState<'ALL' | TecHackathonStatus>('ALL');\n const [search, setSearch] = useState('');\n const { limit, more } = usePageLimit();\n\n const statuses = useMemo(\n () => [\n { value: 'ALL' as const, label: tr('technospam.hackathons.filterAll', 'All') },\n {\n value: 'REGISTRATION_OPEN' as TecHackathonStatus,\n label: tr('technospam.hackathons.filterRegistrationOpen', 'Registration open'),\n },\n {\n value: 'IN_PROGRESS' as TecHackathonStatus,\n label: tr('technospam.hackathons.filterInProgress', 'In progress'),\n },\n {\n value: 'JUDGING' as TecHackathonStatus,\n label: tr('technospam.hackathons.filterJudging', 'Judging'),\n },\n {\n value: 'COMPLETED' as TecHackathonStatus,\n label: tr('technospam.hackathons.filterCompleted', 'Completed'),\n },\n ],\n [tr]\n );\n\n const { data, loading, error } = useHackathonsQuery({\n pagination: pageArg(limit),\n ...(status !== 'ALL' ? { status } : {}),\n });\n\n const allHackathons = data?.tecListHackathons?.items ?? [];\n const hasMore = data?.tecListHackathons?.pageInfo?.hasMore ?? false;\n const hackathons = useMemo(() => {\n const q = search.trim().toLowerCase();\n if (!q) return allHackathons;\n return allHackathons.filter(\n (h) =>\n h.title.toLowerCase().includes(q) ||\n (h.theme ?? '').toLowerCase().includes(q) ||\n h.tags.some((t) => t.toLowerCase().includes(q))\n );\n }, [allHackathons, search]);\n const openCount = hackathons.filter((h) => h.status === 'REGISTRATION_OPEN').length;\n const totalPrize = hackathons.reduce((s, h) => s + h.prizePool, 0);\n const prizeCurrency = hackathons[0]?.currency ?? 'USD';\n\n return (\n <PageLayout\n hero\n title={tr('technospam.hackathons.title', 'Hackathons')}\n description={tr(\n 'technospam.hackathons.description',\n 'Compete, collaborate, and ship real projects with a team in a fixed window.'\n )}\n >\n <div className=\"mb-5 grid grid-cols-1 gap-3 sm:grid-cols-3\">\n <StatCard\n label={tr('technospam.hackathons.statHackathons', 'Hackathons')}\n value={hackathons.length}\n icon={Trophy}\n tone=\"purple\"\n />\n <StatCard\n label={tr('technospam.hackathons.statRegistrationOpen', 'Registration open')}\n value={openCount}\n icon={Sparkles}\n tone=\"green\"\n />\n <StatCard\n label={tr('technospam.hackathons.statTotalPrizePool', 'Total prize pool')}\n value={formatMoney(totalPrize, prizeCurrency)}\n icon={Award}\n tone=\"amber\"\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\n className=\"gap-0\"\n value={status}\n onValueChange={(v) => setStatus(v as 'ALL' | TecHackathonStatus)}\n >\n <div className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <TabsList>\n {statuses.map((s) => (\n <TabsTrigger key={s.value} value={s.value}>\n {s.label}\n </TabsTrigger>\n ))}\n </TabsList>\n <div className=\"relative w-full sm:w-72\">\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.hackathons.searchLabel', 'Search hackathons')}\n placeholder={tr('technospam.hackathons.searchPlaceholder', 'Search hackathons…')}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n onBlur={() => {\n const value = search.trim();\n if (value) {\n emit('technospam.search.performed', {\n workspaceId,\n entityType: 'hackathon',\n queryLength: value.length,\n });\n }\n }}\n />\n </div>\n </div>\n\n <TabsContent value={status} className={TAB_PANEL_FOCUS_CLASS}>\n {loading && !hackathons.length ? (\n <LoadingGrid />\n ) : error ? (\n <ErrorView\n title={tr('technospam.common.errorLoadHackathons', \"Couldn't load hackathons\")}\n error={error}\n />\n ) : hackathons.length === 0 ? (\n <EmptyView\n icon={<Trophy size={26} />}\n title={\n status !== 'ALL'\n ? tr('technospam.hackathons.emptyFilteredTitle', 'No hackathons in this stage')\n : tr('technospam.hackathons.emptyDefaultTitle', 'No hackathons yet')\n }\n description={\n status !== 'ALL'\n ? tr('technospam.hackathons.emptyFilteredDesc', 'Try a different stage filter.')\n : tr(\n 'technospam.hackathons.emptyDefaultDesc',\n 'Upcoming hackathons will appear here. Check back soon — TechnoSpam is pre-launch.'\n )\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {hackathons.map((hackathon) => (\n <HackathonCard\n key={hackathon.id}\n hackathon={hackathon}\n onOpen={() => {\n emit('technospam.hackathon.viewed', {\n workspaceId,\n entityId: hackathon.id,\n entityType: 'TEC_HACKATHON',\n });\n navigate(`/hackathons/hackathon-details-page?id=${hackathon.id}`);\n }}\n />\n ))}\n </div>\n )}\n <LoadMore hasMore={hasMore} loading={loading} onClick={more} />\n </TabsContent>\n </Tabs>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,SAAS,EAAc,EAAE,cAAW,aAA2D;CAC7F,IAAM,IAAK,GAAO;AAClB,QACE,kBAAC,GAAD;EACE,WAAU;EACV,SAAS;YAFX,CAIE,kBAAC,GAAD;GAAY,QAAO;GAAO,MAAM,EAAU,SAAS,EAAU;GAAI,MAAM;aACrE,kBAAC,GAAD,EAAa,QAAQ,EAAU,QAAU,CAAA;GAC9B,CAAA,EACb,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,MAAD;MAAI,WAAU;gBACX,EAAU;MACR,CAAA,EACJ,EAAU,QACT,kBAAC,KAAD;MAAG,WAAU;gBAAiD,EAAU;MAAU,CAAA,GAChF,KACA;;IAEN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,QAAD;MAAM,WAAU;gBAAhB;OACE,kBAAC,GAAD,EAAc,MAAM,IAAM,CAAA;;OAAE,EAAW,EAAU,QAAQ;OAAC;OAAG;OAC5D,EAAW,EAAU,MAAM;OACvB;SACP,kBAAC,QAAD;MAAM,WAAU;gBAAhB;OACE,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;OAAC;OACnB,EAAG,kCAAkC,oBAAoB,EACxD,MAAM,EAAU,aACjB,CAAC;OACG;QACH;;IAEN,kBAAC,OA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AAM,EAAU,EAAE,OAAO,MAAM;MAC1C,cAAc;OACZ,IAAM,IAAQ,EAAO,MAAM;AAC3B,OAAI,KACF,EAAK,+BAA+B;QAClC;QACA,YAAY;QACZ,aAAa,EAAM;QACpB,CAAC;;MAGN,CAAA,CACE;OACF;OAEN,kBAAC,GAAD;IAAa,OAAO;IAAQ,WAAW;cAAvC,CACG,KAAW,CAAC,EAAW,SACtB,kBAAC,GAAD,EAAe,CAAA,GACb,IACF,kBAAC,GAAD;KACE,OAAO,EAAG,yCAAyC,2BAA2B;KACvE;KACP,CAAA,GACA,EAAW,WAAW,IACxB,kBAAC,GAAD;KACE,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;KAC1B,OACE,MAAW,QAEP,EAAG,2CAA2C,oBAAoB,GADlE,EAAG,4CAA4C,8BAA8B;KAGnF,aACE,MAAW,QAEP,EACE,0CACA,oFACD,GAJD,EAAG,2CAA2C,gCAAgC;KAMpF,CAAA,GAEF,kBAAC,OAAD;KAAK,WAAU;eACZ,EAAW,KAAK,MACf,kBAAC,GAAD;MAEa;MACX,cAAc;AAMZ,OALA,EAAK,+BAA+B;QAClC;QACA,UAAU,EAAU;QACpB,YAAY;QACb,CAAC,EACF,EAAS,yCAAyC,EAAU,KAAK;;MAEnE,EAVK,EAAU,GAUf,CACF;KACE,CAAA,EAER,kBAAC,GAAD;KAAmB;KAAkB;KAAS,SAAS;KAAQ,CAAA,CACnD;MACT;KACI"}
|
|
1
|
+
{"version":3,"file":"HackathonsHackathonsPagePage.js","names":[],"sources":["../../../src/technospam/pages/HackathonsHackathonsPagePage.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\nimport { Award, CalendarDays, Search, Sparkles, Trophy, Users } from 'lucide-react';\nimport {\n Badge,\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 CardOpenButton,\n EmptyView,\n ErrorView,\n LoadMore,\n LoadingGrid,\n MediaCover,\n PageLayout,\n StatCard,\n StatusBadge,\n} from '../components';\nimport { useTechnoSpam, useTechnoSpamNavigate } from '../providers/TechnoSpamProvider';\nimport {\n pageArg,\n useHackathonsQuery,\n usePageLimit,\n type TecHackathon,\n type TecHackathonStatus,\n} from '../api/technospamApi';\nimport { formatDate, formatMoney } from '../utils/format';\nimport { useTechnoSpamAnalytics } from '../hooks/useTechnoSpamAnalytics';\nimport { useTr } from '../hooks/useTr';\n\nfunction HackathonCard({ hackathon, onOpen }: { hackathon: TecHackathon; onOpen: () => void }) {\n const tr = useTr();\n return (\n <GlassCard className=\"group flex cursor-pointer flex-col overflow-hidden transition-all duration-200 hover:-translate-y-1 hover:shadow-lg\">\n <MediaCover height=\"h-32\" seed={hackathon.theme ?? hackathon.id} icon={Trophy}>\n <StatusBadge status={hackathon.status} />\n </MediaCover>\n <div className=\"flex flex-1 flex-col gap-3 p-4\">\n <div className=\"min-w-0\">\n <h3 className=\"truncate text-base font-semibold text-text-primary group-hover:text-accent-primary\">\n <CardOpenButton onOpen={onOpen}>{hackathon.title}</CardOpenButton>\n </h3>\n {hackathon.theme ? (\n <p className=\"mt-1 line-clamp-2 text-sm text-text-secondary\">{hackathon.theme}</p>\n ) : null}\n </div>\n\n <div className=\"mt-auto flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-text-muted\">\n <span className=\"inline-flex items-center gap-1\">\n <CalendarDays size={13} /> {formatDate(hackathon.startAt)} –{' '}\n {formatDate(hackathon.endAt)}\n </span>\n <span className=\"inline-flex items-center gap-1\">\n <Users size={13} />{' '}\n {tr('technospam.hackathons.teamSize', 'Team of {{size}}', {\n size: hackathon.maxTeamSize,\n })}\n </span>\n </div>\n\n <div className=\"flex items-center gap-1.5 text-sm font-medium text-accent-teal\">\n <Award size={15} />{' '}\n {tr('technospam.hackathons.prizePool', '{{prize}} prize pool', {\n prize: formatMoney(hackathon.prizePool, hackathon.currency),\n })}\n </div>\n\n {hackathon.tags.length ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {hackathon.tags.slice(0, 4).map((t) => (\n <Badge key={t} variant=\"secondary\" className=\"text-[11px]\">\n {t}\n </Badge>\n ))}\n </div>\n ) : null}\n </div>\n </GlassCard>\n );\n}\n\nexport function HackathonsHackathonsPagePage() {\n const navigate = useTechnoSpamNavigate();\n const { workspaceId } = useTechnoSpam();\n const { emit } = useTechnoSpamAnalytics();\n const tr = useTr();\n const [status, setStatus] = useState<'ALL' | TecHackathonStatus>('ALL');\n const [search, setSearch] = useState('');\n const { limit, more } = usePageLimit();\n\n const statuses = useMemo(\n () => [\n { value: 'ALL' as const, label: tr('technospam.hackathons.filterAll', 'All') },\n {\n value: 'REGISTRATION_OPEN' as TecHackathonStatus,\n label: tr('technospam.hackathons.filterRegistrationOpen', 'Registration open'),\n },\n {\n value: 'IN_PROGRESS' as TecHackathonStatus,\n label: tr('technospam.hackathons.filterInProgress', 'In progress'),\n },\n {\n value: 'JUDGING' as TecHackathonStatus,\n label: tr('technospam.hackathons.filterJudging', 'Judging'),\n },\n {\n value: 'COMPLETED' as TecHackathonStatus,\n label: tr('technospam.hackathons.filterCompleted', 'Completed'),\n },\n ],\n [tr]\n );\n\n const { data, loading, error } = useHackathonsQuery({\n pagination: pageArg(limit),\n ...(status !== 'ALL' ? { status } : {}),\n });\n\n const allHackathons = data?.tecListHackathons?.items ?? [];\n const hasMore = data?.tecListHackathons?.pageInfo?.hasMore ?? false;\n const hackathons = useMemo(() => {\n const q = search.trim().toLowerCase();\n if (!q) return allHackathons;\n return allHackathons.filter(\n (h) =>\n h.title.toLowerCase().includes(q) ||\n (h.theme ?? '').toLowerCase().includes(q) ||\n h.tags.some((t) => t.toLowerCase().includes(q))\n );\n }, [allHackathons, search]);\n const openCount = hackathons.filter((h) => h.status === 'REGISTRATION_OPEN').length;\n const totalPrize = hackathons.reduce((s, h) => s + h.prizePool, 0);\n const prizeCurrency = hackathons[0]?.currency ?? 'USD';\n\n return (\n <PageLayout\n hero\n title={tr('technospam.hackathons.title', 'Hackathons')}\n description={tr(\n 'technospam.hackathons.description',\n 'Compete, collaborate, and ship real projects with a team in a fixed window.'\n )}\n >\n <div className=\"mb-5 grid grid-cols-1 gap-3 sm:grid-cols-3\">\n <StatCard\n label={tr('technospam.hackathons.statHackathons', 'Hackathons')}\n value={hackathons.length}\n icon={Trophy}\n tone=\"purple\"\n />\n <StatCard\n label={tr('technospam.hackathons.statRegistrationOpen', 'Registration open')}\n value={openCount}\n icon={Sparkles}\n tone=\"green\"\n />\n <StatCard\n label={tr('technospam.hackathons.statTotalPrizePool', 'Total prize pool')}\n value={formatMoney(totalPrize, prizeCurrency)}\n icon={Award}\n tone=\"amber\"\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\n className=\"gap-0\"\n value={status}\n onValueChange={(v) => setStatus(v as 'ALL' | TecHackathonStatus)}\n >\n <div className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <TabsList>\n {statuses.map((s) => (\n <TabsTrigger key={s.value} value={s.value}>\n {s.label}\n </TabsTrigger>\n ))}\n </TabsList>\n <div className=\"relative w-full sm:w-72\">\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.hackathons.searchLabel', 'Search hackathons')}\n placeholder={tr('technospam.hackathons.searchPlaceholder', 'Search hackathons…')}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n onBlur={() => {\n const value = search.trim();\n if (value) {\n emit('technospam.search.performed', {\n workspaceId,\n entityType: 'hackathon',\n queryLength: value.length,\n });\n }\n }}\n />\n </div>\n </div>\n\n <TabsContent value={status} className={TAB_PANEL_FOCUS_CLASS}>\n {loading && !hackathons.length ? (\n <LoadingGrid />\n ) : error ? (\n <ErrorView\n title={tr('technospam.common.errorLoadHackathons', \"Couldn't load hackathons\")}\n error={error}\n />\n ) : hackathons.length === 0 ? (\n <EmptyView\n icon={<Trophy size={26} />}\n title={\n status !== 'ALL'\n ? tr('technospam.hackathons.emptyFilteredTitle', 'No hackathons in this stage')\n : tr('technospam.hackathons.emptyDefaultTitle', 'No hackathons yet')\n }\n description={\n status !== 'ALL'\n ? tr('technospam.hackathons.emptyFilteredDesc', 'Try a different stage filter.')\n : tr(\n 'technospam.hackathons.emptyDefaultDesc',\n 'Upcoming hackathons will appear here. Check back soon — TechnoSpam is pre-launch.'\n )\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {hackathons.map((hackathon) => (\n <HackathonCard\n key={hackathon.id}\n hackathon={hackathon}\n onOpen={() => {\n emit('technospam.hackathon.viewed', {\n workspaceId,\n entityId: hackathon.id,\n entityType: 'TEC_HACKATHON',\n });\n navigate(`/hackathons/hackathon-details-page?id=${hackathon.id}`);\n }}\n />\n ))}\n </div>\n )}\n <LoadMore hasMore={hasMore} loading={loading} onClick={more} />\n </TabsContent>\n </Tabs>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmCA,SAAS,EAAc,EAAE,cAAW,aAA2D;CAC7F,IAAM,IAAK,GAAO;AAClB,QACE,kBAAC,GAAD;EAAW,WAAU;YAArB,CACE,kBAAC,GAAD;GAAY,QAAO;GAAO,MAAM,EAAU,SAAS,EAAU;GAAI,MAAM;aACrE,kBAAC,GAAD,EAAa,QAAQ,EAAU,QAAU,CAAA;GAC9B,CAAA,EACb,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,MAAD;MAAI,WAAU;gBACZ,kBAAC,GAAD;OAAwB;iBAAS,EAAU;OAAuB,CAAA;MAC/D,CAAA,EACJ,EAAU,QACT,kBAAC,KAAD;MAAG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A,EAER,kBAAC,GAAD;KAAmB;KAAkB;KAAS,SAAS;KAAQ,CAAA,CACnD;MACT;KACI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorshipMentorsPagePage.d.ts","sourceRoot":"","sources":["../../../src/technospam/pages/MentorshipMentorsPagePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MentorshipMentorsPagePage.d.ts","sourceRoot":"","sources":["../../../src/technospam/pages/MentorshipMentorsPagePage.tsx"],"names":[],"mappings":"AAsTA,wBAAgB,yBAAyB,gCAgLxC"}
|
|
@@ -31,6 +31,7 @@ function L({ mentor: e, size: t = "md" }) {
|
|
|
31
31
|
function R({ mentor: e, onOpen: t }) {
|
|
32
32
|
let n = r();
|
|
33
33
|
return /* @__PURE__ */ j(P, {
|
|
34
|
+
"data-testid": "mentor-card",
|
|
34
35
|
className: "group flex cursor-pointer flex-col gap-4 p-5 transition-all duration-200 hover:-translate-y-1 hover:shadow-lg",
|
|
35
36
|
onClick: t,
|
|
36
37
|
children: [
|
|
@@ -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 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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,iBAAiB;MACrE,aAAa,EACX,2CACA,mCACD;MACD,OAAO;MACP,WAAW,MAAM,EAAU,EAAE,OAAO,MAAM;MAC1C,CAAA,CACE;QACL,CAAC,KAAiB,CAAC,IAClB,kBAAC,GAAD;KAAQ,eAAe,EAAY,GAAK;eAAxC;MACE,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-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,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AEU;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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display helpers for the practice problem catalog table (BOFF-4077).
|
|
3
|
+
*
|
|
4
|
+
* `TecProblem.languages` stores lowercase language slugs (see the svc's
|
|
5
|
+
* `normalizeLanguage`), several of which are aliases of one language
|
|
6
|
+
* (`javascript`/`node`, `python`/`python3`, `bash`/`sh`). The catalog's
|
|
7
|
+
* Languages column shows the short labels from the mock ("JS, Py, Java"),
|
|
8
|
+
* so aliases collapse to one label and the original order is preserved.
|
|
9
|
+
*/
|
|
10
|
+
/** Short display label for one language slug; unknown slugs are title-cased. */
|
|
11
|
+
export declare function languageLabel(slug: string): string;
|
|
12
|
+
/** Distinct short labels for a problem's languages, in their stored order. */
|
|
13
|
+
export declare function languageLabels(slugs: readonly string[]): string[];
|
|
14
|
+
/** The catalog's two layouts: the mock's data table, or the original card grid. */
|
|
15
|
+
export type ProblemCatalogView = 'table' | 'cards';
|
|
16
|
+
export declare const PROBLEM_CATALOG_VIEW_STORAGE_KEY = "technospam.problems.view";
|
|
17
|
+
/**
|
|
18
|
+
* Read the viewer's remembered catalog layout. Storage can be missing or throw
|
|
19
|
+
* (private windows, blocked site data), so anything unexpected falls back to
|
|
20
|
+
* the table, which is the mock's default layout.
|
|
21
|
+
*/
|
|
22
|
+
export declare function readProblemCatalogView(storage: Pick<Storage, 'getItem'> | null | undefined): ProblemCatalogView;
|
|
23
|
+
/** Remember the viewer's catalog layout; storage failures are ignored. */
|
|
24
|
+
export declare function writeProblemCatalogView(storage: Pick<Storage, 'setItem'> | null | undefined, view: ProblemCatalogView): void;
|
|
25
|
+
/** The browser's localStorage, or null where accessing it throws. */
|
|
26
|
+
export declare function safeLocalStorage(): Storage | null;
|
|
27
|
+
//# sourceMappingURL=problemCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"problemCatalog.d.ts","sourceRoot":"","sources":["../../../src/technospam/utils/problemCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkCH,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAUlD;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAWjE;AAED,mFAAmF;AACnF,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEnD,eAAO,MAAM,gCAAgC,6BAA6B,CAAC;AAE3E;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,IAAI,GAAG,SAAS,GACnD,kBAAkB,CAOpB;AAED,0EAA0E;AAC1E,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,IAAI,GAAG,SAAS,EACpD,IAAI,EAAE,kBAAkB,GACvB,IAAI,CAMN;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,IAAI,OAAO,GAAG,IAAI,CAMjD"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region src/technospam/utils/problemCatalog.ts
|
|
2
|
+
var e = Object.freeze({
|
|
3
|
+
javascript: "JS",
|
|
4
|
+
js: "JS",
|
|
5
|
+
node: "JS",
|
|
6
|
+
nodejs: "JS",
|
|
7
|
+
typescript: "TS",
|
|
8
|
+
ts: "TS",
|
|
9
|
+
python: "Py",
|
|
10
|
+
python3: "Py",
|
|
11
|
+
py: "Py",
|
|
12
|
+
java: "Java",
|
|
13
|
+
cpp: "C++",
|
|
14
|
+
"c++": "C++",
|
|
15
|
+
c: "C",
|
|
16
|
+
csharp: "C#",
|
|
17
|
+
"c#": "C#",
|
|
18
|
+
cs: "C#",
|
|
19
|
+
go: "Go",
|
|
20
|
+
golang: "Go",
|
|
21
|
+
rust: "Rust",
|
|
22
|
+
ruby: "Ruby",
|
|
23
|
+
rb: "Ruby",
|
|
24
|
+
kotlin: "Kotlin",
|
|
25
|
+
swift: "Swift",
|
|
26
|
+
php: "PHP",
|
|
27
|
+
scala: "Scala",
|
|
28
|
+
sql: "SQL",
|
|
29
|
+
bash: "Bash",
|
|
30
|
+
sh: "Bash",
|
|
31
|
+
shell: "Bash"
|
|
32
|
+
});
|
|
33
|
+
function t(t) {
|
|
34
|
+
let n = t.trim().toLowerCase();
|
|
35
|
+
return n ? e[n] || n.split(/[-_\s]+/).filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ") : "";
|
|
36
|
+
}
|
|
37
|
+
function n(e) {
|
|
38
|
+
let n = /* @__PURE__ */ new Set(), r = [];
|
|
39
|
+
for (let i of e) {
|
|
40
|
+
let e = t(i);
|
|
41
|
+
e && !n.has(e) && (n.add(e), r.push(e));
|
|
42
|
+
}
|
|
43
|
+
return r;
|
|
44
|
+
}
|
|
45
|
+
var r = "technospam.problems.view";
|
|
46
|
+
function i(e) {
|
|
47
|
+
try {
|
|
48
|
+
return e?.getItem("technospam.problems.view") === "cards" ? "cards" : "table";
|
|
49
|
+
} catch {
|
|
50
|
+
return "table";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function a(e, t) {
|
|
54
|
+
try {
|
|
55
|
+
e?.setItem(r, t);
|
|
56
|
+
} catch {}
|
|
57
|
+
}
|
|
58
|
+
function o() {
|
|
59
|
+
try {
|
|
60
|
+
return typeof window > "u" ? null : window.localStorage;
|
|
61
|
+
} catch {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { n as languageLabels, i as readProblemCatalogView, o as safeLocalStorage, a as writeProblemCatalogView };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=problemCatalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"problemCatalog.js","names":[],"sources":["../../../src/technospam/utils/problemCatalog.ts"],"sourcesContent":["/**\n * Display helpers for the practice problem catalog table (BOFF-4077).\n *\n * `TecProblem.languages` stores lowercase language slugs (see the svc's\n * `normalizeLanguage`), several of which are aliases of one language\n * (`javascript`/`node`, `python`/`python3`, `bash`/`sh`). The catalog's\n * Languages column shows the short labels from the mock (\"JS, Py, Java\"),\n * so aliases collapse to one label and the original order is preserved.\n */\n\nconst LANGUAGE_LABELS: Readonly<Record<string, string>> = Object.freeze({\n javascript: 'JS',\n js: 'JS',\n node: 'JS',\n nodejs: 'JS',\n typescript: 'TS',\n ts: 'TS',\n python: 'Py',\n python3: 'Py',\n py: 'Py',\n java: 'Java',\n cpp: 'C++',\n 'c++': 'C++',\n c: 'C',\n csharp: 'C#',\n 'c#': 'C#',\n cs: 'C#',\n go: 'Go',\n golang: 'Go',\n rust: 'Rust',\n ruby: 'Ruby',\n rb: 'Ruby',\n kotlin: 'Kotlin',\n swift: 'Swift',\n php: 'PHP',\n scala: 'Scala',\n sql: 'SQL',\n bash: 'Bash',\n sh: 'Bash',\n shell: 'Bash',\n});\n\n/** Short display label for one language slug; unknown slugs are title-cased. */\nexport function languageLabel(slug: string): string {\n const key = slug.trim().toLowerCase();\n if (!key) return '';\n const known = LANGUAGE_LABELS[key];\n if (known) return known;\n return key\n .split(/[-_\\s]+/)\n .filter(Boolean)\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(' ');\n}\n\n/** Distinct short labels for a problem's languages, in their stored order. */\nexport function languageLabels(slugs: readonly string[]): string[] {\n const seen = new Set<string>();\n const labels: string[] = [];\n for (const slug of slugs) {\n const label = languageLabel(slug);\n if (label && !seen.has(label)) {\n seen.add(label);\n labels.push(label);\n }\n }\n return labels;\n}\n\n/** The catalog's two layouts: the mock's data table, or the original card grid. */\nexport type ProblemCatalogView = 'table' | 'cards';\n\nexport const PROBLEM_CATALOG_VIEW_STORAGE_KEY = 'technospam.problems.view';\n\n/**\n * Read the viewer's remembered catalog layout. Storage can be missing or throw\n * (private windows, blocked site data), so anything unexpected falls back to\n * the table, which is the mock's default layout.\n */\nexport function readProblemCatalogView(\n storage: Pick<Storage, 'getItem'> | null | undefined\n): ProblemCatalogView {\n try {\n const value = storage?.getItem(PROBLEM_CATALOG_VIEW_STORAGE_KEY);\n return value === 'cards' ? 'cards' : 'table';\n } catch {\n return 'table';\n }\n}\n\n/** Remember the viewer's catalog layout; storage failures are ignored. */\nexport function writeProblemCatalogView(\n storage: Pick<Storage, 'setItem'> | null | undefined,\n view: ProblemCatalogView\n): void {\n try {\n storage?.setItem(PROBLEM_CATALOG_VIEW_STORAGE_KEY, view);\n } catch {\n // A blocked or full storage only loses the preference; the page still works.\n }\n}\n\n/** The browser's localStorage, or null where accessing it throws. */\nexport function safeLocalStorage(): Storage | null {\n try {\n return typeof window === 'undefined' ? null : window.localStorage;\n } catch {\n return null;\n }\n}\n"],"mappings":";AAUA,IAAM,IAAoD,OAAO,OAAO;CACtE,YAAY;CACZ,IAAI;CACJ,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,IAAI;CACJ,MAAM;CACN,KAAK;CACL,OAAO;CACP,GAAG;CACH,QAAQ;CACR,MAAM;CACN,IAAI;CACJ,IAAI;CACJ,QAAQ;CACR,MAAM;CACN,MAAM;CACN,IAAI;CACJ,QAAQ;CACR,OAAO;CACP,KAAK;CACL,OAAO;CACP,KAAK;CACL,MAAM;CACN,IAAI;CACJ,OAAO;CACR,CAAC;AAGF,SAAgB,EAAc,GAAsB;CAClD,IAAM,IAAM,EAAK,MAAM,CAAC,aAAa;AAIrC,QAHK,IACS,EAAgB,MAEvB,EACJ,MAAM,UAAU,CAChB,OAAO,QAAQ,CACf,KAAK,MAAS,EAAK,OAAO,EAAE,CAAC,aAAa,GAAG,EAAK,MAAM,EAAE,CAAC,CAC3D,KAAK,IAAI,GAPK;;AAWnB,SAAgB,EAAe,GAAoC;CACjE,IAAM,oBAAO,IAAI,KAAa,EACxB,IAAmB,EAAE;AAC3B,MAAK,IAAM,KAAQ,GAAO;EACxB,IAAM,IAAQ,EAAc,EAAK;AACjC,EAAI,KAAS,CAAC,EAAK,IAAI,EAAM,KAC3B,EAAK,IAAI,EAAM,EACf,EAAO,KAAK,EAAM;;AAGtB,QAAO;;AAMT,IAAa,IAAmC;AAOhD,SAAgB,EACd,GACoB;AACpB,KAAI;AAEF,SADc,GAAS,QAAA,2BAAyC,KAC/C,UAAU,UAAU;SAC/B;AACN,SAAO;;;AAKX,SAAgB,EACd,GACA,GACM;AACN,KAAI;AACF,KAAS,QAAQ,GAAkC,EAAK;SAClD;;AAMV,SAAgB,IAAmC;AACjD,KAAI;AACF,SAAO,OAAO,SAAW,MAAc,OAAO,OAAO;SAC/C;AACN,SAAO"}
|