@hai3/framework 0.4.0-alpha.0 → 0.4.0-alpha.1
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/commands/hai3-new-action.md +6 -45
- package/dist/index.cjs +36 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -28
- package/dist/index.d.ts +16 -28
- package/dist/index.js +37 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HAI3Config, HAI3AppBuilder, HAI3Plugin, ThemesConfig, Presets, HAI3App, ScreensetsConfig, ChangeThemePayload, ShowPopupPayload, SetLanguagePayload, ThemeRegistry } from './types.cjs';
|
|
2
2
|
export { HAI3Store, PluginFactory, PluginLifecycle, PluginProvides, Preset, RouterMode, ThemeApplyFn, ThemeConfig, UikitTheme } from './types.cjs';
|
|
3
|
-
import { Extension, ExtensionDomain, MfeHandler } from '@hai3/screensets';
|
|
4
|
-
export { Action, ActionsChain, ChildMfeBridge, ContainerProvider, Extension, ExtensionDomain, ExtensionPresentation, HAI3_ACTION_LOAD_EXT, HAI3_ACTION_MOUNT_EXT, HAI3_ACTION_UNMOUNT_EXT, HAI3_SCREEN_EXTENSION_TYPE, HAI3_SHARED_PROPERTY_LANGUAGE, HAI3_SHARED_PROPERTY_THEME, JSONSchema, LayoutDomain, LifecycleHook, LifecycleStage, LoadExtPayload, MfeBridgeFactory, MfeEntry, MfeEntryLifecycle, MfeEntryMF, MfeHandler, MountExtPayload, ParentMfeBridge, ScreenExtension, ScreensetsRegistry, ScreensetsRegistryConfig, ScreensetsRegistryFactory, SharedProperty, TypeSystemPlugin, UnmountExtPayload, ValidationError, ValidationResult, createShadowRoot, extractGtsPackage, injectCssVariables, screensetsRegistryFactory } from '@hai3/screensets';
|
|
3
|
+
import { Extension, ExtensionDomain, TypeSystemPlugin, MfeHandler } from '@hai3/screensets';
|
|
4
|
+
export { Action, ActionsChain, ChildMfeBridge, ContainerProvider, Extension, ExtensionDomain, ExtensionPresentation, HAI3_ACTION_LOAD_EXT, HAI3_ACTION_MOUNT_EXT, HAI3_ACTION_UNMOUNT_EXT, HAI3_MFE_ENTRY_MF, HAI3_SCREEN_EXTENSION_TYPE, HAI3_SHARED_PROPERTY_LANGUAGE, HAI3_SHARED_PROPERTY_THEME, JSONSchema, LayoutDomain, LifecycleHook, LifecycleStage, LoadExtPayload, MfeBridgeFactory, MfeEntry, MfeEntryLifecycle, MfeEntryMF, MfeHandler, MountExtPayload, ParentMfeBridge, ScreenExtension, ScreensetsRegistry, ScreensetsRegistryConfig, ScreensetsRegistryFactory, SharedProperty, TypeSystemPlugin, UnmountExtPayload, ValidationError, ValidationResult, createShadowRoot, extractGtsPackage, injectCssVariables, screensetsRegistryFactory } from '@hai3/screensets';
|
|
5
5
|
export { MfeHandlerMF } from '@hai3/screensets/mfe/handler';
|
|
6
6
|
export { gtsPlugin } from '@hai3/screensets/plugins/gts';
|
|
7
7
|
import * as _hai3_state from '@hai3/state';
|
|
@@ -274,6 +274,11 @@ declare const overlayDomain: ExtensionDomain;
|
|
|
274
274
|
* Configuration for the microfrontends plugin.
|
|
275
275
|
*/
|
|
276
276
|
interface MicrofrontendsConfig {
|
|
277
|
+
/**
|
|
278
|
+
* Type system plugin for entity validation.
|
|
279
|
+
* The registry uses this for domain, extension, and handler type validation.
|
|
280
|
+
*/
|
|
281
|
+
typeSystem: TypeSystemPlugin;
|
|
277
282
|
/**
|
|
278
283
|
* Optional MFE handlers to register with the screensets registry.
|
|
279
284
|
* Handlers enable loading of specific MFE entry types (e.g., MfeEntryMF).
|
|
@@ -292,7 +297,7 @@ interface MicrofrontendsConfig {
|
|
|
292
297
|
* **Key Principles:**
|
|
293
298
|
* - Optional mfeHandlers config for handler registration
|
|
294
299
|
* - NO static domain registration - domains are registered at runtime
|
|
295
|
-
* - Builds screensetsRegistry with
|
|
300
|
+
* - Builds screensetsRegistry with provided TypeSystemPlugin at plugin initialization
|
|
296
301
|
* - Same TypeSystemPlugin instance is propagated throughout
|
|
297
302
|
* - Integrates MFE lifecycle with Flux data flow (actions, effects, slice)
|
|
298
303
|
*
|
|
@@ -301,11 +306,14 @@ interface MicrofrontendsConfig {
|
|
|
301
306
|
* @example
|
|
302
307
|
* ```typescript
|
|
303
308
|
* import { createHAI3, microfrontends } from '@hai3/framework';
|
|
304
|
-
* import { MfeHandlerMF } from '@hai3/screensets/mfe/handler';
|
|
309
|
+
* import { MfeHandlerMF, HAI3_MFE_ENTRY_MF } from '@hai3/screensets/mfe/handler';
|
|
305
310
|
* import { gtsPlugin } from '@hai3/screensets/plugins/gts';
|
|
306
311
|
*
|
|
307
312
|
* const app = createHAI3()
|
|
308
|
-
* .use(microfrontends({
|
|
313
|
+
* .use(microfrontends({
|
|
314
|
+
* typeSystem: gtsPlugin,
|
|
315
|
+
* mfeHandlers: [new MfeHandlerMF(HAI3_MFE_ENTRY_MF)],
|
|
316
|
+
* }))
|
|
309
317
|
* .build();
|
|
310
318
|
*
|
|
311
319
|
* // Register domains dynamically at runtime:
|
|
@@ -316,7 +324,7 @@ interface MicrofrontendsConfig {
|
|
|
316
324
|
* app.actions.mountExtension('my.extension.v1');
|
|
317
325
|
* ```
|
|
318
326
|
*/
|
|
319
|
-
declare function microfrontends(config
|
|
327
|
+
declare function microfrontends(config: MicrofrontendsConfig): HAI3Plugin;
|
|
320
328
|
|
|
321
329
|
/**
|
|
322
330
|
* Presets - Pre-configured plugin combinations
|
|
@@ -351,13 +359,13 @@ interface FullPresetConfig {
|
|
|
351
359
|
* @example
|
|
352
360
|
* ```typescript
|
|
353
361
|
* import { applyTheme } from '@hai3/uikit';
|
|
354
|
-
* import { MfeHandlerMF } from '@hai3/screensets/mfe/handler';
|
|
362
|
+
* import { MfeHandlerMF, HAI3_MFE_ENTRY_MF } from '@hai3/screensets/mfe/handler';
|
|
355
363
|
* import { gtsPlugin } from '@hai3/screensets/plugins/gts';
|
|
356
364
|
*
|
|
357
365
|
* const app = createHAI3()
|
|
358
366
|
* .use(full({
|
|
359
367
|
* themes: { applyFn: applyTheme },
|
|
360
|
-
* microfrontends: { mfeHandlers: [new MfeHandlerMF(
|
|
368
|
+
* microfrontends: { typeSystem: gtsPlugin, mfeHandlers: [new MfeHandlerMF(HAI3_MFE_ENTRY_MF)] }
|
|
361
369
|
* }))
|
|
362
370
|
* .build();
|
|
363
371
|
* ```
|
|
@@ -424,19 +432,6 @@ interface HAI3AppConfig extends HAI3Config, FullPresetConfig {
|
|
|
424
432
|
*/
|
|
425
433
|
declare function createHAI3App(config?: HAI3AppConfig): HAI3App;
|
|
426
434
|
|
|
427
|
-
/**
|
|
428
|
-
* Screensets Plugin - Provides screenset registry and screen slice
|
|
429
|
-
*
|
|
430
|
-
* This is the minimal plugin for screenset orchestration.
|
|
431
|
-
* It does NOT include navigation actions - those are in the navigation plugin.
|
|
432
|
-
*
|
|
433
|
-
* Framework Layer: L2
|
|
434
|
-
*
|
|
435
|
-
* NOTE: Translations are NOT handled by this plugin. Screensets register
|
|
436
|
-
* their translations directly with i18nRegistry via framework re-exports.
|
|
437
|
-
* This maintains clean separation: @hai3/screensets has zero knowledge of i18n.
|
|
438
|
-
*/
|
|
439
|
-
|
|
440
435
|
/**
|
|
441
436
|
* Screensets plugin factory.
|
|
442
437
|
*
|
|
@@ -934,13 +929,6 @@ declare module '@hai3/state' {
|
|
|
934
929
|
*/
|
|
935
930
|
declare function initTenantEffects(): () => void;
|
|
936
931
|
|
|
937
|
-
/**
|
|
938
|
-
* Tenant Actions
|
|
939
|
-
*
|
|
940
|
-
* Action functions for setting and clearing tenant.
|
|
941
|
-
* These emit events that are consumed by tenantEffects.
|
|
942
|
-
*/
|
|
943
|
-
|
|
944
932
|
/**
|
|
945
933
|
* Set tenant via event bus
|
|
946
934
|
* This is the recommended way for consuming apps to set tenant.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HAI3Config, HAI3AppBuilder, HAI3Plugin, ThemesConfig, Presets, HAI3App, ScreensetsConfig, ChangeThemePayload, ShowPopupPayload, SetLanguagePayload, ThemeRegistry } from './types.js';
|
|
2
2
|
export { HAI3Store, PluginFactory, PluginLifecycle, PluginProvides, Preset, RouterMode, ThemeApplyFn, ThemeConfig, UikitTheme } from './types.js';
|
|
3
|
-
import { Extension, ExtensionDomain, MfeHandler } from '@hai3/screensets';
|
|
4
|
-
export { Action, ActionsChain, ChildMfeBridge, ContainerProvider, Extension, ExtensionDomain, ExtensionPresentation, HAI3_ACTION_LOAD_EXT, HAI3_ACTION_MOUNT_EXT, HAI3_ACTION_UNMOUNT_EXT, HAI3_SCREEN_EXTENSION_TYPE, HAI3_SHARED_PROPERTY_LANGUAGE, HAI3_SHARED_PROPERTY_THEME, JSONSchema, LayoutDomain, LifecycleHook, LifecycleStage, LoadExtPayload, MfeBridgeFactory, MfeEntry, MfeEntryLifecycle, MfeEntryMF, MfeHandler, MountExtPayload, ParentMfeBridge, ScreenExtension, ScreensetsRegistry, ScreensetsRegistryConfig, ScreensetsRegistryFactory, SharedProperty, TypeSystemPlugin, UnmountExtPayload, ValidationError, ValidationResult, createShadowRoot, extractGtsPackage, injectCssVariables, screensetsRegistryFactory } from '@hai3/screensets';
|
|
3
|
+
import { Extension, ExtensionDomain, TypeSystemPlugin, MfeHandler } from '@hai3/screensets';
|
|
4
|
+
export { Action, ActionsChain, ChildMfeBridge, ContainerProvider, Extension, ExtensionDomain, ExtensionPresentation, HAI3_ACTION_LOAD_EXT, HAI3_ACTION_MOUNT_EXT, HAI3_ACTION_UNMOUNT_EXT, HAI3_MFE_ENTRY_MF, HAI3_SCREEN_EXTENSION_TYPE, HAI3_SHARED_PROPERTY_LANGUAGE, HAI3_SHARED_PROPERTY_THEME, JSONSchema, LayoutDomain, LifecycleHook, LifecycleStage, LoadExtPayload, MfeBridgeFactory, MfeEntry, MfeEntryLifecycle, MfeEntryMF, MfeHandler, MountExtPayload, ParentMfeBridge, ScreenExtension, ScreensetsRegistry, ScreensetsRegistryConfig, ScreensetsRegistryFactory, SharedProperty, TypeSystemPlugin, UnmountExtPayload, ValidationError, ValidationResult, createShadowRoot, extractGtsPackage, injectCssVariables, screensetsRegistryFactory } from '@hai3/screensets';
|
|
5
5
|
export { MfeHandlerMF } from '@hai3/screensets/mfe/handler';
|
|
6
6
|
export { gtsPlugin } from '@hai3/screensets/plugins/gts';
|
|
7
7
|
import * as _hai3_state from '@hai3/state';
|
|
@@ -274,6 +274,11 @@ declare const overlayDomain: ExtensionDomain;
|
|
|
274
274
|
* Configuration for the microfrontends plugin.
|
|
275
275
|
*/
|
|
276
276
|
interface MicrofrontendsConfig {
|
|
277
|
+
/**
|
|
278
|
+
* Type system plugin for entity validation.
|
|
279
|
+
* The registry uses this for domain, extension, and handler type validation.
|
|
280
|
+
*/
|
|
281
|
+
typeSystem: TypeSystemPlugin;
|
|
277
282
|
/**
|
|
278
283
|
* Optional MFE handlers to register with the screensets registry.
|
|
279
284
|
* Handlers enable loading of specific MFE entry types (e.g., MfeEntryMF).
|
|
@@ -292,7 +297,7 @@ interface MicrofrontendsConfig {
|
|
|
292
297
|
* **Key Principles:**
|
|
293
298
|
* - Optional mfeHandlers config for handler registration
|
|
294
299
|
* - NO static domain registration - domains are registered at runtime
|
|
295
|
-
* - Builds screensetsRegistry with
|
|
300
|
+
* - Builds screensetsRegistry with provided TypeSystemPlugin at plugin initialization
|
|
296
301
|
* - Same TypeSystemPlugin instance is propagated throughout
|
|
297
302
|
* - Integrates MFE lifecycle with Flux data flow (actions, effects, slice)
|
|
298
303
|
*
|
|
@@ -301,11 +306,14 @@ interface MicrofrontendsConfig {
|
|
|
301
306
|
* @example
|
|
302
307
|
* ```typescript
|
|
303
308
|
* import { createHAI3, microfrontends } from '@hai3/framework';
|
|
304
|
-
* import { MfeHandlerMF } from '@hai3/screensets/mfe/handler';
|
|
309
|
+
* import { MfeHandlerMF, HAI3_MFE_ENTRY_MF } from '@hai3/screensets/mfe/handler';
|
|
305
310
|
* import { gtsPlugin } from '@hai3/screensets/plugins/gts';
|
|
306
311
|
*
|
|
307
312
|
* const app = createHAI3()
|
|
308
|
-
* .use(microfrontends({
|
|
313
|
+
* .use(microfrontends({
|
|
314
|
+
* typeSystem: gtsPlugin,
|
|
315
|
+
* mfeHandlers: [new MfeHandlerMF(HAI3_MFE_ENTRY_MF)],
|
|
316
|
+
* }))
|
|
309
317
|
* .build();
|
|
310
318
|
*
|
|
311
319
|
* // Register domains dynamically at runtime:
|
|
@@ -316,7 +324,7 @@ interface MicrofrontendsConfig {
|
|
|
316
324
|
* app.actions.mountExtension('my.extension.v1');
|
|
317
325
|
* ```
|
|
318
326
|
*/
|
|
319
|
-
declare function microfrontends(config
|
|
327
|
+
declare function microfrontends(config: MicrofrontendsConfig): HAI3Plugin;
|
|
320
328
|
|
|
321
329
|
/**
|
|
322
330
|
* Presets - Pre-configured plugin combinations
|
|
@@ -351,13 +359,13 @@ interface FullPresetConfig {
|
|
|
351
359
|
* @example
|
|
352
360
|
* ```typescript
|
|
353
361
|
* import { applyTheme } from '@hai3/uikit';
|
|
354
|
-
* import { MfeHandlerMF } from '@hai3/screensets/mfe/handler';
|
|
362
|
+
* import { MfeHandlerMF, HAI3_MFE_ENTRY_MF } from '@hai3/screensets/mfe/handler';
|
|
355
363
|
* import { gtsPlugin } from '@hai3/screensets/plugins/gts';
|
|
356
364
|
*
|
|
357
365
|
* const app = createHAI3()
|
|
358
366
|
* .use(full({
|
|
359
367
|
* themes: { applyFn: applyTheme },
|
|
360
|
-
* microfrontends: { mfeHandlers: [new MfeHandlerMF(
|
|
368
|
+
* microfrontends: { typeSystem: gtsPlugin, mfeHandlers: [new MfeHandlerMF(HAI3_MFE_ENTRY_MF)] }
|
|
361
369
|
* }))
|
|
362
370
|
* .build();
|
|
363
371
|
* ```
|
|
@@ -424,19 +432,6 @@ interface HAI3AppConfig extends HAI3Config, FullPresetConfig {
|
|
|
424
432
|
*/
|
|
425
433
|
declare function createHAI3App(config?: HAI3AppConfig): HAI3App;
|
|
426
434
|
|
|
427
|
-
/**
|
|
428
|
-
* Screensets Plugin - Provides screenset registry and screen slice
|
|
429
|
-
*
|
|
430
|
-
* This is the minimal plugin for screenset orchestration.
|
|
431
|
-
* It does NOT include navigation actions - those are in the navigation plugin.
|
|
432
|
-
*
|
|
433
|
-
* Framework Layer: L2
|
|
434
|
-
*
|
|
435
|
-
* NOTE: Translations are NOT handled by this plugin. Screensets register
|
|
436
|
-
* their translations directly with i18nRegistry via framework re-exports.
|
|
437
|
-
* This maintains clean separation: @hai3/screensets has zero knowledge of i18n.
|
|
438
|
-
*/
|
|
439
|
-
|
|
440
435
|
/**
|
|
441
436
|
* Screensets plugin factory.
|
|
442
437
|
*
|
|
@@ -934,13 +929,6 @@ declare module '@hai3/state' {
|
|
|
934
929
|
*/
|
|
935
930
|
declare function initTenantEffects(): () => void;
|
|
936
931
|
|
|
937
|
-
/**
|
|
938
|
-
* Tenant Actions
|
|
939
|
-
*
|
|
940
|
-
* Action functions for setting and clearing tenant.
|
|
941
|
-
* These emit events that are consumed by tenantEffects.
|
|
942
|
-
*/
|
|
943
|
-
|
|
944
932
|
/**
|
|
945
933
|
* Set tenant via event bus
|
|
946
934
|
* This is the recommended way for consuming apps to set tenant.
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,8 @@ var HAI3AppBuilderImpl = class {
|
|
|
22
22
|
* Add a plugin to the application.
|
|
23
23
|
* Also accepts an array of plugins (for preset support).
|
|
24
24
|
*/
|
|
25
|
+
// @cpt-begin:cpt-hai3-flow-framework-composition-app-bootstrap:p1:inst-1
|
|
26
|
+
// @cpt-begin:cpt-hai3-state-framework-composition-builder:p1:inst-1
|
|
25
27
|
use(plugin) {
|
|
26
28
|
if (Array.isArray(plugin)) {
|
|
27
29
|
plugin.forEach((p) => this.use(p));
|
|
@@ -39,6 +41,8 @@ var HAI3AppBuilderImpl = class {
|
|
|
39
41
|
this.plugins.push(resolved);
|
|
40
42
|
return this;
|
|
41
43
|
}
|
|
44
|
+
// @cpt-end:cpt-hai3-flow-framework-composition-app-bootstrap:p1:inst-1
|
|
45
|
+
// @cpt-end:cpt-hai3-state-framework-composition-builder:p1:inst-1
|
|
42
46
|
/**
|
|
43
47
|
* Add multiple plugins at once.
|
|
44
48
|
*/
|
|
@@ -49,6 +53,8 @@ var HAI3AppBuilderImpl = class {
|
|
|
49
53
|
/**
|
|
50
54
|
* Build the application.
|
|
51
55
|
*/
|
|
56
|
+
// @cpt-begin:cpt-hai3-flow-framework-composition-app-bootstrap:p1:inst-2
|
|
57
|
+
// @cpt-begin:cpt-hai3-state-framework-composition-builder:p1:inst-2
|
|
52
58
|
build() {
|
|
53
59
|
const orderedPlugins = this.resolveDependencies();
|
|
54
60
|
orderedPlugins.forEach((plugin) => {
|
|
@@ -78,9 +84,13 @@ var HAI3AppBuilderImpl = class {
|
|
|
78
84
|
});
|
|
79
85
|
return app;
|
|
80
86
|
}
|
|
87
|
+
// @cpt-end:cpt-hai3-flow-framework-composition-app-bootstrap:p1:inst-2
|
|
88
|
+
// @cpt-end:cpt-hai3-state-framework-composition-builder:p1:inst-2
|
|
81
89
|
/**
|
|
82
90
|
* Resolve plugin dependencies using topological sort.
|
|
83
91
|
*/
|
|
92
|
+
// @cpt-begin:cpt-hai3-algo-framework-composition-dep-resolution:p1:inst-1
|
|
93
|
+
// @cpt-begin:cpt-hai3-flow-framework-composition-plugin-dependency:p1:inst-2
|
|
84
94
|
resolveDependencies() {
|
|
85
95
|
const resolved = [];
|
|
86
96
|
const visited = /* @__PURE__ */ new Set();
|
|
@@ -119,9 +129,12 @@ Add the missing plugin: .use(${depName}())`
|
|
|
119
129
|
this.plugins.forEach(visit);
|
|
120
130
|
return resolved;
|
|
121
131
|
}
|
|
132
|
+
// @cpt-end:cpt-hai3-algo-framework-composition-dep-resolution:p1:inst-1
|
|
133
|
+
// @cpt-end:cpt-hai3-flow-framework-composition-plugin-dependency:p1:inst-2
|
|
122
134
|
/**
|
|
123
135
|
* Aggregate all provides from plugins.
|
|
124
136
|
*/
|
|
137
|
+
// @cpt-begin:cpt-hai3-algo-framework-composition-provides-aggregation:p1:inst-1
|
|
125
138
|
aggregateProvides(plugins) {
|
|
126
139
|
const registries = {};
|
|
127
140
|
const slices = [];
|
|
@@ -144,6 +157,7 @@ Add the missing plugin: .use(${depName}())`
|
|
|
144
157
|
});
|
|
145
158
|
return { registries, slices, effects: effects2, actions: actions2 };
|
|
146
159
|
}
|
|
160
|
+
// @cpt-end:cpt-hai3-algo-framework-composition-provides-aggregation:p1:inst-1
|
|
147
161
|
/**
|
|
148
162
|
* Create store with all aggregated slices.
|
|
149
163
|
*
|
|
@@ -166,6 +180,7 @@ Add the missing plugin: .use(${depName}())`
|
|
|
166
180
|
/**
|
|
167
181
|
* Destroy the app and cleanup resources.
|
|
168
182
|
*/
|
|
183
|
+
// @cpt-begin:cpt-hai3-flow-framework-composition-teardown:p2:inst-1
|
|
169
184
|
destroyApp(plugins, app) {
|
|
170
185
|
[...plugins].reverse().forEach((plugin) => {
|
|
171
186
|
if (plugin.onDestroy) {
|
|
@@ -173,6 +188,7 @@ Add the missing plugin: .use(${depName}())`
|
|
|
173
188
|
}
|
|
174
189
|
});
|
|
175
190
|
}
|
|
191
|
+
// @cpt-end:cpt-hai3-flow-framework-composition-teardown:p2:inst-1
|
|
176
192
|
};
|
|
177
193
|
function createHAI3(config) {
|
|
178
194
|
return new HAI3AppBuilderImpl(config);
|
|
@@ -631,6 +647,8 @@ function themes(config) {
|
|
|
631
647
|
changeTheme
|
|
632
648
|
}
|
|
633
649
|
},
|
|
650
|
+
// @cpt-begin:cpt-hai3-flow-framework-composition-theme-propagation:p1:inst-2
|
|
651
|
+
// @cpt-begin:cpt-hai3-dod-framework-composition-propagation:p1:inst-1
|
|
634
652
|
onInit(app) {
|
|
635
653
|
eventBus.on("theme/changed", (payload) => {
|
|
636
654
|
themeRegistry.apply(payload.themeId);
|
|
@@ -645,6 +663,8 @@ function themes(config) {
|
|
|
645
663
|
themeRegistry.apply(themes2[0].id);
|
|
646
664
|
}
|
|
647
665
|
}
|
|
666
|
+
// @cpt-end:cpt-hai3-flow-framework-composition-theme-propagation:p1:inst-2
|
|
667
|
+
// @cpt-end:cpt-hai3-dod-framework-composition-propagation:p1:inst-1
|
|
648
668
|
};
|
|
649
669
|
}
|
|
650
670
|
|
|
@@ -746,6 +766,8 @@ function i18n() {
|
|
|
746
766
|
setLanguage
|
|
747
767
|
}
|
|
748
768
|
},
|
|
769
|
+
// @cpt-begin:cpt-hai3-flow-framework-composition-i18n-propagation:p1:inst-2
|
|
770
|
+
// @cpt-begin:cpt-hai3-dod-framework-composition-propagation:p1:inst-2
|
|
749
771
|
onInit(app) {
|
|
750
772
|
eventBus3.on("i18n/language/changed", async (payload) => {
|
|
751
773
|
await i18nRegistry2.setLanguage(payload.language);
|
|
@@ -759,6 +781,8 @@ function i18n() {
|
|
|
759
781
|
console.warn("[HAI3] Failed to load initial translations:", err);
|
|
760
782
|
});
|
|
761
783
|
}
|
|
784
|
+
// @cpt-end:cpt-hai3-flow-framework-composition-i18n-propagation:p1:inst-2
|
|
785
|
+
// @cpt-end:cpt-hai3-dod-framework-composition-propagation:p1:inst-2
|
|
762
786
|
};
|
|
763
787
|
}
|
|
764
788
|
|
|
@@ -859,7 +883,6 @@ import {
|
|
|
859
883
|
HAI3_ACTION_MOUNT_EXT as HAI3_ACTION_MOUNT_EXT3,
|
|
860
884
|
HAI3_ACTION_UNMOUNT_EXT as HAI3_ACTION_UNMOUNT_EXT3
|
|
861
885
|
} from "@hai3/screensets";
|
|
862
|
-
import { gtsPlugin } from "@hai3/screensets/plugins/gts";
|
|
863
886
|
import { getStore as getStore4 } from "@hai3/state";
|
|
864
887
|
|
|
865
888
|
// src/plugins/microfrontends/slice.ts
|
|
@@ -1087,9 +1110,9 @@ var overlayDomain = {
|
|
|
1087
1110
|
};
|
|
1088
1111
|
|
|
1089
1112
|
// src/plugins/microfrontends/index.ts
|
|
1090
|
-
function microfrontends(config
|
|
1113
|
+
function microfrontends(config) {
|
|
1091
1114
|
const screensetsRegistry2 = screensetsRegistryFactory.build({
|
|
1092
|
-
typeSystem:
|
|
1115
|
+
typeSystem: config.typeSystem,
|
|
1093
1116
|
mfeHandlers: config.mfeHandlers
|
|
1094
1117
|
});
|
|
1095
1118
|
const originalExecuteActionsChain = screensetsRegistry2.executeActionsChain.bind(screensetsRegistry2);
|
|
@@ -1150,15 +1173,18 @@ function microfrontends(config = {}) {
|
|
|
1150
1173
|
|
|
1151
1174
|
// src/presets/index.ts
|
|
1152
1175
|
function full(config) {
|
|
1153
|
-
|
|
1176
|
+
const plugins = [
|
|
1154
1177
|
effects(),
|
|
1155
1178
|
screensets({ autoDiscover: true }),
|
|
1156
1179
|
themes(config?.themes),
|
|
1157
1180
|
layout(),
|
|
1158
1181
|
i18n(),
|
|
1159
|
-
mock()
|
|
1160
|
-
microfrontends(config?.microfrontends)
|
|
1182
|
+
mock()
|
|
1161
1183
|
];
|
|
1184
|
+
if (config?.microfrontends) {
|
|
1185
|
+
plugins.push(microfrontends(config.microfrontends));
|
|
1186
|
+
}
|
|
1187
|
+
return plugins;
|
|
1162
1188
|
}
|
|
1163
1189
|
function minimal() {
|
|
1164
1190
|
return [
|
|
@@ -1187,7 +1213,8 @@ function createHAI3App(config) {
|
|
|
1187
1213
|
|
|
1188
1214
|
// src/index.ts
|
|
1189
1215
|
import {
|
|
1190
|
-
HAI3_SCREEN_EXTENSION_TYPE as HAI3_SCREEN_EXTENSION_TYPE2
|
|
1216
|
+
HAI3_SCREEN_EXTENSION_TYPE as HAI3_SCREEN_EXTENSION_TYPE2,
|
|
1217
|
+
HAI3_MFE_ENTRY_MF
|
|
1191
1218
|
} from "@hai3/screensets";
|
|
1192
1219
|
import {
|
|
1193
1220
|
HAI3_ACTION_LOAD_EXT as HAI3_ACTION_LOAD_EXT3,
|
|
@@ -1207,7 +1234,7 @@ import {
|
|
|
1207
1234
|
ContainerProvider
|
|
1208
1235
|
} from "@hai3/screensets";
|
|
1209
1236
|
import { MfeHandlerMF } from "@hai3/screensets/mfe/handler";
|
|
1210
|
-
import { gtsPlugin
|
|
1237
|
+
import { gtsPlugin } from "@hai3/screensets/plugins/gts";
|
|
1211
1238
|
import {
|
|
1212
1239
|
createShadowRoot,
|
|
1213
1240
|
injectCssVariables,
|
|
@@ -1351,6 +1378,7 @@ export {
|
|
|
1351
1378
|
HAI3_ACTION_LOAD_EXT3 as HAI3_ACTION_LOAD_EXT,
|
|
1352
1379
|
HAI3_ACTION_MOUNT_EXT4 as HAI3_ACTION_MOUNT_EXT,
|
|
1353
1380
|
HAI3_ACTION_UNMOUNT_EXT4 as HAI3_ACTION_UNMOUNT_EXT,
|
|
1381
|
+
HAI3_MFE_ENTRY_MF,
|
|
1354
1382
|
HAI3_OVERLAY_DOMAIN,
|
|
1355
1383
|
HAI3_POPUP_DOMAIN,
|
|
1356
1384
|
HAI3_SCREEN_DOMAIN,
|
|
@@ -1421,7 +1449,7 @@ export {
|
|
|
1421
1449
|
getLanguageMetadata,
|
|
1422
1450
|
getLayoutDomainState,
|
|
1423
1451
|
getStore7 as getStore,
|
|
1424
|
-
|
|
1452
|
+
gtsPlugin,
|
|
1425
1453
|
hasLegacyUicoreState,
|
|
1426
1454
|
hasNewLayoutState,
|
|
1427
1455
|
hasSlice,
|