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
|
@@ -11,7 +11,7 @@ const heroSlides = heroSlider.slides;
|
|
|
11
11
|
|
|
12
12
|
<main>
|
|
13
13
|
{heroSlider.slides.length &&
|
|
14
|
-
<HeroSlider {...heroSlider} client:
|
|
14
|
+
<HeroSlider {...heroSlider} client:idle>
|
|
15
15
|
{heroSlides[0] && <BannerPictures
|
|
16
16
|
slot="picture-0" {...heroSlides[0]} index={0}
|
|
17
17
|
widths={[640, 856, 1024, 1536]} class="max-w-screen-sm sm:max-w-screen-lg" />}
|
|
@@ -34,5 +34,4 @@ const heroSlides = heroSlider.slides;
|
|
|
34
34
|
</HeroSlider>
|
|
35
35
|
}
|
|
36
36
|
<Sections />
|
|
37
|
-
<div style="height: 1000px;"></div>
|
|
38
37
|
</main>
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
import { usePageSections } from '@@sf/layouts/use-page-main';
|
|
3
3
|
import BannersGrid from '~/components/BannersGrid.astro';
|
|
4
4
|
import ProductShelf from '~/components/ProductShelf.vue';
|
|
5
|
+
import Breadcrumbs from '~/components/Breadcrumbs.astro';
|
|
6
|
+
import DocDescription from '~/components/DocDescription.vue';
|
|
7
|
+
import ProductDetails from '~/components/ProductDetails.vue';
|
|
8
|
+
import ProductSpecifications from '~/components/ProductSpecifications.vue';
|
|
5
9
|
|
|
6
10
|
const { routeContext } = Astro.locals;
|
|
7
11
|
const { sections } = await usePageSections({
|
|
@@ -11,15 +15,34 @@ const { sections } = await usePageSections({
|
|
|
11
15
|
return { props: content };
|
|
12
16
|
},
|
|
13
17
|
});
|
|
18
|
+
const { isHomepage } = routeContext;
|
|
19
|
+
/* `apiContext` is surelly set here (from Wildcard.astro)
|
|
20
|
+
cause route resource is required to define sections from content. */
|
|
14
21
|
---
|
|
15
22
|
|
|
16
23
|
<article class="my-9 md:my-12">
|
|
17
|
-
{sections.map(({ type, props }) => {
|
|
24
|
+
{sections.map(async ({ type, props }) => {
|
|
18
25
|
switch (type) {
|
|
19
26
|
case 'product-shelf':
|
|
20
|
-
return
|
|
27
|
+
return isHomepage
|
|
28
|
+
? <ProductShelf {...props} client:idle />
|
|
29
|
+
: <ProductShelf {...props} client:visible />
|
|
21
30
|
case 'banners-grid':
|
|
22
31
|
return <BannersGrid {...props} />
|
|
32
|
+
case 'breadcrumbs':
|
|
33
|
+
return <Breadcrumbs />
|
|
34
|
+
case 'doc-description':
|
|
35
|
+
return <DocDescription />
|
|
36
|
+
case 'product-details':
|
|
37
|
+
const { hasDescription, hasSpecifications, ...detailsProps } = props;
|
|
38
|
+
return <>
|
|
39
|
+
<ProductDetails {...detailsProps} client:context>
|
|
40
|
+
<Fragment slot="description">
|
|
41
|
+
{hasDescription && <DocDescription />}
|
|
42
|
+
{hasSpecifications && <ProductSpecifications />}
|
|
43
|
+
</Fragment>
|
|
44
|
+
</ProductDetails>
|
|
45
|
+
</>
|
|
23
46
|
case 'c:foo':
|
|
24
47
|
return <div data-foo={props.foo}></div>
|
|
25
48
|
default:
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
import api from '@cloudcommerce/api';
|
|
3
|
+
import SharedData from '@@sf/components/SharedData.astro';
|
|
4
|
+
import Sections from '~/main/Sections.astro';
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
+
const { fetchingApiContext } = Astro.locals.routeContext;
|
|
7
|
+
const [
|
|
8
|
+
{ data: { result: grids } },
|
|
9
|
+
] = await Promise.all([
|
|
10
|
+
api.get('grids'),
|
|
11
|
+
fetchingApiContext,
|
|
12
|
+
]);
|
|
6
13
|
---
|
|
7
14
|
|
|
8
15
|
<main>
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
<hr>
|
|
12
|
-
<div class="mt-3">
|
|
13
|
-
<mark>{apiDoc._id}</mark> from <i>{apiContext.resource}</i>
|
|
14
|
-
<p>{Math.random()}</p>
|
|
15
|
-
<em>Lorem ipsum dolor sit amet</em>
|
|
16
|
-
</div>
|
|
17
|
-
}
|
|
16
|
+
<SharedData field="grids" value={grids} />
|
|
17
|
+
<Sections />
|
|
18
18
|
</main>
|
|
@@ -4,6 +4,7 @@ import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
|
|
|
4
4
|
import BaseHead from '@@sf/layouts/BaseHead.astro';
|
|
5
5
|
import Base from '~/layouts/Base.astro';
|
|
6
6
|
import PageHeader from '~/layouts/PageHeader.astro';
|
|
7
|
+
import PageFooter from '~/layouts/PageFooter.astro';
|
|
7
8
|
import WildcardMain from '~/main/Wildcard.astro';
|
|
8
9
|
|
|
9
10
|
if (String(Astro.params.slug).endsWith('.css.map')) {
|
|
@@ -34,6 +35,7 @@ export async function getStaticPaths() {
|
|
|
34
35
|
<BaseHead slot="base-head" />
|
|
35
36
|
<PageHeader />
|
|
36
37
|
<WildcardMain />
|
|
38
|
+
<PageFooter />
|
|
37
39
|
</Base>
|
|
38
40
|
}
|
|
39
41
|
{loadError && <Fragment set:html={loadError.responseHTML} />}
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import _createApp from '@@sf/pages/_vue';
|
|
3
|
+
import Carousel from '@@sf/components/Carousel.vue';
|
|
4
|
+
import CarouselControl from '@@sf/components/CarouselControl.vue';
|
|
5
|
+
|
|
6
|
+
const createApp = (app: App) => {
|
|
7
|
+
_createApp(app);
|
|
8
|
+
app.component('Carousel', Carousel);
|
|
9
|
+
app.component('CarouselControl', CarouselControl);
|
|
10
|
+
};
|
|
2
11
|
|
|
3
12
|
export default createApp;
|
|
13
|
+
|
|
14
|
+
declare module '@vue/runtime-core' {
|
|
15
|
+
export interface GlobalComponents {
|
|
16
|
+
Carousel: typeof Carousel;
|
|
17
|
+
CarouselControl: typeof CarouselControl;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
|
|
3
|
+
import Picture from '@@sf/components/Picture.astro';
|
|
4
|
+
import BaseHead from '@@sf/layouts/BaseHead.astro';
|
|
5
|
+
import Base from '~/layouts/Base.astro';
|
|
6
|
+
import AccountPage from '~/components/AccountPage.vue';
|
|
7
|
+
|
|
8
|
+
let routeContext: RouteContext;
|
|
9
|
+
try {
|
|
10
|
+
routeContext = await loadRouteContext(Astro);
|
|
11
|
+
} catch (err: any) {
|
|
12
|
+
return err.astroResponse;
|
|
13
|
+
}
|
|
14
|
+
const { settings } = routeContext;
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<!DOCTYPE html>
|
|
18
|
+
<html lang={routeContext.lang.replace('_', '-')}>
|
|
19
|
+
<Base>
|
|
20
|
+
<BaseHead slot="base-head" />
|
|
21
|
+
<main>
|
|
22
|
+
<AccountPage client:only>
|
|
23
|
+
<Picture
|
|
24
|
+
slot="logo"
|
|
25
|
+
src={settings.logo}
|
|
26
|
+
alt={settings.name}
|
|
27
|
+
widths={[300]}
|
|
28
|
+
loading="lazy"
|
|
29
|
+
class="max-w-[150px]"
|
|
30
|
+
/>
|
|
31
|
+
</AccountPage>
|
|
32
|
+
</main>
|
|
33
|
+
</Base>
|
|
34
|
+
</html>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
import loadRouteContext, { RouteContext } from '@@sf/ssr-context';
|
|
3
|
+
import BaseHead from '@@sf/layouts/BaseHead.astro';
|
|
4
|
+
import Base from '~/layouts/Base.astro';
|
|
5
|
+
import CheckoutPage from '~/components/CheckoutPage.vue';
|
|
6
|
+
|
|
7
|
+
let routeContext: RouteContext;
|
|
8
|
+
try {
|
|
9
|
+
routeContext = await loadRouteContext(Astro);
|
|
10
|
+
} catch (err: any) {
|
|
11
|
+
return err.astroResponse;
|
|
12
|
+
}
|
|
13
|
+
const layoutContent = await routeContext.getContent('layout');
|
|
14
|
+
const { footer: { stamps } } = layoutContent;
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<!DOCTYPE html>
|
|
18
|
+
<html lang={routeContext.lang.replace('_', '-')}>
|
|
19
|
+
<Base>
|
|
20
|
+
<Fragment slot="base-head">
|
|
21
|
+
<BaseHead />
|
|
22
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ecomplus/storefront-twbs@7/dist/cdn/storefront-twbs.min.css">
|
|
23
|
+
<style is:inline>
|
|
24
|
+
body {
|
|
25
|
+
--primary: var(--c-primary);
|
|
26
|
+
--primary-yiq: var(--c-on-primary);
|
|
27
|
+
--primary-rgb: var(--rgb-primary);
|
|
28
|
+
--primary-darken: var(--c-primary);
|
|
29
|
+
--primary-darken-yiq: var(--c-on-primary);
|
|
30
|
+
--primary-darken-rgb: var(--rgb-primary);
|
|
31
|
+
--primary-dark: var(--c-primary-bold);
|
|
32
|
+
--primary-dark-yiq: var(--c-on-primary-bold);
|
|
33
|
+
--primary-dark-rgb: var(--rgb-primary-bold);
|
|
34
|
+
--primary-darker: var(--c-primary-bold);
|
|
35
|
+
--primary-darker-yiq: var(--c-on-primary-bold);
|
|
36
|
+
--primary-darker-rgb: var(--rgb-primary-bold);
|
|
37
|
+
--primary-darkest: rgb(var(--rgb-primary-900));
|
|
38
|
+
--primary-darkest-yiq: var(--c-on-dark);
|
|
39
|
+
--primary-darkest-rgb: var(--rgb-primary-900);
|
|
40
|
+
--primary-black: rgb(var(--rgb-primary-950));
|
|
41
|
+
--primary-lighten: var(--c-primary);
|
|
42
|
+
--primary-lighten-yiq: var(--c-on-primary);
|
|
43
|
+
--primary-lighten-rgb: var(--rgb-primary);
|
|
44
|
+
--primary-light: var(--c-primary-subtle);
|
|
45
|
+
--primary-light-yiq: var(--c-on-primary-subtle);
|
|
46
|
+
--primary-light-rgb: var(--rgb-primary-subtle);
|
|
47
|
+
--primary-lighter: var(--c-primary-subtle);
|
|
48
|
+
--primary-lighter-yiq: var(--c-on-primary-subtle);
|
|
49
|
+
--primary-lighter-rgb: var(--rgb-primary-subtle);
|
|
50
|
+
--primary-lightest: rgb(var(--rgb-primary-200));
|
|
51
|
+
--primary-lightest-yiq: var(--c-on-light);
|
|
52
|
+
--primary-lightest-rgb: var(--rgb-primary-200);
|
|
53
|
+
}
|
|
54
|
+
.lead {
|
|
55
|
+
margin-bottom: 1.25rem;
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
58
|
+
</Fragment>
|
|
59
|
+
<CheckoutPage footerStamps={stamps} />
|
|
60
|
+
<script src="@@sf/scripts/vbeta-app"></script>
|
|
61
|
+
</Base>
|
|
62
|
+
</html>
|
|
@@ -10,11 +10,6 @@ let routeContext: RouteContext | undefined;
|
|
|
10
10
|
let loadError: any;
|
|
11
11
|
try {
|
|
12
12
|
routeContext = await loadRouteContext(Astro);
|
|
13
|
-
/* Faster SSR without store categories (default) prefetch:
|
|
14
|
-
routeContext = await loadRouteContext(Astro, {
|
|
15
|
-
apiPrefetchEndpoints: [],
|
|
16
|
-
});
|
|
17
|
-
*/
|
|
18
13
|
} catch (err: any) {
|
|
19
14
|
if (err.astroResponse) {
|
|
20
15
|
return err.astroResponse;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/events": "^0.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
20
|
-
"@cloudcommerce/modules": "^0.
|
|
18
|
+
"@cloudcommerce/events": "^0.33.1",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.33.1",
|
|
20
|
+
"@cloudcommerce/modules": "^0.33.1"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"url": "https://github.com/ecomplus/cloud-commerce/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@cloudcommerce/cli": "^0.
|
|
26
|
+
"@cloudcommerce/cli": "^0.33.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@cloudcommerce/eslint": "^0.
|
|
29
|
+
"@cloudcommerce/eslint": "^0.33.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
"editor.quickSuggestions": {
|
|
3
3
|
"strings": true
|
|
4
4
|
},
|
|
5
|
+
"editor.codeActionsOnSave": {
|
|
6
|
+
"source.fixAll.eslint": true
|
|
7
|
+
},
|
|
5
8
|
"files.associations": {
|
|
6
9
|
"*.css": "tailwindcss"
|
|
7
10
|
},
|
|
8
|
-
"css.lint.unknownAtRules": "ignore"
|
|
11
|
+
"css.lint.unknownAtRules": "ignore",
|
|
12
|
+
"git.autofetch": true
|
|
9
13
|
}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@cloudcommerce/feeds": "^0.
|
|
19
|
-
"@cloudcommerce/firebase": "^0.
|
|
20
|
-
"@cloudcommerce/passport": "^0.
|
|
18
|
+
"@cloudcommerce/feeds": "^0.33.1",
|
|
19
|
+
"@cloudcommerce/firebase": "^0.33.1",
|
|
20
|
+
"@cloudcommerce/passport": "^0.33.1"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -3,32 +3,7 @@
|
|
|
3
3
|
"metaDescription": "",
|
|
4
4
|
"hero": {
|
|
5
5
|
"autoplay": 9000,
|
|
6
|
-
"slides": [
|
|
7
|
-
{
|
|
8
|
-
"startsAt": "",
|
|
9
|
-
"endsAt": "",
|
|
10
|
-
"img": "/img/uploads/rect89.webp",
|
|
11
|
-
"alt": "Headset banner",
|
|
12
|
-
"mobileImg": "/img/uploads/headphone.webp",
|
|
13
|
-
"href": "/headset",
|
|
14
|
-
"title": "20% off on first purchase",
|
|
15
|
-
"subtitle": "At demoStore you can shop the best tech of 2023. Enjoy and get 10% off on your first purchase!",
|
|
16
|
-
"buttonLink": "/",
|
|
17
|
-
"buttonText": "See"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"startsAt": "",
|
|
21
|
-
"endsAt": "",
|
|
22
|
-
"img": "/img/uploads/rect859.png",
|
|
23
|
-
"alt": "",
|
|
24
|
-
"mobileImg": "",
|
|
25
|
-
"href": "",
|
|
26
|
-
"title": "",
|
|
27
|
-
"subtitle": "",
|
|
28
|
-
"buttonLink": "",
|
|
29
|
-
"buttonText": ""
|
|
30
|
-
}
|
|
31
|
-
]
|
|
6
|
+
"slides": []
|
|
32
7
|
},
|
|
33
8
|
"sections": [
|
|
34
9
|
{
|
|
@@ -40,24 +15,6 @@
|
|
|
40
15
|
"isShuffle": false,
|
|
41
16
|
"limit": 12,
|
|
42
17
|
"page": 1
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"type": "banners-grid",
|
|
46
|
-
"banners": [
|
|
47
|
-
{
|
|
48
|
-
"img": "/img/uploads/rect8589.png",
|
|
49
|
-
"href": "/banner-1"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"img": "/img/uploads/passion.webp",
|
|
53
|
-
"href": "/banner-2"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"img": "/img/uploads/rect89.webp",
|
|
57
|
-
"href": "/banner-3",
|
|
58
|
-
"mobileImg": "/img/uploads/headphone.webp"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
18
|
}
|
|
62
19
|
]
|
|
63
20
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"domain": "monocard.ecomplus.app",
|
|
3
|
-
"assetsPrefix": "https://s2-monocard.b-cdn.net",
|
|
4
3
|
"name": "Monocard",
|
|
5
4
|
"description": "Monocard - O seu último cartão de visitas",
|
|
6
5
|
"logo": "/img/uploads/logo.webp",
|
|
@@ -31,6 +30,10 @@
|
|
|
31
30
|
{
|
|
32
31
|
"title": "Fale conosco",
|
|
33
32
|
"href": "https://ajuda.monocard.com.br/"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"title": "Privacidade e termos",
|
|
36
|
+
"href": "/p/terms"
|
|
34
37
|
}
|
|
35
38
|
],
|
|
36
39
|
"paymentMethods": [
|
|
@@ -17,19 +17,20 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudcommerce/api": "^0.
|
|
21
|
-
"@cloudcommerce/firebase": "^0.
|
|
22
|
-
"@cloudcommerce/ssr": "^0.
|
|
20
|
+
"@cloudcommerce/api": "^0.33.1",
|
|
21
|
+
"@cloudcommerce/firebase": "^0.33.1",
|
|
22
|
+
"@cloudcommerce/ssr": "^0.33.1",
|
|
23
23
|
"@headlessui/vue": "^1.7.16",
|
|
24
24
|
"@vueuse/motion": "2.0.0-beta.22"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@cloudcommerce/i18n": "^0.
|
|
28
|
-
"@cloudcommerce/storefront": "^0.
|
|
29
|
-
"@cloudcommerce/types": "^0.
|
|
27
|
+
"@cloudcommerce/i18n": "^0.33.1",
|
|
28
|
+
"@cloudcommerce/storefront": "^0.33.1",
|
|
29
|
+
"@cloudcommerce/types": "^0.33.1",
|
|
30
30
|
"@fontsource-variable/inter": "^5.0.8",
|
|
31
31
|
"@iconify-json/ri": "^1.1.8",
|
|
32
32
|
"@iconify-json/wpf": "^1.1.4",
|
|
33
|
-
"lottie-web": "^5.12.2"
|
|
33
|
+
"lottie-web": "^5.12.2",
|
|
34
|
+
"photoswipe": "^5.4.2"
|
|
34
35
|
}
|
|
35
36
|
}
|
|
@@ -10,7 +10,7 @@ html {
|
|
|
10
10
|
body {
|
|
11
11
|
overflow-x: hidden;
|
|
12
12
|
}
|
|
13
|
-
a, button, button > * {
|
|
13
|
+
a, button, button > *, [role=button], [role=button] > * {
|
|
14
14
|
transition: background-color var(--transition),
|
|
15
15
|
color var(--transition), border-color var(--transition),
|
|
16
16
|
opacity var(--transition), transform var(--transition-fast);
|
|
@@ -39,7 +39,7 @@ a, button, button > * {
|
|
|
39
39
|
hover:secondary ring-secondary/30;
|
|
40
40
|
}
|
|
41
41
|
.ui-btn-contrast {
|
|
42
|
-
@apply bg-
|
|
42
|
+
@apply bg-primary-50 text-on-primary hover:bg-primary-100 ring-white/30;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.ui-text-brand, .ui-title {
|
|
@@ -63,6 +63,11 @@ a, button, button > * {
|
|
|
63
63
|
@apply text-lg min-w-[1.75rem] px-2;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
.ui-alert {
|
|
67
|
+
@apply bg-warning-100 text-warning-800 border-warning-200
|
|
68
|
+
border text-base rounded px-4 py-3;
|
|
69
|
+
}
|
|
70
|
+
|
|
66
71
|
[class*=ui-section] {
|
|
67
72
|
@apply container 2xl:max-w-7xl mx-auto px-4 sm:px-2 my-6 md:my-8;
|
|
68
73
|
}
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Menu
|
|
3
3
|
as="div"
|
|
4
|
-
class="relative text-center text-sm
|
|
4
|
+
class="text-base-800 relative text-center text-sm"
|
|
5
5
|
v-slot="{ open }"
|
|
6
6
|
>
|
|
7
7
|
<div v-if="open">
|
|
8
8
|
<span v-once>{{ initializeFirebaseAuth() }}</span>
|
|
9
9
|
</div>
|
|
10
|
-
<
|
|
11
|
-
<
|
|
12
|
-
|
|
10
|
+
<AccountLink role="button" @click.prevent>
|
|
11
|
+
<MenuButton class="outline-none" :aria-label="$t.i19myAccount">
|
|
12
|
+
<slot name="button" v-bind="{ open }" />
|
|
13
|
+
</MenuButton>
|
|
14
|
+
</AccountLink>
|
|
13
15
|
<Fade>
|
|
14
|
-
<MenuItems class="absolute -right-8 mt-2
|
|
15
|
-
rounded-md shadow ring-1
|
|
16
|
-
|
|
17
|
-
<div class="
|
|
16
|
+
<MenuItems class="divide-base-100 absolute -right-8 mt-2
|
|
17
|
+
w-56 divide-y rounded-md bg-white shadow ring-1
|
|
18
|
+
ring-black/5 focus:outline-none">
|
|
19
|
+
<div class="text-base-600 p-3">
|
|
18
20
|
{{ `${$t.i19hello} ${customerName || $t.i19visitor}` }}
|
|
19
|
-
<AccountLink role="button" class="ui-btn-sm ui-btn-primary
|
|
21
|
+
<AccountLink role="button" class="ui-btn-sm ui-btn-primary my-1 block">
|
|
20
22
|
{{ $t.i19accessMyAccount }}
|
|
21
23
|
</AccountLink>
|
|
22
24
|
<AccountLink
|
|
23
25
|
v-if="!isLogged"
|
|
24
|
-
class="
|
|
26
|
+
class="text-primary-700 hover:text-primary-bold block font-medium"
|
|
25
27
|
is-sign-up
|
|
26
28
|
>
|
|
27
29
|
{{ $t.i19createAnAccount }}
|
|
@@ -55,19 +57,19 @@
|
|
|
55
57
|
</ALink>
|
|
56
58
|
</MenuItem>
|
|
57
59
|
<MenuItem as="li">
|
|
58
|
-
<div class="flex justify-center gap-2 p-2 text-base
|
|
60
|
+
<div class="text-base-500 flex justify-center gap-2 p-2 text-base">
|
|
59
61
|
<span v-for="(href, network) in socialNetworks" :key="network">
|
|
60
62
|
<SocialNetworkLink
|
|
61
63
|
:network="network"
|
|
62
|
-
class="
|
|
64
|
+
class="hover:text-primary-bold p-1"
|
|
63
65
|
/>
|
|
64
66
|
</span>
|
|
65
67
|
</div>
|
|
66
68
|
</MenuItem>
|
|
67
69
|
<MenuItem v-if="isLogged" as="li">
|
|
68
|
-
<button @click="logout" class="p-2 text-right
|
|
70
|
+
<button @click="logout" class="text-base-800 p-2 text-right">
|
|
69
71
|
<span class="text-base-600">{{ $t.i19logout }}</span>
|
|
70
|
-
<i class="i-logout-circle-r-line text-lg
|
|
72
|
+
<i class="i-logout-circle-r-line ml-1 text-lg"></i>
|
|
71
73
|
</button>
|
|
72
74
|
</MenuItem>
|
|
73
75
|
</ul>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<article class="from-secondary-700 to-secondary-950 flex
|
|
3
|
+
min-h-screen w-full flex-col justify-center bg-gradient-to-br">
|
|
4
|
+
<div class="mx-auto p-4">
|
|
5
|
+
<section class="ui-section text-center">
|
|
6
|
+
<a href="/" class="text-base-200 hover:text-white">
|
|
7
|
+
<i class="i-arrow-right mr-1 rotate-180"></i>
|
|
8
|
+
{{ $t.i19goToStore }}
|
|
9
|
+
</a>
|
|
10
|
+
</section>
|
|
11
|
+
<section class="overflow-hidden rounded-md
|
|
12
|
+
shadow-md ring-4 ring-black/10">
|
|
13
|
+
<LoginForm v-bind="{ loginLinkActionUrl }">
|
|
14
|
+
<template #head>
|
|
15
|
+
<div class="mb-5 text-center">
|
|
16
|
+
<a href="/" class="inline-block">
|
|
17
|
+
<slot name="logo" />
|
|
18
|
+
</a>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
</LoginForm>
|
|
22
|
+
</section>
|
|
23
|
+
<nav v-if="$settings.serviceLinks?.length" class="ui-section px-0">
|
|
24
|
+
<ul class="mx-auto flex max-w-sm flex-wrap items-center
|
|
25
|
+
justify-evenly gap-4 px-3">
|
|
26
|
+
<li
|
|
27
|
+
v-for="({ title, href }, i) in $settings.serviceLinks"
|
|
28
|
+
:key="`s-${i}`"
|
|
29
|
+
>
|
|
30
|
+
<ALink :href="href" class="ui-link text-base-200 hover:text-white">
|
|
31
|
+
{{ title }}
|
|
32
|
+
</ALink>
|
|
33
|
+
</li>
|
|
34
|
+
</ul>
|
|
35
|
+
</nav>
|
|
36
|
+
</div>
|
|
37
|
+
</article>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script setup lang="ts">
|
|
41
|
+
import { isLogged } from '@@sf/state/customer-session';
|
|
42
|
+
import LoginForm from '~/components/LoginForm.vue';
|
|
43
|
+
|
|
44
|
+
let loginLinkActionUrl: string | null = null;
|
|
45
|
+
if (!import.meta.env.SSR) {
|
|
46
|
+
const { location } = window;
|
|
47
|
+
const returnUrl = new URLSearchParams(location.search).get('return_url');
|
|
48
|
+
if (!returnUrl) {
|
|
49
|
+
const url = new URL(location.toString());
|
|
50
|
+
url.pathname = '/app/';
|
|
51
|
+
url.hash = `#${location.pathname.replace('/app/', '/')}`;
|
|
52
|
+
loginLinkActionUrl = url.toString();
|
|
53
|
+
}
|
|
54
|
+
watch(isLogged, () => {
|
|
55
|
+
if (isLogged.value) {
|
|
56
|
+
location.href = (returnUrl || loginLinkActionUrl) as string;
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
immediate: true,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</ALink>
|
|
15
15
|
<div
|
|
16
16
|
v-if="hasHeader"
|
|
17
|
-
class="p-12
|
|
17
|
+
class="mb-3 p-12 sm:mb-0 xl:ps-32"
|
|
18
18
|
>
|
|
19
19
|
<Component
|
|
20
20
|
v-if="parsedTitle"
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
>
|
|
24
24
|
{{ parsedTitle }}
|
|
25
25
|
</Component>
|
|
26
|
-
<p v-if="parsedSubtitle" class="text-lg
|
|
26
|
+
<p v-if="parsedSubtitle" class="mt-4 text-lg md:mt-6">
|
|
27
27
|
{{ parsedSubtitle }}
|
|
28
28
|
</p>
|
|
29
29
|
<ALink
|
|
30
30
|
v-if="parsedButtonText"
|
|
31
31
|
:href="buttonLink"
|
|
32
|
-
class="ui-btn-lg ui-btn-contrast min-w-[150px]
|
|
32
|
+
class="ui-btn-lg ui-btn-contrast mt-7 min-w-[150px] md:mt-10"
|
|
33
33
|
>
|
|
34
34
|
{{ parsedButtonText }}
|
|
35
35
|
</ALink>
|