@hai3/framework 0.2.0-alpha.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/CLAUDE.md +161 -0
- package/commands/hai3-fix-violation.md +48 -0
- package/commands/hai3-new-action.md +120 -0
- package/commands/hai3-quick-ref.md +63 -0
- package/commands/hai3-rules.md +43 -0
- package/commands/hai3-validate.md +49 -0
- package/dist/index.cjs +1397 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +842 -0
- package/dist/index.d.ts +842 -0
- package/dist/index.js +1264 -0
- package/dist/index.js.map +1 -0
- package/dist/types.cjs +19 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +440 -0
- package/dist/types.d.ts +440 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/llms.txt +52 -0
- package/package.json +57 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
import { HAI3Config, HAI3AppBuilder, HAI3App, ScreensetsConfig, HAI3Plugin, ChangeThemePayload, ShowPopupPayload, NavigateToScreenPayload, NavigateToScreensetPayload, SetLanguagePayload, Presets, ThemeRegistry, RouteRegistry } from './types.cjs';
|
|
2
|
+
export { HAI3Store, LegacyTheme, PluginFactory, PluginLifecycle, PluginProvides, Preset, ThemeApplyFn, ThemeConfig } from './types.cjs';
|
|
3
|
+
import { ScreensetRegistry } from '@hai3/screensets';
|
|
4
|
+
export { LayoutDomain, MenuItemConfig, MenuScreenItem, ScreenConfig, ScreenId, ScreenLoader, ScreensetCategory, ScreensetDefinition as ScreensetConfig, ScreensetDefinition, ScreensetId, ScreensetRegistry, ScreensetRegistry as ScreensetRegistryContract, createScreensetRegistry, screensetRegistry } from '@hai3/screensets';
|
|
5
|
+
import * as _hai3_state from '@hai3/state';
|
|
6
|
+
import { AppDispatch } from '@hai3/state';
|
|
7
|
+
export { AppDispatch, EffectInitializer, EventHandler, EventPayloadMap, ReducerPayload, RootState, SliceObject, Subscription, createSlice, createStore, eventBus, getStore, hasSlice, registerSlice } from '@hai3/state';
|
|
8
|
+
import * as redux from 'redux';
|
|
9
|
+
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
10
|
+
import { Reducer } from '@reduxjs/toolkit';
|
|
11
|
+
export { ApiProtocol, ApiService, ApiServiceConfig, ApiServicesMap, BaseApiService, JsonCompatible, JsonObject, JsonPrimitive, JsonValue, MockMap, MockPlugin, RestProtocol, RestProtocolConfig, SseProtocol, SseProtocolConfig, apiRegistry } from '@hai3/api';
|
|
12
|
+
export { I18nConfig, I18nRegistryImpl as I18nRegistry, I18nRegistryImpl, I18nRegistry as I18nRegistryType, Language, LanguageDisplayMode, LanguageMetadata, SUPPORTED_LANGUAGES, TextDirection, TranslationDictionary, TranslationLoader, TranslationMap, createI18nRegistry, getLanguageMetadata, i18nRegistry } from '@hai3/i18n';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* createHAI3 - App Builder Factory
|
|
16
|
+
*
|
|
17
|
+
* Creates a HAI3 app builder for custom plugin composition.
|
|
18
|
+
* This is the core of the plugin architecture.
|
|
19
|
+
*
|
|
20
|
+
* Framework Layer: L2 (Depends on SDK packages)
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Create a HAI3 app builder for custom plugin composition.
|
|
25
|
+
*
|
|
26
|
+
* @param config - Optional application configuration
|
|
27
|
+
* @returns App builder for plugin composition
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const app = createHAI3()
|
|
32
|
+
* .use(screensets())
|
|
33
|
+
* .use(themes())
|
|
34
|
+
* .build();
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare function createHAI3(config?: HAI3Config): HAI3AppBuilder;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* createHAI3App - Convenience function for full HAI3 application
|
|
41
|
+
*
|
|
42
|
+
* Creates a fully configured HAI3 application using the full preset.
|
|
43
|
+
*
|
|
44
|
+
* Framework Layer: L2
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Create a fully configured HAI3 application.
|
|
49
|
+
*
|
|
50
|
+
* This is a convenience function that uses the full preset.
|
|
51
|
+
* For custom plugin composition, use `createHAI3()` instead.
|
|
52
|
+
*
|
|
53
|
+
* @param config - Optional application configuration
|
|
54
|
+
* @returns The built HAI3 application
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* // Default - uses full() preset
|
|
59
|
+
* const app = createHAI3App();
|
|
60
|
+
*
|
|
61
|
+
* // With configuration
|
|
62
|
+
* const app = createHAI3App({ devMode: true });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
declare function createHAI3App(config?: HAI3Config): HAI3App;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Screensets Plugin - Provides screenset registry and screen slice
|
|
69
|
+
*
|
|
70
|
+
* This is the minimal plugin for screenset orchestration.
|
|
71
|
+
* It does NOT include navigation actions - those are in the navigation plugin.
|
|
72
|
+
*
|
|
73
|
+
* Framework Layer: L2
|
|
74
|
+
*
|
|
75
|
+
* NOTE: Translations are NOT handled by this plugin. Screensets register
|
|
76
|
+
* their translations directly with i18nRegistry via framework re-exports.
|
|
77
|
+
* This maintains clean separation: @hai3/screensets has zero knowledge of i18n.
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Screensets plugin factory.
|
|
82
|
+
*
|
|
83
|
+
* @param config - Plugin configuration
|
|
84
|
+
* @returns Screensets plugin
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* const app = createHAI3()
|
|
89
|
+
* .use(screensets({ autoDiscover: true }))
|
|
90
|
+
* .build();
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
declare function screensets(config?: ScreensetsConfig): HAI3Plugin<ScreensetsConfig>;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Themes Plugin - Provides theme registry and changeTheme action
|
|
97
|
+
*
|
|
98
|
+
* Framework Layer: L2
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
declare module '@hai3/state' {
|
|
102
|
+
interface EventPayloadMap {
|
|
103
|
+
'theme/changed': ChangeThemePayload;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Themes plugin factory.
|
|
108
|
+
*
|
|
109
|
+
* @returns Themes plugin
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* const app = createHAI3()
|
|
114
|
+
* .use(screensets())
|
|
115
|
+
* .use(themes())
|
|
116
|
+
* .build();
|
|
117
|
+
*
|
|
118
|
+
* app.actions.changeTheme({ themeId: 'dark' });
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
declare function themes(): HAI3Plugin;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Layout Plugin - Provides all layout domain slices and effects
|
|
125
|
+
*
|
|
126
|
+
* Framework Layer: L2
|
|
127
|
+
*
|
|
128
|
+
* NOTE: Layout slices are owned by @hai3/framework (not @hai3/uicore which is deprecated)
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
declare module '@hai3/state' {
|
|
132
|
+
interface EventPayloadMap {
|
|
133
|
+
'layout/popup/requested': ShowPopupPayload;
|
|
134
|
+
'layout/popup/hidden': void;
|
|
135
|
+
'layout/overlay/requested': {
|
|
136
|
+
id: string;
|
|
137
|
+
};
|
|
138
|
+
'layout/overlay/hidden': void;
|
|
139
|
+
'layout/menu/collapsed': {
|
|
140
|
+
collapsed: boolean;
|
|
141
|
+
};
|
|
142
|
+
'layout/sidebar/collapsed': {
|
|
143
|
+
collapsed: boolean;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Layout plugin factory.
|
|
149
|
+
*
|
|
150
|
+
* @returns Layout plugin
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* const app = createHAI3()
|
|
155
|
+
* .use(screensets())
|
|
156
|
+
* .use(layout())
|
|
157
|
+
* .build();
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
declare function layout(): HAI3Plugin;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Navigation Plugin - Provides navigation actions and URL sync
|
|
164
|
+
*
|
|
165
|
+
* Framework Layer: L2
|
|
166
|
+
*
|
|
167
|
+
* NOTE: Uses layout slices from @hai3/framework (not @hai3/uicore which is deprecated)
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
declare module '@hai3/state' {
|
|
171
|
+
interface EventPayloadMap {
|
|
172
|
+
'navigation/screen/navigated': NavigateToScreenPayload;
|
|
173
|
+
'navigation/screenset/navigated': NavigateToScreensetPayload;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Navigation plugin factory.
|
|
178
|
+
*
|
|
179
|
+
* @returns Navigation plugin
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```typescript
|
|
183
|
+
* const app = createHAI3()
|
|
184
|
+
* .use(screensets())
|
|
185
|
+
* .use(navigation())
|
|
186
|
+
* .build();
|
|
187
|
+
*
|
|
188
|
+
* app.actions.navigateToScreen({ screensetId: 'demo', screenId: 'home' });
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
declare function navigation(): HAI3Plugin;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Routing Plugin - Provides route registry auto-synced from screensets
|
|
195
|
+
*
|
|
196
|
+
* Framework Layer: L2
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Routing plugin factory.
|
|
201
|
+
*
|
|
202
|
+
* @returns Routing plugin
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```typescript
|
|
206
|
+
* const app = createHAI3()
|
|
207
|
+
* .use(screensets())
|
|
208
|
+
* .use(routing())
|
|
209
|
+
* .build();
|
|
210
|
+
*
|
|
211
|
+
* // Check if a screen exists
|
|
212
|
+
* const exists = app.routeRegistry.hasScreen('demo', 'home');
|
|
213
|
+
* ```
|
|
214
|
+
*/
|
|
215
|
+
declare function routing(): HAI3Plugin;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* I18n Plugin - Provides i18n registry wiring and setLanguage action
|
|
219
|
+
*
|
|
220
|
+
* Framework Layer: L2
|
|
221
|
+
*/
|
|
222
|
+
|
|
223
|
+
declare module '@hai3/state' {
|
|
224
|
+
interface EventPayloadMap {
|
|
225
|
+
'i18n/language/changed': SetLanguagePayload;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* I18n plugin factory.
|
|
230
|
+
*
|
|
231
|
+
* @returns I18n plugin
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```typescript
|
|
235
|
+
* const app = createHAI3()
|
|
236
|
+
* .use(i18n())
|
|
237
|
+
* .build();
|
|
238
|
+
*
|
|
239
|
+
* app.actions.setLanguage({ language: 'de' });
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
declare function i18n(): HAI3Plugin;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Effects Plugin - Core effect coordination infrastructure
|
|
246
|
+
*
|
|
247
|
+
* Framework Layer: L2
|
|
248
|
+
*/
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Effects plugin factory.
|
|
252
|
+
*
|
|
253
|
+
* Provides the core effect coordination infrastructure.
|
|
254
|
+
* Other plugins register their effects through this system.
|
|
255
|
+
*
|
|
256
|
+
* @returns Effects plugin
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```typescript
|
|
260
|
+
* const app = createHAI3()
|
|
261
|
+
* .use(effects())
|
|
262
|
+
* .use(screensets())
|
|
263
|
+
* .build();
|
|
264
|
+
* ```
|
|
265
|
+
*/
|
|
266
|
+
declare function effects(): HAI3Plugin;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Presets - Pre-configured plugin combinations
|
|
270
|
+
*
|
|
271
|
+
* Framework Layer: L2
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Full preset - All plugins for the complete HAI3 experience.
|
|
276
|
+
* This is the default for `hai3 create` projects.
|
|
277
|
+
*
|
|
278
|
+
* Includes:
|
|
279
|
+
* - screensets (screenset registry, screen slice)
|
|
280
|
+
* - themes (theme registry, changeTheme action)
|
|
281
|
+
* - layout (all layout domain slices and effects)
|
|
282
|
+
* - navigation (navigateToScreen, navigateToScreenset actions)
|
|
283
|
+
* - routing (route registry auto-synced from screensets)
|
|
284
|
+
* - i18n (i18n registry, setLanguage action)
|
|
285
|
+
* - effects (effect coordination)
|
|
286
|
+
*/
|
|
287
|
+
declare function full(): HAI3Plugin[];
|
|
288
|
+
/**
|
|
289
|
+
* Minimal preset - Screensets + themes only.
|
|
290
|
+
* For users who want basic HAI3 patterns without full layout management.
|
|
291
|
+
*
|
|
292
|
+
* Includes:
|
|
293
|
+
* - screensets (screenset registry, screen slice)
|
|
294
|
+
* - themes (theme registry, changeTheme action)
|
|
295
|
+
*/
|
|
296
|
+
declare function minimal(): HAI3Plugin[];
|
|
297
|
+
/**
|
|
298
|
+
* Headless preset - Screensets only.
|
|
299
|
+
* For external platform integration where you only need screenset orchestration.
|
|
300
|
+
* The external platform provides its own menu, header, navigation, etc.
|
|
301
|
+
*
|
|
302
|
+
* Includes:
|
|
303
|
+
* - screensets (screenset registry, screen slice)
|
|
304
|
+
*/
|
|
305
|
+
declare function headless(): HAI3Plugin[];
|
|
306
|
+
/**
|
|
307
|
+
* Presets collection
|
|
308
|
+
*/
|
|
309
|
+
declare const presets: Presets;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Theme Registry - Manages theme registration and application
|
|
313
|
+
*
|
|
314
|
+
* Framework Layer: L2
|
|
315
|
+
*/
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Create a new theme registry instance.
|
|
319
|
+
*/
|
|
320
|
+
declare function createThemeRegistry(): ThemeRegistry;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Route Registry - Manages routes auto-synced from screensets
|
|
324
|
+
*
|
|
325
|
+
* Framework Layer: L2
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Create a new route registry instance.
|
|
330
|
+
*
|
|
331
|
+
* @param screensetRegistry - Screenset registry to sync from
|
|
332
|
+
*/
|
|
333
|
+
declare function createRouteRegistry(screensetRegistry: ScreensetRegistry): RouteRegistry;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Layout State Types
|
|
337
|
+
*
|
|
338
|
+
* These types define the shape of layout state managed by framework slices.
|
|
339
|
+
* Defined here in framework to avoid circular dependencies between
|
|
340
|
+
* framework/react/uicore packages.
|
|
341
|
+
*
|
|
342
|
+
* At runtime, these types are satisfied by @hai3/framework slice implementations.
|
|
343
|
+
*/
|
|
344
|
+
/** Tenant entity */
|
|
345
|
+
interface Tenant {
|
|
346
|
+
id: string;
|
|
347
|
+
}
|
|
348
|
+
/** Tenant state */
|
|
349
|
+
interface TenantState {
|
|
350
|
+
tenant: Tenant | null;
|
|
351
|
+
loading: boolean;
|
|
352
|
+
}
|
|
353
|
+
/** User info displayed in header */
|
|
354
|
+
interface HeaderUser {
|
|
355
|
+
displayName?: string;
|
|
356
|
+
email?: string;
|
|
357
|
+
avatarUrl?: string;
|
|
358
|
+
}
|
|
359
|
+
/** Header state with user info */
|
|
360
|
+
interface HeaderState {
|
|
361
|
+
user: HeaderUser | null;
|
|
362
|
+
loading: boolean;
|
|
363
|
+
}
|
|
364
|
+
/** Header configuration */
|
|
365
|
+
interface HeaderConfig {
|
|
366
|
+
user?: HeaderUser;
|
|
367
|
+
}
|
|
368
|
+
/** Footer state */
|
|
369
|
+
interface FooterState {
|
|
370
|
+
screensetOptions: Array<{
|
|
371
|
+
category: string;
|
|
372
|
+
screensets: Array<{
|
|
373
|
+
id: string;
|
|
374
|
+
name: string;
|
|
375
|
+
}>;
|
|
376
|
+
}>;
|
|
377
|
+
visible: boolean;
|
|
378
|
+
}
|
|
379
|
+
/** Footer configuration */
|
|
380
|
+
interface FooterConfig {
|
|
381
|
+
visible?: boolean;
|
|
382
|
+
}
|
|
383
|
+
/** Menu item */
|
|
384
|
+
interface MenuItem {
|
|
385
|
+
id: string;
|
|
386
|
+
label: string;
|
|
387
|
+
icon?: string;
|
|
388
|
+
path?: string;
|
|
389
|
+
children?: MenuItem[];
|
|
390
|
+
disabled?: boolean;
|
|
391
|
+
}
|
|
392
|
+
/** Menu state */
|
|
393
|
+
interface MenuState {
|
|
394
|
+
collapsed: boolean;
|
|
395
|
+
items: MenuItem[];
|
|
396
|
+
visible: boolean;
|
|
397
|
+
}
|
|
398
|
+
/** Sidebar position */
|
|
399
|
+
type SidebarPosition = 'left' | 'right';
|
|
400
|
+
/** Sidebar state */
|
|
401
|
+
interface SidebarState {
|
|
402
|
+
collapsed: boolean;
|
|
403
|
+
position: SidebarPosition;
|
|
404
|
+
title: string | null;
|
|
405
|
+
content: unknown;
|
|
406
|
+
visible: boolean;
|
|
407
|
+
width: number;
|
|
408
|
+
}
|
|
409
|
+
/** Screen state */
|
|
410
|
+
interface ScreenState {
|
|
411
|
+
activeScreen: string | null;
|
|
412
|
+
loading: boolean;
|
|
413
|
+
}
|
|
414
|
+
/** Single popup state */
|
|
415
|
+
interface PopupState {
|
|
416
|
+
id: string;
|
|
417
|
+
title: string;
|
|
418
|
+
component: string;
|
|
419
|
+
props?: Record<string, unknown>;
|
|
420
|
+
zIndex: number;
|
|
421
|
+
}
|
|
422
|
+
/** Popup configuration */
|
|
423
|
+
interface PopupConfig {
|
|
424
|
+
id: string;
|
|
425
|
+
title?: string;
|
|
426
|
+
component: string;
|
|
427
|
+
props?: Record<string, unknown>;
|
|
428
|
+
}
|
|
429
|
+
/** Overlay state */
|
|
430
|
+
interface OverlayState {
|
|
431
|
+
visible: boolean;
|
|
432
|
+
}
|
|
433
|
+
/** Overlay configuration */
|
|
434
|
+
interface OverlayConfig {
|
|
435
|
+
visible?: boolean;
|
|
436
|
+
}
|
|
437
|
+
/** Combined layout state (legacy) */
|
|
438
|
+
interface LayoutState {
|
|
439
|
+
theme: string;
|
|
440
|
+
currentScreenset: string;
|
|
441
|
+
selectedScreen: string | null;
|
|
442
|
+
}
|
|
443
|
+
/** Layout domain state union */
|
|
444
|
+
type LayoutDomainState = HeaderState | FooterState | MenuState | SidebarState | ScreenState | PopupState | OverlayState;
|
|
445
|
+
/** Root state with layout */
|
|
446
|
+
interface RootStateWithLayout {
|
|
447
|
+
layout: {
|
|
448
|
+
header: HeaderState;
|
|
449
|
+
footer: FooterState;
|
|
450
|
+
menu: MenuState;
|
|
451
|
+
sidebar: SidebarState;
|
|
452
|
+
screen: ScreenState;
|
|
453
|
+
popup: {
|
|
454
|
+
stack: PopupState[];
|
|
455
|
+
};
|
|
456
|
+
overlay: OverlayState;
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
/** Layout domain reducers type */
|
|
460
|
+
type LayoutDomainReducers = Record<string, unknown>;
|
|
461
|
+
|
|
462
|
+
declare const setUser: _reduxjs_toolkit.ActionCreatorWithPayload<HeaderUser | null, "layout/header/setUser">;
|
|
463
|
+
declare const setLoading: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/header/setLoading">;
|
|
464
|
+
declare const clearUser: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/header/clearUser">;
|
|
465
|
+
declare const headerSlice: _hai3_state.SliceObject<HeaderState>;
|
|
466
|
+
declare const headerActions: {
|
|
467
|
+
setUser: _reduxjs_toolkit.ActionCreatorWithPayload<HeaderUser | null, "layout/header/setUser">;
|
|
468
|
+
setLoading: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/header/setLoading">;
|
|
469
|
+
clearUser: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/header/clearUser">;
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
declare const setFooterVisible: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/footer/setFooterVisible">;
|
|
473
|
+
declare const setFooterConfig: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<FooterState>, "layout/footer/setFooterConfig">;
|
|
474
|
+
declare const footerSlice: _hai3_state.SliceObject<FooterState>;
|
|
475
|
+
|
|
476
|
+
declare const footerActions: {
|
|
477
|
+
setFooterVisible: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/footer/setFooterVisible">;
|
|
478
|
+
setFooterConfig: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<FooterState>, "layout/footer/setFooterConfig">;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
declare const toggleMenu: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/menu/toggleMenu">;
|
|
482
|
+
declare const setMenuCollapsed: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/menu/setMenuCollapsed">;
|
|
483
|
+
declare const setMenuItems: _reduxjs_toolkit.ActionCreatorWithPayload<MenuItem[], "layout/menu/setMenuItems">;
|
|
484
|
+
declare const setMenuVisible: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/menu/setMenuVisible">;
|
|
485
|
+
declare const setMenuConfig: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<MenuState>, "layout/menu/setMenuConfig">;
|
|
486
|
+
declare const menuSlice: _hai3_state.SliceObject<MenuState>;
|
|
487
|
+
|
|
488
|
+
declare const menuActions: {
|
|
489
|
+
toggleMenu: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/menu/toggleMenu">;
|
|
490
|
+
setMenuCollapsed: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/menu/setMenuCollapsed">;
|
|
491
|
+
setMenuItems: _reduxjs_toolkit.ActionCreatorWithPayload<MenuItem[], "layout/menu/setMenuItems">;
|
|
492
|
+
setMenuVisible: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/menu/setMenuVisible">;
|
|
493
|
+
setMenuConfig: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<MenuState>, "layout/menu/setMenuConfig">;
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
declare const toggleSidebar: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/sidebar/toggleSidebar">;
|
|
497
|
+
declare const setSidebarCollapsed: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/sidebar/setSidebarCollapsed">;
|
|
498
|
+
declare const setSidebarPosition: _reduxjs_toolkit.ActionCreatorWithPayload<SidebarPosition, "layout/sidebar/setSidebarPosition">;
|
|
499
|
+
declare const setSidebarTitle: _reduxjs_toolkit.ActionCreatorWithPayload<string | null, "layout/sidebar/setSidebarTitle">;
|
|
500
|
+
declare const setSidebarContent: _reduxjs_toolkit.ActionCreatorWithNonInferrablePayload<"layout/sidebar/setSidebarContent">;
|
|
501
|
+
declare const setSidebarVisible: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/sidebar/setSidebarVisible">;
|
|
502
|
+
declare const setSidebarWidth: _reduxjs_toolkit.ActionCreatorWithPayload<number, "layout/sidebar/setSidebarWidth">;
|
|
503
|
+
declare const setSidebarConfig: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<SidebarState>, "layout/sidebar/setSidebarConfig">;
|
|
504
|
+
declare const sidebarSlice: _hai3_state.SliceObject<SidebarState>;
|
|
505
|
+
|
|
506
|
+
declare const sidebarActions: {
|
|
507
|
+
toggleSidebar: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/sidebar/toggleSidebar">;
|
|
508
|
+
setSidebarCollapsed: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/sidebar/setSidebarCollapsed">;
|
|
509
|
+
setSidebarPosition: _reduxjs_toolkit.ActionCreatorWithPayload<SidebarPosition, "layout/sidebar/setSidebarPosition">;
|
|
510
|
+
setSidebarTitle: _reduxjs_toolkit.ActionCreatorWithPayload<string | null, "layout/sidebar/setSidebarTitle">;
|
|
511
|
+
setSidebarContent: _reduxjs_toolkit.ActionCreatorWithNonInferrablePayload<"layout/sidebar/setSidebarContent">;
|
|
512
|
+
setSidebarVisible: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/sidebar/setSidebarVisible">;
|
|
513
|
+
setSidebarWidth: _reduxjs_toolkit.ActionCreatorWithPayload<number, "layout/sidebar/setSidebarWidth">;
|
|
514
|
+
setSidebarConfig: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<SidebarState>, "layout/sidebar/setSidebarConfig">;
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
declare const setActiveScreen: _reduxjs_toolkit.ActionCreatorWithPayload<string, "layout/screen/setActiveScreen">;
|
|
518
|
+
declare const setScreenLoading: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/screen/setScreenLoading">;
|
|
519
|
+
declare const navigateTo: _reduxjs_toolkit.ActionCreatorWithPayload<string, "layout/screen/navigateTo">;
|
|
520
|
+
declare const clearActiveScreen: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/screen/clearActiveScreen">;
|
|
521
|
+
declare const screenSlice: _hai3_state.SliceObject<ScreenState>;
|
|
522
|
+
|
|
523
|
+
declare const screenActions: {
|
|
524
|
+
setActiveScreen: _reduxjs_toolkit.ActionCreatorWithPayload<string, "layout/screen/setActiveScreen">;
|
|
525
|
+
setScreenLoading: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/screen/setScreenLoading">;
|
|
526
|
+
navigateTo: _reduxjs_toolkit.ActionCreatorWithPayload<string, "layout/screen/navigateTo">;
|
|
527
|
+
clearActiveScreen: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/screen/clearActiveScreen">;
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
interface PopupSliceState {
|
|
531
|
+
stack: PopupState[];
|
|
532
|
+
}
|
|
533
|
+
declare const openPopup: _reduxjs_toolkit.ActionCreatorWithPayload<Omit<PopupState, "zIndex">, "layout/popup/openPopup">;
|
|
534
|
+
declare const closePopup: _reduxjs_toolkit.ActionCreatorWithPayload<string, "layout/popup/closePopup">;
|
|
535
|
+
declare const closeTopPopup: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/popup/closeTopPopup">;
|
|
536
|
+
declare const closeAllPopups: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/popup/closeAllPopups">;
|
|
537
|
+
declare const popupSlice: _hai3_state.SliceObject<PopupSliceState>;
|
|
538
|
+
|
|
539
|
+
declare const popupActions: {
|
|
540
|
+
openPopup: _reduxjs_toolkit.ActionCreatorWithPayload<Omit<PopupState, "zIndex">, "layout/popup/openPopup">;
|
|
541
|
+
closePopup: _reduxjs_toolkit.ActionCreatorWithPayload<string, "layout/popup/closePopup">;
|
|
542
|
+
closeTopPopup: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/popup/closeTopPopup">;
|
|
543
|
+
closeAllPopups: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/popup/closeAllPopups">;
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
declare const showOverlay: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/overlay/showOverlay">;
|
|
547
|
+
declare const hideOverlay: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/overlay/hideOverlay">;
|
|
548
|
+
declare const setOverlayVisible: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/overlay/setOverlayVisible">;
|
|
549
|
+
declare const overlaySlice: _hai3_state.SliceObject<OverlayState>;
|
|
550
|
+
|
|
551
|
+
declare const overlayActions: {
|
|
552
|
+
showOverlay: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/overlay/showOverlay">;
|
|
553
|
+
hideOverlay: _reduxjs_toolkit.ActionCreatorWithoutPayload<"layout/overlay/hideOverlay">;
|
|
554
|
+
setOverlayVisible: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "layout/overlay/setOverlayVisible">;
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
declare const setTenant: _reduxjs_toolkit.ActionCreatorWithPayload<Tenant | null, "app/tenant/setTenant">;
|
|
558
|
+
declare const setTenantLoading: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "app/tenant/setTenantLoading">;
|
|
559
|
+
declare const clearTenant: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/tenant/clearTenant">;
|
|
560
|
+
declare const tenantSlice: _hai3_state.SliceObject<TenantState>;
|
|
561
|
+
declare const tenantActions: {
|
|
562
|
+
setTenant: _reduxjs_toolkit.ActionCreatorWithPayload<Tenant | null, "app/tenant/setTenant">;
|
|
563
|
+
setTenantLoading: _reduxjs_toolkit.ActionCreatorWithPayload<boolean, "app/tenant/setTenantLoading">;
|
|
564
|
+
clearTenant: _reduxjs_toolkit.ActionCreatorWithoutPayload<"app/tenant/clearTenant">;
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
declare const _default: redux.Reducer<TenantState>;
|
|
568
|
+
|
|
569
|
+
declare const LAYOUT_SLICE_NAME: "layout";
|
|
570
|
+
declare const TENANT_SLICE_NAME: "app/tenant";
|
|
571
|
+
/** Explicit type for layout domain reducers to avoid incorrect dts generation */
|
|
572
|
+
interface LayoutDomainReducersType {
|
|
573
|
+
header: Reducer<HeaderState>;
|
|
574
|
+
footer: Reducer<FooterState>;
|
|
575
|
+
menu: Reducer<MenuState>;
|
|
576
|
+
sidebar: Reducer<SidebarState>;
|
|
577
|
+
screen: Reducer<ScreenState>;
|
|
578
|
+
popup: Reducer<PopupSliceState>;
|
|
579
|
+
overlay: Reducer<OverlayState>;
|
|
580
|
+
}
|
|
581
|
+
declare const layoutDomainReducers: LayoutDomainReducersType;
|
|
582
|
+
declare const layoutReducer: Reducer<{
|
|
583
|
+
header: HeaderState;
|
|
584
|
+
footer: FooterState;
|
|
585
|
+
menu: MenuState;
|
|
586
|
+
sidebar: SidebarState;
|
|
587
|
+
screen: ScreenState;
|
|
588
|
+
popup: PopupSliceState;
|
|
589
|
+
overlay: OverlayState;
|
|
590
|
+
}, redux.UnknownAction, Partial<{
|
|
591
|
+
header: HeaderState | undefined;
|
|
592
|
+
footer: FooterState | undefined;
|
|
593
|
+
menu: MenuState | undefined;
|
|
594
|
+
sidebar: SidebarState | undefined;
|
|
595
|
+
screen: ScreenState | undefined;
|
|
596
|
+
popup: PopupSliceState | undefined;
|
|
597
|
+
overlay: OverlayState | undefined;
|
|
598
|
+
}>>;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Tenant Effects
|
|
602
|
+
*
|
|
603
|
+
* Listens for tenant events and updates the tenant slice.
|
|
604
|
+
* Event-driven architecture: consuming apps emit events, effects handle state updates.
|
|
605
|
+
*/
|
|
606
|
+
|
|
607
|
+
/** Tenant event names */
|
|
608
|
+
declare const TenantEvents: {
|
|
609
|
+
readonly Changed: "app/tenant/changed";
|
|
610
|
+
readonly Cleared: "app/tenant/cleared";
|
|
611
|
+
};
|
|
612
|
+
/** Payload for tenant changed event */
|
|
613
|
+
interface TenantChangedPayload {
|
|
614
|
+
tenant: Tenant;
|
|
615
|
+
}
|
|
616
|
+
/** Payload for tenant cleared event */
|
|
617
|
+
interface TenantClearedPayload {
|
|
618
|
+
}
|
|
619
|
+
declare module '@hai3/state' {
|
|
620
|
+
interface EventPayloadMap {
|
|
621
|
+
'app/tenant/changed': TenantChangedPayload;
|
|
622
|
+
'app/tenant/cleared': TenantClearedPayload;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Initialize tenant effects
|
|
627
|
+
* Call this once during app bootstrap to start listening for tenant events.
|
|
628
|
+
*/
|
|
629
|
+
declare function initTenantEffects(): () => void;
|
|
630
|
+
/**
|
|
631
|
+
* Set tenant via event bus
|
|
632
|
+
* This is the recommended way for consuming apps to set tenant.
|
|
633
|
+
*
|
|
634
|
+
* @example
|
|
635
|
+
* ```typescript
|
|
636
|
+
* import { changeTenant } from '@hai3/framework';
|
|
637
|
+
* changeTenant({ id: 'tenant-123' });
|
|
638
|
+
* ```
|
|
639
|
+
*/
|
|
640
|
+
declare function changeTenant(tenant: Tenant): void;
|
|
641
|
+
/**
|
|
642
|
+
* Clear tenant via event bus
|
|
643
|
+
*/
|
|
644
|
+
declare function clearTenantAction(): void;
|
|
645
|
+
/**
|
|
646
|
+
* Set tenant loading state (direct dispatch, for internal use)
|
|
647
|
+
*/
|
|
648
|
+
declare function setTenantLoadingState(loading: boolean): void;
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Backward Compatibility Exports
|
|
652
|
+
*
|
|
653
|
+
* These exports provide backward compatibility with @hai3/uicore API.
|
|
654
|
+
* They are singletons that mirror the old API.
|
|
655
|
+
*
|
|
656
|
+
* NOTE: These are exported for migration convenience but may be deprecated
|
|
657
|
+
* in future major versions. Prefer using the plugin architecture.
|
|
658
|
+
*/
|
|
659
|
+
|
|
660
|
+
declare const ACCOUNTS_DOMAIN: "accounts";
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Global theme registry singleton
|
|
664
|
+
*
|
|
665
|
+
* @deprecated Prefer using app.themeRegistry from createHAI3App()
|
|
666
|
+
*/
|
|
667
|
+
declare const themeRegistry: ThemeRegistry;
|
|
668
|
+
/**
|
|
669
|
+
* Global route registry singleton
|
|
670
|
+
*
|
|
671
|
+
* @deprecated Prefer using app.routeRegistry from createHAI3App()
|
|
672
|
+
*/
|
|
673
|
+
declare const routeRegistry: RouteRegistry;
|
|
674
|
+
/**
|
|
675
|
+
* Navigate to a screen by ID.
|
|
676
|
+
* Simply updates the active screen in the store.
|
|
677
|
+
*
|
|
678
|
+
* NOTE: This is a simplified backward-compatible function.
|
|
679
|
+
* For full navigation including screenset switching, use:
|
|
680
|
+
* - useNavigation().navigateToScreen(screensetId, screenId) hook
|
|
681
|
+
* - or app.actions.navigateToScreen({ screensetId, screenId })
|
|
682
|
+
*
|
|
683
|
+
* @param screenId Screen ID to navigate to
|
|
684
|
+
* @deprecated Use useNavigation() hook or app.actions.navigateToScreen()
|
|
685
|
+
*/
|
|
686
|
+
declare const navigateToScreen: (screenId: string) => void;
|
|
687
|
+
/**
|
|
688
|
+
* Fetch current user from API
|
|
689
|
+
* Returns a thunk action that fetches user data.
|
|
690
|
+
*
|
|
691
|
+
* @deprecated Prefer using api services directly in actions
|
|
692
|
+
*/
|
|
693
|
+
declare const fetchCurrentUser: () => (_dispatch: AppDispatch) => void;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Migration Helpers - Utilities for migrating from @hai3/uicore
|
|
697
|
+
*
|
|
698
|
+
* These helpers assist users migrating from the deprecated @hai3/uicore package
|
|
699
|
+
* to the new SDK architecture (@hai3/framework, @hai3/screensets, @hai3/react).
|
|
700
|
+
*
|
|
701
|
+
* Framework Layer: L2
|
|
702
|
+
*/
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Legacy uicore state structure (for reference/backward compat)
|
|
706
|
+
*/
|
|
707
|
+
interface LegacyUicoreState {
|
|
708
|
+
app: {
|
|
709
|
+
user: unknown | null;
|
|
710
|
+
tenant: unknown | null;
|
|
711
|
+
language: string | null;
|
|
712
|
+
translationsReady: boolean;
|
|
713
|
+
screenTranslationsVersion: number;
|
|
714
|
+
loading: boolean;
|
|
715
|
+
error: string | null;
|
|
716
|
+
useMockApi: boolean;
|
|
717
|
+
};
|
|
718
|
+
layout: {
|
|
719
|
+
theme: string;
|
|
720
|
+
currentScreenset: string;
|
|
721
|
+
selectedScreen: string | null;
|
|
722
|
+
};
|
|
723
|
+
header: Record<string, unknown>;
|
|
724
|
+
footer: {
|
|
725
|
+
screensetOptions: unknown[];
|
|
726
|
+
visible: boolean;
|
|
727
|
+
};
|
|
728
|
+
menu: {
|
|
729
|
+
collapsed: boolean;
|
|
730
|
+
items: unknown[];
|
|
731
|
+
visible: boolean;
|
|
732
|
+
};
|
|
733
|
+
sidebar: {
|
|
734
|
+
collapsed: boolean;
|
|
735
|
+
position: string;
|
|
736
|
+
title: string | null;
|
|
737
|
+
content: unknown;
|
|
738
|
+
visible: boolean;
|
|
739
|
+
};
|
|
740
|
+
screen: {
|
|
741
|
+
activeScreen: string | null;
|
|
742
|
+
loading: boolean;
|
|
743
|
+
};
|
|
744
|
+
popup: {
|
|
745
|
+
stack: unknown[];
|
|
746
|
+
};
|
|
747
|
+
overlay: {
|
|
748
|
+
visible: boolean;
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* Legacy root state with uicore key
|
|
753
|
+
*/
|
|
754
|
+
interface LegacyRootState {
|
|
755
|
+
uicore: LegacyUicoreState;
|
|
756
|
+
[key: string]: unknown;
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* State accessor function type
|
|
760
|
+
* Note: "Selector" terminology avoided (Redux-specific). Use useAppSelector hook for state access.
|
|
761
|
+
*/
|
|
762
|
+
type Selector<TState, TResult> = (state: TState) => TResult;
|
|
763
|
+
/**
|
|
764
|
+
* State path mapping from legacy to new structure
|
|
765
|
+
*/
|
|
766
|
+
declare const STATE_PATH_MAPPING: {
|
|
767
|
+
readonly 'uicore.app.user': "app.user";
|
|
768
|
+
readonly 'uicore.app.tenant': "app.tenant";
|
|
769
|
+
readonly 'uicore.app.language': "app.language";
|
|
770
|
+
readonly 'uicore.app.translationsReady': "app.translationsReady";
|
|
771
|
+
readonly 'uicore.app.loading': "app.loading";
|
|
772
|
+
readonly 'uicore.app.error': "app.error";
|
|
773
|
+
readonly 'uicore.app.useMockApi': "app.useMockApi";
|
|
774
|
+
readonly 'uicore.layout.theme': "app.theme";
|
|
775
|
+
readonly 'uicore.layout.currentScreenset': "app.currentScreenset";
|
|
776
|
+
readonly 'uicore.layout.selectedScreen': "layout.screen.activeScreen";
|
|
777
|
+
readonly 'uicore.header': "layout.header";
|
|
778
|
+
readonly 'uicore.footer': "layout.footer";
|
|
779
|
+
readonly 'uicore.menu': "layout.menu";
|
|
780
|
+
readonly 'uicore.sidebar': "layout.sidebar";
|
|
781
|
+
readonly 'uicore.screen': "layout.screen";
|
|
782
|
+
readonly 'uicore.popup': "layout.popup";
|
|
783
|
+
readonly 'uicore.overlay': "layout.overlay";
|
|
784
|
+
};
|
|
785
|
+
/**
|
|
786
|
+
* Enable or disable deprecation warnings globally
|
|
787
|
+
*/
|
|
788
|
+
declare function setDeprecationWarnings(enabled: boolean): void;
|
|
789
|
+
/**
|
|
790
|
+
* Check if deprecation warnings are enabled
|
|
791
|
+
*/
|
|
792
|
+
declare function isDeprecationWarningsEnabled(): boolean;
|
|
793
|
+
/**
|
|
794
|
+
* Create a legacy selector that wraps a new selector with deprecation warnings
|
|
795
|
+
*
|
|
796
|
+
* @param legacyPath - The old state path being accessed (for warning message)
|
|
797
|
+
* @param newSelector - The new selector to use
|
|
798
|
+
* @param migrationHint - Hint for how to migrate (optional)
|
|
799
|
+
* @returns A selector that logs a deprecation warning then returns the new value
|
|
800
|
+
*
|
|
801
|
+
* @example
|
|
802
|
+
* ```typescript
|
|
803
|
+
* import { createLegacySelector, selectMenuCollapsed } from '@hai3/framework';
|
|
804
|
+
*
|
|
805
|
+
* // Create a legacy selector
|
|
806
|
+
* const selectMenuCollapsedLegacy = createLegacySelector(
|
|
807
|
+
* 'uicore.menu.collapsed',
|
|
808
|
+
* selectMenuCollapsed,
|
|
809
|
+
* 'Use selectMenuCollapsed from @hai3/framework'
|
|
810
|
+
* );
|
|
811
|
+
*
|
|
812
|
+
* // In component (will show deprecation warning in dev)
|
|
813
|
+
* const collapsed = useSelector(selectMenuCollapsedLegacy);
|
|
814
|
+
* ```
|
|
815
|
+
*/
|
|
816
|
+
declare function createLegacySelector<TState, TResult>(legacyPath: string, newSelector: Selector<TState, TResult>, migrationHint?: string): Selector<TState, TResult>;
|
|
817
|
+
/**
|
|
818
|
+
* Get layout domain state from the new structure
|
|
819
|
+
* Maps to what was previously `state.uicore.header`, `state.uicore.menu`, etc.
|
|
820
|
+
*/
|
|
821
|
+
declare function getLayoutDomainState<K extends keyof RootStateWithLayout['layout']>(state: RootStateWithLayout, domain: K): RootStateWithLayout['layout'][K];
|
|
822
|
+
/**
|
|
823
|
+
* Check if a state object has the legacy uicore structure
|
|
824
|
+
*/
|
|
825
|
+
declare function hasLegacyUicoreState(state: unknown): state is LegacyRootState;
|
|
826
|
+
/**
|
|
827
|
+
* Check if a state object has the new layout structure
|
|
828
|
+
*/
|
|
829
|
+
declare function hasNewLayoutState(state: unknown): state is RootStateWithLayout;
|
|
830
|
+
/**
|
|
831
|
+
* Legacy selectors placeholder
|
|
832
|
+
*
|
|
833
|
+
* @deprecated Named selectors are removed. Use useAppSelector hook from @hai3/react
|
|
834
|
+
* with inline state access: `useAppSelector((state) => state.layout.menu)`
|
|
835
|
+
*
|
|
836
|
+
* Migration guide:
|
|
837
|
+
* - Before: `const menu = useSelector(selectMenu);`
|
|
838
|
+
* - After: `const menu = useAppSelector((state: RootState) => state.layout.menu);`
|
|
839
|
+
*/
|
|
840
|
+
declare const legacySelectors: {};
|
|
841
|
+
|
|
842
|
+
export { ACCOUNTS_DOMAIN, ChangeThemePayload, type FooterConfig, type FooterState, HAI3App, HAI3AppBuilder, HAI3Config, HAI3Plugin, type HeaderConfig, type HeaderState, type HeaderUser, LAYOUT_SLICE_NAME, type LayoutDomainReducers, type LayoutDomainState, type LayoutState, type LegacyRootState, type LegacyUicoreState, type MenuItem, type MenuState, NavigateToScreenPayload, NavigateToScreensetPayload, type OverlayConfig, type OverlayState, type PopupConfig, type PopupSliceState, type PopupState, Presets, type RootStateWithLayout, RouteRegistry, STATE_PATH_MAPPING, type ScreenState, ScreensetsConfig, type Selector, SetLanguagePayload, ShowPopupPayload, type SidebarPosition, type SidebarState, TENANT_SLICE_NAME, type Tenant, type TenantChangedPayload, type TenantClearedPayload, TenantEvents, type TenantState, ThemeRegistry, changeTenant, clearActiveScreen, clearTenant, clearTenantAction, clearUser, closeAllPopups, closePopup, closeTopPopup, createHAI3, createHAI3App, createLegacySelector, createRouteRegistry, createThemeRegistry, effects, fetchCurrentUser, footerActions, footerSlice, full, getLayoutDomainState, hasLegacyUicoreState, hasNewLayoutState, headerActions, headerSlice, headless, hideOverlay, i18n, initTenantEffects, isDeprecationWarningsEnabled, layout, layoutDomainReducers, layoutReducer, legacySelectors, menuActions, menuSlice, minimal, navigateTo, navigateToScreen, navigation, openPopup, overlayActions, overlaySlice, popupActions, popupSlice, presets, routeRegistry, routing, screenActions, screenSlice, screensets, setActiveScreen, setDeprecationWarnings, setFooterConfig, setFooterVisible, setLoading as setHeaderLoading, setMenuCollapsed, setMenuConfig, setMenuItems, setMenuVisible, setOverlayVisible, setScreenLoading, setSidebarCollapsed, setSidebarConfig, setSidebarContent, setSidebarPosition, setSidebarTitle, setSidebarVisible, setSidebarWidth, setTenant, setTenantLoading, setTenantLoadingState, setUser, showOverlay, sidebarActions, sidebarSlice, tenantActions, _default as tenantReducer, tenantSlice, themeRegistry, themes, toggleMenu, toggleSidebar };
|