@saasicat/ui-vue 0.21.0 → 0.22.1

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 (132) hide show
  1. package/dist/{catalog-BY_t9prv.d.cts → catalog-DJcfm5N2.d.cts} +20 -7
  2. package/dist/{catalog-BY_t9prv.d.ts → catalog-DJcfm5N2.d.ts} +20 -7
  3. package/dist/{chunk-JN6HZGLV.js → chunk-F7NRM6KI.js} +54 -28
  4. package/dist/{chunk-7IFKVGZV.js → chunk-LY52T4N4.js} +21 -2
  5. package/dist/{chunk-OTP3OSSW.js → chunk-XMMFN2WJ.js} +74 -3
  6. package/dist/client/index.cjs +132 -29
  7. package/dist/client/index.d.cts +53 -3
  8. package/dist/client/index.d.ts +53 -3
  9. package/dist/client/index.js +14 -2
  10. package/dist/index.cjs +319 -162
  11. package/dist/index.d.cts +30 -8
  12. package/dist/index.d.ts +30 -8
  13. package/dist/index.js +176 -133
  14. package/dist/quasar/index.cjs +76 -29
  15. package/dist/quasar/index.d.cts +2 -2
  16. package/dist/quasar/index.d.ts +2 -2
  17. package/dist/quasar/index.js +6 -2
  18. package/dist/testing-e2e/admin-pages-suite.d.cts +37 -0
  19. package/dist/testing-e2e/admin-pages-suite.d.ts +37 -0
  20. package/dist/{use-super-admin-i18n-c_Eqsu9u.d.ts → use-super-admin-i18n-CHNdsSlm.d.ts} +34 -7
  21. package/dist/{use-super-admin-i18n-DlJRGIVq.d.cts → use-super-admin-i18n-CgTuNi8h.d.cts} +34 -7
  22. package/package.json +18 -8
  23. package/src/client/i18n/messages/bundles.ts +0 -2
  24. package/src/client/i18n/messages/common.ts +22 -0
  25. package/src/client/i18n/messages/discovery.ts +2 -2
  26. package/src/client/i18n/messages/marketing.ts +2 -4
  27. package/src/client/i18n/messages/plan-detail.ts +0 -4
  28. package/src/client/i18n/messages/plans.ts +20 -8
  29. package/src/client/i18n/messages/tenants.ts +0 -2
  30. package/src/client/index.ts +1 -0
  31. package/src/client/manifest-loader.ts +1 -1
  32. package/src/client/resolve-plans.ts +144 -0
  33. package/src/components/BundleVersionPublishDialog.vue +6 -6
  34. package/src/components/KvBlock.vue +4 -4
  35. package/src/components/MarketingPromotionsTab.vue +34 -48
  36. package/src/components/MfaPromptDialog.vue +8 -2
  37. package/src/components/TenantActionConfirmDialog.vue +4 -4
  38. package/src/components/VersionDiffPreview.vue +7 -7
  39. package/src/components/admin-page/AdminFilters.vue +12 -0
  40. package/src/components/admin-page/AdminHero.vue +22 -5
  41. package/src/components/admin-page/AdminKpi.vue +84 -0
  42. package/src/components/admin-page/AdminPaginator.vue +195 -0
  43. package/src/components/admin-page/AdminRefreshBtn.vue +39 -0
  44. package/src/components/admin-page/AdminSection.vue +31 -16
  45. package/src/components/admin-page/AdminStatistics.vue +40 -0
  46. package/src/components/admin-page/AdminTable.vue +175 -0
  47. package/src/components/bundle-editor/BundleCreatePanel.vue +23 -23
  48. package/src/components/bundle-editor/BundleFeaturesEditor.vue +7 -7
  49. package/src/components/bundle-editor/BundlePlanCompatPicker.vue +9 -9
  50. package/src/components/bundle-editor/BundleQuotasEditor.vue +11 -11
  51. package/src/components/bundle-editor/BundleStatusBanner.vue +6 -6
  52. package/src/components/bundle-editor/BundleVersionInlineEditor.vue +18 -18
  53. package/src/components/bundle-editor/BundleVersionStrip.vue +12 -12
  54. package/src/components/dialogs/PilotCreateDialog.vue +12 -12
  55. package/src/components/dialogs/PilotEditDialog.vue +7 -7
  56. package/src/components/dialogs/PromoCodeCreateDialog.vue +8 -8
  57. package/src/components/dialogs/PromoCodeDialogFields.vue +33 -19
  58. package/src/components/dialogs/PromoCodeEditDialog.vue +10 -10
  59. package/src/components/plan/PlanGrid.vue +1 -1
  60. package/src/components/plan-create-dialog/PlanCreateDialog.vue +34 -46
  61. package/src/components/plan-detail/PlanDetail.vue +92 -302
  62. package/src/components/plan-detail/PlanDetailKpis.vue +22 -27
  63. package/src/components/plan-detail/PlanTitleEdit.vue +133 -0
  64. package/src/components/plan-list/PlanList.vue +72 -290
  65. package/src/components/plan-matrix/PlanMatrix.vue +66 -183
  66. package/src/components/plan-review/PlanReview.vue +191 -275
  67. package/src/components/plan-version-editor/PlanCatalogPreview.vue +7 -5
  68. package/src/components/plan-version-editor/PlanVersionEditor.vue +200 -295
  69. package/src/components/plan-version-editor/PlanVersionEditorHeader.vue +23 -55
  70. package/src/index.ts +1 -0
  71. package/src/pages-standard/AdminLayout.vue +34 -10
  72. package/src/pages-standard/AdminManifestErrorPage.vue +79 -9
  73. package/src/pages-standard/AuditPage.vue +53 -72
  74. package/src/pages-standard/BundlesPage.vue +128 -144
  75. package/src/pages-standard/DashboardPage.vue +43 -107
  76. package/src/pages-standard/DiscoveryPage.vue +158 -200
  77. package/src/pages-standard/EmailHistoryPage.vue +98 -88
  78. package/src/pages-standard/MarketingCatalogPage.vue +237 -267
  79. package/src/pages-standard/PilotsPage.vue +44 -60
  80. package/src/pages-standard/PlansPage.vue +230 -105
  81. package/src/pages-standard/PlatformEmailPage.vue +37 -40
  82. package/src/pages-standard/PromoCodeDetailPage.vue +16 -30
  83. package/src/pages-standard/PromoCodesPage.vue +86 -112
  84. package/src/pages-standard/SubscriptionsPage.vue +10 -17
  85. package/src/pages-standard/SuperAdminLoginPage.vue +12 -12
  86. package/src/pages-standard/SuperAdminSetupWizard.vue +20 -17
  87. package/src/pages-standard/TenantDetailPage.vue +45 -41
  88. package/src/pages-standard/TenantsPage.vue +184 -264
  89. package/src/pages-standard/UsersPage.vue +69 -104
  90. package/src/pages-standard/bundles-page/BundleAccordionList.vue +20 -17
  91. package/src/pages-standard/bundles-page/BundlesKpis.vue +13 -22
  92. package/src/pages-standard/bundles-page/BundlesToolbar.vue +6 -10
  93. package/src/pages-standard/discovery-page/CatalogEntryTransPanel.vue +10 -10
  94. package/src/pages-standard/discovery-page/DiscoveryCapList.vue +5 -5
  95. package/src/pages-standard/discovery-page/DiscoveryFeatureCard.vue +16 -16
  96. package/src/pages-standard/discovery-page/DiscoveryKpis.vue +31 -27
  97. package/src/pages-standard/discovery-page/DiscoveryQuotaCard.vue +7 -7
  98. package/src/pages-standard/marketing-catalog/MarketingCatalogAdmin.vue +1 -1
  99. package/src/pages-standard/marketing-catalog/MarketingCatalogHeader.vue +2 -13
  100. package/src/pages-standard/plan-versions/PlanDiffCard.vue +6 -6
  101. package/src/pages-standard/plan-versions/PlanVersionsDiff.vue +6 -6
  102. package/src/pages-standard/plan-versions/PlanVersionsTimeline.vue +16 -16
  103. package/src/pages-standard/plans-page/PlanBundleOverview.vue +14 -29
  104. package/src/pages-standard/plans-page/PlanPublishDialog.vue +1 -1
  105. package/src/pages-standard/plans-page/PlansPageToast.vue +1 -1
  106. package/src/pages-standard/sa-theme.css +481 -71
  107. package/src/pages-standard/tenant-detail/TenantUsers.vue +2 -8
  108. package/src/pages-standard/tenants/StatusPill.vue +2 -2
  109. package/src/pages-tenant/MySubscriptionBundlesPage.vue +25 -25
  110. package/src/pages-tenant/OnboardingConfigurator.vue +1 -5
  111. package/src/pages-tenant/PackageSnapshotPanel.vue +1 -1
  112. package/src/pages-tenant/TenantPlanSection.vue +12 -20
  113. package/src/quasar/create-super-admin-app.ts +4 -0
  114. package/src/vue/entitlement-provider.ts +0 -1
  115. package/src/vue/feature-router-guard.ts +0 -1
  116. package/src/vue/super-admin-context.ts +106 -1
  117. package/src/vue/use-api-list.ts +2 -1
  118. package/src/vue/use-pagination.ts +63 -0
  119. package/src/vue/use-plans.ts +1 -2
  120. package/src/vue/use-sign-out.ts +90 -0
  121. package/src/vue/use-tenant-billing.ts +1 -1
  122. package/src/vue/use-tenant-manifest.ts +0 -1
  123. package/src/components/KpiCard.vue +0 -53
  124. package/src/components/plan-cockpit/PlanCockpit.vue +0 -1027
  125. package/src/components/plan-cockpit/PlanCockpitAuditLog.vue +0 -72
  126. package/src/components/plan-cockpit/PlanCockpitDiffPanel.vue +0 -99
  127. package/src/components/plan-cockpit/PlanCockpitHeader.vue +0 -101
  128. package/src/components/plan-cockpit/PlanCockpitImpactPanel.vue +0 -112
  129. package/src/components/plan-cockpit/PlanCockpitKpis.vue +0 -68
  130. package/src/components/plan-cockpit/PlanCockpitVersions.vue +0 -249
  131. package/src/components/plan-cockpit/types.ts +0 -72
  132. package/src/components/plan-detail/PlanDetailHeader.vue +0 -194
@@ -2,77 +2,79 @@
2
2
  <AdminPage class="sa-emh">
3
3
  <AdminHero :title="resolvedTitle" :subtitle="msg.history.subtitle">
4
4
  <template #actions>
5
- <q-btn flat icon="refresh" :label="common.reload" @click="applyFilter" />
5
+ <AdminRefreshBtn :loading="loading" @refresh="applyFilter" />
6
6
  </template>
7
7
  </AdminHero>
8
8
 
9
- <div class="sa-emh__body">
10
- <div class="sa-emh__filter">
11
- <q-input
12
- v-model="filter.search"
13
- outlined
14
- dense
15
- clearable
16
- :label="msg.history.searchLabel"
17
- debounce="350"
18
- @keyup.enter="applyFilter"
19
- @update:model-value="applyFilter"
20
- >
21
- <template #prepend><q-icon name="search" /></template>
22
- </q-input>
23
- <q-select
24
- v-model="filter.status"
25
- outlined
26
- dense
27
- clearable
28
- emit-value
29
- map-options
30
- :label="common.status"
31
- :options="statusOptions"
32
- @update:model-value="applyFilter"
33
- />
34
- <q-input
35
- v-model="filter.from"
36
- outlined
37
- dense
38
- clearable
39
- type="date"
40
- :label="common.from"
41
- @update:model-value="applyFilter"
42
- />
43
- <q-input
44
- v-model="filter.to"
45
- outlined
46
- dense
47
- clearable
48
- type="date"
49
- :label="common.to"
50
- @update:model-value="applyFilter"
51
- />
52
- </div>
53
-
54
- <div class="sa-emh__card">
55
- <q-table
56
- v-model:pagination="pagination"
57
- flat
58
- :rows="rows"
59
- :columns="columns"
60
- row-key="id"
61
- :loading="loading"
62
- :rows-number="pagination.rowsNumber"
63
- @request="onRequest"
64
- @row-click="(_evt, row) => openDetail(row)"
65
- >
66
- <template #body-cell-status="{ row }">
67
- <q-td>
68
- <q-badge
69
- :color="statusColor(row.status)"
70
- :label="statusLabel(row.status)"
71
- />
72
- </q-td>
73
- </template>
74
- <template #body-cell-actions="{ row }">
75
- <q-td class="text-right">
9
+ <AdminBody>
10
+ <AdminSection class="sa-emh__body">
11
+ <div class="sa-emh__filter">
12
+ <q-input
13
+ v-model="filter.search"
14
+ outlined
15
+ dense
16
+ clearable
17
+ :label="msg.history.searchLabel"
18
+ debounce="350"
19
+ @keyup.enter="applyFilter"
20
+ @update:model-value="applyFilter"
21
+ >
22
+ <template #prepend><q-icon name="search" /></template>
23
+ </q-input>
24
+ <q-select
25
+ v-model="filter.status"
26
+ outlined
27
+ dense
28
+ clearable
29
+ emit-value
30
+ map-options
31
+ :label="common.status"
32
+ :options="statusOptions"
33
+ @update:model-value="applyFilter"
34
+ />
35
+ <q-input
36
+ v-model="filter.from"
37
+ outlined
38
+ dense
39
+ clearable
40
+ type="date"
41
+ :label="common.from"
42
+ @update:model-value="applyFilter"
43
+ />
44
+ <q-input
45
+ v-model="filter.to"
46
+ outlined
47
+ dense
48
+ clearable
49
+ type="date"
50
+ :label="common.to"
51
+ @update:model-value="applyFilter"
52
+ />
53
+ </div>
54
+
55
+ <div class="sa-emh__card">
56
+ <AdminTable
57
+ server-side
58
+ :rows="rows"
59
+ :columns="columns"
60
+ :loading="loading"
61
+ :page="pagination.page"
62
+ :rows-per-page="pagination.rowsPerPage"
63
+ :total="pagination.rowsNumber"
64
+ storage-key="email-history"
65
+ @row-click="(_evt: Event, row: EmailHistoryRow) => openDetail(row)"
66
+ @update:page="onPageChange"
67
+ @update:rows-per-page="onRowsPerPageChange"
68
+ >
69
+ <template #body-cell-status="{ row }">
70
+ <q-td>
71
+ <q-badge
72
+ :color="statusColor(row.status)"
73
+ :label="statusLabel(row.status)"
74
+ />
75
+ </q-td>
76
+ </template>
77
+ <template #row-actions="{ row }">
76
78
  <q-btn
77
79
  flat
78
80
  dense
@@ -89,14 +91,14 @@
89
91
  :title="msg.history.removeFromHistory"
90
92
  @click.stop="askDelete(row.id)"
91
93
  />
92
- </q-td>
93
- </template>
94
- <template #no-data>
95
- <div class="sa-emh__empty">{{ msg.history.empty }}</div>
96
- </template>
97
- </q-table>
98
- </div>
99
- </div>
94
+ </template>
95
+ <template #no-data>
96
+ <div class="sa-emh__empty">{{ msg.history.empty }}</div>
97
+ </template>
98
+ </AdminTable>
99
+ </div>
100
+ </AdminSection>
101
+ </AdminBody>
100
102
 
101
103
  <q-dialog v-model="detailOpen">
102
104
  <q-card class="sa-emh__detail">
@@ -215,9 +217,13 @@
215
217
  </template>
216
218
 
217
219
  <script setup lang="ts">
220
+ import AdminTable from '../components/admin-page/AdminTable.vue';
218
221
  import { computed, reactive, ref } from 'vue';
219
222
  import { useMfaPrompt } from '../vue/use-mfa-prompt.js';
223
+ import AdminRefreshBtn from '../components/admin-page/AdminRefreshBtn.vue';
224
+ import AdminBody from '../components/admin-page/AdminBody.vue';
220
225
  import AdminHero from '../components/admin-page/AdminHero.vue';
226
+ import AdminSection from '../components/admin-page/AdminSection.vue';
221
227
  import AdminPage from '../components/admin-page/AdminPage.vue';
222
228
  import { useSuperAdminNotify } from '../quasar/notify.js';
223
229
  import MfaPromptDialog from '../components/MfaPromptDialog.vue';
@@ -307,7 +313,6 @@ const columns = computed(() => [
307
313
  field: (r: EmailHistoryRow) => formatTs(r.sentAt),
308
314
  align: 'left' as const,
309
315
  },
310
- { name: 'actions', label: '', field: 'id' as never, align: 'right' as const },
311
316
  ]);
312
317
 
313
318
  const detailOpen = ref(false);
@@ -352,12 +357,17 @@ async function reload(): Promise<void> {
352
357
  void reload();
353
358
  defineExpose({ reload });
354
359
 
355
- async function onRequest(req: {
356
- pagination: { page: number; rowsPerPage: number };
357
- }): Promise<void> {
358
- pagination.value.page = req.pagination.page;
359
- pagination.value.rowsPerPage = req.pagination.rowsPerPage;
360
- await reload();
360
+ // The pager owns page and size; both need a fetch, and a size change starts
361
+ // over at page 1 — the row it would land on otherwise is arbitrary.
362
+ function onPageChange(page: number): void {
363
+ pagination.value.page = page;
364
+ void reload();
365
+ }
366
+
367
+ function onRowsPerPageChange(rows: number): void {
368
+ pagination.value.rowsPerPage = rows;
369
+ pagination.value.page = 1;
370
+ void reload();
361
371
  }
362
372
 
363
373
  function applyFilter(): void {
@@ -508,7 +518,7 @@ function formatTs(iso: string | null | undefined): string {
508
518
  }
509
519
  .sa-emh__card {
510
520
  background: #fff;
511
- border: 1px solid var(--sa-border, #e2e8f0);
521
+ border: 1px solid var(--sa-border, var(--sa-border));
512
522
  border-radius: 12px;
513
523
  overflow: hidden;
514
524
  padding: 8px 0;
@@ -516,7 +526,7 @@ function formatTs(iso: string | null | undefined): string {
516
526
  .sa-emh__empty {
517
527
  width: 100%;
518
528
  text-align: center;
519
- color: var(--sa-muted-dark, #64748b);
529
+ color: var(--sa-muted-dark, var(--sa-muted));
520
530
  padding: 24px 0;
521
531
  }
522
532
  .sa-emh__detail {
@@ -534,14 +544,14 @@ function formatTs(iso: string | null | undefined): string {
534
544
  width: 100%;
535
545
  min-height: 320px;
536
546
  max-height: 60vh;
537
- border: 1px solid var(--sa-border, #e2e8f0);
547
+ border: 1px solid var(--sa-border, var(--sa-border));
538
548
  border-radius: 8px;
539
549
  background: #fff;
540
550
  }
541
551
  .sa-emh__text,
542
552
  .sa-emh__smtp {
543
- background: #f8fafc;
544
- border: 1px solid var(--sa-border, #e2e8f0);
553
+ background: var(--sa-bg-surface-2);
554
+ border: 1px solid var(--sa-border, var(--sa-border));
545
555
  border-radius: 8px;
546
556
  padding: 12px;
547
557
  font-size: 12px;