@tuya-sat/sdf-main-sdk 0.4.0-alpha.7 → 0.4.0-alpha.9

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.
Files changed (39) hide show
  1. package/README.md +234 -1
  2. package/dist/{131.e16ae749.chunk.js → 131.96b52236.chunk.js} +1 -1
  3. package/dist/{131.e16ae749.chunk.js.map → 131.96b52236.chunk.js.map} +1 -1
  4. package/dist/api/urls.d.ts +3 -0
  5. package/dist/api/utils.d.ts +1 -0
  6. package/dist/components/403/index.d.ts +1 -0
  7. package/dist/components/403/svg403.d.ts +1 -0
  8. package/dist/components/404/svg404.d.ts +1 -0
  9. package/dist/components/BLayout/components/Header/index.d.ts +6 -2
  10. package/dist/components/BLogin/component/PhoneRegionSelect/index.d.ts +3 -0
  11. package/dist/components/BLogin/component/VerifyCode/index.d.ts +1 -1
  12. package/dist/components/Expiration/index.d.ts +4 -0
  13. package/dist/components/PLogin/index.d.ts +2 -5
  14. package/dist/en.json +23 -4
  15. package/dist/hooks/index.d.ts +7 -4
  16. package/dist/index.d.ts +32 -7
  17. package/dist/main.bundle.js +1 -1
  18. package/dist/main.bundle.js.LICENSE.txt +0 -27
  19. package/dist/main.bundle.js.map +1 -1
  20. package/dist/main.css +202 -12
  21. package/dist/main.css.map +1 -1
  22. package/dist/manifest.json +7 -3
  23. package/dist/pages/403.d.ts +1 -1
  24. package/dist/pages/404.d.ts +1 -1
  25. package/dist/pages/home/setting/index.d.ts +2 -2
  26. package/dist/pages/login.d.ts +1 -0
  27. package/dist/static/img/38f4e4f2c758741685d0.png +0 -0
  28. package/dist/static/img/72dd80e82e7a8baf135c.png +0 -0
  29. package/dist/static/img/a69c3be28e47eaaf341d.png +0 -0
  30. package/dist/static/img/df1e1d9e5f564d47f521.png +0 -0
  31. package/dist/static/img/f3a9d2e90f21cc92f9ed.svg +194 -0
  32. package/dist/utils/checkPass.d.ts +4 -0
  33. package/dist/utils/common.d.ts +7 -2
  34. package/dist/utils/index.d.ts +1 -0
  35. package/dist/zh.json +21 -3
  36. package/package.json +2 -2
  37. package/webpack.config.js +4 -0
  38. package/dist/pages/expiration.d.ts +0 -1
  39. package/dist/static/img/ddf3e1f8ec8350445a4a.png +0 -0
package/README.md CHANGED
@@ -1 +1,234 @@
1
- # sdf-main-sdk
1
+ # [@tuya-sat/sdf-main-sdk](https://www.npmjs.com/package/@tuya-sat/sdf-main-sdk)
2
+
3
+ 涂鸦 SaaS 开发框架的主应用 SDK,核心逻辑有开发框架团队维护并保障稳定性。业务方只需要基于此 SDK,进行要少量的业务开发,就可以定制符合自己业务诉求的主应用
4
+
5
+ ## 如何使用
6
+ 1. 快速初始化主应用项目
7
+ ```shell
8
+ # 创建项目 `saas-main-app`
9
+ npx @tuya-sat/create-micro-app@latest saas-main-app -t main
10
+ ```
11
+
12
+ 2. 配置调试 SaaS
13
+ 打开 `./micro.config.js`,配置需要调试的 saas 域名。如下:
14
+ ```javascript
15
+ module.exports = {
16
+ debuggerConfig: {
17
+ target: 'https://<my-first-saas-host>', // SaaS 域名
18
+ isMainApp: true,
19
+ }
20
+ }
21
+ ```
22
+
23
+ 3. 启动项目
24
+ ```shell
25
+ yarn start
26
+ ```
27
+
28
+ ## 功能介绍
29
+ ### Hooks
30
+
31
+ hooks 的定义和功能如下,将 hooks 存放到 `./src/hooks` 目录下,sdk 会读取并加载
32
+
33
+ ```typescript
34
+ interface IHooks {
35
+ /**
36
+ * 功能:SaaS 页面渲染前钩子,主应用生命周期中最早的钩子
37
+ */
38
+ enterAppHook?: () => void;
39
+
40
+ httpHook?: {
41
+ /**
42
+ * 功能:请求前拦截处理。可以在此处添加自定义的请求头
43
+ * 示例:
44
+ * ```
45
+ * before: (req) => {
46
+ * req.headers && (req.headers["abc"] = "sdf-main-sdk");
47
+ * }
48
+ * ```
49
+ */
50
+ before?: (req) => void;
51
+
52
+ /**
53
+ * 功能:响应拦截处理。可以在这里统一格式化数据
54
+ * 示例:
55
+ * ```
56
+ * after: (data) => {
57
+ * // ....数据格式化逻辑
58
+ * return data;
59
+ * }
60
+ * ```
61
+ */
62
+ after?: (data) => any;
63
+ };
64
+
65
+ /**
66
+ * 功能:未登录时,对 SaaS 信息拦截处理
67
+ */
68
+ unLoginSaaSHook?: (saas: any) => Promise<any>;
69
+
70
+ /**
71
+ * 功能:登录成功后,对 SaaS 信息拦截处理
72
+ */
73
+ loginedSaaSHook?: (saasInfo: any) => Promise<any>;
74
+ }
75
+ ```
76
+
77
+ ### 页面 UI 配置
78
+ 相关的配置,是以 props 属性的方式透传到组件内。具体配置项与使用方法如下
79
+
80
+ #### 1. 登录页
81
+ ##### 类型定义
82
+ ```ts
83
+ interface LoginPageProps {
84
+ extra?: {
85
+ // 标题
86
+ TitleSolt?: React.FC<{ logo: string; title: string }>;
87
+
88
+ // 背景图
89
+ BgSlot?: React.FC<{ bg: string }>;
90
+
91
+ // 三要素
92
+ ClauseSlot?: React.FC;
93
+
94
+ // 右上角导航
95
+ ExtraNavSlot?: React.FC;
96
+ };
97
+ customStyle?: {
98
+ // 自定义表单样式
99
+ formStyle?: React.CSSProperties;
100
+ };
101
+ }
102
+ ```
103
+
104
+ ##### 示例
105
+ ```tsx
106
+ // ./src/pages/login/index.tsx
107
+ import { LoginPage } from "@tuya-sat/sdf-main-sdk";
108
+
109
+ export default (props: LoginPageProps) => {
110
+ return <LoginPage {...props} />
111
+ }
112
+ ```
113
+
114
+ #### 2. 忘记密码页
115
+ ##### 类型定义
116
+ ```ts
117
+ interface ForgetPageProps {
118
+ extra?: {
119
+ // 背景图
120
+ BgSlot?: React.FC<{ bg: string }>;
121
+ };
122
+ customStyle?: {
123
+ // 自定义表单样式
124
+ formStyle?: React.CSSProperties;
125
+ };
126
+ }
127
+ ```
128
+
129
+ ###### 示例
130
+ ```tsx
131
+ // ./src/pages/forget/index.tsx
132
+ import { ForgetPage } from "@tuya-sat/sdf-main-sdk";
133
+
134
+ export default (props: ForgetPageProps) => {
135
+ return <ForgetPage {...props} />
136
+ }
137
+ ```
138
+
139
+ #### 3. 注册页
140
+ ##### 类型定义
141
+ ```ts
142
+ interface RegisterPageProps {
143
+ extra?: {
144
+ // 背景图
145
+ BgSlot?: React.FC<{ bg: string }>;
146
+ };
147
+ customStyle?: {
148
+ // 自定义表单样式
149
+ formStyle?: React.CSSProperties;
150
+ };
151
+ }
152
+ ```
153
+
154
+ ##### 示例
155
+ ```tsx
156
+ // ./src/pages/register/index.tsx
157
+ import { RegisterPage } from "@tuya-sat/sdf-main-sdk";
158
+
159
+ export default (props: RegisterPageProps) => {
160
+ return <RegisterPage {...props} />
161
+ }
162
+ ```
163
+
164
+ #### 4. 设置页
165
+ ##### 类型定义
166
+ ```ts
167
+ interface SettingPageProps {
168
+ extra?: {
169
+ beforeSlot?: React.FC;
170
+ afterSlot?: React.FC;
171
+ };
172
+ }
173
+
174
+ ```
175
+
176
+ ##### 示例
177
+ ```tsx
178
+ // ./src/pages/setting/index.tsx
179
+ import { SettingPage } from "@tuya-sat/sdf-main-sdk";
180
+
181
+ export default (props: RegisterPageProps) => {
182
+ return <SettingPage {...props} />
183
+ }
184
+ ```
185
+
186
+ ### 头部自定义配置
187
+ ##### 类型定义
188
+ ```ts
189
+ type NavProps = {
190
+ extra?: {
191
+ // 自定义logo、标题
192
+ LogoTitleSlot?: FC<{ title?: string; logo?: string }>;
193
+ // 自定义右上角导航
194
+ HeaderNavSlot?: FC;
195
+ BeforeHeaderNavSlot?: FC;
196
+ AfterHeaderNavSlot?: FC;
197
+ // 自定义用户信息
198
+ UserSlot?: FC;
199
+ // 自定义 app 二维码下载
200
+ QrcodeSlot?: FC;
201
+ };
202
+ hooks?: {
203
+ modify?: (dmenus: Dmenus) => Dmenus;
204
+ customUserRoles?: () => Promise<{
205
+ role_code: string;
206
+ role_name: string;
207
+ }[]>;
208
+ };
209
+ };
210
+ ```
211
+
212
+ ##### 示例
213
+ ```tsx
214
+ // ./src/nav/index.tsx
215
+ import { MNav } from "@tuya-sat/sdf-main-sdk";
216
+
217
+ export default (props: NavProps) => {
218
+ return <SettingPage {...props} />
219
+ }
220
+ ```
221
+
222
+ ### 多语言
223
+ 如果新增了自定义组件,那其多语言需要存放到 `./src/lang` 目录下,并且在组件内部需要引用 sdk 暴露的 i18n 方法进行翻译。如下:
224
+
225
+ ```tsx
226
+ import { i18n } from '@tuya-sat/sdf-main-sdk';
227
+
228
+ export default function CustomComponent() {
229
+ return (
230
+ // 注意:必须使用 sdk 暴露的 i18n 方法
231
+ <div>{i18n.t('some key')}</div>
232
+ )
233
+ }
234
+ ```
@@ -1,2 +1,2 @@
1
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.e16ae749.chunk.js.map
2
+ //# sourceMappingURL=131.96b52236.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"131.e16ae749.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,MAA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F,EAAE2E,gBAAgB,IAAI,OAAO1E,CAAC,CAAjL,GAAqL,GAAGC,EAAEI,MAAMJ,EAAEK,MAAMN,EAAE2E,cAAc1E,EAAEI,MAAM,EAAE,OAAOJ,EAAEM,QAAQ,CAACP,GAAGD,EAAEE,EAAY,CAAT,MAAMF,GAAG,CAAC,EAAE,aAAa2B,SAASkD,WAAW9B,WAAW9C,EAAE,GAAG6B,iBAAiB,WAAW7B,EAAE,C","sources":["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":""}
1
+ {"version":3,"file":"131.96b52236.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,EAA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AAIC,EAAEC,EAAEE,EAAE,QAAQH,EAAE,WAAW,IAAI,IAAIA,EAAEmD,YAAYoB,iBAAiB,cAAc,IAAI,WAAW,IAAIxE,EAAEoD,YAAYqB,OAAOxE,EAAE,CAAC6D,UAAU,aAAaZ,UAAU,GAAG,IAAI,IAAIhD,KAAKF,EAAE,oBAAoBE,GAAG,WAAWA,IAAID,EAAEC,GAAGW,KAAK6D,IAAI1E,EAAEE,GAAGF,EAAE2E,gBAAgB,IAAI,OAAO1E,CAAC,CAAjL,GAAqL,GAAGC,EAAEI,MAAMJ,EAAEK,MAAMN,EAAE2E,cAAc1E,EAAEI,MAAM,EAAE,OAAOJ,EAAEM,QAAQ,CAACP,GAAGD,EAAEE,EAAY,CAAT,MAAMF,GAAG,CAAC,EAAE,aAAa2B,SAASkD,WAAW9B,WAAW9C,EAAE,GAAG6B,iBAAiB,WAAW7B,EAAE,C","sources":["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":""}
@@ -3,6 +3,7 @@ export declare const UNLOGIN_APIS: {
3
3
  CODE: string;
4
4
  TENANDCODE: string;
5
5
  REGISTER: string;
6
+ LOGIN_CAPTCHA: string;
6
7
  CAPTCHA: string;
7
8
  SAAS: string;
8
9
  };
@@ -11,6 +12,7 @@ export declare const URLS: {
11
12
  CODE: string;
12
13
  TENANDCODE: string;
13
14
  REGISTER: string;
15
+ LOGIN_CAPTCHA: string;
14
16
  CAPTCHA: string;
15
17
  SAAS: string;
16
18
  RESET_PWD: string;
@@ -26,6 +28,7 @@ export declare const URLS: {
26
28
  NOTICE_UNREAD_COUNT_GET: string;
27
29
  MODIFY_MOBILE: string;
28
30
  MODIFY_EMAIL: string;
31
+ SAAS_LOCALES: string;
29
32
  LOGIN: string;
30
33
  LOGOUT: string;
31
34
  };
@@ -1,2 +1,3 @@
1
1
  export declare const getLangKey: () => string;
2
2
  export declare const getErrorMsg: (error: any) => string;
3
+ export declare const loadUserInfo: () => Promise<any>;
@@ -0,0 +1 @@
1
+ export default function Com403(): JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Svg403(): JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Svg404(): JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { DItemProps } from '../../../BCustomNav';
3
3
  export type Dmenus = DItemProps[];
4
- type NavProps = {
4
+ export type NavProps = {
5
5
  extra?: {
6
6
  LogoTitleSlot?: FC<{
7
7
  title?: string;
@@ -14,7 +14,11 @@ type NavProps = {
14
14
  QrcodeSlot?: FC;
15
15
  };
16
16
  hooks?: {
17
- modify: (dmenus: Dmenus) => Dmenus;
17
+ modify?: (dmenus: Dmenus) => Dmenus;
18
+ customUserRoles?: () => Promise<{
19
+ role_code: string;
20
+ role_name: string;
21
+ }[]>;
18
22
  };
19
23
  };
20
24
  /**
@@ -0,0 +1,3 @@
1
+ import { SelectProps } from "antd";
2
+ declare const PhoneRegionSelect: (props: SelectProps) => JSX.Element;
3
+ export default PhoneRegionSelect;
@@ -1,6 +1,6 @@
1
1
  import { FormInstance } from 'antd';
2
2
  declare const VerifyCode: ({ form, action, }: {
3
3
  form: FormInstance;
4
- action: 'forgot' | 'register';
4
+ action: 'forgot' | 'register' | 'login';
5
5
  }) => JSX.Element;
6
6
  export default VerifyCode;
@@ -0,0 +1,4 @@
1
+ export default function Index(props: {
2
+ needPurchaseApp?: boolean;
3
+ isSaasExpiration?: boolean;
4
+ }): JSX.Element;
@@ -1,6 +1,3 @@
1
- declare const PLogin: ({ hooks, extra, customStyle }: {
2
- hooks: any;
3
- extra: any;
4
- customStyle: any;
5
- }) => JSX.Element;
1
+ import { FC } from "react";
2
+ declare const PLogin: FC<any>;
6
3
  export default PLogin;
package/dist/en.json CHANGED
@@ -12,6 +12,7 @@
12
12
  "login.form.password.label": "Password",
13
13
  "login.form.password.validate.require": "Please input password",
14
14
  "login.form.password.validate.pattern": "Password length is 8-20 and contains at least three character types (numbers, uppercase letters, lowercase letters and English symbols)",
15
+ "login.form.password.validate.pattern2": "Password length is {{min}}-{{max}} and contains at least three character types (numbers, uppercase letters, lowercase letters and English symbols)",
15
16
  "login.form.password.placeholder": "Please enter password",
16
17
  "login.form.newPassword.label": "New Password",
17
18
  "login.form.phone.label": "Phone number",
@@ -67,7 +68,7 @@
67
68
  "setting.name": "Name",
68
69
  "setting.username": "Username",
69
70
  "setting.password": "Password",
70
- "setting.role": "",
71
+ "setting.role": "Roles",
71
72
  "setting.modifyPwd": "Change Password",
72
73
  "setting.language": "Language",
73
74
  "setting.form.oldPassword.label": "Old password",
@@ -97,6 +98,7 @@
97
98
  "notice.StatusSelect.all": "All",
98
99
  "notice.StatusSelect.readed": "Read",
99
100
  "notice.StatusSelect.unread": "Unread",
101
+ "notice.buttons.read": "Mark as unread",
100
102
  "notice.badge.title": "Message Notifications",
101
103
  "notice.badge.type": "Notification Types",
102
104
  "notice.badge.message": "View all messages",
@@ -146,12 +148,14 @@
146
148
  "httpCodeText.timeout": "Request timed out",
147
149
  "httpCodeText.abort": "Connection failed",
148
150
  "httpCodeText.callBack": "Network exception",
149
- "appHint1": "Scan the QR code with Smart Industry App",
151
+ "appHint1": "Scan the QR code with Tuya Spatial AI App",
150
152
  "appHint2": "explorer more features",
151
153
  "backLoginPage": "Back to Page Login",
152
154
  "backHome": "Back Home",
153
155
  "pageError": "Sorry, you are not authorized to access this page.",
154
- "page404": "Sorry, the page you visited does not exist.",
156
+ "page403.title": "403",
157
+ "page403.desc": "Forbidden",
158
+ "page404": "Not Found",
155
159
  "page500": "System error, try again later",
156
160
  "emptyPage": "No authority, please contact the administrator to add permissions",
157
161
  "expirationPage": "The SaaS experience service has expired, please contact the developer to pay",
@@ -173,6 +177,21 @@
173
177
  "relogin.tip": "The account has been logged in on another device (browser) or has expired",
174
178
  "relogin.btn": "Re-Login",
175
179
  "relogin.pwd": "If it is not your operation, it is recommended to go to the account settings to change the password",
176
- "etip": "哎呀,出现了一些问题,请稍后重试。"
180
+ "etip": "Oops, there seems to be a problem. Please try again later.",
181
+ "microApp.expired.result.title1": "You have not purchased this micro-app.",
182
+ "microApp.expired.result.title2": "Micro-app has expired.",
183
+ "microApp.expired.result.title3": "SaaS has expired.",
184
+ "microApp.expired.result.subTitle": "After successful purchase, you can continue to use it.",
185
+ "microApp.expired.result.purchaseBtn": "Buy It Now",
186
+ "microApp.purchaseModal.product1.btn": " Purchase the MicroApp",
187
+ "microApp.purchaseModal.product1.desc": " Single MicroApp ¥10,000 per year, all-inclusive, no longer separately calculating various service resource consumption.",
188
+ "microApp.purchaseModal.product1.price": " ¥10,000 <span>per year</span>",
189
+ "microApp.purchaseModal.product1.title": " Option One",
190
+ "microApp.purchaseModal.product2.btn": "Purchase IoT Core",
191
+ "microApp.purchaseModal.product2.desc": " Annual usage rights for device control MicroApp, resource consumption is accounted for in the IoT Core service, no need to purchase mini-applications separately.",
192
+ "microApp.purchaseModal.product2.title": " Option Two",
193
+ "microApp.purchaseModal.title": "Solution selection",
194
+ "global.saas.expired.tips1": "Your SaaS service has expired. To continue using it, please visit the Tuya Developer Platform to renew your subscription.",
195
+ "global.saas.expired.tips2": "Your SaaS service will expire in {{day}} days. To continue using it, please visit the Tuya Developer Platform to renew your subscription."
177
196
  }
178
197
  }
@@ -22,8 +22,11 @@ export declare const useQrCode: () => {
22
22
  enable: boolean;
23
23
  tip: string;
24
24
  qrCode: string;
25
- isImg: boolean;
26
- appHint1?: string;
27
- appHint2?: string;
25
+ qrCodeHasFavicon: boolean;
26
+ qrCodeLayout: string;
27
+ };
28
+ export declare const useMicroAppExpiration: (apps: any) => {
29
+ needPurchaseApp: boolean;
30
+ isAppExpiration: boolean;
31
+ isSaasExpiration: boolean;
28
32
  };
29
- export declare const useMicroAppExpiration: (apps: any) => boolean;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import './index.css';
2
2
  import './public-path.js';
3
3
  import { FC } from 'react';
4
+ import * as _langUtils from './lang/utils';
4
5
  export { api, URLS } from './api';
5
6
  export { useYRule } from './utils/yrule';
6
7
  export { default as i18n } from './lang';
8
+ export declare const langUtils: typeof _langUtils;
7
9
  export interface IHooks {
8
10
  /**
9
11
  * 功能:SaaS 页面渲染前钩子,主应用生命周期中最早的钩子
@@ -24,28 +26,51 @@ export interface IHooks {
24
26
  */
25
27
  before?: (req: any) => void;
26
28
  /**
27
- * 功能:响应拦截处理
29
+ * 功能:响应拦截处理。返回 false 时,中断后续逻辑
28
30
  */
29
- after?: (res: any, cb: any) => void;
31
+ after?: (res: any, cb: any) => void | false;
30
32
  };
31
- unLoginSaaSHook?: (saas: any) => void;
32
- loginApiHook?: () => void;
33
+ userInfoHook?: () => Promise<{
34
+ email: string;
35
+ mobile: string;
36
+ tenant_code: string;
37
+ account_type: number;
38
+ user_id: string;
39
+ user_name: string;
40
+ user_nick_name: string;
41
+ roles: {
42
+ role_code: string;
43
+ role_name: string;
44
+ }[];
45
+ }>;
46
+ unLoginSaaSHook?: (saasBasicInfo: any) => Promise<any>;
47
+ loginedSaaSHook?: (saasInfo: any) => Promise<any>;
33
48
  }
34
49
  export type { LoginProps } from './pages/login';
35
50
  export { default as LoginPage } from './pages/login';
51
+ export { default as LoginForm } from './components/BLogin';
52
+ export { default as PhoneRegionSelect } from './components/BLogin/component/PhoneRegionSelect';
53
+ export { default as SwitchLangSelect } from './components/BHeaderUser/components/BSwitchLang';
36
54
  export { default as ForgetPage } from './pages/forgot';
55
+ export { default as ForgetForm } from './components/BForgot';
37
56
  export { default as RegisterPage } from './pages/register';
38
57
  export { default as SettingPage } from './pages/home/setting';
39
- export { default as MBdb, IBdbInfo } from './components/MicroComponent/Header';
58
+ export { default as MBdb } from './components/MicroComponent/Header';
59
+ export type { IBdbInfo } from './components/MicroComponent/Header';
40
60
  export type { IMenus } from './components/BLayout/components/Layout';
41
61
  export { MMenu } from './components/BLayout/components/Layout';
42
- export type { Dmenus } from './components/BLayout/components/Header';
62
+ export type { Dmenus, NavProps } from './components/BLayout/components/Header';
43
63
  export { default as MNav } from './components/BLayout/components/Header';
44
64
  interface IPages {
45
65
  Login: FC & {
46
- needLogin?: boolean;
66
+ supportLogout?: boolean;
47
67
  isHideMultiLang?: boolean;
48
68
  isHidePhoneRegionNum?: boolean;
69
+ showClauseInModal?: boolean;
70
+ passwordRules?: {
71
+ min?: number;
72
+ max?: number;
73
+ };
49
74
  };
50
75
  Forget: FC;
51
76
  Register: FC & {