@alicloud/alfa-react 1.4.6 → 1.4.7

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,10 @@ export default function createApplication(loader) {
86
86
  };
87
87
  }, []);
88
88
  useEffect(function () {
89
+ var App;
90
+
89
91
  _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
90
- var _yield$loader$registe, App, logger;
92
+ var _yield$loader$registe, app, logger;
91
93
 
92
94
  return _regeneratorRuntime.wrap(function _callee$(_context) {
93
95
  while (1) {
@@ -100,11 +102,12 @@ export default function createApplication(loader) {
100
102
 
101
103
  case 2:
102
104
  _yield$loader$registe = _context.sent;
103
- App = _yield$loader$registe.app;
105
+ app = _yield$loader$registe.app;
104
106
  logger = _yield$loader$registe.logger;
107
+ App = app;
105
108
 
106
- if (App) {
107
- _context.next = 7;
109
+ if (app) {
110
+ _context.next = 8;
108
111
  break;
109
112
  }
110
113
 
@@ -113,9 +116,9 @@ export default function createApplication(loader) {
113
116
  E_MSG: 'load app failed.'
114
117
  }));
115
118
 
116
- case 7:
119
+ case 8:
117
120
  if (appRef.current) {
118
- _context.next = 9;
121
+ _context.next = 10;
119
122
  break;
120
123
  }
121
124
 
@@ -124,16 +127,16 @@ export default function createApplication(loader) {
124
127
  E_MSG: 'cannot find container.'
125
128
  }));
126
129
 
127
- case 9:
128
- _context.next = 11;
129
- return App.mount(appRef.current, {
130
+ case 10:
131
+ _context.next = 12;
132
+ return app.mount(appRef.current, {
130
133
  customProps: customProps
131
134
  });
132
135
 
133
- case 11:
134
- setApp(App);
135
-
136
136
  case 12:
137
+ setApp(app);
138
+
139
+ case 13:
137
140
  case "end":
138
141
  return _context.stop();
139
142
  }
@@ -146,7 +149,7 @@ export default function createApplication(loader) {
146
149
  });
147
150
 
148
151
  return function () {
149
- app && app.unmount();
152
+ App && App.unmount();
150
153
  };
151
154
  }, [memoOptions]);
152
155
 
package/es/version.js CHANGED
@@ -1 +1 @@
1
- export var version = '1.4.6';
1
+ export var version = '1.4.7';
@@ -108,8 +108,9 @@ function createApplication(loader) {
108
108
  };
109
109
  }, []);
110
110
  (0, _react.useEffect)(function () {
111
+ var App;
111
112
  (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
112
- var _yield$loader$registe, App, logger;
113
+ var _yield$loader$registe, app, logger;
113
114
 
114
115
  return _regenerator.default.wrap(function _callee$(_context) {
115
116
  while (1) {
@@ -122,11 +123,12 @@ function createApplication(loader) {
122
123
 
123
124
  case 2:
124
125
  _yield$loader$registe = _context.sent;
125
- App = _yield$loader$registe.app;
126
+ app = _yield$loader$registe.app;
126
127
  logger = _yield$loader$registe.logger;
128
+ App = app;
127
129
 
128
- if (App) {
129
- _context.next = 7;
130
+ if (app) {
131
+ _context.next = 8;
130
132
  break;
131
133
  }
132
134
 
@@ -135,9 +137,9 @@ function createApplication(loader) {
135
137
  E_MSG: 'load app failed.'
136
138
  }));
137
139
 
138
- case 7:
140
+ case 8:
139
141
  if (appRef.current) {
140
- _context.next = 9;
142
+ _context.next = 10;
141
143
  break;
142
144
  }
143
145
 
@@ -146,16 +148,16 @@ function createApplication(loader) {
146
148
  E_MSG: 'cannot find container.'
147
149
  }));
148
150
 
149
- case 9:
150
- _context.next = 11;
151
- return App.mount(appRef.current, {
151
+ case 10:
152
+ _context.next = 12;
153
+ return app.mount(appRef.current, {
152
154
  customProps: customProps
153
155
  });
154
156
 
155
- case 11:
156
- setApp(App);
157
-
158
157
  case 12:
158
+ setApp(app);
159
+
160
+ case 13:
159
161
  case "end":
160
162
  return _context.stop();
161
163
  }
@@ -167,7 +169,7 @@ function createApplication(loader) {
167
169
  });
168
170
  });
169
171
  return function () {
170
- app && app.unmount();
172
+ App && App.unmount();
171
173
  };
172
174
  }, [memoOptions]);
173
175
 
package/lib/version.js CHANGED
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = void 0;
7
- var version = '1.4.6';
7
+ var version = '1.4.7';
8
8
  exports.version = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/alfa-react",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "Alfa Framework (React Version)",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -37,10 +37,11 @@
37
37
  "react": "^16.9.0",
38
38
  "react-dom": "^16.9.0",
39
39
  "ts-jest": "^23.10.5",
40
+ "tslib": "^2.4.0",
40
41
  "typescript": "^3.0.3"
41
42
  },
42
43
  "dependencies": {
43
- "@alicloud/alfa-core": "^1.4.5",
44
+ "@alicloud/alfa-core": "^1.4.7",
44
45
  "@alicloud/console-os-loader": "^1.2.3",
45
46
  "@alicloud/widget-utils-console": "^0.1.6",
46
47
  "classnames": "^2.2.6",
@@ -49,5 +50,5 @@
49
50
  "peerDependencies": {
50
51
  "react": "^16 | ^17"
51
52
  },
52
- "gitHead": "9c6fffdb53e1b42c98b80e3f4eb896a3e2ee0c86"
53
+ "gitHead": "e709647e402cd7cc1ee465156505552215a22db5"
53
54
  }
@@ -1 +1 @@
1
- export declare const version = "1.4.6";
1
+ export declare const version = "1.4.7";