@pisell/private-materials 6.3.37 → 6.3.39

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 (287) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +13 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/authentication/admin/AuthMethods/AuthMethods.less +136 -0
  12. package/es/components/authentication/admin/AuthMethods/SettingList.d.ts +5 -0
  13. package/es/components/authentication/admin/AuthMethods/SettingList.js +62 -0
  14. package/es/components/authentication/admin/AuthMethods/SettingList.less +85 -0
  15. package/es/components/authentication/admin/AuthMethods/SettingsDrawer.d.ts +22 -0
  16. package/es/components/authentication/admin/AuthMethods/SettingsDrawer.js +121 -0
  17. package/es/components/authentication/admin/AuthMethods/SettingsDrawer.less +163 -0
  18. package/es/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.d.ts +11 -0
  19. package/es/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.js +15 -0
  20. package/es/components/authentication/admin/AuthMethods/components/EmailSettingsContent.d.ts +13 -0
  21. package/es/components/authentication/admin/AuthMethods/components/EmailSettingsContent.js +152 -0
  22. package/es/components/authentication/admin/AuthMethods/components/LoginMethodsList.d.ts +13 -0
  23. package/es/components/authentication/admin/AuthMethods/components/LoginMethodsList.js +114 -0
  24. package/es/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.d.ts +14 -0
  25. package/es/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.js +170 -0
  26. package/es/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.d.ts +13 -0
  27. package/es/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.js +116 -0
  28. package/es/components/authentication/admin/AuthMethods/components/index.d.ts +10 -0
  29. package/es/components/authentication/admin/AuthMethods/components/index.js +5 -0
  30. package/es/components/authentication/admin/AuthMethods/constants.d.ts +22 -0
  31. package/es/components/authentication/admin/AuthMethods/constants.js +121 -0
  32. package/es/components/authentication/admin/AuthMethods/index.d.ts +8 -0
  33. package/es/components/authentication/admin/AuthMethods/index.js +233 -0
  34. package/es/components/authentication/admin/AuthMethods/locales.d.ts +249 -0
  35. package/es/components/authentication/admin/AuthMethods/locales.js +290 -0
  36. package/es/components/authentication/admin/AuthMethods/types.d.ts +76 -0
  37. package/es/components/authentication/admin/AuthMethods/types.js +23 -0
  38. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/AuthenticationMethods.less +231 -0
  39. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.d.ts +6 -0
  40. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.js +447 -0
  41. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +84 -0
  42. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.js +107 -0
  43. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +41 -0
  44. package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.js +1 -0
  45. package/es/components/authentication/admin/ChannelAuthSetting/ChannelAuthSetting.less +111 -0
  46. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/CollectInfo.less +259 -0
  47. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.d.ts +6 -0
  48. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.js +530 -0
  49. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +72 -0
  50. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.js +86 -0
  51. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +33 -0
  52. package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.js +1 -0
  53. package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.d.ts +6 -0
  54. package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +460 -0
  55. package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.less +111 -0
  56. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/PageSetting.less +105 -0
  57. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/index.d.ts +8 -0
  58. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/index.js +185 -0
  59. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +27 -0
  60. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.js +32 -0
  61. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/types.d.ts +25 -0
  62. package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/types.js +1 -0
  63. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/PageSettingItem.less +272 -0
  64. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.d.ts +8 -0
  65. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.js +214 -0
  66. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +66 -0
  67. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.js +71 -0
  68. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +26 -0
  69. package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.js +1 -0
  70. package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
  71. package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +287 -0
  72. package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.less +111 -0
  73. package/es/components/authentication/admin/ChannelAuthSetting/index.d.ts +6 -0
  74. package/es/components/authentication/admin/ChannelAuthSetting/index.js +228 -0
  75. package/es/components/authentication/admin/ChannelAuthSetting/locales.d.ts +39 -0
  76. package/es/components/authentication/admin/ChannelAuthSetting/locales.js +50 -0
  77. package/es/components/authentication/admin/ChannelAuthSetting/types.d.ts +36 -0
  78. package/es/components/authentication/admin/ChannelAuthSetting/types.js +1 -0
  79. package/es/components/authentication/admin/CustomerAuth/CustomerAuth.less +104 -0
  80. package/es/components/authentication/admin/CustomerAuth/index.d.ts +6 -0
  81. package/es/components/authentication/admin/CustomerAuth/index.js +711 -0
  82. package/es/components/authentication/admin/CustomerAuth/locales.d.ts +66 -0
  83. package/es/components/authentication/admin/CustomerAuth/locales.js +86 -0
  84. package/es/components/authentication/admin/CustomerAuth/types.d.ts +16 -0
  85. package/es/components/authentication/admin/CustomerAuth/types.js +1 -0
  86. package/es/components/authentication/admin/CustomerOAuthConfig/CustomerOAuthConfig.less +164 -0
  87. package/es/components/authentication/admin/CustomerOAuthConfig/index.d.ts +6 -0
  88. package/es/components/authentication/admin/CustomerOAuthConfig/index.js +545 -0
  89. package/es/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +108 -0
  90. package/es/components/authentication/admin/CustomerOAuthConfig/locales.js +137 -0
  91. package/es/components/authentication/admin/CustomerOAuthConfig/types.d.ts +22 -0
  92. package/es/components/authentication/admin/CustomerOAuthConfig/types.js +1 -0
  93. package/es/components/authentication/admin/DeviceAuth/DeviceAuth.less +104 -0
  94. package/es/components/authentication/admin/DeviceAuth/index.d.ts +6 -0
  95. package/es/components/authentication/admin/DeviceAuth/index.js +366 -0
  96. package/es/components/authentication/admin/DeviceAuth/locales.d.ts +57 -0
  97. package/es/components/authentication/admin/DeviceAuth/locales.js +74 -0
  98. package/es/components/authentication/admin/DeviceAuth/types.d.ts +16 -0
  99. package/es/components/authentication/admin/DeviceAuth/types.js +1 -0
  100. package/es/components/authentication/admin/OAuthConfig/OAuthConfig.less +165 -0
  101. package/es/components/authentication/admin/OAuthConfig/index.d.ts +6 -0
  102. package/es/components/authentication/admin/OAuthConfig/index.js +347 -0
  103. package/es/components/authentication/admin/OAuthConfig/locales.d.ts +90 -0
  104. package/es/components/authentication/admin/OAuthConfig/locales.js +116 -0
  105. package/es/components/authentication/admin/OAuthConfig/types.d.ts +22 -0
  106. package/es/components/authentication/admin/OAuthConfig/types.js +1 -0
  107. package/es/components/authentication/admin/OrgAdminAuth/OrgAdminAuth.less +104 -0
  108. package/es/components/authentication/admin/OrgAdminAuth/index.d.ts +6 -0
  109. package/es/components/authentication/admin/OrgAdminAuth/index.js +543 -0
  110. package/es/components/authentication/admin/OrgAdminAuth/locales.d.ts +54 -0
  111. package/es/components/authentication/admin/OrgAdminAuth/locales.js +74 -0
  112. package/es/components/authentication/admin/OrgAdminAuth/types.d.ts +16 -0
  113. package/es/components/authentication/admin/OrgAdminAuth/types.js +1 -0
  114. package/es/components/authentication/admin/POSOperatorAuth/POSOperatorAuth.less +104 -0
  115. package/es/components/authentication/admin/POSOperatorAuth/index.d.ts +6 -0
  116. package/es/components/authentication/admin/POSOperatorAuth/index.js +374 -0
  117. package/es/components/authentication/admin/POSOperatorAuth/locales.d.ts +48 -0
  118. package/es/components/authentication/admin/POSOperatorAuth/locales.js +65 -0
  119. package/es/components/authentication/admin/POSOperatorAuth/types.d.ts +16 -0
  120. package/es/components/authentication/admin/POSOperatorAuth/types.js +1 -0
  121. package/es/components/authentication/admin/SaaSAdminAuth/SaaSAdminAuth.less +104 -0
  122. package/es/components/authentication/admin/SaaSAdminAuth/index.d.ts +6 -0
  123. package/es/components/authentication/admin/SaaSAdminAuth/index.js +625 -0
  124. package/es/components/authentication/admin/SaaSAdminAuth/locales.d.ts +54 -0
  125. package/es/components/authentication/admin/SaaSAdminAuth/locales.js +74 -0
  126. package/es/components/authentication/admin/SaaSAdminAuth/types.d.ts +16 -0
  127. package/es/components/authentication/admin/SaaSAdminAuth/types.js +1 -0
  128. package/es/components/authentication/admin/index.d.ts +26 -0
  129. package/es/components/authentication/admin/index.js +23 -0
  130. package/es/components/authentication/index.d.ts +0 -0
  131. package/es/components/authentication/index.js +0 -0
  132. package/es/components/booking/components/customSelect/index.js +6 -2
  133. package/es/components/booking/components/footer/utils.js +1 -1
  134. package/es/components/index.d.ts +2 -1
  135. package/es/components/index.js +2 -1
  136. package/es/components/pay/toC/index.js +28 -23
  137. package/es/components/pay/toC/status.d.ts +1 -0
  138. package/es/components/pay/toC/status.js +3 -0
  139. package/es/index.d.ts +2 -0
  140. package/es/index.js +1 -0
  141. package/es/pro/pisellPaymentList/example.d.ts +19 -0
  142. package/es/pro/pisellPaymentList/example.js +434 -0
  143. package/lib/components/authentication/admin/AuthMethods/AuthMethods.less +136 -0
  144. package/lib/components/authentication/admin/AuthMethods/SettingList.d.ts +5 -0
  145. package/lib/components/authentication/admin/AuthMethods/SettingList.js +75 -0
  146. package/lib/components/authentication/admin/AuthMethods/SettingList.less +85 -0
  147. package/lib/components/authentication/admin/AuthMethods/SettingsDrawer.d.ts +22 -0
  148. package/lib/components/authentication/admin/AuthMethods/SettingsDrawer.js +126 -0
  149. package/lib/components/authentication/admin/AuthMethods/SettingsDrawer.less +163 -0
  150. package/lib/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.d.ts +11 -0
  151. package/lib/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.js +42 -0
  152. package/lib/components/authentication/admin/AuthMethods/components/EmailSettingsContent.d.ts +13 -0
  153. package/lib/components/authentication/admin/AuthMethods/components/EmailSettingsContent.js +108 -0
  154. package/lib/components/authentication/admin/AuthMethods/components/LoginMethodsList.d.ts +13 -0
  155. package/lib/components/authentication/admin/AuthMethods/components/LoginMethodsList.js +108 -0
  156. package/lib/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.d.ts +14 -0
  157. package/lib/components/authentication/admin/AuthMethods/components/PasswordRulesSettingsContent.js +93 -0
  158. package/lib/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.d.ts +13 -0
  159. package/lib/components/authentication/admin/AuthMethods/components/PhoneSettingsContent.js +85 -0
  160. package/lib/components/authentication/admin/AuthMethods/components/index.d.ts +10 -0
  161. package/lib/components/authentication/admin/AuthMethods/components/index.js +51 -0
  162. package/lib/components/authentication/admin/AuthMethods/constants.d.ts +22 -0
  163. package/lib/components/authentication/admin/AuthMethods/constants.js +115 -0
  164. package/lib/components/authentication/admin/AuthMethods/index.d.ts +8 -0
  165. package/lib/components/authentication/admin/AuthMethods/index.js +196 -0
  166. package/lib/components/authentication/admin/AuthMethods/locales.d.ts +249 -0
  167. package/lib/components/authentication/admin/AuthMethods/locales.js +314 -0
  168. package/lib/components/authentication/admin/AuthMethods/types.d.ts +76 -0
  169. package/lib/components/authentication/admin/AuthMethods/types.js +53 -0
  170. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/AuthenticationMethods.less +231 -0
  171. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.d.ts +6 -0
  172. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/index.js +311 -0
  173. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +84 -0
  174. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.js +131 -0
  175. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +41 -0
  176. package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.js +17 -0
  177. package/lib/components/authentication/admin/ChannelAuthSetting/ChannelAuthSetting.less +111 -0
  178. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/CollectInfo.less +259 -0
  179. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.d.ts +6 -0
  180. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/index.js +410 -0
  181. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +72 -0
  182. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.js +110 -0
  183. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +33 -0
  184. package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.js +17 -0
  185. package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.d.ts +6 -0
  186. package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +383 -0
  187. package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.less +111 -0
  188. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/PageSetting.less +105 -0
  189. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/index.d.ts +8 -0
  190. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/index.js +148 -0
  191. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +27 -0
  192. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.js +56 -0
  193. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/types.d.ts +25 -0
  194. package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/types.js +17 -0
  195. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/PageSettingItem.less +272 -0
  196. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.d.ts +8 -0
  197. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/index.js +206 -0
  198. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +66 -0
  199. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.js +95 -0
  200. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +26 -0
  201. package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.js +17 -0
  202. package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
  203. package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +246 -0
  204. package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.less +111 -0
  205. package/lib/components/authentication/admin/ChannelAuthSetting/index.d.ts +6 -0
  206. package/lib/components/authentication/admin/ChannelAuthSetting/index.js +177 -0
  207. package/lib/components/authentication/admin/ChannelAuthSetting/locales.d.ts +39 -0
  208. package/lib/components/authentication/admin/ChannelAuthSetting/locales.js +74 -0
  209. package/lib/components/authentication/admin/ChannelAuthSetting/types.d.ts +36 -0
  210. package/lib/components/authentication/admin/ChannelAuthSetting/types.js +17 -0
  211. package/lib/components/authentication/admin/CustomerAuth/CustomerAuth.less +104 -0
  212. package/lib/components/authentication/admin/CustomerAuth/index.d.ts +6 -0
  213. package/lib/components/authentication/admin/CustomerAuth/index.js +507 -0
  214. package/lib/components/authentication/admin/CustomerAuth/locales.d.ts +66 -0
  215. package/lib/components/authentication/admin/CustomerAuth/locales.js +110 -0
  216. package/lib/components/authentication/admin/CustomerAuth/types.d.ts +16 -0
  217. package/lib/components/authentication/admin/CustomerAuth/types.js +17 -0
  218. package/lib/components/authentication/admin/CustomerOAuthConfig/CustomerOAuthConfig.less +164 -0
  219. package/lib/components/authentication/admin/CustomerOAuthConfig/index.d.ts +6 -0
  220. package/lib/components/authentication/admin/CustomerOAuthConfig/index.js +331 -0
  221. package/lib/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +108 -0
  222. package/lib/components/authentication/admin/CustomerOAuthConfig/locales.js +161 -0
  223. package/lib/components/authentication/admin/CustomerOAuthConfig/types.d.ts +22 -0
  224. package/lib/components/authentication/admin/CustomerOAuthConfig/types.js +17 -0
  225. package/lib/components/authentication/admin/DeviceAuth/DeviceAuth.less +104 -0
  226. package/lib/components/authentication/admin/DeviceAuth/index.d.ts +6 -0
  227. package/lib/components/authentication/admin/DeviceAuth/index.js +254 -0
  228. package/lib/components/authentication/admin/DeviceAuth/locales.d.ts +57 -0
  229. package/lib/components/authentication/admin/DeviceAuth/locales.js +98 -0
  230. package/lib/components/authentication/admin/DeviceAuth/types.d.ts +16 -0
  231. package/lib/components/authentication/admin/DeviceAuth/types.js +17 -0
  232. package/lib/components/authentication/admin/OAuthConfig/OAuthConfig.less +165 -0
  233. package/lib/components/authentication/admin/OAuthConfig/index.d.ts +6 -0
  234. package/lib/components/authentication/admin/OAuthConfig/index.js +226 -0
  235. package/lib/components/authentication/admin/OAuthConfig/locales.d.ts +90 -0
  236. package/lib/components/authentication/admin/OAuthConfig/locales.js +140 -0
  237. package/lib/components/authentication/admin/OAuthConfig/types.d.ts +22 -0
  238. package/lib/components/authentication/admin/OAuthConfig/types.js +17 -0
  239. package/lib/components/authentication/admin/OrgAdminAuth/OrgAdminAuth.less +104 -0
  240. package/lib/components/authentication/admin/OrgAdminAuth/index.d.ts +6 -0
  241. package/lib/components/authentication/admin/OrgAdminAuth/index.js +398 -0
  242. package/lib/components/authentication/admin/OrgAdminAuth/locales.d.ts +54 -0
  243. package/lib/components/authentication/admin/OrgAdminAuth/locales.js +98 -0
  244. package/lib/components/authentication/admin/OrgAdminAuth/types.d.ts +16 -0
  245. package/lib/components/authentication/admin/OrgAdminAuth/types.js +17 -0
  246. package/lib/components/authentication/admin/POSOperatorAuth/POSOperatorAuth.less +104 -0
  247. package/lib/components/authentication/admin/POSOperatorAuth/index.d.ts +6 -0
  248. package/lib/components/authentication/admin/POSOperatorAuth/index.js +262 -0
  249. package/lib/components/authentication/admin/POSOperatorAuth/locales.d.ts +48 -0
  250. package/lib/components/authentication/admin/POSOperatorAuth/locales.js +89 -0
  251. package/lib/components/authentication/admin/POSOperatorAuth/types.d.ts +16 -0
  252. package/lib/components/authentication/admin/POSOperatorAuth/types.js +17 -0
  253. package/lib/components/authentication/admin/SaaSAdminAuth/SaaSAdminAuth.less +104 -0
  254. package/lib/components/authentication/admin/SaaSAdminAuth/index.d.ts +6 -0
  255. package/lib/components/authentication/admin/SaaSAdminAuth/index.js +481 -0
  256. package/lib/components/authentication/admin/SaaSAdminAuth/locales.d.ts +54 -0
  257. package/lib/components/authentication/admin/SaaSAdminAuth/locales.js +98 -0
  258. package/lib/components/authentication/admin/SaaSAdminAuth/types.d.ts +16 -0
  259. package/lib/components/authentication/admin/SaaSAdminAuth/types.js +17 -0
  260. package/lib/components/authentication/admin/index.d.ts +26 -0
  261. package/lib/components/authentication/admin/index.js +83 -0
  262. package/lib/components/authentication/index.d.ts +0 -0
  263. package/lib/components/authentication/index.js +0 -0
  264. package/lib/components/booking/components/customSelect/index.js +6 -2
  265. package/lib/components/booking/components/footer/utils.js +1 -1
  266. package/lib/components/index.d.ts +2 -1
  267. package/lib/components/index.js +19 -0
  268. package/lib/components/pay/toC/index.js +12 -2
  269. package/lib/components/pay/toC/status.d.ts +1 -0
  270. package/lib/components/pay/toC/status.js +5 -0
  271. package/lib/index.d.ts +2 -0
  272. package/lib/index.js +19 -0
  273. package/lib/pro/pisellPaymentList/example.d.ts +19 -0
  274. package/lib/pro/pisellPaymentList/example.js +416 -0
  275. package/lowcode/admin-auth-customer-auth/meta.ts +29 -0
  276. package/lowcode/admin-auth-customer-oauth-config/meta.ts +55 -0
  277. package/lowcode/admin-auth-device-auth/meta.ts +30 -0
  278. package/lowcode/admin-auth-methods/meta.ts +385 -0
  279. package/lowcode/admin-auth-oauth-config/meta.ts +29 -0
  280. package/lowcode/admin-auth-online-shop-auth/meta.ts +29 -0
  281. package/lowcode/admin-auth-org-admin-auth/meta.ts +29 -0
  282. package/lowcode/admin-auth-pos-operator-auth/meta.ts +30 -0
  283. package/lowcode/admin-auth-saas-admin-auth/meta.ts +29 -0
  284. package/lowcode/admin-auth-saas-managerment-auth/meta.ts +30 -0
  285. package/lowcode/admin-setting-list/meta.ts +125 -0
  286. package/lowcode/pro-register/meta.ts +385 -0
  287. package/package.json +3 -3
@@ -0,0 +1,137 @@
1
+ export default {
2
+ en: {
3
+ // Page title and description
4
+ 'oauth.config.title': 'OAuth Configuration',
5
+ 'oauth.config.description': 'Configure third-party OAuth providers for quick login.',
6
+ // OAuth Providers section
7
+ 'oauth.providers.title': 'OAuth Providers',
8
+ 'oauth.providers.description': 'Configure third-party OAuth providers.',
9
+ // Provider names and descriptions
10
+ 'oauth.provider.google': 'Google',
11
+ 'oauth.provider.google.description': 'Sign in with Google account',
12
+ 'oauth.provider.apple': 'Apple',
13
+ 'oauth.provider.apple.description': 'Sign in with Apple ID',
14
+ 'oauth.provider.facebook': 'Facebook',
15
+ 'oauth.provider.facebook.description': 'Sign in with Facebook account',
16
+ // Status
17
+ 'oauth.status.configured': 'Configured',
18
+ 'oauth.status.not.configured': 'Not Configured',
19
+ // Buttons
20
+ 'oauth.button.settings': 'Settings',
21
+ 'oauth.button.save': 'Save',
22
+ 'oauth.button.cancel': 'Cancel',
23
+ // Drawer
24
+ 'oauth.drawer.title': 'Settings',
25
+ // Apple OAuth
26
+ 'oauth.apple.identifier': 'Identifier',
27
+ 'oauth.apple.identifier.required': 'Please enter the identifier',
28
+ 'oauth.apple.identifier.placeholder': 'Please enter the identifier',
29
+ // Facebook OAuth
30
+ 'oauth.facebook.appId': 'AppId',
31
+ 'oauth.facebook.appId.required': 'Please enter the AppId',
32
+ 'oauth.facebook.appId.placeholder': 'Please enter the AppId',
33
+ 'oauth.facebook.appSecret': 'AppSecret',
34
+ 'oauth.facebook.appSecret.required': 'Please enter the AppSecret',
35
+ 'oauth.facebook.appSecret.placeholder': 'Please enter the AppSecret',
36
+ // Google OAuth
37
+ 'oauth.google.clientId': 'Client ID',
38
+ 'oauth.google.clientId.required': 'Please enter the Client ID',
39
+ 'oauth.google.clientId.placeholder': 'Please enter the Client ID',
40
+ 'oauth.google.clientSecret': 'Client Secret',
41
+ 'oauth.google.clientSecret.required': 'Please enter the Client Secret',
42
+ 'oauth.google.clientSecret.placeholder': 'Please enter the Client Secret',
43
+ // Messages
44
+ 'oauth.save.success': 'Saved successfully',
45
+ 'oauth.save.error': 'Failed to save'
46
+ },
47
+ 'zh-CN': {
48
+ // Page title and description
49
+ 'oauth.config.title': 'OAuth 配置',
50
+ 'oauth.config.description': '配置第三方 OAuth 提供商以实现快速登录。',
51
+ // OAuth Providers section
52
+ 'oauth.providers.title': 'OAuth 提供商',
53
+ 'oauth.providers.description': '配置第三方 OAuth 提供商。',
54
+ // Provider names and descriptions
55
+ 'oauth.provider.google': 'Google',
56
+ 'oauth.provider.google.description': '使用 Google 账号登录',
57
+ 'oauth.provider.apple': 'Apple',
58
+ 'oauth.provider.apple.description': '使用 Apple ID 登录',
59
+ 'oauth.provider.facebook': 'Facebook',
60
+ 'oauth.provider.facebook.description': '使用 Facebook 账号登录',
61
+ // Status
62
+ 'oauth.status.configured': '已配置',
63
+ 'oauth.status.not.configured': '未配置',
64
+ // Buttons
65
+ 'oauth.button.settings': '设置',
66
+ 'oauth.button.save': '保存',
67
+ 'oauth.button.cancel': '取消',
68
+ // Drawer
69
+ 'oauth.drawer.title': '设置',
70
+ // Apple OAuth
71
+ 'oauth.apple.identifier': '标识符',
72
+ 'oauth.apple.identifier.required': '请输入标识符',
73
+ 'oauth.apple.identifier.placeholder': '请输入标识符',
74
+ // Facebook OAuth
75
+ 'oauth.facebook.appId': '应用ID',
76
+ 'oauth.facebook.appId.required': '请输入应用ID',
77
+ 'oauth.facebook.appId.placeholder': '请输入应用ID',
78
+ 'oauth.facebook.appSecret': '应用密钥',
79
+ 'oauth.facebook.appSecret.required': '请输入应用密钥',
80
+ 'oauth.facebook.appSecret.placeholder': '请输入应用密钥',
81
+ // Google OAuth
82
+ 'oauth.google.clientId': '客户端ID',
83
+ 'oauth.google.clientId.required': '请输入客户端ID',
84
+ 'oauth.google.clientId.placeholder': '请输入客户端ID',
85
+ 'oauth.google.clientSecret': '客户端密钥',
86
+ 'oauth.google.clientSecret.required': '请输入客户端密钥',
87
+ 'oauth.google.clientSecret.placeholder': '请输入客户端密钥',
88
+ // Messages
89
+ 'oauth.save.success': '保存成功',
90
+ 'oauth.save.error': '保存失败'
91
+ },
92
+ 'zh-HK': {
93
+ // Page title and description
94
+ 'oauth.config.title': 'OAuth 配置',
95
+ 'oauth.config.description': '配置第三方 OAuth 提供商以實現快速登錄。',
96
+ // OAuth Providers section
97
+ 'oauth.providers.title': 'OAuth 提供商',
98
+ 'oauth.providers.description': '配置第三方 OAuth 提供商。',
99
+ // Provider names and descriptions
100
+ 'oauth.provider.google': 'Google',
101
+ 'oauth.provider.google.description': '使用 Google 賬號登錄',
102
+ 'oauth.provider.apple': 'Apple',
103
+ 'oauth.provider.apple.description': '使用 Apple ID 登錄',
104
+ 'oauth.provider.facebook': 'Facebook',
105
+ 'oauth.provider.facebook.description': '使用 Facebook 賬號登錄',
106
+ // Status
107
+ 'oauth.status.configured': '已配置',
108
+ 'oauth.status.not.configured': '未配置',
109
+ // Buttons
110
+ 'oauth.button.settings': '設置',
111
+ 'oauth.button.save': '保存',
112
+ 'oauth.button.cancel': '取消',
113
+ // Drawer
114
+ 'oauth.drawer.title': '設置',
115
+ // Apple OAuth
116
+ 'oauth.apple.identifier': '標識符',
117
+ 'oauth.apple.identifier.required': '請輸入標識符',
118
+ 'oauth.apple.identifier.placeholder': '請輸入標識符',
119
+ // Facebook OAuth
120
+ 'oauth.facebook.appId': '應用ID',
121
+ 'oauth.facebook.appId.required': '請輸入應用ID',
122
+ 'oauth.facebook.appId.placeholder': '請輸入應用ID',
123
+ 'oauth.facebook.appSecret': '應用密鑰',
124
+ 'oauth.facebook.appSecret.required': '請輸入應用密鑰',
125
+ 'oauth.facebook.appSecret.placeholder': '請輸入應用密鑰',
126
+ // Google OAuth
127
+ 'oauth.google.clientId': '客戶端ID',
128
+ 'oauth.google.clientId.required': '請輸入客戶端ID',
129
+ 'oauth.google.clientId.placeholder': '請輸入客戶端ID',
130
+ 'oauth.google.clientSecret': '客戶端密鑰',
131
+ 'oauth.google.clientSecret.required': '請輸入客戶端密鑰',
132
+ 'oauth.google.clientSecret.placeholder': '請輸入客戶端密鑰',
133
+ // Messages
134
+ 'oauth.save.success': '保存成功',
135
+ 'oauth.save.error': '保存失敗'
136
+ }
137
+ };
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ export interface CustomerOAuthProvider {
3
+ id: string;
4
+ name: string;
5
+ description: string;
6
+ icon: React.ReactNode;
7
+ configured: boolean;
8
+ }
9
+ export interface CustomerOAuthConfigProps {
10
+ /**
11
+ * 自定义类名
12
+ */
13
+ className?: string;
14
+ /**
15
+ * 自定义样式
16
+ */
17
+ style?: React.CSSProperties;
18
+ /**
19
+ * 保存回调
20
+ */
21
+ onSave?: (providers: CustomerOAuthProvider[]) => void;
22
+ }
@@ -0,0 +1,104 @@
1
+ .device-auth {
2
+ padding: 24px;
3
+ background: #fff;
4
+ min-height: 100vh;
5
+ }
6
+
7
+ /* 页面标题 */
8
+ .device-auth-header {
9
+ margin-bottom: 32px;
10
+ }
11
+
12
+ .device-auth-title {
13
+ font-size: 24px !important;
14
+ font-weight: 600 !important;
15
+ color: #262626 !important;
16
+ margin: 0 0 8px 0 !important;
17
+ line-height: 1.4 !important;
18
+ }
19
+
20
+ .device-auth-description {
21
+ font-size: 14px !important;
22
+ color: #8c8c8c !important;
23
+ margin: 0 !important;
24
+ line-height: 1.6 !important;
25
+ }
26
+
27
+ /* 区域样式 */
28
+ .device-auth-section {
29
+ background: #ffffff;
30
+ border-radius: 8px;
31
+ padding: 24px;
32
+ margin-bottom: 24px;
33
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
34
+ }
35
+
36
+ /* 左右布局容器 */
37
+ .device-auth-section-layout {
38
+ display: flex;
39
+ gap: 48px;
40
+ align-items: flex-start;
41
+ }
42
+
43
+ .device-auth-section-header {
44
+ flex: 0 0 320px;
45
+ min-width: 280px;
46
+ }
47
+
48
+ .device-auth-section-title {
49
+ font-size: 18px !important;
50
+ font-weight: 600 !important;
51
+ color: #262626 !important;
52
+ margin: 0 0 8px 0 !important;
53
+ line-height: 1.4 !important;
54
+ }
55
+
56
+ .device-auth-section-description {
57
+ font-size: 14px !important;
58
+ color: #8c8c8c !important;
59
+ margin: 0 !important;
60
+ line-height: 1.6 !important;
61
+ }
62
+
63
+ .device-auth-section-content {
64
+ flex: 1;
65
+ min-width: 0;
66
+ }
67
+
68
+ /* 底部按钮 */
69
+ .device-auth-footer {
70
+ display: flex;
71
+ justify-content: flex-end;
72
+ gap: 12px;
73
+ padding: 24px;
74
+ background: #ffffff;
75
+ border-radius: 8px;
76
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
77
+ }
78
+
79
+
80
+ /* 响应式设计 */
81
+ @media (max-width: 768px) {
82
+ .device-auth {
83
+ padding: 16px;
84
+ }
85
+
86
+ .device-auth-section {
87
+ padding: 16px;
88
+ }
89
+
90
+ .device-auth-section-layout {
91
+ flex-direction: column;
92
+ gap: 24px;
93
+ }
94
+
95
+ .device-auth-section-header {
96
+ flex: 1;
97
+ min-width: auto;
98
+ }
99
+
100
+ .device-auth-footer {
101
+ padding: 16px;
102
+ }
103
+ }
104
+
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DeviceAuthProps } from './types';
3
+ import './DeviceAuth.less';
4
+ export type { DeviceAuthProps } from './types';
5
+ declare const DeviceAuth: React.FC<DeviceAuthProps>;
6
+ export default DeviceAuth;
@@ -0,0 +1,366 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import React, { useState, useEffect } from 'react';
14
+ import { Button, Typography, message, Spin } from 'antd';
15
+ import { locales } from '@pisell/utils';
16
+ import { TeamOutlined } from '@ant-design/icons';
17
+ import AuthMethods from "../AuthMethods";
18
+ import SettingsDrawer from "../AuthMethods/SettingsDrawer";
19
+ import { AuthMethodType, AuthMethodCategory } from "../AuthMethods/types";
20
+ import useEngineContext from "../../../../hooks/useEngineContext";
21
+ // @ts-ignore
22
+ import localeTextsConfig from "./locales";
23
+ import "./DeviceAuth.less";
24
+ var Title = Typography.Title,
25
+ Paragraph = Typography.Paragraph;
26
+
27
+ // 接口数据类型定义
28
+
29
+ /**
30
+ * 获取设备认证方法列表(支持多语言)
31
+ * 每次调用都会根据当前语言设置返回对应的文本
32
+ * @returns 设备认证方法数组
33
+ */
34
+ var getDeviceAuthMethods = function getDeviceAuthMethods() {
35
+ return [{
36
+ id: 'team_member',
37
+ type: AuthMethodType.TEAM_MEMBER,
38
+ title: locales.getText('device.auth.method.team-member.title') || 'Team Member',
39
+ category: AuthMethodCategory.GENERAL,
40
+ description: locales.getText('device.auth.method.team-member.description') || 'Use Team Member authentication methods',
41
+ inheritMessage: locales.getText('device.auth.method.team-member.inherit') || 'Inherits from Team Member authentication settings',
42
+ icon: /*#__PURE__*/React.createElement(TeamOutlined, {
43
+ style: {
44
+ fontSize: 20,
45
+ color: '#4096ff'
46
+ }
47
+ }),
48
+ enabled: true,
49
+ hasSettings: false
50
+ }
51
+ // {
52
+ // id: 'device_passcode',
53
+ // type: AuthMethodType.DEVICE_PASSCODE,
54
+ // title: locales.getText('device.auth.method.device-passcode.title') || 'Device Passcode',
55
+ // category: AuthMethodCategory.PASSWORD_FREE,
56
+ // description: locales.getText('device.auth.method.device-passcode.description') || 'Password-free login with dynamic device passcode authentication',
57
+ // icon: <KeyOutlined style={{ fontSize: 20, color: '#52c41a' }} />,
58
+ // enabled: false,
59
+ // hasSettings: true,
60
+ // },
61
+ ];
62
+ };
63
+
64
+ /**
65
+ * 设备认证方法列表(已废弃,仅保留用于向后兼容)
66
+ * @deprecated 请使用 getDeviceAuthMethods() 函数以获取实时的多语言支持
67
+ */
68
+ var DEVICE_AUTH_METHODS = getDeviceAuthMethods();
69
+
70
+ // 将接口数据转换为组件数据
71
+ var convertApiDataToComponent = function convertApiDataToComponent(apiData, currentMethods) {
72
+ // 转换认证方法
73
+ var methodsArray = Object.entries(apiData.method).map(function (_ref) {
74
+ var _ref2 = _slicedToArray(_ref, 2),
75
+ key = _ref2[0],
76
+ value = _ref2[1];
77
+ return {
78
+ key: key,
79
+ sort: value.sort,
80
+ enabled: value.enabled,
81
+ setting: value.setting
82
+ };
83
+ });
84
+
85
+ // 按 sort 排序
86
+ methodsArray.sort(function (a, b) {
87
+ return a.sort - b.sort;
88
+ });
89
+
90
+ // 创建认证方法数组
91
+ var authMethods = [];
92
+ var settingsMap = {};
93
+ var processedKeys = new Set();
94
+ methodsArray.forEach(function (_ref3) {
95
+ var key = _ref3.key,
96
+ enabled = _ref3.enabled,
97
+ setting = _ref3.setting;
98
+ processedKeys.add(key);
99
+ var defaultMethod = currentMethods.find(function (m) {
100
+ return m.id === key;
101
+ });
102
+ if (defaultMethod) {
103
+ authMethods.push(_objectSpread(_objectSpread({}, defaultMethod), {}, {
104
+ enabled: enabled
105
+ }));
106
+ if (setting) {
107
+ settingsMap[key] = setting;
108
+ }
109
+ }
110
+ });
111
+
112
+ // 添加所有在 currentMethods 中定义但 API 未返回的方法
113
+ currentMethods.forEach(function (defaultMethod) {
114
+ if (!processedKeys.has(defaultMethod.id)) {
115
+ authMethods.push(_objectSpread(_objectSpread({}, defaultMethod), {}, {
116
+ enabled: false
117
+ }));
118
+ }
119
+ });
120
+ return {
121
+ authMethods: authMethods,
122
+ settingsMap: settingsMap
123
+ };
124
+ };
125
+
126
+ // 将组件数据转换为接口数据
127
+ var convertComponentDataToApi = function convertComponentDataToApi(authMethods, settingsMap) {
128
+ console.log('convertComponentDataToApi 被调用');
129
+ console.log('authMethods:', authMethods);
130
+ console.log('settingsMap:', settingsMap);
131
+ var method = {};
132
+ authMethods.forEach(function (authMethod, index) {
133
+ console.log("\u5904\u7406 authMethod: ".concat(authMethod.id, ", index: ").concat(index));
134
+ var setting = settingsMap[authMethod.id];
135
+ method[authMethod.id] = _objectSpread({
136
+ sort: index + 1,
137
+ enabled: authMethod.enabled
138
+ }, setting && {
139
+ setting: setting
140
+ });
141
+ });
142
+ console.log('最终的 method 对象:', method);
143
+ return {
144
+ method: method
145
+ };
146
+ };
147
+ var DeviceAuth = function DeviceAuth(_ref4) {
148
+ var className = _ref4.className,
149
+ style = _ref4.style,
150
+ onSave = _ref4.onSave;
151
+ var context = useEngineContext();
152
+ var app = context.appHelper.utils.getApp();
153
+ var _context$appHelper$ut = context.appHelper.utils.getApp(),
154
+ request = _context$appHelper$ut.request,
155
+ data = _context$appHelper$ut.data;
156
+ var dataKey = 'auth.device';
157
+ var _useState = useState(null),
158
+ _useState2 = _slicedToArray(_useState, 2),
159
+ tenantId = _useState2[0],
160
+ setTenantId = _useState2[1];
161
+ var _useState3 = useState(true),
162
+ _useState4 = _slicedToArray(_useState3, 2),
163
+ loading = _useState4[0],
164
+ setLoading = _useState4[1];
165
+ var _useState5 = useState([]),
166
+ _useState6 = _slicedToArray(_useState5, 2),
167
+ authMethods = _useState6[0],
168
+ setAuthMethods = _useState6[1];
169
+ var _useState7 = useState({}),
170
+ _useState8 = _slicedToArray(_useState7, 2),
171
+ settingsMap = _useState8[0],
172
+ setSettingsMap = _useState8[1];
173
+ var _useState9 = useState(false),
174
+ _useState10 = _slicedToArray(_useState9, 2),
175
+ drawerOpen = _useState10[0],
176
+ setDrawerOpen = _useState10[1];
177
+ var _useState11 = useState(null),
178
+ _useState12 = _slicedToArray(_useState11, 2),
179
+ selectedMethod = _useState12[0],
180
+ setSelectedMethod = _useState12[1];
181
+
182
+ // 初始化 locales 并设置默认认证方法
183
+ useEffect(function () {
184
+ var _context$engine;
185
+ console.log('app_init_device_auth', app, context, data.storage);
186
+ locales.init(localeTextsConfig, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
187
+ // locales 初始化后,设置带有正确多语言的默认认证方法
188
+ setAuthMethods(getDeviceAuthMethods());
189
+ }, []);
190
+
191
+ // 解析 coreData 并设置 tenantId
192
+ useEffect(function () {
193
+ var coreData = data.storage.getStorage('core');
194
+ if (coreData) {
195
+ try {
196
+ var _coreDataJson$tenant;
197
+ var coreDataJson = JSON.parse(coreData);
198
+ if (coreDataJson !== null && coreDataJson !== void 0 && (_coreDataJson$tenant = coreDataJson.tenant) !== null && _coreDataJson$tenant !== void 0 && _coreDataJson$tenant.id) {
199
+ setTenantId(coreDataJson.tenant.id);
200
+ }
201
+ } catch (error) {
202
+ console.error('Error parsing core data:', error);
203
+ }
204
+ }
205
+ }, [data.storage]);
206
+
207
+ // 当 tenantId 存在且变更时,发送请求获取数据
208
+ useEffect(function () {
209
+ if (tenantId) {
210
+ setLoading(true);
211
+ request.get("/tenant/core/meta?key=".concat(dataKey, "&metable_type=tenant&metable_id=").concat(tenantId)).then(function (res) {
212
+ var _res$data;
213
+ console.log('res_device_auth_methods', res);
214
+ if (res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.length) {
215
+ var _res$data$;
216
+ var apiData = (_res$data$ = res.data[0]) === null || _res$data$ === void 0 ? void 0 : _res$data$.value;
217
+ // 使用当前语言的认证方法定义
218
+ var currentDeviceMethods = getDeviceAuthMethods();
219
+ var _convertApiDataToComp = convertApiDataToComponent(apiData, currentDeviceMethods),
220
+ convertedAuthMethods = _convertApiDataToComp.authMethods,
221
+ convertedSettingsMap = _convertApiDataToComp.settingsMap;
222
+ setAuthMethods(convertedAuthMethods);
223
+ setSettingsMap(convertedSettingsMap);
224
+ console.log('Converted data:', {
225
+ convertedAuthMethods: convertedAuthMethods,
226
+ convertedSettingsMap: convertedSettingsMap
227
+ });
228
+ } else {
229
+ // 如果没有数据,使用默认值
230
+ setAuthMethods(getDeviceAuthMethods());
231
+ }
232
+ setLoading(false);
233
+ }).catch(function (error) {
234
+ console.error('Error fetching tenant data:', error);
235
+ // 即使出错,也使用默认值
236
+ setAuthMethods(getDeviceAuthMethods());
237
+ setLoading(false);
238
+ });
239
+ }
240
+ }, [tenantId, request]);
241
+ var handleAuthMethodsOrderChange = function handleAuthMethodsOrderChange(methods) {
242
+ setAuthMethods(methods);
243
+ };
244
+ var handleAuthMethodToggle = function handleAuthMethodToggle(method, enabled) {
245
+ console.log('Auth method toggled:', method.id, enabled);
246
+
247
+ // 更新 authMethods 中对应方法的 enabled 状态
248
+ setAuthMethods(function (prevMethods) {
249
+ return prevMethods.map(function (m) {
250
+ return m.id === method.id ? _objectSpread(_objectSpread({}, m), {}, {
251
+ enabled: enabled
252
+ }) : m;
253
+ });
254
+ });
255
+ };
256
+ var handleAuthMethodSettings = function handleAuthMethodSettings(method) {
257
+ setSelectedMethod(method);
258
+ setDrawerOpen(true);
259
+ };
260
+ var handleDrawerClose = function handleDrawerClose() {
261
+ setDrawerOpen(false);
262
+ setSelectedMethod(null);
263
+ };
264
+
265
+ // 保存到接口的通用方法
266
+ var saveToApi = function saveToApi(currentAuthMethods, currentSettingsMap) {
267
+ console.log('=== 开始保存到接口 ===');
268
+ console.log('authMethods:', currentAuthMethods);
269
+ console.log('settingsMap:', currentSettingsMap);
270
+
271
+ // 将组件数据转换为接口数据
272
+ var apiData = convertComponentDataToApi(currentAuthMethods, currentSettingsMap);
273
+
274
+ // 打印转换后的接口数据
275
+ console.log('=== 保存的接口数据 ===');
276
+ console.log(JSON.stringify(apiData, null, 2));
277
+ onSave === null || onSave === void 0 || onSave(currentAuthMethods);
278
+ request.post("/tenant/core/meta/tenant/".concat(tenantId), _defineProperty({}, dataKey, apiData)).then(function (res) {
279
+ console.log('res_device_auth_save', res);
280
+ message.success(locales.getText('auth.save.success') || '保存成功');
281
+ }).catch(function (error) {
282
+ console.error('Error saving tenant data:', error);
283
+ message.error(locales.getText('auth.save.error') || '保存失败');
284
+ });
285
+ };
286
+ var handleSettingsSave = function handleSettingsSave(settings) {
287
+ console.log('Settings saved:', settings);
288
+
289
+ // 根据当前选中的方法类型保存设置
290
+ var updatedSettingsMap = _objectSpread({}, settingsMap);
291
+ if (selectedMethod) {
292
+ updatedSettingsMap = _objectSpread(_objectSpread({}, updatedSettingsMap), {}, _defineProperty({}, selectedMethod.id, settings));
293
+ setSettingsMap(updatedSettingsMap);
294
+ }
295
+
296
+ // 立即触发接口保存
297
+ saveToApi(authMethods, updatedSettingsMap);
298
+ };
299
+ var handleSave = function handleSave() {
300
+ saveToApi(authMethods, settingsMap);
301
+ };
302
+ var handleCancel = function handleCancel() {
303
+ console.log('Settings cancelled');
304
+ };
305
+
306
+ // 显示加载状态
307
+ if (loading) {
308
+ return /*#__PURE__*/React.createElement("div", {
309
+ className: "device-auth ".concat(className || ''),
310
+ style: _objectSpread(_objectSpread({}, style), {}, {
311
+ display: 'flex',
312
+ justifyContent: 'center',
313
+ alignItems: 'center',
314
+ minHeight: '400px'
315
+ })
316
+ }, /*#__PURE__*/React.createElement(Spin, {
317
+ size: "large"
318
+ }));
319
+ }
320
+ return /*#__PURE__*/React.createElement("div", {
321
+ className: "device-auth ".concat(className || ''),
322
+ style: style
323
+ }, /*#__PURE__*/React.createElement("div", {
324
+ className: "device-auth-header"
325
+ }, /*#__PURE__*/React.createElement(Title, {
326
+ level: 1,
327
+ className: "device-auth-title"
328
+ }, locales.getText('device.auth.title')), /*#__PURE__*/React.createElement(Paragraph, {
329
+ className: "device-auth-description"
330
+ }, locales.getText('device.auth.description'))), /*#__PURE__*/React.createElement("div", {
331
+ className: "device-auth-section"
332
+ }, /*#__PURE__*/React.createElement("div", {
333
+ className: "device-auth-section-layout"
334
+ }, /*#__PURE__*/React.createElement("div", {
335
+ className: "device-auth-section-header"
336
+ }, /*#__PURE__*/React.createElement(Title, {
337
+ level: 2,
338
+ className: "device-auth-section-title"
339
+ }, locales.getText('device.auth.methods.title')), /*#__PURE__*/React.createElement(Paragraph, {
340
+ className: "device-auth-section-description"
341
+ }, locales.getText('device.auth.methods.description'))), /*#__PURE__*/React.createElement("div", {
342
+ className: "device-auth-section-content"
343
+ }, /*#__PURE__*/React.createElement(AuthMethods, {
344
+ methods: authMethods,
345
+ onOrderChange: handleAuthMethodsOrderChange,
346
+ onToggle: handleAuthMethodToggle,
347
+ onSettings: handleAuthMethodSettings
348
+ })))), /*#__PURE__*/React.createElement("div", {
349
+ className: "device-auth-footer"
350
+ }, /*#__PURE__*/React.createElement(Button, {
351
+ size: "large",
352
+ onClick: handleCancel
353
+ }, locales.getText('auth.button.cancel')), /*#__PURE__*/React.createElement(Button, {
354
+ type: "primary",
355
+ size: "large",
356
+ onClick: handleSave
357
+ }, locales.getText('auth.button.save'))), /*#__PURE__*/React.createElement(SettingsDrawer, {
358
+ open: drawerOpen,
359
+ method: selectedMethod,
360
+ onClose: handleDrawerClose,
361
+ onSave: handleSettingsSave,
362
+ mode: "auth-methods",
363
+ initialSettings: selectedMethod ? settingsMap[selectedMethod.id] : undefined
364
+ }));
365
+ };
366
+ export default DeviceAuth;