@vendure-platform/create 0.1.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/README.md +70 -0
- package/dist/assets/demo-data/branding/logo.svg +4 -0
- package/dist/assets/demo-data/images/absorbent-pad.webp +0 -0
- package/dist/assets/demo-data/images/adjustable-wrench.webp +0 -0
- package/dist/assets/demo-data/images/anchor-bolt.webp +0 -0
- package/dist/assets/demo-data/images/angle-grinder.webp +0 -0
- package/dist/assets/demo-data/images/barrier-tape.webp +0 -0
- package/dist/assets/demo-data/images/bench-grinder.webp +0 -0
- package/dist/assets/demo-data/images/bracket.webp +0 -0
- package/dist/assets/demo-data/images/broom.webp +0 -0
- package/dist/assets/demo-data/images/bucket.webp +0 -0
- package/dist/assets/demo-data/images/cable-gland.webp +0 -0
- package/dist/assets/demo-data/images/cable-tie.webp +0 -0
- package/dist/assets/demo-data/images/cable-tray.webp +0 -0
- package/dist/assets/demo-data/images/cable.webp +0 -0
- package/dist/assets/demo-data/images/chimney-base-kit.webp +0 -0
- package/dist/assets/demo-data/images/chimney-cowl-bird-guard.webp +0 -0
- package/dist/assets/demo-data/images/chimney-cowl-open.webp +0 -0
- package/dist/assets/demo-data/images/chimney-storm-collar.webp +0 -0
- package/dist/assets/demo-data/images/chimney-wall-bracket.webp +0 -0
- package/dist/assets/demo-data/images/circular-saw.webp +0 -0
- package/dist/assets/demo-data/images/cleaning-spray.webp +0 -0
- package/dist/assets/demo-data/images/conduit.webp +0 -0
- package/dist/assets/demo-data/images/cordless-drill.webp +0 -0
- package/dist/assets/demo-data/images/drill-bits.webp +0 -0
- package/dist/assets/demo-data/images/dust-mask.webp +0 -0
- package/dist/assets/demo-data/images/ear-defenders.webp +0 -0
- package/dist/assets/demo-data/images/ear-plugs.webp +0 -0
- package/dist/assets/demo-data/images/extension-lead.webp +0 -0
- package/dist/assets/demo-data/images/eye-wash-station.webp +0 -0
- package/dist/assets/demo-data/images/face-shield.webp +0 -0
- package/dist/assets/demo-data/images/file-set.webp +0 -0
- package/dist/assets/demo-data/images/first-aid-kit.webp +0 -0
- package/dist/assets/demo-data/images/floor-sign.webp +0 -0
- package/dist/assets/demo-data/images/flue-bend-45.webp +0 -0
- package/dist/assets/demo-data/images/flue-bend-90.webp +0 -0
- package/dist/assets/demo-data/images/flue-section-1000mm.webp +0 -0
- package/dist/assets/demo-data/images/flue-section-250mm.webp +0 -0
- package/dist/assets/demo-data/images/flue-section-500mm.webp +0 -0
- package/dist/assets/demo-data/images/fuse.webp +0 -0
- package/dist/assets/demo-data/images/glove-dispenser.webp +0 -0
- package/dist/assets/demo-data/images/grinding-disc.webp +0 -0
- package/dist/assets/demo-data/images/hacksaw.webp +0 -0
- package/dist/assets/demo-data/images/hammer.webp +0 -0
- package/dist/assets/demo-data/images/hand-sanitiser.webp +0 -0
- package/dist/assets/demo-data/images/head-torch.webp +0 -0
- package/dist/assets/demo-data/images/heat-gun.webp +0 -0
- package/dist/assets/demo-data/images/hex-bolt.webp +0 -0
- package/dist/assets/demo-data/images/hex-key-set.webp +0 -0
- package/dist/assets/demo-data/images/hex-nut.webp +0 -0
- package/dist/assets/demo-data/images/hi-vis-jacket.webp +0 -0
- package/dist/assets/demo-data/images/hi-vis-vest.webp +0 -0
- package/dist/assets/demo-data/images/hose-clamp.webp +0 -0
- package/dist/assets/demo-data/images/impact-driver.webp +0 -0
- package/dist/assets/demo-data/images/jigsaw.webp +0 -0
- package/dist/assets/demo-data/images/junction-box.webp +0 -0
- package/dist/assets/demo-data/images/knee-pads.webp +0 -0
- package/dist/assets/demo-data/images/machine-screw.webp +0 -0
- package/dist/assets/demo-data/images/made-to-order-configurable-chimney.webp +0 -0
- package/dist/assets/demo-data/images/mallet.webp +0 -0
- package/dist/assets/demo-data/images/mcb.webp +0 -0
- package/dist/assets/demo-data/images/mop.webp +0 -0
- package/dist/assets/demo-data/images/paper-towels.webp +0 -0
- package/dist/assets/demo-data/images/pipe-wrench.webp +0 -0
- package/dist/assets/demo-data/images/pliers-set.webp +0 -0
- package/dist/assets/demo-data/images/pry-bar.webp +0 -0
- package/dist/assets/demo-data/images/rcd.webp +0 -0
- package/dist/assets/demo-data/images/reciprocating-saw.webp +0 -0
- package/dist/assets/demo-data/images/rivet.webp +0 -0
- package/dist/assets/demo-data/images/roof-flashing-high-pitch.webp +0 -0
- package/dist/assets/demo-data/images/roof-flashing-low-pitch.webp +0 -0
- package/dist/assets/demo-data/images/safety-boots.webp +0 -0
- package/dist/assets/demo-data/images/safety-glasses.webp +0 -0
- package/dist/assets/demo-data/images/safety-harness.webp +0 -0
- package/dist/assets/demo-data/images/safety-helmet.webp +0 -0
- package/dist/assets/demo-data/images/safety-sign.webp +0 -0
- package/dist/assets/demo-data/images/sanding-disc.webp +0 -0
- package/dist/assets/demo-data/images/saw-blade.webp +0 -0
- package/dist/assets/demo-data/images/screwdriver-set.webp +0 -0
- package/dist/assets/demo-data/images/screwdriver.webp +0 -0
- package/dist/assets/demo-data/images/self-tapping-screw.webp +0 -0
- package/dist/assets/demo-data/images/socket-set.webp +0 -0
- package/dist/assets/demo-data/images/socket.webp +0 -0
- package/dist/assets/demo-data/images/spanner-set.webp +0 -0
- package/dist/assets/demo-data/images/spanner.webp +0 -0
- package/dist/assets/demo-data/images/spill-kit.webp +0 -0
- package/dist/assets/demo-data/images/spirit-level.webp +0 -0
- package/dist/assets/demo-data/images/switch.webp +0 -0
- package/dist/assets/demo-data/images/tape-measure.webp +0 -0
- package/dist/assets/demo-data/images/terminal-block.webp +0 -0
- package/dist/assets/demo-data/images/threaded-rod.webp +0 -0
- package/dist/assets/demo-data/images/torque-wrench.webp +0 -0
- package/dist/assets/demo-data/images/utility-knife.webp +0 -0
- package/dist/assets/demo-data/images/wall-pass-sleeve.webp +0 -0
- package/dist/assets/demo-data/images/wall-plug.webp +0 -0
- package/dist/assets/demo-data/images/washer.webp +0 -0
- package/dist/assets/demo-data/images/waste-bin.webp +0 -0
- package/dist/assets/demo-data/images/wire-connector.webp +0 -0
- package/dist/assets/demo-data/images/wire-cutters.webp +0 -0
- package/dist/assets/demo-data/images/wood-screw.webp +0 -0
- package/dist/assets/demo-data/images/work-gloves.webp +0 -0
- package/dist/assets/demo-data/images/work-light.webp +0 -0
- package/dist/assets/demo-data/initial-data.json +667 -0
- package/dist/assets/demo-data/products.csv +779 -0
- package/dist/assets/storefront/.env.example +14 -0
- package/dist/assets/storefront/.env.local +1 -0
- package/dist/assets/storefront/components.json +22 -0
- package/dist/assets/storefront/eslint.config.mjs +23 -0
- package/dist/assets/storefront/graphql.config.yml +2 -0
- package/dist/assets/storefront/messages/de.json +1196 -0
- package/dist/assets/storefront/messages/en.json +1196 -0
- package/dist/assets/storefront/next-env.d.ts +6 -0
- package/dist/assets/storefront/next.config.ts +73 -0
- package/dist/assets/storefront/package.json +77 -0
- package/dist/assets/storefront/postcss.config.mjs +5 -0
- package/dist/assets/storefront/public/next.svg +22 -0
- package/dist/assets/storefront/public/scenarios/b2b-wholesale/hero/hero-bg.webp +0 -0
- package/dist/assets/storefront/public/scenarios/b2b-wholesale/logo.svg +4 -0
- package/dist/assets/storefront/public/scenarios/default/logo.svg +4 -0
- package/dist/assets/storefront/public/scenarios/kaminpro/hero/hero-bg.webp +0 -0
- package/dist/assets/storefront/public/scenarios/kaminpro/logo.svg +7 -0
- package/dist/assets/storefront/public/vendure.svg +4 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/catalog/page.tsx +65 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/collection/[slug]/loading.tsx +24 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/collection/[slug]/page.tsx +194 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/layout.tsx +9 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/product/[slug]/actions.ts +139 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/product/[slug]/loading.tsx +46 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/product/[slug]/page.tsx +330 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/search/actions.ts +11 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/search/loading.tsx +20 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/search/page.tsx +97 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/search/search-analytics-tracker.tsx +46 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/search/search-results.tsx +53 -0
- package/dist/assets/storefront/src/app/[locale]/(catalog)/search/search-term.tsx +26 -0
- package/dist/assets/storefront/src/app/[locale]/(scenario)/[...path]/page.tsx +31 -0
- package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/accept-invitation-client.tsx +56 -0
- package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/actions.ts +32 -0
- package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/page.tsx +85 -0
- package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/sign-out-and-retry.tsx +26 -0
- package/dist/assets/storefront/src/app/[locale]/account/addresses/actions.ts +125 -0
- package/dist/assets/storefront/src/app/[locale]/account/addresses/address-form.tsx +180 -0
- package/dist/assets/storefront/src/app/[locale]/account/addresses/addresses-client.tsx +292 -0
- package/dist/assets/storefront/src/app/[locale]/account/addresses/loading.tsx +48 -0
- package/dist/assets/storefront/src/app/[locale]/account/addresses/page.tsx +54 -0
- package/dist/assets/storefront/src/app/[locale]/account/approvals/actions.ts +28 -0
- package/dist/assets/storefront/src/app/[locale]/account/approvals/page.tsx +340 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/actions.ts +33 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/addresses/actions.ts +83 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/addresses/address-form.tsx +267 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/addresses/addresses-client.tsx +253 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/addresses/page.tsx +75 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/actions.ts +70 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/business-unit-form.tsx +153 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/business-units-client.tsx +210 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/page.tsx +66 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/types.ts +8 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/edit-company-form.tsx +57 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/page.tsx +89 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/payment-methods/page.tsx +65 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/payment-methods/payment-methods-client.tsx +55 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/roles/page.tsx +66 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/roles/roles-client.tsx +93 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/actions.ts +51 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/page.tsx +57 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/tax-ids-client.tsx +326 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/users/actions.ts +74 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/users/edit-user-form.tsx +157 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/users/invite-user-form.tsx +133 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/users/page.tsx +104 -0
- package/dist/assets/storefront/src/app/[locale]/account/company/users/users-client.tsx +266 -0
- package/dist/assets/storefront/src/app/[locale]/account/error.tsx +24 -0
- package/dist/assets/storefront/src/app/[locale]/account/layout.tsx +50 -0
- package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/page.tsx +463 -0
- package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/reorder-actions.ts +160 -0
- package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/reorder-dialog.tsx +386 -0
- package/dist/assets/storefront/src/app/[locale]/account/orders/loading.tsx +45 -0
- package/dist/assets/storefront/src/app/[locale]/account/orders/page.tsx +309 -0
- package/dist/assets/storefront/src/app/[locale]/account/profile/actions.ts +106 -0
- package/dist/assets/storefront/src/app/[locale]/account/profile/change-password-form.tsx +82 -0
- package/dist/assets/storefront/src/app/[locale]/account/profile/edit-email-form.tsx +88 -0
- package/dist/assets/storefront/src/app/[locale]/account/profile/edit-profile-form.tsx +80 -0
- package/dist/assets/storefront/src/app/[locale]/account/profile/loading.tsx +54 -0
- package/dist/assets/storefront/src/app/[locale]/account/profile/page.tsx +44 -0
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/actions.ts +103 -0
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/file-upload-tab.tsx +148 -0
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/manual-entry-tab.tsx +112 -0
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/page.tsx +26 -0
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/preview-table.tsx +170 -0
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/quick-order-form.tsx +243 -0
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/save-to-list-dialog.tsx +153 -0
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/sku-autocomplete.tsx +118 -0
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/text-input-tab.tsx +40 -0
- package/dist/assets/storefront/src/app/[locale]/account/quotes/[id]/page.tsx +260 -0
- package/dist/assets/storefront/src/app/[locale]/account/quotes/actions.ts +253 -0
- package/dist/assets/storefront/src/app/[locale]/account/quotes/new/new-quote-form.tsx +28 -0
- package/dist/assets/storefront/src/app/[locale]/account/quotes/new/page.tsx +51 -0
- package/dist/assets/storefront/src/app/[locale]/account/quotes/page.tsx +248 -0
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/[id]/loading.tsx +44 -0
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/[id]/page.tsx +51 -0
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/[id]/shopping-list-detail-client.tsx +562 -0
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/actions.ts +235 -0
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/create-shopping-list-form.tsx +86 -0
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/loading.tsx +48 -0
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/page.tsx +176 -0
- package/dist/assets/storefront/src/app/[locale]/account/store-credits/actions.ts +31 -0
- package/dist/assets/storefront/src/app/[locale]/account/store-credits/claim-form.tsx +41 -0
- package/dist/assets/storefront/src/app/[locale]/account/store-credits/page.tsx +190 -0
- package/dist/assets/storefront/src/app/[locale]/account/store-credits/reveal-code.tsx +38 -0
- package/dist/assets/storefront/src/app/[locale]/account/verify-email/page.tsx +117 -0
- package/dist/assets/storefront/src/app/[locale]/cart/actions.ts +128 -0
- package/dist/assets/storefront/src/app/[locale]/cart/cart-items.tsx +228 -0
- package/dist/assets/storefront/src/app/[locale]/cart/cart-line-actions.tsx +55 -0
- package/dist/assets/storefront/src/app/[locale]/cart/cart-quantity-control.tsx +158 -0
- package/dist/assets/storefront/src/app/[locale]/cart/cart-remove-button.tsx +36 -0
- package/dist/assets/storefront/src/app/[locale]/cart/cart.tsx +151 -0
- package/dist/assets/storefront/src/app/[locale]/cart/code-input.tsx +49 -0
- package/dist/assets/storefront/src/app/[locale]/cart/loading.tsx +10 -0
- package/dist/assets/storefront/src/app/[locale]/cart/order-summary.tsx +178 -0
- package/dist/assets/storefront/src/app/[locale]/cart/page.tsx +33 -0
- package/dist/assets/storefront/src/app/[locale]/cart/promotion-code.tsx +142 -0
- package/dist/assets/storefront/src/app/[locale]/cart/reapproval-confirm.tsx +76 -0
- package/dist/assets/storefront/src/app/[locale]/cart/request-quote-button.tsx +80 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/actions.ts +192 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/cancel-quote-checkout-button.tsx +30 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/checkout-flow.tsx +214 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/checkout-provider.tsx +181 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/loading.tsx +90 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/order-summary.tsx +160 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/page.tsx +154 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/steps/delivery-step.tsx +107 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/steps/payment-step.tsx +110 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/steps/review-step.tsx +180 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/steps/shipping-address-step.tsx +518 -0
- package/dist/assets/storefront/src/app/[locale]/checkout/types.ts +7 -0
- package/dist/assets/storefront/src/app/[locale]/error.tsx +28 -0
- package/dist/assets/storefront/src/app/[locale]/forgot-password/actions.ts +28 -0
- package/dist/assets/storefront/src/app/[locale]/forgot-password/forgot-password-form.tsx +128 -0
- package/dist/assets/storefront/src/app/[locale]/forgot-password/page.tsx +24 -0
- package/dist/assets/storefront/src/app/[locale]/globals.css +72 -0
- package/dist/assets/storefront/src/app/[locale]/layout.tsx +202 -0
- package/dist/assets/storefront/src/app/[locale]/not-found.tsx +26 -0
- package/dist/assets/storefront/src/app/[locale]/order-confirmation/[code]/order-confirmation.tsx +296 -0
- package/dist/assets/storefront/src/app/[locale]/order-confirmation/[code]/page.tsx +18 -0
- package/dist/assets/storefront/src/app/[locale]/page.tsx +125 -0
- package/dist/assets/storefront/src/app/[locale]/register/actions.ts +50 -0
- package/dist/assets/storefront/src/app/[locale]/register/page.tsx +82 -0
- package/dist/assets/storefront/src/app/[locale]/register/registration-form.tsx +237 -0
- package/dist/assets/storefront/src/app/[locale]/register-company/actions.ts +40 -0
- package/dist/assets/storefront/src/app/[locale]/register-company/page.tsx +43 -0
- package/dist/assets/storefront/src/app/[locale]/register-company/registration-form.tsx +48 -0
- package/dist/assets/storefront/src/app/[locale]/reset-password/actions.ts +40 -0
- package/dist/assets/storefront/src/app/[locale]/reset-password/page.tsx +32 -0
- package/dist/assets/storefront/src/app/[locale]/reset-password/reset-password-form.tsx +96 -0
- package/dist/assets/storefront/src/app/[locale]/shopping-list/[code]/add-to-cart-button.tsx +31 -0
- package/dist/assets/storefront/src/app/[locale]/shopping-list/[code]/loading.tsx +29 -0
- package/dist/assets/storefront/src/app/[locale]/shopping-list/[code]/page.tsx +157 -0
- package/dist/assets/storefront/src/app/[locale]/sign-in/actions.ts +76 -0
- package/dist/assets/storefront/src/app/[locale]/sign-in/login-form.tsx +177 -0
- package/dist/assets/storefront/src/app/[locale]/sign-in/page.tsx +81 -0
- package/dist/assets/storefront/src/app/[locale]/verify/actions.ts +41 -0
- package/dist/assets/storefront/src/app/[locale]/verify/page.tsx +40 -0
- package/dist/assets/storefront/src/app/[locale]/verify/verify-content.tsx +127 -0
- package/dist/assets/storefront/src/app/[locale]/verify-pending/page.tsx +67 -0
- package/dist/assets/storefront/src/app/api/clear-company-context/route.ts +26 -0
- package/dist/assets/storefront/src/app/api/draft/disable/route.ts +12 -0
- package/dist/assets/storefront/src/app/api/draft/route.ts +17 -0
- package/dist/assets/storefront/src/app/api/revalidate/route.ts +110 -0
- package/dist/assets/storefront/src/app/api/search-analytics/route.ts +16 -0
- package/dist/assets/storefront/src/app/favicon.ico +0 -0
- package/dist/assets/storefront/src/components/commerce/account-nav-items.ts +56 -0
- package/dist/assets/storefront/src/components/commerce/account-sidebar.tsx +112 -0
- package/dist/assets/storefront/src/components/commerce/active-filters.tsx +107 -0
- package/dist/assets/storefront/src/components/commerce/approval-decision-form.tsx +70 -0
- package/dist/assets/storefront/src/components/commerce/approval-status-badge.tsx +37 -0
- package/dist/assets/storefront/src/components/commerce/business-unit-switcher.tsx +56 -0
- package/dist/assets/storefront/src/components/commerce/catalog-search-bar.tsx +83 -0
- package/dist/assets/storefront/src/components/commerce/category-product-section.tsx +69 -0
- package/dist/assets/storefront/src/components/commerce/category-sidebar.tsx +133 -0
- package/dist/assets/storefront/src/components/commerce/collection-hero-banner.tsx +36 -0
- package/dist/assets/storefront/src/components/commerce/company-state-badge.tsx +32 -0
- package/dist/assets/storefront/src/components/commerce/company-switcher.tsx +58 -0
- package/dist/assets/storefront/src/components/commerce/configurator-form.tsx +606 -0
- package/dist/assets/storefront/src/components/commerce/facet-filters.tsx +286 -0
- package/dist/assets/storefront/src/components/commerce/gift-card-pdp.tsx +43 -0
- package/dist/assets/storefront/src/components/commerce/gift-card-product-info.tsx +137 -0
- package/dist/assets/storefront/src/components/commerce/highlighted-text.tsx +30 -0
- package/dist/assets/storefront/src/components/commerce/instant-search-dropdown.tsx +377 -0
- package/dist/assets/storefront/src/components/commerce/order-status-badge.tsx +41 -0
- package/dist/assets/storefront/src/components/commerce/packaging-unit-selector.tsx +146 -0
- package/dist/assets/storefront/src/components/commerce/permission-gate.tsx +20 -0
- package/dist/assets/storefront/src/components/commerce/price-range-filter.tsx +111 -0
- package/dist/assets/storefront/src/components/commerce/price-tiers.tsx +98 -0
- package/dist/assets/storefront/src/components/commerce/price.tsx +29 -0
- package/dist/assets/storefront/src/components/commerce/product-card-list.tsx +121 -0
- package/dist/assets/storefront/src/components/commerce/product-card.tsx +89 -0
- package/dist/assets/storefront/src/components/commerce/product-carousel.tsx +42 -0
- package/dist/assets/storefront/src/components/commerce/product-grid.tsx +54 -0
- package/dist/assets/storefront/src/components/commerce/product-image-carousel.tsx +127 -0
- package/dist/assets/storefront/src/components/commerce/product-info.tsx +525 -0
- package/dist/assets/storefront/src/components/commerce/product-list-expansion.tsx +393 -0
- package/dist/assets/storefront/src/components/commerce/product-list-view.tsx +34 -0
- package/dist/assets/storefront/src/components/commerce/product-sidebar.tsx +175 -0
- package/dist/assets/storefront/src/components/commerce/product-view-switcher.tsx +107 -0
- package/dist/assets/storefront/src/components/commerce/quote-action-buttons.tsx +235 -0
- package/dist/assets/storefront/src/components/commerce/quote-activity-timeline.tsx +320 -0
- package/dist/assets/storefront/src/components/commerce/quote-comment-form.tsx +52 -0
- package/dist/assets/storefront/src/components/commerce/quote-csv-export-button.tsx +97 -0
- package/dist/assets/storefront/src/components/commerce/quote-product-search.tsx +139 -0
- package/dist/assets/storefront/src/components/commerce/quote-request-form.tsx +252 -0
- package/dist/assets/storefront/src/components/commerce/quote-status-badge.tsx +41 -0
- package/dist/assets/storefront/src/components/commerce/quote-validity-indicator.tsx +33 -0
- package/dist/assets/storefront/src/components/commerce/quote-version-comparison.tsx +88 -0
- package/dist/assets/storefront/src/components/commerce/related-products.tsx +56 -0
- package/dist/assets/storefront/src/components/commerce/shop-by-category.tsx +59 -0
- package/dist/assets/storefront/src/components/commerce/shopping-list-toggle.tsx +158 -0
- package/dist/assets/storefront/src/components/commerce/sort-dropdown.tsx +51 -0
- package/dist/assets/storefront/src/components/commerce/store-credit-summary.tsx +45 -0
- package/dist/assets/storefront/src/components/commerce/subcollection-tiles.tsx +56 -0
- package/dist/assets/storefront/src/components/layout/auth-page-shell.tsx +15 -0
- package/dist/assets/storefront/src/components/layout/draft-mode-action.ts +8 -0
- package/dist/assets/storefront/src/components/layout/draft-mode-indicator.tsx +54 -0
- package/dist/assets/storefront/src/components/layout/draft-mode-link.tsx +29 -0
- package/dist/assets/storefront/src/components/layout/footer.tsx +168 -0
- package/dist/assets/storefront/src/components/layout/navbar/actions.ts +33 -0
- package/dist/assets/storefront/src/components/layout/navbar/cart-icon.tsx +50 -0
- package/dist/assets/storefront/src/components/layout/navbar/channel-picker-wrapper.tsx +19 -0
- package/dist/assets/storefront/src/components/layout/navbar/channel-picker.tsx +53 -0
- package/dist/assets/storefront/src/components/layout/navbar/currency-picker-wrapper.tsx +21 -0
- package/dist/assets/storefront/src/components/layout/navbar/currency-picker.tsx +52 -0
- package/dist/assets/storefront/src/components/layout/navbar/language-picker.tsx +51 -0
- package/dist/assets/storefront/src/components/layout/navbar/login-button.tsx +34 -0
- package/dist/assets/storefront/src/components/layout/navbar/mobile-nav.tsx +74 -0
- package/dist/assets/storefront/src/components/layout/navbar/nav-menu-items.tsx +51 -0
- package/dist/assets/storefront/src/components/layout/navbar/navbar-cart.tsx +5 -0
- package/dist/assets/storefront/src/components/layout/navbar/navbar-collections.tsx +291 -0
- package/dist/assets/storefront/src/components/layout/navbar/navbar-link.tsx +28 -0
- package/dist/assets/storefront/src/components/layout/navbar/navbar-user.tsx +147 -0
- package/dist/assets/storefront/src/components/layout/navbar/theme-switcher.tsx +39 -0
- package/dist/assets/storefront/src/components/layout/navbar.tsx +117 -0
- package/dist/assets/storefront/src/components/layout/search-input.tsx +71 -0
- package/dist/assets/storefront/src/components/providers/awaiting-approval-banner.tsx +58 -0
- package/dist/assets/storefront/src/components/providers/cart-count-server.tsx +31 -0
- package/dist/assets/storefront/src/components/providers/company-context-guard.tsx +47 -0
- package/dist/assets/storefront/src/components/providers/company-permissions-server.tsx +14 -0
- package/dist/assets/storefront/src/components/providers/theme-provider.tsx +16 -0
- package/dist/assets/storefront/src/components/shared/breadcrumbs.tsx +39 -0
- package/dist/assets/storefront/src/components/shared/catalog-sidebar-skeleton.tsx +21 -0
- package/dist/assets/storefront/src/components/shared/country-select.tsx +83 -0
- package/dist/assets/storefront/src/components/shared/error-state.tsx +16 -0
- package/dist/assets/storefront/src/components/shared/pagination.tsx +119 -0
- package/dist/assets/storefront/src/components/shared/prefetch-link.tsx +36 -0
- package/dist/assets/storefront/src/components/shared/product-grid-skeleton.tsx +26 -0
- package/dist/assets/storefront/src/components/shared/scenario-paused.tsx +80 -0
- package/dist/assets/storefront/src/components/shared/skeletons/cart-skeleton.tsx +48 -0
- package/dist/assets/storefront/src/components/shared/skeletons/navbar-user-skeleton.tsx +9 -0
- package/dist/assets/storefront/src/components/shared/skeletons/search-input-skeleton.tsx +7 -0
- package/dist/assets/storefront/src/components/shared/skeletons/search-results-skeleton.tsx +17 -0
- package/dist/assets/storefront/src/components/ui/accordion.tsx +66 -0
- package/dist/assets/storefront/src/components/ui/alert-dialog.tsx +157 -0
- package/dist/assets/storefront/src/components/ui/alert.tsx +66 -0
- package/dist/assets/storefront/src/components/ui/aspect-ratio.tsx +11 -0
- package/dist/assets/storefront/src/components/ui/avatar.tsx +53 -0
- package/dist/assets/storefront/src/components/ui/badge.tsx +46 -0
- package/dist/assets/storefront/src/components/ui/breadcrumb.tsx +109 -0
- package/dist/assets/storefront/src/components/ui/button.tsx +58 -0
- package/dist/assets/storefront/src/components/ui/calendar.tsx +213 -0
- package/dist/assets/storefront/src/components/ui/card.tsx +92 -0
- package/dist/assets/storefront/src/components/ui/carousel.tsx +241 -0
- package/dist/assets/storefront/src/components/ui/chart.tsx +357 -0
- package/dist/assets/storefront/src/components/ui/checkbox.tsx +32 -0
- package/dist/assets/storefront/src/components/ui/collapsible.tsx +33 -0
- package/dist/assets/storefront/src/components/ui/command.tsx +184 -0
- package/dist/assets/storefront/src/components/ui/context-menu.tsx +252 -0
- package/dist/assets/storefront/src/components/ui/dialog.tsx +143 -0
- package/dist/assets/storefront/src/components/ui/drawer.tsx +135 -0
- package/dist/assets/storefront/src/components/ui/dropdown-menu.tsx +257 -0
- package/dist/assets/storefront/src/components/ui/empty-state.tsx +37 -0
- package/dist/assets/storefront/src/components/ui/field.tsx +244 -0
- package/dist/assets/storefront/src/components/ui/form.tsx +167 -0
- package/dist/assets/storefront/src/components/ui/hover-card.tsx +44 -0
- package/dist/assets/storefront/src/components/ui/input-otp.tsx +77 -0
- package/dist/assets/storefront/src/components/ui/input.tsx +21 -0
- package/dist/assets/storefront/src/components/ui/kbd-shortcut.tsx +20 -0
- package/dist/assets/storefront/src/components/ui/label.tsx +24 -0
- package/dist/assets/storefront/src/components/ui/menubar.tsx +276 -0
- package/dist/assets/storefront/src/components/ui/navigation-menu.tsx +168 -0
- package/dist/assets/storefront/src/components/ui/pagination.tsx +127 -0
- package/dist/assets/storefront/src/components/ui/popover.tsx +48 -0
- package/dist/assets/storefront/src/components/ui/progress.tsx +31 -0
- package/dist/assets/storefront/src/components/ui/radio-group.tsx +45 -0
- package/dist/assets/storefront/src/components/ui/resizable.tsx +56 -0
- package/dist/assets/storefront/src/components/ui/scroll-area.tsx +58 -0
- package/dist/assets/storefront/src/components/ui/select.tsx +185 -0
- package/dist/assets/storefront/src/components/ui/separator.tsx +28 -0
- package/dist/assets/storefront/src/components/ui/sheet.tsx +139 -0
- package/dist/assets/storefront/src/components/ui/sidebar.tsx +728 -0
- package/dist/assets/storefront/src/components/ui/skeleton.tsx +13 -0
- package/dist/assets/storefront/src/components/ui/slider.tsx +63 -0
- package/dist/assets/storefront/src/components/ui/sonner.tsx +25 -0
- package/dist/assets/storefront/src/components/ui/switch.tsx +31 -0
- package/dist/assets/storefront/src/components/ui/table.tsx +116 -0
- package/dist/assets/storefront/src/components/ui/tabs.tsx +66 -0
- package/dist/assets/storefront/src/components/ui/textarea.tsx +18 -0
- package/dist/assets/storefront/src/components/ui/toggle-group.tsx +73 -0
- package/dist/assets/storefront/src/components/ui/toggle.tsx +47 -0
- package/dist/assets/storefront/src/components/ui/tooltip.tsx +61 -0
- package/dist/assets/storefront/src/config/branding.ts +4 -0
- package/dist/assets/storefront/src/config/scenario-meta.ts +46 -0
- package/dist/assets/storefront/src/config/scenario.ts +313 -0
- package/dist/assets/storefront/src/contexts/auth-context.tsx +35 -0
- package/dist/assets/storefront/src/graphql.ts +14 -0
- package/dist/assets/storefront/src/hooks/use-mobile.ts +19 -0
- package/dist/assets/storefront/src/i18n/locale-utils.ts +33 -0
- package/dist/assets/storefront/src/i18n/locales.ts +18 -0
- package/dist/assets/storefront/src/i18n/navigation.ts +35 -0
- package/dist/assets/storefront/src/i18n/request.ts +19 -0
- package/dist/assets/storefront/src/i18n/routing.ts +19 -0
- package/dist/assets/storefront/src/i18n/server.ts +16 -0
- package/dist/assets/storefront/src/lib/actions/switch-channel.ts +32 -0
- package/dist/assets/storefront/src/lib/actions/switch-currency.ts +25 -0
- package/dist/assets/storefront/src/lib/auth.ts +18 -0
- package/dist/assets/storefront/src/lib/backend-health.ts +38 -0
- package/dist/assets/storefront/src/lib/cart-count-context.tsx +59 -0
- package/dist/assets/storefront/src/lib/cart-guard-utils.ts +10 -0
- package/dist/assets/storefront/src/lib/cart-guard.ts +104 -0
- package/dist/assets/storefront/src/lib/channel-server.ts +28 -0
- package/dist/assets/storefront/src/lib/channel.ts +2 -0
- package/dist/assets/storefront/src/lib/company-context.ts +35 -0
- package/dist/assets/storefront/src/lib/company-permissions-context.tsx +40 -0
- package/dist/assets/storefront/src/lib/currency-server.ts +20 -0
- package/dist/assets/storefront/src/lib/currency.ts +2 -0
- package/dist/assets/storefront/src/lib/format.ts +48 -0
- package/dist/assets/storefront/src/lib/metadata.ts +85 -0
- package/dist/assets/storefront/src/lib/quantity.test.js +20 -0
- package/dist/assets/storefront/src/lib/quantity.ts +20 -0
- package/dist/assets/storefront/src/lib/search-bar-context.tsx +45 -0
- package/dist/assets/storefront/src/lib/search-helpers.ts +69 -0
- package/dist/assets/storefront/src/lib/use-recent-searches.ts +55 -0
- package/dist/assets/storefront/src/lib/utils.ts +6 -0
- package/dist/assets/storefront/src/lib/vendure/actions.ts +96 -0
- package/dist/assets/storefront/src/lib/vendure/api.ts +164 -0
- package/dist/assets/storefront/src/lib/vendure/approval-utils.ts +21 -0
- package/dist/assets/storefront/src/lib/vendure/cached.ts +71 -0
- package/dist/assets/storefront/src/lib/vendure/fragments.ts +213 -0
- package/dist/assets/storefront/src/lib/vendure/instant-search-action.ts +104 -0
- package/dist/assets/storefront/src/lib/vendure/mutations.ts +1136 -0
- package/dist/assets/storefront/src/lib/vendure/queries.ts +1406 -0
- package/dist/assets/storefront/src/middleware.ts +11 -0
- package/dist/assets/storefront/src/scenarios/b2b-wholesale/branding.ts +180 -0
- package/dist/assets/storefront/src/scenarios/b2b-wholesale/hero.tsx +122 -0
- package/dist/assets/storefront/src/scenarios/b2b-wholesale/index.ts +21 -0
- package/dist/assets/storefront/src/scenarios/b2b-wholesale/meta.ts +3 -0
- package/dist/assets/storefront/src/scenarios/default/branding.ts +148 -0
- package/dist/assets/storefront/src/scenarios/default/hero.tsx +107 -0
- package/dist/assets/storefront/src/scenarios/default/index.ts +12 -0
- package/dist/assets/storefront/src/scenarios/default/meta.ts +3 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/auth-gate.tsx +36 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/branding.ts +238 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/cart-items.tsx +359 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/hero.tsx +123 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/index.ts +50 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/meta.ts +9 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/banners.tsx +21 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/bom-basket.tsx +221 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/btn.tsx +38 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/chip.tsx +35 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/config-header.tsx +72 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/field-row.tsx +126 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/info-dot.tsx +38 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/login-notice.tsx +81 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/module-panel.tsx +144 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/quote-dialog.tsx +110 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/schematic.tsx +674 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/components/why-panel.tsx +66 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/configurator-pdp.tsx +43 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/configurator-shell.tsx +320 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/lib/data.ts +150 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/lib/types.ts +30 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/pdp/styles.css +104 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/shop-by-system.tsx +97 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/system-finder/decision-tree.ts +261 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/system-finder/page.tsx +21 -0
- package/dist/assets/storefront/src/scenarios/kaminpro/system-finder/wizard.tsx +600 -0
- package/dist/assets/storefront/src/schema.graphql.placeholder +5 -0
- package/dist/assets/storefront/tsconfig.json +37 -0
- package/dist/assets/templates/CLAUDE.md.hbs +63 -0
- package/dist/assets/templates/README.md.hbs +53 -0
- package/dist/assets/templates/custom-populate.ts.hbs +28 -0
- package/dist/assets/templates/docker-compose.yml.hbs +29 -0
- package/dist/assets/templates/env.hbs +44 -0
- package/dist/assets/templates/environment.d.ts.hbs +32 -0
- package/dist/assets/templates/gitignore.hbs +7 -0
- package/dist/assets/templates/index.ts.hbs +16 -0
- package/dist/assets/templates/npmrc.hbs +1 -0
- package/dist/assets/templates/populate.ts.hbs +27 -0
- package/dist/assets/templates/root-package.json.hbs +17 -0
- package/dist/assets/templates/server-package.json.hbs +31 -0
- package/dist/assets/templates/tsconfig.dashboard.json.hbs +17 -0
- package/dist/assets/templates/tsconfig.root.json.hbs +16 -0
- package/dist/assets/templates/tsconfig.server.json.hbs +20 -0
- package/dist/assets/templates/vendure-config.ts.hbs +80 -0
- package/dist/assets/templates/vite.config.mts.hbs +27 -0
- package/dist/bin/run.d.ts +2 -0
- package/dist/bin/run.js +79 -0
- package/dist/bin/run.js.map +1 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.js +154 -0
- package/dist/cli.js.map +1 -0
- package/dist/git-init.d.ts +4 -0
- package/dist/git-init.js +60 -0
- package/dist/git-init.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin-registry.d.ts +10 -0
- package/dist/plugin-registry.js +485 -0
- package/dist/plugin-registry.js.map +1 -0
- package/dist/scaffolder.d.ts +10 -0
- package/dist/scaffolder.js +218 -0
- package/dist/scaffolder.js.map +1 -0
- package/dist/storefront-copier.d.ts +6 -0
- package/dist/storefront-copier.js +68 -0
- package/dist/storefront-copier.js.map +1 -0
- package/dist/template-renderer.d.ts +30 -0
- package/dist/template-renderer.js +177 -0
- package/dist/template-renderer.js.map +1 -0
- package/dist/types.d.ts +60 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { Badge } from '@/components/ui/badge';
|
|
4
|
+
import { Button } from '@/components/ui/button';
|
|
5
|
+
import { Card, CardContent } from '@/components/ui/card';
|
|
6
|
+
import { Link } from '@/i18n/navigation';
|
|
7
|
+
import { cn } from '@/lib/utils';
|
|
8
|
+
import {
|
|
9
|
+
ArrowLeft,
|
|
10
|
+
ArrowRight,
|
|
11
|
+
Check,
|
|
12
|
+
ChevronRight,
|
|
13
|
+
Flame,
|
|
14
|
+
Fuel,
|
|
15
|
+
Gauge,
|
|
16
|
+
HardHat,
|
|
17
|
+
Home as HomeIcon,
|
|
18
|
+
Thermometer,
|
|
19
|
+
Wrench,
|
|
20
|
+
} from 'lucide-react';
|
|
21
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
22
|
+
import { useCallback, useEffect, useMemo, useRef, useState, useTransition } from 'react';
|
|
23
|
+
import {
|
|
24
|
+
Betriebsart,
|
|
25
|
+
Bauvorhaben,
|
|
26
|
+
Druck,
|
|
27
|
+
Temperaturklasse,
|
|
28
|
+
WizardAnswers,
|
|
29
|
+
decodeAnswers,
|
|
30
|
+
encodeAnswers,
|
|
31
|
+
isDruckRelevant,
|
|
32
|
+
isTemperaturklasseRelevant,
|
|
33
|
+
recommendSystems,
|
|
34
|
+
} from './decision-tree';
|
|
35
|
+
|
|
36
|
+
/* =============================================================
|
|
37
|
+
Step metadata — drives breadcrumb and progress indicator
|
|
38
|
+
============================================================= */
|
|
39
|
+
|
|
40
|
+
type StepId = 'bauvorhaben' | 'betriebsart' | 'druck' | 'temperaturklasse' | 'ergebnis';
|
|
41
|
+
|
|
42
|
+
interface StepMeta {
|
|
43
|
+
id: StepId;
|
|
44
|
+
index: number;
|
|
45
|
+
label: string;
|
|
46
|
+
/** True when the step is meaningful for the current answer path. */
|
|
47
|
+
isRelevant: (answers: WizardAnswers) => boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const STEPS: StepMeta[] = [
|
|
51
|
+
{ id: 'bauvorhaben', index: 1, label: 'Bauvorhaben', isRelevant: () => true },
|
|
52
|
+
{ id: 'betriebsart', index: 2, label: 'Betriebsart', isRelevant: () => true },
|
|
53
|
+
{ id: 'druck', index: 3, label: 'Druck', isRelevant: isDruckRelevant },
|
|
54
|
+
{ id: 'temperaturklasse', index: 4, label: 'Ausführung', isRelevant: isTemperaturklasseRelevant },
|
|
55
|
+
{ id: 'ergebnis', index: 5, label: 'Ergebnis', isRelevant: () => true },
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
const STEP_ORDER: StepId[] = STEPS.map(s => s.id);
|
|
59
|
+
const STEP_IDS = new Set<StepId>(STEP_ORDER);
|
|
60
|
+
|
|
61
|
+
function isValidStepId(id: string | null | undefined): id is StepId {
|
|
62
|
+
return !!id && STEP_IDS.has(id as StepId);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function nextStep(current: StepId, answers: WizardAnswers): StepId {
|
|
66
|
+
const i = STEP_ORDER.indexOf(current);
|
|
67
|
+
for (let j = i + 1; j < STEP_ORDER.length; j++) {
|
|
68
|
+
const s = STEPS[j];
|
|
69
|
+
if (s.isRelevant(answers)) return s.id;
|
|
70
|
+
}
|
|
71
|
+
return 'ergebnis';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function prevStep(current: StepId, answers: WizardAnswers): StepId | null {
|
|
75
|
+
const i = STEP_ORDER.indexOf(current);
|
|
76
|
+
for (let j = i - 1; j >= 0; j--) {
|
|
77
|
+
const s = STEPS[j];
|
|
78
|
+
if (s.isRelevant(answers)) return s.id;
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* =============================================================
|
|
84
|
+
Shared primitives
|
|
85
|
+
============================================================= */
|
|
86
|
+
|
|
87
|
+
interface ChoiceCardProps {
|
|
88
|
+
selected: boolean;
|
|
89
|
+
icon: React.ReactNode;
|
|
90
|
+
title: string;
|
|
91
|
+
description: string;
|
|
92
|
+
onClick: () => void;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function ChoiceCard({ selected, icon, title, description, onClick }: ChoiceCardProps) {
|
|
96
|
+
return (
|
|
97
|
+
<button
|
|
98
|
+
type="button"
|
|
99
|
+
onClick={onClick}
|
|
100
|
+
className={cn(
|
|
101
|
+
'group relative flex flex-col items-start gap-3 rounded-lg border p-5 text-left transition-all',
|
|
102
|
+
'hover:border-[var(--primary)] hover:shadow-md',
|
|
103
|
+
selected ? 'border-[var(--primary)] bg-[var(--primary)]/5 shadow-md' : 'border-[var(--border)] bg-[var(--card)]',
|
|
104
|
+
)}
|
|
105
|
+
aria-pressed={selected}
|
|
106
|
+
>
|
|
107
|
+
<div
|
|
108
|
+
className={cn(
|
|
109
|
+
'flex h-11 w-11 items-center justify-center rounded-md',
|
|
110
|
+
selected ? 'bg-[var(--primary)] text-[var(--primary-foreground)]' : 'bg-[var(--muted)] text-[var(--muted-foreground)]',
|
|
111
|
+
)}
|
|
112
|
+
>
|
|
113
|
+
{icon}
|
|
114
|
+
</div>
|
|
115
|
+
<div className="flex-1">
|
|
116
|
+
<h3 className="text-base font-semibold text-[var(--foreground)]">{title}</h3>
|
|
117
|
+
<p className="mt-1 text-sm text-[var(--muted-foreground)]">{description}</p>
|
|
118
|
+
</div>
|
|
119
|
+
{selected && (
|
|
120
|
+
<div className="absolute right-4 top-4 flex h-6 w-6 items-center justify-center rounded-full bg-[var(--primary)] text-[var(--primary-foreground)]">
|
|
121
|
+
<Check className="h-4 w-4" />
|
|
122
|
+
</div>
|
|
123
|
+
)}
|
|
124
|
+
</button>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
interface ProgressBarProps {
|
|
129
|
+
currentStep: StepId;
|
|
130
|
+
answers: WizardAnswers;
|
|
131
|
+
onJump: (target: StepId) => void;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function ProgressBar({ currentStep, answers, onJump }: ProgressBarProps) {
|
|
135
|
+
const questionSteps = STEPS.filter(s => s.id !== 'ergebnis');
|
|
136
|
+
const currentIndex = STEPS.findIndex(s => s.id === currentStep);
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<nav aria-label="Wizard-Fortschritt">
|
|
140
|
+
<ol className="flex flex-wrap items-center gap-2">
|
|
141
|
+
{questionSteps.map((step, i) => {
|
|
142
|
+
const relevant = step.isRelevant(answers);
|
|
143
|
+
const isCurrent = step.id === currentStep;
|
|
144
|
+
const isPast = i < currentIndex && step.id !== 'ergebnis';
|
|
145
|
+
const clickable = isPast || isCurrent;
|
|
146
|
+
const ariaLabel = isCurrent
|
|
147
|
+
? `Schritt ${step.index}: ${step.label} (aktuell)`
|
|
148
|
+
: isPast
|
|
149
|
+
? `Zurück zu Schritt ${step.index}: ${step.label}`
|
|
150
|
+
: `Schritt ${step.index}: ${step.label} (noch nicht verfügbar)`;
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<li key={step.id}>
|
|
154
|
+
<button
|
|
155
|
+
type="button"
|
|
156
|
+
onClick={() => clickable && relevant && onJump(step.id)}
|
|
157
|
+
disabled={!clickable || !relevant}
|
|
158
|
+
aria-current={isCurrent ? 'step' : undefined}
|
|
159
|
+
aria-label={ariaLabel}
|
|
160
|
+
className={cn(
|
|
161
|
+
'inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-medium transition-colors',
|
|
162
|
+
isCurrent && 'border-[var(--primary)] bg-[var(--primary)]/10 text-[var(--primary)]',
|
|
163
|
+
!isCurrent && isPast && 'border-[var(--border)] bg-[var(--muted)] text-[var(--foreground)]',
|
|
164
|
+
!isCurrent && !isPast && 'border-[var(--border)] bg-transparent text-[var(--muted-foreground)]',
|
|
165
|
+
clickable && relevant && 'hover:border-[var(--primary)]',
|
|
166
|
+
(!clickable || !relevant) && 'cursor-default',
|
|
167
|
+
)}
|
|
168
|
+
>
|
|
169
|
+
<span>{step.index}.</span>
|
|
170
|
+
<span>{step.label}</span>
|
|
171
|
+
{!relevant && isPast && (
|
|
172
|
+
<Badge variant="secondary" className="ml-1 text-[10px] font-normal">
|
|
173
|
+
Übersprungen
|
|
174
|
+
</Badge>
|
|
175
|
+
)}
|
|
176
|
+
</button>
|
|
177
|
+
</li>
|
|
178
|
+
);
|
|
179
|
+
})}
|
|
180
|
+
</ol>
|
|
181
|
+
</nav>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* =============================================================
|
|
186
|
+
Step screens
|
|
187
|
+
============================================================= */
|
|
188
|
+
|
|
189
|
+
interface StepProps<V> {
|
|
190
|
+
value: V | undefined;
|
|
191
|
+
onChange: (value: V) => void;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function BauvorhabenStep({ value, onChange }: StepProps<Bauvorhaben>) {
|
|
195
|
+
return (
|
|
196
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
197
|
+
<ChoiceCard
|
|
198
|
+
selected={value === 'neubau'}
|
|
199
|
+
icon={<HomeIcon className="h-6 w-6" />}
|
|
200
|
+
title="Neubau"
|
|
201
|
+
description="Planung für ein neues Gebäude. System wird typischerweise durch die Bauplanung vorspezifiziert — der Überdruck-Unterdruck-Schritt wird übersprungen."
|
|
202
|
+
onClick={() => onChange('neubau')}
|
|
203
|
+
/>
|
|
204
|
+
<ChoiceCard
|
|
205
|
+
selected={value === 'sanierung'}
|
|
206
|
+
icon={<Wrench className="h-6 w-6" />}
|
|
207
|
+
title="Sanierung"
|
|
208
|
+
description="Bestehende Anlage modernisieren oder ersetzen. Der Druckzustand der Bestandsanlage bestimmt die zulässigen Materialien."
|
|
209
|
+
onClick={() => onChange('sanierung')}
|
|
210
|
+
/>
|
|
211
|
+
</div>
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function BetriebsartStep({ value, onChange }: StepProps<Betriebsart>) {
|
|
216
|
+
return (
|
|
217
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
218
|
+
<ChoiceCard
|
|
219
|
+
selected={value === 'festbrennstoff'}
|
|
220
|
+
icon={<Flame className="h-6 w-6" />}
|
|
221
|
+
title="Festbrennstoff"
|
|
222
|
+
description="Kaminöfen und Festbrennstoffkessel (Holzscheit, Briketts). Erfordert Edelstahl für hohe Abgastemperaturen."
|
|
223
|
+
onClick={() => onChange('festbrennstoff')}
|
|
224
|
+
/>
|
|
225
|
+
<ChoiceCard
|
|
226
|
+
selected={value === 'pellet'}
|
|
227
|
+
icon={<Flame className="h-6 w-6" />}
|
|
228
|
+
title="Pelletheizung"
|
|
229
|
+
description="Pelletkessel und Pelletöfen. Edelstahl-Systeme garantieren Abgastemperaturen bis T600."
|
|
230
|
+
onClick={() => onChange('pellet')}
|
|
231
|
+
/>
|
|
232
|
+
<ChoiceCard
|
|
233
|
+
selected={value === 'gas'}
|
|
234
|
+
icon={<Fuel className="h-6 w-6" />}
|
|
235
|
+
title="Gas"
|
|
236
|
+
description="Gas-Brennwertgeräte und Gas-Niedertemperaturkessel. Moderne Brennwertsysteme laufen typischerweise im Überdruck."
|
|
237
|
+
onClick={() => onChange('gas')}
|
|
238
|
+
/>
|
|
239
|
+
<ChoiceCard
|
|
240
|
+
selected={value === 'oel'}
|
|
241
|
+
icon={<Fuel className="h-6 w-6" />}
|
|
242
|
+
title="Öl"
|
|
243
|
+
description="Öl-Brennwertgeräte und Öl-Niedertemperaturkessel. Abgastemperatur bestimmt die Materialwahl (PP vs PVDF)."
|
|
244
|
+
onClick={() => onChange('oel')}
|
|
245
|
+
/>
|
|
246
|
+
</div>
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function DruckStep({ value, onChange }: StepProps<Druck>) {
|
|
251
|
+
return (
|
|
252
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
253
|
+
<ChoiceCard
|
|
254
|
+
selected={value === 'ueberdruck'}
|
|
255
|
+
icon={<Gauge className="h-6 w-6" />}
|
|
256
|
+
title="Überdruck"
|
|
257
|
+
description="Moderne Brennwertgeräte arbeiten mit Überdruck im Abgasweg. Typisch für Gas-Brennwert und neuere Öl-Brennwertkessel."
|
|
258
|
+
onClick={() => onChange('ueberdruck')}
|
|
259
|
+
/>
|
|
260
|
+
<ChoiceCard
|
|
261
|
+
selected={value === 'unterdruck'}
|
|
262
|
+
icon={<Gauge className="h-6 w-6" />}
|
|
263
|
+
title="Unterdruck"
|
|
264
|
+
description="Traditionelle Niedertemperaturkessel ziehen Luft durch natürlichen Zug. Erfordert Edelstahlsysteme — PolyFlex-Kunststoff nicht zugelassen."
|
|
265
|
+
onClick={() => onChange('unterdruck')}
|
|
266
|
+
/>
|
|
267
|
+
</div>
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function TemperaturklasseStep({ value, onChange }: StepProps<Temperaturklasse>) {
|
|
272
|
+
return (
|
|
273
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
274
|
+
<ChoiceCard
|
|
275
|
+
selected={value === 't120'}
|
|
276
|
+
icon={<Thermometer className="h-6 w-6" />}
|
|
277
|
+
title="Bis 120 °C (T120)"
|
|
278
|
+
description="Standard-Öl-Brennwertbetrieb. Abgas unter 120 °C ermöglicht den Einsatz von PolyFlex PP — wirtschaftlicher und säurebeständig."
|
|
279
|
+
onClick={() => onChange('t120')}
|
|
280
|
+
/>
|
|
281
|
+
<ChoiceCard
|
|
282
|
+
selected={value === 't160'}
|
|
283
|
+
icon={<Thermometer className="h-6 w-6" />}
|
|
284
|
+
title="Bis 160 °C (T160)"
|
|
285
|
+
description="Erhöhte Abgastemperaturen bei älteren Brennern oder ungünstiger Auslegung. PolyFlex PVDF widersteht Temperaturen bis 160 °C."
|
|
286
|
+
onClick={() => onChange('t160')}
|
|
287
|
+
/>
|
|
288
|
+
</div>
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* =============================================================
|
|
293
|
+
Results screen
|
|
294
|
+
============================================================= */
|
|
295
|
+
|
|
296
|
+
function ResultsScreen({ answers, onReset }: { answers: WizardAnswers; onReset: () => void }) {
|
|
297
|
+
const recommendations = recommendSystems(answers);
|
|
298
|
+
const [primary, ...alternatives] = recommendations;
|
|
299
|
+
|
|
300
|
+
return (
|
|
301
|
+
<div className="space-y-8">
|
|
302
|
+
<div className="space-y-2">
|
|
303
|
+
<h2 className="text-2xl font-bold text-[var(--foreground)] md:text-3xl">
|
|
304
|
+
Ihre Empfehlung
|
|
305
|
+
</h2>
|
|
306
|
+
<p className="text-[var(--muted-foreground)]">
|
|
307
|
+
Basierend auf Ihren Angaben haben wir das passende System für Sie ermittelt.
|
|
308
|
+
Klicken Sie auf „Zum Konfigurator“ — Ihre Angaben werden direkt übernommen.
|
|
309
|
+
</p>
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
<RecommendationCard system={primary} answers={answers} primary />
|
|
313
|
+
|
|
314
|
+
{alternatives.length > 0 && (
|
|
315
|
+
<div className="space-y-4">
|
|
316
|
+
<h3 className="text-lg font-semibold text-[var(--foreground)]">
|
|
317
|
+
Alternative Ausführungen
|
|
318
|
+
</h3>
|
|
319
|
+
<div className="grid gap-4">
|
|
320
|
+
{alternatives.map(system => (
|
|
321
|
+
<RecommendationCard key={system.code} system={system} answers={answers} />
|
|
322
|
+
))}
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
)}
|
|
326
|
+
|
|
327
|
+
<div className="border-t border-[var(--border)] pt-6 text-sm text-[var(--muted-foreground)]">
|
|
328
|
+
<p className="mb-3">
|
|
329
|
+
Unsicher bei der Auswahl? Unsere Vertriebsingenieure prüfen Ihre Konfiguration im
|
|
330
|
+
Rahmen der Fachberatung — verfügbar direkt aus dem Konfigurator.
|
|
331
|
+
</p>
|
|
332
|
+
<Button variant="outline" size="sm" onClick={onReset}>
|
|
333
|
+
<ArrowLeft className="mr-2 h-4 w-4" />
|
|
334
|
+
Neu starten
|
|
335
|
+
</Button>
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function RecommendationCard({
|
|
342
|
+
system,
|
|
343
|
+
answers,
|
|
344
|
+
primary,
|
|
345
|
+
}: {
|
|
346
|
+
system: ReturnType<typeof recommendSystems>[0];
|
|
347
|
+
answers: WizardAnswers;
|
|
348
|
+
primary?: boolean;
|
|
349
|
+
}) {
|
|
350
|
+
const params = useMemo(() => {
|
|
351
|
+
const parts: string[] = [];
|
|
352
|
+
if (answers.betriebsart) parts.push(`fuel=${answers.betriebsart}`);
|
|
353
|
+
if (answers.druck) parts.push(`druck=${answers.druck}`);
|
|
354
|
+
if (answers.temperaturklasse) parts.push(`tempclass=${answers.temperaturklasse}`);
|
|
355
|
+
return parts.length > 0 ? `?${parts.join('&')}` : '';
|
|
356
|
+
}, [answers]);
|
|
357
|
+
|
|
358
|
+
return (
|
|
359
|
+
<Card
|
|
360
|
+
className={cn(
|
|
361
|
+
primary && 'border-[var(--primary)] shadow-md',
|
|
362
|
+
)}
|
|
363
|
+
>
|
|
364
|
+
<CardContent className="p-6">
|
|
365
|
+
<div className="flex flex-col gap-5 md:flex-row md:items-start md:justify-between">
|
|
366
|
+
<div className="flex-1 space-y-4">
|
|
367
|
+
<div>
|
|
368
|
+
{primary && (
|
|
369
|
+
<Badge className="mb-2 bg-[var(--primary)] text-[var(--primary-foreground)]">
|
|
370
|
+
Empfohlen
|
|
371
|
+
</Badge>
|
|
372
|
+
)}
|
|
373
|
+
<h3 className="text-xl font-bold text-[var(--foreground)]">{system.name}</h3>
|
|
374
|
+
<p className="mt-1 text-sm text-[var(--muted-foreground)]">{system.tagline}</p>
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
<div className="flex flex-wrap gap-2">
|
|
378
|
+
<SpecChip label="Material" value={system.material} />
|
|
379
|
+
<SpecChip label="Durchmesser" value={system.diameterRange} />
|
|
380
|
+
<SpecChip label="max. Abgastemperatur" value={system.maxExhaustTemperature} />
|
|
381
|
+
<SpecChip label="Wandstärke" value={system.wallSpec} />
|
|
382
|
+
</div>
|
|
383
|
+
|
|
384
|
+
{system.reasons.length > 0 && (
|
|
385
|
+
<ul className="space-y-1 text-sm text-[var(--muted-foreground)]">
|
|
386
|
+
{system.reasons.map(reason => (
|
|
387
|
+
<li key={reason} className="flex gap-2">
|
|
388
|
+
<Check className="mt-0.5 h-4 w-4 flex-shrink-0 text-[var(--primary)]" />
|
|
389
|
+
<span>{reason}</span>
|
|
390
|
+
</li>
|
|
391
|
+
))}
|
|
392
|
+
</ul>
|
|
393
|
+
)}
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
<div className="flex flex-col gap-2 md:min-w-[180px]">
|
|
397
|
+
<Button asChild size="lg" variant={primary ? 'default' : 'outline'}>
|
|
398
|
+
<Link href={`/product/${system.productSlug}${params}`} prefetch={false}>
|
|
399
|
+
Zum Konfigurator
|
|
400
|
+
<ArrowRight className="ml-2 h-4 w-4" />
|
|
401
|
+
</Link>
|
|
402
|
+
</Button>
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
</CardContent>
|
|
406
|
+
</Card>
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
function SpecChip({ label, value }: { label: string; value: string }) {
|
|
411
|
+
return (
|
|
412
|
+
<div className="inline-flex items-center gap-1.5 rounded-md border border-[var(--border)] bg-[var(--muted)] px-2.5 py-1 text-xs">
|
|
413
|
+
<span className="text-[var(--muted-foreground)]">{label}:</span>
|
|
414
|
+
<span className="font-medium text-[var(--foreground)]">{value}</span>
|
|
415
|
+
</div>
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/* =============================================================
|
|
420
|
+
Main wizard component
|
|
421
|
+
============================================================= */
|
|
422
|
+
|
|
423
|
+
export function SystemFinderWizard() {
|
|
424
|
+
const router = useRouter();
|
|
425
|
+
const searchParams = useSearchParams();
|
|
426
|
+
const [, startTransition] = useTransition();
|
|
427
|
+
|
|
428
|
+
// Derive initial state from URL, validating against the known step set.
|
|
429
|
+
// Anything unrecognised (missing, misspelled, crafted URL) snaps back to
|
|
430
|
+
// the first step. If `ergebnis` is requested without the required answers,
|
|
431
|
+
// also bounce to the first step so the Results screen never renders with
|
|
432
|
+
// empty recommendations.
|
|
433
|
+
const [answers, setAnswersState] = useState<WizardAnswers>(() =>
|
|
434
|
+
decodeAnswers(searchParams.get('s')),
|
|
435
|
+
);
|
|
436
|
+
const [currentStep, setCurrentStepState] = useState<StepId>(() => {
|
|
437
|
+
const raw = searchParams.get('step');
|
|
438
|
+
const initial: StepId = isValidStepId(raw) ? raw : 'bauvorhaben';
|
|
439
|
+
const initialAnswers = decodeAnswers(searchParams.get('s'));
|
|
440
|
+
const hasRequired = !!initialAnswers.bauvorhaben && !!initialAnswers.betriebsart;
|
|
441
|
+
return initial === 'ergebnis' && !hasRequired ? 'bauvorhaben' : initial;
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
const syncToUrl = useCallback(
|
|
445
|
+
(nextAnswers: WizardAnswers, nextStepId: StepId) => {
|
|
446
|
+
const encoded = encodeAnswers(nextAnswers);
|
|
447
|
+
const url = new URL(window.location.href);
|
|
448
|
+
url.searchParams.set('step', nextStepId);
|
|
449
|
+
if (encoded) url.searchParams.set('s', encoded);
|
|
450
|
+
else url.searchParams.delete('s');
|
|
451
|
+
startTransition(() => {
|
|
452
|
+
router.replace(url.pathname + url.search, { scroll: false });
|
|
453
|
+
});
|
|
454
|
+
},
|
|
455
|
+
[router],
|
|
456
|
+
);
|
|
457
|
+
|
|
458
|
+
// Single source-of-truth for URL → state sync. Keeping the side effect
|
|
459
|
+
// out of the state updater makes the updater pure (safe under React
|
|
460
|
+
// StrictMode double-invocation) and removes the stale-closure race
|
|
461
|
+
// between `setAnswers` and `currentStep`. Skip the initial render so
|
|
462
|
+
// we don't redundantly replace the URL with what the URL already says
|
|
463
|
+
// (which would push an extra history entry on a fresh page load).
|
|
464
|
+
const isInitialSync = useRef(true);
|
|
465
|
+
useEffect(() => {
|
|
466
|
+
if (isInitialSync.current) {
|
|
467
|
+
isInitialSync.current = false;
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
syncToUrl(answers, currentStep);
|
|
471
|
+
}, [answers, currentStep, syncToUrl]);
|
|
472
|
+
|
|
473
|
+
const setAnswers = useCallback((patch: Partial<WizardAnswers>) => {
|
|
474
|
+
setAnswersState(prev => ({ ...prev, ...patch }));
|
|
475
|
+
}, []);
|
|
476
|
+
|
|
477
|
+
const goToStep = useCallback((stepId: StepId) => {
|
|
478
|
+
setCurrentStepState(stepId);
|
|
479
|
+
}, []);
|
|
480
|
+
|
|
481
|
+
const handleContinue = () => goToStep(nextStep(currentStep, answers));
|
|
482
|
+
const prevStepId = useMemo(() => prevStep(currentStep, answers), [currentStep, answers]);
|
|
483
|
+
const handleBack = () => {
|
|
484
|
+
if (prevStepId) goToStep(prevStepId);
|
|
485
|
+
};
|
|
486
|
+
const handleReset = () => {
|
|
487
|
+
setAnswersState({});
|
|
488
|
+
setCurrentStepState('bauvorhaben');
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
const canContinue = (() => {
|
|
492
|
+
switch (currentStep) {
|
|
493
|
+
case 'bauvorhaben': return !!answers.bauvorhaben;
|
|
494
|
+
case 'betriebsart': return !!answers.betriebsart;
|
|
495
|
+
case 'druck': return !!answers.druck;
|
|
496
|
+
case 'temperaturklasse': return !!answers.temperaturklasse;
|
|
497
|
+
default: return true;
|
|
498
|
+
}
|
|
499
|
+
})();
|
|
500
|
+
|
|
501
|
+
const stepMeta = STEPS.find(s => s.id === currentStep)!;
|
|
502
|
+
const isResultsScreen = currentStep === 'ergebnis';
|
|
503
|
+
|
|
504
|
+
return (
|
|
505
|
+
<div className="space-y-8">
|
|
506
|
+
{/* Breadcrumb */}
|
|
507
|
+
<nav className="flex items-center gap-1 text-sm text-[var(--muted-foreground)]">
|
|
508
|
+
<Link href="/" className="hover:text-[var(--foreground)]">
|
|
509
|
+
Home
|
|
510
|
+
</Link>
|
|
511
|
+
<ChevronRight className="h-4 w-4" />
|
|
512
|
+
<span className="font-medium text-[var(--foreground)]">System Finder</span>
|
|
513
|
+
</nav>
|
|
514
|
+
|
|
515
|
+
{/* Header */}
|
|
516
|
+
<header className="space-y-3">
|
|
517
|
+
<div className="flex items-center gap-2">
|
|
518
|
+
<HardHat className="h-5 w-5 text-[var(--primary)]" />
|
|
519
|
+
<span className="text-sm font-medium uppercase tracking-wider text-[var(--primary)]">
|
|
520
|
+
System Finder
|
|
521
|
+
</span>
|
|
522
|
+
</div>
|
|
523
|
+
<h1 className="text-3xl font-bold text-[var(--foreground)] md:text-4xl">
|
|
524
|
+
Das passende System für Ihr Vorhaben
|
|
525
|
+
</h1>
|
|
526
|
+
<p className="max-w-2xl text-base text-[var(--muted-foreground)]">
|
|
527
|
+
Beantworten Sie drei bis vier Fragen und wir zeigen Ihnen die passende Systemfamilie
|
|
528
|
+
— StahlLine DW für Festbrennstoffe, PolyFlex PP/PVDF für Brennwert, oder eine
|
|
529
|
+
Mischlösung. Die Antworten werden direkt in den Konfigurator übernommen.
|
|
530
|
+
</p>
|
|
531
|
+
</header>
|
|
532
|
+
|
|
533
|
+
{/* Progress */}
|
|
534
|
+
{!isResultsScreen && (
|
|
535
|
+
<ProgressBar currentStep={currentStep} answers={answers} onJump={goToStep} />
|
|
536
|
+
)}
|
|
537
|
+
|
|
538
|
+
{/* Current step */}
|
|
539
|
+
<section className="space-y-6">
|
|
540
|
+
{!isResultsScreen && (
|
|
541
|
+
<div className="space-y-1">
|
|
542
|
+
<div className="text-sm font-medium text-[var(--muted-foreground)]">
|
|
543
|
+
Schritt {stepMeta.index} von 4
|
|
544
|
+
</div>
|
|
545
|
+
<h2 className="text-xl font-semibold text-[var(--foreground)] md:text-2xl">
|
|
546
|
+
{currentStep === 'bauvorhaben' && 'Welches Bauvorhaben planen Sie?'}
|
|
547
|
+
{currentStep === 'betriebsart' && 'Welche Betriebsart soll angeschlossen werden?'}
|
|
548
|
+
{currentStep === 'druck' && 'Druckzustand der Bestandsanlage?'}
|
|
549
|
+
{currentStep === 'temperaturklasse' && 'Welche Abgastemperatur erwarten Sie?'}
|
|
550
|
+
</h2>
|
|
551
|
+
</div>
|
|
552
|
+
)}
|
|
553
|
+
|
|
554
|
+
{currentStep === 'bauvorhaben' && (
|
|
555
|
+
<BauvorhabenStep
|
|
556
|
+
value={answers.bauvorhaben}
|
|
557
|
+
onChange={v => setAnswers({ bauvorhaben: v })}
|
|
558
|
+
/>
|
|
559
|
+
)}
|
|
560
|
+
{currentStep === 'betriebsart' && (
|
|
561
|
+
<BetriebsartStep
|
|
562
|
+
value={answers.betriebsart}
|
|
563
|
+
onChange={v => setAnswers({ betriebsart: v })}
|
|
564
|
+
/>
|
|
565
|
+
)}
|
|
566
|
+
{currentStep === 'druck' && (
|
|
567
|
+
<DruckStep
|
|
568
|
+
value={answers.druck}
|
|
569
|
+
onChange={v => setAnswers({ druck: v })}
|
|
570
|
+
/>
|
|
571
|
+
)}
|
|
572
|
+
{currentStep === 'temperaturklasse' && (
|
|
573
|
+
<TemperaturklasseStep
|
|
574
|
+
value={answers.temperaturklasse}
|
|
575
|
+
onChange={v => setAnswers({ temperaturklasse: v })}
|
|
576
|
+
/>
|
|
577
|
+
)}
|
|
578
|
+
{isResultsScreen && <ResultsScreen answers={answers} onReset={handleReset} />}
|
|
579
|
+
</section>
|
|
580
|
+
|
|
581
|
+
{/* Nav buttons */}
|
|
582
|
+
{!isResultsScreen && (
|
|
583
|
+
<div className="flex items-center justify-between border-t border-[var(--border)] pt-6">
|
|
584
|
+
<Button
|
|
585
|
+
variant="outline"
|
|
586
|
+
onClick={handleBack}
|
|
587
|
+
disabled={!prevStep(currentStep, answers)}
|
|
588
|
+
>
|
|
589
|
+
<ArrowLeft className="mr-2 h-4 w-4" />
|
|
590
|
+
Zurück
|
|
591
|
+
</Button>
|
|
592
|
+
<Button onClick={handleContinue} disabled={!canContinue}>
|
|
593
|
+
{nextStep(currentStep, answers) === 'ergebnis' ? 'Ergebnis anzeigen' : 'Weiter'}
|
|
594
|
+
<ArrowRight className="ml-2 h-4 w-4" />
|
|
595
|
+
</Button>
|
|
596
|
+
</div>
|
|
597
|
+
)}
|
|
598
|
+
</div>
|
|
599
|
+
);
|
|
600
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# This file is auto-generated. Do not edit manually.
|
|
2
|
+
# Run the following command with your Vendure server running:
|
|
3
|
+
# cd storefront
|
|
4
|
+
# npx gql.tada generate-schema http://localhost:3500/shop-api --output ./src/schema.graphql
|
|
5
|
+
# npx gql.tada generate output --tsconfig ./tsconfig.json
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "gql.tada/ts-plugin",
|
|
22
|
+
"schema": "./src/schema.graphql",
|
|
23
|
+
"tadaOutputLocation": "./src/graphql-env.d.ts"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"paths": {
|
|
27
|
+
"@/*": ["./src/*"]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"],
|
|
31
|
+
"exclude": ["node_modules"],
|
|
32
|
+
"references": [
|
|
33
|
+
{
|
|
34
|
+
"path": "../../libs/storefront-client"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|