@flamingo-stack/openframe-frontend-core 0.0.337-snapshot.20260629165153 → 0.0.337
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/{chunk-N7MH2OSW.js → chunk-3B6JQUCN.js} +2 -2
- package/dist/{chunk-QJR7QLNW.cjs → chunk-3YN5ZRHG.cjs} +31 -31
- package/dist/{chunk-QJR7QLNW.cjs.map → chunk-3YN5ZRHG.cjs.map} +1 -1
- package/dist/{chunk-JI7EPGRA.js → chunk-43LYMONR.js} +4 -4
- package/dist/{chunk-3BWH262F.js → chunk-6G4NIF4Y.js} +4 -4
- package/dist/{chunk-YHDF4WMG.cjs → chunk-6OA77Y55.cjs} +15 -15
- package/dist/{chunk-YHDF4WMG.cjs.map → chunk-6OA77Y55.cjs.map} +1 -1
- package/dist/{chunk-IBCTHO3A.cjs → chunk-6XIB47I2.cjs} +5 -5
- package/dist/{chunk-IBCTHO3A.cjs.map → chunk-6XIB47I2.cjs.map} +1 -1
- package/dist/{chunk-DPFJPCFL.cjs → chunk-75I2PDDE.cjs} +7 -7
- package/dist/{chunk-DPFJPCFL.cjs.map → chunk-75I2PDDE.cjs.map} +1 -1
- package/dist/{chunk-FDKTAOEO.cjs → chunk-7JZFRSMF.cjs} +37 -37
- package/dist/{chunk-FDKTAOEO.cjs.map → chunk-7JZFRSMF.cjs.map} +1 -1
- package/dist/{chunk-RLHOSQ7X.cjs → chunk-A3AMVJDJ.cjs} +9 -9
- package/dist/{chunk-RLHOSQ7X.cjs.map → chunk-A3AMVJDJ.cjs.map} +1 -1
- package/dist/{chunk-DPU7VTTV.js → chunk-AAPECG2D.js} +8 -8
- package/dist/chunk-AAPECG2D.js.map +1 -0
- package/dist/{chunk-2FDRZIX2.cjs → chunk-ASMOZBD6.cjs} +359 -337
- package/dist/chunk-ASMOZBD6.cjs.map +1 -0
- package/dist/{chunk-IOEGV4DP.js → chunk-EX5IVHLS.js} +2 -2
- package/dist/{chunk-A4X3DZSS.js → chunk-F77UFU5A.js} +2 -2
- package/dist/{chunk-IJ2OYHRH.cjs → chunk-HKAOAKPW.cjs} +12 -12
- package/dist/{chunk-IJ2OYHRH.cjs.map → chunk-HKAOAKPW.cjs.map} +1 -1
- package/dist/{chunk-GFBCUSFN.js → chunk-IZ72DTGG.js} +4 -4
- package/dist/{chunk-BG44XQB2.js → chunk-KNTKGT4X.js} +3133 -3111
- package/dist/chunk-KNTKGT4X.js.map +1 -0
- package/dist/{chunk-RSA7DPZN.cjs → chunk-LF2BC2Z6.cjs} +60 -60
- package/dist/chunk-LF2BC2Z6.cjs.map +1 -0
- package/dist/{chunk-FGVYJPT4.js → chunk-OKPYF6AI.js} +2 -2
- package/dist/{chunk-IVY5R6L2.cjs → chunk-SKK3C6RE.cjs} +25 -25
- package/dist/{chunk-IVY5R6L2.cjs.map → chunk-SKK3C6RE.cjs.map} +1 -1
- package/dist/{chunk-Y2VDAVIX.cjs → chunk-SZJLJWWO.cjs} +62 -62
- package/dist/{chunk-Y2VDAVIX.cjs.map → chunk-SZJLJWWO.cjs.map} +1 -1
- package/dist/{chunk-FNPF5OQS.cjs → chunk-TXVO2E5C.cjs} +26 -26
- package/dist/{chunk-FNPF5OQS.cjs.map → chunk-TXVO2E5C.cjs.map} +1 -1
- package/dist/{chunk-GOTCZBP2.js → chunk-WQZPEEFC.js} +2 -2
- package/dist/{chunk-HKBV4OJK.js → chunk-X5DAKNSR.js} +2 -2
- package/dist/{chunk-HI367AS3.js → chunk-XB5LZ2YF.js} +2 -2
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/entity-summary-editor.d.ts.map +1 -1
- package/dist/components/features/highlight-video-combined-section.d.ts.map +1 -1
- package/dist/components/features/highlight-video-preview.d.ts.map +1 -1
- package/dist/components/features/highlight-video-section.d.ts.map +1 -1
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/features/seo-editor-preview.d.ts.map +1 -1
- package/dist/components/features/transcript-summary-editor.d.ts.map +1 -1
- package/dist/components/features/video-source-selector.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +121 -123
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +9 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/index.cjs +2 -4
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +1 -3
- package/dist/components/ui/release-changelog-section.d.ts +2 -2
- package/dist/components/ui/release-changelog-section.d.ts.map +1 -1
- package/dist/components/ui/table/table-skeleton.d.ts.map +1 -1
- package/dist/index.cjs +2 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -3
- package/package.json +1 -1
- package/src/components/features/entity-summary-editor.tsx +4 -2
- package/src/components/features/highlight-video-combined-section.tsx +4 -2
- package/src/components/features/highlight-video-preview.tsx +4 -2
- package/src/components/features/highlight-video-section.tsx +4 -2
- package/src/components/features/seo-editor-preview.tsx +12 -4
- package/src/components/features/transcript-summary-editor.tsx +8 -3
- package/src/components/features/video-source-selector.tsx +4 -2
- package/src/components/shared/product-release/release-detail-page.tsx +4 -4
- package/src/components/ui/index.ts +0 -1
- package/src/components/ui/release-changelog-section.tsx +14 -19
- package/src/components/ui/table/table-skeleton.tsx +2 -6
- package/dist/chunk-2FDRZIX2.cjs.map +0 -1
- package/dist/chunk-BG44XQB2.js.map +0 -1
- package/dist/chunk-DPU7VTTV.js.map +0 -1
- package/dist/chunk-RSA7DPZN.cjs.map +0 -1
- package/dist/components/ui/ai-generated-badge.d.ts +0 -10
- package/dist/components/ui/ai-generated-badge.d.ts.map +0 -1
- package/src/components/ui/ai-generated-badge.tsx +0 -17
- /package/dist/{chunk-N7MH2OSW.js.map → chunk-3B6JQUCN.js.map} +0 -0
- /package/dist/{chunk-JI7EPGRA.js.map → chunk-43LYMONR.js.map} +0 -0
- /package/dist/{chunk-3BWH262F.js.map → chunk-6G4NIF4Y.js.map} +0 -0
- /package/dist/{chunk-IOEGV4DP.js.map → chunk-EX5IVHLS.js.map} +0 -0
- /package/dist/{chunk-A4X3DZSS.js.map → chunk-F77UFU5A.js.map} +0 -0
- /package/dist/{chunk-GFBCUSFN.js.map → chunk-IZ72DTGG.js.map} +0 -0
- /package/dist/{chunk-FGVYJPT4.js.map → chunk-OKPYF6AI.js.map} +0 -0
- /package/dist/{chunk-GOTCZBP2.js.map → chunk-WQZPEEFC.js.map} +0 -0
- /package/dist/{chunk-HKBV4OJK.js.map → chunk-X5DAKNSR.js.map} +0 -0
- /package/dist/{chunk-HI367AS3.js.map → chunk-XB5LZ2YF.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-IVY5R6L2.cjs","../src/components/onboarding-guides/onboarding-guides-catalog-view.tsx","../src/components/onboarding-guides/onboarding-guides-catalog-skeleton.tsx","../src/components/onboarding-guides/onboarding-guide-detail-view.tsx","../src/components/onboarding-guides/hooks/use-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lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-IVY5R6L2.cjs","sourcesContent":[null,"'use client'\n\n/**\n * Public-facing catalog view for `/onboarding-guides`.\n *\n * Two data modes:\n * - **controlled** (hub SSR): pass `initialGuides` + `initialSections`\n * (server-fetched; section changes re-render the host with new props).\n * - **self-fetching** (config-only embed): omit the data props and pass\n * `guidesEndpoint` + `sectionsEndpoint` (the api routes). The view fetches\n * the guides (refetching on `?section=` change) + the section list itself —\n * no host data layer. (Plain fetch + useEffect, the DeliveryLists pattern.)\n *\n * The view renders ONLY its body + its OWN controls (the RAG `<DocSearchBar>` +\n * dynamic section pills — onboarding's controls are content-driven, unlike the\n * static search/filter the `DevSectionView` chrome ships). It does NOT render the\n * page chrome: the CALLER wraps it in `<DevSectionPage sectionKey=\"onboarding\">`\n * (hero + back button), exactly like the roadmap / releases / delivery pages — so\n * every dev-center surface composes the same way and the view stays embeddable in\n * tabbed contexts. Card hrefs flow through `runtime.composeContentUrl`.\n */\n\nimport { useMemo, useTransition, type ReactNode } from 'react'\nimport { GraduationCap } from 'lucide-react'\n\nimport { useRouter, useSearchParams } from '../../embed-shims'\nimport { useSelfFetch } from '../../hooks/use-self-fetch'\nimport { DocSearchBar, useDocSearch } from '../shared/doc-search'\nimport { FilterPillRow } from '../ui/filter-pill-row'\nimport { LoadError } from '../ui/error-state'\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card'\nimport { OnboardingGuidesCatalogSkeleton } from './onboarding-guides-catalog-skeleton'\nimport { useChatRuntime } from '../../contexts/chat-runtime-context'\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide'\nimport { resolveContentHref } from '../../utils/content-href'\n\ntype SectionSummary = { section: string; section_order: number; count: number }\n\nexport interface OnboardingGuidesCatalogViewProps {\n /** Controlled / SSR: server-fetched guides. Omit + pass `guidesEndpoint`\n * for the self-fetching config-only mode. */\n initialGuides?: OnboardingGuide[]\n initialSections?: SectionSummary[]\n initialSection?: string\n /** Self-fetch: GET list endpoint (the api route). Appends `?section=`. */\n guidesEndpoint?: string\n /** Self-fetch: GET section-summary endpoint (the api route). */\n sectionsEndpoint?: string\n /** Optional per-row card renderer override. */\n renderCard?: (guide: OnboardingGuide) => ReactNode\n /** Base path the catalog is mounted under (fallback href prefix + `?section=`\n * push target). Default `/onboarding-guides`. */\n basePath?: string\n}\n\nexport function OnboardingGuidesCatalogView({\n initialGuides,\n initialSections,\n initialSection = '',\n guidesEndpoint,\n sectionsEndpoint,\n renderCard,\n basePath = '/onboarding-guides',\n}: OnboardingGuidesCatalogViewProps) {\n const router = useRouter()\n const searchParams = useSearchParams()\n const [isPending, startTransition] = useTransition()\n const runtime = useChatRuntime()\n\n // Self-fetch only when the host supplied NO data but DID give an endpoint.\n const selfFetch = initialGuides === undefined && guidesEndpoint !== undefined\n // Active section: from the URL when self-fetching, from the prop (host RSC\n // already read the URL server-side) when controlled.\n const sectionValue = selfFetch ? searchParams.get('section') ?? '' : initialSection\n const activeSection = sectionValue || 'all'\n\n // Self-fetch the guides (refetched whenever `?section=` changes — it's folded\n // into the url) + the section summaries. Controlled mode passes `null` urls so\n // the hook never fetches. The guides fetch carries the error/retry affordance.\n const guidesQs = sectionValue ? `?section=${encodeURIComponent(sectionValue)}` : ''\n const guidesRes = useSelfFetch<{ data?: OnboardingGuide[] }>(\n selfFetch && guidesEndpoint ? `${guidesEndpoint}${guidesQs}` : null,\n )\n const sectionsRes = useSelfFetch<SectionSummary[]>(\n selfFetch && sectionsEndpoint ? sectionsEndpoint : null,\n )\n\n // Invariant: `guidesRes.data` is `null` until the first fetch resolves, then\n // `{ data: [...] }`. The `?.data ?? []` chain collapses never-fetched (null) and\n // legitimately-empty ([]) to the same `[]` — so the first-load skeleton gate below\n // keys on the OUTER `guidesRes.data == null` to distinguish them (an empty section\n // toggle keeps the chrome; only a true cold start shows the full-page skeleton).\n const guides = initialGuides ?? guidesRes.data?.data ?? []\n const sections = initialSections ?? (Array.isArray(sectionsRes.data) ? sectionsRes.data : [])\n const isLoading = selfFetch ? guidesRes.isLoading : false\n\n // Section grouping. Data arrives already filtered (server-side `?section=`\n // for the host, or our `?section=` fetch); this just buckets visible rows.\n const grouped = useMemo(() => {\n const map = new Map<string, { section_order: number; guides: OnboardingGuide[] }>()\n for (const g of guides) {\n const existing = map.get(g.section)\n if (existing) {\n if (g.section_order < existing.section_order) existing.section_order = g.section_order\n existing.guides.push(g)\n } else {\n map.set(g.section, { section_order: g.section_order, guides: [g] })\n }\n }\n for (const entry of map.values()) {\n entry.guides.sort((a, b) => a.step_order - b.step_order || a.title.localeCompare(b.title))\n }\n return Array.from(map.entries())\n .map(([section, info]) => ({ section, ...info }))\n .sort((a, b) => a.section_order - b.section_order || a.section.localeCompare(b.section))\n }, [guides])\n\n const sectionFilterOptions = useMemo(\n () => [\n { value: 'all', label: `All (${guides.length})` },\n ...sections.map((s) => ({ value: s.section, label: `${s.section} (${s.count})` })),\n ],\n [guides.length, sections],\n )\n\n // Section pill change → push `?section=X`. Controlled mode: host RSC\n // re-fetches. Self-fetch mode: our guides effect re-fetches on the URL change.\n const setSection = (value: string) => {\n const params = new URLSearchParams(searchParams.toString())\n if (value === 'all') {\n params.delete('section')\n } else {\n params.set('section', value)\n }\n const qs = params.toString()\n startTransition(() => {\n router.push(qs ? `${basePath}?${qs}` : basePath)\n })\n }\n\n // Search bar — scoped to onboarding-guides only via RAG-search `tableIds`.\n const source = runtime?.source ?? 'openframe'\n const docSearch = useDocSearch({\n source,\n baseRoute: basePath,\n onNavigate: (path) => router.push(path),\n tableIds: ['onboarding-guides'],\n })\n\n // Per-row card renderer — runtime-composed href, fallback to relative.\n const defaultRenderCard = (guide: OnboardingGuide) => {\n const cta = resolveContentHref(runtime?.composeContentUrl, {\n type: 'onboarding_guide',\n slug: guide.slug,\n basePath,\n platforms: guide.onboarding_guide_platforms,\n })\n return (\n <OnboardingGuideCard\n guide={guide}\n href={cta.href}\n targetPlatform={cta.targetPlatform}\n size=\"catalog\"\n />\n )\n }\n const renderCardFn = renderCard ?? defaultRenderCard\n\n const preControls = (\n <div className=\"space-y-4\">\n <DocSearchBar\n placeholder=\"Search onboarding guides, releases, case studies…\"\n query={docSearch.query}\n onQueryChange={docSearch.setQuery}\n results={docSearch.results}\n isLoading={docSearch.isLoading}\n onResultSelect={docSearch.handleResultSelect}\n showDropdown={docSearch.keepDropdownOpen}\n />\n {sections.length > 0 && (\n <FilterPillRow\n label=\"Section\"\n selectedValue={activeSection}\n onValueChange={setSection}\n options={sectionFilterOptions}\n />\n )}\n </div>\n )\n\n // A failed guides fetch → a RETRYABLE error (not the indistinguishable-from-\n // empty \"no guides found\" state) — parity with the sibling self-fetch views.\n if (selfFetch && guidesRes.error) {\n return <LoadError message=\"Failed to load onboarding guides.\" onRetry={guidesRes.reload} />\n }\n // Full-page skeleton ONLY on the very first load (no data has loaded yet) — a\n // later section toggle that legitimately returns ZERO guides keeps the page\n // chrome (search + section pills) and dims the grid via the className below.\n if (selfFetch && guidesRes.data == null && isLoading) {\n return <OnboardingGuidesCatalogSkeleton />\n }\n\n return (\n <div className=\"w-full flex flex-col gap-10\">\n {preControls}\n {guides.length === 0 ? (\n <div className=\"text-center py-16\">\n <GraduationCap className=\"h-12 w-12 text-ods-text-secondary mx-auto mb-4\" />\n <h2 className=\"text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold mb-2\">\n No onboarding guides found\n </h2>\n <p className=\"text-ods-text-secondary font-['DM_Sans'] text-[14px]\">\n {activeSection !== 'all'\n ? 'No guides in this section yet.'\n : \"We're working on the onboarding library. Check back soon.\"}\n </p>\n </div>\n ) : (\n <div className={isPending || isLoading ? 'opacity-60 transition-opacity space-y-10' : 'space-y-10'}>\n {grouped.map((sec) => (\n <section key={sec.section} className=\"space-y-4\">\n <h2 className=\"text-h3 tracking-[-0.36px] text-ods-text-primary flex items-center gap-2\">\n {sec.section}\n <span className=\"inline-flex items-center justify-center rounded-full bg-ods-text-secondary/20 text-ods-text-secondary text-xs font-medium px-2 py-0.5\">\n {sec.guides.length}\n </span>\n </h2>\n {/* HORIZONTAL catalog list — single column so consecutive steps\n read top-to-bottom; a grid would visually reorder them. */}\n <ul className=\"flex flex-col gap-4\">\n {sec.guides.map((guide) => (\n <li key={guide.id}>{renderCardFn(guide)}</li>\n ))}\n </ul>\n </section>\n ))}\n </div>\n )}\n </div>\n )\n}\n","'use client'\n\nimport { OnboardingGuideCardSkeleton } from '../chat/entity-cards/onboarding-guide-card'\n\n/**\n * Loading skeleton for `/onboarding-guides` — CHROME-LESS, exactly like the\n * loaded `<OnboardingGuidesCatalogView>`. The HOST page owns the\n * `<DevSectionPage sectionKey=\"onboarding\">` shell (hero + back button);\n * this component renders only what replaces the view: the search/pill\n * placeholder block and the section card lists.\n *\n * HISTORY: this used to mount its own `<DevSectionPage>` — nested inside the\n * page's shell that double-rendered the hero + back button during loading\n * (the view was made chrome-less in the page restructure; the skeleton was\n * missed). Keep BOTH chrome-less.\n *\n * Wrapper mirrors the loaded view's `w-full flex flex-col gap-10`; per-card\n * height matches the loaded catalog card so resolve shifts are zero.\n */\nexport function OnboardingGuidesCatalogSkeleton() {\n return (\n <div className=\"w-full flex flex-col gap-10 animate-pulse\">\n {/* Search input placeholder — matches `<SearchInput>` h-12 — plus the\n section pill row (~74 px incl. padding), same as the loaded\n preControls block. */}\n <div className=\"space-y-4\">\n <div className=\"h-12 w-full bg-ods-card border border-ods-border rounded-md\" />\n <div className=\"flex flex-wrap items-center gap-3 p-4 bg-ods-card border border-ods-border rounded-lg\">\n <div className=\"h-4 w-14 bg-ods-border/60 rounded\" />\n {[0, 1, 2, 3].map((i) => (\n <div\n key={i}\n className=\"h-10 w-24 bg-ods-card border border-ods-border rounded-md\"\n />\n ))}\n </div>\n </div>\n <div className=\"space-y-10\">\n {[4, 3, 3].map((cardCount, sectionIdx) => (\n <section key={sectionIdx} className=\"space-y-4\">\n <h2 className=\"text-h3 tracking-[-0.36px] text-ods-text-primary flex items-center gap-2\">\n <span className=\"h-6 w-40 bg-ods-border/70 rounded\" />\n <span className=\"h-5 w-8 bg-ods-text-secondary/20 rounded-full\" />\n </h2>\n <ul className=\"flex flex-col gap-4\">\n {Array.from({ length: cardCount }).map((_, cardIdx) => (\n <li key={cardIdx}>\n <OnboardingGuideCardSkeleton size=\"catalog\" />\n </li>\n ))}\n </ul>\n </section>\n ))}\n </div>\n </div>\n )\n}\n","'use client'\n\n/**\n * Public-facing detail view for `/onboarding-guides/<slug>`.\n *\n * Two modes:\n * - **controlled** (hub SSR): pass `initialData` (a server-fetched guide).\n * - **self-fetching** (config-only embed): pass `slug` + `guideEndpoint`\n * (the api route) and the view fetches the guide itself — no host data\n * layer. (Plain fetch + useEffect, the DeliveryLists pattern.)\n *\n * Everything else flows through lib primitives + the ChatRuntime context\n * (markdown, video warmup, captions, related-card hrefs via\n * `runtime.composeContentUrl`). Optional `MarkdownRenderer` lets hosts swap a\n * renderer with extra plugins.\n */\n\nimport { type ComponentType, type ReactNode } from 'react'\nimport { PageLayout } from '../layout/page-layout'\n\nimport { useRouter } from '../../embed-shims'\n// PageShell (max-w-[1920px]) — the guide detail content must share the SAME\n// container sizing as the related-content/FAQ rail the host page renders\n// below it (which uses the wide shell). ArticleDetailLayout (1280px) made\n// the detail block visibly narrower than the rail.\nimport { PageShell } from '../layout/article-detail-layout'\nimport { DetailPageSkeleton } from '../shared/detail-page-skeleton'\nimport { EntityVideoSection } from '../features/entity-video-section'\nimport { VideoBitesDisplay } from '../features/video-bites-display'\nimport { useVideoWarmup } from '../features/use-video-warmup'\nimport { getCaptionsUrl } from '../features/captions-url'\nimport { RichMarkdownRenderer } from '../ui/rich-markdown-renderer'\nimport { EntityTagBadges } from '../features/entity-tag-badges'\nimport { LoadError } from '../ui/error-state'\nimport { ArticleAuthorByline } from '../shared/article-author-byline'\nimport { EntityAuthorCard } from '../chat/entity-cards/entity-author-card'\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card'\nimport { useChatRuntime } from '../../contexts/chat-runtime-context'\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide'\nimport type { VideoTeaser } from '../../types/video-processing'\nimport { resolveContentHref } from '../../utils/content-href'\nimport { buildOgPlaceholderUrl } from '../../utils/og-placeholder'\nimport { useSelfFetch } from '../../hooks/use-self-fetch'\n\nexport interface OnboardingGuideDetailViewProps {\n /** Server-fetched guide (controlled / SSR mode). Omit it and pass\n * `slug` + `guideEndpoint` for the self-fetching config-only mode. */\n initialData?: OnboardingGuide\n /** Self-fetch: the guide's slug (the host reads it from its route). */\n slug?: string\n /** Self-fetch: builds the GET url for a single guide (the api route).\n * e.g. `(s) => \\`/content/api/onboarding-guides/${s}\\``. */\n guideEndpoint?: (slug: string) => string\n related?: OnboardingGuide[]\n /** Link target for the author name in the metadata grid — the host\n * computes it (public author page; absent ⇒ plain text). */\n authorHref?: string\n /** Bio paragraph for the end-of-article author byline. Defaults to the\n * guide payload's `author.about` (hubs that hydrate it can omit this). */\n authorBio?: string | null\n /** Byline fallback paragraph when the bio is empty — the host passes its\n * platform-aware copy (the lib has no config awareness). Absent ⇒ the\n * byline renders nothing below the name when the bio is empty. */\n fallbackBio?: string | null\n /** Optional markdown renderer override. Defaults to lib\n * `<RichMarkdownRenderer>`. */\n MarkdownRenderer?: ComponentType<{ content: string }>\n /** Optional per-row related-card renderer override. */\n renderRelatedCard?: (guide: OnboardingGuide) => ReactNode\n /** Back-link target. Defaults to `basePath`. */\n backHref?: string\n /** Back-link label. Defaults to \"Back to Getting Started\". */\n backLabel?: string\n /** Base path the related-card hrefs default to when\n * `runtime.composeContentUrl` is not wired. Default `/onboarding-guides`. */\n basePath?: string\n /** Optional slot rendered inside the page chrome, BELOW the article + related\n * guides — e.g. the hub's cross-type related-content / FAQ rail. Lets the hub\n * mount this view directly (no local wrapper); embedders omit it. */\n relatedContent?: ReactNode\n /** Render the standalone `<PageShell>`. Default true. Pass false when the host\n * layout already provides the page container — only the padding box renders,\n * avoiding a nested `<main>`. */\n shell?: boolean\n}\n\nexport function OnboardingGuideDetailView({\n authorHref,\n authorBio,\n fallbackBio,\n initialData,\n slug,\n guideEndpoint,\n related = [],\n MarkdownRenderer = RichMarkdownRenderer,\n renderRelatedCard,\n backHref,\n backLabel = 'Back to Getting Started',\n basePath = '/onboarding-guides',\n relatedContent,\n shell = true,\n}: OnboardingGuideDetailViewProps) {\n const resolvedBackHref = backHref ?? basePath\n const runtime = useChatRuntime()\n const router = useRouter()\n // `shell` true → standalone `<PageShell>`; false → padding-only box (no nested\n // <main>) for hosts whose layout already provides the container.\n const renderShell = (node: ReactNode) =>\n shell ? <PageShell>{node}</PageShell> : <div className=\"page-shell-content\">{node}</div>\n\n // Controlled (hub SSR `initialData`) OR self-fetch by slug (config-only embed).\n const url = initialData ? null : slug && guideEndpoint ? guideEndpoint(slug) : null\n const { data: guide, isLoading, error, reload } = useSelfFetch<OnboardingGuide>(url, { initialData })\n\n // Hooks must run unconditionally — feed them optional-chained values so they\n // no-op while the guide is still loading.\n const { ref: videoWarmupRef } = useVideoWarmup<HTMLDivElement>({\n videoUrl: guide?.main_video_url,\n supabaseStorageOrigin: runtime?.endpoints.supabaseStorageOrigin,\n })\n\n if (error || (!guide && !isLoading)) {\n return renderShell(<LoadError message=\"Guide not found.\" onRetry={reload} />)\n }\n if (!guide) {\n // Skeleton (not a bare \"Loading…\") for parity with every other shared view —\n // catalog, roadmap, releases all render a skeleton on first load, so the detail\n // page shouldn't flash text then content. `bare` + `PageShell` so the loading\n // state matches the loaded page's full width / padding / min-height.\n return renderShell(\n // Match the loaded page's top offset (TitleBlock's\n // `pt-[var(--spacing-system-l)]`) so content doesn't jump on load.\n <div className=\"pt-[var(--spacing-system-l)]\">\n <DetailPageSkeleton bare showImageGallery={false} />\n </div>\n )\n }\n\n const captionsUrl = getCaptionsUrl('onboarding_guide', guide.id, guide.srt_content)\n\n const videoPoster =\n guide.main_video_thumbnail ||\n guide.featured_image ||\n guide.og_image_url ||\n // `buildOgPlaceholderUrl` always returns a usable string (relative route at\n // worst), so it's the terminal fallback — no trailing `|| undefined` needed.\n buildOgPlaceholderUrl(runtime?.endpoints, guide.title, { aspect: 'wide' })\n\n const defaultRenderRelatedCard = (g: OnboardingGuide) => {\n const cta = resolveContentHref(runtime?.composeContentUrl, {\n type: 'onboarding_guide',\n slug: g.slug,\n basePath,\n platforms: g.onboarding_guide_platforms,\n })\n return <OnboardingGuideCard guide={g} href={cta.href} targetPlatform={cta.targetPlatform} />\n }\n const renderRelatedCardFn = renderRelatedCard ?? defaultRenderRelatedCard\n\n return renderShell(\n <PageLayout\n title={guide.title}\n titleSize=\"h1\"\n backButton={{ label: backLabel, onClick: () => router.push(resolvedBackHref) }}\n >\n {/* Tags — flat onboarding_guide_tags[] from entity_tags. */}\n <EntityTagBadges tags={(guide as any).onboarding_guide_tags} />\n\n {/* Metadata grid — Section · Step | Published | Author. */}\n <EntityAuthorCard\n author={guide.author}\n authorHref={authorHref}\n publishedAt={guide.published_at}\n extraCells={[\n {\n value: `${guide.section} · Step ${guide.step_order}`,\n label: 'Section',\n uppercase: false,\n },\n ]}\n />\n\n {/* Video. `main_video_url` (Mux/MP4) and `youtube_url` are independent\n columns — either populated renders the player. */}\n {(guide.main_video_url || guide.youtube_url) && (\n <div ref={videoWarmupRef}>\n <EntityVideoSection\n mainVideoUrl={guide.main_video_url}\n youtubeUrl={guide.youtube_url || undefined}\n highlightVideoUrl={guide.highlight_video_url}\n mainVideoPoster={videoPoster}\n highlightVideoThumbnail={guide.highlight_video_thumbnail || undefined}\n videoSummary={undefined}\n videoBites={undefined}\n title={guide.title}\n srtContent={guide.srt_content}\n captionsUrl={captionsUrl}\n MarkdownRenderer={MarkdownRenderer}\n />\n </div>\n )}\n\n {/* Markdown body */}\n {guide.content && (\n <div className=\"space-y-4\">\n <MarkdownRenderer content={guide.content} />\n </div>\n )}\n\n {/* Video Bites */}\n {guide.video_bites && guide.video_bites.length > 0 && (\n <VideoBitesDisplay\n bites={guide.video_bites as VideoTeaser[]}\n filterPublished={true}\n showTitle={false}\n />\n )}\n\n {/* End-of-article author byline (avatar + linked name + bio) — the\n author DESCRIPTION block every article-shaped detail page renders.\n Hidden when the guide has no author (the byline returns null). */}\n <ArticleAuthorByline\n author={guide.author?.full_name ?? null}\n avatar={guide.author?.avatar_url}\n jobTitle={guide.author?.job_title}\n bio={authorBio ?? guide.author?.about}\n href={authorHref}\n fallbackBio={fallbackBio}\n />\n\n {/* Related — same-section, ordered by step. */}\n {related.length > 0 && (\n <div className=\"space-y-4 pt-8 border-t border-ods-border\">\n <h2 className=\"text-h3 tracking-[-0.36px] text-ods-text-primary\">\n More in {guide.section}\n </h2>\n <ul className=\"flex flex-col gap-3\">\n {related.map((r) => (\n <li key={r.id}>{renderRelatedCardFn(r)}</li>\n ))}\n </ul>\n </div>\n )}\n\n {/* Host slot — cross-type related-content / FAQ rail. */}\n {relatedContent}\n </PageLayout>\n )\n}\n","'use client'\n\n/**\n * React Query hooks for Onboarding Guides — PUBLIC reads only.\n *\n * Admin mutations (create/update/delete/publish/stats/save-highlight)\n * stay HUB-side in `hooks/use-onboarding-guides.ts` and import the\n * `onboardingGuideKeys.admin` sub-namespace from this module so the\n * cache namespace `['onboarding-guides']` has a single source of truth.\n *\n * Endpoints (`/api/onboarding-guides*`) are host-supplied — non-Next.js\n * embedders must reverse-proxy the same routes. Same precedent as the\n * tickets list hook.\n */\n\nimport { useQuery } from '@tanstack/react-query'\n\nimport type {\n OnboardingGuide,\n OnboardingGuideFilters,\n OnboardingGuideListResponse,\n OnboardingGuideSectionSummary,\n} from '../../chat/types/entities/onboarding-guide'\n\n/**\n * Cache key builder for the `['onboarding-guides']` namespace.\n *\n * Includes BOTH public-read sub-keys (`lists`, `list`, `details`,\n * `detail`, `sections`) AND the `admin` sub-namespace. Admin mutations\n * live hub-side but invalidate against this same builder so a single\n * `qc.invalidateQueries({ queryKey: onboardingGuideKeys.all })` from\n * an admin hook also clears the public read cache.\n */\nexport const onboardingGuideKeys = {\n all: ['onboarding-guides'] as const,\n lists: () => [...onboardingGuideKeys.all, 'list'] as const,\n list: (filters: OnboardingGuideFilters) =>\n [...onboardingGuideKeys.lists(), filters] as const,\n details: () => [...onboardingGuideKeys.all, 'detail'] as const,\n detail: (slug: string) => [...onboardingGuideKeys.details(), slug] as const,\n sections: () => [...onboardingGuideKeys.all, 'sections'] as const,\n admin: {\n all: ['admin', 'onboarding-guides'] as const,\n lists: () => ['admin', 'onboarding-guides', 'list'] as const,\n detail: (slug: string) =>\n ['admin', 'onboarding-guide', slug] as const,\n stats: () => ['admin', 'onboarding-guides', 'stats'] as const,\n },\n}\n\nexport function useOnboardingGuides(filters?: OnboardingGuideFilters) {\n return useQuery({\n queryKey: onboardingGuideKeys.list(filters || {}),\n queryFn: async (): Promise<OnboardingGuideListResponse> => {\n const params = new URLSearchParams()\n if (filters?.search) params.set('search', filters.search)\n if (filters?.section) params.set('section', filters.section)\n if (filters?.limit) params.set('limit', filters.limit.toString())\n if (filters?.offset) params.set('offset', filters.offset.toString())\n const res = await fetch(`/api/onboarding-guides?${params}`)\n if (!res.ok) throw new Error('Failed to fetch onboarding guides')\n return res.json()\n },\n })\n}\n\nexport function useOnboardingGuide(slug: string | undefined) {\n return useQuery({\n queryKey: onboardingGuideKeys.detail(slug || ''),\n queryFn: async (): Promise<OnboardingGuide> => {\n const res = await fetch(`/api/onboarding-guides/${slug}`)\n if (!res.ok) throw new Error('Failed to fetch onboarding guide')\n return res.json()\n },\n enabled: !!slug,\n })\n}\n\nexport function useOnboardingGuideSections() {\n return useQuery({\n queryKey: onboardingGuideKeys.sections(),\n queryFn: async (): Promise<OnboardingGuideSectionSummary[]> => {\n const res = await fetch('/api/onboarding-guides/sections')\n if (!res.ok)\n throw new Error('Failed to fetch onboarding-guide sections')\n return res.json()\n },\n staleTime: 0,\n })\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-SKK3C6RE.cjs","../src/components/onboarding-guides/onboarding-guides-catalog-view.tsx","../src/components/onboarding-guides/onboarding-guides-catalog-skeleton.tsx","../src/components/onboarding-guides/onboarding-guide-detail-view.tsx","../src/components/onboarding-guides/hooks/use-onboarding-guides.ts"],"names":["jsx","jsxs"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACjBA,8BAAuD;AACvD,2CAA8B;ADmB9B;AACA;AEjBQ,+CAAA;AAPD,SAAS,+BAAA,CAAA,EAAkC;AAChD,EAAA,uBACE,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,2CAAA,EAIb,QAAA,EAAA;AAAA,oBAAA,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,WAAA,EACb,QAAA,EAAA;AAAA,sBAAA,6BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,8DAAA,CAA8D,CAAA;AAAA,sBAC7E,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,uFAAA,EACb,QAAA,EAAA;AAAA,wBAAA,6BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,oCAAA,CAAoC,CAAA;AAAA,QAClD,CAAC,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,CAAC,CAAA,CAAE,GAAA,CAAI,CAAC,CAAA,EAAA,mBACjB,6BAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YAEC,SAAA,EAAU;AAAA,UAAA,CAAA;AAAA,UADL;AAAA,QAEP,CACD;AAAA,MAAA,EAAA,CACH;AAAA,IAAA,EAAA,CACF,CAAA;AAAA,oBACA,6BAAA,KAAC,EAAA,EAAI,SAAA,EAAU,YAAA,EACZ,QAAA,EAAA,CAAC,CAAA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W,IAAA;AACZ,EAAA;AACH;AJsS+E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-SKK3C6RE.cjs","sourcesContent":[null,"'use client'\n\n/**\n * Public-facing catalog view for `/onboarding-guides`.\n *\n * Two data modes:\n * - **controlled** (hub SSR): pass `initialGuides` + `initialSections`\n * (server-fetched; section changes re-render the host with new props).\n * - **self-fetching** (config-only embed): omit the data props and pass\n * `guidesEndpoint` + `sectionsEndpoint` (the api routes). The view fetches\n * the guides (refetching on `?section=` change) + the section list itself —\n * no host data layer. (Plain fetch + useEffect, the DeliveryLists pattern.)\n *\n * The view renders ONLY its body + its OWN controls (the RAG `<DocSearchBar>` +\n * dynamic section pills — onboarding's controls are content-driven, unlike the\n * static search/filter the `DevSectionView` chrome ships). It does NOT render the\n * page chrome: the CALLER wraps it in `<DevSectionPage sectionKey=\"onboarding\">`\n * (hero + back button), exactly like the roadmap / releases / delivery pages — so\n * every dev-center surface composes the same way and the view stays embeddable in\n * tabbed contexts. Card hrefs flow through `runtime.composeContentUrl`.\n */\n\nimport { useMemo, useTransition, type ReactNode } from 'react'\nimport { GraduationCap } from 'lucide-react'\n\nimport { useRouter, useSearchParams } from '../../embed-shims'\nimport { useSelfFetch } from '../../hooks/use-self-fetch'\nimport { DocSearchBar, useDocSearch } from '../shared/doc-search'\nimport { FilterPillRow } from '../ui/filter-pill-row'\nimport { LoadError } from '../ui/error-state'\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card'\nimport { OnboardingGuidesCatalogSkeleton } from './onboarding-guides-catalog-skeleton'\nimport { useChatRuntime } from '../../contexts/chat-runtime-context'\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide'\nimport { resolveContentHref } from '../../utils/content-href'\n\ntype SectionSummary = { section: string; section_order: number; count: number }\n\nexport interface OnboardingGuidesCatalogViewProps {\n /** Controlled / SSR: server-fetched guides. Omit + pass `guidesEndpoint`\n * for the self-fetching config-only mode. */\n initialGuides?: OnboardingGuide[]\n initialSections?: SectionSummary[]\n initialSection?: string\n /** Self-fetch: GET list endpoint (the api route). Appends `?section=`. */\n guidesEndpoint?: string\n /** Self-fetch: GET section-summary endpoint (the api route). */\n sectionsEndpoint?: string\n /** Optional per-row card renderer override. */\n renderCard?: (guide: OnboardingGuide) => ReactNode\n /** Base path the catalog is mounted under (fallback href prefix + `?section=`\n * push target). Default `/onboarding-guides`. */\n basePath?: string\n}\n\nexport function OnboardingGuidesCatalogView({\n initialGuides,\n initialSections,\n initialSection = '',\n guidesEndpoint,\n sectionsEndpoint,\n renderCard,\n basePath = '/onboarding-guides',\n}: OnboardingGuidesCatalogViewProps) {\n const router = useRouter()\n const searchParams = useSearchParams()\n const [isPending, startTransition] = useTransition()\n const runtime = useChatRuntime()\n\n // Self-fetch only when the host supplied NO data but DID give an endpoint.\n const selfFetch = initialGuides === undefined && guidesEndpoint !== undefined\n // Active section: from the URL when self-fetching, from the prop (host RSC\n // already read the URL server-side) when controlled.\n const sectionValue = selfFetch ? searchParams.get('section') ?? '' : initialSection\n const activeSection = sectionValue || 'all'\n\n // Self-fetch the guides (refetched whenever `?section=` changes — it's folded\n // into the url) + the section summaries. Controlled mode passes `null` urls so\n // the hook never fetches. The guides fetch carries the error/retry affordance.\n const guidesQs = sectionValue ? `?section=${encodeURIComponent(sectionValue)}` : ''\n const guidesRes = useSelfFetch<{ data?: OnboardingGuide[] }>(\n selfFetch && guidesEndpoint ? `${guidesEndpoint}${guidesQs}` : null,\n )\n const sectionsRes = useSelfFetch<SectionSummary[]>(\n selfFetch && sectionsEndpoint ? sectionsEndpoint : null,\n )\n\n // Invariant: `guidesRes.data` is `null` until the first fetch resolves, then\n // `{ data: [...] }`. The `?.data ?? []` chain collapses never-fetched (null) and\n // legitimately-empty ([]) to the same `[]` — so the first-load skeleton gate below\n // keys on the OUTER `guidesRes.data == null` to distinguish them (an empty section\n // toggle keeps the chrome; only a true cold start shows the full-page skeleton).\n const guides = initialGuides ?? guidesRes.data?.data ?? []\n const sections = initialSections ?? (Array.isArray(sectionsRes.data) ? sectionsRes.data : [])\n const isLoading = selfFetch ? guidesRes.isLoading : false\n\n // Section grouping. Data arrives already filtered (server-side `?section=`\n // for the host, or our `?section=` fetch); this just buckets visible rows.\n const grouped = useMemo(() => {\n const map = new Map<string, { section_order: number; guides: OnboardingGuide[] }>()\n for (const g of guides) {\n const existing = map.get(g.section)\n if (existing) {\n if (g.section_order < existing.section_order) existing.section_order = g.section_order\n existing.guides.push(g)\n } else {\n map.set(g.section, { section_order: g.section_order, guides: [g] })\n }\n }\n for (const entry of map.values()) {\n entry.guides.sort((a, b) => a.step_order - b.step_order || a.title.localeCompare(b.title))\n }\n return Array.from(map.entries())\n .map(([section, info]) => ({ section, ...info }))\n .sort((a, b) => a.section_order - b.section_order || a.section.localeCompare(b.section))\n }, [guides])\n\n const sectionFilterOptions = useMemo(\n () => [\n { value: 'all', label: `All (${guides.length})` },\n ...sections.map((s) => ({ value: s.section, label: `${s.section} (${s.count})` })),\n ],\n [guides.length, sections],\n )\n\n // Section pill change → push `?section=X`. Controlled mode: host RSC\n // re-fetches. Self-fetch mode: our guides effect re-fetches on the URL change.\n const setSection = (value: string) => {\n const params = new URLSearchParams(searchParams.toString())\n if (value === 'all') {\n params.delete('section')\n } else {\n params.set('section', value)\n }\n const qs = params.toString()\n startTransition(() => {\n router.push(qs ? `${basePath}?${qs}` : basePath)\n })\n }\n\n // Search bar — scoped to onboarding-guides only via RAG-search `tableIds`.\n const source = runtime?.source ?? 'openframe'\n const docSearch = useDocSearch({\n source,\n baseRoute: basePath,\n onNavigate: (path) => router.push(path),\n tableIds: ['onboarding-guides'],\n })\n\n // Per-row card renderer — runtime-composed href, fallback to relative.\n const defaultRenderCard = (guide: OnboardingGuide) => {\n const cta = resolveContentHref(runtime?.composeContentUrl, {\n type: 'onboarding_guide',\n slug: guide.slug,\n basePath,\n platforms: guide.onboarding_guide_platforms,\n })\n return (\n <OnboardingGuideCard\n guide={guide}\n href={cta.href}\n targetPlatform={cta.targetPlatform}\n size=\"catalog\"\n />\n )\n }\n const renderCardFn = renderCard ?? defaultRenderCard\n\n const preControls = (\n <div className=\"space-y-4\">\n <DocSearchBar\n placeholder=\"Search onboarding guides, releases, case studies…\"\n query={docSearch.query}\n onQueryChange={docSearch.setQuery}\n results={docSearch.results}\n isLoading={docSearch.isLoading}\n onResultSelect={docSearch.handleResultSelect}\n showDropdown={docSearch.keepDropdownOpen}\n />\n {sections.length > 0 && (\n <FilterPillRow\n label=\"Section\"\n selectedValue={activeSection}\n onValueChange={setSection}\n options={sectionFilterOptions}\n />\n )}\n </div>\n )\n\n // A failed guides fetch → a RETRYABLE error (not the indistinguishable-from-\n // empty \"no guides found\" state) — parity with the sibling self-fetch views.\n if (selfFetch && guidesRes.error) {\n return <LoadError message=\"Failed to load onboarding guides.\" onRetry={guidesRes.reload} />\n }\n // Full-page skeleton ONLY on the very first load (no data has loaded yet) — a\n // later section toggle that legitimately returns ZERO guides keeps the page\n // chrome (search + section pills) and dims the grid via the className below.\n if (selfFetch && guidesRes.data == null && isLoading) {\n return <OnboardingGuidesCatalogSkeleton />\n }\n\n return (\n <div className=\"w-full flex flex-col gap-10\">\n {preControls}\n {guides.length === 0 ? (\n <div className=\"text-center py-16\">\n <GraduationCap className=\"h-12 w-12 text-ods-text-secondary mx-auto mb-4\" />\n <h2 className=\"text-ods-text-primary font-['DM_Sans'] text-[20px] font-semibold mb-2\">\n No onboarding guides found\n </h2>\n <p className=\"text-ods-text-secondary font-['DM_Sans'] text-[14px]\">\n {activeSection !== 'all'\n ? 'No guides in this section yet.'\n : \"We're working on the onboarding library. Check back soon.\"}\n </p>\n </div>\n ) : (\n <div className={isPending || isLoading ? 'opacity-60 transition-opacity space-y-10' : 'space-y-10'}>\n {grouped.map((sec) => (\n <section key={sec.section} className=\"space-y-4\">\n <h2 className=\"text-h3 tracking-[-0.36px] text-ods-text-primary flex items-center gap-2\">\n {sec.section}\n <span className=\"inline-flex items-center justify-center rounded-full bg-ods-text-secondary/20 text-ods-text-secondary text-xs font-medium px-2 py-0.5\">\n {sec.guides.length}\n </span>\n </h2>\n {/* HORIZONTAL catalog list — single column so consecutive steps\n read top-to-bottom; a grid would visually reorder them. */}\n <ul className=\"flex flex-col gap-4\">\n {sec.guides.map((guide) => (\n <li key={guide.id}>{renderCardFn(guide)}</li>\n ))}\n </ul>\n </section>\n ))}\n </div>\n )}\n </div>\n )\n}\n","'use client'\n\nimport { OnboardingGuideCardSkeleton } from '../chat/entity-cards/onboarding-guide-card'\n\n/**\n * Loading skeleton for `/onboarding-guides` — CHROME-LESS, exactly like the\n * loaded `<OnboardingGuidesCatalogView>`. The HOST page owns the\n * `<DevSectionPage sectionKey=\"onboarding\">` shell (hero + back button);\n * this component renders only what replaces the view: the search/pill\n * placeholder block and the section card lists.\n *\n * HISTORY: this used to mount its own `<DevSectionPage>` — nested inside the\n * page's shell that double-rendered the hero + back button during loading\n * (the view was made chrome-less in the page restructure; the skeleton was\n * missed). Keep BOTH chrome-less.\n *\n * Wrapper mirrors the loaded view's `w-full flex flex-col gap-10`; per-card\n * height matches the loaded catalog card so resolve shifts are zero.\n */\nexport function OnboardingGuidesCatalogSkeleton() {\n return (\n <div className=\"w-full flex flex-col gap-10 animate-pulse\">\n {/* Search input placeholder — matches `<SearchInput>` h-12 — plus the\n section pill row (~74 px incl. padding), same as the loaded\n preControls block. */}\n <div className=\"space-y-4\">\n <div className=\"h-12 w-full bg-ods-card border border-ods-border rounded-md\" />\n <div className=\"flex flex-wrap items-center gap-3 p-4 bg-ods-card border border-ods-border rounded-lg\">\n <div className=\"h-4 w-14 bg-ods-border/60 rounded\" />\n {[0, 1, 2, 3].map((i) => (\n <div\n key={i}\n className=\"h-10 w-24 bg-ods-card border border-ods-border rounded-md\"\n />\n ))}\n </div>\n </div>\n <div className=\"space-y-10\">\n {[4, 3, 3].map((cardCount, sectionIdx) => (\n <section key={sectionIdx} className=\"space-y-4\">\n <h2 className=\"text-h3 tracking-[-0.36px] text-ods-text-primary flex items-center gap-2\">\n <span className=\"h-6 w-40 bg-ods-border/70 rounded\" />\n <span className=\"h-5 w-8 bg-ods-text-secondary/20 rounded-full\" />\n </h2>\n <ul className=\"flex flex-col gap-4\">\n {Array.from({ length: cardCount }).map((_, cardIdx) => (\n <li key={cardIdx}>\n <OnboardingGuideCardSkeleton size=\"catalog\" />\n </li>\n ))}\n </ul>\n </section>\n ))}\n </div>\n </div>\n )\n}\n","'use client'\n\n/**\n * Public-facing detail view for `/onboarding-guides/<slug>`.\n *\n * Two modes:\n * - **controlled** (hub SSR): pass `initialData` (a server-fetched guide).\n * - **self-fetching** (config-only embed): pass `slug` + `guideEndpoint`\n * (the api route) and the view fetches the guide itself — no host data\n * layer. (Plain fetch + useEffect, the DeliveryLists pattern.)\n *\n * Everything else flows through lib primitives + the ChatRuntime context\n * (markdown, video warmup, captions, related-card hrefs via\n * `runtime.composeContentUrl`). Optional `MarkdownRenderer` lets hosts swap a\n * renderer with extra plugins.\n */\n\nimport { type ComponentType, type ReactNode } from 'react'\nimport { PageLayout } from '../layout/page-layout'\n\nimport { useRouter } from '../../embed-shims'\n// PageShell (max-w-[1920px]) — the guide detail content must share the SAME\n// container sizing as the related-content/FAQ rail the host page renders\n// below it (which uses the wide shell). ArticleDetailLayout (1280px) made\n// the detail block visibly narrower than the rail.\nimport { PageShell } from '../layout/article-detail-layout'\nimport { DetailPageSkeleton } from '../shared/detail-page-skeleton'\nimport { EntityVideoSection } from '../features/entity-video-section'\nimport { VideoBitesDisplay } from '../features/video-bites-display'\nimport { useVideoWarmup } from '../features/use-video-warmup'\nimport { getCaptionsUrl } from '../features/captions-url'\nimport { RichMarkdownRenderer } from '../ui/rich-markdown-renderer'\nimport { EntityTagBadges } from '../features/entity-tag-badges'\nimport { LoadError } from '../ui/error-state'\nimport { ArticleAuthorByline } from '../shared/article-author-byline'\nimport { EntityAuthorCard } from '../chat/entity-cards/entity-author-card'\nimport { OnboardingGuideCard } from '../chat/entity-cards/onboarding-guide-card'\nimport { useChatRuntime } from '../../contexts/chat-runtime-context'\nimport type { OnboardingGuide } from '../chat/types/entities/onboarding-guide'\nimport type { VideoTeaser } from '../../types/video-processing'\nimport { resolveContentHref } from '../../utils/content-href'\nimport { buildOgPlaceholderUrl } from '../../utils/og-placeholder'\nimport { useSelfFetch } from '../../hooks/use-self-fetch'\n\nexport interface OnboardingGuideDetailViewProps {\n /** Server-fetched guide (controlled / SSR mode). Omit it and pass\n * `slug` + `guideEndpoint` for the self-fetching config-only mode. */\n initialData?: OnboardingGuide\n /** Self-fetch: the guide's slug (the host reads it from its route). */\n slug?: string\n /** Self-fetch: builds the GET url for a single guide (the api route).\n * e.g. `(s) => \\`/content/api/onboarding-guides/${s}\\``. */\n guideEndpoint?: (slug: string) => string\n related?: OnboardingGuide[]\n /** Link target for the author name in the metadata grid — the host\n * computes it (public author page; absent ⇒ plain text). */\n authorHref?: string\n /** Bio paragraph for the end-of-article author byline. Defaults to the\n * guide payload's `author.about` (hubs that hydrate it can omit this). */\n authorBio?: string | null\n /** Byline fallback paragraph when the bio is empty — the host passes its\n * platform-aware copy (the lib has no config awareness). Absent ⇒ the\n * byline renders nothing below the name when the bio is empty. */\n fallbackBio?: string | null\n /** Optional markdown renderer override. Defaults to lib\n * `<RichMarkdownRenderer>`. */\n MarkdownRenderer?: ComponentType<{ content: string }>\n /** Optional per-row related-card renderer override. */\n renderRelatedCard?: (guide: OnboardingGuide) => ReactNode\n /** Back-link target. Defaults to `basePath`. */\n backHref?: string\n /** Back-link label. Defaults to \"Back to Getting Started\". */\n backLabel?: string\n /** Base path the related-card hrefs default to when\n * `runtime.composeContentUrl` is not wired. Default `/onboarding-guides`. */\n basePath?: string\n /** Optional slot rendered inside the page chrome, BELOW the article + related\n * guides — e.g. the hub's cross-type related-content / FAQ rail. Lets the hub\n * mount this view directly (no local wrapper); embedders omit it. */\n relatedContent?: ReactNode\n /** Render the standalone `<PageShell>`. Default true. Pass false when the host\n * layout already provides the page container — only the padding box renders,\n * avoiding a nested `<main>`. */\n shell?: boolean\n}\n\nexport function OnboardingGuideDetailView({\n authorHref,\n authorBio,\n fallbackBio,\n initialData,\n slug,\n guideEndpoint,\n related = [],\n MarkdownRenderer = RichMarkdownRenderer,\n renderRelatedCard,\n backHref,\n backLabel = 'Back to Getting Started',\n basePath = '/onboarding-guides',\n relatedContent,\n shell = true,\n}: OnboardingGuideDetailViewProps) {\n const resolvedBackHref = backHref ?? basePath\n const runtime = useChatRuntime()\n const router = useRouter()\n // `shell` true → standalone `<PageShell>`; false → padding-only box (no nested\n // <main>) for hosts whose layout already provides the container.\n const renderShell = (node: ReactNode) =>\n shell ? <PageShell>{node}</PageShell> : <div className=\"page-shell-content\">{node}</div>\n\n // Controlled (hub SSR `initialData`) OR self-fetch by slug (config-only embed).\n const url = initialData ? null : slug && guideEndpoint ? guideEndpoint(slug) : null\n const { data: guide, isLoading, error, reload } = useSelfFetch<OnboardingGuide>(url, { initialData })\n\n // Hooks must run unconditionally — feed them optional-chained values so they\n // no-op while the guide is still loading.\n const { ref: videoWarmupRef } = useVideoWarmup<HTMLDivElement>({\n videoUrl: guide?.main_video_url,\n supabaseStorageOrigin: runtime?.endpoints.supabaseStorageOrigin,\n })\n\n if (error || (!guide && !isLoading)) {\n return renderShell(<LoadError message=\"Guide not found.\" onRetry={reload} />)\n }\n if (!guide) {\n // Skeleton (not a bare \"Loading…\") for parity with every other shared view —\n // catalog, roadmap, releases all render a skeleton on first load, so the detail\n // page shouldn't flash text then content. `bare` + `PageShell` so the loading\n // state matches the loaded page's full width / padding / min-height.\n return renderShell(\n // Match the loaded page's top offset (TitleBlock's\n // `pt-[var(--spacing-system-l)]`) so content doesn't jump on load.\n <div className=\"pt-[var(--spacing-system-l)]\">\n <DetailPageSkeleton bare showImageGallery={false} />\n </div>\n )\n }\n\n const captionsUrl = getCaptionsUrl('onboarding_guide', guide.id, guide.srt_content)\n\n const videoPoster =\n guide.main_video_thumbnail ||\n guide.featured_image ||\n guide.og_image_url ||\n // `buildOgPlaceholderUrl` always returns a usable string (relative route at\n // worst), so it's the terminal fallback — no trailing `|| undefined` needed.\n buildOgPlaceholderUrl(runtime?.endpoints, guide.title, { aspect: 'wide' })\n\n const defaultRenderRelatedCard = (g: OnboardingGuide) => {\n const cta = resolveContentHref(runtime?.composeContentUrl, {\n type: 'onboarding_guide',\n slug: g.slug,\n basePath,\n platforms: g.onboarding_guide_platforms,\n })\n return <OnboardingGuideCard guide={g} href={cta.href} targetPlatform={cta.targetPlatform} />\n }\n const renderRelatedCardFn = renderRelatedCard ?? defaultRenderRelatedCard\n\n return renderShell(\n <PageLayout\n title={guide.title}\n titleSize=\"h1\"\n backButton={{ label: backLabel, onClick: () => router.push(resolvedBackHref) }}\n >\n {/* Tags — flat onboarding_guide_tags[] from entity_tags. */}\n <EntityTagBadges tags={(guide as any).onboarding_guide_tags} />\n\n {/* Metadata grid — Section · Step | Published | Author. */}\n <EntityAuthorCard\n author={guide.author}\n authorHref={authorHref}\n publishedAt={guide.published_at}\n extraCells={[\n {\n value: `${guide.section} · Step ${guide.step_order}`,\n label: 'Section',\n uppercase: false,\n },\n ]}\n />\n\n {/* Video. `main_video_url` (Mux/MP4) and `youtube_url` are independent\n columns — either populated renders the player. */}\n {(guide.main_video_url || guide.youtube_url) && (\n <div ref={videoWarmupRef}>\n <EntityVideoSection\n mainVideoUrl={guide.main_video_url}\n youtubeUrl={guide.youtube_url || undefined}\n highlightVideoUrl={guide.highlight_video_url}\n mainVideoPoster={videoPoster}\n highlightVideoThumbnail={guide.highlight_video_thumbnail || undefined}\n videoSummary={undefined}\n videoBites={undefined}\n title={guide.title}\n srtContent={guide.srt_content}\n captionsUrl={captionsUrl}\n MarkdownRenderer={MarkdownRenderer}\n />\n </div>\n )}\n\n {/* Markdown body */}\n {guide.content && (\n <div className=\"space-y-4\">\n <MarkdownRenderer content={guide.content} />\n </div>\n )}\n\n {/* Video Bites */}\n {guide.video_bites && guide.video_bites.length > 0 && (\n <VideoBitesDisplay\n bites={guide.video_bites as VideoTeaser[]}\n filterPublished={true}\n showTitle={false}\n />\n )}\n\n {/* End-of-article author byline (avatar + linked name + bio) — the\n author DESCRIPTION block every article-shaped detail page renders.\n Hidden when the guide has no author (the byline returns null). */}\n <ArticleAuthorByline\n author={guide.author?.full_name ?? null}\n avatar={guide.author?.avatar_url}\n jobTitle={guide.author?.job_title}\n bio={authorBio ?? guide.author?.about}\n href={authorHref}\n fallbackBio={fallbackBio}\n />\n\n {/* Related — same-section, ordered by step. */}\n {related.length > 0 && (\n <div className=\"space-y-4 pt-8 border-t border-ods-border\">\n <h2 className=\"text-h3 tracking-[-0.36px] text-ods-text-primary\">\n More in {guide.section}\n </h2>\n <ul className=\"flex flex-col gap-3\">\n {related.map((r) => (\n <li key={r.id}>{renderRelatedCardFn(r)}</li>\n ))}\n </ul>\n </div>\n )}\n\n {/* Host slot — cross-type related-content / FAQ rail. */}\n {relatedContent}\n </PageLayout>\n )\n}\n","'use client'\n\n/**\n * React Query hooks for Onboarding Guides — PUBLIC reads only.\n *\n * Admin mutations (create/update/delete/publish/stats/save-highlight)\n * stay HUB-side in `hooks/use-onboarding-guides.ts` and import the\n * `onboardingGuideKeys.admin` sub-namespace from this module so the\n * cache namespace `['onboarding-guides']` has a single source of truth.\n *\n * Endpoints (`/api/onboarding-guides*`) are host-supplied — non-Next.js\n * embedders must reverse-proxy the same routes. Same precedent as the\n * tickets list hook.\n */\n\nimport { useQuery } from '@tanstack/react-query'\n\nimport type {\n OnboardingGuide,\n OnboardingGuideFilters,\n OnboardingGuideListResponse,\n OnboardingGuideSectionSummary,\n} from '../../chat/types/entities/onboarding-guide'\n\n/**\n * Cache key builder for the `['onboarding-guides']` namespace.\n *\n * Includes BOTH public-read sub-keys (`lists`, `list`, `details`,\n * `detail`, `sections`) AND the `admin` sub-namespace. Admin mutations\n * live hub-side but invalidate against this same builder so a single\n * `qc.invalidateQueries({ queryKey: onboardingGuideKeys.all })` from\n * an admin hook also clears the public read cache.\n */\nexport const onboardingGuideKeys = {\n all: ['onboarding-guides'] as const,\n lists: () => [...onboardingGuideKeys.all, 'list'] as const,\n list: (filters: OnboardingGuideFilters) =>\n [...onboardingGuideKeys.lists(), filters] as const,\n details: () => [...onboardingGuideKeys.all, 'detail'] as const,\n detail: (slug: string) => [...onboardingGuideKeys.details(), slug] as const,\n sections: () => [...onboardingGuideKeys.all, 'sections'] as const,\n admin: {\n all: ['admin', 'onboarding-guides'] as const,\n lists: () => ['admin', 'onboarding-guides', 'list'] as const,\n detail: (slug: string) =>\n ['admin', 'onboarding-guide', slug] as const,\n stats: () => ['admin', 'onboarding-guides', 'stats'] as const,\n },\n}\n\nexport function useOnboardingGuides(filters?: OnboardingGuideFilters) {\n return useQuery({\n queryKey: onboardingGuideKeys.list(filters || {}),\n queryFn: async (): Promise<OnboardingGuideListResponse> => {\n const params = new URLSearchParams()\n if (filters?.search) params.set('search', filters.search)\n if (filters?.section) params.set('section', filters.section)\n if (filters?.limit) params.set('limit', filters.limit.toString())\n if (filters?.offset) params.set('offset', filters.offset.toString())\n const res = await fetch(`/api/onboarding-guides?${params}`)\n if (!res.ok) throw new Error('Failed to fetch onboarding guides')\n return res.json()\n },\n })\n}\n\nexport function useOnboardingGuide(slug: string | undefined) {\n return useQuery({\n queryKey: onboardingGuideKeys.detail(slug || ''),\n queryFn: async (): Promise<OnboardingGuide> => {\n const res = await fetch(`/api/onboarding-guides/${slug}`)\n if (!res.ok) throw new Error('Failed to fetch onboarding guide')\n return res.json()\n },\n enabled: !!slug,\n })\n}\n\nexport function useOnboardingGuideSections() {\n return useQuery({\n queryKey: onboardingGuideKeys.sections(),\n queryFn: async (): Promise<OnboardingGuideSectionSummary[]> => {\n const res = await fetch('/api/onboarding-guides/sections')\n if (!res.ok)\n throw new Error('Failed to fetch onboarding-guide sections')\n return res.json()\n },\n staleTime: 0,\n })\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkTXVO2E5Ccjs = require('./chunk-TXVO2E5C.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ var _chunkFNPF5OQScjs = require('./chunk-FNPF5OQS.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk6OA77Y55cjs = require('./chunk-6OA77Y55.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -37,7 +37,7 @@ var _chunkYHDF4WMGcjs = require('./chunk-YHDF4WMG.cjs');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkASMOZBD6cjs = require('./chunk-ASMOZBD6.cjs');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
@@ -96,7 +96,7 @@ function TicketOpenForm({
|
|
|
96
96
|
}) {
|
|
97
97
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
98
98
|
const [content, setContent] = _react.useState.call(void 0, "");
|
|
99
|
-
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } =
|
|
99
|
+
const { attachments, readyAttachments, hasInflightUploads, addFiles, removeAttachment, clear } = _chunkASMOZBD6cjs.useChatAttachments.call(void 0, );
|
|
100
100
|
const trimmedSubject = subject.trim();
|
|
101
101
|
const trimmedContent = content.trim();
|
|
102
102
|
const overCap = content.length > TICKET_TEXT_MAX_CHARS;
|
|
@@ -116,7 +116,7 @@ function TicketOpenForm({
|
|
|
116
116
|
clear();
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
119
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkASMOZBD6cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col md:flex-row gap-6", children: [
|
|
120
120
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 md:max-w-md", children: [
|
|
121
121
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-2xl font-semibold text-ods-text-primary mb-2", children: "Need Support?" }),
|
|
122
122
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-sm", children: "Can't find what you're looking for? Submit a support ticket below \u2014 we'll follow up shortly." }),
|
|
@@ -155,7 +155,7 @@ function TicketOpenForm({
|
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
158
|
-
|
|
158
|
+
_chunkASMOZBD6cjs.Textarea,
|
|
159
159
|
{
|
|
160
160
|
id: "ticket-content",
|
|
161
161
|
placeholder: "Describe your issue or question in detail...",
|
|
@@ -179,7 +179,7 @@ function TicketOpenForm({
|
|
|
179
179
|
)
|
|
180
180
|
] }),
|
|
181
181
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
182
|
-
|
|
182
|
+
_chunkASMOZBD6cjs.ChatAttachmentChipStrip,
|
|
183
183
|
{
|
|
184
184
|
attachments,
|
|
185
185
|
onRemove: removeAttachment,
|
|
@@ -188,7 +188,7 @@ function TicketOpenForm({
|
|
|
188
188
|
),
|
|
189
189
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-3", children: [
|
|
190
190
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
191
|
-
|
|
191
|
+
_chunkASMOZBD6cjs.ChatAttachmentAddButton,
|
|
192
192
|
{
|
|
193
193
|
attachmentsEnabled: !supportSystemDown,
|
|
194
194
|
attachmentsCount: attachments.length,
|
|
@@ -226,7 +226,7 @@ var _usesticktobottom = require('use-stick-to-bottom');
|
|
|
226
226
|
|
|
227
227
|
var LIST_ENGAGEMENTS_ENDPOINT = "/api/chat/agent/list-engagements";
|
|
228
228
|
function useTicketEngagements(externalTicketId, enabled = true, refetchInterval = false) {
|
|
229
|
-
const identity =
|
|
229
|
+
const identity = _chunkASMOZBD6cjs.useChatIdentity.call(void 0, );
|
|
230
230
|
const identityKey = _nullishCoalesce(_optionalChain([identity, 'access', _2 => _2.user, 'optionalAccess', _3 => _3.email]), () => ( "anon"));
|
|
231
231
|
const listEngagementsEndpoint = _nullishCoalesce(_chunkN2DVKXN4cjs.useRequiredChatRuntime.call(void 0, ).endpoints.listEngagementsUrl, () => ( LIST_ENGAGEMENTS_ENDPOINT));
|
|
232
232
|
const fetchable = enabled && !!externalTicketId && !externalTicketId.startsWith("temp-");
|
|
@@ -308,7 +308,7 @@ function TicketLinkedDeliveryCard({
|
|
|
308
308
|
{
|
|
309
309
|
className: `rounded-md border border-ods-border bg-ods-bg overflow-hidden ${_nullishCoalesce(className, () => ( ""))}`,
|
|
310
310
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
311
|
-
|
|
311
|
+
_chunk6OA77Y55cjs.DeliveryRow,
|
|
312
312
|
{
|
|
313
313
|
item,
|
|
314
314
|
href: clickup.delivery_href,
|
|
@@ -332,7 +332,7 @@ function TicketReplyComposer({
|
|
|
332
332
|
}) {
|
|
333
333
|
const [resolution, setResolution] = _react.useState.call(void 0, "");
|
|
334
334
|
const [closeDialogOpen, setCloseDialogOpen] = _react.useState.call(void 0, false);
|
|
335
|
-
const attachments =
|
|
335
|
+
const attachments = _chunkASMOZBD6cjs.useChatAttachments.call(void 0, );
|
|
336
336
|
const ticketRef = { id: ticket.id, external_id: ticket.external_id };
|
|
337
337
|
const hasReadyFiles = attachments.readyAttachments.length > 0;
|
|
338
338
|
const handleSend = _react.useCallback.call(void 0,
|
|
@@ -360,7 +360,7 @@ function TicketReplyComposer({
|
|
|
360
360
|
const disabled = busy || supportSystemDown;
|
|
361
361
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
362
362
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
363
|
-
|
|
363
|
+
_chunkASMOZBD6cjs.ChatAttachmentChipStrip,
|
|
364
364
|
{
|
|
365
365
|
attachments: attachments.attachments,
|
|
366
366
|
onRemove: attachments.removeAttachment,
|
|
@@ -369,7 +369,7 @@ function TicketReplyComposer({
|
|
|
369
369
|
}
|
|
370
370
|
),
|
|
371
371
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
372
|
-
|
|
372
|
+
_chunkASMOZBD6cjs.ChatInput,
|
|
373
373
|
{
|
|
374
374
|
fullWidth: true,
|
|
375
375
|
autoFocus: true,
|
|
@@ -383,7 +383,7 @@ function TicketReplyComposer({
|
|
|
383
383
|
),
|
|
384
384
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 w-full", children: [
|
|
385
385
|
!supportSystemDown && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
386
|
-
|
|
386
|
+
_chunkASMOZBD6cjs.ChatAttachmentAddButton,
|
|
387
387
|
{
|
|
388
388
|
attachmentsEnabled: true,
|
|
389
389
|
attachmentsCount: attachments.attachments.length,
|
|
@@ -406,13 +406,13 @@ function TicketReplyComposer({
|
|
|
406
406
|
}
|
|
407
407
|
)
|
|
408
408
|
] }),
|
|
409
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
410
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
411
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
412
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
409
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkASMOZBD6cjs.AlertDialog, { open: closeDialogOpen, onOpenChange: setCloseDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkASMOZBD6cjs.AlertDialogContent, { className: "bg-ods-card border-ods-border", children: [
|
|
410
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkASMOZBD6cjs.AlertDialogHeader, { children: [
|
|
411
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkASMOZBD6cjs.AlertDialogTitle, { className: "text-ods-text-primary", children: "Close this ticket?" }),
|
|
412
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkASMOZBD6cjs.AlertDialogDescription, { className: "text-ods-text-secondary", children: "Add an optional resolution note below. You can reopen the ticket later if needed." })
|
|
413
413
|
] }),
|
|
414
414
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
415
|
-
|
|
415
|
+
_chunkASMOZBD6cjs.Textarea,
|
|
416
416
|
{
|
|
417
417
|
value: resolution,
|
|
418
418
|
onChange: (e) => setResolution(e.target.value),
|
|
@@ -422,9 +422,9 @@ function TicketReplyComposer({
|
|
|
422
422
|
className: "mt-2"
|
|
423
423
|
}
|
|
424
424
|
),
|
|
425
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
425
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkASMOZBD6cjs.AlertDialogFooter, { children: [
|
|
426
426
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
427
|
-
|
|
427
|
+
_chunkASMOZBD6cjs.AlertDialogCancel,
|
|
428
428
|
{
|
|
429
429
|
disabled: busy,
|
|
430
430
|
className: "bg-transparent border-ods-border text-ods-text-primary hover:bg-ods-border",
|
|
@@ -432,7 +432,7 @@ function TicketReplyComposer({
|
|
|
432
432
|
}
|
|
433
433
|
),
|
|
434
434
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
435
|
-
|
|
435
|
+
_chunkASMOZBD6cjs.AlertDialogAction,
|
|
436
436
|
{
|
|
437
437
|
onClick: () => void confirmClose(),
|
|
438
438
|
disabled: busy,
|
|
@@ -502,7 +502,7 @@ var TICKET_FEED_HEIGHT = "h-[60vh] md:h-[420px]";
|
|
|
502
502
|
var TICKET_FEED_INNER = "flex flex-col gap-4 md:gap-6 px-4 md:px-6 py-4 md:py-6";
|
|
503
503
|
var TICKET_FEED_SKELETON_ROWS = 6;
|
|
504
504
|
function TicketTimelinePanel({ ticket }) {
|
|
505
|
-
const identity =
|
|
505
|
+
const identity = _chunkASMOZBD6cjs.useChatIdentity.call(void 0, );
|
|
506
506
|
const externalId = isOptimistic(ticket) ? null : ticket.external_id;
|
|
507
507
|
const { engagements, isLoading } = useTicketEngagements(
|
|
508
508
|
externalId,
|
|
@@ -522,11 +522,11 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
522
522
|
const customerName = (isViewerTheCustomer ? viewerName : null) || ticketCustomerName || viewerName || _optionalChain([identity, 'access', _19 => _19.user, 'optionalAccess', _20 => _20.email]) || "You";
|
|
523
523
|
const customerAvatar = isViewerTheCustomer ? _nullishCoalesce(_optionalChain([identity, 'access', _21 => _21.user, 'optionalAccess', _22 => _22.avatarUrl]), () => ( void 0)) : void 0;
|
|
524
524
|
if (isLoading) {
|
|
525
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${TICKET_FEED_FRAME} ${TICKET_FEED_HEIGHT}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: TICKET_FEED_INNER, children: Array.from({ length: TICKET_FEED_SKELETON_ROWS }, (_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
525
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `${TICKET_FEED_FRAME} ${TICKET_FEED_HEIGHT}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: TICKET_FEED_INNER, children: Array.from({ length: TICKET_FEED_SKELETON_ROWS }, (_, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkASMOZBD6cjs.ChatMessageRowSkeleton, {}, i)) }) });
|
|
526
526
|
}
|
|
527
527
|
if (bodyTurns.length === 0 && engagements.length === 0) {
|
|
528
528
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
529
|
-
|
|
529
|
+
_chunk6OA77Y55cjs.EmptyState,
|
|
530
530
|
{
|
|
531
531
|
type: "generic",
|
|
532
532
|
title: "No conversation yet",
|
|
@@ -541,7 +541,7 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
541
541
|
const isResolution = turn.startsWith("[Resolution]");
|
|
542
542
|
const text = isResolution ? turn.replace(/^\[Resolution\]\s*/, "") : turn;
|
|
543
543
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
544
|
-
|
|
544
|
+
_chunkASMOZBD6cjs.ChatMessageRow,
|
|
545
545
|
{
|
|
546
546
|
displayName: customerName,
|
|
547
547
|
avatarUrl: customerAvatar,
|
|
@@ -570,13 +570,13 @@ function TicketTimelinePanel({ ticket }) {
|
|
|
570
570
|
}
|
|
571
571
|
const engAttachments = mapEngagementAttachments(eng.attachments);
|
|
572
572
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
573
|
-
|
|
573
|
+
_chunkASMOZBD6cjs.ChatMessageRow,
|
|
574
574
|
{
|
|
575
575
|
displayName: author,
|
|
576
576
|
avatarUrl: avatarSrc,
|
|
577
|
-
timeLabel: eng.createdAt ?
|
|
577
|
+
timeLabel: eng.createdAt ? _chunkASMOZBD6cjs.formatRelativeTime.call(void 0, eng.createdAt) : null,
|
|
578
578
|
body: stripAttachmentsPreamble(_nullishCoalesce(eng.body, () => ( ""))),
|
|
579
|
-
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
579
|
+
footer: engAttachments.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkASMOZBD6cjs.TicketAttachmentsList, { attachments: engAttachments, size: "compact" }) }) : null
|
|
580
580
|
},
|
|
581
581
|
eng.id
|
|
582
582
|
);
|
|
@@ -664,7 +664,7 @@ function AssignedAgentRow({
|
|
|
664
664
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary uppercase tracking-wider font-medium", children: "Assigned to" }),
|
|
665
665
|
displayLabel ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1.5 text-ods-text-primary font-medium", children: [
|
|
666
666
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
667
|
-
|
|
667
|
+
_chunkASMOZBD6cjs.SquareAvatar,
|
|
668
668
|
{
|
|
669
669
|
size: "sm",
|
|
670
670
|
variant: "round",
|
|
@@ -722,7 +722,7 @@ function TicketRow({
|
|
|
722
722
|
// so the badge accurately reflects "Closed" with a checkmark.
|
|
723
723
|
statusLabel: _nullishCoalesce(ticket.pipeline_stage_label, () => ( void 0)),
|
|
724
724
|
category: _nullishCoalesce(ticket.customer_company, () => ( void 0)),
|
|
725
|
-
timeAgo: ticket.hubspot_updated_at ?
|
|
725
|
+
timeAgo: ticket.hubspot_updated_at ? _chunkASMOZBD6cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : void 0,
|
|
726
726
|
// Linked-work chip: surfaced whenever the ticket has a linked
|
|
727
727
|
// ClickUp task. Uses the linked task's own status so the chip text
|
|
728
728
|
// reads "Working" / "Waiting on version release" / etc. — useful
|
|
@@ -737,7 +737,7 @@ function TicketRow({
|
|
|
737
737
|
className: "border-b border-ods-border last:border-b-0",
|
|
738
738
|
children: [
|
|
739
739
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
740
|
-
|
|
740
|
+
_chunkASMOZBD6cjs.ChatTicketItem,
|
|
741
741
|
{
|
|
742
742
|
ticket: tileData,
|
|
743
743
|
onClick: optimistic ? void 0 : handleClick,
|
|
@@ -1307,13 +1307,13 @@ function resolveErrorCode(bodyCode, status) {
|
|
|
1307
1307
|
// src/components/tickets/ticket-center.tsx
|
|
1308
1308
|
|
|
1309
1309
|
function TicketCenter({ toast: toast2 = _chunkDCIB6AK3cjs.toast } = {}) {
|
|
1310
|
-
const identity =
|
|
1310
|
+
const identity = _chunkASMOZBD6cjs.useChatIdentity.call(void 0, );
|
|
1311
1311
|
if (identity.isLoading) {
|
|
1312
1312
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketCenterSkeleton, {});
|
|
1313
1313
|
}
|
|
1314
1314
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _58 => _58.user, 'optionalAccess', _59 => _59.email])) {
|
|
1315
1315
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1316
|
-
|
|
1316
|
+
_chunk6OA77Y55cjs.EmptyState,
|
|
1317
1317
|
{
|
|
1318
1318
|
type: "generic",
|
|
1319
1319
|
title: "Sign in to manage tickets",
|
|
@@ -1384,7 +1384,7 @@ function TicketCenterAuthed({
|
|
|
1384
1384
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-3 text-xs text-ods-text-secondary", children: [
|
|
1385
1385
|
lastUpdatedAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1386
1386
|
"Updated ",
|
|
1387
|
-
|
|
1387
|
+
_chunkASMOZBD6cjs.formatRelativeTime.call(void 0, new Date(lastUpdatedAt))
|
|
1388
1388
|
] }),
|
|
1389
1389
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1390
1390
|
_chunkQJGRP2YEcjs.Button,
|
|
@@ -1400,18 +1400,18 @@ function TicketCenterAuthed({
|
|
|
1400
1400
|
)
|
|
1401
1401
|
] })
|
|
1402
1402
|
] }),
|
|
1403
|
-
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1404
|
-
|
|
1403
|
+
isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TicketListSkeleton, {}) : merged.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkASMOZBD6cjs.Card, { className: "p-6", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1404
|
+
_chunk6OA77Y55cjs.EmptyState,
|
|
1405
1405
|
{
|
|
1406
1406
|
type: "generic",
|
|
1407
1407
|
title: "No tickets yet",
|
|
1408
1408
|
description: "Open one above to start the conversation.",
|
|
1409
1409
|
showCTA: false
|
|
1410
1410
|
}
|
|
1411
|
-
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1411
|
+
) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkASMOZBD6cjs.Card, { className: "overflow-hidden", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1412
1412
|
TicketRow,
|
|
1413
1413
|
{
|
|
1414
|
-
id:
|
|
1414
|
+
id: _chunkASMOZBD6cjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1415
1415
|
ticket,
|
|
1416
1416
|
expanded: expandedTicketId === ticket.id,
|
|
1417
1417
|
onToggle: toggleRow,
|
|
@@ -1429,7 +1429,7 @@ function TicketCenterAuthed({
|
|
|
1429
1429
|
}
|
|
1430
1430
|
function TicketCenterSkeleton() {
|
|
1431
1431
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-6", children: [
|
|
1432
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1432
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkASMOZBD6cjs.Card, { className: "p-6", children: [
|
|
1433
1433
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQJGRP2YEcjs.Skeleton, { className: "h-7 w-48 mb-4" }),
|
|
1434
1434
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQJGRP2YEcjs.Skeleton, { className: "h-10 w-full mb-3" }),
|
|
1435
1435
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQJGRP2YEcjs.Skeleton, { className: "h-24 w-full" })
|
|
@@ -1438,7 +1438,7 @@ function TicketCenterSkeleton() {
|
|
|
1438
1438
|
] });
|
|
1439
1439
|
}
|
|
1440
1440
|
function TicketListSkeleton() {
|
|
1441
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1441
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkASMOZBD6cjs.Card, { className: "overflow-hidden", children: [0, 1, 2].map((i) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "h-20 px-4 flex items-center gap-4 border-b border-ods-border last:border-b-0", children: [
|
|
1442
1442
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 flex flex-col gap-2", children: [
|
|
1443
1443
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQJGRP2YEcjs.Skeleton, { className: "h-4 w-2/3" }),
|
|
1444
1444
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQJGRP2YEcjs.Skeleton, { className: "h-3 w-full" })
|
|
@@ -1451,7 +1451,7 @@ function TicketListSkeleton() {
|
|
|
1451
1451
|
// src/components/tickets/help-center-list.tsx
|
|
1452
1452
|
|
|
1453
1453
|
|
|
1454
|
-
|
|
1454
|
+
_chunk6OA77Y55cjs.init_unified_pagination.call(void 0, );
|
|
1455
1455
|
|
|
1456
1456
|
// src/components/tickets/help-center-card.tsx
|
|
1457
1457
|
|
|
@@ -1473,7 +1473,7 @@ function HelpCenterCard({
|
|
|
1473
1473
|
const optimistic = isOptimistic(ticket);
|
|
1474
1474
|
const rawStatus = (_nullishCoalesce(ticket.status, () => ( "OPEN"))).toUpperCase();
|
|
1475
1475
|
const priority = (_nullishCoalesce(ticket.priority, () => ( ""))).toUpperCase();
|
|
1476
|
-
const relativeUpdated = ticket.hubspot_updated_at ?
|
|
1476
|
+
const relativeUpdated = ticket.hubspot_updated_at ? _chunkASMOZBD6cjs.formatRelativeTime.call(void 0, ticket.hubspot_updated_at) : "recently";
|
|
1477
1477
|
const title = (ticket.subject || "").trim() || "(untitled)";
|
|
1478
1478
|
const subtitle = `UPDATED ${relativeUpdated}, #${ticket.external_id || "\u2014"}${ticket.pipeline_stage_label ? `, ${ticket.pipeline_stage_label}` : ""}`;
|
|
1479
1479
|
const description = _nullishCoalesce(_nullishCoalesce(ticket.preview, () => ( ticket.body)), () => ( ""));
|
|
@@ -1494,16 +1494,16 @@ function HelpCenterCard({
|
|
|
1494
1494
|
}, [isExpanded]);
|
|
1495
1495
|
const rightBadges = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1496
1496
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1497
|
-
|
|
1497
|
+
_chunkASMOZBD6cjs.StatusBadge,
|
|
1498
1498
|
{
|
|
1499
1499
|
text: rawStatus,
|
|
1500
|
-
colorScheme:
|
|
1500
|
+
colorScheme: _chunkASMOZBD6cjs.getStatusColorScheme.call(void 0, rawStatus),
|
|
1501
1501
|
variant: "card",
|
|
1502
1502
|
className: "border border-ods-border"
|
|
1503
1503
|
}
|
|
1504
1504
|
),
|
|
1505
1505
|
priority && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1506
|
-
|
|
1506
|
+
_chunkASMOZBD6cjs.StatusBadge,
|
|
1507
1507
|
{
|
|
1508
1508
|
text: priority,
|
|
1509
1509
|
colorScheme: mapPriorityScheme(priority),
|
|
@@ -1531,7 +1531,7 @@ function HelpCenterCard({
|
|
|
1531
1531
|
"aria-controls": isExpanded ? `help-center-drawer-${ticket.id}` : void 0,
|
|
1532
1532
|
className: "w-full text-left p-[12px] md:p-[16px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-accent focus-visible:ring-inset disabled:cursor-default",
|
|
1533
1533
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1534
|
-
|
|
1534
|
+
_chunk6OA77Y55cjs.DevCardRowContent,
|
|
1535
1535
|
{
|
|
1536
1536
|
title,
|
|
1537
1537
|
subtitle,
|
|
@@ -1606,7 +1606,7 @@ function HelpCenterCreateForm({
|
|
|
1606
1606
|
const [subject, setSubject] = _react.useState.call(void 0, "");
|
|
1607
1607
|
const [subjectError, setSubjectError] = _react.useState.call(void 0, null);
|
|
1608
1608
|
const subjectField = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
1609
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1609
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkASMOZBD6cjs.Label, { htmlFor: "help-center-subject", children: [
|
|
1610
1610
|
"Subject",
|
|
1611
1611
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-accent", children: "*" })
|
|
1612
1612
|
] }),
|
|
@@ -1638,7 +1638,7 @@ function HelpCenterCreateForm({
|
|
|
1638
1638
|
)
|
|
1639
1639
|
] });
|
|
1640
1640
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1641
|
-
|
|
1641
|
+
_chunkTXVO2E5Ccjs.ContactForm,
|
|
1642
1642
|
{
|
|
1643
1643
|
title: "Open a new ticket",
|
|
1644
1644
|
footerText: "The support team typically responds within one business day.",
|
|
@@ -1676,7 +1676,7 @@ function HelpCenterCreateForm({
|
|
|
1676
1676
|
// src/components/tickets/help-center-list.tsx
|
|
1677
1677
|
|
|
1678
1678
|
function HelpCenterList({ toast: toast2 = _chunkDCIB6AK3cjs.toast, backButton, title, shell } = {}) {
|
|
1679
|
-
const identity =
|
|
1679
|
+
const identity = _chunkASMOZBD6cjs.useChatIdentity.call(void 0, );
|
|
1680
1680
|
const searchParams = _chunkG7UE6RKVcjs.useSearchParams.call(void 0, );
|
|
1681
1681
|
const router = _chunkG7UE6RKVcjs.useRouter.call(void 0, );
|
|
1682
1682
|
const pathname = _chunkG7UE6RKVcjs.usePathname.call(void 0, );
|
|
@@ -1687,20 +1687,20 @@ function HelpCenterList({ toast: toast2 = _chunkDCIB6AK3cjs.toast, backButton, t
|
|
|
1687
1687
|
const page = Number.isFinite(rawPage) && rawPage > 0 ? Math.floor(rawPage) : 1;
|
|
1688
1688
|
if (identity.isLoading) {
|
|
1689
1689
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1690
|
-
|
|
1690
|
+
_chunk6OA77Y55cjs.DevSectionPage,
|
|
1691
1691
|
{
|
|
1692
1692
|
sectionKey: "tickets",
|
|
1693
1693
|
backButton,
|
|
1694
1694
|
title,
|
|
1695
1695
|
shell,
|
|
1696
1696
|
preControls: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpCenterCreateFormSkeleton, {}),
|
|
1697
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1697
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6OA77Y55cjs.DevCardRowSkeletonList, {})
|
|
1698
1698
|
}
|
|
1699
1699
|
);
|
|
1700
1700
|
}
|
|
1701
1701
|
if (identity.authTier === "anon" || !_optionalChain([identity, 'access', _60 => _60.user, 'optionalAccess', _61 => _61.email])) {
|
|
1702
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1703
|
-
|
|
1702
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6OA77Y55cjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1703
|
+
_chunk6OA77Y55cjs.EmptyState,
|
|
1704
1704
|
{
|
|
1705
1705
|
type: "generic",
|
|
1706
1706
|
title: "Sign in to manage tickets",
|
|
@@ -1832,15 +1832,15 @@ function HelpCenterListAuthed({
|
|
|
1832
1832
|
] }),
|
|
1833
1833
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQJGRP2YEcjs.Button, { type: "button", variant: "accent", onClick: () => refetch(), children: "Retry" })
|
|
1834
1834
|
] }),
|
|
1835
|
-
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1835
|
+
!error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-full", children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6OA77Y55cjs.DevCardRowSkeletonList, {}) : !hasResults && isFetching ? (
|
|
1836
1836
|
// Bridge state — background refetch in flight and the
|
|
1837
1837
|
// optimistic placeholder was just removed by the mutation
|
|
1838
1838
|
// callback. Without this branch "No tickets yet" would flash
|
|
1839
1839
|
// for ~50ms between `removeOptimistic` and the server
|
|
1840
1840
|
// response landing.
|
|
1841
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1841
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6OA77Y55cjs.DevCardRowSkeletonList, { rows: 1 })
|
|
1842
1842
|
) : !hasResults ? hasActiveFilters ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1843
|
-
|
|
1843
|
+
_chunk6OA77Y55cjs.EmptyState,
|
|
1844
1844
|
{
|
|
1845
1845
|
type: "search",
|
|
1846
1846
|
title: "No tickets found",
|
|
@@ -1855,7 +1855,7 @@ function HelpCenterListAuthed({
|
|
|
1855
1855
|
}
|
|
1856
1856
|
}
|
|
1857
1857
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1858
|
-
|
|
1858
|
+
_chunk6OA77Y55cjs.EmptyState,
|
|
1859
1859
|
{
|
|
1860
1860
|
type: "generic",
|
|
1861
1861
|
title: "No tickets yet",
|
|
@@ -1874,7 +1874,7 @@ function HelpCenterListAuthed({
|
|
|
1874
1874
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-ods-card border border-ods-border rounded-[6px] overflow-clip w-full", children: merged.map((ticket) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1875
1875
|
HelpCenterCard,
|
|
1876
1876
|
{
|
|
1877
|
-
id:
|
|
1877
|
+
id: _chunkASMOZBD6cjs.devSectionAnchorId.call(void 0, "ticket", ticket.external_id),
|
|
1878
1878
|
ticket,
|
|
1879
1879
|
expanded: expandedTicketId === ticket.id,
|
|
1880
1880
|
onToggle: toggleRow,
|
|
@@ -1890,9 +1890,9 @@ function HelpCenterListAuthed({
|
|
|
1890
1890
|
ticket.id
|
|
1891
1891
|
)) })
|
|
1892
1892
|
) }),
|
|
1893
|
-
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1893
|
+
!error && totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6OA77Y55cjs.UnifiedPagination, { currentPage: page, totalPages })
|
|
1894
1894
|
] });
|
|
1895
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1895
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6OA77Y55cjs.DevSectionPage, { sectionKey: "tickets", backButton, title, shell, preControls: form, children: body });
|
|
1896
1896
|
}
|
|
1897
1897
|
|
|
1898
1898
|
|
|
@@ -1913,4 +1913,4 @@ function HelpCenterListAuthed({
|
|
|
1913
1913
|
|
|
1914
1914
|
|
|
1915
1915
|
exports.isOptimistic = isOptimistic; exports.TOAST_COPY = TOAST_COPY; exports.TicketOpenForm = TicketOpenForm; exports.useTicketEngagements = useTicketEngagements; exports.TicketLinkedDeliveryCard = TicketLinkedDeliveryCard; exports.TicketReplyComposer = TicketReplyComposer; exports.TicketDetailDrawer = TicketDetailDrawer; exports.TicketRow = TicketRow; exports.useTicketsList = useTicketsList; exports.useTicketActions = useTicketActions; exports.mapTicketActionError = mapTicketActionError; exports.TicketCenter = TicketCenter; exports.HelpCenterCard = HelpCenterCard; exports.HelpCenterCreateFormSkeleton = HelpCenterCreateFormSkeleton; exports.HelpCenterCreateForm = HelpCenterCreateForm; exports.HelpCenterList = HelpCenterList;
|
|
1916
|
-
//# sourceMappingURL=chunk-
|
|
1916
|
+
//# sourceMappingURL=chunk-SZJLJWWO.cjs.map
|