@baseplate-dev/plugin-auth 1.0.6 → 1.0.7

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 (1405) hide show
  1. package/CHANGELOG.md +720 -0
  2. package/LICENSE +114 -123
  3. package/README.md +3 -3
  4. package/dist/auth/core/common.d.ts +2 -5
  5. package/dist/auth/core/common.d.ts.map +1 -1
  6. package/dist/auth/core/common.js +15 -18
  7. package/dist/auth/core/common.js.map +1 -1
  8. package/dist/auth/core/components/auth-definition-editor.d.ts.map +1 -1
  9. package/dist/auth/core/components/auth-definition-editor.js +44 -30
  10. package/dist/auth/core/components/auth-definition-editor.js.map +1 -1
  11. package/dist/auth/core/components/role-editor-form/role-dialog.d.ts +12 -0
  12. package/dist/auth/core/components/role-editor-form/role-dialog.d.ts.map +1 -0
  13. package/dist/auth/core/components/role-editor-form/role-dialog.js +29 -0
  14. package/dist/auth/core/components/role-editor-form/role-dialog.js.map +1 -0
  15. package/dist/auth/core/components/role-editor-form/role-editor-form.d.ts +10 -0
  16. package/dist/auth/core/components/role-editor-form/role-editor-form.d.ts.map +1 -0
  17. package/dist/auth/core/components/role-editor-form/role-editor-form.js +52 -0
  18. package/dist/auth/core/components/role-editor-form/role-editor-form.js.map +1 -0
  19. package/dist/auth/core/node.d.ts +3 -3
  20. package/dist/auth/core/node.d.ts.map +1 -1
  21. package/dist/auth/core/node.js +28 -40
  22. package/dist/auth/core/node.js.map +1 -1
  23. package/dist/auth/core/schema/plugin-definition.d.ts +6 -74
  24. package/dist/auth/core/schema/plugin-definition.d.ts.map +1 -1
  25. package/dist/auth/core/schema/plugin-definition.js +5 -20
  26. package/dist/auth/core/schema/plugin-definition.js.map +1 -1
  27. package/dist/auth/core/schema/roles/constants.d.ts.map +1 -0
  28. package/dist/auth/core/schema/roles/constants.js.map +1 -0
  29. package/dist/auth/core/schema/roles/index.d.ts +3 -0
  30. package/dist/auth/core/schema/roles/index.d.ts.map +1 -0
  31. package/dist/auth/core/schema/roles/index.js +3 -0
  32. package/dist/auth/core/schema/roles/index.js.map +1 -0
  33. package/dist/auth/core/schema/roles/schema.d.ts +54 -0
  34. package/dist/auth/core/schema/roles/schema.d.ts.map +1 -0
  35. package/dist/auth/core/schema/roles/schema.js +37 -0
  36. package/dist/auth/core/schema/roles/schema.js.map +1 -0
  37. package/dist/auth/core/web.d.ts +3 -3
  38. package/dist/auth/core/web.d.ts.map +1 -1
  39. package/dist/auth/core/web.js +5 -6
  40. package/dist/auth/core/web.js.map +1 -1
  41. package/dist/auth/index.d.ts +1 -1
  42. package/dist/auth/index.d.ts.map +1 -1
  43. package/dist/auth/index.js +1 -1
  44. package/dist/auth/index.js.map +1 -1
  45. package/dist/auth/plugin.json +8 -0
  46. package/dist/auth/utils/get-auth-plugin-definition.d.ts +9 -0
  47. package/dist/auth/utils/get-auth-plugin-definition.d.ts.map +1 -0
  48. package/dist/auth/utils/get-auth-plugin-definition.js +10 -0
  49. package/dist/auth/utils/get-auth-plugin-definition.js.map +1 -0
  50. package/dist/auth/utils/index.d.ts +2 -0
  51. package/dist/auth/utils/index.d.ts.map +1 -0
  52. package/dist/auth/utils/index.js +2 -0
  53. package/dist/auth/utils/index.js.map +1 -0
  54. package/dist/better-auth/constants/model-names.d.ts +8 -0
  55. package/dist/better-auth/constants/model-names.d.ts.map +1 -0
  56. package/dist/better-auth/constants/model-names.js +8 -0
  57. package/dist/better-auth/constants/model-names.js.map +1 -0
  58. package/dist/better-auth/constants/packages.d.ts +4 -0
  59. package/dist/better-auth/constants/packages.d.ts.map +1 -0
  60. package/dist/better-auth/constants/packages.js +4 -0
  61. package/dist/better-auth/constants/packages.js.map +1 -0
  62. package/dist/better-auth/core/common.d.ts +6 -0
  63. package/dist/better-auth/core/common.d.ts.map +1 -0
  64. package/dist/better-auth/core/common.js +17 -0
  65. package/dist/better-auth/core/common.js.map +1 -0
  66. package/dist/better-auth/core/components/better-auth-definition-editor.d.ts +5 -0
  67. package/dist/better-auth/core/components/better-auth-definition-editor.d.ts.map +1 -0
  68. package/dist/better-auth/core/components/better-auth-definition-editor.js +50 -0
  69. package/dist/better-auth/core/components/better-auth-definition-editor.js.map +1 -0
  70. package/dist/better-auth/core/index.d.ts +2 -0
  71. package/dist/better-auth/core/index.d.ts.map +1 -0
  72. package/dist/better-auth/core/index.js +2 -0
  73. package/dist/better-auth/core/index.js.map +1 -0
  74. package/dist/better-auth/core/node.d.ts +5 -0
  75. package/dist/better-auth/core/node.d.ts.map +1 -0
  76. package/dist/better-auth/core/node.js +47 -0
  77. package/dist/better-auth/core/node.js.map +1 -0
  78. package/dist/better-auth/core/schema/models.d.ts +3 -0
  79. package/dist/better-auth/core/schema/models.d.ts.map +1 -0
  80. package/dist/better-auth/core/schema/models.js +278 -0
  81. package/dist/better-auth/core/schema/models.js.map +1 -0
  82. package/dist/better-auth/core/schema/plugin-definition.d.ts +5 -0
  83. package/dist/better-auth/core/schema/plugin-definition.d.ts.map +1 -0
  84. package/dist/better-auth/core/schema/plugin-definition.js +4 -0
  85. package/dist/better-auth/core/schema/plugin-definition.js.map +1 -0
  86. package/dist/better-auth/core/web.d.ts +6 -0
  87. package/dist/better-auth/core/web.d.ts.map +1 -0
  88. package/dist/better-auth/core/web.js +13 -0
  89. package/dist/better-auth/core/web.js.map +1 -0
  90. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts +85 -0
  91. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts.map +1 -0
  92. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +75 -0
  93. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js.map +1 -0
  94. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts +142 -0
  95. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts.map +1 -0
  96. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.js +11 -0
  97. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.js.map +1 -0
  98. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.d.ts +16 -0
  99. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.d.ts.map +1 -0
  100. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.js +28 -0
  101. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.js.map +1 -0
  102. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts +73 -0
  103. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts.map +1 -0
  104. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js +84 -0
  105. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js.map +1 -0
  106. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts +30 -0
  107. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts.map +1 -0
  108. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js +37 -0
  109. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js.map +1 -0
  110. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts +65 -0
  111. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts.map +1 -0
  112. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js +72 -0
  113. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js.map +1 -0
  114. package/dist/better-auth/generators/fastify/better-auth-module/index.d.ts +4 -0
  115. package/dist/better-auth/generators/fastify/better-auth-module/index.d.ts.map +1 -0
  116. package/dist/better-auth/generators/fastify/better-auth-module/index.js +3 -0
  117. package/dist/better-auth/generators/fastify/better-auth-module/index.js.map +1 -0
  118. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/plugins/better-auth.plugin.ts +31 -0
  119. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/schema/user-session.queries.ts +22 -0
  120. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +62 -0
  121. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/user-session.service.ts +72 -0
  122. package/dist/better-auth/generators/fastify/better-auth-module/templates/module/utils/headers.utils.ts +21 -0
  123. package/dist/better-auth/generators/fastify/index.d.ts +2 -0
  124. package/dist/better-auth/generators/fastify/index.d.ts.map +1 -0
  125. package/dist/better-auth/generators/fastify/index.js +2 -0
  126. package/dist/better-auth/generators/fastify/index.js.map +1 -0
  127. package/dist/better-auth/generators/index.d.ts.map +1 -0
  128. package/dist/better-auth/generators/index.js.map +1 -0
  129. package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts +43 -0
  130. package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts.map +1 -0
  131. package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js +37 -0
  132. package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js.map +1 -0
  133. package/dist/better-auth/generators/react/better-auth-hooks/generated/index.d.ts +72 -0
  134. package/dist/better-auth/generators/react/better-auth-hooks/generated/index.d.ts.map +1 -0
  135. package/dist/better-auth/generators/react/better-auth-hooks/generated/index.js +11 -0
  136. package/dist/better-auth/generators/react/better-auth-hooks/generated/index.js.map +1 -0
  137. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts +14 -0
  138. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts.map +1 -0
  139. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.js +26 -0
  140. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.js.map +1 -0
  141. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.d.ts +27 -0
  142. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.d.ts.map +1 -0
  143. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.js +43 -0
  144. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.js.map +1 -0
  145. package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts +18 -0
  146. package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
  147. package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js +27 -0
  148. package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js.map +1 -0
  149. package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts +51 -0
  150. package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts.map +1 -0
  151. package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.js +48 -0
  152. package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.js.map +1 -0
  153. package/dist/better-auth/generators/react/better-auth-hooks/index.d.ts +2 -0
  154. package/dist/better-auth/generators/react/better-auth-hooks/index.d.ts.map +1 -0
  155. package/dist/better-auth/generators/react/better-auth-hooks/index.js +2 -0
  156. package/dist/better-auth/generators/react/better-auth-hooks/index.js.map +1 -0
  157. package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-log-out.ts +16 -0
  158. package/dist/better-auth/generators/react/better-auth-hooks/templates/src/hooks/use-session.ts +29 -0
  159. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +249 -0
  160. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts.map +1 -0
  161. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js +26 -0
  162. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js.map +1 -0
  163. package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +724 -0
  164. package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts.map +1 -0
  165. package/dist/better-auth/generators/react/better-auth-pages/generated/index.js +9 -0
  166. package/dist/better-auth/generators/react/better-auth-pages/generated/index.js.map +1 -0
  167. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts +13 -0
  168. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts.map +1 -0
  169. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js +25 -0
  170. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js.map +1 -0
  171. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +250 -0
  172. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts.map +1 -0
  173. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.js +44 -0
  174. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.js.map +1 -0
  175. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +943 -0
  176. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts.map +1 -0
  177. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js +35 -0
  178. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js.map +1 -0
  179. package/dist/better-auth/generators/react/better-auth-pages/index.d.ts +2 -0
  180. package/dist/better-auth/generators/react/better-auth-pages/index.d.ts.map +1 -0
  181. package/dist/better-auth/generators/react/better-auth-pages/index.js +2 -0
  182. package/dist/better-auth/generators/react/better-auth-pages/index.js.map +1 -0
  183. package/dist/better-auth/generators/react/better-auth-pages/templates/routes/login.tsx +144 -0
  184. package/dist/better-auth/generators/react/better-auth-pages/templates/routes/register.tsx +160 -0
  185. package/dist/better-auth/generators/react/index.d.ts +4 -0
  186. package/dist/better-auth/generators/react/index.d.ts.map +1 -0
  187. package/dist/better-auth/generators/react/index.js +4 -0
  188. package/dist/better-auth/generators/react/index.js.map +1 -0
  189. package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +515 -0
  190. package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts.map +1 -0
  191. package/dist/better-auth/generators/react/react-better-auth/generated/index.js +11 -0
  192. package/dist/better-auth/generators/react/react-better-auth/generated/index.js.map +1 -0
  193. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.d.ts +13 -0
  194. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.d.ts.map +1 -0
  195. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.js +25 -0
  196. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.js.map +1 -0
  197. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +260 -0
  198. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts.map +1 -0
  199. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.js +51 -0
  200. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.js.map +1 -0
  201. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts +21 -0
  202. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts.map +1 -0
  203. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js +30 -0
  204. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js.map +1 -0
  205. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +247 -0
  206. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts.map +1 -0
  207. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.js +33 -0
  208. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.js.map +1 -0
  209. package/dist/better-auth/generators/react/react-better-auth/index.d.ts +4 -0
  210. package/dist/better-auth/generators/react/react-better-auth/index.d.ts.map +1 -0
  211. package/dist/better-auth/generators/react/react-better-auth/index.js +3 -0
  212. package/dist/better-auth/generators/react/react-better-auth/index.js.map +1 -0
  213. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +280 -0
  214. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts.map +1 -0
  215. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.js +74 -0
  216. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.js.map +1 -0
  217. package/dist/better-auth/generators/react/react-better-auth/templates/src/app/auth-loaded-gate.tsx +55 -0
  218. package/dist/better-auth/generators/react/react-better-auth/templates/src/services/auth-client.ts +13 -0
  219. package/dist/better-auth/index.d.ts +3 -0
  220. package/dist/better-auth/index.d.ts.map +1 -0
  221. package/dist/better-auth/index.js +2 -0
  222. package/dist/better-auth/index.js.map +1 -0
  223. package/dist/better-auth/plugin.json +9 -0
  224. package/dist/better-auth/static/icon.svg +10 -0
  225. package/dist/common/components/auth-config-tabs.d.ts +2 -0
  226. package/dist/common/components/auth-config-tabs.d.ts.map +1 -0
  227. package/dist/common/components/auth-config-tabs.js +21 -0
  228. package/dist/common/components/auth-config-tabs.js.map +1 -0
  229. package/dist/index.d.ts +2 -1
  230. package/dist/index.js +1 -1
  231. package/dist/local-auth/admin/common.d.ts +5 -0
  232. package/dist/local-auth/admin/common.d.ts.map +1 -0
  233. package/dist/local-auth/admin/common.js +29 -0
  234. package/dist/local-auth/admin/common.js.map +1 -0
  235. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +488 -0
  236. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -0
  237. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +127 -0
  238. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -0
  239. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +488 -0
  240. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +1 -0
  241. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js +9 -0
  242. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js.map +1 -0
  243. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts +12 -0
  244. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts.map +1 -0
  245. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js +24 -0
  246. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js.map +1 -0
  247. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +249 -0
  248. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +1 -0
  249. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js +41 -0
  250. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js.map +1 -0
  251. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +238 -0
  252. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +1 -0
  253. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js +20 -0
  254. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js.map +1 -0
  255. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts +2 -0
  256. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts.map +1 -0
  257. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.js +2 -0
  258. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.js.map +1 -0
  259. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts +22 -0
  260. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +1 -0
  261. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js +78 -0
  262. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +1 -0
  263. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.tsx +164 -0
  264. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +487 -0
  265. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +1 -0
  266. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js +119 -0
  267. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +1 -0
  268. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +488 -0
  269. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +1 -0
  270. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.js +9 -0
  271. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.js.map +1 -0
  272. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts +12 -0
  273. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts.map +1 -0
  274. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js +24 -0
  275. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js.map +1 -0
  276. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +249 -0
  277. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +1 -0
  278. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js +41 -0
  279. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js.map +1 -0
  280. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +473 -0
  281. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +1 -0
  282. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js +22 -0
  283. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js.map +1 -0
  284. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.d.ts +2 -0
  285. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.d.ts.map +1 -0
  286. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.js +2 -0
  287. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.js.map +1 -0
  288. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts +22 -0
  289. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts.map +1 -0
  290. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js +89 -0
  291. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +1 -0
  292. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.tsx +171 -0
  293. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +233 -0
  294. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +1 -0
  295. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js +54 -0
  296. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js.map +1 -0
  297. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.d.ts +2 -0
  298. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.d.ts.map +1 -0
  299. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.js +2 -0
  300. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.js.map +1 -0
  301. package/dist/local-auth/admin/node.d.ts +5 -0
  302. package/dist/local-auth/admin/node.d.ts.map +1 -0
  303. package/dist/local-auth/admin/node.js +57 -0
  304. package/dist/local-auth/admin/node.js.map +1 -0
  305. package/dist/local-auth/admin/schema/manage-role-action.d.ts +12 -0
  306. package/dist/local-auth/admin/schema/manage-role-action.d.ts.map +1 -0
  307. package/dist/local-auth/admin/schema/manage-role-action.js +6 -0
  308. package/dist/local-auth/admin/schema/manage-role-action.js.map +1 -0
  309. package/dist/local-auth/admin/schema/reset-password-action.d.ts +12 -0
  310. package/dist/local-auth/admin/schema/reset-password-action.d.ts.map +1 -0
  311. package/dist/local-auth/admin/schema/reset-password-action.js +6 -0
  312. package/dist/local-auth/admin/schema/reset-password-action.js.map +1 -0
  313. package/dist/local-auth/admin/schema/roles-column.d.ts +9 -0
  314. package/dist/local-auth/admin/schema/roles-column.d.ts.map +1 -0
  315. package/dist/local-auth/admin/schema/roles-column.js +6 -0
  316. package/dist/local-auth/admin/schema/roles-column.js.map +1 -0
  317. package/dist/local-auth/admin/web.d.ts +5 -0
  318. package/dist/local-auth/admin/web.d.ts.map +1 -0
  319. package/dist/local-auth/admin/web.js +39 -0
  320. package/dist/local-auth/admin/web.js.map +1 -0
  321. package/dist/local-auth/constants/model-names.d.ts +23 -0
  322. package/dist/local-auth/constants/model-names.d.ts.map +1 -0
  323. package/dist/local-auth/constants/model-names.js +23 -0
  324. package/dist/local-auth/constants/model-names.js.map +1 -0
  325. package/dist/local-auth/core/common.d.ts +6 -0
  326. package/dist/local-auth/core/common.d.ts.map +1 -0
  327. package/dist/local-auth/core/common.js +17 -0
  328. package/dist/local-auth/core/common.js.map +1 -0
  329. package/dist/local-auth/core/components/local-auth-definition-editor.d.ts +5 -0
  330. package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +1 -0
  331. package/dist/local-auth/core/components/local-auth-definition-editor.js +59 -0
  332. package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -0
  333. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +14 -0
  334. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts.map +1 -0
  335. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.js +40 -0
  336. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.js.map +1 -0
  337. package/dist/local-auth/core/generators/auth-apollo/index.d.ts.map +1 -0
  338. package/dist/local-auth/core/generators/auth-apollo/index.js.map +1 -0
  339. package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.d.ts.map +1 -0
  340. package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.js +20 -0
  341. package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.js.map +1 -0
  342. package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.ts +18 -0
  343. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +136 -0
  344. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -0
  345. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +76 -0
  346. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -0
  347. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +359 -0
  348. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -0
  349. package/dist/local-auth/core/generators/auth-email-password/generated/index.js +11 -0
  350. package/dist/local-auth/core/generators/auth-email-password/generated/index.js.map +1 -0
  351. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts +18 -0
  352. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts.map +1 -0
  353. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js +30 -0
  354. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js.map +1 -0
  355. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +110 -0
  356. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -0
  357. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +93 -0
  358. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -0
  359. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts +45 -0
  360. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts.map +1 -0
  361. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js +46 -0
  362. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js.map +1 -0
  363. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +394 -0
  364. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -0
  365. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +141 -0
  366. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -0
  367. package/dist/local-auth/core/generators/auth-email-password/index.d.ts.map +1 -0
  368. package/dist/local-auth/core/generators/auth-email-password/index.js.map +1 -0
  369. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts +17 -0
  370. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts.map +1 -0
  371. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js +18 -0
  372. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js.map +1 -0
  373. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.ts +21 -0
  374. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.d.ts +2 -0
  375. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.d.ts.map +1 -0
  376. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.js +24 -0
  377. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.js.map +1 -0
  378. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.ts +35 -0
  379. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.d.ts +2 -0
  380. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.d.ts.map +1 -0
  381. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js +38 -0
  382. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js.map +1 -0
  383. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.ts +54 -0
  384. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.d.ts.map +1 -0
  385. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +72 -0
  386. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +1 -0
  387. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +91 -0
  388. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts +24 -0
  389. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts.map +1 -0
  390. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js +87 -0
  391. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js.map +1 -0
  392. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +140 -0
  393. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts +37 -0
  394. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts.map +1 -0
  395. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +161 -0
  396. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js.map +1 -0
  397. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +235 -0
  398. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts +60 -0
  399. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -0
  400. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +207 -0
  401. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +1 -0
  402. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +330 -0
  403. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts +43 -0
  404. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts.map +1 -0
  405. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js +48 -0
  406. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js.map +1 -0
  407. package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts +96 -0
  408. package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts.map +1 -0
  409. package/dist/local-auth/core/generators/auth-email-templates/generated/index.js +11 -0
  410. package/dist/local-auth/core/generators/auth-email-templates/generated/index.js.map +1 -0
  411. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts +14 -0
  412. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts.map +1 -0
  413. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js +26 -0
  414. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js.map +1 -0
  415. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts +41 -0
  416. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts.map +1 -0
  417. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js +59 -0
  418. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js.map +1 -0
  419. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts +60 -0
  420. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts.map +1 -0
  421. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js +42 -0
  422. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js.map +1 -0
  423. package/dist/local-auth/core/generators/auth-email-templates/index.d.ts +2 -0
  424. package/dist/local-auth/core/generators/auth-email-templates/index.d.ts.map +1 -0
  425. package/dist/local-auth/core/generators/auth-email-templates/index.js +2 -0
  426. package/dist/local-auth/core/generators/auth-email-templates/index.js.map +1 -0
  427. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.d.ts +3 -0
  428. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.d.ts.map +1 -0
  429. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.js +14 -0
  430. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.js.map +1 -0
  431. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.tsx +55 -0
  432. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.d.ts +3 -0
  433. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.d.ts.map +1 -0
  434. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.js +12 -0
  435. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.js.map +1 -0
  436. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.tsx +44 -0
  437. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.d.ts +3 -0
  438. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.d.ts.map +1 -0
  439. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.js +14 -0
  440. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.js.map +1 -0
  441. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.tsx +55 -0
  442. package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +57 -0
  443. package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts.map +1 -0
  444. package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.js +32 -0
  445. package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.js.map +1 -0
  446. package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts +93 -0
  447. package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts.map +1 -0
  448. package/dist/local-auth/core/generators/auth-hooks/generated/index.js +11 -0
  449. package/dist/local-auth/core/generators/auth-hooks/generated/index.js.map +1 -0
  450. package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.d.ts +14 -0
  451. package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.d.ts.map +1 -0
  452. package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.js +26 -0
  453. package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.js.map +1 -0
  454. package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts +35 -0
  455. package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts.map +1 -0
  456. package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.js +45 -0
  457. package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.js.map +1 -0
  458. package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts +29 -0
  459. package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts.map +1 -0
  460. package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js +37 -0
  461. package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js.map +1 -0
  462. package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts +71 -0
  463. package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts.map +1 -0
  464. package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.js +50 -0
  465. package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.js.map +1 -0
  466. package/dist/local-auth/core/generators/auth-hooks/index.d.ts +4 -0
  467. package/dist/local-auth/core/generators/auth-hooks/index.d.ts.map +1 -0
  468. package/dist/local-auth/core/generators/auth-hooks/index.js +3 -0
  469. package/dist/local-auth/core/generators/auth-hooks/index.js.map +1 -0
  470. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts +3 -0
  471. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts.map +1 -0
  472. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js +30 -0
  473. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js.map +1 -0
  474. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.ts +33 -0
  475. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts +15 -0
  476. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts.map +1 -0
  477. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js +16 -0
  478. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js.map +1 -0
  479. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts +32 -0
  480. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts.map +1 -0
  481. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js +15 -0
  482. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +1 -0
  483. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +16 -0
  484. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +117 -0
  485. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -0
  486. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +103 -0
  487. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -0
  488. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +281 -0
  489. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -0
  490. package/dist/local-auth/core/generators/auth-module/generated/index.js +11 -0
  491. package/dist/local-auth/core/generators/auth-module/generated/index.js.map +1 -0
  492. package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +24 -0
  493. package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts.map +1 -0
  494. package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +36 -0
  495. package/dist/local-auth/core/generators/auth-module/generated/template-paths.js.map +1 -0
  496. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +102 -0
  497. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -0
  498. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +109 -0
  499. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -0
  500. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +30 -0
  501. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts.map +1 -0
  502. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +37 -0
  503. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js.map +1 -0
  504. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +269 -0
  505. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -0
  506. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +192 -0
  507. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -0
  508. package/dist/local-auth/core/generators/auth-module/index.d.ts.map +1 -0
  509. package/dist/local-auth/core/generators/auth-module/index.js.map +1 -0
  510. package/dist/local-auth/core/generators/auth-module/templates/module/constants/user-session.constants.d.ts.map +1 -0
  511. package/dist/local-auth/core/generators/auth-module/templates/module/constants/user-session.constants.js.map +1 -0
  512. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts +6 -0
  513. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts.map +1 -0
  514. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js +17 -0
  515. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js.map +1 -0
  516. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.ts +21 -0
  517. package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.d.ts +8 -0
  518. package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.d.ts.map +1 -0
  519. package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.js +16 -0
  520. package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.js.map +1 -0
  521. package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.ts +21 -0
  522. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.d.ts +2 -0
  523. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.d.ts.map +1 -0
  524. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.js +23 -0
  525. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.js.map +1 -0
  526. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.ts +26 -0
  527. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.d.ts.map +1 -0
  528. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.js +19 -0
  529. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.js.map +1 -0
  530. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.ts +25 -0
  531. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.d.ts.map +1 -0
  532. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js +18 -0
  533. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js.map +1 -0
  534. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts +22 -0
  535. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.d.ts.map +1 -0
  536. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js +36 -0
  537. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +1 -0
  538. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts +43 -0
  539. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts +40 -0
  540. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts.map +1 -0
  541. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js +106 -0
  542. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js.map +1 -0
  543. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.ts +146 -0
  544. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts +15 -0
  545. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts.map +1 -0
  546. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js +35 -0
  547. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js.map +1 -0
  548. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.ts +47 -0
  549. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts.map +1 -0
  550. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +190 -0
  551. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +1 -0
  552. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +262 -0
  553. package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts.map +1 -0
  554. package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.js.map +1 -0
  555. package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.d.ts.map +1 -0
  556. package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js +38 -0
  557. package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js.map +1 -0
  558. package/dist/local-auth/core/generators/auth-module/templates/module/utils/verify-request-origin.d.ts.map +1 -0
  559. package/dist/local-auth/core/generators/auth-module/templates/module/utils/verify-request-origin.js.map +1 -0
  560. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +263 -0
  561. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +1 -0
  562. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js +32 -0
  563. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js.map +1 -0
  564. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +1497 -0
  565. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +1 -0
  566. package/dist/local-auth/core/generators/auth-routes/generated/index.js +11 -0
  567. package/dist/local-auth/core/generators/auth-routes/generated/index.js.map +1 -0
  568. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts +18 -0
  569. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts.map +1 -0
  570. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js +28 -0
  571. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js.map +1 -0
  572. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +264 -0
  573. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +1 -0
  574. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js +62 -0
  575. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js.map +1 -0
  576. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts +21 -0
  577. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts.map +1 -0
  578. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js +30 -0
  579. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js.map +1 -0
  580. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +2206 -0
  581. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +1 -0
  582. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js +117 -0
  583. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js.map +1 -0
  584. package/dist/local-auth/core/generators/auth-routes/index.d.ts +4 -0
  585. package/dist/local-auth/core/generators/auth-routes/index.d.ts.map +1 -0
  586. package/dist/local-auth/core/generators/auth-routes/index.js +3 -0
  587. package/dist/local-auth/core/generators/auth-routes/index.js.map +1 -0
  588. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.d.ts +10 -0
  589. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.d.ts.map +1 -0
  590. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.js +11 -0
  591. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.js.map +1 -0
  592. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.ts +12 -0
  593. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.d.ts +2 -0
  594. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.d.ts.map +1 -0
  595. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js +60 -0
  596. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js.map +1 -0
  597. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.tsx +127 -0
  598. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts +7 -0
  599. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts.map +1 -0
  600. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +85 -0
  601. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +1 -0
  602. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +168 -0
  603. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts +7 -0
  604. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +1 -0
  605. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +82 -0
  606. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +1 -0
  607. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +153 -0
  608. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.d.ts +7 -0
  609. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.d.ts.map +1 -0
  610. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +150 -0
  611. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js.map +1 -0
  612. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +283 -0
  613. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts +2 -0
  614. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts.map +1 -0
  615. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.js.map +1 -0
  616. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.d.ts +7 -0
  617. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.d.ts.map +1 -0
  618. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js +106 -0
  619. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js.map +1 -0
  620. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.tsx +206 -0
  621. package/dist/local-auth/core/generators/index.d.ts +10 -0
  622. package/dist/local-auth/core/generators/index.d.ts.map +1 -0
  623. package/dist/local-auth/core/generators/index.js +10 -0
  624. package/dist/local-auth/core/generators/index.js.map +1 -0
  625. package/dist/local-auth/core/generators/react-auth/index.d.ts.map +1 -0
  626. package/dist/local-auth/core/generators/react-auth/index.js.map +1 -0
  627. package/dist/local-auth/core/generators/react-auth/react-auth.generator.d.ts +9 -0
  628. package/dist/local-auth/core/generators/react-auth/react-auth.generator.d.ts.map +1 -0
  629. package/dist/local-auth/core/generators/react-auth/react-auth.generator.js +31 -0
  630. package/dist/local-auth/core/generators/react-auth/react-auth.generator.js.map +1 -0
  631. package/dist/local-auth/core/generators/react-session/generated/index.d.ts +546 -0
  632. package/dist/local-auth/core/generators/react-session/generated/index.d.ts.map +1 -0
  633. package/dist/local-auth/core/generators/react-session/generated/index.js +11 -0
  634. package/dist/local-auth/core/generators/react-session/generated/index.js.map +1 -0
  635. package/dist/local-auth/core/generators/react-session/generated/template-paths.d.ts +13 -0
  636. package/dist/local-auth/core/generators/react-session/generated/template-paths.d.ts.map +1 -0
  637. package/dist/local-auth/core/generators/react-session/generated/template-paths.js +25 -0
  638. package/dist/local-auth/core/generators/react-session/generated/template-paths.js.map +1 -0
  639. package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +271 -0
  640. package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts.map +1 -0
  641. package/dist/local-auth/core/generators/react-session/generated/template-renderers.js +51 -0
  642. package/dist/local-auth/core/generators/react-session/generated/template-renderers.js.map +1 -0
  643. package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts +21 -0
  644. package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts.map +1 -0
  645. package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js +30 -0
  646. package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js.map +1 -0
  647. package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +525 -0
  648. package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts.map +1 -0
  649. package/dist/local-auth/core/generators/react-session/generated/typed-templates.js +35 -0
  650. package/dist/local-auth/core/generators/react-session/generated/typed-templates.js.map +1 -0
  651. package/dist/local-auth/core/generators/react-session/index.d.ts.map +1 -0
  652. package/dist/local-auth/core/generators/react-session/index.js.map +1 -0
  653. package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +290 -0
  654. package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +1 -0
  655. package/dist/local-auth/core/generators/react-session/react-session.generator.js +48 -0
  656. package/dist/local-auth/core/generators/react-session/react-session.generator.js.map +1 -0
  657. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts.map +1 -0
  658. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js +72 -0
  659. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js.map +1 -0
  660. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +99 -0
  661. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.d.ts +58 -0
  662. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.d.ts.map +1 -0
  663. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js +103 -0
  664. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js.map +1 -0
  665. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.ts +122 -0
  666. package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts +99 -0
  667. package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts.map +1 -0
  668. package/dist/local-auth/core/generators/seed-initial-user/generated/index.js +11 -0
  669. package/dist/local-auth/core/generators/seed-initial-user/generated/index.js.map +1 -0
  670. package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.d.ts +12 -0
  671. package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.d.ts.map +1 -0
  672. package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.js +24 -0
  673. package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.js.map +1 -0
  674. package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts +50 -0
  675. package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts.map +1 -0
  676. package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.js +46 -0
  677. package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.js.map +1 -0
  678. package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.d.ts +18 -0
  679. package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.d.ts.map +1 -0
  680. package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.js +26 -0
  681. package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.js.map +1 -0
  682. package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts +39 -0
  683. package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts.map +1 -0
  684. package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.js +21 -0
  685. package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.js.map +1 -0
  686. package/dist/local-auth/core/generators/seed-initial-user/index.d.ts +4 -0
  687. package/dist/local-auth/core/generators/seed-initial-user/index.d.ts.map +1 -0
  688. package/dist/local-auth/core/generators/seed-initial-user/index.js +3 -0
  689. package/dist/local-auth/core/generators/seed-initial-user/index.js.map +1 -0
  690. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts +58 -0
  691. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts.map +1 -0
  692. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js +57 -0
  693. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js.map +1 -0
  694. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.d.ts +3 -0
  695. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.d.ts.map +1 -0
  696. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.js +32 -0
  697. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.js.map +1 -0
  698. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.ts +43 -0
  699. package/dist/local-auth/core/index.d.ts.map +1 -0
  700. package/dist/local-auth/core/index.js.map +1 -0
  701. package/dist/local-auth/core/node.d.ts +5 -0
  702. package/dist/local-auth/core/node.d.ts.map +1 -0
  703. package/dist/local-auth/core/node.js +69 -0
  704. package/dist/local-auth/core/node.js.map +1 -0
  705. package/dist/local-auth/core/schema/models.d.ts +3 -0
  706. package/dist/local-auth/core/schema/models.d.ts.map +1 -0
  707. package/dist/local-auth/core/schema/models.js +266 -0
  708. package/dist/local-auth/core/schema/models.js.map +1 -0
  709. package/dist/local-auth/core/schema/plugin-definition.d.ts +9 -0
  710. package/dist/local-auth/core/schema/plugin-definition.d.ts.map +1 -0
  711. package/dist/local-auth/core/schema/plugin-definition.js +13 -0
  712. package/dist/local-auth/core/schema/plugin-definition.js.map +1 -0
  713. package/dist/local-auth/core/web.d.ts +6 -0
  714. package/dist/local-auth/core/web.d.ts.map +1 -0
  715. package/dist/local-auth/core/web.js +13 -0
  716. package/dist/local-auth/core/web.js.map +1 -0
  717. package/dist/local-auth/index.d.ts +2 -0
  718. package/dist/local-auth/index.d.ts.map +1 -0
  719. package/dist/local-auth/index.js +2 -0
  720. package/dist/local-auth/index.js.map +1 -0
  721. package/dist/local-auth/plugin.json +9 -0
  722. package/dist/local-auth/static/icon.svg +1 -0
  723. package/dist/placeholder-auth/constants/model-names.d.ts +4 -0
  724. package/dist/placeholder-auth/constants/model-names.d.ts.map +1 -0
  725. package/dist/placeholder-auth/constants/model-names.js +4 -0
  726. package/dist/placeholder-auth/constants/model-names.js.map +1 -0
  727. package/dist/placeholder-auth/core/common.d.ts +2 -5
  728. package/dist/placeholder-auth/core/common.d.ts.map +1 -1
  729. package/dist/placeholder-auth/core/common.js +11 -20
  730. package/dist/placeholder-auth/core/common.js.map +1 -1
  731. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts.map +1 -1
  732. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js +21 -29
  733. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +1 -1
  734. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts +3 -12
  735. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts.map +1 -1
  736. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts +0 -2
  737. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts.map +1 -1
  738. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js +0 -2
  739. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js.map +1 -1
  740. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts +1 -7
  741. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts.map +1 -1
  742. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js +2 -14
  743. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js.map +1 -1
  744. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts +3 -1
  745. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts.map +1 -1
  746. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js +1 -1
  747. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js.map +1 -1
  748. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts +0 -15
  749. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts.map +1 -1
  750. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js +7 -32
  751. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js.map +1 -1
  752. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts +4 -6
  753. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts.map +1 -1
  754. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.js +1 -7
  755. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.js.map +1 -1
  756. package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.d.ts +3 -1
  757. package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.d.ts.map +1 -1
  758. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts +4 -0
  759. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts.map +1 -1
  760. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts +2 -0
  761. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts.map +1 -1
  762. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts +2 -0
  763. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts.map +1 -1
  764. package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.d.ts +1 -1
  765. package/dist/placeholder-auth/core/node.d.ts +3 -3
  766. package/dist/placeholder-auth/core/node.d.ts.map +1 -1
  767. package/dist/placeholder-auth/core/node.js +11 -17
  768. package/dist/placeholder-auth/core/node.js.map +1 -1
  769. package/dist/placeholder-auth/core/schema/models.d.ts +2 -5
  770. package/dist/placeholder-auth/core/schema/models.d.ts.map +1 -1
  771. package/dist/placeholder-auth/core/schema/models.js +31 -28
  772. package/dist/placeholder-auth/core/schema/models.js.map +1 -1
  773. package/dist/placeholder-auth/core/schema/plugin-definition.d.ts +2 -79
  774. package/dist/placeholder-auth/core/schema/plugin-definition.d.ts.map +1 -1
  775. package/dist/placeholder-auth/core/schema/plugin-definition.js +2 -15
  776. package/dist/placeholder-auth/core/schema/plugin-definition.js.map +1 -1
  777. package/dist/placeholder-auth/core/web.d.ts +3 -3
  778. package/dist/placeholder-auth/core/web.d.ts.map +1 -1
  779. package/dist/placeholder-auth/core/web.js +5 -6
  780. package/dist/placeholder-auth/core/web.js.map +1 -1
  781. package/dist/placeholder-auth/plugin.json +10 -0
  782. package/dist/web/assets/__federation_expose_authCoreCommon-CnNoa4tF.js +30 -0
  783. package/dist/web/assets/__federation_expose_authCoreCommon-CnNoa4tF.js.map +1 -0
  784. package/dist/web/assets/__federation_expose_authCoreWeb-BL_U7yuj.js +433 -0
  785. package/dist/web/assets/__federation_expose_authCoreWeb-BL_U7yuj.js.map +1 -0
  786. package/dist/web/assets/__federation_expose_better-authCoreCommon-D-mTcxYO.js +20 -0
  787. package/dist/web/assets/__federation_expose_better-authCoreCommon-D-mTcxYO.js.map +1 -0
  788. package/dist/web/assets/__federation_expose_better-authCoreWeb-CXHL-Ghf.js +402 -0
  789. package/dist/web/assets/__federation_expose_better-authCoreWeb-CXHL-Ghf.js.map +1 -0
  790. package/dist/web/assets/__federation_expose_local-authAdminCommon-LIsARRNU.js +63 -0
  791. package/dist/web/assets/__federation_expose_local-authAdminCommon-LIsARRNU.js.map +1 -0
  792. package/dist/web/assets/__federation_expose_local-authAdminWeb-DyYUDLm9.js +41 -0
  793. package/dist/web/assets/__federation_expose_local-authAdminWeb-DyYUDLm9.js.map +1 -0
  794. package/dist/web/assets/__federation_expose_local-authCoreCommon-p_UbExc7.js +21 -0
  795. package/dist/web/assets/__federation_expose_local-authCoreCommon-p_UbExc7.js.map +1 -0
  796. package/dist/web/assets/__federation_expose_local-authCoreWeb-8TcUJFT6.js +432 -0
  797. package/dist/web/assets/__federation_expose_local-authCoreWeb-8TcUJFT6.js.map +1 -0
  798. package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-CtZXaDUc.js +23 -0
  799. package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-CtZXaDUc.js.map +1 -0
  800. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-CZAKokTb.js +162 -0
  801. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-CZAKokTb.js.map +1 -0
  802. package/dist/web/assets/__federation_fn_import-3DENgil8.js +421 -0
  803. package/dist/web/assets/__federation_fn_import-3DENgil8.js.map +1 -0
  804. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-B5bdbzFj.js +357 -0
  805. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-B5bdbzFj.js.map +1 -0
  806. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-DCA3vO4J.js +21478 -0
  807. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-DCA3vO4J.js.map +1 -0
  808. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-BvL7RO9S.js +73599 -0
  809. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-BvL7RO9S.js.map +1 -0
  810. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-0-N5BG4T.js +1822 -0
  811. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-0-N5BG4T.js.map +1 -0
  812. package/dist/web/assets/__federation_shared_@tanstack/react-router-DSniiJ6U.js +6565 -0
  813. package/dist/web/assets/__federation_shared_@tanstack/react-router-DSniiJ6U.js.map +1 -0
  814. package/dist/web/assets/__federation_shared_react-CJ2OfFKA.js +8 -0
  815. package/dist/web/assets/__federation_shared_react-CJ2OfFKA.js.map +1 -0
  816. package/dist/web/assets/__federation_shared_react-dom-B4vgf5Ln.js +251 -0
  817. package/dist/web/assets/__federation_shared_react-dom-B4vgf5Ln.js.map +1 -0
  818. package/dist/web/assets/__federation_shared_zod-Do7Aa1b5.js +13250 -0
  819. package/dist/web/assets/__federation_shared_zod-Do7Aa1b5.js.map +1 -0
  820. package/dist/web/assets/_commonjsHelpers-B85MJLTf.js +6 -0
  821. package/dist/web/assets/_commonjsHelpers-B85MJLTf.js.map +1 -0
  822. package/dist/web/assets/get-auth-plugin-definition-DHcbFujw.js +13 -0
  823. package/dist/web/assets/get-auth-plugin-definition-DHcbFujw.js.map +1 -0
  824. package/dist/web/assets/index-DQKNnI1w.js +103 -0
  825. package/dist/web/assets/index-DQKNnI1w.js.map +1 -0
  826. package/dist/web/assets/index-DUwCgkeV.js +570 -0
  827. package/dist/web/assets/index-DUwCgkeV.js.map +1 -0
  828. package/dist/web/assets/index.esm-Dpqxgpya.js +2676 -0
  829. package/dist/web/assets/index.esm-Dpqxgpya.js.map +1 -0
  830. package/dist/web/assets/isEqual-tnzoadW8.js +242 -0
  831. package/dist/web/assets/isEqual-tnzoadW8.js.map +1 -0
  832. package/dist/web/assets/jsx-runtime-XI9uIe3W.js +60 -0
  833. package/dist/web/assets/jsx-runtime-XI9uIe3W.js.map +1 -0
  834. package/dist/web/assets/mergeWith-VagwCqUi.js +76 -0
  835. package/dist/web/assets/mergeWith-VagwCqUi.js.map +1 -0
  836. package/dist/web/assets/model-names-DrcaRxt1.js +25 -0
  837. package/dist/web/assets/model-names-DrcaRxt1.js.map +1 -0
  838. package/dist/web/assets/model-utils-BFX3c3dn.js +694 -0
  839. package/dist/web/assets/model-utils-BFX3c3dn.js.map +1 -0
  840. package/dist/web/assets/plugin-definition-B86WQ7Ni.js +79 -0
  841. package/dist/web/assets/plugin-definition-B86WQ7Ni.js.map +1 -0
  842. package/dist/web/assets/plugin-definition-CEQb6mWV.js +20 -0
  843. package/dist/web/assets/plugin-definition-CEQb6mWV.js.map +1 -0
  844. package/dist/web/assets/plugin-definition-DrsKbcJc.js +31 -0
  845. package/dist/web/assets/plugin-definition-DrsKbcJc.js.map +1 -0
  846. package/dist/web/assets/plugin-definition-KEpaSB6p.js +16 -0
  847. package/dist/web/assets/plugin-definition-KEpaSB6p.js.map +1 -0
  848. package/dist/web/assets/react-hu8Hx0R4.js +47 -0
  849. package/dist/web/assets/react-hu8Hx0R4.js.map +1 -0
  850. package/dist/web/assets/registries-Tz_dluz3.js +1119 -0
  851. package/dist/web/assets/registries-Tz_dluz3.js.map +1 -0
  852. package/dist/web/assets/remoteEntry.js +26 -14
  853. package/dist/web/assets/remoteEntry.js.map +1 -1
  854. package/dist/web/assets/style-DiK_rD1L.css +120 -0
  855. package/dist/web/assets/styles-CpKtlIgU.js +69 -0
  856. package/dist/web/assets/styles-CpKtlIgU.js.map +1 -0
  857. package/dist/web/assets/with-selector-DTXBONcE.js +201 -0
  858. package/dist/web/assets/with-selector-DTXBONcE.js.map +1 -0
  859. package/dist/web/index.html +1 -1
  860. package/package.json +42 -36
  861. package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +0 -28
  862. package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.d.ts.map +0 -1
  863. package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.js +0 -43
  864. package/dist/auth/core/generators/auth-apollo/auth-apollo.generator.js.map +0 -1
  865. package/dist/auth/core/generators/auth-apollo/index.d.ts.map +0 -1
  866. package/dist/auth/core/generators/auth-apollo/index.js.map +0 -1
  867. package/dist/auth/core/generators/auth-apollo/templates/session-error-link.d.ts.map +0 -1
  868. package/dist/auth/core/generators/auth-apollo/templates/session-error-link.js +0 -15
  869. package/dist/auth/core/generators/auth-apollo/templates/session-error-link.js.map +0 -1
  870. package/dist/auth/core/generators/auth-apollo/templates/session-error-link.ts +0 -16
  871. package/dist/auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +0 -73
  872. package/dist/auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +0 -1
  873. package/dist/auth/core/generators/auth-email-password/auth-email-password.generator.js +0 -40
  874. package/dist/auth/core/generators/auth-email-password/auth-email-password.generator.js.map +0 -1
  875. package/dist/auth/core/generators/auth-email-password/generated/index.d.ts +0 -124
  876. package/dist/auth/core/generators/auth-email-password/generated/index.d.ts.map +0 -1
  877. package/dist/auth/core/generators/auth-email-password/generated/index.js +0 -11
  878. package/dist/auth/core/generators/auth-email-password/generated/index.js.map +0 -1
  879. package/dist/auth/core/generators/auth-email-password/generated/template-paths.d.ts +0 -14
  880. package/dist/auth/core/generators/auth-email-password/generated/template-paths.d.ts.map +0 -1
  881. package/dist/auth/core/generators/auth-email-password/generated/template-paths.js +0 -26
  882. package/dist/auth/core/generators/auth-email-password/generated/template-paths.js.map +0 -1
  883. package/dist/auth/core/generators/auth-email-password/generated/template-renderers.d.ts +0 -58
  884. package/dist/auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +0 -1
  885. package/dist/auth/core/generators/auth-email-password/generated/template-renderers.js +0 -55
  886. package/dist/auth/core/generators/auth-email-password/generated/template-renderers.js.map +0 -1
  887. package/dist/auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts +0 -25
  888. package/dist/auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts.map +0 -1
  889. package/dist/auth/core/generators/auth-email-password/generated/ts-import-providers.js +0 -32
  890. package/dist/auth/core/generators/auth-email-password/generated/ts-import-providers.js.map +0 -1
  891. package/dist/auth/core/generators/auth-email-password/generated/typed-templates.d.ts +0 -105
  892. package/dist/auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +0 -1
  893. package/dist/auth/core/generators/auth-email-password/generated/typed-templates.js +0 -58
  894. package/dist/auth/core/generators/auth-email-password/generated/typed-templates.js.map +0 -1
  895. package/dist/auth/core/generators/auth-email-password/index.d.ts.map +0 -1
  896. package/dist/auth/core/generators/auth-email-password/index.js.map +0 -1
  897. package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts +0 -2
  898. package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts.map +0 -1
  899. package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.js +0 -3
  900. package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.js.map +0 -1
  901. package/dist/auth/core/generators/auth-email-password/templates/module/constants/password.constants.ts +0 -3
  902. package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.d.ts.map +0 -1
  903. package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js +0 -33
  904. package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +0 -1
  905. package/dist/auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.ts +0 -44
  906. package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts +0 -21
  907. package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +0 -1
  908. package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +0 -74
  909. package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +0 -1
  910. package/dist/auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +0 -121
  911. package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.d.ts +0 -61
  912. package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.d.ts.map +0 -1
  913. package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.js +0 -33
  914. package/dist/auth/core/generators/auth-hooks/auth-hooks.generator.js.map +0 -1
  915. package/dist/auth/core/generators/auth-hooks/generated/index.d.ts +0 -127
  916. package/dist/auth/core/generators/auth-hooks/generated/index.d.ts.map +0 -1
  917. package/dist/auth/core/generators/auth-hooks/generated/index.js +0 -11
  918. package/dist/auth/core/generators/auth-hooks/generated/index.js.map +0 -1
  919. package/dist/auth/core/generators/auth-hooks/generated/template-paths.d.ts +0 -17
  920. package/dist/auth/core/generators/auth-hooks/generated/template-paths.d.ts.map +0 -1
  921. package/dist/auth/core/generators/auth-hooks/generated/template-paths.js +0 -27
  922. package/dist/auth/core/generators/auth-hooks/generated/template-paths.js.map +0 -1
  923. package/dist/auth/core/generators/auth-hooks/generated/template-renderers.d.ts +0 -47
  924. package/dist/auth/core/generators/auth-hooks/generated/template-renderers.d.ts.map +0 -1
  925. package/dist/auth/core/generators/auth-hooks/generated/template-renderers.js +0 -50
  926. package/dist/auth/core/generators/auth-hooks/generated/template-renderers.js.map +0 -1
  927. package/dist/auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts +0 -16
  928. package/dist/auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts.map +0 -1
  929. package/dist/auth/core/generators/auth-hooks/generated/ts-import-providers.js +0 -27
  930. package/dist/auth/core/generators/auth-hooks/generated/ts-import-providers.js.map +0 -1
  931. package/dist/auth/core/generators/auth-hooks/generated/typed-templates.d.ts +0 -131
  932. package/dist/auth/core/generators/auth-hooks/generated/typed-templates.d.ts.map +0 -1
  933. package/dist/auth/core/generators/auth-hooks/generated/typed-templates.js +0 -83
  934. package/dist/auth/core/generators/auth-hooks/generated/typed-templates.js.map +0 -1
  935. package/dist/auth/core/generators/auth-hooks/index.d.ts +0 -2
  936. package/dist/auth/core/generators/auth-hooks/index.d.ts.map +0 -1
  937. package/dist/auth/core/generators/auth-hooks/index.js +0 -2
  938. package/dist/auth/core/generators/auth-hooks/index.js.map +0 -1
  939. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts +0 -18
  940. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.d.ts.map +0 -1
  941. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.gql +0 -10
  942. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js +0 -22
  943. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.js.map +0 -1
  944. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-current-user.ts +0 -39
  945. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts +0 -2
  946. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts.map +0 -1
  947. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.gql +0 -5
  948. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js +0 -27
  949. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js.map +0 -1
  950. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.ts +0 -29
  951. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts +0 -8
  952. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts.map +0 -1
  953. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.js +0 -12
  954. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.js.map +0 -1
  955. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-session.ts +0 -16
  956. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts.map +0 -1
  957. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js +0 -15
  958. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +0 -1
  959. package/dist/auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.ts +0 -16
  960. package/dist/auth/core/generators/auth-module/auth-module.generator.d.ts +0 -94
  961. package/dist/auth/core/generators/auth-module/auth-module.generator.d.ts.map +0 -1
  962. package/dist/auth/core/generators/auth-module/auth-module.generator.js +0 -70
  963. package/dist/auth/core/generators/auth-module/auth-module.generator.js.map +0 -1
  964. package/dist/auth/core/generators/auth-module/generated/index.d.ts +0 -182
  965. package/dist/auth/core/generators/auth-module/generated/index.d.ts.map +0 -1
  966. package/dist/auth/core/generators/auth-module/generated/index.js +0 -11
  967. package/dist/auth/core/generators/auth-module/generated/index.js.map +0 -1
  968. package/dist/auth/core/generators/auth-module/generated/template-paths.d.ts +0 -19
  969. package/dist/auth/core/generators/auth-module/generated/template-paths.d.ts.map +0 -1
  970. package/dist/auth/core/generators/auth-module/generated/template-paths.js +0 -29
  971. package/dist/auth/core/generators/auth-module/generated/template-paths.js.map +0 -1
  972. package/dist/auth/core/generators/auth-module/generated/template-renderers.d.ts +0 -80
  973. package/dist/auth/core/generators/auth-module/generated/template-renderers.d.ts.map +0 -1
  974. package/dist/auth/core/generators/auth-module/generated/template-renderers.js +0 -79
  975. package/dist/auth/core/generators/auth-module/generated/template-renderers.js.map +0 -1
  976. package/dist/auth/core/generators/auth-module/generated/ts-import-providers.d.ts +0 -22
  977. package/dist/auth/core/generators/auth-module/generated/ts-import-providers.d.ts.map +0 -1
  978. package/dist/auth/core/generators/auth-module/generated/ts-import-providers.js +0 -31
  979. package/dist/auth/core/generators/auth-module/generated/ts-import-providers.js.map +0 -1
  980. package/dist/auth/core/generators/auth-module/generated/typed-templates.d.ts +0 -134
  981. package/dist/auth/core/generators/auth-module/generated/typed-templates.d.ts.map +0 -1
  982. package/dist/auth/core/generators/auth-module/generated/typed-templates.js +0 -113
  983. package/dist/auth/core/generators/auth-module/generated/typed-templates.js.map +0 -1
  984. package/dist/auth/core/generators/auth-module/index.d.ts.map +0 -1
  985. package/dist/auth/core/generators/auth-module/index.js.map +0 -1
  986. package/dist/auth/core/generators/auth-module/templates/module/constants/user-session.constants.d.ts.map +0 -1
  987. package/dist/auth/core/generators/auth-module/templates/module/constants/user-session.constants.js.map +0 -1
  988. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.d.ts.map +0 -1
  989. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.js +0 -17
  990. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.js.map +0 -1
  991. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.ts +0 -23
  992. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.d.ts.map +0 -1
  993. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js +0 -18
  994. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js.map +0 -1
  995. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts +0 -22
  996. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.d.ts.map +0 -1
  997. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.js +0 -19
  998. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +0 -1
  999. package/dist/auth/core/generators/auth-module/templates/module/schema/user-session.queries.ts +0 -23
  1000. package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts.map +0 -1
  1001. package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.js +0 -180
  1002. package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +0 -1
  1003. package/dist/auth/core/generators/auth-module/templates/module/services/user-session.service.ts +0 -250
  1004. package/dist/auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts.map +0 -1
  1005. package/dist/auth/core/generators/auth-module/templates/module/utils/cookie-signer.js.map +0 -1
  1006. package/dist/auth/core/generators/auth-module/templates/module/utils/session-cookie.d.ts.map +0 -1
  1007. package/dist/auth/core/generators/auth-module/templates/module/utils/session-cookie.js +0 -38
  1008. package/dist/auth/core/generators/auth-module/templates/module/utils/session-cookie.js.map +0 -1
  1009. package/dist/auth/core/generators/auth-module/templates/module/utils/verify-request-origin.d.ts.map +0 -1
  1010. package/dist/auth/core/generators/auth-module/templates/module/utils/verify-request-origin.js.map +0 -1
  1011. package/dist/auth/core/generators/auth-routes/auth-routes.generator.d.ts +0 -176
  1012. package/dist/auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +0 -1
  1013. package/dist/auth/core/generators/auth-routes/auth-routes.generator.js +0 -38
  1014. package/dist/auth/core/generators/auth-routes/auth-routes.generator.js.map +0 -1
  1015. package/dist/auth/core/generators/auth-routes/generated/index.d.ts +0 -495
  1016. package/dist/auth/core/generators/auth-routes/generated/index.d.ts.map +0 -1
  1017. package/dist/auth/core/generators/auth-routes/generated/index.js +0 -9
  1018. package/dist/auth/core/generators/auth-routes/generated/index.js.map +0 -1
  1019. package/dist/auth/core/generators/auth-routes/generated/template-paths.d.ts +0 -15
  1020. package/dist/auth/core/generators/auth-routes/generated/template-paths.d.ts.map +0 -1
  1021. package/dist/auth/core/generators/auth-routes/generated/template-paths.js +0 -25
  1022. package/dist/auth/core/generators/auth-routes/generated/template-paths.js.map +0 -1
  1023. package/dist/auth/core/generators/auth-routes/generated/template-renderers.d.ts +0 -176
  1024. package/dist/auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +0 -1
  1025. package/dist/auth/core/generators/auth-routes/generated/template-renderers.js +0 -55
  1026. package/dist/auth/core/generators/auth-routes/generated/template-renderers.js.map +0 -1
  1027. package/dist/auth/core/generators/auth-routes/generated/typed-templates.d.ts +0 -638
  1028. package/dist/auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +0 -1
  1029. package/dist/auth/core/generators/auth-routes/generated/typed-templates.js +0 -57
  1030. package/dist/auth/core/generators/auth-routes/generated/typed-templates.js.map +0 -1
  1031. package/dist/auth/core/generators/auth-routes/index.d.ts +0 -2
  1032. package/dist/auth/core/generators/auth-routes/index.d.ts.map +0 -1
  1033. package/dist/auth/core/generators/auth-routes/index.js +0 -2
  1034. package/dist/auth/core/generators/auth-routes/index.js.map +0 -1
  1035. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts +0 -2
  1036. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts.map +0 -1
  1037. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.js +0 -85
  1038. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +0 -1
  1039. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +0 -161
  1040. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/queries.gql +0 -15
  1041. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts +0 -2
  1042. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +0 -1
  1043. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.js +0 -77
  1044. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +0 -1
  1045. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +0 -148
  1046. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts +0 -2
  1047. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts.map +0 -1
  1048. package/dist/auth/core/generators/auth-routes/templates/routes/auth_/route.js.map +0 -1
  1049. package/dist/auth/core/generators/index.d.ts +0 -8
  1050. package/dist/auth/core/generators/index.d.ts.map +0 -1
  1051. package/dist/auth/core/generators/index.js +0 -8
  1052. package/dist/auth/core/generators/index.js.map +0 -1
  1053. package/dist/auth/core/generators/react-auth/index.d.ts.map +0 -1
  1054. package/dist/auth/core/generators/react-auth/index.js.map +0 -1
  1055. package/dist/auth/core/generators/react-auth/react-auth.generator.d.ts +0 -9
  1056. package/dist/auth/core/generators/react-auth/react-auth.generator.d.ts.map +0 -1
  1057. package/dist/auth/core/generators/react-auth/react-auth.generator.js +0 -31
  1058. package/dist/auth/core/generators/react-auth/react-auth.generator.js.map +0 -1
  1059. package/dist/auth/core/generators/react-session/generated/index.d.ts +0 -74
  1060. package/dist/auth/core/generators/react-session/generated/index.d.ts.map +0 -1
  1061. package/dist/auth/core/generators/react-session/generated/index.js +0 -11
  1062. package/dist/auth/core/generators/react-session/generated/index.js.map +0 -1
  1063. package/dist/auth/core/generators/react-session/generated/template-paths.d.ts +0 -16
  1064. package/dist/auth/core/generators/react-session/generated/template-paths.d.ts.map +0 -1
  1065. package/dist/auth/core/generators/react-session/generated/template-paths.js +0 -26
  1066. package/dist/auth/core/generators/react-session/generated/template-paths.js.map +0 -1
  1067. package/dist/auth/core/generators/react-session/generated/template-renderers.d.ts +0 -27
  1068. package/dist/auth/core/generators/react-session/generated/template-renderers.d.ts.map +0 -1
  1069. package/dist/auth/core/generators/react-session/generated/template-renderers.js +0 -49
  1070. package/dist/auth/core/generators/react-session/generated/template-renderers.js.map +0 -1
  1071. package/dist/auth/core/generators/react-session/generated/ts-import-providers.d.ts +0 -64
  1072. package/dist/auth/core/generators/react-session/generated/ts-import-providers.d.ts.map +0 -1
  1073. package/dist/auth/core/generators/react-session/generated/ts-import-providers.js +0 -42
  1074. package/dist/auth/core/generators/react-session/generated/ts-import-providers.js.map +0 -1
  1075. package/dist/auth/core/generators/react-session/generated/typed-templates.d.ts +0 -46
  1076. package/dist/auth/core/generators/react-session/generated/typed-templates.d.ts.map +0 -1
  1077. package/dist/auth/core/generators/react-session/generated/typed-templates.js +0 -82
  1078. package/dist/auth/core/generators/react-session/generated/typed-templates.js.map +0 -1
  1079. package/dist/auth/core/generators/react-session/index.d.ts.map +0 -1
  1080. package/dist/auth/core/generators/react-session/index.js.map +0 -1
  1081. package/dist/auth/core/generators/react-session/react-session.generator.d.ts +0 -58
  1082. package/dist/auth/core/generators/react-session/react-session.generator.d.ts.map +0 -1
  1083. package/dist/auth/core/generators/react-session/react-session.generator.js +0 -54
  1084. package/dist/auth/core/generators/react-session/react-session.generator.js.map +0 -1
  1085. package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.d.ts +0 -7
  1086. package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.d.ts.map +0 -1
  1087. package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.gql +0 -6
  1088. package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.js +0 -25
  1089. package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.js.map +0 -1
  1090. package/dist/auth/core/generators/react-session/templates/src/app/user-session-check.tsx +0 -28
  1091. package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts.map +0 -1
  1092. package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.js +0 -18
  1093. package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.js.map +0 -1
  1094. package/dist/auth/core/generators/react-session/templates/src/app/user-session-provider.tsx +0 -45
  1095. package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.d.ts +0 -12
  1096. package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.d.ts.map +0 -1
  1097. package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.js +0 -15
  1098. package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.js.map +0 -1
  1099. package/dist/auth/core/generators/react-session/templates/src/hooks/use-user-session-client.ts +0 -30
  1100. package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.d.ts +0 -79
  1101. package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.d.ts.map +0 -1
  1102. package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.js +0 -133
  1103. package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.js.map +0 -1
  1104. package/dist/auth/core/generators/react-session/templates/src/services/user-session-client.ts +0 -153
  1105. package/dist/auth/core/index.d.ts.map +0 -1
  1106. package/dist/auth/core/index.js.map +0 -1
  1107. package/dist/auth/core/schema/models.d.ts +0 -9
  1108. package/dist/auth/core/schema/models.d.ts.map +0 -1
  1109. package/dist/auth/core/schema/models.js +0 -203
  1110. package/dist/auth/core/schema/models.js.map +0 -1
  1111. package/dist/auth/metadata.json +0 -8
  1112. package/dist/auth0/constants/packages.d.ts +0 -6
  1113. package/dist/auth0/constants/packages.d.ts.map +0 -1
  1114. package/dist/auth0/constants/packages.js +0 -6
  1115. package/dist/auth0/constants/packages.js.map +0 -1
  1116. package/dist/auth0/core/common.d.ts +0 -7
  1117. package/dist/auth0/core/common.d.ts.map +0 -1
  1118. package/dist/auth0/core/common.js +0 -28
  1119. package/dist/auth0/core/common.js.map +0 -1
  1120. package/dist/auth0/core/components/auth-definition-editor.d.ts +0 -5
  1121. package/dist/auth0/core/components/auth-definition-editor.d.ts.map +0 -1
  1122. package/dist/auth0/core/components/auth-definition-editor.js +0 -61
  1123. package/dist/auth0/core/components/auth-definition-editor.js.map +0 -1
  1124. package/dist/auth0/core/node.d.ts +0 -5
  1125. package/dist/auth0/core/node.d.ts.map +0 -1
  1126. package/dist/auth0/core/node.js +0 -49
  1127. package/dist/auth0/core/node.js.map +0 -1
  1128. package/dist/auth0/core/schema/migrations.d.ts +0 -3
  1129. package/dist/auth0/core/schema/migrations.d.ts.map +0 -1
  1130. package/dist/auth0/core/schema/migrations.js +0 -19
  1131. package/dist/auth0/core/schema/migrations.js.map +0 -1
  1132. package/dist/auth0/core/schema/models.d.ts +0 -6
  1133. package/dist/auth0/core/schema/models.d.ts.map +0 -1
  1134. package/dist/auth0/core/schema/models.js +0 -39
  1135. package/dist/auth0/core/schema/models.js.map +0 -1
  1136. package/dist/auth0/core/schema/plugin-definition.d.ts +0 -83
  1137. package/dist/auth0/core/schema/plugin-definition.d.ts.map +0 -1
  1138. package/dist/auth0/core/schema/plugin-definition.js +0 -17
  1139. package/dist/auth0/core/schema/plugin-definition.js.map +0 -1
  1140. package/dist/auth0/core/web.d.ts +0 -6
  1141. package/dist/auth0/core/web.d.ts.map +0 -1
  1142. package/dist/auth0/core/web.js +0 -14
  1143. package/dist/auth0/core/web.js.map +0 -1
  1144. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts +0 -75
  1145. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts.map +0 -1
  1146. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js +0 -120
  1147. package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +0 -1
  1148. package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts +0 -105
  1149. package/dist/auth0/generators/fastify/auth0-module/generated/index.d.ts.map +0 -1
  1150. package/dist/auth0/generators/fastify/auth0-module/generated/index.js +0 -11
  1151. package/dist/auth0/generators/fastify/auth0-module/generated/index.js.map +0 -1
  1152. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts +0 -13
  1153. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.d.ts.map +0 -1
  1154. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js +0 -23
  1155. package/dist/auth0/generators/fastify/auth0-module/generated/template-paths.js.map +0 -1
  1156. package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts +0 -55
  1157. package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.d.ts.map +0 -1
  1158. package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.js +0 -52
  1159. package/dist/auth0/generators/fastify/auth0-module/generated/template-renderers.js.map +0 -1
  1160. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts +0 -10
  1161. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.d.ts.map +0 -1
  1162. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js +0 -23
  1163. package/dist/auth0/generators/fastify/auth0-module/generated/ts-import-providers.js.map +0 -1
  1164. package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts +0 -43
  1165. package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.d.ts.map +0 -1
  1166. package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js +0 -28
  1167. package/dist/auth0/generators/fastify/auth0-module/generated/typed-templates.js.map +0 -1
  1168. package/dist/auth0/generators/fastify/auth0-module/index.d.ts +0 -2
  1169. package/dist/auth0/generators/fastify/auth0-module/index.d.ts.map +0 -1
  1170. package/dist/auth0/generators/fastify/auth0-module/index.js +0 -2
  1171. package/dist/auth0/generators/fastify/auth0-module/index.js.map +0 -1
  1172. package/dist/auth0/generators/fastify/auth0-module/templates/module/services/management.ts +0 -22
  1173. package/dist/auth0/generators/fastify/auth0-module/templates/module/services/user-session.service.ts +0 -101
  1174. package/dist/auth0/generators/fastify/index.d.ts +0 -2
  1175. package/dist/auth0/generators/fastify/index.d.ts.map +0 -1
  1176. package/dist/auth0/generators/fastify/index.js +0 -2
  1177. package/dist/auth0/generators/fastify/index.js.map +0 -1
  1178. package/dist/auth0/generators/index.d.ts.map +0 -1
  1179. package/dist/auth0/generators/index.js.map +0 -1
  1180. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts +0 -10
  1181. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts.map +0 -1
  1182. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js +0 -41
  1183. package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.js.map +0 -1
  1184. package/dist/auth0/generators/react/auth0-apollo/index.d.ts +0 -2
  1185. package/dist/auth0/generators/react/auth0-apollo/index.d.ts.map +0 -1
  1186. package/dist/auth0/generators/react/auth0-apollo/index.js +0 -2
  1187. package/dist/auth0/generators/react/auth0-apollo/index.js.map +0 -1
  1188. package/dist/auth0/generators/react/auth0-apollo/templates/auth-link.ts +0 -11
  1189. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts +0 -40
  1190. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.d.ts.map +0 -1
  1191. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js +0 -40
  1192. package/dist/auth0/generators/react/auth0-hooks/auth0-hooks.generator.js.map +0 -1
  1193. package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts +0 -72
  1194. package/dist/auth0/generators/react/auth0-hooks/generated/index.d.ts.map +0 -1
  1195. package/dist/auth0/generators/react/auth0-hooks/generated/index.js +0 -11
  1196. package/dist/auth0/generators/react/auth0-hooks/generated/index.js.map +0 -1
  1197. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts +0 -16
  1198. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.d.ts.map +0 -1
  1199. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js +0 -26
  1200. package/dist/auth0/generators/react/auth0-hooks/generated/template-paths.js.map +0 -1
  1201. package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts +0 -29
  1202. package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.d.ts.map +0 -1
  1203. package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js +0 -47
  1204. package/dist/auth0/generators/react/auth0-hooks/generated/template-renderers.js.map +0 -1
  1205. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts +0 -16
  1206. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.d.ts.map +0 -1
  1207. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js +0 -27
  1208. package/dist/auth0/generators/react/auth0-hooks/generated/ts-import-providers.js.map +0 -1
  1209. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts +0 -52
  1210. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.d.ts.map +0 -1
  1211. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js +0 -69
  1212. package/dist/auth0/generators/react/auth0-hooks/generated/typed-templates.js.map +0 -1
  1213. package/dist/auth0/generators/react/auth0-hooks/index.d.ts +0 -2
  1214. package/dist/auth0/generators/react/auth0-hooks/index.d.ts.map +0 -1
  1215. package/dist/auth0/generators/react/auth0-hooks/index.js +0 -2
  1216. package/dist/auth0/generators/react/auth0-hooks/index.js.map +0 -1
  1217. package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.gql +0 -10
  1218. package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-current-user.ts +0 -29
  1219. package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-log-out.ts +0 -14
  1220. package/dist/auth0/generators/react/auth0-hooks/templates/src/hooks/use-session.ts +0 -23
  1221. package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts +0 -143
  1222. package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.d.ts.map +0 -1
  1223. package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.js +0 -26
  1224. package/dist/auth0/generators/react/auth0-pages/auth0-pages.generator.js.map +0 -1
  1225. package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts +0 -278
  1226. package/dist/auth0/generators/react/auth0-pages/generated/index.d.ts.map +0 -1
  1227. package/dist/auth0/generators/react/auth0-pages/generated/index.js +0 -9
  1228. package/dist/auth0/generators/react/auth0-pages/generated/index.js.map +0 -1
  1229. package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts +0 -12
  1230. package/dist/auth0/generators/react/auth0-pages/generated/template-paths.d.ts.map +0 -1
  1231. package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js +0 -20
  1232. package/dist/auth0/generators/react/auth0-pages/generated/template-paths.js.map +0 -1
  1233. package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts +0 -144
  1234. package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.d.ts.map +0 -1
  1235. package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js +0 -37
  1236. package/dist/auth0/generators/react/auth0-pages/generated/template-renderers.js.map +0 -1
  1237. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts +0 -263
  1238. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.d.ts.map +0 -1
  1239. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.js +0 -18
  1240. package/dist/auth0/generators/react/auth0-pages/generated/typed-templates.js.map +0 -1
  1241. package/dist/auth0/generators/react/auth0-pages/index.d.ts +0 -2
  1242. package/dist/auth0/generators/react/auth0-pages/index.d.ts.map +0 -1
  1243. package/dist/auth0/generators/react/auth0-pages/index.js +0 -2
  1244. package/dist/auth0/generators/react/auth0-pages/index.js.map +0 -1
  1245. package/dist/auth0/generators/react/auth0-pages/templates/routes/login.tsx +0 -31
  1246. package/dist/auth0/generators/react/index.d.ts +0 -5
  1247. package/dist/auth0/generators/react/index.d.ts.map +0 -1
  1248. package/dist/auth0/generators/react/index.js +0 -5
  1249. package/dist/auth0/generators/react/index.js.map +0 -1
  1250. package/dist/auth0/generators/react/react-auth0/generated/index.d.ts +0 -286
  1251. package/dist/auth0/generators/react/react-auth0/generated/index.d.ts.map +0 -1
  1252. package/dist/auth0/generators/react/react-auth0/generated/index.js +0 -9
  1253. package/dist/auth0/generators/react/react-auth0/generated/index.js.map +0 -1
  1254. package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts +0 -12
  1255. package/dist/auth0/generators/react/react-auth0/generated/template-paths.d.ts.map +0 -1
  1256. package/dist/auth0/generators/react/react-auth0/generated/template-paths.js +0 -22
  1257. package/dist/auth0/generators/react/react-auth0/generated/template-paths.js.map +0 -1
  1258. package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts +0 -149
  1259. package/dist/auth0/generators/react/react-auth0/generated/template-renderers.d.ts.map +0 -1
  1260. package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js +0 -39
  1261. package/dist/auth0/generators/react/react-auth0/generated/template-renderers.js.map +0 -1
  1262. package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts +0 -136
  1263. package/dist/auth0/generators/react/react-auth0/generated/typed-templates.d.ts.map +0 -1
  1264. package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js +0 -17
  1265. package/dist/auth0/generators/react/react-auth0/generated/typed-templates.js.map +0 -1
  1266. package/dist/auth0/generators/react/react-auth0/index.d.ts +0 -2
  1267. package/dist/auth0/generators/react/react-auth0/index.d.ts.map +0 -1
  1268. package/dist/auth0/generators/react/react-auth0/index.js +0 -2
  1269. package/dist/auth0/generators/react/react-auth0/index.js.map +0 -1
  1270. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts +0 -178
  1271. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +0 -1
  1272. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js +0 -107
  1273. package/dist/auth0/generators/react/react-auth0/react-auth0.generator.js.map +0 -1
  1274. package/dist/auth0/generators/react/react-auth0/templates/src/app/auth-loaded-gate.tsx +0 -78
  1275. package/dist/auth0/metadata.json +0 -8
  1276. package/dist/auth0/static/icon.svg +0 -7
  1277. package/dist/common/compiler/generator-creators.d.ts +0 -18
  1278. package/dist/common/compiler/generator-creators.d.ts.map +0 -1
  1279. package/dist/common/compiler/generator-creators.js +0 -34
  1280. package/dist/common/compiler/generator-creators.js.map +0 -1
  1281. package/dist/common/compiler/index.d.ts +0 -2
  1282. package/dist/common/compiler/index.d.ts.map +0 -1
  1283. package/dist/common/compiler/index.js +0 -2
  1284. package/dist/common/compiler/index.js.map +0 -1
  1285. package/dist/common/index.d.ts +0 -3
  1286. package/dist/common/index.d.ts.map +0 -1
  1287. package/dist/common/index.js +0 -3
  1288. package/dist/common/index.js.map +0 -1
  1289. package/dist/common/roles/components/index.d.ts +0 -2
  1290. package/dist/common/roles/components/index.d.ts.map +0 -1
  1291. package/dist/common/roles/components/index.js +0 -2
  1292. package/dist/common/roles/components/index.js.map +0 -1
  1293. package/dist/common/roles/components/role-editor-form/role-dialog.d.ts +0 -14
  1294. package/dist/common/roles/components/role-editor-form/role-dialog.d.ts.map +0 -1
  1295. package/dist/common/roles/components/role-editor-form/role-dialog.js +0 -29
  1296. package/dist/common/roles/components/role-editor-form/role-dialog.js.map +0 -1
  1297. package/dist/common/roles/components/role-editor-form/role-editor-form.d.ts +0 -10
  1298. package/dist/common/roles/components/role-editor-form/role-editor-form.d.ts.map +0 -1
  1299. package/dist/common/roles/components/role-editor-form/role-editor-form.js +0 -49
  1300. package/dist/common/roles/components/role-editor-form/role-editor-form.js.map +0 -1
  1301. package/dist/common/roles/constants.d.ts.map +0 -1
  1302. package/dist/common/roles/constants.js.map +0 -1
  1303. package/dist/common/roles/index.d.ts +0 -4
  1304. package/dist/common/roles/index.d.ts.map +0 -1
  1305. package/dist/common/roles/index.js +0 -4
  1306. package/dist/common/roles/index.js.map +0 -1
  1307. package/dist/common/roles/schema.d.ts +0 -84
  1308. package/dist/common/roles/schema.d.ts.map +0 -1
  1309. package/dist/common/roles/schema.js +0 -44
  1310. package/dist/common/roles/schema.js.map +0 -1
  1311. package/dist/index.js.map +0 -1
  1312. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.d.ts +0 -14
  1313. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.d.ts.map +0 -1
  1314. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.gql +0 -10
  1315. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js +0 -23
  1316. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.js.map +0 -1
  1317. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-current-user.ts +0 -34
  1318. package/dist/placeholder-auth/metadata.json +0 -9
  1319. package/dist/web/assets/__federation_expose_auth0CoreCommon-CSWdt8d_.js +0 -56
  1320. package/dist/web/assets/__federation_expose_auth0CoreCommon-CSWdt8d_.js.map +0 -1
  1321. package/dist/web/assets/__federation_expose_auth0CoreWeb-DjVw47sM.js +0 -201
  1322. package/dist/web/assets/__federation_expose_auth0CoreWeb-DjVw47sM.js.map +0 -1
  1323. package/dist/web/assets/__federation_expose_authCoreCommon-CvHJZFIq.js +0 -36
  1324. package/dist/web/assets/__federation_expose_authCoreCommon-CvHJZFIq.js.map +0 -1
  1325. package/dist/web/assets/__federation_expose_authCoreWeb-CrFEmZp3.js +0 -401
  1326. package/dist/web/assets/__federation_expose_authCoreWeb-CrFEmZp3.js.map +0 -1
  1327. package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-CmkiEJ6z.js +0 -39
  1328. package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-CmkiEJ6z.js.map +0 -1
  1329. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-CpxfTdxv.js +0 -197
  1330. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-CpxfTdxv.js.map +0 -1
  1331. package/dist/web/assets/__federation_fn_import-CGvRdRVe.js +0 -421
  1332. package/dist/web/assets/__federation_fn_import-CGvRdRVe.js.map +0 -1
  1333. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-D1kBtwsm.js +0 -341
  1334. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-D1kBtwsm.js.map +0 -1
  1335. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-B7442OYh.js +0 -10289
  1336. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-B7442OYh.js.map +0 -1
  1337. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-X318M5Ml.js +0 -23637
  1338. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-X318M5Ml.js.map +0 -1
  1339. package/dist/web/assets/__federation_shared_react-dom-Bwq4pLax.js +0 -250
  1340. package/dist/web/assets/__federation_shared_react-dom-Bwq4pLax.js.map +0 -1
  1341. package/dist/web/assets/__federation_shared_react-uocnGSER.js +0 -7
  1342. package/dist/web/assets/__federation_shared_react-uocnGSER.js.map +0 -1
  1343. package/dist/web/assets/__federation_shared_zod-BK7IELHt.js +0 -4380
  1344. package/dist/web/assets/__federation_shared_zod-BK7IELHt.js.map +0 -1
  1345. package/dist/web/assets/index-B1hOKVPw.js +0 -574
  1346. package/dist/web/assets/index-B1hOKVPw.js.map +0 -1
  1347. package/dist/web/assets/index-ydDQKauE.js +0 -101
  1348. package/dist/web/assets/index-ydDQKauE.js.map +0 -1
  1349. package/dist/web/assets/index.esm-DYWXRkn-.js +0 -2627
  1350. package/dist/web/assets/index.esm-DYWXRkn-.js.map +0 -1
  1351. package/dist/web/assets/model-merger-BVBtbNAj.js +0 -1708
  1352. package/dist/web/assets/model-merger-BVBtbNAj.js.map +0 -1
  1353. package/dist/web/assets/plugin-definition-Bdhuga1j.js +0 -36
  1354. package/dist/web/assets/plugin-definition-Bdhuga1j.js.map +0 -1
  1355. package/dist/web/assets/plugin-definition-C9d7ykhX.js +0 -24
  1356. package/dist/web/assets/plugin-definition-C9d7ykhX.js.map +0 -1
  1357. package/dist/web/assets/plugin-definition-QzgXWr1I.js +0 -24
  1358. package/dist/web/assets/plugin-definition-QzgXWr1I.js.map +0 -1
  1359. package/dist/web/assets/react-B23vKoD0.js +0 -47
  1360. package/dist/web/assets/react-B23vKoD0.js.map +0 -1
  1361. package/dist/web/assets/role-editor-form-BkcoVwtU.js +0 -319
  1362. package/dist/web/assets/role-editor-form-BkcoVwtU.js.map +0 -1
  1363. package/dist/web/assets/style-ZUYizAnf.css +0 -93
  1364. package/dist/web/assets/styles-Dfjm_ApH.js +0 -201
  1365. package/dist/web/assets/styles-Dfjm_ApH.js.map +0 -1
  1366. package/dist/web-export.js.map +0 -1
  1367. package/manifest.json +0 -4
  1368. /package/dist/{common → auth/core/schema}/roles/constants.d.ts +0 -0
  1369. /package/dist/{common → auth/core/schema}/roles/constants.js +0 -0
  1370. /package/dist/{auth0 → better-auth}/generators/index.d.ts +0 -0
  1371. /package/dist/{auth0 → better-auth}/generators/index.js +0 -0
  1372. /package/dist/{auth0/generators/react/auth0-hooks → better-auth/generators/react/better-auth-hooks}/templates/src/hooks/use-required-user-id.ts +0 -0
  1373. /package/dist/{auth → local-auth}/core/generators/auth-apollo/index.d.ts +0 -0
  1374. /package/dist/{auth → local-auth}/core/generators/auth-apollo/index.js +0 -0
  1375. /package/dist/{auth → local-auth}/core/generators/auth-apollo/templates/session-error-link.d.ts +0 -0
  1376. /package/dist/{auth → local-auth}/core/generators/auth-email-password/index.d.ts +0 -0
  1377. /package/dist/{auth → local-auth}/core/generators/auth-email-password/index.js +0 -0
  1378. /package/dist/{auth → local-auth}/core/generators/auth-email-password/templates/module/schema/user-password.mutations.d.ts +0 -0
  1379. /package/dist/{auth → local-auth}/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts +0 -0
  1380. /package/dist/{auth → local-auth}/core/generators/auth-module/index.d.ts +0 -0
  1381. /package/dist/{auth → local-auth}/core/generators/auth-module/index.js +0 -0
  1382. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/constants/user-session.constants.d.ts +0 -0
  1383. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/constants/user-session.constants.js +0 -0
  1384. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/constants/user-session.constants.ts +0 -0
  1385. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.d.ts +0 -0
  1386. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/schema/user-session.mutations.d.ts +0 -0
  1387. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/schema/user-session.queries.d.ts +0 -0
  1388. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/services/user-session.service.d.ts +0 -0
  1389. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts +0 -0
  1390. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/utils/cookie-signer.js +0 -0
  1391. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/utils/cookie-signer.ts +0 -0
  1392. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/utils/session-cookie.d.ts +0 -0
  1393. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/utils/session-cookie.ts +0 -0
  1394. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/utils/verify-request-origin.d.ts +0 -0
  1395. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/utils/verify-request-origin.js +0 -0
  1396. /package/dist/{auth → local-auth}/core/generators/auth-module/templates/module/utils/verify-request-origin.ts +0 -0
  1397. /package/dist/{auth → local-auth}/core/generators/auth-routes/templates/routes/auth_/route.js +0 -0
  1398. /package/dist/{auth → local-auth}/core/generators/auth-routes/templates/routes/auth_/route.tsx +0 -0
  1399. /package/dist/{auth → local-auth}/core/generators/react-auth/index.d.ts +0 -0
  1400. /package/dist/{auth → local-auth}/core/generators/react-auth/index.js +0 -0
  1401. /package/dist/{auth → local-auth}/core/generators/react-session/index.d.ts +0 -0
  1402. /package/dist/{auth → local-auth}/core/generators/react-session/index.js +0 -0
  1403. /package/dist/{auth → local-auth}/core/generators/react-session/templates/src/app/user-session-provider.d.ts +0 -0
  1404. /package/dist/{auth → local-auth}/core/index.d.ts +0 -0
  1405. /package/dist/{auth → local-auth}/core/index.js +0 -0
@@ -1,2627 +0,0 @@
1
- import { importShared } from './__federation_fn_import-CGvRdRVe.js';
2
-
3
- var jsxRuntime = {exports: {}};
4
-
5
- var reactJsxRuntime_production = {};
6
-
7
- /**
8
- * @license React
9
- * react-jsx-runtime.production.js
10
- *
11
- * Copyright (c) Meta Platforms, Inc. and affiliates.
12
- *
13
- * This source code is licensed under the MIT license found in the
14
- * LICENSE file in the root directory of this source tree.
15
- */
16
-
17
- var hasRequiredReactJsxRuntime_production;
18
-
19
- function requireReactJsxRuntime_production () {
20
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
21
- hasRequiredReactJsxRuntime_production = 1;
22
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
23
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
24
- function jsxProd(type, config, maybeKey) {
25
- var key = null;
26
- void 0 !== maybeKey && (key = "" + maybeKey);
27
- void 0 !== config.key && (key = "" + config.key);
28
- if ("key" in config) {
29
- maybeKey = {};
30
- for (var propName in config)
31
- "key" !== propName && (maybeKey[propName] = config[propName]);
32
- } else maybeKey = config;
33
- config = maybeKey.ref;
34
- return {
35
- $$typeof: REACT_ELEMENT_TYPE,
36
- type: type,
37
- key: key,
38
- ref: void 0 !== config ? config : null,
39
- props: maybeKey
40
- };
41
- }
42
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
43
- reactJsxRuntime_production.jsx = jsxProd;
44
- reactJsxRuntime_production.jsxs = jsxProd;
45
- return reactJsxRuntime_production;
46
- }
47
-
48
- var hasRequiredJsxRuntime;
49
-
50
- function requireJsxRuntime () {
51
- if (hasRequiredJsxRuntime) return jsxRuntime.exports;
52
- hasRequiredJsxRuntime = 1;
53
- {
54
- jsxRuntime.exports = requireReactJsxRuntime_production();
55
- }
56
- return jsxRuntime.exports;
57
- }
58
-
59
- var jsxRuntimeExports = requireJsxRuntime();
60
-
61
- const React = await importShared('react');
62
-
63
- const React__default = await importShared('react');
64
-
65
-
66
- var isCheckBoxInput = (element) => element.type === 'checkbox';
67
-
68
- var isDateObject = (value) => value instanceof Date;
69
-
70
- var isNullOrUndefined = (value) => value == null;
71
-
72
- const isObjectType = (value) => typeof value === 'object';
73
- var isObject = (value) => !isNullOrUndefined(value) &&
74
- !Array.isArray(value) &&
75
- isObjectType(value) &&
76
- !isDateObject(value);
77
-
78
- var getEventValue = (event) => isObject(event) && event.target
79
- ? isCheckBoxInput(event.target)
80
- ? event.target.checked
81
- : event.target.value
82
- : event;
83
-
84
- var getNodeParentName = (name) => name.substring(0, name.search(/\.\d+(\.|$)/)) || name;
85
-
86
- var isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));
87
-
88
- var isPlainObject = (tempObject) => {
89
- const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;
90
- return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));
91
- };
92
-
93
- var isWeb = typeof window !== 'undefined' &&
94
- typeof window.HTMLElement !== 'undefined' &&
95
- typeof document !== 'undefined';
96
-
97
- function cloneObject(data) {
98
- let copy;
99
- const isArray = Array.isArray(data);
100
- const isFileListInstance = typeof FileList !== 'undefined' ? data instanceof FileList : false;
101
- if (data instanceof Date) {
102
- copy = new Date(data);
103
- }
104
- else if (!(isWeb && (data instanceof Blob || isFileListInstance)) &&
105
- (isArray || isObject(data))) {
106
- copy = isArray ? [] : {};
107
- if (!isArray && !isPlainObject(data)) {
108
- copy = data;
109
- }
110
- else {
111
- for (const key in data) {
112
- if (data.hasOwnProperty(key)) {
113
- copy[key] = cloneObject(data[key]);
114
- }
115
- }
116
- }
117
- }
118
- else {
119
- return data;
120
- }
121
- return copy;
122
- }
123
-
124
- var isKey = (value) => /^\w*$/.test(value);
125
-
126
- var isUndefined = (val) => val === undefined;
127
-
128
- var compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];
129
-
130
- var stringToPath = (input) => compact(input.replace(/["|']|\]/g, '').split(/\.|\[/));
131
-
132
- var get = (object, path, defaultValue) => {
133
- if (!path || !isObject(object)) {
134
- return defaultValue;
135
- }
136
- const result = (isKey(path) ? [path] : stringToPath(path)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], object);
137
- return isUndefined(result) || result === object
138
- ? isUndefined(object[path])
139
- ? defaultValue
140
- : object[path]
141
- : result;
142
- };
143
-
144
- var isBoolean = (value) => typeof value === 'boolean';
145
-
146
- var set = (object, path, value) => {
147
- let index = -1;
148
- const tempPath = isKey(path) ? [path] : stringToPath(path);
149
- const length = tempPath.length;
150
- const lastIndex = length - 1;
151
- while (++index < length) {
152
- const key = tempPath[index];
153
- let newValue = value;
154
- if (index !== lastIndex) {
155
- const objValue = object[key];
156
- newValue =
157
- isObject(objValue) || Array.isArray(objValue)
158
- ? objValue
159
- : !isNaN(+tempPath[index + 1])
160
- ? []
161
- : {};
162
- }
163
- if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
164
- return;
165
- }
166
- object[key] = newValue;
167
- object = object[key];
168
- }
169
- };
170
-
171
- const EVENTS = {
172
- BLUR: 'blur',
173
- FOCUS_OUT: 'focusout',
174
- CHANGE: 'change',
175
- };
176
- const VALIDATION_MODE = {
177
- onBlur: 'onBlur',
178
- onChange: 'onChange',
179
- onSubmit: 'onSubmit',
180
- onTouched: 'onTouched',
181
- all: 'all',
182
- };
183
- const INPUT_VALIDATION_RULES = {
184
- max: 'max',
185
- min: 'min',
186
- maxLength: 'maxLength',
187
- minLength: 'minLength',
188
- pattern: 'pattern',
189
- required: 'required',
190
- validate: 'validate',
191
- };
192
-
193
- const HookFormContext = React__default.createContext(null);
194
- HookFormContext.displayName = 'HookFormContext';
195
- /**
196
- * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.
197
- *
198
- * @remarks
199
- * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)
200
- *
201
- * @returns return all useForm methods
202
- *
203
- * @example
204
- * ```tsx
205
- * function App() {
206
- * const methods = useForm();
207
- * const onSubmit = data => console.log(data);
208
- *
209
- * return (
210
- * <FormProvider {...methods} >
211
- * <form onSubmit={methods.handleSubmit(onSubmit)}>
212
- * <NestedInput />
213
- * <input type="submit" />
214
- * </form>
215
- * </FormProvider>
216
- * );
217
- * }
218
- *
219
- * function NestedInput() {
220
- * const { register } = useFormContext(); // retrieve all hook methods
221
- * return <input {...register("test")} />;
222
- * }
223
- * ```
224
- */
225
- const useFormContext = () => React__default.useContext(HookFormContext);
226
-
227
- var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
228
- const result = {
229
- defaultValues: control._defaultValues,
230
- };
231
- for (const key in formState) {
232
- Object.defineProperty(result, key, {
233
- get: () => {
234
- const _key = key;
235
- if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {
236
- control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;
237
- }
238
- localProxyFormState && (localProxyFormState[_key] = true);
239
- return formState[_key];
240
- },
241
- });
242
- }
243
- return result;
244
- };
245
-
246
- const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
247
-
248
- /**
249
- * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.
250
- *
251
- * @remarks
252
- * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)
253
- *
254
- * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}
255
- *
256
- * @example
257
- * ```tsx
258
- * function App() {
259
- * const { register, handleSubmit, control } = useForm({
260
- * defaultValues: {
261
- * firstName: "firstName"
262
- * }});
263
- * const { dirtyFields } = useFormState({
264
- * control
265
- * });
266
- * const onSubmit = (data) => console.log(data);
267
- *
268
- * return (
269
- * <form onSubmit={handleSubmit(onSubmit)}>
270
- * <input {...register("firstName")} placeholder="First Name" />
271
- * {dirtyFields.firstName && <p>Field is dirty.</p>}
272
- * <input type="submit" />
273
- * </form>
274
- * );
275
- * }
276
- * ```
277
- */
278
- function useFormState(props) {
279
- const methods = useFormContext();
280
- const { control = methods.control, disabled, name, exact } = props || {};
281
- const [formState, updateFormState] = React__default.useState(control._formState);
282
- const _localProxyFormState = React__default.useRef({
283
- isDirty: false,
284
- isLoading: false,
285
- dirtyFields: false,
286
- touchedFields: false,
287
- validatingFields: false,
288
- isValidating: false,
289
- isValid: false,
290
- errors: false,
291
- });
292
- useIsomorphicLayoutEffect(() => control._subscribe({
293
- name,
294
- formState: _localProxyFormState.current,
295
- exact,
296
- callback: (formState) => {
297
- !disabled &&
298
- updateFormState({
299
- ...control._formState,
300
- ...formState,
301
- });
302
- },
303
- }), [name, disabled, exact]);
304
- React__default.useEffect(() => {
305
- _localProxyFormState.current.isValid && control._setValid(true);
306
- }, [control]);
307
- return React__default.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);
308
- }
309
-
310
- var isString = (value) => typeof value === 'string';
311
-
312
- var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {
313
- if (isString(names)) {
314
- isGlobal && _names.watch.add(names);
315
- return get(formValues, names, defaultValue);
316
- }
317
- if (Array.isArray(names)) {
318
- return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName),
319
- get(formValues, fieldName)));
320
- }
321
- isGlobal && (_names.watchAll = true);
322
- return formValues;
323
- };
324
-
325
- /**
326
- * Custom hook to subscribe to field change and isolate re-rendering at the component level.
327
- *
328
- * @remarks
329
- *
330
- * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)
331
- *
332
- * @example
333
- * ```tsx
334
- * const { control } = useForm();
335
- * const values = useWatch({
336
- * name: "fieldName"
337
- * control,
338
- * })
339
- * ```
340
- */
341
- function useWatch(props) {
342
- const methods = useFormContext();
343
- const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};
344
- const _defaultValue = React__default.useRef(defaultValue);
345
- const [value, updateValue] = React__default.useState(control._getWatch(name, _defaultValue.current));
346
- useIsomorphicLayoutEffect(() => control._subscribe({
347
- name,
348
- formState: {
349
- values: true,
350
- },
351
- exact,
352
- callback: (formState) => !disabled &&
353
- updateValue(generateWatchOutput(name, control._names, formState.values || control._formValues, false, _defaultValue.current)),
354
- }), [name, control, disabled, exact]);
355
- React__default.useEffect(() => control._removeUnmounted());
356
- return value;
357
- }
358
-
359
- /**
360
- * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.
361
- *
362
- * @remarks
363
- * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)
364
- *
365
- * @param props - the path name to the form field value, and validation rules.
366
- *
367
- * @returns field properties, field and form state. {@link UseControllerReturn}
368
- *
369
- * @example
370
- * ```tsx
371
- * function Input(props) {
372
- * const { field, fieldState, formState } = useController(props);
373
- * return (
374
- * <div>
375
- * <input {...field} placeholder={props.name} />
376
- * <p>{fieldState.isTouched && "Touched"}</p>
377
- * <p>{formState.isSubmitted ? "submitted" : ""}</p>
378
- * </div>
379
- * );
380
- * }
381
- * ```
382
- */
383
- function useController(props) {
384
- const methods = useFormContext();
385
- const { name, disabled, control = methods.control, shouldUnregister } = props;
386
- const isArrayField = isNameInFieldArray(control._names.array, name);
387
- const value = useWatch({
388
- control,
389
- name,
390
- defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),
391
- exact: true,
392
- });
393
- const formState = useFormState({
394
- control,
395
- name,
396
- exact: true,
397
- });
398
- const _props = React__default.useRef(props);
399
- const _registerProps = React__default.useRef(control.register(name, {
400
- ...props.rules,
401
- value,
402
- ...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),
403
- }));
404
- const fieldState = React__default.useMemo(() => Object.defineProperties({}, {
405
- invalid: {
406
- enumerable: true,
407
- get: () => !!get(formState.errors, name),
408
- },
409
- isDirty: {
410
- enumerable: true,
411
- get: () => !!get(formState.dirtyFields, name),
412
- },
413
- isTouched: {
414
- enumerable: true,
415
- get: () => !!get(formState.touchedFields, name),
416
- },
417
- isValidating: {
418
- enumerable: true,
419
- get: () => !!get(formState.validatingFields, name),
420
- },
421
- error: {
422
- enumerable: true,
423
- get: () => get(formState.errors, name),
424
- },
425
- }), [formState, name]);
426
- const onChange = React__default.useCallback((event) => _registerProps.current.onChange({
427
- target: {
428
- value: getEventValue(event),
429
- name: name,
430
- },
431
- type: EVENTS.CHANGE,
432
- }), [name]);
433
- const onBlur = React__default.useCallback(() => _registerProps.current.onBlur({
434
- target: {
435
- value: get(control._formValues, name),
436
- name: name,
437
- },
438
- type: EVENTS.BLUR,
439
- }), [name, control._formValues]);
440
- const ref = React__default.useCallback((elm) => {
441
- const field = get(control._fields, name);
442
- if (field && elm) {
443
- field._f.ref = {
444
- focus: () => elm.focus && elm.focus(),
445
- select: () => elm.select && elm.select(),
446
- setCustomValidity: (message) => elm.setCustomValidity(message),
447
- reportValidity: () => elm.reportValidity(),
448
- };
449
- }
450
- }, [control._fields, name]);
451
- const field = React__default.useMemo(() => ({
452
- name,
453
- value,
454
- ...(isBoolean(disabled) || formState.disabled
455
- ? { disabled: formState.disabled || disabled }
456
- : {}),
457
- onChange,
458
- onBlur,
459
- ref,
460
- }), [name, disabled, formState.disabled, onChange, onBlur, ref, value]);
461
- React__default.useEffect(() => {
462
- const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;
463
- control.register(name, {
464
- ..._props.current.rules,
465
- ...(isBoolean(_props.current.disabled)
466
- ? { disabled: _props.current.disabled }
467
- : {}),
468
- });
469
- const updateMounted = (name, value) => {
470
- const field = get(control._fields, name);
471
- if (field && field._f) {
472
- field._f.mount = value;
473
- }
474
- };
475
- updateMounted(name, true);
476
- if (_shouldUnregisterField) {
477
- const value = cloneObject(get(control._options.defaultValues, name));
478
- set(control._defaultValues, name, value);
479
- if (isUndefined(get(control._formValues, name))) {
480
- set(control._formValues, name, value);
481
- }
482
- }
483
- !isArrayField && control.register(name);
484
- return () => {
485
- (isArrayField
486
- ? _shouldUnregisterField && !control._state.action
487
- : _shouldUnregisterField)
488
- ? control.unregister(name)
489
- : updateMounted(name, false);
490
- };
491
- }, [name, control, isArrayField, shouldUnregister]);
492
- React__default.useEffect(() => {
493
- control._setDisabledField({
494
- disabled,
495
- name,
496
- });
497
- }, [disabled, name, control]);
498
- return React__default.useMemo(() => ({
499
- field,
500
- formState,
501
- fieldState,
502
- }), [field, formState, fieldState]);
503
- }
504
-
505
- var appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria
506
- ? {
507
- ...errors[name],
508
- types: {
509
- ...(errors[name] && errors[name].types ? errors[name].types : {}),
510
- [type]: message || true,
511
- },
512
- }
513
- : {};
514
-
515
- var convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);
516
-
517
- var createSubject = () => {
518
- let _observers = [];
519
- const next = (value) => {
520
- for (const observer of _observers) {
521
- observer.next && observer.next(value);
522
- }
523
- };
524
- const subscribe = (observer) => {
525
- _observers.push(observer);
526
- return {
527
- unsubscribe: () => {
528
- _observers = _observers.filter((o) => o !== observer);
529
- },
530
- };
531
- };
532
- const unsubscribe = () => {
533
- _observers = [];
534
- };
535
- return {
536
- get observers() {
537
- return _observers;
538
- },
539
- next,
540
- subscribe,
541
- unsubscribe,
542
- };
543
- };
544
-
545
- var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
546
-
547
- function deepEqual(object1, object2, _internal_visited = new WeakSet()) {
548
- if (isPrimitive(object1) || isPrimitive(object2)) {
549
- return object1 === object2;
550
- }
551
- if (isDateObject(object1) && isDateObject(object2)) {
552
- return object1.getTime() === object2.getTime();
553
- }
554
- const keys1 = Object.keys(object1);
555
- const keys2 = Object.keys(object2);
556
- if (keys1.length !== keys2.length) {
557
- return false;
558
- }
559
- if (_internal_visited.has(object1) || _internal_visited.has(object2)) {
560
- return true;
561
- }
562
- _internal_visited.add(object1);
563
- _internal_visited.add(object2);
564
- for (const key of keys1) {
565
- const val1 = object1[key];
566
- if (!keys2.includes(key)) {
567
- return false;
568
- }
569
- if (key !== 'ref') {
570
- const val2 = object2[key];
571
- if ((isDateObject(val1) && isDateObject(val2)) ||
572
- (isObject(val1) && isObject(val2)) ||
573
- (Array.isArray(val1) && Array.isArray(val2))
574
- ? !deepEqual(val1, val2, _internal_visited)
575
- : val1 !== val2) {
576
- return false;
577
- }
578
- }
579
- }
580
- return true;
581
- }
582
-
583
- var isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;
584
-
585
- var isFileInput = (element) => element.type === 'file';
586
-
587
- var isFunction = (value) => typeof value === 'function';
588
-
589
- var isHTMLElement = (value) => {
590
- if (!isWeb) {
591
- return false;
592
- }
593
- const owner = value ? value.ownerDocument : 0;
594
- return (value instanceof
595
- (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement));
596
- };
597
-
598
- var isMultipleSelect = (element) => element.type === `select-multiple`;
599
-
600
- var isRadioInput = (element) => element.type === 'radio';
601
-
602
- var isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);
603
-
604
- var live = (ref) => isHTMLElement(ref) && ref.isConnected;
605
-
606
- function baseGet(object, updatePath) {
607
- const length = updatePath.slice(0, -1).length;
608
- let index = 0;
609
- while (index < length) {
610
- object = isUndefined(object) ? index++ : object[updatePath[index++]];
611
- }
612
- return object;
613
- }
614
- function isEmptyArray(obj) {
615
- for (const key in obj) {
616
- if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {
617
- return false;
618
- }
619
- }
620
- return true;
621
- }
622
- function unset(object, path) {
623
- const paths = Array.isArray(path)
624
- ? path
625
- : isKey(path)
626
- ? [path]
627
- : stringToPath(path);
628
- const childObject = paths.length === 1 ? object : baseGet(object, paths);
629
- const index = paths.length - 1;
630
- const key = paths[index];
631
- if (childObject) {
632
- delete childObject[key];
633
- }
634
- if (index !== 0 &&
635
- ((isObject(childObject) && isEmptyObject(childObject)) ||
636
- (Array.isArray(childObject) && isEmptyArray(childObject)))) {
637
- unset(object, paths.slice(0, -1));
638
- }
639
- return object;
640
- }
641
-
642
- var objectHasFunction = (data) => {
643
- for (const key in data) {
644
- if (isFunction(data[key])) {
645
- return true;
646
- }
647
- }
648
- return false;
649
- };
650
-
651
- function markFieldsDirty(data, fields = {}) {
652
- const isParentNodeArray = Array.isArray(data);
653
- if (isObject(data) || isParentNodeArray) {
654
- for (const key in data) {
655
- if (Array.isArray(data[key]) ||
656
- (isObject(data[key]) && !objectHasFunction(data[key]))) {
657
- fields[key] = Array.isArray(data[key]) ? [] : {};
658
- markFieldsDirty(data[key], fields[key]);
659
- }
660
- else if (!isNullOrUndefined(data[key])) {
661
- fields[key] = true;
662
- }
663
- }
664
- }
665
- return fields;
666
- }
667
- function getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) {
668
- const isParentNodeArray = Array.isArray(data);
669
- if (isObject(data) || isParentNodeArray) {
670
- for (const key in data) {
671
- if (Array.isArray(data[key]) ||
672
- (isObject(data[key]) && !objectHasFunction(data[key]))) {
673
- if (isUndefined(formValues) ||
674
- isPrimitive(dirtyFieldsFromValues[key])) {
675
- dirtyFieldsFromValues[key] = Array.isArray(data[key])
676
- ? markFieldsDirty(data[key], [])
677
- : { ...markFieldsDirty(data[key]) };
678
- }
679
- else {
680
- getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);
681
- }
682
- }
683
- else {
684
- dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);
685
- }
686
- }
687
- }
688
- return dirtyFieldsFromValues;
689
- }
690
- var getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));
691
-
692
- const defaultResult = {
693
- value: false,
694
- isValid: false,
695
- };
696
- const validResult = { value: true, isValid: true };
697
- var getCheckboxValue = (options) => {
698
- if (Array.isArray(options)) {
699
- if (options.length > 1) {
700
- const values = options
701
- .filter((option) => option && option.checked && !option.disabled)
702
- .map((option) => option.value);
703
- return { value: values, isValid: !!values.length };
704
- }
705
- return options[0].checked && !options[0].disabled
706
- ? // @ts-expect-error expected to work in the browser
707
- options[0].attributes && !isUndefined(options[0].attributes.value)
708
- ? isUndefined(options[0].value) || options[0].value === ''
709
- ? validResult
710
- : { value: options[0].value, isValid: true }
711
- : validResult
712
- : defaultResult;
713
- }
714
- return defaultResult;
715
- };
716
-
717
- var getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)
718
- ? value
719
- : valueAsNumber
720
- ? value === ''
721
- ? NaN
722
- : value
723
- ? +value
724
- : value
725
- : valueAsDate && isString(value)
726
- ? new Date(value)
727
- : setValueAs
728
- ? setValueAs(value)
729
- : value;
730
-
731
- const defaultReturn = {
732
- isValid: false,
733
- value: null,
734
- };
735
- var getRadioValue = (options) => Array.isArray(options)
736
- ? options.reduce((previous, option) => option && option.checked && !option.disabled
737
- ? {
738
- isValid: true,
739
- value: option.value,
740
- }
741
- : previous, defaultReturn)
742
- : defaultReturn;
743
-
744
- function getFieldValue(_f) {
745
- const ref = _f.ref;
746
- if (isFileInput(ref)) {
747
- return ref.files;
748
- }
749
- if (isRadioInput(ref)) {
750
- return getRadioValue(_f.refs).value;
751
- }
752
- if (isMultipleSelect(ref)) {
753
- return [...ref.selectedOptions].map(({ value }) => value);
754
- }
755
- if (isCheckBoxInput(ref)) {
756
- return getCheckboxValue(_f.refs).value;
757
- }
758
- return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);
759
- }
760
-
761
- var getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {
762
- const fields = {};
763
- for (const name of fieldsNames) {
764
- const field = get(_fields, name);
765
- field && set(fields, name, field._f);
766
- }
767
- return {
768
- criteriaMode,
769
- names: [...fieldsNames],
770
- fields,
771
- shouldUseNativeValidation,
772
- };
773
- };
774
-
775
- var isRegex = (value) => value instanceof RegExp;
776
-
777
- var getRuleValue = (rule) => isUndefined(rule)
778
- ? rule
779
- : isRegex(rule)
780
- ? rule.source
781
- : isObject(rule)
782
- ? isRegex(rule.value)
783
- ? rule.value.source
784
- : rule.value
785
- : rule;
786
-
787
- var getValidationModes = (mode) => ({
788
- isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,
789
- isOnBlur: mode === VALIDATION_MODE.onBlur,
790
- isOnChange: mode === VALIDATION_MODE.onChange,
791
- isOnAll: mode === VALIDATION_MODE.all,
792
- isOnTouch: mode === VALIDATION_MODE.onTouched,
793
- });
794
-
795
- const ASYNC_FUNCTION = 'AsyncFunction';
796
- var hasPromiseValidation = (fieldReference) => !!fieldReference &&
797
- !!fieldReference.validate &&
798
- !!((isFunction(fieldReference.validate) &&
799
- fieldReference.validate.constructor.name === ASYNC_FUNCTION) ||
800
- (isObject(fieldReference.validate) &&
801
- Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION)));
802
-
803
- var hasValidation = (options) => options.mount &&
804
- (options.required ||
805
- options.min ||
806
- options.max ||
807
- options.maxLength ||
808
- options.minLength ||
809
- options.pattern ||
810
- options.validate);
811
-
812
- var isWatched = (name, _names, isBlurEvent) => !isBlurEvent &&
813
- (_names.watchAll ||
814
- _names.watch.has(name) ||
815
- [..._names.watch].some((watchName) => name.startsWith(watchName) &&
816
- /^\.\w+/.test(name.slice(watchName.length))));
817
-
818
- const iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {
819
- for (const key of fieldsNames || Object.keys(fields)) {
820
- const field = get(fields, key);
821
- if (field) {
822
- const { _f, ...currentField } = field;
823
- if (_f) {
824
- if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) {
825
- return true;
826
- }
827
- else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) {
828
- return true;
829
- }
830
- else {
831
- if (iterateFieldsByAction(currentField, action)) {
832
- break;
833
- }
834
- }
835
- }
836
- else if (isObject(currentField)) {
837
- if (iterateFieldsByAction(currentField, action)) {
838
- break;
839
- }
840
- }
841
- }
842
- }
843
- return;
844
- };
845
-
846
- function schemaErrorLookup(errors, _fields, name) {
847
- const error = get(errors, name);
848
- if (error || isKey(name)) {
849
- return {
850
- error,
851
- name,
852
- };
853
- }
854
- const names = name.split('.');
855
- while (names.length) {
856
- const fieldName = names.join('.');
857
- const field = get(_fields, fieldName);
858
- const foundError = get(errors, fieldName);
859
- if (field && !Array.isArray(field) && name !== fieldName) {
860
- return { name };
861
- }
862
- if (foundError && foundError.type) {
863
- return {
864
- name: fieldName,
865
- error: foundError,
866
- };
867
- }
868
- if (foundError && foundError.root && foundError.root.type) {
869
- return {
870
- name: `${fieldName}.root`,
871
- error: foundError.root,
872
- };
873
- }
874
- names.pop();
875
- }
876
- return {
877
- name,
878
- };
879
- }
880
-
881
- var shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {
882
- updateFormState(formStateData);
883
- const { name, ...formState } = formStateData;
884
- return (isEmptyObject(formState) ||
885
- Object.keys(formState).length >= Object.keys(_proxyFormState).length ||
886
- Object.keys(formState).find((key) => _proxyFormState[key] ===
887
- (!isRoot || VALIDATION_MODE.all)));
888
- };
889
-
890
- var shouldSubscribeByName = (name, signalName, exact) => !name ||
891
- !signalName ||
892
- name === signalName ||
893
- convertToArrayPayload(name).some((currentName) => currentName &&
894
- (exact
895
- ? currentName === signalName
896
- : currentName.startsWith(signalName) ||
897
- signalName.startsWith(currentName)));
898
-
899
- var skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {
900
- if (mode.isOnAll) {
901
- return false;
902
- }
903
- else if (!isSubmitted && mode.isOnTouch) {
904
- return !(isTouched || isBlurEvent);
905
- }
906
- else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {
907
- return !isBlurEvent;
908
- }
909
- else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {
910
- return isBlurEvent;
911
- }
912
- return true;
913
- };
914
-
915
- var unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);
916
-
917
- var updateFieldArrayRootError = (errors, error, name) => {
918
- const fieldArrayErrors = convertToArrayPayload(get(errors, name));
919
- set(fieldArrayErrors, 'root', error[name]);
920
- set(errors, name, fieldArrayErrors);
921
- return errors;
922
- };
923
-
924
- var isMessage = (value) => isString(value);
925
-
926
- function getValidateError(result, ref, type = 'validate') {
927
- if (isMessage(result) ||
928
- (Array.isArray(result) && result.every(isMessage)) ||
929
- (isBoolean(result) && !result)) {
930
- return {
931
- type,
932
- message: isMessage(result) ? result : '',
933
- ref,
934
- };
935
- }
936
- }
937
-
938
- var getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)
939
- ? validationData
940
- : {
941
- value: validationData,
942
- message: '',
943
- };
944
-
945
- var validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {
946
- const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, } = field._f;
947
- const inputValue = get(formValues, name);
948
- if (!mount || disabledFieldNames.has(name)) {
949
- return {};
950
- }
951
- const inputRef = refs ? refs[0] : ref;
952
- const setCustomValidity = (message) => {
953
- if (shouldUseNativeValidation && inputRef.reportValidity) {
954
- inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');
955
- inputRef.reportValidity();
956
- }
957
- };
958
- const error = {};
959
- const isRadio = isRadioInput(ref);
960
- const isCheckBox = isCheckBoxInput(ref);
961
- const isRadioOrCheckbox = isRadio || isCheckBox;
962
- const isEmpty = ((valueAsNumber || isFileInput(ref)) &&
963
- isUndefined(ref.value) &&
964
- isUndefined(inputValue)) ||
965
- (isHTMLElement(ref) && ref.value === '') ||
966
- inputValue === '' ||
967
- (Array.isArray(inputValue) && !inputValue.length);
968
- const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);
969
- const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {
970
- const message = exceedMax ? maxLengthMessage : minLengthMessage;
971
- error[name] = {
972
- type: exceedMax ? maxType : minType,
973
- message,
974
- ref,
975
- ...appendErrorsCurry(exceedMax ? maxType : minType, message),
976
- };
977
- };
978
- if (isFieldArray
979
- ? !Array.isArray(inputValue) || !inputValue.length
980
- : required &&
981
- ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||
982
- (isBoolean(inputValue) && !inputValue) ||
983
- (isCheckBox && !getCheckboxValue(refs).isValid) ||
984
- (isRadio && !getRadioValue(refs).isValid))) {
985
- const { value, message } = isMessage(required)
986
- ? { value: !!required, message: required }
987
- : getValueAndMessage(required);
988
- if (value) {
989
- error[name] = {
990
- type: INPUT_VALIDATION_RULES.required,
991
- message,
992
- ref: inputRef,
993
- ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),
994
- };
995
- if (!validateAllFieldCriteria) {
996
- setCustomValidity(message);
997
- return error;
998
- }
999
- }
1000
- }
1001
- if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {
1002
- let exceedMax;
1003
- let exceedMin;
1004
- const maxOutput = getValueAndMessage(max);
1005
- const minOutput = getValueAndMessage(min);
1006
- if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {
1007
- const valueNumber = ref.valueAsNumber ||
1008
- (inputValue ? +inputValue : inputValue);
1009
- if (!isNullOrUndefined(maxOutput.value)) {
1010
- exceedMax = valueNumber > maxOutput.value;
1011
- }
1012
- if (!isNullOrUndefined(minOutput.value)) {
1013
- exceedMin = valueNumber < minOutput.value;
1014
- }
1015
- }
1016
- else {
1017
- const valueDate = ref.valueAsDate || new Date(inputValue);
1018
- const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);
1019
- const isTime = ref.type == 'time';
1020
- const isWeek = ref.type == 'week';
1021
- if (isString(maxOutput.value) && inputValue) {
1022
- exceedMax = isTime
1023
- ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)
1024
- : isWeek
1025
- ? inputValue > maxOutput.value
1026
- : valueDate > new Date(maxOutput.value);
1027
- }
1028
- if (isString(minOutput.value) && inputValue) {
1029
- exceedMin = isTime
1030
- ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)
1031
- : isWeek
1032
- ? inputValue < minOutput.value
1033
- : valueDate < new Date(minOutput.value);
1034
- }
1035
- }
1036
- if (exceedMax || exceedMin) {
1037
- getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);
1038
- if (!validateAllFieldCriteria) {
1039
- setCustomValidity(error[name].message);
1040
- return error;
1041
- }
1042
- }
1043
- }
1044
- if ((maxLength || minLength) &&
1045
- !isEmpty &&
1046
- (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {
1047
- const maxLengthOutput = getValueAndMessage(maxLength);
1048
- const minLengthOutput = getValueAndMessage(minLength);
1049
- const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&
1050
- inputValue.length > +maxLengthOutput.value;
1051
- const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&
1052
- inputValue.length < +minLengthOutput.value;
1053
- if (exceedMax || exceedMin) {
1054
- getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);
1055
- if (!validateAllFieldCriteria) {
1056
- setCustomValidity(error[name].message);
1057
- return error;
1058
- }
1059
- }
1060
- }
1061
- if (pattern && !isEmpty && isString(inputValue)) {
1062
- const { value: patternValue, message } = getValueAndMessage(pattern);
1063
- if (isRegex(patternValue) && !inputValue.match(patternValue)) {
1064
- error[name] = {
1065
- type: INPUT_VALIDATION_RULES.pattern,
1066
- message,
1067
- ref,
1068
- ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),
1069
- };
1070
- if (!validateAllFieldCriteria) {
1071
- setCustomValidity(message);
1072
- return error;
1073
- }
1074
- }
1075
- }
1076
- if (validate) {
1077
- if (isFunction(validate)) {
1078
- const result = await validate(inputValue, formValues);
1079
- const validateError = getValidateError(result, inputRef);
1080
- if (validateError) {
1081
- error[name] = {
1082
- ...validateError,
1083
- ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message),
1084
- };
1085
- if (!validateAllFieldCriteria) {
1086
- setCustomValidity(validateError.message);
1087
- return error;
1088
- }
1089
- }
1090
- }
1091
- else if (isObject(validate)) {
1092
- let validationResult = {};
1093
- for (const key in validate) {
1094
- if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {
1095
- break;
1096
- }
1097
- const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);
1098
- if (validateError) {
1099
- validationResult = {
1100
- ...validateError,
1101
- ...appendErrorsCurry(key, validateError.message),
1102
- };
1103
- setCustomValidity(validateError.message);
1104
- if (validateAllFieldCriteria) {
1105
- error[name] = validationResult;
1106
- }
1107
- }
1108
- }
1109
- if (!isEmptyObject(validationResult)) {
1110
- error[name] = {
1111
- ref: inputRef,
1112
- ...validationResult,
1113
- };
1114
- if (!validateAllFieldCriteria) {
1115
- return error;
1116
- }
1117
- }
1118
- }
1119
- }
1120
- setCustomValidity(true);
1121
- return error;
1122
- };
1123
-
1124
- const defaultOptions = {
1125
- mode: VALIDATION_MODE.onSubmit,
1126
- reValidateMode: VALIDATION_MODE.onChange,
1127
- shouldFocusError: true,
1128
- };
1129
- function createFormControl(props = {}) {
1130
- let _options = {
1131
- ...defaultOptions,
1132
- ...props,
1133
- };
1134
- let _formState = {
1135
- submitCount: 0,
1136
- isDirty: false,
1137
- isReady: false,
1138
- isLoading: isFunction(_options.defaultValues),
1139
- isValidating: false,
1140
- isSubmitted: false,
1141
- isSubmitting: false,
1142
- isSubmitSuccessful: false,
1143
- isValid: false,
1144
- touchedFields: {},
1145
- dirtyFields: {},
1146
- validatingFields: {},
1147
- errors: _options.errors || {},
1148
- disabled: _options.disabled || false,
1149
- };
1150
- let _fields = {};
1151
- let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)
1152
- ? cloneObject(_options.defaultValues || _options.values) || {}
1153
- : {};
1154
- let _formValues = _options.shouldUnregister
1155
- ? {}
1156
- : cloneObject(_defaultValues);
1157
- let _state = {
1158
- action: false,
1159
- mount: false,
1160
- watch: false,
1161
- };
1162
- let _names = {
1163
- mount: new Set(),
1164
- disabled: new Set(),
1165
- unMount: new Set(),
1166
- array: new Set(),
1167
- watch: new Set(),
1168
- };
1169
- let delayErrorCallback;
1170
- let timer = 0;
1171
- const _proxyFormState = {
1172
- isDirty: false,
1173
- dirtyFields: false,
1174
- validatingFields: false,
1175
- touchedFields: false,
1176
- isValidating: false,
1177
- isValid: false,
1178
- errors: false,
1179
- };
1180
- let _proxySubscribeFormState = {
1181
- ..._proxyFormState,
1182
- };
1183
- const _subjects = {
1184
- array: createSubject(),
1185
- state: createSubject(),
1186
- };
1187
- const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;
1188
- const debounce = (callback) => (wait) => {
1189
- clearTimeout(timer);
1190
- timer = setTimeout(callback, wait);
1191
- };
1192
- const _setValid = async (shouldUpdateValid) => {
1193
- if (!_options.disabled &&
1194
- (_proxyFormState.isValid ||
1195
- _proxySubscribeFormState.isValid ||
1196
- shouldUpdateValid)) {
1197
- const isValid = _options.resolver
1198
- ? isEmptyObject((await _runSchema()).errors)
1199
- : await executeBuiltInValidation(_fields, true);
1200
- if (isValid !== _formState.isValid) {
1201
- _subjects.state.next({
1202
- isValid,
1203
- });
1204
- }
1205
- }
1206
- };
1207
- const _updateIsValidating = (names, isValidating) => {
1208
- if (!_options.disabled &&
1209
- (_proxyFormState.isValidating ||
1210
- _proxyFormState.validatingFields ||
1211
- _proxySubscribeFormState.isValidating ||
1212
- _proxySubscribeFormState.validatingFields)) {
1213
- (names || Array.from(_names.mount)).forEach((name) => {
1214
- if (name) {
1215
- isValidating
1216
- ? set(_formState.validatingFields, name, isValidating)
1217
- : unset(_formState.validatingFields, name);
1218
- }
1219
- });
1220
- _subjects.state.next({
1221
- validatingFields: _formState.validatingFields,
1222
- isValidating: !isEmptyObject(_formState.validatingFields),
1223
- });
1224
- }
1225
- };
1226
- const _setFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {
1227
- if (args && method && !_options.disabled) {
1228
- _state.action = true;
1229
- if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {
1230
- const fieldValues = method(get(_fields, name), args.argA, args.argB);
1231
- shouldSetValues && set(_fields, name, fieldValues);
1232
- }
1233
- if (shouldUpdateFieldsAndState &&
1234
- Array.isArray(get(_formState.errors, name))) {
1235
- const errors = method(get(_formState.errors, name), args.argA, args.argB);
1236
- shouldSetValues && set(_formState.errors, name, errors);
1237
- unsetEmptyArray(_formState.errors, name);
1238
- }
1239
- if ((_proxyFormState.touchedFields ||
1240
- _proxySubscribeFormState.touchedFields) &&
1241
- shouldUpdateFieldsAndState &&
1242
- Array.isArray(get(_formState.touchedFields, name))) {
1243
- const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);
1244
- shouldSetValues && set(_formState.touchedFields, name, touchedFields);
1245
- }
1246
- if (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) {
1247
- _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);
1248
- }
1249
- _subjects.state.next({
1250
- name,
1251
- isDirty: _getDirty(name, values),
1252
- dirtyFields: _formState.dirtyFields,
1253
- errors: _formState.errors,
1254
- isValid: _formState.isValid,
1255
- });
1256
- }
1257
- else {
1258
- set(_formValues, name, values);
1259
- }
1260
- };
1261
- const updateErrors = (name, error) => {
1262
- set(_formState.errors, name, error);
1263
- _subjects.state.next({
1264
- errors: _formState.errors,
1265
- });
1266
- };
1267
- const _setErrors = (errors) => {
1268
- _formState.errors = errors;
1269
- _subjects.state.next({
1270
- errors: _formState.errors,
1271
- isValid: false,
1272
- });
1273
- };
1274
- const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {
1275
- const field = get(_fields, name);
1276
- if (field) {
1277
- const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);
1278
- isUndefined(defaultValue) ||
1279
- (ref && ref.defaultChecked) ||
1280
- shouldSkipSetValueAs
1281
- ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))
1282
- : setFieldValue(name, defaultValue);
1283
- _state.mount && _setValid();
1284
- }
1285
- };
1286
- const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {
1287
- let shouldUpdateField = false;
1288
- let isPreviousDirty = false;
1289
- const output = {
1290
- name,
1291
- };
1292
- if (!_options.disabled) {
1293
- if (!isBlurEvent || shouldDirty) {
1294
- if (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty) {
1295
- isPreviousDirty = _formState.isDirty;
1296
- _formState.isDirty = output.isDirty = _getDirty();
1297
- shouldUpdateField = isPreviousDirty !== output.isDirty;
1298
- }
1299
- const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);
1300
- isPreviousDirty = !!get(_formState.dirtyFields, name);
1301
- isCurrentFieldPristine
1302
- ? unset(_formState.dirtyFields, name)
1303
- : set(_formState.dirtyFields, name, true);
1304
- output.dirtyFields = _formState.dirtyFields;
1305
- shouldUpdateField =
1306
- shouldUpdateField ||
1307
- ((_proxyFormState.dirtyFields ||
1308
- _proxySubscribeFormState.dirtyFields) &&
1309
- isPreviousDirty !== !isCurrentFieldPristine);
1310
- }
1311
- if (isBlurEvent) {
1312
- const isPreviousFieldTouched = get(_formState.touchedFields, name);
1313
- if (!isPreviousFieldTouched) {
1314
- set(_formState.touchedFields, name, isBlurEvent);
1315
- output.touchedFields = _formState.touchedFields;
1316
- shouldUpdateField =
1317
- shouldUpdateField ||
1318
- ((_proxyFormState.touchedFields ||
1319
- _proxySubscribeFormState.touchedFields) &&
1320
- isPreviousFieldTouched !== isBlurEvent);
1321
- }
1322
- }
1323
- shouldUpdateField && shouldRender && _subjects.state.next(output);
1324
- }
1325
- return shouldUpdateField ? output : {};
1326
- };
1327
- const shouldRenderByError = (name, isValid, error, fieldState) => {
1328
- const previousFieldError = get(_formState.errors, name);
1329
- const shouldUpdateValid = (_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&
1330
- isBoolean(isValid) &&
1331
- _formState.isValid !== isValid;
1332
- if (_options.delayError && error) {
1333
- delayErrorCallback = debounce(() => updateErrors(name, error));
1334
- delayErrorCallback(_options.delayError);
1335
- }
1336
- else {
1337
- clearTimeout(timer);
1338
- delayErrorCallback = null;
1339
- error
1340
- ? set(_formState.errors, name, error)
1341
- : unset(_formState.errors, name);
1342
- }
1343
- if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||
1344
- !isEmptyObject(fieldState) ||
1345
- shouldUpdateValid) {
1346
- const updatedFormState = {
1347
- ...fieldState,
1348
- ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),
1349
- errors: _formState.errors,
1350
- name,
1351
- };
1352
- _formState = {
1353
- ..._formState,
1354
- ...updatedFormState,
1355
- };
1356
- _subjects.state.next(updatedFormState);
1357
- }
1358
- };
1359
- const _runSchema = async (name) => {
1360
- _updateIsValidating(name, true);
1361
- const result = await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));
1362
- _updateIsValidating(name);
1363
- return result;
1364
- };
1365
- const executeSchemaAndUpdateState = async (names) => {
1366
- const { errors } = await _runSchema(names);
1367
- if (names) {
1368
- for (const name of names) {
1369
- const error = get(errors, name);
1370
- error
1371
- ? set(_formState.errors, name, error)
1372
- : unset(_formState.errors, name);
1373
- }
1374
- }
1375
- else {
1376
- _formState.errors = errors;
1377
- }
1378
- return errors;
1379
- };
1380
- const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {
1381
- valid: true,
1382
- }) => {
1383
- for (const name in fields) {
1384
- const field = fields[name];
1385
- if (field) {
1386
- const { _f, ...fieldValue } = field;
1387
- if (_f) {
1388
- const isFieldArrayRoot = _names.array.has(_f.name);
1389
- const isPromiseFunction = field._f && hasPromiseValidation(field._f);
1390
- if (isPromiseFunction && _proxyFormState.validatingFields) {
1391
- _updateIsValidating([name], true);
1392
- }
1393
- const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);
1394
- if (isPromiseFunction && _proxyFormState.validatingFields) {
1395
- _updateIsValidating([name]);
1396
- }
1397
- if (fieldError[_f.name]) {
1398
- context.valid = false;
1399
- if (shouldOnlyCheckValid) {
1400
- break;
1401
- }
1402
- }
1403
- !shouldOnlyCheckValid &&
1404
- (get(fieldError, _f.name)
1405
- ? isFieldArrayRoot
1406
- ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name)
1407
- : set(_formState.errors, _f.name, fieldError[_f.name])
1408
- : unset(_formState.errors, _f.name));
1409
- }
1410
- !isEmptyObject(fieldValue) &&
1411
- (await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context));
1412
- }
1413
- }
1414
- return context.valid;
1415
- };
1416
- const _removeUnmounted = () => {
1417
- for (const name of _names.unMount) {
1418
- const field = get(_fields, name);
1419
- field &&
1420
- (field._f.refs
1421
- ? field._f.refs.every((ref) => !live(ref))
1422
- : !live(field._f.ref)) &&
1423
- unregister(name);
1424
- }
1425
- _names.unMount = new Set();
1426
- };
1427
- const _getDirty = (name, data) => !_options.disabled &&
1428
- (name && data && set(_formValues, name, data),
1429
- !deepEqual(getValues(), _defaultValues));
1430
- const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {
1431
- ...(_state.mount
1432
- ? _formValues
1433
- : isUndefined(defaultValue)
1434
- ? _defaultValues
1435
- : isString(names)
1436
- ? { [names]: defaultValue }
1437
- : defaultValue),
1438
- }, isGlobal, defaultValue);
1439
- const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, _options.shouldUnregister ? get(_defaultValues, name, []) : []));
1440
- const setFieldValue = (name, value, options = {}) => {
1441
- const field = get(_fields, name);
1442
- let fieldValue = value;
1443
- if (field) {
1444
- const fieldReference = field._f;
1445
- if (fieldReference) {
1446
- !fieldReference.disabled &&
1447
- set(_formValues, name, getFieldValueAs(value, fieldReference));
1448
- fieldValue =
1449
- isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)
1450
- ? ''
1451
- : value;
1452
- if (isMultipleSelect(fieldReference.ref)) {
1453
- [...fieldReference.ref.options].forEach((optionRef) => (optionRef.selected = fieldValue.includes(optionRef.value)));
1454
- }
1455
- else if (fieldReference.refs) {
1456
- if (isCheckBoxInput(fieldReference.ref)) {
1457
- fieldReference.refs.forEach((checkboxRef) => {
1458
- if (!checkboxRef.defaultChecked || !checkboxRef.disabled) {
1459
- if (Array.isArray(fieldValue)) {
1460
- checkboxRef.checked = !!fieldValue.find((data) => data === checkboxRef.value);
1461
- }
1462
- else {
1463
- checkboxRef.checked =
1464
- fieldValue === checkboxRef.value || !!fieldValue;
1465
- }
1466
- }
1467
- });
1468
- }
1469
- else {
1470
- fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));
1471
- }
1472
- }
1473
- else if (isFileInput(fieldReference.ref)) {
1474
- fieldReference.ref.value = '';
1475
- }
1476
- else {
1477
- fieldReference.ref.value = fieldValue;
1478
- if (!fieldReference.ref.type) {
1479
- _subjects.state.next({
1480
- name,
1481
- values: cloneObject(_formValues),
1482
- });
1483
- }
1484
- }
1485
- }
1486
- }
1487
- (options.shouldDirty || options.shouldTouch) &&
1488
- updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);
1489
- options.shouldValidate && trigger(name);
1490
- };
1491
- const setValues = (name, value, options) => {
1492
- for (const fieldKey in value) {
1493
- if (!value.hasOwnProperty(fieldKey)) {
1494
- return;
1495
- }
1496
- const fieldValue = value[fieldKey];
1497
- const fieldName = name + '.' + fieldKey;
1498
- const field = get(_fields, fieldName);
1499
- (_names.array.has(name) ||
1500
- isObject(fieldValue) ||
1501
- (field && !field._f)) &&
1502
- !isDateObject(fieldValue)
1503
- ? setValues(fieldName, fieldValue, options)
1504
- : setFieldValue(fieldName, fieldValue, options);
1505
- }
1506
- };
1507
- const setValue = (name, value, options = {}) => {
1508
- const field = get(_fields, name);
1509
- const isFieldArray = _names.array.has(name);
1510
- const cloneValue = cloneObject(value);
1511
- set(_formValues, name, cloneValue);
1512
- if (isFieldArray) {
1513
- _subjects.array.next({
1514
- name,
1515
- values: cloneObject(_formValues),
1516
- });
1517
- if ((_proxyFormState.isDirty ||
1518
- _proxyFormState.dirtyFields ||
1519
- _proxySubscribeFormState.isDirty ||
1520
- _proxySubscribeFormState.dirtyFields) &&
1521
- options.shouldDirty) {
1522
- _subjects.state.next({
1523
- name,
1524
- dirtyFields: getDirtyFields(_defaultValues, _formValues),
1525
- isDirty: _getDirty(name, cloneValue),
1526
- });
1527
- }
1528
- }
1529
- else {
1530
- field && !field._f && !isNullOrUndefined(cloneValue)
1531
- ? setValues(name, cloneValue, options)
1532
- : setFieldValue(name, cloneValue, options);
1533
- }
1534
- isWatched(name, _names) && _subjects.state.next({ ..._formState });
1535
- _subjects.state.next({
1536
- name: _state.mount ? name : undefined,
1537
- values: cloneObject(_formValues),
1538
- });
1539
- };
1540
- const onChange = async (event) => {
1541
- _state.mount = true;
1542
- const target = event.target;
1543
- let name = target.name;
1544
- let isFieldValueUpdated = true;
1545
- const field = get(_fields, name);
1546
- const _updateIsFieldValueUpdated = (fieldValue) => {
1547
- isFieldValueUpdated =
1548
- Number.isNaN(fieldValue) ||
1549
- (isDateObject(fieldValue) && isNaN(fieldValue.getTime())) ||
1550
- deepEqual(fieldValue, get(_formValues, name, fieldValue));
1551
- };
1552
- const validationModeBeforeSubmit = getValidationModes(_options.mode);
1553
- const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);
1554
- if (field) {
1555
- let error;
1556
- let isValid;
1557
- const fieldValue = target.type
1558
- ? getFieldValue(field._f)
1559
- : getEventValue(event);
1560
- const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;
1561
- const shouldSkipValidation = (!hasValidation(field._f) &&
1562
- !_options.resolver &&
1563
- !get(_formState.errors, name) &&
1564
- !field._f.deps) ||
1565
- skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);
1566
- const watched = isWatched(name, _names, isBlurEvent);
1567
- set(_formValues, name, fieldValue);
1568
- if (isBlurEvent) {
1569
- field._f.onBlur && field._f.onBlur(event);
1570
- delayErrorCallback && delayErrorCallback(0);
1571
- }
1572
- else if (field._f.onChange) {
1573
- field._f.onChange(event);
1574
- }
1575
- const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent);
1576
- const shouldRender = !isEmptyObject(fieldState) || watched;
1577
- !isBlurEvent &&
1578
- _subjects.state.next({
1579
- name,
1580
- type: event.type,
1581
- values: cloneObject(_formValues),
1582
- });
1583
- if (shouldSkipValidation) {
1584
- if (_proxyFormState.isValid || _proxySubscribeFormState.isValid) {
1585
- if (_options.mode === 'onBlur') {
1586
- if (isBlurEvent) {
1587
- _setValid();
1588
- }
1589
- }
1590
- else if (!isBlurEvent) {
1591
- _setValid();
1592
- }
1593
- }
1594
- return (shouldRender &&
1595
- _subjects.state.next({ name, ...(watched ? {} : fieldState) }));
1596
- }
1597
- !isBlurEvent && watched && _subjects.state.next({ ..._formState });
1598
- if (_options.resolver) {
1599
- const { errors } = await _runSchema([name]);
1600
- _updateIsFieldValueUpdated(fieldValue);
1601
- if (isFieldValueUpdated) {
1602
- const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);
1603
- const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);
1604
- error = errorLookupResult.error;
1605
- name = errorLookupResult.name;
1606
- isValid = isEmptyObject(errors);
1607
- }
1608
- }
1609
- else {
1610
- _updateIsValidating([name], true);
1611
- error = (await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];
1612
- _updateIsValidating([name]);
1613
- _updateIsFieldValueUpdated(fieldValue);
1614
- if (isFieldValueUpdated) {
1615
- if (error) {
1616
- isValid = false;
1617
- }
1618
- else if (_proxyFormState.isValid ||
1619
- _proxySubscribeFormState.isValid) {
1620
- isValid = await executeBuiltInValidation(_fields, true);
1621
- }
1622
- }
1623
- }
1624
- if (isFieldValueUpdated) {
1625
- field._f.deps &&
1626
- trigger(field._f.deps);
1627
- shouldRenderByError(name, isValid, error, fieldState);
1628
- }
1629
- }
1630
- };
1631
- const _focusInput = (ref, key) => {
1632
- if (get(_formState.errors, key) && ref.focus) {
1633
- ref.focus();
1634
- return 1;
1635
- }
1636
- return;
1637
- };
1638
- const trigger = async (name, options = {}) => {
1639
- let isValid;
1640
- let validationResult;
1641
- const fieldNames = convertToArrayPayload(name);
1642
- if (_options.resolver) {
1643
- const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);
1644
- isValid = isEmptyObject(errors);
1645
- validationResult = name
1646
- ? !fieldNames.some((name) => get(errors, name))
1647
- : isValid;
1648
- }
1649
- else if (name) {
1650
- validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {
1651
- const field = get(_fields, fieldName);
1652
- return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);
1653
- }))).every(Boolean);
1654
- !(!validationResult && !_formState.isValid) && _setValid();
1655
- }
1656
- else {
1657
- validationResult = isValid = await executeBuiltInValidation(_fields);
1658
- }
1659
- _subjects.state.next({
1660
- ...(!isString(name) ||
1661
- ((_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&
1662
- isValid !== _formState.isValid)
1663
- ? {}
1664
- : { name }),
1665
- ...(_options.resolver || !name ? { isValid } : {}),
1666
- errors: _formState.errors,
1667
- });
1668
- options.shouldFocus &&
1669
- !validationResult &&
1670
- iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);
1671
- return validationResult;
1672
- };
1673
- const getValues = (fieldNames) => {
1674
- const values = {
1675
- ...(_state.mount ? _formValues : _defaultValues),
1676
- };
1677
- return isUndefined(fieldNames)
1678
- ? values
1679
- : isString(fieldNames)
1680
- ? get(values, fieldNames)
1681
- : fieldNames.map((name) => get(values, name));
1682
- };
1683
- const getFieldState = (name, formState) => ({
1684
- invalid: !!get((formState || _formState).errors, name),
1685
- isDirty: !!get((formState || _formState).dirtyFields, name),
1686
- error: get((formState || _formState).errors, name),
1687
- isValidating: !!get(_formState.validatingFields, name),
1688
- isTouched: !!get((formState || _formState).touchedFields, name),
1689
- });
1690
- const clearErrors = (name) => {
1691
- name &&
1692
- convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName));
1693
- _subjects.state.next({
1694
- errors: name ? _formState.errors : {},
1695
- });
1696
- };
1697
- const setError = (name, error, options) => {
1698
- const ref = (get(_fields, name, { _f: {} })._f || {}).ref;
1699
- const currentError = get(_formState.errors, name) || {};
1700
- // Don't override existing error messages elsewhere in the object tree.
1701
- const { ref: currentRef, message, type, ...restOfErrorTree } = currentError;
1702
- set(_formState.errors, name, {
1703
- ...restOfErrorTree,
1704
- ...error,
1705
- ref,
1706
- });
1707
- _subjects.state.next({
1708
- name,
1709
- errors: _formState.errors,
1710
- isValid: false,
1711
- });
1712
- options && options.shouldFocus && ref && ref.focus && ref.focus();
1713
- };
1714
- const watch = (name, defaultValue) => isFunction(name)
1715
- ? _subjects.state.subscribe({
1716
- next: (payload) => name(_getWatch(undefined, defaultValue), payload),
1717
- })
1718
- : _getWatch(name, defaultValue, true);
1719
- const _subscribe = (props) => _subjects.state.subscribe({
1720
- next: (formState) => {
1721
- if (shouldSubscribeByName(props.name, formState.name, props.exact) &&
1722
- shouldRenderFormState(formState, props.formState || _proxyFormState, _setFormState, props.reRenderRoot)) {
1723
- props.callback({
1724
- values: { ..._formValues },
1725
- ..._formState,
1726
- ...formState,
1727
- });
1728
- }
1729
- },
1730
- }).unsubscribe;
1731
- const subscribe = (props) => {
1732
- _state.mount = true;
1733
- _proxySubscribeFormState = {
1734
- ..._proxySubscribeFormState,
1735
- ...props.formState,
1736
- };
1737
- return _subscribe({
1738
- ...props,
1739
- formState: _proxySubscribeFormState,
1740
- });
1741
- };
1742
- const unregister = (name, options = {}) => {
1743
- for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {
1744
- _names.mount.delete(fieldName);
1745
- _names.array.delete(fieldName);
1746
- if (!options.keepValue) {
1747
- unset(_fields, fieldName);
1748
- unset(_formValues, fieldName);
1749
- }
1750
- !options.keepError && unset(_formState.errors, fieldName);
1751
- !options.keepDirty && unset(_formState.dirtyFields, fieldName);
1752
- !options.keepTouched && unset(_formState.touchedFields, fieldName);
1753
- !options.keepIsValidating &&
1754
- unset(_formState.validatingFields, fieldName);
1755
- !_options.shouldUnregister &&
1756
- !options.keepDefaultValue &&
1757
- unset(_defaultValues, fieldName);
1758
- }
1759
- _subjects.state.next({
1760
- values: cloneObject(_formValues),
1761
- });
1762
- _subjects.state.next({
1763
- ..._formState,
1764
- ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),
1765
- });
1766
- !options.keepIsValid && _setValid();
1767
- };
1768
- const _setDisabledField = ({ disabled, name, }) => {
1769
- if ((isBoolean(disabled) && _state.mount) ||
1770
- !!disabled ||
1771
- _names.disabled.has(name)) {
1772
- disabled ? _names.disabled.add(name) : _names.disabled.delete(name);
1773
- }
1774
- };
1775
- const register = (name, options = {}) => {
1776
- let field = get(_fields, name);
1777
- const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);
1778
- set(_fields, name, {
1779
- ...(field || {}),
1780
- _f: {
1781
- ...(field && field._f ? field._f : { ref: { name } }),
1782
- name,
1783
- mount: true,
1784
- ...options,
1785
- },
1786
- });
1787
- _names.mount.add(name);
1788
- if (field) {
1789
- _setDisabledField({
1790
- disabled: isBoolean(options.disabled)
1791
- ? options.disabled
1792
- : _options.disabled,
1793
- name,
1794
- });
1795
- }
1796
- else {
1797
- updateValidAndValue(name, true, options.value);
1798
- }
1799
- return {
1800
- ...(disabledIsDefined
1801
- ? { disabled: options.disabled || _options.disabled }
1802
- : {}),
1803
- ...(_options.progressive
1804
- ? {
1805
- required: !!options.required,
1806
- min: getRuleValue(options.min),
1807
- max: getRuleValue(options.max),
1808
- minLength: getRuleValue(options.minLength),
1809
- maxLength: getRuleValue(options.maxLength),
1810
- pattern: getRuleValue(options.pattern),
1811
- }
1812
- : {}),
1813
- name,
1814
- onChange,
1815
- onBlur: onChange,
1816
- ref: (ref) => {
1817
- if (ref) {
1818
- register(name, options);
1819
- field = get(_fields, name);
1820
- const fieldRef = isUndefined(ref.value)
1821
- ? ref.querySelectorAll
1822
- ? ref.querySelectorAll('input,select,textarea')[0] || ref
1823
- : ref
1824
- : ref;
1825
- const radioOrCheckbox = isRadioOrCheckbox(fieldRef);
1826
- const refs = field._f.refs || [];
1827
- if (radioOrCheckbox
1828
- ? refs.find((option) => option === fieldRef)
1829
- : fieldRef === field._f.ref) {
1830
- return;
1831
- }
1832
- set(_fields, name, {
1833
- _f: {
1834
- ...field._f,
1835
- ...(radioOrCheckbox
1836
- ? {
1837
- refs: [
1838
- ...refs.filter(live),
1839
- fieldRef,
1840
- ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),
1841
- ],
1842
- ref: { type: fieldRef.type, name },
1843
- }
1844
- : { ref: fieldRef }),
1845
- },
1846
- });
1847
- updateValidAndValue(name, false, undefined, fieldRef);
1848
- }
1849
- else {
1850
- field = get(_fields, name, {});
1851
- if (field._f) {
1852
- field._f.mount = false;
1853
- }
1854
- (_options.shouldUnregister || options.shouldUnregister) &&
1855
- !(isNameInFieldArray(_names.array, name) && _state.action) &&
1856
- _names.unMount.add(name);
1857
- }
1858
- },
1859
- };
1860
- };
1861
- const _focusError = () => _options.shouldFocusError &&
1862
- iterateFieldsByAction(_fields, _focusInput, _names.mount);
1863
- const _disableForm = (disabled) => {
1864
- if (isBoolean(disabled)) {
1865
- _subjects.state.next({ disabled });
1866
- iterateFieldsByAction(_fields, (ref, name) => {
1867
- const currentField = get(_fields, name);
1868
- if (currentField) {
1869
- ref.disabled = currentField._f.disabled || disabled;
1870
- if (Array.isArray(currentField._f.refs)) {
1871
- currentField._f.refs.forEach((inputRef) => {
1872
- inputRef.disabled = currentField._f.disabled || disabled;
1873
- });
1874
- }
1875
- }
1876
- }, 0, false);
1877
- }
1878
- };
1879
- const handleSubmit = (onValid, onInvalid) => async (e) => {
1880
- let onValidError = undefined;
1881
- if (e) {
1882
- e.preventDefault && e.preventDefault();
1883
- e.persist &&
1884
- e.persist();
1885
- }
1886
- let fieldValues = cloneObject(_formValues);
1887
- _subjects.state.next({
1888
- isSubmitting: true,
1889
- });
1890
- if (_options.resolver) {
1891
- const { errors, values } = await _runSchema();
1892
- _formState.errors = errors;
1893
- fieldValues = cloneObject(values);
1894
- }
1895
- else {
1896
- await executeBuiltInValidation(_fields);
1897
- }
1898
- if (_names.disabled.size) {
1899
- for (const name of _names.disabled) {
1900
- unset(fieldValues, name);
1901
- }
1902
- }
1903
- unset(_formState.errors, 'root');
1904
- if (isEmptyObject(_formState.errors)) {
1905
- _subjects.state.next({
1906
- errors: {},
1907
- });
1908
- try {
1909
- await onValid(fieldValues, e);
1910
- }
1911
- catch (error) {
1912
- onValidError = error;
1913
- }
1914
- }
1915
- else {
1916
- if (onInvalid) {
1917
- await onInvalid({ ..._formState.errors }, e);
1918
- }
1919
- _focusError();
1920
- setTimeout(_focusError);
1921
- }
1922
- _subjects.state.next({
1923
- isSubmitted: true,
1924
- isSubmitting: false,
1925
- isSubmitSuccessful: isEmptyObject(_formState.errors) && !onValidError,
1926
- submitCount: _formState.submitCount + 1,
1927
- errors: _formState.errors,
1928
- });
1929
- if (onValidError) {
1930
- throw onValidError;
1931
- }
1932
- };
1933
- const resetField = (name, options = {}) => {
1934
- if (get(_fields, name)) {
1935
- if (isUndefined(options.defaultValue)) {
1936
- setValue(name, cloneObject(get(_defaultValues, name)));
1937
- }
1938
- else {
1939
- setValue(name, options.defaultValue);
1940
- set(_defaultValues, name, cloneObject(options.defaultValue));
1941
- }
1942
- if (!options.keepTouched) {
1943
- unset(_formState.touchedFields, name);
1944
- }
1945
- if (!options.keepDirty) {
1946
- unset(_formState.dirtyFields, name);
1947
- _formState.isDirty = options.defaultValue
1948
- ? _getDirty(name, cloneObject(get(_defaultValues, name)))
1949
- : _getDirty();
1950
- }
1951
- if (!options.keepError) {
1952
- unset(_formState.errors, name);
1953
- _proxyFormState.isValid && _setValid();
1954
- }
1955
- _subjects.state.next({ ..._formState });
1956
- }
1957
- };
1958
- const _reset = (formValues, keepStateOptions = {}) => {
1959
- const updatedValues = formValues ? cloneObject(formValues) : _defaultValues;
1960
- const cloneUpdatedValues = cloneObject(updatedValues);
1961
- const isEmptyResetValues = isEmptyObject(formValues);
1962
- const values = isEmptyResetValues ? _defaultValues : cloneUpdatedValues;
1963
- if (!keepStateOptions.keepDefaultValues) {
1964
- _defaultValues = updatedValues;
1965
- }
1966
- if (!keepStateOptions.keepValues) {
1967
- if (keepStateOptions.keepDirtyValues) {
1968
- const fieldsToCheck = new Set([
1969
- ..._names.mount,
1970
- ...Object.keys(getDirtyFields(_defaultValues, _formValues)),
1971
- ]);
1972
- for (const fieldName of Array.from(fieldsToCheck)) {
1973
- get(_formState.dirtyFields, fieldName)
1974
- ? set(values, fieldName, get(_formValues, fieldName))
1975
- : setValue(fieldName, get(values, fieldName));
1976
- }
1977
- }
1978
- else {
1979
- if (isWeb && isUndefined(formValues)) {
1980
- for (const name of _names.mount) {
1981
- const field = get(_fields, name);
1982
- if (field && field._f) {
1983
- const fieldReference = Array.isArray(field._f.refs)
1984
- ? field._f.refs[0]
1985
- : field._f.ref;
1986
- if (isHTMLElement(fieldReference)) {
1987
- const form = fieldReference.closest('form');
1988
- if (form) {
1989
- form.reset();
1990
- break;
1991
- }
1992
- }
1993
- }
1994
- }
1995
- }
1996
- if (keepStateOptions.keepFieldsRef) {
1997
- for (const fieldName of _names.mount) {
1998
- setValue(fieldName, get(values, fieldName));
1999
- }
2000
- }
2001
- else {
2002
- _fields = {};
2003
- }
2004
- }
2005
- _formValues = _options.shouldUnregister
2006
- ? keepStateOptions.keepDefaultValues
2007
- ? cloneObject(_defaultValues)
2008
- : {}
2009
- : cloneObject(values);
2010
- _subjects.array.next({
2011
- values: { ...values },
2012
- });
2013
- _subjects.state.next({
2014
- values: { ...values },
2015
- });
2016
- }
2017
- _names = {
2018
- mount: keepStateOptions.keepDirtyValues ? _names.mount : new Set(),
2019
- unMount: new Set(),
2020
- array: new Set(),
2021
- disabled: new Set(),
2022
- watch: new Set(),
2023
- watchAll: false,
2024
- focus: '',
2025
- };
2026
- _state.mount =
2027
- !_proxyFormState.isValid ||
2028
- !!keepStateOptions.keepIsValid ||
2029
- !!keepStateOptions.keepDirtyValues;
2030
- _state.watch = !!_options.shouldUnregister;
2031
- _subjects.state.next({
2032
- submitCount: keepStateOptions.keepSubmitCount
2033
- ? _formState.submitCount
2034
- : 0,
2035
- isDirty: isEmptyResetValues
2036
- ? false
2037
- : keepStateOptions.keepDirty
2038
- ? _formState.isDirty
2039
- : !!(keepStateOptions.keepDefaultValues &&
2040
- !deepEqual(formValues, _defaultValues)),
2041
- isSubmitted: keepStateOptions.keepIsSubmitted
2042
- ? _formState.isSubmitted
2043
- : false,
2044
- dirtyFields: isEmptyResetValues
2045
- ? {}
2046
- : keepStateOptions.keepDirtyValues
2047
- ? keepStateOptions.keepDefaultValues && _formValues
2048
- ? getDirtyFields(_defaultValues, _formValues)
2049
- : _formState.dirtyFields
2050
- : keepStateOptions.keepDefaultValues && formValues
2051
- ? getDirtyFields(_defaultValues, formValues)
2052
- : keepStateOptions.keepDirty
2053
- ? _formState.dirtyFields
2054
- : {},
2055
- touchedFields: keepStateOptions.keepTouched
2056
- ? _formState.touchedFields
2057
- : {},
2058
- errors: keepStateOptions.keepErrors ? _formState.errors : {},
2059
- isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful
2060
- ? _formState.isSubmitSuccessful
2061
- : false,
2062
- isSubmitting: false,
2063
- });
2064
- };
2065
- const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)
2066
- ? formValues(_formValues)
2067
- : formValues, keepStateOptions);
2068
- const setFocus = (name, options = {}) => {
2069
- const field = get(_fields, name);
2070
- const fieldReference = field && field._f;
2071
- if (fieldReference) {
2072
- const fieldRef = fieldReference.refs
2073
- ? fieldReference.refs[0]
2074
- : fieldReference.ref;
2075
- if (fieldRef.focus) {
2076
- fieldRef.focus();
2077
- options.shouldSelect &&
2078
- isFunction(fieldRef.select) &&
2079
- fieldRef.select();
2080
- }
2081
- }
2082
- };
2083
- const _setFormState = (updatedFormState) => {
2084
- _formState = {
2085
- ..._formState,
2086
- ...updatedFormState,
2087
- };
2088
- };
2089
- const _resetDefaultValues = () => isFunction(_options.defaultValues) &&
2090
- _options.defaultValues().then((values) => {
2091
- reset(values, _options.resetOptions);
2092
- _subjects.state.next({
2093
- isLoading: false,
2094
- });
2095
- });
2096
- const methods = {
2097
- control: {
2098
- register,
2099
- unregister,
2100
- getFieldState,
2101
- handleSubmit,
2102
- setError,
2103
- _subscribe,
2104
- _runSchema,
2105
- _focusError,
2106
- _getWatch,
2107
- _getDirty,
2108
- _setValid,
2109
- _setFieldArray,
2110
- _setDisabledField,
2111
- _setErrors,
2112
- _getFieldArray,
2113
- _reset,
2114
- _resetDefaultValues,
2115
- _removeUnmounted,
2116
- _disableForm,
2117
- _subjects,
2118
- _proxyFormState,
2119
- get _fields() {
2120
- return _fields;
2121
- },
2122
- get _formValues() {
2123
- return _formValues;
2124
- },
2125
- get _state() {
2126
- return _state;
2127
- },
2128
- set _state(value) {
2129
- _state = value;
2130
- },
2131
- get _defaultValues() {
2132
- return _defaultValues;
2133
- },
2134
- get _names() {
2135
- return _names;
2136
- },
2137
- set _names(value) {
2138
- _names = value;
2139
- },
2140
- get _formState() {
2141
- return _formState;
2142
- },
2143
- get _options() {
2144
- return _options;
2145
- },
2146
- set _options(value) {
2147
- _options = {
2148
- ..._options,
2149
- ...value,
2150
- };
2151
- },
2152
- },
2153
- subscribe,
2154
- trigger,
2155
- register,
2156
- handleSubmit,
2157
- watch,
2158
- setValue,
2159
- getValues,
2160
- reset,
2161
- resetField,
2162
- clearErrors,
2163
- unregister,
2164
- setError,
2165
- setFocus,
2166
- getFieldState,
2167
- };
2168
- return {
2169
- ...methods,
2170
- formControl: methods,
2171
- };
2172
- }
2173
-
2174
- var generateId = () => {
2175
- if (typeof crypto !== 'undefined' && crypto.randomUUID) {
2176
- return crypto.randomUUID();
2177
- }
2178
- const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;
2179
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
2180
- const r = (Math.random() * 16 + d) % 16 | 0;
2181
- return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);
2182
- });
2183
- };
2184
-
2185
- var getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)
2186
- ? options.focusName ||
2187
- `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`
2188
- : '';
2189
-
2190
- var appendAt = (data, value) => [
2191
- ...data,
2192
- ...convertToArrayPayload(value),
2193
- ];
2194
-
2195
- var fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;
2196
-
2197
- function insert(data, index, value) {
2198
- return [
2199
- ...data.slice(0, index),
2200
- ...convertToArrayPayload(value),
2201
- ...data.slice(index),
2202
- ];
2203
- }
2204
-
2205
- var moveArrayAt = (data, from, to) => {
2206
- if (!Array.isArray(data)) {
2207
- return [];
2208
- }
2209
- if (isUndefined(data[to])) {
2210
- data[to] = undefined;
2211
- }
2212
- data.splice(to, 0, data.splice(from, 1)[0]);
2213
- return data;
2214
- };
2215
-
2216
- var prependAt = (data, value) => [
2217
- ...convertToArrayPayload(value),
2218
- ...convertToArrayPayload(data),
2219
- ];
2220
-
2221
- function removeAtIndexes(data, indexes) {
2222
- let i = 0;
2223
- const temp = [...data];
2224
- for (const index of indexes) {
2225
- temp.splice(index - i, 1);
2226
- i++;
2227
- }
2228
- return compact(temp).length ? temp : [];
2229
- }
2230
- var removeArrayAt = (data, index) => isUndefined(index)
2231
- ? []
2232
- : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));
2233
-
2234
- var swapArrayAt = (data, indexA, indexB) => {
2235
- [data[indexA], data[indexB]] = [data[indexB], data[indexA]];
2236
- };
2237
-
2238
- var updateAt = (fieldValues, index, value) => {
2239
- fieldValues[index] = value;
2240
- return fieldValues;
2241
- };
2242
-
2243
- /**
2244
- * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)
2245
- *
2246
- * @remarks
2247
- * [API](https://react-hook-form.com/docs/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)
2248
- *
2249
- * @param props - useFieldArray props
2250
- *
2251
- * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}
2252
- *
2253
- * @example
2254
- * ```tsx
2255
- * function App() {
2256
- * const { register, control, handleSubmit, reset, trigger, setError } = useForm({
2257
- * defaultValues: {
2258
- * test: []
2259
- * }
2260
- * });
2261
- * const { fields, append } = useFieldArray({
2262
- * control,
2263
- * name: "test"
2264
- * });
2265
- *
2266
- * return (
2267
- * <form onSubmit={handleSubmit(data => console.log(data))}>
2268
- * {fields.map((item, index) => (
2269
- * <input key={item.id} {...register(`test.${index}.firstName`)} />
2270
- * ))}
2271
- * <button type="button" onClick={() => append({ firstName: "bill" })}>
2272
- * append
2273
- * </button>
2274
- * <input type="submit" />
2275
- * </form>
2276
- * );
2277
- * }
2278
- * ```
2279
- */
2280
- function useFieldArray(props) {
2281
- const methods = useFormContext();
2282
- const { control = methods.control, name, keyName = 'id', shouldUnregister, rules, } = props;
2283
- const [fields, setFields] = React__default.useState(control._getFieldArray(name));
2284
- const ids = React__default.useRef(control._getFieldArray(name).map(generateId));
2285
- const _fieldIds = React__default.useRef(fields);
2286
- const _name = React__default.useRef(name);
2287
- const _actioned = React__default.useRef(false);
2288
- _name.current = name;
2289
- _fieldIds.current = fields;
2290
- control._names.array.add(name);
2291
- rules &&
2292
- control.register(name, rules);
2293
- useIsomorphicLayoutEffect(() => control._subjects.array.subscribe({
2294
- next: ({ values, name: fieldArrayName, }) => {
2295
- if (fieldArrayName === _name.current || !fieldArrayName) {
2296
- const fieldValues = get(values, _name.current);
2297
- if (Array.isArray(fieldValues)) {
2298
- setFields(fieldValues);
2299
- ids.current = fieldValues.map(generateId);
2300
- }
2301
- }
2302
- },
2303
- }).unsubscribe, [control]);
2304
- const updateValues = React__default.useCallback((updatedFieldArrayValues) => {
2305
- _actioned.current = true;
2306
- control._setFieldArray(name, updatedFieldArrayValues);
2307
- }, [control, name]);
2308
- const append = (value, options) => {
2309
- const appendValue = convertToArrayPayload(cloneObject(value));
2310
- const updatedFieldArrayValues = appendAt(control._getFieldArray(name), appendValue);
2311
- control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);
2312
- ids.current = appendAt(ids.current, appendValue.map(generateId));
2313
- updateValues(updatedFieldArrayValues);
2314
- setFields(updatedFieldArrayValues);
2315
- control._setFieldArray(name, updatedFieldArrayValues, appendAt, {
2316
- argA: fillEmptyArray(value),
2317
- });
2318
- };
2319
- const prepend = (value, options) => {
2320
- const prependValue = convertToArrayPayload(cloneObject(value));
2321
- const updatedFieldArrayValues = prependAt(control._getFieldArray(name), prependValue);
2322
- control._names.focus = getFocusFieldName(name, 0, options);
2323
- ids.current = prependAt(ids.current, prependValue.map(generateId));
2324
- updateValues(updatedFieldArrayValues);
2325
- setFields(updatedFieldArrayValues);
2326
- control._setFieldArray(name, updatedFieldArrayValues, prependAt, {
2327
- argA: fillEmptyArray(value),
2328
- });
2329
- };
2330
- const remove = (index) => {
2331
- const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);
2332
- ids.current = removeArrayAt(ids.current, index);
2333
- updateValues(updatedFieldArrayValues);
2334
- setFields(updatedFieldArrayValues);
2335
- !Array.isArray(get(control._fields, name)) &&
2336
- set(control._fields, name, undefined);
2337
- control._setFieldArray(name, updatedFieldArrayValues, removeArrayAt, {
2338
- argA: index,
2339
- });
2340
- };
2341
- const insert$1 = (index, value, options) => {
2342
- const insertValue = convertToArrayPayload(cloneObject(value));
2343
- const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);
2344
- control._names.focus = getFocusFieldName(name, index, options);
2345
- ids.current = insert(ids.current, index, insertValue.map(generateId));
2346
- updateValues(updatedFieldArrayValues);
2347
- setFields(updatedFieldArrayValues);
2348
- control._setFieldArray(name, updatedFieldArrayValues, insert, {
2349
- argA: index,
2350
- argB: fillEmptyArray(value),
2351
- });
2352
- };
2353
- const swap = (indexA, indexB) => {
2354
- const updatedFieldArrayValues = control._getFieldArray(name);
2355
- swapArrayAt(updatedFieldArrayValues, indexA, indexB);
2356
- swapArrayAt(ids.current, indexA, indexB);
2357
- updateValues(updatedFieldArrayValues);
2358
- setFields(updatedFieldArrayValues);
2359
- control._setFieldArray(name, updatedFieldArrayValues, swapArrayAt, {
2360
- argA: indexA,
2361
- argB: indexB,
2362
- }, false);
2363
- };
2364
- const move = (from, to) => {
2365
- const updatedFieldArrayValues = control._getFieldArray(name);
2366
- moveArrayAt(updatedFieldArrayValues, from, to);
2367
- moveArrayAt(ids.current, from, to);
2368
- updateValues(updatedFieldArrayValues);
2369
- setFields(updatedFieldArrayValues);
2370
- control._setFieldArray(name, updatedFieldArrayValues, moveArrayAt, {
2371
- argA: from,
2372
- argB: to,
2373
- }, false);
2374
- };
2375
- const update = (index, value) => {
2376
- const updateValue = cloneObject(value);
2377
- const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);
2378
- ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);
2379
- updateValues(updatedFieldArrayValues);
2380
- setFields([...updatedFieldArrayValues]);
2381
- control._setFieldArray(name, updatedFieldArrayValues, updateAt, {
2382
- argA: index,
2383
- argB: updateValue,
2384
- }, true, false);
2385
- };
2386
- const replace = (value) => {
2387
- const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));
2388
- ids.current = updatedFieldArrayValues.map(generateId);
2389
- updateValues([...updatedFieldArrayValues]);
2390
- setFields([...updatedFieldArrayValues]);
2391
- control._setFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);
2392
- };
2393
- React__default.useEffect(() => {
2394
- control._state.action = false;
2395
- isWatched(name, control._names) &&
2396
- control._subjects.state.next({
2397
- ...control._formState,
2398
- });
2399
- if (_actioned.current &&
2400
- (!getValidationModes(control._options.mode).isOnSubmit ||
2401
- control._formState.isSubmitted) &&
2402
- !getValidationModes(control._options.reValidateMode).isOnSubmit) {
2403
- if (control._options.resolver) {
2404
- control._runSchema([name]).then((result) => {
2405
- const error = get(result.errors, name);
2406
- const existingError = get(control._formState.errors, name);
2407
- if (existingError
2408
- ? (!error && existingError.type) ||
2409
- (error &&
2410
- (existingError.type !== error.type ||
2411
- existingError.message !== error.message))
2412
- : error && error.type) {
2413
- error
2414
- ? set(control._formState.errors, name, error)
2415
- : unset(control._formState.errors, name);
2416
- control._subjects.state.next({
2417
- errors: control._formState.errors,
2418
- });
2419
- }
2420
- });
2421
- }
2422
- else {
2423
- const field = get(control._fields, name);
2424
- if (field &&
2425
- field._f &&
2426
- !(getValidationModes(control._options.reValidateMode).isOnSubmit &&
2427
- getValidationModes(control._options.mode).isOnSubmit)) {
2428
- validateField(field, control._names.disabled, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) &&
2429
- control._subjects.state.next({
2430
- errors: updateFieldArrayRootError(control._formState.errors, error, name),
2431
- }));
2432
- }
2433
- }
2434
- }
2435
- control._subjects.state.next({
2436
- name,
2437
- values: cloneObject(control._formValues),
2438
- });
2439
- control._names.focus &&
2440
- iterateFieldsByAction(control._fields, (ref, key) => {
2441
- if (control._names.focus &&
2442
- key.startsWith(control._names.focus) &&
2443
- ref.focus) {
2444
- ref.focus();
2445
- return 1;
2446
- }
2447
- return;
2448
- });
2449
- control._names.focus = '';
2450
- control._setValid();
2451
- _actioned.current = false;
2452
- }, [fields, name, control]);
2453
- React__default.useEffect(() => {
2454
- !get(control._formValues, name) && control._setFieldArray(name);
2455
- return () => {
2456
- const updateMounted = (name, value) => {
2457
- const field = get(control._fields, name);
2458
- if (field && field._f) {
2459
- field._f.mount = value;
2460
- }
2461
- };
2462
- control._options.shouldUnregister || shouldUnregister
2463
- ? control.unregister(name)
2464
- : updateMounted(name, false);
2465
- };
2466
- }, [name, control, keyName, shouldUnregister]);
2467
- return {
2468
- swap: React__default.useCallback(swap, [updateValues, name, control]),
2469
- move: React__default.useCallback(move, [updateValues, name, control]),
2470
- prepend: React__default.useCallback(prepend, [updateValues, name, control]),
2471
- append: React__default.useCallback(append, [updateValues, name, control]),
2472
- remove: React__default.useCallback(remove, [updateValues, name, control]),
2473
- insert: React__default.useCallback(insert$1, [updateValues, name, control]),
2474
- update: React__default.useCallback(update, [updateValues, name, control]),
2475
- replace: React__default.useCallback(replace, [updateValues, name, control]),
2476
- fields: React__default.useMemo(() => fields.map((field, index) => ({
2477
- ...field,
2478
- [keyName]: ids.current[index] || generateId(),
2479
- })), [fields, keyName]),
2480
- };
2481
- }
2482
-
2483
- /**
2484
- * Custom hook to manage the entire form.
2485
- *
2486
- * @remarks
2487
- * [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)
2488
- *
2489
- * @param props - form configuration and validation parameters.
2490
- *
2491
- * @returns methods - individual functions to manage the form state. {@link UseFormReturn}
2492
- *
2493
- * @example
2494
- * ```tsx
2495
- * function App() {
2496
- * const { register, handleSubmit, watch, formState: { errors } } = useForm();
2497
- * const onSubmit = data => console.log(data);
2498
- *
2499
- * console.log(watch("example"));
2500
- *
2501
- * return (
2502
- * <form onSubmit={handleSubmit(onSubmit)}>
2503
- * <input defaultValue="test" {...register("example")} />
2504
- * <input {...register("exampleRequired", { required: true })} />
2505
- * {errors.exampleRequired && <span>This field is required</span>}
2506
- * <button>Submit</button>
2507
- * </form>
2508
- * );
2509
- * }
2510
- * ```
2511
- */
2512
- function useForm(props = {}) {
2513
- const _formControl = React__default.useRef(undefined);
2514
- const _values = React__default.useRef(undefined);
2515
- const [formState, updateFormState] = React__default.useState({
2516
- isDirty: false,
2517
- isValidating: false,
2518
- isLoading: isFunction(props.defaultValues),
2519
- isSubmitted: false,
2520
- isSubmitting: false,
2521
- isSubmitSuccessful: false,
2522
- isValid: false,
2523
- submitCount: 0,
2524
- dirtyFields: {},
2525
- touchedFields: {},
2526
- validatingFields: {},
2527
- errors: props.errors || {},
2528
- disabled: props.disabled || false,
2529
- isReady: false,
2530
- defaultValues: isFunction(props.defaultValues)
2531
- ? undefined
2532
- : props.defaultValues,
2533
- });
2534
- if (!_formControl.current) {
2535
- if (props.formControl) {
2536
- _formControl.current = {
2537
- ...props.formControl,
2538
- formState,
2539
- };
2540
- if (props.defaultValues && !isFunction(props.defaultValues)) {
2541
- props.formControl.reset(props.defaultValues, props.resetOptions);
2542
- }
2543
- }
2544
- else {
2545
- const { formControl, ...rest } = createFormControl(props);
2546
- _formControl.current = {
2547
- ...rest,
2548
- formState,
2549
- };
2550
- }
2551
- }
2552
- const control = _formControl.current.control;
2553
- control._options = props;
2554
- useIsomorphicLayoutEffect(() => {
2555
- const sub = control._subscribe({
2556
- formState: control._proxyFormState,
2557
- callback: () => updateFormState({ ...control._formState }),
2558
- reRenderRoot: true,
2559
- });
2560
- updateFormState((data) => ({
2561
- ...data,
2562
- isReady: true,
2563
- }));
2564
- control._formState.isReady = true;
2565
- return sub;
2566
- }, [control]);
2567
- React__default.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
2568
- React__default.useEffect(() => {
2569
- if (props.mode) {
2570
- control._options.mode = props.mode;
2571
- }
2572
- if (props.reValidateMode) {
2573
- control._options.reValidateMode = props.reValidateMode;
2574
- }
2575
- }, [control, props.mode, props.reValidateMode]);
2576
- React__default.useEffect(() => {
2577
- if (props.errors) {
2578
- control._setErrors(props.errors);
2579
- control._focusError();
2580
- }
2581
- }, [control, props.errors]);
2582
- React__default.useEffect(() => {
2583
- props.shouldUnregister &&
2584
- control._subjects.state.next({
2585
- values: control._getWatch(),
2586
- });
2587
- }, [control, props.shouldUnregister]);
2588
- React__default.useEffect(() => {
2589
- if (control._proxyFormState.isDirty) {
2590
- const isDirty = control._getDirty();
2591
- if (isDirty !== formState.isDirty) {
2592
- control._subjects.state.next({
2593
- isDirty,
2594
- });
2595
- }
2596
- }
2597
- }, [control, formState.isDirty]);
2598
- React__default.useEffect(() => {
2599
- if (props.values && !deepEqual(props.values, _values.current)) {
2600
- control._reset(props.values, {
2601
- keepFieldsRef: true,
2602
- ...control._options.resetOptions,
2603
- });
2604
- _values.current = props.values;
2605
- updateFormState((state) => ({ ...state }));
2606
- }
2607
- else {
2608
- control._resetDefaultValues();
2609
- }
2610
- }, [control, props.values]);
2611
- React__default.useEffect(() => {
2612
- if (!control._state.mount) {
2613
- control._setValid();
2614
- control._state.mount = true;
2615
- }
2616
- if (control._state.watch) {
2617
- control._state.watch = false;
2618
- control._subjects.state.next({ ...control._formState });
2619
- }
2620
- control._removeUnmounted();
2621
- });
2622
- _formControl.current.formState = getProxyFormState(formState, control);
2623
- return _formControl.current;
2624
- }
2625
-
2626
- export { useForm as a, useController as b, appendErrors as c, useFieldArray as d, useWatch as e, get as g, jsxRuntimeExports as j, set as s, useFormState as u };
2627
- //# sourceMappingURL=index.esm-DYWXRkn-.js.map