atriusmaps-node-sdk 3.3.1055 → 3.3.1057
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/cjs/nodesdk/nodeEntry.js +17 -12
- package/dist/cjs/package.json.js +1 -1
- package/dist/cjs/plugins/poiDataManager/src/poiDataManager.js +1 -1
- package/dist/cjs/src/app.js +1 -1
- package/dist/nodesdk/nodeEntry.js +1 -1
- package/dist/package.json.js +1 -1
- package/dist/plugins/poiDataManager/src/poiDataManager.js +1 -1
- package/dist/src/app.js +1 -1
- package/dist/types/nodesdk/nodeEntry.d.ts +12 -0
- package/dist/types/nodesdk/nodeEntryCjs.d.cts +10 -0
- package/dist/types/plugins/monitoring/src/index.d.ts +1 -0
- package/dist/types/plugins/monitoring/src/monitoring.d.ts +34 -0
- package/dist/types/plugins/online/homeView/constants.d.ts +9 -0
- package/dist/types/plugins/sdkServer/src/prepareSDKConfig.d.ts +3 -0
- package/dist/types/plugins/sdkServer/src/publicTypes.d.ts +71 -0
- package/dist/types/plugins/sdkServer/src/types.d.ts +70 -0
- package/dist/types/plugins/wayfinder/src/navGraphDebug.d.ts +37 -0
- package/dist/types/src/LoadingIndicator.d.ts +11 -0
- package/dist/types/src/SystemErrorBoundary.d.ts +18 -0
- package/dist/types/src/app.d.ts +62 -0
- package/dist/types/src/configs/postproc-mol-url-parms.d.ts +3 -0
- package/dist/types/src/configs/postproc-stateTracking.d.ts +10 -0
- package/dist/types/src/controller.d.ts +13 -0
- package/dist/types/src/debugTools.d.ts +27 -0
- package/dist/types/src/env.d.ts +9 -0
- package/dist/types/src/extModules/bustle.d.ts +31 -0
- package/dist/types/src/extModules/log.d.ts +30 -0
- package/dist/types/src/historyManager.d.ts +4 -0
- package/dist/types/src/hooks/useCSSColors.d.ts +14 -0
- package/dist/types/src/layerManager.d.ts +3 -0
- package/dist/types/src/layouts/SpeedDial.d.ts +14 -0
- package/dist/types/src/layouts/fullscreenOnlyLayout.d.ts +10 -0
- package/dist/types/src/layouts/mapOnlyLayout.d.ts +2 -0
- package/dist/types/src/layouts/modEditorLayout.d.ts +2 -0
- package/dist/types/src/layouts/modLayout.d.ts +2 -0
- package/dist/types/src/layouts/searchDirectoryLayout.d.ts +2 -0
- package/dist/types/src/layouts/standardLayout.d.ts +2 -0
- package/dist/types/src/main.d.ts +2 -0
- package/dist/types/src/theme.d.ts +6 -0
- package/dist/types/src/themeManager.d.ts +29 -0
- package/dist/types/src/types/bus.d.ts +380 -0
- package/dist/types/src/types/layout.d.ts +56 -0
- package/dist/types/src/types/plugin-runtime.d.ts +91 -0
- package/dist/types/src/types/theme.d.ts +58 -0
- package/dist/types/src/ui/buttons/Button.d.ts +42 -0
- package/dist/types/src/ui/buttons/FloatingActionButton.d.ts +9 -0
- package/dist/types/src/ui/icons/Icon.d.ts +8 -0
- package/dist/types/src/ui/icons/iconRegistry.d.ts +53 -0
- package/dist/types/src/ui/icons/types.d.ts +47 -0
- package/dist/types/src/ui/icons/utils.d.ts +109 -0
- package/dist/types/src/ui/tageditorStyle.d.ts +2 -0
- package/dist/types/src/ui/tooltip/Tooltip.d.ts +16 -0
- package/dist/types/src/ui/tooltip/TooltipAnchor.d.ts +8 -0
- package/dist/types/src/ui/tooltip/index.d.ts +3 -0
- package/dist/types/src/utils/configUtils.d.ts +34 -0
- package/dist/types/src/utils/dom.d.ts +10 -0
- package/dist/types/src/utils/funcs.d.ts +36 -0
- package/dist/types/src/utils/i18n.d.ts +3 -0
- package/dist/types/src/utils/isInitialState.d.ts +6 -0
- package/dist/types/src/utils/mapElement.d.ts +54 -0
- package/dist/types/src/utils/modDefaultTheme.d.ts +164 -0
- package/dist/types/src/utils/molDesktopDefaultTheme.d.ts +156 -0
- package/dist/types/src/utils/observable.d.ts +17 -0
- package/dist/types/src/utils/stateObj.d.ts +31 -0
- package/dist/types/utils/constants.d.ts +31 -0
- package/dist/types/utils/findByLayoutId.d.ts +4 -0
- package/package.json +12 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to access theme colors for JavaScript usage.
|
|
3
|
+
* Useful for components that need color values in props (SVG fillColor, canvas operations, etc.)
|
|
4
|
+
*
|
|
5
|
+
* During the CSS variables migration, this provides a stable API for accessing colors
|
|
6
|
+
* while we transition from styled-components theme to CSS custom properties.
|
|
7
|
+
*
|
|
8
|
+
* @returns {Object} Color values as hex strings
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const colors = useCSSColors();
|
|
12
|
+
* <ColoredIcon fillColor={colors.primary} />
|
|
13
|
+
*/
|
|
14
|
+
export declare function useCSSColors(): any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LayoutApp, LayoutUiHide } from '@typings/layout.ts';
|
|
3
|
+
type SpeedDialProps = {
|
|
4
|
+
app: LayoutApp;
|
|
5
|
+
buttonOptions: React.ReactNode[];
|
|
6
|
+
feedbackZone?: React.ReactNode;
|
|
7
|
+
filteredMapControls: React.ReactNode[];
|
|
8
|
+
isMapVisible: boolean;
|
|
9
|
+
isMobileReflow: boolean;
|
|
10
|
+
mapPanControlMobile?: React.ReactElement | null;
|
|
11
|
+
uiHide: LayoutUiHide;
|
|
12
|
+
};
|
|
13
|
+
declare const SpeedDial: ({ app, isMapVisible, uiHide, isMobileReflow, filteredMapControls, buttonOptions, mapPanControlMobile, }: SpeedDialProps) => false | import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default SpeedDial;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FullscreenLayoutProps } from '@typings/layout.ts';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@typings/layout.ts").BaseLayoutProps & {
|
|
4
|
+
Loading: React.ComponentType<import("@typings/layout.ts").LoadingComponentProps>;
|
|
5
|
+
mapLoaded: boolean;
|
|
6
|
+
} & {
|
|
7
|
+
theme?: unknown;
|
|
8
|
+
uiHide: import("@typings/layout.ts").LayoutUiHide;
|
|
9
|
+
}, keyof import("styled-components").ExecutionProps> & import("styled-components").ExecutionProps & React.RefAttributes<any>> & import("styled-components/dist/utils/hoist").NonReactStatics<({ app, children, uiHide, Loading, mapLoaded }: FullscreenLayoutProps) => import("react/jsx-runtime").JSX.Element>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ResolvedTheme, ThemeDef } from '@typings/theme.ts';
|
|
2
|
+
import '@fontsource/roboto/400.css';
|
|
3
|
+
import '@fontsource/roboto/500.css';
|
|
4
|
+
import '@fontsource/roboto/700.css';
|
|
5
|
+
declare const getTheme: (customTheme: ThemeDef, defaultThemeName?: string) => ResolvedTheme;
|
|
6
|
+
export { getTheme };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ResolvedTheme, ThemeDef } from '@typings/theme.ts';
|
|
2
|
+
import { StateObjMultiple } from '@utils/stateObj.ts';
|
|
3
|
+
/** Minimal app shape needed by themeManager */
|
|
4
|
+
interface ThemeManagerApp {
|
|
5
|
+
bus: {
|
|
6
|
+
on(event: string, handler: (payload: any) => unknown): () => void;
|
|
7
|
+
get(event: string, payload?: unknown): Promise<unknown>;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
type ThemeManagerState = {
|
|
11
|
+
theme: ResolvedTheme;
|
|
12
|
+
contentURL: string | null;
|
|
13
|
+
};
|
|
14
|
+
declare const initThemeManager: (app: ThemeManagerApp) => {
|
|
15
|
+
buildTheme: (themeDef: ThemeDef, defaultTheme?: string) => {
|
|
16
|
+
getTheme: () => ResolvedTheme;
|
|
17
|
+
GlobalStyle: import("react").NamedExoticComponent<import("styled-components").ExecutionProps & object>;
|
|
18
|
+
Loading: ({ children, hasLoaded, message, ...rest }: import("react").HTMLAttributes<HTMLDivElement> & {
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
hasLoaded?: boolean;
|
|
21
|
+
message?: string;
|
|
22
|
+
size?: "lg" | "sm" | "xxsm";
|
|
23
|
+
spinnerColor?: string;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
updateTheme: (themeDef: ThemeDef, defaultTheme?: string) => void;
|
|
26
|
+
getThemeState: () => StateObjMultiple<ThemeManagerState>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export { initThemeManager };
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type EventName = string;
|
|
3
|
+
export type BusPayload = Record<string, unknown>;
|
|
4
|
+
export type Unsubscribe = () => void;
|
|
5
|
+
export type BusEventDefinition<TPayload = undefined, TResult = unknown> = {
|
|
6
|
+
payload: TPayload;
|
|
7
|
+
result: TResult;
|
|
8
|
+
};
|
|
9
|
+
export type Id = string | number;
|
|
10
|
+
export type BusMapView = {
|
|
11
|
+
lat: number;
|
|
12
|
+
lng: number;
|
|
13
|
+
zoom: number;
|
|
14
|
+
bearing: number;
|
|
15
|
+
pitch: number;
|
|
16
|
+
};
|
|
17
|
+
export type BusMapCenter = {
|
|
18
|
+
lat: number;
|
|
19
|
+
lng: number;
|
|
20
|
+
ordinal: number | null;
|
|
21
|
+
floorId?: Id | null;
|
|
22
|
+
structureId?: Id | null;
|
|
23
|
+
};
|
|
24
|
+
export type BusBBox = [west: number, south: number, east: number, north: number];
|
|
25
|
+
export type BusStructure = Record<string, unknown> & {
|
|
26
|
+
id?: Id;
|
|
27
|
+
levels?: Record<string, unknown> | unknown[];
|
|
28
|
+
};
|
|
29
|
+
export type BusVenueData = Record<string, unknown> & {
|
|
30
|
+
id?: string;
|
|
31
|
+
structures?: BusStructure[];
|
|
32
|
+
};
|
|
33
|
+
export type BusPoi = Record<string, unknown> & {
|
|
34
|
+
poiId?: Id;
|
|
35
|
+
id?: Id;
|
|
36
|
+
name?: string;
|
|
37
|
+
category?: string;
|
|
38
|
+
position?: Record<string, unknown>;
|
|
39
|
+
};
|
|
40
|
+
export type BusPoiMap = Record<string, BusPoi>;
|
|
41
|
+
/** Locale-independent open/closed state. Mirrors PoiOpenStatus in utils/constants.ts. */
|
|
42
|
+
export type BusPoiOpenStatusValue = 'open' | 'closed' | 'opening-soon' | 'closing-soon';
|
|
43
|
+
/**
|
|
44
|
+
* Resolved open/closed state for a POI at a point in time, as returned by `poi/getOpenStatus`.
|
|
45
|
+
* `timeLabel` is already translated and is for display only - never match substrings against it.
|
|
46
|
+
*/
|
|
47
|
+
export type BusPoiOpenStatus = {
|
|
48
|
+
isOpen: boolean;
|
|
49
|
+
status: BusPoiOpenStatusValue;
|
|
50
|
+
timeLabel?: string;
|
|
51
|
+
};
|
|
52
|
+
export type BusNavigationEndpoint = Record<string, unknown> & {
|
|
53
|
+
lat?: number;
|
|
54
|
+
lng?: number;
|
|
55
|
+
floorId?: Id | null;
|
|
56
|
+
ordinal?: number | null;
|
|
57
|
+
structureId?: Id | null;
|
|
58
|
+
title?: string;
|
|
59
|
+
};
|
|
60
|
+
export type BusRoute = Record<string, unknown> | null | undefined;
|
|
61
|
+
export type BusRouteStep = Record<string, unknown> & {
|
|
62
|
+
distance?: number;
|
|
63
|
+
time?: number;
|
|
64
|
+
primaryText?: string;
|
|
65
|
+
secondaryText?: string;
|
|
66
|
+
poiId?: Id;
|
|
67
|
+
icon?: string;
|
|
68
|
+
};
|
|
69
|
+
export type BusRouteWaypoint = Record<string, unknown> & {
|
|
70
|
+
distance?: number;
|
|
71
|
+
eta?: number;
|
|
72
|
+
levelDifference?: number;
|
|
73
|
+
position?: BusNavigationEndpoint;
|
|
74
|
+
};
|
|
75
|
+
export type BusRouteSummary = {
|
|
76
|
+
distance: number;
|
|
77
|
+
time: number;
|
|
78
|
+
steps: BusRouteStep[];
|
|
79
|
+
navline?: unknown[];
|
|
80
|
+
waypoints?: BusRouteWaypoint[];
|
|
81
|
+
};
|
|
82
|
+
export type BusDirectionsPayload = {
|
|
83
|
+
from: BusNavigationEndpoint;
|
|
84
|
+
to: BusNavigationEndpoint;
|
|
85
|
+
accessible?: boolean;
|
|
86
|
+
queueTypes?: string[];
|
|
87
|
+
};
|
|
88
|
+
export type BusDirectionsMultiplePayload = {
|
|
89
|
+
locations: BusNavigationEndpoint[];
|
|
90
|
+
accessible?: boolean;
|
|
91
|
+
queueTypes?: string[];
|
|
92
|
+
};
|
|
93
|
+
export type BusDirectionsMultipleResult = {
|
|
94
|
+
total: {
|
|
95
|
+
distance: number;
|
|
96
|
+
time: number;
|
|
97
|
+
};
|
|
98
|
+
directions: BusRouteSummary[];
|
|
99
|
+
};
|
|
100
|
+
export type BusFlightStatusResult = {
|
|
101
|
+
flights: unknown[];
|
|
102
|
+
apiError: boolean;
|
|
103
|
+
};
|
|
104
|
+
export type BusSearchEventPayload = {
|
|
105
|
+
referrer?: string;
|
|
106
|
+
searchMethod?: string | null;
|
|
107
|
+
query: string;
|
|
108
|
+
entities: Id[];
|
|
109
|
+
};
|
|
110
|
+
export type BusLayerRegistration = Record<string, unknown> & {
|
|
111
|
+
id: string;
|
|
112
|
+
widget: React.ComponentType<Record<string, unknown>>;
|
|
113
|
+
layoutId: string;
|
|
114
|
+
isOverlay?: boolean;
|
|
115
|
+
layoutName?: string;
|
|
116
|
+
order?: number | null;
|
|
117
|
+
shouldShow?: (currentlyShowing: string[]) => boolean;
|
|
118
|
+
show?: boolean;
|
|
119
|
+
widgetType?: string;
|
|
120
|
+
};
|
|
121
|
+
export type BusLayerIdPayload = {
|
|
122
|
+
id: string;
|
|
123
|
+
};
|
|
124
|
+
export type BusResizePayload = {
|
|
125
|
+
isMobile: boolean;
|
|
126
|
+
isMobileReflow: boolean;
|
|
127
|
+
isVeryNarrow: boolean;
|
|
128
|
+
};
|
|
129
|
+
export type BusToastPayload = Record<string, unknown> & {
|
|
130
|
+
message: string;
|
|
131
|
+
variant?: 'success' | 'warning' | 'info' | string;
|
|
132
|
+
};
|
|
133
|
+
export type BusMapViewPayload = {
|
|
134
|
+
lat: number;
|
|
135
|
+
lng: number;
|
|
136
|
+
bearing: number;
|
|
137
|
+
pitch: number;
|
|
138
|
+
zoom: number;
|
|
139
|
+
};
|
|
140
|
+
export type BusMapMovePayload = BusMapViewPayload & {
|
|
141
|
+
mapAction?: string;
|
|
142
|
+
};
|
|
143
|
+
export type BusFloorChangedPayload = Record<string, unknown> & {
|
|
144
|
+
structure?: Record<string, unknown>;
|
|
145
|
+
floor?: Record<string, unknown>;
|
|
146
|
+
structureId?: Id;
|
|
147
|
+
floorId?: Id;
|
|
148
|
+
};
|
|
149
|
+
export type BusVenueCenter = {
|
|
150
|
+
lat: number;
|
|
151
|
+
lng: number;
|
|
152
|
+
ordinal: number;
|
|
153
|
+
};
|
|
154
|
+
export type BusFloorIdNameResult = Record<string, unknown> & {
|
|
155
|
+
structureId?: Id;
|
|
156
|
+
structureName?: string;
|
|
157
|
+
floorName?: string;
|
|
158
|
+
};
|
|
159
|
+
export type BusPoiDynamicDataPayload = {
|
|
160
|
+
plugin: string;
|
|
161
|
+
idValuesMap: Record<string, unknown>;
|
|
162
|
+
};
|
|
163
|
+
export interface BusEventMap {
|
|
164
|
+
'venueData/getVenueData': BusEventDefinition<undefined, BusVenueData>;
|
|
165
|
+
'venueData/getVenueId': BusEventDefinition<undefined, string>;
|
|
166
|
+
'venueData/getStructures': BusEventDefinition<undefined, BusStructure[]>;
|
|
167
|
+
'map/getCurrentOrdinal': BusEventDefinition<undefined, number | null>;
|
|
168
|
+
'map/getCurrentView': BusEventDefinition<undefined, BusMapView>;
|
|
169
|
+
'map/getMapCenter': BusEventDefinition<undefined, BusMapCenter>;
|
|
170
|
+
'map/getViewBBox': BusEventDefinition<undefined, BusBBox>;
|
|
171
|
+
'poi/getById': BusEventDefinition<{
|
|
172
|
+
id: Id;
|
|
173
|
+
}, BusPoi | undefined>;
|
|
174
|
+
'poi/getAll': BusEventDefinition<undefined, BusPoiMap>;
|
|
175
|
+
'search/queryAsync': BusEventDefinition<{
|
|
176
|
+
term: string;
|
|
177
|
+
}, BusPoi[]>;
|
|
178
|
+
'wayfinder/getRoute': BusEventDefinition<{
|
|
179
|
+
fromEndpoint: BusNavigationEndpoint;
|
|
180
|
+
toEndpoint: BusNavigationEndpoint;
|
|
181
|
+
options?: Record<string, unknown>;
|
|
182
|
+
}, BusRoute>;
|
|
183
|
+
'wayfinder/getNavigationEndpoint': BusEventDefinition<{
|
|
184
|
+
ep: Id | BusNavigationEndpoint;
|
|
185
|
+
}, BusNavigationEndpoint>;
|
|
186
|
+
'dynamicPois/getSecurityWaitTimes': BusEventDefinition<{
|
|
187
|
+
isOpen?: boolean;
|
|
188
|
+
} | undefined, unknown>;
|
|
189
|
+
'flightStatus/query': BusEventDefinition<{
|
|
190
|
+
term?: string | null;
|
|
191
|
+
type?: string;
|
|
192
|
+
}, BusFlightStatusResult>;
|
|
193
|
+
'event/search': BusEventDefinition<BusSearchEventPayload, unknown>;
|
|
194
|
+
'clientAPI/getDirections': BusEventDefinition<BusDirectionsPayload, BusRouteSummary>;
|
|
195
|
+
'clientAPI/getDirectionsMultiple': BusEventDefinition<BusDirectionsMultiplePayload, BusDirectionsMultipleResult>;
|
|
196
|
+
'clientAPI/getPOIDetails': BusEventDefinition<{
|
|
197
|
+
poiId: number;
|
|
198
|
+
}, BusPoi | undefined>;
|
|
199
|
+
'clientAPI/getAllPOIs': BusEventDefinition<undefined, BusPoiMap>;
|
|
200
|
+
'clientAPI/getStructures': BusEventDefinition<undefined, BusStructure[] | undefined>;
|
|
201
|
+
'clientAPI/getVenueData': BusEventDefinition<undefined, Record<string, unknown>>;
|
|
202
|
+
'clientAPI/search': BusEventDefinition<{
|
|
203
|
+
term: string;
|
|
204
|
+
details?: boolean;
|
|
205
|
+
}, BusPoi[] | Array<Id | undefined>>;
|
|
206
|
+
'clientAPI/getSecurityWaitTimes': BusEventDefinition<{
|
|
207
|
+
isOpen?: boolean;
|
|
208
|
+
}, unknown>;
|
|
209
|
+
'clientAPI/getFlightStatus': BusEventDefinition<{
|
|
210
|
+
term?: string;
|
|
211
|
+
type?: string;
|
|
212
|
+
}, BusFlightStatusResult>;
|
|
213
|
+
'layers/register': BusEventDefinition<BusLayerRegistration, unknown>;
|
|
214
|
+
'layers/show': BusEventDefinition<BusLayerIdPayload, unknown>;
|
|
215
|
+
'layers/hide': BusEventDefinition<BusLayerIdPayload, unknown>;
|
|
216
|
+
'layers/hideMultiple': BusEventDefinition<string[], unknown>;
|
|
217
|
+
'layers/getVisibleLayersIds': BusEventDefinition<undefined, string[]>;
|
|
218
|
+
'layers/getVisibleLayersByLayoutId': BusEventDefinition<string, string[]>;
|
|
219
|
+
'layers/getPreviousLayer': BusEventDefinition<undefined, string>;
|
|
220
|
+
'layers/setPreviousLayer': BusEventDefinition<string, unknown>;
|
|
221
|
+
'layers/showWithLayoutId': BusEventDefinition<string, unknown>;
|
|
222
|
+
'layers/hideWithLayoutId': BusEventDefinition<string, unknown>;
|
|
223
|
+
'screen/displayHeader': BusEventDefinition<{
|
|
224
|
+
display?: boolean;
|
|
225
|
+
}, unknown>;
|
|
226
|
+
'env/resize': BusEventDefinition<BusResizePayload, unknown>;
|
|
227
|
+
'toast/show': BusEventDefinition<BusToastPayload, unknown>;
|
|
228
|
+
'venueData/getVenueCenter': BusEventDefinition<undefined, BusVenueCenter>;
|
|
229
|
+
'venueData/getVenueName': BusEventDefinition<undefined, string>;
|
|
230
|
+
'venueData/getVenueTimezone': BusEventDefinition<undefined, string>;
|
|
231
|
+
'venueData/getVenueCategory': BusEventDefinition<undefined, string>;
|
|
232
|
+
'venueData/getAccountId': BusEventDefinition<undefined, string>;
|
|
233
|
+
'venueData/getContentUrl': BusEventDefinition<{
|
|
234
|
+
type: string;
|
|
235
|
+
name?: string;
|
|
236
|
+
}, string>;
|
|
237
|
+
'venueData/getFloorIdName': BusEventDefinition<{
|
|
238
|
+
floorId: string;
|
|
239
|
+
}, BusFloorIdNameResult | null>;
|
|
240
|
+
'venueData/getFloorIdToNameMap': BusEventDefinition<undefined, Record<string, string>>;
|
|
241
|
+
'venueData/getQueueTypes': BusEventDefinition<undefined, Record<string, unknown>>;
|
|
242
|
+
'venueData/getPoiImageUrl': BusEventDefinition<{
|
|
243
|
+
imageName: string;
|
|
244
|
+
size: string;
|
|
245
|
+
}, string>;
|
|
246
|
+
'venueData/getDistributionId': BusEventDefinition<undefined, string>;
|
|
247
|
+
'venueData/getGrabPoiIds': BusEventDefinition<undefined, string[]>;
|
|
248
|
+
'venueData/isGrabEnabled': BusEventDefinition<undefined, boolean>;
|
|
249
|
+
'venueData/getTranslatedFloorId': BusEventDefinition<{
|
|
250
|
+
floorId: string;
|
|
251
|
+
}, string>;
|
|
252
|
+
'venueData/getAssetsTimestamp': BusEventDefinition<undefined, string>;
|
|
253
|
+
'venueData/getCustomKeywords': BusEventDefinition<undefined, unknown[]>;
|
|
254
|
+
'venueData/getPositioningSupported': BusEventDefinition<undefined, string[] | undefined>;
|
|
255
|
+
'venueData/loadPoiData': BusEventDefinition<undefined, unknown>;
|
|
256
|
+
'venueData/loadNewVenue': BusEventDefinition<{
|
|
257
|
+
venueId: string;
|
|
258
|
+
accountId: string;
|
|
259
|
+
assetStage?: string;
|
|
260
|
+
}, unknown>;
|
|
261
|
+
'venueData/loadNavGraph': BusEventDefinition<undefined, unknown>;
|
|
262
|
+
'map/getFloorAt': BusEventDefinition<{
|
|
263
|
+
lat: number;
|
|
264
|
+
lng: number;
|
|
265
|
+
ordinal?: number | null;
|
|
266
|
+
}, Record<string, unknown>>;
|
|
267
|
+
'map/getPadding': BusEventDefinition<undefined, Record<string, unknown>>;
|
|
268
|
+
'map/animateToView': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
269
|
+
'map/animateToPoint': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
270
|
+
'map/animateToPointWithRadius': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
271
|
+
'map/centerInBounds': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
272
|
+
'map/changeFloor': BusEventDefinition<{
|
|
273
|
+
id: Id;
|
|
274
|
+
}, unknown>;
|
|
275
|
+
'map/changeOrdinal': BusEventDefinition<{
|
|
276
|
+
ordinal: number;
|
|
277
|
+
}, unknown>;
|
|
278
|
+
'map/changePadding': BusEventDefinition<{
|
|
279
|
+
padding: unknown;
|
|
280
|
+
}, unknown>;
|
|
281
|
+
'map/disableMap': BusEventDefinition<{
|
|
282
|
+
disable: boolean;
|
|
283
|
+
}, unknown>;
|
|
284
|
+
'map/setBearing': BusEventDefinition<{
|
|
285
|
+
bearing: number;
|
|
286
|
+
}, unknown>;
|
|
287
|
+
'map/setPitch': BusEventDefinition<{
|
|
288
|
+
pitch: number;
|
|
289
|
+
}, unknown>;
|
|
290
|
+
'map/setDefaultView': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
291
|
+
'map/showDefaultView': BusEventDefinition<undefined, unknown>;
|
|
292
|
+
'map/selectFloor': BusEventDefinition<{
|
|
293
|
+
id: Id;
|
|
294
|
+
}, unknown>;
|
|
295
|
+
'map/selectEntities': BusEventDefinition<{
|
|
296
|
+
ids: (string | number)[];
|
|
297
|
+
}, unknown>;
|
|
298
|
+
'map/moveEnd': BusEventDefinition<BusMapMovePayload, unknown>;
|
|
299
|
+
'map/userMoveStart': BusEventDefinition<BusMapViewPayload, unknown>;
|
|
300
|
+
'map/userMoving': BusEventDefinition<BusMapViewPayload, unknown>;
|
|
301
|
+
'map/zoomIn': BusEventDefinition<undefined, unknown>;
|
|
302
|
+
'map/zoomOut': BusEventDefinition<undefined, unknown>;
|
|
303
|
+
'map/zoomTo': BusEventDefinition<{
|
|
304
|
+
value: number;
|
|
305
|
+
}, unknown>;
|
|
306
|
+
'map/zoomBy': BusEventDefinition<{
|
|
307
|
+
value: number;
|
|
308
|
+
}, unknown>;
|
|
309
|
+
'map/resize': BusEventDefinition<undefined, unknown>;
|
|
310
|
+
'map/floorChanged': BusEventDefinition<BusFloorChangedPayload, unknown>;
|
|
311
|
+
'map/blur': BusEventDefinition<{
|
|
312
|
+
px: number;
|
|
313
|
+
}, unknown>;
|
|
314
|
+
'map/cleanMap': BusEventDefinition<undefined, unknown>;
|
|
315
|
+
'map/resetBearing': BusEventDefinition<undefined, unknown>;
|
|
316
|
+
'map/toggleDarkMode': BusEventDefinition<undefined, unknown>;
|
|
317
|
+
'map/poiClicked': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
318
|
+
'map/addMarker': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
319
|
+
'map/removeAllMarkers': BusEventDefinition<undefined, unknown>;
|
|
320
|
+
'map/hideMapBadges': BusEventDefinition<{
|
|
321
|
+
ids: string[];
|
|
322
|
+
}, unknown>;
|
|
323
|
+
'map/addGhostedMarker': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
324
|
+
'map/removeMarker': BusEventDefinition<{
|
|
325
|
+
id: string;
|
|
326
|
+
}, unknown>;
|
|
327
|
+
'map/resetNavlineFeatures': BusEventDefinition<undefined, unknown>;
|
|
328
|
+
'map/showNavlineFeatures': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
329
|
+
'map/showNavGraphFeatures': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
330
|
+
'map/resetNavGraphFeatures': BusEventDefinition<undefined, unknown>;
|
|
331
|
+
'map/mapReadyToShow': BusEventDefinition<undefined, unknown>;
|
|
332
|
+
'map/visualTest': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
333
|
+
'poi/getByCategoryId': BusEventDefinition<{
|
|
334
|
+
categoryId: string;
|
|
335
|
+
}, BusPoi[]>;
|
|
336
|
+
'poi/getByFloorId': BusEventDefinition<{
|
|
337
|
+
floorId: string;
|
|
338
|
+
}, BusPoi[]>;
|
|
339
|
+
'poi/getAllCategories': BusEventDefinition<undefined, string[]>;
|
|
340
|
+
'poi/getOpenStatus': BusEventDefinition<{
|
|
341
|
+
id: Id;
|
|
342
|
+
now?: Date;
|
|
343
|
+
}, BusPoiOpenStatus | undefined>;
|
|
344
|
+
'poi/setDynamicData': BusEventDefinition<BusPoiDynamicDataPayload, unknown>;
|
|
345
|
+
'poi/setCoreAttributes': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
346
|
+
'poi/addOtherSecurityLanes': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
347
|
+
'wayfinder/checkIfPathHasSecurity': BusEventDefinition<Record<string, unknown>, unknown>;
|
|
348
|
+
'wayfinder/_getNavGraph': BusEventDefinition<undefined, unknown>;
|
|
349
|
+
'wayfinder/addPathTimeMultiple': BusEventDefinition<Record<string, unknown>, BusPoi[]>;
|
|
350
|
+
'wayfinder/getNavGraphFeatures': BusEventDefinition<undefined, unknown>;
|
|
351
|
+
'app/reset': BusEventDefinition<undefined, unknown>;
|
|
352
|
+
'app/unmount': BusEventDefinition<undefined, unknown>;
|
|
353
|
+
'user/getPhysicalLocation': BusEventDefinition<undefined, Record<string, unknown> | undefined>;
|
|
354
|
+
'search/queryNearbyAsync': BusEventDefinition<undefined, BusPoi[]>;
|
|
355
|
+
'search/getDefaultSearchPois': BusEventDefinition<{
|
|
356
|
+
limit?: number;
|
|
357
|
+
}, BusPoi[]>;
|
|
358
|
+
}
|
|
359
|
+
export type KnownBusEventName = Extract<keyof BusEventMap, string>;
|
|
360
|
+
export type BusEventPayload<TEvent extends KnownBusEventName> = BusEventMap[TEvent] extends BusEventDefinition<infer TPayload, unknown> ? TPayload : undefined;
|
|
361
|
+
export type BusEventResult<TEvent extends KnownBusEventName> = BusEventMap[TEvent] extends BusEventDefinition<unknown, infer TResult> ? TResult : unknown;
|
|
362
|
+
export type BusPayloadArgs<TPayload> = undefined extends TPayload ? [payload?: TPayload] : [payload: TPayload];
|
|
363
|
+
export type BusListener<TPayload = unknown, TResult = unknown> = (payload: TPayload) => TResult | Promise<TResult>;
|
|
364
|
+
export type BusMonitor<TPayload = unknown, TResult = unknown> = (payload: TPayload, results: Promise<TResult[]>) => void;
|
|
365
|
+
export interface MessageBus {
|
|
366
|
+
on<TEvent extends KnownBusEventName>(event: TEvent, handler: BusListener<BusEventPayload<TEvent>, BusEventResult<TEvent>>): Unsubscribe;
|
|
367
|
+
on<TPayload = unknown, TResult = unknown>(event: string, handler: BusListener<TPayload, TResult>): Unsubscribe;
|
|
368
|
+
monitor<TEvent extends KnownBusEventName>(event: TEvent, handler: BusMonitor<BusEventPayload<TEvent>, BusEventResult<TEvent>>): Unsubscribe;
|
|
369
|
+
monitor<TPayload = unknown, TResult = unknown>(event: string, handler: BusMonitor<TPayload, TResult>): Unsubscribe;
|
|
370
|
+
off<TEvent extends KnownBusEventName>(event: TEvent, handler: BusListener<BusEventPayload<TEvent>, BusEventResult<TEvent>>): void;
|
|
371
|
+
off<TPayload = unknown, TResult = unknown>(event: string, handler: BusListener<TPayload, TResult>): void;
|
|
372
|
+
moff<TEvent extends KnownBusEventName>(event: TEvent, handler: BusMonitor<BusEventPayload<TEvent>, BusEventResult<TEvent>>): void;
|
|
373
|
+
moff<TPayload = unknown, TResult = unknown>(event: string, handler: BusMonitor<TPayload, TResult>): void;
|
|
374
|
+
send<TEvent extends KnownBusEventName>(event: TEvent, ...payload: BusPayloadArgs<BusEventPayload<TEvent>>): Promise<BusEventResult<TEvent>[]>;
|
|
375
|
+
send<TPayload = undefined, TResult = unknown>(event: string, payload?: TPayload): Promise<TResult[]>;
|
|
376
|
+
get<TEvent extends KnownBusEventName>(event: TEvent, ...payload: BusPayloadArgs<BusEventPayload<TEvent>>): Promise<BusEventResult<TEvent>>;
|
|
377
|
+
get<TPayload = undefined, TResult = unknown>(event: string, payload?: TPayload): Promise<TResult>;
|
|
378
|
+
getFirst<TEvent extends KnownBusEventName>(event: TEvent, ...payload: BusPayloadArgs<BusEventPayload<TEvent>>): Promise<BusEventResult<TEvent> | undefined>;
|
|
379
|
+
getFirst<TPayload = undefined, TResult = unknown>(event: string, payload?: TPayload): Promise<TResult | undefined>;
|
|
380
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { Logger } from '../extModules/log.ts';
|
|
4
|
+
import type { MessageBus } from './bus.ts';
|
|
5
|
+
export type LayoutTranslationFn = TFunction;
|
|
6
|
+
export type LayoutUiHide = {
|
|
7
|
+
controls?: boolean;
|
|
8
|
+
levelSelector?: boolean;
|
|
9
|
+
mobileSearchBar?: boolean;
|
|
10
|
+
sidebar?: boolean;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export type LayoutEnv = {
|
|
14
|
+
isBrowser?: boolean;
|
|
15
|
+
supportsTouch?: boolean;
|
|
16
|
+
isDesktop: () => boolean;
|
|
17
|
+
isLocalhost?: () => boolean;
|
|
18
|
+
isMobile: () => boolean;
|
|
19
|
+
isMobileReflow: () => boolean;
|
|
20
|
+
isVeryNarrow?: () => boolean;
|
|
21
|
+
};
|
|
22
|
+
export type LayoutApp = {
|
|
23
|
+
bus: MessageBus;
|
|
24
|
+
log: Logger;
|
|
25
|
+
env: LayoutEnv;
|
|
26
|
+
gt: () => LayoutTranslationFn;
|
|
27
|
+
config?: {
|
|
28
|
+
desktopViewMinWidth?: number;
|
|
29
|
+
uiHide?: LayoutUiHide;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
export type LoadingComponentProps = {
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
hasLoaded: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type BaseLayoutProps = {
|
|
39
|
+
app: LayoutApp;
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
};
|
|
42
|
+
export type LoadingLayoutProps = BaseLayoutProps & {
|
|
43
|
+
Loading: React.ComponentType<LoadingComponentProps>;
|
|
44
|
+
mapLoaded: boolean;
|
|
45
|
+
};
|
|
46
|
+
export type FullscreenLayoutProps = LoadingLayoutProps & {
|
|
47
|
+
theme?: unknown;
|
|
48
|
+
uiHide: LayoutUiHide;
|
|
49
|
+
};
|
|
50
|
+
export type LayoutWidgetElement = React.ReactElement<{
|
|
51
|
+
layoutId?: string;
|
|
52
|
+
widgetType?: string;
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
}> & {
|
|
55
|
+
key: React.Key | null;
|
|
56
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { TFunction } from 'i18next';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { Logger } from '../extModules/log.ts';
|
|
4
|
+
import type { BusPayload, MessageBus, Unsubscribe } from './bus.ts';
|
|
5
|
+
export type { BusPayload, MessageBus, Unsubscribe };
|
|
6
|
+
export type TranslateFn = TFunction;
|
|
7
|
+
export type PluginEnv = {
|
|
8
|
+
isBrowser?: boolean;
|
|
9
|
+
supportsTouch?: boolean;
|
|
10
|
+
isDesktop: () => boolean;
|
|
11
|
+
isMobile?: () => boolean;
|
|
12
|
+
isMobileReflow?: () => boolean;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
export type PluginConfigEntry = {
|
|
16
|
+
active?: boolean;
|
|
17
|
+
deepLinkProps?: Record<string, string | null>;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
export type EngineConfig = {
|
|
21
|
+
name?: string;
|
|
22
|
+
engineName?: string;
|
|
23
|
+
extends?: string[];
|
|
24
|
+
debug?: boolean | Record<string, unknown>;
|
|
25
|
+
theme?: Record<string, unknown>;
|
|
26
|
+
uiHide?: {
|
|
27
|
+
sidebar?: boolean;
|
|
28
|
+
[key: string]: unknown;
|
|
29
|
+
};
|
|
30
|
+
renderDiv?: string;
|
|
31
|
+
desktopViewMinWidth?: number;
|
|
32
|
+
configPostProc?: string[];
|
|
33
|
+
uuid?: string;
|
|
34
|
+
plugins: Record<string, PluginConfigEntry>;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
};
|
|
37
|
+
export type ObservableLike = {
|
|
38
|
+
fire: (...args: unknown[]) => unknown;
|
|
39
|
+
observe?: (cb: (...args: unknown[]) => void) => unknown;
|
|
40
|
+
};
|
|
41
|
+
export type PluginApp = {
|
|
42
|
+
bus: MessageBus;
|
|
43
|
+
log: Logger;
|
|
44
|
+
config: EngineConfig;
|
|
45
|
+
env: PluginEnv;
|
|
46
|
+
gt: () => TranslateFn;
|
|
47
|
+
i18n?: () => {
|
|
48
|
+
language?: string;
|
|
49
|
+
};
|
|
50
|
+
destroy?: () => void | Promise<void>;
|
|
51
|
+
eventListener?: ObservableLike;
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
export type WidgetStateStore<TState> = {
|
|
55
|
+
getState: () => TState;
|
|
56
|
+
update: (patch: Partial<TState>) => TState;
|
|
57
|
+
};
|
|
58
|
+
export type MultiWidgetStateStore<TState> = WidgetStateStore<TState> & {
|
|
59
|
+
addCallback: (cb: (state: TState, prevState: TState) => void) => Unsubscribe;
|
|
60
|
+
};
|
|
61
|
+
export type LayerRegistration = {
|
|
62
|
+
id: string;
|
|
63
|
+
widget: () => React.ReactNode;
|
|
64
|
+
layoutId: string;
|
|
65
|
+
show?: boolean;
|
|
66
|
+
isOverlay?: boolean;
|
|
67
|
+
widgetType?: string;
|
|
68
|
+
order?: number;
|
|
69
|
+
shouldShow?: (currentlyShowing: string[]) => boolean;
|
|
70
|
+
[key: string]: unknown;
|
|
71
|
+
};
|
|
72
|
+
export type MapCenter = {
|
|
73
|
+
lat: number;
|
|
74
|
+
lng: number;
|
|
75
|
+
ordinal: number;
|
|
76
|
+
floorId?: string | number | null;
|
|
77
|
+
structureId?: string | number | null;
|
|
78
|
+
};
|
|
79
|
+
export type MapView = {
|
|
80
|
+
zoom: number;
|
|
81
|
+
pitch: number;
|
|
82
|
+
bearing: number;
|
|
83
|
+
[key: string]: unknown;
|
|
84
|
+
};
|
|
85
|
+
export type UserMenuOption = {
|
|
86
|
+
iconId: string;
|
|
87
|
+
label: string;
|
|
88
|
+
id?: string;
|
|
89
|
+
lang?: string;
|
|
90
|
+
onClick: (option?: UserMenuOption) => unknown | Promise<unknown>;
|
|
91
|
+
};
|