cloudcommerce 0.26.7 → 0.27.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.
Files changed (193) hide show
  1. package/.github/workflows/test-apps.yml +2 -2
  2. package/.gitmodules +0 -3
  3. package/.vscode/settings.json +3 -1
  4. package/CHANGELOG.md +31 -0
  5. package/action.yml +2 -2
  6. package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
  7. package/ecomplus-stores/barra-doce/functions/ssr/package.json +6 -6
  8. package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
  9. package/ecomplus-stores/barra-doce/package.json +2 -2
  10. package/ecomplus-stores/monocard/functions/many/package.json +3 -3
  11. package/ecomplus-stores/monocard/functions/ssr/package.json +6 -6
  12. package/ecomplus-stores/monocard/functions/with-apps/package.json +3 -3
  13. package/ecomplus-stores/monocard/package.json +2 -2
  14. package/package.json +6 -6
  15. package/packages/api/package.json +1 -1
  16. package/packages/apps/affilate-program/package.json +2 -2
  17. package/packages/apps/correios/package.json +3 -4
  18. package/packages/apps/custom-payment/package.json +1 -1
  19. package/packages/apps/custom-shipping/package.json +1 -1
  20. package/packages/apps/datafrete/package.json +3 -3
  21. package/packages/apps/discounts/package.json +1 -1
  22. package/packages/apps/emails/package.json +2 -2
  23. package/packages/apps/fb-conversions/package.json +3 -3
  24. package/packages/apps/flash-courier/package.json +2 -2
  25. package/packages/apps/frenet/package.json +3 -3
  26. package/packages/apps/galaxpay/package.json +3 -3
  27. package/packages/apps/google-analytics/package.json +3 -3
  28. package/packages/apps/jadlog/package.json +2 -2
  29. package/packages/apps/loyalty-points/package.json +1 -1
  30. package/packages/apps/melhor-envio/package.json +3 -3
  31. package/packages/apps/mercadopago/package.json +3 -3
  32. package/packages/apps/pagarme/package.json +3 -3
  33. package/packages/apps/paghiper/package.json +3 -3
  34. package/packages/apps/pix/package.json +3 -3
  35. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js +22 -0
  36. package/packages/apps/tiny-erp/lib/integration/export-order-to-tiny.js.map +1 -1
  37. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js +2 -2
  38. package/packages/apps/tiny-erp/lib/integration/helpers/format-tiny-date.js.map +1 -1
  39. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js +7 -1
  40. package/packages/apps/tiny-erp/lib/integration/import-order-from-tiny.js.map +1 -1
  41. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js +14 -5
  42. package/packages/apps/tiny-erp/lib/integration/import-product-from-tiny.js.map +1 -1
  43. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js +9 -1
  44. package/packages/apps/tiny-erp/lib/integration/parsers/order-from-tiny.js.map +1 -1
  45. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js +8 -6
  46. package/packages/apps/tiny-erp/lib/integration/parsers/order-to-tiny.js.map +1 -1
  47. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js +118 -38
  48. package/packages/apps/tiny-erp/lib/integration/parsers/product-from-tiny.js.map +1 -1
  49. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js +8 -0
  50. package/packages/apps/tiny-erp/lib/integration/parsers/product-to-tiny.js.map +1 -1
  51. package/packages/apps/tiny-erp/package.json +3 -3
  52. package/packages/apps/tiny-erp/src/integration/export-order-to-tiny.ts +24 -0
  53. package/packages/apps/tiny-erp/src/integration/helpers/format-tiny-date.ts +2 -2
  54. package/packages/apps/tiny-erp/src/integration/import-order-from-tiny.ts +8 -1
  55. package/packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts +17 -5
  56. package/packages/apps/tiny-erp/src/integration/parsers/order-from-tiny.ts +13 -1
  57. package/packages/apps/tiny-erp/src/integration/parsers/order-to-tiny.ts +11 -6
  58. package/packages/apps/tiny-erp/src/integration/parsers/product-from-tiny.ts +144 -41
  59. package/packages/apps/tiny-erp/src/integration/parsers/product-to-tiny.ts +10 -0
  60. package/packages/apps/webhooks/package.json +3 -3
  61. package/packages/cli/package.json +1 -1
  62. package/packages/config/package.json +1 -1
  63. package/packages/emails/package.json +4 -4
  64. package/packages/eslint/base.eslintrc.cjs +3 -0
  65. package/packages/eslint/package.json +5 -4
  66. package/packages/eslint/storefront.eslintrc.cjs +8 -1
  67. package/packages/events/package.json +2 -2
  68. package/packages/feeds/package.json +1 -1
  69. package/packages/firebase/package.json +2 -2
  70. package/packages/i18n/package.json +1 -1
  71. package/packages/modules/package.json +3 -3
  72. package/packages/passport/package.json +2 -2
  73. package/packages/ssr/package.json +3 -3
  74. package/packages/storefront/.auto-imports.d.ts +65 -0
  75. package/packages/storefront/astro.config.mjs +24 -1
  76. package/packages/storefront/client.d.ts +1 -0
  77. package/packages/storefront/config/astro/context-directive.mjs +21 -0
  78. package/packages/storefront/config/astro/index.d.ts +8 -0
  79. package/packages/storefront/config/storefront.tailwind.cjs +0 -1
  80. package/packages/storefront/package.json +4 -3
  81. package/packages/storefront/server.d.ts +1 -1
  82. package/packages/storefront/src/lib/$storefront.d.ts +8 -8
  83. package/packages/storefront/src/lib/assets/base.css +5 -0
  84. package/packages/storefront/src/lib/components/Carousel.vue +93 -72
  85. package/packages/storefront/src/lib/components/CarouselControl.vue +13 -7
  86. package/packages/storefront/src/lib/components/ContentClearfix.vue +17 -0
  87. package/packages/storefront/src/lib/components/Drawer.vue +2 -2
  88. package/packages/storefront/src/lib/components/PaymentMethodFlag.vue +1 -1
  89. package/packages/storefront/src/lib/components/QuantitySelector.vue +4 -4
  90. package/packages/storefront/src/lib/components/QuantitySelectorControl.vue +2 -2
  91. package/packages/storefront/src/lib/components/ViewTransitions.astro +409 -0
  92. package/packages/storefront/src/lib/components/globals/AImg.vue +2 -1
  93. package/packages/storefront/src/lib/layouts/BaseBody.astro +0 -2
  94. package/packages/storefront/src/lib/layouts/BaseHead.astro +25 -7
  95. package/packages/test-base/package.json +1 -1
  96. package/packages/types/package.json +1 -1
  97. package/ecomplus-stores/iluminim/.devcontainer/devcontainer.json +0 -30
  98. package/ecomplus-stores/iluminim/.editorconfig +0 -13
  99. package/ecomplus-stores/iluminim/.eslintrc.cjs +0 -3
  100. package/ecomplus-stores/iluminim/.firebaserc +0 -5
  101. package/ecomplus-stores/iluminim/.github/renovate.json +0 -5
  102. package/ecomplus-stores/iluminim/.github/workflows/build-and-deploy.yml +0 -36
  103. package/ecomplus-stores/iluminim/.github/workflows/calibreapp-image-actions.yml +0 -23
  104. package/ecomplus-stores/iluminim/.gitpod.yml +0 -12
  105. package/ecomplus-stores/iluminim/.idx/dev.nix +0 -24
  106. package/ecomplus-stores/iluminim/.nvmrc +0 -1
  107. package/ecomplus-stores/iluminim/.vscode/extensions.json +0 -8
  108. package/ecomplus-stores/iluminim/.vscode/launch.json +0 -11
  109. package/ecomplus-stores/iluminim/.vscode/settings.json +0 -10
  110. package/ecomplus-stores/iluminim/README.md +0 -31
  111. package/ecomplus-stores/iluminim/SETUP.md +0 -117
  112. package/ecomplus-stores/iluminim/SETUP.pt-BR.md +0 -117
  113. package/ecomplus-stores/iluminim/functions/config.json +0 -3
  114. package/ecomplus-stores/iluminim/functions/example.env +0 -10
  115. package/ecomplus-stores/iluminim/functions/many/index.js +0 -14
  116. package/ecomplus-stores/iluminim/functions/many/package.json +0 -22
  117. package/ecomplus-stores/iluminim/functions/ssr/.eslintrc.cjs +0 -6
  118. package/ecomplus-stores/iluminim/functions/ssr/astro.config.mjs +0 -4
  119. package/ecomplus-stores/iluminim/functions/ssr/content/blog/.gitkeep +0 -0
  120. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/contato.json +0 -11
  121. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/terms.json +0 -11
  122. package/ecomplus-stores/iluminim/functions/ssr/content/extra-pages/trocas.json +0 -11
  123. package/ecomplus-stores/iluminim/functions/ssr/content/layout.json +0 -57
  124. package/ecomplus-stores/iluminim/functions/ssr/content/pages/home.json +0 -70
  125. package/ecomplus-stores/iluminim/functions/ssr/content/settings.json +0 -65
  126. package/ecomplus-stores/iluminim/functions/ssr/index.js +0 -18
  127. package/ecomplus-stores/iluminim/functions/ssr/package.json +0 -31
  128. package/ecomplus-stores/iluminim/functions/ssr/public/admin/.gitkeep +0 -2
  129. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms-preview.css +0 -274
  130. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cms.css +0 -114
  131. package/ecomplus-stores/iluminim/functions/ssr/public/assets/cvv.png +0 -0
  132. package/ecomplus-stores/iluminim/functions/ssr/public/assets/img-placeholder.png +0 -0
  133. package/ecomplus-stores/iluminim/functions/ssr/public/assets/payments.png +0 -0
  134. package/ecomplus-stores/iluminim/functions/ssr/public/assets/ssl-safe.png +0 -0
  135. package/ecomplus-stores/iluminim/functions/ssr/public/img/icon.png +0 -0
  136. package/ecomplus-stores/iluminim/functions/ssr/public/img/large-icon.png +0 -0
  137. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner-chamada-desktop-9x81zmd91q.webp +0 -0
  138. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/banner2.webp +0 -0
  139. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/chamada-mobile-q1c6om6jx4.webp +0 -0
  140. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/ecom-icon.png +0 -0
  141. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/headphone.webp +0 -0
  142. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/logo.webp +0 -0
  143. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/og-image.png +0 -0
  144. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/passion.webp +0 -0
  145. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect8589.png +0 -0
  146. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect859.png +0 -0
  147. package/ecomplus-stores/iluminim/functions/ssr/public/img/uploads/rect89.webp +0 -0
  148. package/ecomplus-stores/iluminim/functions/ssr/public/robots.txt +0 -6
  149. package/ecomplus-stores/iluminim/functions/ssr/scripts/build.sh +0 -14
  150. package/ecomplus-stores/iluminim/functions/ssr/src/assets/style.css +0 -65
  151. package/ecomplus-stores/iluminim/functions/ssr/src/components/AccountMenu.vue +0 -95
  152. package/ecomplus-stores/iluminim/functions/ssr/src/components/Banner.vue +0 -57
  153. package/ecomplus-stores/iluminim/functions/ssr/src/components/BannersGrid.astro +0 -25
  154. package/ecomplus-stores/iluminim/functions/ssr/src/components/CartItem.vue +0 -64
  155. package/ecomplus-stores/iluminim/functions/ssr/src/components/CartSidebar.vue +0 -66
  156. package/ecomplus-stores/iluminim/functions/ssr/src/components/Countdown.vue +0 -79
  157. package/ecomplus-stores/iluminim/functions/ssr/src/components/HeroSlider.vue +0 -52
  158. package/ecomplus-stores/iluminim/functions/ssr/src/components/PitchBar.vue +0 -56
  159. package/ecomplus-stores/iluminim/functions/ssr/src/components/Prices.vue +0 -95
  160. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductCard.vue +0 -117
  161. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductShelf.vue +0 -57
  162. package/ecomplus-stores/iluminim/functions/ssr/src/components/ProductsCountdown.vue +0 -20
  163. package/ecomplus-stores/iluminim/functions/ssr/src/components/SearchModal.vue +0 -6
  164. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopFooter.vue +0 -149
  165. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeader.vue +0 -158
  166. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderMenu.vue +0 -58
  167. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopHeaderSubmenu.vue +0 -88
  168. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenav.vue +0 -61
  169. package/ecomplus-stores/iluminim/functions/ssr/src/components/ShopSidenavCategory.vue +0 -80
  170. package/ecomplus-stores/iluminim/functions/ssr/src/env.d.ts +0 -13
  171. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Base.astro +0 -16
  172. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/Checkout.astro +0 -0
  173. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageFooter.astro +0 -68
  174. package/ecomplus-stores/iluminim/functions/ssr/src/layouts/PageHeader.astro +0 -42
  175. package/ecomplus-stores/iluminim/functions/ssr/src/main/Fallback.astro +0 -10
  176. package/ecomplus-stores/iluminim/functions/ssr/src/main/Home.astro +0 -49
  177. package/ecomplus-stores/iluminim/functions/ssr/src/main/Sections.astro +0 -42
  178. package/ecomplus-stores/iluminim/functions/ssr/src/main/Wildcard.astro +0 -18
  179. package/ecomplus-stores/iluminim/functions/ssr/src/pages/[...slug].astro +0 -40
  180. package/ecomplus-stores/iluminim/functions/ssr/src/pages/_vue.ts +0 -3
  181. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/account.astro +0 -0
  182. package/ecomplus-stores/iluminim/functions/ssr/src/pages/app/index.astro +0 -0
  183. package/ecomplus-stores/iluminim/functions/ssr/src/pages/index.astro +0 -37
  184. package/ecomplus-stores/iluminim/functions/ssr/src/pages/~fallback.astro +0 -25
  185. package/ecomplus-stores/iluminim/functions/ssr/src/scripts/InlineScripts.astro +0 -10
  186. package/ecomplus-stores/iluminim/functions/ssr/tailwind.config.cjs +0 -13
  187. package/ecomplus-stores/iluminim/functions/ssr/tsconfig.json +0 -12
  188. package/ecomplus-stores/iluminim/functions/ssr/uno.config.cjs +0 -5
  189. package/ecomplus-stores/iluminim/functions/with-apps/index.js +0 -12
  190. package/ecomplus-stores/iluminim/functions/with-apps/package.json +0 -22
  191. package/ecomplus-stores/iluminim/package.json +0 -31
  192. package/ecomplus-stores/iluminim/scripts/install.sh +0 -24
  193. package/packages/storefront/src/lib/components/ContentClearfix.astro +0 -15
@@ -1,95 +0,0 @@
1
- <template>
2
- <Menu
3
- as="div"
4
- class="relative text-center text-sm text-base-800"
5
- v-slot="{ open }"
6
- >
7
- <div v-if="open">
8
- <span v-once>{{ initializeFirebaseAuth() }}</span>
9
- </div>
10
- <MenuButton class="outline-none" :aria-label="$t.i19myAccount">
11
- <slot name="button" v-bind="{ open }" />
12
- </MenuButton>
13
- <Fade>
14
- <MenuItems class="absolute -right-8 mt-2 w-56
15
- rounded shadow ring-1 ring-black/5 bg-white
16
- divide-y divide-base-100 focus:outline-none">
17
- <div class="p-3 text-base-600">
18
- {{ `${$t.i19hello} ${customerName || $t.i19visitor}` }}
19
- <AccountLink role="button" class="ui-btn-sm ui-btn-primary block my-1">
20
- {{ $t.i19accessMyAccount }}
21
- </AccountLink>
22
- <AccountLink v-if="!isLogged" is-sign-up class="ui-link block">
23
- {{ $t.i19createAnAccount }}
24
- </AccountLink>
25
- </div>
26
- <ul class="list-none">
27
- <MenuItem as="li" v-slot="{ active }">
28
- <AccountLink
29
- to="orders"
30
- class="block p-2"
31
- :class="active ? 'bg-base-100 text-primary' : null"
32
- >
33
- {{ $t.i19myOrders }}
34
- </AccountLink>
35
- </MenuItem>
36
- <MenuItem as="li" v-slot="{ active }">
37
- <AccountLink
38
- to="favorites"
39
- class="block p-2"
40
- :class="active ? 'bg-base-100 text-primary' : null"
41
- >
42
- <i class="i-heart mr-1"></i>
43
- {{ $t.i19myFavorites }}
44
- </AccountLink>
45
- </MenuItem>
46
- <MenuItem
47
- as="li"
48
- v-slot="{ active }"
49
- v-for="({ title, href }, i) in $settings.service_links"
50
- :key="`s-${i}`"
51
- >
52
- <ALink
53
- :href="href"
54
- class="block p-2"
55
- :class="active ? 'bg-base-100 text-primary' : null"
56
- >
57
- {{ title }}
58
- </ALink>
59
- </MenuItem>
60
- <MenuItem as="li">
61
- <div class="flex justify-center gap-2 p-2 text-base-500 text-base">
62
- <span v-for="(href, network) in socialNetworks" :key="network">
63
- <SocialNetworkLink :network="network" class="p-1 hover:text-primary" />
64
- </span>
65
- </div>
66
- </MenuItem>
67
- <MenuItem v-if="isLogged" as="li">
68
- <button @click="logout" class="p-2 text-right text-base-800">
69
- <span class="text-base-600">{{ $t.i19logout }}</span>
70
- <i class="i-arrow-right-on-rectangle text-lg ml-1"></i>
71
- </button>
72
- </MenuItem>
73
- </ul>
74
- </MenuItems>
75
- </Fade>
76
- </Menu>
77
- </template>
78
-
79
- <script setup lang="ts">
80
- import {
81
- Menu,
82
- MenuButton,
83
- MenuItems,
84
- MenuItem,
85
- } from '@headlessui/vue';
86
- import { socialNetworks } from '@@sf/sf-lib';
87
- import {
88
- customerName,
89
- initializeFirebaseAuth,
90
- isLogged,
91
- logout,
92
- } from '@@sf/state/customer-session';
93
- import AccountLink from '@@sf/components/AccountLink.vue';
94
- import SocialNetworkLink from '@@sf/components/SocialNetworkLink.vue';
95
- </script>
@@ -1,57 +0,0 @@
1
- <template>
2
- <div
3
- class="mx-auto overflow-x-hidden"
4
- :class="hasHeader ? 'grid grid-cols-1 md:grid-cols-2 items-center' : null"
5
- >
6
- <ALink
7
- :href="href"
8
- class="[&_img]:rounded-lg"
9
- :class="hasHeader ? 'basis-1/2 grow-0 md:order-last' : '[&_img]:w-full'"
10
- >
11
- <slot name="picture" />
12
- </ALink>
13
- <div
14
- v-if="hasHeader"
15
- class="basis-1/2 grow-0 p-12 xl:ps-32 mb-3 md:mb-0"
16
- >
17
- <Component
18
- v-if="parsedTitle"
19
- :is="headingTag"
20
- class="ui-title mt-1"
21
- >
22
- {{ parsedTitle }}
23
- </Component>
24
- <p v-if="parsedSubtitle" class="text-lg mt-4 md:mt-6">
25
- {{ parsedSubtitle }}
26
- </p>
27
- <ALink
28
- v-if="parsedButtonText"
29
- :href="buttonLink"
30
- class="ui-btn-lg ui-btn-contrast min-w-[150px] mt-7 md:mt-10"
31
- >
32
- {{ parsedButtonText }}
33
- </ALink>
34
- </div>
35
- </div>
36
- </template>
37
-
38
- <script setup lang="ts">
39
- import {
40
- type Props as UseBannerProps,
41
- useBanner,
42
- } from '@@sf/composables/use-banner';
43
-
44
- export type Props = UseBannerProps & {
45
- headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
46
- }
47
-
48
- const props = withDefaults(defineProps<Props>(), {
49
- headingTag: 'h3',
50
- });
51
- const {
52
- hasHeader,
53
- parsedTitle,
54
- parsedSubtitle,
55
- parsedButtonText,
56
- } = useBanner(props);
57
- </script>
@@ -1,25 +0,0 @@
1
- ---
2
- import type { Props as UseBannerProps } from '@@sf/composables/use-banner';
3
- import BannerPictures from '@@sf/components/BannerPictures.astro';
4
- import Banner from '~/components/Banner.vue';
5
-
6
- export type Props = {
7
- title?: string;
8
- titleLink?: string;
9
- banners: UseBannerProps[];
10
- }
11
-
12
- const { banners } = Astro.props;
13
- ---
14
-
15
- <section class="ui-section">
16
- <ul class="flex flex-wrap lg:flex-nowrap gap-4">
17
- {banners.map((banner) => (
18
- <li class="lg:flex-1 [&_img]:w-full [&_img]:object-cover">
19
- <Banner {...banner}>
20
- <BannerPictures {...banner} slot="picture" />
21
- </Banner>
22
- </li>
23
- ))}
24
- </ul>
25
- </section>
@@ -1,64 +0,0 @@
1
- <template>
2
- <article class="relative bg-white shadow-sm">
3
- <ALink :href="link" class="flex items-center gap-5 p-4 group">
4
- <AImg
5
- v-if="image"
6
- :picture="image"
7
- :alt="title"
8
- class="w-20 h-20 object-cover"
9
- />
10
- <p class="py-2 flex-auto text-sm text-base-700
11
- group-hover:text-base-900 group-hover:underline">
12
- {{ title }}
13
- </p>
14
- </ALink>
15
- <button
16
- v-if="cartItem._id"
17
- @click.stop="removeCartItem(cartItem._id)"
18
- class="absolute top-0 right-0 p-2 opacity-70 hover:opacity-100"
19
- :aria-label="$t.i19remove"
20
- >
21
- <span class="w-5 h-5 text-sm leading-none flex flex-col justify-center
22
- rounded-full border-3 text-danger-800 border-danger-700/30">
23
- <i class="i-close my-0 mx-auto"></i>
24
- </span>
25
- </button>
26
- <div class="flex justify-between items-center border-t-2 border-base-100">
27
- <div class="border-r-2 border-base-100">
28
- <QuantitySelector
29
- v-model="cartItem.quantity"
30
- :min="cartItem.min_quantity"
31
- :max="cartItem.max_quantity"
32
- />
33
- </div>
34
- <Prices
35
- :base-price="cartItem.base_price"
36
- :price="finalPrice"
37
- :has-cashback="false"
38
- :has-price-options="false"
39
- class="px-4 py-2.5 text-[95%] text-right"
40
- />
41
- </div>
42
- </article>
43
- </template>
44
-
45
- <script setup lang="ts">
46
- import { removeCartItem } from '@@sf/state/shopping-cart';
47
- import {
48
- type Props as UseCartItemProps,
49
- useCartItem,
50
- } from '@@sf/composables/use-cart-item';
51
- import QuantitySelector from '@@sf/components/QuantitySelector.vue';
52
- import Prices from '~/components/Prices.vue';
53
-
54
- export type Props = UseCartItemProps;
55
-
56
- const props = defineProps<Props>();
57
- const {
58
- cartItem,
59
- title,
60
- link,
61
- image,
62
- finalPrice,
63
- } = useCartItem(props);
64
- </script>
@@ -1,66 +0,0 @@
1
- <template>
2
- <aside class="flex flex-col h-screen bg-white">
3
- <header class="px-6 py-4 flex justify-end items-center gap-3
4
- shadow ring-1 ring-black/5 z-10">
5
- <span class="text-right text-base text-base-600 font-medium">
6
- {{ $t.i19myShoppingCart }}
7
- </span>
8
- <span class="min-w-[3rem] text-right">
9
- <span class="ui-badge-pill-lg">
10
- {{ totalItems }}
11
- </span>
12
- </span>
13
- </header>
14
- <article class="grow overflow-y-auto bg-base-50">
15
- <div v-if="freeShippingFromValue" class="text-sm text-center">
16
- <div
17
- v-if="freeShippingFromValue > shoppingCart.subtotal"
18
- class="p-3 secondary-subtle"
19
- >
20
- {{ $t.i19add$1ToEarn.replace('$1',
21
- $money(freeShippingFromValue - shoppingCart.subtotal)) }}
22
- <strong class="lowercase">{{ $t.i19freeShipping }}</strong>
23
- </div>
24
- <div v-else class="p-3 bg-success-50 text-success-800">
25
- <i class="text-success-900 i-check mr-1"></i>
26
- {{ $t.i19freeShippingFrom }} {{ $money(freeShippingFromValue) }}
27
- </div>
28
- </div>
29
- <ul class="px-4 pt-4 pb-2">
30
- <li v-for="(item, i) in shoppingCart.items" :key="i">
31
- <CartItem :item="item" class="mb-3" />
32
- </li>
33
- </ul>
34
- </article>
35
- <footer class="px-5 pt-4 pb-3 ring-2 ring-black/5 z-10">
36
- <div class="grid grid-cols-5 gap-3 items-center text-right">
37
- <div class="col-span-2">
38
- {{ $t.i19subtotal }}
39
- </div>
40
- <Prices :price="shoppingCart.subtotal" class="col-span-3 text-lg" />
41
- </div>
42
- <CheckoutLink class="ui-btn-lg ui-btn-primary w-full text-right my-2.5">
43
- <i class="i-check mr-2"></i>
44
- {{ $t.i19checkout }}
45
- </CheckoutLink>
46
- <a
47
- href="#"
48
- @click.prevent="emit('close')"
49
- class="ui-link text-base-500 hover:text-base-700 text-sm"
50
- >
51
- <i class="i-arrow-left mr-1"></i>
52
- {{ $t.i19continueShopping }}
53
- </a>
54
- </footer>
55
- </aside>
56
- </template>
57
-
58
- <script setup lang="ts">
59
- import { freeShippingFromValue } from '@@sf/state/modules-info';
60
- import { shoppingCart, totalItems } from '@@sf/state/shopping-cart';
61
- import CheckoutLink from '@@sf/components/CheckoutLink.vue';
62
- import Prices from '~/components/Prices.vue';
63
- import CartItem from '~/components/CartItem.vue';
64
-
65
- const emit = defineEmits(['close']);
66
- </script>
@@ -1,79 +0,0 @@
1
- <template>
2
- <div class="flex w-[300px] justify-between">
3
- <div>
4
- <strong class="text-lg">{{ hours }}</strong>
5
- <span>{{ $t.i19about }}</span>
6
- </div>
7
- <span>:</span>
8
- <div>
9
- {{ minutes }}
10
- </div>
11
- <span>:</span>
12
- <div>
13
- {{ seconds }}
14
- </div>
15
- <span>:</span>
16
- <div>
17
- {{ ms }}
18
- </div>
19
- </div>
20
- </template>
21
-
22
- <script setup lang="ts">
23
- import {
24
- ref,
25
- computed,
26
- watch,
27
- watchEffect,
28
- } from 'vue';
29
- import { useIntervalFn } from '@vueuse/core';
30
-
31
- export interface Props {
32
- endsAt?: string;
33
- maxHours?: number;
34
- }
35
-
36
- const props = withDefaults(defineProps<Props>(), {
37
- maxHours: 8,
38
- });
39
- const endTimestamp = computed(() => {
40
- if (props.endsAt) {
41
- return new Date(props.endsAt).getTime();
42
- }
43
- return null;
44
- });
45
- const hours = ref<number | null>(null);
46
- const minutes = ref<number>(59);
47
- const seconds = ref<number>(59);
48
- const ms = ref<number>(999);
49
- watchEffect(() => {
50
- if (endTimestamp.value) {
51
- const timeDiff = endTimestamp.value - Date.now();
52
- if (timeDiff > 0) {
53
- const diffHours = Math.floor(timeDiff / (1000 * 60 * 60));
54
- hours.value = Math.min(diffHours, props.maxHours);
55
- }
56
- return;
57
- }
58
- hours.value = props.maxHours;
59
- });
60
- useIntervalFn(() => {
61
- ms.value -= 1;
62
- if (ms.value < 0) {
63
- ms.value = 999;
64
- }
65
- }, 1);
66
- watch([ms], () => {
67
- if (ms.value === 0) {
68
- seconds.value -= 1;
69
- if (seconds.value < 0) {
70
- seconds.value = 59;
71
- minutes.value -= 1;
72
- if (minutes.value < 0) {
73
- minutes.value = 59;
74
- hours.value = Math.min((hours.value as number) - 1, 0);
75
- }
76
- }
77
- }
78
- });
79
- </script>
@@ -1,52 +0,0 @@
1
- <template>
2
- <section class="bg-base-100 py-3">
3
- <div class="relative container mx-auto">
4
- <Carousel :autoplay="autoplay" class="[&>*]:items-center">
5
- <li
6
- v-for="(slide, i) in slides"
7
- :key="i"
8
- class="shrink-0 basis-full"
9
- >
10
- <Banner
11
- v-bind="{ ...slide, headingTag: i === 0 ? 'h2' : 'h3' }"
12
- class="w-full"
13
- >
14
- <template #picture>
15
- <slot :name="`picture-${i}`" />
16
- </template>
17
- </Banner>
18
- </li>
19
- <template #controls>
20
- <div
21
- v-show="slides.length > 1"
22
- class="absolute z-10 bottom-5 right-5 flex justify-end items-center"
23
- >
24
- <div class="relative w-20 h-10 rounded-full
25
- bg-primary/80 text-on-primary shadow-sm ring-1 ring-black/5">
26
- <CarouselControl class="w-10 h-10 rounded-full hover:bg-primary" is-prev>
27
- <i class="i-arrow-left"></i>
28
- </CarouselControl>
29
- <CarouselControl class="w-10 h-10 rounded-full hover:bg-primary">
30
- <i class="i-arrow-right"></i>
31
- </CarouselControl>
32
- </div>
33
- </div>
34
- </template>
35
- </Carousel>
36
- </div>
37
- </section>
38
- </template>
39
-
40
- <script setup lang="ts">
41
- import type { Props as UseBannerProps } from '@@sf/composables/use-banner';
42
- import Carousel from '@@sf/components/Carousel.vue';
43
- import CarouselControl from '@@sf/components/CarouselControl.vue';
44
- import Banner from '~/components/Banner.vue';
45
-
46
- export type Props = {
47
- autoplay?: number;
48
- slides: UseBannerProps[];
49
- }
50
-
51
- defineProps<Props>();
52
- </script>
@@ -1,56 +0,0 @@
1
- <template>
2
- <div class="bg-black relative z-20">
3
- <div class="container md:w-2/3 mx-auto px-3 py-1 md:py-1.5">
4
- <Carousel :autoplay="countValidSlides > 1 ? 7000 : undefined">
5
- <li
6
- v-for="(slide, i) in slides"
7
- :key="i"
8
- class="shrink-0 basis-full h-full text-center"
9
- >
10
- <ALink
11
- :href="slide.href"
12
- :target="slide.target"
13
- class="inline-block px-8"
14
- :class="slide.href ? 'hover:underline' : null"
15
- >
16
- <span
17
- v-if="parsedContents[i]"
18
- v-html="parsedContents[i]"
19
- class="prose text-sm md:text-base lg:tracking-wide
20
- text-base-200 uppercase font-semibold
21
- [&_b]:text-base-100 [&_strong]:font-black
22
- [&_strong]:text-transparent [&_strong]:bg-clip-text [&_strong]:bg-gradient-to-r
23
- [&_strong]:from-yellow-200 [&_strong]:to-yellow-400"
24
- ></span>
25
- </ALink>
26
- </li>
27
- <template #controls>
28
- <div
29
- v-show="countValidSlides > 1"
30
- class="text-xl leading-none text-base-300"
31
- >
32
- <CarouselControl class="pr-2 bg-black hover:text-white" is-prev />
33
- <CarouselControl class="pl-2 bg-black hover:text-white" />
34
- </div>
35
- </template>
36
- </Carousel>
37
- </div>
38
- </div>
39
- </template>
40
-
41
- <script setup lang="ts">
42
- import {
43
- type Props as UsePitchBarProps,
44
- usePitchBar,
45
- } from '@@sf/composables/use-pitch-bar';
46
- import Carousel from '@@sf/components/Carousel.vue';
47
- import CarouselControl from '@@sf/components/CarouselControl.vue';
48
-
49
- export interface Props extends UsePitchBarProps {}
50
-
51
- const props = defineProps<Props>();
52
- const {
53
- parsedContents,
54
- countValidSlides,
55
- } = usePitchBar(props);
56
- </script>
@@ -1,95 +0,0 @@
1
- <template>
2
- <div
3
- class="text-base-600
4
- [&>div]:[font-size:90%] [&_small]:[font-size:92%] [&_small]:lowercase"
5
- :class="isBig ? 'text-lg' : null"
6
- >
7
- <span v-if="comparePrice" class="text-base-500 mr-1 [font-size:87%]">
8
- <small v-if="isLiteral">
9
- {{ `${$t.i19from} ` }}
10
- </small>
11
- <s>{{ $money(comparePrice) }}</s>
12
- <small v-if="isLiteral">
13
- {{ ` ${$t.i19to}` }}
14
- </small>
15
- </span>
16
- <strong
17
- class="inline-block text-base-800"
18
- :class="isBig ? 'text-5xl block' : null"
19
- >
20
- <small v-if="hasVariedPrices">
21
- {{ `${$t.i19asOf} ` }}
22
- </small>
23
- {{ $money(salePrice) }}
24
- </strong>
25
- <Fade slide="down">
26
- <div v-if="cashbackValue && hasCashback" class="relative z-10">
27
- <span :data-tooltip="$t.i19get$1back
28
- .replace('$1', $percentage(cashbackPercentage))">
29
- <i class="i-arrow-uturn-left mr-1"></i>
30
- <span class="font-medium">
31
- {{ $money(cashbackValue) }}
32
- </span>
33
- <small> cashback</small>
34
- </span>
35
- </div>
36
- </Fade>
37
- <Fade slide="down">
38
- <div v-if="installmentValue && hasPriceOptions">
39
- <small v-if="isLiteral">
40
- {{ `${$t.i19upTo} ` }}
41
- </small>
42
- {{ installmentsNumber }}x
43
- <small v-if="isLiteral">
44
- {{ ` ${$t.i19of} ` }}
45
- </small>
46
- <span>{{ $money(installmentValue) }}</span>
47
- <small v-if="!monthlyInterest && isLiteral">
48
- {{ ` ${$t.i19interestFree}` }}
49
- </small>
50
- </div>
51
- </Fade>
52
- <Fade slide="down">
53
- <div v-if="priceWithDiscount < salePrice && hasPriceOptions">
54
- <small v-if="!discountLabel">
55
- {{ `${$t.i19asOf} ` }}
56
- </small>
57
- <span>{{ $money(priceWithDiscount) }}</span>
58
- <small v-if="discountLabel">
59
- {{ ` ${discountLabel}` }}
60
- </small>
61
- </div>
62
- </Fade>
63
- </div>
64
- </template>
65
-
66
- <script setup lang="ts">
67
- import {
68
- type Props as UsePricesProps,
69
- usePrices,
70
- } from '@@sf/composables/use-prices';
71
-
72
- export interface Props extends UsePricesProps {
73
- isBig?: boolean;
74
- isLiteral?: boolean;
75
- hasCashback?: boolean;
76
- hasPriceOptions?: boolean;
77
- }
78
-
79
- const props = withDefaults(defineProps<Props>(), {
80
- hasCashback: true,
81
- hasPriceOptions: true,
82
- });
83
- const {
84
- hasVariedPrices,
85
- salePrice,
86
- comparePrice,
87
- cashbackPercentage,
88
- cashbackValue,
89
- installmentsNumber,
90
- monthlyInterest,
91
- installmentValue,
92
- priceWithDiscount,
93
- discountLabel,
94
- } = usePrices(props);
95
- </script>