@lark-apaas/client-toolkit 1.2.9-beta.22 → 1.2.9-beta.24
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.
|
@@ -4,7 +4,11 @@ import '../../runtime';
|
|
|
4
4
|
interface IBaseAuthProviderProps {
|
|
5
5
|
enableAuth?: boolean;
|
|
6
6
|
}
|
|
7
|
+
interface IToasterProps {
|
|
8
|
+
/** 禁用内建 Toaster 组件,默认 false */
|
|
9
|
+
disableToaster?: boolean;
|
|
10
|
+
}
|
|
7
11
|
declare const AppContainer: React.FC<{
|
|
8
12
|
children: React.ReactNode;
|
|
9
|
-
} & IBaseThemeProviderProps & IBaseAuthProviderProps>;
|
|
13
|
+
} & IBaseThemeProviderProps & IBaseAuthProviderProps & IToasterProps>;
|
|
10
14
|
export default AppContainer;
|
|
@@ -26,8 +26,9 @@ const readCssVarColor = (varName, fallback)=>{
|
|
|
26
26
|
return fallback;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
+
const appFlags = process.env.APP_FLAGS || {};
|
|
29
30
|
const App = (props)=>{
|
|
30
|
-
const { themeMeta = {}, enableAuth } = props;
|
|
31
|
+
const { themeMeta = {}, enableAuth, disableToaster = false } = props;
|
|
31
32
|
useAppInfo();
|
|
32
33
|
const { rem } = findValueByPixel(themeMetaOptions.themeRadius, themeMeta.borderRadius) || {
|
|
33
34
|
rem: '0.625'
|
|
@@ -63,7 +64,7 @@ const App = (props)=>{
|
|
|
63
64
|
enable: enableAuth
|
|
64
65
|
},
|
|
65
66
|
children: [
|
|
66
|
-
/*#__PURE__*/ jsx(Toaster, {}),
|
|
67
|
+
!disableToaster && true !== appFlags.customToaster && /*#__PURE__*/ jsx(Toaster, {}),
|
|
67
68
|
'production' !== process.env.NODE_ENV && /*#__PURE__*/ jsx(MiaodaInspector, {
|
|
68
69
|
theme: {
|
|
69
70
|
themeMetaOptions: themeMetaOptions,
|
|
@@ -210,6 +211,7 @@ const AppContainer_AppContainer = (props)=>{
|
|
|
210
211
|
children: /*#__PURE__*/ jsx(App, {
|
|
211
212
|
themeMeta: props.themeMeta,
|
|
212
213
|
enableAuth: props.enableAuth,
|
|
214
|
+
disableToaster: props.disableToaster,
|
|
213
215
|
children: children
|
|
214
216
|
})
|
|
215
217
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/client-toolkit",
|
|
3
|
-
"version": "1.2.9-beta.
|
|
3
|
+
"version": "1.2.9-beta.24",
|
|
4
4
|
"types": "./lib/index.d.ts",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
"dependencies": {
|
|
94
94
|
"@ant-design/colors": "^7.2.1",
|
|
95
95
|
"@ant-design/cssinjs": "^1.24.0",
|
|
96
|
-
"@data-loom/js": "0.4.
|
|
96
|
+
"@data-loom/js": "0.4.8",
|
|
97
97
|
"@lark-apaas/auth-sdk": "^0.1.0",
|
|
98
98
|
"@lark-apaas/client-capability": "^0.1.4",
|
|
99
|
-
"@lark-apaas/miaoda-inspector": "1.0.
|
|
99
|
+
"@lark-apaas/miaoda-inspector": "^1.0.16",
|
|
100
100
|
"@lark-apaas/observable-web": "^1.0.1",
|
|
101
101
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
102
102
|
"@radix-ui/react-popover": "^1.1.15",
|