@tuya-sat/sdf-main-sdk 0.0.41 → 0.0.42

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/zh.json ADDED
@@ -0,0 +1,178 @@
1
+ {
2
+ "translation": {
3
+ "login.title": "SaaS开发框架Demo",
4
+ "login.tabs.tele": "手机号",
5
+ "login.tabs.email": "邮箱",
6
+ "login.form.username.label": "账号",
7
+ "login.form.username.validate.require": "请输入账号",
8
+ "login.form.username.validate.pattern": "请输入正确的手机号码或邮箱账号",
9
+ "login.form.username.validate.emailPattern": "请输入正确的邮箱",
10
+ "login.form.username.validate.phonePattern": "请输入有效的电话号码",
11
+ "login.form.username.placeholder": "请输入手机号/邮箱",
12
+ "login.form.password.label": "密码",
13
+ "login.form.password.validate.require": "请输入密码",
14
+ "login.form.password.validate.pattern": "密码长度 8-20 位,至少包含以下三种字符类型(数字、大写字母、小写字母、英文符号)",
15
+ "login.form.password.placeholder": "请输入密码",
16
+ "login.form.newPassword.label": "新密码",
17
+ "login.form.phone.label": "电话号码",
18
+ "login.form.phone.phonePattern": "请输入有效的电话号码",
19
+ "login.form.code.require": "请输入验证码",
20
+ "login.form.code.requireAccount": "请输入接收验证码地址",
21
+ "login.form.code.placeholder": "验证码",
22
+ "login.form.code.getCode": "获取验证码",
23
+ "login.form.code.len": "请输入6位数字验证码",
24
+ "login.form.code.countdown": "等待 ",
25
+ "login.form.tenantId.label": "租户ID/企业别名",
26
+ "login.form.tenantId.placeholder": "请输入租户ID/企业别名",
27
+ "login.form.tenantId.require": "请输入租户ID/企业别名",
28
+ "login.form.tenantId.pattern": "租户ID/企业别名长度4-16位,必须以小写字母开头(支持小写字母、数字、连字符)",
29
+ "login.signIn": "登录",
30
+ "login.forgot": "忘记密码?",
31
+ "login.back2login": "返回登录",
32
+ "login.resetPwd": "重置密码",
33
+ "login.resetPwdSuccess": "密码修改成功,请使用新密码登录",
34
+ "login.text": "阅读并同意",
35
+ "login.service": "《服务条款》",
36
+ "login.legal": "《法律声明》",
37
+ "login.privacy": "《隐私政策》",
38
+ "login.admin_account_login": "管理员登录",
39
+ "login.sub_account_login": "子账号登录",
40
+ "login.lang": "简体中文",
41
+ "login.thirdLoginError": "三方登录失败",
42
+ "menu.title.default": "SaaS开发框架Demo",
43
+ "menu.title.assets": "资产管理",
44
+ "menu.title.devices": "设备管理",
45
+ "menu.title.setting": "账号设置",
46
+ "menu.title.permission": "角色权限",
47
+ "menu.title.account": "用户管理",
48
+ "menu.edition.preview": "预览",
49
+ "menu.edition.latest": "最新",
50
+ "menu.edition.stable": "稳定",
51
+ "menu.edition.trial": "体验",
52
+ "menu.logout": "退出登录",
53
+ "notice.title": "消息详情",
54
+ "notice.typeSelect.placeholder": "消息类型",
55
+ "notice.typeSelect.all": "全部",
56
+ "notice.typeSelect.message": "消息通知",
57
+ "notice.typeSelect.alert": "告警通知",
58
+ "notice.originSelect.placeholder": "消息来源",
59
+ "notice.originSelect.all": "全部",
60
+ "notice.originSelect.center": "消息中心(Web)",
61
+ "notice.originSelect.app": "App Push",
62
+ "notice.originSelect.short": "短信",
63
+ "notice.originSelect.email": "邮件",
64
+ "notice.originSelect.telephone": "电话",
65
+ "notice.StatusSelect.placeholder": "消息状态",
66
+ "notice.StatusSelect.all": "全部",
67
+ "notice.StatusSelect.readed": "已读",
68
+ "notice.StatusSelect.unread": "未读",
69
+ "notice.buttons.read": "全部标为已读",
70
+ "notice.buttons.unread": "全部标为未读",
71
+ "notice.badge.title": "消息通知",
72
+ "notice.badge.type": "通知类型",
73
+ "notice.badge.message": "查看全部消息",
74
+ "notice.tools.button.read": "标为已读",
75
+ "notice.tools.button.unread": "标为未读",
76
+ "notice.tools.button.delete": "删除",
77
+ "notice.tools.button.allRead": "全部标为已读",
78
+ "notice.tools.checkbox.onlyViewUnread": "只看未读",
79
+ "notice.tools.select.all": "全部类型",
80
+ "notice.tools.select.system": "系统通知",
81
+ "notice.tools.select.device": "设备消息",
82
+ "notice.tools.select.work": "业务信息",
83
+ "notice.tools.popconfirm.title": "确定要删除选中的消息吗?",
84
+ "notice.tools.popconfirm.content": "删除之后不可恢复",
85
+ "notice.tools.popconfirm.cancel": "取消",
86
+ "notice.tools.popconfirm.ok": "确定",
87
+ "notice.tools.selectedAllContent": "已选择所有{{num}}条消息",
88
+ "notice.tools.itemsNums": "已选择本页{{num}}条消息",
89
+ "notice.tools.totalNums": "选择所有{{num}}条消息",
90
+ "notice.tools.cancelSelect": "取消选择",
91
+ "notice.tools.pread": "批量标为已读",
92
+ "notice.tools.punread": "批量标为未读",
93
+ "notice.tools.pdelete": "批量删除",
94
+ "notice.table.column.content": "消息内容",
95
+ "notice.table.column.status": "消息状态",
96
+ "notice.table.column.type": "消息类型",
97
+ "notice.table.column.source": "消息来源",
98
+ "notice.table.column.time": "通知时间",
99
+ "notice.table.render.status.read": "已读",
100
+ "notice.table.render.status.unread": "未读",
101
+ "notice.table.hover.read": "标为已读",
102
+ "notice.table.hover.unread": "标为未读",
103
+ "notice.table.hover.del": "删除",
104
+ "notice.table.delTip": "确认要删除消息吗?",
105
+ "setting.title": "设置",
106
+ "setting.account": "用户账号",
107
+ "setting.phone": "手机号",
108
+ "setting.email": "邮箱",
109
+ "setting.modify": "修改",
110
+ "setting.bindPhone": "绑定手机号",
111
+ "setting.bindEmail": "绑定邮箱",
112
+ "setting.modifyPhone": "修改手机号",
113
+ "setting.modifyEmail": "修改邮箱",
114
+ "setting.bind": "绑定",
115
+ "setting.unBind": "未绑定",
116
+ "setting.username": "用户名",
117
+ "setting.role": "角色",
118
+ "setting.password": "密码",
119
+ "setting.modifyPwd": "修改密码",
120
+ "setting.language": "语言",
121
+ "setting.phoneLable": "请输入手机号",
122
+ "setting.emailLable": "请输入邮箱",
123
+ "setting.accountLable": "用户账号(登录账号)",
124
+ "setting.name": "名称",
125
+ "setting.form.oldPassword.label": "旧密码",
126
+ "setting.form.oldPassword.validate.require": "请输入旧密码",
127
+ "setting.form.oldPassword.validate.pattern": "密码长度 8-20 位,至少包含以下三种字符类型(数字、大写字母、小写字母、英文符号)",
128
+ "setting.form.newPassword.label": "新密码",
129
+ "setting.form.newPassword.validate.require": "请输入新密码",
130
+ "setting.form.newPassword.validate.pattern": "密码长度 8-20 位,至少包含以下三种字符类型(数字、大写字母、小写字母、英文符号)",
131
+ "setting.form.confirm.label": "确认新密码",
132
+ "setting.form.confirm.validate.require": "请再次输入新密码",
133
+ "setting.form.confirm.validate.pattern": "密码长度 8-20 位,至少包含以下三种字符类型(数字、大写字母、小写字母、英文符号)",
134
+ "setting.form.confirm.validate.unanimous": "两次密码输入不一致",
135
+ "setting.modifySuccess": "修改成功",
136
+ "httpCodeText.400": "请求错误",
137
+ "httpCodeText.401": "未授权,请重新登录",
138
+ "httpCodeText.403": "拒绝访问",
139
+ "httpCodeText.404": "请求出错",
140
+ "httpCodeText.408": "请求超时",
141
+ "httpCodeText.500": "服务器错误",
142
+ "httpCodeText.501": "服务未实现",
143
+ "httpCodeText.502": "网络错误",
144
+ "httpCodeText.503": "服务不可用",
145
+ "httpCodeText.504": "网络超时,请重试尝试",
146
+ "httpCodeText.505": "HTTP版本不受支持",
147
+ "httpCodeText.default": "服务异常({{status}})",
148
+ "httpCodeText.timeout": "请求超时",
149
+ "httpCodeText.abort": "连接失败",
150
+ "httpCodeText.callBack": "网络异常",
151
+ "appHint1": "扫描下方二维码,下载智慧行业App",
152
+ "appHint2": "探索更多移动端功能",
153
+ "backLoginPage": "返回登录页",
154
+ "backHome": "返回首页",
155
+ "pageError": "抱歉,您暂无权访问",
156
+ "page404": "抱歉,你访问的站点不存在",
157
+ "page500": "系统错误,请稍后重试",
158
+ "emptyPage": "暂无权限,请联系管理员添加权限",
159
+ "expirationPage": "该SaaS体验服务已到期,请联系开发人员进行付费",
160
+ "trial": "体验版",
161
+ "admin": "超级管理员",
162
+ "forgot.title": "找回密码",
163
+ "forgot.resetPwd": "重置密码",
164
+ "forgot.tenantRole": "租户子账号",
165
+ "forgot.managerRole": "租户管理员账号",
166
+ "forgot.noAccount": "还没有账号?",
167
+ "forgot.toRegister": "租户注册",
168
+ "register.form.enterprise.label": "企业/组织名称",
169
+ "register.form.enterprise.validate.require": "请输入企业/组织名称",
170
+ "register.form.enterprise.placeholder": "请输入企业/组织名称",
171
+ "register.form.username.label": "租户管理员账号",
172
+ "register.register": "注册租户",
173
+ "register.registerSuccess": "注册成功",
174
+ "relogin.tip": "账号已在其他设备(浏览器)登录或已过期",
175
+ "relogin.btn": "重新登录",
176
+ "relogin.pwd": "如非本人操作,建议前往账号设置修改密码"
177
+ }
178
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuya-sat/sdf-main-sdk",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "main": "./dist/main.bundle.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",
package/webpack.config.js CHANGED
@@ -5,58 +5,70 @@ const BundleAnalyzerPlugin =
5
5
  require("webpack-bundle-analyzer").BundleAnalyzerPlugin;
6
6
 
7
7
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
8
-
8
+ const CopyPlugin = require('copy-webpack-plugin');
9
9
  const REACT_APP_THEME_CSS_JS = fs.readFileSync(
10
- "src/micro-script/theme/theme-css/static.js",
11
- "utf-8",
10
+ 'src/micro-script/theme/theme-css/static.js',
11
+ 'utf-8'
12
12
  );
13
13
 
14
14
  module.exports = {
15
- mode: "production",
16
- devtool: "source-map",
17
- entry: path.join(__dirname, "/src/index.tsx"),
18
- target: ["web", "es5"],
15
+ mode: 'production',
16
+ devtool: 'source-map',
17
+ entry: path.join(__dirname, '/src/index.tsx'),
18
+ target: ['web', 'es5'],
19
19
  output: {
20
- filename: "[name].bundle.js",
21
- chunkFilename: "[name].[hash:8].chunk.js",
22
- path: path.join(__dirname, "/dist"),
20
+ filename: '[name].bundle.js',
21
+ chunkFilename: '[name].[hash:8].chunk.js',
22
+ path: path.join(__dirname, '/dist'),
23
23
  library: {
24
- name: "_SDF",
25
- type: "umd",
24
+ name: '_SDF',
25
+ type: 'umd',
26
26
  },
27
27
  clean: true,
28
- assetModuleFilename: "static/img/[hash][ext]",
28
+ assetModuleFilename: 'static/img/[hash][ext]',
29
29
  },
30
30
  externals: {
31
- react: "react",
32
- antd: "antd",
33
- moment: "moment",
34
- "@tuya-sat/galaxy": "@tuya-sat/galaxy",
35
- axios: "axios",
31
+ react: 'react',
32
+ antd: 'antd',
33
+ moment: 'moment',
34
+ '@tuya-sat/galaxy': '@tuya-sat/galaxy',
35
+ axios: 'axios',
36
36
  },
37
37
  resolve: {
38
- extensions: [".js", ".tsx", ".ts"],
38
+ extensions: ['.js', '.tsx', '.ts'],
39
39
  fallback: {
40
- url: require.resolve("url/"),
40
+ url: require.resolve('url/'),
41
41
  },
42
42
  },
43
43
  plugins: [
44
44
  // new BundleAnalyzerPlugin(),
45
45
  new webpack.ProvidePlugin({
46
- process: "process/browser",
47
- Buffer: ["buffer", "Buffer"],
46
+ process: 'process/browser',
47
+ Buffer: ['buffer', 'Buffer'],
48
48
  }),
49
49
  new webpack.DefinePlugin({
50
- "process.env": {
50
+ 'process.env': {
51
51
  REACT_APP_THEME_CSS_JS: JSON.stringify(REACT_APP_THEME_CSS_JS),
52
52
  },
53
53
  }),
54
+ new CopyPlugin({
55
+ patterns: [
56
+ {
57
+ from: path.join(process.cwd(), 'src/lang/zh.json'),
58
+ to: path.join(process.cwd(), 'dist/zh.json'),
59
+ },
60
+ {
61
+ from: path.join(process.cwd(), 'src/lang/en.json'),
62
+ to: path.join(process.cwd(), 'dist/en.json'),
63
+ },
64
+ ],
65
+ }),
54
66
  new MiniCssExtractPlugin(),
55
67
  ],
56
68
  resolve: {
57
- extensions: [".ts", ".tsx", ".js", "jsx"],
69
+ extensions: ['.ts', '.tsx', '.js', 'jsx'],
58
70
  alias: {
59
- "@": path.resolve(__dirname, "src"),
71
+ '@': path.resolve(__dirname, 'src'),
60
72
  },
61
73
  },
62
74
  module: {
@@ -64,47 +76,47 @@ module.exports = {
64
76
  {
65
77
  test: /.(ts|tsx)$/,
66
78
  use: {
67
- loader: "babel-loader",
79
+ loader: 'babel-loader',
68
80
  options: {
69
81
  presets: [
70
82
  [
71
- "@babel/preset-env",
83
+ '@babel/preset-env',
72
84
  {
73
- useBuiltIns: "usage",
85
+ useBuiltIns: 'usage',
74
86
  corejs: 3,
75
87
  },
76
88
  ],
77
- ["@babel/preset-react", { runtime: "automatic" }],
78
- "@babel/preset-typescript",
89
+ ['@babel/preset-react', { runtime: 'automatic' }],
90
+ '@babel/preset-typescript',
79
91
  ],
80
92
  },
81
93
  },
82
94
  },
83
95
  {
84
96
  test: /\.(png|jpe?g|gif|svg)?$/,
85
- type: "asset/resource",
97
+ type: 'asset/resource',
86
98
  },
87
99
  {
88
100
  test: /.(css|less)$/,
89
101
  use: [
90
102
  MiniCssExtractPlugin.loader,
91
- "css-loader",
103
+ 'css-loader',
92
104
  {
93
- loader: "postcss-loader",
105
+ loader: 'postcss-loader',
94
106
  options: {
95
107
  postcssOptions: {
96
- plugins: ["autoprefixer"],
108
+ plugins: ['autoprefixer'],
97
109
  },
98
110
  },
99
111
  },
100
112
  {
101
- loader: "less-loader",
113
+ loader: 'less-loader',
102
114
  options: {
103
115
  lessOptions: {
104
116
  modifyVars: {
105
- "ant-prefix": "main",
106
- "macro-entry-name": "custom-light",
107
- "macro-variable-location": "antd/lib/style/variable",
117
+ 'ant-prefix': 'main',
118
+ 'macro-entry-name': 'custom-light',
119
+ 'macro-variable-location': 'antd/lib/style/variable',
108
120
  },
109
121
  javascriptEnabled: true,
110
122
  },