@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.js
CHANGED
|
@@ -13,15 +13,21 @@ import {
|
|
|
13
13
|
MissingHandlerError,
|
|
14
14
|
buildRoutes,
|
|
15
15
|
buildSidebar,
|
|
16
|
+
countPlans,
|
|
16
17
|
createAdminResourceClient,
|
|
17
18
|
defaultSectionOrder,
|
|
18
19
|
getJson,
|
|
20
|
+
isCurrentlyValid,
|
|
21
|
+
isExpired,
|
|
22
|
+
isFutureScheduled,
|
|
19
23
|
isProductionBoot,
|
|
20
24
|
postJson,
|
|
21
25
|
resolveExtension,
|
|
22
26
|
resolveLoginBranding,
|
|
27
|
+
resolvePlans,
|
|
28
|
+
todayIsoDate,
|
|
23
29
|
trimTrailingSlashes
|
|
24
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-XMMFN2WJ.js";
|
|
25
31
|
import {
|
|
26
32
|
SA_LOCALE_STORAGE_KEY,
|
|
27
33
|
SUPER_ADMIN_ACTIONS_KEY,
|
|
@@ -31,13 +37,14 @@ import {
|
|
|
31
37
|
SUPER_ADMIN_HTTP_KEY,
|
|
32
38
|
SUPER_ADMIN_I18N_KEY,
|
|
33
39
|
SUPER_ADMIN_LOGIN_ADAPTER_KEY,
|
|
40
|
+
SUPER_ADMIN_MANIFEST_CLEAR_CACHE_KEY,
|
|
34
41
|
SUPER_ADMIN_MANIFEST_KEY,
|
|
35
42
|
SUPER_ADMIN_NOTIFY_KEY,
|
|
36
43
|
buildNavigationGuard,
|
|
37
44
|
createSuperAdminI18n,
|
|
38
45
|
useSaMessages,
|
|
39
46
|
useSuperAdminI18n
|
|
40
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-LY52T4N4.js";
|
|
41
48
|
import {
|
|
42
49
|
DEFAULT_SA_LOCALE,
|
|
43
50
|
SA_INTL_LOCALES,
|
|
@@ -53,7 +60,7 @@ import {
|
|
|
53
60
|
isSaBuiltinLocale,
|
|
54
61
|
mergeMessages,
|
|
55
62
|
resolveMessages
|
|
56
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-F7NRM6KI.js";
|
|
57
64
|
|
|
58
65
|
// src/vue/use-super-admin-context.ts
|
|
59
66
|
import { inject } from "vue";
|
|
@@ -249,7 +256,7 @@ function useApiList(options) {
|
|
|
249
256
|
await load();
|
|
250
257
|
}
|
|
251
258
|
async function setPageSize(size) {
|
|
252
|
-
pageSize.value = Math.max(1, Math.floor(size));
|
|
259
|
+
pageSize.value = Math.min(200, Math.max(1, Math.floor(size)));
|
|
253
260
|
page.value = 1;
|
|
254
261
|
await load();
|
|
255
262
|
}
|
|
@@ -279,15 +286,39 @@ function useApiList(options) {
|
|
|
279
286
|
};
|
|
280
287
|
}
|
|
281
288
|
|
|
289
|
+
// src/vue/use-pagination.ts
|
|
290
|
+
import { computed as computed2, ref as ref2, watch as watch2 } from "vue";
|
|
291
|
+
var ALL_ROWS = 0;
|
|
292
|
+
var DEFAULT_ROWS_PER_PAGE = 10;
|
|
293
|
+
var PAGE_SIZE_OPTIONS = [10, 25, 50, 100, ALL_ROWS];
|
|
294
|
+
var SERVER_PAGE_SIZE_OPTIONS = [10, 25, 50, 100];
|
|
295
|
+
function usePagination(rows, initialRowsPerPage = DEFAULT_ROWS_PER_PAGE) {
|
|
296
|
+
const page = ref2(1);
|
|
297
|
+
const rowsPerPage = ref2(initialRowsPerPage);
|
|
298
|
+
const total = computed2(() => rows.value.length);
|
|
299
|
+
const pageCount = computed2(
|
|
300
|
+
() => rowsPerPage.value === ALL_ROWS ? 1 : Math.max(1, Math.ceil(total.value / rowsPerPage.value))
|
|
301
|
+
);
|
|
302
|
+
watch2(pageCount, (count) => {
|
|
303
|
+
if (page.value > count) page.value = count;
|
|
304
|
+
});
|
|
305
|
+
const pagedRows = computed2(() => {
|
|
306
|
+
if (rowsPerPage.value === ALL_ROWS) return [...rows.value];
|
|
307
|
+
const start = (page.value - 1) * rowsPerPage.value;
|
|
308
|
+
return rows.value.slice(start, start + rowsPerPage.value);
|
|
309
|
+
});
|
|
310
|
+
return { page, rowsPerPage, total, pagedRows };
|
|
311
|
+
}
|
|
312
|
+
|
|
282
313
|
// src/vue/use-tenants.ts
|
|
283
|
-
import { ref as
|
|
314
|
+
import { ref as ref3 } from "vue";
|
|
284
315
|
function useTenants(options) {
|
|
285
316
|
if (!options?.endpoint) {
|
|
286
317
|
throw new Error(
|
|
287
318
|
'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.'
|
|
288
319
|
);
|
|
289
320
|
}
|
|
290
|
-
const filter = options.filter ??
|
|
321
|
+
const filter = options.filter ?? ref3({});
|
|
291
322
|
const list = useApiList({
|
|
292
323
|
endpoint: options.endpoint,
|
|
293
324
|
filter,
|
|
@@ -299,14 +330,14 @@ function useTenants(options) {
|
|
|
299
330
|
}
|
|
300
331
|
|
|
301
332
|
// src/vue/use-audit-entries.ts
|
|
302
|
-
import { ref as
|
|
333
|
+
import { ref as ref4 } from "vue";
|
|
303
334
|
function useAuditEntries(options) {
|
|
304
335
|
if (!options?.endpoint) {
|
|
305
336
|
throw new Error(
|
|
306
337
|
'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.'
|
|
307
338
|
);
|
|
308
339
|
}
|
|
309
|
-
const filter = options.filter ??
|
|
340
|
+
const filter = options.filter ?? ref4({});
|
|
310
341
|
const list = useApiList({
|
|
311
342
|
endpoint: options.endpoint,
|
|
312
343
|
filter,
|
|
@@ -318,7 +349,7 @@ function useAuditEntries(options) {
|
|
|
318
349
|
}
|
|
319
350
|
|
|
320
351
|
// src/vue/use-entitlement.ts
|
|
321
|
-
import { ref as
|
|
352
|
+
import { ref as ref5 } from "vue";
|
|
322
353
|
function useEntitlement(options) {
|
|
323
354
|
if (!options?.endpoint) {
|
|
324
355
|
throw new Error(
|
|
@@ -327,9 +358,9 @@ function useEntitlement(options) {
|
|
|
327
358
|
}
|
|
328
359
|
const endpoint = options.endpoint;
|
|
329
360
|
const http = options.http ?? defaultHttpClient();
|
|
330
|
-
const entitlement =
|
|
331
|
-
const loading =
|
|
332
|
-
const error =
|
|
361
|
+
const entitlement = ref5(null);
|
|
362
|
+
const loading = ref5(false);
|
|
363
|
+
const error = ref5(null);
|
|
333
364
|
async function load() {
|
|
334
365
|
loading.value = true;
|
|
335
366
|
error.value = null;
|
|
@@ -359,15 +390,15 @@ function useEntitlement(options) {
|
|
|
359
390
|
}
|
|
360
391
|
|
|
361
392
|
// src/vue/use-tenant-manifest.ts
|
|
362
|
-
import { ref as
|
|
393
|
+
import { ref as ref6 } from "vue";
|
|
363
394
|
function useTenantManifest(options) {
|
|
364
395
|
if (!options?.endpoint) {
|
|
365
396
|
throw new Error('useTenantManifest: `endpoint` is required (e.g. "/api/tenant/manifest").');
|
|
366
397
|
}
|
|
367
398
|
const http = options.http ?? defaultHttpClient();
|
|
368
|
-
const manifest =
|
|
369
|
-
const loading =
|
|
370
|
-
const error =
|
|
399
|
+
const manifest = ref6(null);
|
|
400
|
+
const loading = ref6(false);
|
|
401
|
+
const error = ref6(null);
|
|
371
402
|
async function load() {
|
|
372
403
|
loading.value = true;
|
|
373
404
|
error.value = null;
|
|
@@ -438,15 +469,15 @@ function buildFeatureRouterGuard(options) {
|
|
|
438
469
|
}
|
|
439
470
|
|
|
440
471
|
// src/vue/use-tenant-billing-catalog.ts
|
|
441
|
-
import { ref as
|
|
472
|
+
import { ref as ref7 } from "vue";
|
|
442
473
|
function useTenantBillingCatalog(options = {}) {
|
|
443
474
|
const apiPrefix = trimTrailingSlashes(options.apiPrefix ?? "/billing");
|
|
444
475
|
const http = options.http ?? defaultHttpClient();
|
|
445
|
-
const plans =
|
|
446
|
-
const featureRegistry =
|
|
447
|
-
const bundles =
|
|
448
|
-
const loading =
|
|
449
|
-
const error =
|
|
476
|
+
const plans = ref7(null);
|
|
477
|
+
const featureRegistry = ref7(null);
|
|
478
|
+
const bundles = ref7(null);
|
|
479
|
+
const loading = ref7(false);
|
|
480
|
+
const error = ref7(null);
|
|
450
481
|
async function fetchJson(path) {
|
|
451
482
|
const res = await http(`${apiPrefix}${path}`, { method: "GET" });
|
|
452
483
|
if (res.status !== 200) {
|
|
@@ -496,14 +527,14 @@ function useTenantBillingCatalog(options = {}) {
|
|
|
496
527
|
}
|
|
497
528
|
|
|
498
529
|
// src/vue/use-tenant-billing.ts
|
|
499
|
-
import { ref as
|
|
530
|
+
import { ref as ref8 } from "vue";
|
|
500
531
|
function useTenantBilling(options = {}) {
|
|
501
532
|
const apiPrefix = trimTrailingSlashes(options.apiPrefix ?? "/billing");
|
|
502
533
|
const http = options.http ?? defaultHttpClient();
|
|
503
|
-
const usage =
|
|
504
|
-
const loading =
|
|
505
|
-
const error =
|
|
506
|
-
const subscriptionBundles =
|
|
534
|
+
const usage = ref8(null);
|
|
535
|
+
const loading = ref8(false);
|
|
536
|
+
const error = ref8(null);
|
|
537
|
+
const subscriptionBundles = ref8([]);
|
|
507
538
|
function authHeaders() {
|
|
508
539
|
const headers = {};
|
|
509
540
|
const token = options.getAuthToken?.();
|
|
@@ -637,7 +668,7 @@ function useTenantBilling(options = {}) {
|
|
|
637
668
|
}
|
|
638
669
|
|
|
639
670
|
// src/vue/use-subscription-draft.ts
|
|
640
|
-
import { computed as
|
|
671
|
+
import { computed as computed3, ref as ref9 } from "vue";
|
|
641
672
|
import {
|
|
642
673
|
selectChargeableBundles
|
|
643
674
|
} from "@saasicat/types";
|
|
@@ -656,27 +687,27 @@ function priceForCycle(monthlyNet, yearlyNet, cycle, yearlyFactor) {
|
|
|
656
687
|
}
|
|
657
688
|
function useSubscriptionDraft(options) {
|
|
658
689
|
const yearlyFactor = options.yearlyFactor ?? DEFAULT_YEARLY_FACTOR;
|
|
659
|
-
const plansRef =
|
|
660
|
-
const subscriptionBundlesRef =
|
|
690
|
+
const plansRef = computed3(() => unwrap(options.plans) ?? []);
|
|
691
|
+
const subscriptionBundlesRef = computed3(
|
|
661
692
|
() => unwrap(options.subscriptionBundles ?? null) ?? []
|
|
662
693
|
);
|
|
663
|
-
const plan =
|
|
664
|
-
const cycle =
|
|
665
|
-
const selectedBundleVersionIds =
|
|
694
|
+
const plan = ref9(options.initialPlan ?? null);
|
|
695
|
+
const cycle = ref9(options.initialCycle ?? "MONTHLY");
|
|
696
|
+
const selectedBundleVersionIds = ref9(
|
|
666
697
|
new Set(options.initialBundleVersionIds ?? [])
|
|
667
698
|
);
|
|
668
|
-
const promoCode =
|
|
669
|
-
const promoState =
|
|
670
|
-
const selectedPlan =
|
|
699
|
+
const promoCode = ref9("");
|
|
700
|
+
const promoState = ref9({ status: "idle", preview: null, message: "" });
|
|
701
|
+
const selectedPlan = computed3(() => {
|
|
671
702
|
if (!plan.value) return null;
|
|
672
703
|
return plansRef.value.find((p) => p.id === plan.value) ?? null;
|
|
673
704
|
});
|
|
674
|
-
const selectedBundles =
|
|
705
|
+
const selectedBundles = computed3(
|
|
675
706
|
() => subscriptionBundlesRef.value.filter(
|
|
676
707
|
(b) => selectedBundleVersionIds.value.has(b.bundleVersionId)
|
|
677
708
|
)
|
|
678
709
|
);
|
|
679
|
-
const chargeableBundles =
|
|
710
|
+
const chargeableBundles = computed3(() => {
|
|
680
711
|
const planFeatures = selectedPlan.value?.features ?? [];
|
|
681
712
|
const selected = selectedBundles.value;
|
|
682
713
|
const keptIds = new Set(
|
|
@@ -684,7 +715,7 @@ function useSubscriptionDraft(options) {
|
|
|
684
715
|
);
|
|
685
716
|
return selected.filter((b) => keptIds.has(b.bundleVersionId));
|
|
686
717
|
});
|
|
687
|
-
const activeFeatures =
|
|
718
|
+
const activeFeatures = computed3(() => {
|
|
688
719
|
const result = /* @__PURE__ */ new Set();
|
|
689
720
|
const planObj = selectedPlan.value;
|
|
690
721
|
if (planObj) {
|
|
@@ -695,7 +726,7 @@ function useSubscriptionDraft(options) {
|
|
|
695
726
|
}
|
|
696
727
|
return result;
|
|
697
728
|
});
|
|
698
|
-
const pricing =
|
|
729
|
+
const pricing = computed3(() => {
|
|
699
730
|
const cyc = cycle.value;
|
|
700
731
|
const planObj = selectedPlan.value;
|
|
701
732
|
const planNet = planObj ? priceForCycle(planObj.monthlyNet ?? 0, planObj.yearlyNet, cyc, yearlyFactor) : 0;
|
|
@@ -755,7 +786,7 @@ function useSubscriptionDraft(options) {
|
|
|
755
786
|
}
|
|
756
787
|
};
|
|
757
788
|
});
|
|
758
|
-
const isDirty =
|
|
789
|
+
const isDirty = computed3(() => {
|
|
759
790
|
return selectedBundleVersionIds.value.size > 0 || promoState.value.status === "valid";
|
|
760
791
|
});
|
|
761
792
|
function setPlan(planId) {
|
|
@@ -831,7 +862,7 @@ function useSubscriptionDraft(options) {
|
|
|
831
862
|
}
|
|
832
863
|
|
|
833
864
|
// src/vue/use-bulk-publish.ts
|
|
834
|
-
import { computed as
|
|
865
|
+
import { computed as computed4, ref as ref10 } from "vue";
|
|
835
866
|
function useBulkPublish(options) {
|
|
836
867
|
const msg = useSaMessages("planVersions");
|
|
837
868
|
if (!options?.endpoints) {
|
|
@@ -841,15 +872,15 @@ function useBulkPublish(options) {
|
|
|
841
872
|
}
|
|
842
873
|
const http = options.http ?? defaultHttpClient();
|
|
843
874
|
const endpoints = options.endpoints;
|
|
844
|
-
const items =
|
|
845
|
-
const successCount =
|
|
846
|
-
const failureCount =
|
|
847
|
-
const progress =
|
|
875
|
+
const items = ref10([]);
|
|
876
|
+
const successCount = computed4(() => items.value.filter((i) => i.status === "published").length);
|
|
877
|
+
const failureCount = computed4(() => items.value.filter((i) => i.status === "failed").length);
|
|
878
|
+
const progress = computed4(() => {
|
|
848
879
|
if (items.value.length === 0) return 0;
|
|
849
880
|
const done2 = successCount.value + failureCount.value;
|
|
850
881
|
return done2 / items.value.length;
|
|
851
882
|
});
|
|
852
|
-
const done =
|
|
883
|
+
const done = computed4(
|
|
853
884
|
() => items.value.length > 0 && items.value.every((i) => i.status === "published" || i.status === "failed")
|
|
854
885
|
);
|
|
855
886
|
function setItems(next) {
|
|
@@ -907,7 +938,7 @@ function useBulkPublish(options) {
|
|
|
907
938
|
}
|
|
908
939
|
|
|
909
940
|
// src/vue/use-plan-editor.ts
|
|
910
|
-
import { computed as
|
|
941
|
+
import { computed as computed5, ref as ref11 } from "vue";
|
|
911
942
|
var PlannedOnlyFeatureError = class extends Error {
|
|
912
943
|
constructor(violations) {
|
|
913
944
|
super(
|
|
@@ -927,10 +958,10 @@ function tierWeight(tier) {
|
|
|
927
958
|
function usePlanEditor(manifest, options = {}) {
|
|
928
959
|
const baseSet = new Set(options.baseFeatures ?? []);
|
|
929
960
|
const nonRegressive = options.nonRegressive ?? true;
|
|
930
|
-
const selectedFeatures =
|
|
961
|
+
const selectedFeatures = ref11(new Set(options.initialFeatures ?? []));
|
|
931
962
|
const catalogFeatures = manifest.planCatalogSnapshot.features ?? [];
|
|
932
963
|
const plannedOnlySet = new Set(catalogFeatures.filter((f) => f.plannedOnly).map((f) => f.key));
|
|
933
|
-
const availableFeatures =
|
|
964
|
+
const availableFeatures = computed5(() => {
|
|
934
965
|
return catalogFeatures.map((def) => {
|
|
935
966
|
const isSelected = selectedFeatures.value.has(def.key);
|
|
936
967
|
const isPlannedOnly = !!def.plannedOnly;
|
|
@@ -939,7 +970,7 @@ function usePlanEditor(manifest, options = {}) {
|
|
|
939
970
|
return { def, isSelected, isPlannedOnly, isInherited, canToggle };
|
|
940
971
|
});
|
|
941
972
|
});
|
|
942
|
-
const featuresByTier =
|
|
973
|
+
const featuresByTier = computed5(() => {
|
|
943
974
|
const groups = /* @__PURE__ */ new Map();
|
|
944
975
|
for (const row of availableFeatures.value) {
|
|
945
976
|
const tier = row.def.tier ?? "OTHER";
|
|
@@ -984,12 +1015,12 @@ function usePlanEditor(manifest, options = {}) {
|
|
|
984
1015
|
}
|
|
985
1016
|
|
|
986
1017
|
// src/vue/use-public-boot.ts
|
|
987
|
-
import { ref as
|
|
1018
|
+
import { ref as ref12 } from "vue";
|
|
988
1019
|
function usePublicBoot(options) {
|
|
989
1020
|
const loader = new BootLoader(options);
|
|
990
|
-
const boot =
|
|
991
|
-
const loading =
|
|
992
|
-
const error =
|
|
1021
|
+
const boot = ref12(null);
|
|
1022
|
+
const loading = ref12(false);
|
|
1023
|
+
const error = ref12(null);
|
|
993
1024
|
async function load() {
|
|
994
1025
|
loading.value = true;
|
|
995
1026
|
error.value = null;
|
|
@@ -1006,7 +1037,7 @@ function usePublicBoot(options) {
|
|
|
1006
1037
|
}
|
|
1007
1038
|
|
|
1008
1039
|
// src/vue/use-discovery.ts
|
|
1009
|
-
import { ref as
|
|
1040
|
+
import { ref as ref13 } from "vue";
|
|
1010
1041
|
var DiscoveryLoadError = class extends Error {
|
|
1011
1042
|
constructor(status, message) {
|
|
1012
1043
|
super(message);
|
|
@@ -1023,10 +1054,10 @@ function useDiscovery(options) {
|
|
|
1023
1054
|
);
|
|
1024
1055
|
}
|
|
1025
1056
|
const http = options.http ?? defaultHttpClient();
|
|
1026
|
-
const snapshot =
|
|
1027
|
-
const etag =
|
|
1028
|
-
const loading =
|
|
1029
|
-
const error =
|
|
1057
|
+
const snapshot = ref13(null);
|
|
1058
|
+
const etag = ref13(null);
|
|
1059
|
+
const loading = ref13(false);
|
|
1060
|
+
const error = ref13(null);
|
|
1030
1061
|
async function fetchSnapshot(includeEtag) {
|
|
1031
1062
|
loading.value = true;
|
|
1032
1063
|
error.value = null;
|
|
@@ -1093,7 +1124,7 @@ function useDiscovery(options) {
|
|
|
1093
1124
|
}
|
|
1094
1125
|
|
|
1095
1126
|
// src/vue/use-catalog-entries.ts
|
|
1096
|
-
import { ref as
|
|
1127
|
+
import { ref as ref14 } from "vue";
|
|
1097
1128
|
var CatalogEntriesApiError = class extends Error {
|
|
1098
1129
|
constructor(status, body, message) {
|
|
1099
1130
|
super(message);
|
|
@@ -1113,11 +1144,11 @@ function useCatalogEntries(options) {
|
|
|
1113
1144
|
}
|
|
1114
1145
|
const msg = useSaMessages("discovery");
|
|
1115
1146
|
const http = options.http ?? defaultHttpClient();
|
|
1116
|
-
const capabilities =
|
|
1117
|
-
const features =
|
|
1118
|
-
const quotas =
|
|
1119
|
-
const loading =
|
|
1120
|
-
const error =
|
|
1147
|
+
const capabilities = ref14([]);
|
|
1148
|
+
const features = ref14([]);
|
|
1149
|
+
const quotas = ref14([]);
|
|
1150
|
+
const loading = ref14(false);
|
|
1151
|
+
const error = ref14(null);
|
|
1121
1152
|
const base = `${options.adminEndpoint}/catalog`;
|
|
1122
1153
|
const pk = encodeURIComponent(options.projectKey);
|
|
1123
1154
|
function authHeaders() {
|
|
@@ -1243,7 +1274,7 @@ function useCatalogEntries(options) {
|
|
|
1243
1274
|
}
|
|
1244
1275
|
|
|
1245
1276
|
// src/vue/use-bundles.ts
|
|
1246
|
-
import { ref as
|
|
1277
|
+
import { ref as ref15 } from "vue";
|
|
1247
1278
|
var BundlesApiError = class extends Error {
|
|
1248
1279
|
constructor(status, body, message) {
|
|
1249
1280
|
super(message);
|
|
@@ -1264,9 +1295,9 @@ function useBundles(options) {
|
|
|
1264
1295
|
throw new Error("useBundles: `projectKey` is required.");
|
|
1265
1296
|
}
|
|
1266
1297
|
const http = options.http ?? defaultHttpClient();
|
|
1267
|
-
const bundles =
|
|
1268
|
-
const loading =
|
|
1269
|
-
const error =
|
|
1298
|
+
const bundles = ref15([]);
|
|
1299
|
+
const loading = ref15(false);
|
|
1300
|
+
const error = ref15(null);
|
|
1270
1301
|
const baseUrl = `${options.adminEndpoint}/catalog/bundles`;
|
|
1271
1302
|
function authHeaders() {
|
|
1272
1303
|
const token = options.getAuthToken?.();
|
|
@@ -1338,9 +1369,9 @@ function useBundleVersions(options) {
|
|
|
1338
1369
|
throw new Error("useBundleVersions: `bundleId` is required.");
|
|
1339
1370
|
}
|
|
1340
1371
|
const http = options.http ?? defaultHttpClient();
|
|
1341
|
-
const versions =
|
|
1342
|
-
const loading =
|
|
1343
|
-
const error =
|
|
1372
|
+
const versions = ref15([]);
|
|
1373
|
+
const loading = ref15(false);
|
|
1374
|
+
const error = ref15(null);
|
|
1344
1375
|
const bundleVersionsUrl = `${options.adminEndpoint}/catalog/bundles/${options.bundleId}/versions`;
|
|
1345
1376
|
const versionUrlBase = `${options.adminEndpoint}/catalog/bundle-versions`;
|
|
1346
1377
|
function authHeaders() {
|
|
@@ -1414,7 +1445,7 @@ function useBundleVersions(options) {
|
|
|
1414
1445
|
}
|
|
1415
1446
|
|
|
1416
1447
|
// src/vue/use-bundle-versions-map.ts
|
|
1417
|
-
import { ref as
|
|
1448
|
+
import { ref as ref16, watch as watch3 } from "vue";
|
|
1418
1449
|
function useBundleVersionsMap(options) {
|
|
1419
1450
|
if (!options?.adminEndpoint) {
|
|
1420
1451
|
throw new Error("useBundleVersionsMap: `adminEndpoint` is required.");
|
|
@@ -1423,9 +1454,9 @@ function useBundleVersionsMap(options) {
|
|
|
1423
1454
|
throw new Error("useBundleVersionsMap: `bundles` is required.");
|
|
1424
1455
|
}
|
|
1425
1456
|
const http = options.http ?? defaultHttpClient();
|
|
1426
|
-
const versionsByBundle =
|
|
1427
|
-
const loading =
|
|
1428
|
-
const error =
|
|
1457
|
+
const versionsByBundle = ref16({});
|
|
1458
|
+
const loading = ref16(false);
|
|
1459
|
+
const error = ref16(null);
|
|
1429
1460
|
function authHeaders() {
|
|
1430
1461
|
const token = options.getAuthToken?.();
|
|
1431
1462
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -1475,7 +1506,7 @@ function useBundleVersionsMap(options) {
|
|
|
1475
1506
|
console.warn(`useBundleVersionsMap: refreshOne('${bundleId}') failed`, err);
|
|
1476
1507
|
}
|
|
1477
1508
|
}
|
|
1478
|
-
|
|
1509
|
+
watch3(
|
|
1479
1510
|
() => options.bundles.value.map((b) => b.id).join(","),
|
|
1480
1511
|
() => {
|
|
1481
1512
|
if (options.bundles.value.length > 0) void refresh();
|
|
@@ -1487,7 +1518,7 @@ function useBundleVersionsMap(options) {
|
|
|
1487
1518
|
}
|
|
1488
1519
|
|
|
1489
1520
|
// src/vue/use-tenant-subscription-bundles.ts
|
|
1490
|
-
import { ref as
|
|
1521
|
+
import { ref as ref17 } from "vue";
|
|
1491
1522
|
var TenantSubscriptionBundlesApiError = class extends Error {
|
|
1492
1523
|
constructor(status, body, message) {
|
|
1493
1524
|
super(message);
|
|
@@ -1506,9 +1537,9 @@ function useTenantSubscriptionBundles(options) {
|
|
|
1506
1537
|
}
|
|
1507
1538
|
const http = options.http ?? defaultHttpClient();
|
|
1508
1539
|
const baseUrl = `${options.billingEndpoint}/billing/subscription-bundles`;
|
|
1509
|
-
const bundles =
|
|
1510
|
-
const loading =
|
|
1511
|
-
const error =
|
|
1540
|
+
const bundles = ref17([]);
|
|
1541
|
+
const loading = ref17(false);
|
|
1542
|
+
const error = ref17(null);
|
|
1512
1543
|
function authHeaders() {
|
|
1513
1544
|
const token = options.getAuthToken?.();
|
|
1514
1545
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -1582,7 +1613,7 @@ function rehydrateDates(raw) {
|
|
|
1582
1613
|
}
|
|
1583
1614
|
|
|
1584
1615
|
// src/vue/use-marketing-projections.ts
|
|
1585
|
-
import { ref as
|
|
1616
|
+
import { ref as ref18 } from "vue";
|
|
1586
1617
|
var MarketingProjectionsApiError = class extends Error {
|
|
1587
1618
|
constructor(status, body, message) {
|
|
1588
1619
|
super(message);
|
|
@@ -1602,10 +1633,10 @@ function useMarketingProjections(options) {
|
|
|
1602
1633
|
}
|
|
1603
1634
|
const msg = useSaMessages("marketing");
|
|
1604
1635
|
const http = options.http ?? defaultHttpClient();
|
|
1605
|
-
const projections =
|
|
1606
|
-
const filter =
|
|
1607
|
-
const loading =
|
|
1608
|
-
const error =
|
|
1636
|
+
const projections = ref18([]);
|
|
1637
|
+
const filter = ref18({ ...options.filter });
|
|
1638
|
+
const loading = ref18(false);
|
|
1639
|
+
const error = ref18(null);
|
|
1609
1640
|
const baseUrl = `${options.adminEndpoint}/catalog/marketing-projections`;
|
|
1610
1641
|
function authHeaders() {
|
|
1611
1642
|
const token = options.getAuthToken?.();
|
|
@@ -1686,7 +1717,7 @@ function useMarketingProjections(options) {
|
|
|
1686
1717
|
}
|
|
1687
1718
|
|
|
1688
1719
|
// src/vue/use-promotions.ts
|
|
1689
|
-
import { ref as
|
|
1720
|
+
import { ref as ref19 } from "vue";
|
|
1690
1721
|
var PromotionsApiError = class extends Error {
|
|
1691
1722
|
constructor(status, body, message) {
|
|
1692
1723
|
super(message);
|
|
@@ -1706,9 +1737,9 @@ function usePromotions(options) {
|
|
|
1706
1737
|
}
|
|
1707
1738
|
const msg = useSaMessages("promos");
|
|
1708
1739
|
const http = options.http ?? defaultHttpClient();
|
|
1709
|
-
const promotions =
|
|
1710
|
-
const loading =
|
|
1711
|
-
const error =
|
|
1740
|
+
const promotions = ref19([]);
|
|
1741
|
+
const loading = ref19(false);
|
|
1742
|
+
const error = ref19(null);
|
|
1712
1743
|
const baseUrl = `${options.adminEndpoint}/catalog/promotions`;
|
|
1713
1744
|
const pk = encodeURIComponent(options.projectKey);
|
|
1714
1745
|
function authHeaders() {
|
|
@@ -1773,7 +1804,7 @@ function usePromotions(options) {
|
|
|
1773
1804
|
}
|
|
1774
1805
|
|
|
1775
1806
|
// src/vue/use-plans.ts
|
|
1776
|
-
import { ref as
|
|
1807
|
+
import { ref as ref20 } from "vue";
|
|
1777
1808
|
var PlansApiError = class extends Error {
|
|
1778
1809
|
constructor(status, body, message) {
|
|
1779
1810
|
super(message);
|
|
@@ -1794,10 +1825,10 @@ function usePlans(options) {
|
|
|
1794
1825
|
throw new Error("usePlans: `projectKey` is required.");
|
|
1795
1826
|
}
|
|
1796
1827
|
const http = options.http ?? defaultHttpClient();
|
|
1797
|
-
const plans =
|
|
1798
|
-
const loading =
|
|
1799
|
-
const error =
|
|
1800
|
-
const tenantCountsByPlanKey =
|
|
1828
|
+
const plans = ref20([]);
|
|
1829
|
+
const loading = ref20(false);
|
|
1830
|
+
const error = ref20(null);
|
|
1831
|
+
const tenantCountsByPlanKey = ref20({});
|
|
1801
1832
|
const baseUrl = `${options.adminEndpoint}/catalog/plans`;
|
|
1802
1833
|
function authHeaders() {
|
|
1803
1834
|
const token = options.getAuthToken?.();
|
|
@@ -1898,9 +1929,9 @@ function usePlanVersions(options) {
|
|
|
1898
1929
|
throw new Error("usePlanVersions: `planId` is required.");
|
|
1899
1930
|
}
|
|
1900
1931
|
const http = options.http ?? defaultHttpClient();
|
|
1901
|
-
const versions =
|
|
1902
|
-
const loading =
|
|
1903
|
-
const error =
|
|
1932
|
+
const versions = ref20([]);
|
|
1933
|
+
const loading = ref20(false);
|
|
1934
|
+
const error = ref20(null);
|
|
1904
1935
|
const planVersionsUrl = `${options.adminEndpoint}/catalog/plans/${options.planId}/versions`;
|
|
1905
1936
|
const versionUrlBase = `${options.adminEndpoint}/catalog/plan-versions`;
|
|
1906
1937
|
function authHeaders() {
|
|
@@ -1997,7 +2028,7 @@ function usePlanVersions(options) {
|
|
|
1997
2028
|
}
|
|
1998
2029
|
|
|
1999
2030
|
// src/vue/use-live-plan-versions.ts
|
|
2000
|
-
import { ref as
|
|
2031
|
+
import { ref as ref21, watch as watch4 } from "vue";
|
|
2001
2032
|
function useLivePlanVersions(options) {
|
|
2002
2033
|
if (!options?.adminEndpoint) {
|
|
2003
2034
|
throw new Error("useLivePlanVersions: `adminEndpoint` is required.");
|
|
@@ -2006,9 +2037,9 @@ function useLivePlanVersions(options) {
|
|
|
2006
2037
|
throw new Error("useLivePlanVersions: `plans` is required.");
|
|
2007
2038
|
}
|
|
2008
2039
|
const http = options.http ?? defaultHttpClient();
|
|
2009
|
-
const livePlanVersions =
|
|
2010
|
-
const loading =
|
|
2011
|
-
const error =
|
|
2040
|
+
const livePlanVersions = ref21({});
|
|
2041
|
+
const loading = ref21(false);
|
|
2042
|
+
const error = ref21(null);
|
|
2012
2043
|
function authHeaders() {
|
|
2013
2044
|
const token = options.getAuthToken?.();
|
|
2014
2045
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
@@ -2050,7 +2081,7 @@ function useLivePlanVersions(options) {
|
|
|
2050
2081
|
loading.value = false;
|
|
2051
2082
|
}
|
|
2052
2083
|
}
|
|
2053
|
-
|
|
2084
|
+
watch4(
|
|
2054
2085
|
() => options.plans.value.map((p) => p.id).join(","),
|
|
2055
2086
|
() => {
|
|
2056
2087
|
if (options.plans.value.length > 0) void refresh();
|
|
@@ -2072,12 +2103,12 @@ function findLatestLive(versions) {
|
|
|
2072
2103
|
}
|
|
2073
2104
|
|
|
2074
2105
|
// src/vue/use-manifest.ts
|
|
2075
|
-
import { ref as
|
|
2106
|
+
import { ref as ref22 } from "vue";
|
|
2076
2107
|
function useManifest(options) {
|
|
2077
2108
|
const loader = new ManifestLoader(options);
|
|
2078
|
-
const manifest =
|
|
2079
|
-
const loading =
|
|
2080
|
-
const error =
|
|
2109
|
+
const manifest = ref22(null);
|
|
2110
|
+
const loading = ref22(false);
|
|
2111
|
+
const error = ref22(null);
|
|
2081
2112
|
async function load() {
|
|
2082
2113
|
loading.value = true;
|
|
2083
2114
|
error.value = null;
|
|
@@ -2103,24 +2134,24 @@ function useManifest(options) {
|
|
|
2103
2134
|
}
|
|
2104
2135
|
|
|
2105
2136
|
// src/vue/use-nav.ts
|
|
2106
|
-
import { computed as
|
|
2137
|
+
import { computed as computed6 } from "vue";
|
|
2107
2138
|
function useNav(manifest, options = {}) {
|
|
2108
2139
|
const { locale } = useSuperAdminI18n();
|
|
2109
|
-
const activeLocale =
|
|
2110
|
-
const routes =
|
|
2140
|
+
const activeLocale = computed6(() => options.locale ?? locale.value);
|
|
2141
|
+
const routes = computed6(() => {
|
|
2111
2142
|
if (!manifest.value) return [];
|
|
2112
2143
|
return buildRoutes(manifest.value, { ...options, locale: activeLocale.value });
|
|
2113
2144
|
});
|
|
2114
|
-
const sidebar =
|
|
2145
|
+
const sidebar = computed6(
|
|
2115
2146
|
() => buildSidebar(routes.value, defaultSectionOrder(activeLocale.value))
|
|
2116
2147
|
);
|
|
2117
2148
|
return { routes, sidebar };
|
|
2118
2149
|
}
|
|
2119
2150
|
|
|
2120
2151
|
// src/vue/use-actions.ts
|
|
2121
|
-
import { computed as
|
|
2152
|
+
import { computed as computed7 } from "vue";
|
|
2122
2153
|
function useActions(manifest, actions) {
|
|
2123
|
-
const registry =
|
|
2154
|
+
const registry = computed7(() => {
|
|
2124
2155
|
if (!manifest.value) return null;
|
|
2125
2156
|
return new ActionRegistry(manifest.value, actions);
|
|
2126
2157
|
});
|
|
@@ -2128,18 +2159,18 @@ function useActions(manifest, actions) {
|
|
|
2128
2159
|
}
|
|
2129
2160
|
|
|
2130
2161
|
// src/vue/use-tenant-action-flow.ts
|
|
2131
|
-
import { computed as
|
|
2162
|
+
import { computed as computed8 } from "vue";
|
|
2132
2163
|
function useTenantActionFlow(manifest, providers = {}) {
|
|
2133
2164
|
const handlers = useSuperAdminActions();
|
|
2134
2165
|
const msg = useSaMessages("tenants");
|
|
2135
|
-
const registry =
|
|
2166
|
+
const registry = computed8(() => {
|
|
2136
2167
|
if (!manifest.value) return null;
|
|
2137
2168
|
return new ActionRegistry(manifest.value, handlers);
|
|
2138
2169
|
});
|
|
2139
|
-
const orphanedDefs =
|
|
2170
|
+
const orphanedDefs = computed8(
|
|
2140
2171
|
() => registry.value ? registry.value.listOrphanedDefs() : []
|
|
2141
2172
|
);
|
|
2142
|
-
const availableActions =
|
|
2173
|
+
const availableActions = computed8(() => {
|
|
2143
2174
|
const m = manifest.value;
|
|
2144
2175
|
const reg = registry.value;
|
|
2145
2176
|
if (!m || !reg) return [];
|
|
@@ -2212,7 +2243,7 @@ async function runFlow(def, row, registry, providers, successTemplate) {
|
|
|
2212
2243
|
}
|
|
2213
2244
|
|
|
2214
2245
|
// src/vue/use-platform-tenant-actions.ts
|
|
2215
|
-
import { computed as
|
|
2246
|
+
import { computed as computed9, ref as ref23 } from "vue";
|
|
2216
2247
|
var DEFAULT_VISIBLE_FOR_ROW = (def, row) => {
|
|
2217
2248
|
if (def.actionKey === "tenants.suspend") return row.isActive;
|
|
2218
2249
|
if (def.actionKey === "tenants.reactivate") return !row.isActive;
|
|
@@ -2248,7 +2279,7 @@ function usePlatformTenantActions(options) {
|
|
|
2248
2279
|
const iconForActionKey = options.iconForActionKey ?? DEFAULT_ICON_FOR_ACTION_KEY;
|
|
2249
2280
|
const toneForActionKey = options.toneForActionKey ?? DEFAULT_TONE_FOR_ACTION_KEY;
|
|
2250
2281
|
const visibleForRow = options.visibleForRow ?? DEFAULT_VISIBLE_FOR_ROW;
|
|
2251
|
-
const mfa =
|
|
2282
|
+
const mfa = ref23({ show: false, description: "", error: "" });
|
|
2252
2283
|
let pendingMfaResolve = null;
|
|
2253
2284
|
function showMfaDialog(def, ctx) {
|
|
2254
2285
|
return new Promise((resolve) => {
|
|
@@ -2273,7 +2304,7 @@ function usePlatformTenantActions(options) {
|
|
|
2273
2304
|
pendingMfaResolve(null);
|
|
2274
2305
|
}
|
|
2275
2306
|
}
|
|
2276
|
-
const confirmDialog =
|
|
2307
|
+
const confirmDialog = ref23({
|
|
2277
2308
|
show: false,
|
|
2278
2309
|
def: null,
|
|
2279
2310
|
row: null
|
|
@@ -2315,7 +2346,7 @@ function usePlatformTenantActions(options) {
|
|
|
2315
2346
|
},
|
|
2316
2347
|
visibleForRow
|
|
2317
2348
|
});
|
|
2318
|
-
const manifestActions =
|
|
2349
|
+
const manifestActions = computed9(
|
|
2319
2350
|
() => flow.availableActions.value.map((def) => ({
|
|
2320
2351
|
id: def.id,
|
|
2321
2352
|
label: def.label,
|
|
@@ -2329,7 +2360,7 @@ function usePlatformTenantActions(options) {
|
|
|
2329
2360
|
}
|
|
2330
2361
|
}))
|
|
2331
2362
|
);
|
|
2332
|
-
const realOrphans =
|
|
2363
|
+
const realOrphans = computed9(() => {
|
|
2333
2364
|
const caps = options.manifest.value?.capabilities ?? {};
|
|
2334
2365
|
const defs = options.manifest.value?.tenants?.actions ?? [];
|
|
2335
2366
|
const defByActionKey = new Map(defs.map((d) => [d.actionKey, d]));
|
|
@@ -2354,12 +2385,12 @@ function usePlatformTenantActions(options) {
|
|
|
2354
2385
|
}
|
|
2355
2386
|
|
|
2356
2387
|
// src/vue/use-batch-columns.ts
|
|
2357
|
-
import { ref as
|
|
2388
|
+
import { ref as ref24, watch as watch5 } from "vue";
|
|
2358
2389
|
function useBatchColumns(manifest, tenantIds, options = {}) {
|
|
2359
2390
|
const fetcher = new BatchColumnFetcher(options);
|
|
2360
|
-
const data =
|
|
2361
|
-
const loading =
|
|
2362
|
-
const error =
|
|
2391
|
+
const data = ref24({});
|
|
2392
|
+
const loading = ref24(false);
|
|
2393
|
+
const error = ref24(null);
|
|
2363
2394
|
async function load() {
|
|
2364
2395
|
if (!manifest.value || tenantIds.value.length === 0) {
|
|
2365
2396
|
data.value = {};
|
|
@@ -2376,7 +2407,7 @@ function useBatchColumns(manifest, tenantIds, options = {}) {
|
|
|
2376
2407
|
loading.value = false;
|
|
2377
2408
|
}
|
|
2378
2409
|
}
|
|
2379
|
-
|
|
2410
|
+
watch5([manifest, tenantIds], () => {
|
|
2380
2411
|
void load();
|
|
2381
2412
|
});
|
|
2382
2413
|
return { data, loading, error, reload: load };
|
|
@@ -2408,13 +2439,13 @@ function createPlatformLoaders(options) {
|
|
|
2408
2439
|
|
|
2409
2440
|
// src/vue/manifest-store-factory.ts
|
|
2410
2441
|
import { defineStore } from "pinia";
|
|
2411
|
-
import { ref as
|
|
2442
|
+
import { ref as ref25 } from "vue";
|
|
2412
2443
|
function createManifestStore(options) {
|
|
2413
2444
|
return defineStore(options.id ?? "admin-manifest", () => {
|
|
2414
|
-
const manifest =
|
|
2415
|
-
const loading =
|
|
2416
|
-
const error =
|
|
2417
|
-
const loaded =
|
|
2445
|
+
const manifest = ref25(null);
|
|
2446
|
+
const loading = ref25(false);
|
|
2447
|
+
const error = ref25(null);
|
|
2448
|
+
const loaded = ref25(false);
|
|
2418
2449
|
let inflight = null;
|
|
2419
2450
|
async function load() {
|
|
2420
2451
|
loading.value = true;
|
|
@@ -2794,6 +2825,7 @@ function defaultTenantPlanSectionI18n(locale) {
|
|
|
2794
2825
|
}
|
|
2795
2826
|
export {
|
|
2796
2827
|
ADMIN_UI_VERSION,
|
|
2828
|
+
ALL_ROWS,
|
|
2797
2829
|
ActionDefNotInManifestError,
|
|
2798
2830
|
ActionRegistry,
|
|
2799
2831
|
BatchColumnDriftError,
|
|
@@ -2805,6 +2837,7 @@ export {
|
|
|
2805
2837
|
CatalogEntriesApiError,
|
|
2806
2838
|
DEFAULT_I18N_DE,
|
|
2807
2839
|
DEFAULT_I18N_EN,
|
|
2840
|
+
DEFAULT_ROWS_PER_PAGE,
|
|
2808
2841
|
DEFAULT_SA_LOCALE,
|
|
2809
2842
|
DEFAULT_STANDARD_PAGE_ROUTES,
|
|
2810
2843
|
DEFAULT_YEARLY_FACTOR,
|
|
@@ -2815,6 +2848,7 @@ export {
|
|
|
2815
2848
|
ManifestLoader,
|
|
2816
2849
|
MarketingProjectionsApiError,
|
|
2817
2850
|
MissingHandlerError,
|
|
2851
|
+
PAGE_SIZE_OPTIONS,
|
|
2818
2852
|
PlannedOnlyFeatureError,
|
|
2819
2853
|
PlansApiError,
|
|
2820
2854
|
ProjectPageHost,
|
|
@@ -2824,6 +2858,7 @@ export {
|
|
|
2824
2858
|
SA_LOCALE_LABELS,
|
|
2825
2859
|
SA_LOCALE_STORAGE_KEY,
|
|
2826
2860
|
SA_MESSAGES,
|
|
2861
|
+
SERVER_PAGE_SIZE_OPTIONS,
|
|
2827
2862
|
SUPER_ADMIN_ACTIONS_KEY,
|
|
2828
2863
|
SUPER_ADMIN_BRAND_KEY,
|
|
2829
2864
|
SUPER_ADMIN_ENDPOINTS_KEY,
|
|
@@ -2831,6 +2866,7 @@ export {
|
|
|
2831
2866
|
SUPER_ADMIN_HTTP_KEY,
|
|
2832
2867
|
SUPER_ADMIN_I18N_KEY,
|
|
2833
2868
|
SUPER_ADMIN_LOGIN_ADAPTER_KEY,
|
|
2869
|
+
SUPER_ADMIN_MANIFEST_CLEAR_CACHE_KEY,
|
|
2834
2870
|
SUPER_ADMIN_MANIFEST_KEY,
|
|
2835
2871
|
SUPER_ADMIN_NOTIFY_KEY,
|
|
2836
2872
|
TenantSubscriptionBundlesApiError,
|
|
@@ -2840,6 +2876,7 @@ export {
|
|
|
2840
2876
|
buildQuotaRegistry,
|
|
2841
2877
|
buildRoutes,
|
|
2842
2878
|
buildSidebar,
|
|
2879
|
+
countPlans,
|
|
2843
2880
|
createAdminResourceClient,
|
|
2844
2881
|
createAdminRoutes,
|
|
2845
2882
|
createManifestStore,
|
|
@@ -2857,6 +2894,9 @@ export {
|
|
|
2857
2894
|
formatCurrency,
|
|
2858
2895
|
formatMessage,
|
|
2859
2896
|
getJson,
|
|
2897
|
+
isCurrentlyValid,
|
|
2898
|
+
isExpired,
|
|
2899
|
+
isFutureScheduled,
|
|
2860
2900
|
isProductionBoot,
|
|
2861
2901
|
isSaBuiltinLocale,
|
|
2862
2902
|
mergeMessages,
|
|
@@ -2865,6 +2905,8 @@ export {
|
|
|
2865
2905
|
resolveExtension,
|
|
2866
2906
|
resolveLoginBranding,
|
|
2867
2907
|
resolveMessages,
|
|
2908
|
+
resolvePlans,
|
|
2909
|
+
todayIsoDate,
|
|
2868
2910
|
trimTrailingSlashes,
|
|
2869
2911
|
useActions,
|
|
2870
2912
|
useApiList,
|
|
@@ -2882,6 +2924,7 @@ export {
|
|
|
2882
2924
|
useManifest,
|
|
2883
2925
|
useMarketingProjections,
|
|
2884
2926
|
useNav,
|
|
2927
|
+
usePagination,
|
|
2885
2928
|
usePlanEditor,
|
|
2886
2929
|
usePlanVersions,
|
|
2887
2930
|
usePlans,
|