@alicloud/alfa-react 1.4.14 → 1.4.15
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 +1 -1
- package/es/hooks/beforeLoadHook.js +4 -4
- package/es/utils/getConsoleConfig.js +3 -3
- package/es/version.js +1 -1
- package/lib/hooks/beforeLoadHook.js +4 -4
- package/lib/utils/getConsoleConfig.js +3 -3
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/types/utils/getConsoleConfig.d.ts +22 -10
- package/types/version.d.ts +1 -1
|
@@ -17,13 +17,13 @@ function afterLoadHook(_x) {
|
|
|
17
17
|
|
|
18
18
|
function _afterLoadHook() {
|
|
19
19
|
_afterLoadHook = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(appConfig) {
|
|
20
|
-
var app, logger, defaultConsoleConfig, defaultConsoleGlobal, CONFIG_START_TIME, configData, _yield$Promise$all, _yield$Promise$all2, consoleConfig, consoleGlobal, messages, CONFIG_END_TIME, i18nMessages, END_TIME;
|
|
20
|
+
var app, logger, sandbox, defaultConsoleConfig, defaultConsoleGlobal, CONFIG_START_TIME, configData, _yield$Promise$all, _yield$Promise$all2, consoleConfig, consoleGlobal, messages, CONFIG_END_TIME, i18nMessages, END_TIME;
|
|
21
21
|
|
|
22
22
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
23
23
|
while (1) {
|
|
24
24
|
switch (_context.prev = _context.next) {
|
|
25
25
|
case 0:
|
|
26
|
-
app = appConfig.app, logger = appConfig.logger;
|
|
26
|
+
app = appConfig.app, logger = appConfig.logger, sandbox = appConfig.sandbox;
|
|
27
27
|
defaultConsoleConfig = window.ALIYUN_CONSOLE_CONFIG || {};
|
|
28
28
|
defaultConsoleGlobal = window.ALIYUN_CONSOLE_GLOBAL || {};
|
|
29
29
|
CONFIG_START_TIME = Date.now();
|
|
@@ -42,9 +42,9 @@ function _afterLoadHook() {
|
|
|
42
42
|
consoleGlobal = _yield$Promise$all2[1];
|
|
43
43
|
messages = _yield$Promise$all2[2];
|
|
44
44
|
CONFIG_END_TIME = Date.now();
|
|
45
|
-
i18nMessages = _objectSpread(_objectSpread({}, window.ALIYUN_CONSOLE_I18N_MESSAGE), messages); // inject global variables
|
|
45
|
+
i18nMessages = _objectSpread(_objectSpread({}, window.ALIYUN_CONSOLE_I18N_MESSAGE), messages); // inject global variables when sandbox is valid
|
|
46
46
|
|
|
47
|
-
if (app && app.context) {
|
|
47
|
+
if (app !== null && app !== void 0 && app.context && !(sandbox !== null && sandbox !== void 0 && sandbox.disable)) {
|
|
48
48
|
app.context.window.ALIYUN_CONSOLE_CONFIG = consoleConfig;
|
|
49
49
|
app.context.window.ALIYUN_CONSOLE_GLOBAL = consoleGlobal;
|
|
50
50
|
app.context.window.ALIYUN_CONSOLE_I18N_MESSAGE = i18nMessages;
|
|
@@ -82,9 +82,9 @@ var mergeConfigDataWithConsoleConfig = function mergeConfigDataWithConsoleConfig
|
|
|
82
82
|
var channelFeatures = configData.ALL_CHANNEL_FEATURE_STATUS;
|
|
83
83
|
var features = configData.ALL_FEATURE_STATUS;
|
|
84
84
|
return _objectSpread(_objectSpread({}, consoleConfig), {}, {
|
|
85
|
-
CHANNEL_LINKS:
|
|
86
|
-
CHANNEL_FEATURE_STATUS:
|
|
87
|
-
FEATURE_STATUS:
|
|
85
|
+
CHANNEL_LINKS: _objectSpread(_objectSpread({}, consoleConfig === null || consoleConfig === void 0 ? void 0 : consoleConfig.CHANNEL_LINKS), channelLinks),
|
|
86
|
+
CHANNEL_FEATURE_STATUS: _objectSpread(_objectSpread({}, consoleConfig === null || consoleConfig === void 0 ? void 0 : consoleConfig.CHANNEL_FEATURE_STATUS), processChannelFeatures(channelFeatures, channel)),
|
|
87
|
+
FEATURE_STATUS: _objectSpread(_objectSpread({}, consoleConfig === null || consoleConfig === void 0 ? void 0 : consoleConfig.FEATURE_STATUS), processFeatures(features))
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
90
|
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var version = '1.4.
|
|
1
|
+
export var version = '1.4.15';
|
|
@@ -32,13 +32,13 @@ function afterLoadHook(_x) {
|
|
|
32
32
|
|
|
33
33
|
function _afterLoadHook() {
|
|
34
34
|
_afterLoadHook = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(appConfig) {
|
|
35
|
-
var app, logger, defaultConsoleConfig, defaultConsoleGlobal, CONFIG_START_TIME, configData, _yield$Promise$all, _yield$Promise$all2, consoleConfig, consoleGlobal, messages, CONFIG_END_TIME, i18nMessages, END_TIME;
|
|
35
|
+
var app, logger, sandbox, defaultConsoleConfig, defaultConsoleGlobal, CONFIG_START_TIME, configData, _yield$Promise$all, _yield$Promise$all2, consoleConfig, consoleGlobal, messages, CONFIG_END_TIME, i18nMessages, END_TIME;
|
|
36
36
|
|
|
37
37
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
38
38
|
while (1) {
|
|
39
39
|
switch (_context.prev = _context.next) {
|
|
40
40
|
case 0:
|
|
41
|
-
app = appConfig.app, logger = appConfig.logger;
|
|
41
|
+
app = appConfig.app, logger = appConfig.logger, sandbox = appConfig.sandbox;
|
|
42
42
|
defaultConsoleConfig = window.ALIYUN_CONSOLE_CONFIG || {};
|
|
43
43
|
defaultConsoleGlobal = window.ALIYUN_CONSOLE_GLOBAL || {};
|
|
44
44
|
CONFIG_START_TIME = Date.now();
|
|
@@ -57,9 +57,9 @@ function _afterLoadHook() {
|
|
|
57
57
|
consoleGlobal = _yield$Promise$all2[1];
|
|
58
58
|
messages = _yield$Promise$all2[2];
|
|
59
59
|
CONFIG_END_TIME = Date.now();
|
|
60
|
-
i18nMessages = _objectSpread(_objectSpread({}, window.ALIYUN_CONSOLE_I18N_MESSAGE), messages); // inject global variables
|
|
60
|
+
i18nMessages = _objectSpread(_objectSpread({}, window.ALIYUN_CONSOLE_I18N_MESSAGE), messages); // inject global variables when sandbox is valid
|
|
61
61
|
|
|
62
|
-
if (app && app.context) {
|
|
62
|
+
if (app !== null && app !== void 0 && app.context && !(sandbox !== null && sandbox !== void 0 && sandbox.disable)) {
|
|
63
63
|
app.context.window.ALIYUN_CONSOLE_CONFIG = consoleConfig;
|
|
64
64
|
app.context.window.ALIYUN_CONSOLE_GLOBAL = consoleGlobal;
|
|
65
65
|
app.context.window.ALIYUN_CONSOLE_I18N_MESSAGE = i18nMessages;
|
|
@@ -93,9 +93,9 @@ var mergeConfigDataWithConsoleConfig = function mergeConfigDataWithConsoleConfig
|
|
|
93
93
|
var channelFeatures = configData.ALL_CHANNEL_FEATURE_STATUS;
|
|
94
94
|
var features = configData.ALL_FEATURE_STATUS;
|
|
95
95
|
return _objectSpread(_objectSpread({}, consoleConfig), {}, {
|
|
96
|
-
CHANNEL_LINKS:
|
|
97
|
-
CHANNEL_FEATURE_STATUS:
|
|
98
|
-
FEATURE_STATUS:
|
|
96
|
+
CHANNEL_LINKS: _objectSpread(_objectSpread({}, consoleConfig === null || consoleConfig === void 0 ? void 0 : consoleConfig.CHANNEL_LINKS), channelLinks),
|
|
97
|
+
CHANNEL_FEATURE_STATUS: _objectSpread(_objectSpread({}, consoleConfig === null || consoleConfig === void 0 ? void 0 : consoleConfig.CHANNEL_FEATURE_STATUS), processChannelFeatures(channelFeatures, channel)),
|
|
98
|
+
FEATURE_STATUS: _objectSpread(_objectSpread({}, consoleConfig === null || consoleConfig === void 0 ? void 0 : consoleConfig.FEATURE_STATUS), processFeatures(features))
|
|
99
99
|
});
|
|
100
100
|
};
|
|
101
101
|
|
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.15",
|
|
4
4
|
"description": "Alfa Framework (React Version)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": "^16 | ^17"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "cd8da1c7f940c86ceeb6e7c2bb66c46d2a5db008"
|
|
55
55
|
}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { AlfaConfig } from '@alicloud/alfa-core';
|
|
2
2
|
export declare const getConsoleConfig: (configData: AlfaConfig, consoleConfig: any) => Promise<{
|
|
3
|
-
CHANNEL_LINKS:
|
|
4
|
-
CHANNEL_FEATURE_STATUS:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
CHANNEL_LINKS: {};
|
|
4
|
+
CHANNEL_FEATURE_STATUS: {
|
|
5
|
+
[x: string]: {
|
|
6
|
+
status: boolean;
|
|
7
|
+
attribute: {
|
|
8
|
+
customAttrs: Record<string, unknown>;
|
|
9
|
+
regions: string[] | {
|
|
10
|
+
region: string[];
|
|
11
|
+
};
|
|
10
12
|
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
} | {
|
|
14
|
+
status: boolean;
|
|
15
|
+
attribute: {
|
|
16
|
+
customAttrs: Record<string, unknown>;
|
|
17
|
+
regions: string[] | {
|
|
18
|
+
region: string[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
} | undefined;
|
|
22
|
+
};
|
|
23
|
+
FEATURE_STATUS: {
|
|
24
|
+
[x: string]: boolean | undefined;
|
|
25
|
+
};
|
|
14
26
|
fEnv?: "pre" | "local" | "prod" | "daily" | undefined;
|
|
15
27
|
LOCALE?: string | undefined;
|
|
16
28
|
CHANNEL?: string | undefined;
|
package/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.4.
|
|
1
|
+
export declare const version = "1.4.15";
|