@tokenoftrust/storefront-runner 2.0.2 → 2.0.4
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/apps/storefront/.astro/content.d.ts +159 -0
- package/apps/storefront/.astro/integrations/_astrojs_cloudflare/cloudflare.d.ts +1 -0
- package/apps/storefront/.astro/types.d.ts +3 -0
- package/apps/storefront/node_modules/.bin/acorn +43 -0
- package/apps/storefront/node_modules/.bin/astro +43 -0
- package/apps/storefront/node_modules/.bin/astro-check +43 -0
- package/apps/storefront/node_modules/.bin/browserslist +43 -0
- package/apps/storefront/node_modules/.bin/cf-wrangler +43 -0
- package/apps/storefront/node_modules/.bin/depcruise +43 -0
- package/apps/storefront/node_modules/.bin/depcruise-baseline +43 -0
- package/apps/storefront/node_modules/.bin/depcruise-fmt +43 -0
- package/apps/storefront/node_modules/.bin/depcruise-wrap-stream-in-html +43 -0
- package/apps/storefront/node_modules/.bin/dependency-cruise +43 -0
- package/apps/storefront/node_modules/.bin/dependency-cruiser +43 -0
- package/apps/storefront/node_modules/.bin/drizzle-kit +43 -0
- package/apps/storefront/node_modules/.bin/esbuild +43 -0
- package/apps/storefront/node_modules/.bin/jiti +43 -0
- package/apps/storefront/node_modules/.bin/playwright +43 -0
- package/apps/storefront/node_modules/.bin/playwright-core +43 -0
- package/apps/storefront/node_modules/.bin/prettier +43 -0
- package/apps/storefront/node_modules/.bin/rollup +43 -0
- package/apps/storefront/node_modules/.bin/tsc +43 -0
- package/apps/storefront/node_modules/.bin/tsserver +43 -0
- package/apps/storefront/node_modules/.bin/tsx +43 -0
- package/apps/storefront/node_modules/.bin/vite +43 -0
- package/apps/storefront/node_modules/.bin/vitest +43 -0
- package/apps/storefront/node_modules/.bin/workerd +43 -0
- package/apps/storefront/node_modules/.bin/wrangler +43 -0
- package/apps/storefront/node_modules/.bin/wrangler2 +43 -0
- package/apps/storefront/node_modules/.bin/yaml +43 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_client__js.js +58 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_client__js.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_n_@preact_signals.js +741 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_n_@preact_signals.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_server__js.js +2549 -0
- package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_server__js.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/_metadata.json +150 -0
- package/apps/storefront/node_modules/.vite/deps/astro-BIHuWFxm.js +434 -0
- package/apps/storefront/node_modules/.vite/deps/astro-BIHuWFxm.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_aria-query.js +6390 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_aria-query.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_axobject-query.js +2705 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_axobject-query.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_html-escaper.js +65 -0
- package/apps/storefront/node_modules/.vite/deps/astro_n_html-escaper.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js +455 -0
- package/apps/storefront/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/audit-DKDpcdEI.js +1535 -0
- package/apps/storefront/node_modules/.vite/deps/audit-DKDpcdEI.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/highlight-B9UoX1wa.js +48 -0
- package/apps/storefront/node_modules/.vite/deps/highlight-B9UoX1wa.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/icons-BWi2wI9n.js +42 -0
- package/apps/storefront/node_modules/.vite/deps/icons-BWi2wI9n.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/package.json +3 -0
- package/apps/storefront/node_modules/.vite/deps/preact.js +310 -0
- package/apps/storefront/node_modules/.vite/deps/preact.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_compat.js +420 -0
- package/apps/storefront/node_modules/.vite/deps/preact_compat.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_compat_jsx-runtime.js +4 -0
- package/apps/storefront/node_modules/.vite/deps/preact_debug.js +236 -0
- package/apps/storefront/node_modules/.vite/deps/preact_debug.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_devtools.js +12 -0
- package/apps/storefront/node_modules/.vite/deps/preact_devtools.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_hooks.js +192 -0
- package/apps/storefront/node_modules/.vite/deps/preact_hooks.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_jsx-dev-runtime.js +3 -0
- package/apps/storefront/node_modules/.vite/deps/preact_jsx-runtime.js +92 -0
- package/apps/storefront/node_modules/.vite/deps/preact_jsx-runtime.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/preact_test-utils.js +59 -0
- package/apps/storefront/node_modules/.vite/deps/preact_test-utils.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/rolldown-runtime-BPOCksWG.js +24 -0
- package/apps/storefront/node_modules/.vite/deps/settings-BVDV0Roj.js +189 -0
- package/apps/storefront/node_modules/.vite/deps/settings-BVDV0Roj.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/static-html-DveYqwMo.js +13 -0
- package/apps/storefront/node_modules/.vite/deps/static-html-DveYqwMo.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/toolbar-B3VIHCXg.js +458 -0
- package/apps/storefront/node_modules/.vite/deps/toolbar-B3VIHCXg.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/ui-library-BK6ricUd.js +1016 -0
- package/apps/storefront/node_modules/.vite/deps/ui-library-BK6ricUd.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/window-BvxDenKN.js +32 -0
- package/apps/storefront/node_modules/.vite/deps/window-BvxDenKN.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps/xray-YFiRUU0Z.js +113 -0
- package/apps/storefront/node_modules/.vite/deps/xray-YFiRUU0Z.js.map +1 -0
- package/apps/storefront/node_modules/.vite/deps_ssr/_metadata.json +8 -0
- package/apps/storefront/node_modules/.vite/deps_ssr/package.json +3 -0
- package/apps/storefront/src/layouts/Layout.astro +1 -1
- package/apps/storefront/src/lib/apps/registryAccess.ts +45 -0
- package/apps/storefront/src/lib/auth/adminEntry.ts +4 -4
- package/apps/storefront/src/lib/shared/capability.ts +68 -0
- package/apps/storefront/src/lib/shared/developerInvites.ts +1250 -0
- package/apps/storefront/src/lib/shared/invitePreflight.ts +123 -0
- package/apps/storefront/src/lib/webhooks/deliveryEngine.ts +38 -4
- package/apps/storefront/src/lib/webhooks/emit.ts +1 -1
- package/apps/storefront/src/lib/webhooks/getDispatcher.ts +1 -1
- package/apps/storefront/src/pages/api/auth/magic-exchange.ts +1 -1
- package/apps/storefront/src/pages/index.astro +1 -1
- package/apps/storefront/src/pages/products/[handle].astro +1 -1
- package/package.json +1 -1
- package/packages/public-runtime/node_modules/.bin/tsc +43 -0
- package/packages/public-runtime/node_modules/.bin/tsserver +43 -0
- package/packages/public-runtime/node_modules/.bin/vitest +43 -0
- package/pnpm-workspace.yaml +3 -0
- package/scripts/lib/tenant-dirs.mjs +80 -0
- package/scripts/tenant/lint-embeds.mjs +180 -0
- package/scripts/tenant/materialize-tenant-content.mjs +533 -0
- package/scripts/tenant/validate.mjs +837 -0
- package/apps/storefront/scripts/build-v84-clean-clone-standalone.mjs +0 -68
- package/apps/storefront/scripts/deny-v84-clean-clone-standalone-capabilities.mjs +0 -111
- package/apps/storefront/scripts/deny-v84-dogfood-capabilities.mjs +0 -2
- package/apps/storefront/scripts/deny-v84-lifecycle-capabilities.mjs +0 -247
- package/apps/storefront/scripts/dogfood-v84-nonportable-routes.ts +0 -73
- package/apps/storefront/scripts/fixed-v84-native-install-producer.ts +0 -79
- package/apps/storefront/scripts/generated/v84-clean-clone-replay.bundle.mjs +0 -10982
- package/apps/storefront/scripts/import-v84-through-ws2.ts +0 -38
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling-dependency.ts +0 -2
- package/apps/storefront/scripts/initialize-v84-lifecycle-tooling.ts +0 -4
- package/apps/storefront/scripts/install-v84-native-through-ws1.ts +0 -185
- package/apps/storefront/scripts/prove-clone-isolation.ts +0 -506
- package/apps/storefront/scripts/replay-v84-clean-clone-pass.ts +0 -148
- package/apps/storefront/scripts/replay-v84-clean-clone-standalone.ts +0 -35
- package/apps/storefront/scripts/replay-v84-clean-clone.ts +0 -214
- package/apps/storefront/scripts/run-fixed-v84-native-install-producer.mjs +0 -18
- package/apps/storefront/scripts/run-v84-clone-isolation-proof.mjs +0 -18
- package/apps/storefront/scripts/run-v84-clone-lifecycle-proof.mjs +0 -18
- package/apps/storefront/scripts/run-v84-import-through-ws2-proof.mjs +0 -17
- package/apps/storefront/scripts/run-v84-nonportable-route-dogfood.mjs +0 -15
- package/apps/storefront/scripts/sanitize-v84-proof-environment.mjs +0 -21
- package/apps/storefront/scripts/v84CleanCloneGraphPin.ts +0 -42
- package/apps/storefront/scripts/v84CleanCloneSourceGraph.ts +0 -145
- package/apps/storefront/scripts/validate-v84-clone-lifecycle.ts +0 -18
- package/apps/storefront/src/components/admin/AdminAIWorkflowsTab.astro +0 -531
- package/apps/storefront/src/components/admin/AdminBlogDetailRail.astro +0 -878
- package/apps/storefront/src/components/admin/AdminBlogTab.astro +0 -1435
- package/apps/storefront/src/components/admin/AdminCheckoutSettingsPanel.astro +0 -226
- package/apps/storefront/src/components/admin/AdminCustomersTab.astro +0 -593
- package/apps/storefront/src/components/admin/AdminFulfillmentTab.astro +0 -465
- package/apps/storefront/src/components/admin/AdminIntegrationsTab.astro +0 -105
- package/apps/storefront/src/components/admin/AdminProductsTab.astro +0 -901
- package/apps/storefront/src/components/admin/AdminPublishTab.astro +0 -2983
- package/apps/storefront/src/components/admin/AdminReportingTab.astro +0 -435
- package/apps/storefront/src/components/admin/AdminSettingsTab.astro +0 -782
- package/apps/storefront/src/components/admin/AdminSubscriptionsTab.astro +0 -611
- package/apps/storefront/src/components/admin/orders/OrdersWorkspace.astro +0 -1223
- package/apps/storefront/src/lib/apps/adminService.ts +0 -116
- package/apps/storefront/src/lib/apps/adminSession.ts +0 -214
- package/apps/storefront/src/lib/apps/apiAuth.ts +0 -91
- package/apps/storefront/src/lib/apps/apiRoute.ts +0 -35
- package/apps/storefront/src/lib/apps/catalogMapper.ts +0 -39
- package/apps/storefront/src/lib/apps/consentConfigStore.ts +0 -228
- package/apps/storefront/src/lib/apps/gtmMigrationInstall.ts +0 -447
- package/apps/storefront/src/lib/apps/gtmMigrationReport.ts +0 -367
- package/apps/storefront/src/lib/apps/gtmMigrationTab.ts +0 -315
- package/apps/storefront/src/lib/apps/healthAggregate.ts +0 -66
- package/apps/storefront/src/lib/apps/integrationLifecycle.ts +0 -614
- package/apps/storefront/src/lib/apps/integrationLifecycleController.ts +0 -125
- package/apps/storefront/src/lib/apps/integrationReadModel.ts +0 -563
- package/apps/storefront/src/lib/apps/integrationsTab.ts +0 -547
- package/apps/storefront/src/lib/apps/integrationsView.ts +0 -106
- package/apps/storefront/src/lib/apps/managedAnalyticsService.ts +0 -599
- package/apps/storefront/src/lib/apps/tenantIntegrationMaterialization.ts +0 -170
- package/apps/storefront/src/lib/apps/tokenIssuer.ts +0 -121
- package/apps/storefront/src/lib/apps/tokenVerifier.ts +0 -148
- package/apps/storefront/src/lib/apps/v84CleanCloneReplayContext.ts +0 -16
- package/apps/storefront/src/lib/apps/v84CloneLifecycleCacheEvidence.ts +0 -105
- package/apps/storefront/src/lib/apps/v84CloneLifecycleEvidence.ts +0 -177
- package/apps/storefront/src/lib/apps/v84CloneLifecycleMaterialization.ts +0 -251
- package/apps/storefront/src/lib/apps/v84CloneLifecycleSemantics.ts +0 -241
- package/apps/storefront/src/lib/apps/v84CloneMigrationEvidence.ts +0 -211
- package/apps/storefront/src/lib/apps/v84CloneNativeInstallEvidence.ts +0 -409
- package/apps/storefront/src/lib/apps/v84NonportableCodeCoaching.ts +0 -368
- package/apps/storefront/src/lib/apps/v84NonportableRouteContract.ts +0 -188
- package/apps/storefront/src/lib/apps/v84NonportableRouteDogfood.ts +0 -291
- package/apps/storefront/src/lib/apps/ws1ManagedAnalyticsClient.ts +0 -95
- package/apps/storefront/src/lib/content-edit/applyDiff.ts +0 -91
- package/apps/storefront/src/lib/content-edit/client.ts +0 -286
- package/apps/storefront/src/lib/content-edit/index.ts +0 -14
- package/apps/storefront/src/lib/content-edit/route.ts +0 -25
- package/apps/storefront/src/lib/content-edit/types.ts +0 -19
- package/apps/storefront/src/lib/dev/cockpitStore.ts +0 -57
- package/apps/storefront/src/lib/publish/adminPublishTab.ts +0 -4625
- package/apps/storefront/src/lib/publish/apex-readiness.ts +0 -360
- package/apps/storefront/src/lib/publish/buildStream.ts +0 -269
- package/apps/storefront/src/lib/publish/collapsePersistence.ts +0 -72
- package/apps/storefront/src/lib/publish/dispatchHealth.ts +0 -267
- package/apps/storefront/src/lib/publish/domainState.ts +0 -360
- package/apps/storefront/src/lib/publish/lifecycleState.ts +0 -369
- package/apps/storefront/src/lib/publish/liveReleaseSummary.ts +0 -29
- package/apps/storefront/src/lib/publish/mergeDoctorOnFailure.ts +0 -78
- package/apps/storefront/src/lib/publish/mergeHealthBanner.ts +0 -62
- package/apps/storefront/src/lib/publish/mergeRowFindings.ts +0 -124
- package/apps/storefront/src/lib/publish/mergeSupportEscalation.ts +0 -75
- package/apps/storefront/src/lib/publish/panelPolling.ts +0 -78
- package/apps/storefront/src/lib/publish/publish-guard.ts +0 -88
- package/apps/storefront/src/lib/publish/publishFormat.ts +0 -165
- package/apps/storefront/src/lib/publish/publishHero.ts +0 -177
- package/apps/storefront/src/lib/publish/reviewRelease/changeState.ts +0 -66
- package/apps/storefront/src/lib/publish/reviewRelease/copy.ts +0 -141
- package/apps/storefront/src/lib/publish/reviewRelease/index.ts +0 -41
- package/apps/storefront/src/lib/publish/reviewRelease/permissions.ts +0 -47
- package/apps/storefront/src/lib/publish/reviewRelease/releaseState.ts +0 -42
- package/apps/storefront/src/lib/publish/reviewRelease/types.ts +0 -59
- package/apps/storefront/src/lib/publish/reviewRelease/viewModel.ts +0 -440
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/actions.ts +0 -161
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/controller.ts +0 -325
- package/apps/storefront/src/lib/publish/reviewReleaseWorkspace/render.ts +0 -241
- package/apps/storefront/src/lib/publish/shipWorkspace.ts +0 -439
- package/apps/storefront/src/lib/publish/sseRoute.ts +0 -119
- package/apps/storefront/src/lib/publish/stageBundleUpload.ts +0 -215
- package/apps/storefront/src/lib/publish/streamLogConsole.ts +0 -142
- package/apps/storefront/src/lib/publish/versionNumber.ts +0 -52
- package/apps/storefront/src/pages/admin/ops-timeline.astro +0 -420
- package/apps/storefront/src/pages/admin/review-release.astro +0 -265
- package/apps/storefront/src/pages/admin/select.astro +0 -96
- package/apps/storefront/src/pages/admin.astro +0 -570
- package/apps/storefront/src/pages/api/apps/admin/credentials/rotate.ts +0 -86
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration-install.ts +0 -174
- package/apps/storefront/src/pages/api/apps/admin/gtm-migration.ts +0 -96
- package/apps/storefront/src/pages/api/apps/admin/health.ts +0 -44
- package/apps/storefront/src/pages/api/apps/admin/install.ts +0 -125
- package/apps/storefront/src/pages/api/apps/admin/integration-lifecycle.ts +0 -118
- package/apps/storefront/src/pages/api/apps/admin/integrations.ts +0 -89
- package/apps/storefront/src/pages/api/apps/admin/list.ts +0 -26
- package/apps/storefront/src/pages/api/apps/admin/platform-adapters.ts +0 -85
- package/apps/storefront/src/pages/api/apps/admin/resume.ts +0 -79
- package/apps/storefront/src/pages/api/apps/admin/suspend.ts +0 -80
- package/apps/storefront/src/pages/api/apps/admin/uninstall.ts +0 -98
- package/apps/storefront/src/pages/api/apps/admin/update.ts +0 -126
- package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries/[deliveryId]/replay.ts +0 -70
- package/apps/storefront/src/pages/api/apps/admin/webhooks/deliveries.ts +0 -51
- package/apps/storefront/src/pages/api/apps/internal/order-forward.ts +0 -255
- package/apps/storefront/src/pages/api/apps/oauth/token.ts +0 -87
- package/apps/storefront/src/pages/api/apps/v1/attribution.ts +0 -162
- package/apps/storefront/src/pages/api/apps/v1/catalog/products/[handle].ts +0 -39
- package/apps/storefront/src/pages/api/apps/v1/catalog/products.ts +0 -49
- package/apps/storefront/src/pages/api/apps/v1/health.ts +0 -32
- package/apps/storefront/src/pages/api/apps/v1/inventory.ts +0 -59
- package/apps/storefront/src/pages/api/apps/v1/orders/[id].ts +0 -48
- package/apps/storefront/src/pages/api/apps/v1/orders.ts +0 -73
- package/apps/storefront/src/pages/api/apps/v1/reports.ts +0 -21
- package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries/[deliveryId]/replay.ts +0 -74
- package/apps/storefront/src/pages/api/apps/v1/webhooks/deliveries.ts +0 -47
- package/apps/storefront/src/pages/api/cache-purge.ts +0 -55
- package/apps/storefront/src/pages/api/compliance/tamper.ts +0 -88
- package/apps/storefront/src/pages/api/content-edit/ai-edit.ts +0 -164
- package/apps/storefront/src/pages/api/dashboard/enter-vendor.ts +0 -154
- package/apps/storefront/src/pages/api/dashboard/vendor-search.ts +0 -120
- package/apps/storefront/src/pages/api/integrations/v1/[operation].ts +0 -108
- package/apps/storefront/src/pages/api/publish/stage-bundle.ts +0 -70
- package/apps/storefront/src/pages/api/test/dev-session.ts +0 -133
- package/apps/storefront/src/pages/cockpit.astro +0 -1548
- package/apps/storefront/src/pages/dashboard/[appDomain]/apps/index.astro +0 -119
- package/apps/storefront/src/pages/dashboard/[appDomain]/index.astro +0 -105
- package/apps/storefront/src/pages/dashboard/[appDomain]/team.astro +0 -177
- package/apps/storefront/src/pages/dashboard/index.astro +0 -160
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
/**
|
|
3
|
-
* <AdminCheckoutSettingsPanel> — the "Cart & Checkout appearance" settings
|
|
4
|
-
* section. Mirrors the managed checkout settings surface (brand colors,
|
|
5
|
-
* per-template URLs, store/feature config); each visual field is
|
|
6
|
-
* prepopulated from the tenant's theme (the style-guide) and can be overridden
|
|
7
|
-
* or reset back to that theme default.
|
|
8
|
-
*
|
|
9
|
-
* Presentational at the current admin altitude: the resolve/override/reset MODEL
|
|
10
|
-
* is real (lib/commerce/checkoutSettings), but SAVE is the commerce-service
|
|
11
|
-
* theme PUT/refresh seam — surfaced, not faked.
|
|
12
|
-
*/
|
|
13
|
-
import { getCheckoutSettingsViewModel } from "@/lib/admin/services/mock";
|
|
14
|
-
import { resolveAdminTargetTenant } from "@/config/adminTargetTenant";
|
|
15
|
-
import type { CheckoutFieldGroup, CheckoutSettingsField } from "@/lib/commerce/checkoutSettings";
|
|
16
|
-
|
|
17
|
-
const { envelope } = Astro.props;
|
|
18
|
-
// Resolve the TARGET tenant's config through the resolver seam (config layer),
|
|
19
|
-
// then build the view model from it — lib never reaches into the static map.
|
|
20
|
-
const targetTenant = await resolveAdminTargetTenant(envelope.targetTenant);
|
|
21
|
-
const vm = getCheckoutSettingsViewModel(envelope, targetTenant);
|
|
22
|
-
|
|
23
|
-
const GROUP_META: Record<CheckoutFieldGroup, { title: string; blurb: string }> = {
|
|
24
|
-
colors: {
|
|
25
|
-
title: "Brand colors",
|
|
26
|
-
blurb: "Hosted checkout colors, prepopulated from this tenant's theme tokens.",
|
|
27
|
-
},
|
|
28
|
-
templates: {
|
|
29
|
-
title: "Templates",
|
|
30
|
-
blurb: "Per-surface hosted template URLs (checkout, cart, cart drawer, receipt, email).",
|
|
31
|
-
},
|
|
32
|
-
store: {
|
|
33
|
-
title: "Store & features",
|
|
34
|
-
blurb: "Store identity and checkout feature toggles. No theme default.",
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
const GROUP_ORDER: CheckoutFieldGroup[] = ["colors", "templates", "store"];
|
|
38
|
-
const byGroup = (g: CheckoutFieldGroup) => vm.fields.filter((f) => f.group === g);
|
|
39
|
-
|
|
40
|
-
const isColor = (f: CheckoutSettingsField) => f.kind === "color";
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
<div class="panel" id="settings-cart-appearance">
|
|
44
|
-
<div class="panel-head settings-panel-head">
|
|
45
|
-
<h3><svg><use href="#i-gear"></use></svg>Cart & Checkout Appearance</h3>
|
|
46
|
-
<span class="chip blue">Managed checkout</span>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
{!vm.hasStore ? (
|
|
50
|
-
<div class="panel-body">
|
|
51
|
-
<p class="note">This tenant has no hosted checkout store configured, so there is nothing to theme here.</p>
|
|
52
|
-
</div>
|
|
53
|
-
) : (
|
|
54
|
-
<div class="panel-body grid">
|
|
55
|
-
<div class="checkout-head">
|
|
56
|
-
<p class="note">
|
|
57
|
-
Values are <b>prepopulated from the theme</b> (the style guide). Override any field, or
|
|
58
|
-
reset it back to the theme default. {vm.overrideCount > 0 ? `${vm.overrideCount} field(s) currently overridden.` : "No overrides yet."}
|
|
59
|
-
</p>
|
|
60
|
-
<button class="btn" type="button" disabled={vm.overrideCount === 0}>
|
|
61
|
-
<svg><use href="#i-refresh"></use></svg>Reset all to theme
|
|
62
|
-
</button>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
{GROUP_ORDER.map((g) => (
|
|
66
|
-
<section class="checkout-group">
|
|
67
|
-
<div class="checkout-group-head">
|
|
68
|
-
<h4>{GROUP_META[g].title}</h4>
|
|
69
|
-
<p>{GROUP_META[g].blurb}</p>
|
|
70
|
-
</div>
|
|
71
|
-
<div class="checkout-fields">
|
|
72
|
-
{byGroup(g).map((f) => (
|
|
73
|
-
<div class="checkout-field">
|
|
74
|
-
<div class="checkout-field-label">
|
|
75
|
-
<label>{f.label}</label>
|
|
76
|
-
<span class:list={["chip", f.source === "override" ? "amber" : "green"]}>
|
|
77
|
-
{f.source === "override" ? "Overridden" : "Theme default"}
|
|
78
|
-
</span>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
<div class="checkout-field-control">
|
|
82
|
-
{isColor(f) ? (
|
|
83
|
-
<span class="checkout-swatch" style={`background:${f.value}`} aria-hidden="true"></span>
|
|
84
|
-
) : null}
|
|
85
|
-
|
|
86
|
-
{f.kind === "boolean" ? (
|
|
87
|
-
<span class:list={["chip", f.value ? "teal" : ""]}>{f.value ? "On" : "Off"}</span>
|
|
88
|
-
) : f.kind === "select" ? (
|
|
89
|
-
<select disabled>
|
|
90
|
-
{(f.options ?? []).map((o) => (
|
|
91
|
-
<option selected={o === f.value}>{o}</option>
|
|
92
|
-
))}
|
|
93
|
-
</select>
|
|
94
|
-
) : (
|
|
95
|
-
<input
|
|
96
|
-
type="text"
|
|
97
|
-
value={String(f.value)}
|
|
98
|
-
readonly
|
|
99
|
-
class:list={["checkout-input", { url: f.kind === "url" }]}
|
|
100
|
-
/>
|
|
101
|
-
)}
|
|
102
|
-
|
|
103
|
-
{f.resettable && f.source === "override" ? (
|
|
104
|
-
<button class="btn ghost checkout-reset" type="button" title={`Reset to theme default: ${f.default}`}>
|
|
105
|
-
Reset
|
|
106
|
-
</button>
|
|
107
|
-
) : f.resettable ? (
|
|
108
|
-
<span class="checkout-default-hint">= theme</span>
|
|
109
|
-
) : (
|
|
110
|
-
<span class="checkout-default-hint">no theme default</span>
|
|
111
|
-
)}
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
{f.help ? <p class="checkout-help">{f.help}</p> : null}
|
|
115
|
-
</div>
|
|
116
|
-
))}
|
|
117
|
-
</div>
|
|
118
|
-
</section>
|
|
119
|
-
))}
|
|
120
|
-
|
|
121
|
-
<p class="note checkout-seam">
|
|
122
|
-
<svg><use href="#i-alert"></use></svg>
|
|
123
|
-
Saving updates the managed checkout theme through the commerce service. That API hop is
|
|
124
|
-
not wired in this build.
|
|
125
|
-
</p>
|
|
126
|
-
</div>
|
|
127
|
-
)}
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
<style>
|
|
131
|
-
.checkout-head {
|
|
132
|
-
display: flex;
|
|
133
|
-
gap: 12px;
|
|
134
|
-
align-items: center;
|
|
135
|
-
justify-content: space-between;
|
|
136
|
-
flex-wrap: wrap;
|
|
137
|
-
}
|
|
138
|
-
.checkout-group {
|
|
139
|
-
border-top: 1px solid var(--admin-line);
|
|
140
|
-
padding-top: 14px;
|
|
141
|
-
margin-top: 4px;
|
|
142
|
-
}
|
|
143
|
-
.checkout-group-head h4 {
|
|
144
|
-
margin: 0;
|
|
145
|
-
font-size: 13px;
|
|
146
|
-
}
|
|
147
|
-
.checkout-group-head p {
|
|
148
|
-
margin: 2px 0 12px;
|
|
149
|
-
color: var(--admin-muted);
|
|
150
|
-
font-size: 12px;
|
|
151
|
-
}
|
|
152
|
-
.checkout-fields {
|
|
153
|
-
display: grid;
|
|
154
|
-
gap: 14px;
|
|
155
|
-
}
|
|
156
|
-
.checkout-field {
|
|
157
|
-
display: grid;
|
|
158
|
-
gap: 6px;
|
|
159
|
-
padding-bottom: 12px;
|
|
160
|
-
border-bottom: 1px solid var(--admin-line);
|
|
161
|
-
}
|
|
162
|
-
.checkout-field:last-child {
|
|
163
|
-
border-bottom: 0;
|
|
164
|
-
padding-bottom: 0;
|
|
165
|
-
}
|
|
166
|
-
.checkout-field-label {
|
|
167
|
-
display: flex;
|
|
168
|
-
align-items: center;
|
|
169
|
-
gap: 10px;
|
|
170
|
-
}
|
|
171
|
-
.checkout-field-label label {
|
|
172
|
-
font-size: 13px;
|
|
173
|
-
font-weight: 640;
|
|
174
|
-
color: var(--admin-ink);
|
|
175
|
-
}
|
|
176
|
-
.checkout-field-control {
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
gap: 8px;
|
|
180
|
-
flex-wrap: wrap;
|
|
181
|
-
}
|
|
182
|
-
.checkout-swatch {
|
|
183
|
-
width: 26px;
|
|
184
|
-
height: 26px;
|
|
185
|
-
border-radius: var(--admin-radius-sm);
|
|
186
|
-
border: 1px solid var(--admin-line-strong);
|
|
187
|
-
flex: none;
|
|
188
|
-
}
|
|
189
|
-
.checkout-input {
|
|
190
|
-
min-height: 34px;
|
|
191
|
-
padding: 0 10px;
|
|
192
|
-
border: 1px solid var(--admin-line-strong);
|
|
193
|
-
border-radius: var(--admin-radius-sm);
|
|
194
|
-
background: var(--admin-surface);
|
|
195
|
-
color: var(--admin-ink);
|
|
196
|
-
min-width: 220px;
|
|
197
|
-
}
|
|
198
|
-
.checkout-input.url {
|
|
199
|
-
min-width: 340px;
|
|
200
|
-
font-family: ui-monospace, Menlo, monospace;
|
|
201
|
-
font-size: 12px;
|
|
202
|
-
}
|
|
203
|
-
.checkout-reset {
|
|
204
|
-
font-size: 12px;
|
|
205
|
-
}
|
|
206
|
-
.checkout-default-hint {
|
|
207
|
-
color: var(--admin-muted);
|
|
208
|
-
font-size: 11px;
|
|
209
|
-
}
|
|
210
|
-
.checkout-help {
|
|
211
|
-
margin: 0;
|
|
212
|
-
color: var(--admin-muted);
|
|
213
|
-
font-size: 12px;
|
|
214
|
-
}
|
|
215
|
-
.checkout-seam {
|
|
216
|
-
display: flex;
|
|
217
|
-
gap: 8px;
|
|
218
|
-
align-items: flex-start;
|
|
219
|
-
border-top: 1px solid var(--admin-line);
|
|
220
|
-
padding-top: 12px;
|
|
221
|
-
}
|
|
222
|
-
.checkout-seam code {
|
|
223
|
-
font-family: ui-monospace, Menlo, monospace;
|
|
224
|
-
font-size: 11px;
|
|
225
|
-
}
|
|
226
|
-
</style>
|