@saasicat/ui-vue 0.21.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-BY_t9prv.d.cts → catalog-DJcfm5N2.d.cts} +20 -7
- package/dist/{catalog-BY_t9prv.d.ts → catalog-DJcfm5N2.d.ts} +20 -7
- package/dist/{chunk-JN6HZGLV.js → chunk-F7NRM6KI.js} +54 -28
- package/dist/{chunk-7IFKVGZV.js → chunk-LY52T4N4.js} +21 -2
- package/dist/{chunk-OTP3OSSW.js → chunk-XMMFN2WJ.js} +74 -3
- package/dist/client/index.cjs +132 -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 +319 -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 +76 -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-c_Eqsu9u.d.ts → use-super-admin-i18n-CHNdsSlm.d.ts} +34 -7
- package/dist/{use-super-admin-i18n-DlJRGIVq.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 +22 -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/AdminFilters.vue +12 -0
- package/src/components/admin-page/AdminHero.vue +22 -5
- package/src/components/admin-page/AdminKpi.vue +84 -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 +31 -16
- 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/PlanDetail.vue +92 -302
- package/src/components/plan-detail/PlanDetailKpis.vue +22 -27
- package/src/components/plan-detail/PlanTitleEdit.vue +133 -0
- package/src/components/plan-list/PlanList.vue +72 -290
- 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 +34 -10
- package/src/pages-standard/AdminManifestErrorPage.vue +79 -9
- package/src/pages-standard/AuditPage.vue +53 -72
- package/src/pages-standard/BundlesPage.vue +128 -144
- package/src/pages-standard/DashboardPage.vue +43 -107
- package/src/pages-standard/DiscoveryPage.vue +158 -200
- package/src/pages-standard/EmailHistoryPage.vue +98 -88
- package/src/pages-standard/MarketingCatalogPage.vue +237 -267
- package/src/pages-standard/PilotsPage.vue +44 -60
- package/src/pages-standard/PlansPage.vue +230 -105
- package/src/pages-standard/PlatformEmailPage.vue +37 -40
- package/src/pages-standard/PromoCodeDetailPage.vue +16 -30
- package/src/pages-standard/PromoCodesPage.vue +86 -112
- package/src/pages-standard/SubscriptionsPage.vue +10 -17
- package/src/pages-standard/SuperAdminLoginPage.vue +12 -12
- package/src/pages-standard/SuperAdminSetupWizard.vue +20 -17
- package/src/pages-standard/TenantDetailPage.vue +45 -41
- package/src/pages-standard/TenantsPage.vue +184 -264
- package/src/pages-standard/UsersPage.vue +69 -104
- 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 +6 -10
- 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 +1 -1
- package/src/pages-standard/marketing-catalog/MarketingCatalogHeader.vue +2 -13
- 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 +1 -1
- package/src/pages-standard/sa-theme.css +481 -71
- package/src/pages-standard/tenant-detail/TenantUsers.vue +2 -8
- 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-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 -1027
- package/src/components/plan-cockpit/PlanCockpitAuditLog.vue +0 -72
- package/src/components/plan-cockpit/PlanCockpitDiffPanel.vue +0 -99
- 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 -249
- package/src/components/plan-cockpit/types.ts +0 -72
- package/src/components/plan-detail/PlanDetailHeader.vue +0 -194
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",
|
|
@@ -1330,6 +1340,8 @@ var commonMessages = defineMessages(
|
|
|
1330
1340
|
saving: "Speichere \u2026",
|
|
1331
1341
|
loadingData: "Daten werden geladen\u2026",
|
|
1332
1342
|
noData: "Keine Daten vorhanden",
|
|
1343
|
+
filters: "Filter",
|
|
1344
|
+
results: "Ergebnisse",
|
|
1333
1345
|
error: "Fehler",
|
|
1334
1346
|
errorLoadFailed: "Laden fehlgeschlagen",
|
|
1335
1347
|
errorSaveFailed: "Speichern fehlgeschlagen",
|
|
@@ -1375,7 +1387,16 @@ var commonMessages = defineMessages(
|
|
|
1375
1387
|
unlimited: "unbegrenzt",
|
|
1376
1388
|
both: "Beide",
|
|
1377
1389
|
createFailed: "Anlegen fehlgeschlagen",
|
|
1378
|
-
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
|
+
}
|
|
1379
1400
|
},
|
|
1380
1401
|
{
|
|
1381
1402
|
save: "Save",
|
|
@@ -1401,6 +1422,8 @@ var commonMessages = defineMessages(
|
|
|
1401
1422
|
saving: "Saving \u2026",
|
|
1402
1423
|
loadingData: "Loading data\u2026",
|
|
1403
1424
|
noData: "No data available",
|
|
1425
|
+
filters: "Filters",
|
|
1426
|
+
results: "Results",
|
|
1404
1427
|
error: "Error",
|
|
1405
1428
|
errorLoadFailed: "Failed to load",
|
|
1406
1429
|
errorSaveFailed: "Failed to save",
|
|
@@ -1446,7 +1469,16 @@ var commonMessages = defineMessages(
|
|
|
1446
1469
|
unlimited: "unlimited",
|
|
1447
1470
|
both: "Both",
|
|
1448
1471
|
createFailed: "Creation failed",
|
|
1449
|
-
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
|
+
}
|
|
1450
1482
|
}
|
|
1451
1483
|
);
|
|
1452
1484
|
|
|
@@ -1551,7 +1583,7 @@ var discoveryMessages = defineMessages(
|
|
|
1551
1583
|
quota: {
|
|
1552
1584
|
usageProvider: "UsageProvider",
|
|
1553
1585
|
usageProviderMissing: "fehlt",
|
|
1554
|
-
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).",
|
|
1555
1587
|
outdatedBanner: "Die code-abgeleiteten Quota-Fakten (Einheit/Enforcement/Provider) haben sich seit der letzten Freigabe ge\xE4ndert \u2014 bitte pr\xFCfen und"
|
|
1556
1588
|
},
|
|
1557
1589
|
caps: {
|
|
@@ -1655,7 +1687,7 @@ var discoveryMessages = defineMessages(
|
|
|
1655
1687
|
quota: {
|
|
1656
1688
|
usageProvider: "UsageProvider",
|
|
1657
1689
|
usageProviderMissing: "missing",
|
|
1658
|
-
noUsageProviderWarning: "A hard quota without a UsageProvider is not deployable (preflight
|
|
1690
|
+
noUsageProviderWarning: "A hard quota without a UsageProvider is not deployable (preflight).",
|
|
1659
1691
|
outdatedBanner: "The code-derived quota facts (unit/enforcement/provider) have changed since the last approval \u2014 please review and"
|
|
1660
1692
|
},
|
|
1661
1693
|
caps: {
|
|
@@ -1815,8 +1847,7 @@ var marketingMessages = defineMessages(
|
|
|
1815
1847
|
localesLabel: "Sprachen:",
|
|
1816
1848
|
defaultLocale: "Default-Sprache",
|
|
1817
1849
|
deactivateLocale: "Sprache deaktivieren",
|
|
1818
|
-
addLocale: "+ Sprache"
|
|
1819
|
-
refresh: "Aktualisieren"
|
|
1850
|
+
addLocale: "+ Sprache"
|
|
1820
1851
|
},
|
|
1821
1852
|
page: {
|
|
1822
1853
|
loading: "Lade Marketing-Catalog \u2026",
|
|
@@ -1884,7 +1915,7 @@ var marketingMessages = defineMessages(
|
|
|
1884
1915
|
},
|
|
1885
1916
|
promotionsTab: {
|
|
1886
1917
|
title: "Aktionen & Rabatte",
|
|
1887
|
-
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.",
|
|
1888
1919
|
add: "+ Aktion anlegen",
|
|
1889
1920
|
timelineHead: "Aktions-Timeline \xB7 gestrichelt = heute",
|
|
1890
1921
|
today: "heute",
|
|
@@ -1943,8 +1974,7 @@ var marketingMessages = defineMessages(
|
|
|
1943
1974
|
localesLabel: "Languages:",
|
|
1944
1975
|
defaultLocale: "Default language",
|
|
1945
1976
|
deactivateLocale: "Deactivate language",
|
|
1946
|
-
addLocale: "+ Language"
|
|
1947
|
-
refresh: "Refresh"
|
|
1977
|
+
addLocale: "+ Language"
|
|
1948
1978
|
},
|
|
1949
1979
|
page: {
|
|
1950
1980
|
loading: "Loading marketing catalog \u2026",
|
|
@@ -2012,7 +2042,7 @@ var marketingMessages = defineMessages(
|
|
|
2012
2042
|
},
|
|
2013
2043
|
promotionsTab: {
|
|
2014
2044
|
title: "Promotions & discounts",
|
|
2015
|
-
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.",
|
|
2016
2046
|
add: "+ Create promotion",
|
|
2017
2047
|
timelineHead: "Promotion timeline \xB7 dashed = today",
|
|
2018
2048
|
today: "today",
|
|
@@ -2277,10 +2307,8 @@ var planDetailMessages = defineMessages(
|
|
|
2277
2307
|
versionsSummary: "{published} live/superseded",
|
|
2278
2308
|
versionsSummaryWithDrafts: "{published} live/superseded \xB7 {drafts} Draft",
|
|
2279
2309
|
openDraft: "Offener Draft",
|
|
2280
|
-
noDraft: "Kein Draft",
|
|
2281
2310
|
readyToEdit: "Bereit zum Bearbeiten",
|
|
2282
|
-
noOpenDraft: "Keine Draft-Version offen"
|
|
2283
|
-
createNewDraft: "Neue Draft anlegen"
|
|
2311
|
+
noOpenDraft: "Keine Draft-Version offen"
|
|
2284
2312
|
},
|
|
2285
2313
|
versions: {
|
|
2286
2314
|
title: "Versionen",
|
|
@@ -2404,10 +2432,8 @@ var planDetailMessages = defineMessages(
|
|
|
2404
2432
|
versionsSummary: "{published} live/superseded",
|
|
2405
2433
|
versionsSummaryWithDrafts: "{published} live/superseded \xB7 {drafts} draft",
|
|
2406
2434
|
openDraft: "Open draft",
|
|
2407
|
-
noDraft: "No draft",
|
|
2408
2435
|
readyToEdit: "Ready to edit",
|
|
2409
|
-
noOpenDraft: "No draft version open"
|
|
2410
|
-
createNewDraft: "Create a new draft"
|
|
2436
|
+
noOpenDraft: "No draft version open"
|
|
2411
2437
|
},
|
|
2412
2438
|
versions: {
|
|
2413
2439
|
title: "Versions",
|
|
@@ -2794,6 +2820,7 @@ var plansMessages = defineMessages(
|
|
|
2794
2820
|
// PlansPage — shell of the plan area: loading state, toasts and the
|
|
2795
2821
|
// error texts of the draft/publish/archive/discard actions.
|
|
2796
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.",
|
|
2797
2824
|
loading: "Pl\xE4ne werden geladen\u2026",
|
|
2798
2825
|
toastPlanCreated: "Plan {planKey} angelegt \u2014 jetzt die erste Version zusammenstellen.",
|
|
2799
2826
|
toastDraftSaved: "Draft v{version} von {planKey} gespeichert.",
|
|
@@ -2840,7 +2867,10 @@ var plansMessages = defineMessages(
|
|
|
2840
2867
|
// PlanList — default plan overview with one row per plan.
|
|
2841
2868
|
list: {
|
|
2842
2869
|
title: "Alle Pl\xE4ne",
|
|
2843
|
-
|
|
2870
|
+
statPlans: "Pl\xE4ne",
|
|
2871
|
+
statLive: "Live",
|
|
2872
|
+
statDrafts: "Offene Drafts",
|
|
2873
|
+
statTenants: "Mandanten",
|
|
2844
2874
|
matrixView: "Matrix-Ansicht",
|
|
2845
2875
|
newPlan: "Neuer Plan",
|
|
2846
2876
|
searchPlaceholder: "Plan suchen\u2026",
|
|
@@ -2878,7 +2908,10 @@ var plansMessages = defineMessages(
|
|
|
2878
2908
|
// PlanMatrix — all plans side by side, components as rows.
|
|
2879
2909
|
matrix: {
|
|
2880
2910
|
title: "Pl\xE4ne \xB7 Matrix-Vergleich",
|
|
2881
|
-
|
|
2911
|
+
statPlans: "Pl\xE4ne",
|
|
2912
|
+
statFeatures: "Features",
|
|
2913
|
+
statQuotas: "Quotas",
|
|
2914
|
+
statBundles: "Bundles",
|
|
2882
2915
|
catalogPreview: "Catalog-Vorschau",
|
|
2883
2916
|
createPlan: "Plan anlegen",
|
|
2884
2917
|
createPlanSub: "oder Klon erstellen",
|
|
@@ -3019,6 +3052,7 @@ var plansMessages = defineMessages(
|
|
|
3019
3052
|
},
|
|
3020
3053
|
{
|
|
3021
3054
|
page: {
|
|
3055
|
+
subtitle: "Plans bundle features & quotas into an offering. Every change ships as a new version \u2014 live versions stay untouched.",
|
|
3022
3056
|
loading: "Loading plans\u2026",
|
|
3023
3057
|
toastPlanCreated: "Plan {planKey} created \u2014 now assemble the first version.",
|
|
3024
3058
|
toastDraftSaved: "Draft v{version} of {planKey} saved.",
|
|
@@ -3063,7 +3097,10 @@ var plansMessages = defineMessages(
|
|
|
3063
3097
|
},
|
|
3064
3098
|
list: {
|
|
3065
3099
|
title: "All plans",
|
|
3066
|
-
|
|
3100
|
+
statPlans: "Plans",
|
|
3101
|
+
statLive: "Live",
|
|
3102
|
+
statDrafts: "Open drafts",
|
|
3103
|
+
statTenants: "Tenants",
|
|
3067
3104
|
matrixView: "Matrix view",
|
|
3068
3105
|
newPlan: "New plan",
|
|
3069
3106
|
searchPlaceholder: "Search plan\u2026",
|
|
@@ -3100,7 +3137,10 @@ var plansMessages = defineMessages(
|
|
|
3100
3137
|
},
|
|
3101
3138
|
matrix: {
|
|
3102
3139
|
title: "Plans \xB7 matrix comparison",
|
|
3103
|
-
|
|
3140
|
+
statPlans: "Plans",
|
|
3141
|
+
statFeatures: "Features",
|
|
3142
|
+
statQuotas: "Quotas",
|
|
3143
|
+
statBundles: "Bundles",
|
|
3104
3144
|
catalogPreview: "Catalog preview",
|
|
3105
3145
|
createPlan: "Create plan",
|
|
3106
3146
|
createPlanSub: "or create a clone",
|
|
@@ -3589,8 +3629,7 @@ var tenantsMessages = defineMessages(
|
|
|
3589
3629
|
columnUsage: "Verbrauch",
|
|
3590
3630
|
columnCreatedAt: "Angelegt",
|
|
3591
3631
|
suspended: "Suspendiert",
|
|
3592
|
-
empty: "Keine Mandanten mit diesen Filtern."
|
|
3593
|
-
pagination: "{total} Mandanten \xB7 Seite {page} / {pages}"
|
|
3632
|
+
empty: "Keine Mandanten mit diesen Filtern."
|
|
3594
3633
|
},
|
|
3595
3634
|
detail: {
|
|
3596
3635
|
backToList: "Mandanten-Liste",
|
|
@@ -3638,8 +3677,7 @@ var tenantsMessages = defineMessages(
|
|
|
3638
3677
|
columnUsage: "Usage",
|
|
3639
3678
|
columnCreatedAt: "Created",
|
|
3640
3679
|
suspended: "Suspended",
|
|
3641
|
-
empty: "No tenants match these filters."
|
|
3642
|
-
pagination: "{total} tenants \xB7 Page {page} / {pages}"
|
|
3680
|
+
empty: "No tenants match these filters."
|
|
3643
3681
|
},
|
|
3644
3682
|
detail: {
|
|
3645
3683
|
backToList: "Tenant list",
|
|
@@ -3835,6 +3873,71 @@ function isProductionBoot(boot) {
|
|
|
3835
3873
|
return boot?.project?.environment === "production";
|
|
3836
3874
|
}
|
|
3837
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
|
+
|
|
3838
3941
|
// src/vue/super-admin-context.ts
|
|
3839
3942
|
var SUPER_ADMIN_BRAND_KEY = /* @__PURE__ */ Symbol.for(
|
|
3840
3943
|
"@saasicat/ui-vue/SUPER_ADMIN_BRAND"
|
|
@@ -3851,17 +3954,27 @@ var SUPER_ADMIN_ACTIONS_KEY = /* @__PURE__ */ Symbol.for(
|
|
|
3851
3954
|
var SUPER_ADMIN_MANIFEST_KEY = /* @__PURE__ */ Symbol.for(
|
|
3852
3955
|
"@saasicat/ui-vue/SUPER_ADMIN_MANIFEST"
|
|
3853
3956
|
);
|
|
3957
|
+
var SUPER_ADMIN_MANIFEST_CLEAR_CACHE_KEY = /* @__PURE__ */ Symbol.for("@saasicat/ui-vue/SUPER_ADMIN_MANIFEST_CLEAR_CACHE");
|
|
3854
3958
|
var SUPER_ADMIN_LOGIN_ADAPTER_KEY = /* @__PURE__ */ Symbol.for(
|
|
3855
3959
|
"@saasicat/ui-vue/SUPER_ADMIN_LOGIN_ADAPTER"
|
|
3856
3960
|
);
|
|
3857
3961
|
var SUPER_ADMIN_HTTP_KEY = /* @__PURE__ */ Symbol.for(
|
|
3858
3962
|
"@saasicat/ui-vue/SUPER_ADMIN_HTTP"
|
|
3859
3963
|
);
|
|
3964
|
+
function isUnauthorizedError(err) {
|
|
3965
|
+
const status = err?.status;
|
|
3966
|
+
return status === 401 || status === 403;
|
|
3967
|
+
}
|
|
3860
3968
|
function buildNavigationGuard(options) {
|
|
3861
3969
|
const { authGuard, manifestGuard } = options;
|
|
3862
3970
|
if (!authGuard && !manifestGuard) return null;
|
|
3971
|
+
let redirectedForUnauthorized = false;
|
|
3972
|
+
let reachedLoginAfterRedirect = false;
|
|
3863
3973
|
return async (to) => {
|
|
3864
|
-
if (to.meta?.public === true)
|
|
3974
|
+
if (to.meta?.public === true) {
|
|
3975
|
+
if (redirectedForUnauthorized) reachedLoginAfterRedirect = true;
|
|
3976
|
+
return true;
|
|
3977
|
+
}
|
|
3865
3978
|
if (authGuard) {
|
|
3866
3979
|
if (!authGuard.isAuthenticated()) return authGuard.onUnauthenticated();
|
|
3867
3980
|
if (authGuard.isSuperAdmin && !authGuard.isSuperAdmin()) {
|
|
@@ -3871,7 +3984,15 @@ function buildNavigationGuard(options) {
|
|
|
3871
3984
|
if (manifestGuard) {
|
|
3872
3985
|
try {
|
|
3873
3986
|
await manifestGuard.ensureLoaded();
|
|
3987
|
+
redirectedForUnauthorized = false;
|
|
3988
|
+
reachedLoginAfterRedirect = false;
|
|
3874
3989
|
} catch (err) {
|
|
3990
|
+
if (authGuard && isUnauthorizedError(err)) {
|
|
3991
|
+
if (!redirectedForUnauthorized || !reachedLoginAfterRedirect) {
|
|
3992
|
+
redirectedForUnauthorized = true;
|
|
3993
|
+
return authGuard.onUnauthenticated();
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3875
3996
|
if (manifestGuard.errorRoute && to.path !== manifestGuard.errorRoute) {
|
|
3876
3997
|
return manifestGuard.errorRoute;
|
|
3877
3998
|
}
|
|
@@ -4126,7 +4247,7 @@ function useApiList(options) {
|
|
|
4126
4247
|
await load();
|
|
4127
4248
|
}
|
|
4128
4249
|
async function setPageSize(size) {
|
|
4129
|
-
pageSize.value = Math.max(1, Math.floor(size));
|
|
4250
|
+
pageSize.value = Math.min(200, Math.max(1, Math.floor(size)));
|
|
4130
4251
|
page.value = 1;
|
|
4131
4252
|
await load();
|
|
4132
4253
|
}
|
|
@@ -4156,15 +4277,39 @@ function useApiList(options) {
|
|
|
4156
4277
|
};
|
|
4157
4278
|
}
|
|
4158
4279
|
|
|
4159
|
-
// src/vue/use-
|
|
4280
|
+
// src/vue/use-pagination.ts
|
|
4160
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");
|
|
4161
4306
|
function useTenants(options) {
|
|
4162
4307
|
if (!options?.endpoint) {
|
|
4163
4308
|
throw new Error(
|
|
4164
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.'
|
|
4165
4310
|
);
|
|
4166
4311
|
}
|
|
4167
|
-
const filter = options.filter ?? (0,
|
|
4312
|
+
const filter = options.filter ?? (0, import_vue6.ref)({});
|
|
4168
4313
|
const list = useApiList({
|
|
4169
4314
|
endpoint: options.endpoint,
|
|
4170
4315
|
filter,
|
|
@@ -4176,14 +4321,14 @@ function useTenants(options) {
|
|
|
4176
4321
|
}
|
|
4177
4322
|
|
|
4178
4323
|
// src/vue/use-audit-entries.ts
|
|
4179
|
-
var
|
|
4324
|
+
var import_vue7 = require("vue");
|
|
4180
4325
|
function useAuditEntries(options) {
|
|
4181
4326
|
if (!options?.endpoint) {
|
|
4182
4327
|
throw new Error(
|
|
4183
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.'
|
|
4184
4329
|
);
|
|
4185
4330
|
}
|
|
4186
|
-
const filter = options.filter ?? (0,
|
|
4331
|
+
const filter = options.filter ?? (0, import_vue7.ref)({});
|
|
4187
4332
|
const list = useApiList({
|
|
4188
4333
|
endpoint: options.endpoint,
|
|
4189
4334
|
filter,
|
|
@@ -4195,7 +4340,7 @@ function useAuditEntries(options) {
|
|
|
4195
4340
|
}
|
|
4196
4341
|
|
|
4197
4342
|
// src/vue/use-entitlement.ts
|
|
4198
|
-
var
|
|
4343
|
+
var import_vue8 = require("vue");
|
|
4199
4344
|
function useEntitlement(options) {
|
|
4200
4345
|
if (!options?.endpoint) {
|
|
4201
4346
|
throw new Error(
|
|
@@ -4204,9 +4349,9 @@ function useEntitlement(options) {
|
|
|
4204
4349
|
}
|
|
4205
4350
|
const endpoint = options.endpoint;
|
|
4206
4351
|
const http = options.http ?? defaultHttpClient();
|
|
4207
|
-
const entitlement = (0,
|
|
4208
|
-
const loading = (0,
|
|
4209
|
-
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);
|
|
4210
4355
|
async function load() {
|
|
4211
4356
|
loading.value = true;
|
|
4212
4357
|
error.value = null;
|
|
@@ -4236,15 +4381,15 @@ function useEntitlement(options) {
|
|
|
4236
4381
|
}
|
|
4237
4382
|
|
|
4238
4383
|
// src/vue/use-tenant-manifest.ts
|
|
4239
|
-
var
|
|
4384
|
+
var import_vue9 = require("vue");
|
|
4240
4385
|
function useTenantManifest(options) {
|
|
4241
4386
|
if (!options?.endpoint) {
|
|
4242
4387
|
throw new Error('useTenantManifest: `endpoint` is required (e.g. "/api/tenant/manifest").');
|
|
4243
4388
|
}
|
|
4244
4389
|
const http = options.http ?? defaultHttpClient();
|
|
4245
|
-
const manifest = (0,
|
|
4246
|
-
const loading = (0,
|
|
4247
|
-
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);
|
|
4248
4393
|
async function load() {
|
|
4249
4394
|
loading.value = true;
|
|
4250
4395
|
error.value = null;
|
|
@@ -4278,7 +4423,7 @@ function useTenantManifest(options) {
|
|
|
4278
4423
|
}
|
|
4279
4424
|
|
|
4280
4425
|
// src/vue/entitlement-provider.ts
|
|
4281
|
-
var
|
|
4426
|
+
var import_vue10 = require("vue");
|
|
4282
4427
|
var ENTITLEMENT_INJECTION_KEY = /* @__PURE__ */ Symbol.for(
|
|
4283
4428
|
"@saasicat/ui-vue/ENTITLEMENT"
|
|
4284
4429
|
);
|
|
@@ -4286,7 +4431,7 @@ function provideEntitlement(app, entitlement) {
|
|
|
4286
4431
|
app.provide(ENTITLEMENT_INJECTION_KEY, entitlement);
|
|
4287
4432
|
}
|
|
4288
4433
|
function useInjectedEntitlement() {
|
|
4289
|
-
return (0,
|
|
4434
|
+
return (0, import_vue10.inject)(ENTITLEMENT_INJECTION_KEY, null);
|
|
4290
4435
|
}
|
|
4291
4436
|
|
|
4292
4437
|
// src/vue/feature-router-guard.ts
|
|
@@ -4315,15 +4460,15 @@ function buildFeatureRouterGuard(options) {
|
|
|
4315
4460
|
}
|
|
4316
4461
|
|
|
4317
4462
|
// src/vue/use-tenant-billing-catalog.ts
|
|
4318
|
-
var
|
|
4463
|
+
var import_vue11 = require("vue");
|
|
4319
4464
|
function useTenantBillingCatalog(options = {}) {
|
|
4320
4465
|
const apiPrefix = trimTrailingSlashes(options.apiPrefix ?? "/billing");
|
|
4321
4466
|
const http = options.http ?? defaultHttpClient();
|
|
4322
|
-
const plans = (0,
|
|
4323
|
-
const featureRegistry = (0,
|
|
4324
|
-
const bundles = (0,
|
|
4325
|
-
const loading = (0,
|
|
4326
|
-
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);
|
|
4327
4472
|
async function fetchJson(path) {
|
|
4328
4473
|
const res = await http(`${apiPrefix}${path}`, { method: "GET" });
|
|
4329
4474
|
if (res.status !== 200) {
|
|
@@ -4373,14 +4518,14 @@ function useTenantBillingCatalog(options = {}) {
|
|
|
4373
4518
|
}
|
|
4374
4519
|
|
|
4375
4520
|
// src/vue/use-tenant-billing.ts
|
|
4376
|
-
var
|
|
4521
|
+
var import_vue12 = require("vue");
|
|
4377
4522
|
function useTenantBilling(options = {}) {
|
|
4378
4523
|
const apiPrefix = trimTrailingSlashes(options.apiPrefix ?? "/billing");
|
|
4379
4524
|
const http = options.http ?? defaultHttpClient();
|
|
4380
|
-
const usage = (0,
|
|
4381
|
-
const loading = (0,
|
|
4382
|
-
const error = (0,
|
|
4383
|
-
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)([]);
|
|
4384
4529
|
function authHeaders() {
|
|
4385
4530
|
const headers = {};
|
|
4386
4531
|
const token = options.getAuthToken?.();
|
|
@@ -4514,7 +4659,7 @@ function useTenantBilling(options = {}) {
|
|
|
4514
4659
|
}
|
|
4515
4660
|
|
|
4516
4661
|
// src/vue/use-subscription-draft.ts
|
|
4517
|
-
var
|
|
4662
|
+
var import_vue13 = require("vue");
|
|
4518
4663
|
var import_types12 = require("@saasicat/types");
|
|
4519
4664
|
var DEFAULT_YEARLY_FACTOR = 10;
|
|
4520
4665
|
function unwrap(source) {
|
|
@@ -4531,27 +4676,27 @@ function priceForCycle(monthlyNet, yearlyNet, cycle, yearlyFactor) {
|
|
|
4531
4676
|
}
|
|
4532
4677
|
function useSubscriptionDraft(options) {
|
|
4533
4678
|
const yearlyFactor = options.yearlyFactor ?? DEFAULT_YEARLY_FACTOR;
|
|
4534
|
-
const plansRef = (0,
|
|
4535
|
-
const subscriptionBundlesRef = (0,
|
|
4679
|
+
const plansRef = (0, import_vue13.computed)(() => unwrap(options.plans) ?? []);
|
|
4680
|
+
const subscriptionBundlesRef = (0, import_vue13.computed)(
|
|
4536
4681
|
() => unwrap(options.subscriptionBundles ?? null) ?? []
|
|
4537
4682
|
);
|
|
4538
|
-
const plan = (0,
|
|
4539
|
-
const cycle = (0,
|
|
4540
|
-
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)(
|
|
4541
4686
|
new Set(options.initialBundleVersionIds ?? [])
|
|
4542
4687
|
);
|
|
4543
|
-
const promoCode = (0,
|
|
4544
|
-
const promoState = (0,
|
|
4545
|
-
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)(() => {
|
|
4546
4691
|
if (!plan.value) return null;
|
|
4547
4692
|
return plansRef.value.find((p) => p.id === plan.value) ?? null;
|
|
4548
4693
|
});
|
|
4549
|
-
const selectedBundles = (0,
|
|
4694
|
+
const selectedBundles = (0, import_vue13.computed)(
|
|
4550
4695
|
() => subscriptionBundlesRef.value.filter(
|
|
4551
4696
|
(b) => selectedBundleVersionIds.value.has(b.bundleVersionId)
|
|
4552
4697
|
)
|
|
4553
4698
|
);
|
|
4554
|
-
const chargeableBundles = (0,
|
|
4699
|
+
const chargeableBundles = (0, import_vue13.computed)(() => {
|
|
4555
4700
|
const planFeatures = selectedPlan.value?.features ?? [];
|
|
4556
4701
|
const selected = selectedBundles.value;
|
|
4557
4702
|
const keptIds = new Set(
|
|
@@ -4559,7 +4704,7 @@ function useSubscriptionDraft(options) {
|
|
|
4559
4704
|
);
|
|
4560
4705
|
return selected.filter((b) => keptIds.has(b.bundleVersionId));
|
|
4561
4706
|
});
|
|
4562
|
-
const activeFeatures = (0,
|
|
4707
|
+
const activeFeatures = (0, import_vue13.computed)(() => {
|
|
4563
4708
|
const result = /* @__PURE__ */ new Set();
|
|
4564
4709
|
const planObj = selectedPlan.value;
|
|
4565
4710
|
if (planObj) {
|
|
@@ -4570,7 +4715,7 @@ function useSubscriptionDraft(options) {
|
|
|
4570
4715
|
}
|
|
4571
4716
|
return result;
|
|
4572
4717
|
});
|
|
4573
|
-
const pricing = (0,
|
|
4718
|
+
const pricing = (0, import_vue13.computed)(() => {
|
|
4574
4719
|
const cyc = cycle.value;
|
|
4575
4720
|
const planObj = selectedPlan.value;
|
|
4576
4721
|
const planNet = planObj ? priceForCycle(planObj.monthlyNet ?? 0, planObj.yearlyNet, cyc, yearlyFactor) : 0;
|
|
@@ -4630,7 +4775,7 @@ function useSubscriptionDraft(options) {
|
|
|
4630
4775
|
}
|
|
4631
4776
|
};
|
|
4632
4777
|
});
|
|
4633
|
-
const isDirty = (0,
|
|
4778
|
+
const isDirty = (0, import_vue13.computed)(() => {
|
|
4634
4779
|
return selectedBundleVersionIds.value.size > 0 || promoState.value.status === "valid";
|
|
4635
4780
|
});
|
|
4636
4781
|
function setPlan(planId) {
|
|
@@ -4706,7 +4851,7 @@ function useSubscriptionDraft(options) {
|
|
|
4706
4851
|
}
|
|
4707
4852
|
|
|
4708
4853
|
// src/vue/use-bulk-publish.ts
|
|
4709
|
-
var
|
|
4854
|
+
var import_vue14 = require("vue");
|
|
4710
4855
|
function useBulkPublish(options) {
|
|
4711
4856
|
const msg = useSaMessages("planVersions");
|
|
4712
4857
|
if (!options?.endpoints) {
|
|
@@ -4716,15 +4861,15 @@ function useBulkPublish(options) {
|
|
|
4716
4861
|
}
|
|
4717
4862
|
const http = options.http ?? defaultHttpClient();
|
|
4718
4863
|
const endpoints = options.endpoints;
|
|
4719
|
-
const items = (0,
|
|
4720
|
-
const successCount = (0,
|
|
4721
|
-
const failureCount = (0,
|
|
4722
|
-
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)(() => {
|
|
4723
4868
|
if (items.value.length === 0) return 0;
|
|
4724
4869
|
const done2 = successCount.value + failureCount.value;
|
|
4725
4870
|
return done2 / items.value.length;
|
|
4726
4871
|
});
|
|
4727
|
-
const done = (0,
|
|
4872
|
+
const done = (0, import_vue14.computed)(
|
|
4728
4873
|
() => items.value.length > 0 && items.value.every((i) => i.status === "published" || i.status === "failed")
|
|
4729
4874
|
);
|
|
4730
4875
|
function setItems(next) {
|
|
@@ -4782,7 +4927,7 @@ function useBulkPublish(options) {
|
|
|
4782
4927
|
}
|
|
4783
4928
|
|
|
4784
4929
|
// src/vue/use-plan-editor.ts
|
|
4785
|
-
var
|
|
4930
|
+
var import_vue15 = require("vue");
|
|
4786
4931
|
var PlannedOnlyFeatureError = class extends Error {
|
|
4787
4932
|
constructor(violations) {
|
|
4788
4933
|
super(
|
|
@@ -4802,10 +4947,10 @@ function tierWeight(tier) {
|
|
|
4802
4947
|
function usePlanEditor(manifest, options = {}) {
|
|
4803
4948
|
const baseSet = new Set(options.baseFeatures ?? []);
|
|
4804
4949
|
const nonRegressive = options.nonRegressive ?? true;
|
|
4805
|
-
const selectedFeatures = (0,
|
|
4950
|
+
const selectedFeatures = (0, import_vue15.ref)(new Set(options.initialFeatures ?? []));
|
|
4806
4951
|
const catalogFeatures = manifest.planCatalogSnapshot.features ?? [];
|
|
4807
4952
|
const plannedOnlySet = new Set(catalogFeatures.filter((f) => f.plannedOnly).map((f) => f.key));
|
|
4808
|
-
const availableFeatures = (0,
|
|
4953
|
+
const availableFeatures = (0, import_vue15.computed)(() => {
|
|
4809
4954
|
return catalogFeatures.map((def) => {
|
|
4810
4955
|
const isSelected = selectedFeatures.value.has(def.key);
|
|
4811
4956
|
const isPlannedOnly = !!def.plannedOnly;
|
|
@@ -4814,7 +4959,7 @@ function usePlanEditor(manifest, options = {}) {
|
|
|
4814
4959
|
return { def, isSelected, isPlannedOnly, isInherited, canToggle };
|
|
4815
4960
|
});
|
|
4816
4961
|
});
|
|
4817
|
-
const featuresByTier = (0,
|
|
4962
|
+
const featuresByTier = (0, import_vue15.computed)(() => {
|
|
4818
4963
|
const groups = /* @__PURE__ */ new Map();
|
|
4819
4964
|
for (const row of availableFeatures.value) {
|
|
4820
4965
|
const tier = row.def.tier ?? "OTHER";
|
|
@@ -4859,12 +5004,12 @@ function usePlanEditor(manifest, options = {}) {
|
|
|
4859
5004
|
}
|
|
4860
5005
|
|
|
4861
5006
|
// src/vue/use-public-boot.ts
|
|
4862
|
-
var
|
|
5007
|
+
var import_vue16 = require("vue");
|
|
4863
5008
|
function usePublicBoot(options) {
|
|
4864
5009
|
const loader = new BootLoader(options);
|
|
4865
|
-
const boot = (0,
|
|
4866
|
-
const loading = (0,
|
|
4867
|
-
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);
|
|
4868
5013
|
async function load() {
|
|
4869
5014
|
loading.value = true;
|
|
4870
5015
|
error.value = null;
|
|
@@ -4881,7 +5026,7 @@ function usePublicBoot(options) {
|
|
|
4881
5026
|
}
|
|
4882
5027
|
|
|
4883
5028
|
// src/vue/use-discovery.ts
|
|
4884
|
-
var
|
|
5029
|
+
var import_vue17 = require("vue");
|
|
4885
5030
|
var DiscoveryLoadError = class extends Error {
|
|
4886
5031
|
constructor(status, message) {
|
|
4887
5032
|
super(message);
|
|
@@ -4898,10 +5043,10 @@ function useDiscovery(options) {
|
|
|
4898
5043
|
);
|
|
4899
5044
|
}
|
|
4900
5045
|
const http = options.http ?? defaultHttpClient();
|
|
4901
|
-
const snapshot = (0,
|
|
4902
|
-
const etag = (0,
|
|
4903
|
-
const loading = (0,
|
|
4904
|
-
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);
|
|
4905
5050
|
async function fetchSnapshot(includeEtag) {
|
|
4906
5051
|
loading.value = true;
|
|
4907
5052
|
error.value = null;
|
|
@@ -4968,7 +5113,7 @@ function useDiscovery(options) {
|
|
|
4968
5113
|
}
|
|
4969
5114
|
|
|
4970
5115
|
// src/vue/use-catalog-entries.ts
|
|
4971
|
-
var
|
|
5116
|
+
var import_vue18 = require("vue");
|
|
4972
5117
|
var CatalogEntriesApiError = class extends Error {
|
|
4973
5118
|
constructor(status, body, message) {
|
|
4974
5119
|
super(message);
|
|
@@ -4988,11 +5133,11 @@ function useCatalogEntries(options) {
|
|
|
4988
5133
|
}
|
|
4989
5134
|
const msg = useSaMessages("discovery");
|
|
4990
5135
|
const http = options.http ?? defaultHttpClient();
|
|
4991
|
-
const capabilities = (0,
|
|
4992
|
-
const features = (0,
|
|
4993
|
-
const quotas = (0,
|
|
4994
|
-
const loading = (0,
|
|
4995
|
-
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);
|
|
4996
5141
|
const base = `${options.adminEndpoint}/catalog`;
|
|
4997
5142
|
const pk = encodeURIComponent(options.projectKey);
|
|
4998
5143
|
function authHeaders() {
|
|
@@ -5118,7 +5263,7 @@ function useCatalogEntries(options) {
|
|
|
5118
5263
|
}
|
|
5119
5264
|
|
|
5120
5265
|
// src/vue/use-bundles.ts
|
|
5121
|
-
var
|
|
5266
|
+
var import_vue19 = require("vue");
|
|
5122
5267
|
var BundlesApiError = class extends Error {
|
|
5123
5268
|
constructor(status, body, message) {
|
|
5124
5269
|
super(message);
|
|
@@ -5139,9 +5284,9 @@ function useBundles(options) {
|
|
|
5139
5284
|
throw new Error("useBundles: `projectKey` is required.");
|
|
5140
5285
|
}
|
|
5141
5286
|
const http = options.http ?? defaultHttpClient();
|
|
5142
|
-
const bundles = (0,
|
|
5143
|
-
const loading = (0,
|
|
5144
|
-
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);
|
|
5145
5290
|
const baseUrl = `${options.adminEndpoint}/catalog/bundles`;
|
|
5146
5291
|
function authHeaders() {
|
|
5147
5292
|
const token = options.getAuthToken?.();
|
|
@@ -5213,9 +5358,9 @@ function useBundleVersions(options) {
|
|
|
5213
5358
|
throw new Error("useBundleVersions: `bundleId` is required.");
|
|
5214
5359
|
}
|
|
5215
5360
|
const http = options.http ?? defaultHttpClient();
|
|
5216
|
-
const versions = (0,
|
|
5217
|
-
const loading = (0,
|
|
5218
|
-
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);
|
|
5219
5364
|
const bundleVersionsUrl = `${options.adminEndpoint}/catalog/bundles/${options.bundleId}/versions`;
|
|
5220
5365
|
const versionUrlBase = `${options.adminEndpoint}/catalog/bundle-versions`;
|
|
5221
5366
|
function authHeaders() {
|
|
@@ -5289,7 +5434,7 @@ function useBundleVersions(options) {
|
|
|
5289
5434
|
}
|
|
5290
5435
|
|
|
5291
5436
|
// src/vue/use-bundle-versions-map.ts
|
|
5292
|
-
var
|
|
5437
|
+
var import_vue20 = require("vue");
|
|
5293
5438
|
function useBundleVersionsMap(options) {
|
|
5294
5439
|
if (!options?.adminEndpoint) {
|
|
5295
5440
|
throw new Error("useBundleVersionsMap: `adminEndpoint` is required.");
|
|
@@ -5298,9 +5443,9 @@ function useBundleVersionsMap(options) {
|
|
|
5298
5443
|
throw new Error("useBundleVersionsMap: `bundles` is required.");
|
|
5299
5444
|
}
|
|
5300
5445
|
const http = options.http ?? defaultHttpClient();
|
|
5301
|
-
const versionsByBundle = (0,
|
|
5302
|
-
const loading = (0,
|
|
5303
|
-
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);
|
|
5304
5449
|
function authHeaders() {
|
|
5305
5450
|
const token = options.getAuthToken?.();
|
|
5306
5451
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -5350,7 +5495,7 @@ function useBundleVersionsMap(options) {
|
|
|
5350
5495
|
console.warn(`useBundleVersionsMap: refreshOne('${bundleId}') failed`, err);
|
|
5351
5496
|
}
|
|
5352
5497
|
}
|
|
5353
|
-
(0,
|
|
5498
|
+
(0, import_vue20.watch)(
|
|
5354
5499
|
() => options.bundles.value.map((b) => b.id).join(","),
|
|
5355
5500
|
() => {
|
|
5356
5501
|
if (options.bundles.value.length > 0) void refresh();
|
|
@@ -5362,7 +5507,7 @@ function useBundleVersionsMap(options) {
|
|
|
5362
5507
|
}
|
|
5363
5508
|
|
|
5364
5509
|
// src/vue/use-tenant-subscription-bundles.ts
|
|
5365
|
-
var
|
|
5510
|
+
var import_vue21 = require("vue");
|
|
5366
5511
|
var TenantSubscriptionBundlesApiError = class extends Error {
|
|
5367
5512
|
constructor(status, body, message) {
|
|
5368
5513
|
super(message);
|
|
@@ -5381,9 +5526,9 @@ function useTenantSubscriptionBundles(options) {
|
|
|
5381
5526
|
}
|
|
5382
5527
|
const http = options.http ?? defaultHttpClient();
|
|
5383
5528
|
const baseUrl = `${options.billingEndpoint}/billing/subscription-bundles`;
|
|
5384
|
-
const bundles = (0,
|
|
5385
|
-
const loading = (0,
|
|
5386
|
-
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);
|
|
5387
5532
|
function authHeaders() {
|
|
5388
5533
|
const token = options.getAuthToken?.();
|
|
5389
5534
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -5457,7 +5602,7 @@ function rehydrateDates(raw) {
|
|
|
5457
5602
|
}
|
|
5458
5603
|
|
|
5459
5604
|
// src/vue/use-marketing-projections.ts
|
|
5460
|
-
var
|
|
5605
|
+
var import_vue22 = require("vue");
|
|
5461
5606
|
var MarketingProjectionsApiError = class extends Error {
|
|
5462
5607
|
constructor(status, body, message) {
|
|
5463
5608
|
super(message);
|
|
@@ -5477,10 +5622,10 @@ function useMarketingProjections(options) {
|
|
|
5477
5622
|
}
|
|
5478
5623
|
const msg = useSaMessages("marketing");
|
|
5479
5624
|
const http = options.http ?? defaultHttpClient();
|
|
5480
|
-
const projections = (0,
|
|
5481
|
-
const filter = (0,
|
|
5482
|
-
const loading = (0,
|
|
5483
|
-
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);
|
|
5484
5629
|
const baseUrl = `${options.adminEndpoint}/catalog/marketing-projections`;
|
|
5485
5630
|
function authHeaders() {
|
|
5486
5631
|
const token = options.getAuthToken?.();
|
|
@@ -5561,7 +5706,7 @@ function useMarketingProjections(options) {
|
|
|
5561
5706
|
}
|
|
5562
5707
|
|
|
5563
5708
|
// src/vue/use-promotions.ts
|
|
5564
|
-
var
|
|
5709
|
+
var import_vue23 = require("vue");
|
|
5565
5710
|
var PromotionsApiError = class extends Error {
|
|
5566
5711
|
constructor(status, body, message) {
|
|
5567
5712
|
super(message);
|
|
@@ -5581,9 +5726,9 @@ function usePromotions(options) {
|
|
|
5581
5726
|
}
|
|
5582
5727
|
const msg = useSaMessages("promos");
|
|
5583
5728
|
const http = options.http ?? defaultHttpClient();
|
|
5584
|
-
const promotions = (0,
|
|
5585
|
-
const loading = (0,
|
|
5586
|
-
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);
|
|
5587
5732
|
const baseUrl = `${options.adminEndpoint}/catalog/promotions`;
|
|
5588
5733
|
const pk = encodeURIComponent(options.projectKey);
|
|
5589
5734
|
function authHeaders() {
|
|
@@ -5648,7 +5793,7 @@ function usePromotions(options) {
|
|
|
5648
5793
|
}
|
|
5649
5794
|
|
|
5650
5795
|
// src/vue/use-plans.ts
|
|
5651
|
-
var
|
|
5796
|
+
var import_vue24 = require("vue");
|
|
5652
5797
|
var PlansApiError = class extends Error {
|
|
5653
5798
|
constructor(status, body, message) {
|
|
5654
5799
|
super(message);
|
|
@@ -5669,10 +5814,10 @@ function usePlans(options) {
|
|
|
5669
5814
|
throw new Error("usePlans: `projectKey` is required.");
|
|
5670
5815
|
}
|
|
5671
5816
|
const http = options.http ?? defaultHttpClient();
|
|
5672
|
-
const plans = (0,
|
|
5673
|
-
const loading = (0,
|
|
5674
|
-
const error = (0,
|
|
5675
|
-
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)({});
|
|
5676
5821
|
const baseUrl = `${options.adminEndpoint}/catalog/plans`;
|
|
5677
5822
|
function authHeaders() {
|
|
5678
5823
|
const token = options.getAuthToken?.();
|
|
@@ -5773,9 +5918,9 @@ function usePlanVersions(options) {
|
|
|
5773
5918
|
throw new Error("usePlanVersions: `planId` is required.");
|
|
5774
5919
|
}
|
|
5775
5920
|
const http = options.http ?? defaultHttpClient();
|
|
5776
|
-
const versions = (0,
|
|
5777
|
-
const loading = (0,
|
|
5778
|
-
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);
|
|
5779
5924
|
const planVersionsUrl = `${options.adminEndpoint}/catalog/plans/${options.planId}/versions`;
|
|
5780
5925
|
const versionUrlBase = `${options.adminEndpoint}/catalog/plan-versions`;
|
|
5781
5926
|
function authHeaders() {
|
|
@@ -5872,7 +6017,7 @@ function usePlanVersions(options) {
|
|
|
5872
6017
|
}
|
|
5873
6018
|
|
|
5874
6019
|
// src/vue/use-live-plan-versions.ts
|
|
5875
|
-
var
|
|
6020
|
+
var import_vue25 = require("vue");
|
|
5876
6021
|
function useLivePlanVersions(options) {
|
|
5877
6022
|
if (!options?.adminEndpoint) {
|
|
5878
6023
|
throw new Error("useLivePlanVersions: `adminEndpoint` is required.");
|
|
@@ -5881,9 +6026,9 @@ function useLivePlanVersions(options) {
|
|
|
5881
6026
|
throw new Error("useLivePlanVersions: `plans` is required.");
|
|
5882
6027
|
}
|
|
5883
6028
|
const http = options.http ?? defaultHttpClient();
|
|
5884
|
-
const livePlanVersions = (0,
|
|
5885
|
-
const loading = (0,
|
|
5886
|
-
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);
|
|
5887
6032
|
function authHeaders() {
|
|
5888
6033
|
const token = options.getAuthToken?.();
|
|
5889
6034
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -5925,7 +6070,7 @@ function useLivePlanVersions(options) {
|
|
|
5925
6070
|
loading.value = false;
|
|
5926
6071
|
}
|
|
5927
6072
|
}
|
|
5928
|
-
(0,
|
|
6073
|
+
(0, import_vue25.watch)(
|
|
5929
6074
|
() => options.plans.value.map((p) => p.id).join(","),
|
|
5930
6075
|
() => {
|
|
5931
6076
|
if (options.plans.value.length > 0) void refresh();
|
|
@@ -5947,12 +6092,12 @@ function findLatestLive(versions) {
|
|
|
5947
6092
|
}
|
|
5948
6093
|
|
|
5949
6094
|
// src/vue/use-manifest.ts
|
|
5950
|
-
var
|
|
6095
|
+
var import_vue26 = require("vue");
|
|
5951
6096
|
function useManifest(options) {
|
|
5952
6097
|
const loader = new ManifestLoader(options);
|
|
5953
|
-
const manifest = (0,
|
|
5954
|
-
const loading = (0,
|
|
5955
|
-
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);
|
|
5956
6101
|
async function load() {
|
|
5957
6102
|
loading.value = true;
|
|
5958
6103
|
error.value = null;
|
|
@@ -5978,24 +6123,24 @@ function useManifest(options) {
|
|
|
5978
6123
|
}
|
|
5979
6124
|
|
|
5980
6125
|
// src/vue/use-nav.ts
|
|
5981
|
-
var
|
|
6126
|
+
var import_vue27 = require("vue");
|
|
5982
6127
|
function useNav(manifest, options = {}) {
|
|
5983
6128
|
const { locale } = useSuperAdminI18n();
|
|
5984
|
-
const activeLocale = (0,
|
|
5985
|
-
const routes = (0,
|
|
6129
|
+
const activeLocale = (0, import_vue27.computed)(() => options.locale ?? locale.value);
|
|
6130
|
+
const routes = (0, import_vue27.computed)(() => {
|
|
5986
6131
|
if (!manifest.value) return [];
|
|
5987
6132
|
return buildRoutes(manifest.value, { ...options, locale: activeLocale.value });
|
|
5988
6133
|
});
|
|
5989
|
-
const sidebar = (0,
|
|
6134
|
+
const sidebar = (0, import_vue27.computed)(
|
|
5990
6135
|
() => buildSidebar(routes.value, defaultSectionOrder(activeLocale.value))
|
|
5991
6136
|
);
|
|
5992
6137
|
return { routes, sidebar };
|
|
5993
6138
|
}
|
|
5994
6139
|
|
|
5995
6140
|
// src/vue/use-actions.ts
|
|
5996
|
-
var
|
|
6141
|
+
var import_vue28 = require("vue");
|
|
5997
6142
|
function useActions(manifest, actions) {
|
|
5998
|
-
const registry = (0,
|
|
6143
|
+
const registry = (0, import_vue28.computed)(() => {
|
|
5999
6144
|
if (!manifest.value) return null;
|
|
6000
6145
|
return new ActionRegistry(manifest.value, actions);
|
|
6001
6146
|
});
|
|
@@ -6003,18 +6148,18 @@ function useActions(manifest, actions) {
|
|
|
6003
6148
|
}
|
|
6004
6149
|
|
|
6005
6150
|
// src/vue/use-tenant-action-flow.ts
|
|
6006
|
-
var
|
|
6151
|
+
var import_vue29 = require("vue");
|
|
6007
6152
|
function useTenantActionFlow(manifest, providers = {}) {
|
|
6008
6153
|
const handlers = useSuperAdminActions();
|
|
6009
6154
|
const msg = useSaMessages("tenants");
|
|
6010
|
-
const registry = (0,
|
|
6155
|
+
const registry = (0, import_vue29.computed)(() => {
|
|
6011
6156
|
if (!manifest.value) return null;
|
|
6012
6157
|
return new ActionRegistry(manifest.value, handlers);
|
|
6013
6158
|
});
|
|
6014
|
-
const orphanedDefs = (0,
|
|
6159
|
+
const orphanedDefs = (0, import_vue29.computed)(
|
|
6015
6160
|
() => registry.value ? registry.value.listOrphanedDefs() : []
|
|
6016
6161
|
);
|
|
6017
|
-
const availableActions = (0,
|
|
6162
|
+
const availableActions = (0, import_vue29.computed)(() => {
|
|
6018
6163
|
const m = manifest.value;
|
|
6019
6164
|
const reg = registry.value;
|
|
6020
6165
|
if (!m || !reg) return [];
|
|
@@ -6087,7 +6232,7 @@ async function runFlow(def, row, registry, providers, successTemplate) {
|
|
|
6087
6232
|
}
|
|
6088
6233
|
|
|
6089
6234
|
// src/vue/use-platform-tenant-actions.ts
|
|
6090
|
-
var
|
|
6235
|
+
var import_vue30 = require("vue");
|
|
6091
6236
|
var DEFAULT_VISIBLE_FOR_ROW = (def, row) => {
|
|
6092
6237
|
if (def.actionKey === "tenants.suspend") return row.isActive;
|
|
6093
6238
|
if (def.actionKey === "tenants.reactivate") return !row.isActive;
|
|
@@ -6123,7 +6268,7 @@ function usePlatformTenantActions(options) {
|
|
|
6123
6268
|
const iconForActionKey = options.iconForActionKey ?? DEFAULT_ICON_FOR_ACTION_KEY;
|
|
6124
6269
|
const toneForActionKey = options.toneForActionKey ?? DEFAULT_TONE_FOR_ACTION_KEY;
|
|
6125
6270
|
const visibleForRow = options.visibleForRow ?? DEFAULT_VISIBLE_FOR_ROW;
|
|
6126
|
-
const mfa = (0,
|
|
6271
|
+
const mfa = (0, import_vue30.ref)({ show: false, description: "", error: "" });
|
|
6127
6272
|
let pendingMfaResolve = null;
|
|
6128
6273
|
function showMfaDialog(def, ctx) {
|
|
6129
6274
|
return new Promise((resolve) => {
|
|
@@ -6148,7 +6293,7 @@ function usePlatformTenantActions(options) {
|
|
|
6148
6293
|
pendingMfaResolve(null);
|
|
6149
6294
|
}
|
|
6150
6295
|
}
|
|
6151
|
-
const confirmDialog = (0,
|
|
6296
|
+
const confirmDialog = (0, import_vue30.ref)({
|
|
6152
6297
|
show: false,
|
|
6153
6298
|
def: null,
|
|
6154
6299
|
row: null
|
|
@@ -6190,7 +6335,7 @@ function usePlatformTenantActions(options) {
|
|
|
6190
6335
|
},
|
|
6191
6336
|
visibleForRow
|
|
6192
6337
|
});
|
|
6193
|
-
const manifestActions = (0,
|
|
6338
|
+
const manifestActions = (0, import_vue30.computed)(
|
|
6194
6339
|
() => flow.availableActions.value.map((def) => ({
|
|
6195
6340
|
id: def.id,
|
|
6196
6341
|
label: def.label,
|
|
@@ -6204,7 +6349,7 @@ function usePlatformTenantActions(options) {
|
|
|
6204
6349
|
}
|
|
6205
6350
|
}))
|
|
6206
6351
|
);
|
|
6207
|
-
const realOrphans = (0,
|
|
6352
|
+
const realOrphans = (0, import_vue30.computed)(() => {
|
|
6208
6353
|
const caps = options.manifest.value?.capabilities ?? {};
|
|
6209
6354
|
const defs = options.manifest.value?.tenants?.actions ?? [];
|
|
6210
6355
|
const defByActionKey = new Map(defs.map((d) => [d.actionKey, d]));
|
|
@@ -6229,12 +6374,12 @@ function usePlatformTenantActions(options) {
|
|
|
6229
6374
|
}
|
|
6230
6375
|
|
|
6231
6376
|
// src/vue/use-batch-columns.ts
|
|
6232
|
-
var
|
|
6377
|
+
var import_vue31 = require("vue");
|
|
6233
6378
|
function useBatchColumns(manifest, tenantIds, options = {}) {
|
|
6234
6379
|
const fetcher = new BatchColumnFetcher(options);
|
|
6235
|
-
const data = (0,
|
|
6236
|
-
const loading = (0,
|
|
6237
|
-
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);
|
|
6238
6383
|
async function load() {
|
|
6239
6384
|
if (!manifest.value || tenantIds.value.length === 0) {
|
|
6240
6385
|
data.value = {};
|
|
@@ -6251,7 +6396,7 @@ function useBatchColumns(manifest, tenantIds, options = {}) {
|
|
|
6251
6396
|
loading.value = false;
|
|
6252
6397
|
}
|
|
6253
6398
|
}
|
|
6254
|
-
(0,
|
|
6399
|
+
(0, import_vue31.watch)([manifest, tenantIds], () => {
|
|
6255
6400
|
void load();
|
|
6256
6401
|
});
|
|
6257
6402
|
return { data, loading, error, reload: load };
|
|
@@ -6283,13 +6428,13 @@ function createPlatformLoaders(options) {
|
|
|
6283
6428
|
|
|
6284
6429
|
// src/vue/manifest-store-factory.ts
|
|
6285
6430
|
var import_pinia = require("pinia");
|
|
6286
|
-
var
|
|
6431
|
+
var import_vue32 = require("vue");
|
|
6287
6432
|
function createManifestStore(options) {
|
|
6288
6433
|
return (0, import_pinia.defineStore)(options.id ?? "admin-manifest", () => {
|
|
6289
|
-
const manifest = (0,
|
|
6290
|
-
const loading = (0,
|
|
6291
|
-
const error = (0,
|
|
6292
|
-
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);
|
|
6293
6438
|
let inflight = null;
|
|
6294
6439
|
async function load() {
|
|
6295
6440
|
loading.value = true;
|
|
@@ -6670,6 +6815,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6670
6815
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6671
6816
|
0 && (module.exports = {
|
|
6672
6817
|
ADMIN_UI_VERSION,
|
|
6818
|
+
ALL_ROWS,
|
|
6673
6819
|
ActionDefNotInManifestError,
|
|
6674
6820
|
ActionRegistry,
|
|
6675
6821
|
BatchColumnDriftError,
|
|
@@ -6681,6 +6827,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6681
6827
|
CatalogEntriesApiError,
|
|
6682
6828
|
DEFAULT_I18N_DE,
|
|
6683
6829
|
DEFAULT_I18N_EN,
|
|
6830
|
+
DEFAULT_ROWS_PER_PAGE,
|
|
6684
6831
|
DEFAULT_SA_LOCALE,
|
|
6685
6832
|
DEFAULT_STANDARD_PAGE_ROUTES,
|
|
6686
6833
|
DEFAULT_YEARLY_FACTOR,
|
|
@@ -6691,6 +6838,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6691
6838
|
ManifestLoader,
|
|
6692
6839
|
MarketingProjectionsApiError,
|
|
6693
6840
|
MissingHandlerError,
|
|
6841
|
+
PAGE_SIZE_OPTIONS,
|
|
6694
6842
|
PlannedOnlyFeatureError,
|
|
6695
6843
|
PlansApiError,
|
|
6696
6844
|
ProjectPageHost,
|
|
@@ -6700,6 +6848,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6700
6848
|
SA_LOCALE_LABELS,
|
|
6701
6849
|
SA_LOCALE_STORAGE_KEY,
|
|
6702
6850
|
SA_MESSAGES,
|
|
6851
|
+
SERVER_PAGE_SIZE_OPTIONS,
|
|
6703
6852
|
SUPER_ADMIN_ACTIONS_KEY,
|
|
6704
6853
|
SUPER_ADMIN_BRAND_KEY,
|
|
6705
6854
|
SUPER_ADMIN_ENDPOINTS_KEY,
|
|
@@ -6707,6 +6856,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6707
6856
|
SUPER_ADMIN_HTTP_KEY,
|
|
6708
6857
|
SUPER_ADMIN_I18N_KEY,
|
|
6709
6858
|
SUPER_ADMIN_LOGIN_ADAPTER_KEY,
|
|
6859
|
+
SUPER_ADMIN_MANIFEST_CLEAR_CACHE_KEY,
|
|
6710
6860
|
SUPER_ADMIN_MANIFEST_KEY,
|
|
6711
6861
|
SUPER_ADMIN_NOTIFY_KEY,
|
|
6712
6862
|
TenantSubscriptionBundlesApiError,
|
|
@@ -6716,6 +6866,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6716
6866
|
buildQuotaRegistry,
|
|
6717
6867
|
buildRoutes,
|
|
6718
6868
|
buildSidebar,
|
|
6869
|
+
countPlans,
|
|
6719
6870
|
createAdminResourceClient,
|
|
6720
6871
|
createAdminRoutes,
|
|
6721
6872
|
createManifestStore,
|
|
@@ -6733,6 +6884,9 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6733
6884
|
formatCurrency,
|
|
6734
6885
|
formatMessage,
|
|
6735
6886
|
getJson,
|
|
6887
|
+
isCurrentlyValid,
|
|
6888
|
+
isExpired,
|
|
6889
|
+
isFutureScheduled,
|
|
6736
6890
|
isProductionBoot,
|
|
6737
6891
|
isSaBuiltinLocale,
|
|
6738
6892
|
mergeMessages,
|
|
@@ -6741,6 +6895,8 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6741
6895
|
resolveExtension,
|
|
6742
6896
|
resolveLoginBranding,
|
|
6743
6897
|
resolveMessages,
|
|
6898
|
+
resolvePlans,
|
|
6899
|
+
todayIsoDate,
|
|
6744
6900
|
trimTrailingSlashes,
|
|
6745
6901
|
useActions,
|
|
6746
6902
|
useApiList,
|
|
@@ -6758,6 +6914,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
6758
6914
|
useManifest,
|
|
6759
6915
|
useMarketingProjections,
|
|
6760
6916
|
useNav,
|
|
6917
|
+
usePagination,
|
|
6761
6918
|
usePlanEditor,
|
|
6762
6919
|
usePlanVersions,
|
|
6763
6920
|
usePlans,
|