@dragonmastery/dragoncore-vue 0.0.20 → 0.0.21

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 (155) hide show
  1. package/dist/{ChangePasswordPage-DBXchGfn.js → ChangePasswordPage--3XwluwE.js} +2 -2
  2. package/dist/{ChangePasswordPage-DBXchGfn.js.map → ChangePasswordPage--3XwluwE.js.map} +1 -1
  3. package/dist/ChangePasswordPage-CpDPmEml.js +6 -0
  4. package/dist/{ConsentRequired-qMNT-U2T.js → ConsentRequired-C4IRMA0c.js} +26 -17
  5. package/dist/ConsentRequired-C4IRMA0c.js.map +1 -0
  6. package/dist/CreateTeamForm-B4cIuYAf.js +35 -0
  7. package/dist/CreateTeamMemberForm-Chrw1y00.js +35 -0
  8. package/dist/{CreateUserPage-B0iHLsm5.js → CreateUserPage-DLwXeLAq.js} +2 -2
  9. package/dist/{CreateUserPage-B0iHLsm5.js.map → CreateUserPage-DLwXeLAq.js.map} +1 -1
  10. package/dist/CreateUserPage-WruMs7WP.js +6 -0
  11. package/dist/CreditBalanceDashboard-CkcsrZ_e.js +35 -0
  12. package/dist/CreditManagement-Ddvu9dMw.js +35 -0
  13. package/dist/CustomerCreateSupportTicketForm-BKperKGS.js +35 -0
  14. package/dist/{CustomerSupportTicketDetailPage-DyJTKtLU.js → CustomerSupportTicketDetailPage-BdyaKG1v.js} +7 -7
  15. package/dist/{CustomerSupportTicketDetailPage-DyJTKtLU.js.map → CustomerSupportTicketDetailPage-BdyaKG1v.js.map} +1 -1
  16. package/dist/CustomerSupportTicketList-DcbrjDa9.js +35 -0
  17. package/dist/CustomerSupportTicketParent-BeNzUwuP.js +7 -0
  18. package/dist/{CustomerSupportTicketParent-CldxkQ75.js → CustomerSupportTicketParent-HIxwSVdu.js} +2 -2
  19. package/dist/{CustomerSupportTicketParent-CldxkQ75.js.map → CustomerSupportTicketParent-HIxwSVdu.js.map} +1 -1
  20. package/dist/CustomerSupportTicketSuccess-CC967u3y.js +35 -0
  21. package/dist/EditTeamForm-B5Tee5wL.js +35 -0
  22. package/dist/{EditTeamMemberForm-CiNb4nNG.js → EditTeamMemberForm-CaS2GLjV.js} +2 -2
  23. package/dist/{EditTeamMemberForm-CiNb4nNG.js.map → EditTeamMemberForm-CaS2GLjV.js.map} +1 -1
  24. package/dist/EditTeamMemberForm-OtcS8QWt.js +6 -0
  25. package/dist/{EditUserPage-DpV3dm-c.js → EditUserPage-DURc5rmi.js} +3 -3
  26. package/dist/{EditUserPage-DpV3dm-c.js.map → EditUserPage-DURc5rmi.js.map} +1 -1
  27. package/dist/EditUserPage-T4DQlKhf.js +7 -0
  28. package/dist/ForgotPassword-CUifhmqP.js +7 -0
  29. package/dist/{ForgotPassword-roKwDfce.js → ForgotPassword-OjIPi9s9.js} +2 -2
  30. package/dist/{ForgotPassword-roKwDfce.js.map → ForgotPassword-OjIPi9s9.js.map} +1 -1
  31. package/dist/{LoginForm-BGDymDnO.js → LoginForm-9UFnA-fO.js} +49 -47
  32. package/dist/LoginForm-9UFnA-fO.js.map +1 -0
  33. package/dist/LoginForm-Bg7GoZEA.js +7 -0
  34. package/dist/Logout-Bs92csWH.js +7 -0
  35. package/dist/{Logout-Cbw1SacV.js → Logout-YgTgOFUH.js} +3 -3
  36. package/dist/{Logout-Cbw1SacV.js.map → Logout-YgTgOFUH.js.map} +1 -1
  37. package/dist/MfaSetup-BACX5XP-.js +8 -0
  38. package/dist/{MfaSetup-CwYXnvgW.js → MfaSetup-RtFMY_dj.js} +3 -3
  39. package/dist/{MfaSetup-CwYXnvgW.js.map → MfaSetup-RtFMY_dj.js.map} +1 -1
  40. package/dist/{MfaVerify-CIlen2i5.js → MfaVerify-Cvhe8bEM.js} +4 -4
  41. package/dist/{MfaVerify-CIlen2i5.js.map → MfaVerify-Cvhe8bEM.js.map} +1 -1
  42. package/dist/MfaVerify-ak4iSdQ2.js +8 -0
  43. package/dist/{ResetPassword-BgKyXQ4q.js → ResetPassword-BE4mXK9q.js} +2 -2
  44. package/dist/{ResetPassword-BgKyXQ4q.js.map → ResetPassword-BE4mXK9q.js.map} +1 -1
  45. package/dist/ResetPassword-pY1uhTdl.js +7 -0
  46. package/dist/{SavedFiltersPage-BlzfWkaj.js → SavedFiltersPage-DQt6uc8m.js} +27 -26
  47. package/dist/{SavedFiltersPage-BlzfWkaj.js.map → SavedFiltersPage-DQt6uc8m.js.map} +1 -1
  48. package/dist/{Signup-qBqsSYVz.js → Signup-9TjMMnU4.js} +23 -32
  49. package/dist/Signup-9TjMMnU4.js.map +1 -0
  50. package/dist/Signup-Bq-G3D-s.js +9 -0
  51. package/dist/{SignupConsentFlow-DG2IGikE.js → SignupConsentFlow-QUZGKjdB.js} +59 -33
  52. package/dist/SignupConsentFlow-QUZGKjdB.js.map +1 -0
  53. package/dist/{SignupRequirementsPage-DnLpQfB8.js → SignupRequirementsPage-DfbYmpQD.js} +5 -5
  54. package/dist/{SignupRequirementsPage-DnLpQfB8.js.map → SignupRequirementsPage-DfbYmpQD.js.map} +1 -1
  55. package/dist/StaffCreateSupportTicketForm-D0ZuisDk.js +35 -0
  56. package/dist/{StaffSupportTicketDetailPage-D0SjH36N.js → StaffSupportTicketDetailPage-DQdfh6H1.js} +7 -7
  57. package/dist/{StaffSupportTicketDetailPage-D0SjH36N.js.map → StaffSupportTicketDetailPage-DQdfh6H1.js.map} +1 -1
  58. package/dist/StaffSupportTicketList-CiqC05XB.js +35 -0
  59. package/dist/{StaffSupportTicketParent-Dk6RFRMt.js → StaffSupportTicketParent-CilR4RGM.js} +2 -2
  60. package/dist/{StaffSupportTicketParent-Dk6RFRMt.js.map → StaffSupportTicketParent-CilR4RGM.js.map} +1 -1
  61. package/dist/StaffSupportTicketParent-DkV329NI.js +7 -0
  62. package/dist/StaffSupportTicketSuccess-CUYnimaI.js +35 -0
  63. package/dist/{SupportStaffPage-DFcgP8iE.js → SupportStaffPage-KKugAnFm.js} +5 -5
  64. package/dist/{SupportStaffPage-DFcgP8iE.js.map → SupportStaffPage-KKugAnFm.js.map} +1 -1
  65. package/dist/{SupportTicketMaintenancePage-BCW0eZxV.js → SupportTicketMaintenancePage-smItdkrD.js} +4 -4
  66. package/dist/{SupportTicketMaintenancePage-BCW0eZxV.js.map → SupportTicketMaintenancePage-smItdkrD.js.map} +1 -1
  67. package/dist/TeamAttachmentsTab-DUtCD1Yi.js +35 -0
  68. package/dist/TeamHistoryTab-BsUoH4VK.js +4 -0
  69. package/dist/{TeamHistoryTab-PVS8A-6K.js → TeamHistoryTab-D5biUPmq.js} +2 -2
  70. package/dist/{TeamHistoryTab-PVS8A-6K.js.map → TeamHistoryTab-D5biUPmq.js.map} +1 -1
  71. package/dist/TeamList-BkPIqZ8V.js +35 -0
  72. package/dist/TeamMemberList-1mxUGCNa.js +35 -0
  73. package/dist/TeamMemberParent-DzeBIElY.js +35 -0
  74. package/dist/{TeamNotesTab-D7ELC1EW.js → TeamNotesTab-BzGZZ1h8.js} +4 -4
  75. package/dist/{TeamNotesTab-D7ELC1EW.js.map → TeamNotesTab-BzGZZ1h8.js.map} +1 -1
  76. package/dist/TeamNotesTab-ClHl2nXd.js +7 -0
  77. package/dist/TeamParent-DJa9UZTP.js +35 -0
  78. package/dist/{TimelineNoteInput-D-NjzUiF.js → TimelineNoteInput-0p-M4Qie.js} +2 -2
  79. package/dist/{TimelineNoteInput-D-NjzUiF.js.map → TimelineNoteInput-0p-M4Qie.js.map} +1 -1
  80. package/dist/{TimelineSystemEvent-Cc6HMeO3.js → TimelineSystemEvent-BHzFr46C.js} +4 -4
  81. package/dist/{TimelineSystemEvent-Cc6HMeO3.js.map → TimelineSystemEvent-BHzFr46C.js.map} +1 -1
  82. package/dist/UserListPage-BTLE4J0s.js +4 -0
  83. package/dist/{UserListPage-DdJFeLP1.js → UserListPage-DUE5gJTo.js} +2 -2
  84. package/dist/{UserListPage-DdJFeLP1.js.map → UserListPage-DUE5gJTo.js.map} +1 -1
  85. package/dist/{UserProfilePage-BhCxv0N9.js → UserProfilePage-C3b93Keh.js} +4 -4
  86. package/dist/{UserProfilePage-BhCxv0N9.js.map → UserProfilePage-C3b93Keh.js.map} +1 -1
  87. package/dist/UserProfilePage-CVTORtSx.js +7 -0
  88. package/dist/VerifyEmail-DCP4DWIw.js +9 -0
  89. package/dist/VerifyEmail-DlOmWGG-.js +257 -0
  90. package/dist/VerifyEmail-DlOmWGG-.js.map +1 -0
  91. package/dist/ViewTeam-DVfnLMhV.js +35 -0
  92. package/dist/ViewTeamMember-L4v3gCIn.js +35 -0
  93. package/dist/index.d.ts +703 -705
  94. package/dist/index.js +26 -25
  95. package/dist/{mfaSchema-s-T8m-7-.js → mfaSchema-BnRWf0ma.js} +1 -1
  96. package/dist/{mfaSchema-s-T8m-7-.js.map → mfaSchema-BnRWf0ma.js.map} +1 -1
  97. package/dist/{src--FuqlDhU.js → src-QZJyMfGX.js} +82 -67
  98. package/dist/src-QZJyMfGX.js.map +1 -0
  99. package/dist/useEmailVerificationChannel-BNi926Ho.js +37 -0
  100. package/dist/useEmailVerificationChannel-BNi926Ho.js.map +1 -0
  101. package/dist/{useMutation-Dhx2gMgS.js → useMutation-BTsyHKyn.js} +3 -3
  102. package/dist/{useMutation-Dhx2gMgS.js.map → useMutation-BTsyHKyn.js.map} +1 -1
  103. package/dist/{useQuery-DxmMxM8z.js → useQuery-BggIE52P.js} +3 -3
  104. package/dist/{useQuery-DxmMxM8z.js.map → useQuery-BggIE52P.js.map} +1 -1
  105. package/dist/{useQueryCache-CJKZquh6.js → useQueryCache-Bjm-S8v5.js} +2 -2
  106. package/dist/{useQueryCache-CJKZquh6.js.map → useQueryCache-Bjm-S8v5.js.map} +1 -1
  107. package/dist/{useRpcAuth-Bse-lggK.js → useRpcAuth-rmHf7bYx.js} +40 -1
  108. package/dist/useRpcAuth-rmHf7bYx.js.map +1 -0
  109. package/package.json +2 -2
  110. package/dist/ChangePasswordPage-Re323roR.js +0 -6
  111. package/dist/ConsentRequired-qMNT-U2T.js.map +0 -1
  112. package/dist/CreateTeamForm-DXN1hoJh.js +0 -34
  113. package/dist/CreateTeamMemberForm-CLHT1HN_.js +0 -34
  114. package/dist/CreateUserPage-C8107z_O.js +0 -6
  115. package/dist/CreditBalanceDashboard-D7MFKfh6.js +0 -34
  116. package/dist/CreditManagement-A8hVPoSp.js +0 -34
  117. package/dist/CustomerCreateSupportTicketForm-B8JQNC1I.js +0 -34
  118. package/dist/CustomerSupportTicketList-DR-UfcGr.js +0 -34
  119. package/dist/CustomerSupportTicketParent-C-KzT4qQ.js +0 -7
  120. package/dist/CustomerSupportTicketSuccess-SBdIcS-_.js +0 -34
  121. package/dist/EditTeamForm-BDQkhBbx.js +0 -34
  122. package/dist/EditTeamMemberForm-CBxFLoIy.js +0 -6
  123. package/dist/EditUserPage-BWKrAKZZ.js +0 -7
  124. package/dist/ForgotPassword-D3OQqbrD.js +0 -7
  125. package/dist/LoginForm-BGDymDnO.js.map +0 -1
  126. package/dist/LoginForm-C97dUsU3.js +0 -7
  127. package/dist/Logout-DY3iorah.js +0 -7
  128. package/dist/MfaSetup-DAQV8MhP.js +0 -8
  129. package/dist/MfaVerify-D-_oX6gL.js +0 -8
  130. package/dist/ResetPassword-CkPqUFbq.js +0 -7
  131. package/dist/Signup-C2FshPnc.js +0 -8
  132. package/dist/Signup-qBqsSYVz.js.map +0 -1
  133. package/dist/SignupConsentFlow-DG2IGikE.js.map +0 -1
  134. package/dist/StaffCreateSupportTicketForm-BrGB7tqD.js +0 -34
  135. package/dist/StaffSupportTicketList-HA4NlkKE.js +0 -34
  136. package/dist/StaffSupportTicketParent-BTbpNdfc.js +0 -7
  137. package/dist/StaffSupportTicketSuccess-CTeMG_iK.js +0 -34
  138. package/dist/TeamAttachmentsTab-IaRtuF55.js +0 -34
  139. package/dist/TeamHistoryTab-DWcVhkwC.js +0 -4
  140. package/dist/TeamList-BNo_ime8.js +0 -34
  141. package/dist/TeamMemberList-DJKYxfsx.js +0 -34
  142. package/dist/TeamMemberParent-Bk6dqXsh.js +0 -34
  143. package/dist/TeamNotesTab-JRWYpqRJ.js +0 -7
  144. package/dist/TeamParent-TSWT_0bK.js +0 -34
  145. package/dist/UserListPage-BjHbDpvC.js +0 -4
  146. package/dist/UserProfilePage-BxIMig4s.js +0 -7
  147. package/dist/VerifyEmail-BYSYk5ef.js +0 -7
  148. package/dist/VerifyEmail-DXYcjCX4.js +0 -176
  149. package/dist/VerifyEmail-DXYcjCX4.js.map +0 -1
  150. package/dist/VerifyEmailRequired-DeMYFS0I.js +0 -89
  151. package/dist/VerifyEmailRequired-DeMYFS0I.js.map +0 -1
  152. package/dist/ViewTeam-DIxy437n.js +0 -34
  153. package/dist/ViewTeamMember-DIaIqfbX.js +0 -34
  154. package/dist/src--FuqlDhU.js.map +0 -1
  155. package/dist/useRpcAuth-Bse-lggK.js.map +0 -1
@@ -0,0 +1,4 @@
1
+ import "./useRpcAuth-rmHf7bYx.js";
2
+ import { t as UserListPage_default } from "./UserListPage-DUE5gJTo.js";
3
+
4
+ export { UserListPage_default as default };
@@ -1,4 +1,4 @@
1
- import { r as executeWithAuth, s as getRefreshTokenHandler } from "./useRpcAuth-Bse-lggK.js";
1
+ import { r as executeWithAuth, s as getRefreshTokenHandler } from "./useRpcAuth-rmHf7bYx.js";
2
2
  import { t as formatSystemTimestamp } from "./convertToLocalDateTime-CFhtN6PI.js";
3
3
  import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, resolveComponent, toDisplayString, unref, withCtx } from "vue";
4
4
  import { UserReadSchema } from "@dragonmastery/dragoncore-shared";
@@ -150,4 +150,4 @@ var UserListPage_default = _sfc_main;
150
150
 
151
151
  //#endregion
152
152
  export { userRowSchemaWithMetadata as n, UserTypeBadge_default as r, UserListPage_default as t };
153
- //# sourceMappingURL=UserListPage-DdJFeLP1.js.map
153
+ //# sourceMappingURL=UserListPage-DUE5gJTo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserListPage-DdJFeLP1.js","names":["mappedUsers: UserRow[]"],"sources":["../src/slices/admin/components/UserTypeBadge.vue","../src/slices/admin/features/user_management/userRowSchema.ts","../src/slices/admin/features/user_management/UserListPage.vue"],"sourcesContent":["<template>\n <span class=\"badge badge-sm\" :class=\"badgeClasses\">\n {{ typeLabel }}\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\ninterface Props {\n userType: 'consumer' | 'lead' | 'staff' | 'super_admin';\n size?: 'xs' | 'sm' | 'md' | 'lg';\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n size: 'sm',\n});\n\nconst typeConfig = {\n consumer: {\n label: 'Consumer',\n variant: 'neutral',\n },\n lead: {\n label: 'Lead',\n variant: 'info',\n },\n staff: {\n label: 'Staff',\n variant: 'warning',\n },\n super_admin: {\n label: 'Admin',\n variant: 'error',\n },\n};\n\nconst typeLabel = computed(() => {\n return typeConfig[props.userType]?.label || props.userType;\n});\n\nconst badgeClasses = computed(() => {\n const config = typeConfig[props.userType];\n const baseClasses = `badge-${props.size}`;\n\n if (!config) {\n return `${baseClasses} badge-neutral`;\n }\n\n return `${baseClasses} badge-${config.variant}`;\n});\n</script>\n","import { withMetadata } from '@dragonmastery/zinia-forms-core';\nimport { UserReadSchema } from '@dragonmastery/dragoncore-shared';\nimport type { z } from 'zod';\n\nexport const userRowSchemaWithMetadata = withMetadata(UserReadSchema, 'userRowSchema', {\n username: { label: 'Username' },\n email: { label: 'Email' },\n user_type: { label: 'Role' },\n email_verified: { label: 'Verified' },\n created_at: { label: 'Created' },\n});\n\nexport type UserRow = z.infer<typeof UserReadSchema>;\n","<template>\n <div class=\"mt-2\">\n <!-- Header with title and actions -->\n <div class=\"flex justify-between items-center mb-4\">\n <h1 class=\"text-2xl font-bold\">User Management</h1>\n </div>\n\n <!-- Zinia Data Table -->\n <ZiniaDataTable>\n <!-- Custom cell templates -->\n <template #cell-user_type=\"{ row }\">\n <UserTypeBadge :user-type=\"row.user_type\" />\n </template>\n\n <template #cell-email_verified=\"{ row }\">\n <span\n class=\"badge badge-sm\"\n :class=\"row.email_verified ? 'badge-success' : 'badge-error'\"\n >\n {{ row.email_verified ? 'Verified' : 'Not Verified' }}\n </span>\n </template>\n\n <template #cell-created_at=\"{ row }\">\n {{ formatSystemTimestamp(row.created_at) }}\n </template>\n\n <template #cell-actions=\"{ row }\">\n <router-link\n :to=\"{ name: 'EditUser', params: { id: row.id } }\"\n class=\"btn btn-sm btn-primary\"\n >\n Edit\n </router-link>\n </template>\n </ZiniaDataTable>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { executeWithAuth } from '../../../../composables/useRpcAuth';\nimport { getRefreshTokenHandler } from '../../../../utils/EnhancedRefreshTokenHandler';\nimport { formatSystemTimestamp } from '../../../../utils/convertToLocalDateTime';\nimport { useCursorDataTable } from '@dragonmastery/zinia-forms-core';\nimport UserTypeBadge from '../../components/UserTypeBadge.vue';\nimport { userRowSchemaWithMetadata, type UserRow } from './userRowSchema';\n\n// Set up data table\nconst { ZiniaDataTable } = useCursorDataTable(userRowSchemaWithMetadata, {\n fetchData: async () => {\n const users = await executeWithAuth(\n async (api) => {\n return await api.users.listUsers();\n },\n { refreshTokenHandler: getRefreshTokenHandler() },\n );\n\n // Map response to UserRow format\n const mappedUsers: UserRow[] = users.map((user) => ({\n id: user.id,\n username: user.username,\n email: user.email,\n email_verified: user.email_verified,\n user_type: user.user_type,\n created_at: user.created_at,\n updated_at: user.updated_at ?? null,\n }));\n\n return {\n data: mappedUsers,\n hasNextPage: false,\n hasPreviousPage: false,\n prevPageCursor: undefined,\n nextPageCursor: undefined,\n };\n },\n\n // Column configuration\n columns: {\n username: { label: 'Username', field: 'username', sortable: true },\n email: { label: 'Email', field: 'email', sortable: true },\n user_type: { label: 'Role', field: 'user_type', sortable: true },\n email_verified: {\n label: 'Verified',\n field: 'email_verified',\n sortable: true,\n },\n created_at: { label: 'Created', field: 'created_at', sortable: true },\n },\n\n // Action buttons\n actions: {\n items: [\n {\n key: 'edit',\n icon: 'edit',\n size: 'xs',\n variant: 'primary',\n type: 'link',\n href: (row: UserRow) => `/admin/users/${row.id}/edit`,\n },\n ],\n },\n\n pagination: {\n pageSize: 100,\n },\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;EAcA,MAAM,QAAQ;EAId,MAAM,aAAa;GACjB,UAAU;IACR,OAAO;IACP,SAAS;IACV;GACD,MAAM;IACJ,OAAO;IACP,SAAS;IACV;GACD,OAAO;IACL,OAAO;IACP,SAAS;IACV;GACD,aAAa;IACX,OAAO;IACP,SAAS;IACV;GACF;EAED,MAAM,YAAY,eAAe;AAC/B,UAAO,WAAW,MAAM,WAAW,SAAS,MAAM;IAClD;EAEF,MAAM,eAAe,eAAe;GAClC,MAAM,SAAS,WAAW,MAAM;GAChC,MAAM,cAAc,SAAS,MAAM;AAEnC,OAAI,CAAC,OACH,QAAO,GAAG,YAAY;AAGxB,UAAO,GAAG,YAAY,SAAS,OAAO;IACtC;;uBAjDA,mBAEO,QAAA,EAFD,OAAK,eAAA,CAAC,kBAAyB,aAAA,MAAY,CAAA,EAAA,kBAC5C,UAAA,MAAS,EAAA,EAAA;;;;;;;;ACEhB,MAAa,4BAA4B,aAAa,gBAAgB,iBAAiB;CACrF,UAAU,EAAE,OAAO,YAAY;CAC/B,OAAO,EAAE,OAAO,SAAS;CACzB,WAAW,EAAE,OAAO,QAAQ;CAC5B,gBAAgB,EAAE,OAAO,YAAY;CACrC,YAAY,EAAE,OAAO,WAAW;CACjC,CAAC;;;;;;;;ECsCF,MAAM,EAAE,mBAAmB,mBAAmB,2BAA2B;GACvE,WAAW,YAAY;AAmBrB,WAAO;KACL,OAnBY,MAAM,gBAClB,OAAO,QAAQ;AACb,aAAO,MAAM,IAAI,MAAM,WAAW;QAEpC,EAAE,qBAAqB,wBAAwB,EAAE,CAClD,EAGoC,KAAK,UAAU;MAClD,IAAI,KAAK;MACT,UAAU,KAAK;MACf,OAAO,KAAK;MACZ,gBAAgB,KAAK;MACrB,WAAW,KAAK;MAChB,YAAY,KAA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AC5B,YAKc,wBAAA;MAJX,IAAE;OAAA,MAAA;OAAA,QAAA,EAAA,IAAoC,IAAI,IAAE;OAAA;MAC7C,OAAM;;6BAGR,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFC,UAED,GAAA,CAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"UserListPage-DUE5gJTo.js","names":["mappedUsers: UserRow[]"],"sources":["../src/slices/admin/components/UserTypeBadge.vue","../src/slices/admin/features/user_management/userRowSchema.ts","../src/slices/admin/features/user_management/UserListPage.vue"],"sourcesContent":["<template>\n <span class=\"badge badge-sm\" :class=\"badgeClasses\">\n {{ typeLabel }}\n </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\ninterface Props {\n userType: 'consumer' | 'lead' | 'staff' | 'super_admin';\n size?: 'xs' | 'sm' | 'md' | 'lg';\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n size: 'sm',\n});\n\nconst typeConfig = {\n consumer: {\n label: 'Consumer',\n variant: 'neutral',\n },\n lead: {\n label: 'Lead',\n variant: 'info',\n },\n staff: {\n label: 'Staff',\n variant: 'warning',\n },\n super_admin: {\n label: 'Admin',\n variant: 'error',\n },\n};\n\nconst typeLabel = computed(() => {\n return typeConfig[props.userType]?.label || props.userType;\n});\n\nconst badgeClasses = computed(() => {\n const config = typeConfig[props.userType];\n const baseClasses = `badge-${props.size}`;\n\n if (!config) {\n return `${baseClasses} badge-neutral`;\n }\n\n return `${baseClasses} badge-${config.variant}`;\n});\n</script>\n","import { withMetadata } from '@dragonmastery/zinia-forms-core';\nimport { UserReadSchema } from '@dragonmastery/dragoncore-shared';\nimport type { z } from 'zod';\n\nexport const userRowSchemaWithMetadata = withMetadata(UserReadSchema, 'userRowSchema', {\n username: { label: 'Username' },\n email: { label: 'Email' },\n user_type: { label: 'Role' },\n email_verified: { label: 'Verified' },\n created_at: { label: 'Created' },\n});\n\nexport type UserRow = z.infer<typeof UserReadSchema>;\n","<template>\n <div class=\"mt-2\">\n <!-- Header with title and actions -->\n <div class=\"flex justify-between items-center mb-4\">\n <h1 class=\"text-2xl font-bold\">User Management</h1>\n </div>\n\n <!-- Zinia Data Table -->\n <ZiniaDataTable>\n <!-- Custom cell templates -->\n <template #cell-user_type=\"{ row }\">\n <UserTypeBadge :user-type=\"row.user_type\" />\n </template>\n\n <template #cell-email_verified=\"{ row }\">\n <span\n class=\"badge badge-sm\"\n :class=\"row.email_verified ? 'badge-success' : 'badge-error'\"\n >\n {{ row.email_verified ? 'Verified' : 'Not Verified' }}\n </span>\n </template>\n\n <template #cell-created_at=\"{ row }\">\n {{ formatSystemTimestamp(row.created_at) }}\n </template>\n\n <template #cell-actions=\"{ row }\">\n <router-link\n :to=\"{ name: 'EditUser', params: { id: row.id } }\"\n class=\"btn btn-sm btn-primary\"\n >\n Edit\n </router-link>\n </template>\n </ZiniaDataTable>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { executeWithAuth } from '../../../../composables/useRpcAuth';\nimport { getRefreshTokenHandler } from '../../../../utils/EnhancedRefreshTokenHandler';\nimport { formatSystemTimestamp } from '../../../../utils/convertToLocalDateTime';\nimport { useCursorDataTable } from '@dragonmastery/zinia-forms-core';\nimport UserTypeBadge from '../../components/UserTypeBadge.vue';\nimport { userRowSchemaWithMetadata, type UserRow } from './userRowSchema';\n\n// Set up data table\nconst { ZiniaDataTable } = useCursorDataTable(userRowSchemaWithMetadata, {\n fetchData: async () => {\n const users = await executeWithAuth(\n async (api) => {\n return await api.users.listUsers();\n },\n { refreshTokenHandler: getRefreshTokenHandler() },\n );\n\n // Map response to UserRow format\n const mappedUsers: UserRow[] = users.map((user) => ({\n id: user.id,\n username: user.username,\n email: user.email,\n email_verified: user.email_verified,\n user_type: user.user_type,\n created_at: user.created_at,\n updated_at: user.updated_at ?? null,\n }));\n\n return {\n data: mappedUsers,\n hasNextPage: false,\n hasPreviousPage: false,\n prevPageCursor: undefined,\n nextPageCursor: undefined,\n };\n },\n\n // Column configuration\n columns: {\n username: { label: 'Username', field: 'username', sortable: true },\n email: { label: 'Email', field: 'email', sortable: true },\n user_type: { label: 'Role', field: 'user_type', sortable: true },\n email_verified: {\n label: 'Verified',\n field: 'email_verified',\n sortable: true,\n },\n created_at: { label: 'Created', field: 'created_at', sortable: true },\n },\n\n // Action buttons\n actions: {\n items: [\n {\n key: 'edit',\n icon: 'edit',\n size: 'xs',\n variant: 'primary',\n type: 'link',\n href: (row: UserRow) => `/admin/users/${row.id}/edit`,\n },\n ],\n },\n\n pagination: {\n pageSize: 100,\n },\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;EAcA,MAAM,QAAQ;EAId,MAAM,aAAa;GACjB,UAAU;IACR,OAAO;IACP,SAAS;IACV;GACD,MAAM;IACJ,OAAO;IACP,SAAS;IACV;GACD,OAAO;IACL,OAAO;IACP,SAAS;IACV;GACD,aAAa;IACX,OAAO;IACP,SAAS;IACV;GACF;EAED,MAAM,YAAY,eAAe;AAC/B,UAAO,WAAW,MAAM,WAAW,SAAS,MAAM;IAClD;EAEF,MAAM,eAAe,eAAe;GAClC,MAAM,SAAS,WAAW,MAAM;GAChC,MAAM,cAAc,SAAS,MAAM;AAEnC,OAAI,CAAC,OACH,QAAO,GAAG,YAAY;AAGxB,UAAO,GAAG,YAAY,SAAS,OAAO;IACtC;;uBAjDA,mBAEO,QAAA,EAFD,OAAK,eAAA,CAAC,kBAAyB,aAAA,MAAY,CAAA,EAAA,kBAC5C,UAAA,MAAS,EAAA,EAAA;;;;;;;;ACEhB,MAAa,4BAA4B,aAAa,gBAAgB,iBAAiB;CACrF,UAAU,EAAE,OAAO,YAAY;CAC/B,OAAO,EAAE,OAAO,SAAS;CACzB,WAAW,EAAE,OAAO,QAAQ;CAC5B,gBAAgB,EAAE,OAAO,YAAY;CACrC,YAAY,EAAE,OAAO,WAAW;CACjC,CAAC;;;;;;;;ECsCF,MAAM,EAAE,mBAAmB,mBAAmB,2BAA2B;GACvE,WAAW,YAAY;AAmBrB,WAAO;K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BACE,IAAI,iBAAc,kBAAA,cAAA,CAAA,EAAA,kBAEvB,IAAI,iBAAc,aAAA,eAAA,EAAA,EAAA,CAAA,CAAA;KAId,mBAAe,SACmB,EADf,UAAG,CAAA,gCAC5B,MAAA,sBAAqB,CAAC,IAAI,WAAU,CAAA,EAAA,EAAA,CAAA,CAAA;KAG9B,gBAAY,SAMP,EANW,UAAG,CAC5B,YAKc,wBAAA;MAJX,IAAE;OAAA,MAAA;OAAA,QAAA,EAAA,IAAoC,IAAI,IAAE;OAAA;MAC7C,OAAM;;6BAGR,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFC,UAED,GAAA,CAAA,EAAA,CAAA"}
@@ -1,6 +1,6 @@
1
- import { l as useUserSessionStore, m as useEnv } from "./useRpcAuth-Bse-lggK.js";
2
- import { t as useMutation } from "./useMutation-Dhx2gMgS.js";
3
- import { t as useQuery } from "./useQuery-DxmMxM8z.js";
1
+ import { l as useUserSessionStore, m as useEnv } from "./useRpcAuth-rmHf7bYx.js";
2
+ import { t as useMutation } from "./useMutation-BTsyHKyn.js";
3
+ import { t as useQuery } from "./useQuery-BggIE52P.js";
4
4
  import { createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, toDisplayString, unref, withCtx } from "vue";
5
5
  import { toast } from "vue3-toastify";
6
6
  import { UserProfileUpdateSchema } from "@dragonmastery/dragoncore-shared";
@@ -167,4 +167,4 @@ var UserProfilePage_default = _sfc_main;
167
167
 
168
168
  //#endregion
169
169
  export { userProfileSchemaWithMetadata as n, UserProfilePage_default as t };
170
- //# sourceMappingURL=UserProfilePage-BhCxv0N9.js.map
170
+ //# sourceMappingURL=UserProfilePage-C3b93Keh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserProfilePage-BhCxv0N9.js","names":[],"sources":["../src/slices/user/features/user_profile/userProfileSchema.ts","../src/slices/user/features/user_profile/UserProfilePage.vue"],"sourcesContent":["import { withMetadata } from '@dragonmastery/zinia-forms-core';\nimport { UserProfileBaseSchema, UserProfileUpdateSchema } from '@dragonmastery/dragoncore-shared';\nimport { z } from 'zod';\n\n// Define the login form type\nexport type UserProfileForm = z.infer<typeof UserProfileBaseSchema>;\n\n// Enhance the schema with metadata\nexport const userProfileSchemaWithMetadata = withMetadata(\n UserProfileUpdateSchema,\n 'userProfileSchema',\n {\n first_name: {\n inputType: 'text',\n placeholder: 'Enter first name',\n helpText: 'Enter the first name',\n autocomplete: 'first-name',\n autofocus: true,\n },\n\n last_name: {\n inputType: 'text',\n placeholder: 'Enter last name',\n helpText: 'Enter the last name',\n autocomplete: 'last-name',\n },\n\n bio: {\n inputType: 'textarea',\n placeholder: 'Enter bio',\n helpText: 'Enter a short bio',\n },\n },\n);\n","<template>\n <div v-if=\"form.isLoading\" class=\"flex justify-center items-center p-8\">\n <span class=\"loading loading-spinner loading-lg\"></span>\n </div>\n <div v-else-if=\"form.loadError\" class=\"alert alert-error mb-4\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"stroke-current shrink-0 h-6 w-6\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n <span>{{ form.loadError }}</span>\n </div>\n <div v-else class=\"max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container\">\n <h1 class=\"text-2xl font-bold mb-6 text-center\">Update User Profile</h1>\n\n <!-- Email & verification status -->\n <div v-if=\"session.userSession?.user.email\" class=\"mb-6 p-4 rounded-lg bg-base-300\">\n <div class=\"flex items-center justify-between gap-2\">\n <div>\n <p class=\"text-sm text-base-content/70\">Email</p>\n <p class=\"font-medium\">{{ session.userSession.user.email }}</p>\n <p\n v-if=\"emailVerificationMode !== 'disabled'\"\n class=\"text-sm mt-1\"\n :class=\"session.userSession.user.email_verified ? 'text-success' : 'text-warning'\"\n >\n {{ session.userSession.user.email_verified ? 'Verified' : 'Not verified' }}\n </p>\n </div>\n <button\n v-if=\"\n emailVerificationMode !== 'disabled' &&\n !session.userSession.user.email_verified\n \"\n type=\"button\"\n class=\"btn btn-outline btn-sm\"\n :disabled=\"resendLoading\"\n @click=\"resendVerification\"\n >\n {{ resendLoading ? 'Sending...' : 'Resend verification' }}\n </button>\n </div>\n </div>\n\n <ZiniaForm @handle-submit=\"handleSubmit\" @success=\"handleSuccess\" @error=\"handleError\">\n <zinia.FirstNameField />\n <zinia.LastNameField />\n <zinia.BioField />\n\n <ZiniaSubmitButton submitText=\"Update\" submittingText=\"Updating...\" />\n </ZiniaForm>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { DragoncoreApi } from '@dragonmastery/dragoncore-shared';\nimport type { EmailVerificationApi } from '@dragonmastery/dragoncore-shared';\nimport type { UserProfileUpdateDto } from '@dragonmastery/dragoncore-shared';\nimport { useForm } from '@dragonmastery/zinia-forms-core';\nimport { ref } from 'vue';\nimport { toast } from 'vue3-toastify';\nimport { useEnv } from '../../../../composables/useEnv';\nimport { useMutation } from '../../../../composables/useMutation';\nimport { useQuery } from '../../../../composables/useQuery';\nimport { useUserSessionStore } from '../../../../composables/useUserSessionStore';\nimport { userProfileSchemaWithMetadata } from './userProfileSchema';\n\n//user session\nconst session = useUserSessionStore();\nconst { emailVerificationMode } = useEnv();\nconst resendLoading = ref(false);\n\nconst { mutate: resendMutate } = useMutation(\n (api, _input?: unknown) => {\n const verifyEmail = (api as DragoncoreApi).verifyEmail;\n if (!verifyEmail) throw new Error('Email verification is not configured');\n return (verifyEmail as EmailVerificationApi).resendVerificationEmail();\n },\n { skipAuthCheck: false },\n);\n\nconst resendVerification = async () => {\n try {\n resendLoading.value = true;\n const result = await resendMutate(undefined);\n if (result?.ok) {\n toast.success('Verification email sent. Please check your inbox.');\n await session.refreshToken();\n } else {\n toast.error('Failed to resend verification email.');\n }\n } catch (error) {\n toast.error(error instanceof Error ? error.message : 'Failed to resend');\n } finally {\n resendLoading.value = false;\n }\n};\n\n// fetch user profile data\nconst { data: userProfileData, loading: userProfileFetching } = useQuery(\n (api) => api.userProfiles.getCurrentUserProfile(),\n {\n enabled: !!session.userSession?.user.userId,\n staleTime: 5 * 60 * 1000,\n },\n);\n\n// Create a type-safe form using our schema with metadata\nconst { form, zinia, ZiniaForm, ZiniaSubmitButton } = useForm(userProfileSchemaWithMetadata, {\n storeName: 'user-profile-form',\n persistToLocalStorage: false,\n renderStyle: 'daisy_ui',\n fetchData: async () => {\n while (userProfileFetching.value) {\n await new Promise((resolve) => setTimeout(resolve, 100));\n }\n\n if (!userProfileData.value) {\n return {\n user_id: session.userSession?.user.userId || '',\n bio: '',\n first_name: '',\n last_name: '',\n };\n }\n\n return {\n user_id: userProfileData.value.user_id,\n bio: userProfileData.value.bio || '',\n first_name: userProfileData.value.first_name || '',\n last_name: userProfileData.value.last_name || '',\n };\n },\n});\n\nconst { mutate: updateUserProfile } = useMutation(\n (api, input: UserProfileUpdateDto) => api.userProfiles.updateUserProfile(input),\n { invalidate: /^user:profile/ },\n);\n\n// Handle form submission\nconst handleSubmit = async (data: UserProfileUpdateDto) => {\n if (!session.userSession?.user.userId) {\n throw new Error('User session not found');\n }\n\n const result = await updateUserProfile({\n user_id: session.userSession?.user.userId,\n first_name: data.first_name,\n last_name: data.last_name,\n bio: data.bio,\n });\n if (!result) throw new Error('Update user profile failed');\n\n return result;\n};\n\n// Handle success\nconst handleSuccess = (_data: any) => {\n toast.success('User profile updated successfully!');\n};\n\n// Handle error\nconst handleError = (error: any) => {\n toast.error(error.message || 'Update user profile failed');\n};\n</script>\n"],"mappings":";;;;;;;;;AAQA,MAAa,gCAAgC,aAC3C,yBACA,qBACA;CACE,YAAY;EACV,WAAW;EACX,aAAa;EACb,UAAU;EACV,cAAc;EACd,WAAW;EACZ;CAED,WAAW;EACT,WAAW;EACX,aAAa;EACb,UAAU;EACV,cAAc;E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AAA,EAArC,mBA0BM,OA1BN,YA0BM,CAzBJ,mBAwBM,OAxBN,YAwBM,CAvBJ,mBAUM,OAAA,MAAA;+BATJ,mBAAiD,KAAA,EAA9C,OAAM,gCAA8B,EAAC,SAAK,GAAA;KAC7C,mBAA+D,KAA/D,YAA+D,gBAArC,MAAA,QAAO,CAAC,YAAY,KAAK,MAAK,EAAA,EAAA;KAEhD,MAAA,sBAAqB,KAAA,cAAA,WAAA,EAD7B,mBAMI,KAAA;;MAJF,OAAK,eAAA,CAAC,gBACE,MAAA,QAAO,CAAC,YAAY,KAAK,iBAAc,iBAAA,eAAA,CAAA;wBAE5C,MAAA,QAAO,CAAC,YAAY,KAAK,iBAAc,aAAA,eAAA,EAAA,EAAA,IAAA,mBAAA,QAAA,KAAA;QAIzB,MAAA,sBAAqB,KAAA,cAAA,CAAgC,MAAA,QAAO,CAAC,YAAY,KAAK,kBAAA,WAAA,EADnG,mBAWS,UAAA;;KANP,MAAK;KACL,OAAM;KACL,UAAU,cAAA;KACV,SAAO;uBAEL,cAAA,QAAa,eAAA,sBAAA,EAAA,GAAA,WAAA,IAAA,mBAAA,QAAA,KAAA,CAAA,CAAA,CAAA,CAAA,IAAA,mBAAA,QAAA,KAAA;IAKtB,YAMY,MAAA,UAAA,EAAA;KANA,gBAAe;KAAe,WAAS;KAAgB,SAAO;;4BAChD;MAAxB,YAAwB,MAAA,MAAA,CAAA,eAAA;MACxB,YAAuB,MAAA,MAAA,CAAA,cAAA;MACvB,YAAkB,MAAA,MAAA,CAAA,SAAA;MAElB,YAAsE,MAAA,kBAAA,EAAA;OAAnD,YAAW;OAAS,gBAAe"}
1
+ {"version":3,"file":"UserProfilePage-C3b93Keh.js","names":[],"sources":["../src/slices/user/features/user_profile/userProfileSchema.ts","../src/slices/user/features/user_profile/UserProfilePage.vue"],"sourcesContent":["import { withMetadata } from '@dragonmastery/zinia-forms-core';\nimport { UserProfileBaseSchema, UserProfileUpdateSchema } from '@dragonmastery/dragoncore-shared';\nimport { z } from 'zod';\n\n// Define the login form type\nexport type UserProfileForm = z.infer<typeof UserProfileBaseSchema>;\n\n// Enhance the schema with metadata\nexport const userProfileSchemaWithMetadata = withMetadata(\n UserProfileUpdateSchema,\n 'userProfileSchema',\n {\n first_name: {\n inputType: 'text',\n placeholder: 'Enter first name',\n helpText: 'Enter the first name',\n autocomplete: 'first-name',\n autofocus: true,\n },\n\n last_name: {\n inputType: 'text',\n placeholder: 'Enter last name',\n helpText: 'Enter the last name',\n autocomplete: 'last-name',\n },\n\n bio: {\n inputType: 'textarea',\n placeholder: 'Enter bio',\n helpText: 'Enter a short bio',\n },\n },\n);\n","<template>\n <div v-if=\"form.isLoading\" class=\"flex justify-center items-center p-8\">\n <span class=\"loading loading-spinner loading-lg\"></span>\n </div>\n <div v-else-if=\"form.loadError\" class=\"alert alert-error mb-4\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"stroke-current shrink-0 h-6 w-6\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n <span>{{ form.loadError }}</span>\n </div>\n <div v-else class=\"max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container\">\n <h1 class=\"text-2xl font-bold mb-6 text-center\">Update User Profile</h1>\n\n <!-- Email & verification status -->\n <div v-if=\"session.userSession?.user.email\" class=\"mb-6 p-4 rounded-lg bg-base-300\">\n <div class=\"flex items-center justify-between gap-2\">\n <div>\n <p class=\"text-sm text-base-content/70\">Email</p>\n <p class=\"font-medium\">{{ session.userSession.user.email }}</p>\n <p\n v-if=\"emailVerificationMode !== 'disabled'\"\n class=\"text-sm mt-1\"\n :class=\"session.userSession.user.email_verified ? 'text-success' : 'text-warning'\"\n >\n {{ session.userSession.user.email_verified ? 'Verified' : 'Not verified' }}\n </p>\n </div>\n <button\n v-if=\"\n emailVerificationMode !== 'disabled' &&\n !session.userSession.user.email_verified\n \"\n type=\"button\"\n class=\"btn btn-outline btn-sm\"\n :disabled=\"resendLoading\"\n @click=\"resendVerification\"\n >\n {{ resendLoading ? 'Sending...' : 'Resend verification' }}\n </button>\n </div>\n </div>\n\n <ZiniaForm @handle-submit=\"handleSubmit\" @success=\"handleSuccess\" @error=\"handleError\">\n <zinia.FirstNameField />\n <zinia.LastNameField />\n <zinia.BioField />\n\n <ZiniaSubmitButton submitText=\"Update\" submittingText=\"Updating...\" />\n </ZiniaForm>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { DragoncoreApi } from '@dragonmastery/dragoncore-shared';\nimport type { EmailVerificationApi } from '@dragonmastery/dragoncore-shared';\nimport type { UserProfileUpdateDto } from '@dragonmastery/dragoncore-shared';\nimport { useForm } from '@dragonmastery/zinia-forms-core';\nimport { ref } from 'vue';\nimport { toast } from 'vue3-toastify';\nimport { useEnv } from '../../../../composables/useEnv';\nimport { useMutation } from '../../../../composables/useMutation';\nimport { useQuery } from '../../../../composables/useQuery';\nimport { useUserSessionStore } from '../../../../composables/useUserSessionStore';\nimport { userProfileSchemaWithMetadata } from './userProfileSchema';\n\n//user session\nconst session = useUserSessionStore();\nconst { emailVerificationMode } = useEnv();\nconst resendLoading = ref(false);\n\nconst { mutate: resendMutate } = useMutation(\n (api, _input?: unknown) => {\n const verifyEmail = (api as DragoncoreApi).verifyEmail;\n if (!verifyEmail) throw new Error('Email verification is not configured');\n return (verifyEmail as EmailVerificationApi).resendVerificationEmail();\n },\n { skipAuthCheck: false },\n);\n\nconst resendVerification = async () => {\n try {\n resendLoading.value = true;\n const result = await resendMutate(undefined);\n if (result?.ok) {\n toast.success('Verification email sent. Please check your inbox.');\n await session.refreshToken();\n } else {\n toast.error('Failed to resend verification email.');\n }\n } catch (error) {\n toast.error(error instanceof Error ? error.message : 'Failed to resend');\n } finally {\n resendLoading.value = false;\n }\n};\n\n// fetch user profile data\nconst { data: userProfileData, loading: userProfileFetching } = useQuery(\n (api) => api.userProfiles.getCurrentUserProfile(),\n {\n enabled: !!session.userSession?.user.userId,\n staleTime: 5 * 60 * 1000,\n },\n);\n\n// Create a type-safe form using our schema with metadata\nconst { form, zinia, ZiniaForm, ZiniaSubmitButton } = useForm(userProfileSchemaWithMetadata, {\n storeName: 'user-profile-form',\n persistToLocalStorage: false,\n renderStyle: 'daisy_ui',\n fetchData: async () => {\n while (userProfileFetching.value) {\n await new Promise((resolve) => setTimeout(resolve, 100));\n }\n\n if (!userProfileData.value) {\n return {\n user_id: session.userSession?.user.userId || '',\n bio: '',\n first_name: '',\n last_name: '',\n };\n }\n\n return {\n user_id: userProfileData.value.user_id,\n bio: userProfileData.value.bio || '',\n first_name: userProfileData.value.first_name || '',\n last_name: userProfileData.value.last_name || '',\n };\n },\n});\n\nconst { mutate: updateUserProfile } = useMutation(\n (api, input: UserProfileUpdateDto) => api.userProfiles.updateUserProfile(input),\n { invalidate: /^user:profile/ },\n);\n\n// Handle form submission\nconst handleSubmit = async (data: UserProfileUpdateDto) => {\n if (!session.userSession?.user.userId) {\n throw new Error('User session not found');\n }\n\n const result = await updateUserProfile({\n user_id: session.userSession?.user.userId,\n first_name: data.first_name,\n last_name: data.last_name,\n bio: data.bio,\n });\n if (!result) throw new Error('Update user profile failed');\n\n return result;\n};\n\n// Handle success\nconst handleSuccess = (_data: any) => {\n toast.success('User profile updated successfully!');\n};\n\n// Handle error\nconst handleError = (error: any) => {\n toast.error(error.message || 'Update user profile failed');\n};\n</script>\n"],"mappings":";;;;;;;;;AAQA,MAAa,gCAAgC,aAC3C,yBACA,qBACA;CACE,YAAY;EACV,WAAW;EACX,aAAa;EACb,UAAU;EACV,cAAc;EACd,WAAW;EACZ;CAED,WAAW;EACT,WAAW;EACX,aAAa;EACb,UAAU;EACV,cAAc;EACf;CAED,KAAK;EACH,WAAW;EACX,aAAa;EACb,UAAU;EACX;CACF,CACF;;;;;;;;;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,mBAUM,OAAA,MAAA;+BATJ,mBAAiD,KAAA,EAA9C,OAAM,gCAA8B,EAAC,SAAK,GAAA;KAC7C,mBAA+D,KAA/D,YAA+D,gBAArC,MAAA,QAAO,CAAC,YAAY,KAAK,MAAK,EAAA,EAAA;KAEhD,MAAA,sBAAqB,KAAA,cAAA,WAAA,EAD7B,mBAMI,KAAA;;MAJF,OAAK,eAAA,CAAC,gBACE,MAAA,QAAO,CAAC,YAAY,KAAK,iBAAc,iBAAA,eAAA,CAAA;wBAE5C,MAAA,QAAO,CAAC,YAAY,KAAK,iBAAc,aAAA,eAAA,EAAA,EAAA,IAAA,mBAAA,QAAA,KAAA;QAIzB,MAAA,sBAAqB,KAAA,cAAA,CAAgC,MAAA,QAAO,CAAC,YAAY,KAAK,kBAAA,WAAA,EADnG,mBAWS,UAAA;;KANP,MAAK;KACL,OAAM;KACL,UAAU,cAAA;KACV,SAAO;uBAEL,cAAA,QAAa,eAAA,sBAAA,EAAA,GAAA,WAAA,IAAA,mBAAA,QAAA,KAAA,CAAA,CAAA,CAAA,CAAA,IAAA,mBAAA,QAAA,KAAA;IAKtB,YAMY,MAAA,UAAA,EAAA;KANA,gBAAe;KAAe,WAAS;KAAgB,SAAO;;4BAChD;MAAxB,YAAwB,MAAA,MAAA,CAAA,eAAA;MACxB,YAAuB,MAAA,MAAA,CAAA,cAAA;MACvB,YAAkB,MAAA,MAAA,CAAA,SAAA;MAElB,YAAsE,MAAA,kBAAA,EAAA;OAAnD,YAAW;OAAS,gBAAe"}
@@ -0,0 +1,7 @@
1
+ import "./useRpcAuth-rmHf7bYx.js";
2
+ import "./useQueryCache-Bjm-S8v5.js";
3
+ import "./useMutation-BTsyHKyn.js";
4
+ import "./useQuery-BggIE52P.js";
5
+ import { t as UserProfilePage_default } from "./UserProfilePage-C3b93Keh.js";
6
+
7
+ export { UserProfilePage_default as default };
@@ -0,0 +1,9 @@
1
+ import "./useRpcAuth-rmHf7bYx.js";
2
+ import "./useQueryCache-Bjm-S8v5.js";
3
+ import "./useMutation-BTsyHKyn.js";
4
+ import "./useQuery-BggIE52P.js";
5
+ import "./AppLink-CHMMrSFI.js";
6
+ import "./useEmailVerificationChannel-BNi926Ho.js";
7
+ import { t as VerifyEmail_default } from "./VerifyEmail-DlOmWGG-.js";
8
+
9
+ export { VerifyEmail_default as default };
@@ -0,0 +1,257 @@
1
+ import { l as useUserSessionStore, m as useEnv } from "./useRpcAuth-rmHf7bYx.js";
2
+ import { t as useMutation } from "./useMutation-BTsyHKyn.js";
3
+ import { t as useQuery } from "./useQuery-BggIE52P.js";
4
+ import { t as AppLink_default } from "./AppLink-CHMMrSFI.js";
5
+ import { o as withReturnUrl, r as getValidReturnUrl, t as getAndClearEmailVerificationReturnUrl } from "./useReturnUrl-qFeazn-G.js";
6
+ import { t as useEmailVerificationChannel } from "./useEmailVerificationChannel-BNi926Ho.js";
7
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createStaticVNode, createTextVNode, createVNode, defineComponent, onUnmounted, openBlock, ref, toDisplayString, unref, withCtx } from "vue";
8
+ import { useRoute, useRouter } from "vue-router";
9
+ import { toast } from "vue3-toastify";
10
+
11
+ //#region src/slices/auth/features/verify_email/VerifyEmail.vue
12
+ const _hoisted_1 = { class: "max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container" };
13
+ const _hoisted_2 = { class: "text-center" };
14
+ const _hoisted_3 = {
15
+ key: 0,
16
+ class: "space-y-4"
17
+ };
18
+ const _hoisted_4 = {
19
+ key: 0,
20
+ class: "text-sm text-base-content/80 text-left font-medium"
21
+ };
22
+ const _hoisted_5 = { class: "flex flex-col gap-2 items-center pt-2" };
23
+ const _hoisted_6 = ["disabled"];
24
+ const _hoisted_7 = { class: "space-y-4" };
25
+ const _hoisted_8 = {
26
+ key: 0,
27
+ class: "text-sm text-base-content/80 font-medium"
28
+ };
29
+ const _hoisted_9 = ["disabled"];
30
+ const _hoisted_10 = { class: "space-y-4" };
31
+ const _hoisted_11 = {
32
+ key: 0,
33
+ class: "text-sm text-base-content/70"
34
+ };
35
+ const _hoisted_12 = {
36
+ key: 1,
37
+ class: "text-sm text-base-content/70"
38
+ };
39
+ const _hoisted_13 = {
40
+ key: 2,
41
+ class: "text-sm text-base-content/60"
42
+ };
43
+ const _hoisted_14 = { class: "space-y-4" };
44
+ const _hoisted_15 = { class: "text-sm text-base-content/70" };
45
+ const _hoisted_16 = { class: "flex flex-col gap-2 items-center" };
46
+ const _hoisted_17 = ["disabled"];
47
+ const AUTH_CHANNEL = "auth";
48
+ const _sfc_main = /* @__PURE__ */ defineComponent({
49
+ __name: "VerifyEmail",
50
+ setup(__props) {
51
+ const route = useRoute();
52
+ const router = useRouter();
53
+ const returnUrl = computed(() => route.query.returnUrl);
54
+ const loginLink = computed(() => withReturnUrl("/auth/login", returnUrl.value));
55
+ const appLink = computed(() => getValidReturnUrl(route, "/"));
56
+ const sessionStore = useUserSessionStore();
57
+ const { emailVerificationMode } = useEnv();
58
+ const token = route.query.token ?? route.params.token;
59
+ const status = ref("idle");
60
+ const errorMessage = ref("");
61
+ const verifyEmailApi = ref(false);
62
+ const resendLoading = ref(false);
63
+ const resendCountdown = ref(0);
64
+ let resendCountdownInterval = null;
65
+ const verifyLoading = ref(false);
66
+ const redirectTarget = ref(null);
67
+ const isLoggedIn = computed(() => !!sessionStore.userSession?.user.userId);
68
+ useEmailVerificationChannel(computed(() => !token && status.value !== "loading" && status.value !== "success"), (targetUrl) => router.push(targetUrl), () => getValidReturnUrl(route, "/"));
69
+ const { mutate: verifyMutate } = useMutation((api, tokenToVerify) => {
70
+ const verifyEmail = api.verifyEmail;
71
+ if (!verifyEmail) throw new Error("Email verification is not configured");
72
+ return verifyEmail.verifyEmail(tokenToVerify);
73
+ }, {
74
+ skipAuthCheck: true,
75
+ credentials: "include"
76
+ });
77
+ const { mutate: resendMutate } = useMutation((api, _input) => {
78
+ const verifyEmail = api.verifyEmail;
79
+ if (!verifyEmail) throw new Error("Email verification is not configured");
80
+ return verifyEmail.resendVerificationEmail();
81
+ }, { skipAuthCheck: false });
82
+ async function handleVerify() {
83
+ if (!token) return;
84
+ if (emailVerificationMode === "disabled") {
85
+ status.value = "error";
86
+ errorMessage.value = "Email verification is not enabled for this application.";
87
+ return;
88
+ }
89
+ try {
90
+ status.value = "loading";
91
+ verifyLoading.value = true;
92
+ errorMessage.value = "";
93
+ const result = await verifyMutate(token);
94
+ verifyEmailApi.value = true;
95
+ if (result?.ok) {
96
+ status.value = "success";
97
+ const hadSession = !!(result.session?.access_token && result.session?.user_details_token);
98
+ if (hadSession) {
99
+ sessionStore.setSession(result.session.user_details_token);
100
+ sessionStore.setAccessToken(result.session.access_token);
101
+ } else try {
102
+ await sessionStore.refreshToken();
103
+ } catch {}
104
+ const channel = new BroadcastChannel(AUTH_CHANNEL);
105
+ channel.postMessage({ type: "email_verified" });
106
+ channel.close();
107
+ const target = getAndClearEmailVerificationReturnUrl() ?? (hadSession ? "/" : null);
108
+ if (target) {
109
+ redirectTarget.value = target;
110
+ setTimeout(() => router.push(target), 1e3);
111
+ }
112
+ } else {
113
+ status.value = "error";
114
+ errorMessage.value = "The link may have expired. Please try again or resend the verification email.";
115
+ }
116
+ } catch (error) {
117
+ status.value = "error";
118
+ errorMessage.value = error instanceof Error ? error.message : "Something went wrong. The link may have expired.";
119
+ verifyEmailApi.value = true;
120
+ } finally {
121
+ verifyLoading.value = false;
122
+ }
123
+ }
124
+ function startResendCountdown(seconds) {
125
+ if (resendCountdownInterval) {
126
+ clearInterval(resendCountdownInterval);
127
+ resendCountdownInterval = null;
128
+ }
129
+ resendCountdown.value = seconds;
130
+ resendCountdownInterval = setInterval(() => {
131
+ resendCountdown.value = Math.max(0, resendCountdown.value - 1);
132
+ if (resendCountdown.value <= 0 && resendCountdownInterval) {
133
+ clearInterval(resendCountdownInterval);
134
+ resendCountdownInterval = null;
135
+ }
136
+ }, 1e3);
137
+ }
138
+ const resendVerification = async () => {
139
+ try {
140
+ resendLoading.value = true;
141
+ const result = await resendMutate(void 0);
142
+ if (result?.ok) if (result.sent) {
143
+ toast.success("Verification email sent. Please check your inbox.");
144
+ startResendCountdown(60);
145
+ } else if (result.seconds_until_next_send != null) {
146
+ toast.info(`Please wait ${result.seconds_until_next_send} seconds before resending.`);
147
+ startResendCountdown(result.seconds_until_next_send);
148
+ } else {
149
+ toast.success("Verification email sent. Please check your inbox.");
150
+ startResendCountdown(60);
151
+ }
152
+ else toast.error("Failed to resend verification email.");
153
+ } catch (error) {
154
+ toast.error(error instanceof Error ? error.message : "Failed to resend");
155
+ } finally {
156
+ resendLoading.value = false;
157
+ }
158
+ };
159
+ onUnmounted(() => {
160
+ resendCountdownInterval && clearInterval(resendCountdownInterval);
161
+ });
162
+ useQuery((api) => {
163
+ verifyEmailApi.value = !!api.verifyEmail;
164
+ return Promise.resolve(true);
165
+ }, {
166
+ enabled: isLoggedIn,
167
+ staleTime: 3600 * 1e3
168
+ });
169
+ return (_ctx, _cache) => {
170
+ return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createCommentVNode(" State A: No token (after signup, waiting for email) "), !unref(token) && status.value !== "loading" && status.value !== "success" ? (openBlock(), createElementBlock("div", _hoisted_3, [
171
+ _cache[1] || (_cache[1] = createElementVNode("h3", { class: "text-lg font-semibold" }, "Check your email", -1)),
172
+ _cache[2] || (_cache[2] = createElementVNode("p", { class: "text-sm text-base-content/70 text-left" }, " We've sent a verification email to your inbox. It may take a couple of minutes to arrive. Be sure to check your junk or spam folder if you don't see it. ", -1)),
173
+ _cache[3] || (_cache[3] = createElementVNode("p", { class: "text-sm text-base-content/70 text-left" }, " When you receive the email, click the link inside. You'll land on a page where you need to click the \"Verify email\" button to complete verification. ", -1)),
174
+ unref(emailVerificationMode) === "strict" ? (openBlock(), createElementBlock("p", _hoisted_4, " Application access is restricted until email verification is completed. ")) : createCommentVNode("v-if", true),
175
+ createElementVNode("div", _hoisted_5, [unref(emailVerificationMode) !== "strict" ? (openBlock(), createBlock(AppLink_default, {
176
+ key: 0,
177
+ to: appLink.value,
178
+ class: "btn btn-outline btn-sm"
179
+ }, {
180
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" Continue to app ", -1)])]),
181
+ _: 1
182
+ }, 8, ["to"])) : createCommentVNode("v-if", true), isLoggedIn.value && verifyEmailApi.value ? (openBlock(), createElementBlock("button", {
183
+ key: 1,
184
+ type: "button",
185
+ class: "btn btn-outline btn-sm",
186
+ disabled: resendLoading.value || resendCountdown.value > 0,
187
+ onClick: resendVerification
188
+ }, toDisplayString(resendLoading.value ? "Sending..." : resendCountdown.value > 0 ? `Try again in ${resendCountdown.value}` : "Resend verification email"), 9, _hoisted_6)) : createCommentVNode("v-if", true)])
189
+ ])) : unref(token) && status.value !== "loading" && status.value !== "success" && status.value !== "error" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" State B: Token present, waiting for user to click verify "), createElementVNode("div", _hoisted_7, [
190
+ _cache[4] || (_cache[4] = createElementVNode("h3", { class: "text-lg font-semibold" }, "Verify your email", -1)),
191
+ _cache[5] || (_cache[5] = createElementVNode("p", { class: "text-sm text-base-content/70" }, " Click the button below to complete verification. You'll be redirected once it's done. ", -1)),
192
+ unref(emailVerificationMode) === "strict" ? (openBlock(), createElementBlock("p", _hoisted_8, " Application access is restricted until email verification is completed. ")) : createCommentVNode("v-if", true),
193
+ createElementVNode("button", {
194
+ type: "button",
195
+ class: "btn btn-primary",
196
+ disabled: verifyLoading.value,
197
+ onClick: handleVerify
198
+ }, toDisplayString(verifyLoading.value ? "Verifying..." : "Verify email"), 9, _hoisted_9)
199
+ ])], 2112)) : status.value === "loading" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" Loading (after clicking verify) "), _cache[6] || (_cache[6] = createElementVNode("div", { class: "space-y-4" }, [createElementVNode("span", { class: "loading loading-spinner loading-lg text-primary" }), createElementVNode("p", { class: "text-sm text-base-content/70" }, "Verifying your email...")], -1))], 2112)) : status.value === "success" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createCommentVNode(" Success "), createElementVNode("div", _hoisted_10, [
200
+ _cache[13] || (_cache[13] = createElementVNode("div", { class: "w-14 h-14 rounded-full bg-success/20 flex items-center justify-center mx-auto" }, [createElementVNode("svg", {
201
+ xmlns: "http://www.w3.org/2000/svg",
202
+ class: "w-7 h-7 text-success",
203
+ viewBox: "0 0 24 24",
204
+ fill: "none",
205
+ stroke: "currentColor",
206
+ "stroke-width": "2",
207
+ "stroke-linecap": "round",
208
+ "stroke-linejoin": "round"
209
+ }, [createElementVNode("polyline", { points: "20 6 9 17 4 12" })])], -1)),
210
+ _cache[14] || (_cache[14] = createElementVNode("h3", { class: "text-lg font-semibold" }, "Email verified!", -1)),
211
+ redirectTarget.value ? (openBlock(), createElementBlock("p", _hoisted_11, "Redirecting you...")) : (openBlock(), createElementBlock("p", _hoisted_12, [
212
+ _cache[8] || (_cache[8] = createTextVNode(" Your email has been verified. Switch back to your other tab to continue, or ", -1)),
213
+ createVNode(AppLink_default, {
214
+ to: appLink.value,
215
+ class: "link link-primary"
216
+ }, {
217
+ default: withCtx(() => [..._cache[7] || (_cache[7] = [createTextVNode("continue to the app", -1)])]),
218
+ _: 1
219
+ }, 8, ["to"]),
220
+ _cache[9] || (_cache[9] = createTextVNode(". ", -1))
221
+ ])),
222
+ redirectTarget.value ? (openBlock(), createElementBlock("p", _hoisted_13, [
223
+ _cache[11] || (_cache[11] = createTextVNode(" If you aren't redirected automatically, ", -1)),
224
+ createVNode(AppLink_default, {
225
+ to: redirectTarget.value,
226
+ class: "link link-primary"
227
+ }, {
228
+ default: withCtx(() => [..._cache[10] || (_cache[10] = [createTextVNode("click here", -1)])]),
229
+ _: 1
230
+ }, 8, ["to"]),
231
+ _cache[12] || (_cache[12] = createTextVNode(". ", -1))
232
+ ])) : createCommentVNode("v-if", true)
233
+ ])], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 4 }, [createCommentVNode(" Error "), createElementVNode("div", _hoisted_14, [
234
+ _cache[16] || (_cache[16] = createStaticVNode("<div class=\"w-14 h-14 rounded-full bg-error/20 flex items-center justify-center mx-auto\"><svg xmlns=\"http://www.w3.org/2000/svg\" class=\"w-7 h-7 text-error\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"></circle><line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"></line><line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"></line></svg></div><h3 class=\"text-lg font-semibold\">Verification failed</h3>", 2)),
235
+ createElementVNode("p", _hoisted_15, toDisplayString(errorMessage.value), 1),
236
+ createElementVNode("div", _hoisted_16, [createVNode(AppLink_default, {
237
+ to: loginLink.value,
238
+ class: "btn btn-outline btn-sm"
239
+ }, {
240
+ default: withCtx(() => [..._cache[15] || (_cache[15] = [createTextVNode("Back to login", -1)])]),
241
+ _: 1
242
+ }, 8, ["to"]), verifyEmailApi.value ? (openBlock(), createElementBlock("button", {
243
+ key: 0,
244
+ type: "button",
245
+ class: "btn btn-outline btn-sm",
246
+ disabled: resendLoading.value || resendCountdown.value > 0,
247
+ onClick: resendVerification
248
+ }, toDisplayString(resendLoading.value ? "Sending..." : resendCountdown.value > 0 ? `Try again in ${resendCountdown.value}` : "Resend verification email"), 9, _hoisted_17)) : createCommentVNode("v-if", true)])
249
+ ])], 2112))])]);
250
+ };
251
+ }
252
+ });
253
+ var VerifyEmail_default = _sfc_main;
254
+
255
+ //#endregion
256
+ export { VerifyEmail_default as t };
257
+ //# sourceMappingURL=VerifyEmail-DlOmWGG-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerifyEmail-DlOmWGG-.js","names":["resendCountdownInterval: ReturnType<typeof setInterval> | null"],"sources":["../src/slices/auth/features/verify_email/VerifyEmail.vue"],"sourcesContent":["<template>\n <div class=\"max-w-md mx-auto bg-base-200 p-6 rounded-xl shadow-md container\">\n <div class=\"text-center\">\n <!-- State A: No token (after signup, waiting for email) -->\n <div v-if=\"!token && status !== 'loading' && status !== 'success'\" class=\"space-y-4\">\n <h3 class=\"text-lg font-semibold\">Check your email</h3>\n <p class=\"text-sm text-base-content/70 text-left\">\n We've sent a verification email to your inbox. It may take a couple of minutes to\n arrive. Be sure to check your junk or spam folder if you don't see it.\n </p>\n <p class=\"text-sm text-base-content/70 text-left\">\n When you receive the email, click the link inside. You'll land on a page where you\n need to click the \"Verify email\" button to complete verification.\n </p>\n <p\n v-if=\"emailVerificationMode === 'strict'\"\n class=\"text-sm text-base-content/80 text-left font-medium\"\n >\n Application access is restricted until email verification is completed.\n </p>\n <div class=\"flex flex-col gap-2 items-center pt-2\">\n <AppLink\n v-if=\"emailVerificationMode !== 'strict'\"\n :to=\"appLink\"\n class=\"btn btn-outline btn-sm\"\n >\n Continue to app\n </AppLink>\n <button\n v-if=\"isLoggedIn && verifyEmailApi\"\n type=\"button\"\n class=\"btn btn-outline btn-sm\"\n :disabled=\"resendLoading || resendCountdown > 0\"\n @click=\"resendVerification\"\n >\n {{\n resendLoading\n ? 'Sending...'\n : resendCountdown > 0\n ? `Try again in ${resendCountdown}`\n : 'Resend verification email'\n }}\n </button>\n </div>\n </div>\n\n <!-- State B: Token present, waiting for user to click verify -->\n <div\n v-else-if=\"token && status !== 'loading' && status !== 'success' && status !== 'error'\"\n class=\"space-y-4\"\n >\n <h3 class=\"text-lg font-semibold\">Verify your email</h3>\n <p class=\"text-sm text-base-content/70\">\n Click the button below to complete verification. You'll be redirected once it's done.\n </p>\n <p\n v-if=\"emailVerificationMode === 'strict'\"\n class=\"text-sm text-base-content/80 font-medium\"\n >\n Application access is restricted until email verification is completed.\n </p>\n <button\n type=\"button\"\n class=\"btn btn-primary\"\n :disabled=\"verifyLoading\"\n @click=\"handleVerify\"\n >\n {{ verifyLoading ? 'Verifying...' : 'Verify email' }}\n </button>\n </div>\n\n <!-- Loading (after clicking verify) -->\n <div v-else-if=\"status === 'loading'\" class=\"space-y-4\">\n <span class=\"loading loading-spinner loading-lg text-primary\"></span>\n <p class=\"text-sm text-base-content/70\">Verifying your email...</p>\n </div>\n\n <!-- Success -->\n <div v-else-if=\"status === 'success'\" class=\"space-y-4\">\n <div\n class=\"w-14 h-14 rounded-full bg-success/20 flex items-center justify-center mx-auto\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"w-7 h-7 text-success\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n </div>\n <h3 class=\"text-lg font-semibold\">Email verified!</h3>\n <p v-if=\"redirectTarget\" class=\"text-sm text-base-content/70\">Redirecting you...</p>\n <p v-else class=\"text-sm text-base-content/70\">\n Your email has been verified. Switch back to your other tab to continue, or\n <AppLink :to=\"appLink\" class=\"link link-primary\">continue to the app</AppLink>.\n </p>\n <p v-if=\"redirectTarget\" class=\"text-sm text-base-content/60\">\n If you aren't redirected automatically,\n <AppLink :to=\"redirectTarget\" class=\"link link-primary\">click here</AppLink>.\n </p>\n </div>\n\n <!-- Error -->\n <div v-else class=\"space-y-4\">\n <div\n class=\"w-14 h-14 rounded-full bg-error/20 flex items-center justify-center mx-auto\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"w-7 h-7 text-error\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\" />\n <line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\" />\n </svg>\n </div>\n <h3 class=\"text-lg font-semibold\">Verification failed</h3>\n <p class=\"text-sm text-base-content/70\">{{ errorMessage }}</p>\n <div class=\"flex flex-col gap-2 items-center\">\n <AppLink :to=\"loginLink\" class=\"btn btn-outline btn-sm\">Back to login</AppLink>\n <button\n v-if=\"verifyEmailApi\"\n type=\"button\"\n class=\"btn btn-outline btn-sm\"\n :disabled=\"resendLoading || resendCountdown > 0\"\n @click=\"resendVerification\"\n >\n {{\n resendLoading\n ? 'Sending...'\n : resendCountdown > 0\n ? `Try again in ${resendCountdown}`\n : 'Resend verification email'\n }}\n </button>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { DragoncoreApi, EmailVerificationApi } from '@dragonmastery/dragoncore-shared';\nimport { computed, onUnmounted, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router';\nimport { toast } from 'vue3-toastify';\nimport AppLink from '../../../../components/AppLink.vue';\nimport { useEnv } from '../../../../composables/useEnv';\nimport { useMutation } from '../../../../composables/useMutation';\nimport { useQuery } from '../../../../composables/useQuery';\nimport { useUserSessionStore } from '../../../../composables/useUserSessionStore';\nimport {\n getAndClearEmailVerificationReturnUrl,\n getValidReturnUrl,\n withReturnUrl,\n} from '../../../../utils/useReturnUrl';\nimport { useEmailVerificationChannel } from '../../useEmailVerificationChannel';\n\nconst AUTH_CHANNEL = 'auth';\n\nconst route = useRoute();\nconst router = useRouter();\nconst returnUrl = computed(() => route.query.returnUrl as string | undefined);\nconst loginLink = computed(() => withReturnUrl('/auth/login', returnUrl.value));\nconst appLink = computed(() => getValidReturnUrl(route, '/'));\nconst sessionStore = useUserSessionStore();\nconst { emailVerificationMode } = useEnv();\n\n// Support token from query (?token=xxx) or params (/verify-email/:token)\nconst token = (route.query.token ?? route.params.token) as string;\n\nconst status = ref<'idle' | 'loading' | 'success' | 'error'>('idle');\nconst errorMessage = ref('');\nconst verifyEmailApi = ref(false);\nconst resendLoading = ref(false);\nconst resendCountdown = ref(0);\nlet resendCountdownInterval: ReturnType<typeof setInterval> | null = null;\nconst verifyLoading = ref(false);\nconst redirectTarget = ref<string | null>(null);\n\nconst isLoggedIn = computed(() => !!sessionStore.userSession?.user.userId);\n\n// When on \"Check your email\" (no token), listen for verification in another tab\nconst isAwaitingVerification = computed(\n () => !token && status.value !== 'loading' && status.value !== 'success',\n);\nuseEmailVerificationChannel(\n isAwaitingVerification,\n (targetUrl) => router.push(targetUrl),\n () => getValidReturnUrl(route, '/'),\n);\n\nconst { mutate: verifyMutate } = useMutation(\n (api, tokenToVerify: string) => {\n const verifyEmail = (api as DragoncoreApi).verifyEmail;\n if (!verifyEmail) throw new Error('Email verification is not configured');\n return (verifyEmail as EmailVerificationApi).verifyEmail(tokenToVerify);\n },\n { skipAuthCheck: true, credentials: 'include' },\n);\n\nconst { mutate: resendMutate } = useMutation(\n (api, _input?: unknown) => {\n const verifyEmail = (api as DragoncoreApi).verifyEmail;\n if (!verifyEmail) throw new Error('Email verification is not configured');\n return (verifyEmail as EmailVerificationApi).resendVerificationEmail();\n },\n { skipAuthCheck: false },\n);\n\nasync function handleVerify() {\n if (!token) return;\n\n if (emailVerificationMode === 'disabled') {\n status.value = 'error';\n errorMessage.value = 'Email verification is not enabled for this application.';\n return;\n }\n\n try {\n status.value = 'loading';\n verifyLoading.value = true;\n errorMessage.value = '';\n const result = await verifyMutate(token);\n verifyEmailApi.value = true;\n if (result?.ok) {\n status.value = 'success';\n const hadSession = !!(\n result.session?.access_token && result.session?.user_details_token\n );\n if (hadSession) {\n sessionStore.setSession(result.session!.user_details_token);\n sessionStore.setAccessToken(result.session!.access_token);\n } else {\n try {\n await sessionStore.refreshToken();\n } catch {\n // User may need to log in again; that's ok\n }\n }\n const channel = new BroadcastChannel(AUTH_CHANNEL);\n channel.postMessage({ type: 'email_verified' });\n channel.close();\n const storedReturnUrl = getAndClearEmailVerificationReturnUrl();\n const target = storedReturnUrl ?? (hadSession ? '/' : null);\n if (target) {\n redirectTarget.value = target;\n setTimeout(() => router.push(target), 1000);\n }\n } else {\n status.value = 'error';\n errorMessage.value =\n 'The link may have expired. Please try again or resend the verification email.';\n }\n } catch (error) {\n status.value = 'error';\n errorMessage.value =\n error instanceof Error\n ? error.message\n : 'Something went wrong. The link may have expired.';\n verifyEmailApi.value = true;\n } finally {\n verifyLoading.value = false;\n }\n}\n\nfunction startResendCountdown(seconds: number) {\n if (resendCountdownInterval) {\n clearInterval(resendCountdownInterval);\n resendCountdownInterval = null;\n }\n resendCountdown.value = seconds;\n resendCountdownInterval = setInterval(() => {\n resendCountdown.value = Math.max(0, resendCountdown.value - 1);\n if (resendCountdown.value <= 0 && resendCountdownInterval) {\n clearInterval(resendCountdownInterval);\n resendCountdownInterval = null;\n }\n }, 1000);\n}\n\nconst resendVerification = async () => {\n try {\n resendLoading.value = true;\n const result = await resendMutate(undefined);\n if (result?.ok) {\n if (result.sent) {\n toast.success('Verification email sent. Please check your inbox.');\n startResendCountdown(60);\n } else if (result.seconds_until_next_send != null) {\n toast.info(`Please wait ${result.seconds_until_next_send} seconds before resending.`);\n startResendCountdown(result.seconds_until_next_send);\n } else {\n toast.success('Verification email sent. Please check your inbox.');\n startResendCountdown(60);\n }\n } else {\n toast.error('Failed to resend verification email.');\n }\n } catch (error) {\n toast.error(error instanceof Error ? error.message : 'Failed to resend');\n } finally {\n resendLoading.value = false;\n }\n};\n\nonUnmounted(() => {\n resendCountdownInterval && clearInterval(resendCountdownInterval);\n});\n\n// Detect if verifyEmail API is available (for resend button)\nuseQuery(\n (api) => {\n verifyEmailApi.value = !!(api as DragoncoreApi).verifyEmail;\n return Promise.resolve(true);\n },\n { enabled: isLoggedIn, staleTime: 60 * 60 * 1000 },\n);\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyKA,MAAM,eAAe;;;;EAErB,MAAM,QAAQ,UAAU;EACxB,MAAM,SAAS,WAAW;EAC1B,MAAM,YAAY,eAAe,MAAM,MAAM,UAAgC;EAC7E,MAAM,YAAY,eAAe,cAAc,eAAe,UAAU,MAAM,CAAC;EAC/E,MAAM,UAAU,eAAe,kBAAkB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3
+ import "./useMutation-BTsyHKyn.js";
4
+ import "./useQuery-BggIE52P.js";
5
+ import { st as ViewTeam_default } from "./src-QZJyMfGX.js";
6
+ import "./AppLink-CHMMrSFI.js";
7
+ import "./TimelineSystemEvent-BHzFr46C.js";
8
+ import "./TeamMembersTab-4gmnP9sD.js";
9
+ import "./Appearance-DxWTyx1M.js";
10
+ import "./useSignupPendingData-BWHwUHhL.js";
11
+ import "./useBreadcrumbs-qB6ghsAf.js";
12
+ import "./EditTeamMemberForm-CaS2GLjV.js";
13
+ import "./RecordVersionViewer-BWZ78vvE.js";
14
+ import "./TeamHistoryTab-D5biUPmq.js";
15
+ import "./UserProfilePage-C3b93Keh.js";
16
+ import "./ChangePasswordPage--3XwluwE.js";
17
+ import "./TeamNotesTab-BzGZZ1h8.js";
18
+ import "./CustomerSupportTicketParent-HIxwSVdu.js";
19
+ import "./SupportTicketDevLifecycleBadge-EMrQHfyG.js";
20
+ import "./StaffSupportTicketParent-CilR4RGM.js";
21
+ import "./LoginForm-9UFnA-fO.js";
22
+ import "./useEmailVerificationChannel-BNi926Ho.js";
23
+ import "./Signup-9TjMMnU4.js";
24
+ import "./ForgotPassword-OjIPi9s9.js";
25
+ import "./ResetPassword-BE4mXK9q.js";
26
+ import "./Logout-YgTgOFUH.js";
27
+ import "./mfaSchema-BnRWf0ma.js";
28
+ import "./MfaSetup-RtFMY_dj.js";
29
+ import "./MfaVerify-Cvhe8bEM.js";
30
+ import "./VerifyEmail-DlOmWGG-.js";
31
+ import "./UserListPage-DUE5gJTo.js";
32
+ import "./CreateUserPage-DLwXeLAq.js";
33
+ import "./EditUserPage-DURc5rmi.js";
34
+
35
+ export { ViewTeam_default as default };
@@ -0,0 +1,35 @@
1
+ import "./useRpcAuth-rmHf7bYx.js";
2
+ import "./useQueryCache-Bjm-S8v5.js";
3
+ import "./useMutation-BTsyHKyn.js";
4
+ import "./useQuery-BggIE52P.js";
5
+ import { tt as ViewTeamMember_default } from "./src-QZJyMfGX.js";
6
+ import "./AppLink-CHMMrSFI.js";
7
+ import "./TimelineSystemEvent-BHzFr46C.js";
8
+ import "./TeamMembersTab-4gmnP9sD.js";
9
+ import "./Appearance-DxWTyx1M.js";
10
+ import "./useSignupPendingData-BWHwUHhL.js";
11
+ import "./useBreadcrumbs-qB6ghsAf.js";
12
+ import "./EditTeamMemberForm-CaS2GLjV.js";
13
+ import "./RecordVersionViewer-BWZ78vvE.js";
14
+ import "./TeamHistoryTab-D5biUPmq.js";
15
+ import "./UserProfilePage-C3b93Keh.js";
16
+ import "./ChangePasswordPage--3XwluwE.js";
17
+ import "./TeamNotesTab-BzGZZ1h8.js";
18
+ import "./CustomerSupportTicketParent-HIxwSVdu.js";
19
+ import "./SupportTicketDevLifecycleBadge-EMrQHfyG.js";
20
+ import "./StaffSupportTicketParent-CilR4RGM.js";
21
+ import "./LoginForm-9UFnA-fO.js";
22
+ import "./useEmailVerificationChannel-BNi926Ho.js";
23
+ import "./Signup-9TjMMnU4.js";
24
+ import "./ForgotPassword-OjIPi9s9.js";
25
+ import "./ResetPassword-BE4mXK9q.js";
26
+ import "./Logout-YgTgOFUH.js";
27
+ import "./mfaSchema-BnRWf0ma.js";
28
+ import "./MfaSetup-RtFMY_dj.js";
29
+ import "./MfaVerify-Cvhe8bEM.js";
30
+ import "./VerifyEmail-DlOmWGG-.js";
31
+ import "./UserListPage-DUE5gJTo.js";
32
+ import "./CreateUserPage-DLwXeLAq.js";
33
+ import "./EditUserPage-DURc5rmi.js";
34
+
35
+ export { ViewTeamMember_default as default };