chayns-api 1.2.0-13 → 1.2.0-14

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.
@@ -86,8 +86,7 @@ const ChaynsHost = ({
86
86
  customData: customData,
87
87
  environment: environment,
88
88
  preventStagingReplacement: preventStagingReplacement,
89
- dialog: dialog,
90
- shareScope: shareScope
89
+ dialog: dialog
91
90
  });
92
91
  default:
93
92
  return null;
@@ -15,6 +15,7 @@ const System = ({
15
15
  fallback,
16
16
  ...props
17
17
  }) => {
18
+ console.log("share3", system, system.shareScope);
18
19
  const Component = (0, _react.useMemo)(() => (0, _loadComponent.default)(system.scope, system.module, globalThis.window ? system.url : system.serverUrl, undefined, system.preventSingleton, system.shareScope), [system.scope, system.module, system.url, system.serverUrl, system.preventSingleton]);
19
20
  return /*#__PURE__*/_react.default.createElement(_react.default.Suspense, {
20
21
  fallback: fallback || ''
@@ -66,7 +67,8 @@ const ModuleHost = ({
66
67
  url: (0, _url.replaceStagingUrl)(preventStagingReplacement, system.url, environment.buildEnvironment),
67
68
  serverUrl: (0, _url.replaceStagingUrl)(preventStagingReplacement, system.serverUrl, environment.buildEnvironment),
68
69
  module: system.module,
69
- preventSingleton: system.preventSingleton
70
+ preventSingleton: system.preventSingleton,
71
+ shareScope: system.shareScope
70
72
  },
71
73
  data: initialData,
72
74
  functions: functions,
@@ -8,6 +8,7 @@ var _semver = _interopRequireDefault(require("semver"));
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
10
  const loadModule = (scope, module, url, preventSingleton = false, shareScope = 'chayns-api2') => {
11
+ console.log("share2", shareScope);
11
12
  const {
12
13
  loadRemote,
13
14
  registerRemotes
@@ -53,6 +54,7 @@ const loadModule = (scope, module, url, preventSingleton = false, shareScope = '
53
54
  };
54
55
  exports.loadModule = loadModule;
55
56
  const loadComponent = (scope, module, url, skipCompatMode = false, preventSingleton = false, shareScope) => {
57
+ console.log("share1", shareScope);
56
58
  if (skipCompatMode) {
57
59
  console.warn('[chayns-api] skipCompatMode-option is deprecated and is set automatically now');
58
60
  }
@@ -78,8 +78,7 @@ const ChaynsHost = _ref => {
78
78
  customData: customData,
79
79
  environment: environment,
80
80
  preventStagingReplacement: preventStagingReplacement,
81
- dialog: dialog,
82
- shareScope: shareScope
81
+ dialog: dialog
83
82
  });
84
83
  default:
85
84
  return null;
@@ -7,6 +7,7 @@ const System = _ref => {
7
7
  fallback,
8
8
  ...props
9
9
  } = _ref;
10
+ console.log("share3", system, system.shareScope);
10
11
  const Component = useMemo(() => loadComponent(system.scope, system.module, globalThis.window ? system.url : system.serverUrl, undefined, system.preventSingleton, system.shareScope), [system.scope, system.module, system.url, system.serverUrl, system.preventSingleton]);
11
12
  return /*#__PURE__*/React.createElement(React.Suspense, {
12
13
  fallback: fallback || ''
@@ -59,7 +60,8 @@ const ModuleHost = _ref2 => {
59
60
  url: replaceStagingUrl(preventStagingReplacement, system.url, environment.buildEnvironment),
60
61
  serverUrl: replaceStagingUrl(preventStagingReplacement, system.serverUrl, environment.buildEnvironment),
61
62
  module: system.module,
62
- preventSingleton: system.preventSingleton
63
+ preventSingleton: system.preventSingleton,
64
+ shareScope: system.shareScope
63
65
  },
64
66
  data: initialData,
65
67
  functions: functions,
@@ -3,6 +3,7 @@ import React from "react";
3
3
  export const loadModule = function (scope, module, url) {
4
4
  let preventSingleton = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
5
5
  let shareScope = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'chayns-api2';
6
+ console.log("share2", shareScope);
6
7
  const {
7
8
  loadRemote,
8
9
  registerRemotes
@@ -50,6 +51,7 @@ const loadComponent = function (scope, module, url) {
50
51
  let skipCompatMode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
51
52
  let preventSingleton = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
52
53
  let shareScope = arguments.length > 5 ? arguments[5] : undefined;
54
+ console.log("share1", shareScope);
53
55
  if (skipCompatMode) {
54
56
  console.warn('[chayns-api] skipCompatMode-option is deprecated and is set automatically now');
55
57
  }
@@ -24,7 +24,6 @@ type ModulePropTypes = {
24
24
  preventStagingReplacement?: boolean;
25
25
  dialog: ChaynsReactValues["dialog"];
26
26
  children?: ReactNode;
27
- shareScope?: string;
28
27
  };
29
28
  declare const ModuleHost: FC<ModulePropTypes>;
30
29
  export default ModuleHost;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "1.2.0-13",
3
+ "version": "1.2.0-14",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",