@saasicat/ui-vue 0.19.0 → 0.22.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/dist/{catalog-JXdKdIqG.d.cts → catalog-DJcfm5N2.d.cts} +21 -7
- package/dist/{catalog-JXdKdIqG.d.ts → catalog-DJcfm5N2.d.ts} +21 -7
- package/dist/{chunk-DPTIOQXX.js → chunk-F7NRM6KI.js} +56 -28
- package/dist/{chunk-RVG6LQHL.js → chunk-LY52T4N4.js} +21 -2
- package/dist/{chunk-ORX3ZG47.js → chunk-XMMFN2WJ.js} +74 -3
- package/dist/client/index.cjs +134 -29
- package/dist/client/index.d.cts +53 -3
- package/dist/client/index.d.ts +53 -3
- package/dist/client/index.js +14 -2
- package/dist/index.cjs +321 -162
- package/dist/index.d.cts +30 -8
- package/dist/index.d.ts +30 -8
- package/dist/index.js +176 -133
- package/dist/quasar/index.cjs +78 -29
- package/dist/quasar/index.d.cts +2 -2
- package/dist/quasar/index.d.ts +2 -2
- package/dist/quasar/index.js +6 -2
- package/dist/testing-e2e/admin-pages-suite.d.cts +37 -0
- package/dist/testing-e2e/admin-pages-suite.d.ts +37 -0
- package/dist/{use-super-admin-i18n-BlqcD0N7.d.ts → use-super-admin-i18n-CHNdsSlm.d.ts} +34 -7
- package/dist/{use-super-admin-i18n-1nCOkvgi.d.cts → use-super-admin-i18n-CgTuNi8h.d.cts} +34 -7
- package/package.json +18 -8
- package/src/client/i18n/messages/bundles.ts +0 -2
- package/src/client/i18n/messages/common.ts +24 -0
- package/src/client/i18n/messages/discovery.ts +2 -2
- package/src/client/i18n/messages/marketing.ts +2 -4
- package/src/client/i18n/messages/plan-detail.ts +0 -4
- package/src/client/i18n/messages/plans.ts +20 -8
- package/src/client/i18n/messages/tenants.ts +0 -2
- package/src/client/index.ts +1 -0
- package/src/client/manifest-loader.ts +1 -1
- package/src/client/resolve-plans.ts +144 -0
- package/src/components/BundleVersionPublishDialog.vue +6 -6
- package/src/components/KvBlock.vue +4 -4
- package/src/components/MarketingPromotionsTab.vue +34 -48
- package/src/components/MfaPromptDialog.vue +8 -2
- package/src/components/TenantActionConfirmDialog.vue +4 -4
- package/src/components/VersionDiffPreview.vue +7 -7
- package/src/components/admin-page/AdminBody.vue +40 -0
- package/src/components/admin-page/AdminFilters.vue +12 -0
- package/src/components/admin-page/AdminHero.vue +49 -0
- package/src/components/admin-page/AdminKpi.vue +84 -0
- package/src/components/admin-page/AdminPage.vue +16 -0
- package/src/components/admin-page/AdminPaginator.vue +195 -0
- package/src/components/admin-page/AdminRefreshBtn.vue +39 -0
- package/src/components/admin-page/AdminSection.vue +53 -0
- package/src/components/admin-page/AdminStatistics.vue +40 -0
- package/src/components/admin-page/AdminTable.vue +175 -0
- package/src/components/bundle-editor/BundleCreatePanel.vue +23 -23
- package/src/components/bundle-editor/BundleFeaturesEditor.vue +7 -7
- package/src/components/bundle-editor/BundlePlanCompatPicker.vue +9 -9
- package/src/components/bundle-editor/BundleQuotasEditor.vue +11 -11
- package/src/components/bundle-editor/BundleStatusBanner.vue +6 -6
- package/src/components/bundle-editor/BundleVersionInlineEditor.vue +18 -18
- package/src/components/bundle-editor/BundleVersionStrip.vue +12 -12
- package/src/components/dialogs/PilotCreateDialog.vue +12 -12
- package/src/components/dialogs/PilotEditDialog.vue +7 -7
- package/src/components/dialogs/PromoCodeCreateDialog.vue +8 -8
- package/src/components/dialogs/PromoCodeDialogFields.vue +33 -19
- package/src/components/dialogs/PromoCodeEditDialog.vue +10 -10
- package/src/components/plan/PlanGrid.vue +1 -1
- package/src/components/plan-create-dialog/PlanCreateDialog.vue +34 -46
- package/src/components/plan-detail/PlanAuditLog.vue +7 -8
- package/src/components/plan-detail/PlanDetail.vue +95 -292
- package/src/components/plan-detail/PlanDetailKpis.vue +22 -27
- package/src/components/plan-detail/PlanTitleEdit.vue +133 -0
- package/src/components/plan-detail/PlanVersionDiffPanel.vue +5 -8
- package/src/components/plan-detail/PlanVersionsPanel.vue +9 -11
- package/src/components/plan-list/PlanList.vue +206 -457
- package/src/components/plan-matrix/PlanMatrix.vue +66 -183
- package/src/components/plan-review/PlanReview.vue +191 -275
- package/src/components/plan-version-editor/PlanCatalogPreview.vue +7 -5
- package/src/components/plan-version-editor/PlanVersionEditor.vue +200 -295
- package/src/components/plan-version-editor/PlanVersionEditorHeader.vue +23 -55
- package/src/index.ts +1 -0
- package/src/pages-standard/AdminLayout.vue +38 -12
- package/src/pages-standard/AdminManifestErrorPage.vue +79 -9
- package/src/pages-standard/AuditPage.vue +65 -109
- package/src/pages-standard/BundlesPage.vue +146 -179
- package/src/pages-standard/DashboardPage.vue +59 -154
- package/src/pages-standard/DiscoveryPage.vue +172 -227
- package/src/pages-standard/EmailHistoryPage.vue +118 -159
- package/src/pages-standard/MarketingCatalogPage.vue +399 -440
- package/src/pages-standard/PilotsPage.vue +69 -117
- package/src/pages-standard/PlansPage.vue +240 -112
- package/src/pages-standard/PlatformEmailPage.vue +56 -91
- package/src/pages-standard/PromoCodeDetailPage.vue +49 -74
- package/src/pages-standard/PromoCodesPage.vue +95 -128
- package/src/pages-standard/SubscriptionsPage.vue +19 -52
- package/src/pages-standard/SuperAdminLoginPage.vue +12 -12
- package/src/pages-standard/SuperAdminSetupWizard.vue +22 -18
- package/src/pages-standard/TenantDetailPage.vue +100 -191
- package/src/pages-standard/TenantsPage.vue +190 -295
- package/src/pages-standard/UsersPage.vue +89 -157
- package/src/pages-standard/bundles-page/BundleAccordionList.vue +20 -17
- package/src/pages-standard/bundles-page/BundlesKpis.vue +13 -22
- package/src/pages-standard/bundles-page/BundlesToolbar.vue +63 -0
- package/src/pages-standard/discovery-page/CatalogEntryTransPanel.vue +10 -10
- package/src/pages-standard/discovery-page/DiscoveryCapList.vue +5 -5
- package/src/pages-standard/discovery-page/DiscoveryFeatureCard.vue +16 -16
- package/src/pages-standard/discovery-page/DiscoveryKpis.vue +31 -27
- package/src/pages-standard/discovery-page/DiscoveryQuotaCard.vue +7 -7
- package/src/pages-standard/marketing-catalog/MarketingCatalogAdmin.vue +111 -73
- package/src/pages-standard/marketing-catalog/MarketingCatalogHeader.vue +43 -62
- package/src/pages-standard/marketing-catalog/MarketingCatalogPreview.vue +53 -35
- package/src/pages-standard/marketing-catalog/MarketingCatalogToolbar.vue +7 -7
- package/src/pages-standard/plan-versions/PlanDiffCard.vue +6 -6
- package/src/pages-standard/plan-versions/PlanVersionsDiff.vue +6 -6
- package/src/pages-standard/plan-versions/PlanVersionsTimeline.vue +16 -16
- package/src/pages-standard/plans-page/PlanBundleOverview.vue +14 -29
- package/src/pages-standard/plans-page/PlanPublishDialog.vue +1 -1
- package/src/pages-standard/plans-page/PlansPageToast.vue +6 -6
- package/src/pages-standard/sa-theme.css +552 -86
- package/src/pages-standard/tenant-detail/TenantMasterData.vue +28 -0
- package/src/pages-standard/tenant-detail/TenantUsage.vue +31 -0
- package/src/pages-standard/tenant-detail/TenantUsers.vue +15 -0
- package/src/pages-standard/tenant-detail/types.ts +38 -0
- package/src/pages-standard/tenants/StatusPill.vue +2 -2
- package/src/pages-tenant/MySubscriptionBundlesPage.vue +25 -25
- package/src/pages-tenant/OnboardingConfigurator.vue +1 -5
- package/src/pages-tenant/PackageSnapshotPanel.vue +1 -1
- package/src/pages-tenant/TenantPlanSection.vue +12 -20
- package/src/quasar/create-super-admin-app.ts +4 -0
- package/src/vue/entitlement-provider.ts +0 -1
- package/src/vue/feature-router-guard.ts +0 -1
- package/src/vue/super-admin-context.ts +106 -1
- package/src/vue/use-api-list.ts +2 -1
- package/src/vue/use-mfa-prompt.ts +72 -0
- package/src/vue/use-pagination.ts +63 -0
- package/src/vue/use-plans.ts +1 -2
- package/src/vue/use-sign-out.ts +90 -0
- package/src/vue/use-tenant-billing.ts +1 -1
- package/src/vue/use-tenant-manifest.ts +0 -1
- package/src/components/KpiCard.vue +0 -53
- package/src/components/plan-cockpit/PlanCockpit.vue +0 -1012
- package/src/components/plan-cockpit/PlanCockpitAuditLog.vue +0 -72
- package/src/components/plan-cockpit/PlanCockpitDiffPanel.vue +0 -100
- package/src/components/plan-cockpit/PlanCockpitHeader.vue +0 -101
- package/src/components/plan-cockpit/PlanCockpitImpactPanel.vue +0 -112
- package/src/components/plan-cockpit/PlanCockpitKpis.vue +0 -68
- package/src/components/plan-cockpit/PlanCockpitVersions.vue +0 -251
- package/src/components/plan-cockpit/types.ts +0 -72
- package/src/components/plan-detail/PlanDetailHeader.vue +0 -194
- package/src/pages-standard/bundles-page/BundlesHeader.vue +0 -68
- package/src/pages-standard/discovery-page/DiscoveryHeader.vue +0 -34
package/dist/index.cjs
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
ADMIN_UI_VERSION: () => ADMIN_UI_VERSION,
|
|
24
|
+
ALL_ROWS: () => ALL_ROWS,
|
|
24
25
|
ActionDefNotInManifestError: () => ActionDefNotInManifestError,
|
|
25
26
|
ActionRegistry: () => ActionRegistry,
|
|
26
27
|
BatchColumnDriftError: () => BatchColumnDriftError,
|
|
@@ -32,6 +33,7 @@ __export(src_exports, {
|
|
|
32
33
|
CatalogEntriesApiError: () => CatalogEntriesApiError,
|
|
33
34
|
DEFAULT_I18N_DE: () => DEFAULT_I18N_DE,
|
|
34
35
|
DEFAULT_I18N_EN: () => DEFAULT_I18N_EN,
|
|
36
|
+
DEFAULT_ROWS_PER_PAGE: () => DEFAULT_ROWS_PER_PAGE,
|
|
35
37
|
DEFAULT_SA_LOCALE: () => DEFAULT_SA_LOCALE,
|
|
36
38
|
DEFAULT_STANDARD_PAGE_ROUTES: () => DEFAULT_STANDARD_PAGE_ROUTES,
|
|
37
39
|
DEFAULT_YEARLY_FACTOR: () => DEFAULT_YEARLY_FACTOR,
|
|
@@ -42,6 +44,7 @@ __export(src_exports, {
|
|
|
42
44
|
ManifestLoader: () => ManifestLoader,
|
|
43
45
|
MarketingProjectionsApiError: () => MarketingProjectionsApiError,
|
|
44
46
|
MissingHandlerError: () => MissingHandlerError,
|
|
47
|
+
PAGE_SIZE_OPTIONS: () => PAGE_SIZE_OPTIONS,
|
|
45
48
|
PlannedOnlyFeatureError: () => PlannedOnlyFeatureError,
|
|
46
49
|
PlansApiError: () => PlansApiError,
|
|
47
50
|
ProjectPageHost: () => ProjectPageHost,
|
|
@@ -51,6 +54,7 @@ __export(src_exports, {
|
|
|
51
54
|
SA_LOCALE_LABELS: () => SA_LOCALE_LABELS,
|
|
52
55
|
SA_LOCALE_STORAGE_KEY: () => SA_LOCALE_STORAGE_KEY,
|
|
53
56
|
SA_MESSAGES: () => SA_MESSAGES,
|
|
57
|
+
SERVER_PAGE_SIZE_OPTIONS: () => SERVER_PAGE_SIZE_OPTIONS,
|
|
54
58
|
SUPER_ADMIN_ACTIONS_KEY: () => SUPER_ADMIN_ACTIONS_KEY,
|
|
55
59
|
SUPER_ADMIN_BRAND_KEY: () => SUPER_ADMIN_BRAND_KEY,
|
|
56
60
|
SUPER_ADMIN_ENDPOINTS_KEY: () => SUPER_ADMIN_ENDPOINTS_KEY,
|
|
@@ -58,6 +62,7 @@ __export(src_exports, {
|
|
|
58
62
|
SUPER_ADMIN_HTTP_KEY: () => SUPER_ADMIN_HTTP_KEY,
|
|
59
63
|
SUPER_ADMIN_I18N_KEY: () => SUPER_ADMIN_I18N_KEY,
|
|
60
64
|
SUPER_ADMIN_LOGIN_ADAPTER_KEY: () => SUPER_ADMIN_LOGIN_ADAPTER_KEY,
|
|
65
|
+
SUPER_ADMIN_MANIFEST_CLEAR_CACHE_KEY: () => SUPER_ADMIN_MANIFEST_CLEAR_CACHE_KEY,
|
|
61
66
|
SUPER_ADMIN_MANIFEST_KEY: () => SUPER_ADMIN_MANIFEST_KEY,
|
|
62
67
|
SUPER_ADMIN_NOTIFY_KEY: () => SUPER_ADMIN_NOTIFY_KEY,
|
|
63
68
|
TenantSubscriptionBundlesApiError: () => TenantSubscriptionBundlesApiError,
|
|
@@ -67,6 +72,7 @@ __export(src_exports, {
|
|
|
67
72
|
buildQuotaRegistry: () => buildQuotaRegistry,
|
|
68
73
|
buildRoutes: () => buildRoutes,
|
|
69
74
|
buildSidebar: () => buildSidebar,
|
|
75
|
+
countPlans: () => countPlans,
|
|
70
76
|
createAdminResourceClient: () => createAdminResourceClient,
|
|
71
77
|
createAdminRoutes: () => createAdminRoutes,
|
|
72
78
|
createManifestStore: () => createManifestStore,
|
|
@@ -84,6 +90,9 @@ __export(src_exports, {
|
|
|
84
90
|
formatCurrency: () => formatCurrency,
|
|
85
91
|
formatMessage: () => formatMessage,
|
|
86
92
|
getJson: () => getJson,
|
|
93
|
+
isCurrentlyValid: () => isCurrentlyValid,
|
|
94
|
+
isExpired: () => isExpired,
|
|
95
|
+
isFutureScheduled: () => isFutureScheduled,
|
|
87
96
|
isProductionBoot: () => isProductionBoot,
|
|
88
97
|
isSaBuiltinLocale: () => isSaBuiltinLocale,
|
|
89
98
|
mergeMessages: () => mergeMessages,
|
|
@@ -92,6 +101,8 @@ __export(src_exports, {
|
|
|
92
101
|
resolveExtension: () => resolveExtension,
|
|
93
102
|
resolveLoginBranding: () => resolveLoginBranding,
|
|
94
103
|
resolveMessages: () => resolveMessages,
|
|
104
|
+
resolvePlans: () => resolvePlans,
|
|
105
|
+
todayIsoDate: () => todayIsoDate,
|
|
95
106
|
trimTrailingSlashes: () => trimTrailingSlashes,
|
|
96
107
|
useActions: () => useActions,
|
|
97
108
|
useApiList: () => useApiList,
|
|
@@ -109,6 +120,7 @@ __export(src_exports, {
|
|
|
109
120
|
useManifest: () => useManifest,
|
|
110
121
|
useMarketingProjections: () => useMarketingProjections,
|
|
111
122
|
useNav: () => useNav,
|
|
123
|
+
usePagination: () => usePagination,
|
|
112
124
|
usePlanEditor: () => usePlanEditor,
|
|
113
125
|
usePlanVersions: () => usePlanVersions,
|
|
114
126
|
usePlans: () => usePlans,
|
|
@@ -308,7 +320,7 @@ var ManifestLoader = class {
|
|
|
308
320
|
if (res.status !== 200) {
|
|
309
321
|
throw new ManifestLoadError(
|
|
310
322
|
res.status,
|
|
311
|
-
`Manifest
|
|
323
|
+
`Manifest endpoint responded with HTTP ${res.status}`
|
|
312
324
|
);
|
|
313
325
|
}
|
|
314
326
|
const body = await res.json();
|
|
@@ -914,8 +926,7 @@ var bundlesMessages = defineMessages(
|
|
|
914
926
|
title: "Bundles",
|
|
915
927
|
subtitle: "Produktgruppen aus Features & Quotas \u2014 verwendet in Pl\xE4nen. Bundles werden im SuperAdmin kuratiert.",
|
|
916
928
|
displayLocale: "Anzeige-Sprache",
|
|
917
|
-
newBundle: "Neues Bundle"
|
|
918
|
-
reload: "Liste neu laden"
|
|
929
|
+
newBundle: "Neues Bundle"
|
|
919
930
|
},
|
|
920
931
|
filter: {
|
|
921
932
|
all: "Alle Status",
|
|
@@ -1129,8 +1140,7 @@ var bundlesMessages = defineMessages(
|
|
|
1129
1140
|
title: "Bundles",
|
|
1130
1141
|
subtitle: "Product groups made of features & quotas \u2014 used in plans. Bundles are curated in the SuperAdmin.",
|
|
1131
1142
|
displayLocale: "Display language",
|
|
1132
|
-
newBundle: "New bundle"
|
|
1133
|
-
reload: "Reload list"
|
|
1143
|
+
newBundle: "New bundle"
|
|
1134
1144
|
},
|
|
1135
1145
|
filter: {
|
|
1136
1146
|
all: "All statuses",
|
|
@@ -1329,6 +1339,9 @@ var commonMessages = defineMessages(
|
|
|
1329
1339
|
loading: "Lade \u2026",
|
|
1330
1340
|
saving: "Speichere \u2026",
|
|
1331
1341
|
loadingData: "Daten werden geladen\u2026",
|
|
1342
|
+
noData: "Keine Daten vorhanden",
|
|
1343
|
+
filters: "Filter",
|
|
1344
|
+
results: "Ergebnisse",
|
|
1332
1345
|
error: "Fehler",
|
|
1333
1346
|
errorLoadFailed: "Laden fehlgeschlagen",
|
|
1334
1347
|
errorSaveFailed: "Speichern fehlgeschlagen",
|
|
@@ -1374,7 +1387,16 @@ var commonMessages = defineMessages(
|
|
|
1374
1387
|
unlimited: "unbegrenzt",
|
|
1375
1388
|
both: "Beide",
|
|
1376
1389
|
createFailed: "Anlegen fehlgeschlagen",
|
|
1377
|
-
noChanges: "Keine \xC4nderungen"
|
|
1390
|
+
noChanges: "Keine \xC4nderungen",
|
|
1391
|
+
paginator: {
|
|
1392
|
+
label: "Seitennavigation",
|
|
1393
|
+
rowsPerPage: "Zeilen pro Seite",
|
|
1394
|
+
all: "Alle",
|
|
1395
|
+
page: "Seite {page}/{pages}",
|
|
1396
|
+
pageInput: "Seite, 1 bis {pages}",
|
|
1397
|
+
previous: "Vorherige Seite",
|
|
1398
|
+
next: "N\xE4chste Seite"
|
|
1399
|
+
}
|
|
1378
1400
|
},
|
|
1379
1401
|
{
|
|
1380
1402
|
save: "Save",
|
|
@@ -1399,6 +1421,9 @@ var commonMessages = defineMessages(
|
|
|
1399
1421
|
loading: "Loading \u2026",
|
|
1400
1422
|
saving: "Saving \u2026",
|
|
1401
1423
|
loadingData: "Loading data\u2026",
|
|
1424
|
+
noData: "No data available",
|
|
1425
|
+
filters: "Filters",
|
|
1426
|
+
results: "Results",
|
|
1402
1427
|
error: "Error",
|
|
1403
1428
|
errorLoadFailed: "Failed to load",
|
|
1404
1429
|
errorSaveFailed: "Failed to save",
|
|
@@ -1444,7 +1469,16 @@ var commonMessages = defineMessages(
|
|
|
1444
1469
|
unlimited: "unlimited",
|
|
1445
1470
|
both: "Both",
|
|
1446
1471
|
createFailed: "Creation failed",
|
|
1447
|
-
noChanges: "No changes"
|
|
1472
|
+
noChanges: "No changes",
|
|
1473
|
+
paginator: {
|
|
1474
|
+
label: "Pagination",
|
|
1475
|
+
rowsPerPage: "Rows per page",
|
|
1476
|
+
all: "All",
|
|
1477
|
+
page: "Page {page}/{pages}",
|
|
1478
|
+
pageInput: "Page, 1 to {pages}",
|
|
1479
|
+
previous: "Previous page",
|
|
1480
|
+
next: "Next page"
|
|
1481
|
+
}
|
|
1448
1482
|
}
|
|
1449
1483
|
);
|
|
1450
1484
|
|
|
@@ -1549,7 +1583,7 @@ var discoveryMessages = defineMessages(
|
|
|
1549
1583
|
quota: {
|
|
1550
1584
|
usageProvider: "UsageProvider",
|
|
1551
1585
|
usageProviderMissing: "fehlt",
|
|
1552
|
-
noUsageProviderWarning: "Eine harte Quota ohne UsageProvider ist nicht deploy-f\xE4hig (Preflight
|
|
1586
|
+
noUsageProviderWarning: "Eine harte Quota ohne UsageProvider ist nicht deploy-f\xE4hig (Preflight).",
|
|
1553
1587
|
outdatedBanner: "Die code-abgeleiteten Quota-Fakten (Einheit/Enforcement/Provider) haben sich seit der letzten Freigabe ge\xE4ndert \u2014 bitte pr\xFCfen und"
|
|
1554
1588
|
},
|
|
1555
1589
|
caps: {
|
|
@@ -1653,7 +1687,7 @@ var discoveryMessages = defineMessages(
|
|
|
1653
1687
|
quota: {
|
|
1654
1688
|
usageProvider: "UsageProvider",
|
|
1655
1689
|
usageProviderMissing: "missing",
|
|
1656
|
-
noUsageProviderWarning: "A hard quota without a UsageProvider is not deployable (preflight
|
|
1690
|
+
noUsageProviderWarning: "A hard quota without a UsageProvider is not deployable (preflight).",
|
|
1657
1691
|
outdatedBanner: "The code-derived quota facts (unit/enforcement/provider) have changed since the last approval \u2014 please review and"
|
|
1658
1692
|
},
|
|
1659
1693
|
caps: {
|
|
@@ -1813,8 +1847,7 @@ var marketingMessages = defineMessages(
|
|
|
1813
1847
|
localesLabel: "Sprachen:",
|
|
1814
1848
|
defaultLocale: "Default-Sprache",
|
|
1815
1849
|
deactivateLocale: "Sprache deaktivieren",
|
|
1816
|
-
addLocale: "+ Sprache"
|
|
1817
|
-
refresh: "Aktualisieren"
|
|
1850
|
+
addLocale: "+ Sprache"
|
|
1818
1851
|
},
|
|
1819
1852
|
page: {
|
|
1820
1853
|
loading: "Lade Marketing-Catalog \u2026",
|
|
@@ -1882,7 +1915,7 @@ var marketingMessages = defineMessages(
|
|
|
1882
1915
|
},
|
|
1883
1916
|
promotionsTab: {
|
|
1884
1917
|
title: "Aktionen & Rabatte",
|
|
1885
|
-
subtitle: "Zeitlich begrenzte Preis-Aktionen \u2014 \xFCberschreiben den regul\xE4ren Preis auf der Pricing-Page
|
|
1918
|
+
subtitle: "Zeitlich begrenzte Preis-Aktionen \u2014 \xFCberschreiben den regul\xE4ren Preis auf der Pricing-Page.",
|
|
1886
1919
|
add: "+ Aktion anlegen",
|
|
1887
1920
|
timelineHead: "Aktions-Timeline \xB7 gestrichelt = heute",
|
|
1888
1921
|
today: "heute",
|
|
@@ -1941,8 +1974,7 @@ var marketingMessages = defineMessages(
|
|
|
1941
1974
|
localesLabel: "Languages:",
|
|
1942
1975
|
defaultLocale: "Default language",
|
|
1943
1976
|
deactivateLocale: "Deactivate language",
|
|
1944
|
-
addLocale: "+ Language"
|
|
1945
|
-
refresh: "Refresh"
|
|
1977
|
+
addLocale: "+ Language"
|
|
1946
1978
|
},
|
|
1947
1979
|
page: {
|
|
1948
1980
|
loading: "Loading marketing catalog \u2026",
|
|
@@ -2010,7 +2042,7 @@ var marketingMessages = defineMessages(
|
|
|
2010
2042
|
},
|
|
2011
2043
|
promotionsTab: {
|
|
2012
2044
|
title: "Promotions & discounts",
|
|
2013
|
-
subtitle: "Time-limited price promotions \u2014 they override the regular price on the pricing page
|
|
2045
|
+
subtitle: "Time-limited price promotions \u2014 they override the regular price on the pricing page.",
|
|
2014
2046
|
add: "+ Create promotion",
|
|
2015
2047
|
timelineHead: "Promotion timeline \xB7 dashed = today",
|
|
2016
2048
|
today: "today",
|
|
@@ -2275,10 +2307,8 @@ var planDetailMessages = defineMessages(
|
|
|
2275
2307
|
versionsSummary: "{published} live/superseded",
|
|
2276
2308
|
versionsSummaryWithDrafts: "{published} live/superseded \xB7 {drafts} Draft",
|
|
2277
2309
|
openDraft: "Offener Draft",
|
|
2278
|
-
noDraft: "Kein Draft",
|
|
2279
2310
|
readyToEdit: "Bereit zum Bearbeiten",
|
|
2280
|
-
noOpenDraft: "Keine Draft-Version offen"
|
|
2281
|
-
createNewDraft: "Neue Draft anlegen"
|
|
2311
|
+
noOpenDraft: "Keine Draft-Version offen"
|
|
2282
2312
|
},
|
|
2283
2313
|
versions: {
|
|
2284
2314
|
title: "Versionen",
|
|
@@ -2402,10 +2432,8 @@ var planDetailMessages = defineMessages(
|
|
|
2402
2432
|
versionsSummary: "{published} live/superseded",
|
|
2403
2433
|
versionsSummaryWithDrafts: "{published} live/superseded \xB7 {drafts} draft",
|
|
2404
2434
|
openDraft: "Open draft",
|
|
2405
|
-
noDraft: "No draft",
|
|
2406
2435
|
readyToEdit: "Ready to edit",
|
|
2407
|
-
noOpenDraft: "No draft version open"
|
|
2408
|
-
createNewDraft: "Create a new draft"
|
|
2436
|
+
noOpenDraft: "No draft version open"
|
|
2409
2437
|
},
|
|
2410
2438
|
versions: {
|
|
2411
2439
|
title: "Versions",
|
|
@@ -2792,6 +2820,7 @@ var plansMessages = defineMessages(
|
|
|
2792
2820
|
// PlansPage — shell of the plan area: loading state, toasts and the
|
|
2793
2821
|
// error texts of the draft/publish/archive/discard actions.
|
|
2794
2822
|
page: {
|
|
2823
|
+
subtitle: "Pl\xE4ne b\xFCndeln Features & Quotas zu einem Angebot. Jede \xC4nderung wird als neue Version ver\xF6ffentlicht \u2014 Live-Versionen bleiben unangetastet.",
|
|
2795
2824
|
loading: "Pl\xE4ne werden geladen\u2026",
|
|
2796
2825
|
toastPlanCreated: "Plan {planKey} angelegt \u2014 jetzt die erste Version zusammenstellen.",
|
|
2797
2826
|
toastDraftSaved: "Draft v{version} von {planKey} gespeichert.",
|
|
@@ -2838,7 +2867,10 @@ var plansMessages = defineMessages(
|
|
|
2838
2867
|
// PlanList — default plan overview with one row per plan.
|
|
2839
2868
|
list: {
|
|
2840
2869
|
title: "Alle Pl\xE4ne",
|
|
2841
|
-
|
|
2870
|
+
statPlans: "Pl\xE4ne",
|
|
2871
|
+
statLive: "Live",
|
|
2872
|
+
statDrafts: "Offene Drafts",
|
|
2873
|
+
statTenants: "Mandanten",
|
|
2842
2874
|
matrixView: "Matrix-Ansicht",
|
|
2843
2875
|
newPlan: "Neuer Plan",
|
|
2844
2876
|
searchPlaceholder: "Plan suchen\u2026",
|
|
@@ -2876,7 +2908,10 @@ var plansMessages = defineMessages(
|
|
|
2876
2908
|
// PlanMatrix — all plans side by side, components as rows.
|
|
2877
2909
|
matrix: {
|
|
2878
2910
|
title: "Pl\xE4ne \xB7 Matrix-Vergleich",
|
|
2879
|
-
|
|
2911
|
+
statPlans: "Pl\xE4ne",
|
|
2912
|
+
statFeatures: "Features",
|
|
2913
|
+
statQuotas: "Quotas",
|
|
2914
|
+
statBundles: "Bundles",
|
|
2880
2915
|
catalogPreview: "Catalog-Vorschau",
|
|
2881
2916
|
createPlan: "Plan anlegen",
|
|
2882
2917
|
createPlanSub: "oder Klon erstellen",
|
|
@@ -3017,6 +3052,7 @@ var plansMessages = defineMessages(
|
|
|
3017
3052
|
},
|
|
3018
3053
|
{
|
|
3019
3054
|
page: {
|
|
3055
|
+
subtitle: "Plans bundle features & quotas into an offering. Every change ships as a new version \u2014 live versions stay untouched.",
|
|
3020
3056
|
loading: "Loading plans\u2026",
|
|
3021
3057
|
toastPlanCreated: "Plan {planKey} created \u2014 now assemble the first version.",
|
|
3022
3058
|
toastDraftSaved: "Draft v{version} of {planKey} saved.",
|
|
@@ -3061,7 +3097,10 @@ var plansMessages = defineMessages(
|
|
|
3061
3097
|
},
|
|
3062
3098
|
list: {
|
|
3063
3099
|
title: "All plans",
|
|
3064
|
-
|
|
3100
|
+
statPlans: "Plans",
|
|
3101
|
+
statLive: "Live",
|
|
3102
|
+
statDrafts: "Open drafts",
|
|
3103
|
+
statTenants: "Tenants",
|
|
3065
3104
|
matrixView: "Matrix view",
|
|
3066
3105
|
newPlan: "New plan",
|
|
3067
3106
|
searchPlaceholder: "Search plan\u2026",
|
|
@@ -3098,7 +3137,10 @@ var plansMessages = defineMessages(
|
|
|
3098
3137
|
},
|
|
3099
3138
|
matrix: {
|
|
3100
3139
|
title: "Plans \xB7 matrix comparison",
|
|
3101
|
-
|
|
3140
|
+
statPlans: "Plans",
|
|
3141
|
+
statFeatures: "Features",
|
|
3142
|
+
statQuotas: "Quotas",
|
|
3143
|
+
statBundles: "Bundles",
|
|
3102
3144
|
catalogPreview: "Catalog preview",
|
|
3103
3145
|
createPlan: "Create plan",
|
|
3104
3146
|
createPlanSub: "or create a clone",
|
|
@@ -3587,8 +3629,7 @@ var tenantsMessages = defineMessages(
|
|
|
3587
3629
|
columnUsage: "Verbrauch",
|
|
3588
3630
|
columnCreatedAt: "Angelegt",
|
|
3589
3631
|
suspended: "Suspendiert",
|
|
3590
|
-
empty: "Keine Mandanten mit diesen Filtern."
|
|
3591
|
-
pagination: "{total} Mandanten \xB7 Seite {page} / {pages}"
|
|
3632
|
+
empty: "Keine Mandanten mit diesen Filtern."
|
|
3592
3633
|
},
|
|
3593
3634
|
detail: {
|
|
3594
3635
|
backToList: "Mandanten-Liste",
|
|
@@ -3636,8 +3677,7 @@ var tenantsMessages = defineMessages(
|
|
|
3636
3677
|
columnUsage: "Usage",
|
|
3637
3678
|
columnCreatedAt: "Created",
|
|
3638
3679
|
suspended: "Suspended",
|
|
3639
|
-
empty: "No tenants match these filters."
|
|
3640
|
-
pagination: "{total} tenants \xB7 Page {page} / {pages}"
|
|
3680
|
+
empty: "No tenants match these filters."
|
|
3641
3681
|
},
|
|
3642
3682
|
detail: {
|
|
3643
3683
|
backToList: "Tenant list",
|
|
@@ -3833,6 +3873,71 @@ function isProductionBoot(boot) {
|
|
|
3833
3873
|
return boot?.project?.environment === "production";
|
|
3834
3874
|
}
|
|
3835
3875
|
|
|
3876
|
+
// src/client/resolve-plans.ts
|
|
3877
|
+
function todayIsoDate() {
|
|
3878
|
+
return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
3879
|
+
}
|
|
3880
|
+
function isCurrentlyValid(v, today) {
|
|
3881
|
+
if (!v.publishedAt) return false;
|
|
3882
|
+
if (v.validFrom && v.validFrom.slice(0, 10) > today) return false;
|
|
3883
|
+
if (v.validUntil && v.validUntil.slice(0, 10) < today) return false;
|
|
3884
|
+
return true;
|
|
3885
|
+
}
|
|
3886
|
+
function isFutureScheduled(v, today) {
|
|
3887
|
+
if (!v.publishedAt) return false;
|
|
3888
|
+
if (!v.validFrom) return false;
|
|
3889
|
+
return v.validFrom.slice(0, 10) > today;
|
|
3890
|
+
}
|
|
3891
|
+
function isExpired(v, today) {
|
|
3892
|
+
if (!v.publishedAt) return false;
|
|
3893
|
+
if (!v.validUntil) return false;
|
|
3894
|
+
return v.validUntil.slice(0, 10) < today;
|
|
3895
|
+
}
|
|
3896
|
+
function resolvePlans({
|
|
3897
|
+
plans,
|
|
3898
|
+
versionsByPlanId,
|
|
3899
|
+
tenantCountsByPlanKey,
|
|
3900
|
+
today = todayIsoDate()
|
|
3901
|
+
}) {
|
|
3902
|
+
return [...plans].sort((a, b) => a.sortOrder - b.sortOrder || a.planKey.localeCompare(b.planKey)).map((plan) => {
|
|
3903
|
+
const versions = versionsByPlanId[plan.id] ?? [];
|
|
3904
|
+
const drafts = versions.filter((v) => !v.publishedAt);
|
|
3905
|
+
const published = versions.filter((v) => Boolean(v.publishedAt));
|
|
3906
|
+
const currentLive = published.find((v) => isCurrentlyValid(v, today)) ?? null;
|
|
3907
|
+
const futureScheduled = published.filter((v) => isFutureScheduled(v, today)).sort((a, b) => (a.validFrom ?? "").localeCompare(b.validFrom ?? ""));
|
|
3908
|
+
const primary = currentLive ?? futureScheduled[0] ?? null;
|
|
3909
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3910
|
+
if (primary) seen.add(primary.id);
|
|
3911
|
+
const subRows = [];
|
|
3912
|
+
for (const v of [...futureScheduled, ...drafts]) {
|
|
3913
|
+
if (seen.has(v.id)) continue;
|
|
3914
|
+
subRows.push(v);
|
|
3915
|
+
seen.add(v.id);
|
|
3916
|
+
}
|
|
3917
|
+
return {
|
|
3918
|
+
plan,
|
|
3919
|
+
planKey: plan.planKey,
|
|
3920
|
+
label: plan.label,
|
|
3921
|
+
description: plan.description ?? null,
|
|
3922
|
+
currentLive,
|
|
3923
|
+
primary,
|
|
3924
|
+
subRows,
|
|
3925
|
+
hasAnyVersion: versions.length > 0,
|
|
3926
|
+
allExpired: versions.length > 0 && drafts.length === 0 && futureScheduled.length === 0 && published.every((v) => isExpired(v, today)),
|
|
3927
|
+
draft: drafts[0] ?? null,
|
|
3928
|
+
tenantCount: tenantCountsByPlanKey[plan.planKey] ?? 0
|
|
3929
|
+
};
|
|
3930
|
+
});
|
|
3931
|
+
}
|
|
3932
|
+
function countPlans(resolved) {
|
|
3933
|
+
return {
|
|
3934
|
+
plans: resolved.length,
|
|
3935
|
+
live: resolved.filter((p) => p.currentLive !== null).length,
|
|
3936
|
+
drafts: resolved.filter((p) => p.draft !== null).length,
|
|
3937
|
+
tenants: resolved.reduce((sum, p) => sum + p.tenantCount, 0)
|
|
3938
|
+
};
|
|
3939
|
+
}
|
|
3940
|
+
|
|
3836
3941
|
// src/vue/super-admin-context.ts
|
|
3837
3942
|
var SUPER_ADMIN_BRAND_KEY = /* @__PURE__ */ Symbol.for(
|
|
3838
3943
|
"@saasicat/ui-vue/SUPER_ADMIN_BRAND"
|
|
@@ -3849,17 +3954,27 @@ var SUPER_ADMIN_ACTIONS_KEY = /* @__PURE__ */ Symbol.for(
|
|
|
3849
3954
|
var SUPER_ADMIN_MANIFEST_KEY = /* @__PURE__ */ Symbol.for(
|
|
3850
3955
|
"@saasicat/ui-vue/SUPER_ADMIN_MANIFEST"
|
|
3851
3956
|
);
|
|
3957
|
+
var SUPER_ADMIN_MANIFEST_CLEAR_CACHE_KEY = /* @__PURE__ */ Symbol.for("@saasicat/ui-vue/SUPER_ADMIN_MANIFEST_CLEAR_CACHE");
|
|
3852
3958
|
var SUPER_ADMIN_LOGIN_ADAPTER_KEY = /* @__PURE__ */ Symbol.for(
|
|
3853
3959
|
"@saasicat/ui-vue/SUPER_ADMIN_LOGIN_ADAPTER"
|
|
3854
3960
|
);
|
|
3855
3961
|
var SUPER_ADMIN_HTTP_KEY = /* @__PURE__ */ Symbol.for(
|
|
3856
3962
|
"@saasicat/ui-vue/SUPER_ADMIN_HTTP"
|
|
3857
3963
|
);
|
|
3964
|
+
function isUnauthorizedError(err) {
|
|
3965
|
+
const status = err?.status;
|
|
3966
|
+
return status === 401 || status === 403;
|
|
3967
|
+
}
|
|
3858
3968
|
function buildNavigationGuard(options) {
|
|
3859
3969
|
const { authGuard, manifestGuard } = options;
|
|
3860
3970
|
if (!authGuard && !manifestGuard) return null;
|
|
3971
|
+
let redirectedForUnauthorized = false;
|
|
3972
|
+
let reachedLoginAfterRedirect = false;
|
|
3861
3973
|
return async (to) => {
|
|
3862
|
-
if (to.meta?.public === true)
|
|
3974
|
+
if (to.meta?.public === true) {
|
|
3975
|
+
if (redirectedForUnauthorized) reachedLoginAfterRedirect = true;
|
|
3976
|
+
return true;
|
|
3977
|
+
}
|
|
3863
3978
|
if (authGuard) {
|
|
3864
3979
|
if (!authGuard.isAuthenticated()) return authGuard.onUnauthenticated();
|
|
3865
3980
|
if (authGuard.isSuperAdmin && !authGuard.isSuperAdmin()) {
|
|
@@ -3869,7 +3984,15 @@ function buildNavigationGuard(options) {
|
|
|
3869
3984
|
if (manifestGuard) {
|
|
3870
3985
|
try {
|
|
3871
3986
|
await manifestGuard.ensureLoaded();
|
|
3987
|
+
redirectedForUnauthorized = false;
|
|
3988
|
+
reachedLoginAfterRedirect = false;
|
|
3872
3989
|
} catch (err) {
|
|
3990
|
+
if (authGuard && isUnauthorizedError(err)) {
|
|
3991
|
+
if (!redirectedForUnauthorized || !reachedLoginAfterRedirect) {
|
|
3992
|
+
redirectedForUnauthorized = true;
|
|
3993
|
+
return authGuard.onUnauthenticated();
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3873
3996
|
if (manifestGuard.errorRoute && to.path !== manifestGuard.errorRoute) {
|
|
3874
3997
|
return manifestGuard.errorRoute;
|
|
3875
3998
|
}
|
|
@@ -4124,7 +4247,7 @@ function useApiList(options) {
|
|
|
4124
4247
|
await load();
|
|
4125
4248
|
}
|
|
4126
4249
|
async function setPageSize(size) {
|
|
4127
|
-
pageSize.value = Math.max(1, Math.floor(size));
|
|
4250
|
+
pageSize.value = Math.min(200, Math.max(1, Math.floor(size)));
|
|
4128
4251
|
page.value = 1;
|
|
4129
4252
|
await load();
|
|
4130
4253
|
}
|
|
@@ -4154,15 +4277,39 @@ function useApiList(options) {
|
|
|
4154
4277
|
};
|
|
4155
4278
|
}
|
|
4156
4279
|
|
|
4157
|
-
// src/vue/use-
|
|
4280
|
+
// src/vue/use-pagination.ts
|
|
4158
4281
|
var import_vue5 = require("vue");
|
|
4282
|
+
var ALL_ROWS = 0;
|
|
4283
|
+
var DEFAULT_ROWS_PER_PAGE = 10;
|
|
4284
|
+
var PAGE_SIZE_OPTIONS = [10, 25, 50, 100, ALL_ROWS];
|
|
4285
|
+
var SERVER_PAGE_SIZE_OPTIONS = [10, 25, 50, 100];
|
|
4286
|
+
function usePagination(rows, initialRowsPerPage = DEFAULT_ROWS_PER_PAGE) {
|
|
4287
|
+
const page = (0, import_vue5.ref)(1);
|
|
4288
|
+
const rowsPerPage = (0, import_vue5.ref)(initialRowsPerPage);
|
|
4289
|
+
const total = (0, import_vue5.computed)(() => rows.value.length);
|
|
4290
|
+
const pageCount = (0, import_vue5.computed)(
|
|
4291
|
+
() => rowsPerPage.value === ALL_ROWS ? 1 : Math.max(1, Math.ceil(total.value / rowsPerPage.value))
|
|
4292
|
+
);
|
|
4293
|
+
(0, import_vue5.watch)(pageCount, (count) => {
|
|
4294
|
+
if (page.value > count) page.value = count;
|
|
4295
|
+
});
|
|
4296
|
+
const pagedRows = (0, import_vue5.computed)(() => {
|
|
4297
|
+
if (rowsPerPage.value === ALL_ROWS) return [...rows.value];
|
|
4298
|
+
const start = (page.value - 1) * rowsPerPage.value;
|
|
4299
|
+
return rows.value.slice(start, start + rowsPerPage.value);
|
|
4300
|
+
});
|
|
4301
|
+
return { page, rowsPerPage, total, pagedRows };
|
|
4302
|
+
}
|
|
4303
|
+
|
|
4304
|
+
// src/vue/use-tenants.ts
|
|
4305
|
+
var import_vue6 = require("vue");
|
|
4159
4306
|
function useTenants(options) {
|
|
4160
4307
|
if (!options?.endpoint) {
|
|
4161
4308
|
throw new Error(
|
|
4162
4309
|
'useTenants: `endpoint` is required (e.g. "/api/v1/admin/tenants" or "/api/admin/tenants"). The platform has no default because apps use different globalPrefix conventions.'
|
|
4163
4310
|
);
|
|
4164
4311
|
}
|
|
4165
|
-
const filter = options.filter ?? (0,
|
|
4312
|
+
const filter = options.filter ?? (0, import_vue6.ref)({});
|
|
4166
4313
|
const list = useApiList({
|
|
4167
4314
|
endpoint: options.endpoint,
|
|
4168
4315
|
filter,
|
|
@@ -4174,14 +4321,14 @@ function useTenants(options) {
|
|
|
4174
4321
|
}
|
|
4175
4322
|
|
|
4176
4323
|
// src/vue/use-audit-entries.ts
|
|
4177
|
-
var
|
|
4324
|
+
var import_vue7 = require("vue");
|
|
4178
4325
|
function useAuditEntries(options) {
|
|
4179
4326
|
if (!options?.endpoint) {
|
|
4180
4327
|
throw new Error(
|
|
4181
4328
|
'useAuditEntries: `endpoint` is required (e.g. "/api/admin/audit" or "/api/v1/admin/audit"). The platform has no default because apps use different globalPrefix conventions.'
|
|
4182
4329
|
);
|
|
4183
4330
|
}
|
|
4184
|
-
const filter = options.filter ?? (0,
|
|
4331
|
+
const filter = options.filter ?? (0, import_vue7.ref)({});
|
|
4185
4332
|
const list = useApiList({
|
|
4186
4333
|
endpoint: options.endpoint,
|
|
4187
4334
|
filter,
|
|
@@ -4193,7 +4340,7 @@ function useAuditEntries(options) {
|
|
|
4193
4340
|
}
|
|
4194
4341
|
|
|
4195
4342
|
// src/vue/use-entitlement.ts
|
|
4196
|
-
var
|
|
4343
|
+
var import_vue8 = require("vue");
|
|
4197
4344
|
function useEntitlement(options) {
|
|
4198
4345
|
if (!options?.endpoint) {
|
|
4199
4346
|
throw new Error(
|
|
@@ -4202,9 +4349,9 @@ function useEntitlement(options) {
|
|
|
4202
4349
|
}
|
|
4203
4350
|
const endpoint = options.endpoint;
|
|
4204
4351
|
const http = options.http ?? defaultHttpClient();
|
|
4205
|
-
const entitlement = (0,
|
|
4206
|
-
const loading = (0,
|
|
4207
|
-
const error = (0,
|
|
4352
|
+
const entitlement = (0, import_vue8.ref)(null);
|
|
4353
|
+
const loading = (0, import_vue8.ref)(false);
|
|
4354
|
+
const error = (0, import_vue8.ref)(null);
|
|
4208
4355
|
async function load() {
|
|
4209
4356
|
loading.value = true;
|
|
4210
4357
|
error.value = null;
|
|
@@ -4234,15 +4381,15 @@ function useEntitlement(options) {
|
|
|
4234
4381
|
}
|
|
4235
4382
|
|
|
4236
4383
|
// src/vue/use-tenant-manifest.ts
|
|
4237
|
-
var
|
|
4384
|
+
var import_vue9 = require("vue");
|
|
4238
4385
|
function useTenantManifest(options) {
|
|
4239
4386
|
if (!options?.endpoint) {
|
|
4240
4387
|
throw new Error('useTenantManifest: `endpoint` is required (e.g. "/api/tenant/manifest").');
|
|
4241
4388
|
}
|
|
4242
4389
|
const http = options.http ?? defaultHttpClient();
|
|
4243
|
-
const manifest = (0,
|
|
4244
|
-
const loading = (0,
|
|
4245
|
-
const error = (0,
|
|
4390
|
+
const manifest = (0, import_vue9.ref)(null);
|
|
4391
|
+
const loading = (0, import_vue9.ref)(false);
|
|
4392
|
+
const error = (0, import_vue9.ref)(null);
|
|
4246
4393
|
async function load() {
|
|
4247
4394
|
loading.value = true;
|
|
4248
4395
|
error.value = null;
|
|
@@ -4276,7 +4423,7 @@ function useTenantManifest(options) {
|
|
|
4276
4423
|
}
|
|
4277
4424
|
|
|
4278
4425
|
// src/vue/entitlement-provider.ts
|
|
4279
|
-
var
|
|
4426
|
+
var import_vue10 = require("vue");
|
|
4280
4427
|
var ENTITLEMENT_INJECTION_KEY = /* @__PURE__ */ Symbol.for(
|
|
4281
4428
|
"@saasicat/ui-vue/ENTITLEMENT"
|
|
4282
4429
|
);
|
|
@@ -4284,7 +4431,7 @@ function provideEntitlement(app, entitlement) {
|
|
|
4284
4431
|
app.provide(ENTITLEMENT_INJECTION_KEY, entitlement);
|
|
4285
4432
|
}
|
|
4286
4433
|
function useInjectedEntitlement() {
|
|
4287
|
-
return (0,
|
|
4434
|
+
return (0, import_vue10.inject)(ENTITLEMENT_INJECTION_KEY, null);
|
|
4288
4435
|
}
|
|
4289
4436
|
|
|
4290
4437
|
// src/vue/feature-router-guard.ts
|
|
@@ -4313,15 +4460,15 @@ function buildFeatureRouterGuard(options) {
|
|
|
4313
4460
|
}
|
|
4314
4461
|
|
|
4315
4462
|
// src/vue/use-tenant-billing-catalog.ts
|
|
4316
|
-
var
|
|
4463
|
+
var import_vue11 = require("vue");
|
|
4317
4464
|
function useTenantBillingCatalog(options = {}) {
|
|
4318
4465
|
const apiPrefix = trimTrailingSlashes(options.apiPrefix ?? "/billing");
|
|
4319
4466
|
const http = options.http ?? defaultHttpClient();
|
|
4320
|
-
const plans = (0,
|
|
4321
|
-
const featureRegistry = (0,
|
|
4322
|
-
const bundles = (0,
|
|
4323
|
-
const loading = (0,
|
|
4324
|
-
const error = (0,
|
|
4467
|
+
const plans = (0, import_vue11.ref)(null);
|
|
4468
|
+
const featureRegistry = (0, import_vue11.ref)(null);
|
|
4469
|
+
const bundles = (0, import_vue11.ref)(null);
|
|
4470
|
+
const loading = (0, import_vue11.ref)(false);
|
|
4471
|
+
const error = (0, import_vue11.ref)(null);
|
|
4325
4472
|
async function fetchJson(path) {
|
|
4326
4473
|
const res = await http(`${apiPrefix}${path}`, { method: "GET" });
|
|
4327
4474
|
if (res.status !== 200) {
|
|
@@ -4371,14 +4518,14 @@ function useTenantBillingCatalog(options = {}) {
|
|
|
4371
4518
|
}
|
|
4372
4519
|
|
|
4373
4520
|
// src/vue/use-tenant-billing.ts
|
|
4374
|
-
var
|
|
4521
|
+
var import_vue12 = require("vue");
|
|
4375
4522
|
function useTenantBilling(options = {}) {
|
|
4376
4523
|
const apiPrefix = trimTrailingSlashes(options.apiPrefix ?? "/billing");
|
|
4377
4524
|
const http = options.http ?? defaultHttpClient();
|
|
4378
|
-
const usage = (0,
|
|
4379
|
-
const loading = (0,
|
|
4380
|
-
const error = (0,
|
|
4381
|
-
const subscriptionBundles = (0,
|
|
4525
|
+
const usage = (0, import_vue12.ref)(null);
|
|
4526
|
+
const loading = (0, import_vue12.ref)(false);
|
|
4527
|
+
const error = (0, import_vue12.ref)(null);
|
|
4528
|
+
const subscriptionBundles = (0, import_vue12.ref)([]);
|
|
4382
4529
|
function authHeaders() {
|
|
4383
4530
|
const headers = {};
|
|
4384
4531
|
const token = options.getAuthToken?.();
|
|
@@ -4512,7 +4659,7 @@ function useTenantBilling(options = {}) {
|
|
|
4512
4659
|
}
|
|
4513
4660
|
|
|
4514
4661
|
// src/vue/use-subscription-draft.ts
|
|
4515
|
-
var
|
|
4662
|
+
var import_vue13 = require("vue");
|
|
4516
4663
|
var import_types12 = require("@saasicat/types");
|
|
4517
4664
|
var DEFAULT_YEARLY_FACTOR = 10;
|
|
4518
4665
|
function unwrap(source) {
|
|
@@ -4529,27 +4676,27 @@ function priceForCycle(monthlyNet, yearlyNet, cycle, yearlyFactor) {
|
|
|
4529
4676
|
}
|
|
4530
4677
|
function useSubscriptionDraft(options) {
|
|
4531
4678
|
const yearlyFactor = options.yearlyFactor ?? DEFAULT_YEARLY_FACTOR;
|
|
4532
|
-
const plansRef = (0,
|
|
4533
|
-
const subscriptionBundlesRef = (0,
|
|
4679
|
+
const plansRef = (0, import_vue13.computed)(() => unwrap(options.plans) ?? []);
|
|
4680
|
+
const subscriptionBundlesRef = (0, import_vue13.computed)(
|
|
4534
4681
|
() => unwrap(options.subscriptionBundles ?? null) ?? []
|
|
4535
4682
|
);
|
|
4536
|
-
const plan = (0,
|
|
4537
|
-
const cycle = (0,
|
|
4538
|
-
const selectedBundleVersionIds = (0,
|
|
4683
|
+
const plan = (0, import_vue13.ref)(options.initialPlan ?? null);
|
|
4684
|
+
const cycle = (0, import_vue13.ref)(options.initialCycle ?? "MONTHLY");
|
|
4685
|
+
const selectedBundleVersionIds = (0, import_vue13.ref)(
|
|
4539
4686
|
new Set(options.initialBundleVersionIds ?? [])
|
|
4540
4687
|
);
|
|
4541
|
-
const promoCode = (0,
|
|
4542
|
-
const promoState = (0,
|
|
4543
|
-
const selectedPlan = (0,
|
|
4688
|
+
const promoCode = (0, import_vue13.ref)("");
|
|
4689
|
+
const promoState = (0, import_vue13.ref)({ status: "idle", preview: null, message: "" });
|
|
4690
|
+
const selectedPlan = (0, import_vue13.computed)(() => {
|
|
4544
4691
|
if (!plan.value) return null;
|
|
4545
4692
|
return plansRef.value.find((p) => p.id === plan.value) ?? null;
|
|
4546
4693
|
});
|
|
4547
|
-
const selectedBundles = (0,
|
|
4694
|
+
const selectedBundles = (0, import_vue13.computed)(
|
|
4548
4695
|
() => subscriptionBundlesRef.value.filter(
|
|
4549
4696
|
(b) => selectedBundleVersionIds.value.has(b.bundleVersionId)
|
|
4550
4697
|
)
|
|
4551
4698
|
);
|
|
4552
|
-
const chargeableBundles = (0,
|
|
4699
|
+
const chargeableBundles = (0, import_vue13.computed)(() => {
|
|
4553
4700
|
const planFeatures = selectedPlan.value?.features ?? [];
|
|
4554
4701
|
const selected = selectedBundles.value;
|
|
4555
4702
|
const keptIds = new Set(
|
|
@@ -4557,7 +4704,7 @@ function useSubscriptionDraft(options) {
|
|
|
4557
4704
|
);
|
|
4558
4705
|
return selected.filter((b) => keptIds.has(b.bundleVersionId));
|
|
4559
4706
|
});
|
|
4560
|
-
const activeFeatures = (0,
|
|
4707
|
+
const activeFeatures = (0, import_vue13.computed)(() => {
|
|
4561
4708
|
const result = /* @__PURE__ */ new Set();
|
|
4562
4709
|
const planObj = selectedPlan.value;
|
|
4563
4710
|
if (planObj) {
|
|
@@ -4568,7 +4715,7 @@ function useSubscriptionDraft(options) {
|
|
|
4568
4715
|
}
|
|
4569
4716
|
return result;
|
|
4570
4717
|
});
|
|
4571
|
-
const pricing = (0,
|
|
4718
|
+
const pricing = (0, import_vue13.computed)(() => {
|
|
4572
4719
|
const cyc = cycle.value;
|
|
4573
4720
|
const planObj = selectedPlan.value;
|
|
4574
4721
|
const planNet = planObj ? priceForCycle(planObj.monthlyNet ?? 0, planObj.yearlyNet, cyc, yearlyFactor) : 0;
|
|
@@ -4628,7 +4775,7 @@ function useSubscriptionDraft(options) {
|
|
|
4628
4775
|
}
|
|
4629
4776
|
};
|
|
4630
4777
|
});
|
|
4631
|
-
const isDirty = (0,
|
|
4778
|
+
const isDirty = (0, import_vue13.computed)(() => {
|
|
4632
4779
|
return selectedBundleVersionIds.value.size > 0 || promoState.value.status === "valid";
|
|
4633
4780
|
});
|
|
4634
4781
|
function setPlan(planId) {
|
|
@@ -4704,7 +4851,7 @@ function useSubscriptionDraft(options) {
|
|
|
4704
4851
|
}
|
|
4705
4852
|
|
|
4706
4853
|
// src/vue/use-bulk-publish.ts
|
|
4707
|
-
var
|
|
4854
|
+
var import_vue14 = require("vue");
|
|
4708
4855
|
function useBulkPublish(options) {
|
|
4709
4856
|
const msg = useSaMessages("planVersions");
|
|
4710
4857
|
if (!options?.endpoints) {
|
|
@@ -4714,15 +4861,15 @@ function useBulkPublish(options) {
|
|
|
4714
4861
|
}
|
|
4715
4862
|
const http = options.http ?? defaultHttpClient();
|
|
4716
4863
|
const endpoints = options.endpoints;
|
|
4717
|
-
const items = (0,
|
|
4718
|
-
const successCount = (0,
|
|
4719
|
-
const failureCount = (0,
|
|
4720
|
-
const progress = (0,
|
|
4864
|
+
const items = (0, import_vue14.ref)([]);
|
|
4865
|
+
const successCount = (0, import_vue14.computed)(() => items.value.filter((i) => i.status === "published").length);
|
|
4866
|
+
const failureCount = (0, import_vue14.computed)(() => items.value.filter((i) => i.status === "failed").length);
|
|
4867
|
+
const progress = (0, import_vue14.computed)(() => {
|
|
4721
4868
|
if (items.value.length === 0) return 0;
|
|
4722
4869
|
const done2 = successCount.value + failureCount.value;
|
|
4723
4870
|
return done2 / items.value.length;
|
|
4724
4871
|
});
|
|
4725
|
-
const done = (0,
|
|
4872
|
+
const done = (0, import_vue14.computed)(
|
|
4726
4873
|
() => items.value.length > 0 && items.value.every((i) => i.status === "published" || i.status === "failed")
|
|
4727
4874
|
);
|
|
4728
4875
|
function setItems(next) {
|
|
@@ -4780,7 +4927,7 @@ function useBulkPublish(options) {
|
|
|
4780
4927
|
}
|
|
4781
4928
|
|
|
4782
4929
|
// src/vue/use-plan-editor.ts
|
|
4783
|
-
var
|
|
4930
|
+
var import_vue15 = require("vue");
|
|
4784
4931
|
var PlannedOnlyFeatureError = class extends Error {
|
|
4785
4932
|
constructor(violations) {
|
|
4786
4933
|
super(
|
|
@@ -4800,10 +4947,10 @@ function tierWeight(tier) {
|
|
|
4800
4947
|
function usePlanEditor(manifest, options = {}) {
|
|
4801
4948
|
const baseSet = new Set(options.baseFeatures ?? []);
|
|
4802
4949
|
const nonRegressive = options.nonRegressive ?? true;
|
|
4803
|
-
const selectedFeatures = (0,
|
|
4950
|
+
const selectedFeatures = (0, import_vue15.ref)(new Set(options.initialFeatures ?? []));
|
|
4804
4951
|
const catalogFeatures = manifest.planCatalogSnapshot.features ?? [];
|
|
4805
4952
|
const plannedOnlySet = new Set(catalogFeatures.filter((f) => f.plannedOnly).map((f) => f.key));
|
|
4806
|
-
const availableFeatures = (0,
|
|
4953
|
+
const availableFeatures = (0, import_vue15.computed)(() => {
|
|
4807
4954
|
return catalogFeatures.map((def) => {
|
|
4808
4955
|
const isSelected = selectedFeatures.value.has(def.key);
|
|
4809
4956
|
const isPlannedOnly = !!def.plannedOnly;
|
|
@@ -4812,7 +4959,7 @@ function usePlanEditor(manifest, options = {}) {
|
|
|
4812
4959
|
return { def, isSelected, isPlannedOnly, isInherited, canToggle };
|
|
4813
4960
|
});
|
|
4814
4961
|
});
|
|
4815
|
-
const featuresByTier = (0,
|
|
4962
|
+
const featuresByTier = (0, import_vue15.computed)(() => {
|
|
4816
4963
|
const groups = /* @__PURE__ */ new Map();
|
|
4817
4964
|
for (const row of availableFeatures.value) {
|
|
4818
4965
|
const tier = row.def.tier ?? "OTHER";
|
|
@@ -4857,12 +5004,12 @@ function usePlanEditor(manifest, options = {}) {
|
|
|
4857
5004
|
}
|
|
4858
5005
|
|
|
4859
5006
|
// src/vue/use-public-boot.ts
|
|
4860
|
-
var
|
|
5007
|
+
var import_vue16 = require("vue");
|
|
4861
5008
|
function usePublicBoot(options) {
|
|
4862
5009
|
const loader = new BootLoader(options);
|
|
4863
|
-
const boot = (0,
|
|
4864
|
-
const loading = (0,
|
|
4865
|
-
const error = (0,
|
|
5010
|
+
const boot = (0, import_vue16.ref)(null);
|
|
5011
|
+
const loading = (0, import_vue16.ref)(false);
|
|
5012
|
+
const error = (0, import_vue16.ref)(null);
|
|
4866
5013
|
async function load() {
|
|
4867
5014
|
loading.value = true;
|
|
4868
5015
|
error.value = null;
|
|
@@ -4879,7 +5026,7 @@ function usePublicBoot(options) {
|
|
|
4879
5026
|
}
|
|
4880
5027
|
|
|
4881
5028
|
// src/vue/use-discovery.ts
|
|
4882
|
-
var
|
|
5029
|
+
var import_vue17 = require("vue");
|
|
4883
5030
|
var DiscoveryLoadError = class extends Error {
|
|
4884
5031
|
constructor(status, message) {
|
|
4885
5032
|
super(message);
|
|
@@ -4896,10 +5043,10 @@ function useDiscovery(options) {
|
|
|
4896
5043
|
);
|
|
4897
5044
|
}
|
|
4898
5045
|
const http = options.http ?? defaultHttpClient();
|
|
4899
|
-
const snapshot = (0,
|
|
4900
|
-
const etag = (0,
|
|
4901
|
-
const loading = (0,
|
|
4902
|
-
const error = (0,
|
|
5046
|
+
const snapshot = (0, import_vue17.ref)(null);
|
|
5047
|
+
const etag = (0, import_vue17.ref)(null);
|
|
5048
|
+
const loading = (0, import_vue17.ref)(false);
|
|
5049
|
+
const error = (0, import_vue17.ref)(null);
|
|
4903
5050
|
async function fetchSnapshot(includeEtag) {
|
|
4904
5051
|
loading.value = true;
|
|
4905
5052
|
error.value = null;
|
|
@@ -4966,7 +5113,7 @@ function useDiscovery(options) {
|
|
|
4966
5113
|
}
|
|
4967
5114
|
|
|
4968
5115
|
// src/vue/use-catalog-entries.ts
|
|
4969
|
-
var
|
|
5116
|
+
var import_vue18 = require("vue");
|
|
4970
5117
|
var CatalogEntriesApiError = class extends Error {
|
|
4971
5118
|
constructor(status, body, message) {
|
|
4972
5119
|
super(message);
|
|
@@ -4986,11 +5133,11 @@ function useCatalogEntries(options) {
|
|
|
4986
5133
|
}
|
|
4987
5134
|
const msg = useSaMessages("discovery");
|
|
4988
5135
|
const http = options.http ?? defaultHttpClient();
|
|
4989
|
-
const capabilities = (0,
|
|
4990
|
-
const features = (0,
|
|
4991
|
-
const quotas = (0,
|
|
4992
|
-
const loading = (0,
|
|
4993
|
-
const error = (0,
|
|
5136
|
+
const capabilities = (0, import_vue18.ref)([]);
|
|
5137
|
+
const features = (0, import_vue18.ref)([]);
|
|
5138
|
+
const quotas = (0, import_vue18.ref)([]);
|
|
5139
|
+
const loading = (0, import_vue18.ref)(false);
|
|
5140
|
+
const error = (0, import_vue18.ref)(null);
|
|
4994
5141
|
const base = `${options.adminEndpoint}/catalog`;
|
|
4995
5142
|
const pk = encodeURIComponent(options.projectKey);
|
|
4996
5143
|
function authHeaders() {
|
|
@@ -5116,7 +5263,7 @@ function useCatalogEntries(options) {
|
|
|
5116
5263
|
}
|
|
5117
5264
|
|
|
5118
5265
|
// src/vue/use-bundles.ts
|
|
5119
|
-
var
|
|
5266
|
+
var import_vue19 = require("vue");
|
|
5120
5267
|
var BundlesApiError = class extends Error {
|
|
5121
5268
|
constructor(status, body, message) {
|
|
5122
5269
|
super(message);
|
|
@@ -5137,9 +5284,9 @@ function useBundles(options) {
|
|
|
5137
5284
|
throw new Error("useBundles: `projectKey` is required.");
|
|
5138
5285
|
}
|
|
5139
5286
|
const http = options.http ?? defaultHttpClient();
|
|
5140
|
-
const bundles = (0,
|
|
5141
|
-
const loading = (0,
|
|
5142
|
-
const error = (0,
|
|
5287
|
+
const bundles = (0, import_vue19.ref)([]);
|
|
5288
|
+
const loading = (0, import_vue19.ref)(false);
|
|
5289
|
+
const error = (0, import_vue19.ref)(null);
|
|
5143
5290
|
const baseUrl = `${options.adminEndpoint}/catalog/bundles`;
|
|
5144
5291
|
function authHeaders() {
|
|
5145
5292
|
const token = options.getAuthToken?.();
|
|
@@ -5211,9 +5358,9 @@ function useBundleVersions(options) {
|
|
|
5211
5358
|
throw new Error("useBundleVersions: `bundleId` is required.");
|
|
5212
5359
|
}
|
|
5213
5360
|
const http = options.http ?? defaultHttpClient();
|
|
5214
|
-
const versions = (0,
|
|
5215
|
-
const loading = (0,
|
|
5216
|
-
const error = (0,
|
|
5361
|
+
const versions = (0, import_vue19.ref)([]);
|
|
5362
|
+
const loading = (0, import_vue19.ref)(false);
|
|
5363
|
+
const error = (0, import_vue19.ref)(null);
|
|
5217
5364
|
const bundleVersionsUrl = `${options.adminEndpoint}/catalog/bundles/${options.bundleId}/versions`;
|
|
5218
5365
|
const versionUrlBase = `${options.adminEndpoint}/catalog/bundle-versions`;
|
|
5219
5366
|
function authHeaders() {
|
|
@@ -5287,7 +5434,7 @@ function useBundleVersions(options) {
|
|
|
5287
5434
|
}
|
|
5288
5435
|
|
|
5289
5436
|
// src/vue/use-bundle-versions-map.ts
|
|
5290
|
-
var
|
|
5437
|
+
var import_vue20 = require("vue");
|
|
5291
5438
|
function useBundleVersionsMap(options) {
|
|
5292
5439
|
if (!options?.adminEndpoint) {
|
|
5293
5440
|
throw new Error("useBundleVersionsMap: `adminEndpoint` is required.");
|
|
@@ -5296,9 +5443,9 @@ function useBundleVersionsMap(options) {
|
|
|
5296
5443
|
throw new Error("useBundleVersionsMap: `bundles` is required.");
|
|
5297
5444
|
}
|
|
5298
5445
|
const http = options.http ?? defaultHttpClient();
|
|
5299
|
-
const versionsByBundle = (0,
|
|
5300
|
-
const loading = (0,
|
|
5301
|
-
const error = (0,
|
|
5446
|
+
const versionsByBundle = (0, import_vue20.ref)({});
|
|
5447
|
+
const loading = (0, import_vue20.ref)(false);
|
|
5448
|
+
const error = (0, import_vue20.ref)(null);
|
|
5302
5449
|
function authHeaders() {
|
|
5303
5450
|
const token = options.getAuthToken?.();
|
|
5304
5451
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -5348,7 +5495,7 @@ function useBundleVersionsMap(options) {
|
|
|
5348
5495
|
console.warn(`useBundleVersionsMap: refreshOne('${bundleId}') failed`, err);
|
|
5349
5496
|
}
|
|
5350
5497
|
}
|
|
5351
|
-
(0,
|
|
5498
|
+
(0, import_vue20.watch)(
|
|
5352
5499
|
() => options.bundles.value.map((b) => b.id).join(","),
|
|
5353
5500
|
() => {
|
|
5354
5501
|
if (options.bundles.value.length > 0) void refresh();
|
|
@@ -5360,7 +5507,7 @@ function useBundleVersionsMap(options) {
|
|
|
5360
5507
|
}
|
|
5361
5508
|
|
|
5362
5509
|
// src/vue/use-tenant-subscription-bundles.ts
|
|
5363
|
-
var
|
|
5510
|
+
var import_vue21 = require("vue");
|
|
5364
5511
|
var TenantSubscriptionBundlesApiError = class extends Error {
|
|
5365
5512
|
constructor(status, body, message) {
|
|
5366
5513
|
super(message);
|
|
@@ -5379,9 +5526,9 @@ function useTenantSubscriptionBundles(options) {
|
|
|
5379
5526
|
}
|
|
5380
5527
|
const http = options.http ?? defaultHttpClient();
|
|
5381
5528
|
const baseUrl = `${options.billingEndpoint}/billing/subscription-bundles`;
|
|
5382
|
-
const bundles = (0,
|
|
5383
|
-
const loading = (0,
|
|
5384
|
-
const error = (0,
|
|
5529
|
+
const bundles = (0, import_vue21.ref)([]);
|
|
5530
|
+
const loading = (0, import_vue21.ref)(false);
|
|
5531
|
+
const error = (0, import_vue21.ref)(null);
|
|
5385
5532
|
function authHeaders() {
|
|
5386
5533
|
const token = options.getAuthToken?.();
|
|
5387
5534
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -5455,7 +5602,7 @@ function rehydrateDates(raw) {
|
|
|
5455
5602
|
}
|
|
5456
5603
|
|
|
5457
5604
|
// src/vue/use-marketing-projections.ts
|
|
5458
|
-
var
|
|
5605
|
+
var import_vue22 = require("vue");
|
|
5459
5606
|
var MarketingProjectionsApiError = class extends Error {
|
|
5460
5607
|
constructor(status, body, message) {
|
|
5461
5608
|
super(message);
|
|
@@ -5475,10 +5622,10 @@ function useMarketingProjections(options) {
|
|
|
5475
5622
|
}
|
|
5476
5623
|
const msg = useSaMessages("marketing");
|
|
5477
5624
|
const http = options.http ?? defaultHttpClient();
|
|
5478
|
-
const projections = (0,
|
|
5479
|
-
const filter = (0,
|
|
5480
|
-
const loading = (0,
|
|
5481
|
-
const error = (0,
|
|
5625
|
+
const projections = (0, import_vue22.ref)([]);
|
|
5626
|
+
const filter = (0, import_vue22.ref)({ ...options.filter });
|
|
5627
|
+
const loading = (0, import_vue22.ref)(false);
|
|
5628
|
+
const error = (0, import_vue22.ref)(null);
|
|
5482
5629
|
const baseUrl = `${options.adminEndpoint}/catalog/marketing-projections`;
|
|
5483
5630
|
function authHeaders() {
|
|
5484
5631
|
const token = options.getAuthToken?.();
|
|
@@ -5559,7 +5706,7 @@ function useMarketingProjections(options) {
|
|
|
5559
5706
|
}
|
|
5560
5707
|
|
|
5561
5708
|
// src/vue/use-promotions.ts
|
|
5562
|
-
var
|
|
5709
|
+
var import_vue23 = require("vue");
|
|
5563
5710
|
var PromotionsApiError = class extends Error {
|
|
5564
5711
|
constructor(status, body, message) {
|
|
5565
5712
|
super(message);
|
|
@@ -5579,9 +5726,9 @@ function usePromotions(options) {
|
|
|
5579
5726
|
}
|
|
5580
5727
|
const msg = useSaMessages("promos");
|
|
5581
5728
|
const http = options.http ?? defaultHttpClient();
|
|
5582
|
-
const promotions = (0,
|
|
5583
|
-
const loading = (0,
|
|
5584
|
-
const error = (0,
|
|
5729
|
+
const promotions = (0, import_vue23.ref)([]);
|
|
5730
|
+
const loading = (0, import_vue23.ref)(false);
|
|
5731
|
+
const error = (0, import_vue23.ref)(null);
|
|
5585
5732
|
const baseUrl = `${options.adminEndpoint}/catalog/promotions`;
|
|
5586
5733
|
const pk = encodeURIComponent(options.projectKey);
|
|
5587
5734
|
function authHeaders() {
|
|
@@ -5646,7 +5793,7 @@ function usePromotions(options) {
|
|
|
5646
5793
|
}
|
|
5647
5794
|
|
|
5648
5795
|
// src/vue/use-plans.ts
|
|
5649
|
-
var
|
|
5796
|
+
var import_vue24 = require("vue");
|
|
5650
5797
|
var PlansApiError = class extends Error {
|
|
5651
5798
|
constructor(status, body, message) {
|
|
5652
5799
|
super(message);
|
|
@@ -5667,10 +5814,10 @@ function usePlans(options) {
|
|
|
5667
5814
|
throw new Error("usePlans: `projectKey` is required.");
|
|
5668
5815
|
}
|
|
5669
5816
|
const http = options.http ?? defaultHttpClient();
|
|
5670
|
-
const plans = (0,
|
|
5671
|
-
const loading = (0,
|
|
5672
|
-
const error = (0,
|
|
5673
|
-
const tenantCountsByPlanKey = (0,
|
|
5817
|
+
const plans = (0, import_vue24.ref)([]);
|
|
5818
|
+
const loading = (0, import_vue24.ref)(false);
|
|
5819
|
+
const error = (0, import_vue24.ref)(null);
|
|
5820
|
+
const tenantCountsByPlanKey = (0, import_vue24.ref)({});
|
|
5674
5821
|
const baseUrl = `${options.adminEndpoint}/catalog/plans`;
|
|
5675
5822
|
function authHeaders() {
|
|
5676
5823
|
const token = options.getAuthToken?.();
|
|
@@ -5771,9 +5918,9 @@ function usePlanVersions(options) {
|
|
|
5771
5918
|
throw new Error("usePlanVersions: `planId` is required.");
|
|
5772
5919
|
}
|
|
5773
5920
|
const http = options.http ?? defaultHttpClient();
|
|
5774
|
-
const versions = (0,
|
|
5775
|
-
const loading = (0,
|
|
5776
|
-
const error = (0,
|
|
5921
|
+
const versions = (0, import_vue24.ref)([]);
|
|
5922
|
+
const loading = (0, import_vue24.ref)(false);
|
|
5923
|
+
const error = (0, import_vue24.ref)(null);
|
|
5777
5924
|
const planVersionsUrl = `${options.adminEndpoint}/catalog/plans/${options.planId}/versions`;
|
|
5778
5925
|
const versionUrlBase = `${options.adminEndpoint}/catalog/plan-versions`;
|
|
5779
5926
|
function authHeaders() {
|
|
@@ -5870,7 +6017,7 @@ function usePlanVersions(options) {
|
|
|
5870
6017
|
}
|
|
5871
6018
|
|
|
5872
6019
|
// src/vue/use-live-plan-versions.ts
|
|
5873
|
-
var
|
|
6020
|
+
var import_vue25 = require("vue");
|
|
5874
6021
|
function useLivePlanVersions(options) {
|
|
5875
6022
|
if (!options?.adminEndpoint) {
|
|
5876
6023
|
throw new Error("useLivePlanVersions: `adminEndpoint` is required.");
|
|
@@ -5879,9 +6026,9 @@ function useLivePlanVersions(options) {
|
|
|
5879
6026
|
throw new Error("useLivePlanVersions: `plans` is required.");
|
|
5880
6027
|
}
|
|
5881
6028
|
const http = options.http ?? defaultHttpClient();
|
|
5882
|
-
const livePlanVersions = (0,
|
|
5883
|
-
const loading = (0,
|
|
5884
|
-
const error = (0,
|
|
6029
|
+
const livePlanVersions = (0, import_vue25.ref)({});
|
|
6030
|
+
const loading = (0, import_vue25.ref)(false);
|
|
6031
|
+
const error = (0, import_vue25.ref)(null);
|
|
5885
6032
|
function authHeaders() {
|
|
5886
6033
|
const token = options.getAuthToken?.();
|
|
5887
6034
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -5923,7 +6070,7 @@ function useLivePlanVersions(options) {
|
|
|
5923
6070
|
loading.value = false;
|
|
5924
6071
|
}
|
|
5925
6072
|
}
|
|
5926
|
-
(0,
|
|
6073
|
+
(0, import_vue25.watch)(
|
|
5927
6074
|
() => options.plans.value.map((p) => p.id).join(","),
|
|
5928
6075
|
() => {
|
|
5929
6076
|
if (options.plans.value.length > 0) void refresh();
|
|
@@ -5945,12 +6092,12 @@ function findLatestLive(versions) {
|
|
|
5945
6092
|
}
|
|
5946
6093
|
|
|
5947
6094
|
// src/vue/use-manifest.ts
|
|
5948
|
-
var
|
|
6095
|
+
var import_vue26 = require("vue");
|
|
5949
6096
|
function useManifest(options) {
|
|
5950
6097
|
const loader = new ManifestLoader(options);
|
|
5951
|
-
const manifest = (0,
|
|
5952
|
-
const loading = (0,
|
|
5953
|
-
const error = (0,
|
|
6098
|
+
const manifest = (0, import_vue26.ref)(null);
|
|
6099
|
+
const loading = (0, import_vue26.ref)(false);
|
|
6100
|
+
const error = (0, import_vue26.ref)(null);
|
|
5954
6101
|
async function load() {
|
|
5955
6102
|
loading.value = true;
|
|
5956
6103
|
error.value = null;
|
|
@@ -5976,24 +6123,24 @@ function useManifest(options) {
|
|
|
5976
6123
|
}
|
|
5977
6124
|
|
|
5978
6125
|
// src/vue/use-nav.ts
|
|
5979
|
-
var
|
|
6126
|
+
var import_vue27 = require("vue");
|
|
5980
6127
|
function useNav(manifest, options = {}) {
|
|
5981
6128
|
const { locale } = useSuperAdminI18n();
|
|
5982
|
-
const activeLocale = (0,
|
|
5983
|
-
const routes = (0,
|
|
6129
|
+
const activeLocale = (0, import_vue27.computed)(() => options.locale ?? locale.value);
|
|
6130
|
+
const routes = (0, import_vue27.computed)(() => {
|
|
5984
6131
|
if (!manifest.value) return [];
|
|
5985
6132
|
return buildRoutes(manifest.value, { ...options, locale: activeLocale.value });
|
|
5986
6133
|
});
|
|
5987
|
-
const sidebar = (0,
|
|
6134
|
+
const sidebar = (0, import_vue27.computed)(
|
|
5988
6135
|
() => buildSidebar(routes.value, defaultSectionOrder(activeLocale.value))
|
|
5989
6136
|
);
|
|
5990
6137
|
return { routes, sidebar };
|
|
5991
6138
|
}
|
|
5992
6139
|
|
|
5993
6140
|
// src/vue/use-actions.ts
|
|
5994
|
-
var
|
|
6141
|
+
var import_vue28 = require("vue");
|
|
5995
6142
|
function useActions(manifest, actions) {
|
|
5996
|
-
const registry = (0,
|
|
6143
|
+
const registry = (0, import_vue28.computed)(() => {
|
|
5997
6144
|
if (!manifest.value) return null;
|
|
5998
6145
|
return new ActionRegistry(manifest.value, actions);
|
|
5999
6146
|
});
|
|
@@ -6001,18 +6148,18 @@ function useActions(manifest, actions) {
|
|
|
6001
6148
|
}
|
|
6002
6149
|
|
|
6003
6150
|
// src/vue/use-tenant-action-flow.ts
|
|
6004
|
-
var
|
|
6151
|
+
var import_vue29 = require("vue");
|
|
6005
6152
|
function useTenantActionFlow(manifest, providers = {}) {
|
|
6006
6153
|
const handlers = useSuperAdminActions();
|
|
6007
6154
|
const msg = useSaMessages("tenants");
|
|
6008
|
-
const registry = (0,
|
|
6155
|
+
const registry = (0, import_vue29.computed)(() => {
|
|
6009
6156
|
if (!manifest.value) return null;
|
|
6010
6157
|
return new ActionRegistry(manifest.value, handlers);
|
|
6011
6158
|
});
|
|
6012
|
-
const orphanedDefs = (0,
|
|
6159
|
+
const orphanedDefs = (0, import_vue29.computed)(
|
|
6013
6160
|
() => registry.value ? registry.value.listOrphanedDefs() : []
|
|
6014
6161
|
);
|
|
6015
|
-
const availableActions = (0,
|
|
6162
|
+
const availableActions = (0, import_vue29.computed)(() => {
|
|
6016
6163
|
const m = manifest.value;
|
|
6017
6164
|
const reg = registry.value;
|
|
6018
6165
|
if (!m || !reg) return [];
|
|
@@ -6085,7 +6232,7 @@ async function runFlow(def, row, registry, providers, successTemplate) {
|
|
|
6085
6232
|
}
|
|
6086
6233
|
|
|
6087
6234
|
// src/vue/use-platform-tenant-actions.ts
|
|
6088
|
-
var
|
|
6235
|
+
var import_vue30 = require("vue");
|
|
6089
6236
|
var DEFAULT_VISIBLE_FOR_ROW = (def, row) => {
|
|
6090
6237
|
if (def.actionKey === "tenants.suspend") return row.isActive;
|
|
6091
6238
|
if (def.actionKey === "tenants.reactivate") return !row.isActive;
|
|
@@ -6121,7 +6268,7 @@ function usePlatformTenantActions(options) {
|
|
|
6121
6268
|
const iconForActionKey = options.iconForActionKey ?? DEFAULT_ICON_FOR_ACTION_KEY;
|
|
6122
6269
|
const toneForActionKey = options.toneForActionKey ?? DEFAULT_TONE_FOR_ACTION_KEY;
|
|
6123
6270
|
const visibleForRow = options.visibleForRow ?? DEFAULT_VISIBLE_FOR_ROW;
|
|
6124
|
-
const mfa = (0,
|
|
6271
|
+
const mfa = (0, import_vue30.ref)({ show: false, description: "", error: "" });
|
|
6125
6272
|
let pendingMfaResolve = null;
|
|
6126
6273
|
function showMfaDialog(def, ctx) {
|
|
6127
6274
|
return new Promise((resolve) => {
|
|
@@ -6146,7 +6293,7 @@ function usePlatformTenantActions(options) {
|
|
|
6146
6293
|
pendingMfaResolve(null);
|
|
6147
6294
|
}
|
|
6148
6295
|
}
|
|
6149
|
-
const confirmDialog = (0,
|
|
6296
|
+
const confirmDialog = (0, import_vue30.ref)({
|
|
6150
6297
|
show: false,
|
|
6151
6298
|
def: null,
|
|
6152
6299
|
row: null
|
|
@@ -6188,7 +6335,7 @@ function usePlatformTenantActions(options) {
|
|
|
6188
6335
|
},
|
|
6189
6336
|
visibleForRow
|
|
6190
6337
|
});
|
|
6191
|
-
const manifestActions = (0,
|
|
6338
|
+
const manifestActions = (0, import_vue30.computed)(
|
|
6192
6339
|
() => flow.availableActions.value.map((def) => ({
|
|
6193
6340
|
id: def.id,
|
|
6194
6341
|
label: def.label,
|
|
@@ -6202,7 +6349,7 @@ function usePlatformTenantActions(options) {
|
|
|
6202
6349
|
}
|
|
6203
6350
|
}))
|
|
6204
6351
|
);
|
|
6205
|
-
const realOrphans = (0,
|
|
6352
|
+
const realOrphans = (0, import_vue30.computed)(() => {
|
|
6206
6353
|
const caps = options.manifest.value?.capabilities ?? {};
|
|
6207
6354
|
const defs = options.manifest.value?.tenants?.actions ?? [];
|
|
6208
6355
|
const defByActionKey = new Map(defs.map((d) => [d.actionKey, d]));
|
|
@@ -6227,12 +6374,12 @@ function usePlatformTenantActions(options) {
|
|
|
6227
6374
|
}
|
|
6228
6375
|
|
|
6229
6376
|
// src/vue/use-batch-columns.ts
|
|
6230
|
-
var
|
|
6377
|
+
var import_vue31 = require("vue");
|
|
6231
6378
|
function useBatchColumns(manifest, tenantIds, options = {}) {
|
|
6232
6379
|
const fetcher = new BatchColumnFetcher(options);
|
|
6233
|
-
const data = (0,
|
|
6234
|
-
const loading = (0,
|
|
6235
|
-
const error = (0,
|
|
6380
|
+
const data = (0, import_vue31.ref)({});
|
|
6381
|
+
const loading = (0, import_vue31.ref)(false);
|
|
6382
|
+
const error = (0, import_vue31.ref)(null);
|
|
6236
6383
|
async function load() {
|
|
6237
6384
|
if (!manifest.value || tenantIds.value.length === 0) {
|
|
6238
6385
|
data.value = {};
|
|
@@ -6249,7 +6396,7 @@ function useBatchColumns(manifest, tenantIds, options = {}) {
|
|
|
6249
6396
|
loading.value = false;
|
|
6250
6397
|
}
|
|
6251
6398
|
}
|
|
6252
|
-
(0,
|
|
6399
|
+
(0, import_vue31.watch)([manifest, tenantIds], () => {
|
|
6253
6400
|
void load();
|
|
6254
6401
|
});
|
|
6255
6402
|
return { data, loading, error, reload: load };
|
|
@@ -6281,13 +6428,13 @@ function createPlatformLoaders(options) {
|
|
|
6281
6428
|
|
|
6282
6429
|
// src/vue/manifest-store-factory.ts
|
|
6283
6430
|
var import_pinia = require("pinia");
|
|
6284
|
-
var
|
|
6431
|
+
var import_vue32 = require("vue");
|
|
6285
6432
|
function createManifestStore(options) {
|
|
6286
6433
|
return (0, import_pinia.defineStore)(options.id ?? "admin-manifest", () => {
|
|
6287
|
-
const manifest = (0,
|
|
6288
|
-
const loading = (0,
|
|
6289
|
-
const error = (0,
|
|
6290
|
-
const loaded = (0,
|
|
6434
|
+
const manifest = (0, import_vue32.ref)(null);
|
|
6435
|
+
const loading = (0, import_vue32.ref)(false);
|
|
6436
|
+
const error = (0, import_vue32.ref)(null);
|
|
6437
|
+
const loaded = (0, import_vue32.ref)(false);
|
|
6291
6438
|
let inflight = null;
|
|
6292
6439
|
async function load() {
|
|
6293
6440
|
loading.value = true;
|
|
@@ -6668,6 +6815,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6668
6815
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6669
6816
|
0 && (module.exports = {
|
|
6670
6817
|
ADMIN_UI_VERSION,
|
|
6818
|
+
ALL_ROWS,
|
|
6671
6819
|
ActionDefNotInManifestError,
|
|
6672
6820
|
ActionRegistry,
|
|
6673
6821
|
BatchColumnDriftError,
|
|
@@ -6679,6 +6827,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6679
6827
|
CatalogEntriesApiError,
|
|
6680
6828
|
DEFAULT_I18N_DE,
|
|
6681
6829
|
DEFAULT_I18N_EN,
|
|
6830
|
+
DEFAULT_ROWS_PER_PAGE,
|
|
6682
6831
|
DEFAULT_SA_LOCALE,
|
|
6683
6832
|
DEFAULT_STANDARD_PAGE_ROUTES,
|
|
6684
6833
|
DEFAULT_YEARLY_FACTOR,
|
|
@@ -6689,6 +6838,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6689
6838
|
ManifestLoader,
|
|
6690
6839
|
MarketingProjectionsApiError,
|
|
6691
6840
|
MissingHandlerError,
|
|
6841
|
+
PAGE_SIZE_OPTIONS,
|
|
6692
6842
|
PlannedOnlyFeatureError,
|
|
6693
6843
|
PlansApiError,
|
|
6694
6844
|
ProjectPageHost,
|
|
@@ -6698,6 +6848,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6698
6848
|
SA_LOCALE_LABELS,
|
|
6699
6849
|
SA_LOCALE_STORAGE_KEY,
|
|
6700
6850
|
SA_MESSAGES,
|
|
6851
|
+
SERVER_PAGE_SIZE_OPTIONS,
|
|
6701
6852
|
SUPER_ADMIN_ACTIONS_KEY,
|
|
6702
6853
|
SUPER_ADMIN_BRAND_KEY,
|
|
6703
6854
|
SUPER_ADMIN_ENDPOINTS_KEY,
|
|
@@ -6705,6 +6856,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6705
6856
|
SUPER_ADMIN_HTTP_KEY,
|
|
6706
6857
|
SUPER_ADMIN_I18N_KEY,
|
|
6707
6858
|
SUPER_ADMIN_LOGIN_ADAPTER_KEY,
|
|
6859
|
+
SUPER_ADMIN_MANIFEST_CLEAR_CACHE_KEY,
|
|
6708
6860
|
SUPER_ADMIN_MANIFEST_KEY,
|
|
6709
6861
|
SUPER_ADMIN_NOTIFY_KEY,
|
|
6710
6862
|
TenantSubscriptionBundlesApiError,
|
|
@@ -6714,6 +6866,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6714
6866
|
buildQuotaRegistry,
|
|
6715
6867
|
buildRoutes,
|
|
6716
6868
|
buildSidebar,
|
|
6869
|
+
countPlans,
|
|
6717
6870
|
createAdminResourceClient,
|
|
6718
6871
|
createAdminRoutes,
|
|
6719
6872
|
createManifestStore,
|
|
@@ -6731,6 +6884,9 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6731
6884
|
formatCurrency,
|
|
6732
6885
|
formatMessage,
|
|
6733
6886
|
getJson,
|
|
6887
|
+
isCurrentlyValid,
|
|
6888
|
+
isExpired,
|
|
6889
|
+
isFutureScheduled,
|
|
6734
6890
|
isProductionBoot,
|
|
6735
6891
|
isSaBuiltinLocale,
|
|
6736
6892
|
mergeMessages,
|
|
@@ -6739,6 +6895,8 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6739
6895
|
resolveExtension,
|
|
6740
6896
|
resolveLoginBranding,
|
|
6741
6897
|
resolveMessages,
|
|
6898
|
+
resolvePlans,
|
|
6899
|
+
todayIsoDate,
|
|
6742
6900
|
trimTrailingSlashes,
|
|
6743
6901
|
useActions,
|
|
6744
6902
|
useApiList,
|
|
@@ -6756,6 +6914,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6756
6914
|
useManifest,
|
|
6757
6915
|
useMarketingProjections,
|
|
6758
6916
|
useNav,
|
|
6917
|
+
usePagination,
|
|
6759
6918
|
usePlanEditor,
|
|
6760
6919
|
usePlanVersions,
|
|
6761
6920
|
usePlans,
|