@alicloud/alfa-react 2.0.0-alpha.1 → 2.0.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.
@@ -12,7 +12,6 @@ import { createCWSWidget } from './widget';
12
12
  import createApplication from './createApplication';
13
13
  import beforeResolveHook from './loaders/beforeResolveHook';
14
14
  import beforeLoadHook from './loaders/beforeLoadHook';
15
- import { isOneConsole } from './helpers/oneConsole';
16
15
  import Loading from './components/Loading';
17
16
  import { IS_SSR } from './utils';
18
17
  var loader = BaseLoader.create();
@@ -50,7 +49,8 @@ function createAlfaWidget(option) {
50
49
  manifest = _ref2.manifest,
51
50
  loading = _ref2.loading,
52
51
  lazyLoad = _ref2.lazyLoad,
53
- delay = _ref2.delay;
52
+ delay = _ref2.delay,
53
+ sandbox = _ref2.sandbox;
54
54
  if (name.match(/@ali\/widget-/)) {
55
55
  // TODO load style
56
56
  return createCWSWidget(option);
@@ -84,13 +84,11 @@ function createAlfaWidget(option) {
84
84
  };
85
85
  }();
86
86
  }
87
- var passedInOption = _objectSpread({}, option);
88
-
89
- // 非 oneConsole 环境下设置 iframe 沙箱地址为 about:blank
90
- // 避免沙箱创建失败
91
- if (passedInOption.sandbox && !passedInOption.sandbox.sandBoxUrl && !isOneConsole()) {
92
- passedInOption.sandbox.sandBoxUrl = 'about:blank';
93
- }
87
+ var passedInOption = _objectSpread(_objectSpread({}, option), {}, {
88
+ sandbox: _objectSpread(_objectSpread({}, sandbox), {}, {
89
+ sandBoxUrl: 'about:blank'
90
+ })
91
+ });
94
92
  var useDelay = function useDelay() {
95
93
  return useMemo(function () {
96
94
  if (typeof delay === 'number') {
package/es/version.js CHANGED
@@ -1 +1 @@
1
- export var version = '2.0.0-alpha.1';
1
+ export var version = '2.0.1';
@@ -20,7 +20,6 @@ var _widget = require("./widget");
20
20
  var _createApplication = _interopRequireDefault(require("./createApplication"));
21
21
  var _beforeResolveHook = _interopRequireDefault(require("./loaders/beforeResolveHook"));
22
22
  var _beforeLoadHook = _interopRequireDefault(require("./loaders/beforeLoadHook"));
23
- var _oneConsole = require("./helpers/oneConsole");
24
23
  var _Loading = _interopRequireDefault(require("./components/Loading"));
25
24
  var _utils = require("./utils");
26
25
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -62,7 +61,8 @@ function createAlfaWidget(option) {
62
61
  manifest = _ref2.manifest,
63
62
  loading = _ref2.loading,
64
63
  lazyLoad = _ref2.lazyLoad,
65
- delay = _ref2.delay;
64
+ delay = _ref2.delay,
65
+ sandbox = _ref2.sandbox;
66
66
  if (name.match(/@ali\/widget-/)) {
67
67
  // TODO load style
68
68
  return (0, _widget.createCWSWidget)(option);
@@ -96,13 +96,11 @@ function createAlfaWidget(option) {
96
96
  };
97
97
  }();
98
98
  }
99
- var passedInOption = _objectSpread({}, option);
100
-
101
- // 非 oneConsole 环境下设置 iframe 沙箱地址为 about:blank
102
- // 避免沙箱创建失败
103
- if (passedInOption.sandbox && !passedInOption.sandbox.sandBoxUrl && !(0, _oneConsole.isOneConsole)()) {
104
- passedInOption.sandbox.sandBoxUrl = 'about:blank';
105
- }
99
+ var passedInOption = _objectSpread(_objectSpread({}, option), {}, {
100
+ sandbox: _objectSpread(_objectSpread({}, sandbox), {}, {
101
+ sandBoxUrl: 'about:blank'
102
+ })
103
+ });
106
104
  var useDelay = function useDelay() {
107
105
  return (0, _react.useMemo)(function () {
108
106
  if (typeof delay === 'number') {
package/lib/version.js CHANGED
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = void 0;
7
- var version = exports.version = '2.0.0-alpha.1';
7
+ var version = exports.version = '2.0.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/alfa-react",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.1",
4
4
  "description": "Alfa Framework (React Version)",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -52,8 +52,8 @@
52
52
  "lodash-es": "^4.17.21",
53
53
  "prop-types": "^15.8.1",
54
54
  "react-lazyload": "^3.2.1",
55
- "@alicloud/console-os-loader": "^1.4.45-alpha.1",
56
- "@alicloud/alfa-core": "^1.5.0-alpha.8"
55
+ "@alicloud/alfa-core": "^1.5.0",
56
+ "@alicloud/console-os-loader": "^1.4.45-alpha.1"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "react": ">=16.0.0",
@@ -1 +1 @@
1
- export declare const version = "2.0.0-alpha.1";
1
+ export declare const version = "2.0.1";