@igstack/app-catalog-frontend-core 6.13.1 → 6.15.0
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/esm/index.d.ts +1 -1
- package/dist/esm/modules/appCatalog/ui/pages/ServiceDesksPage.d.ts +4 -3
- package/dist/esm/modules/appCatalog/ui/pages/ServiceDesksPage.js +73 -54
- package/dist/esm/modules/appCatalog/ui/pages/ServiceDesksPage.js.map +1 -1
- package/dist/esm/modules/appCatalog/ui/serviceDesks/ServiceDeskCard.d.ts +9 -10
- package/dist/esm/modules/appCatalog/ui/serviceDesks/ServiceDeskCard.js +39 -61
- package/dist/esm/modules/appCatalog/ui/serviceDesks/ServiceDeskCard.js.map +1 -1
- package/dist/esm/modules/appCatalog/ui/serviceDesks/ServiceDeskDetail.d.ts +3 -4
- package/dist/esm/modules/appCatalog/ui/serviceDesks/ServiceDeskDetail.js +9 -42
- package/dist/esm/modules/appCatalog/ui/serviceDesks/ServiceDeskDetail.js.map +1 -1
- package/dist/esm/modules/appCatalog/ui/serviceDesks/searchServiceDesks.d.ts +13 -0
- package/dist/esm/modules/appCatalog/ui/serviceDesks/searchServiceDesks.js +26 -0
- package/dist/esm/modules/appCatalog/ui/serviceDesks/searchServiceDesks.js.map +1 -1
- package/dist/esm/routeTree.gen.d.ts +34 -8
- package/dist/esm/routeTree.gen.js +13 -3
- package/dist/esm/routeTree.gen.js.map +1 -1
- package/dist/esm/routes/_layout/service-desks.$slug.d.ts +13 -0
- package/dist/esm/routes/_layout/service-desks._slug.js +14 -0
- package/dist/esm/routes/_layout/service-desks._slug.js.map +1 -0
- package/dist/esm/routes/_layout/service-desks.d.ts +0 -1
- package/dist/esm/routes/_layout/service-desks.js +5 -9
- package/dist/esm/routes/_layout/service-desks.js.map +1 -1
- package/dist/esm/types/uiSettings.d.ts +10 -0
- package/package.json +4 -4
- package/src/index.tsx +6 -1
- package/src/modules/appCatalog/ui/pages/ServiceDesksPage.tsx +121 -64
- package/src/modules/appCatalog/ui/serviceDesks/ServiceDeskCard.tsx +40 -59
- package/src/modules/appCatalog/ui/serviceDesks/ServiceDeskDetail.tsx +17 -59
- package/src/modules/appCatalog/ui/serviceDesks/searchServiceDesks.ts +36 -0
- package/src/routeTree.gen.ts +35 -5
- package/src/routes/_layout/service-desks.$slug.tsx +17 -0
- package/src/routes/_layout/service-desks.tsx +3 -7
- package/src/types/uiSettings.ts +11 -0
|
@@ -12,20 +12,18 @@ function ServiceDeskDetail({
|
|
|
12
12
|
}) {
|
|
13
13
|
const portal = desk.config.portal;
|
|
14
14
|
const band = /* @__PURE__ */ jsxs("div", { className: "pr-20", children: [
|
|
15
|
-
/* @__PURE__ */ jsx("h2", { className: "m-0 font-serif text-[28px] font-semibold leading-tight tracking-tight", children:
|
|
15
|
+
/* @__PURE__ */ jsx("h2", { className: "m-0 font-serif text-[28px] font-semibold leading-tight tracking-tight", children: form.name }),
|
|
16
16
|
/* @__PURE__ */ jsxs("p", { className: "mt-1 text-[14px] text-muted-foreground", children: [
|
|
17
17
|
/* @__PURE__ */ jsx("span", { className: "font-semibold tracking-wide", title: "Portal key", children: portal.key }),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
desk.displayName
|
|
21
|
-
] })
|
|
18
|
+
"· ",
|
|
19
|
+
desk.displayName
|
|
22
20
|
] })
|
|
23
21
|
] });
|
|
24
22
|
return /* @__PURE__ */ jsx(
|
|
25
23
|
DetailDialogShell,
|
|
26
24
|
{
|
|
27
|
-
label: `${
|
|
28
|
-
shownKey: `${desk.slug}:${
|
|
25
|
+
label: `${form.name} details`,
|
|
26
|
+
shownKey: `${desk.slug}:${form.id}`,
|
|
29
27
|
maxWidthClass: "max-w-[min(1000px,94vw)]",
|
|
30
28
|
focusSelector: "[data-primary-action]",
|
|
31
29
|
onClose,
|
|
@@ -77,52 +75,21 @@ function Overview({
|
|
|
77
75
|
}) {
|
|
78
76
|
var _a;
|
|
79
77
|
const portal = desk.config.portal;
|
|
80
|
-
const url = (form == null ? void 0 : form.url) ?? desk.config.url;
|
|
81
78
|
return /* @__PURE__ */ jsxs("div", { className: "flex max-w-[760px] flex-col gap-8 pt-1", children: [
|
|
82
79
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
83
|
-
|
|
80
|
+
form.description && /* @__PURE__ */ jsx("p", { className: "text-[17px] leading-[1.6]", children: form.description }),
|
|
84
81
|
desk.config.description && /* @__PURE__ */ jsx(
|
|
85
82
|
"p",
|
|
86
83
|
{
|
|
87
|
-
className:
|
|
84
|
+
className: form.description ? "mt-2 text-[14px] text-muted-foreground" : "text-[17px] leading-[1.6]",
|
|
88
85
|
children: desk.config.description
|
|
89
86
|
}
|
|
90
87
|
),
|
|
91
|
-
|
|
92
|
-
OpenButton,
|
|
93
|
-
{
|
|
94
|
-
url,
|
|
95
|
-
label: form ? "Open the form" : "Open the portal"
|
|
96
|
-
}
|
|
97
|
-
) })
|
|
88
|
+
/* @__PURE__ */ jsx("div", { className: "mt-5", children: /* @__PURE__ */ jsx(OpenButton, { url: form.url, label: "Open the form" }) })
|
|
98
89
|
] }),
|
|
99
|
-
|
|
90
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
100
91
|
/* @__PURE__ */ jsx(Heading, { children: "You will be asked for" }),
|
|
101
92
|
/* @__PURE__ */ jsx(FieldList, { fields: form.fields })
|
|
102
|
-
] }) : /* @__PURE__ */ jsxs("div", { children: [
|
|
103
|
-
/* @__PURE__ */ jsx(Heading, { children: "Forms on this portal" }),
|
|
104
|
-
portal.requestTypes.length ? /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-4", children: portal.requestTypes.map((rt) => /* @__PURE__ */ jsxs("li", { children: [
|
|
105
|
-
/* @__PURE__ */ jsxs(
|
|
106
|
-
"a",
|
|
107
|
-
{
|
|
108
|
-
href: rt.url,
|
|
109
|
-
target: "_blank",
|
|
110
|
-
rel: "noopener noreferrer",
|
|
111
|
-
className: "inline-flex items-center gap-1 text-[15px] font-medium underline decoration-muted-foreground/40 underline-offset-2 hover:decoration-foreground",
|
|
112
|
-
children: [
|
|
113
|
-
rt.name,
|
|
114
|
-
/* @__PURE__ */ jsx(
|
|
115
|
-
ExternalLink,
|
|
116
|
-
{
|
|
117
|
-
className: "size-3.5 text-muted-foreground",
|
|
118
|
-
"aria-hidden": "true"
|
|
119
|
-
}
|
|
120
|
-
)
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
),
|
|
124
|
-
rt.description && /* @__PURE__ */ jsx("p", { className: "text-[14px] text-muted-foreground", children: rt.description })
|
|
125
|
-
] }, rt.id)) }) : /* @__PURE__ */ jsx("p", { className: "text-[14px] text-muted-foreground", children: "This desk publishes no forms." })
|
|
126
93
|
] }),
|
|
127
94
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
128
95
|
/* @__PURE__ */ jsx(Heading, { children: "After you file" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceDeskDetail.js","sources":["../../../../../../src/modules/appCatalog/ui/serviceDesks/ServiceDeskDetail.tsx"],"sourcesContent":["import type {\n ServiceRequestField,\n ServiceRequestType,\n} from '@igstack/app-catalog-backend-core'\nimport {\n ArrowUpRight,\n ExternalLink,\n MessageSquareText,\n User,\n} from 'lucide-react'\nimport { displayUrl } from '~/modules/appCatalog/utils/displayUrl'\nimport { DetailDialogShell } from '../catalog/DetailDialogShell'\nimport { MarkdownText } from '../components/MarkdownText'\nimport { DetailTabs } from '../detail/DetailTabs'\nimport { liveOptions } from './searchServiceDesks'\nimport type { PortalDesk } from './searchServiceDesks'\n\n/**\n * A desk's card, opened from a result (then `form` is the form clicked) or from\n * the desk list (then it covers every form). Overview reads top to bottom like a\n * short page: what the request is for, the one way into it, what it asks, and\n * what happens after. Behind this card says where the card comes from.\n *\n * One link only: the button. The header is the subject, not a second door.\n */\nexport function ServiceDeskDetail({\n desk,\n form,\n onClose,\n}: {\n desk: PortalDesk\n form?: ServiceRequestType\n onClose: () => void\n}) {\n const portal = desk.config.portal\n\n const band = (\n <div className=\"pr-20\">\n <h2 className=\"m-0 font-serif text-[28px] font-semibold leading-tight tracking-tight\">\n {form?.name ?? desk.displayName}\n </h2>\n <p className=\"mt-1 text-[14px] text-muted-foreground\">\n <span className=\"font-semibold tracking-wide\" title=\"Portal key\">\n {portal.key}\n </span>\n {form && <> · {desk.displayName}</>}\n </p>\n </div>\n )\n\n return (\n <DetailDialogShell\n label={`${form?.name ?? desk.displayName} details`}\n shownKey={`${desk.slug}:${form?.id ?? ''}`}\n maxWidthClass=\"max-w-[min(1000px,94vw)]\"\n focusSelector=\"[data-primary-action]\"\n onClose={onClose}\n >\n <DetailTabs\n band={band}\n bandClassName=\"-mx-6 -mt-5 px-6 pt-5 sm:-mx-8 sm:-mt-7 sm:px-8 sm:pt-7\"\n tabs={[\n {\n id: 'overview',\n label: 'Overview',\n render: () => <Overview desk={desk} form={form} />,\n },\n {\n id: 'behind',\n label: 'Behind this card',\n render: () => <Behind desk={desk} />,\n },\n ]}\n />\n </DetailDialogShell>\n )\n}\n\n/** The card's one link out. The address is in its tooltip, not on the page. */\nfunction OpenButton({ url, label }: { url: string; label: string }) {\n return (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title={url}\n data-primary-action\n className=\"inline-flex h-11 items-center gap-1.5 rounded-full bg-primary px-5 text-[15px] font-semibold text-primary-foreground transition-colors hover:bg-primary/90\"\n >\n {label}\n <ArrowUpRight className=\"size-4\" aria-hidden=\"true\" />\n </a>\n )\n}\n\nfunction Heading({ children }: { children: React.ReactNode }) {\n return <h3 className=\"m-0 mb-2 text-[15px] font-semibold\">{children}</h3>\n}\n\nfunction Overview({\n desk,\n form,\n}: {\n desk: PortalDesk\n form?: ServiceRequestType\n}) {\n const portal = desk.config.portal\n const url = form?.url ?? desk.config.url\n return (\n <div className=\"flex max-w-[760px] flex-col gap-8 pt-1\">\n <div>\n {form?.description && (\n <p className=\"text-[17px] leading-[1.6]\">{form.description}</p>\n )}\n {desk.config.description && (\n <p\n className={\n form?.description\n ? 'mt-2 text-[14px] text-muted-foreground'\n : 'text-[17px] leading-[1.6]'\n }\n >\n {desk.config.description}\n </p>\n )}\n {url && (\n <div className=\"mt-5\">\n <OpenButton\n url={url}\n label={form ? 'Open the form' : 'Open the portal'}\n />\n </div>\n )}\n </div>\n\n {form ? (\n <div>\n <Heading>You will be asked for</Heading>\n <FieldList fields={form.fields} />\n </div>\n ) : (\n <div>\n <Heading>Forms on this portal</Heading>\n {portal.requestTypes.length ? (\n <ul className=\"flex flex-col gap-4\">\n {portal.requestTypes.map((rt) => (\n <li key={rt.id}>\n <a\n href={rt.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 text-[15px] font-medium underline decoration-muted-foreground/40 underline-offset-2 hover:decoration-foreground\"\n >\n {rt.name}\n <ExternalLink\n className=\"size-3.5 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n </a>\n {rt.description && (\n <p className=\"text-[14px] text-muted-foreground\">\n {rt.description}\n </p>\n )}\n </li>\n ))}\n </ul>\n ) : (\n <p className=\"text-[14px] text-muted-foreground\">\n This desk publishes no forms.\n </p>\n )}\n </div>\n )}\n\n <div>\n <Heading>After you file</Heading>\n {portal.followUp || portal.keyPeople?.length || portal.examples ? (\n <FollowUp desk={desk} />\n ) : (\n <p className=\"text-[14px] text-muted-foreground\">\n Nobody has written follow-up notes for this desk yet: what happens\n after you file, who to ask when it stalls.\n </p>\n )}\n </div>\n\n {portal.area && (\n <p className=\"text-[13px] text-muted-foreground\">Area: {portal.area}</p>\n )}\n </div>\n )\n}\n\n/** What the form asks, one line per field. A preview: nothing here is an input. */\nfunction FieldList({ fields }: { fields: ServiceRequestField[] }) {\n if (!fields.length) {\n return (\n <p className=\"text-[14px] text-muted-foreground\">\n Only a summary and a description of the problem.\n </p>\n )\n }\n return (\n <ul className=\"flex flex-col gap-2 text-[14.5px]\">\n {fields.map((f) => (\n <li key={f.name}>\n <span className=\"font-medium\">{f.name}</span>\n {!f.required && (\n <span className=\"text-muted-foreground\"> (optional)</span>\n )}\n <span className=\"text-muted-foreground\"> — {describeField(f)}</span>\n </li>\n ))}\n </ul>\n )\n}\n\nconst OPTIONS_LISTED = 12\n\n/** What a field takes, in words: its choices, or the kind of value. */\nexport function describeField(f: ServiceRequestField): string {\n const options = liveOptions(f)\n if (options.length) {\n const listed = options.slice(0, OPTIONS_LISTED).join(', ')\n const more =\n options.length > OPTIONS_LISTED\n ? ` and ${options.length - OPTIONS_LISTED} more`\n : ''\n return `${f.type === 'array' ? 'One or more of' : 'One of'}: ${listed}${more}`\n }\n if (f.type === 'user') return 'A person, picked from the directory'\n if (f.type === 'date' || f.type === 'datetime') return 'A date'\n return 'A short text'\n}\n\nfunction FollowUp({ desk }: { desk: PortalDesk }) {\n const { followUp, keyPeople, examples } = desk.config.portal\n return (\n <div className=\"flex max-w-[68ch] flex-col gap-5\">\n {followUp && <MarkdownText>{followUp}</MarkdownText>}\n {keyPeople?.length ? (\n <div>\n <p className=\"mb-2 text-[13px] font-semibold\">Key people</p>\n <div className=\"flex flex-wrap gap-2\">\n {keyPeople.map((p) => (\n <span\n key={p.name}\n className=\"inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-2 py-1 text-[13px]\"\n >\n <User\n className=\"size-3.5 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n {p.name}\n {p.role && (\n <span className=\"text-muted-foreground\">{p.role}</span>\n )}\n </span>\n ))}\n </div>\n </div>\n ) : null}\n {examples && (\n <div>\n <p className=\"mb-2 text-[13px] font-semibold\">See examples</p>\n <a\n href={examples.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-3 rounded-[var(--radius)] border border-border bg-card px-3.5 py-3 transition-colors hover:border-ring\"\n >\n <MessageSquareText\n className=\"size-5 shrink-0 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <span className=\"min-w-0 flex-1\">\n <span className=\"block text-[14px] font-semibold\">\n {examples.label}\n </span>\n <span className=\"block truncate text-[13px] text-muted-foreground\">\n {displayUrl(examples.url)}\n </span>\n </span>\n </a>\n </div>\n )}\n </div>\n )\n}\n\nfunction Behind({ desk }: { desk: PortalDesk }) {\n const portal = desk.config.portal\n const sources = [\n ...new Set([\n ...(desk.config.url ? [desk.config.url] : []),\n ...(portal.sources ?? []),\n ]),\n ]\n return (\n <div className=\"behind-panel\">\n <section className=\"behind-group\">\n <h2 className=\"behind-group__title\">Kept up to date from</h2>\n <ul className=\"space-y-2\">\n {sources.map((url, i) => (\n <li key={url} className=\"flex items-center gap-2 text-xs\">\n <span className=\"shrink-0 tabular-nums text-muted-foreground\">\n {i + 1}.\n </span>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 truncate hover:text-primary\"\n >\n {displayUrl(url)}\n <ExternalLink className=\"size-3 shrink-0\" aria-hidden=\"true\" />\n </a>\n </li>\n ))}\n </ul>\n {portal.syncedAt && (\n <p className=\"behind-dates\">\n Forms and fields last read {portal.syncedAt.slice(0, 10)}.\n </p>\n )}\n </section>\n {(portal.aiPrompt || portal.aiMemory) && (\n <section className=\"behind-group\">\n <h2 className=\"behind-group__title\">\n How the AI maintains this card\n </h2>\n {portal.aiPrompt && (\n <>\n <p className=\"behind-ai__label\">Prompt</p>\n <p className=\"behind-ai\">{portal.aiPrompt}</p>\n </>\n )}\n {portal.aiMemory && (\n <>\n <p className=\"behind-ai__label\">Memory</p>\n <p className=\"behind-ai\">{portal.aiMemory}</p>\n </>\n )}\n </section>\n )}\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;;;AAyBO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,SAAS,KAAK,OAAO;AAE3B,QAAM,OACJ,qBAAC,OAAA,EAAI,WAAU,SACb,UAAA;AAAA,IAAA,oBAAC,QAAG,WAAU,yEACX,WAAA,6BAAM,SAAQ,KAAK,aACtB;AAAA,IACA,qBAAC,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O,GAaT,CACD,GACH;AAAA,MACC,OAAO,YACN,qBAAC,KAAA,EAAE,WAAU,gBAAe,UAAA;AAAA,QAAA;AAAA,QACE,OAAO,SAAS,MAAM,GAAG,EAAE;AAAA,QAAE;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA,GAEJ;AAAA,KACE,OAAO,YAAY,OAAO,aAC1B,qBAAC,WAAA,EAAQ,WAAU,gBACjB,UAAA;AAAA,MAAA,oBAAC,MAAA,EAAG,WAAU,uBAAsB,UAAA,kCAEpC;AAAA,MACC,OAAO,YACN,qBAAA,UAAA,EACE,UAAA;AAAA,QAAA,oBAAC,KAAA,EAAE,WAAU,oBAAmB,UAAA,UAAM;AAAA,QACtC,oBAAC,KAAA,EAAE,WAAU,aAAa,iBAAO,SAAA,CAAS;AAAA,MAAA,GAC5C;AAAA,MAED,OAAO,YACN,qBAAA,UAAA,EACE,UAAA;AAAA,QAAA,oBAAC,KAAA,EAAE,WAAU,oBAAmB,UAAA,UAAM;AAAA,QACtC,oBAAC,KAAA,EAAE,WAAU,aAAa,iBAAO,SAAA,CAAS;AAAA,MAAA,EAAA,CAC5C;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"ServiceDeskDetail.js","sources":["../../../../../../src/modules/appCatalog/ui/serviceDesks/ServiceDeskDetail.tsx"],"sourcesContent":["import type {\n ServiceRequestField,\n ServiceRequestType,\n} from '@igstack/app-catalog-backend-core'\nimport {\n ArrowUpRight,\n ExternalLink,\n MessageSquareText,\n User,\n} from 'lucide-react'\nimport { displayUrl } from '~/modules/appCatalog/utils/displayUrl'\nimport { DetailDialogShell } from '../catalog/DetailDialogShell'\nimport { MarkdownText } from '../components/MarkdownText'\nimport { DetailTabs } from '../detail/DetailTabs'\nimport { liveOptions } from './searchServiceDesks'\nimport type { PortalDesk } from './searchServiceDesks'\n\n/**\n * One form's card, at `/service-desks/<slug>`. Overview reads top to bottom like\n * a short page: what the request is for, the one way into it, what it asks, and\n * what happens after. Behind this card says where the card comes from.\n *\n * One link only: the button. The header is the subject, not a second door.\n */\nexport function ServiceDeskDetail({\n desk,\n form,\n onClose,\n}: {\n desk: PortalDesk\n form: ServiceRequestType\n onClose: () => void\n}) {\n const portal = desk.config.portal\n\n const band = (\n <div className=\"pr-20\">\n <h2 className=\"m-0 font-serif text-[28px] font-semibold leading-tight tracking-tight\">\n {form.name}\n </h2>\n <p className=\"mt-1 text-[14px] text-muted-foreground\">\n <span className=\"font-semibold tracking-wide\" title=\"Portal key\">\n {portal.key}\n </span>\n · {desk.displayName}\n </p>\n </div>\n )\n\n return (\n <DetailDialogShell\n label={`${form.name} details`}\n shownKey={`${desk.slug}:${form.id}`}\n maxWidthClass=\"max-w-[min(1000px,94vw)]\"\n focusSelector=\"[data-primary-action]\"\n onClose={onClose}\n >\n <DetailTabs\n band={band}\n bandClassName=\"-mx-6 -mt-5 px-6 pt-5 sm:-mx-8 sm:-mt-7 sm:px-8 sm:pt-7\"\n tabs={[\n {\n id: 'overview',\n label: 'Overview',\n render: () => <Overview desk={desk} form={form} />,\n },\n {\n id: 'behind',\n label: 'Behind this card',\n render: () => <Behind desk={desk} />,\n },\n ]}\n />\n </DetailDialogShell>\n )\n}\n\n/** The card's one link out. The address is in its tooltip, not on the page. */\nfunction OpenButton({ url, label }: { url: string; label: string }) {\n return (\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title={url}\n data-primary-action\n className=\"inline-flex h-11 items-center gap-1.5 rounded-full bg-primary px-5 text-[15px] font-semibold text-primary-foreground transition-colors hover:bg-primary/90\"\n >\n {label}\n <ArrowUpRight className=\"size-4\" aria-hidden=\"true\" />\n </a>\n )\n}\n\nfunction Heading({ children }: { children: React.ReactNode }) {\n return <h3 className=\"m-0 mb-2 text-[15px] font-semibold\">{children}</h3>\n}\n\nfunction Overview({\n desk,\n form,\n}: {\n desk: PortalDesk\n form: ServiceRequestType\n}) {\n const portal = desk.config.portal\n return (\n <div className=\"flex max-w-[760px] flex-col gap-8 pt-1\">\n <div>\n {form.description && (\n <p className=\"text-[17px] leading-[1.6]\">{form.description}</p>\n )}\n {desk.config.description && (\n <p\n className={\n form.description\n ? 'mt-2 text-[14px] text-muted-foreground'\n : 'text-[17px] leading-[1.6]'\n }\n >\n {desk.config.description}\n </p>\n )}\n <div className=\"mt-5\">\n <OpenButton url={form.url} label=\"Open the form\" />\n </div>\n </div>\n\n <div>\n <Heading>You will be asked for</Heading>\n <FieldList fields={form.fields} />\n </div>\n\n <div>\n <Heading>After you file</Heading>\n {portal.followUp || portal.keyPeople?.length || portal.examples ? (\n <FollowUp desk={desk} />\n ) : (\n <p className=\"text-[14px] text-muted-foreground\">\n Nobody has written follow-up notes for this desk yet: what happens\n after you file, who to ask when it stalls.\n </p>\n )}\n </div>\n\n {portal.area && (\n <p className=\"text-[13px] text-muted-foreground\">Area: {portal.area}</p>\n )}\n </div>\n )\n}\n\n/** What the form asks, one line per field. A preview: nothing here is an input. */\nfunction FieldList({ fields }: { fields: ServiceRequestField[] }) {\n if (!fields.length) {\n return (\n <p className=\"text-[14px] text-muted-foreground\">\n Only a summary and a description of the problem.\n </p>\n )\n }\n return (\n <ul className=\"flex flex-col gap-2 text-[14.5px]\">\n {fields.map((f) => (\n <li key={f.name}>\n <span className=\"font-medium\">{f.name}</span>\n {!f.required && (\n <span className=\"text-muted-foreground\"> (optional)</span>\n )}\n <span className=\"text-muted-foreground\"> — {describeField(f)}</span>\n </li>\n ))}\n </ul>\n )\n}\n\nconst OPTIONS_LISTED = 12\n\n/** What a field takes, in words: its choices, or the kind of value. */\nexport function describeField(f: ServiceRequestField): string {\n const options = liveOptions(f)\n if (options.length) {\n const listed = options.slice(0, OPTIONS_LISTED).join(', ')\n const more =\n options.length > OPTIONS_LISTED\n ? ` and ${options.length - OPTIONS_LISTED} more`\n : ''\n return `${f.type === 'array' ? 'One or more of' : 'One of'}: ${listed}${more}`\n }\n if (f.type === 'user') return 'A person, picked from the directory'\n if (f.type === 'date' || f.type === 'datetime') return 'A date'\n return 'A short text'\n}\n\nfunction FollowUp({ desk }: { desk: PortalDesk }) {\n const { followUp, keyPeople, examples } = desk.config.portal\n return (\n <div className=\"flex max-w-[68ch] flex-col gap-5\">\n {followUp && <MarkdownText>{followUp}</MarkdownText>}\n {keyPeople?.length ? (\n <div>\n <p className=\"mb-2 text-[13px] font-semibold\">Key people</p>\n <div className=\"flex flex-wrap gap-2\">\n {keyPeople.map((p) => (\n <span\n key={p.name}\n className=\"inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-2 py-1 text-[13px]\"\n >\n <User\n className=\"size-3.5 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n {p.name}\n {p.role && (\n <span className=\"text-muted-foreground\">{p.role}</span>\n )}\n </span>\n ))}\n </div>\n </div>\n ) : null}\n {examples && (\n <div>\n <p className=\"mb-2 text-[13px] font-semibold\">See examples</p>\n <a\n href={examples.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-3 rounded-[var(--radius)] border border-border bg-card px-3.5 py-3 transition-colors hover:border-ring\"\n >\n <MessageSquareText\n className=\"size-5 shrink-0 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <span className=\"min-w-0 flex-1\">\n <span className=\"block text-[14px] font-semibold\">\n {examples.label}\n </span>\n <span className=\"block truncate text-[13px] text-muted-foreground\">\n {displayUrl(examples.url)}\n </span>\n </span>\n </a>\n </div>\n )}\n </div>\n )\n}\n\nfunction Behind({ desk }: { desk: PortalDesk }) {\n const portal = desk.config.portal\n const sources = [\n ...new Set([\n ...(desk.config.url ? [desk.config.url] : []),\n ...(portal.sources ?? []),\n ]),\n ]\n return (\n <div className=\"behind-panel\">\n <section className=\"behind-group\">\n <h2 className=\"behind-group__title\">Kept up to date from</h2>\n <ul className=\"space-y-2\">\n {sources.map((url, i) => (\n <li key={url} className=\"flex items-center gap-2 text-xs\">\n <span className=\"shrink-0 tabular-nums text-muted-foreground\">\n {i + 1}.\n </span>\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 truncate hover:text-primary\"\n >\n {displayUrl(url)}\n <ExternalLink className=\"size-3 shrink-0\" aria-hidden=\"true\" />\n </a>\n </li>\n ))}\n </ul>\n {portal.syncedAt && (\n <p className=\"behind-dates\">\n Forms and fields last read {portal.syncedAt.slice(0, 10)}.\n </p>\n )}\n </section>\n {(portal.aiPrompt || portal.aiMemory) && (\n <section className=\"behind-group\">\n <h2 className=\"behind-group__title\">\n How the AI maintains this card\n </h2>\n {portal.aiPrompt && (\n <>\n <p className=\"behind-ai__label\">Prompt</p>\n <p className=\"behind-ai\">{portal.aiPrompt}</p>\n </>\n )}\n {portal.aiMemory && (\n <>\n <p className=\"behind-ai__label\">Memory</p>\n <p className=\"behind-ai\">{portal.aiMemory}</p>\n </>\n )}\n </section>\n )}\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;;;AAwBO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,SAAS,KAAK,OAAO;AAE3B,QAAM,OACJ,qBAAC,OAAA,EAAI,WAAU,SACb,UAAA;AAAA,IAAA,oBAAC,MAAA,EAAG,WAAU,yEACX,UAAA,KAAK,MACR;AAAA,IACA,qBAAC,KAAA,EAAE,WAAU,0CACX,UAAA;AAAA,MAAA,oBAAC,UAAK,WAAU,+BAA8B,OAAM,cACjD,iBAAO,KACV;AAAA,MAAO;AAAA,MACJ,KAAK;AAAA,IAAA,EAAA,CACV;AAAA,EAAA,GACF;AAGF,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,GAAG,KAAK,IAAI;AAAA,MACnB,UAAU,GAAG,KAAK,IAAI,IAAI,KAAK,EAAE;AAAA,MACjC,eAAc;AAAA,MACd,eAAc;AAAA,MACd;AAAA,MAEA,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,eAAc;AAAA,UACd,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,YACN,qBAAC,KAAA,EAAE,WAAU,gBAAe,UAAA;AAAA,QAAA;AAAA,QACE,OAAO,SAAS,MAAM,GAAG,EAAE;AAAA,QAAE;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA,GAEJ;AAAA,KACE,OAAO,YAAY,OAAO,aAC1B,qBAAC,WAAA,EAAQ,WAAU,gBACjB,UAAA;AAAA,MAAA,oBAAC,MAAA,EAAG,WAAU,uBAAsB,UAAA,kCAEpC;AAAA,MACC,OAAO,YACN,qBAAA,UAAA,EACE,UAAA;AAAA,QAAA,oBAAC,KAAA,EAAE,WAAU,oBAAmB,UAAA,UAAM;AAAA,QACtC,oBAAC,KAAA,EAAE,WAAU,aAAa,iBAAO,SAAA,CAAS;AAAA,MAAA,GAC5C;AAAA,MAED,OAAO,YACN,qBAAA,UAAA,EACE,UAAA;AAAA,QAAA,oBAAC,KAAA,EAAE,WAAU,oBAAmB,UAAA,UAAM;AAAA,QACtC,oBAAC,KAAA,EAAE,WAAU,aAAa,iBAAO,SAAA,CAAS;AAAA,MAAA,EAAA,CAC5C;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -35,3 +35,16 @@ export declare const NOT_HANDLED: RegExp;
|
|
|
35
35
|
export declare const liveOptions: (field: ServiceRequestField) => string[];
|
|
36
36
|
/** Forms matching `query`, best first; empty for an empty query. */
|
|
37
37
|
export declare function searchServiceDesks(desks: PortalDesk[], query: string): FormResult[];
|
|
38
|
+
/**
|
|
39
|
+
* A form's address in the Service Desks view: the desk's key and the form's id,
|
|
40
|
+
* `/service-desks/help-42`. The id, not the name, so a renamed form keeps its
|
|
41
|
+
* links; the key, so the address still says which desk it belongs to.
|
|
42
|
+
*/
|
|
43
|
+
export declare function formSlug(desk: PortalDesk, form: ServiceRequestType): string;
|
|
44
|
+
/** The desk and form behind a `formSlug`, or undefined. */
|
|
45
|
+
export declare function findBySlug(desks: PortalDesk[], slug: string): {
|
|
46
|
+
desk: PortalDesk;
|
|
47
|
+
form: ServiceRequestType;
|
|
48
|
+
} | undefined;
|
|
49
|
+
/** Every form of every desk, unmatched: the Service Desks view with no search. */
|
|
50
|
+
export declare function allForms(desks: PortalDesk[]): FormResult[];
|
|
@@ -100,10 +100,36 @@ function searchServiceDesks(desks, query) {
|
|
|
100
100
|
});
|
|
101
101
|
return ranked.sort((a, b) => b.tier - a.tier || a.order - b.order).map((r) => r.result);
|
|
102
102
|
}
|
|
103
|
+
function formSlug(desk, form) {
|
|
104
|
+
return `${desk.config.portal.key.toLowerCase()}-${form.id}`;
|
|
105
|
+
}
|
|
106
|
+
function findBySlug(desks, slug) {
|
|
107
|
+
for (const desk of desks) {
|
|
108
|
+
const key = `${desk.config.portal.key.toLowerCase()}-`;
|
|
109
|
+
if (!slug.startsWith(key)) continue;
|
|
110
|
+
const form = desk.config.portal.requestTypes.find(
|
|
111
|
+
(f) => f.id === slug.slice(key.length)
|
|
112
|
+
);
|
|
113
|
+
if (form) return { desk, form };
|
|
114
|
+
}
|
|
115
|
+
return void 0;
|
|
116
|
+
}
|
|
117
|
+
function allForms(desks) {
|
|
118
|
+
return desks.flatMap(
|
|
119
|
+
(desk) => desk.config.portal.requestTypes.map((form) => ({
|
|
120
|
+
desk,
|
|
121
|
+
form,
|
|
122
|
+
fieldMatches: []
|
|
123
|
+
}))
|
|
124
|
+
);
|
|
125
|
+
}
|
|
103
126
|
export {
|
|
104
127
|
NOT_HANDLED,
|
|
128
|
+
allForms,
|
|
105
129
|
containsAll,
|
|
106
130
|
effectiveQuery,
|
|
131
|
+
findBySlug,
|
|
132
|
+
formSlug,
|
|
107
133
|
hasPortal,
|
|
108
134
|
liveOptions,
|
|
109
135
|
searchServiceDesks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchServiceDesks.js","sources":["../../../../../../src/modules/appCatalog/ui/serviceDesks/searchServiceDesks.ts"],"sourcesContent":["import type {\n AppApprovalMethod,\n ServicePortal,\n ServiceRequestField,\n ServiceRequestType,\n} from '@igstack/app-catalog-backend-core'\nimport { cyrillicLayoutToLatin } from '@igstack/app-catalog-shared-core'\n\nexport type ServiceDesk = Extract<AppApprovalMethod, { type: 'service' }>\n\n/** A desk that publishes forms. Desks without a portal are links only. */\nexport type PortalDesk = ServiceDesk & {\n config: ServiceDesk['config'] & { portal: ServicePortal }\n}\n\nexport function hasPortal(desk: ServiceDesk): desk is PortalDesk {\n return Boolean(desk.config.portal)\n}\n\n/** A dropdown on the form whose options include what was searched for. */\nexport interface FieldMatch {\n field: ServiceRequestField\n matched: string[]\n}\n\nexport interface FormResult {\n desk: PortalDesk\n form: ServiceRequestType\n fieldMatches: FieldMatch[]\n}\n\n/**\n * Where the query hit, strongest first. A key or name hit means the person asked\n * for the desk itself, so every one of its forms is a result.\n */\nconst TIER = {\n keyExact: 6,\n keyPrefix: 5,\n deskName: 4,\n text: 3,\n field: 2,\n} as const\n\nconst terms = (query: string) =>\n query.trim().toLowerCase().split(/\\s+/).filter(Boolean)\n\n/** Every term appears somewhere in `text`, in any order. */\nexport function containsAll(text: string | undefined, query: string): boolean {\n if (!text) return false\n const haystack = text.toLowerCase()\n const t = terms(query)\n return t.length > 0 && t.every((term) => haystack.includes(term))\n}\n\n/**\n * The query, reread when it finds nothing as typed and contains Cyrillic:\n * first as the keyboard layout (`щквукы` was meant as `orders`), then as a\n * phonetic transliteration (`ордерс` sounds like `orders`).\n */\nexport function effectiveQuery(\n query: string,\n findsSomething: (q: string) => boolean,\n): string {\n if (!query.trim() || !/[а-яё]/i.test(query) || findsSomething(query)) {\n return query\n }\n for (const reread of [cyrillicLayoutToLatin(query), transliterate(query)]) {\n if (reread !== query && findsSomething(reread)) return reread\n }\n return query\n}\n\nconst PHONETIC: Record<string, string> = {\n а: 'a',\n б: 'b',\n в: 'v',\n г: 'g',\n д: 'd',\n е: 'e',\n ё: 'e',\n ж: 'zh',\n з: 'z',\n и: 'i',\n й: 'y',\n к: 'k',\n л: 'l',\n м: 'm',\n н: 'n',\n о: 'o',\n п: 'p',\n р: 'r',\n с: 's',\n т: 't',\n у: 'u',\n ф: 'f',\n х: 'h',\n ц: 'ts',\n ч: 'ch',\n ш: 'sh',\n щ: 'sch',\n ъ: '',\n ы: 'y',\n ь: '',\n э: 'e',\n ю: 'yu',\n я: 'ya',\n}\n\nfunction transliterate(query: string): string {\n return Array.from(query)\n .map((char) => PHONETIC[char.toLowerCase()] ?? char)\n .join('')\n}\n\n/**\n * Options a desk marks as somebody else's (\"Billing DB - HELP doesn't handle\").\n * They are dead ends, so they never count as a match and are not listed.\n */\nexport const NOT_HANDLED = /doesn.?t handle|not handled|^invalid$/i\n\nexport const liveOptions = (field: ServiceRequestField) =>\n (field.options ?? []).filter((o) => !NOT_HANDLED.test(o)).map((o) => o.trim())\n\nfunction fieldMatches(form: ServiceRequestType, query: string): FieldMatch[] {\n return form.fields.flatMap((field) => {\n const matched = liveOptions(field).filter((o) => containsAll(o, query))\n return matched.length ? [{ field, matched }] : []\n })\n}\n\nfunction tierOf(desk: PortalDesk, query: string): number {\n const key = desk.config.portal.key.toLowerCase()\n const q = query.trim().toLowerCase()\n if (key === q) return TIER.keyExact\n if (q.length >= 2 && key.startsWith(q)) return TIER.keyPrefix\n if (containsAll(desk.displayName, query)) return TIER.deskName\n return 0\n}\n\n/** Forms matching `query`, best first; empty for an empty query. */\nexport function searchServiceDesks(\n desks: PortalDesk[],\n query: string,\n): FormResult[] {\n if (!terms(query).length) return []\n const ranked: { result: FormResult; tier: number; order: number }[] = []\n desks.forEach((desk, deskIndex) => {\n const deskTier = tierOf(desk, query)\n const deskText = containsAll(desk.config.description, query)\n desk.config.portal.requestTypes.forEach((form, formIndex) => {\n const matches = fieldMatches(form, query)\n const text =\n deskText ||\n containsAll(form.name, query) ||\n containsAll(form.description, query)\n const tier =\n deskTier || (text ? TIER.text : matches.length ? TIER.field : 0)\n if (!tier) return\n ranked.push({\n result: { desk, form, fieldMatches: matches },\n tier,\n // Inside a tier, more matched options first, then source order.\n order:\n -matches.reduce((n, m) => n + m.matched.length, 0) * 1000 +\n deskIndex * 100 +\n formIndex,\n })\n })\n })\n return ranked\n .sort((a, b) => b.tier - a.tier || a.order - b.order)\n .map((r) => r.result)\n}\n"],"names":[],"mappings":";AAeO,SAAS,UAAU,MAAuC;AAC/D,SAAO,QAAQ,KAAK,OAAO,MAAM;AACnC;AAkBA,MAAM,OAAO;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,QAAQ,CAAC,UACb,MAAM,KAAA,EAAO,YAAA,EAAc,MAAM,KAAK,EAAE,OAAO,OAAO;AAGjD,SAAS,YAAY,MAA0B,OAAwB;AAC5E,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,WAAW,KAAK,YAAA;AACtB,QAAM,IAAI,MAAM,KAAK;AACrB,SAAO,EAAE,SAAS,KAAK,EAAE,MAAM,CAAC,SAAS,SAAS,SAAS,IAAI,CAAC;AAClE;AAOO,SAAS,eACd,OACA,gBACQ;AACR,MAAI,CAAC,MAAM,KAAA,KAAU,CAAC,UAAU,KAAK,KAAK,KAAK,eAAe,KAAK,GAAG;AACpE,WAAO;AAAA,EACT;AACA,aAAW,UAAU,CAAC,sBAAsB,KAAK,GAAG,cAAc,KAAK,CAAC,GAAG;AACzE,QAAI,WAAW,SAAS,eAAe,MAAM,EAAG,QAAO;AAAA,EACzD;AACA,SAAO;AACT;AAEA,MAAM,WAAmC;AAAA,EACvC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,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WAAW,OAAO,MAAM,KAAK;AACnC,UAAM,WAAW,YAAY,KAAK,OAAO,aAAa,KAAK;AAC3D,SAAK,OAAO,OAAO,aAAa,QAAQ,CAAC,MAAM,cAAc;AAC3D,YAAM,UAAU,aAAa,MAAM,KAAK;AACxC,YAAM,OACJ,YACA,YAAY,KAAK,MAAM,KAAK,KAC5B,YAAY,KAAK,aAAa,KAAK;AACrC,YAAM,OACJ,aAAa,OAAO,KAAK,OAAO,QAAQ,SAAS,KAAK,QAAQ;AAChE,UAAI,CAAC,KAAM;AACX,aAAO,KAAK;AAAA,QACV,QAAQ,EAAE,MAAM,MAAM,cAAc,QAAA;AAAA,QACpC;AAAA;AAAA,QAEA,OACE,CAAC,QAAQ,OAAO,CAAC,GAAG,MAAM,IAAI,EAAE,QAAQ,QAAQ,CAAC,IAAI,MACrD,YAAY,MACZ;AAAA,MAAA,CACH;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACD,SAAO,OACJ,KAAK,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EACnD,IAAI,CAAC,MAAM,EAAE,MAAM;AACxB;"}
|
|
1
|
+
{"version":3,"file":"searchServiceDesks.js","sources":["../../../../../../src/modules/appCatalog/ui/serviceDesks/searchServiceDesks.ts"],"sourcesContent":["import type {\n AppApprovalMethod,\n ServicePortal,\n ServiceRequestField,\n ServiceRequestType,\n} from '@igstack/app-catalog-backend-core'\nimport { cyrillicLayoutToLatin } from '@igstack/app-catalog-shared-core'\n\nexport type ServiceDesk = Extract<AppApprovalMethod, { type: 'service' }>\n\n/** A desk that publishes forms. Desks without a portal are links only. */\nexport type PortalDesk = ServiceDesk & {\n config: ServiceDesk['config'] & { portal: ServicePortal }\n}\n\nexport function hasPortal(desk: ServiceDesk): desk is PortalDesk {\n return Boolean(desk.config.portal)\n}\n\n/** A dropdown on the form whose options include what was searched for. */\nexport interface FieldMatch {\n field: ServiceRequestField\n matched: string[]\n}\n\nexport interface FormResult {\n desk: PortalDesk\n form: ServiceRequestType\n fieldMatches: FieldMatch[]\n}\n\n/**\n * Where the query hit, strongest first. A key or name hit means the person asked\n * for the desk itself, so every one of its forms is a result.\n */\nconst TIER = {\n keyExact: 6,\n keyPrefix: 5,\n deskName: 4,\n text: 3,\n field: 2,\n} as const\n\nconst terms = (query: string) =>\n query.trim().toLowerCase().split(/\\s+/).filter(Boolean)\n\n/** Every term appears somewhere in `text`, in any order. */\nexport function containsAll(text: string | undefined, query: string): boolean {\n if (!text) return false\n const haystack = text.toLowerCase()\n const t = terms(query)\n return t.length > 0 && t.every((term) => haystack.includes(term))\n}\n\n/**\n * The query, reread when it finds nothing as typed and contains Cyrillic:\n * first as the keyboard layout (`щквукы` was meant as `orders`), then as a\n * phonetic transliteration (`ордерс` sounds like `orders`).\n */\nexport function effectiveQuery(\n query: string,\n findsSomething: (q: string) => boolean,\n): string {\n if (!query.trim() || !/[а-яё]/i.test(query) || findsSomething(query)) {\n return query\n }\n for (const reread of [cyrillicLayoutToLatin(query), transliterate(query)]) {\n if (reread !== query && findsSomething(reread)) return reread\n }\n return query\n}\n\nconst PHONETIC: Record<string, string> = {\n а: 'a',\n б: 'b',\n в: 'v',\n г: 'g',\n д: 'd',\n е: 'e',\n ё: 'e',\n ж: 'zh',\n з: 'z',\n и: 'i',\n й: 'y',\n к: 'k',\n л: 'l',\n м: 'm',\n н: 'n',\n о: 'o',\n п: 'p',\n р: 'r',\n с: 's',\n т: 't',\n у: 'u',\n ф: 'f',\n х: 'h',\n ц: 'ts',\n ч: 'ch',\n ш: 'sh',\n щ: 'sch',\n ъ: '',\n ы: 'y',\n ь: '',\n э: 'e',\n ю: 'yu',\n я: 'ya',\n}\n\nfunction transliterate(query: string): string {\n return Array.from(query)\n .map((char) => PHONETIC[char.toLowerCase()] ?? char)\n .join('')\n}\n\n/**\n * Options a desk marks as somebody else's (\"Billing DB - HELP doesn't handle\").\n * They are dead ends, so they never count as a match and are not listed.\n */\nexport const NOT_HANDLED = /doesn.?t handle|not handled|^invalid$/i\n\nexport const liveOptions = (field: ServiceRequestField) =>\n (field.options ?? []).filter((o) => !NOT_HANDLED.test(o)).map((o) => o.trim())\n\nfunction fieldMatches(form: ServiceRequestType, query: string): FieldMatch[] {\n return form.fields.flatMap((field) => {\n const matched = liveOptions(field).filter((o) => containsAll(o, query))\n return matched.length ? [{ field, matched }] : []\n })\n}\n\nfunction tierOf(desk: PortalDesk, query: string): number {\n const key = desk.config.portal.key.toLowerCase()\n const q = query.trim().toLowerCase()\n if (key === q) return TIER.keyExact\n if (q.length >= 2 && key.startsWith(q)) return TIER.keyPrefix\n if (containsAll(desk.displayName, query)) return TIER.deskName\n return 0\n}\n\n/** Forms matching `query`, best first; empty for an empty query. */\nexport function searchServiceDesks(\n desks: PortalDesk[],\n query: string,\n): FormResult[] {\n if (!terms(query).length) return []\n const ranked: { result: FormResult; tier: number; order: number }[] = []\n desks.forEach((desk, deskIndex) => {\n const deskTier = tierOf(desk, query)\n const deskText = containsAll(desk.config.description, query)\n desk.config.portal.requestTypes.forEach((form, formIndex) => {\n const matches = fieldMatches(form, query)\n const text =\n deskText ||\n containsAll(form.name, query) ||\n containsAll(form.description, query)\n const tier =\n deskTier || (text ? TIER.text : matches.length ? TIER.field : 0)\n if (!tier) return\n ranked.push({\n result: { desk, form, fieldMatches: matches },\n tier,\n // Inside a tier, more matched options first, then source order.\n order:\n -matches.reduce((n, m) => n + m.matched.length, 0) * 1000 +\n deskIndex * 100 +\n formIndex,\n })\n })\n })\n return ranked\n .sort((a, b) => b.tier - a.tier || a.order - b.order)\n .map((r) => r.result)\n}\n\n/**\n * A form's address in the Service Desks view: the desk's key and the form's id,\n * `/service-desks/help-42`. The id, not the name, so a renamed form keeps its\n * links; the key, so the address still says which desk it belongs to.\n */\nexport function formSlug(desk: PortalDesk, form: ServiceRequestType): string {\n return `${desk.config.portal.key.toLowerCase()}-${form.id}`\n}\n\n/** The desk and form behind a `formSlug`, or undefined. */\nexport function findBySlug(\n desks: PortalDesk[],\n slug: string,\n): { desk: PortalDesk; form: ServiceRequestType } | undefined {\n for (const desk of desks) {\n const key = `${desk.config.portal.key.toLowerCase()}-`\n if (!slug.startsWith(key)) continue\n const form = desk.config.portal.requestTypes.find(\n (f) => f.id === slug.slice(key.length),\n )\n if (form) return { desk, form }\n }\n return undefined\n}\n\n/** Every form of every desk, unmatched: the Service Desks view with no search. */\nexport function allForms(desks: PortalDesk[]): FormResult[] {\n return desks.flatMap((desk) =>\n desk.config.portal.requestTypes.map((form) => ({\n desk,\n form,\n fieldMatches: [],\n })),\n )\n}\n"],"names":[],"mappings":";AAeO,SAAS,UAAU,MAAuC;AAC/D,SAAO,QAAQ,KAAK,OAAO,MAAM;AACnC;AAkBA,MAAM,OAAO;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,QAAQ,CAAC,UACb,MAAM,KAAA,EAAO,YAAA,EAAc,MAAM,KAAK,EAAE,OAAO,OAAO;AAGjD,SAAS,YAAY,MAA0B,OAAwB;AAC5E,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,WAAW,KAAK,YAAA;AACtB,QAAM,IAAI,MAAM,KAAK;AACrB,SAAO,EAAE,SAAS,KAAK,EAAE,MAAM,CAAC,SAAS,SAAS,SAAS,IAAI,CAAC;AAClE;AAOO,SAAS,eACd,OACA,gBACQ;AACR,MAAI,CAAC,MAAM,KAAA,KAAU,CAAC,UAAU,KAAK,KAAK,KAAK,eAAe,KAAK,GAAG;AACpE,WAAO;AAAA,EACT;AACA,aAAW,UAAU,CAAC,sBAAsB,KAAK,GAAG,cAAc,KAAK,CAAC,GAAG;AACzE,QAAI,WAAW,SAAS,eAAe,MAAM,EAAG,QAAO;AAAA,EACzD;AACA,SAAO;AACT;AAEA,MAAM,WAAmC;AAAA,EACvC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,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O,KAAK,OAAO,OAAO,aAAa;AAAA,MAC3C,CAAC,MAAM,EAAE,OAAO,KAAK,MAAM,IAAI,MAAM;AAAA,IAAA;AAEvC,QAAI,KAAM,QAAO,EAAE,MAAM,KAAA;AAAA,EAC3B;AACA,SAAO;AACT;AAGO,SAAS,SAAS,OAAmC;AAC1D,SAAO,MAAM;AAAA,IAAQ,CAAC,SACpB,KAAK,OAAO,OAAO,aAAa,IAAI,CAAC,UAAU;AAAA,MAC7C;AAAA,MACA;AAAA,MACA,cAAc,CAAA;AAAA,IAAC,EACf;AAAA,EAAA;AAEN;"}
|
|
@@ -8,6 +8,7 @@ import { Route as LayoutServiceDesksRouteImport } from './routes/_layout/service
|
|
|
8
8
|
import { Route as AuthCallbackRouteImport } from './routes/auth.callback';
|
|
9
9
|
import { Route as LayoutAppSlugRouteImport } from './routes/_layout/app.$slug';
|
|
10
10
|
import { Route as LayoutCommunitySlugRouteImport } from './routes/_layout/community.$slug';
|
|
11
|
+
import { Route as LayoutServiceDesksSlugRouteImport } from './routes/_layout/service-desks.$slug';
|
|
11
12
|
import { Route as LayoutCatalogAppsIndexRouteImport } from './routes/_layout/catalog.apps.index';
|
|
12
13
|
import { Route as LayoutAppSlugSubSubSlugRouteImport } from './routes/_layout/app.$slug_.sub.$subSlug';
|
|
13
14
|
declare const LayoutRoute: import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/react-router').RootRoute<import('@tanstack/react-router').Register, undefined, import('.').AcRouterContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_layout", "/_layout", undefined, import('@tanstack/router-core').ResolveParams<"">, import('@tanstack/router-core').AnyContext, import('.').AcRouterContext, import('.').AcRouterContext, {}, typeof import('./modules/communityTools/communityToolsConfigLoader.js').communityToolsConfigLoader, unknown, unknown, unknown, unknown, undefined>;
|
|
@@ -43,7 +44,6 @@ declare const LayoutServiceDesksRoute: import('@tanstack/router-core').Route<imp
|
|
|
43
44
|
q: import('zod').ZodOptional<import('zod').ZodString>;
|
|
44
45
|
desk: import('zod').ZodOptional<import('zod').ZodString>;
|
|
45
46
|
form: import('zod').ZodOptional<import('zod').ZodUnion<readonly [import('zod').ZodNumber, import('zod').ZodString]>>;
|
|
46
|
-
tab: import('zod').ZodOptional<import('zod').ZodString>;
|
|
47
47
|
}, import('zod/v4/core').$strip>, import('@tanstack/router-core').ResolveParams<"/service-desks">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
48
48
|
declare const AuthCallbackRoute: import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/react-router').RootRoute<import('@tanstack/react-router').Register, undefined, import('.').AcRouterContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/auth/callback", "/auth/callback", "/auth/callback", "/auth/callback", (search: Record<string, unknown>) => {
|
|
49
49
|
error: string | undefined;
|
|
@@ -78,6 +78,13 @@ declare const LayoutCommunitySlugRoute: import('@tanstack/router-core').Route<im
|
|
|
78
78
|
dir?: "asc" | undefined;
|
|
79
79
|
window?: string | undefined;
|
|
80
80
|
}>>, import('@tanstack/router-core').ResolveParams<"/community">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/$slug", "/community/$slug", "/_layout/community/$slug", "/_layout/community/$slug", undefined, import('@tanstack/router-core').ResolveParams<"/$slug">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
81
|
+
declare const LayoutServiceDesksSlugRoute: import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/react-router').RootRoute<import('@tanstack/react-router').Register, undefined, import('.').AcRouterContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_layout", "/_layout", undefined, import('@tanstack/router-core').ResolveParams<"">, import('@tanstack/router-core').AnyContext, import('.').AcRouterContext, import('.').AcRouterContext, {}, typeof import('./modules/communityTools/communityToolsConfigLoader.js').communityToolsConfigLoader, unknown, unknown, unknown, unknown, undefined>, "/service-desks", "/service-desks", "/_layout/service-desks", "/_layout/service-desks", import('zod').ZodObject<{
|
|
82
|
+
q: import('zod').ZodOptional<import('zod').ZodString>;
|
|
83
|
+
desk: import('zod').ZodOptional<import('zod').ZodString>;
|
|
84
|
+
form: import('zod').ZodOptional<import('zod').ZodUnion<readonly [import('zod').ZodNumber, import('zod').ZodString]>>;
|
|
85
|
+
}, import('zod/v4/core').$strip>, import('@tanstack/router-core').ResolveParams<"/service-desks">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/$slug", "/service-desks/$slug", "/_layout/service-desks/$slug", "/_layout/service-desks/$slug", import('zod').ZodObject<{
|
|
86
|
+
tab: import('zod').ZodOptional<import('zod').ZodString>;
|
|
87
|
+
}, import('zod/v4/core').$strip>, import('@tanstack/router-core').ResolveParams<"/$slug">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
81
88
|
declare const LayoutCatalogAppsIndexRoute: import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/react-router').RootRoute<import('@tanstack/react-router').Register, undefined, import('.').AcRouterContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_layout", "/_layout", undefined, import('@tanstack/router-core').ResolveParams<"">, import('@tanstack/router-core').AnyContext, import('.').AcRouterContext, import('.').AcRouterContext, {}, typeof import('./modules/communityTools/communityToolsConfigLoader.js').communityToolsConfigLoader, unknown, unknown, unknown, unknown, undefined>, "/catalog/apps", "/catalog/apps/", "/_layout/catalog/apps/", "/_layout/catalog/apps/", import('zod').ZodObject<{
|
|
82
89
|
app: import('zod').ZodOptional<import('zod').ZodString>;
|
|
83
90
|
q: import('zod').ZodOptional<import('zod').ZodString>;
|
|
@@ -95,10 +102,11 @@ export interface FileRoutesByFullPath {
|
|
|
95
102
|
'/community': typeof LayoutCommunityRouteWithChildren;
|
|
96
103
|
'/login': typeof LayoutLoginRoute;
|
|
97
104
|
'/mcp': typeof LayoutMcpRoute;
|
|
98
|
-
'/service-desks': typeof
|
|
105
|
+
'/service-desks': typeof LayoutServiceDesksRouteWithChildren;
|
|
99
106
|
'/auth/callback': typeof AuthCallbackRoute;
|
|
100
107
|
'/app/$slug': typeof LayoutAppSlugRoute;
|
|
101
108
|
'/community/$slug': typeof LayoutCommunitySlugRoute;
|
|
109
|
+
'/service-desks/$slug': typeof LayoutServiceDesksSlugRoute;
|
|
102
110
|
'/catalog/apps/': typeof LayoutCatalogAppsIndexRoute;
|
|
103
111
|
'/app/$slug/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute;
|
|
104
112
|
}
|
|
@@ -106,11 +114,12 @@ export interface FileRoutesByTo {
|
|
|
106
114
|
'/community': typeof LayoutCommunityRouteWithChildren;
|
|
107
115
|
'/login': typeof LayoutLoginRoute;
|
|
108
116
|
'/mcp': typeof LayoutMcpRoute;
|
|
109
|
-
'/service-desks': typeof
|
|
117
|
+
'/service-desks': typeof LayoutServiceDesksRouteWithChildren;
|
|
110
118
|
'/auth/callback': typeof AuthCallbackRoute;
|
|
111
119
|
'/': typeof LayoutIndexRoute;
|
|
112
120
|
'/app/$slug': typeof LayoutAppSlugRoute;
|
|
113
121
|
'/community/$slug': typeof LayoutCommunitySlugRoute;
|
|
122
|
+
'/service-desks/$slug': typeof LayoutServiceDesksSlugRoute;
|
|
114
123
|
'/catalog/apps': typeof LayoutCatalogAppsIndexRoute;
|
|
115
124
|
'/app/$slug/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute;
|
|
116
125
|
}
|
|
@@ -120,20 +129,21 @@ export interface FileRoutesById {
|
|
|
120
129
|
'/_layout/community': typeof LayoutCommunityRouteWithChildren;
|
|
121
130
|
'/_layout/login': typeof LayoutLoginRoute;
|
|
122
131
|
'/_layout/mcp': typeof LayoutMcpRoute;
|
|
123
|
-
'/_layout/service-desks': typeof
|
|
132
|
+
'/_layout/service-desks': typeof LayoutServiceDesksRouteWithChildren;
|
|
124
133
|
'/auth/callback': typeof AuthCallbackRoute;
|
|
125
134
|
'/_layout/': typeof LayoutIndexRoute;
|
|
126
135
|
'/_layout/app/$slug': typeof LayoutAppSlugRoute;
|
|
127
136
|
'/_layout/community/$slug': typeof LayoutCommunitySlugRoute;
|
|
137
|
+
'/_layout/service-desks/$slug': typeof LayoutServiceDesksSlugRoute;
|
|
128
138
|
'/_layout/catalog/apps/': typeof LayoutCatalogAppsIndexRoute;
|
|
129
139
|
'/_layout/app/$slug_/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute;
|
|
130
140
|
}
|
|
131
141
|
export interface FileRouteTypes {
|
|
132
142
|
fileRoutesByFullPath: FileRoutesByFullPath;
|
|
133
|
-
fullPaths: '/' | '/community' | '/login' | '/mcp' | '/service-desks' | '/auth/callback' | '/app/$slug' | '/community/$slug' | '/catalog/apps/' | '/app/$slug/sub/$subSlug';
|
|
143
|
+
fullPaths: '/' | '/community' | '/login' | '/mcp' | '/service-desks' | '/auth/callback' | '/app/$slug' | '/community/$slug' | '/service-desks/$slug' | '/catalog/apps/' | '/app/$slug/sub/$subSlug';
|
|
134
144
|
fileRoutesByTo: FileRoutesByTo;
|
|
135
|
-
to: '/community' | '/login' | '/mcp' | '/service-desks' | '/auth/callback' | '/' | '/app/$slug' | '/community/$slug' | '/catalog/apps' | '/app/$slug/sub/$subSlug';
|
|
136
|
-
id: '__root__' | '/_layout' | '/_layout/community' | '/_layout/login' | '/_layout/mcp' | '/_layout/service-desks' | '/auth/callback' | '/_layout/' | '/_layout/app/$slug' | '/_layout/community/$slug' | '/_layout/catalog/apps/' | '/_layout/app/$slug_/sub/$subSlug';
|
|
145
|
+
to: '/community' | '/login' | '/mcp' | '/service-desks' | '/auth/callback' | '/' | '/app/$slug' | '/community/$slug' | '/service-desks/$slug' | '/catalog/apps' | '/app/$slug/sub/$subSlug';
|
|
146
|
+
id: '__root__' | '/_layout' | '/_layout/community' | '/_layout/login' | '/_layout/mcp' | '/_layout/service-desks' | '/auth/callback' | '/_layout/' | '/_layout/app/$slug' | '/_layout/community/$slug' | '/_layout/service-desks/$slug' | '/_layout/catalog/apps/' | '/_layout/app/$slug_/sub/$subSlug';
|
|
137
147
|
fileRoutesById: FileRoutesById;
|
|
138
148
|
}
|
|
139
149
|
export interface RootRouteChildren {
|
|
@@ -205,6 +215,13 @@ declare module '@tanstack/react-router' {
|
|
|
205
215
|
preLoaderRoute: typeof LayoutCommunitySlugRouteImport;
|
|
206
216
|
parentRoute: typeof LayoutCommunityRoute;
|
|
207
217
|
};
|
|
218
|
+
'/_layout/service-desks/$slug': {
|
|
219
|
+
id: '/_layout/service-desks/$slug';
|
|
220
|
+
path: '/$slug';
|
|
221
|
+
fullPath: '/service-desks/$slug';
|
|
222
|
+
preLoaderRoute: typeof LayoutServiceDesksSlugRouteImport;
|
|
223
|
+
parentRoute: typeof LayoutServiceDesksRoute;
|
|
224
|
+
};
|
|
208
225
|
'/_layout/catalog/apps/': {
|
|
209
226
|
id: '/_layout/catalog/apps/';
|
|
210
227
|
path: '/catalog/apps';
|
|
@@ -247,11 +264,20 @@ declare const LayoutCommunityRouteWithChildren: import('@tanstack/router-core').
|
|
|
247
264
|
dir?: "asc" | undefined;
|
|
248
265
|
window?: string | undefined;
|
|
249
266
|
}>>, import('@tanstack/router-core').ResolveParams<"/community">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, LayoutCommunityRouteChildren, unknown, unknown, unknown, undefined>;
|
|
267
|
+
interface LayoutServiceDesksRouteChildren {
|
|
268
|
+
LayoutServiceDesksSlugRoute: typeof LayoutServiceDesksSlugRoute;
|
|
269
|
+
}
|
|
270
|
+
declare const LayoutServiceDesksRouteChildren: LayoutServiceDesksRouteChildren;
|
|
271
|
+
declare const LayoutServiceDesksRouteWithChildren: import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/react-router').RootRoute<import('@tanstack/react-router').Register, undefined, import('.').AcRouterContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_layout", "/_layout", undefined, import('@tanstack/router-core').ResolveParams<"">, import('@tanstack/router-core').AnyContext, import('.').AcRouterContext, import('.').AcRouterContext, {}, typeof import('./modules/communityTools/communityToolsConfigLoader.js').communityToolsConfigLoader, unknown, unknown, unknown, unknown, undefined>, "/service-desks", "/service-desks", "/_layout/service-desks", "/_layout/service-desks", import('zod').ZodObject<{
|
|
272
|
+
q: import('zod').ZodOptional<import('zod').ZodString>;
|
|
273
|
+
desk: import('zod').ZodOptional<import('zod').ZodString>;
|
|
274
|
+
form: import('zod').ZodOptional<import('zod').ZodUnion<readonly [import('zod').ZodNumber, import('zod').ZodString]>>;
|
|
275
|
+
}, import('zod/v4/core').$strip>, import('@tanstack/router-core').ResolveParams<"/service-desks">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, LayoutServiceDesksRouteChildren, unknown, unknown, unknown, undefined>;
|
|
250
276
|
interface LayoutRouteChildren {
|
|
251
277
|
LayoutCommunityRoute: typeof LayoutCommunityRouteWithChildren;
|
|
252
278
|
LayoutLoginRoute: typeof LayoutLoginRoute;
|
|
253
279
|
LayoutMcpRoute: typeof LayoutMcpRoute;
|
|
254
|
-
LayoutServiceDesksRoute: typeof
|
|
280
|
+
LayoutServiceDesksRoute: typeof LayoutServiceDesksRouteWithChildren;
|
|
255
281
|
LayoutIndexRoute: typeof LayoutIndexRoute;
|
|
256
282
|
LayoutAppSlugRoute: typeof LayoutAppSlugRoute;
|
|
257
283
|
LayoutCatalogAppsIndexRoute: typeof LayoutCatalogAppsIndexRoute;
|
|
@@ -7,7 +7,8 @@ import { Route as Route$8 } from "./routes/_layout/mcp.js";
|
|
|
7
7
|
import { Route as Route$7 } from "./routes/_layout/service-desks.js";
|
|
8
8
|
import { Route as Route$1 } from "./routes/auth.callback.js";
|
|
9
9
|
import { Route as Route$5 } from "./routes/_layout/app._slug.js";
|
|
10
|
-
import { Route as Route$
|
|
10
|
+
import { Route as Route$c } from "./routes/_layout/community._slug.js";
|
|
11
|
+
import { Route as Route$b } from "./routes/_layout/service-desks._slug.js";
|
|
11
12
|
import { Route as Route$4 } from "./routes/_layout/catalog.apps.index.js";
|
|
12
13
|
import { Route as Route$3 } from "./routes/_layout/app._slug_.sub._subSlug.js";
|
|
13
14
|
const LayoutRoute = Route$2.update({
|
|
@@ -49,11 +50,16 @@ const LayoutAppSlugRoute = Route$5.update({
|
|
|
49
50
|
path: "/app/$slug",
|
|
50
51
|
getParentRoute: () => LayoutRoute
|
|
51
52
|
});
|
|
52
|
-
const LayoutCommunitySlugRoute = Route$
|
|
53
|
+
const LayoutCommunitySlugRoute = Route$c.update({
|
|
53
54
|
id: "/$slug",
|
|
54
55
|
path: "/$slug",
|
|
55
56
|
getParentRoute: () => LayoutCommunityRoute
|
|
56
57
|
});
|
|
58
|
+
const LayoutServiceDesksSlugRoute = Route$b.update({
|
|
59
|
+
id: "/$slug",
|
|
60
|
+
path: "/$slug",
|
|
61
|
+
getParentRoute: () => LayoutServiceDesksRoute
|
|
62
|
+
});
|
|
57
63
|
const LayoutCatalogAppsIndexRoute = Route$4.update({
|
|
58
64
|
id: "/catalog/apps/",
|
|
59
65
|
path: "/catalog/apps/",
|
|
@@ -70,11 +76,15 @@ const LayoutCommunityRouteChildren = {
|
|
|
70
76
|
const LayoutCommunityRouteWithChildren = LayoutCommunityRoute._addFileChildren(
|
|
71
77
|
LayoutCommunityRouteChildren
|
|
72
78
|
);
|
|
79
|
+
const LayoutServiceDesksRouteChildren = {
|
|
80
|
+
LayoutServiceDesksSlugRoute
|
|
81
|
+
};
|
|
82
|
+
const LayoutServiceDesksRouteWithChildren = LayoutServiceDesksRoute._addFileChildren(LayoutServiceDesksRouteChildren);
|
|
73
83
|
const LayoutRouteChildren = {
|
|
74
84
|
LayoutCommunityRoute: LayoutCommunityRouteWithChildren,
|
|
75
85
|
LayoutLoginRoute,
|
|
76
86
|
LayoutMcpRoute,
|
|
77
|
-
LayoutServiceDesksRoute,
|
|
87
|
+
LayoutServiceDesksRoute: LayoutServiceDesksRouteWithChildren,
|
|
78
88
|
LayoutIndexRoute,
|
|
79
89
|
LayoutAppSlugRoute,
|
|
80
90
|
LayoutCatalogAppsIndexRoute,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routeTree.gen.js","sources":["../../src/routeTree.gen.ts"],"sourcesContent":["/* eslint-disable */\n\n// @ts-nocheck\n\n// noinspection JSUnusedGlobalSymbols\n\n// This file was automatically generated by TanStack Router.\n// You should NOT make any changes in this file as it will be overwritten.\n// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.\n\nimport { Route as rootRouteImport } from './routes/__root'\nimport { Route as LayoutRouteImport } from './routes/_layout'\nimport { Route as LayoutIndexRouteImport } from './routes/_layout/index'\nimport { Route as LayoutCommunityRouteImport } from './routes/_layout/community'\nimport { Route as LayoutLoginRouteImport } from './routes/_layout/login'\nimport { Route as LayoutMcpRouteImport } from './routes/_layout/mcp'\nimport { Route as LayoutServiceDesksRouteImport } from './routes/_layout/service-desks'\nimport { Route as AuthCallbackRouteImport } from './routes/auth.callback'\nimport { Route as LayoutAppSlugRouteImport } from './routes/_layout/app.$slug'\nimport { Route as LayoutCommunitySlugRouteImport } from './routes/_layout/community.$slug'\nimport { Route as LayoutCatalogAppsIndexRouteImport } from './routes/_layout/catalog.apps.index'\nimport { Route as LayoutAppSlugSubSubSlugRouteImport } from './routes/_layout/app.$slug_.sub.$subSlug'\n\nconst LayoutRoute = LayoutRouteImport.update({\n id: '/_layout',\n getParentRoute: () => rootRouteImport,\n} as any)\nconst LayoutIndexRoute = LayoutIndexRouteImport.update({\n id: '/',\n path: '/',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutCommunityRoute = LayoutCommunityRouteImport.update({\n id: '/community',\n path: '/community',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutLoginRoute = LayoutLoginRouteImport.update({\n id: '/login',\n path: '/login',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutMcpRoute = LayoutMcpRouteImport.update({\n id: '/mcp',\n path: '/mcp',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutServiceDesksRoute = LayoutServiceDesksRouteImport.update({\n id: '/service-desks',\n path: '/service-desks',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst AuthCallbackRoute = AuthCallbackRouteImport.update({\n id: '/auth/callback',\n path: '/auth/callback',\n getParentRoute: () => rootRouteImport,\n} as any)\nconst LayoutAppSlugRoute = LayoutAppSlugRouteImport.update({\n id: '/app/$slug',\n path: '/app/$slug',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutCommunitySlugRoute = LayoutCommunitySlugRouteImport.update({\n id: '/$slug',\n path: '/$slug',\n getParentRoute: () => LayoutCommunityRoute,\n} as any)\nconst LayoutCatalogAppsIndexRoute = LayoutCatalogAppsIndexRouteImport.update({\n id: '/catalog/apps/',\n path: '/catalog/apps/',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutAppSlugSubSubSlugRoute = LayoutAppSlugSubSubSlugRouteImport.update({\n id: '/app/$slug_/sub/$subSlug',\n path: '/app/$slug/sub/$subSlug',\n getParentRoute: () => LayoutRoute,\n} as any)\n\nexport interface FileRoutesByFullPath {\n '/': typeof LayoutIndexRoute\n '/community': typeof LayoutCommunityRouteWithChildren\n '/login': typeof LayoutLoginRoute\n '/mcp': typeof LayoutMcpRoute\n '/service-desks': typeof LayoutServiceDesksRoute\n '/auth/callback': typeof AuthCallbackRoute\n '/app/$slug': typeof LayoutAppSlugRoute\n '/community/$slug': typeof LayoutCommunitySlugRoute\n '/catalog/apps/': typeof LayoutCatalogAppsIndexRoute\n '/app/$slug/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute\n}\nexport interface FileRoutesByTo {\n '/community': typeof LayoutCommunityRouteWithChildren\n '/login': typeof LayoutLoginRoute\n '/mcp': typeof LayoutMcpRoute\n '/service-desks': typeof LayoutServiceDesksRoute\n '/auth/callback': typeof AuthCallbackRoute\n '/': typeof LayoutIndexRoute\n '/app/$slug': typeof LayoutAppSlugRoute\n '/community/$slug': typeof LayoutCommunitySlugRoute\n '/catalog/apps': typeof LayoutCatalogAppsIndexRoute\n '/app/$slug/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute\n}\nexport interface FileRoutesById {\n __root__: typeof rootRouteImport\n '/_layout': typeof LayoutRouteWithChildren\n '/_layout/community': typeof LayoutCommunityRouteWithChildren\n '/_layout/login': typeof LayoutLoginRoute\n '/_layout/mcp': typeof LayoutMcpRoute\n '/_layout/service-desks': typeof LayoutServiceDesksRoute\n '/auth/callback': typeof AuthCallbackRoute\n '/_layout/': typeof LayoutIndexRoute\n '/_layout/app/$slug': typeof LayoutAppSlugRoute\n '/_layout/community/$slug': typeof LayoutCommunitySlugRoute\n '/_layout/catalog/apps/': typeof LayoutCatalogAppsIndexRoute\n '/_layout/app/$slug_/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute\n}\nexport interface FileRouteTypes {\n fileRoutesByFullPath: FileRoutesByFullPath\n fullPaths:\n | '/'\n | '/community'\n | '/login'\n | '/mcp'\n | '/service-desks'\n | '/auth/callback'\n | '/app/$slug'\n | '/community/$slug'\n | '/catalog/apps/'\n | '/app/$slug/sub/$subSlug'\n fileRoutesByTo: FileRoutesByTo\n to:\n | '/community'\n | '/login'\n | '/mcp'\n | '/service-desks'\n | '/auth/callback'\n | '/'\n | '/app/$slug'\n | '/community/$slug'\n | '/catalog/apps'\n | '/app/$slug/sub/$subSlug'\n id:\n | '__root__'\n | '/_layout'\n | '/_layout/community'\n | '/_layout/login'\n | '/_layout/mcp'\n | '/_layout/service-desks'\n | '/auth/callback'\n | '/_layout/'\n | '/_layout/app/$slug'\n | '/_layout/community/$slug'\n | '/_layout/catalog/apps/'\n | '/_layout/app/$slug_/sub/$subSlug'\n fileRoutesById: FileRoutesById\n}\nexport interface RootRouteChildren {\n LayoutRoute: typeof LayoutRouteWithChildren\n AuthCallbackRoute: typeof AuthCallbackRoute\n}\n\ndeclare module '@tanstack/react-router' {\n interface FileRoutesByPath {\n '/_layout': {\n id: '/_layout'\n path: ''\n fullPath: '/'\n preLoaderRoute: typeof LayoutRouteImport\n parentRoute: typeof rootRouteImport\n }\n '/_layout/': {\n id: '/_layout/'\n path: '/'\n fullPath: '/'\n preLoaderRoute: typeof LayoutIndexRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/community': {\n id: '/_layout/community'\n path: '/community'\n fullPath: '/community'\n preLoaderRoute: typeof LayoutCommunityRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/login': {\n id: '/_layout/login'\n path: '/login'\n fullPath: '/login'\n preLoaderRoute: typeof LayoutLoginRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/mcp': {\n id: '/_layout/mcp'\n path: '/mcp'\n fullPath: '/mcp'\n preLoaderRoute: typeof LayoutMcpRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/service-desks': {\n id: '/_layout/service-desks'\n path: '/service-desks'\n fullPath: '/service-desks'\n preLoaderRoute: typeof LayoutServiceDesksRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/auth/callback': {\n id: '/auth/callback'\n path: '/auth/callback'\n fullPath: '/auth/callback'\n preLoaderRoute: typeof AuthCallbackRouteImport\n parentRoute: typeof rootRouteImport\n }\n '/_layout/app/$slug': {\n id: '/_layout/app/$slug'\n path: '/app/$slug'\n fullPath: '/app/$slug'\n preLoaderRoute: typeof LayoutAppSlugRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/community/$slug': {\n id: '/_layout/community/$slug'\n path: '/$slug'\n fullPath: '/community/$slug'\n preLoaderRoute: typeof LayoutCommunitySlugRouteImport\n parentRoute: typeof LayoutCommunityRoute\n }\n '/_layout/catalog/apps/': {\n id: '/_layout/catalog/apps/'\n path: '/catalog/apps'\n fullPath: '/catalog/apps/'\n preLoaderRoute: typeof LayoutCatalogAppsIndexRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/app/$slug_/sub/$subSlug': {\n id: '/_layout/app/$slug_/sub/$subSlug'\n path: '/app/$slug/sub/$subSlug'\n fullPath: '/app/$slug/sub/$subSlug'\n preLoaderRoute: typeof LayoutAppSlugSubSubSlugRouteImport\n parentRoute: typeof LayoutRoute\n }\n }\n}\n\ninterface LayoutCommunityRouteChildren {\n LayoutCommunitySlugRoute: typeof LayoutCommunitySlugRoute\n}\n\nconst LayoutCommunityRouteChildren: LayoutCommunityRouteChildren = {\n LayoutCommunitySlugRoute: LayoutCommunitySlugRoute,\n}\n\nconst LayoutCommunityRouteWithChildren = LayoutCommunityRoute._addFileChildren(\n LayoutCommunityRouteChildren,\n)\n\ninterface LayoutRouteChildren {\n LayoutCommunityRoute: typeof LayoutCommunityRouteWithChildren\n LayoutLoginRoute: typeof LayoutLoginRoute\n LayoutMcpRoute: typeof LayoutMcpRoute\n LayoutServiceDesksRoute: typeof LayoutServiceDesksRoute\n LayoutIndexRoute: typeof LayoutIndexRoute\n LayoutAppSlugRoute: typeof LayoutAppSlugRoute\n LayoutCatalogAppsIndexRoute: typeof LayoutCatalogAppsIndexRoute\n LayoutAppSlugSubSubSlugRoute: typeof LayoutAppSlugSubSubSlugRoute\n}\n\nconst LayoutRouteChildren: LayoutRouteChildren = {\n LayoutCommunityRoute: LayoutCommunityRouteWithChildren,\n LayoutLoginRoute: LayoutLoginRoute,\n LayoutMcpRoute: LayoutMcpRoute,\n LayoutServiceDesksRoute: LayoutServiceDesksRoute,\n LayoutIndexRoute: LayoutIndexRoute,\n LayoutAppSlugRoute: LayoutAppSlugRoute,\n LayoutCatalogAppsIndexRoute: LayoutCatalogAppsIndexRoute,\n LayoutAppSlugSubSubSlugRoute: LayoutAppSlugSubSubSlugRoute,\n}\n\nconst LayoutRouteWithChildren =\n LayoutRoute._addFileChildren(LayoutRouteChildren)\n\nconst rootRouteChildren: RootRouteChildren = {\n LayoutRoute: LayoutRouteWithChildren,\n AuthCallbackRoute: AuthCallbackRoute,\n}\nexport const routeTree = rootRouteImport\n ._addFileChildren(rootRouteChildren)\n ._addFileTypes<FileRouteTypes>()\n"],"names":["LayoutRouteImport","rootRouteImport","LayoutIndexRouteImport","LayoutCommunityRouteImport","LayoutLoginRouteImport","LayoutMcpRouteImport","LayoutServiceDesksRouteImport","AuthCallbackRouteImport","LayoutAppSlugRouteImport","LayoutCommunitySlugRouteImport","LayoutCatalogAppsIndexRouteImport","LayoutAppSlugSubSubSlugRouteImport"],"mappings":";;;;;;;;;;;;AAuBA,MAAM,cAAcA,QAAkB,OAAO;AAAA,EAC3C,IAAI;AAAA,EACJ,gBAAgB,MAAMC;AACxB,CAAQ;AACR,MAAM,mBAAmBC,QAAuB,OAAO;AAAA,EACrD,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB,MAAM;AACxB,CAAQ;AACR,MAAM,uBAAuBC,QAA2B,OAAO;AAAA,EAC7D,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB,MAAM;A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ClC,cAAA;"}
|
|
1
|
+
{"version":3,"file":"routeTree.gen.js","sources":["../../src/routeTree.gen.ts"],"sourcesContent":["/* eslint-disable */\n\n// @ts-nocheck\n\n// noinspection JSUnusedGlobalSymbols\n\n// This file was automatically generated by TanStack Router.\n// You should NOT make any changes in this file as it will be overwritten.\n// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.\n\nimport { Route as rootRouteImport } from './routes/__root'\nimport { Route as LayoutRouteImport } from './routes/_layout'\nimport { Route as LayoutIndexRouteImport } from './routes/_layout/index'\nimport { Route as LayoutCommunityRouteImport } from './routes/_layout/community'\nimport { Route as LayoutLoginRouteImport } from './routes/_layout/login'\nimport { Route as LayoutMcpRouteImport } from './routes/_layout/mcp'\nimport { Route as LayoutServiceDesksRouteImport } from './routes/_layout/service-desks'\nimport { Route as AuthCallbackRouteImport } from './routes/auth.callback'\nimport { Route as LayoutAppSlugRouteImport } from './routes/_layout/app.$slug'\nimport { Route as LayoutCommunitySlugRouteImport } from './routes/_layout/community.$slug'\nimport { Route as LayoutServiceDesksSlugRouteImport } from './routes/_layout/service-desks.$slug'\nimport { Route as LayoutCatalogAppsIndexRouteImport } from './routes/_layout/catalog.apps.index'\nimport { Route as LayoutAppSlugSubSubSlugRouteImport } from './routes/_layout/app.$slug_.sub.$subSlug'\n\nconst LayoutRoute = LayoutRouteImport.update({\n id: '/_layout',\n getParentRoute: () => rootRouteImport,\n} as any)\nconst LayoutIndexRoute = LayoutIndexRouteImport.update({\n id: '/',\n path: '/',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutCommunityRoute = LayoutCommunityRouteImport.update({\n id: '/community',\n path: '/community',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutLoginRoute = LayoutLoginRouteImport.update({\n id: '/login',\n path: '/login',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutMcpRoute = LayoutMcpRouteImport.update({\n id: '/mcp',\n path: '/mcp',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutServiceDesksRoute = LayoutServiceDesksRouteImport.update({\n id: '/service-desks',\n path: '/service-desks',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst AuthCallbackRoute = AuthCallbackRouteImport.update({\n id: '/auth/callback',\n path: '/auth/callback',\n getParentRoute: () => rootRouteImport,\n} as any)\nconst LayoutAppSlugRoute = LayoutAppSlugRouteImport.update({\n id: '/app/$slug',\n path: '/app/$slug',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutCommunitySlugRoute = LayoutCommunitySlugRouteImport.update({\n id: '/$slug',\n path: '/$slug',\n getParentRoute: () => LayoutCommunityRoute,\n} as any)\nconst LayoutServiceDesksSlugRoute = LayoutServiceDesksSlugRouteImport.update({\n id: '/$slug',\n path: '/$slug',\n getParentRoute: () => LayoutServiceDesksRoute,\n} as any)\nconst LayoutCatalogAppsIndexRoute = LayoutCatalogAppsIndexRouteImport.update({\n id: '/catalog/apps/',\n path: '/catalog/apps/',\n getParentRoute: () => LayoutRoute,\n} as any)\nconst LayoutAppSlugSubSubSlugRoute = LayoutAppSlugSubSubSlugRouteImport.update({\n id: '/app/$slug_/sub/$subSlug',\n path: '/app/$slug/sub/$subSlug',\n getParentRoute: () => LayoutRoute,\n} as any)\n\nexport interface FileRoutesByFullPath {\n '/': typeof LayoutIndexRoute\n '/community': typeof LayoutCommunityRouteWithChildren\n '/login': typeof LayoutLoginRoute\n '/mcp': typeof LayoutMcpRoute\n '/service-desks': typeof LayoutServiceDesksRouteWithChildren\n '/auth/callback': typeof AuthCallbackRoute\n '/app/$slug': typeof LayoutAppSlugRoute\n '/community/$slug': typeof LayoutCommunitySlugRoute\n '/service-desks/$slug': typeof LayoutServiceDesksSlugRoute\n '/catalog/apps/': typeof LayoutCatalogAppsIndexRoute\n '/app/$slug/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute\n}\nexport interface FileRoutesByTo {\n '/community': typeof LayoutCommunityRouteWithChildren\n '/login': typeof LayoutLoginRoute\n '/mcp': typeof LayoutMcpRoute\n '/service-desks': typeof LayoutServiceDesksRouteWithChildren\n '/auth/callback': typeof AuthCallbackRoute\n '/': typeof LayoutIndexRoute\n '/app/$slug': typeof LayoutAppSlugRoute\n '/community/$slug': typeof LayoutCommunitySlugRoute\n '/service-desks/$slug': typeof LayoutServiceDesksSlugRoute\n '/catalog/apps': typeof LayoutCatalogAppsIndexRoute\n '/app/$slug/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute\n}\nexport interface FileRoutesById {\n __root__: typeof rootRouteImport\n '/_layout': typeof LayoutRouteWithChildren\n '/_layout/community': typeof LayoutCommunityRouteWithChildren\n '/_layout/login': typeof LayoutLoginRoute\n '/_layout/mcp': typeof LayoutMcpRoute\n '/_layout/service-desks': typeof LayoutServiceDesksRouteWithChildren\n '/auth/callback': typeof AuthCallbackRoute\n '/_layout/': typeof LayoutIndexRoute\n '/_layout/app/$slug': typeof LayoutAppSlugRoute\n '/_layout/community/$slug': typeof LayoutCommunitySlugRoute\n '/_layout/service-desks/$slug': typeof LayoutServiceDesksSlugRoute\n '/_layout/catalog/apps/': typeof LayoutCatalogAppsIndexRoute\n '/_layout/app/$slug_/sub/$subSlug': typeof LayoutAppSlugSubSubSlugRoute\n}\nexport interface FileRouteTypes {\n fileRoutesByFullPath: FileRoutesByFullPath\n fullPaths:\n | '/'\n | '/community'\n | '/login'\n | '/mcp'\n | '/service-desks'\n | '/auth/callback'\n | '/app/$slug'\n | '/community/$slug'\n | '/service-desks/$slug'\n | '/catalog/apps/'\n | '/app/$slug/sub/$subSlug'\n fileRoutesByTo: FileRoutesByTo\n to:\n | '/community'\n | '/login'\n | '/mcp'\n | '/service-desks'\n | '/auth/callback'\n | '/'\n | '/app/$slug'\n | '/community/$slug'\n | '/service-desks/$slug'\n | '/catalog/apps'\n | '/app/$slug/sub/$subSlug'\n id:\n | '__root__'\n | '/_layout'\n | '/_layout/community'\n | '/_layout/login'\n | '/_layout/mcp'\n | '/_layout/service-desks'\n | '/auth/callback'\n | '/_layout/'\n | '/_layout/app/$slug'\n | '/_layout/community/$slug'\n | '/_layout/service-desks/$slug'\n | '/_layout/catalog/apps/'\n | '/_layout/app/$slug_/sub/$subSlug'\n fileRoutesById: FileRoutesById\n}\nexport interface RootRouteChildren {\n LayoutRoute: typeof LayoutRouteWithChildren\n AuthCallbackRoute: typeof AuthCallbackRoute\n}\n\ndeclare module '@tanstack/react-router' {\n interface FileRoutesByPath {\n '/_layout': {\n id: '/_layout'\n path: ''\n fullPath: '/'\n preLoaderRoute: typeof LayoutRouteImport\n parentRoute: typeof rootRouteImport\n }\n '/_layout/': {\n id: '/_layout/'\n path: '/'\n fullPath: '/'\n preLoaderRoute: typeof LayoutIndexRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/community': {\n id: '/_layout/community'\n path: '/community'\n fullPath: '/community'\n preLoaderRoute: typeof LayoutCommunityRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/login': {\n id: '/_layout/login'\n path: '/login'\n fullPath: '/login'\n preLoaderRoute: typeof LayoutLoginRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/mcp': {\n id: '/_layout/mcp'\n path: '/mcp'\n fullPath: '/mcp'\n preLoaderRoute: typeof LayoutMcpRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/service-desks': {\n id: '/_layout/service-desks'\n path: '/service-desks'\n fullPath: '/service-desks'\n preLoaderRoute: typeof LayoutServiceDesksRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/auth/callback': {\n id: '/auth/callback'\n path: '/auth/callback'\n fullPath: '/auth/callback'\n preLoaderRoute: typeof AuthCallbackRouteImport\n parentRoute: typeof rootRouteImport\n }\n '/_layout/app/$slug': {\n id: '/_layout/app/$slug'\n path: '/app/$slug'\n fullPath: '/app/$slug'\n preLoaderRoute: typeof LayoutAppSlugRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/community/$slug': {\n id: '/_layout/community/$slug'\n path: '/$slug'\n fullPath: '/community/$slug'\n preLoaderRoute: typeof LayoutCommunitySlugRouteImport\n parentRoute: typeof LayoutCommunityRoute\n }\n '/_layout/service-desks/$slug': {\n id: '/_layout/service-desks/$slug'\n path: '/$slug'\n fullPath: '/service-desks/$slug'\n preLoaderRoute: typeof LayoutServiceDesksSlugRouteImport\n parentRoute: typeof LayoutServiceDesksRoute\n }\n '/_layout/catalog/apps/': {\n id: '/_layout/catalog/apps/'\n path: '/catalog/apps'\n fullPath: '/catalog/apps/'\n preLoaderRoute: typeof LayoutCatalogAppsIndexRouteImport\n parentRoute: typeof LayoutRoute\n }\n '/_layout/app/$slug_/sub/$subSlug': {\n id: '/_layout/app/$slug_/sub/$subSlug'\n path: '/app/$slug/sub/$subSlug'\n fullPath: '/app/$slug/sub/$subSlug'\n preLoaderRoute: typeof LayoutAppSlugSubSubSlugRouteImport\n parentRoute: typeof LayoutRoute\n }\n }\n}\n\ninterface LayoutCommunityRouteChildren {\n LayoutCommunitySlugRoute: typeof LayoutCommunitySlugRoute\n}\n\nconst LayoutCommunityRouteChildren: LayoutCommunityRouteChildren = {\n LayoutCommunitySlugRoute: LayoutCommunitySlugRoute,\n}\n\nconst LayoutCommunityRouteWithChildren = LayoutCommunityRoute._addFileChildren(\n LayoutCommunityRouteChildren,\n)\n\ninterface LayoutServiceDesksRouteChildren {\n LayoutServiceDesksSlugRoute: typeof LayoutServiceDesksSlugRoute\n}\n\nconst LayoutServiceDesksRouteChildren: LayoutServiceDesksRouteChildren = {\n LayoutServiceDesksSlugRoute: LayoutServiceDesksSlugRoute,\n}\n\nconst LayoutServiceDesksRouteWithChildren =\n LayoutServiceDesksRoute._addFileChildren(LayoutServiceDesksRouteChildren)\n\ninterface LayoutRouteChildren {\n LayoutCommunityRoute: typeof LayoutCommunityRouteWithChildren\n LayoutLoginRoute: typeof LayoutLoginRoute\n LayoutMcpRoute: typeof LayoutMcpRoute\n LayoutServiceDesksRoute: typeof LayoutServiceDesksRouteWithChildren\n LayoutIndexRoute: typeof LayoutIndexRoute\n LayoutAppSlugRoute: typeof LayoutAppSlugRoute\n LayoutCatalogAppsIndexRoute: typeof LayoutCatalogAppsIndexRoute\n LayoutAppSlugSubSubSlugRoute: typeof LayoutAppSlugSubSubSlugRoute\n}\n\nconst LayoutRouteChildren: LayoutRouteChildren = {\n LayoutCommunityRoute: LayoutCommunityRouteWithChildren,\n LayoutLoginRoute: LayoutLoginRoute,\n LayoutMcpRoute: LayoutMcpRoute,\n LayoutServiceDesksRoute: LayoutServiceDesksRouteWithChildren,\n LayoutIndexRoute: LayoutIndexRoute,\n LayoutAppSlugRoute: LayoutAppSlugRoute,\n LayoutCatalogAppsIndexRoute: LayoutCatalogAppsIndexRoute,\n LayoutAppSlugSubSubSlugRoute: LayoutAppSlugSubSubSlugRoute,\n}\n\nconst LayoutRouteWithChildren =\n LayoutRoute._addFileChildren(LayoutRouteChildren)\n\nconst rootRouteChildren: RootRouteChildren = {\n LayoutRoute: LayoutRouteWithChildren,\n AuthCallbackRoute: AuthCallbackRoute,\n}\nexport const routeTree = rootRouteImport\n ._addFileChildren(rootRouteChildren)\n ._addFileTypes<FileRouteTypes>()\n"],"names":["LayoutRouteImport","rootRouteImport","LayoutIndexRouteImport","LayoutCommunityRouteImport","LayoutLoginRouteImport","LayoutMcpRouteImport","LayoutServiceDesksRouteImport","AuthCallbackRouteImport","LayoutAppSlugRouteImport","LayoutCommunitySlugRouteImport","LayoutServiceDesksSlugRouteImport","LayoutCatalogAppsIndexRouteImport","LayoutAppSlugSubSubSlugRouteImport"],"mappings":";;;;;;;;;;;;;AAwBA,MAAM,cAAcA,QAAkB,OAAO;AAAA,EAC3C,IAAI;AAAA,EACJ,gBAAgB,MAAMC;AACxB,CAAQ;AACR,MAAM,mBAAmBC,QAAuB,OAAO;AAAA,EACrD,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB,MAAM;AACxB,CAAQ;AACR,MAAM,uBAAuBC,QAA2B,OAAO;AAAA,EAC7D,IAAI;AAAA,EACJ,MA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AAAA,EACtB;AAAA,EACA;AAAA,EACA,yBAAyB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,0BACJ,YAAY,iBAAiB,mBAAmB;AAElD,MAAM,oBAAuC;AAAA,EAC3C,aAAa;AAAA,EACb;AACF;AACO,MAAM,YAAYX,MACtB,iBAAiB,iBAAiB,EAClC,cAAA;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* One form's card, `/service-desks/<desk key>-<form id>`. Renders nothing: the
|
|
4
|
+
* parent `/service-desks` route owns the page and reads the slug from the
|
|
5
|
+
* router, so opening a card never remounts the list or loses the search.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Route: import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/router-core').Route<import('@tanstack/react-router').Register, import('@tanstack/react-router').RootRoute<import('@tanstack/react-router').Register, undefined, import('../..').AcRouterContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "", "/", "/_layout", "/_layout", undefined, import('@tanstack/router-core').ResolveParams<"">, import('@tanstack/router-core').AnyContext, import('../..').AcRouterContext, import('../..').AcRouterContext, {}, typeof import('../../modules/communityTools/communityToolsConfigLoader.js').communityToolsConfigLoader, unknown, unknown, unknown, unknown, undefined>, "/service-desks", "/service-desks", "/_layout/service-desks", "/_layout/service-desks", z.ZodObject<{
|
|
8
|
+
q: z.ZodOptional<z.ZodString>;
|
|
9
|
+
desk: z.ZodOptional<z.ZodString>;
|
|
10
|
+
form: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
11
|
+
}, z.core.$strip>, import('@tanstack/router-core').ResolveParams<"/service-desks">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/$slug", "/service-desks/$slug", "/_layout/service-desks/$slug", "/_layout/service-desks/$slug", z.ZodObject<{
|
|
12
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>, import('@tanstack/router-core').ResolveParams<"/$slug">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createFileRoute } from "@tanstack/react-router";
|
|
2
|
+
import { object, string } from "../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.js";
|
|
3
|
+
const searchSchema = object({
|
|
4
|
+
/** The card's tab, owned by DetailTabs. */
|
|
5
|
+
tab: string().optional()
|
|
6
|
+
});
|
|
7
|
+
const Route = createFileRoute("/_layout/service-desks/$slug")({
|
|
8
|
+
component: () => null,
|
|
9
|
+
validateSearch: searchSchema
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
Route
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=service-desks._slug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-desks._slug.js","sources":["../../../../src/routes/_layout/service-desks.$slug.tsx"],"sourcesContent":["import { createFileRoute } from '@tanstack/react-router'\nimport { z } from 'zod'\n\nconst searchSchema = z.object({\n /** The card's tab, owned by DetailTabs. */\n tab: z.string().optional(),\n})\n\n/**\n * One form's card, `/service-desks/<desk key>-<form id>`. Renders nothing: the\n * parent `/service-desks` route owns the page and reads the slug from the\n * router, so opening a card never remounts the list or loses the search.\n */\nexport const Route = createFileRoute('/_layout/service-desks/$slug')({\n component: () => null,\n validateSearch: searchSchema,\n})\n"],"names":["z.object","z.string"],"mappings":";;AAGA,MAAM,eAAeA,OAAS;AAAA;AAAA,EAE5B,KAAKC,OAAE,EAAS,SAAA;AAClB,CAAC;AAOM,MAAM,QAAQ,gBAAgB,8BAA8B,EAAE;AAAA,EACnE,WAAW,MAAM;AAAA,EACjB,gBAAgB;AAClB,CAAC;"}
|
|
@@ -3,5 +3,4 @@ export declare const Route: import('@tanstack/router-core').Route<import('@tanst
|
|
|
3
3
|
q: z.ZodOptional<z.ZodString>;
|
|
4
4
|
desk: z.ZodOptional<z.ZodString>;
|
|
5
5
|
form: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
6
|
-
tab: z.ZodOptional<z.ZodString>;
|
|
7
6
|
}, z.core.$strip>, import('@tanstack/router-core').ResolveParams<"/service-desks">, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, import('@tanstack/router-core').AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
@@ -2,19 +2,15 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createFileRoute, stripSearchParams } from "@tanstack/react-router";
|
|
3
3
|
import { AppCatalogLayout } from "../../modules/appCatalog/ui/layout/AppCatalogLayout.js";
|
|
4
4
|
import { ServiceDesksPage } from "../../modules/appCatalog/ui/pages/ServiceDesksPage.js";
|
|
5
|
-
import { object,
|
|
5
|
+
import { object, union, string, number } from "../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.js";
|
|
6
6
|
const searchSchema = object({
|
|
7
7
|
q: string().optional(),
|
|
8
|
-
/** The desk whose card is open (its approval-method slug). */
|
|
9
|
-
desk: string().optional(),
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* as `"69"`, quotes and all, and a hand-typed `form=69` reads back as one.
|
|
9
|
+
* Legacy card address, `?desk=<method slug>&form=<id>`, shipped briefly before
|
|
10
|
+
* cards moved to `/service-desks/<slug>`. Read once and redirected.
|
|
14
11
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
tab: string().optional()
|
|
12
|
+
desk: string().optional(),
|
|
13
|
+
form: union([number(), string()]).optional()
|
|
18
14
|
});
|
|
19
15
|
const Route = createFileRoute("/_layout/service-desks")({
|
|
20
16
|
component: RouteComponent,
|