@pisell/private-materials 6.3.29 → 6.3.31

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 (313) 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 +9 -1
  6. package/build/lowcode/preview.js +144 -144
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -2
  12. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +267 -76
  13. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  14. package/es/components/appointmentBooking/hooks.js +30 -30
  15. package/es/components/appointmentBooking/locales.js +9 -6
  16. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  17. package/es/components/booking/components/footer/index.d.ts +1 -0
  18. package/es/components/booking/components/footer/index.js +4 -1
  19. package/es/components/booking/components/footer/utils.js +62 -46
  20. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  21. package/es/components/booking/forms/table/index.d.ts +1 -0
  22. package/es/components/booking/info/clientVariant/hooks/useClientFn.js +2 -2
  23. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  24. package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
  25. package/es/components/booking/info/main.js +3 -2
  26. package/es/components/booking/info/model.js +5 -0
  27. package/es/components/booking/info/service/like/index.d.ts +1 -0
  28. package/es/components/booking/info2/index.js +3 -2
  29. package/es/components/booking/info2/service/contactInfoMode/index.js +93 -0
  30. package/es/components/booking/locales.js +9 -3
  31. package/es/components/booking/model.js +3 -0
  32. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  33. package/es/components/eftpos/form/index.d.ts +1 -0
  34. package/es/components/eftpos/group/index.d.ts +1 -0
  35. package/es/components/eftpos/hooks.d.ts +1 -0
  36. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  37. package/es/components/eftpos/icon/device.d.ts +1 -0
  38. package/es/components/eftpos/receipt/index.d.ts +1 -0
  39. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  40. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  41. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  42. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  43. package/es/components/eftposPay/hooks.d.ts +1 -1
  44. package/es/components/eftposPay/store/index.d.ts +1 -1
  45. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  46. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  47. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  48. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  49. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  50. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  51. package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
  52. package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
  53. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  54. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  55. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  56. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  57. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  58. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  59. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  60. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  61. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  62. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  63. package/es/index.d.ts +3 -0
  64. package/es/index.js +4 -1
  65. package/es/plus/clientName/index.js +18 -0
  66. package/es/plus/clientName/index.less +10 -0
  67. package/es/plus/clientName/type.js +1 -0
  68. package/es/plus/clientName/utils.js +18 -0
  69. package/es/plus/contactInfo/components/Avatar/index.js +30 -0
  70. package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
  71. package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
  72. package/es/plus/contactInfo/index.js +198 -0
  73. package/es/plus/contactInfo/index.less +621 -0
  74. package/es/plus/contactInfo/locales.js +14 -0
  75. package/es/plus/contactInfo/types.js +1 -0
  76. package/es/plus/contactInfo/utils.js +50 -0
  77. package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
  78. package/es/plus/contactInfoModal/index.js +154 -0
  79. package/es/plus/contactInfoModal/index.less +19 -0
  80. package/es/plus/contactInfoModal/locales.js +65 -0
  81. package/es/pro/Login2.0/AuthModal.d.ts +143 -0
  82. package/es/pro/Login2.0/AuthModal.js +624 -0
  83. package/es/pro/Login2.0/Login2.d.ts +61 -0
  84. package/es/pro/Login2.0/Login2.js +2157 -0
  85. package/es/pro/Login2.0/Register2.d.ts +65 -0
  86. package/es/pro/Login2.0/Register2.js +1501 -0
  87. package/es/pro/Login2.0/components/ForgotPasswordFlow.js +330 -0
  88. package/es/pro/Login2.0/components/LegalTerms.d.ts +8 -0
  89. package/es/pro/Login2.0/components/LegalTerms.js +51 -0
  90. package/es/pro/Login2.0/components/LegalTerms.less +74 -0
  91. package/es/pro/Login2.0/components/LoginCodeInput.js +207 -0
  92. package/es/pro/Login2.0/components/OAuthButtonGroup.js +55 -0
  93. package/es/pro/Login2.0/components/PhoneInput.js +414 -0
  94. package/es/pro/Login2.0/components/PhoneInput.less +148 -0
  95. package/es/pro/Login2.0/components/phoneValidation.js +228 -0
  96. package/es/pro/Login2.0/hooks/index.d.ts +2 -0
  97. package/es/pro/Login2.0/hooks/index.js +1 -0
  98. package/es/pro/Login2.0/hooks/usePasswordValidationRules.js +87 -0
  99. package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
  100. package/es/pro/Login2.0/hooks/useRegisterFlow.js +158 -0
  101. package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
  102. package/es/pro/Login2.0/hooks/useRegistrationMethods.js +31 -0
  103. package/es/pro/Login2.0/index.js +8 -0
  104. package/es/pro/Login2.0/index.less +993 -0
  105. package/es/pro/Login2.0/locales.js +622 -0
  106. package/es/pro/Login2.0/shared/Header.d.ts +11 -0
  107. package/es/pro/Login2.0/shared/Header.js +42 -0
  108. package/es/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
  109. package/es/pro/Login2.0/shared/OAuthButtons.js +59 -0
  110. package/es/pro/Login2.0/shared/registerFlow.js +171 -0
  111. package/es/pro/Login2.0/shared/types.d.ts +232 -0
  112. package/es/pro/Login2.0/shared/types.js +1 -0
  113. package/es/pro/Login2.0/steps/CodeInput.js +209 -0
  114. package/es/pro/Login2.0/steps/EmailAlreadyRegistered.js +35 -0
  115. package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +25 -0
  116. package/es/pro/Login2.0/steps/EmailLinkExpired.js +33 -0
  117. package/es/pro/Login2.0/steps/SetPassword.js +148 -0
  118. package/es/pro/Login2.0/steps/VerificationSuccess.js +35 -0
  119. package/es/pro/Login2.0/steps/VerifyingEmailLink.js +17 -0
  120. package/es/pro/Login2.0/steps/WaitEmailLink.js +54 -0
  121. package/es/pro/Login2.0/steps/index.js +11 -0
  122. package/es/pro/Login2.0/steps/steps.less +423 -0
  123. package/es/pro/Login2.0/types.js +1 -0
  124. package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
  125. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +151 -13
  126. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
  127. package/lib/components/appointmentBooking/hooks.js +73 -35
  128. package/lib/components/appointmentBooking/locales.js +6 -3
  129. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  130. package/lib/components/booking/components/footer/index.d.ts +1 -0
  131. package/lib/components/booking/components/footer/index.js +4 -1
  132. package/lib/components/booking/components/footer/utils.js +70 -38
  133. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  134. package/lib/components/booking/forms/table/index.d.ts +1 -0
  135. package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +1 -1
  136. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  137. package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
  138. package/lib/components/booking/info/main.js +5 -4
  139. package/lib/components/booking/info/model.js +5 -0
  140. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  141. package/lib/components/booking/info2/index.js +5 -4
  142. package/lib/components/booking/info2/service/contactInfoMode/index.js +104 -0
  143. package/lib/components/booking/locales.js +9 -3
  144. package/lib/components/booking/model.js +3 -0
  145. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  146. package/lib/components/eftpos/form/index.d.ts +1 -0
  147. package/lib/components/eftpos/group/index.d.ts +1 -0
  148. package/lib/components/eftpos/hooks.d.ts +1 -0
  149. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  150. package/lib/components/eftpos/icon/device.d.ts +1 -0
  151. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  152. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  153. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  154. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  155. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  156. package/lib/components/eftposPay/hooks.d.ts +1 -1
  157. package/lib/components/eftposPay/store/index.d.ts +1 -1
  158. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  159. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  160. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  161. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  162. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  163. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  164. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
  165. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
  166. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  167. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  168. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  169. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  170. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  171. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  172. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  173. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  174. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  175. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  176. package/lib/index.d.ts +3 -0
  177. package/lib/index.js +13 -0
  178. package/lib/plus/clientName/index.js +53 -0
  179. package/lib/plus/clientName/index.less +10 -0
  180. package/lib/plus/clientName/type.js +17 -0
  181. package/lib/plus/clientName/utils.js +43 -0
  182. package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
  183. package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
  184. package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
  185. package/lib/plus/contactInfo/index.js +226 -0
  186. package/lib/plus/contactInfo/index.less +621 -0
  187. package/lib/plus/contactInfo/locales.js +38 -0
  188. package/lib/plus/contactInfo/types.js +17 -0
  189. package/lib/plus/contactInfo/utils.js +64 -0
  190. package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
  191. package/lib/plus/contactInfoModal/index.js +138 -0
  192. package/lib/plus/contactInfoModal/index.less +19 -0
  193. package/lib/plus/contactInfoModal/locales.js +89 -0
  194. package/lib/pro/Login2.0/AuthModal.d.ts +143 -0
  195. package/lib/pro/Login2.0/AuthModal.js +498 -0
  196. package/lib/pro/Login2.0/Login2.d.ts +61 -0
  197. package/lib/pro/Login2.0/Login2.js +1468 -0
  198. package/lib/pro/Login2.0/Register2.d.ts +65 -0
  199. package/lib/pro/Login2.0/Register2.js +1062 -0
  200. package/lib/pro/Login2.0/components/ForgotPasswordFlow.js +213 -0
  201. package/lib/pro/Login2.0/components/LegalTerms.d.ts +8 -0
  202. package/lib/pro/Login2.0/components/LegalTerms.js +76 -0
  203. package/lib/pro/Login2.0/components/LegalTerms.less +74 -0
  204. package/lib/pro/Login2.0/components/LoginCodeInput.js +161 -0
  205. package/lib/pro/Login2.0/components/OAuthButtonGroup.js +87 -0
  206. package/lib/pro/Login2.0/components/PhoneInput.js +263 -0
  207. package/lib/pro/Login2.0/components/PhoneInput.less +148 -0
  208. package/lib/pro/Login2.0/components/phoneValidation.js +153 -0
  209. package/lib/pro/Login2.0/hooks/index.d.ts +2 -0
  210. package/lib/pro/Login2.0/hooks/index.js +29 -0
  211. package/lib/pro/Login2.0/hooks/usePasswordValidationRules.js +140 -0
  212. package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
  213. package/lib/pro/Login2.0/hooks/useRegisterFlow.js +149 -0
  214. package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
  215. package/lib/pro/Login2.0/hooks/useRegistrationMethods.js +51 -0
  216. package/lib/pro/Login2.0/index.js +45 -0
  217. package/lib/pro/Login2.0/index.less +993 -0
  218. package/lib/pro/Login2.0/locales.js +646 -0
  219. package/lib/pro/Login2.0/shared/Header.d.ts +11 -0
  220. package/lib/pro/Login2.0/shared/Header.js +81 -0
  221. package/lib/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
  222. package/lib/pro/Login2.0/shared/OAuthButtons.js +78 -0
  223. package/lib/pro/Login2.0/shared/registerFlow.js +235 -0
  224. package/lib/pro/Login2.0/shared/types.d.ts +232 -0
  225. package/lib/pro/Login2.0/shared/types.js +17 -0
  226. package/lib/pro/Login2.0/steps/CodeInput.js +160 -0
  227. package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.js +46 -0
  228. package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +51 -0
  229. package/lib/pro/Login2.0/steps/EmailLinkExpired.js +51 -0
  230. package/lib/pro/Login2.0/steps/SetPassword.js +131 -0
  231. package/lib/pro/Login2.0/steps/VerificationSuccess.js +49 -0
  232. package/lib/pro/Login2.0/steps/VerifyingEmailLink.js +41 -0
  233. package/lib/pro/Login2.0/steps/WaitEmailLink.js +67 -0
  234. package/lib/pro/Login2.0/steps/index.js +60 -0
  235. package/lib/pro/Login2.0/steps/steps.less +423 -0
  236. package/lib/pro/Login2.0/types.js +17 -0
  237. package/lowcode/authmodal/meta.ts +395 -0
  238. package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
  239. package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
  240. package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
  241. package/lowcode/contact-info/fragments/textStyle.ts +33 -0
  242. package/lowcode/contact-info/meta.ts +199 -0
  243. package/lowcode/contact-info-modal/meta.ts +98 -0
  244. package/lowcode/login2/CONFIG.md +447 -0
  245. package/lowcode/login2/TEST_CONFIG.md +324 -0
  246. package/lowcode/login2/VERIFICATION_METHODS.md +364 -0
  247. package/lowcode/login2/meta.ts +560 -0
  248. package/lowcode/login2/snippets.ts +124 -0
  249. package/lowcode/register2/meta.ts +562 -0
  250. package/lowcode/register2/snippets.ts +257 -0
  251. package/package.json +7 -5
  252. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
  253. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
  254. package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
  255. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  256. package/es/components/appointmentBooking/hooks.d.ts +0 -106
  257. package/es/components/appointmentBooking/locales.d.ts +0 -360
  258. package/es/components/booking/components/footer/utils.d.ts +0 -41
  259. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  260. package/es/components/booking/components/voucher/index.d.ts +0 -3
  261. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -43
  262. package/es/components/booking/info/clientVariant/vertical/index.d.ts +0 -8
  263. package/es/components/booking/info/main.d.ts +0 -12
  264. package/es/components/booking/info/model.d.ts +0 -14
  265. package/es/components/booking/info/service/editService/constants.d.ts +0 -1
  266. package/es/components/booking/info/service/editService/index.d.ts +0 -7
  267. package/es/components/booking/info2/index.d.ts +0 -12
  268. package/es/components/booking/info2/service/addService/index.d.ts +0 -11
  269. package/es/components/booking/locales.d.ts +0 -837
  270. package/es/components/booking/model.d.ts +0 -116
  271. package/es/components/eftposPay/component/fail/index.d.ts +0 -3
  272. package/es/components/index.d.ts +0 -22
  273. package/es/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +0 -10
  274. package/es/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +0 -9
  275. package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  276. package/es/components/ruleSetting/locales.d.ts +0 -48
  277. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  278. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  279. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  280. package/es/components/ticketBooking/index.d.ts +0 -7
  281. package/es/plus/productSelect/ProductCard/index.d.ts +0 -47
  282. package/es/plus/productSelect/index.d.ts +0 -32
  283. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -3
  284. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +0 -4
  285. package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
  286. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  287. package/lib/components/appointmentBooking/hooks.d.ts +0 -106
  288. package/lib/components/appointmentBooking/locales.d.ts +0 -360
  289. package/lib/components/booking/components/footer/utils.d.ts +0 -41
  290. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  291. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  292. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -43
  293. package/lib/components/booking/info/clientVariant/vertical/index.d.ts +0 -8
  294. package/lib/components/booking/info/main.d.ts +0 -12
  295. package/lib/components/booking/info/model.d.ts +0 -14
  296. package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
  297. package/lib/components/booking/info/service/editService/index.d.ts +0 -7
  298. package/lib/components/booking/info2/index.d.ts +0 -12
  299. package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
  300. package/lib/components/booking/locales.d.ts +0 -837
  301. package/lib/components/booking/model.d.ts +0 -116
  302. package/lib/components/eftposPay/component/fail/index.d.ts +0 -3
  303. package/lib/components/index.d.ts +0 -22
  304. package/lib/components/pay/toC/PaymentMethods/ApplePay/index.d.ts +0 -10
  305. package/lib/components/pay/toC/PaymentMethods/GooglePay/index.d.ts +0 -9
  306. package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  307. package/lib/components/ruleSetting/locales.d.ts +0 -48
  308. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  309. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  310. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  311. package/lib/components/ticketBooking/index.d.ts +0 -7
  312. package/lib/plus/productSelect/ProductCard/index.d.ts +0 -47
  313. package/lib/plus/productSelect/index.d.ts +0 -32
@@ -0,0 +1,447 @@
1
+ # Login2 配置说明
2
+
3
+ ## 必填配置
4
+
5
+ ### loginMethods(登录方式列表)
6
+
7
+ **必填**,数组类型,数组顺序决定显示顺序,第一项为默认登录方式。
8
+
9
+ #### 邮箱登录
10
+
11
+ ```json
12
+ {
13
+ "type": "email",
14
+ "verificationMethods": ["password", "verification_code"],
15
+ "stepByStep": false
16
+ }
17
+ ```
18
+
19
+ **参数说明:**
20
+ - `type`: `"email"` (必填)
21
+ - `verificationMethods`: 验证方式数组,第一项为默认方式
22
+ - `"password"` - 密码登录
23
+ - `"verification_code"` - 验证码登录
24
+ - 可以只配置一种:`["password"]` 或 `["verification_code"]`
25
+ - 配置多种时,用户可以在界面下方的 "OR" 区域切换验证方式
26
+ - 例如:`["password", "verification_code"]` 默认显示密码登录,下方显示"Email code to xxx"切换按钮
27
+ - `stepByStep`: 是否分步骤登录(仅对密码登录有效)
28
+ - `true` - 先输入邮箱,再输入密码
29
+ - `false` - 邮箱和密码在同一页面(默认)
30
+
31
+ #### 手机登录
32
+
33
+ ```json
34
+ {
35
+ "type": "phone",
36
+ "verificationMethods": ["verification_code", "password"],
37
+ "stepByStep": false
38
+ }
39
+ ```
40
+
41
+ **参数说明:**
42
+ - `type`: `"phone"` (必填)
43
+ - `verificationMethods`: 验证方式数组,第一项为默认方式
44
+ - `"password"` - 密码登录
45
+ - `"verification_code"` - 验证码登录
46
+ - 可以只配置一种:`["verification_code"]` 或 `["password"]`
47
+ - 配置多种时,用户可以在界面下方的 "OR" 区域切换验证方式
48
+ - 例如:`["verification_code", "password"]` 默认显示验证码登录,下方显示"Password login"切换按钮
49
+ - `stepByStep`: 是否分步骤登录(仅对密码登录有效)
50
+
51
+ #### Google 登录
52
+
53
+ ```json
54
+ {
55
+ "type": "google",
56
+ "clientId": "your-google-client-id"
57
+ }
58
+ ```
59
+
60
+ **参数说明:**
61
+ - `type`: `"google"` (必填)
62
+ - `clientId`: Google Client ID(可选)
63
+
64
+ #### Facebook 登录
65
+
66
+ ```json
67
+ {
68
+ "type": "facebook",
69
+ "appId": "your-facebook-app-id"
70
+ }
71
+ ```
72
+
73
+ **参数说明:**
74
+ - `type`: `"facebook"` (必填)
75
+ - `appId`: Facebook App ID(可选)
76
+
77
+ #### Apple 登录
78
+
79
+ ```json
80
+ {
81
+ "type": "apple",
82
+ "clientId": "your-apple-client-id"
83
+ }
84
+ ```
85
+
86
+ **参数说明:**
87
+ - `type`: `"apple"` (必填)
88
+ - `clientId`: Apple Client ID(可选)
89
+
90
+ ## 可选配置
91
+
92
+ ### ui(UI 配置)
93
+
94
+ #### logo
95
+
96
+ ```json
97
+ {
98
+ "show": true,
99
+ "url": "https://your-logo.png",
100
+ "position": "center"
101
+ }
102
+ ```
103
+
104
+ #### title(标题)
105
+
106
+ ```json
107
+ {
108
+ "show": true,
109
+ "text": "Welcome back",
110
+ "align": "center"
111
+ }
112
+ ```
113
+
114
+ #### subtitle(副标题)
115
+
116
+ ```json
117
+ {
118
+ "show": true,
119
+ "text": "Log in to your account",
120
+ "align": "center"
121
+ }
122
+ ```
123
+
124
+ #### desc(描述)
125
+
126
+ ```json
127
+ {
128
+ "show": true,
129
+ "text": "Welcome back! Please enter your details.",
130
+ "align": "center"
131
+ }
132
+ ```
133
+
134
+ #### formLabels(表单标签)
135
+
136
+ ```json
137
+ {
138
+ "email": {
139
+ "show": true,
140
+ "text": "Email"
141
+ },
142
+ "phone": {
143
+ "show": true,
144
+ "text": "Phone Number"
145
+ },
146
+ "password": {
147
+ "show": true,
148
+ "text": "Password"
149
+ },
150
+ "verificationCode": {
151
+ "show": true,
152
+ "text": "Verification Code"
153
+ }
154
+ }
155
+ ```
156
+
157
+ #### themeColor(主题色)
158
+
159
+ ```json
160
+ "#7F56D9"
161
+ ```
162
+
163
+ ### channel(渠道标识)
164
+
165
+ 字符串类型,用于区分不同来源的登录请求。
166
+
167
+ ## 验证方式切换说明
168
+
169
+ 当为邮箱或手机配置多个验证方式时(例如:`verificationMethods: ["password", "verification_code"]`),用户界面会出现以下变化:
170
+
171
+ ### 默认显示
172
+
173
+ - **第一个验证方式**会作为默认显示
174
+ - 例如:`["password", "verification_code"]` → 默认显示密码输入框
175
+
176
+ ### OR 分隔线
177
+
178
+ - 主表单下方会显示一条 "OR" 分隔线
179
+
180
+ ### 切换选项
181
+
182
+ - OR 下方会显示其他验证方式的切换按钮
183
+ - 邮箱验证码:显示 "Email code to xxx@example.com"
184
+ - 手机验证码:显示 "SMS code to 138****8000"
185
+ - 密码登录:显示 "Password login"
186
+
187
+ ### 实际效果
188
+
189
+ **配置:**
190
+ ```json
191
+ {
192
+ "type": "email",
193
+ "verificationMethods": ["password", "verification_code"]
194
+ }
195
+ ```
196
+
197
+ **界面显示:**
198
+ ```
199
+ ┌─────────────────────────┐
200
+ │ Email Input │
201
+ │ Password Input │
202
+ │ [Remember me] [Forgot?] │
203
+ │ [Log in Button] │
204
+ ├─────────────────────────┤
205
+ │ OR │
206
+ ├─────────────────────────┤
207
+ │ 📧 Email code to u***@ │ ← 点击切换到验证码登录
208
+ └─────────────────────────┘
209
+ ```
210
+
211
+ 点击后切换为:
212
+ ```
213
+ ┌─────────────────────────┐
214
+ │ Email Input │
215
+ │ Verification Code Input │
216
+ │ [Log in Button] │
217
+ ├─────────────────────────┤
218
+ │ OR │
219
+ ├─────────────────────────┤
220
+ │ 🔑 Password login │ ← 点击切换回密码登录
221
+ └─────────────────────────┘
222
+ ```
223
+
224
+ ## 完整配置示例
225
+
226
+ ### 示例 1:邮箱密码登录 + Google
227
+
228
+ ```json
229
+ {
230
+ "config": {
231
+ "loginMethods": [
232
+ {
233
+ "type": "email",
234
+ "verificationMethods": ["password"],
235
+ "stepByStep": false
236
+ },
237
+ {
238
+ "type": "google",
239
+ "clientId": "your-client-id"
240
+ }
241
+ ],
242
+ "ui": {
243
+ "title": {
244
+ "show": true,
245
+ "text": "Welcome back",
246
+ "align": "center"
247
+ },
248
+ "subtitle": {
249
+ "show": true,
250
+ "text": "Log in to your account",
251
+ "align": "center"
252
+ },
253
+ "themeColor": "#7F56D9"
254
+ }
255
+ }
256
+ }
257
+ ```
258
+
259
+ ### 示例 2:邮箱分步骤登录 + 多种方式
260
+
261
+ ```json
262
+ {
263
+ "config": {
264
+ "loginMethods": [
265
+ {
266
+ "type": "email",
267
+ "verificationMethods": ["password", "verification_code"],
268
+ "stepByStep": true
269
+ },
270
+ {
271
+ "type": "google",
272
+ "clientId": "xxx"
273
+ },
274
+ {
275
+ "type": "facebook",
276
+ "appId": "xxx"
277
+ },
278
+ {
279
+ "type": "phone",
280
+ "verificationMethods": ["verification_code"]
281
+ }
282
+ ],
283
+ "ui": {
284
+ "themeColor": "#7F56D9"
285
+ },
286
+ "channel": "web"
287
+ }
288
+ }
289
+ ```
290
+
291
+ ### 示例 3:纯第三方登录
292
+
293
+ ```json
294
+ {
295
+ "config": {
296
+ "loginMethods": [
297
+ {
298
+ "type": "google",
299
+ "clientId": "xxx"
300
+ },
301
+ {
302
+ "type": "apple",
303
+ "clientId": "xxx"
304
+ },
305
+ {
306
+ "type": "facebook",
307
+ "appId": "xxx"
308
+ }
309
+ ]
310
+ }
311
+ }
312
+ ```
313
+
314
+ ### 示例 4:邮箱验证码 + 密码(可切换)
315
+
316
+ ```json
317
+ {
318
+ "config": {
319
+ "loginMethods": [
320
+ {
321
+ "type": "email",
322
+ "verificationMethods": ["verification_code", "password"]
323
+ }
324
+ ],
325
+ "ui": {
326
+ "title": {
327
+ "show": true,
328
+ "text": "Welcome back",
329
+ "align": "center"
330
+ }
331
+ }
332
+ }
333
+ }
334
+ ```
335
+
336
+ **说明:**
337
+ - 默认显示验证码登录
338
+ - 用户可以点击 "Password login" 切换到密码登录
339
+ - 密码登录时可以点击 "Email code to xxx" 切换回验证码
340
+
341
+ ### 示例 5:纯密码登录(无切换)
342
+
343
+ ```json
344
+ {
345
+ "config": {
346
+ "loginMethods": [
347
+ {
348
+ "type": "email",
349
+ "verificationMethods": ["password"]
350
+ }
351
+ ]
352
+ }
353
+ }
354
+ ```
355
+
356
+ **说明:**
357
+ - 只显示密码登录
358
+ - 不显示 OR 分隔线
359
+ - 无其他验证方式切换选项
360
+
361
+ ### 示例 6:纯验证码登录(无切换)
362
+
363
+ ```json
364
+ {
365
+ "config": {
366
+ "loginMethods": [
367
+ {
368
+ "type": "phone",
369
+ "verificationMethods": ["verification_code"]
370
+ }
371
+ ]
372
+ }
373
+ }
374
+ ```
375
+
376
+ **说明:**
377
+ - 只显示手机验证码登录
378
+ - 不显示 OR 分隔线
379
+ - 无其他验证方式切换选项
380
+
381
+ ## 事件回调
382
+
383
+ ### onLogin
384
+
385
+ 登录回调,参数:`(data, method, channel)`
386
+
387
+ ```javascript
388
+ function(data, method, channel) {
389
+ console.log('Login:', data, method, channel);
390
+ // data = { account, password, verification_code, remember_me }
391
+ // method = 'email' | 'phone'
392
+ // channel = 'web' (如果配置了)
393
+ }
394
+ ```
395
+
396
+ ### onOAuthLogin
397
+
398
+ 三方登录回调,参数:`(provider, channel)`
399
+
400
+ ```javascript
401
+ function(provider, channel) {
402
+ console.log('OAuth login:', provider, channel);
403
+ // provider = 'google' | 'facebook' | 'apple'
404
+ }
405
+ ```
406
+
407
+ ### onSendVerificationCode
408
+
409
+ 发送验证码回调,参数:`(account, type, channel)`
410
+
411
+ ```javascript
412
+ function(account, type, channel) {
413
+ console.log('Send code to:', account, type);
414
+ // account = 用户输入的邮箱或手机号
415
+ // type = 'email' | 'phone'
416
+ }
417
+ ```
418
+
419
+ ### onForgotPassword
420
+
421
+ 忘记密码回调,参数:`(account, channel)`
422
+
423
+ ```javascript
424
+ function(account, channel) {
425
+ console.log('Forgot password:', account);
426
+ // account = 用户输入的邮箱或手机号
427
+ }
428
+ ```
429
+
430
+ ### onClose
431
+
432
+ 关闭组件回调
433
+
434
+ ```javascript
435
+ function() {
436
+ console.log('Close login modal');
437
+ }
438
+ ```
439
+
440
+ ## 注意事项
441
+
442
+ 1. **loginMethods 必填**:至少需要配置一种登录方式
443
+ 2. **顺序很重要**:数组第一项为默认登录方式
444
+ 3. **分步骤登录**:仅对密码登录有效,验证码登录始终为单步
445
+ 4. **验证方式顺序**:`verificationMethods` 数组第一项为默认验证方式
446
+ 5. **Client ID/App ID**:使用第三方登录时需要提供对应的 ID
447
+