@tuya-sat/sdf-main-sdk 0.0.97 → 0.0.99
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/{131.b5df66fe.chunk.js → 131.6bf04a1b.chunk.js} +1 -1
- package/dist/{131.b5df66fe.chunk.js.map → 131.6bf04a1b.chunk.js.map} +1 -1
- package/dist/components/BLayout/components/Menu/index.d.ts +2 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/index.d.ts +15 -15
- package/dist/lang/utils.d.ts +8 -0
- package/dist/main.bundle.js +1 -1
- package/dist/main.bundle.js.map +1 -1
- package/dist/main.css +0 -1
- package/dist/main.css.map +1 -1
- package/dist/manifest.json +2 -2
- package/dist/utils/common.d.ts +1 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/theme/changeMenuCssVariable.d.ts +1 -1
- package/package.json +1 -1
- package/webpack.config.js +48 -48
package/dist/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"main.css": "auto/main.css",
|
|
3
3
|
"main.js": "auto/main.bundle.js",
|
|
4
|
-
"131.
|
|
4
|
+
"131.6bf04a1b.chunk.js": "auto/131.6bf04a1b.chunk.js",
|
|
5
5
|
"static/img/reLogin.png": "auto/static/img/294142da390c5af23324.png",
|
|
6
6
|
"static/img/emptyPage.png": "auto/static/img/daa00e3565343b2c9c18.png",
|
|
7
7
|
"static/img/expira.png": "auto/static/img/ddf3e1f8ec8350445a4a.png",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
"zh.json": "auto/zh.json",
|
|
12
12
|
"main.css.map": "auto/main.css.map",
|
|
13
13
|
"main.bundle.js.map": "auto/main.bundle.js.map",
|
|
14
|
-
"131.
|
|
14
|
+
"131.6bf04a1b.chunk.js.map": "auto/131.6bf04a1b.chunk.js.map"
|
|
15
15
|
}
|
package/dist/utils/common.d.ts
CHANGED
|
@@ -24,5 +24,4 @@ export declare const isOpenGt: () => boolean;
|
|
|
24
24
|
export declare const isMessageCt: () => boolean;
|
|
25
25
|
export declare const processLoadAssetInCss: (apps: any, url: any, args: any) => any;
|
|
26
26
|
export declare const initSdfConfig: () => void;
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const initCCM: () => void;
|
|
27
|
+
export declare const app2Group: () => {};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const eventNames: {
|
|
|
17
17
|
HIDE_TOP_MICRO_MENUS: string;
|
|
18
18
|
};
|
|
19
19
|
export declare const eventEmitter: EventEmitter;
|
|
20
|
-
export declare const getMicroAppId: () =>
|
|
20
|
+
export declare const getMicroAppId: () => string;
|
|
21
21
|
export declare const curMicroAppName: () => any;
|
|
22
22
|
export declare const curMicroAppCode: () => any;
|
|
23
23
|
export declare const micApps: () => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Theme, UserColorConfigWithThemeAndMenu } from './base';
|
|
2
|
-
export declare function hexToRgba(
|
|
2
|
+
export declare function hexToRgba(chex: string, opacity: number): string;
|
|
3
3
|
export default function changeMenuCssVariable({ menuColor, theme, prefix, }: {
|
|
4
4
|
menuColor: UserColorConfigWithThemeAndMenu | null;
|
|
5
5
|
theme: Theme;
|
package/package.json
CHANGED
package/webpack.config.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
const path = require(
|
|
2
|
-
const webpack = require(
|
|
3
|
-
const fs = require(
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const webpack = require('webpack');
|
|
3
|
+
const fs = require('fs');
|
|
4
4
|
const BundleAnalyzerPlugin =
|
|
5
|
-
require(
|
|
5
|
+
require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
6
6
|
|
|
7
|
-
const MiniCssExtractPlugin = require(
|
|
8
|
-
const CopyPlugin = require(
|
|
7
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
8
|
+
const CopyPlugin = require('copy-webpack-plugin');
|
|
9
9
|
const REACT_APP_THEME_CSS_JS = fs.readFileSync(
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'src/micro-script/theme/theme-css/static.js',
|
|
11
|
+
'utf-8'
|
|
12
12
|
);
|
|
13
|
-
const { WebpackManifestPlugin } = require(
|
|
13
|
+
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
|
14
14
|
|
|
15
15
|
module.exports = {
|
|
16
|
-
mode:
|
|
17
|
-
devtool:
|
|
18
|
-
entry: path.join(__dirname,
|
|
19
|
-
target: [
|
|
16
|
+
mode: 'production',
|
|
17
|
+
devtool: 'source-map',
|
|
18
|
+
entry: path.join(__dirname, '/src/index.tsx'),
|
|
19
|
+
target: ['web', 'es5'],
|
|
20
20
|
output: {
|
|
21
|
-
filename:
|
|
22
|
-
chunkFilename:
|
|
23
|
-
path: path.join(__dirname,
|
|
21
|
+
filename: '[name].bundle.js',
|
|
22
|
+
chunkFilename: '[name].[hash:8].chunk.js',
|
|
23
|
+
path: path.join(__dirname, '/dist'),
|
|
24
24
|
library: {
|
|
25
|
-
name:
|
|
26
|
-
type:
|
|
25
|
+
name: '_SDF',
|
|
26
|
+
type: 'umd',
|
|
27
27
|
},
|
|
28
28
|
clean: true,
|
|
29
|
-
assetModuleFilename:
|
|
29
|
+
assetModuleFilename: 'static/img/[hash][ext]',
|
|
30
30
|
},
|
|
31
31
|
externals: {
|
|
32
|
-
react:
|
|
33
|
-
antd:
|
|
34
|
-
moment:
|
|
35
|
-
|
|
36
|
-
axios:
|
|
32
|
+
react: 'react',
|
|
33
|
+
antd: 'antd',
|
|
34
|
+
moment: 'moment',
|
|
35
|
+
'@tuya-sat/galaxy': '@tuya-sat/galaxy',
|
|
36
|
+
axios: 'axios',
|
|
37
37
|
},
|
|
38
38
|
resolve: {
|
|
39
|
-
extensions: [
|
|
39
|
+
extensions: ['.js', '.tsx', '.ts'],
|
|
40
40
|
fallback: {
|
|
41
|
-
url: require.resolve(
|
|
41
|
+
url: require.resolve('url/'),
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
plugins: [
|
|
45
45
|
// new BundleAnalyzerPlugin(),
|
|
46
46
|
new webpack.ProvidePlugin({
|
|
47
|
-
process:
|
|
48
|
-
Buffer: [
|
|
47
|
+
process: 'process/browser',
|
|
48
|
+
Buffer: ['buffer', 'Buffer'],
|
|
49
49
|
}),
|
|
50
50
|
new webpack.DefinePlugin({
|
|
51
|
-
|
|
51
|
+
'process.env': {
|
|
52
52
|
REACT_APP_THEME_CSS_JS: JSON.stringify(REACT_APP_THEME_CSS_JS),
|
|
53
53
|
},
|
|
54
54
|
}),
|
|
55
55
|
new CopyPlugin({
|
|
56
56
|
patterns: [
|
|
57
57
|
{
|
|
58
|
-
from: path.join(process.cwd(),
|
|
59
|
-
to: path.join(process.cwd(),
|
|
58
|
+
from: path.join(process.cwd(), 'src/lang/zh.json'),
|
|
59
|
+
to: path.join(process.cwd(), 'dist/zh.json'),
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
|
-
from: path.join(process.cwd(),
|
|
63
|
-
to: path.join(process.cwd(),
|
|
62
|
+
from: path.join(process.cwd(), 'src/lang/en.json'),
|
|
63
|
+
to: path.join(process.cwd(), 'dist/en.json'),
|
|
64
64
|
},
|
|
65
65
|
],
|
|
66
66
|
}),
|
|
@@ -68,9 +68,9 @@ module.exports = {
|
|
|
68
68
|
new WebpackManifestPlugin(),
|
|
69
69
|
],
|
|
70
70
|
resolve: {
|
|
71
|
-
extensions: [
|
|
71
|
+
extensions: ['.ts', '.tsx', '.js', 'jsx'],
|
|
72
72
|
alias: {
|
|
73
|
-
|
|
73
|
+
'@': path.resolve(__dirname, 'src'),
|
|
74
74
|
},
|
|
75
75
|
},
|
|
76
76
|
module: {
|
|
@@ -78,47 +78,47 @@ module.exports = {
|
|
|
78
78
|
{
|
|
79
79
|
test: /.(ts|tsx)$/,
|
|
80
80
|
use: {
|
|
81
|
-
loader:
|
|
81
|
+
loader: 'babel-loader',
|
|
82
82
|
options: {
|
|
83
83
|
presets: [
|
|
84
84
|
[
|
|
85
|
-
|
|
85
|
+
'@babel/preset-env',
|
|
86
86
|
{
|
|
87
|
-
useBuiltIns:
|
|
87
|
+
useBuiltIns: 'usage',
|
|
88
88
|
corejs: 3,
|
|
89
89
|
},
|
|
90
90
|
],
|
|
91
|
-
[
|
|
92
|
-
|
|
91
|
+
['@babel/preset-react', { runtime: 'automatic' }],
|
|
92
|
+
'@babel/preset-typescript',
|
|
93
93
|
],
|
|
94
94
|
},
|
|
95
95
|
},
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
test: /\.(png|jpe?g|gif|svg)?$/,
|
|
99
|
-
type:
|
|
99
|
+
type: 'asset/resource',
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
test: /.(css|less)$/,
|
|
103
103
|
use: [
|
|
104
104
|
MiniCssExtractPlugin.loader,
|
|
105
|
-
|
|
105
|
+
'css-loader',
|
|
106
106
|
{
|
|
107
|
-
loader:
|
|
107
|
+
loader: 'postcss-loader',
|
|
108
108
|
options: {
|
|
109
109
|
postcssOptions: {
|
|
110
|
-
plugins: [
|
|
110
|
+
plugins: ['autoprefixer'],
|
|
111
111
|
},
|
|
112
112
|
},
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
|
-
loader:
|
|
115
|
+
loader: 'less-loader',
|
|
116
116
|
options: {
|
|
117
117
|
lessOptions: {
|
|
118
118
|
modifyVars: {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
'ant-prefix': 'main',
|
|
120
|
+
'macro-entry-name': 'custom-light',
|
|
121
|
+
'macro-variable-location': 'antd/lib/style/variable',
|
|
122
122
|
},
|
|
123
123
|
javascriptEnabled: true,
|
|
124
124
|
},
|