@saasicat/ui-vue 1.0.0-rc.2 → 1.0.0-rc.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 (309) hide show
  1. package/README.md +84 -19
  2. package/dist/.build-stamp +1 -1
  3. package/dist/assets/material-icons/material-icons.css +31 -0
  4. package/dist/assets/material-icons/web-font/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff +0 -0
  5. package/dist/assets/material-icons/web-font/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2 +0 -0
  6. package/dist/assets/quasar.css +11696 -0
  7. package/dist/assets/ui-vue.css +6923 -0
  8. package/dist/auth/SuperAdminLoginPage.js +213 -0
  9. package/dist/auth/SuperAdminSetupWizard.js +5 -0
  10. package/dist/{batch-column-fetcher-VwjOxerL.d.ts → batch-column-fetcher-DQ89o95K.d.cts} +5 -5
  11. package/dist/{batch-column-fetcher-Dk9X92db.d.cts → batch-column-fetcher-Sr48UWEX.d.ts} +5 -5
  12. package/dist/{catalog-C5VKGbxk.d.cts → catalog-0eZwciPW.d.cts} +125 -86
  13. package/dist/{catalog-C5VKGbxk.d.ts → catalog-0eZwciPW.d.ts} +125 -86
  14. package/dist/{chunk-L7HPDVHV.js → chunk-47HDYN35.js} +86 -7
  15. package/dist/{chunk-A7JICGQ5.js → chunk-7CHT2ATN.js} +16 -3
  16. package/dist/{chunk-P4EJF43F.js → chunk-CZIVA536.js} +358 -300
  17. package/dist/{chunk-6X6AGH66.js → chunk-RFJ4UGOE.js} +7 -4
  18. package/dist/chunk-U7LNAX6T.js +35 -0
  19. package/dist/{chunk-4CJBABLZ.js → chunk-VLGEOPZH.js} +685 -196
  20. package/dist/chunks/AdminAccordion.vue_vue_type_script_setup_true_lang-DOwlTV5_.js +175 -0
  21. package/dist/chunks/AdminBanner.vue_vue_type_script_setup_true_lang-D27JEaak.js +83 -0
  22. package/dist/chunks/AdminBody.vue_vue_type_script_setup_true_lang-DxcVRzXE.js +41 -0
  23. package/dist/chunks/AdminDialog.vue_vue_type_script_setup_true_lang-CpxfSrx-.js +138 -0
  24. package/dist/chunks/AdminEmptyState.vue_vue_type_script_setup_true_lang-jaYkgNbE.js +48 -0
  25. package/dist/chunks/AdminErrorBanner.vue_vue_type_script_setup_true_lang-t-5uqt82.js +50 -0
  26. package/dist/chunks/AdminField.vue_vue_type_script_setup_true_lang-CtPByt2w.js +63 -0
  27. package/dist/chunks/AdminFieldGrid.vue_vue_type_script_setup_true_lang-BxuyHtBU.js +21 -0
  28. package/dist/chunks/AdminFilters.vue_vue_type_script_setup_true_lang-DSnzAlwj.js +18 -0
  29. package/dist/chunks/AdminFormDialog.vue_vue_type_script_setup_true_lang-BpWshaWv.js +84 -0
  30. package/dist/chunks/AdminHero.vue_vue_type_script_setup_true_lang-CoaRxXLF.js +46 -0
  31. package/dist/chunks/AdminKpi.vue_vue_type_script_setup_true_lang-CgCcGGmY.js +79 -0
  32. package/dist/chunks/AdminPage.vue_vue_type_script_setup_true_lang-L7St_zOY.js +15 -0
  33. package/dist/chunks/AdminPaginator.vue_vue_type_script_setup_true_lang-Cv8EEBGP.js +157 -0
  34. package/dist/chunks/AdminRefreshBtn.vue_vue_type_script_setup_true_lang-Bxk5GWOB.js +41 -0
  35. package/dist/chunks/AdminSection.vue_vue_type_script_setup_true_lang-DpjApOU-.js +62 -0
  36. package/dist/chunks/AdminStatistics.vue_vue_type_script_setup_true_lang-DwHeeYCX.js +32 -0
  37. package/dist/chunks/AdminStatusPill.vue_vue_type_script_setup_true_lang-09G3rCxN.js +32 -0
  38. package/dist/chunks/AdminTable.vue_vue_type_script_setup_true_lang-BzAusc-r.js +2007 -0
  39. package/dist/chunks/ClosePopup-iyFHWknU.js +48 -0
  40. package/dist/chunks/PromoCodeEditDialog.vue_vue_type_script_setup_true_lang-NiW-Ky7H.js +639 -0
  41. package/dist/chunks/QBadge-B8LYhEVv.js +43 -0
  42. package/dist/chunks/QBtn-CSVcAwrE.js +770 -0
  43. package/dist/chunks/QCard-g0Hwqx6i.js +30 -0
  44. package/dist/chunks/QCardSection-FvPMZdQ4.js +22 -0
  45. package/dist/chunks/QCheckbox-BwxH7EyE.js +63 -0
  46. package/dist/chunks/QDialog-CcwVEueo.js +331 -0
  47. package/dist/chunks/QIcon-DaxYRLz0.js +195 -0
  48. package/dist/chunks/QInput-SRRCebo8.js +1663 -0
  49. package/dist/chunks/QItem-DunhGoPO.js +127 -0
  50. package/dist/chunks/QList-D3jMUITp.js +37 -0
  51. package/dist/chunks/QMenu-BFP-qtEm.js +831 -0
  52. package/dist/chunks/QSelect-jOvICNCy.js +1885 -0
  53. package/dist/chunks/QSeparator-CrLemO5z.js +60 -0
  54. package/dist/chunks/QSpinner-DblEBRSQ.js +57 -0
  55. package/dist/chunks/QToggle-BBogOutP.js +40 -0
  56. package/dist/chunks/QTooltip-Ch_r2hMZ.js +320 -0
  57. package/dist/chunks/SuperAdminSetupWizard-UO4j4Eyu.js +465 -0
  58. package/dist/chunks/TenantActionConfirmDialog-DU11RlmB.js +201 -0
  59. package/dist/chunks/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
  60. package/dist/chunks/catalog-i18n-tKlkm6-2.js +32 -0
  61. package/dist/chunks/create-Ck-e8kVF.js +42 -0
  62. package/dist/chunks/detached-fullscreen-DuM-R9uv.js +488 -0
  63. package/dist/chunks/focus-manager-Cc4uTjsQ.js +301 -0
  64. package/dist/chunks/format-BIQKj_qk.js +23 -0
  65. package/dist/chunks/is-DNOHJAOK.js +269 -0
  66. package/dist/chunks/plan-area-context-RiY4rHni.js +20 -0
  67. package/dist/chunks/private.use-form-BdJSI6of.js +30 -0
  68. package/dist/chunks/render-DSsuXum_.js +32 -0
  69. package/dist/chunks/symbols-Cy0ehVpr.js +67 -0
  70. package/dist/chunks/touch-B8tpYG34.js +162 -0
  71. package/dist/chunks/use-checkbox-CBtmpkdc.js +221 -0
  72. package/dist/chunks/use-dark-VmDF1SYZ.js +14 -0
  73. package/dist/chunks/use-hydration-PO-eh3w4.js +14 -0
  74. package/dist/chunks/use-prevent-scroll-B9A_pIzH.js +156 -0
  75. package/dist/chunks/use-render-cache-Bj5SbY5v.js +22 -0
  76. package/dist/chunks/use-size-C7KmPm4L.js +23 -0
  77. package/dist/chunks/vm-Dl-TBfKC.js +182 -0
  78. package/dist/client/index.cjs +488 -306
  79. package/dist/client/index.d.cts +107 -7
  80. package/dist/client/index.d.ts +107 -7
  81. package/dist/client/index.js +25 -3
  82. package/dist/index.cjs +1226 -536
  83. package/dist/index.d.cts +5 -5
  84. package/dist/index.d.ts +5 -5
  85. package/dist/index.js +53 -7
  86. package/dist/layouts/AdminLayout.js +1711 -0
  87. package/dist/pages/AdminManifestErrorPage.js +99 -0
  88. package/dist/pages/AuditPage.js +244 -0
  89. package/dist/pages/BundlesPage.js +2883 -0
  90. package/dist/pages/DashboardPage.js +299 -0
  91. package/dist/pages/DiscoveryPage.js +2563 -0
  92. package/dist/pages/EmailHistoryPage.js +509 -0
  93. package/dist/pages/MarketingCatalogPage.js +2095 -0
  94. package/dist/pages/PilotsPage.js +1197 -0
  95. package/dist/pages/PlanReviewPage.js +563 -0
  96. package/dist/pages/PlanVersionEditorPage.js +1626 -0
  97. package/dist/pages/PlansPage.js +6164 -0
  98. package/dist/pages/PlatformEmailPage.js +455 -0
  99. package/dist/pages/PromoCodeDetailPage.js +240 -0
  100. package/dist/pages/PromoCodesPage.js +567 -0
  101. package/dist/pages/SettingsPage.js +216 -0
  102. package/dist/pages/SubscriptionsPage.js +113 -0
  103. package/dist/pages/TenantDetailPage.js +393 -0
  104. package/dist/pages/TenantsPage.js +430 -0
  105. package/dist/pages/UsersPage.js +386 -0
  106. package/dist/pages/index.js +75 -0
  107. package/dist/quasar/index.cjs +388 -297
  108. package/dist/quasar/index.d.cts +13 -3
  109. package/dist/quasar/index.d.ts +13 -3
  110. package/dist/quasar/index.js +10 -6
  111. package/dist/{resource-registry-CrHUvVx6.d.cts → resource-registry-GAxu2kn6.d.ts} +32 -18
  112. package/dist/{resource-registry-Cw_c0F11.d.ts → resource-registry-zfCLvEgx.d.cts} +32 -18
  113. package/dist/testing/admin-pages-suite.cjs +4 -1
  114. package/dist/testing/admin-pages-suite.d.cts +10 -1
  115. package/dist/testing/admin-pages-suite.d.ts +10 -1
  116. package/dist/testing/admin-pages-suite.js +3 -1
  117. package/dist/testing/mount-with-quasar.cjs +65 -0
  118. package/dist/testing/mount-with-quasar.d.cts +7 -0
  119. package/dist/testing/mount-with-quasar.d.ts +7 -0
  120. package/dist/testing/mount-with-quasar.js +63 -0
  121. package/dist/ui/data/AdminKpi.js +4 -0
  122. package/dist/ui/data/AdminPaginator.js +4 -0
  123. package/dist/ui/data/AdminRowActions.js +37 -0
  124. package/dist/ui/data/AdminStatistics.js +4 -0
  125. package/dist/ui/data/AdminStatusPill.js +4 -0
  126. package/dist/ui/data/AdminTable.js +4 -0
  127. package/dist/ui/data/KvBlock.js +24 -0
  128. package/dist/ui/entitlement/FeatureGate.js +25 -0
  129. package/dist/ui/feedback/AdminBanner.js +4 -0
  130. package/dist/ui/feedback/AdminEmptyState.js +4 -0
  131. package/dist/ui/feedback/AdminErrorBanner.js +4 -0
  132. package/dist/ui/feedback/AdminRefreshBtn.js +4 -0
  133. package/dist/ui/overlay/AdminConfirmDialog.js +112 -0
  134. package/dist/ui/overlay/AdminDialog.js +4 -0
  135. package/dist/ui/overlay/AdminFormDialog.js +4 -0
  136. package/dist/ui/overlay/MfaPromptDialog.js +131 -0
  137. package/dist/ui/page/AdminAccordion.js +4 -0
  138. package/dist/ui/page/AdminBody.js +4 -0
  139. package/dist/ui/page/AdminField.js +4 -0
  140. package/dist/ui/page/AdminFieldGrid.js +4 -0
  141. package/dist/ui/page/AdminFilters.js +4 -0
  142. package/dist/ui/page/AdminHero.js +4 -0
  143. package/dist/ui/page/AdminPage.js +4 -0
  144. package/dist/ui/page/AdminSection.js +4 -0
  145. package/dist/ui/page/AdminToolbar.js +35 -0
  146. package/dist/ui/page/LocaleSwitcher.js +90 -0
  147. package/dist/ui/page/ThemeSwitcher.js +95 -0
  148. package/dist/ui/page/WizardStepper.js +55 -0
  149. package/dist/vue/index.cjs +1135 -524
  150. package/dist/vue/index.d.cts +520 -44
  151. package/dist/vue/index.d.ts +520 -44
  152. package/dist/vue/index.js +30 -6
  153. package/package.json +30 -15
  154. package/src/auth/SuperAdminLoginPage.vue +16 -16
  155. package/src/auth/SuperAdminSetupWizard.vue +33 -28
  156. package/src/client/admin-resource-client.ts +23 -8
  157. package/src/client/billing-area.ts +14 -0
  158. package/src/client/brand-bridge.ts +98 -0
  159. package/src/client/http/axios-http-client.ts +4 -3
  160. package/src/client/http-json.ts +16 -3
  161. package/src/client/i18n/messages/audit.ts +1 -0
  162. package/src/client/i18n/messages/bundles.ts +17 -4
  163. package/src/client/i18n/messages/common.ts +1 -0
  164. package/src/client/i18n/messages/dashboard.ts +1 -0
  165. package/src/client/i18n/messages/discovery.ts +10 -19
  166. package/src/client/i18n/messages/email.ts +1 -0
  167. package/src/client/i18n/messages/errors.ts +1 -0
  168. package/src/client/i18n/messages/marketing.ts +7 -2
  169. package/src/client/i18n/messages/nav.ts +3 -0
  170. package/src/client/i18n/messages/pilots.ts +1 -0
  171. package/src/client/i18n/messages/plan-detail.ts +1 -0
  172. package/src/client/i18n/messages/plan-editor.ts +1 -0
  173. package/src/client/i18n/messages/plan-versions.ts +3 -4
  174. package/src/client/i18n/messages/plans.ts +9 -4
  175. package/src/client/i18n/messages/promos.ts +3 -0
  176. package/src/client/i18n/messages/settings.ts +75 -0
  177. package/src/client/i18n/messages/shell.ts +1 -0
  178. package/src/client/i18n/messages/tenants.ts +1 -0
  179. package/src/client/i18n/messages/users.ts +1 -0
  180. package/src/client/i18n/messages.ts +3 -0
  181. package/src/client/index.ts +10 -0
  182. package/src/client/mfa-header.ts +14 -0
  183. package/src/client/nav-builder.ts +7 -4
  184. package/src/client/reorder-priorities.ts +76 -0
  185. package/src/client/resources/bundles.resource.ts +24 -38
  186. package/src/client/resources/catalog.resource.ts +91 -113
  187. package/src/client/resources/define-resource.ts +2 -75
  188. package/src/client/resources/index.ts +3 -0
  189. package/src/client/resources/marketing.resource.ts +77 -80
  190. package/src/client/resources/pilots.resource.ts +1 -11
  191. package/src/client/resources/plans.resource.ts +47 -64
  192. package/src/client/resources/platform-email.resource.ts +1 -11
  193. package/src/client/resources/promotions.resource.ts +18 -25
  194. package/src/client/resources/settings.resource.ts +68 -0
  195. package/src/client/resources/tenants.resource.ts +10 -4
  196. package/src/client/resources/users.resource.ts +3 -2
  197. package/src/client/settings-view.ts +50 -0
  198. package/src/client/version-change-fields.ts +17 -0
  199. package/src/features/bundle/BundleVersionInlineEditor.vue +112 -155
  200. package/src/features/bundle/BundleVersionPublishDialog.vue +34 -16
  201. package/src/features/bundle/BundleVersionStrip.vue +25 -31
  202. package/src/features/bundle/VersionDiffPreview.vue +21 -15
  203. package/src/features/bundle/internal/BundleCreatePanel.vue +65 -119
  204. package/src/features/bundle/internal/BundleFeaturesEditor.vue +18 -31
  205. package/src/features/bundle/internal/BundlePlanCompatPicker.vue +23 -29
  206. package/src/features/bundle/internal/BundleQuotasEditor.vue +20 -41
  207. package/src/features/bundle/internal/BundleStatusBanner.vue +16 -70
  208. package/src/features/marketing/MarketingPromotionsTab.vue +155 -122
  209. package/src/features/plan/PlanCreateDialog.vue +49 -129
  210. package/src/features/plan/PlanDetail.vue +57 -76
  211. package/src/features/plan/PlanList.vue +81 -156
  212. package/src/features/plan/PlanMatrix.vue +89 -158
  213. package/src/features/plan/PlanReview.vue +62 -80
  214. package/src/features/plan/PlanVersionEditor.vue +134 -238
  215. package/src/features/plan/internal/PlanCatalogPreview.vue +22 -68
  216. package/src/features/plan/internal/PlanComponentPool.vue +18 -88
  217. package/src/features/plan/internal/PlanTitleEdit.vue +12 -9
  218. package/src/features/plan/internal/PlanVersionBasket.vue +65 -89
  219. package/src/features/plan/internal/PlanVersionEditorHeader.vue +16 -20
  220. package/src/features/plan/internal/PlanVersionsPanel.vue +29 -75
  221. package/src/features/tenant/TenantActionConfirmDialog.vue +4 -4
  222. package/src/index.ts +9 -0
  223. package/src/internal/bundles-page/BundleAccordionList.vue +32 -2
  224. package/src/internal/bundles-page/BundleDetailPanel.vue +37 -21
  225. package/src/internal/bundles-page/BundlesToolbar.vue +9 -5
  226. package/src/internal/dialogs/PilotCreateDialog.vue +65 -104
  227. package/src/internal/dialogs/PilotEditDialog.vue +22 -23
  228. package/src/internal/dialogs/PromoCodeCreateDialog.vue +27 -23
  229. package/src/internal/dialogs/PromoCodeDialogFields.vue +203 -252
  230. package/src/internal/dialogs/PromoCodeEditDialog.vue +52 -48
  231. package/src/internal/dialogs/pilot-dialog.css +16 -111
  232. package/src/internal/discovery-page/CatalogEntryTransPanel.vue +18 -18
  233. package/src/internal/discovery-page/DiscoveryCapList.vue +20 -20
  234. package/src/internal/discovery-page/DiscoveryFeatureCard.vue +20 -20
  235. package/src/internal/discovery-page/DiscoveryQuotaCard.vue +10 -10
  236. package/src/internal/discovery-page/DiscoveryStatusControl.vue +1 -1
  237. package/src/internal/marketing-catalog-page/MarketingCatalogAdmin.vue +660 -0
  238. package/src/internal/{marketing-catalog → marketing-catalog-page}/MarketingCatalogHeader.vue +21 -16
  239. package/src/internal/{marketing-catalog → marketing-catalog-page}/MarketingCatalogPreview.vue +26 -13
  240. package/src/internal/{marketing-catalog → marketing-catalog-page}/MarketingCatalogToolbar.vue +14 -10
  241. package/src/internal/plan-versions/PlanDiffCard.vue +15 -15
  242. package/src/internal/plan-versions/PlanVersionsDiff.vue +11 -11
  243. package/src/internal/plan-versions/PlanVersionsTimeline.vue +35 -31
  244. package/src/internal/plans-page/PlanBundleOverview.vue +8 -8
  245. package/src/internal/plans-page/PlanPublishDialog.vue +2 -2
  246. package/src/internal/tenant-detail/TenantUsage.vue +3 -3
  247. package/src/internal/tenant-detail/types.ts +2 -2
  248. package/src/layouts/AdminLayout.vue +22 -22
  249. package/src/pages/AdminManifestErrorPage.vue +7 -7
  250. package/src/pages/AuditPage.vue +2 -2
  251. package/src/pages/BundlesPage.vue +81 -89
  252. package/src/pages/DashboardPage.vue +106 -97
  253. package/src/pages/DiscoveryPage.vue +22 -28
  254. package/src/pages/EmailHistoryPage.vue +26 -34
  255. package/src/pages/MarketingCatalogPage.vue +289 -281
  256. package/src/pages/PilotsPage.vue +22 -35
  257. package/src/pages/PlanVersionEditorPage.vue +1 -1
  258. package/src/pages/PlansPage.vue +181 -107
  259. package/src/pages/PlatformEmailPage.vue +33 -41
  260. package/src/pages/PromoCodeDetailPage.vue +12 -18
  261. package/src/pages/PromoCodesPage.vue +36 -14
  262. package/src/pages/SettingsPage.vue +226 -0
  263. package/src/pages/TenantDetailPage.vue +28 -53
  264. package/src/pages/TenantsPage.vue +7 -7
  265. package/src/pages/UsersPage.vue +7 -20
  266. package/src/pages/index.ts +3 -1
  267. package/src/quasar/create-super-admin-app.ts +13 -2
  268. package/src/quasar/dark-bridge.ts +8 -4
  269. package/src/quasar/index.ts +11 -0
  270. package/src/testing/admin-pages-suite.ts +11 -1
  271. package/src/testing/mount-with-quasar.ts +73 -0
  272. package/src/ui/data/AdminPaginator.vue +30 -20
  273. package/src/ui/data/KvBlock.vue +4 -4
  274. package/src/ui/entitlement/FeatureGate.vue +2 -2
  275. package/src/ui/feedback/AdminRefreshBtn.vue +10 -7
  276. package/src/ui/overlay/MfaPromptDialog.vue +5 -6
  277. package/src/ui/page/AdminAccordion.vue +27 -10
  278. package/src/ui/page/WizardStepper.vue +7 -18
  279. package/src/ui/theme/base.css +31 -0
  280. package/src/ui/theme/components/accordion.css +9 -9
  281. package/src/ui/theme/components/button.css +10 -68
  282. package/src/ui/theme/components/card.css +0 -8
  283. package/src/ui/theme/components/paginator.css +14 -28
  284. package/src/ui/theme/tokens.semantic.dark.css +13 -0
  285. package/src/ui/theme/tokens.semantic.light.css +39 -0
  286. package/src/vue/index.ts +9 -0
  287. package/src/vue/platform-loaders.ts +1 -3
  288. package/src/vue/resource-registry.ts +0 -8
  289. package/src/vue/super-admin-context.ts +14 -15
  290. package/src/vue/use-applied-settings.ts +79 -0
  291. package/src/vue/use-bulk-publish.ts +2 -5
  292. package/src/vue/use-bundles.ts +6 -10
  293. package/src/vue/use-catalog-entries.ts +9 -16
  294. package/src/vue/use-dialog.ts +221 -0
  295. package/src/vue/use-marketing-projections.ts +5 -6
  296. package/src/vue/use-mfa-prompt.ts +61 -11
  297. package/src/vue/use-plans.ts +28 -21
  298. package/src/vue/use-promotions.ts +1 -7
  299. package/src/vue/use-row-reorder.ts +109 -0
  300. package/src/vue/use-sa-theme.ts +31 -0
  301. package/src/vue/use-steps.ts +109 -0
  302. package/src/vue/use-subscription-draft.ts +63 -60
  303. package/src/vue/use-tenant-billing-details.ts +119 -0
  304. package/src/vue/use-tenant-billing.ts +250 -33
  305. package/src/vue/use-tenant-payment-method.ts +112 -0
  306. package/src/vue/use-tenant-subscription-bundles.ts +8 -0
  307. package/src/internal/marketing-catalog/MarketingCatalogAdmin.vue +0 -553
  308. package/src/internal/plans-page/PlansPageToast.vue +0 -69
  309. /package/src/internal/{marketing-catalog → marketing-catalog-page}/types.ts +0 -0
@@ -0,0 +1,213 @@
1
+ import { Q as QInput } from "../chunks/QInput-SRRCebo8.js";
2
+ import { Q as QIcon } from "../chunks/QIcon-DaxYRLz0.js";
3
+ import { Q as QBtn } from "../chunks/QBtn-CSVcAwrE.js";
4
+ import { S as SuperAdminSetupWizard, Q as QForm } from "../chunks/SuperAdminSetupWizard-UO4j4Eyu.js";
5
+ import { defineComponent, reactive, ref, computed, onMounted, openBlock, createBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref, createCommentVNode, withModifiers, withCtx, createTextVNode } from "vue";
6
+ import { _ as _sfc_main$1 } from "../chunks/AdminBanner.vue_vue_type_script_setup_true_lang-D27JEaak.js";
7
+ import { useRouter } from "vue-router";
8
+ import { useSaMessages, useSuperAdminBrand, useSuperAdminEndpoints, useSuperAdminLoginAdapter, useSuperAdminHttp, usePublicBoot, resolveLoginBranding, isProductionBoot, looksLikeEmail, getJson } from "@saasicat/ui-vue";
9
+ import LocaleSwitcher from "../ui/page/LocaleSwitcher.js";
10
+ import ThemeSwitcher from "../ui/page/ThemeSwitcher.js";
11
+ import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
12
+ const _hoisted_1 = {
13
+ key: 1,
14
+ class: "sa-page sa-login-wrap"
15
+ };
16
+ const _hoisted_2 = { class: "sa-login-card" };
17
+ const _hoisted_3 = { class: "sa-login-brand" };
18
+ const _hoisted_4 = {
19
+ key: 0,
20
+ class: "sa-login-logo sa-login-logo--img"
21
+ };
22
+ const _hoisted_5 = ["src", "alt"];
23
+ const _hoisted_6 = {
24
+ key: 1,
25
+ class: "sa-login-logo sa-login-logo--text"
26
+ };
27
+ const _hoisted_7 = { class: "sa-login-brand__text" };
28
+ const _hoisted_8 = { class: "sa-login-brand__name" };
29
+ const _hoisted_9 = { class: "sa-login-brand__tag" };
30
+ const _hoisted_10 = { class: "sa-login-title" };
31
+ const _hoisted_11 = {
32
+ key: 0,
33
+ class: "sa-login-subtitle"
34
+ };
35
+ const _hoisted_12 = {
36
+ key: 1,
37
+ class: "sa-login-hint"
38
+ };
39
+ const _hoisted_13 = {
40
+ key: 0,
41
+ class: "sa-login-env"
42
+ };
43
+ const _sfc_main = /* @__PURE__ */ defineComponent({
44
+ __name: "SuperAdminLoginPage",
45
+ props: {
46
+ subtitle: {}
47
+ },
48
+ setup(__props) {
49
+ const router = useRouter();
50
+ const msg = useSaMessages("shell");
51
+ const brand = useSuperAdminBrand();
52
+ const endpoints = useSuperAdminEndpoints();
53
+ const adapter = useSuperAdminLoginAdapter();
54
+ const http = useSuperAdminHttp();
55
+ const boot = usePublicBoot({ endpoint: endpoints.publicBootEndpoint, http });
56
+ const form = reactive({ email: adapter.devHint?.email ?? "", password: "" });
57
+ const showPw = ref(false);
58
+ const loading = ref(false);
59
+ const errorMessage = ref(null);
60
+ const needsSetup = ref(false);
61
+ const branding = computed(() => resolveLoginBranding(boot.boot.value, brand));
62
+ const brandName = computed(() => branding.value.name);
63
+ const tagText = computed(() => branding.value.tag);
64
+ const iconText = computed(() => branding.value.icon);
65
+ const logoUrl = computed(() => branding.value.logoUrl);
66
+ const bootEnvironment = computed(() => branding.value.environment);
67
+ const devHint = computed(() => {
68
+ if (!adapter.devHint) return null;
69
+ if (isProductionBoot(boot.boot.value)) return null;
70
+ return adapter.devHint;
71
+ });
72
+ const canSubmit = computed(
73
+ () => looksLikeEmail(form.email) && form.password.length >= 1 && !loading.value
74
+ );
75
+ onMounted(() => {
76
+ void boot.load();
77
+ void checkSetup();
78
+ });
79
+ async function checkSetup() {
80
+ try {
81
+ const status = await getJson(
82
+ http,
83
+ `${endpoints.apiBase}/setup/status`
84
+ );
85
+ needsSetup.value = status.needsSetup === true;
86
+ } catch {
87
+ }
88
+ }
89
+ function describeError(result) {
90
+ if (result.message) return result.message;
91
+ if (result.code === "BAD_CREDENTIALS") return msg.value.login.errorBadCredentials;
92
+ if (result.code === "NOT_SUPER_ADMIN") return msg.value.login.errorNotSuperAdmin;
93
+ return msg.value.login.errorFailed;
94
+ }
95
+ async function handleSubmit() {
96
+ if (!canSubmit.value) return;
97
+ loading.value = true;
98
+ errorMessage.value = null;
99
+ try {
100
+ const result = await adapter.login(form.email, form.password);
101
+ if (result.ok) {
102
+ await router.push(adapter.redirectAfterLogin ?? "/admin/dashboard");
103
+ return;
104
+ }
105
+ errorMessage.value = describeError(result);
106
+ } catch (err) {
107
+ const e = err;
108
+ errorMessage.value = e.response?.data?.message ?? e.response?.data?.code ?? msg.value.login.errorFailed;
109
+ } finally {
110
+ loading.value = false;
111
+ }
112
+ }
113
+ return (_ctx, _cache) => {
114
+ return needsSetup.value ? (openBlock(), createBlock(SuperAdminSetupWizard, {
115
+ key: 0,
116
+ "display-name": brandName.value,
117
+ icon: iconText.value,
118
+ onDone: _cache[0] || (_cache[0] = ($event) => needsSetup.value = false)
119
+ }, null, 8, ["display-name", "icon"])) : (openBlock(), createElementBlock("div", _hoisted_1, [
120
+ createElementVNode("div", _hoisted_2, [
121
+ createElementVNode("div", _hoisted_3, [
122
+ logoUrl.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
123
+ createElementVNode("img", {
124
+ src: logoUrl.value,
125
+ alt: brandName.value
126
+ }, null, 8, _hoisted_5)
127
+ ])) : (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(iconText.value), 1)),
128
+ createElementVNode("div", _hoisted_7, [
129
+ createElementVNode("div", _hoisted_8, toDisplayString(brandName.value), 1),
130
+ createElementVNode("div", _hoisted_9, toDisplayString(tagText.value), 1)
131
+ ]),
132
+ createVNode(LocaleSwitcher, { class: "sa-login-locale" }),
133
+ createVNode(ThemeSwitcher, { class: "sa-login-theme" })
134
+ ]),
135
+ createElementVNode("h1", _hoisted_10, toDisplayString(unref(msg).login.signIn), 1),
136
+ __props.subtitle ? (openBlock(), createElementBlock("p", _hoisted_11, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true),
137
+ createVNode(QForm, {
138
+ class: "sa-login-form",
139
+ onSubmit: withModifiers(handleSubmit, ["prevent"])
140
+ }, {
141
+ default: withCtx(() => [
142
+ createVNode(QInput, {
143
+ modelValue: form.email,
144
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form.email = $event),
145
+ label: unref(msg).emailLabel,
146
+ type: "email",
147
+ autocomplete: "username",
148
+ outlined: "",
149
+ dense: "",
150
+ autofocus: "",
151
+ disable: loading.value,
152
+ class: "q-mb-sm",
153
+ rules: [(v) => unref(looksLikeEmail)(v) || unref(msg).invalidEmail]
154
+ }, null, 8, ["modelValue", "label", "disable", "rules"]),
155
+ createVNode(QInput, {
156
+ modelValue: form.password,
157
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => form.password = $event),
158
+ label: unref(msg).passwordLabel,
159
+ type: showPw.value ? "text" : "password",
160
+ autocomplete: "current-password",
161
+ outlined: "",
162
+ dense: "",
163
+ disable: loading.value,
164
+ class: "q-mb-sm",
165
+ rules: [(v) => v.length > 0 || unref(msg).login.passwordRequired]
166
+ }, {
167
+ append: withCtx(() => [
168
+ createVNode(QIcon, {
169
+ name: showPw.value ? "visibility_off" : "visibility",
170
+ class: "cursor-pointer",
171
+ onClick: _cache[2] || (_cache[2] = ($event) => showPw.value = !showPw.value)
172
+ }, null, 8, ["name"])
173
+ ]),
174
+ _: 1
175
+ }, 8, ["modelValue", "label", "type", "disable", "rules"]),
176
+ errorMessage.value ? (openBlock(), createBlock(_sfc_main$1, {
177
+ key: 0,
178
+ tone: "negative"
179
+ }, {
180
+ default: withCtx(() => [
181
+ createTextVNode(toDisplayString(errorMessage.value), 1)
182
+ ]),
183
+ _: 1
184
+ })) : createCommentVNode("", true),
185
+ createVNode(QBtn, {
186
+ unelevated: "",
187
+ color: "primary",
188
+ icon: "login",
189
+ label: unref(msg).login.signIn,
190
+ loading: loading.value,
191
+ disable: !canSubmit.value,
192
+ class: "full-width q-mt-sm",
193
+ type: "submit"
194
+ }, null, 8, ["label", "loading", "disable"])
195
+ ]),
196
+ _: 1
197
+ }),
198
+ devHint.value ? (openBlock(), createElementBlock("div", _hoisted_12, [
199
+ createTextVNode(toDisplayString(unref(msg).login.devHintLabel) + " ", 1),
200
+ createElementVNode("code", null, toDisplayString(devHint.value.email), 1),
201
+ _cache[4] || (_cache[4] = createTextVNode(" / ", -1)),
202
+ createElementVNode("code", null, toDisplayString(devHint.value.password), 1)
203
+ ])) : createCommentVNode("", true)
204
+ ]),
205
+ bootEnvironment.value ? (openBlock(), createElementBlock("div", _hoisted_13, toDisplayString(brandName.value) + " · " + toDisplayString(bootEnvironment.value), 1)) : createCommentVNode("", true)
206
+ ]));
207
+ };
208
+ }
209
+ });
210
+ const SuperAdminLoginPage = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fe0cca37"]]);
211
+ export {
212
+ SuperAdminLoginPage as default
213
+ };
@@ -0,0 +1,5 @@
1
+ import { S } from "../chunks/SuperAdminSetupWizard-UO4j4Eyu.js";
2
+ import "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
3
+ export {
4
+ S as default
5
+ };
@@ -1,4 +1,4 @@
1
- import { a5 as SaMessages, H as HttpClient, l as KvStore, a2 as SaLocale, aA as SaNavMessages } from './catalog-C5VKGbxk.js';
1
+ import { a5 as SaMessages, H as HttpClient, l as KvStore, a2 as SaLocale, aD as SaNavMessages } from './catalog-0eZwciPW.cjs';
2
2
  import { PublicBootResponse, AdminManifest, StandardPageKey, TenantColumnDef } from '@saasicat/core';
3
3
 
4
4
  /**
@@ -383,8 +383,8 @@ interface NavBuilderOptions {
383
383
  availableExtensions?: Set<string>;
384
384
  }
385
385
  /**
386
- * Localized default section names in drawer order (Übersicht → Produktkatalog
387
- * → Kunden → System). Pass the result to `buildSidebar()` when building routes
386
+ * Localized default section names in drawer order (Overview → Product catalog
387
+ * → Customers → System). Pass the result to `buildSidebar()` when building routes
388
388
  * with a non-default locale, or hand it the resolved `nav` catalog directly —
389
389
  * section names are compared as strings, so both sides must come from the same
390
390
  * source.
@@ -417,8 +417,8 @@ interface SidebarSection {
417
417
  * 2. Sections from `sectionOrder` in exactly this order.
418
418
  * 3. Remaining sections alphabetically.
419
419
  *
420
- * The default order matches the plan simulation layout (Übersicht →
421
- * Produktkatalog → Kunden → System); consumers can override it.
420
+ * The default order matches the plan simulation layout (Overview → Product
421
+ * catalog → Customers → System); consumers can override it.
422
422
  */
423
423
  declare function buildSidebar(routes: BuildRouteEntry[], sectionOrder?: readonly string[]): SidebarSection[];
424
424
  /**
@@ -1,4 +1,4 @@
1
- import { a5 as SaMessages, H as HttpClient, l as KvStore, a2 as SaLocale, aA as SaNavMessages } from './catalog-C5VKGbxk.cjs';
1
+ import { a5 as SaMessages, H as HttpClient, l as KvStore, a2 as SaLocale, aD as SaNavMessages } from './catalog-0eZwciPW.js';
2
2
  import { PublicBootResponse, AdminManifest, StandardPageKey, TenantColumnDef } from '@saasicat/core';
3
3
 
4
4
  /**
@@ -383,8 +383,8 @@ interface NavBuilderOptions {
383
383
  availableExtensions?: Set<string>;
384
384
  }
385
385
  /**
386
- * Localized default section names in drawer order (Übersicht → Produktkatalog
387
- * → Kunden → System). Pass the result to `buildSidebar()` when building routes
386
+ * Localized default section names in drawer order (Overview → Product catalog
387
+ * → Customers → System). Pass the result to `buildSidebar()` when building routes
388
388
  * with a non-default locale, or hand it the resolved `nav` catalog directly —
389
389
  * section names are compared as strings, so both sides must come from the same
390
390
  * source.
@@ -417,8 +417,8 @@ interface SidebarSection {
417
417
  * 2. Sections from `sectionOrder` in exactly this order.
418
418
  * 3. Remaining sections alphabetically.
419
419
  *
420
- * The default order matches the plan simulation layout (Übersicht →
421
- * Produktkatalog → Kunden → System); consumers can override it.
420
+ * The default order matches the plan simulation layout (Overview → Product
421
+ * catalog → Customers → System); consumers can override it.
422
422
  */
423
423
  declare function buildSidebar(routes: BuildRouteEntry[], sectionOrder?: readonly string[]): SidebarSection[];
424
424
  /**