chayns-api 1.2.0-11 → 1.2.0-13
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/host/ChaynsHost.js +4 -2
- package/dist/cjs/host/module/utils/loadComponent.js +6 -0
- package/dist/esm/host/ChaynsHost.js +4 -2
- package/dist/esm/host/module/utils/loadComponent.js +6 -0
- package/dist/types/host/ChaynsHost.d.ts +1 -0
- package/dist/types/host/module/ModuleHost.d.ts +1 -0
- package/package.json +1 -1
|
@@ -30,7 +30,8 @@ const ChaynsHost = ({
|
|
|
30
30
|
customData,
|
|
31
31
|
environment,
|
|
32
32
|
preventStagingReplacement,
|
|
33
|
-
dialog
|
|
33
|
+
dialog,
|
|
34
|
+
shareScope
|
|
34
35
|
}) => {
|
|
35
36
|
const [isVisible, setIsVisible] = (0, _react.useState)(type !== 'client-module' && (type !== 'server-module' || !!(system !== null && system !== void 0 && system.serverUrl)));
|
|
36
37
|
(0, _react.useEffect)(() => {
|
|
@@ -85,7 +86,8 @@ const ChaynsHost = ({
|
|
|
85
86
|
customData: customData,
|
|
86
87
|
environment: environment,
|
|
87
88
|
preventStagingReplacement: preventStagingReplacement,
|
|
88
|
-
dialog: dialog
|
|
89
|
+
dialog: dialog,
|
|
90
|
+
shareScope: shareScope
|
|
89
91
|
});
|
|
90
92
|
default:
|
|
91
93
|
return null;
|
|
@@ -21,6 +21,12 @@ const loadModule = (scope, module, url, preventSingleton = false, shareScope = '
|
|
|
21
21
|
if (scope in registeredScopes) {
|
|
22
22
|
console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
|
|
23
23
|
}
|
|
24
|
+
console.log("register remote ", {
|
|
25
|
+
shareScope,
|
|
26
|
+
name: scope,
|
|
27
|
+
entry: url,
|
|
28
|
+
alias: scope
|
|
29
|
+
});
|
|
24
30
|
registerRemotes([{
|
|
25
31
|
shareScope,
|
|
26
32
|
name: scope,
|
|
@@ -22,7 +22,8 @@ const ChaynsHost = _ref => {
|
|
|
22
22
|
customData,
|
|
23
23
|
environment,
|
|
24
24
|
preventStagingReplacement,
|
|
25
|
-
dialog
|
|
25
|
+
dialog,
|
|
26
|
+
shareScope
|
|
26
27
|
} = _ref;
|
|
27
28
|
const [isVisible, setIsVisible] = useState(type !== 'client-module' && (type !== 'server-module' || !!(system !== null && system !== void 0 && system.serverUrl)));
|
|
28
29
|
useEffect(() => {
|
|
@@ -77,7 +78,8 @@ const ChaynsHost = _ref => {
|
|
|
77
78
|
customData: customData,
|
|
78
79
|
environment: environment,
|
|
79
80
|
preventStagingReplacement: preventStagingReplacement,
|
|
80
|
-
dialog: dialog
|
|
81
|
+
dialog: dialog,
|
|
82
|
+
shareScope: shareScope
|
|
81
83
|
});
|
|
82
84
|
default:
|
|
83
85
|
return null;
|
|
@@ -16,6 +16,12 @@ export const loadModule = function (scope, module, url) {
|
|
|
16
16
|
if (scope in registeredScopes) {
|
|
17
17
|
console.error(`[chayns-api] call registerRemote with force for scope ${scope}. url: ${url}`);
|
|
18
18
|
}
|
|
19
|
+
console.log("register remote ", {
|
|
20
|
+
shareScope,
|
|
21
|
+
name: scope,
|
|
22
|
+
entry: url,
|
|
23
|
+
alias: scope
|
|
24
|
+
});
|
|
19
25
|
registerRemotes([{
|
|
20
26
|
shareScope,
|
|
21
27
|
name: scope,
|
|
@@ -24,6 +24,7 @@ type ChaynsHostType = {
|
|
|
24
24
|
environment: ChaynsReactValues["environment"];
|
|
25
25
|
preventStagingReplacement?: boolean;
|
|
26
26
|
dialog: ChaynsReactValues["dialog"];
|
|
27
|
+
shareScope?: string;
|
|
27
28
|
};
|
|
28
29
|
declare const ChaynsHost: FC<ChaynsHostType>;
|
|
29
30
|
export default ChaynsHost;
|