@cimplify/sdk 0.44.34 → 0.45.1
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 +21 -16
- package/dist/advanced.d.mts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/{client-5B9IPDmf.d.ts → client-Bsd4Vi_y.d.ts} +1 -0
- package/dist/{client-CpVMRI8V.d.mts → client-C5LcbNxL.d.mts} +1 -0
- package/dist/{client-DMhRxuzm.d.ts → client-DjzIoewX.d.ts} +1 -1
- package/dist/{client-Cwb1sMr3.d.mts → client-EM8xKCPO.d.mts} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/react.d.mts +120 -45
- package/dist/react.d.ts +120 -45
- package/dist/react.js +453 -97
- package/dist/react.mjs +452 -98
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/styles.css +2 -2
- package/dist/testing/suite.d.mts +2 -2
- package/dist/testing/suite.d.ts +2 -2
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/package.json +5 -9
- package/registry/booking-page.json +2 -1
- package/registry/bookings-page.json +1 -1
- package/registry/index.json +24 -0
- package/dist/cli/commands/deploy.mjs +0 -717
- package/dist/cli/commands/dev.mjs +0 -479
- package/dist/cli/commands/domains.mjs +0 -769
- package/dist/cli/commands/env.mjs +0 -705
- package/dist/cli/commands/link.mjs +0 -378
- package/dist/cli/commands/login.mjs +0 -584
- package/dist/cli/commands/logout.mjs +0 -75
- package/dist/cli/commands/logs.mjs +0 -432
- package/dist/cli/commands/projects.mjs +0 -473
- package/dist/cli/commands/repo.mjs +0 -584
- package/dist/cli/commands/rollback.mjs +0 -553
- package/dist/cli/commands/status.mjs +0 -450
- package/dist/cli/commands/unlink.mjs +0 -79
- package/dist/cli/commands/whoami.mjs +0 -285
- package/dist/cli.js +0 -184
- package/dist/dispatcher.mjs +0 -360
- package/registry/service-card.json +0 -16
- package/registry/service-grid.json +0 -16
- package/templates/storefront-bakery/.claude/skills/cimplify-storefront/SKILL.md +0 -145
- package/templates/storefront-bakery/.cursor/rules/cimplify-storefront.mdc +0 -25
- package/templates/storefront-bakery/.env.example +0 -16
- package/templates/storefront-bakery/AGENTS.md +0 -120
- package/templates/storefront-bakery/CLAUDE.md +0 -22
- package/templates/storefront-bakery/README.md +0 -73
- package/templates/storefront-bakery/__tests__/brand.test.ts +0 -4
- package/templates/storefront-bakery/__tests__/cart-flow.test.ts +0 -4
- package/templates/storefront-bakery/__tests__/contract.test.ts +0 -4
- package/templates/storefront-bakery/app/about/page.tsx +0 -38
- package/templates/storefront-bakery/app/accessibility/page.tsx +0 -11
- package/templates/storefront-bakery/app/account/addresses/page.tsx +0 -21
- package/templates/storefront-bakery/app/account/orders/page.tsx +0 -21
- package/templates/storefront-bakery/app/account/page.tsx +0 -22
- package/templates/storefront-bakery/app/account/settings/page.tsx +0 -21
- package/templates/storefront-bakery/app/cart/page.tsx +0 -9
- package/templates/storefront-bakery/app/categories/[slug]/listing-client.tsx +0 -19
- package/templates/storefront-bakery/app/categories/[slug]/page.tsx +0 -118
- package/templates/storefront-bakery/app/checkout/page.tsx +0 -17
- package/templates/storefront-bakery/app/collections/[slug]/listing-client.tsx +0 -20
- package/templates/storefront-bakery/app/collections/[slug]/page.tsx +0 -118
- package/templates/storefront-bakery/app/contact/contact-form.tsx +0 -109
- package/templates/storefront-bakery/app/contact/page.tsx +0 -54
- package/templates/storefront-bakery/app/error.tsx +0 -60
- package/templates/storefront-bakery/app/faq/page.tsx +0 -46
- package/templates/storefront-bakery/app/globals.css +0 -47
- package/templates/storefront-bakery/app/layout.tsx +0 -82
- package/templates/storefront-bakery/app/llms.txt/route.ts +0 -94
- package/templates/storefront-bakery/app/login/page.tsx +0 -17
- package/templates/storefront-bakery/app/not-found.tsx +0 -39
- package/templates/storefront-bakery/app/opensearch.xml/route.ts +0 -37
- package/templates/storefront-bakery/app/orders/[id]/page.tsx +0 -21
- package/templates/storefront-bakery/app/page.tsx +0 -97
- package/templates/storefront-bakery/app/privacy/page.tsx +0 -44
- package/templates/storefront-bakery/app/returns/page.tsx +0 -11
- package/templates/storefront-bakery/app/robots.ts +0 -18
- package/templates/storefront-bakery/app/search/page.tsx +0 -38
- package/templates/storefront-bakery/app/search/search-client.tsx +0 -7
- package/templates/storefront-bakery/app/shipping/page.tsx +0 -16
- package/templates/storefront-bakery/app/shop/page.tsx +0 -31
- package/templates/storefront-bakery/app/shop/shop-client.tsx +0 -27
- package/templates/storefront-bakery/app/signup/page.tsx +0 -17
- package/templates/storefront-bakery/app/sitemap-page/page.tsx +0 -167
- package/templates/storefront-bakery/app/sitemap.ts +0 -62
- package/templates/storefront-bakery/app/terms/page.tsx +0 -44
- package/templates/storefront-bakery/app/track-order/page.tsx +0 -24
- package/templates/storefront-bakery/app/track-order/track-order-form.tsx +0 -69
- package/templates/storefront-bakery/components/account-iframe.tsx +0 -13
- package/templates/storefront-bakery/components/cart-drawer.tsx +0 -14
- package/templates/storefront-bakery/components/cart-pill.tsx +0 -36
- package/templates/storefront-bakery/components/category-grid.tsx +0 -28
- package/templates/storefront-bakery/components/collection-strip.tsx +0 -45
- package/templates/storefront-bakery/components/footer.tsx +0 -148
- package/templates/storefront-bakery/components/header.tsx +0 -43
- package/templates/storefront-bakery/components/hero.tsx +0 -25
- package/templates/storefront-bakery/components/nav-link.tsx +0 -20
- package/templates/storefront-bakery/components/policy-page.tsx +0 -49
- package/templates/storefront-bakery/components/product-modal.tsx +0 -104
- package/templates/storefront-bakery/components/providers.tsx +0 -35
- package/templates/storefront-bakery/components/store-product-card.tsx +0 -87
- package/templates/storefront-bakery/lib/brand.ts +0 -570
- package/templates/storefront-bakery/lib/cart.ts +0 -12
- package/templates/storefront-bakery/next.config.ts +0 -42
- package/templates/storefront-bakery/package.json +0 -35
- package/templates/storefront-bakery/postcss.config.mjs +0 -7
- package/templates/storefront-bakery/tsconfig.json +0 -23
- package/templates/storefront-bakery/vitest.config.ts +0 -9
- package/templates/storefront-fashion/.claude/skills/cimplify-storefront/SKILL.md +0 -145
- package/templates/storefront-fashion/.cursor/rules/cimplify-storefront.mdc +0 -25
- package/templates/storefront-fashion/.env.example +0 -16
- package/templates/storefront-fashion/AGENTS.md +0 -126
- package/templates/storefront-fashion/CLAUDE.md +0 -22
- package/templates/storefront-fashion/README.md +0 -77
- package/templates/storefront-fashion/__tests__/brand.test.ts +0 -4
- package/templates/storefront-fashion/__tests__/cart-flow.test.ts +0 -55
- package/templates/storefront-fashion/__tests__/contract.test.ts +0 -4
- package/templates/storefront-fashion/app/about/page.tsx +0 -41
- package/templates/storefront-fashion/app/accessibility/page.tsx +0 -11
- package/templates/storefront-fashion/app/account/addresses/page.tsx +0 -21
- package/templates/storefront-fashion/app/account/orders/page.tsx +0 -21
- package/templates/storefront-fashion/app/account/page.tsx +0 -22
- package/templates/storefront-fashion/app/account/settings/page.tsx +0 -21
- package/templates/storefront-fashion/app/cart/page.tsx +0 -9
- package/templates/storefront-fashion/app/categories/[slug]/listing-client.tsx +0 -19
- package/templates/storefront-fashion/app/categories/[slug]/page.tsx +0 -130
- package/templates/storefront-fashion/app/checkout/page.tsx +0 -17
- package/templates/storefront-fashion/app/collections/[slug]/listing-client.tsx +0 -20
- package/templates/storefront-fashion/app/collections/[slug]/page.tsx +0 -130
- package/templates/storefront-fashion/app/contact/contact-form.tsx +0 -109
- package/templates/storefront-fashion/app/contact/page.tsx +0 -54
- package/templates/storefront-fashion/app/error.tsx +0 -61
- package/templates/storefront-fashion/app/faq/page.tsx +0 -46
- package/templates/storefront-fashion/app/globals.css +0 -46
- package/templates/storefront-fashion/app/layout.tsx +0 -78
- package/templates/storefront-fashion/app/llms.txt/route.ts +0 -94
- package/templates/storefront-fashion/app/login/page.tsx +0 -17
- package/templates/storefront-fashion/app/lookbook/page.tsx +0 -132
- package/templates/storefront-fashion/app/not-found.tsx +0 -39
- package/templates/storefront-fashion/app/opensearch.xml/route.ts +0 -37
- package/templates/storefront-fashion/app/orders/[id]/page.tsx +0 -24
- package/templates/storefront-fashion/app/page.tsx +0 -183
- package/templates/storefront-fashion/app/privacy/page.tsx +0 -44
- package/templates/storefront-fashion/app/products/[slug]/page.tsx +0 -165
- package/templates/storefront-fashion/app/products/[slug]/product-detail.tsx +0 -70
- package/templates/storefront-fashion/app/returns/page.tsx +0 -11
- package/templates/storefront-fashion/app/robots.ts +0 -18
- package/templates/storefront-fashion/app/search/page.tsx +0 -38
- package/templates/storefront-fashion/app/search/search-client.tsx +0 -7
- package/templates/storefront-fashion/app/shipping/page.tsx +0 -16
- package/templates/storefront-fashion/app/shop/page.tsx +0 -63
- package/templates/storefront-fashion/app/shop/shop-client.tsx +0 -32
- package/templates/storefront-fashion/app/signup/page.tsx +0 -17
- package/templates/storefront-fashion/app/sitemap-page/page.tsx +0 -167
- package/templates/storefront-fashion/app/sitemap.ts +0 -59
- package/templates/storefront-fashion/app/size-guide/page.tsx +0 -155
- package/templates/storefront-fashion/app/terms/page.tsx +0 -44
- package/templates/storefront-fashion/app/track-order/page.tsx +0 -24
- package/templates/storefront-fashion/app/track-order/track-order-form.tsx +0 -69
- package/templates/storefront-fashion/components/account-iframe.tsx +0 -13
- package/templates/storefront-fashion/components/brand-marquee.tsx +0 -27
- package/templates/storefront-fashion/components/cart-drawer.tsx +0 -14
- package/templates/storefront-fashion/components/cart-pill.tsx +0 -36
- package/templates/storefront-fashion/components/category-grid.tsx +0 -28
- package/templates/storefront-fashion/components/category-tiles.tsx +0 -104
- package/templates/storefront-fashion/components/collection-strip.tsx +0 -45
- package/templates/storefront-fashion/components/feature-hero.tsx +0 -82
- package/templates/storefront-fashion/components/footer.tsx +0 -153
- package/templates/storefront-fashion/components/header.tsx +0 -43
- package/templates/storefront-fashion/components/hero.tsx +0 -28
- package/templates/storefront-fashion/components/nav-link.tsx +0 -20
- package/templates/storefront-fashion/components/newsletter.tsx +0 -50
- package/templates/storefront-fashion/components/policy-page.tsx +0 -49
- package/templates/storefront-fashion/components/promo-banner.tsx +0 -41
- package/templates/storefront-fashion/components/providers.tsx +0 -35
- package/templates/storefront-fashion/components/section-heading.tsx +0 -37
- package/templates/storefront-fashion/components/store-product-card.tsx +0 -87
- package/templates/storefront-fashion/components/trade-in-cta.tsx +0 -54
- package/templates/storefront-fashion/components/trust-bar.tsx +0 -66
- package/templates/storefront-fashion/e2e/visual.spec.ts +0 -52
- package/templates/storefront-fashion/lib/brand.ts +0 -518
- package/templates/storefront-fashion/lib/cart.ts +0 -12
- package/templates/storefront-fashion/next.config.ts +0 -42
- package/templates/storefront-fashion/package.json +0 -38
- package/templates/storefront-fashion/playwright.config.ts +0 -48
- package/templates/storefront-fashion/postcss.config.mjs +0 -7
- package/templates/storefront-fashion/tsconfig.json +0 -23
- package/templates/storefront-fashion/vitest.config.ts +0 -9
- package/templates/storefront-grocery/.claude/skills/cimplify-storefront/SKILL.md +0 -145
- package/templates/storefront-grocery/.cursor/rules/cimplify-storefront.mdc +0 -25
- package/templates/storefront-grocery/.env.example +0 -16
- package/templates/storefront-grocery/AGENTS.md +0 -96
- package/templates/storefront-grocery/CLAUDE.md +0 -22
- package/templates/storefront-grocery/README.md +0 -73
- package/templates/storefront-grocery/__tests__/brand.test.ts +0 -4
- package/templates/storefront-grocery/__tests__/cart-flow.test.ts +0 -4
- package/templates/storefront-grocery/__tests__/contract.test.ts +0 -4
- package/templates/storefront-grocery/app/about/page.tsx +0 -38
- package/templates/storefront-grocery/app/accessibility/page.tsx +0 -11
- package/templates/storefront-grocery/app/account/addresses/page.tsx +0 -21
- package/templates/storefront-grocery/app/account/orders/page.tsx +0 -21
- package/templates/storefront-grocery/app/account/page.tsx +0 -22
- package/templates/storefront-grocery/app/account/settings/page.tsx +0 -21
- package/templates/storefront-grocery/app/cart/page.tsx +0 -9
- package/templates/storefront-grocery/app/categories/[slug]/listing-client.tsx +0 -19
- package/templates/storefront-grocery/app/categories/[slug]/page.tsx +0 -118
- package/templates/storefront-grocery/app/checkout/page.tsx +0 -17
- package/templates/storefront-grocery/app/collections/[slug]/listing-client.tsx +0 -20
- package/templates/storefront-grocery/app/collections/[slug]/page.tsx +0 -118
- package/templates/storefront-grocery/app/contact/contact-form.tsx +0 -109
- package/templates/storefront-grocery/app/contact/page.tsx +0 -54
- package/templates/storefront-grocery/app/error.tsx +0 -60
- package/templates/storefront-grocery/app/faq/page.tsx +0 -46
- package/templates/storefront-grocery/app/globals.css +0 -45
- package/templates/storefront-grocery/app/layout.tsx +0 -77
- package/templates/storefront-grocery/app/llms.txt/route.ts +0 -94
- package/templates/storefront-grocery/app/login/page.tsx +0 -17
- package/templates/storefront-grocery/app/not-found.tsx +0 -39
- package/templates/storefront-grocery/app/opensearch.xml/route.ts +0 -37
- package/templates/storefront-grocery/app/orders/[id]/page.tsx +0 -21
- package/templates/storefront-grocery/app/page.tsx +0 -97
- package/templates/storefront-grocery/app/privacy/page.tsx +0 -44
- package/templates/storefront-grocery/app/returns/page.tsx +0 -11
- package/templates/storefront-grocery/app/robots.ts +0 -18
- package/templates/storefront-grocery/app/search/page.tsx +0 -38
- package/templates/storefront-grocery/app/search/search-client.tsx +0 -7
- package/templates/storefront-grocery/app/shipping/page.tsx +0 -16
- package/templates/storefront-grocery/app/shop/page.tsx +0 -31
- package/templates/storefront-grocery/app/shop/shop-client.tsx +0 -27
- package/templates/storefront-grocery/app/signup/page.tsx +0 -17
- package/templates/storefront-grocery/app/sitemap-page/page.tsx +0 -167
- package/templates/storefront-grocery/app/sitemap.ts +0 -62
- package/templates/storefront-grocery/app/terms/page.tsx +0 -44
- package/templates/storefront-grocery/app/track-order/page.tsx +0 -24
- package/templates/storefront-grocery/app/track-order/track-order-form.tsx +0 -69
- package/templates/storefront-grocery/components/account-iframe.tsx +0 -13
- package/templates/storefront-grocery/components/cart-drawer.tsx +0 -14
- package/templates/storefront-grocery/components/cart-pill.tsx +0 -36
- package/templates/storefront-grocery/components/category-grid.tsx +0 -28
- package/templates/storefront-grocery/components/collection-strip.tsx +0 -45
- package/templates/storefront-grocery/components/footer.tsx +0 -148
- package/templates/storefront-grocery/components/header.tsx +0 -43
- package/templates/storefront-grocery/components/hero.tsx +0 -25
- package/templates/storefront-grocery/components/nav-link.tsx +0 -20
- package/templates/storefront-grocery/components/policy-page.tsx +0 -49
- package/templates/storefront-grocery/components/product-modal.tsx +0 -104
- package/templates/storefront-grocery/components/providers.tsx +0 -35
- package/templates/storefront-grocery/components/store-product-card.tsx +0 -87
- package/templates/storefront-grocery/lib/brand.ts +0 -375
- package/templates/storefront-grocery/lib/cart.ts +0 -12
- package/templates/storefront-grocery/next.config.ts +0 -42
- package/templates/storefront-grocery/package.json +0 -35
- package/templates/storefront-grocery/postcss.config.mjs +0 -7
- package/templates/storefront-grocery/tsconfig.json +0 -23
- package/templates/storefront-grocery/vitest.config.ts +0 -9
- package/templates/storefront-restaurant/.claude/skills/cimplify-storefront/SKILL.md +0 -145
- package/templates/storefront-restaurant/.cursor/rules/cimplify-storefront.mdc +0 -25
- package/templates/storefront-restaurant/.env.example +0 -16
- package/templates/storefront-restaurant/AGENTS.md +0 -102
- package/templates/storefront-restaurant/CLAUDE.md +0 -22
- package/templates/storefront-restaurant/README.md +0 -73
- package/templates/storefront-restaurant/__tests__/brand.test.ts +0 -4
- package/templates/storefront-restaurant/__tests__/cart-flow.test.ts +0 -4
- package/templates/storefront-restaurant/__tests__/contract.test.ts +0 -4
- package/templates/storefront-restaurant/app/about/page.tsx +0 -38
- package/templates/storefront-restaurant/app/accessibility/page.tsx +0 -11
- package/templates/storefront-restaurant/app/account/addresses/page.tsx +0 -21
- package/templates/storefront-restaurant/app/account/orders/page.tsx +0 -21
- package/templates/storefront-restaurant/app/account/page.tsx +0 -22
- package/templates/storefront-restaurant/app/account/settings/page.tsx +0 -21
- package/templates/storefront-restaurant/app/cart/page.tsx +0 -9
- package/templates/storefront-restaurant/app/categories/[slug]/listing-client.tsx +0 -19
- package/templates/storefront-restaurant/app/categories/[slug]/page.tsx +0 -118
- package/templates/storefront-restaurant/app/checkout/page.tsx +0 -17
- package/templates/storefront-restaurant/app/collections/[slug]/listing-client.tsx +0 -20
- package/templates/storefront-restaurant/app/collections/[slug]/page.tsx +0 -118
- package/templates/storefront-restaurant/app/contact/contact-form.tsx +0 -109
- package/templates/storefront-restaurant/app/contact/page.tsx +0 -54
- package/templates/storefront-restaurant/app/error.tsx +0 -60
- package/templates/storefront-restaurant/app/faq/page.tsx +0 -46
- package/templates/storefront-restaurant/app/globals.css +0 -44
- package/templates/storefront-restaurant/app/layout.tsx +0 -82
- package/templates/storefront-restaurant/app/llms.txt/route.ts +0 -94
- package/templates/storefront-restaurant/app/login/page.tsx +0 -17
- package/templates/storefront-restaurant/app/not-found.tsx +0 -39
- package/templates/storefront-restaurant/app/opensearch.xml/route.ts +0 -37
- package/templates/storefront-restaurant/app/orders/[id]/page.tsx +0 -21
- package/templates/storefront-restaurant/app/page.tsx +0 -97
- package/templates/storefront-restaurant/app/privacy/page.tsx +0 -44
- package/templates/storefront-restaurant/app/reservations/page.tsx +0 -66
- package/templates/storefront-restaurant/app/reservations/reservations-client.tsx +0 -234
- package/templates/storefront-restaurant/app/returns/page.tsx +0 -11
- package/templates/storefront-restaurant/app/robots.ts +0 -18
- package/templates/storefront-restaurant/app/search/page.tsx +0 -38
- package/templates/storefront-restaurant/app/search/search-client.tsx +0 -7
- package/templates/storefront-restaurant/app/shipping/page.tsx +0 -16
- package/templates/storefront-restaurant/app/shop/page.tsx +0 -31
- package/templates/storefront-restaurant/app/shop/shop-client.tsx +0 -27
- package/templates/storefront-restaurant/app/signup/page.tsx +0 -17
- package/templates/storefront-restaurant/app/sitemap-page/page.tsx +0 -167
- package/templates/storefront-restaurant/app/sitemap.ts +0 -62
- package/templates/storefront-restaurant/app/terms/page.tsx +0 -44
- package/templates/storefront-restaurant/app/track-order/page.tsx +0 -24
- package/templates/storefront-restaurant/app/track-order/track-order-form.tsx +0 -69
- package/templates/storefront-restaurant/components/account-iframe.tsx +0 -13
- package/templates/storefront-restaurant/components/cart-drawer.tsx +0 -14
- package/templates/storefront-restaurant/components/cart-pill.tsx +0 -36
- package/templates/storefront-restaurant/components/category-grid.tsx +0 -28
- package/templates/storefront-restaurant/components/collection-strip.tsx +0 -45
- package/templates/storefront-restaurant/components/footer.tsx +0 -148
- package/templates/storefront-restaurant/components/header.tsx +0 -43
- package/templates/storefront-restaurant/components/hero.tsx +0 -25
- package/templates/storefront-restaurant/components/nav-link.tsx +0 -20
- package/templates/storefront-restaurant/components/policy-page.tsx +0 -49
- package/templates/storefront-restaurant/components/product-modal.tsx +0 -104
- package/templates/storefront-restaurant/components/providers.tsx +0 -35
- package/templates/storefront-restaurant/components/store-product-card.tsx +0 -87
- package/templates/storefront-restaurant/lib/brand.ts +0 -377
- package/templates/storefront-restaurant/lib/cart.ts +0 -12
- package/templates/storefront-restaurant/next.config.ts +0 -42
- package/templates/storefront-restaurant/package.json +0 -35
- package/templates/storefront-restaurant/postcss.config.mjs +0 -7
- package/templates/storefront-restaurant/tsconfig.json +0 -23
- package/templates/storefront-restaurant/vitest.config.ts +0 -9
- package/templates/storefront-retail/.claude/skills/cimplify-storefront/SKILL.md +0 -145
- package/templates/storefront-retail/.cursor/rules/cimplify-storefront.mdc +0 -25
- package/templates/storefront-retail/.env.example +0 -16
- package/templates/storefront-retail/AGENTS.md +0 -117
- package/templates/storefront-retail/CLAUDE.md +0 -22
- package/templates/storefront-retail/README.md +0 -77
- package/templates/storefront-retail/__tests__/brand.test.ts +0 -4
- package/templates/storefront-retail/__tests__/cart-flow.test.ts +0 -4
- package/templates/storefront-retail/__tests__/contract.test.ts +0 -4
- package/templates/storefront-retail/app/about/page.tsx +0 -41
- package/templates/storefront-retail/app/accessibility/page.tsx +0 -11
- package/templates/storefront-retail/app/account/addresses/page.tsx +0 -21
- package/templates/storefront-retail/app/account/orders/page.tsx +0 -21
- package/templates/storefront-retail/app/account/page.tsx +0 -22
- package/templates/storefront-retail/app/account/settings/page.tsx +0 -21
- package/templates/storefront-retail/app/cart/page.tsx +0 -9
- package/templates/storefront-retail/app/categories/[slug]/listing-client.tsx +0 -19
- package/templates/storefront-retail/app/categories/[slug]/page.tsx +0 -130
- package/templates/storefront-retail/app/checkout/page.tsx +0 -17
- package/templates/storefront-retail/app/collections/[slug]/listing-client.tsx +0 -20
- package/templates/storefront-retail/app/collections/[slug]/page.tsx +0 -130
- package/templates/storefront-retail/app/contact/contact-form.tsx +0 -109
- package/templates/storefront-retail/app/contact/page.tsx +0 -54
- package/templates/storefront-retail/app/error.tsx +0 -61
- package/templates/storefront-retail/app/faq/page.tsx +0 -46
- package/templates/storefront-retail/app/globals.css +0 -47
- package/templates/storefront-retail/app/layout.tsx +0 -77
- package/templates/storefront-retail/app/llms.txt/route.ts +0 -94
- package/templates/storefront-retail/app/login/page.tsx +0 -17
- package/templates/storefront-retail/app/not-found.tsx +0 -39
- package/templates/storefront-retail/app/opensearch.xml/route.ts +0 -37
- package/templates/storefront-retail/app/orders/[id]/page.tsx +0 -24
- package/templates/storefront-retail/app/page.tsx +0 -182
- package/templates/storefront-retail/app/privacy/page.tsx +0 -44
- package/templates/storefront-retail/app/products/[slug]/page.tsx +0 -165
- package/templates/storefront-retail/app/products/[slug]/product-detail.tsx +0 -70
- package/templates/storefront-retail/app/returns/page.tsx +0 -11
- package/templates/storefront-retail/app/robots.ts +0 -18
- package/templates/storefront-retail/app/search/page.tsx +0 -38
- package/templates/storefront-retail/app/search/search-client.tsx +0 -7
- package/templates/storefront-retail/app/shipping/page.tsx +0 -16
- package/templates/storefront-retail/app/shop/page.tsx +0 -63
- package/templates/storefront-retail/app/shop/shop-client.tsx +0 -32
- package/templates/storefront-retail/app/signup/page.tsx +0 -17
- package/templates/storefront-retail/app/sitemap-page/page.tsx +0 -167
- package/templates/storefront-retail/app/sitemap.ts +0 -59
- package/templates/storefront-retail/app/terms/page.tsx +0 -44
- package/templates/storefront-retail/app/track-order/page.tsx +0 -24
- package/templates/storefront-retail/app/track-order/track-order-form.tsx +0 -69
- package/templates/storefront-retail/components/account-iframe.tsx +0 -13
- package/templates/storefront-retail/components/brand-marquee.tsx +0 -27
- package/templates/storefront-retail/components/cart-drawer.tsx +0 -14
- package/templates/storefront-retail/components/cart-pill.tsx +0 -36
- package/templates/storefront-retail/components/category-grid.tsx +0 -28
- package/templates/storefront-retail/components/category-tiles.tsx +0 -104
- package/templates/storefront-retail/components/collection-strip.tsx +0 -45
- package/templates/storefront-retail/components/feature-hero.tsx +0 -84
- package/templates/storefront-retail/components/footer.tsx +0 -153
- package/templates/storefront-retail/components/header.tsx +0 -45
- package/templates/storefront-retail/components/hero.tsx +0 -28
- package/templates/storefront-retail/components/nav-link.tsx +0 -20
- package/templates/storefront-retail/components/newsletter.tsx +0 -50
- package/templates/storefront-retail/components/policy-page.tsx +0 -49
- package/templates/storefront-retail/components/promo-banner.tsx +0 -41
- package/templates/storefront-retail/components/providers.tsx +0 -35
- package/templates/storefront-retail/components/section-heading.tsx +0 -37
- package/templates/storefront-retail/components/store-product-card.tsx +0 -87
- package/templates/storefront-retail/components/trade-in-cta.tsx +0 -54
- package/templates/storefront-retail/components/trust-bar.tsx +0 -66
- package/templates/storefront-retail/lib/brand.ts +0 -664
- package/templates/storefront-retail/lib/cart.ts +0 -12
- package/templates/storefront-retail/next.config.ts +0 -42
- package/templates/storefront-retail/package.json +0 -35
- package/templates/storefront-retail/postcss.config.mjs +0 -7
- package/templates/storefront-retail/tsconfig.json +0 -23
- package/templates/storefront-retail/vitest.config.ts +0 -9
- package/templates/storefront-services/.claude/skills/cimplify-storefront/SKILL.md +0 -145
- package/templates/storefront-services/.cursor/rules/cimplify-storefront.mdc +0 -25
- package/templates/storefront-services/.env.example +0 -16
- package/templates/storefront-services/AGENTS.md +0 -101
- package/templates/storefront-services/CLAUDE.md +0 -22
- package/templates/storefront-services/README.md +0 -73
- package/templates/storefront-services/__tests__/brand.test.ts +0 -4
- package/templates/storefront-services/__tests__/cart-flow.test.ts +0 -4
- package/templates/storefront-services/__tests__/contract.test.ts +0 -4
- package/templates/storefront-services/app/about/page.tsx +0 -38
- package/templates/storefront-services/app/accessibility/page.tsx +0 -11
- package/templates/storefront-services/app/account/addresses/page.tsx +0 -21
- package/templates/storefront-services/app/account/orders/page.tsx +0 -21
- package/templates/storefront-services/app/account/page.tsx +0 -22
- package/templates/storefront-services/app/account/settings/page.tsx +0 -21
- package/templates/storefront-services/app/book/book-client.tsx +0 -195
- package/templates/storefront-services/app/book/page.tsx +0 -65
- package/templates/storefront-services/app/cart/page.tsx +0 -9
- package/templates/storefront-services/app/categories/[slug]/listing-client.tsx +0 -19
- package/templates/storefront-services/app/categories/[slug]/page.tsx +0 -118
- package/templates/storefront-services/app/checkout/page.tsx +0 -17
- package/templates/storefront-services/app/collections/[slug]/listing-client.tsx +0 -20
- package/templates/storefront-services/app/collections/[slug]/page.tsx +0 -118
- package/templates/storefront-services/app/contact/contact-form.tsx +0 -109
- package/templates/storefront-services/app/contact/page.tsx +0 -54
- package/templates/storefront-services/app/error.tsx +0 -60
- package/templates/storefront-services/app/faq/page.tsx +0 -46
- package/templates/storefront-services/app/globals.css +0 -45
- package/templates/storefront-services/app/layout.tsx +0 -82
- package/templates/storefront-services/app/llms.txt/route.ts +0 -94
- package/templates/storefront-services/app/login/page.tsx +0 -17
- package/templates/storefront-services/app/not-found.tsx +0 -39
- package/templates/storefront-services/app/opensearch.xml/route.ts +0 -37
- package/templates/storefront-services/app/orders/[id]/page.tsx +0 -21
- package/templates/storefront-services/app/page.tsx +0 -97
- package/templates/storefront-services/app/privacy/page.tsx +0 -44
- package/templates/storefront-services/app/returns/page.tsx +0 -11
- package/templates/storefront-services/app/robots.ts +0 -18
- package/templates/storefront-services/app/search/page.tsx +0 -38
- package/templates/storefront-services/app/search/search-client.tsx +0 -7
- package/templates/storefront-services/app/shipping/page.tsx +0 -16
- package/templates/storefront-services/app/shop/page.tsx +0 -31
- package/templates/storefront-services/app/shop/shop-client.tsx +0 -27
- package/templates/storefront-services/app/signup/page.tsx +0 -17
- package/templates/storefront-services/app/sitemap-page/page.tsx +0 -167
- package/templates/storefront-services/app/sitemap.ts +0 -62
- package/templates/storefront-services/app/terms/page.tsx +0 -44
- package/templates/storefront-services/app/track-order/page.tsx +0 -24
- package/templates/storefront-services/app/track-order/track-order-form.tsx +0 -69
- package/templates/storefront-services/components/account-iframe.tsx +0 -13
- package/templates/storefront-services/components/cart-drawer.tsx +0 -14
- package/templates/storefront-services/components/cart-pill.tsx +0 -36
- package/templates/storefront-services/components/category-grid.tsx +0 -28
- package/templates/storefront-services/components/collection-strip.tsx +0 -45
- package/templates/storefront-services/components/footer.tsx +0 -148
- package/templates/storefront-services/components/header.tsx +0 -43
- package/templates/storefront-services/components/hero.tsx +0 -25
- package/templates/storefront-services/components/nav-link.tsx +0 -20
- package/templates/storefront-services/components/policy-page.tsx +0 -49
- package/templates/storefront-services/components/product-modal.tsx +0 -104
- package/templates/storefront-services/components/providers.tsx +0 -35
- package/templates/storefront-services/components/store-product-card.tsx +0 -87
- package/templates/storefront-services/lib/brand.ts +0 -396
- package/templates/storefront-services/lib/cart.ts +0 -12
- package/templates/storefront-services/next.config.ts +0 -42
- package/templates/storefront-services/package.json +0 -35
- package/templates/storefront-services/postcss.config.mjs +0 -7
- package/templates/storefront-services/tsconfig.json +0 -23
- package/templates/storefront-services/vitest.config.ts +0 -9
package/dist/react.js
CHANGED
|
@@ -9480,6 +9480,457 @@ function BookingList({
|
|
|
9480
9480
|
booking.order_id
|
|
9481
9481
|
)) });
|
|
9482
9482
|
}
|
|
9483
|
+
var ANY_VALUE2 = "__any__";
|
|
9484
|
+
function roomToResource(room) {
|
|
9485
|
+
return {
|
|
9486
|
+
id: room.id,
|
|
9487
|
+
name: room.name,
|
|
9488
|
+
capacity: room.capacity,
|
|
9489
|
+
floor: room.floor,
|
|
9490
|
+
is_available: room.status === "available"
|
|
9491
|
+
};
|
|
9492
|
+
}
|
|
9493
|
+
function ResourcePicker({
|
|
9494
|
+
resources,
|
|
9495
|
+
selectedResourceId,
|
|
9496
|
+
onResourceSelect,
|
|
9497
|
+
showAnyOption = true,
|
|
9498
|
+
anyLabel = "Any available",
|
|
9499
|
+
renderImage,
|
|
9500
|
+
className,
|
|
9501
|
+
classNames
|
|
9502
|
+
}) {
|
|
9503
|
+
const groupValue = selectedResourceId === null ? ANY_VALUE2 : selectedResourceId ?? "";
|
|
9504
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9505
|
+
radioGroup.RadioGroup,
|
|
9506
|
+
{
|
|
9507
|
+
"data-cimplify-resource-picker": true,
|
|
9508
|
+
className: cn("flex flex-col gap-2", className, classNames?.root),
|
|
9509
|
+
value: groupValue,
|
|
9510
|
+
onValueChange: (value) => {
|
|
9511
|
+
onResourceSelect?.(value === ANY_VALUE2 ? null : value);
|
|
9512
|
+
},
|
|
9513
|
+
children: [
|
|
9514
|
+
showAnyOption && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9515
|
+
radio.Radio.Root,
|
|
9516
|
+
{
|
|
9517
|
+
value: ANY_VALUE2,
|
|
9518
|
+
"data-cimplify-resource-option": true,
|
|
9519
|
+
"data-selected": selectedResourceId === null || void 0,
|
|
9520
|
+
"data-any": true,
|
|
9521
|
+
className: cn(
|
|
9522
|
+
"flex items-center gap-3 rounded-lg border border-border p-3 transition-colors cursor-pointer",
|
|
9523
|
+
"hover:bg-muted data-[checked]:border-primary data-[checked]:bg-primary/5",
|
|
9524
|
+
classNames?.option
|
|
9525
|
+
),
|
|
9526
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-resource-name": true, className: cn("font-medium text-foreground", classNames?.name), children: anyLabel })
|
|
9527
|
+
}
|
|
9528
|
+
),
|
|
9529
|
+
resources.map((resource) => {
|
|
9530
|
+
const unavailable = resource.is_available === false;
|
|
9531
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9532
|
+
radio.Radio.Root,
|
|
9533
|
+
{
|
|
9534
|
+
value: resource.id,
|
|
9535
|
+
disabled: unavailable,
|
|
9536
|
+
"data-cimplify-resource-option": true,
|
|
9537
|
+
"data-selected": selectedResourceId === resource.id || void 0,
|
|
9538
|
+
"data-unavailable": unavailable || void 0,
|
|
9539
|
+
className: cn(
|
|
9540
|
+
"flex items-center gap-3 rounded-lg border border-border p-3 transition-colors cursor-pointer",
|
|
9541
|
+
"hover:bg-muted data-[checked]:border-primary data-[checked]:bg-primary/5",
|
|
9542
|
+
unavailable && "opacity-50 cursor-not-allowed",
|
|
9543
|
+
classNames?.option,
|
|
9544
|
+
unavailable ? classNames?.unavailable : void 0
|
|
9545
|
+
),
|
|
9546
|
+
children: [
|
|
9547
|
+
resource.image_url && (renderImage ? renderImage({
|
|
9548
|
+
src: resource.image_url,
|
|
9549
|
+
alt: resource.name,
|
|
9550
|
+
className: classNames?.image
|
|
9551
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
9552
|
+
"img",
|
|
9553
|
+
{
|
|
9554
|
+
src: resource.image_url,
|
|
9555
|
+
alt: resource.name,
|
|
9556
|
+
"data-cimplify-resource-image": true,
|
|
9557
|
+
className: cn("w-10 h-10 rounded-lg object-cover", classNames?.image)
|
|
9558
|
+
}
|
|
9559
|
+
)),
|
|
9560
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [
|
|
9561
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-resource-name": true, className: cn("font-medium text-foreground", classNames?.name), children: resource.name }),
|
|
9562
|
+
resource.description && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-resource-description": true, className: cn("text-sm text-muted-foreground truncate", classNames?.description), children: resource.description }),
|
|
9563
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-resource-meta": true, className: cn("flex items-center gap-2 text-xs text-muted-foreground", classNames?.meta), children: [
|
|
9564
|
+
resource.capacity !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-resource-capacity": true, className: classNames?.capacity, children: [
|
|
9565
|
+
"Up to ",
|
|
9566
|
+
resource.capacity
|
|
9567
|
+
] }),
|
|
9568
|
+
resource.floor && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-resource-floor": true, className: classNames?.floor, children: resource.floor })
|
|
9569
|
+
] })
|
|
9570
|
+
] })
|
|
9571
|
+
]
|
|
9572
|
+
},
|
|
9573
|
+
resource.id
|
|
9574
|
+
);
|
|
9575
|
+
})
|
|
9576
|
+
]
|
|
9577
|
+
}
|
|
9578
|
+
);
|
|
9579
|
+
}
|
|
9580
|
+
var STEP = {
|
|
9581
|
+
SELECT_SLOT: "select-slot",
|
|
9582
|
+
SELECT_RESOURCE: "select-resource",
|
|
9583
|
+
SELECT_STAFF: "select-staff",
|
|
9584
|
+
CONFIRM: "confirm"
|
|
9585
|
+
};
|
|
9586
|
+
function BookingPage({
|
|
9587
|
+
service,
|
|
9588
|
+
product,
|
|
9589
|
+
staff,
|
|
9590
|
+
resources,
|
|
9591
|
+
participantCount,
|
|
9592
|
+
title,
|
|
9593
|
+
onBooked,
|
|
9594
|
+
onBack,
|
|
9595
|
+
existingBooking,
|
|
9596
|
+
onRescheduled,
|
|
9597
|
+
showPrice = true,
|
|
9598
|
+
className,
|
|
9599
|
+
classNames
|
|
9600
|
+
}) {
|
|
9601
|
+
const { addItem } = useCart();
|
|
9602
|
+
const { client } = useCimplifyClient();
|
|
9603
|
+
const isReschedule = existingBooking !== void 0;
|
|
9604
|
+
const [step, setStep] = React10.useState(STEP.SELECT_SLOT);
|
|
9605
|
+
const [selectedSlot, setSelectedSlot] = React10.useState(null);
|
|
9606
|
+
const [selectedDate, setSelectedDate] = React10.useState(null);
|
|
9607
|
+
const [selectedStaffId, setSelectedStaffId] = React10.useState(null);
|
|
9608
|
+
const [selectedResourceId, setSelectedResourceId] = React10.useState(null);
|
|
9609
|
+
const [isSubmitting, setIsSubmitting] = React10.useState(false);
|
|
9610
|
+
const [error, setError] = React10.useState(null);
|
|
9611
|
+
const hasResourceStep = resources && resources.length > 0;
|
|
9612
|
+
const hasStaffStep = staff && staff.length > 0;
|
|
9613
|
+
const depositType = product?.deposit_type;
|
|
9614
|
+
const depositAmount = product?.deposit_amount;
|
|
9615
|
+
const hasDeposit = depositType !== void 0 && depositType !== "none" && depositAmount !== void 0 && chunkBN2CXGMO_js.parsePrice(depositAmount) !== 0;
|
|
9616
|
+
const cancellationMinutes = product?.cancellation_window_minutes;
|
|
9617
|
+
const noShowFee = product?.no_show_fee;
|
|
9618
|
+
const handleSlotSelect = React10.useCallback(
|
|
9619
|
+
(slot, date) => {
|
|
9620
|
+
setSelectedSlot(slot);
|
|
9621
|
+
setSelectedDate(date);
|
|
9622
|
+
setError(null);
|
|
9623
|
+
if (hasResourceStep) {
|
|
9624
|
+
setStep(STEP.SELECT_RESOURCE);
|
|
9625
|
+
} else if (hasStaffStep) {
|
|
9626
|
+
setStep(STEP.SELECT_STAFF);
|
|
9627
|
+
} else {
|
|
9628
|
+
setStep(STEP.CONFIRM);
|
|
9629
|
+
}
|
|
9630
|
+
},
|
|
9631
|
+
[hasResourceStep, hasStaffStep]
|
|
9632
|
+
);
|
|
9633
|
+
const handleResourceSelect = React10.useCallback(
|
|
9634
|
+
(resourceId) => {
|
|
9635
|
+
setSelectedResourceId(resourceId);
|
|
9636
|
+
if (hasStaffStep) {
|
|
9637
|
+
setStep(STEP.SELECT_STAFF);
|
|
9638
|
+
} else {
|
|
9639
|
+
setStep(STEP.CONFIRM);
|
|
9640
|
+
}
|
|
9641
|
+
},
|
|
9642
|
+
[hasStaffStep]
|
|
9643
|
+
);
|
|
9644
|
+
const handleStaffSelect = React10.useCallback((staffId) => {
|
|
9645
|
+
setSelectedStaffId(staffId);
|
|
9646
|
+
setStep(STEP.CONFIRM);
|
|
9647
|
+
}, []);
|
|
9648
|
+
const handleBack = React10.useCallback(() => {
|
|
9649
|
+
setError(null);
|
|
9650
|
+
if (step === STEP.CONFIRM && hasStaffStep) {
|
|
9651
|
+
setStep(STEP.SELECT_STAFF);
|
|
9652
|
+
} else if (step === STEP.CONFIRM && hasResourceStep) {
|
|
9653
|
+
setStep(STEP.SELECT_RESOURCE);
|
|
9654
|
+
} else if (step === STEP.SELECT_STAFF && hasResourceStep) {
|
|
9655
|
+
setStep(STEP.SELECT_RESOURCE);
|
|
9656
|
+
} else if (step === STEP.CONFIRM || step === STEP.SELECT_STAFF || step === STEP.SELECT_RESOURCE) {
|
|
9657
|
+
setStep(STEP.SELECT_SLOT);
|
|
9658
|
+
} else {
|
|
9659
|
+
onBack?.();
|
|
9660
|
+
}
|
|
9661
|
+
}, [step, hasStaffStep, hasResourceStep, onBack]);
|
|
9662
|
+
const handleConfirm = React10.useCallback(async () => {
|
|
9663
|
+
if (!selectedSlot || !selectedDate) return;
|
|
9664
|
+
setIsSubmitting(true);
|
|
9665
|
+
setError(null);
|
|
9666
|
+
try {
|
|
9667
|
+
if (isReschedule && existingBooking) {
|
|
9668
|
+
const serviceItem = existingBooking.service_items[0];
|
|
9669
|
+
const result = await client.scheduling.rescheduleBooking({
|
|
9670
|
+
order_id: existingBooking.order_id,
|
|
9671
|
+
line_item_id: serviceItem?.service_id ?? existingBooking.order_id,
|
|
9672
|
+
new_start_time: selectedSlot.start_time,
|
|
9673
|
+
new_end_time: selectedSlot.end_time,
|
|
9674
|
+
new_staff_id: selectedStaffId || void 0,
|
|
9675
|
+
reschedule_type: "customer"
|
|
9676
|
+
});
|
|
9677
|
+
if (!result.ok) {
|
|
9678
|
+
throw result.error;
|
|
9679
|
+
}
|
|
9680
|
+
onRescheduled?.(existingBooking, selectedSlot);
|
|
9681
|
+
} else {
|
|
9682
|
+
const serviceProduct = {
|
|
9683
|
+
id: service.product_id || service.id,
|
|
9684
|
+
business_id: service.business_id || "",
|
|
9685
|
+
category_id: service.category_id || void 0,
|
|
9686
|
+
name: service.name,
|
|
9687
|
+
slug: service.id,
|
|
9688
|
+
description: service.description || void 0,
|
|
9689
|
+
image_url: service.image_url || void 0,
|
|
9690
|
+
default_price: service.price || "0",
|
|
9691
|
+
type: "service",
|
|
9692
|
+
inventory_type: "none",
|
|
9693
|
+
variant_strategy: "fetch_all",
|
|
9694
|
+
is_active: service.is_available,
|
|
9695
|
+
created_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
9696
|
+
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
9697
|
+
};
|
|
9698
|
+
await addItem(serviceProduct, 1, {
|
|
9699
|
+
scheduledStart: selectedSlot.start_time,
|
|
9700
|
+
scheduledEnd: selectedSlot.end_time,
|
|
9701
|
+
staffId: selectedStaffId || void 0,
|
|
9702
|
+
resourceId: selectedResourceId || void 0
|
|
9703
|
+
});
|
|
9704
|
+
onBooked?.(selectedSlot, selectedStaffId);
|
|
9705
|
+
}
|
|
9706
|
+
} catch (err) {
|
|
9707
|
+
const fallbackMessage = isReschedule ? "Failed to reschedule booking" : "Failed to add booking to cart";
|
|
9708
|
+
setError(err instanceof Error ? err.message : fallbackMessage);
|
|
9709
|
+
} finally {
|
|
9710
|
+
setIsSubmitting(false);
|
|
9711
|
+
}
|
|
9712
|
+
}, [selectedSlot, selectedDate, selectedStaffId, service, addItem, onBooked, isReschedule, existingBooking, client, onRescheduled]);
|
|
9713
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-page": true, className: cn(className, classNames?.root), children: [
|
|
9714
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-page-header": true, className: classNames?.header, children: [
|
|
9715
|
+
onBack && step === STEP.SELECT_SLOT && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9716
|
+
"button",
|
|
9717
|
+
{
|
|
9718
|
+
type: "button",
|
|
9719
|
+
onClick: onBack,
|
|
9720
|
+
"data-cimplify-booking-page-back": true,
|
|
9721
|
+
className: classNames?.backButton,
|
|
9722
|
+
children: "Back"
|
|
9723
|
+
}
|
|
9724
|
+
),
|
|
9725
|
+
step !== STEP.SELECT_SLOT && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9726
|
+
"button",
|
|
9727
|
+
{
|
|
9728
|
+
type: "button",
|
|
9729
|
+
onClick: handleBack,
|
|
9730
|
+
"data-cimplify-booking-page-back": true,
|
|
9731
|
+
className: classNames?.backButton,
|
|
9732
|
+
children: "Back"
|
|
9733
|
+
}
|
|
9734
|
+
),
|
|
9735
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { "data-cimplify-booking-page-title": true, className: classNames?.title, children: title || (isReschedule ? "Reschedule Booking" : `Book ${service.name}`) })
|
|
9736
|
+
] }),
|
|
9737
|
+
isReschedule && existingBooking && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-booking-reschedule-info": true, className: classNames?.rescheduleInfo, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
9738
|
+
"Rescheduling booking from ",
|
|
9739
|
+
new Date(existingBooking.service_items[0]?.scheduled_start ?? existingBooking.created_at).toLocaleDateString()
|
|
9740
|
+
] }) }),
|
|
9741
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-service-info": true, className: classNames?.serviceInfo, children: [
|
|
9742
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-booking-service-name": true, children: service.name }),
|
|
9743
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-booking-service-duration": true, children: formatDuration2(service.duration_minutes, service.duration_unit) }),
|
|
9744
|
+
service.price && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-booking-service-price": true, children: /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: service.price }) }),
|
|
9745
|
+
hasDeposit && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-booking-deposit-info": true, className: classNames?.depositInfo, children: [
|
|
9746
|
+
"Deposit: ",
|
|
9747
|
+
depositType === "percentage" ? `${chunkBN2CXGMO_js.parsePrice(depositAmount)}%` : /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: depositAmount })
|
|
9748
|
+
] }),
|
|
9749
|
+
cancellationMinutes !== void 0 && cancellationMinutes > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-booking-cancellation-policy": true, className: classNames?.cancellationPolicy, children: [
|
|
9750
|
+
"Free cancellation up to ",
|
|
9751
|
+
cancellationMinutes >= 60 ? `${Math.floor(cancellationMinutes / 60)} hour${Math.floor(cancellationMinutes / 60) !== 1 ? "s" : ""}` : `${cancellationMinutes} minute${cancellationMinutes !== 1 ? "s" : ""}`,
|
|
9752
|
+
" before"
|
|
9753
|
+
] }),
|
|
9754
|
+
noShowFee !== void 0 && chunkBN2CXGMO_js.parsePrice(noShowFee) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-booking-no-show-fee": true, className: classNames?.cancellationPolicy, children: [
|
|
9755
|
+
"No-show fee: ",
|
|
9756
|
+
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: noShowFee })
|
|
9757
|
+
] })
|
|
9758
|
+
] }),
|
|
9759
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-booking-error": true, className: classNames?.error, children: error }),
|
|
9760
|
+
step === STEP.SELECT_SLOT && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-step": "select-slot", className: classNames?.step, children: [
|
|
9761
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { "data-cimplify-booking-step-title": true, className: classNames?.stepTitle, children: "Select a date & time" }),
|
|
9762
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9763
|
+
DateSlotPicker,
|
|
9764
|
+
{
|
|
9765
|
+
serviceId: service.id,
|
|
9766
|
+
participantCount,
|
|
9767
|
+
selectedSlot,
|
|
9768
|
+
onSlotSelect: handleSlotSelect,
|
|
9769
|
+
showPrice
|
|
9770
|
+
}
|
|
9771
|
+
)
|
|
9772
|
+
] }),
|
|
9773
|
+
step === STEP.SELECT_RESOURCE && resources && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-step": "select-resource", className: cn(classNames?.step, classNames?.resourceStep), children: [
|
|
9774
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { "data-cimplify-booking-step-title": true, className: classNames?.stepTitle, children: "Choose a room" }),
|
|
9775
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9776
|
+
ResourcePicker,
|
|
9777
|
+
{
|
|
9778
|
+
resources,
|
|
9779
|
+
selectedResourceId,
|
|
9780
|
+
onResourceSelect: handleResourceSelect
|
|
9781
|
+
}
|
|
9782
|
+
)
|
|
9783
|
+
] }),
|
|
9784
|
+
step === STEP.SELECT_STAFF && staff && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-step": "select-staff", className: classNames?.step, children: [
|
|
9785
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { "data-cimplify-booking-step-title": true, className: classNames?.stepTitle, children: "Choose a provider" }),
|
|
9786
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9787
|
+
StaffPicker,
|
|
9788
|
+
{
|
|
9789
|
+
staff,
|
|
9790
|
+
selectedStaffId,
|
|
9791
|
+
onStaffSelect: handleStaffSelect
|
|
9792
|
+
}
|
|
9793
|
+
)
|
|
9794
|
+
] }),
|
|
9795
|
+
step === STEP.CONFIRM && selectedSlot && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-step": "confirm", className: classNames?.step, children: [
|
|
9796
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { "data-cimplify-booking-step-title": true, className: classNames?.stepTitle, children: "Confirm your booking" }),
|
|
9797
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary": true, className: classNames?.summary, children: [
|
|
9798
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
|
|
9799
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Service" }),
|
|
9800
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: service.name })
|
|
9801
|
+
] }),
|
|
9802
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
|
|
9803
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Date" }),
|
|
9804
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: selectedDate })
|
|
9805
|
+
] }),
|
|
9806
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
|
|
9807
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Time" }),
|
|
9808
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: new Date(selectedSlot.start_time).toLocaleTimeString(void 0, {
|
|
9809
|
+
hour: "numeric",
|
|
9810
|
+
minute: "2-digit"
|
|
9811
|
+
}) })
|
|
9812
|
+
] }),
|
|
9813
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
|
|
9814
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Duration" }),
|
|
9815
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDuration2(service.duration_minutes, service.duration_unit) })
|
|
9816
|
+
] }),
|
|
9817
|
+
selectedResourceId && resources && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
|
|
9818
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Room" }),
|
|
9819
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: resources.find((r) => r.id === selectedResourceId)?.name ?? "Selected" })
|
|
9820
|
+
] }),
|
|
9821
|
+
selectedStaffId && staff && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
|
|
9822
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Provider" }),
|
|
9823
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: staff.find((s) => s.id === selectedStaffId)?.name ?? "Selected" })
|
|
9824
|
+
] }),
|
|
9825
|
+
(selectedSlot.price || service.price) && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary-row": true, className: classNames?.summaryRow, children: [
|
|
9826
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Price" }),
|
|
9827
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: selectedSlot.price || service.price }) })
|
|
9828
|
+
] }),
|
|
9829
|
+
hasDeposit && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-booking-summary-row": true, className: cn(classNames?.summaryRow, classNames?.depositInfo), children: [
|
|
9830
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Deposit" }),
|
|
9831
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: depositType === "percentage" ? `${chunkBN2CXGMO_js.parsePrice(depositAmount)}%` : /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: depositAmount }) })
|
|
9832
|
+
] })
|
|
9833
|
+
] }),
|
|
9834
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9835
|
+
"button",
|
|
9836
|
+
{
|
|
9837
|
+
type: "button",
|
|
9838
|
+
onClick: handleConfirm,
|
|
9839
|
+
disabled: isSubmitting,
|
|
9840
|
+
"data-cimplify-booking-confirm": true,
|
|
9841
|
+
className: classNames?.confirmButton,
|
|
9842
|
+
children: isSubmitting ? isReschedule ? "Rescheduling\u2026" : "Adding to cart\u2026" : isReschedule ? "Reschedule" : "Confirm Booking"
|
|
9843
|
+
}
|
|
9844
|
+
)
|
|
9845
|
+
] })
|
|
9846
|
+
] });
|
|
9847
|
+
}
|
|
9848
|
+
var BOOKING_FILTERS = [
|
|
9849
|
+
{ label: "All", value: "all" },
|
|
9850
|
+
{ label: "Upcoming", value: "upcoming" },
|
|
9851
|
+
{ label: "Past", value: "past" }
|
|
9852
|
+
];
|
|
9853
|
+
function BookingsPage({
|
|
9854
|
+
title = "My Bookings",
|
|
9855
|
+
bookings: bookingsProp,
|
|
9856
|
+
onBookingNavigate,
|
|
9857
|
+
onCancel,
|
|
9858
|
+
onReschedule,
|
|
9859
|
+
showFilters = true,
|
|
9860
|
+
renderBooking,
|
|
9861
|
+
className,
|
|
9862
|
+
classNames
|
|
9863
|
+
}) {
|
|
9864
|
+
const [filter, setFilter] = React10.useState("all");
|
|
9865
|
+
const [selectedBooking, setSelectedBooking] = React10.useState(null);
|
|
9866
|
+
const handleBookingClick = React10.useCallback(
|
|
9867
|
+
(booking) => {
|
|
9868
|
+
if (onBookingNavigate) {
|
|
9869
|
+
onBookingNavigate(booking);
|
|
9870
|
+
} else {
|
|
9871
|
+
setSelectedBooking(booking);
|
|
9872
|
+
}
|
|
9873
|
+
},
|
|
9874
|
+
[onBookingNavigate]
|
|
9875
|
+
);
|
|
9876
|
+
const handleBack = React10.useCallback(() => {
|
|
9877
|
+
setSelectedBooking(null);
|
|
9878
|
+
}, []);
|
|
9879
|
+
if (selectedBooking && !onBookingNavigate) {
|
|
9880
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-bookings-page": true, className: cn(className, classNames?.root), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-bookings-detail": true, className: classNames?.detail, children: [
|
|
9881
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9882
|
+
"button",
|
|
9883
|
+
{
|
|
9884
|
+
type: "button",
|
|
9885
|
+
onClick: handleBack,
|
|
9886
|
+
"data-cimplify-bookings-back": true,
|
|
9887
|
+
className: classNames?.backButton,
|
|
9888
|
+
children: "Back to bookings"
|
|
9889
|
+
}
|
|
9890
|
+
),
|
|
9891
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9892
|
+
BookingCard,
|
|
9893
|
+
{
|
|
9894
|
+
booking: selectedBooking,
|
|
9895
|
+
onCancel,
|
|
9896
|
+
onReschedule
|
|
9897
|
+
}
|
|
9898
|
+
)
|
|
9899
|
+
] }) });
|
|
9900
|
+
}
|
|
9901
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-bookings-page": true, className: cn(className, classNames?.root), children: [
|
|
9902
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-bookings-header": true, className: classNames?.header, children: /* @__PURE__ */ jsxRuntime.jsx("h1", { "data-cimplify-bookings-title": true, className: classNames?.title, children: title }) }),
|
|
9903
|
+
showFilters && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9904
|
+
tabs.Tabs.Root,
|
|
9905
|
+
{
|
|
9906
|
+
value: filter,
|
|
9907
|
+
onValueChange: (value) => setFilter(value),
|
|
9908
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(tabs.Tabs.List, { "data-cimplify-bookings-filters": true, className: classNames?.filters, children: BOOKING_FILTERS.map((f) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9909
|
+
tabs.Tabs.Tab,
|
|
9910
|
+
{
|
|
9911
|
+
value: f.value,
|
|
9912
|
+
"data-cimplify-booking-filter": true,
|
|
9913
|
+
"data-selected": filter === f.value || void 0,
|
|
9914
|
+
className: classNames?.filterButton,
|
|
9915
|
+
children: f.label
|
|
9916
|
+
},
|
|
9917
|
+
f.value
|
|
9918
|
+
)) })
|
|
9919
|
+
}
|
|
9920
|
+
),
|
|
9921
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-bookings-list": true, className: classNames?.list, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9922
|
+
BookingList,
|
|
9923
|
+
{
|
|
9924
|
+
bookings: bookingsProp,
|
|
9925
|
+
filter,
|
|
9926
|
+
onCancel,
|
|
9927
|
+
onReschedule,
|
|
9928
|
+
onBookingClick: handleBookingClick,
|
|
9929
|
+
renderBooking
|
|
9930
|
+
}
|
|
9931
|
+
) })
|
|
9932
|
+
] });
|
|
9933
|
+
}
|
|
9483
9934
|
function DefaultCatalogueLayout({
|
|
9484
9935
|
products,
|
|
9485
9936
|
categories,
|
|
@@ -12429,103 +12880,6 @@ function CurrencySelector({
|
|
|
12429
12880
|
);
|
|
12430
12881
|
}) });
|
|
12431
12882
|
}
|
|
12432
|
-
var ANY_VALUE2 = "__any__";
|
|
12433
|
-
function roomToResource(room) {
|
|
12434
|
-
return {
|
|
12435
|
-
id: room.id,
|
|
12436
|
-
name: room.name,
|
|
12437
|
-
capacity: room.capacity,
|
|
12438
|
-
floor: room.floor,
|
|
12439
|
-
is_available: room.status === "available"
|
|
12440
|
-
};
|
|
12441
|
-
}
|
|
12442
|
-
function ResourcePicker({
|
|
12443
|
-
resources,
|
|
12444
|
-
selectedResourceId,
|
|
12445
|
-
onResourceSelect,
|
|
12446
|
-
showAnyOption = true,
|
|
12447
|
-
anyLabel = "Any available",
|
|
12448
|
-
renderImage,
|
|
12449
|
-
className,
|
|
12450
|
-
classNames
|
|
12451
|
-
}) {
|
|
12452
|
-
const groupValue = selectedResourceId === null ? ANY_VALUE2 : selectedResourceId ?? "";
|
|
12453
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12454
|
-
radioGroup.RadioGroup,
|
|
12455
|
-
{
|
|
12456
|
-
"data-cimplify-resource-picker": true,
|
|
12457
|
-
className: cn("flex flex-col gap-2", className, classNames?.root),
|
|
12458
|
-
value: groupValue,
|
|
12459
|
-
onValueChange: (value) => {
|
|
12460
|
-
onResourceSelect?.(value === ANY_VALUE2 ? null : value);
|
|
12461
|
-
},
|
|
12462
|
-
children: [
|
|
12463
|
-
showAnyOption && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12464
|
-
radio.Radio.Root,
|
|
12465
|
-
{
|
|
12466
|
-
value: ANY_VALUE2,
|
|
12467
|
-
"data-cimplify-resource-option": true,
|
|
12468
|
-
"data-selected": selectedResourceId === null || void 0,
|
|
12469
|
-
"data-any": true,
|
|
12470
|
-
className: cn(
|
|
12471
|
-
"flex items-center gap-3 rounded-lg border border-border p-3 transition-colors cursor-pointer",
|
|
12472
|
-
"hover:bg-muted data-[checked]:border-primary data-[checked]:bg-primary/5",
|
|
12473
|
-
classNames?.option
|
|
12474
|
-
),
|
|
12475
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-resource-name": true, className: cn("font-medium text-foreground", classNames?.name), children: anyLabel })
|
|
12476
|
-
}
|
|
12477
|
-
),
|
|
12478
|
-
resources.map((resource) => {
|
|
12479
|
-
const unavailable = resource.is_available === false;
|
|
12480
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12481
|
-
radio.Radio.Root,
|
|
12482
|
-
{
|
|
12483
|
-
value: resource.id,
|
|
12484
|
-
disabled: unavailable,
|
|
12485
|
-
"data-cimplify-resource-option": true,
|
|
12486
|
-
"data-selected": selectedResourceId === resource.id || void 0,
|
|
12487
|
-
"data-unavailable": unavailable || void 0,
|
|
12488
|
-
className: cn(
|
|
12489
|
-
"flex items-center gap-3 rounded-lg border border-border p-3 transition-colors cursor-pointer",
|
|
12490
|
-
"hover:bg-muted data-[checked]:border-primary data-[checked]:bg-primary/5",
|
|
12491
|
-
unavailable && "opacity-50 cursor-not-allowed",
|
|
12492
|
-
classNames?.option,
|
|
12493
|
-
unavailable ? classNames?.unavailable : void 0
|
|
12494
|
-
),
|
|
12495
|
-
children: [
|
|
12496
|
-
resource.image_url && (renderImage ? renderImage({
|
|
12497
|
-
src: resource.image_url,
|
|
12498
|
-
alt: resource.name,
|
|
12499
|
-
className: classNames?.image
|
|
12500
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12501
|
-
"img",
|
|
12502
|
-
{
|
|
12503
|
-
src: resource.image_url,
|
|
12504
|
-
alt: resource.name,
|
|
12505
|
-
"data-cimplify-resource-image": true,
|
|
12506
|
-
className: cn("w-10 h-10 rounded-lg object-cover", classNames?.image)
|
|
12507
|
-
}
|
|
12508
|
-
)),
|
|
12509
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [
|
|
12510
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-resource-name": true, className: cn("font-medium text-foreground", classNames?.name), children: resource.name }),
|
|
12511
|
-
resource.description && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-resource-description": true, className: cn("text-sm text-muted-foreground truncate", classNames?.description), children: resource.description }),
|
|
12512
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-resource-meta": true, className: cn("flex items-center gap-2 text-xs text-muted-foreground", classNames?.meta), children: [
|
|
12513
|
-
resource.capacity !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-resource-capacity": true, className: classNames?.capacity, children: [
|
|
12514
|
-
"Up to ",
|
|
12515
|
-
resource.capacity
|
|
12516
|
-
] }),
|
|
12517
|
-
resource.floor && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-resource-floor": true, className: classNames?.floor, children: resource.floor })
|
|
12518
|
-
] })
|
|
12519
|
-
] })
|
|
12520
|
-
]
|
|
12521
|
-
},
|
|
12522
|
-
resource.id
|
|
12523
|
-
);
|
|
12524
|
-
})
|
|
12525
|
-
]
|
|
12526
|
-
}
|
|
12527
|
-
);
|
|
12528
|
-
}
|
|
12529
12883
|
function ChatWidget({
|
|
12530
12884
|
client: clientProp,
|
|
12531
12885
|
businessName = "Support",
|
|
@@ -13027,6 +13381,8 @@ exports.AvailabilityBadge = AvailabilityBadge;
|
|
|
13027
13381
|
exports.BillingPlanSelector = BillingPlanSelector;
|
|
13028
13382
|
exports.BookingCard = BookingCard;
|
|
13029
13383
|
exports.BookingList = BookingList;
|
|
13384
|
+
exports.BookingPage = BookingPage;
|
|
13385
|
+
exports.BookingsPage = BookingsPage;
|
|
13030
13386
|
exports.BundleProductCard = BundleProductCard;
|
|
13031
13387
|
exports.BundleProductLayout = BundleProductLayout;
|
|
13032
13388
|
exports.BundleSelector = BundleSelector;
|