@alicloud/alfa-react 1.4.7 → 1.4.9
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/index.js +5 -5
- package/es/addGlobalRequestInterceptor.js +4 -0
- package/es/createApplication.js +7 -3
- package/es/index.js +2 -1
- package/es/version.js +1 -1
- package/lib/addGlobalRequestInterceptor.js +12 -0
- package/lib/createApplication.js +7 -3
- package/lib/index.js +8 -0
- package/lib/version.js +1 -1
- package/package.json +4 -3
- package/types/addGlobalRequestInterceptor.d.ts +2 -0
- package/types/index.d.ts +1 -0
- package/types/version.d.ts +1 -1
package/es/createApplication.js
CHANGED
|
@@ -89,6 +89,8 @@ export default function createApplication(loader) {
|
|
|
89
89
|
var App;
|
|
90
90
|
|
|
91
91
|
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
92
|
+
var _app$context$updateBo, _app$context;
|
|
93
|
+
|
|
92
94
|
var _yield$loader$registe, app, logger;
|
|
93
95
|
|
|
94
96
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -128,15 +130,17 @@ export default function createApplication(loader) {
|
|
|
128
130
|
}));
|
|
129
131
|
|
|
130
132
|
case 10:
|
|
131
|
-
|
|
133
|
+
// update body in sandbox context
|
|
134
|
+
(_app$context$updateBo = (_app$context = app.context).updateBody) === null || _app$context$updateBo === void 0 ? void 0 : _app$context$updateBo.call(_app$context, memoOptions.sandbox.disableFakeBody ? document.body : appRef.current);
|
|
135
|
+
_context.next = 13;
|
|
132
136
|
return app.mount(appRef.current, {
|
|
133
137
|
customProps: customProps
|
|
134
138
|
});
|
|
135
139
|
|
|
136
|
-
case
|
|
140
|
+
case 13:
|
|
137
141
|
setApp(app);
|
|
138
142
|
|
|
139
|
-
case
|
|
143
|
+
case 14:
|
|
140
144
|
case "end":
|
|
141
145
|
return _context.stop();
|
|
142
146
|
}
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as createAlfaApp } from './createAlfaApp';
|
|
2
2
|
export { default as createAlfaWidget } from './createAlfaWidget';
|
|
3
|
-
export { eventEmitter as widgetEventEmitter } from './widget/index';
|
|
3
|
+
export { eventEmitter as widgetEventEmitter } from './widget/index';
|
|
4
|
+
export { default as addGlobalRequestInterceptor } from './addGlobalRequestInterceptor'; // todo
|
|
4
5
|
|
|
5
6
|
export { createEventBus, prefetch } from '@alicloud/alfa-core';
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var version = '1.4.
|
|
1
|
+
export var version = '1.4.9';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = addGlobalRequestInterceptor;
|
|
7
|
+
|
|
8
|
+
var _alfaCore = require("@alicloud/alfa-core");
|
|
9
|
+
|
|
10
|
+
function addGlobalRequestInterceptor(interceptor) {
|
|
11
|
+
(0, _alfaCore.addRequestInterceptor)(interceptor);
|
|
12
|
+
}
|
package/lib/createApplication.js
CHANGED
|
@@ -110,6 +110,8 @@ function createApplication(loader) {
|
|
|
110
110
|
(0, _react.useEffect)(function () {
|
|
111
111
|
var App;
|
|
112
112
|
(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
113
|
+
var _app$context$updateBo, _app$context;
|
|
114
|
+
|
|
113
115
|
var _yield$loader$registe, app, logger;
|
|
114
116
|
|
|
115
117
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
@@ -149,15 +151,17 @@ function createApplication(loader) {
|
|
|
149
151
|
}));
|
|
150
152
|
|
|
151
153
|
case 10:
|
|
152
|
-
|
|
154
|
+
// update body in sandbox context
|
|
155
|
+
(_app$context$updateBo = (_app$context = app.context).updateBody) === null || _app$context$updateBo === void 0 ? void 0 : _app$context$updateBo.call(_app$context, memoOptions.sandbox.disableFakeBody ? document.body : appRef.current);
|
|
156
|
+
_context.next = 13;
|
|
153
157
|
return app.mount(appRef.current, {
|
|
154
158
|
customProps: customProps
|
|
155
159
|
});
|
|
156
160
|
|
|
157
|
-
case
|
|
161
|
+
case 13:
|
|
158
162
|
setApp(app);
|
|
159
163
|
|
|
160
|
-
case
|
|
164
|
+
case 14:
|
|
161
165
|
case "end":
|
|
162
166
|
return _context.stop();
|
|
163
167
|
}
|
package/lib/index.js
CHANGED
|
@@ -5,6 +5,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
Object.defineProperty(exports, "addGlobalRequestInterceptor", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _addGlobalRequestInterceptor.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
8
14
|
Object.defineProperty(exports, "createAlfaApp", {
|
|
9
15
|
enumerable: true,
|
|
10
16
|
get: function get() {
|
|
@@ -42,4 +48,6 @@ var _createAlfaWidget = _interopRequireDefault(require("./createAlfaWidget"));
|
|
|
42
48
|
|
|
43
49
|
var _index = require("./widget/index");
|
|
44
50
|
|
|
51
|
+
var _addGlobalRequestInterceptor = _interopRequireDefault(require("./addGlobalRequestInterceptor"));
|
|
52
|
+
|
|
45
53
|
var _alfaCore = require("@alicloud/alfa-core");
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alicloud/alfa-react",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.9",
|
|
4
4
|
"description": "Alfa Framework (React Version)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@alicloud/console-toolkit-cli": "^1.0.0",
|
|
27
27
|
"@alicloud/console-toolkit-preset-wind-component": "^1.0.0",
|
|
28
|
+
"@types/axios": "^0.14.0",
|
|
28
29
|
"@types/chai": "^4.1.7",
|
|
29
30
|
"@types/classnames": "^2.2.9",
|
|
30
31
|
"@types/crypto-js": "^4.0.2",
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
"typescript": "^3.0.3"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@alicloud/alfa-core": "^1.4.
|
|
45
|
+
"@alicloud/alfa-core": "^1.4.9",
|
|
45
46
|
"@alicloud/console-os-loader": "^1.2.3",
|
|
46
47
|
"@alicloud/widget-utils-console": "^0.1.6",
|
|
47
48
|
"classnames": "^2.2.6",
|
|
@@ -50,5 +51,5 @@
|
|
|
50
51
|
"peerDependencies": {
|
|
51
52
|
"react": "^16 | ^17"
|
|
52
53
|
},
|
|
53
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "31e6b6de12d7118159ebc489b59439088370b83d"
|
|
54
55
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as createAlfaApp } from './createAlfaApp';
|
|
2
2
|
export { default as createAlfaWidget } from './createAlfaWidget';
|
|
3
3
|
export { eventEmitter as widgetEventEmitter } from './widget/index';
|
|
4
|
+
export { default as addGlobalRequestInterceptor } from './addGlobalRequestInterceptor';
|
|
4
5
|
export { createEventBus, prefetch } from '@alicloud/alfa-core';
|
package/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.4.
|
|
1
|
+
export declare const version = "1.4.9";
|