@burdenoff/microfe-support 2026.1114.1 → 2026.1118.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/global-operations.d.ts +62 -0
- package/dist/generated/global-operations.js +104 -69
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js +17 -15
- package/dist/generated/global-types.js.map +1 -1
- package/dist/support/SupportUserRoot.js +32 -28
- package/dist/support/SupportUserRoot.js.map +1 -1
- package/dist/support/SupportUserRoutes.d.ts +1 -0
- package/dist/support/SupportUserRoutes.js +31 -28
- package/dist/support/SupportUserRoutes.js.map +1 -1
- package/dist/support/components/PageLayout.js +35 -35
- package/dist/support/components/RouteHelpers.d.ts +2 -1
- package/dist/support/components/RouteHelpers.js +3 -3
- package/dist/support/components/RouteHelpers.js.map +1 -1
- package/dist/support/components/careers/RichTextEditor.js +31 -31
- package/dist/support/components/careers/RichTextEditor.js.map +1 -1
- package/dist/support/components/help/RelatedArticles.d.ts +12 -0
- package/dist/support/components/help/RelatedArticles.js +55 -0
- package/dist/support/components/help/RelatedArticles.js.map +1 -0
- package/dist/support/components/help/RequestDetailHeader.d.ts +18 -0
- package/dist/support/components/help/RequestDetailHeader.js +129 -0
- package/dist/support/components/help/RequestDetailHeader.js.map +1 -0
- package/dist/support/components/help/SatisfactionReview.d.ts +18 -0
- package/dist/support/components/help/SatisfactionReview.js +103 -0
- package/dist/support/components/help/SatisfactionReview.js.map +1 -0
- package/dist/support/components/help/StarRating.d.ts +16 -0
- package/dist/support/components/help/StarRating.js +63 -0
- package/dist/support/components/help/StarRating.js.map +1 -0
- package/dist/support/components/help/StatusGroupPill.d.ts +11 -0
- package/dist/support/components/help/StatusGroupPill.js +19 -0
- package/dist/support/components/help/StatusGroupPill.js.map +1 -0
- package/dist/support/components/settings/TicketCategoriesSettings.js +69 -69
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +7 -7
- package/dist/support/components/tickets/MessageComposer.js.map +1 -1
- package/dist/support/components/tickets/TicketDetailHeader.js +54 -60
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
- package/dist/support/components/ui.js +1 -1
- package/dist/support/constants.d.ts +23 -0
- package/dist/support/constants.js +2 -2
- package/dist/support/constants.js.map +1 -1
- package/dist/support/hooks/useDebouncedValue.d.ts +6 -0
- package/dist/support/hooks/useDebouncedValue.js +12 -0
- package/dist/support/hooks/useDebouncedValue.js.map +1 -0
- package/dist/support/hooks/useKnowledgeBaseOperations.d.ts +8 -1
- package/dist/support/hooks/useKnowledgeBaseOperations.js +86 -81
- package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
- package/dist/support/hooks/useSupportVariant.d.ts +11 -0
- package/dist/support/hooks/useSupportVariant.js +11 -0
- package/dist/support/hooks/useSupportVariant.js.map +1 -0
- package/dist/support/hooks/useTicketCreatedToast.d.ts +16 -0
- package/dist/support/hooks/useTicketCreatedToast.js +25 -0
- package/dist/support/hooks/useTicketCreatedToast.js.map +1 -0
- package/dist/support/hooks/useTicketLabels.d.ts +22 -0
- package/dist/support/hooks/useTicketLabels.js +40 -0
- package/dist/support/hooks/useTicketLabels.js.map +1 -0
- package/dist/support/index.d.ts +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +84 -84
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.d.ts +5 -0
- package/dist/support/pages/ArticleDetailUserPage.js +133 -69
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/AskForHelpPage.d.ts +11 -0
- package/dist/support/pages/AskForHelpPage.js +396 -0
- package/dist/support/pages/AskForHelpPage.js.map +1 -0
- package/dist/support/pages/ContactInquiriesPage.js +73 -73
- package/dist/support/pages/ContactInquiryDetailPage.js +47 -47
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.d.ts +4 -0
- package/dist/support/pages/CreateTicketPage.js +121 -117
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/HelpHubPage.d.ts +9 -0
- package/dist/support/pages/HelpHubPage.js +272 -0
- package/dist/support/pages/HelpHubPage.js.map +1 -0
- package/dist/support/pages/JobApplicationDetailPage.js +388 -388
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +35 -35
- package/dist/support/pages/JobPostingDetailPage.js +236 -236
- package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.d.ts +6 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +188 -137
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/MyRequestsPage.d.ts +16 -0
- package/dist/support/pages/MyRequestsPage.js +389 -0
- package/dist/support/pages/MyRequestsPage.js.map +1 -0
- package/dist/support/pages/TicketDetailUserPage.d.ts +5 -0
- package/dist/support/pages/TicketDetailUserPage.js +285 -192
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.d.ts +7 -0
- package/dist/support/pages/TicketListPage.js +150 -153
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/dist/support/providers/SupportProvider.js +8 -7
- package/dist/support/providers/SupportProvider.js.map +1 -1
- package/dist/support/store/supportStore.d.ts +5 -0
- package/dist/support/store/supportStore.js +1 -0
- package/dist/support/store/supportStore.js.map +1 -1
- package/dist/support/translations/en.d.ts +279 -0
- package/dist/support/translations/en.js +270 -1
- package/dist/support/translations/en.js.map +1 -1
- package/dist/support/types/index.d.ts +13 -0
- package/dist/support/utils/cameFrom.d.ts +16 -0
- package/dist/support/utils/cameFrom.js +22 -0
- package/dist/support/utils/cameFrom.js.map +1 -0
- package/dist/support/utils/dates.d.ts +15 -0
- package/dist/support/utils/dates.js +35 -0
- package/dist/support/utils/dates.js.map +1 -0
- package/dist/support/utils/reopen.d.ts +27 -0
- package/dist/support/utils/reopen.js +27 -0
- package/dist/support/utils/reopen.js.map +1 -0
- package/dist/support/utils/requestTechnicalDetails.d.ts +13 -0
- package/dist/support/utils/requestTechnicalDetails.js +38 -0
- package/dist/support/utils/requestTechnicalDetails.js.map +1 -0
- package/dist/support/utils/ticketFilters.d.ts +16 -0
- package/dist/support/utils/ticketFilters.js +24 -12
- package/dist/support/utils/ticketFilters.js.map +1 -1
- package/dist/support/utils/ticketStatusGroups.d.ts +20 -0
- package/dist/support/utils/ticketStatusGroups.js +39 -0
- package/dist/support/utils/ticketStatusGroups.js.map +1 -0
- package/package.json +2 -2
- package/dist/_virtual/_rolldown/runtime.js +0 -6
- package/dist/node_modules/@tiptap/core/dist/index.js +0 -3491
- package/dist/node_modules/@tiptap/core/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -44
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +0 -1
- package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +0 -12
- package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -75
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +0 -73
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +0 -78
- package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +0 -157
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +0 -11
- package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -50
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +0 -70
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -49
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +0 -70
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +0 -389
- package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +0 -967
- package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -46
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +0 -6
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +0 -55
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +0 -14
- package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +0 -72
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/extensions/dist/index.js +0 -457
- package/dist/node_modules/@tiptap/extensions/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/react/dist/index.js +0 -332
- package/dist/node_modules/@tiptap/react/dist/index.js.map +0 -1
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +0 -28
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +0 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +0 -298
- package/dist/node_modules/fast-equals/dist/es/index.js.map +0 -1
- package/dist/node_modules/linkifyjs/dist/linkify.js +0 -527
- package/dist/node_modules/linkifyjs/dist/linkify.js.map +0 -1
- package/dist/node_modules/orderedmap/dist/index.js +0 -68
- package/dist/node_modules/orderedmap/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-commands/dist/index.js +0 -334
- package/dist/node_modules/prosemirror-commands/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +0 -112
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +0 -168
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-history/dist/index.js +0 -219
- package/dist/node_modules/prosemirror-history/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-keymap/dist/index.js +0 -51
- package/dist/node_modules/prosemirror-keymap/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-model/dist/index.js +0 -1775
- package/dist/node_modules/prosemirror-model/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +0 -77
- package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-state/dist/index.js +0 -526
- package/dist/node_modules/prosemirror-state/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js +0 -1204
- package/dist/node_modules/prosemirror-transform/dist/index.js.map +0 -1
- package/dist/node_modules/prosemirror-view/dist/index.js +0 -3355
- package/dist/node_modules/prosemirror-view/dist/index.js.map +0 -1
- package/dist/node_modules/rope-sequence/dist/index.js +0 -84
- package/dist/node_modules/rope-sequence/dist/index.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +0 -55
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +0 -53
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -53
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -45
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -11
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js +0 -11
- package/dist/node_modules/use-sync-external-store/shim/with-selector.js.map +0 -1
- package/dist/node_modules/w3c-keyname/index.js +0 -89
- package/dist/node_modules/w3c-keyname/index.js.map +0 -1
|
@@ -6,52 +6,56 @@ import { useRegisterFooter as i } from "./hooks/useRegisterFooter.js";
|
|
|
6
6
|
import { useSupportStore as a } from "./store/supportStore.js";
|
|
7
7
|
import { useEffect as o } from "react";
|
|
8
8
|
import { ErrorBoundary as s } from "@burdenoff/fe-libs/shared/components";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { useHeadingDocumentTitle as c } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
import { BookOpen as l, Ticket as u } from "lucide-react";
|
|
11
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
11
12
|
// src/support/SupportUserRoot.tsx
|
|
12
|
-
var
|
|
13
|
-
let { registerNavItems:
|
|
14
|
-
return
|
|
15
|
-
|
|
13
|
+
var f = (f) => {
|
|
14
|
+
let { registerNavItems: p, registerFooterItems: m, basePath: h = "/", currentUser: g, workspaceId: _, organizationId: v, productId: y, variant: b } = f, x = a((e) => e.resetForContextChange), S = e();
|
|
15
|
+
return c({
|
|
16
|
+
enabled: b === "fluidgrids",
|
|
17
|
+
suffix: "FluidGrids"
|
|
18
|
+
}), o(() => {
|
|
19
|
+
x();
|
|
16
20
|
}, [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
g,
|
|
21
|
+
x,
|
|
22
|
+
g?.id,
|
|
20
23
|
_,
|
|
21
|
-
v
|
|
24
|
+
v,
|
|
25
|
+
y
|
|
22
26
|
]), o(() => {
|
|
23
|
-
if (!
|
|
27
|
+
if (!p) return;
|
|
24
28
|
let e = [{
|
|
25
29
|
id: "support-tickets",
|
|
26
|
-
label:
|
|
27
|
-
path: r(
|
|
28
|
-
icon: /* @__PURE__ */ u
|
|
30
|
+
label: S("support.nav.tickets", "Tickets"),
|
|
31
|
+
path: r(h, "tickets"),
|
|
32
|
+
icon: /* @__PURE__ */ d(u, { size: 20 }),
|
|
29
33
|
order: 10,
|
|
30
34
|
group: "support"
|
|
31
35
|
}, {
|
|
32
36
|
id: "support-kb",
|
|
33
|
-
label:
|
|
34
|
-
path: r(
|
|
35
|
-
icon: /* @__PURE__ */
|
|
37
|
+
label: S("support.nav.knowledgeBase", "Knowledge Base"),
|
|
38
|
+
path: r(h, "kb"),
|
|
39
|
+
icon: /* @__PURE__ */ d(l, { size: 20 }),
|
|
36
40
|
order: 20,
|
|
37
41
|
group: "support"
|
|
38
42
|
}];
|
|
39
|
-
return
|
|
43
|
+
return p(e);
|
|
40
44
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
]), i(
|
|
45
|
-
fallback: /* @__PURE__ */
|
|
45
|
+
p,
|
|
46
|
+
h,
|
|
47
|
+
S
|
|
48
|
+
]), i(m), /* @__PURE__ */ d(s, {
|
|
49
|
+
fallback: /* @__PURE__ */ d("div", {
|
|
46
50
|
className: "p-6 text-center text-text-secondary",
|
|
47
|
-
children:
|
|
51
|
+
children: S("support.root.errorFallback", "Something went wrong loading this module. Please refresh the page.")
|
|
48
52
|
}),
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
-
...
|
|
51
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ d(t, {
|
|
54
|
+
...f,
|
|
55
|
+
children: /* @__PURE__ */ d(n, {})
|
|
52
56
|
})
|
|
53
57
|
});
|
|
54
58
|
};
|
|
55
|
-
export {
|
|
59
|
+
export { f as SupportUserRoot };
|
|
56
60
|
|
|
57
61
|
//# sourceMappingURL=SupportUserRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportUserRoot.js","names":["SupportUserRoot","props","resetForContextChange","useSupportStore","state","tr","useTr","useEffect","currentUser","workspaceId","organizationId","productId","registerNavItems","navItems","joinPath","basePath","Ticket","BookOpen","useRegisterFooter","registerFooterItems","ErrorBoundary","SupportProvider","SupportUserRoutes"],"sources":["../../src/support/SupportUserRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { useTr } from './hooks/useTr';\nimport { Ticket, BookOpen } from 'lucide-react';\nimport { SupportProvider } from './providers/SupportProvider';\nimport type { NavItem, SupportRootProps } from './types';\nimport { SupportUserRoutes } from './SupportUserRoutes';\nimport { joinPath } from './utils';\nimport { useRegisterFooter } from './hooks/useRegisterFooter';\nimport { useSupportStore } from './store/supportStore';\n\n/**\n * User-facing root component for the Support microfrontend.\n *\n * Renders only user-relevant routes (tickets and KB browsing)\n * and registers user-only navigation items with the shell.\n *\n * Use this in product app shells (vibecontrols-app, bigconsole, etc.)\n * where end users interact with the support module.\n *\n * For admin-facing support features, use SupportAdminRoot instead.\n *\n * Note: This is a UI-layer route split, not a security boundary.\n * Access control is enforced at the API/server level.\n */\nexport const SupportUserRoot: FC<SupportRootProps> = (props) => {\n const {\n registerNavItems,\n registerFooterItems,\n basePath = '/',\n currentUser,\n workspaceId,\n organizationId,\n productId,\n } = props;\n const resetForContextChange = useSupportStore((state) => state.resetForContextChange);\n const tr = useTr();\n\n useEffect(() => {\n resetForContextChange();\n }, [resetForContextChange, currentUser?.id, workspaceId, organizationId, productId]);\n\n // Register user-only navigation items.\n // `tr` is in the deps so labels re-register when locale changes — without\n // this, switching locale after mount leaves the old-language labels in the\n // shell's nav state.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'support-tickets',\n label: tr('support.nav.tickets', 'Tickets'),\n path: joinPath(basePath, 'tickets'),\n icon: <Ticket size={20} />,\n order: 10,\n group: 'support',\n },\n {\n id: 'support-kb',\n label: tr('support.nav.knowledgeBase', 'Knowledge Base'),\n path: joinPath(basePath, 'kb'),\n icon: <BookOpen size={20} />,\n order: 20,\n group: 'support',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, tr]);\n\n useRegisterFooter(registerFooterItems);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'support.root.errorFallback',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <SupportProvider {...props}>\n <SupportUserRoutes />\n </SupportProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupportUserRoot.js","names":["SupportUserRoot","props","resetForContextChange","useSupportStore","state","tr","useTr","useHeadingDocumentTitle","variant","useEffect","currentUser","workspaceId","organizationId","productId","registerNavItems","navItems","joinPath","basePath","Ticket","BookOpen","useRegisterFooter","registerFooterItems","ErrorBoundary","SupportProvider","SupportUserRoutes"],"sources":["../../src/support/SupportUserRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { useHeadingDocumentTitle } from '@burdenoff/fe-libs/ui';\nimport { useTr } from './hooks/useTr';\nimport { Ticket, BookOpen } from 'lucide-react';\nimport { SupportProvider } from './providers/SupportProvider';\nimport type { NavItem, SupportRootProps } from './types';\nimport { SupportUserRoutes } from './SupportUserRoutes';\nimport { joinPath } from './utils';\nimport { useRegisterFooter } from './hooks/useRegisterFooter';\nimport { useSupportStore } from './store/supportStore';\n\n/**\n * User-facing root component for the Support microfrontend.\n *\n * Renders only user-relevant routes (tickets and KB browsing)\n * and registers user-only navigation items with the shell.\n *\n * Use this in product app shells (vibecontrols-app, bigconsole, etc.)\n * where end users interact with the support module.\n *\n * For admin-facing support features, use SupportAdminRoot instead.\n *\n * Note: This is a UI-layer route split, not a security boundary.\n * Access control is enforced at the API/server level.\n */\nexport const SupportUserRoot: FC<SupportRootProps> = (props) => {\n const {\n registerNavItems,\n registerFooterItems,\n basePath = '/',\n currentUser,\n workspaceId,\n organizationId,\n productId,\n variant,\n } = props;\n const resetForContextChange = useSupportStore((state) => state.resetForContextChange);\n const tr = useTr();\n\n // FluidGrids opt-in: each page's <h1> becomes the browser tab title\n // (\"Help articles · FluidGrids\"). Other apps keep their own titles.\n useHeadingDocumentTitle({ enabled: variant === 'fluidgrids', suffix: 'FluidGrids' });\n\n useEffect(() => {\n resetForContextChange();\n }, [resetForContextChange, currentUser?.id, workspaceId, organizationId, productId]);\n\n // Register user-only navigation items.\n // `tr` is in the deps so labels re-register when locale changes — without\n // this, switching locale after mount leaves the old-language labels in the\n // shell's nav state.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'support-tickets',\n label: tr('support.nav.tickets', 'Tickets'),\n path: joinPath(basePath, 'tickets'),\n icon: <Ticket size={20} />,\n order: 10,\n group: 'support',\n },\n {\n id: 'support-kb',\n label: tr('support.nav.knowledgeBase', 'Knowledge Base'),\n path: joinPath(basePath, 'kb'),\n icon: <BookOpen size={20} />,\n order: 20,\n group: 'support',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, tr]);\n\n useRegisterFooter(registerFooterItems);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'support.root.errorFallback',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <SupportProvider {...props}>\n <SupportUserRoutes />\n </SupportProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;;;AA2BA,IAAaA,KAAyC,MAAU;CAC9D,IAAM,EACJ,qBACA,wBACA,cAAW,KACX,gBACA,gBACA,mBACA,cACA,eACEC,GACEC,IAAwBC,GAAiB,MAAUC,EAAM,qBAAqB,GAC9EC,IAAKC,EAAM;CA0CjB,OAtCAC,EAAwB;EAAE,SAASC,MAAY;EAAc,QAAQ;CAAa,CAAC,GAEnFC,QAAgB;EACd,EAAsB;CACxB,GAAG;EAACP;EAAuBQ,GAAa;EAAIC;EAAaC;EAAgBC;CAAS,CAAC,GAMnFJ,QAAgB;EACd,IAAI,CAACK,GAAkB;EAEvB,IAAMC,IAAsB,CAC1B;GACE,IAAI;GACJ,OAAOV,EAAG,uBAAuB,SAAS;GAC1C,MAAMW,EAASC,GAAU,SAAS;GAClC,MAAM,kBAACC,GAAD,EAAQ,MAAM,GAAK,CAAA;GACzB,OAAO;GACP,OAAO;EACT,GACA;GACE,IAAI;GACJ,OAAOb,EAAG,6BAA6B,gBAAgB;GACvD,MAAMW,EAASC,GAAU,IAAI;GAC7B,MAAM,kBAACE,GAAD,EAAU,MAAM,GAAK,CAAA;GAC3B,OAAO;GACP,OAAO;EACT,CACF;EAGA,OADgBL,EAAiBC,CAC1B;CACT,GAAG;EAACD;EAAkBG;EAAUZ;CAAE,CAAC,GAEnCe,EAAkBC,CAAmB,GAGnC,kBAACC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAAjB,EACC,8BACA,oEACF;EACG,CAAA;EAGP,UAAA,kBAACkB,GAAD;GAAiB,GAAItB;GACnB,UAAA,kBAACuB,GAAD,CAAoB,CAAA;EACL,CAAA;CACJ,CAAA;AAEnB"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Only includes routes relevant to end users:
|
|
5
5
|
* - Ticket management (list, create, view)
|
|
6
6
|
* - Knowledge base browsing (read-only, published articles)
|
|
7
|
+
* - With `variant="fluidgrids"`, a help hub at the index route
|
|
7
8
|
*
|
|
8
9
|
* Admin-only features (inquiries, analytics, settings, KB authoring)
|
|
9
10
|
* are excluded — see SupportAdminRoutes for those.
|
|
@@ -1,59 +1,62 @@
|
|
|
1
1
|
import { CatchAllRedirect as e, PageLoader as t } from "./components/RouteHelpers.js";
|
|
2
2
|
import { TicketListPage as n } from "./pages/TicketListPage.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { HelpHubPage as r } from "./pages/HelpHubPage.js";
|
|
4
|
+
import { useIsFluidgridsVariant as i } from "./hooks/useSupportVariant.js";
|
|
5
|
+
import { Suspense as a, lazy as o } from "react";
|
|
6
|
+
import { Navigate as s, Route as c, Routes as l, useLocation as u } from "react-router";
|
|
7
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
6
8
|
// src/support/SupportUserRoutes.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let e =
|
|
10
|
-
return /* @__PURE__ */
|
|
9
|
+
var p = o(() => import("./pages/TicketDetailUserPage.js").then((e) => ({ default: e.TicketDetailUserPage }))), m = o(() => import("./pages/CreateTicketPage.js").then((e) => ({ default: e.CreateTicketPage }))), h = o(() => import("./pages/KnowledgeBaseUserPage.js").then((e) => ({ default: e.KnowledgeBaseUserPage }))), g = o(() => import("./pages/ArticleDetailUserPage.js").then((e) => ({ default: e.ArticleDetailUserPage })));
|
|
10
|
+
function _() {
|
|
11
|
+
let e = u(), t = e.pathname.replace("/knowledge-base", "/kb");
|
|
12
|
+
return /* @__PURE__ */ d(s, {
|
|
11
13
|
to: `${t}${e.search}${e.hash}`,
|
|
12
14
|
replace: !0
|
|
13
15
|
});
|
|
14
16
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
function v() {
|
|
18
|
+
let o = i();
|
|
19
|
+
return /* @__PURE__ */ d(a, {
|
|
20
|
+
fallback: /* @__PURE__ */ d(t, {}),
|
|
21
|
+
children: /* @__PURE__ */ f(l, { children: [
|
|
22
|
+
/* @__PURE__ */ d(c, {
|
|
20
23
|
index: !0,
|
|
21
|
-
element: /* @__PURE__ */
|
|
24
|
+
element: o ? /* @__PURE__ */ d(r, {}) : /* @__PURE__ */ d(s, {
|
|
22
25
|
to: "tickets",
|
|
23
26
|
replace: !0
|
|
24
27
|
})
|
|
25
28
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ d(c, {
|
|
27
30
|
path: "tickets",
|
|
28
|
-
element: /* @__PURE__ */
|
|
31
|
+
element: /* @__PURE__ */ d(n, {})
|
|
29
32
|
}),
|
|
30
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ d(c, {
|
|
31
34
|
path: "tickets/new",
|
|
32
|
-
element: /* @__PURE__ */
|
|
35
|
+
element: /* @__PURE__ */ d(m, {})
|
|
33
36
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ d(c, {
|
|
35
38
|
path: "tickets/:ticketId",
|
|
36
|
-
element: /* @__PURE__ */
|
|
39
|
+
element: /* @__PURE__ */ d(p, {})
|
|
37
40
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ d(c, {
|
|
39
42
|
path: "kb",
|
|
40
|
-
element: /* @__PURE__ */
|
|
43
|
+
element: /* @__PURE__ */ d(h, {})
|
|
41
44
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ d(c, {
|
|
43
46
|
path: "kb/articles/:slug",
|
|
44
|
-
element: /* @__PURE__ */
|
|
47
|
+
element: /* @__PURE__ */ d(g, {})
|
|
45
48
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ d(c, {
|
|
47
50
|
path: "knowledge-base/*",
|
|
48
|
-
element: /* @__PURE__ */
|
|
51
|
+
element: /* @__PURE__ */ d(_, {})
|
|
49
52
|
}),
|
|
50
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ d(c, {
|
|
51
54
|
path: "*",
|
|
52
|
-
element: /* @__PURE__ */
|
|
55
|
+
element: /* @__PURE__ */ d(e, {})
|
|
53
56
|
})
|
|
54
57
|
] })
|
|
55
58
|
});
|
|
56
59
|
}
|
|
57
|
-
export {
|
|
60
|
+
export { v as SupportUserRoutes };
|
|
58
61
|
|
|
59
62
|
//# sourceMappingURL=SupportUserRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportUserRoutes.js","names":["TicketDetailUserPage","lazy","m","CreateTicketPage","KnowledgeBaseUserPage","ArticleDetailUserPage","KnowledgeBaseAliasRedirect","location","useLocation","targetPath","Navigate","SupportUserRoutes","Suspense","PageLoader","Routes","Route","TicketListPage","CatchAllRedirect"],"sources":["../../src/support/SupportUserRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router';\nimport { PageLoader, CatchAllRedirect } from './components/RouteHelpers';\n\n// TicketListPage is eagerly imported — it's the default landing page after redirect,\n// so lazy-loading would cause a visible loading flash on every initial navigation.\nimport { TicketListPage } from './pages/TicketListPage';\n\n// Lazy loaded pages — user-specific variants for mixed pages\nconst TicketDetailUserPage = lazy(() =>\n import('./pages/TicketDetailUserPage').then((m) => ({ default: m.TicketDetailUserPage }))\n);\nconst CreateTicketPage = lazy(() =>\n import('./pages/CreateTicketPage').then((m) => ({ default: m.CreateTicketPage }))\n);\nconst KnowledgeBaseUserPage = lazy(() =>\n import('./pages/KnowledgeBaseUserPage').then((m) => ({ default: m.KnowledgeBaseUserPage }))\n);\nconst ArticleDetailUserPage = lazy(() =>\n import('./pages/ArticleDetailUserPage').then((m) => ({ default: m.ArticleDetailUserPage }))\n);\n\n// /knowledge-base/* deep links land here and immediately redirect to the canonical\n// /kb/* path so the URL stays consistent with the page-level navigation (which\n// hardcodes /kb paths). One wildcard route covers every sub-path so adding new\n// kb/* routes does not require maintaining a parallel knowledge-base/* mirror.\nfunction KnowledgeBaseAliasRedirect() {\n const location = useLocation();\n const targetPath = location.pathname.replace('/knowledge-base', '/kb');\n return <Navigate to={`${targetPath}${location.search}${location.hash}`} replace />;\n}\n\n/**\n * User-facing routes for the Support microfrontend.\n *\n * Only includes routes relevant to end users:\n * - Ticket management (list, create, view)\n * - Knowledge base browsing (read-only, published articles)\n *\n * Admin-only features (inquiries, analytics, settings, KB authoring)\n * are excluded — see SupportAdminRoutes for those.\n */\nexport function SupportUserRoutes() {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect */}\n <Route index element={<Navigate to=\"tickets\" replace />} />\n\n {/* Tickets */}\n <Route path=\"tickets\" element={<TicketListPage />} />\n <Route path=\"tickets/new\" element={<CreateTicketPage />} />\n <Route path=\"tickets/:ticketId\" element={<TicketDetailUserPage />} />\n\n {/* Knowledge Base — canonical /kb paths */}\n <Route path=\"kb\" element={<KnowledgeBaseUserPage />} />\n <Route path=\"kb/articles/:slug\" element={<ArticleDetailUserPage />} />\n\n {/* /knowledge-base/* alias — redirects to the canonical /kb/* path */}\n <Route path=\"knowledge-base/*\" element={<KnowledgeBaseAliasRedirect />} />\n\n {/* Catch-all redirect */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupportUserRoutes.js","names":["TicketDetailUserPage","lazy","m","CreateTicketPage","KnowledgeBaseUserPage","ArticleDetailUserPage","KnowledgeBaseAliasRedirect","location","useLocation","targetPath","Navigate","SupportUserRoutes","isFluidgrids","useIsFluidgridsVariant","Suspense","PageLoader","Routes","Route","HelpHubPage","TicketListPage","CatchAllRedirect"],"sources":["../../src/support/SupportUserRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router';\nimport { PageLoader, CatchAllRedirect } from './components/RouteHelpers';\n\n// TicketListPage is eagerly imported — it's the default landing page after redirect,\n// so lazy-loading would cause a visible loading flash on every initial navigation.\nimport { TicketListPage } from './pages/TicketListPage';\n// The FluidGrids help hub is that variant's landing page, so it is eager too.\nimport { HelpHubPage } from './pages/HelpHubPage';\nimport { useIsFluidgridsVariant } from './hooks/useSupportVariant';\n\n// Lazy loaded pages — user-specific variants for mixed pages\nconst TicketDetailUserPage = lazy(() =>\n import('./pages/TicketDetailUserPage').then((m) => ({ default: m.TicketDetailUserPage }))\n);\nconst CreateTicketPage = lazy(() =>\n import('./pages/CreateTicketPage').then((m) => ({ default: m.CreateTicketPage }))\n);\nconst KnowledgeBaseUserPage = lazy(() =>\n import('./pages/KnowledgeBaseUserPage').then((m) => ({ default: m.KnowledgeBaseUserPage }))\n);\nconst ArticleDetailUserPage = lazy(() =>\n import('./pages/ArticleDetailUserPage').then((m) => ({ default: m.ArticleDetailUserPage }))\n);\n\n// /knowledge-base/* deep links land here and immediately redirect to the canonical\n// /kb/* path so the URL stays consistent with the page-level navigation (which\n// hardcodes /kb paths). One wildcard route covers every sub-path so adding new\n// kb/* routes does not require maintaining a parallel knowledge-base/* mirror.\nfunction KnowledgeBaseAliasRedirect() {\n const location = useLocation();\n const targetPath = location.pathname.replace('/knowledge-base', '/kb');\n return <Navigate to={`${targetPath}${location.search}${location.hash}`} replace />;\n}\n\n/**\n * User-facing routes for the Support microfrontend.\n *\n * Only includes routes relevant to end users:\n * - Ticket management (list, create, view)\n * - Knowledge base browsing (read-only, published articles)\n * - With `variant=\"fluidgrids\"`, a help hub at the index route\n *\n * Admin-only features (inquiries, analytics, settings, KB authoring)\n * are excluded — see SupportAdminRoutes for those.\n */\nexport function SupportUserRoutes() {\n const isFluidgrids = useIsFluidgridsVariant();\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default: the FluidGrids help hub, otherwise a redirect to the ticket list */}\n <Route index element={isFluidgrids ? <HelpHubPage /> : <Navigate to=\"tickets\" replace />} />\n\n {/* Tickets */}\n <Route path=\"tickets\" element={<TicketListPage />} />\n <Route path=\"tickets/new\" element={<CreateTicketPage />} />\n <Route path=\"tickets/:ticketId\" element={<TicketDetailUserPage />} />\n\n {/* Knowledge Base — canonical /kb paths */}\n <Route path=\"kb\" element={<KnowledgeBaseUserPage />} />\n <Route path=\"kb/articles/:slug\" element={<ArticleDetailUserPage />} />\n\n {/* /knowledge-base/* alias — redirects to the canonical /kb/* path */}\n <Route path=\"knowledge-base/*\" element={<KnowledgeBaseAliasRedirect />} />\n\n {/* Catch-all redirect */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;AAYA,IAAMA,IAAuBC,QAC3B,OAAO,kCAA+B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,qBAAqB,EAAE,CAC1F,GACMC,IAAmBF,QACvB,OAAO,8BAA2B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,iBAAiB,EAAE,CAClF,GACME,IAAwBH,QAC5B,OAAO,mCAAgC,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,sBAAsB,EAAE,CAC5F,GACMG,IAAwBJ,QAC5B,OAAO,mCAAgC,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,sBAAsB,EAAE,CAC5F;AAMA,SAASI,IAA6B;CACpC,IAAMC,IAAWC,EAAY,GACvBC,IAAaF,EAAS,SAAS,QAAQ,mBAAmB,KAAK;CACrE,OAAO,kBAACG,GAAD;EAAU,IAAI,GAAGD,IAAaF,EAAS,SAASA,EAAS;EAAQ,SAAA;CAAS,CAAA;AACnF;AAaA,SAAgBI,IAAoB;CAClC,IAAMC,IAAeC,EAAuB;CAC5C,OACE,kBAACC,GAAD;EAAU,UAAU,kBAACC,GAAD,CAAa,CAAA;EAC/B,UAAA,kBAACC,GAAD,EAAA,UAAA;GAEE,kBAACC,GAAD;IAAO,OAAA;IAAM,SAASL,IAAe,kBAACM,GAAD,CAAc,CAAA,IAAI,kBAACR,GAAD;KAAU,IAAG;KAAU,SAAA;IAAS,CAAA;GAAI,CAAA;GAG3F,kBAACO,GAAD;IAAO,MAAK;IAAU,SAAS,kBAACE,GAAD,CAAiB,CAAA;GAAI,CAAA;GACpD,kBAACF,GAAD;IAAO,MAAK;IAAc,SAAS,kBAACd,GAAD,CAAmB,CAAA;GAAI,CAAA;GAC1D,kBAACc,GAAD;IAAO,MAAK;IAAoB,SAAS,kBAACjB,GAAD,CAAuB,CAAA;GAAI,CAAA;GAGpE,kBAACiB,GAAD;IAAO,MAAK;IAAK,SAAS,kBAACb,GAAD,CAAwB,CAAA;GAAI,CAAA;GACtD,kBAACa,GAAD;IAAO,MAAK;IAAoB,SAAS,kBAACZ,GAAD,CAAwB,CAAA;GAAI,CAAA;GAGrE,kBAACY,GAAD;IAAO,MAAK;IAAmB,SAAS,kBAACX,GAAD,CAA6B,CAAA;GAAI,CAAA;GAGzE,kBAACW,GAAD;IAAO,MAAK;IAAI,SAAS,kBAACG,GAAD,CAAmB,CAAA;GAAI,CAAA;EAC1C,EAAA,CAAA;CACA,CAAA;AAEd"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn as e } from "../utils/cn.js";
|
|
2
2
|
import { useTr as t } from "../hooks/useTr.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { AuroraBackground as n, GradientText as r, IllustratedEmptyState as i } from "@burdenoff/fe-libs/ui";
|
|
4
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
5
|
// src/support/components/PageLayout.tsx
|
|
6
6
|
var c = {
|
|
7
7
|
sm: "max-w-screen-sm",
|
|
@@ -12,70 +12,70 @@ var c = {
|
|
|
12
12
|
"3xl": "max-w-[1600px]",
|
|
13
13
|
full: "max-w-full"
|
|
14
14
|
};
|
|
15
|
-
function l({ children: t, title:
|
|
16
|
-
let y = v &&
|
|
17
|
-
return /* @__PURE__ */
|
|
15
|
+
function l({ children: t, title: i, subtitle: l, icon: u, headerActions: d, headerContent: f, maxWidth: p = "xl", showHeader: m = !0, className: h, contentClassName: g, aurora: _ = !1, titleAccent: v }) {
|
|
16
|
+
let y = v && i && i.endsWith(v) ? i.slice(0, i.length - v.length) : null;
|
|
17
|
+
return /* @__PURE__ */ o("div", {
|
|
18
18
|
className: e("min-size-full", "px-4 sm:px-6 lg:px-8 xl:px-12", "py-6 sm:py-8 lg:py-10", "animate-in fade-in-0 slide-in-from-bottom-4 duration-200", h),
|
|
19
|
-
children: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ s("div", {
|
|
20
20
|
className: e("mx-auto w-full", c[p], g),
|
|
21
|
-
children: [m && (
|
|
21
|
+
children: [m && (i || d) && /* @__PURE__ */ s("header", {
|
|
22
22
|
className: e("mb-6 sm:mb-8", _ && "relative overflow-hidden rounded-2xl border border-border-seam bg-bg-surface/40 p-4 sm:p-6 backdrop-blur-[var(--blur-glass)]"),
|
|
23
23
|
children: [
|
|
24
|
-
_ && /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
24
|
+
_ && /* @__PURE__ */ o(n, { intensity: "subtle" }),
|
|
25
|
+
/* @__PURE__ */ s("div", {
|
|
26
26
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ s("div", {
|
|
28
28
|
className: "space-y-1",
|
|
29
|
-
children: [(
|
|
29
|
+
children: [(i || u) && /* @__PURE__ */ s("div", {
|
|
30
30
|
className: "flex items-center gap-3",
|
|
31
|
-
children: [u && /* @__PURE__ */
|
|
31
|
+
children: [u && /* @__PURE__ */ o("div", {
|
|
32
32
|
className: "flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary",
|
|
33
33
|
children: u
|
|
34
|
-
}),
|
|
34
|
+
}), i && /* @__PURE__ */ o("h1", {
|
|
35
35
|
className: "text-2xl sm:text-3xl font-bold tracking-tight text-text-primary",
|
|
36
|
-
children: y === null ?
|
|
36
|
+
children: y === null ? i : /* @__PURE__ */ s(a, { children: [y, /* @__PURE__ */ o(r, { children: v })] })
|
|
37
37
|
})]
|
|
38
|
-
}), l && /* @__PURE__ */
|
|
38
|
+
}), l && /* @__PURE__ */ o("p", {
|
|
39
39
|
className: "text-sm sm:text-base text-text-secondary max-w-2xl",
|
|
40
40
|
children: l
|
|
41
41
|
})]
|
|
42
|
-
}), d && /* @__PURE__ */
|
|
42
|
+
}), d && /* @__PURE__ */ o("div", {
|
|
43
43
|
className: "flex items-center gap-2 flex-shrink-0",
|
|
44
44
|
children: d
|
|
45
45
|
})]
|
|
46
46
|
}),
|
|
47
|
-
f && /* @__PURE__ */
|
|
47
|
+
f && /* @__PURE__ */ o("div", {
|
|
48
48
|
className: "mt-4",
|
|
49
49
|
children: f
|
|
50
50
|
})
|
|
51
51
|
]
|
|
52
|
-
}), /* @__PURE__ */
|
|
52
|
+
}), /* @__PURE__ */ o("div", {
|
|
53
53
|
className: "space-y-6",
|
|
54
54
|
children: t
|
|
55
55
|
})]
|
|
56
56
|
})
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
function u({ icon: t, illustration: n, illustrationAlt:
|
|
60
|
-
return n ? /* @__PURE__ */
|
|
59
|
+
function u({ icon: t, illustration: n, illustrationAlt: r, title: a, description: c, action: l, className: u }) {
|
|
60
|
+
return n ? /* @__PURE__ */ o(i, {
|
|
61
61
|
illustration: n,
|
|
62
|
-
alt:
|
|
63
|
-
title:
|
|
62
|
+
alt: r,
|
|
63
|
+
title: a,
|
|
64
64
|
description: c,
|
|
65
65
|
action: l,
|
|
66
66
|
className: e("animate-in fade-in-0 zoom-in-95 duration-200", u)
|
|
67
|
-
}) : /* @__PURE__ */
|
|
67
|
+
}) : /* @__PURE__ */ s("div", {
|
|
68
68
|
className: e("flex flex-col items-center justify-center", "py-12 sm:py-16 px-4", "text-center", "animate-in fade-in-0 zoom-in-95 duration-200", u),
|
|
69
69
|
children: [
|
|
70
|
-
t && /* @__PURE__ */
|
|
70
|
+
t && /* @__PURE__ */ o("div", {
|
|
71
71
|
className: "mb-4 p-4 rounded-2xl bg-bg-sunken/50 text-text-secondary",
|
|
72
72
|
children: t
|
|
73
73
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ o("h3", {
|
|
75
75
|
className: "text-lg font-semibold text-text-primary mb-1",
|
|
76
|
-
children:
|
|
76
|
+
children: a
|
|
77
77
|
}),
|
|
78
|
-
c && /* @__PURE__ */
|
|
78
|
+
c && /* @__PURE__ */ o("p", {
|
|
79
79
|
className: "text-sm text-text-secondary max-w-sm mb-4",
|
|
80
80
|
children: c
|
|
81
81
|
}),
|
|
@@ -83,16 +83,16 @@ function u({ icon: t, illustration: n, illustrationAlt: a, title: o, description
|
|
|
83
83
|
]
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
function d({ message: n, className:
|
|
87
|
-
let
|
|
88
|
-
return /* @__PURE__ */
|
|
89
|
-
className: e("flex flex-col items-center justify-center py-20",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
86
|
+
function d({ message: n, className: r }) {
|
|
87
|
+
let i = t();
|
|
88
|
+
return /* @__PURE__ */ s("div", {
|
|
89
|
+
className: e("flex flex-col items-center justify-center py-20", r),
|
|
90
|
+
children: [/* @__PURE__ */ s("div", {
|
|
91
91
|
className: "relative",
|
|
92
|
-
children: [/* @__PURE__ */
|
|
93
|
-
}), /* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ o("div", { className: "absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl animate-pulse" }), /* @__PURE__ */ o("div", { className: "relative size-12 border-4 border-primary/30 border-t-primary rounded-full animate-spin" })]
|
|
93
|
+
}), /* @__PURE__ */ o("span", {
|
|
94
94
|
className: "mt-6 text-sm font-medium text-text-secondary",
|
|
95
|
-
children: n ??
|
|
95
|
+
children: n ?? i("support.loading.default", "Loading...")
|
|
96
96
|
})]
|
|
97
97
|
});
|
|
98
98
|
}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare function PageLoader(): import('react').JSX.Element;
|
|
5
5
|
/**
|
|
6
|
-
* Catch-all redirect that sends unknown paths to the tickets page
|
|
6
|
+
* Catch-all redirect that sends unknown paths to the tickets page, or to the
|
|
7
|
+
* help hub for the FluidGrids variant (its landing page).
|
|
7
8
|
* Uses basePath from SupportProvider context and joinPath to avoid double-slashes.
|
|
8
9
|
*/
|
|
9
10
|
export declare function CatchAllRedirect(): null;
|
|
@@ -11,10 +11,10 @@ function a() {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
function o() {
|
|
14
|
-
let { basePath: i = "/" } = e(),
|
|
14
|
+
let { basePath: i = "/", variant: a } = e(), o = r(), s = a === "fluidgrids" ? t(i, "").replace(/(.)\/$/, "$1") : t(i, "tickets");
|
|
15
15
|
return n(() => {
|
|
16
|
-
|
|
17
|
-
}, [
|
|
16
|
+
o(s, { replace: !0 });
|
|
17
|
+
}, [s, o]), null;
|
|
18
18
|
}
|
|
19
19
|
export { o as CatchAllRedirect, a as PageLoader };
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteHelpers.js","names":["PageLoader","CatchAllRedirect","useSupport","navigate","useNavigate","
|
|
1
|
+
{"version":3,"file":"RouteHelpers.js","names":["PageLoader","CatchAllRedirect","useSupport","navigate","useNavigate","target","variant","joinPath","basePath","useEffect"],"sources":["../../../src/support/components/RouteHelpers.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { useNavigate } from 'react-router';\nimport { useSupport } from '../providers/SupportProvider';\nimport { joinPath } from '../utils';\n\n/**\n * Shared loading fallback for lazy-loaded route pages.\n */\nexport function PageLoader() {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"size-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n}\n\n/**\n * Catch-all redirect that sends unknown paths to the tickets page, or to the\n * help hub for the FluidGrids variant (its landing page).\n * Uses basePath from SupportProvider context and joinPath to avoid double-slashes.\n */\nexport function CatchAllRedirect() {\n const { basePath = '/', variant } = useSupport();\n const navigate = useNavigate();\n // joinPath(base, '') keeps a trailing slash; drop it unless it is the root.\n const target =\n variant === 'fluidgrids'\n ? joinPath(basePath, '').replace(/(.)\\/$/, '$1')\n : joinPath(basePath, 'tickets');\n useEffect(() => {\n navigate(target, { replace: true });\n }, [target, navigate]);\n return null;\n}\n"],"mappings":";;;;;;AAQA,SAAgBA,IAAa;CAC3B,OACE,kBAAC,OAAD;EAAK,WAAU;EACb,UAAA,kBAAC,OAAD,EAAK,WAAU,gFAAiF,CAAA;CAC7F,CAAA;AAET;AAOA,SAAgBC,IAAmB;CACjC,IAAM,EAAE,cAAW,KAAK,eAAYC,EAAW,GACzCC,IAAWC,EAAY,GAEvBC,IACJC,MAAY,eACRC,EAASC,GAAU,EAAE,CAAC,CAAC,QAAQ,UAAU,IAAI,IAC7CD,EAASC,GAAU,SAAS;CAIlC,OAHAC,QAAgB;EACd,EAASJ,GAAQ,EAAE,SAAS,GAAK,CAAC;CACpC,GAAG,CAACA,GAAQF,CAAQ,CAAC,GACd;AACT"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import n from "../../../node_modules/@tiptap/starter-kit/dist/index.js";
|
|
3
|
-
import r from "../../../node_modules/@tiptap/extension-placeholder/dist/index.js";
|
|
4
|
-
import { cn as i } from "../../utils/cn.js";
|
|
1
|
+
import { cn as e } from "../../utils/cn.js";
|
|
5
2
|
/* empty css */
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { Bold as
|
|
8
|
-
import { jsx as
|
|
3
|
+
import { useEffect as t } from "react";
|
|
4
|
+
import { Bold as n, Italic as r, List as i, ListOrdered as a } from "lucide-react";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { EditorContent as c, useEditor as l } from "@tiptap/react";
|
|
7
|
+
import u from "@tiptap/starter-kit";
|
|
8
|
+
import d from "@tiptap/extension-placeholder";
|
|
9
9
|
// src/support/components/careers/RichTextEditor.tsx
|
|
10
10
|
var f = "<p></p>";
|
|
11
|
-
function p({ label:
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
function p({ label: t, active: n, onClick: r, Icon: i }) {
|
|
12
|
+
return /* @__PURE__ */ o("button", {
|
|
13
13
|
type: "button",
|
|
14
|
-
"aria-label":
|
|
15
|
-
"aria-pressed":
|
|
16
|
-
onClick:
|
|
17
|
-
className:
|
|
18
|
-
children: /* @__PURE__ */
|
|
14
|
+
"aria-label": t,
|
|
15
|
+
"aria-pressed": n,
|
|
16
|
+
onClick: r,
|
|
17
|
+
className: e("inline-flex size-7 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-action-secondary-bg hover:text-text-primary", n && "bg-action-secondary-bg text-text-primary"),
|
|
18
|
+
children: /* @__PURE__ */ o(i, { size: 14 })
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
function m({ id:
|
|
22
|
-
let v =
|
|
23
|
-
extensions: [
|
|
21
|
+
function m({ id: e, value: m, onChange: h, placeholder: g, ..._ }) {
|
|
22
|
+
let v = l({
|
|
23
|
+
extensions: [u.configure({
|
|
24
24
|
heading: !1,
|
|
25
25
|
blockquote: !1,
|
|
26
26
|
codeBlock: !1,
|
|
27
27
|
horizontalRule: !1,
|
|
28
28
|
strike: !1,
|
|
29
29
|
code: !1
|
|
30
|
-
}),
|
|
30
|
+
}), d.configure({ placeholder: g ?? "" })],
|
|
31
31
|
content: m || f,
|
|
32
32
|
editorProps: { attributes: {
|
|
33
|
-
...
|
|
33
|
+
...e ? { id: e } : {},
|
|
34
34
|
role: "textbox",
|
|
35
35
|
"aria-multiline": "true",
|
|
36
36
|
..._["aria-required"] ? { "aria-required": "true" } : {},
|
|
@@ -41,41 +41,41 @@ function m({ id: i, value: m, onChange: h, placeholder: g, ..._ }) {
|
|
|
41
41
|
h(t === f ? "" : t);
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
return
|
|
44
|
+
return t(() => {
|
|
45
45
|
if (!v || v.isFocused) return;
|
|
46
46
|
let e = v.getHTML(), t = m || f;
|
|
47
47
|
e !== t && v.commands.setContent(t);
|
|
48
|
-
}, [v, m]), v ? /* @__PURE__ */
|
|
48
|
+
}, [v, m]), v ? /* @__PURE__ */ s("div", {
|
|
49
49
|
className: "w-full rounded-lg border border-border-default bg-bg-surface focus-within:outline-none focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ s("div", {
|
|
51
51
|
className: "flex items-center gap-1 border-b border-border-default px-2 py-1.5",
|
|
52
52
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ o(p, {
|
|
54
54
|
label: "Bold",
|
|
55
55
|
active: v.isActive("bold"),
|
|
56
56
|
onClick: () => v.chain().focus().toggleBold().run(),
|
|
57
|
-
Icon:
|
|
57
|
+
Icon: n
|
|
58
58
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ o(p, {
|
|
60
60
|
label: "Italic",
|
|
61
61
|
active: v.isActive("italic"),
|
|
62
62
|
onClick: () => v.chain().focus().toggleItalic().run(),
|
|
63
|
-
Icon:
|
|
63
|
+
Icon: r
|
|
64
64
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ o(p, {
|
|
66
66
|
label: "Bullet list",
|
|
67
67
|
active: v.isActive("bulletList"),
|
|
68
68
|
onClick: () => v.chain().focus().toggleBulletList().run(),
|
|
69
|
-
Icon:
|
|
69
|
+
Icon: i
|
|
70
70
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ o(p, {
|
|
72
72
|
label: "Numbered list",
|
|
73
73
|
active: v.isActive("orderedList"),
|
|
74
74
|
onClick: () => v.chain().focus().toggleOrderedList().run(),
|
|
75
|
-
Icon:
|
|
75
|
+
Icon: a
|
|
76
76
|
})
|
|
77
77
|
]
|
|
78
|
-
}), /* @__PURE__ */
|
|
78
|
+
}), /* @__PURE__ */ o(c, {
|
|
79
79
|
editor: v,
|
|
80
80
|
className: "px-4 py-2.5"
|
|
81
81
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.js","names":["StarterKit","Placeholder","
|
|
1
|
+
{"version":3,"file":"RichTextEditor.js","names":["StarterKit","Placeholder","EMPTY_DOC","ToolbarButton","label","active","cn","Icon","RichTextEditor","rest","editor","useEditor","placeholder","value","id","instance","html","useEffect","current","next","Bold","Italic","List","ListOrdered","EditorContent"],"sources":["../../../../src/support/components/careers/RichTextEditor.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { EditorContent, useEditor } from '@tiptap/react';\nimport StarterKit from '@tiptap/starter-kit';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport { Bold, Italic, List, ListOrdered } from 'lucide-react';\nimport { cn } from '../../utils/cn';\nimport '../../styles/richtext.css';\n\n/**\n * Minimal WYSIWYG editor for admin-authored candidate-facing copy (job\n * assignment description / problem statement). Output is an HTML string —\n * the backend re-sanitizes it to an allowlist before persisting and again\n * before rendering it into a candidate email, so this editor only needs to\n * produce well-formed HTML, not police content itself.\n */\nexport interface RichTextEditorProps {\n id?: string;\n value: string;\n onChange: (html: string) => void;\n placeholder?: string;\n 'aria-required'?: boolean;\n}\n\nconst EMPTY_DOC = '<p></p>';\n\nfunction ToolbarButton({\n label,\n active,\n onClick,\n Icon,\n}: {\n label: string;\n active: boolean;\n onClick: () => void;\n Icon: typeof Bold;\n}) {\n return (\n <button\n type=\"button\"\n aria-label={label}\n aria-pressed={active}\n onClick={onClick}\n className={cn(\n 'inline-flex size-7 items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-action-secondary-bg hover:text-text-primary',\n active && 'bg-action-secondary-bg text-text-primary'\n )}\n >\n <Icon size={14} />\n </button>\n );\n}\n\nexport function RichTextEditor({ id, value, onChange, placeholder, ...rest }: RichTextEditorProps) {\n const editor = useEditor({\n extensions: [\n StarterKit.configure({\n heading: false,\n blockquote: false,\n codeBlock: false,\n horizontalRule: false,\n strike: false,\n code: false,\n }),\n Placeholder.configure({ placeholder: placeholder ?? '' }),\n ],\n content: value || EMPTY_DOC,\n editorProps: {\n attributes: {\n ...(id ? { id } : {}),\n role: 'textbox',\n 'aria-multiline': 'true',\n ...(rest['aria-required'] ? { 'aria-required': 'true' } : {}),\n class: 'support-richtext focus:outline-none min-h-24',\n },\n },\n onUpdate: ({ editor: instance }) => {\n const html = instance.getHTML();\n onChange(html === EMPTY_DOC ? '' : html);\n },\n });\n\n // Re-sync the editor's content when the caller resets `value` out from under\n // it (e.g. the \"Add Assignment\" dialog re-opening for a different\n // assignment, or a create/edit form reset) — but never fight the user's own\n // in-progress typing.\n useEffect(() => {\n if (!editor || editor.isFocused) return;\n const current = editor.getHTML();\n const next = value || EMPTY_DOC;\n if (current === next) return;\n editor.commands.setContent(next);\n }, [editor, value]);\n\n if (!editor) return null;\n\n return (\n <div className=\"w-full rounded-lg border border-border-default bg-bg-surface focus-within:outline-none focus-within:ring-2 focus-within:ring-primary/20 focus-within:border-primary\">\n <div className=\"flex items-center gap-1 border-b border-border-default px-2 py-1.5\">\n <ToolbarButton\n label=\"Bold\"\n active={editor.isActive('bold')}\n onClick={() => editor.chain().focus().toggleBold().run()}\n Icon={Bold}\n />\n <ToolbarButton\n label=\"Italic\"\n active={editor.isActive('italic')}\n onClick={() => editor.chain().focus().toggleItalic().run()}\n Icon={Italic}\n />\n <ToolbarButton\n label=\"Bullet list\"\n active={editor.isActive('bulletList')}\n onClick={() => editor.chain().focus().toggleBulletList().run()}\n Icon={List}\n />\n <ToolbarButton\n label=\"Numbered list\"\n active={editor.isActive('orderedList')}\n onClick={() => editor.chain().focus().toggleOrderedList().run()}\n Icon={ListOrdered}\n />\n </div>\n <EditorContent editor={editor} className=\"px-4 py-2.5\" />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAuBA,IAAME,IAAY;AAElB,SAASC,EAAc,EACrB,UACA,WACA,YACA,WAMC;CACD,OACE,kBAAC,UAAD;EACE,MAAK;EACL,cAAYC;EACZ,gBAAcC;EACL;EACT,WAAWC,EACT,wJACAD,KAAU,0CACZ;EAEA,UAAA,kBAACE,GAAD,EAAM,MAAM,GAAK,CAAA;CACX,CAAA;AAEZ;AAEA,SAAgBC,EAAe,EAAE,OAAI,UAAO,aAAU,gBAAa,GAAGC,KAA6B;CACjG,IAAMC,IAASC,EAAU;EACvB,YAAY,CACVX,EAAW,UAAU;GACnB,SAAS;GACT,YAAY;GACZ,WAAW;GACX,gBAAgB;GAChB,QAAQ;GACR,MAAM;EACR,CAAC,GACDC,EAAY,UAAU,EAAE,aAAaW,KAAe,GAAG,CAAC,CAC1D;EACA,SAASC,KAASX;EAClB,aAAa,EACX,YAAY;GACV,GAAIY,IAAK,EAAE,MAAG,IAAI,CAAC;GACnB,MAAM;GACN,kBAAkB;GAClB,GAAIL,EAAK,mBAAmB,EAAE,iBAAiB,OAAO,IAAI,CAAC;GAC3D,OAAO;EACT,EACF;EACA,WAAW,EAAE,QAAQM,QAAe;GAClC,IAAMC,IAAOD,EAAS,QAAQ;GAC9B,EAASC,MAASd,IAAY,KAAKc,CAAI;EACzC;CACF,CAAC;CAgBD,OAVAC,QAAgB;EACd,IAAI,CAACP,KAAUA,EAAO,WAAW;EACjC,IAAMQ,IAAUR,EAAO,QAAQ,GACzBS,IAAON,KAASX;EACtB,AAAIgB,MAAYC,KAChBT,EAAO,SAAS,WAAWS,CAAI;CACjC,GAAG,CAACT,GAAQG,CAAK,CAAC,GAEbH,IAGH,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACE,kBAACP,GAAD;KACE,OAAM;KACN,QAAQO,EAAO,SAAS,MAAM;KAC9B,eAAeA,EAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI;KACvD,MAAMU;IACP,CAAA;IACD,kBAACjB,GAAD;KACE,OAAM;KACN,QAAQO,EAAO,SAAS,QAAQ;KAChC,eAAeA,EAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI;KACzD,MAAMW;IACP,CAAA;IACD,kBAAClB,GAAD;KACE,OAAM;KACN,QAAQO,EAAO,SAAS,YAAY;KACpC,eAAeA,EAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC,IAAI;KAC7D,MAAMY;IACP,CAAA;IACD,kBAACnB,GAAD;KACE,OAAM;KACN,QAAQO,EAAO,SAAS,aAAa;KACrC,eAAeA,EAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC,IAAI;KAC9D,MAAMa;IACP,CAAA;GACE;EACL,CAAA,GAAA,kBAACC,GAAD;GAAuB;GAAQ,WAAU;EAAe,CAAA,CACrD;C,KA/Ba;AAiCtB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface RelatedArticlesProps {
|
|
2
|
+
categoryId: string;
|
|
3
|
+
currentArticleId: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Published articles from the same category, minus the one being read
|
|
7
|
+
* (BOFF-11844, SUP-ART-12). Renders nothing while loading, on error or when
|
|
8
|
+
* the category has no other articles, so it never pushes an empty box onto
|
|
9
|
+
* the page.
|
|
10
|
+
*/
|
|
11
|
+
export declare function RelatedArticles({ categoryId, currentArticleId }: RelatedArticlesProps): import('react').JSX.Element | null;
|
|
12
|
+
export {};
|