@alicloud/alfa-react 1.5.7 → 1.5.8
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/createAlfaApp.js +1 -1
- package/es/version.js +1 -1
- package/lib/createAlfaApp.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/types/createAlfaApp.d.ts +3 -17
- package/types/createAlfaWidget.d.ts +3 -13
- package/types/types/index.d.ts +37 -11
- package/types/version.d.ts +1 -1
package/es/createAlfaApp.js
CHANGED
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export var version = '1.5.
|
|
1
|
+
export var version = '1.5.8';
|
package/lib/createAlfaApp.js
CHANGED
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.
|
|
3
|
+
"version": "1.5.8",
|
|
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/console-os-loader": "1.4.30",
|
|
40
|
+
"@alicloud/alfa-core": "1.4.32"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": ">=16.0.0"
|
package/types/createAlfaApp.d.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { AlfaFactoryOption } from './types';
|
|
3
|
-
interface IProps {
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated
|
|
6
|
-
*/
|
|
7
|
-
sandbox?: Record<string, any>;
|
|
8
|
-
/**
|
|
9
|
-
* 处理外跳链接
|
|
10
|
-
* @param url
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
handleExternalLink?: (url: string) => void;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AlfaFactoryOption, CommonProps } from './types';
|
|
3
|
+
interface IProps extends CommonProps {
|
|
14
4
|
/**
|
|
15
5
|
* 是否开启路由自动同步,需配合 basename 使用
|
|
16
6
|
*/
|
|
@@ -28,10 +18,6 @@ interface IProps {
|
|
|
28
18
|
* 子应用路由
|
|
29
19
|
*/
|
|
30
20
|
path?: string;
|
|
31
|
-
/**
|
|
32
|
-
* 根节点样式
|
|
33
|
-
*/
|
|
34
|
-
style?: React.CSSProperties;
|
|
35
21
|
}
|
|
36
22
|
declare function createAlfaApp<P = any>(option: AlfaFactoryOption): (() => null) | ((props: P & IProps) => JSX.Element);
|
|
37
23
|
/**
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { AlfaFactoryOption } from './types';
|
|
3
|
-
interface IProps {
|
|
4
|
-
/**
|
|
5
|
-
* 处理外跳链接
|
|
6
|
-
* @param url
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
handleExternalLink?: (url: string) => void;
|
|
10
|
-
/**
|
|
11
|
-
* 根节点样式
|
|
12
|
-
*/
|
|
13
|
-
style?: React.CSSProperties;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AlfaFactoryOption, CommonProps } from './types';
|
|
3
|
+
interface IProps extends CommonProps {
|
|
14
4
|
}
|
|
15
5
|
declare function createAlfaWidget<P = any>(option: AlfaFactoryOption): (() => null) | ((props: P & IProps) => JSX.Element);
|
|
16
6
|
/**
|
package/types/types/index.d.ts
CHANGED
|
@@ -31,18 +31,34 @@ export interface AlfaFactoryOption extends IAppConfig {
|
|
|
31
31
|
* 开启业务配置加载
|
|
32
32
|
*/
|
|
33
33
|
dynamicConfig?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated
|
|
36
|
+
* used in cwsWidget
|
|
37
|
+
*/
|
|
34
38
|
runtimeVersion?: string;
|
|
35
|
-
fallbackRender?: (error: Error) => Element;
|
|
36
39
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
export interface CommonProps {
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated
|
|
43
|
+
*/
|
|
44
|
+
sandbox?: Record<string, any>;
|
|
45
|
+
/**
|
|
46
|
+
* 处理外跳链接
|
|
47
|
+
* @param url
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
handleExternalLink?: (url?: string) => void;
|
|
51
|
+
/**
|
|
52
|
+
* 根节点样式
|
|
53
|
+
*/
|
|
54
|
+
style?: React.CSSProperties;
|
|
55
|
+
/**
|
|
56
|
+
* render when throw error
|
|
57
|
+
*/
|
|
58
|
+
fallbackRender?: (error?: Error) => Element;
|
|
45
59
|
}
|
|
60
|
+
type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
|
|
61
|
+
export type MicroApplication = ThenArg<ReturnType<typeof createMicroApp>>;
|
|
46
62
|
export interface AlfaEnvConfigDescriptor {
|
|
47
63
|
releaseUrl: string;
|
|
48
64
|
configUrl?: string;
|
|
@@ -55,6 +71,9 @@ export interface AlfaEnvConfig {
|
|
|
55
71
|
pre: AlfaEnvConfigDescriptor;
|
|
56
72
|
prod: AlfaEnvConfigDescriptor;
|
|
57
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* 兼容 cws widget 的配置
|
|
76
|
+
*/
|
|
58
77
|
export interface WidgetReleaseConfig {
|
|
59
78
|
[id: string]: {
|
|
60
79
|
[version: string]: {
|
|
@@ -62,6 +81,15 @@ export interface WidgetReleaseConfig {
|
|
|
62
81
|
};
|
|
63
82
|
};
|
|
64
83
|
}
|
|
84
|
+
type OmitKeys = 'manifest';
|
|
85
|
+
export interface WidgetFactoryOption extends Omit<AlfaFactoryOption, OmitKeys> {
|
|
86
|
+
runtimeVersion?: string;
|
|
87
|
+
alfaLoader?: boolean;
|
|
88
|
+
theme?: string;
|
|
89
|
+
central?: boolean;
|
|
90
|
+
host?: string;
|
|
91
|
+
configHost?: string;
|
|
92
|
+
}
|
|
65
93
|
export interface WidgetCWSConfig {
|
|
66
94
|
conf: {
|
|
67
95
|
[channel: string]: {
|
|
@@ -98,6 +126,4 @@ export interface WidgetRuntime {
|
|
|
98
126
|
'@ali/wind-intl/lib/withRcIntl': any;
|
|
99
127
|
'@ali/widget-utils-console': any;
|
|
100
128
|
}
|
|
101
|
-
type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
|
|
102
|
-
export type MicroApplication = ThenArg<ReturnType<typeof createMicroApp>>;
|
|
103
129
|
export {};
|
package/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.5.
|
|
1
|
+
export declare const version = "1.5.8";
|