@selfhelp/shared 1.20.0 → 1.21.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/CHANGELOG.md +12 -0
- package/dist/index.d.mts +158 -108
- package/dist/index.d.ts +158 -108
- package/dist/index.js +421 -107
- package/dist/index.mjs +392 -92
- package/package.json +1 -1
- package/src/api/endpoints.ts +8 -0
- package/src/navigation/__tests__/navigation.test.ts +152 -64
- package/src/navigation/__tests__/startup.test.ts +33 -0
- package/src/navigation/branchNav.ts +216 -0
- package/src/navigation/headerPreset.ts +52 -0
- package/src/navigation/index.ts +9 -7
- package/src/navigation/menuMembership.ts +63 -0
- package/src/navigation/menuSearch.ts +68 -0
- package/src/navigation/menuVisibility.ts +24 -25
- package/src/navigation/mobileRoute.ts +20 -0
- package/src/navigation/navLinks.ts +38 -0
- package/src/navigation/navigationPayload.ts +84 -0
- package/src/navigation/startup.ts +87 -0
- package/src/types/api/__tests__/page-routing.test.ts +0 -6
- package/src/types/pages.ts +0 -13
- package/src/utils/__tests__/transformPageData.test.ts +3 -19
- package/src/utils/transformPageData.ts +1 -37
- package/src/navigation/navRender.ts +0 -132
package/dist/index.d.ts
CHANGED
|
@@ -7,56 +7,6 @@ export { COLOR_PALETTE, COLOR_SCALES, CONTAINER_SIZE_PX, FONT_SIZE_PX, FULL_RADI
|
|
|
7
7
|
export { TAnyStyleName, TPluginStyleImplMap, TStyleImplMap, getRegistryEntry, getRegistryEntryAny, getStylePlacement, getStylePlatforms, getStylePluginId, isKnownStyleName, isRegisteredStyleName, isStyleAllowedOnPage, isStylePlacementAllowed, isStyleSupportedOnPlatform, setToStylePlatform, stylePlatformToSet } from './registry/index.js';
|
|
8
8
|
export { sharedTailwindExtend, sharedTailwindPreset } from './theme/tailwind.js';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Navigation rendering contract (shared by web + mobile).
|
|
12
|
-
*
|
|
13
|
-
* The page TREE defines navigation STRUCTURE (parent/child + `nav_position`).
|
|
14
|
-
* A per-page render type controls PRESENTATION only — it never changes the
|
|
15
|
-
* structure or the URLs. Web and mobile each pick their own renderer from the
|
|
16
|
-
* stored value, so the same subtree can render differently per platform.
|
|
17
|
-
*
|
|
18
|
-
* - `web_nav_render` selects the web renderer for a page's children.
|
|
19
|
-
* - `mobile_nav_render` selects the mobile renderer for a page's children.
|
|
20
|
-
*
|
|
21
|
-
* Both fields are OPTIONAL on a page; when unset the platform applies its
|
|
22
|
-
* default (web `tabs`, mobile `segmented-tabs` for a navigation page's
|
|
23
|
-
* children; the GLOBAL app menu defaults to web `header-dropdown` and mobile
|
|
24
|
-
* `bottom-tabs`).
|
|
25
|
-
*/
|
|
26
|
-
type TWebNavRender = 'header-dropdown' | 'tabs' | 'sidebar-drawer' | 'hero-cards';
|
|
27
|
-
type TMobileNavRender = 'segmented-tabs' | 'bottom-tabs' | 'drawer' | 'hero-cards';
|
|
28
|
-
declare const WEB_NAV_RENDER_VALUES: readonly TWebNavRender[];
|
|
29
|
-
declare const MOBILE_NAV_RENDER_VALUES: readonly TMobileNavRender[];
|
|
30
|
-
/** Default renderer for a navigation page's CHILDREN. */
|
|
31
|
-
declare const DEFAULT_WEB_NAV_RENDER: TWebNavRender;
|
|
32
|
-
declare const DEFAULT_MOBILE_NAV_RENDER: TMobileNavRender;
|
|
33
|
-
/** Default renderer for the GLOBAL app menu (header / shell). */
|
|
34
|
-
declare const DEFAULT_WEB_GLOBAL_NAV_RENDER: TWebNavRender;
|
|
35
|
-
declare const DEFAULT_MOBILE_GLOBAL_NAV_RENDER: TMobileNavRender;
|
|
36
|
-
interface INavRenderOption<T extends string> {
|
|
37
|
-
value: T;
|
|
38
|
-
/** Friendly label for the admin select. */
|
|
39
|
-
label: string;
|
|
40
|
-
/** Short, plain-language explanation shown under the select. */
|
|
41
|
-
description: string;
|
|
42
|
-
}
|
|
43
|
-
/** Option metadata for the admin "Web menu style" select. */
|
|
44
|
-
declare const WEB_NAV_RENDER_OPTIONS: readonly INavRenderOption<TWebNavRender>[];
|
|
45
|
-
/** Option metadata for the admin "Mobile menu style" select. */
|
|
46
|
-
declare const MOBILE_NAV_RENDER_OPTIONS: readonly INavRenderOption<TMobileNavRender>[];
|
|
47
|
-
declare function isWebNavRender(value: unknown): value is TWebNavRender;
|
|
48
|
-
declare function isMobileNavRender(value: unknown): value is TMobileNavRender;
|
|
49
|
-
/**
|
|
50
|
-
* Resolve a stored `web_nav_render` value to a concrete renderer, falling back
|
|
51
|
-
* to the supplied default (page-children default by default).
|
|
52
|
-
*/
|
|
53
|
-
declare function resolveWebNavRender(value: unknown, fallback?: TWebNavRender): TWebNavRender;
|
|
54
|
-
/**
|
|
55
|
-
* Resolve a stored `mobile_nav_render` value to a concrete renderer, falling
|
|
56
|
-
* back to the supplied default (page-children default by default).
|
|
57
|
-
*/
|
|
58
|
-
declare function resolveMobileNavRender(value: unknown, fallback?: TMobileNavRender): TMobileNavRender;
|
|
59
|
-
|
|
60
10
|
/**
|
|
61
11
|
* Comprehensive page type system, single source of truth for both apps.
|
|
62
12
|
*/
|
|
@@ -90,8 +40,6 @@ interface IBasePageInfo {
|
|
|
90
40
|
url: string | null;
|
|
91
41
|
parent_page_id: number | null;
|
|
92
42
|
is_headless: boolean;
|
|
93
|
-
navPosition: number | null;
|
|
94
|
-
footerPosition: number | null;
|
|
95
43
|
is_system?: boolean;
|
|
96
44
|
}
|
|
97
45
|
interface IPageAccessTypeInfo {
|
|
@@ -116,10 +64,6 @@ interface IPageItem extends IBasePageInfo {
|
|
|
116
64
|
icon?: string | null;
|
|
117
65
|
/** Mobile menu icon (curated lucide name, e.g. `Home`). Page property field `mobile_icon`. */
|
|
118
66
|
mobile_icon?: string | null;
|
|
119
|
-
/** How this page renders its children as navigation on web. Page property field `web_nav_render`. */
|
|
120
|
-
web_nav_render?: TWebNavRender | null;
|
|
121
|
-
/** How this page renders its children as navigation on mobile. Page property field `mobile_nav_render`. */
|
|
122
|
-
mobile_nav_render?: TMobileNavRender | null;
|
|
123
67
|
children?: IPageItem[];
|
|
124
68
|
}
|
|
125
69
|
interface IPageContent {
|
|
@@ -150,18 +94,12 @@ interface IPageContent {
|
|
|
150
94
|
* `modal_height` page property field.
|
|
151
95
|
*/
|
|
152
96
|
modal_height?: string | null;
|
|
153
|
-
nav_position: number | null;
|
|
154
|
-
footer_position: number | null;
|
|
155
97
|
title?: string | null;
|
|
156
98
|
description?: string | null;
|
|
157
99
|
/** Web menu icon (Tabler component name). Mirrors the `icon` page property field. */
|
|
158
100
|
icon?: string | null;
|
|
159
101
|
/** Mobile menu icon (curated lucide name). Mirrors the `mobile_icon` page property field. */
|
|
160
102
|
mobile_icon?: string | null;
|
|
161
|
-
/** Web child-navigation render type. Mirrors the `web_nav_render` page property field. */
|
|
162
|
-
web_nav_render?: TWebNavRender | null;
|
|
163
|
-
/** Mobile child-navigation render type. Mirrors the `mobile_nav_render` page property field. */
|
|
164
|
-
mobile_nav_render?: TMobileNavRender | null;
|
|
165
103
|
/**
|
|
166
104
|
* Snake_case route params extracted from the matched public URL pattern
|
|
167
105
|
* (e.g. `{ user_id: '42', token: 'abc' }` or `{ record_id: '7' }`). Present
|
|
@@ -1834,6 +1772,14 @@ declare const ENDPOINTS: {
|
|
|
1834
1772
|
*/
|
|
1835
1773
|
readonly RESOLVE: (path: string) => string;
|
|
1836
1774
|
};
|
|
1775
|
+
readonly NAVIGATION: {
|
|
1776
|
+
readonly GET: "/cms-api/v1/navigation";
|
|
1777
|
+
readonly LAST_VISITED: "/cms-api/v1/navigation/last-visited";
|
|
1778
|
+
};
|
|
1779
|
+
readonly SEARCH: {
|
|
1780
|
+
readonly CONTENT: "/cms-api/v1/search";
|
|
1781
|
+
readonly PAGES: "/cms-api/v1/search/pages";
|
|
1782
|
+
};
|
|
1837
1783
|
readonly LANGUAGES: "/cms-api/v1/languages";
|
|
1838
1784
|
readonly FORMS: {
|
|
1839
1785
|
readonly SUBMIT: "/cms-api/v1/forms/submit";
|
|
@@ -2089,6 +2035,140 @@ declare function hasInlineFormatting(value: string | null | undefined): boolean;
|
|
|
2089
2035
|
*/
|
|
2090
2036
|
declare function stripHtmlToText(value: string | null | undefined): string;
|
|
2091
2037
|
|
|
2038
|
+
/**
|
|
2039
|
+
* Global web header presentation presets (menu-builder `web_header` menu).
|
|
2040
|
+
*/
|
|
2041
|
+
type TWebHeaderPreset = 'simple' | 'dropdown' | 'mega-menu' | 'tabs' | 'double-dropdown' | 'double-mega-menu';
|
|
2042
|
+
declare const WEB_HEADER_PRESET_VALUES: readonly TWebHeaderPreset[];
|
|
2043
|
+
declare const DEFAULT_WEB_HEADER_PRESET: TWebHeaderPreset;
|
|
2044
|
+
interface IWebHeaderPresetOption {
|
|
2045
|
+
value: TWebHeaderPreset;
|
|
2046
|
+
label: string;
|
|
2047
|
+
description: string;
|
|
2048
|
+
}
|
|
2049
|
+
declare const WEB_HEADER_PRESET_OPTIONS: readonly IWebHeaderPresetOption[];
|
|
2050
|
+
declare function isWebHeaderPreset(value: unknown): value is TWebHeaderPreset;
|
|
2051
|
+
declare function resolveWebHeaderPreset(value: unknown, fallback?: TWebHeaderPreset): TWebHeaderPreset;
|
|
2052
|
+
|
|
2053
|
+
type TNavigationMenuKey = 'web_header' | 'web_footer' | 'mobile_drawer' | 'mobile_bottom_tabs';
|
|
2054
|
+
type TNavigationMenuItemType = 'page' | 'external_url' | 'group';
|
|
2055
|
+
type TNavigationChildSource = 'manual' | 'page_children' | 'manual_plus_suggestions';
|
|
2056
|
+
type TNavigationSearchMode = 'off' | 'menu_pages' | 'searchable_pages' | 'content_index';
|
|
2057
|
+
type TNavigationStartMode = 'fixed_page' | 'last_visited_then_fixed_page';
|
|
2058
|
+
type TNavigationMobileStartSource = 'same_as_web' | 'custom_mobile_pages';
|
|
2059
|
+
interface INavigationResolvedPageRef {
|
|
2060
|
+
id: number;
|
|
2061
|
+
keyword: string;
|
|
2062
|
+
url: string | null;
|
|
2063
|
+
title: string | null;
|
|
2064
|
+
icon?: string | null;
|
|
2065
|
+
mobile_icon?: string | null;
|
|
2066
|
+
has_content?: boolean;
|
|
2067
|
+
section_count?: number;
|
|
2068
|
+
}
|
|
2069
|
+
interface INavigationMenuItem {
|
|
2070
|
+
id: number | string;
|
|
2071
|
+
item_type: TNavigationMenuItemType;
|
|
2072
|
+
label: string;
|
|
2073
|
+
description?: string | null;
|
|
2074
|
+
aria_label?: string | null;
|
|
2075
|
+
icon?: string | null;
|
|
2076
|
+
position: number;
|
|
2077
|
+
external_url?: string | null;
|
|
2078
|
+
page?: INavigationResolvedPageRef | null;
|
|
2079
|
+
is_virtual?: boolean;
|
|
2080
|
+
is_active?: boolean;
|
|
2081
|
+
child_source?: TNavigationChildSource;
|
|
2082
|
+
children?: INavigationMenuItem[];
|
|
2083
|
+
}
|
|
2084
|
+
interface INavigationMenu {
|
|
2085
|
+
key: TNavigationMenuKey;
|
|
2086
|
+
platform: 'web' | 'mobile';
|
|
2087
|
+
surface: 'header' | 'footer' | 'drawer' | 'bottom_tabs';
|
|
2088
|
+
preset?: TWebHeaderPreset | string | null;
|
|
2089
|
+
max_depth?: number | null;
|
|
2090
|
+
item_limit?: number | null;
|
|
2091
|
+
items: INavigationMenuItem[];
|
|
2092
|
+
}
|
|
2093
|
+
interface INavigationStartupConfig {
|
|
2094
|
+
web_guest_start_page: INavigationResolvedPageRef | null;
|
|
2095
|
+
web_user_start_page: INavigationResolvedPageRef | null;
|
|
2096
|
+
web_user_start_mode: TNavigationStartMode;
|
|
2097
|
+
web_user_last_visited_page?: INavigationResolvedPageRef | null;
|
|
2098
|
+
mobile_guest_start_page: INavigationResolvedPageRef | null;
|
|
2099
|
+
mobile_user_start_page: INavigationResolvedPageRef | null;
|
|
2100
|
+
mobile_user_start_mode: TNavigationStartMode;
|
|
2101
|
+
mobile_user_last_visited_page?: INavigationResolvedPageRef | null;
|
|
2102
|
+
mobile_start_page_source: TNavigationMobileStartSource;
|
|
2103
|
+
}
|
|
2104
|
+
interface INavigationSearchConfig {
|
|
2105
|
+
mode: TNavigationSearchMode;
|
|
2106
|
+
min_chars: number;
|
|
2107
|
+
result_limit: number;
|
|
2108
|
+
default_visibility: string;
|
|
2109
|
+
field_policy: string;
|
|
2110
|
+
}
|
|
2111
|
+
interface INavigationPayload {
|
|
2112
|
+
menus: Record<TNavigationMenuKey, INavigationMenu>;
|
|
2113
|
+
startup: INavigationStartupConfig;
|
|
2114
|
+
search: INavigationSearchConfig;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
declare function collectPageIdsFromMenuItems(items: INavigationMenuItem[]): Set<number>;
|
|
2118
|
+
declare function isPageInMenuTree(items: INavigationMenuItem[], pageId: number): boolean;
|
|
2119
|
+
declare function isPageInResolvedMenus(menus: Partial<Record<TNavigationMenuKey, INavigationMenu>>, menuKeys: TNavigationMenuKey[], pageId: number): boolean;
|
|
2120
|
+
declare function isOnAnyMobileMenu(menus: Partial<Record<TNavigationMenuKey, INavigationMenu>>, pageId: number): boolean;
|
|
2121
|
+
declare function findMenuItemByPageId(items: INavigationMenuItem[], pageId: number): INavigationMenuItem | null;
|
|
2122
|
+
|
|
2123
|
+
interface IBranchNavSegment {
|
|
2124
|
+
pageId: number;
|
|
2125
|
+
keyword: string;
|
|
2126
|
+
url: string | null;
|
|
2127
|
+
label: string;
|
|
2128
|
+
icon?: string | null;
|
|
2129
|
+
mobile_icon?: string | null;
|
|
2130
|
+
}
|
|
2131
|
+
/**
|
|
2132
|
+
* Resolve the sibling/child segment group for in-page branch navigation.
|
|
2133
|
+
*
|
|
2134
|
+
* 1. If current page has menu-visible children in resolved menus → show children.
|
|
2135
|
+
* 2. Else if parent has menu-visible siblings → show sibling group.
|
|
2136
|
+
* 3. Else null.
|
|
2137
|
+
*/
|
|
2138
|
+
declare function resolveBranchNavGroup(payload: INavigationPayload, currentPageId: number, menuKeys: Array<keyof INavigationPayload['menus']>): IBranchNavSegment[] | null;
|
|
2139
|
+
declare function resolveMobileSegmentGroup(payload: INavigationPayload, currentPageId: number): IBranchNavSegment[] | null;
|
|
2140
|
+
declare function resolveWebBranchNavGroup(payload: INavigationPayload, currentPageId: number): IBranchNavSegment[] | null;
|
|
2141
|
+
type TMobilePagePresentation = 'route' | 'modal';
|
|
2142
|
+
declare function resolveMobilePagePresentation(payload: INavigationPayload, pageId: number): TMobilePagePresentation;
|
|
2143
|
+
declare function isOnAnyMobileMenuFromPayload(payload: INavigationPayload, pageId: number): boolean;
|
|
2144
|
+
/**
|
|
2145
|
+
* When a page is a holder (no authored content) but has menu-visible children,
|
|
2146
|
+
* return the first child route to auto-select.
|
|
2147
|
+
*/
|
|
2148
|
+
declare function resolveHolderRedirectPath(payload: INavigationPayload, currentPageId: number, platform: 'web' | 'mobile', hasContent: boolean): string | null;
|
|
2149
|
+
|
|
2150
|
+
declare function getNavigationItemLabel(item: INavigationMenuItem): string;
|
|
2151
|
+
declare function getNavigationItemHref(item: INavigationMenuItem): string;
|
|
2152
|
+
declare function flattenNavigationMenuItems(items: INavigationMenuItem[]): INavigationMenuItem[];
|
|
2153
|
+
declare function getNavigationItemKeyword(item: INavigationMenuItem): string | null;
|
|
2154
|
+
|
|
2155
|
+
/**
|
|
2156
|
+
* Map a CMS page canonical URL + keyword to an Expo Router path.
|
|
2157
|
+
*
|
|
2158
|
+
* Wave 1 uses keyword-based routes (`[keyword].tsx`), not file `[...slug]`
|
|
2159
|
+
* segments. Nested public URLs (`/parent/child`) still navigate by keyword.
|
|
2160
|
+
*/
|
|
2161
|
+
declare function pageUrlToMobileRoute(url: string | null | undefined, keyword: string): string;
|
|
2162
|
+
|
|
2163
|
+
/**
|
|
2164
|
+
* Menu visibility helpers for the menu-builder model.
|
|
2165
|
+
*/
|
|
2166
|
+
|
|
2167
|
+
declare function isPageOnAnyMenu(payload: INavigationPayload, pageId: number): boolean;
|
|
2168
|
+
declare function isPageOnWebMenu(payload: INavigationPayload, pageId: number): boolean;
|
|
2169
|
+
declare function isPageOnMobileMenu(payload: INavigationPayload, pageId: number): boolean;
|
|
2170
|
+
declare function flattenMenuItems(items: INavigationMenuItem[]): INavigationMenuItem[];
|
|
2171
|
+
|
|
2092
2172
|
/**
|
|
2093
2173
|
* Curated mobile icon set — the SINGLE source of truth shared by the admin
|
|
2094
2174
|
* `select-icon-mobile` picker (web frontend, drawn with `lucide-react`) and the
|
|
@@ -2117,26 +2197,23 @@ declare function isMobileIconName(value: unknown): value is string;
|
|
|
2117
2197
|
/** Resolve a stored `mobile_icon` to a drawable name, falling back to the default. */
|
|
2118
2198
|
declare function resolveMobileIcon(value: unknown): string;
|
|
2119
2199
|
|
|
2120
|
-
/**
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
* Footer-only pages (`footerPosition != null && navPosition == null`), headless
|
|
2127
|
-
* pages, and ACL-pruned pages (never in the tree to begin with) are NOT menu
|
|
2128
|
-
* pages, so they never appear in a navigation block.
|
|
2129
|
-
*/
|
|
2200
|
+
/** Resolve the mobile Expo Router path for cold start / index redirect. */
|
|
2201
|
+
declare function resolveMobileStartupRoute(startup: INavigationStartupConfig, isLoggedIn: boolean): string;
|
|
2202
|
+
/** Keyword for the CMS page rendered on `/index` when startup maps to home. */
|
|
2203
|
+
declare function resolveMobileStartupKeyword(startup: INavigationStartupConfig, isLoggedIn: boolean): string;
|
|
2204
|
+
/** Resolve a public web path for guest/user startup (leading slash). */
|
|
2205
|
+
declare function resolveWebStartupPath(startup: INavigationStartupConfig, isLoggedIn: boolean): string | null;
|
|
2130
2206
|
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2207
|
+
interface IMenuSearchHit {
|
|
2208
|
+
page_id: number;
|
|
2209
|
+
keyword: string;
|
|
2210
|
+
url: string | null;
|
|
2211
|
+
title: string;
|
|
2212
|
+
}
|
|
2134
2213
|
/**
|
|
2135
|
-
*
|
|
2136
|
-
* auto-render rule additionally requires the page to have no visible body
|
|
2137
|
-
* sections (decided by the caller, which has the resolved page content).
|
|
2214
|
+
* Client-side search over resolved menu trees (`menu_pages` search mode).
|
|
2138
2215
|
*/
|
|
2139
|
-
declare function
|
|
2216
|
+
declare function searchMenuPagesInPayload(payload: INavigationPayload, query: string, limit?: number): IMenuSearchHit[];
|
|
2140
2217
|
|
|
2141
2218
|
/**
|
|
2142
2219
|
* Parse the unified `spacing` field. The CMS
|
|
@@ -2168,28 +2245,7 @@ declare function spacingToClasses(spacing: ISpacingValue, spacingToTailwind: Rec
|
|
|
2168
2245
|
/**
|
|
2169
2246
|
* Backend → frontend page-shape transformer.
|
|
2170
2247
|
*
|
|
2171
|
-
*
|
|
2172
|
-
* (`nav_position`, `footer_position`, `id_pages`, `id_parent_page`,
|
|
2173
|
-
* `id_page_types`, `id_page_access_types`). The web and mobile apps
|
|
2174
|
-
* prefer camelCase (`navPosition`, `footerPosition`) at the type-system
|
|
2175
|
-
* level. This helper bridges the two so consumers don't have to know
|
|
2176
|
-
* about the snake-case wire format.
|
|
2177
|
-
*
|
|
2178
|
-
* It is the single source of truth for the conversion. Web frontend
|
|
2179
|
-
* and mobile both import it from `@selfhelp/shared`.
|
|
2180
|
-
*
|
|
2181
|
-
* NOTE: Pre-release breaking-change cutover (`db_naming_cutover_*`)
|
|
2182
|
-
* removed all legacy aliases (`parent`, `id_type`,
|
|
2183
|
-
* `id_pageAccessTypes`). The backend is the single source of canonical
|
|
2184
|
-
* keys; the transformer no longer accepts the legacy shapes.
|
|
2185
|
-
*
|
|
2186
|
-
* ROUTE METADATA (issue #30): this transformer deliberately does NOT carry
|
|
2187
|
-
* `route_params` / `matched_url_pattern` / `canonical_url`. Those are
|
|
2188
|
-
* resolve-time fields of a single page's full content (`IPageContent`, returned
|
|
2189
|
-
* by `GET /pages/resolve`) and are consumed directly off that type. `IPageItem`
|
|
2190
|
-
* is the navigation/menu projection of the page tree (keyword, url,
|
|
2191
|
-
* nav/footer position, parent/children) and never participates in URL
|
|
2192
|
-
* resolution, so adding a route passthrough here would be dead weight.
|
|
2248
|
+
* Menu membership is no longer projected on pages. Use `GET /navigation` for menus.
|
|
2193
2249
|
*/
|
|
2194
2250
|
|
|
2195
2251
|
interface IRawPage {
|
|
@@ -2200,18 +2256,12 @@ interface IRawPage {
|
|
|
2200
2256
|
id_parent_page?: number | null;
|
|
2201
2257
|
parent_page_id?: number | null;
|
|
2202
2258
|
is_headless?: number | boolean | null;
|
|
2203
|
-
nav_position?: number | null;
|
|
2204
|
-
navPosition?: number | null;
|
|
2205
|
-
footer_position?: number | null;
|
|
2206
|
-
footerPosition?: number | null;
|
|
2207
2259
|
is_system?: number | boolean | null;
|
|
2208
2260
|
is_open_access?: number | boolean | null;
|
|
2209
2261
|
title?: string | null;
|
|
2210
2262
|
description?: string | null;
|
|
2211
2263
|
icon?: string | null;
|
|
2212
2264
|
mobile_icon?: string | null;
|
|
2213
|
-
web_nav_render?: TWebNavRender | string | null;
|
|
2214
|
-
mobile_nav_render?: TMobileNavRender | string | null;
|
|
2215
2265
|
id_users?: number;
|
|
2216
2266
|
acl_select?: 0 | 1;
|
|
2217
2267
|
acl_insert?: 0 | 1;
|
|
@@ -2229,4 +2279,4 @@ declare function transformPageData(apiPage: IRawPage): IPageItem;
|
|
|
2229
2279
|
*/
|
|
2230
2280
|
declare function transformPagesData(pages: IRawPage[] | null | undefined): IPageItem[];
|
|
2231
2281
|
|
|
2232
|
-
export { API_VERSION_PREFIX, type AdvisoryAffected, type AdvisoryFeed, type AdvisorySeverity, type BackupManifest, type BackupRetentionPolicy, type BackupSchedulePolicy, type BundledPluginRef, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, type CheckSeverity, type CompatibilityRules, type CoreRelease,
|
|
2282
|
+
export { API_VERSION_PREFIX, type AdvisoryAffected, type AdvisoryFeed, type AdvisorySeverity, type BackupManifest, type BackupRetentionPolicy, type BackupSchedulePolicy, type BundledPluginRef, CLASS_PATTERNS, CLASS_REMAP, CLIENT_TYPE_MOBILE, CLIENT_TYPE_MOBILE_AND_WEB, CLIENT_TYPE_WEB, COLOR_NAMES, type CheckSeverity, type CompatibilityRules, type CoreRelease, DEFAULT_MOBILE_ICON, DEFAULT_WEB_HEADER_PRESET, type DatabaseMigrationMetadata, ENDPOINTS, type FrontendRelease, HEADER_CLIENT_TYPE, type IApiError, type IApiMeta, type IAssetSource, type IBaseApiResponse, type IBasePageInfo, type IBasePageSection, type IBranchNavSegment, type IClassPattern, type IClassRemap, type ICompatibilityError, type IConditionContext, IContentField, type IEvaluatedCondition, type IForgotPasswordRequest, type IForgotPasswordResponse, type IFormDeleteRequest, type IFormDeleteResponse, type IFormResultLegacyFields, type IFormSubmitData, type IFormSubmitRequest, type IFormSubmitResponse, type IFormUpdateData, type IFormUpdateRequest, type IFormUpdateResponse, type IFrontendUpdatePreflight, type IFrontendUpdatePreflightResponse, type IFrontendUpdateReleases, type IFrontendUpdateReleasesResponse, type IFrontendUpdateRequest, type IFrontendUpdateRequestResponse, type IGetPageResponse, type IGetPagesResponse, type IInlineNode, type IJwtPayload, type ILanguage, type ILanguageItem, type ILanguagePreference, type ILanguagePreferenceUpdateResponse, type ILanguagesResponse, type ILoginRequest, type ILoginSuccessData, type ILoginSuccessResponse, type ILogoutSuccessResponse, type IMaintenanceSetRequest, type IMenuSearchHit, type IMeta, type IMobileAdapterBaseProps, type IMobileButtonProps, type IMobileCardProps, type IMobileCheckboxProps, type IMobileContainerProps, type IMobileIconEntry, type IMobileInputProps, type IMobileModalProps, type IMobilePreviewExchangeData, type IMobilePreviewExchangeRequest, type IMobilePreviewExchangeResponse, type IMobilePreviewSessionData, type IMobilePreviewSessionRequest, type IMobilePreviewSessionResponse, type IMobilePreviewUpdatePreflight, type IMobilePreviewUpdatePreflightResponse, type IMobilePreviewUpdateReleases, type IMobilePreviewUpdateReleasesResponse, type IMobilePreviewUpdateRequest, type IMobilePreviewUpdateRequestResponse, type IMobileSelectOption, type IMobileSelectProps, type IMobileSwitchProps, type IMobileTextProps, type IMobileTextareaProps, type IMobileUiAdapters, type INavigationMenu, type INavigationMenuItem, type INavigationPayload, type INavigationResolvedPageRef, type INavigationSearchConfig, type INavigationStartupConfig, type IPageAccessTypeInfo, type IPageContent, type IPageField, type IPageFieldTranslation, type IPageFieldsData, type IPageItem, type IPageRoute, type IPageSectionWithFields, type IPageSectionsData, type IPreviewNavigateCommand, type IPreviewNavigatedMessage, type IPreviewPreferences, type IPreviewPreferencesChangedMessage, type IPreviewReadyMessage, type IPreviewSetPreferencesCommand, type IRefreshRequest, type IRefreshSuccessResponse, type IResetPasswordRequest, type IResetPasswordResponse, type IResolvePageResponse, type ISpacingValue, type ISystemAdvisories, type ISystemAdvisoriesResponse, type ISystemAdvisory, type ISystemAdvisoryAffected, type ISystemHealth, type ISystemHealthComponent, type ISystemHealthResponse, type ISystemInstalledPlugin, type ISystemMaintenance, type ISystemMaintenanceResponse, type ISystemVersion, type ISystemVersionResponse, type ITwoFactorRequiredData, type ITwoFactorRequiredResponse, type ITwoFactorVerifyRequest, type ITwoFactorVerifySuccessResponse, type IUpdatePreflight, type IUpdatePreflightCheck, type IUpdatePreflightOption, type IUpdatePreflightResponse, type IUpdateRelease, type IUpdateReleases, type IUpdateReleasesResponse, type IUpdateRequest, type IUpdateRequestResponse, type IUpdateStatus, type IUpdateStatusManager, type IUpdateStatusResponse, type IUpdateStep, type IUserData, type IUserDataResponse, type IWebHeaderPresetOption, type ImageRef, type InstalledPlugin, type InstanceImages, type InstanceLock, type InstanceManifest, type InstanceMode, type InstanceResourceConfig, type InstanceRouting, type InstanceStatus, type InstanceVersions, type InventoryInstanceEntry, LITERAL_CLASSES, type LockPluginEntry, type LockServiceEntry, MOBILE_ICON_NAMES, MOBILE_ICON_SET, MOBILE_PREVIEW_ENDPOINTS, type MobilePreviewRelease, PERMISSIONS, PREVIEW_BRIDGE_MESSAGE, PREVIEW_PARENT_ORIGIN_PARAM, PREVIEW_SHELL_PARAM, type PluginRelease, type PreflightCheck, type PreflightOption, type PreflightStatus, RELEASE_CHANNELS, type RegistryIndex, type RegistryReleaseRef, type ReleaseChannel, type RuntimeServicePolicy, type RuntimeServiceRange, SIZE_VALUES, SPACING_VALUES, SYSTEM_ENDPOINTS, type SchedulerRelease, type SecurityAdvisory, type ServerInventory, type ServiceBackendCompatibility, type SignatureBlock, type SupportBundleMeta, type TCalcedValues, type TClassDecision, type TClientType, THeroUiButtonVariant, THeroUiSize, TMobileButtonFeedback, TMobileFieldVariant, type TMobilePagePresentation, TMobileSelectPresentation, type TNavigationChildSource, type TNavigationMenuItemType, type TNavigationMenuKey, type TNavigationMobileStartSource, type TNavigationSearchMode, type TNavigationStartMode, type TPermission, type TPlatform, type TPreviewBridgeMessage, type TPreviewBridgeMessageType, type TPreviewColorScheme, type TPreviewFrameSource, TStyleName, type TSystemAdvisorySeverity, type TSystemComponentStatus, type TSystemDeployment, type TSystemHealthOverall, type TUpdateCheckSeverity, type TUpdateKind, type TUpdateOperationStatus, type TUpdatePreflightStatus, type TWebHeaderPreset, type TrustLevel, type TrustedKey, type TrustedKeysFile, type UpdatePreflightResult, WEB_HEADER_PRESET_OPTIONS, WEB_HEADER_PRESET_VALUES, type WorkerRelease, arePreviewPreferencesEqual, buildConditionContext, classifyClass, classifyClassString, collectPageIdsFromMenuItems, evaluateCondition, findMenuItemByPageId, findRemap, flattenMenuItems, flattenNavigationMenuItems, getNavigationItemHref, getNavigationItemKeyword, getNavigationItemLabel, hasInlineFormatting, isMobileIconName, isOnAnyMobileMenu, isOnAnyMobileMenuFromPayload, isPageInMenuTree, isPageInResolvedMenus, isPageOnAnyMenu, isPageOnMobileMenu, isPageOnWebMenu, isPreviewBridgeMessage, isWebHeaderPreset, pageUrlToMobileRoute, parseInlineRich, parseSpacing, previewKeywordFromPath, replaceCalcedValues, resolveAssetSources, resolveAssetUrl, resolveBranchNavGroup, resolveHolderRedirectPath, resolveMobileIcon, resolveMobilePagePresentation, resolveMobileSegmentGroup, resolveMobileStartupKeyword, resolveMobileStartupRoute, resolveWebBranchNavGroup, resolveWebHeaderPreset, resolveWebStartupPath, searchMenuPagesInPayload, spacingToClasses, stripHtmlToText, transformPageData, transformPagesData };
|