@burdenoff/microfe-support 2026.825.1 → 2026.830.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/support/SupportAdminRoutes.js +52 -51
- package/dist/support/SupportAdminRoutes.js.map +1 -1
- package/dist/support/components/careers/JobApplicationFilterContextGuard.d.ts +20 -0
- package/dist/support/components/careers/JobApplicationFilterContextGuard.js +16 -0
- package/dist/support/components/careers/JobApplicationFilterContextGuard.js.map +1 -0
- package/dist/support/hooks/useDebouncedUrlText.d.ts +33 -0
- package/dist/support/hooks/useDebouncedUrlText.js +28 -0
- package/dist/support/hooks/useDebouncedUrlText.js.map +1 -0
- package/dist/support/pages/JobApplicationsPage.js +447 -374
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/utils/jobApplicationFilterParams.d.ts +107 -0
- package/dist/support/utils/jobApplicationFilterParams.js +123 -0
- package/dist/support/utils/jobApplicationFilterParams.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,107 +1,108 @@
|
|
|
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 { JobApplicationFilterContextGuard as r } from "./components/careers/JobApplicationFilterContextGuard.js";
|
|
4
|
+
import { Suspense as i, lazy as a } from "react";
|
|
5
|
+
import { Navigate as o, Route as s, Routes as c, useLocation as l } from "react-router";
|
|
6
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
7
|
//#region src/support/SupportAdminRoutes.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let e =
|
|
10
|
-
return /* @__PURE__ */
|
|
8
|
+
var f = a(() => import("./pages/TicketDetailAdminPage.js").then((e) => ({ default: e.TicketDetailAdminPage }))), p = a(() => import("./pages/ContactInquiriesPage.js").then((e) => ({ default: e.ContactInquiriesPage }))), m = a(() => import("./pages/ContactInquiryDetailPage.js").then((e) => ({ default: e.ContactInquiryDetailPage }))), h = a(() => import("./pages/JobApplicationsPage.js").then((e) => ({ default: e.JobApplicationsPage }))), g = a(() => import("./pages/JobApplicationDetailPage.js").then((e) => ({ default: e.JobApplicationDetailPage }))), _ = a(() => import("./pages/JobPostingsPage.js").then((e) => ({ default: e.JobPostingsPage }))), v = a(() => import("./pages/JobPostingDetailPage.js").then((e) => ({ default: e.JobPostingDetailPage }))), y = a(() => import("./pages/InterviewersPage.js").then((e) => ({ default: e.InterviewersPage }))), b = a(() => import("./pages/KnowledgeBaseAdminPage.js").then((e) => ({ default: e.KnowledgeBaseAdminPage }))), x = a(() => import("./pages/ArticleDetailAdminPage.js").then((e) => ({ default: e.ArticleDetailAdminPage }))), S = a(() => import("./pages/CreateArticlePage.js").then((e) => ({ default: e.CreateArticlePage }))), C = a(() => import("./pages/EditArticlePage.js").then((e) => ({ default: e.EditArticlePage }))), w = a(() => import("./pages/AnalyticsPage.js").then((e) => ({ default: e.AnalyticsPage }))), T = a(() => import("./pages/SettingsPage.js").then((e) => ({ default: e.SettingsPage })));
|
|
9
|
+
function E() {
|
|
10
|
+
let e = l(), t = e.pathname.replace("/knowledge-base", "/kb");
|
|
11
|
+
return /* @__PURE__ */ u(o, {
|
|
11
12
|
to: `${t}${e.search}${e.hash}`,
|
|
12
13
|
replace: !0
|
|
13
14
|
});
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
fallback: /* @__PURE__ */
|
|
18
|
-
children: /* @__PURE__ */ u(
|
|
19
|
-
/* @__PURE__ */
|
|
16
|
+
function D() {
|
|
17
|
+
return /* @__PURE__ */ d(i, {
|
|
18
|
+
fallback: /* @__PURE__ */ u(t, {}),
|
|
19
|
+
children: [/* @__PURE__ */ u(r, {}), /* @__PURE__ */ d(c, { children: [
|
|
20
|
+
/* @__PURE__ */ u(s, {
|
|
20
21
|
index: !0,
|
|
21
|
-
element: /* @__PURE__ */
|
|
22
|
+
element: /* @__PURE__ */ u(o, {
|
|
22
23
|
to: "tickets",
|
|
23
24
|
replace: !0
|
|
24
25
|
})
|
|
25
26
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ u(s, {
|
|
27
28
|
path: "tickets",
|
|
28
|
-
element: /* @__PURE__ */
|
|
29
|
+
element: /* @__PURE__ */ u(n, { adminView: !0 })
|
|
29
30
|
}),
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ u(s, {
|
|
31
32
|
path: "tickets/new",
|
|
32
|
-
element: /* @__PURE__ */
|
|
33
|
+
element: /* @__PURE__ */ u(o, {
|
|
33
34
|
to: "../tickets",
|
|
34
35
|
replace: !0
|
|
35
36
|
})
|
|
36
37
|
}),
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ u(s, {
|
|
38
39
|
path: "tickets/:ticketId",
|
|
39
|
-
element: /* @__PURE__ */
|
|
40
|
+
element: /* @__PURE__ */ u(f, {})
|
|
40
41
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ u(s, {
|
|
42
43
|
path: "inquiries",
|
|
43
|
-
element: /* @__PURE__ */
|
|
44
|
+
element: /* @__PURE__ */ u(p, {})
|
|
44
45
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ u(s, {
|
|
46
47
|
path: "inquiries/:id",
|
|
47
|
-
element: /* @__PURE__ */
|
|
48
|
+
element: /* @__PURE__ */ u(m, {})
|
|
48
49
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ u(s, {
|
|
50
51
|
path: "applications/postings",
|
|
51
|
-
element: /* @__PURE__ */
|
|
52
|
+
element: /* @__PURE__ */ u(_, {})
|
|
52
53
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ u(s, {
|
|
54
55
|
path: "applications/postings/:id",
|
|
55
|
-
element: /* @__PURE__ */
|
|
56
|
+
element: /* @__PURE__ */ u(v, {})
|
|
56
57
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ u(s, {
|
|
58
59
|
path: "applications/interviewers",
|
|
59
|
-
element: /* @__PURE__ */
|
|
60
|
+
element: /* @__PURE__ */ u(y, {})
|
|
60
61
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ u(s, {
|
|
62
63
|
path: "applications",
|
|
63
|
-
element: /* @__PURE__ */
|
|
64
|
+
element: /* @__PURE__ */ u(h, {})
|
|
64
65
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ u(s, {
|
|
66
67
|
path: "applications/:id",
|
|
67
|
-
element: /* @__PURE__ */
|
|
68
|
+
element: /* @__PURE__ */ u(g, {})
|
|
68
69
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ u(s, {
|
|
70
71
|
path: "kb",
|
|
71
|
-
element: /* @__PURE__ */
|
|
72
|
+
element: /* @__PURE__ */ u(b, {})
|
|
72
73
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ u(s, {
|
|
74
75
|
path: "kb/articles/new",
|
|
75
|
-
element: /* @__PURE__ */
|
|
76
|
+
element: /* @__PURE__ */ u(S, {})
|
|
76
77
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ u(s, {
|
|
78
79
|
path: "kb/articles/:slug",
|
|
79
|
-
element: /* @__PURE__ */
|
|
80
|
+
element: /* @__PURE__ */ u(x, {})
|
|
80
81
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ u(s, {
|
|
82
83
|
path: "kb/articles/:slug/edit",
|
|
83
|
-
element: /* @__PURE__ */
|
|
84
|
+
element: /* @__PURE__ */ u(C, {})
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ u(s, {
|
|
86
87
|
path: "knowledge-base/*",
|
|
87
|
-
element: /* @__PURE__ */
|
|
88
|
+
element: /* @__PURE__ */ u(E, {})
|
|
88
89
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ u(s, {
|
|
90
91
|
path: "analytics",
|
|
91
|
-
element: /* @__PURE__ */
|
|
92
|
+
element: /* @__PURE__ */ u(w, {})
|
|
92
93
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ u(s, {
|
|
94
95
|
path: "settings",
|
|
95
|
-
element: /* @__PURE__ */
|
|
96
|
+
element: /* @__PURE__ */ u(T, {})
|
|
96
97
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ u(s, {
|
|
98
99
|
path: "*",
|
|
99
|
-
element: /* @__PURE__ */
|
|
100
|
+
element: /* @__PURE__ */ u(e, {})
|
|
100
101
|
})
|
|
101
|
-
] })
|
|
102
|
+
] })]
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
//#endregion
|
|
105
|
-
export {
|
|
106
|
+
export { D as SupportAdminRoutes };
|
|
106
107
|
|
|
107
108
|
//# sourceMappingURL=SupportAdminRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportAdminRoutes.js","names":[],"sources":["../../src/support/SupportAdminRoutes.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 — admin-specific variants for mixed pages\nconst TicketDetailAdminPage = lazy(() =>\n import('./pages/TicketDetailAdminPage').then((m) => ({ default: m.TicketDetailAdminPage }))\n);\nconst ContactInquiriesPage = lazy(() =>\n import('./pages/ContactInquiriesPage').then((m) => ({ default: m.ContactInquiriesPage }))\n);\nconst ContactInquiryDetailPage = lazy(() =>\n import('./pages/ContactInquiryDetailPage').then((m) => ({\n default: m.ContactInquiryDetailPage,\n }))\n);\nconst JobApplicationsPage = lazy(() =>\n import('./pages/JobApplicationsPage').then((m) => ({ default: m.JobApplicationsPage }))\n);\nconst JobApplicationDetailPage = lazy(() =>\n import('./pages/JobApplicationDetailPage').then((m) => ({\n default: m.JobApplicationDetailPage,\n }))\n);\nconst JobPostingsPage = lazy(() =>\n import('./pages/JobPostingsPage').then((m) => ({ default: m.JobPostingsPage }))\n);\nconst JobPostingDetailPage = lazy(() =>\n import('./pages/JobPostingDetailPage').then((m) => ({\n default: m.JobPostingDetailPage,\n }))\n);\nconst InterviewersPage = lazy(() =>\n import('./pages/InterviewersPage').then((m) => ({ default: m.InterviewersPage }))\n);\nconst KnowledgeBaseAdminPage = lazy(() =>\n import('./pages/KnowledgeBaseAdminPage').then((m) => ({ default: m.KnowledgeBaseAdminPage }))\n);\nconst ArticleDetailAdminPage = lazy(() =>\n import('./pages/ArticleDetailAdminPage').then((m) => ({ default: m.ArticleDetailAdminPage }))\n);\nconst CreateArticlePage = lazy(() =>\n import('./pages/CreateArticlePage').then((m) => ({ default: m.CreateArticlePage }))\n);\nconst EditArticlePage = lazy(() =>\n import('./pages/EditArticlePage').then((m) => ({ default: m.EditArticlePage }))\n);\nconst AnalyticsPage = lazy(() =>\n import('./pages/AnalyticsPage').then((m) => ({ default: m.AnalyticsPage }))\n);\nconst SettingsPage = lazy(() =>\n import('./pages/SettingsPage').then((m) => ({ default: m.SettingsPage }))\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 * Admin-facing routes for the Support microfrontend.\n *\n * Includes all support management routes:\n * - Ticket management (list and view with full admin controls)\n * - Contact inquiries management\n * - Knowledge base authoring (create, edit, publish)\n * - Support analytics and reporting\n * - Support settings (SLA policies, canned responses, categories)\n *\n * User-only ticket and knowledge-base routes are excluded — see SupportUserRoutes for those.\n */\nexport function SupportAdminRoutes() {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect */}\n <Route index element={<Navigate to=\"tickets\" replace />} />\n\n {/* Tickets — admin triage lists all users' tickets */}\n <Route path=\"tickets\" element={<TicketListPage adminView />} />\n <Route path=\"tickets/new\" element={<Navigate to=\"../tickets\" replace />} />\n <Route path=\"tickets/:ticketId\" element={<TicketDetailAdminPage />} />\n\n {/* Contact Inquiries */}\n <Route path=\"inquiries\" element={<ContactInquiriesPage />} />\n <Route path=\"inquiries/:id\" element={<ContactInquiryDetailPage />} />\n\n {/* Job Applications (careers form submissions) */}\n <Route path=\"applications/postings\" element={<JobPostingsPage />} />\n <Route path=\"applications/postings/:id\" element={<JobPostingDetailPage />} />\n <Route path=\"applications/interviewers\" element={<InterviewersPage />} />\n <Route path=\"applications\" element={<JobApplicationsPage />} />\n <Route path=\"applications/:id\" element={<JobApplicationDetailPage />} />\n\n {/* Knowledge Base (full authoring) — canonical /kb paths */}\n <Route path=\"kb\" element={<KnowledgeBaseAdminPage />} />\n <Route path=\"kb/articles/new\" element={<CreateArticlePage />} />\n <Route path=\"kb/articles/:slug\" element={<ArticleDetailAdminPage />} />\n <Route path=\"kb/articles/:slug/edit\" element={<EditArticlePage />} />\n\n {/* /knowledge-base/* alias — redirects to the canonical /kb/* path */}\n <Route path=\"knowledge-base/*\" element={<KnowledgeBaseAliasRedirect />} />\n\n {/* Analytics (admin/manager only) */}\n <Route path=\"analytics\" element={<AnalyticsPage />} />\n\n {/* Settings (admin only) */}\n <Route path=\"settings\" element={<SettingsPage />} />\n\n {/* Catch-all redirect */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupportAdminRoutes.js","names":[],"sources":["../../src/support/SupportAdminRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Routes, Route, Navigate, useLocation } from 'react-router';\nimport { PageLoader, CatchAllRedirect } from './components/RouteHelpers';\nimport { JobApplicationFilterContextGuard } from './components/careers/JobApplicationFilterContextGuard';\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 — admin-specific variants for mixed pages\nconst TicketDetailAdminPage = lazy(() =>\n import('./pages/TicketDetailAdminPage').then((m) => ({ default: m.TicketDetailAdminPage }))\n);\nconst ContactInquiriesPage = lazy(() =>\n import('./pages/ContactInquiriesPage').then((m) => ({ default: m.ContactInquiriesPage }))\n);\nconst ContactInquiryDetailPage = lazy(() =>\n import('./pages/ContactInquiryDetailPage').then((m) => ({\n default: m.ContactInquiryDetailPage,\n }))\n);\nconst JobApplicationsPage = lazy(() =>\n import('./pages/JobApplicationsPage').then((m) => ({ default: m.JobApplicationsPage }))\n);\nconst JobApplicationDetailPage = lazy(() =>\n import('./pages/JobApplicationDetailPage').then((m) => ({\n default: m.JobApplicationDetailPage,\n }))\n);\nconst JobPostingsPage = lazy(() =>\n import('./pages/JobPostingsPage').then((m) => ({ default: m.JobPostingsPage }))\n);\nconst JobPostingDetailPage = lazy(() =>\n import('./pages/JobPostingDetailPage').then((m) => ({\n default: m.JobPostingDetailPage,\n }))\n);\nconst InterviewersPage = lazy(() =>\n import('./pages/InterviewersPage').then((m) => ({ default: m.InterviewersPage }))\n);\nconst KnowledgeBaseAdminPage = lazy(() =>\n import('./pages/KnowledgeBaseAdminPage').then((m) => ({ default: m.KnowledgeBaseAdminPage }))\n);\nconst ArticleDetailAdminPage = lazy(() =>\n import('./pages/ArticleDetailAdminPage').then((m) => ({ default: m.ArticleDetailAdminPage }))\n);\nconst CreateArticlePage = lazy(() =>\n import('./pages/CreateArticlePage').then((m) => ({ default: m.CreateArticlePage }))\n);\nconst EditArticlePage = lazy(() =>\n import('./pages/EditArticlePage').then((m) => ({ default: m.EditArticlePage }))\n);\nconst AnalyticsPage = lazy(() =>\n import('./pages/AnalyticsPage').then((m) => ({ default: m.AnalyticsPage }))\n);\nconst SettingsPage = lazy(() =>\n import('./pages/SettingsPage').then((m) => ({ default: m.SettingsPage }))\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 * Admin-facing routes for the Support microfrontend.\n *\n * Includes all support management routes:\n * - Ticket management (list and view with full admin controls)\n * - Contact inquiries management\n * - Knowledge base authoring (create, edit, publish)\n * - Support analytics and reporting\n * - Support settings (SLA policies, canned responses, categories)\n *\n * User-only ticket and knowledge-base routes are excluded — see SupportUserRoutes for those.\n */\nexport function SupportAdminRoutes() {\n return (\n <Suspense fallback={<PageLoader />}>\n {/* Mounted across every /support route, including the job application\n detail page, so a context switch there cannot send stale filters back\n to the list. */}\n <JobApplicationFilterContextGuard />\n <Routes>\n {/* Default redirect */}\n <Route index element={<Navigate to=\"tickets\" replace />} />\n\n {/* Tickets — admin triage lists all users' tickets */}\n <Route path=\"tickets\" element={<TicketListPage adminView />} />\n <Route path=\"tickets/new\" element={<Navigate to=\"../tickets\" replace />} />\n <Route path=\"tickets/:ticketId\" element={<TicketDetailAdminPage />} />\n\n {/* Contact Inquiries */}\n <Route path=\"inquiries\" element={<ContactInquiriesPage />} />\n <Route path=\"inquiries/:id\" element={<ContactInquiryDetailPage />} />\n\n {/* Job Applications (careers form submissions) */}\n <Route path=\"applications/postings\" element={<JobPostingsPage />} />\n <Route path=\"applications/postings/:id\" element={<JobPostingDetailPage />} />\n <Route path=\"applications/interviewers\" element={<InterviewersPage />} />\n <Route path=\"applications\" element={<JobApplicationsPage />} />\n <Route path=\"applications/:id\" element={<JobApplicationDetailPage />} />\n\n {/* Knowledge Base (full authoring) — canonical /kb paths */}\n <Route path=\"kb\" element={<KnowledgeBaseAdminPage />} />\n <Route path=\"kb/articles/new\" element={<CreateArticlePage />} />\n <Route path=\"kb/articles/:slug\" element={<ArticleDetailAdminPage />} />\n <Route path=\"kb/articles/:slug/edit\" element={<EditArticlePage />} />\n\n {/* /knowledge-base/* alias — redirects to the canonical /kb/* path */}\n <Route path=\"knowledge-base/*\" element={<KnowledgeBaseAliasRedirect />} />\n\n {/* Analytics (admin/manager only) */}\n <Route path=\"analytics\" element={<AnalyticsPage />} />\n\n {/* Settings (admin only) */}\n <Route path=\"settings\" element={<SettingsPage />} />\n\n {/* Catch-all redirect */}\n <Route path=\"*\" element={<CatchAllRedirect />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;AAUA,IAAM,IAAwB,QAC5B,OAAO,mCAAgC,CAAC,MAAM,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAC5F,GACM,IAAuB,QAC3B,OAAO,kCAA+B,CAAC,MAAM,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAC1F,GACM,IAA2B,QAC/B,OAAO,sCAAmC,CAAC,MAAM,OAAO,EACtD,SAAS,EAAE,yBACb,EAAE,CACJ,GACM,IAAsB,QAC1B,OAAO,iCAA8B,CAAC,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CACxF,GACM,IAA2B,QAC/B,OAAO,sCAAm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yB,SAAS,kBAAC,GAAD,CAAkB,CAAA;GAAI,CAAA;GAGpE,kBAAC,GAAD;IAAO,MAAK;IAAmB,SAAS,kBAAC,GAAD,CAA6B,CAAA;GAAI,CAAA;GAGzE,kBAAC,GAAD;IAAO,MAAK;IAAY,SAAS,kBAAC,GAAD,CAAgB,CAAA;GAAI,CAAA;GAGrD,kBAAC,GAAD;IAAO,MAAK;IAAW,SAAS,kBAAC,GAAD,CAAe,CAAA;GAAI,CAAA;GAGnD,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD,CAAmB,CAAA;GAAI,CAAA;EAC1C,EAAA,CAAA,CACA;;AAEd"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drops job-application filters from the URL when the active context changes
|
|
3
|
+
* (BOFF-7068).
|
|
4
|
+
*
|
|
5
|
+
* The filters are parked in the query string so they survive opening a
|
|
6
|
+
* submission, but they only mean anything inside one org/workspace/product: a
|
|
7
|
+
* posting, product or interviewer id from the previous context would silently
|
|
8
|
+
* narrow the new context's list to nothing, with the panel showing a posting
|
|
9
|
+
* that is not even in its own dropdown.
|
|
10
|
+
*
|
|
11
|
+
* This lives beside the routes rather than in the list page because the switch
|
|
12
|
+
* commonly happens on the *detail* page, where the list is unmounted and cannot
|
|
13
|
+
* notice. "Back to Applications" forwards the query string verbatim, so without
|
|
14
|
+
* a guard here the stale filters would ride back into the new context. The list
|
|
15
|
+
* keeps its own copy of this reset for the case where it is on screen, since it
|
|
16
|
+
* additionally has to cancel a keystroke still inside its debounce window.
|
|
17
|
+
*
|
|
18
|
+
* Renders nothing.
|
|
19
|
+
*/
|
|
20
|
+
export declare function JobApplicationFilterContextGuard(): null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useSupport as e } from "../../providers/SupportProvider.js";
|
|
2
|
+
import { buildSupportContextKey as t, clearJobApplicationFilters as n, isSupportContextHydration as r, mergeSearchParams as i } from "../../utils/jobApplicationFilterParams.js";
|
|
3
|
+
import { useEffect as a, useRef as o } from "react";
|
|
4
|
+
import { useSearchParams as s } from "react-router";
|
|
5
|
+
//#region src/support/components/careers/JobApplicationFilterContextGuard.tsx
|
|
6
|
+
function c() {
|
|
7
|
+
let { organizationId: c, workspaceId: l, productId: u } = e(), [, d] = s(), f = t(c, l, u), p = o(f);
|
|
8
|
+
return a(() => {
|
|
9
|
+
let e = p.current;
|
|
10
|
+
p.current = f, e !== f && (r(e, f) || d((e) => n(i(e, typeof window > "u" ? "" : window.location.search)), { replace: !0 }));
|
|
11
|
+
}, [f, d]), null;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { c as JobApplicationFilterContextGuard };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=JobApplicationFilterContextGuard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JobApplicationFilterContextGuard.js","names":[],"sources":["../../../../src/support/components/careers/JobApplicationFilterContextGuard.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport { useSearchParams } from 'react-router';\nimport { useSupport } from '../../providers/SupportProvider';\nimport {\n buildSupportContextKey,\n clearJobApplicationFilters,\n isSupportContextHydration,\n mergeSearchParams,\n} from '../../utils/jobApplicationFilterParams';\n\n/**\n * Drops job-application filters from the URL when the active context changes\n * (BOFF-7068).\n *\n * The filters are parked in the query string so they survive opening a\n * submission, but they only mean anything inside one org/workspace/product: a\n * posting, product or interviewer id from the previous context would silently\n * narrow the new context's list to nothing, with the panel showing a posting\n * that is not even in its own dropdown.\n *\n * This lives beside the routes rather than in the list page because the switch\n * commonly happens on the *detail* page, where the list is unmounted and cannot\n * notice. \"Back to Applications\" forwards the query string verbatim, so without\n * a guard here the stale filters would ride back into the new context. The list\n * keeps its own copy of this reset for the case where it is on screen, since it\n * additionally has to cancel a keystroke still inside its debounce window.\n *\n * Renders nothing.\n */\nexport function JobApplicationFilterContextGuard() {\n const { organizationId, workspaceId, productId } = useSupport();\n const [, setSearchParams] = useSearchParams();\n\n const contextKey = buildSupportContextKey(organizationId, workspaceId, productId);\n // Seeded with the mounting context, so filters restored from the URL on a\n // fresh load survive — only a genuine switch clears them.\n const contextKeyRef = useRef(contextKey);\n\n useEffect(() => {\n const previousKey = contextKeyRef.current;\n contextKeyRef.current = contextKey;\n if (previousKey === contextKey) return;\n // An axis filling in from empty is the shell resolving its context, not a\n // switch — clearing there would wipe a deep-linked filtered URL.\n if (isSupportContextHydration(previousKey, contextKey)) return;\n setSearchParams(\n (current) =>\n clearJobApplicationFilters(\n // The shell has just rewritten org/workspace/project with a bare\n // replaceState the router cannot see, so merge from the address bar\n // or this write would put the previous context back in the URL.\n mergeSearchParams(current, typeof window === 'undefined' ? '' : window.location.search)\n ),\n { replace: true }\n );\n }, [contextKey, setSearchParams]);\n\n return null;\n}\n"],"mappings":";;;;;AA6BA,SAAgB,IAAmC;CACjD,IAAM,EAAE,mBAAgB,gBAAa,iBAAc,EAAW,GACxD,GAAG,KAAmB,EAAgB,GAEtC,IAAa,EAAuB,GAAgB,GAAa,CAAS,GAG1E,IAAgB,EAAO,CAAU;CAqBvC,OAnBA,QAAgB;EACd,IAAM,IAAc,EAAc;EAClC,EAAc,UAAU,GACpB,MAAgB,MAGhB,EAA0B,GAAa,CAAU,KACrD,GACG,MACC,EAIE,EAAkB,GAAS,OAAO,SAAW,MAAc,KAAK,OAAO,SAAS,MAAM,CACxF,GACF,EAAE,SAAS,GAAK,CAClB;CACF,GAAG,CAAC,GAAY,CAAe,CAAC,GAEzB;AACT"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two-way binding between a text input and a value that lives in the URL.
|
|
3
|
+
*
|
|
4
|
+
* Typing updates a local draft immediately (so the field stays responsive) and
|
|
5
|
+
* is written to the URL once the user pauses. An external change to the URL —
|
|
6
|
+
* browser back/forward, "Clear all", a context switch — replaces the draft.
|
|
7
|
+
*
|
|
8
|
+
* The `claimed` ref is what keeps those two directions from fighting: before a
|
|
9
|
+
* debounced write goes out we record the value we are about to put in the URL,
|
|
10
|
+
* so when it comes back as `urlValue` the sync-down effect recognises it as our
|
|
11
|
+
* own echo and leaves the draft alone. Without it, a write landing while the
|
|
12
|
+
* user is still typing would rewind the field to the value that just went out.
|
|
13
|
+
*
|
|
14
|
+
* The callback is held in a ref so that a caller re-creating it on every render
|
|
15
|
+
* cannot keep restarting the timer (which would stop the write ever landing).
|
|
16
|
+
*
|
|
17
|
+
* `commit` may return the value it actually wrote, which matters when the
|
|
18
|
+
* caller normalizes: a draft of only spaces serializes to nothing, so the URL
|
|
19
|
+
* does not change, so there is no new `urlValue` for the sync-down effect to
|
|
20
|
+
* echo back — that effect only runs when `urlValue` itself changes. Without a
|
|
21
|
+
* returned value the draft would stay un-normalized forever while the parsed
|
|
22
|
+
* value sits at the normalized one, leaving the two permanently unequal. On
|
|
23
|
+
* this page that difference is `searchPending`, which disables selection and
|
|
24
|
+
* every bulk action, so a stray space would lock those controls until the
|
|
25
|
+
* reviewer edited the field again.
|
|
26
|
+
*
|
|
27
|
+
* @param urlValue - current value as parsed from the URL
|
|
28
|
+
* @param commit - writes the debounced value back to the URL; may return the
|
|
29
|
+
* canonical value it wrote, when that differs from what it was given
|
|
30
|
+
* @param delayMs - idle time before writing
|
|
31
|
+
* @returns `[draft, setDraft, resetDraft]` for the input element
|
|
32
|
+
*/
|
|
33
|
+
export declare function useDebouncedUrlText(urlValue: string, commit: (value: string) => string | void, delayMs?: number): [string, (value: string) => void, (nextValue?: string) => void];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
|
|
2
|
+
//#region src/support/hooks/useDebouncedUrlText.ts
|
|
3
|
+
function i(i, a, o = 300) {
|
|
4
|
+
let [s, c] = r(i), l = n(i), u = n(a);
|
|
5
|
+
return t(() => {
|
|
6
|
+
u.current = a;
|
|
7
|
+
}), t(() => {
|
|
8
|
+
i !== l.current && (l.current = i, c(i));
|
|
9
|
+
}, [i]), t(() => {
|
|
10
|
+
if (s === l.current) return;
|
|
11
|
+
let e = setTimeout(() => {
|
|
12
|
+
l.current = s;
|
|
13
|
+
let e = u.current(s);
|
|
14
|
+
typeof e == "string" && e !== s && (l.current = e, c(e));
|
|
15
|
+
}, o);
|
|
16
|
+
return () => clearTimeout(e);
|
|
17
|
+
}, [s, o]), [
|
|
18
|
+
s,
|
|
19
|
+
c,
|
|
20
|
+
e((e = "") => {
|
|
21
|
+
l.current = e, c(e);
|
|
22
|
+
}, [])
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { i as useDebouncedUrlText };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=useDebouncedUrlText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebouncedUrlText.js","names":[],"sources":["../../../src/support/hooks/useDebouncedUrlText.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\n\n/**\n * Two-way binding between a text input and a value that lives in the URL.\n *\n * Typing updates a local draft immediately (so the field stays responsive) and\n * is written to the URL once the user pauses. An external change to the URL —\n * browser back/forward, \"Clear all\", a context switch — replaces the draft.\n *\n * The `claimed` ref is what keeps those two directions from fighting: before a\n * debounced write goes out we record the value we are about to put in the URL,\n * so when it comes back as `urlValue` the sync-down effect recognises it as our\n * own echo and leaves the draft alone. Without it, a write landing while the\n * user is still typing would rewind the field to the value that just went out.\n *\n * The callback is held in a ref so that a caller re-creating it on every render\n * cannot keep restarting the timer (which would stop the write ever landing).\n *\n * `commit` may return the value it actually wrote, which matters when the\n * caller normalizes: a draft of only spaces serializes to nothing, so the URL\n * does not change, so there is no new `urlValue` for the sync-down effect to\n * echo back — that effect only runs when `urlValue` itself changes. Without a\n * returned value the draft would stay un-normalized forever while the parsed\n * value sits at the normalized one, leaving the two permanently unequal. On\n * this page that difference is `searchPending`, which disables selection and\n * every bulk action, so a stray space would lock those controls until the\n * reviewer edited the field again.\n *\n * @param urlValue - current value as parsed from the URL\n * @param commit - writes the debounced value back to the URL; may return the\n * canonical value it wrote, when that differs from what it was given\n * @param delayMs - idle time before writing\n * @returns `[draft, setDraft, resetDraft]` for the input element\n */\nexport function useDebouncedUrlText(\n urlValue: string,\n commit: (value: string) => string | void,\n delayMs = 300\n): [string, (value: string) => void, (nextValue?: string) => void] {\n const [draft, setDraft] = useState(urlValue);\n const claimedRef = useRef(urlValue);\n const commitRef = useRef(commit);\n\n // Written in an effect rather than during render: React may replay or discard\n // a render, and a ref mutated there can leak from UI that never commits. The\n // timer below only reads this ref after a delay, long after the effect ran.\n useEffect(() => {\n commitRef.current = commit;\n });\n\n useEffect(() => {\n if (urlValue === claimedRef.current) return;\n claimedRef.current = urlValue;\n setDraft(urlValue);\n }, [urlValue]);\n\n useEffect(() => {\n if (draft === claimedRef.current) return;\n const timer = setTimeout(() => {\n claimedRef.current = draft;\n const committed = commitRef.current(draft);\n // Adopt the canonical value when the caller normalized what we sent. If\n // it matches `urlValue` already, the sync-down effect will never fire for\n // it, so this is the only chance to reconcile the draft.\n if (typeof committed === 'string' && committed !== draft) {\n claimedRef.current = committed;\n setDraft(committed);\n }\n }, delayMs);\n return () => clearTimeout(timer);\n }, [draft, delayMs]);\n\n /**\n * Drops a keystroke that is still inside its debounce window and adopts\n * `nextValue` — the value the URL is about to hold — instead.\n *\n * \"Clear all\" needs this: clearing an already-empty search box leaves\n * `urlValue` as the same empty string, so the sync-down effect above never\n * fires, and a pending write would land in the URL moments after the user\n * asked for a clean slate. Changing the draft cancels the timer, because the\n * write effect tears down on its way to deciding there is nothing to write.\n */\n const resetDraft = useCallback((nextValue = '') => {\n claimedRef.current = nextValue;\n setDraft(nextValue);\n }, []);\n\n return [draft, setDraft, resetDraft];\n}\n"],"mappings":";;AAkCA,SAAgB,EACd,GACA,GACA,IAAU,KACuD;CACjE,IAAM,CAAC,GAAO,KAAY,EAAS,CAAQ,GACrC,IAAa,EAAO,CAAQ,GAC5B,IAAY,EAAO,CAAM;CA8C/B,OAzCA,QAAgB;EACd,EAAU,UAAU;CACtB,CAAC,GAED,QAAgB;EACV,MAAa,EAAW,YAC5B,EAAW,UAAU,GACrB,EAAS,CAAQ;CACnB,GAAG,CAAC,CAAQ,CAAC,GAEb,QAAgB;EACd,IAAI,MAAU,EAAW,SAAS;EAClC,IAAM,IAAQ,iBAAiB;GAC7B,EAAW,UAAU;GACrB,IAAM,IAAY,EAAU,QAAQ,CAAK;GAIzC,AAAI,OAAO,KAAc,YAAY,MAAc,MACjD,EAAW,UAAU,GACrB,EAAS,CAAS;EAEtB,GAAG,CAAO;EACV,aAAa,aAAa,CAAK;CACjC,GAAG,CAAC,GAAO,CAAO,CAAC,GAiBZ;EAAC;EAAO;EALI,GAAa,IAAY,OAAO;GAEjD,AADA,EAAW,UAAU,GACrB,EAAS,CAAS;EACpB,GAAG,CAAC,CAEqB;CAAU;AACrC"}
|