@alicloud/alfa-react 1.5.1-alpha.2 → 1.5.1-alpha.4
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/es/components/ErrorBoundary/ErrorPanel.js +1 -1
- package/es/createApplication.js +9 -1
- package/es/version.js +1 -1
- package/lib/components/ErrorBoundary/ErrorPanel.js +1 -1
- package/lib/createApplication.js +9 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/types/createApplication.d.ts +1 -0
- package/types/version.d.ts +1 -1
|
@@ -2,11 +2,11 @@ import React from 'react';
|
|
|
2
2
|
var padding = 24;
|
|
3
3
|
var containerBackground = '#fcebea';
|
|
4
4
|
var containerStyle = {
|
|
5
|
+
display: 'none',
|
|
5
6
|
background: containerBackground,
|
|
6
7
|
padding: padding
|
|
7
8
|
};
|
|
8
9
|
var commonErrorStyle = {
|
|
9
|
-
display: 'none',
|
|
10
10
|
lineHeight: '22px',
|
|
11
11
|
color: '#d93026',
|
|
12
12
|
fontSize: 14
|
package/es/createApplication.js
CHANGED
|
@@ -97,9 +97,11 @@ export default function createApplication(loader) {
|
|
|
97
97
|
setReleaseVersion = _useState6[1];
|
|
98
98
|
$syncHistory.current = syncHistory;
|
|
99
99
|
$basename.current = basename;
|
|
100
|
-
|
|
100
|
+
|
|
101
|
+
// if (customProps.__innerStamp) console.warn('Please do not use __innerStamp which used in internal.');
|
|
101
102
|
// 更新标记,保证每次更新都会更新
|
|
102
103
|
customProps.__innerStamp = (+new Date()).toString(36);
|
|
104
|
+
customProps.__historyState = history.state;
|
|
103
105
|
if (customProps.path) customProps.path = addLeftSlash(customProps.path);
|
|
104
106
|
|
|
105
107
|
// 受控模式锁定一些参数
|
|
@@ -174,6 +176,12 @@ export default function createApplication(loader) {
|
|
|
174
176
|
popstateEvent.state = history.state;
|
|
175
177
|
(_App = App) === null || _App === void 0 ? void 0 : (_App$context$baseFram = _App.context.baseFrame) === null || _App$context$baseFram === void 0 ? void 0 : (_App$context$baseFram2 = _App$context$baseFram.contentWindow) === null || _App$context$baseFram2 === void 0 ? void 0 : _App$context$baseFram2.dispatchEvent(popstateEvent);
|
|
176
178
|
};
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* 因为要兼容历史逻辑,所以这段逻辑并不会执行
|
|
182
|
+
* react-router 的路由监听 callback 会先执行并更新子应用内部路由
|
|
183
|
+
* @returns
|
|
184
|
+
*/
|
|
177
185
|
var updateAppHistory = function updateAppHistory() {
|
|
178
186
|
if (App) {
|
|
179
187
|
var nextPath = peelPath(App.context.location);
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var version = '1.5.1-alpha.
|
|
1
|
+
export var version = '1.5.1-alpha.4';
|
|
@@ -9,11 +9,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var padding = 24;
|
|
10
10
|
var containerBackground = '#fcebea';
|
|
11
11
|
var containerStyle = {
|
|
12
|
+
display: 'none',
|
|
12
13
|
background: containerBackground,
|
|
13
14
|
padding: padding
|
|
14
15
|
};
|
|
15
16
|
var commonErrorStyle = {
|
|
16
|
-
display: 'none',
|
|
17
17
|
lineHeight: '22px',
|
|
18
18
|
color: '#d93026',
|
|
19
19
|
fontSize: 14
|
package/lib/createApplication.js
CHANGED
|
@@ -107,9 +107,11 @@ function createApplication(loader) {
|
|
|
107
107
|
setReleaseVersion = _useState6[1];
|
|
108
108
|
$syncHistory.current = syncHistory;
|
|
109
109
|
$basename.current = basename;
|
|
110
|
-
|
|
110
|
+
|
|
111
|
+
// if (customProps.__innerStamp) console.warn('Please do not use __innerStamp which used in internal.');
|
|
111
112
|
// 更新标记,保证每次更新都会更新
|
|
112
113
|
customProps.__innerStamp = (+new Date()).toString(36);
|
|
114
|
+
customProps.__historyState = history.state;
|
|
113
115
|
if (customProps.path) customProps.path = addLeftSlash(customProps.path);
|
|
114
116
|
|
|
115
117
|
// 受控模式锁定一些参数
|
|
@@ -184,6 +186,12 @@ function createApplication(loader) {
|
|
|
184
186
|
popstateEvent.state = history.state;
|
|
185
187
|
(_App = App) === null || _App === void 0 ? void 0 : (_App$context$baseFram = _App.context.baseFrame) === null || _App$context$baseFram === void 0 ? void 0 : (_App$context$baseFram2 = _App$context$baseFram.contentWindow) === null || _App$context$baseFram2 === void 0 ? void 0 : _App$context$baseFram2.dispatchEvent(popstateEvent);
|
|
186
188
|
};
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* 因为要兼容历史逻辑,所以这段逻辑并不会执行
|
|
192
|
+
* react-router 的路由监听 callback 会先执行并更新子应用内部路由
|
|
193
|
+
* @returns
|
|
194
|
+
*/
|
|
187
195
|
var updateAppHistory = function updateAppHistory() {
|
|
188
196
|
if (App) {
|
|
189
197
|
var nextPath = peelPath(App.context.location);
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alicloud/alfa-react",
|
|
3
|
-
"version": "1.5.1-alpha.
|
|
3
|
+
"version": "1.5.1-alpha.4",
|
|
4
4
|
"description": "Alfa Framework (React Version)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"classnames": "^2.2.6",
|
|
37
37
|
"crypto-js": "^4.1.1",
|
|
38
38
|
"prop-types": "^15.8.1",
|
|
39
|
-
"@alicloud/
|
|
40
|
-
"@alicloud/
|
|
39
|
+
"@alicloud/alfa-core": "1.4.32",
|
|
40
|
+
"@alicloud/console-os-loader": "1.4.30-alpha.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": ">=16.0.0"
|
package/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.5.1-alpha.
|
|
1
|
+
export declare const version = "1.5.1-alpha.4";
|