@saasicat/ui-vue 0.2.0
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.
- package/LICENSE +202 -0
- package/README.md +47 -0
- package/dist/index.cjs +3776 -0
- package/dist/index.d.cts +2395 -0
- package/dist/index.d.ts +2395 -0
- package/dist/index.js +3659 -0
- package/dist/testing-e2e/admin-pages-suite.cjs +134 -0
- package/dist/testing-e2e/admin-pages-suite.d.cts +37 -0
- package/dist/testing-e2e/admin-pages-suite.d.ts +37 -0
- package/dist/testing-e2e/admin-pages-suite.js +109 -0
- package/package.json +87 -0
- package/src/action-registry.ts +110 -0
- package/src/batch-column-fetcher.ts +152 -0
- package/src/boot-loader.ts +60 -0
- package/src/components/BundleVersionPublishDialog.vue +359 -0
- package/src/components/BusinessTypeVersionEditorDialog.vue +417 -0
- package/src/components/BusinessTypeVersionPublishDialog.vue +258 -0
- package/src/components/FeatureGate.vue +56 -0
- package/src/components/KpiCard.vue +53 -0
- package/src/components/KvBlock.vue +36 -0
- package/src/components/MarketingPromotionsTab.vue +861 -0
- package/src/components/MfaPromptDialog.vue +104 -0
- package/src/components/TenantActionConfirmDialog.vue +252 -0
- package/src/components/VersionDiffPreview.vue +150 -0
- package/src/components/bundle-editor/BundleCreatePanel.vue +681 -0
- package/src/components/bundle-editor/BundleFeaturesEditor.vue +215 -0
- package/src/components/bundle-editor/BundlePlanCompatPicker.vue +316 -0
- package/src/components/bundle-editor/BundleQuotasEditor.vue +219 -0
- package/src/components/bundle-editor/BundleStatusBanner.vue +189 -0
- package/src/components/bundle-editor/BundleVersionInlineEditor.vue +659 -0
- package/src/components/bundle-editor/BundleVersionStrip.vue +207 -0
- package/src/components/bundle-editor/bundle-version-status.ts +164 -0
- package/src/components/bundle-editor/catalog-i18n.ts +85 -0
- package/src/components/dialogs/PilotCreateDialog.vue +780 -0
- package/src/components/dialogs/PilotEditDialog.vue +548 -0
- package/src/components/dialogs/PromoCodeCreateDialog.vue +737 -0
- package/src/components/dialogs/PromoCodeEditDialog.vue +859 -0
- package/src/components/dialogs/types.ts +126 -0
- package/src/components/plan/PlanCycleToggle.vue +99 -0
- package/src/components/plan/PlanGrid.vue +211 -0
- package/src/components/plan/PriceSummary.vue +293 -0
- package/src/components/plan/PromoCodeInput.vue +192 -0
- package/src/components/plan/PublicBundleGrid.vue +287 -0
- package/src/components/plan-cockpit/PlanCockpit.vue +993 -0
- package/src/components/plan-cockpit/PlanCockpitAuditLog.vue +65 -0
- package/src/components/plan-cockpit/PlanCockpitDiffPanel.vue +91 -0
- package/src/components/plan-cockpit/PlanCockpitHeader.vue +98 -0
- package/src/components/plan-cockpit/PlanCockpitImpactPanel.vue +99 -0
- package/src/components/plan-cockpit/PlanCockpitKpis.vue +57 -0
- package/src/components/plan-cockpit/PlanCockpitVersions.vue +226 -0
- package/src/components/plan-cockpit/types.ts +72 -0
- package/src/components/plan-create-dialog/PlanCreateDialog.vue +508 -0
- package/src/components/plan-detail/PlanAuditLog.vue +59 -0
- package/src/components/plan-detail/PlanDetail.vue +1195 -0
- package/src/components/plan-detail/PlanDetailHeader.vue +185 -0
- package/src/components/plan-detail/PlanDetailKpis.vue +57 -0
- package/src/components/plan-detail/PlanTerminateDialog.vue +76 -0
- package/src/components/plan-detail/PlanVersionDiffPanel.vue +149 -0
- package/src/components/plan-detail/PlanVersionsPanel.vue +255 -0
- package/src/components/plan-detail/types.ts +59 -0
- package/src/components/plan-list/PlanList.vue +1067 -0
- package/src/components/plan-matrix/PlanMatrix.vue +1113 -0
- package/src/components/plan-review/PlanReview.vue +742 -0
- package/src/components/plan-version-editor/PlanCatalogPreview.vue +184 -0
- package/src/components/plan-version-editor/PlanComponentPool.vue +272 -0
- package/src/components/plan-version-editor/PlanVersionBasket.vue +281 -0
- package/src/components/plan-version-editor/PlanVersionDiffDialog.vue +84 -0
- package/src/components/plan-version-editor/PlanVersionEditor.vue +1728 -0
- package/src/components/plan-version-editor/PlanVersionEditorHeader.vue +94 -0
- package/src/components/plan-version-editor/types.ts +96 -0
- package/src/components/wizard-stepper/WizardStepper.vue +107 -0
- package/src/create-admin-routes.ts +68 -0
- package/src/create-super-admin-app.ts +345 -0
- package/src/entitlement-provider.ts +36 -0
- package/src/feature-router-guard.ts +77 -0
- package/src/http-json.ts +62 -0
- package/src/index.ts +98 -0
- package/src/manifest-loader.ts +139 -0
- package/src/manifest-store-factory.ts +114 -0
- package/src/nav-builder.ts +274 -0
- package/src/pages-standard/AdminLayout.vue +411 -0
- package/src/pages-standard/AdminManifestErrorPage.vue +79 -0
- package/src/pages-standard/AuditPage.vue +223 -0
- package/src/pages-standard/BundlesPage.vue +910 -0
- package/src/pages-standard/BusinessTypesPage.vue +662 -0
- package/src/pages-standard/DashboardPage.vue +595 -0
- package/src/pages-standard/DiscoveryPage.vue +663 -0
- package/src/pages-standard/EmailHistoryPage.vue +576 -0
- package/src/pages-standard/MarketingCatalogPage.vue +1771 -0
- package/src/pages-standard/PilotsPage.vue +577 -0
- package/src/pages-standard/PlanVersionsPage.vue +216 -0
- package/src/pages-standard/PlansPage.vue +1222 -0
- package/src/pages-standard/PlatformEmailPage.vue +434 -0
- package/src/pages-standard/PromoCodeDetailPage.vue +331 -0
- package/src/pages-standard/PromoCodesPage.vue +589 -0
- package/src/pages-standard/SubscriptionsPage.vue +159 -0
- package/src/pages-standard/SuperAdminLoginPage.vue +299 -0
- package/src/pages-standard/SuperAdminSetupWizard.vue +405 -0
- package/src/pages-standard/TenantDetailPage.vue +432 -0
- package/src/pages-standard/TenantsPage.vue +732 -0
- package/src/pages-standard/UsersPage.vue +504 -0
- package/src/pages-standard/bundles-page/BundleAccordionList.vue +116 -0
- package/src/pages-standard/bundles-page/BundleDetailPanel.vue +193 -0
- package/src/pages-standard/bundles-page/BundlesFilterBar.vue +48 -0
- package/src/pages-standard/bundles-page/BundlesHeader.vue +67 -0
- package/src/pages-standard/bundles-page/BundlesKpis.vue +39 -0
- package/src/pages-standard/bundles-page/types.ts +15 -0
- package/src/pages-standard/discovery-page/CatalogEntryTransPanel.vue +246 -0
- package/src/pages-standard/discovery-page/DiscoveryCapList.vue +171 -0
- package/src/pages-standard/discovery-page/DiscoveryFeatureCard.vue +410 -0
- package/src/pages-standard/discovery-page/DiscoveryHeader.vue +31 -0
- package/src/pages-standard/discovery-page/DiscoveryKpis.vue +47 -0
- package/src/pages-standard/discovery-page/DiscoveryMetaBanner.vue +26 -0
- package/src/pages-standard/discovery-page/DiscoveryQuotaCard.vue +247 -0
- package/src/pages-standard/discovery-page/DiscoveryStatusControl.vue +73 -0
- package/src/pages-standard/discovery-page/discovery-ui.ts +166 -0
- package/src/pages-standard/email-history.types.ts +48 -0
- package/src/pages-standard/marketing-catalog/MarketingCatalogAdmin.vue +448 -0
- package/src/pages-standard/marketing-catalog/MarketingCatalogHeader.vue +93 -0
- package/src/pages-standard/marketing-catalog/MarketingCatalogPreview.vue +138 -0
- package/src/pages-standard/marketing-catalog/MarketingCatalogToolbar.vue +58 -0
- package/src/pages-standard/marketing-catalog/types.ts +43 -0
- package/src/pages-standard/plan-versions/PlanDiffCard.vue +132 -0
- package/src/pages-standard/plan-versions/PlanVersionHeader.vue +293 -0
- package/src/pages-standard/plan-versions/PlanVersionStatusBadge.vue +48 -0
- package/src/pages-standard/plan-versions/PlanVersionsAudit.vue +307 -0
- package/src/pages-standard/plan-versions/PlanVersionsDiff.vue +269 -0
- package/src/pages-standard/plan-versions/PlanVersionsKpi.vue +65 -0
- package/src/pages-standard/plan-versions/PlanVersionsList.vue +292 -0
- package/src/pages-standard/plan-versions/PlanVersionsMatrix.vue +261 -0
- package/src/pages-standard/plan-versions/PlanVersionsTimeline.vue +300 -0
- package/src/pages-standard/plan-versions/VersionDiffPreview.vue +167 -0
- package/src/pages-standard/plan-versions/format.ts +53 -0
- package/src/pages-standard/plan-versions/types.ts +33 -0
- package/src/pages-standard/plans-page/PlanArchiveDialog.vue +50 -0
- package/src/pages-standard/plans-page/PlanBundleOverview.vue +147 -0
- package/src/pages-standard/plans-page/PlanDiscardDraftDialog.vue +46 -0
- package/src/pages-standard/plans-page/PlanPublishDialog.vue +106 -0
- package/src/pages-standard/plans-page/PlansPageToast.vue +69 -0
- package/src/pages-standard/plans-page/types.ts +18 -0
- package/src/pages-standard/platform-email.types.ts +41 -0
- package/src/pages-standard/sa-theme.css +223 -0
- package/src/pages-standard/tenants/StatusPill.vue +62 -0
- package/src/pages-standard/tenants/format.ts +38 -0
- package/src/pages-tenant/LimitsRow.vue +67 -0
- package/src/pages-tenant/MySubscriptionBundlesPage.vue +604 -0
- package/src/pages-tenant/OnboardingConfigurator.vue +417 -0
- package/src/pages-tenant/PackageSnapshotPanel.vue +241 -0
- package/src/pages-tenant/PendingVersionBanner.vue +126 -0
- package/src/pages-tenant/PlanChangeWizard.vue +630 -0
- package/src/pages-tenant/TenantPlanSection.vue +729 -0
- package/src/pages-tenant/UsageBar.vue +107 -0
- package/src/pages-tenant/default-i18n.ts +280 -0
- package/src/pages-tenant/tenant-plan-section/BundlePreviewDialog.vue +304 -0
- package/src/pages-tenant/tenant-plan-section/TenantBundleStore.vue +323 -0
- package/src/pages-tenant/tenant-plan-section/TenantFeatureMatrix.vue +122 -0
- package/src/pages-tenant/tenant-plan-section/TenantPlanCardHeader.vue +67 -0
- package/src/pages-tenant/tenant-plan-section/TenantUsageGrid.vue +31 -0
- package/src/plan-versions-catalog.ts +368 -0
- package/src/platform-loaders.ts +68 -0
- package/src/project-page-host.ts +108 -0
- package/src/testing-e2e/admin-pages-suite.ts +187 -0
- package/src/types.ts +58 -0
- package/src/use-actions.ts +25 -0
- package/src/use-api-list.ts +151 -0
- package/src/use-audit-entries.ts +48 -0
- package/src/use-batch-columns.ts +59 -0
- package/src/use-bulk-publish.ts +150 -0
- package/src/use-bundle-versions-map.ts +112 -0
- package/src/use-bundles.ts +297 -0
- package/src/use-business-types.ts +269 -0
- package/src/use-catalog-entries.ts +243 -0
- package/src/use-discovery.ts +158 -0
- package/src/use-entitlement.ts +87 -0
- package/src/use-live-plan-versions.ts +126 -0
- package/src/use-manifest.ts +57 -0
- package/src/use-marketing-projections.ts +160 -0
- package/src/use-nav.ts +33 -0
- package/src/use-plan-editor.ts +162 -0
- package/src/use-plan-versions.ts +83 -0
- package/src/use-plans.ts +375 -0
- package/src/use-platform-tenant-actions.ts +286 -0
- package/src/use-promotions.ts +126 -0
- package/src/use-public-boot.ts +40 -0
- package/src/use-subscription-draft.ts +355 -0
- package/src/use-super-admin-context.ts +93 -0
- package/src/use-tenant-action-flow.ts +238 -0
- package/src/use-tenant-billing-catalog.ts +160 -0
- package/src/use-tenant-billing.ts +453 -0
- package/src/use-tenant-manifest.ts +94 -0
- package/src/use-tenant-subscription-bundles.ts +148 -0
- package/src/use-tenants.ts +61 -0
- package/src/version.ts +10 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span class="sa-pill" :class="`sa-pill--${tone}`">
|
|
3
|
+
<q-icon v-if="icon" :name="icon" size="11px" />
|
|
4
|
+
{{ label }}
|
|
5
|
+
</span>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
// Generic status pill for tenant status, pilot marker,
|
|
10
|
+
// suspended marker etc. Apps pass `label`/`icon`/`tone` through and
|
|
11
|
+
// combine several pills side by side for composite status
|
|
12
|
+
// displays (e.g. "Aktiv + PILOT" or "Trial + SUSPENDIERT").
|
|
13
|
+
|
|
14
|
+
export type PillTone = 'positive' | 'warning' | 'negative' | 'muted' | 'primary' | 'accent';
|
|
15
|
+
|
|
16
|
+
defineProps<{
|
|
17
|
+
label: string;
|
|
18
|
+
icon?: string;
|
|
19
|
+
tone: PillTone;
|
|
20
|
+
}>();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style scoped>
|
|
24
|
+
.sa-pill {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 4px;
|
|
28
|
+
font-size: 10.5px;
|
|
29
|
+
font-weight: 700;
|
|
30
|
+
letter-spacing: 0.04em;
|
|
31
|
+
padding: 3px 8px;
|
|
32
|
+
border-radius: 5px;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
}
|
|
35
|
+
.sa-sa-pill :deep(.q-icon) {
|
|
36
|
+
color: inherit;
|
|
37
|
+
}
|
|
38
|
+
.sa-pill--positive {
|
|
39
|
+
background: var(--sa-positive-soft, rgba(4, 120, 87, 0.1));
|
|
40
|
+
color: var(--sa-positive, #047857);
|
|
41
|
+
}
|
|
42
|
+
.sa-pill--warning {
|
|
43
|
+
background: var(--sa-warning-soft, rgba(245, 158, 11, 0.1));
|
|
44
|
+
color: var(--sa-warning, #b45309);
|
|
45
|
+
}
|
|
46
|
+
.sa-pill--negative {
|
|
47
|
+
background: var(--sa-negative-soft, rgba(220, 38, 38, 0.08));
|
|
48
|
+
color: var(--sa-negative, #dc2626);
|
|
49
|
+
}
|
|
50
|
+
.sa-pill--muted {
|
|
51
|
+
background: #f1f5f9;
|
|
52
|
+
color: var(--sa-muted, #64748b);
|
|
53
|
+
}
|
|
54
|
+
.sa-pill--primary {
|
|
55
|
+
background: var(--sa-primary-soft, rgba(63, 107, 255, 0.08));
|
|
56
|
+
color: var(--sa-primary, #3f6bff);
|
|
57
|
+
}
|
|
58
|
+
.sa-pill--accent {
|
|
59
|
+
background: rgba(245, 158, 11, 0.16);
|
|
60
|
+
color: #b45309;
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Formatting helpers for the tenants page.
|
|
2
|
+
//
|
|
3
|
+
// Shared between TenantsPage.vue and subcomponents (Avatar, Pill).
|
|
4
|
+
// Apps with their own plan accents pass them through via the `planAccents` prop;
|
|
5
|
+
// the default map covers the standard plan IDs (BASIC..ENTERPRISE).
|
|
6
|
+
|
|
7
|
+
export const DEFAULT_PLAN_ACCENTS: Record<string, string> = {
|
|
8
|
+
BASIC: '#94a3b8',
|
|
9
|
+
STANDARD: '#3f6bff',
|
|
10
|
+
PROFESSIONAL: '#7c3aed',
|
|
11
|
+
BUSINESS: '#0ea5e9',
|
|
12
|
+
ENTERPRISE: '#0f172a',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export function tenantInitials(name: string | null | undefined): string {
|
|
16
|
+
if (!name) return '?';
|
|
17
|
+
return name
|
|
18
|
+
.replace(/[^A-Za-zÄÖÜäöü]/g, '')
|
|
19
|
+
.slice(0, 2)
|
|
20
|
+
.toUpperCase();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function planAccent(
|
|
24
|
+
planId: string | null | undefined,
|
|
25
|
+
accents: Record<string, string> = DEFAULT_PLAN_ACCENTS,
|
|
26
|
+
): string {
|
|
27
|
+
if (!planId) return '#94a3b8';
|
|
28
|
+
return accents[planId] ?? '#3f6bff';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function formatDateDe(iso: string | null | undefined): string {
|
|
32
|
+
if (!iso) return '—';
|
|
33
|
+
return new Date(iso).toLocaleDateString('de-DE', {
|
|
34
|
+
day: '2-digit',
|
|
35
|
+
month: 'short',
|
|
36
|
+
year: 'numeric',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<tr class="sp-limits-row" :class="{ 'sp-limits-row--exceeded': row.exceeded }">
|
|
3
|
+
<td class="sp-limits-row__label">{{ label }}</td>
|
|
4
|
+
<td class="sp-limits-row__used">{{ formatValue(row.used) }}</td>
|
|
5
|
+
<td class="sp-limits-row__current">{{ formatMax(row.currentMax) }}</td>
|
|
6
|
+
<td class="sp-limits-row__target">
|
|
7
|
+
<span
|
|
8
|
+
:class="row.exceeded ? 'sp-limits-row__target--bad' : 'sp-limits-row__target--ok'"
|
|
9
|
+
>
|
|
10
|
+
{{ formatMax(row.targetMax) }}
|
|
11
|
+
</span>
|
|
12
|
+
</td>
|
|
13
|
+
</tr>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
// LimitsRow — one row in the limits comparison table of the plan change
|
|
18
|
+
// wizard (usage / current limit / target limit, exceeded highlighted in
|
|
19
|
+
// color). Rendered by the PlanChangeWizard for each quotaKey from
|
|
20
|
+
// `preview.limitsCheck`.
|
|
21
|
+
|
|
22
|
+
interface Props {
|
|
23
|
+
label: string;
|
|
24
|
+
row: {
|
|
25
|
+
used: number;
|
|
26
|
+
currentMax: number;
|
|
27
|
+
targetMax: number;
|
|
28
|
+
exceeded: boolean;
|
|
29
|
+
};
|
|
30
|
+
fractional?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const props = defineProps<Props>();
|
|
34
|
+
|
|
35
|
+
function formatValue(n: number): string {
|
|
36
|
+
return props.fractional ? n.toFixed(1) : Math.round(n).toString();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function formatMax(n: number): string {
|
|
40
|
+
if (n === -1) return '∞';
|
|
41
|
+
return formatValue(n);
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<style scoped>
|
|
46
|
+
.sp-limits-row {
|
|
47
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
|
48
|
+
}
|
|
49
|
+
.sp-limits-row td {
|
|
50
|
+
padding: 8px 12px;
|
|
51
|
+
font-variant-numeric: tabular-nums;
|
|
52
|
+
}
|
|
53
|
+
.sp-limits-row__label {
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
}
|
|
56
|
+
.sp-limits-row__target--ok {
|
|
57
|
+
color: var(--q-positive, #21ba45);
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
}
|
|
60
|
+
.sp-limits-row__target--bad {
|
|
61
|
+
color: var(--q-negative, #c10015);
|
|
62
|
+
font-weight: 600;
|
|
63
|
+
}
|
|
64
|
+
.sp-limits-row--exceeded {
|
|
65
|
+
background: rgba(193, 0, 21, 0.05);
|
|
66
|
+
}
|
|
67
|
+
</style>
|