cloudcommerce 0.33.0 → 0.33.2
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/.github/workflows/test-apps.yml +2 -2
- package/CHANGELOG.md +37 -0
- package/action.yml +2 -2
- package/ecomplus-stores/barra-doce/.github/workflows/build-and-deploy.yml +1 -1
- package/ecomplus-stores/barra-doce/.github/workflows/calibreapp-image-actions.yml +1 -1
- package/ecomplus-stores/barra-doce/.vscode/settings.json +3 -0
- package/ecomplus-stores/barra-doce/functions/many/package.json +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/content/extra-pages/terms.json +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/home.json +20 -0
- package/ecomplus-stores/barra-doce/functions/ssr/content/pages/products.json +2 -1
- package/ecomplus-stores/barra-doce/functions/ssr/content/settings.json +4 -1
- package/ecomplus-stores/barra-doce/functions/ssr/package.json +9 -8
- package/ecomplus-stores/barra-doce/functions/ssr/public/robots.txt +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/assets/style.css +15 -4
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountMenu.vue +5 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/AccountPage.vue +62 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Banner.vue +6 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Breadcrumbs.astro +44 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartItem.vue +11 -11
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CartSidebar.vue +16 -13
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/CheckoutPage.vue +33 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Collapse.vue +19 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/DocDescription.vue +28 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/FooterStamps.vue +62 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/HeroSlider.vue +14 -9
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ImagesGallery.vue +151 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/LoginForm.vue +107 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/PitchBar.vue +6 -8
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/Prices.vue +3 -3
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductCard.vue +22 -22
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductDetails.vue +122 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductShelf.vue +10 -12
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ProductSpecifications.vue +42 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SearchModal.vue +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopFooter.vue +7 -58
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeader.vue +33 -34
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderMenu.vue +5 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopHeaderSubmenu.vue +19 -11
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenav.vue +10 -11
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/ShopSidenavCategory.vue +9 -10
- package/ecomplus-stores/barra-doce/functions/ssr/src/components/SkuSelector.vue +58 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageFooter.astro +3 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/PageHeader.astro +1 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Home.astro +1 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Sections.astro +25 -2
- package/ecomplus-stores/barra-doce/functions/ssr/src/main/Wildcard.astro +12 -12
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/[...slug].astro +2 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/_vue.ts +17 -1
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/account.astro +34 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/app/index.astro +62 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/index.astro +0 -5
- package/ecomplus-stores/barra-doce/functions/ssr/src/pages/~fallback.astro +0 -2
- package/ecomplus-stores/barra-doce/functions/ssr/tailwind.config.cjs +0 -1
- package/ecomplus-stores/barra-doce/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/barra-doce/package.json +2 -2
- package/ecomplus-stores/monocard/.editorconfig +13 -0
- package/ecomplus-stores/monocard/.eslintrc.cjs +1 -1
- package/ecomplus-stores/monocard/.vscode/settings.json +5 -1
- package/ecomplus-stores/monocard/functions/many/package.json +3 -3
- package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/terms.json +1 -1
- package/ecomplus-stores/monocard/functions/ssr/content/pages/home.json +1 -44
- package/ecomplus-stores/monocard/functions/ssr/content/pages/products.json +2 -1
- package/ecomplus-stores/monocard/functions/ssr/content/settings.json +4 -1
- package/ecomplus-stores/monocard/functions/ssr/package.json +8 -7
- package/ecomplus-stores/monocard/functions/ssr/public/robots.txt +2 -4
- package/ecomplus-stores/monocard/functions/ssr/src/assets/style.css +7 -2
- package/ecomplus-stores/monocard/functions/ssr/src/components/AccountMenu.vue +16 -14
- package/ecomplus-stores/monocard/functions/ssr/src/components/AccountPage.vue +62 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/Banner.vue +3 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/Breadcrumbs.astro +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/CartItem.vue +11 -11
- package/ecomplus-stores/monocard/functions/ssr/src/components/CartSidebar.vue +16 -13
- package/ecomplus-stores/monocard/functions/ssr/src/components/CheckoutPage.vue +33 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/Collapse.vue +19 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/DemoVideo.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/DocDescription.vue +3 -8
- package/ecomplus-stores/monocard/functions/ssr/src/components/FeatureTabs.vue +73 -79
- package/ecomplus-stores/monocard/functions/ssr/src/components/FooterStamps.vue +63 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ImagesGallery.vue +154 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/LoginForm.vue +107 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/LottiePhoneNFC.vue +1 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/MonocardCustomizer.vue +21 -22
- package/ecomplus-stores/monocard/functions/ssr/src/components/PitchBar.vue +7 -7
- package/ecomplus-stores/monocard/functions/ssr/src/components/Prices.vue +3 -3
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductCard.vue +24 -24
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductDetails.vue +122 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductShelf.vue +11 -11
- package/ecomplus-stores/monocard/functions/ssr/src/components/ProductSpecifications.vue +42 -0
- package/ecomplus-stores/monocard/functions/ssr/src/components/SearchModal.vue +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopFooter.vue +10 -62
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeader.vue +25 -31
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopHeaderMenu.vue +8 -8
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenav.vue +10 -11
- package/ecomplus-stores/monocard/functions/ssr/src/components/ShopSidenavCategory.vue +9 -10
- package/ecomplus-stores/monocard/functions/ssr/src/components/SkuSelector.vue +58 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageFooter.astro +4 -3
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/PageHeader.astro +1 -1
- package/ecomplus-stores/monocard/functions/ssr/src/main/Home.astro +2 -1
- package/ecomplus-stores/monocard/functions/ssr/src/main/Sections.astro +18 -4
- package/ecomplus-stores/monocard/functions/ssr/src/main/Wildcard.astro +10 -1
- package/ecomplus-stores/monocard/functions/ssr/src/pages/app/account.astro +34 -0
- package/ecomplus-stores/monocard/functions/ssr/src/pages/app/index.astro +62 -0
- package/ecomplus-stores/monocard/functions/ssr/src/pages/index.astro +0 -5
- package/ecomplus-stores/monocard/functions/ssr/src/pages/~fallback.astro +0 -2
- package/ecomplus-stores/monocard/functions/ssr/tailwind.config.cjs +0 -1
- package/ecomplus-stores/monocard/functions/with-apps/package.json +3 -3
- package/ecomplus-stores/monocard/package.json +2 -2
- package/package.json +7 -7
- package/packages/api/package.json +1 -1
- package/packages/apps/affilate-program/package.json +1 -1
- package/packages/apps/correios/package.json +3 -3
- package/packages/apps/custom-payment/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/datafrete/package.json +2 -2
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/emails/package.json +1 -1
- package/packages/apps/fb-conversions/package.json +3 -3
- package/packages/apps/flash-courier/package.json +2 -2
- package/packages/apps/frenet/package.json +2 -2
- package/packages/apps/galaxpay/package.json +2 -2
- package/packages/apps/google-analytics/package.json +2 -2
- package/packages/apps/jadlog/package.json +2 -2
- package/packages/apps/loyalty-points/package.json +1 -1
- package/packages/apps/mandae/package.json +2 -2
- package/packages/apps/melhor-envio/package.json +2 -2
- package/packages/apps/mercadopago/package.json +2 -2
- package/packages/apps/pagarme/package.json +2 -2
- package/packages/apps/pagarme-v5/package.json +3 -3
- package/packages/apps/paghiper/package.json +2 -2
- package/packages/apps/pix/package.json +2 -2
- package/packages/apps/tiny-erp/package.json +2 -2
- package/packages/apps/webhooks/package.json +2 -2
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/emails/package.json +4 -4
- package/packages/eslint/package.json +4 -4
- package/packages/events/package.json +1 -1
- package/packages/feeds/package.json +1 -1
- package/packages/firebase/package.json +2 -2
- package/packages/i18n/package.json +1 -1
- package/packages/modules/package.json +2 -2
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +2 -2
- package/packages/storefront/client.d.ts +3 -0
- package/packages/storefront/config/astro/context-directive.mjs +2 -2
- package/packages/storefront/package.json +9 -7
- package/packages/storefront/src/analytics/event-to-fbq.ts +82 -0
- package/packages/storefront/src/analytics/event-to-ttq.ts +15 -0
- package/packages/storefront/src/helpers/afetch.ts +20 -8
- package/packages/storefront/src/helpers/sf-utils.ts +15 -0
- package/packages/storefront/src/lib/components/Carousel.vue +19 -14
- package/packages/storefront/src/lib/composables/use-product-card.ts +12 -0
- package/packages/storefront/src/lib/layouts/Base.astro +1 -0
- package/packages/storefront/src/lib/layouts/BaseHead.astro +9 -2
- package/packages/storefront/src/lib/scripts/push-analytics-events.ts +88 -0
- package/packages/storefront/src/lib/scripts/session-utm.ts +16 -6
- package/packages/storefront/src/lib/scripts/vbeta-app.ts +4 -0
- package/packages/storefront/src/lib/ssr-context.ts +2 -2
- package/packages/storefront/src/lib/state/shopping-cart.ts +35 -2
- package/packages/storefront/src/lib/state/use-analytics.ts +283 -0
- package/packages/test-base/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/banner2.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/headphone.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/logo.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/passion.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect8589.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect859.png +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/public/img/uploads/rect89.webp +0 -0
- package/ecomplus-stores/barra-doce/functions/ssr/src/layouts/Checkout.astro +0 -0
- package/ecomplus-stores/monocard/functions/ssr/content/extra-pages/contato.json +0 -11
- package/ecomplus-stores/monocard/functions/ssr/public/img/uploads/fluxo.png +0 -0
- package/ecomplus-stores/monocard/functions/ssr/src/layouts/Checkout.astro +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="-mx-4 flex w-screen gap-3 sm:mx-0 sm:w-full md:h-[525px] 2xl:gap-5">
|
|
3
|
+
<Carousel
|
|
4
|
+
v-if="pictures.length > 1"
|
|
5
|
+
axis="y"
|
|
6
|
+
class="group hidden w-[300px] shrink-0 md:block"
|
|
7
|
+
>
|
|
8
|
+
<li
|
|
9
|
+
v-for="i in Math.ceil(pictures.length / 2)"
|
|
10
|
+
:key="i"
|
|
11
|
+
class="grid h-1/3 w-full grid-cols-2 gap-3 px-1 pb-3"
|
|
12
|
+
:class="i === 1 && 'pt-1'"
|
|
13
|
+
>
|
|
14
|
+
<template
|
|
15
|
+
v-for="index in [1, 2].map(ii => (i - 1) * 2 + (ii - 1))"
|
|
16
|
+
:key="`${i}-${index}`"
|
|
17
|
+
>
|
|
18
|
+
<button
|
|
19
|
+
v-if="index < pictures.length"
|
|
20
|
+
class="bg-secondary-50 h-full rounded"
|
|
21
|
+
@click="activeIndex = index"
|
|
22
|
+
>
|
|
23
|
+
<AImg
|
|
24
|
+
:picture="pictures[index]"
|
|
25
|
+
class="ring-secondary/10 h-full w-full rounded border-2
|
|
26
|
+
object-cover opacity-90 transition-colors"
|
|
27
|
+
:class="index === activeIndex
|
|
28
|
+
? 'border-secondary/50 ring-4 cursor-auto'
|
|
29
|
+
: 'border-transparent hover:border-primary'
|
|
30
|
+
+ ' hover:ring-4 hover:ring-primary/20'"
|
|
31
|
+
/>
|
|
32
|
+
</button>
|
|
33
|
+
</template>
|
|
34
|
+
</li>
|
|
35
|
+
<template #controls>
|
|
36
|
+
<span>
|
|
37
|
+
<CarouselControl
|
|
38
|
+
v-if="pictures.length > 6"
|
|
39
|
+
class="hover:bg-primary-300/60 text-primary
|
|
40
|
+
hover:text-on-primary !bottom-3 !left-1/2 -ml-5 h-10
|
|
41
|
+
w-10 rounded-full bg-white/60 text-xl
|
|
42
|
+
opacity-0 shadow-sm ring-1 ring-black/5 group-hover:opacity-90"
|
|
43
|
+
/>
|
|
44
|
+
<span class="absolute bottom-0 block h-2 w-full
|
|
45
|
+
bg-gradient-to-b from-transparent to-white"></span>
|
|
46
|
+
</span>
|
|
47
|
+
</template>
|
|
48
|
+
</Carousel>
|
|
49
|
+
<div class="relative aspect-square h-full grow md:aspect-auto">
|
|
50
|
+
<Carousel
|
|
51
|
+
as="div"
|
|
52
|
+
v-model:index="activeIndex"
|
|
53
|
+
class="text-base-600 [&_i]:i-arrow-right mx-auto
|
|
54
|
+
h-full w-full max-w-[525px] [&>*]:h-full [&_i]:mx-2 [&_i]:text-2xl"
|
|
55
|
+
:class="isLoadingLightbox && 'opacity-80'"
|
|
56
|
+
:id="psId"
|
|
57
|
+
>
|
|
58
|
+
<ALink
|
|
59
|
+
v-for="(picture, i) in pictures"
|
|
60
|
+
:key="`big-${i}`"
|
|
61
|
+
:href="picture.zoom?.size && picture.zoom.url"
|
|
62
|
+
:data-pswp-width="getImgSizes(picture.zoom || '').width"
|
|
63
|
+
:data-pswp-height="getImgSizes(picture.zoom || '').height"
|
|
64
|
+
target="_blank"
|
|
65
|
+
rel="noreferrer"
|
|
66
|
+
class="shrink-0 basis-full"
|
|
67
|
+
:class="picture.zoom?.size && 'cursor-zoom-in'"
|
|
68
|
+
v-once
|
|
69
|
+
@click.prevent="() => picture.zoom?.size && zoom(i)"
|
|
70
|
+
>
|
|
71
|
+
<AImg
|
|
72
|
+
:picture="picture"
|
|
73
|
+
preferred-size="big"
|
|
74
|
+
class="h-full w-full rounded object-cover"
|
|
75
|
+
:fetchpriority="i === 0 ? 'high' : 'low'"
|
|
76
|
+
:loading="i === 0 ? 'eager' : 'lazy'"
|
|
77
|
+
/>
|
|
78
|
+
</ALink>
|
|
79
|
+
</Carousel>
|
|
80
|
+
<i
|
|
81
|
+
v-if="isLoadingLightbox"
|
|
82
|
+
class="i-arrow-path bg-base-200 absolute
|
|
83
|
+
left-1/2 top-1/2 -ml-7 -mt-7 h-14 w-14 animate-spin"
|
|
84
|
+
:aria-label="$t.i19loading"
|
|
85
|
+
></i>
|
|
86
|
+
<ul
|
|
87
|
+
v-if="pictures.length > 1"
|
|
88
|
+
class="mt-2 flex justify-center gap-1.5 md:hidden"
|
|
89
|
+
>
|
|
90
|
+
<li v-for="i in pictures.length" :key="`d-${i}`">
|
|
91
|
+
<button
|
|
92
|
+
class="bg-base-700 block h-1.5 w-3 rounded-full"
|
|
93
|
+
:class="activeIndex !== i - 1 && 'opacity-40'"
|
|
94
|
+
:aria-label="`${$t.i19picture} ${i}`"
|
|
95
|
+
@click="activeIndex = i - 1"
|
|
96
|
+
/>
|
|
97
|
+
</li>
|
|
98
|
+
</ul>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</template>
|
|
102
|
+
|
|
103
|
+
<script setup lang="ts">
|
|
104
|
+
import type { Products } from '@cloudcommerce/api/types';
|
|
105
|
+
import { imgSizes as getImgSizes } from '@ecomplus/utils';
|
|
106
|
+
import { useId } from '@@sf/sf-lib';
|
|
107
|
+
import Carousel from '@@sf/components/Carousel.vue';
|
|
108
|
+
import CarouselControl from '@@sf/components/CarouselControl.vue';
|
|
109
|
+
|
|
110
|
+
export interface Props {
|
|
111
|
+
pictures: Exclude<Products['pictures'], undefined>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
defineProps<Props>();
|
|
115
|
+
const activeIndex = ref(0);
|
|
116
|
+
const psId = ref('');
|
|
117
|
+
let lightbox: any;
|
|
118
|
+
const isLoadingLightbox = ref(false);
|
|
119
|
+
const zoom = (index: number) => {
|
|
120
|
+
psId.value = `ps-${useId()}`;
|
|
121
|
+
if (!lightbox && !isLoadingLightbox.value) {
|
|
122
|
+
isLoadingLightbox.value = true;
|
|
123
|
+
const styleId = 'photoswipe-style';
|
|
124
|
+
Promise.all([
|
|
125
|
+
// @ts-ignore
|
|
126
|
+
import('photoswipe/lightbox'),
|
|
127
|
+
import('photoswipe'),
|
|
128
|
+
!document.getElementById(styleId) && import('photoswipe/style.css?inline'),
|
|
129
|
+
]).then(([
|
|
130
|
+
{ default: PhotoSwipeLightbox },
|
|
131
|
+
{ default: pswpModule },
|
|
132
|
+
cssImport,
|
|
133
|
+
]) => {
|
|
134
|
+
if (cssImport) {
|
|
135
|
+
const { default: css } = cssImport;
|
|
136
|
+
const style = document.createElement('style');
|
|
137
|
+
style.id = styleId;
|
|
138
|
+
style.textContent = css;
|
|
139
|
+
document.head.appendChild(style);
|
|
140
|
+
}
|
|
141
|
+
lightbox = new PhotoSwipeLightbox({
|
|
142
|
+
gallery: `#${psId.value} > div`,
|
|
143
|
+
children: 'a',
|
|
144
|
+
pswpModule,
|
|
145
|
+
showAnimationDuration: 300,
|
|
146
|
+
hideAnimationDuration: 300,
|
|
147
|
+
});
|
|
148
|
+
lightbox.init();
|
|
149
|
+
lightbox.loadAndOpen(index);
|
|
150
|
+
isLoadingLightbox.value = false;
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
</script>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form
|
|
3
|
+
class="text-base-800 w-full max-w-sm bg-white p-6 text-base md:p-8"
|
|
4
|
+
@submit.prevent="() => submitLogin(loginLinkActionUrl)"
|
|
5
|
+
>
|
|
6
|
+
<slot name="head" />
|
|
7
|
+
<p class="text-base-600 mb-4 text-2xl font-light">
|
|
8
|
+
{{ $t.i19hello }}
|
|
9
|
+
<span v-if="customerName">{{ customerName }}</span>
|
|
10
|
+
<span v-else class="lowercase">{{ $t.i19visitor }}</span>
|
|
11
|
+
</p>
|
|
12
|
+
<label v-if="isLinkSignIn" for="login-form-email">
|
|
13
|
+
{{ $t.i19sendLoginLinkByEmail }}
|
|
14
|
+
</label>
|
|
15
|
+
<input
|
|
16
|
+
id="login-form-email"
|
|
17
|
+
type="email"
|
|
18
|
+
placeholder="email@mail.com"
|
|
19
|
+
v-model="email"
|
|
20
|
+
class="mb-0.5 mt-2 w-full rounded"
|
|
21
|
+
required
|
|
22
|
+
/>
|
|
23
|
+
<input
|
|
24
|
+
v-if="!isLinkSignIn"
|
|
25
|
+
type="password"
|
|
26
|
+
:placeholder="$t.i19password"
|
|
27
|
+
v-model="password"
|
|
28
|
+
class="mb-0.5 mt-2 w-full rounded lowercase"
|
|
29
|
+
required
|
|
30
|
+
/>
|
|
31
|
+
<div class="relative">
|
|
32
|
+
<div
|
|
33
|
+
class="transition-opacity"
|
|
34
|
+
:class="isEmailSentMsg && 'opacity-0 invisible'"
|
|
35
|
+
>
|
|
36
|
+
<a
|
|
37
|
+
v-show="!isSignUp && !isLinkSignInBlocked"
|
|
38
|
+
href="?password"
|
|
39
|
+
class="ui-link text-base-500 text-right text-sm lowercase"
|
|
40
|
+
@click.prevent="isLinkSignIn = !isLinkSignIn"
|
|
41
|
+
>
|
|
42
|
+
{{ isLinkSignIn ? $t.i19enterWithPassword : $t.i19iForgotMyPassword }}
|
|
43
|
+
</a>
|
|
44
|
+
<button
|
|
45
|
+
type="submit"
|
|
46
|
+
:disabled="isSubmitting"
|
|
47
|
+
class="ui-btn-lg ui-btn-primary mb-2 mt-5 w-full"
|
|
48
|
+
:class="isSubmitting && 'opacity-50'"
|
|
49
|
+
>
|
|
50
|
+
{{ isSignUp ? $t.i19signUp : $t.i19accessMyAccount }}
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
<Fade speed="slow">
|
|
54
|
+
<p
|
|
55
|
+
v-if="isEmailSentMsg"
|
|
56
|
+
class="text-success-800 absolute left-0 top-0 mt-4 font-medium"
|
|
57
|
+
>
|
|
58
|
+
<i class="i-check mr-1"></i>
|
|
59
|
+
{{ $t.i19emailWasSentMsg }}
|
|
60
|
+
</p>
|
|
61
|
+
</Fade>
|
|
62
|
+
<a
|
|
63
|
+
href="?sign_up"
|
|
64
|
+
class="ui-btn-lg ui-btn-contrast block w-full text-center"
|
|
65
|
+
@click.prevent="isSignUp = !isSignUp"
|
|
66
|
+
>
|
|
67
|
+
{{ isSignUp ? $t.i19accessMyAccount : $t.i19createAnAccount }}
|
|
68
|
+
</a>
|
|
69
|
+
</div>
|
|
70
|
+
</form>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script lang="ts" setup>
|
|
74
|
+
import useLoginForm from '@@sf/composables/use-login-form';
|
|
75
|
+
import { customerName } from '@@sf/state/customer-session';
|
|
76
|
+
|
|
77
|
+
export interface Props {
|
|
78
|
+
loginLinkActionUrl?: string | null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
defineProps<Props>();
|
|
82
|
+
const {
|
|
83
|
+
isLinkSignIn,
|
|
84
|
+
isSignUp,
|
|
85
|
+
email,
|
|
86
|
+
password,
|
|
87
|
+
isSubmitting,
|
|
88
|
+
submitLogin,
|
|
89
|
+
} = useLoginForm();
|
|
90
|
+
const isEmailSentMsg = ref(false);
|
|
91
|
+
const countEmailsSent = ref(0);
|
|
92
|
+
const isLinkSignInBlocked = computed(() => {
|
|
93
|
+
return countEmailsSent.value > 9;
|
|
94
|
+
});
|
|
95
|
+
watch((isSubmitting), () => {
|
|
96
|
+
if (!isSubmitting.value && isLinkSignIn.value) {
|
|
97
|
+
isEmailSentMsg.value = true;
|
|
98
|
+
countEmailsSent.value += 1;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
watch([email, isSignUp], () => {
|
|
102
|
+
isEmailSentMsg.value = false;
|
|
103
|
+
});
|
|
104
|
+
watch(isLinkSignInBlocked, () => {
|
|
105
|
+
isLinkSignIn.value = false;
|
|
106
|
+
});
|
|
107
|
+
</script>
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { ref, onMounted } from 'vue';
|
|
3
|
-
|
|
4
2
|
const container = ref(null);
|
|
5
3
|
if (!import.meta.env.SSR) {
|
|
6
4
|
onMounted(() => {
|
|
@@ -12,7 +10,7 @@ if (!import.meta.env.SSR) {
|
|
|
12
10
|
autoplay: true,
|
|
13
11
|
path: '/assets/lotties/phone-nfc.json',
|
|
14
12
|
});
|
|
15
|
-
})
|
|
13
|
+
});
|
|
16
14
|
});
|
|
17
15
|
}
|
|
18
16
|
</script>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { Products } from '@cloudcommerce/api/types';
|
|
3
|
-
import { ref, computed, watch } from 'vue';
|
|
4
3
|
import ecomUtils from '@ecomplus/utils';
|
|
5
4
|
|
|
6
5
|
export interface Props {
|
|
@@ -109,17 +108,17 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
109
108
|
|
|
110
109
|
<template>
|
|
111
110
|
<div class="container">
|
|
112
|
-
<article class="
|
|
113
|
-
<div class="
|
|
114
|
-
<div class="
|
|
111
|
+
<article class="mx-auto max-w-4xl gap-5 lg:flex">
|
|
112
|
+
<div class="order-2 mb-10 basis-1/2 lg:mb-0">
|
|
113
|
+
<div class="mb-3 mr-5 inline-block">
|
|
115
114
|
<i class="i-checkbox-circle-fill bg-primary mr-1"></i> Frete grátis
|
|
116
115
|
</div>
|
|
117
|
-
<div class="inline-block
|
|
116
|
+
<div class="mb-3 inline-block">
|
|
118
117
|
<i class="i-checkbox-circle-fill bg-primary mr-1"></i> Sem mensalidade
|
|
119
118
|
</div>
|
|
120
119
|
<a name="comprar"></a>
|
|
121
120
|
<h1 class="mb-3">Seu cartão de visitas eletrônico personalizado</h1>
|
|
122
|
-
<h4 class="text-sm
|
|
121
|
+
<h4 class="mb-10 text-sm">
|
|
123
122
|
<a href="#como-funciona">
|
|
124
123
|
<i class="i-play-circle-line mr-1"></i>Como o Monocard funciona?
|
|
125
124
|
</a>
|
|
@@ -128,12 +127,12 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
128
127
|
<div
|
|
129
128
|
v-for="(card, i) in cardsBag"
|
|
130
129
|
:key="i"
|
|
131
|
-
class="flex gap-2
|
|
130
|
+
class="mb-3 flex gap-2"
|
|
132
131
|
>
|
|
133
132
|
<input
|
|
134
133
|
id="login-form-email"
|
|
135
134
|
type="text"
|
|
136
|
-
class="
|
|
135
|
+
class="mb-0 uppercase"
|
|
137
136
|
placeholder="Nome no cartão"
|
|
138
137
|
@focus="focusedCard = i"
|
|
139
138
|
@focusin="isNameInputFocus = true"
|
|
@@ -141,7 +140,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
141
140
|
v-model="card.holderName"
|
|
142
141
|
required
|
|
143
142
|
>
|
|
144
|
-
<div class="basis-1/3
|
|
143
|
+
<div class="flex basis-1/3 items-center">
|
|
145
144
|
<input
|
|
146
145
|
class="mb-0"
|
|
147
146
|
type="number"
|
|
@@ -152,7 +151,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
152
151
|
>
|
|
153
152
|
<div v-if="cardsBag.length > 1" class="flex-auto">
|
|
154
153
|
<div
|
|
155
|
-
class="
|
|
154
|
+
class="i-close-fill ml-1 bg-red-400 text-xl"
|
|
156
155
|
role="button"
|
|
157
156
|
:aria-label="`Remover cartão ${(i + 1)}`"
|
|
158
157
|
@click="removeCard(i)"
|
|
@@ -160,10 +159,10 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
160
159
|
</div>
|
|
161
160
|
</div>
|
|
162
161
|
</div>
|
|
163
|
-
<div class="lg:flex
|
|
164
|
-
<div class="flex-none
|
|
162
|
+
<div class="gap-8 lg:flex">
|
|
163
|
+
<div class="order-last flex-none">
|
|
165
164
|
<button
|
|
166
|
-
class="
|
|
165
|
+
class="secondary inline-block w-auto flex-none text-sm leading-none"
|
|
167
166
|
type="button"
|
|
168
167
|
@click="cardsBag.push({ holderName: '', quantity: 1 })"
|
|
169
168
|
>
|
|
@@ -178,16 +177,16 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
178
177
|
</strong>
|
|
179
178
|
<span v-if="totalQuantity > 1">{{ formatMoney(price) }} /cartão</span>
|
|
180
179
|
</div>
|
|
181
|
-
<button class="
|
|
180
|
+
<button class="rounded-full text-xl font-bold uppercase" type="submit">
|
|
182
181
|
Comprar
|
|
183
182
|
</button>
|
|
184
183
|
</div>
|
|
185
184
|
</div>
|
|
186
185
|
</form>
|
|
187
186
|
</div>
|
|
188
|
-
<div class="basis-1/2
|
|
187
|
+
<div class="order-1 basis-1/2">
|
|
189
188
|
<div
|
|
190
|
-
class="card mt-2
|
|
189
|
+
class="card mb-5 mt-2"
|
|
191
190
|
:class="cardAnimationClass"
|
|
192
191
|
:style="{
|
|
193
192
|
'--background-color': cardBgColor,
|
|
@@ -196,7 +195,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
196
195
|
>
|
|
197
196
|
<div class="card__front card__part">
|
|
198
197
|
<div class="card__front-square card__square">
|
|
199
|
-
<div class="
|
|
198
|
+
<div class="i-qr-code-line text-5xl"></div>
|
|
200
199
|
</div>
|
|
201
200
|
<div class="card__front-logo card__logo">
|
|
202
201
|
<div class="text-sm font-bold">monocard</div>
|
|
@@ -206,7 +205,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
206
205
|
</div>
|
|
207
206
|
<div class="card__space-25">
|
|
208
207
|
<p class="card__info">
|
|
209
|
-
<i class="
|
|
208
|
+
<i class="i-wifi-fill rotate-90 text-lg"></i>
|
|
210
209
|
</p>
|
|
211
210
|
</div>
|
|
212
211
|
</div>
|
|
@@ -221,14 +220,14 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
221
220
|
<button
|
|
222
221
|
v-for="{ bgColor, textColor } in cardVariants"
|
|
223
222
|
:key="bgColor"
|
|
224
|
-
class="
|
|
225
|
-
|
|
223
|
+
class="border-1 border-gray relative mr-2 inline-block h-5
|
|
224
|
+
w-5 rounded-full p-0 shadow drop-shadow"
|
|
226
225
|
:style="{ background: bgColor }"
|
|
227
226
|
@click="selectCardVariant({ bgColor, textColor })"
|
|
228
227
|
>
|
|
229
228
|
<i
|
|
230
229
|
v-if="cardBgColor === bgColor"
|
|
231
|
-
class="
|
|
230
|
+
class="i-checkbox-fill absolute bg-green-300 text-xs"
|
|
232
231
|
></i>
|
|
233
232
|
</button>
|
|
234
233
|
<div class="mt-5">
|
|
@@ -241,7 +240,7 @@ const logoAdditionalPrice = monocardWithLogo
|
|
|
241
240
|
v-model="isLogoEnabled"
|
|
242
241
|
>
|
|
243
242
|
Imagem no verso
|
|
244
|
-
<small class="text-sm
|
|
243
|
+
<small class="mb-2 text-sm" v-if="logoAdditionalPrice">
|
|
245
244
|
<br>+ {{ formatMoney(logoAdditionalPrice) }} por cartão
|
|
246
245
|
</small>
|
|
247
246
|
</label>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bg-black uppercase
|
|
2
|
+
<div class="relative z-20 bg-black uppercase">
|
|
3
3
|
<div class="bg-primary/20">
|
|
4
|
-
<div class="container
|
|
4
|
+
<div class="container mx-auto px-3 py-1 md:w-2/3">
|
|
5
5
|
<Carousel :autoplay="countValidSlides > 1 ? 7000 : undefined">
|
|
6
6
|
<li
|
|
7
7
|
v-for="(slide, i) in slides"
|
|
8
8
|
:key="i"
|
|
9
|
-
class="shrink-0 basis-full
|
|
9
|
+
class="h-full shrink-0 basis-full text-center"
|
|
10
10
|
>
|
|
11
11
|
<component
|
|
12
12
|
:is="slide.href ? 'ALink' : 'span'"
|
|
@@ -18,20 +18,20 @@
|
|
|
18
18
|
<span
|
|
19
19
|
v-if="parsedContents[i]"
|
|
20
20
|
v-html="parsedContents[i]"
|
|
21
|
-
class="prose text-
|
|
21
|
+
class="prose text-primary-100 text-sm"
|
|
22
22
|
></span>
|
|
23
23
|
</component>
|
|
24
24
|
</li>
|
|
25
25
|
<template #controls>
|
|
26
26
|
<div
|
|
27
27
|
v-show="countValidSlides > 1"
|
|
28
|
-
class="text-xl leading-none
|
|
28
|
+
class="text-primary-400 text-xl leading-none"
|
|
29
29
|
>
|
|
30
30
|
<CarouselControl
|
|
31
31
|
:direction="-1"
|
|
32
|
-
class="
|
|
32
|
+
class="hover:text-primary-200 pr-2"
|
|
33
33
|
/>
|
|
34
|
-
<CarouselControl class="
|
|
34
|
+
<CarouselControl class="hover:text-primary-200 pl-2" />
|
|
35
35
|
</div>
|
|
36
36
|
</template>
|
|
37
37
|
</Carousel>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="text-base-600
|
|
4
|
-
[&>div]:[font-size:90%] [&_small]:[font-size:92%]
|
|
4
|
+
[&>div]:[font-size:90%] [&_small]:lowercase [&_small]:[font-size:92%]"
|
|
5
5
|
:class="isBig ? 'text-lg' : null"
|
|
6
6
|
>
|
|
7
7
|
<span v-if="comparePrice" class="text-base-500 mr-1 text-[87%]">
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
</small>
|
|
15
15
|
</span>
|
|
16
16
|
<strong
|
|
17
|
-
class="
|
|
18
|
-
:class="isBig ? 'text-
|
|
17
|
+
class="text-base-800"
|
|
18
|
+
:class="isBig ? 'text-4xl block' : 'inline-block'"
|
|
19
19
|
>
|
|
20
20
|
<small v-if="hasVariedPrices">
|
|
21
21
|
{{ `${$t.i19asOf} ` }}
|
|
@@ -2,55 +2,56 @@
|
|
|
2
2
|
<article
|
|
3
3
|
ref="card"
|
|
4
4
|
:data-sku="product.sku"
|
|
5
|
-
class="relative h-full max-w-[350px]
|
|
5
|
+
class="group relative mx-auto h-full max-w-[350px] py-3"
|
|
6
6
|
>
|
|
7
7
|
<ALink
|
|
8
8
|
:href="link"
|
|
9
|
-
class="flex
|
|
10
|
-
group-hover:shadow group-hover:ring-1
|
|
9
|
+
class="flex h-full flex-col overflow-hidden rounded
|
|
10
|
+
ring-black/5 group-hover:shadow group-hover:ring-1"
|
|
11
11
|
>
|
|
12
12
|
<div class="aspect-square p-2
|
|
13
|
-
motion-safe:group-hover:scale-110
|
|
14
|
-
<div class="relative
|
|
13
|
+
transition-transform motion-safe:group-hover:scale-110">
|
|
14
|
+
<div class="relative h-full w-full overflow-hidden rounded bg-white
|
|
15
15
|
group-hover:rounded-none">
|
|
16
16
|
<span v-if="images?.length" class="text-xs text-opacity-70">
|
|
17
17
|
<AImg
|
|
18
18
|
:picture="images[0]"
|
|
19
19
|
:alt="title"
|
|
20
|
-
class="absolute
|
|
20
|
+
class="absolute left-0 top-0 block h-full w-full object-cover"
|
|
21
21
|
/>
|
|
22
22
|
<AImg
|
|
23
23
|
v-if="images[1] && wasHoveredOnce"
|
|
24
24
|
:picture="images[1]"
|
|
25
25
|
:alt="title"
|
|
26
|
-
class="absolute
|
|
27
|
-
|
|
28
|
-
motion-safe:duration-300
|
|
26
|
+
class="absolute left-0 top-0 z-10 block h-full w-full
|
|
27
|
+
object-cover text-transparent opacity-0
|
|
28
|
+
transition-opacity group-hover:opacity-100 motion-safe:duration-300"
|
|
29
29
|
/>
|
|
30
30
|
</span>
|
|
31
31
|
<div
|
|
32
32
|
v-else
|
|
33
|
-
class="
|
|
33
|
+
class="from-base-50/20 to-base-100 h-full w-full bg-gradient-to-br"
|
|
34
34
|
/>
|
|
35
35
|
</div>
|
|
36
36
|
</div>
|
|
37
37
|
<span
|
|
38
38
|
v-if="discountPercentage"
|
|
39
|
-
class=":uno:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
class=":uno: bg-secondary/70 text-on-secondary absolute
|
|
40
|
+
right-2 top-9 py-0.5
|
|
41
|
+
pl-3 pr-1.5 text-xs
|
|
42
|
+
transition-transform [clip-path:polygon(20%_0,100%_0,100%_100%,0_100%)]
|
|
43
|
+
group-hover:translate-x-2 group-hover:scale-110"
|
|
43
44
|
>
|
|
44
45
|
-<strong>{{ discountPercentage }}</strong>%
|
|
45
46
|
</span>
|
|
46
|
-
<div class="relative flex flex-col
|
|
47
|
-
group-hover:backdrop-blur-md
|
|
47
|
+
<div class="relative z-10 flex grow flex-col justify-between
|
|
48
|
+
bg-white/40 p-4 group-hover:backdrop-blur-md">
|
|
48
49
|
<component
|
|
49
50
|
:is="headingTag"
|
|
50
|
-
class="ui-link
|
|
51
|
+
class="ui-link line-clamp-2 no-underline"
|
|
51
52
|
:class="[
|
|
52
53
|
isActive ? 'text-base-700' : 'text-base-500',
|
|
53
|
-
link ? 'group-hover:
|
|
54
|
+
link ? 'group-hover:text-primary group-hover:underline' : null,
|
|
54
55
|
]"
|
|
55
56
|
>
|
|
56
57
|
{{ title }}
|
|
@@ -65,13 +66,13 @@
|
|
|
65
66
|
</div>
|
|
66
67
|
<button
|
|
67
68
|
v-if="isActive && !hasVariations"
|
|
68
|
-
class=":uno:
|
|
69
|
-
|
|
70
|
-
opacity-0 group-hover:
|
|
69
|
+
class=":uno: ui-btn-sm ui-btn-primary absolute -top-6
|
|
70
|
+
left-0 -z-10 hidden w-full rounded-none
|
|
71
|
+
opacity-0 transition group-hover:z-10 group-hover:opacity-100 md:block"
|
|
71
72
|
@click.prevent="addProductToCart(product)"
|
|
72
73
|
>
|
|
73
|
-
<span class="inline-block h-4 w-4
|
|
74
|
-
|
|
74
|
+
<span class="bg-on-primary text-primary mr-1 inline-block h-4 w-4
|
|
75
|
+
rounded-full text-center text-base leading-none opacity-80">
|
|
75
76
|
+
|
|
76
77
|
</span>
|
|
77
78
|
{{ $t.i19addToCart }}
|
|
@@ -82,7 +83,6 @@
|
|
|
82
83
|
</template>
|
|
83
84
|
|
|
84
85
|
<script setup lang="ts">
|
|
85
|
-
import { ref } from 'vue';
|
|
86
86
|
import { watchOnce, useElementHover } from '@vueuse/core';
|
|
87
87
|
import { addProductToCart } from '@@sf/state/shopping-cart';
|
|
88
88
|
import {
|