87 lines
2.2 KiB
JavaScript
87 lines
2.2 KiB
JavaScript
/**
|
|
* @typedef {{
|
|
* routeId: string,
|
|
* path: string,
|
|
* paramsSchema: string | null,
|
|
* searchSchema: string | null,
|
|
* access: "public" | "session-required" | "integration-defined",
|
|
* loadingSurface: string,
|
|
* errorSurface: string,
|
|
* chunkId: string,
|
|
* title: string,
|
|
* navigationLabel: string | null,
|
|
* navigationOrder: number | null
|
|
* }} RouteDefinition
|
|
*/
|
|
|
|
/** @param {RouteDefinition} definition */
|
|
const route = (definition) => Object.freeze(definition);
|
|
|
|
export const PLATFORM_ROUTE_REGISTRY = Object.freeze({
|
|
APP_HOME: route({
|
|
routeId: "APP_HOME",
|
|
path: "/",
|
|
paramsSchema: null,
|
|
searchSchema: null,
|
|
access: "public",
|
|
loadingSurface: "app-shell",
|
|
errorSurface: "route-boundary",
|
|
chunkId: "route-home",
|
|
title: "시작",
|
|
navigationLabel: "시작",
|
|
navigationOrder: 10,
|
|
}),
|
|
EXAMPLES_UI: route({
|
|
routeId: "EXAMPLES_UI",
|
|
path: "/examples/ui",
|
|
paramsSchema: null,
|
|
searchSchema: null,
|
|
access: "public",
|
|
loadingSurface: "example-page",
|
|
errorSurface: "route-boundary",
|
|
chunkId: "route-examples-ui",
|
|
title: "UI 구성요소",
|
|
navigationLabel: "UI 구성요소",
|
|
navigationOrder: 20,
|
|
}),
|
|
EXAMPLES_STATES: route({
|
|
routeId: "EXAMPLES_STATES",
|
|
path: "/examples/states",
|
|
paramsSchema: null,
|
|
searchSchema: null,
|
|
access: "public",
|
|
loadingSurface: "example-page",
|
|
errorSurface: "route-boundary",
|
|
chunkId: "route-examples-states",
|
|
title: "화면 상태",
|
|
navigationLabel: "화면 상태",
|
|
navigationOrder: 30,
|
|
}),
|
|
EXAMPLES_AUTH: route({
|
|
routeId: "EXAMPLES_AUTH",
|
|
path: "/examples/auth",
|
|
paramsSchema: null,
|
|
searchSchema: null,
|
|
access: "public",
|
|
loadingSurface: "example-page",
|
|
errorSurface: "route-boundary",
|
|
chunkId: "route-examples-auth",
|
|
title: "인증 연동",
|
|
navigationLabel: "인증 연동",
|
|
navigationOrder: 40,
|
|
}),
|
|
NOT_FOUND: route({
|
|
routeId: "NOT_FOUND",
|
|
path: "*",
|
|
paramsSchema: "NotFoundSplat",
|
|
searchSchema: null,
|
|
access: "public",
|
|
loadingSurface: "none",
|
|
errorSurface: "not-found",
|
|
chunkId: "route-not-found",
|
|
title: "페이지를 찾을 수 없음",
|
|
navigationLabel: null,
|
|
navigationOrder: null,
|
|
}),
|
|
});
|