@tuya-sat/sdf-main-sdk 2.0.0-alpha.21 → 2.0.0-alpha.211
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/README.md +83 -2
- package/dist/364.eac5ad9a.chunk.js +2 -0
- package/dist/364.eac5ad9a.chunk.js.map +1 -0
- package/dist/api/index.d.ts +7 -7
- package/dist/api/urls.d.ts +27 -0
- package/dist/components/403/index.d.ts +4 -1
- package/dist/components/BLayout/components/Logo.d.ts +4 -1
- package/dist/components/BLogin/component/UserName/index.d.ts +6 -3
- package/dist/components/BLogin/component/VerifyCode/VerifyCodeInput.d.ts +6 -0
- package/dist/components/BLogin/component/VerifyCode/index.d.ts +1 -1
- package/dist/components/IconFont/index.d.ts +7 -0
- package/dist/components/ImageUpload/index.d.ts +4 -0
- package/dist/components/ImageUpload/utils.d.ts +1 -0
- package/dist/components/Layout/antd/Header/index.d.ts +11 -1
- package/dist/components/Layout/antd/Menu/BaseMenu.d.ts +1 -1
- package/dist/components/Layout/antd/Menu/HorizontalMenu/index.d.ts +2 -0
- package/dist/components/Layout/antd/Menu/index.d.ts +3 -0
- package/dist/components/Layout/antd/Sider/index.d.ts +2 -0
- package/dist/components/Layout/antd/components/AppDownload/index.d.ts +2 -6
- package/dist/components/Layout/antd/components/DynamicNavs/index.d.ts +1 -0
- package/dist/components/Layout/antd/components/NavItem/index.d.ts +2 -1
- package/dist/components/Layout/antd/components/ProjectSelect/index.d.ts +4 -0
- package/dist/components/Layout/antd/components/ProjectSelect/useProjectInfo.d.ts +12 -0
- package/dist/components/Layout/antd/components/SwitchTheme/index.d.ts +8 -0
- package/dist/components/Layout/antd/components/UserAccount/UserAvatar.d.ts +9 -0
- package/dist/components/Layout/antd/components/UserAccount/index.d.ts +1 -0
- package/dist/components/Layout/antd/index.d.ts +2 -0
- package/dist/components/Layout/interface.d.ts +12 -28
- package/dist/components/MessageNotification/index.d.ts +13 -0
- package/dist/components/MessageNotification/manager.d.ts +13 -0
- package/dist/components/MessageNotification/messageNotificationManager.d.ts +3 -0
- package/dist/components/MicroComponent/Header/index.d.ts +17 -2
- package/dist/components/PEnterprise/EnterpriseList.d.ts +3 -0
- package/dist/components/PEnterprise/index.d.ts +1 -0
- package/dist/components/PSetting/AccountSetting.d.ts +11 -0
- package/dist/components/PSetting/index.d.ts +1 -2
- package/dist/components/Register/components/CountryRegionCascader/RegionCascader.d.ts +19 -0
- package/dist/components/Register/components/CountryRegionCascader/index.d.ts +10 -0
- package/dist/components/Register/components/CountryRegionCascader/services.d.ts +9 -0
- package/dist/components/Register/components/RegisterForm/AccountForm.d.ts +23 -0
- package/dist/components/Register/components/RegisterForm/EnterpriseForm.d.ts +2 -0
- package/dist/components/Register/components/RegisterForm/index.d.ts +7 -0
- package/dist/components/Register/components/RegisterResult/index.d.ts +3 -0
- package/dist/components/Register/index.d.ts +1 -0
- package/dist/constant/index.d.ts +9 -0
- package/dist/en.json +108 -8
- package/dist/hooks/index.d.ts +9 -4
- package/dist/hooks/useMultiLanguages.d.ts +8 -0
- package/dist/index.d.ts +20 -0
- package/dist/lang/utils.d.ts +1 -1
- package/dist/main.bundle.js +1 -1
- package/dist/main.bundle.js.LICENSE.txt +51 -11
- package/dist/main.bundle.js.map +1 -1
- package/dist/main.css +1393 -348
- package/dist/main.css.map +1 -1
- package/dist/manifest.json +7 -2
- package/dist/mqtt/business.d.ts +35 -0
- package/dist/pages/403.d.ts +4 -1
- package/dist/pages/home/enterprise/index.d.ts +5 -0
- package/dist/pages/home/notice/ConfirmCloseModal.d.ts +13 -0
- package/dist/pages/home/notice/MessageDetailModal.d.ts +37 -0
- package/dist/pages/home/notice/hooks.d.ts +14 -3
- package/dist/pages/home/notice/tools/index.d.ts +2 -1
- package/dist/qiankun/globalState.d.ts +6 -5
- package/dist/qiankun/index.d.ts +1 -2
- package/dist/qiankun/utils/index.d.ts +7 -5
- package/dist/static/img/7d9900e808e2197745be.png +0 -0
- package/dist/static/img/a10132bbdef90aa7baaf.png +0 -0
- package/dist/static/img/a20c372b6039996ba351.png +0 -0
- package/dist/static/img/b765d4caa82d7e5eae80.png +0 -0
- package/dist/static/img/f110c37284312f4d2af6.png +0 -0
- package/dist/utils/checkPass.d.ts +4 -0
- package/dist/utils/common.d.ts +10 -0
- package/dist/utils/index.d.ts +48 -7
- package/dist/utils/soundManager.d.ts +12 -0
- package/dist/utils/theme/antd5/InjectCssVariable.d.ts +3 -1
- package/dist/utils/theme/antd5/index.d.ts +362 -107
- package/dist/utils/theme/antd5/token.d.ts +275 -6
- package/dist/utils/theme/base.d.ts +2 -2
- package/dist/utils/theme/changeMenuCssVariable.d.ts +1 -1
- package/dist/utils/theme/index.d.ts +12 -6
- package/dist/utils/theme/store.d.ts +724 -214
- package/dist/zh.json +108 -6
- package/new-translations.json +68 -0
- package/package.json +16 -6
- package/webpack.config.js +1 -0
- package/dist/131.9ff515a6.chunk.js +0 -2
- package/dist/131.9ff515a6.chunk.js.map +0 -1
package/dist/zh.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"translation": {
|
|
3
|
+
"input.placeholder": "请输入",
|
|
4
|
+
"select.placeholder": "请选择",
|
|
3
5
|
"login.title": "SaaS开发框架Demo",
|
|
4
6
|
"login.tabs.tele": "手机号",
|
|
5
7
|
"login.tabs.email": "邮箱",
|
|
@@ -12,6 +14,7 @@
|
|
|
12
14
|
"login.form.password.label": "密码",
|
|
13
15
|
"login.form.password.validate.require": "请输入密码",
|
|
14
16
|
"login.form.password.validate.pattern": "密码长度 8-20 位,至少包含以下三种字符类型(数字、大写字母、小写字母、英文符号)",
|
|
17
|
+
"login.form.password.validate.pattern2": "密码长度 {{min}}-{{max}} 位,至少包含以下三种字符类型(数字、大写字母、小写字母、英文符号)",
|
|
15
18
|
"login.form.password.placeholder": "请输入密码",
|
|
16
19
|
"login.form.newPassword.label": "新密码",
|
|
17
20
|
"login.form.phone.label": "电话号码",
|
|
@@ -27,7 +30,7 @@
|
|
|
27
30
|
"login.form.tenantId.require": "请输入租户ID/企业别名",
|
|
28
31
|
"login.form.tenantId.pattern": "租户ID/企业别名长度4-16位,必须以小写字母开头(支持小写字母、数字、连字符)",
|
|
29
32
|
"login.signIn": "登录",
|
|
30
|
-
"login.forgot": "
|
|
33
|
+
"login.forgot": "忘记密码",
|
|
31
34
|
"login.back2login": "返回登录",
|
|
32
35
|
"login.resetPwd": "重置密码",
|
|
33
36
|
"login.resetPwdSuccess": "密码修改成功,请使用新密码登录",
|
|
@@ -55,6 +58,10 @@
|
|
|
55
58
|
"notice.typeSelect.all": "全部",
|
|
56
59
|
"notice.typeSelect.message": "消息通知",
|
|
57
60
|
"notice.typeSelect.alert": "告警通知",
|
|
61
|
+
"notice.messageType.alert": "告警消息",
|
|
62
|
+
"notice.messageType.system": "系统通知",
|
|
63
|
+
"notice.messageType.business": "业务消息",
|
|
64
|
+
"notice.messageType.unknown": "未知消息",
|
|
58
65
|
"notice.originSelect.placeholder": "消息来源",
|
|
59
66
|
"notice.originSelect.all": "全部",
|
|
60
67
|
"notice.originSelect.center": "消息中心(Web)",
|
|
@@ -66,6 +73,10 @@
|
|
|
66
73
|
"notice.StatusSelect.all": "全部",
|
|
67
74
|
"notice.StatusSelect.readed": "已读",
|
|
68
75
|
"notice.StatusSelect.unread": "未读",
|
|
76
|
+
"notice.projectSelect.placeholder": "所属项目",
|
|
77
|
+
"notice.projectSelect.all": "全部",
|
|
78
|
+
"notice.buttons.search": "搜索",
|
|
79
|
+
"notice.buttons.reset": "重置",
|
|
69
80
|
"notice.buttons.read": "全部标为已读",
|
|
70
81
|
"notice.buttons.unread": "全部标为未读",
|
|
71
82
|
"notice.badge.title": "消息通知",
|
|
@@ -91,18 +102,45 @@
|
|
|
91
102
|
"notice.tools.pread": "批量标为已读",
|
|
92
103
|
"notice.tools.punread": "批量标为未读",
|
|
93
104
|
"notice.tools.pdelete": "批量删除",
|
|
105
|
+
"notice.tools.pread.success": "批量标为已读成功",
|
|
106
|
+
"notice.tools.pread.error": "批量标为已读失败",
|
|
107
|
+
"notice.tools.punread.success": "批量标为未读成功",
|
|
108
|
+
"notice.tools.punread.error": "批量标为未读失败",
|
|
109
|
+
"notice.tools.pdelete.success": "批量删除成功",
|
|
110
|
+
"notice.tools.pdelete.error": "批量删除失败",
|
|
111
|
+
"notice.settings.title": "消息通知",
|
|
112
|
+
"notice.settings.soundToggle.enabled": "新消息声音提示已开启",
|
|
113
|
+
"notice.settings.soundToggle.disabled": "新消息声音提示已关闭",
|
|
114
|
+
"notice.settings.confirm.enable.title": "开启确认",
|
|
115
|
+
"notice.settings.confirm.disable.title": "关闭确认",
|
|
116
|
+
"notice.settings.confirm.enable.content": "开启新消息声音提示吗?",
|
|
117
|
+
"notice.settings.confirm.disable.content": "关闭新消息声音提示吗?",
|
|
118
|
+
"notice.settings.confirm.ok": "确认",
|
|
119
|
+
"notice.settings.confirm.cancel": "取消",
|
|
120
|
+
"notice.settings.message.success": "操作成功",
|
|
121
|
+
"notice.settings.message.error": "操作失败",
|
|
94
122
|
"notice.table.column.content": "消息内容",
|
|
123
|
+
"notice.table.column.title": "消息标题",
|
|
95
124
|
"notice.table.column.status": "消息状态",
|
|
96
125
|
"notice.table.column.type": "消息类型",
|
|
97
126
|
"notice.table.column.source": "消息来源",
|
|
98
127
|
"notice.table.column.time": "通知时间",
|
|
128
|
+
"notice.table.column.project": "所属项目",
|
|
129
|
+
"notice.table.column.operation": "操作",
|
|
99
130
|
"notice.table.render.status.read": "已读",
|
|
100
131
|
"notice.table.render.status.unread": "未读",
|
|
101
132
|
"notice.table.hover.read": "标为已读",
|
|
102
133
|
"notice.table.hover.unread": "标为未读",
|
|
103
134
|
"notice.table.hover.del": "删除",
|
|
104
135
|
"notice.table.delTip": "确认要删除消息吗?",
|
|
105
|
-
"
|
|
136
|
+
"notice.table.operation.primary": "主操作",
|
|
137
|
+
"notice.table.operation.secondary": "次操作",
|
|
138
|
+
"notice.table.operation.detail": "详情",
|
|
139
|
+
"setting.sys.title": "系统设置",
|
|
140
|
+
"setting.sys.homeTitle": "主页",
|
|
141
|
+
"setting.account.title": "账号信息",
|
|
142
|
+
"setting.account.enterprise.changeBtn": "切换企业",
|
|
143
|
+
"other.enterprise.unread.messages.tooltip": "其他企业有未读消息通知,可切换查看",
|
|
106
144
|
"setting.account": "用户账号",
|
|
107
145
|
"setting.phone": "手机号",
|
|
108
146
|
"setting.email": "邮箱",
|
|
@@ -122,6 +160,9 @@
|
|
|
122
160
|
"setting.emailLable": "请输入邮箱",
|
|
123
161
|
"setting.accountLable": "用户账号(登录账号)",
|
|
124
162
|
"setting.name": "名称",
|
|
163
|
+
"setting.form.avatar.label": "头像",
|
|
164
|
+
"setting.form.avatar.label.desc": "支持 2M 以内的 png、jpg、jpeg 图片",
|
|
165
|
+
"setting.form.avatar.modalTitle": "上传头像",
|
|
125
166
|
"setting.form.oldPassword.label": "旧密码",
|
|
126
167
|
"setting.form.oldPassword.validate.require": "请输入旧密码",
|
|
127
168
|
"setting.form.oldPassword.validate.pattern": "密码长度 8-20 位,至少包含以下三种字符类型(数字、大写字母、小写字母、英文符号)",
|
|
@@ -148,7 +189,10 @@
|
|
|
148
189
|
"httpCodeText.timeout": "请求超时",
|
|
149
190
|
"httpCodeText.abort": "连接失败",
|
|
150
191
|
"httpCodeText.callBack": "网络异常",
|
|
151
|
-
"
|
|
192
|
+
"navItem.theme.light": "亮色模式",
|
|
193
|
+
"navItem.theme.dark": "暗色模式",
|
|
194
|
+
"navItem.app.download": "下载 APP",
|
|
195
|
+
"appHint1": "扫描下方二维码,下载涂鸦智慧空间 App",
|
|
152
196
|
"appHint2": "探索更多移动端功能",
|
|
153
197
|
"backLoginPage": "返回登录页",
|
|
154
198
|
"backHome": "返回首页",
|
|
@@ -161,13 +205,14 @@
|
|
|
161
205
|
"expirationPage": "该SaaS体验服务已到期,请联系开发人员进行付费",
|
|
162
206
|
"trial": "体验版",
|
|
163
207
|
"admin": "超级管理员",
|
|
208
|
+
"admin.enterprise": "企业管理员",
|
|
164
209
|
"forgot.title": "找回密码",
|
|
165
210
|
"forgot.resetPwd": "重置密码",
|
|
166
211
|
"forgot.tenantRole": "租户子账号",
|
|
167
212
|
"forgot.managerRole": "租户管理员账号",
|
|
168
213
|
"forgot.noAccount": "还没有账号?",
|
|
169
214
|
"forgot.toRegister": "租户注册",
|
|
170
|
-
"forgot.toRegisterNormal": "
|
|
215
|
+
"forgot.toRegisterNormal": "注册",
|
|
171
216
|
"register.form.enterprise.label": "企业/组织名称",
|
|
172
217
|
"register.form.enterprise.validate.require": "请输入企业/组织名称",
|
|
173
218
|
"register.form.enterprise.placeholder": "请输入企业/组织名称",
|
|
@@ -192,6 +237,63 @@
|
|
|
192
237
|
"microApp.purchaseModal.product2.desc": "微应用年度使用权,资源消耗算入 IoT Core服务,无需在单独购买微应用",
|
|
193
238
|
"microApp.purchaseModal.product2.btn": "立即购买 IoT Core",
|
|
194
239
|
"global.saas.expired.tips1": "您的 SaaS 服务已过期。如需继续使用,请前往涂鸦开发者平台续费。",
|
|
195
|
-
"global.saas.expired.tips2": "您的 SaaS 服务即将在 {{day}} 天后到期。如需继续使用,请前往涂鸦开发者平台续费。"
|
|
240
|
+
"global.saas.expired.tips2": "您的 SaaS 服务即将在 {{day}} 天后到期。如需继续使用,请前往涂鸦开发者平台续费。",
|
|
241
|
+
"dynamicNav.more.unfold": "展开",
|
|
242
|
+
"dynamicNav.more.fold": "折叠",
|
|
243
|
+
"enterprise.modal.title": "企业列表",
|
|
244
|
+
"enterprise.meta.status.current": "当前",
|
|
245
|
+
"enterprise.meta.status.expired": "已过期",
|
|
246
|
+
"enterprise.meta.status.expired.tips": "该企业或账号暂时无法使用,请联系管理员处理",
|
|
247
|
+
"enterprise.meta.status.account.disabled": "账号已禁用",
|
|
248
|
+
"enterprise.meta.status.account.expired": "账号已过期",
|
|
249
|
+
"enterprise.meta.status.enterprise.disabled": "企业已禁用",
|
|
250
|
+
"enterprise.meta.status.enterprise.expired": "企业已过期",
|
|
251
|
+
"enterprise.meta.status.permanent": "长期有效",
|
|
252
|
+
"enterprise.meta.type.brander": "行业商户",
|
|
253
|
+
"enterprise.meta.type.channel": "渠道商",
|
|
254
|
+
"enterprise.meta.type.operator": "服务商",
|
|
255
|
+
"enterprise.meta.type.other": "其它",
|
|
256
|
+
"enterprise.field.expireDate": "到期时间:",
|
|
257
|
+
"enterprise.field.type": "类型:",
|
|
258
|
+
"enterprise.field.role": "角色:",
|
|
259
|
+
"enterprise.field.message": "消息通知",
|
|
260
|
+
"enterprise.field.loginDefault": "默认登录",
|
|
261
|
+
"enterprise.page.title": "选择一个企业登录",
|
|
262
|
+
"yrule.closeTip": "请先完成验证",
|
|
263
|
+
"project.emptyTip": "您没有任何项目权限,请联系管理员授权项目",
|
|
264
|
+
"cancel": "取消",
|
|
265
|
+
"confirm": "确认",
|
|
266
|
+
"imageUpload.cropErrorSize": "图片上传大小超过限制",
|
|
267
|
+
"imageUpload.cropErrorType": "图片上传格式错误",
|
|
268
|
+
"imageUpload.cropImage": "裁剪图片",
|
|
269
|
+
"imageUpload.tip": "图片上传要求:10MB 以内,支持 JPG、PNG、GIF 格式",
|
|
270
|
+
"imageUpload.uploadImage": "上传图片",
|
|
271
|
+
"imageUpload.uploadImageFail": "图片上传失败",
|
|
272
|
+
"imageUpload.uploadImageSuccess": "图片上传成功",
|
|
273
|
+
"enums.accountType.phone": "电话",
|
|
274
|
+
"enums.accountType.email": "邮箱",
|
|
275
|
+
"registerPage.title": "企业账号注册",
|
|
276
|
+
"registerPage.registerBtn": "注册",
|
|
277
|
+
"registerPage.form.enterpriseName": "企业名称",
|
|
278
|
+
"registerPage.form.enterpriseAddressRegion": "国家/地区",
|
|
279
|
+
"registerPage.form.enterpriseAddressDetail": "企业地址",
|
|
280
|
+
"registerPage.form.enterpriseContactPerson": "企业联系人",
|
|
281
|
+
"registerPage.form.enterpriseContactInformation": "企业联系方式",
|
|
282
|
+
"registerPage.form.account.title": "管理员设置",
|
|
283
|
+
"registerPage.form.account.desc": "企业管理员拥有系统中所有功能和数据权限,并且可以在系统中添加新的用户,请谨慎设置。",
|
|
284
|
+
"registerPage.form.accountType": "账号类型",
|
|
285
|
+
"registerPage.form.account.phone": "电话号码",
|
|
286
|
+
"registerPage.form.account.phone.tips": "请输入正确的电话号码",
|
|
287
|
+
"registerPage.form.account.email": "邮箱",
|
|
288
|
+
"registerPage.form.account.email.tips": "请输入正确的邮箱地址",
|
|
289
|
+
"registerPage.form.code": "验证码",
|
|
290
|
+
"registerPage.result.success.title": "注册成功!",
|
|
291
|
+
"registerPage.result.success.desc1": "账号密码已通过短信或邮件发送给您,请返回登录页登录。",
|
|
292
|
+
"registerPage.result.success.desc2": "请等待系统管理员审核,审核通过后账号密码会通过短信或邮件发送给您。",
|
|
293
|
+
"registerPage.result.success.loginBtn": "去登录",
|
|
294
|
+
"registerPage.result.audit.title": "您有注册申请正在审批中!",
|
|
295
|
+
"registerPage.result.field.createTime": "注册时间",
|
|
296
|
+
"registerPage.result.field.account": "管理员账号",
|
|
297
|
+
"notice.empty.title": "暂无未读消息"
|
|
196
298
|
}
|
|
197
|
-
}
|
|
299
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"zh": {
|
|
3
|
+
"notice.messageType.alert": "告警消息",
|
|
4
|
+
"notice.messageType.system": "系统通知",
|
|
5
|
+
"notice.messageType.business": "业务消息",
|
|
6
|
+
"notice.messageType.unknown": "未知消息",
|
|
7
|
+
"notice.projectSelect.placeholder": "所属项目",
|
|
8
|
+
"notice.projectSelect.all": "全部",
|
|
9
|
+
"notice.buttons.search": "搜索",
|
|
10
|
+
"notice.buttons.reset": "重置",
|
|
11
|
+
"notice.tools.pread.success": "批量标为已读成功",
|
|
12
|
+
"notice.tools.pread.error": "批量标为已读失败",
|
|
13
|
+
"notice.tools.punread.success": "批量标为未读成功",
|
|
14
|
+
"notice.tools.punread.error": "批量标为未读失败",
|
|
15
|
+
"notice.tools.pdelete.success": "批量删除成功",
|
|
16
|
+
"notice.tools.pdelete.error": "批量删除失败",
|
|
17
|
+
"notice.settings.title": "消息通知",
|
|
18
|
+
"notice.settings.soundToggle.enabled": "新消息声音提示已开启",
|
|
19
|
+
"notice.settings.soundToggle.disabled": "新消息声音提示已关闭",
|
|
20
|
+
"notice.settings.confirm.enable.title": "开启确认",
|
|
21
|
+
"notice.settings.confirm.disable.title": "关闭确认",
|
|
22
|
+
"notice.settings.confirm.enable.content": "开启新消息声音提示吗?",
|
|
23
|
+
"notice.settings.confirm.disable.content": "关闭新消息声音提示吗?",
|
|
24
|
+
"notice.settings.confirm.ok": "确认",
|
|
25
|
+
"notice.settings.confirm.cancel": "取消",
|
|
26
|
+
"notice.settings.message.success": "操作成功",
|
|
27
|
+
"notice.settings.message.error": "操作失败",
|
|
28
|
+
"notice.table.column.title": "消息标题",
|
|
29
|
+
"notice.table.column.project": "所属项目",
|
|
30
|
+
"notice.table.column.operation": "操作",
|
|
31
|
+
"notice.table.operation.primary": "主操作",
|
|
32
|
+
"notice.table.operation.secondary": "次操作",
|
|
33
|
+
"notice.table.operation.detail": "详情",
|
|
34
|
+
"other.enterprise.unread.messages.tooltip": "其他企业有未读消息通知,可切换查看",
|
|
35
|
+
"enterprise.field.message": "消息通知"
|
|
36
|
+
},
|
|
37
|
+
"en": {
|
|
38
|
+
"notice.messageType.alert": "Device Message",
|
|
39
|
+
"notice.messageType.system": "System Notice",
|
|
40
|
+
"notice.messageType.business": "Business Message",
|
|
41
|
+
"notice.messageType.unknown": "Unknown Message",
|
|
42
|
+
"notice.tools.pread.success": "Marked as read successfully",
|
|
43
|
+
"notice.tools.pread.error": "Failed to mark as read",
|
|
44
|
+
"notice.tools.punread.success": "Marked as unread successfully",
|
|
45
|
+
"notice.tools.punread.error": "Failed to mark as unread",
|
|
46
|
+
"notice.tools.pdelete.success": "Deleted successfully",
|
|
47
|
+
"notice.tools.pdelete.error": "Failed to delete",
|
|
48
|
+
"notice.settings.title": "Message Notifications",
|
|
49
|
+
"notice.settings.soundToggle.enabled": "New message sound notification enabled",
|
|
50
|
+
"notice.settings.soundToggle.disabled": "New message sound notification disabled",
|
|
51
|
+
"notice.settings.confirm.enable.title": "Enable Confirmation",
|
|
52
|
+
"notice.settings.confirm.disable.title": "Disable Confirmation",
|
|
53
|
+
"notice.settings.confirm.enable.content": "Enable new message sound notification?",
|
|
54
|
+
"notice.settings.confirm.disable.content": "Disable new message sound notification?",
|
|
55
|
+
"notice.settings.confirm.ok": "Confirm",
|
|
56
|
+
"notice.settings.confirm.cancel": "Cancel",
|
|
57
|
+
"notice.settings.message.success": "Operation successful",
|
|
58
|
+
"notice.settings.message.error": "Operation failed",
|
|
59
|
+
"notice.table.column.title": "Message Title",
|
|
60
|
+
"notice.table.column.project": "Project",
|
|
61
|
+
"notice.table.column.operation": "Operation",
|
|
62
|
+
"notice.table.operation.primary": "Primary",
|
|
63
|
+
"notice.table.operation.secondary": "Secondary",
|
|
64
|
+
"notice.table.operation.detail": "Detail",
|
|
65
|
+
"other.enterprise.unread.messages.tooltip": "Other enterprises have unread message notifications, you can switch to view",
|
|
66
|
+
"enterprise.field.message": "Message Notification"
|
|
67
|
+
}
|
|
68
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuya-sat/sdf-main-sdk",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.211",
|
|
4
4
|
"main": "./dist/main.bundle.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@babel/preset-typescript": "^7.18.6",
|
|
18
18
|
"@sentry/tracing": "^6.13.3",
|
|
19
19
|
"@types/js-cookie": "^3.0.2",
|
|
20
|
-
"@types/react": "
|
|
20
|
+
"@types/react": "17.0.52",
|
|
21
21
|
"@types/react-dom": "^17.0.0",
|
|
22
22
|
"@types/react-router": "^5.1.19",
|
|
23
23
|
"@types/react-router-dom": "^5.1.7",
|
|
@@ -48,8 +48,13 @@
|
|
|
48
48
|
"@ant-design/icons": "^4.7.0",
|
|
49
49
|
"@ctrl/tinycolor": "^3.4.1",
|
|
50
50
|
"@sentry/react": "^6.13.3",
|
|
51
|
+
"@tuya-fe/space-components": "^0.0.5",
|
|
51
52
|
"@tuya-sat/sdf-plugin-runtime": "^0.0.1",
|
|
52
|
-
"
|
|
53
|
+
"@types/lodash": "^4.17.20",
|
|
54
|
+
"ahooks": "^3.9.0",
|
|
55
|
+
"antd": "5.26.6",
|
|
56
|
+
"antd-img-crop": "^4.25.0",
|
|
57
|
+
"antd-style": "^3.7.1",
|
|
53
58
|
"axios": "^0.21.1",
|
|
54
59
|
"classnames": "^2.3.1",
|
|
55
60
|
"events": "^3.3.0",
|
|
@@ -57,18 +62,23 @@
|
|
|
57
62
|
"i18next-browser-languagedetector": "^6.1.0",
|
|
58
63
|
"js-cookie": "^3.0.1",
|
|
59
64
|
"js-sha256": "^0.9.0",
|
|
65
|
+
"lodash": "^4.17.21",
|
|
60
66
|
"mqtt": "^4.3.7",
|
|
61
67
|
"process": "^0.11.10",
|
|
62
68
|
"pubsub-js": "^1.9.4",
|
|
63
69
|
"qiankun": "github:tuya-sat/qiankun#86d94a0",
|
|
64
70
|
"qrcode.react": "^1.0.1",
|
|
65
71
|
"rc-util": "^5.24.4",
|
|
66
|
-
"react": "^
|
|
67
|
-
"react-dom": "^
|
|
72
|
+
"react": "^18.3.1",
|
|
73
|
+
"react-dom": "^18.3.1",
|
|
68
74
|
"react-i18next": "^11.18.6",
|
|
69
75
|
"react-router-dom": "^5.2.0",
|
|
70
76
|
"url": "^0.11.0",
|
|
71
77
|
"web-vitals": "^1.0.1",
|
|
72
78
|
"xhook": "^1.4.9"
|
|
79
|
+
},
|
|
80
|
+
"resolutions": {
|
|
81
|
+
"@ant-design/cssinjs": "1.23.0",
|
|
82
|
+
"@ant-design/cssinjs-utils": "1.1.3"
|
|
73
83
|
}
|
|
74
|
-
}
|
|
84
|
+
}
|
package/webpack.config.js
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_SDF=self.webpackChunk_SDF||[]).push([[131],{82131:function(e,t,n){n.r(t),n.d(t,{getCLS:function(){return v},getFCP:function(){return g},getFID:function(){return F},getLCP:function(){return k},getTTFB:function(){return C}});var i,a,r,o,u=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},f=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},m="function"==typeof WeakSet?new WeakSet:new Set,p=function(e,t,n){var i;return function(){t.value>=0&&(n||m.has(t)||"hidden"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},v=function(e,t){var n,i=u("CLS",0),a=function(e){e.hadRecentInput||(i.value+=e.value,i.entries.push(e),n())},r=c("layout-shift",a);r&&(n=p(e,i,t),f((function(){r.takeRecords().map(a),n()})),s((function(){i=u("CLS",0),n=p(e,i,t)})))},d=-1,l=function(){return"hidden"===document.visibilityState?0:1/0},h=function(){f((function(e){var t=e.timeStamp;d=t}),!0)},S=function(){return d<0&&(d=l(),h(),s((function(){setTimeout((function(){d=l(),h()}),0)}))),{get timeStamp(){return d}}},g=function(e,t){var n,i=S(),a=u("FCP"),r=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime<i.timeStamp&&(a.value=e.startTime,a.entries.push(e),m.add(a),n()))},o=performance.getEntriesByName("first-contentful-paint")[0],f=o?null:c("paint",r);(o||f)&&(n=p(e,a,t),o&&r(o),s((function(i){a=u("FCP"),n=p(e,a,t),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,m.add(a),n()}))}))})))},y={passive:!0,capture:!0},E=new Date,w=function(e,t){i||(i=t,a=e,r=new Date,b(removeEventListener),L())},L=function(){if(a>=0&&a<r-E){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+a};o.forEach((function(t){t(e)})),o=[]}},T=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){w(e,t),a()},i=function(){a()},a=function(){removeEventListener("pointerup",n,y),removeEventListener("pointercancel",i,y)};addEventListener("pointerup",n,y),addEventListener("pointercancel",i,y)}(t,e):w(t,e)}},b=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,T,y)}))},F=function(e,t){var n,r=S(),v=u("FID"),d=function(e){e.startTime<r.timeStamp&&(v.value=e.processingStart-e.startTime,v.entries.push(e),m.add(v),n())},l=c("first-input",d);n=p(e,v,t),l&&f((function(){l.takeRecords().map(d),l.disconnect()}),!0),l&&s((function(){var r;v=u("FID"),n=p(e,v,t),o=[],a=-1,i=null,b(addEventListener),r=d,o.push(r),L()}))},k=function(e,t){var n,i=S(),a=u("LCP"),r=function(e){var t=e.startTime;t<i.timeStamp&&(a.value=t,a.entries.push(e)),n()},o=c("largest-contentful-paint",r);if(o){n=p(e,a,t);var v=function(){m.has(a)||(o.takeRecords().map(r),o.disconnect(),m.add(a),n())};["keydown","click"].forEach((function(e){addEventListener(e,v,{once:!0,capture:!0})})),f(v,!0),s((function(i){a=u("LCP"),n=p(e,a,t),requestAnimationFrame((function(){requestAnimationFrame((function(){a.value=performance.now()-i.timeStamp,m.add(a),n()}))}))}))}},C=function(e){var t,n=u("TTFB");t=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(n.value=n.delta=t.responseStart,n.value<0)return;n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("pageshow",t)}}}]);
|
|
2
|
-
//# sourceMappingURL=131.9ff515a6.chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"131.9ff515a6.chunk.js","mappings":"+PAAA,IAAIA,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,SAASJ,EAAEC,GAAG,MAAM,CAACI,KAAKL,EAAEM,WAAM,IAASL,GAAG,EAAEA,EAAEM,MAAM,EAAEC,QAAQ,GAAGC,GAAG,MAAMC,OAAOC,KAAKC,MAAM,KAAKF,OAAOG,KAAKC,MAAM,cAAcD,KAAKE,UAAU,MAAM,EAAEC,EAAE,SAAShB,EAAEC,GAAG,IAAI,GAAGgB,oBAAoBC,oBAAoBC,SAASnB,GAAG,CAAC,GAAG,gBAAgBA,KAAK,2BAA2BoB,MAAM,OAAO,IAAIlB,EAAE,IAAIe,qBAAoB,SAAUjB,GAAG,OAAOA,EAAEqB,aAAaC,IAAIrB,EAAG,IAAG,OAAOC,EAAEqB,QAAQ,CAACC,KAAKxB,EAAEyB,UAAS,IAAKvB,CAAC,CAAW,CAAT,MAAMF,GAAG,CAAC,EAAE0B,EAAE,SAAS1B,EAAEC,GAAG,IAAIC,EAAE,SAASA,EAAEC,GAAG,aAAaA,EAAEqB,MAAM,WAAWG,SAASC,kBAAkB5B,EAAEG,GAAGF,IAAI4B,oBAAoB,mBAAmB3B,GAAE,GAAI2B,oBAAoB,WAAW3B,GAAE,IAAK,EAAE4B,iBAAiB,mBAAmB5B,GAAE,GAAI4B,iBAAiB,WAAW5B,GAAE,EAA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["webpack://_SDF/./node_modules/web-vitals/dist/web-vitals.js"],"sourcesContent":["var e,t,n,i,a=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:\"v1-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12)}},r=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if(\"first-input\"===e&&!(\"PerformanceEventTiming\"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},o=function(e,t){var n=function n(i){\"pagehide\"!==i.type&&\"hidden\"!==document.visibilityState||(e(i),t&&(removeEventListener(\"visibilitychange\",n,!0),removeEventListener(\"pagehide\",n,!0)))};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},c=function(e){addEventListener(\"pageshow\",(function(t){t.persisted&&e(t)}),!0)},u=\"function\"==typeof WeakSet?new WeakSet:new Set,f=function(e,t,n){var i;return function(){t.value>=0&&(n||u.has(t)||\"hidden\"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},s=function(e,t){var n,i=a(\"CLS\",0),u=function(e){e.hadRecentInput||(i.value+=e.value,i.entries.push(e),n())},s=r(\"layout-shift\",u);s&&(n=f(e,i,t),o((function(){s.takeRecords().map(u),n()})),c((function(){i=a(\"CLS\",0),n=f(e,i,t)})))},m=-1,p=function(){return\"hidden\"===document.visibilityState?0:1/0},v=function(){o((function(e){var t=e.timeStamp;m=t}),!0)},d=function(){return m<0&&(m=p(),v(),c((function(){setTimeout((function(){m=p(),v()}),0)}))),{get timeStamp(){return m}}},l=function(e,t){var n,i=d(),o=a(\"FCP\"),s=function(e){\"first-contentful-paint\"===e.name&&(p&&p.disconnect(),e.startTime<i.timeStamp&&(o.value=e.startTime,o.entries.push(e),u.add(o),n()))},m=performance.getEntriesByName(\"first-contentful-paint\")[0],p=m?null:r(\"paint\",s);(m||p)&&(n=f(e,o,t),m&&s(m),c((function(i){o=a(\"FCP\"),n=f(e,o,t),requestAnimationFrame((function(){requestAnimationFrame((function(){o.value=performance.now()-i.timeStamp,u.add(o),n()}))}))})))},h={passive:!0,capture:!0},S=new Date,y=function(i,a){e||(e=a,t=i,n=new Date,w(removeEventListener),g())},g=function(){if(t>=0&&t<n-S){var a={entryType:\"first-input\",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};i.forEach((function(e){e(a)})),i=[]}},E=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){y(e,t),a()},i=function(){a()},a=function(){removeEventListener(\"pointerup\",n,h),removeEventListener(\"pointercancel\",i,h)};addEventListener(\"pointerup\",n,h),addEventListener(\"pointercancel\",i,h)}(t,e):y(t,e)}},w=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,E,h)}))},L=function(n,s){var m,p=d(),v=a(\"FID\"),l=function(e){e.startTime<p.timeStamp&&(v.value=e.processingStart-e.startTime,v.entries.push(e),u.add(v),m())},h=r(\"first-input\",l);m=f(n,v,s),h&&o((function(){h.takeRecords().map(l),h.disconnect()}),!0),h&&c((function(){var r;v=a(\"FID\"),m=f(n,v,s),i=[],t=-1,e=null,w(addEventListener),r=l,i.push(r),g()}))},T=function(e,t){var n,i=d(),s=a(\"LCP\"),m=function(e){var t=e.startTime;t<i.timeStamp&&(s.value=t,s.entries.push(e)),n()},p=r(\"largest-contentful-paint\",m);if(p){n=f(e,s,t);var v=function(){u.has(s)||(p.takeRecords().map(m),p.disconnect(),u.add(s),n())};[\"keydown\",\"click\"].forEach((function(e){addEventListener(e,v,{once:!0,capture:!0})})),o(v,!0),c((function(i){s=a(\"LCP\"),n=f(e,s,t),requestAnimationFrame((function(){requestAnimationFrame((function(){s.value=performance.now()-i.timeStamp,u.add(s),n()}))}))}))}},b=function(e){var t,n=a(\"TTFB\");t=function(){try{var t=performance.getEntriesByType(\"navigation\")[0]||function(){var e=performance.timing,t={entryType:\"navigation\",startTime:0};for(var n in e)\"navigationStart\"!==n&&\"toJSON\"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(n.value=n.delta=t.responseStart,n.value<0)return;n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"pageshow\",t)};export{s as getCLS,l as getFCP,L as getFID,T as getLCP,b as getTTFB};\n"],"names":["e","t","n","i","a","name","value","delta","entries","id","concat","Date","now","Math","floor","random","r","PerformanceObserver","supportedEntryTypes","includes","self","getEntries","map","observe","type","buffered","o","document","visibilityState","removeEventListener","addEventListener","c","persisted","u","WeakSet","Set","f","has","s","hadRecentInput","push","takeRecords","m","p","v","timeStamp","d","setTimeout","l","disconnect","startTime","add","performance","getEntriesByName","requestAnimationFrame","h","passive","capture","S","y","w","g","entryType","target","cancelable","processingStart","forEach","E","L","T","once","b","getEntriesByType","timing","max","navigationStart","responseStart","readyState"],"sourceRoot":""}
|