Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
chore: release 1.0.0-rc.8 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frodigo authored Jun 2, 2022
1 parent 661c368 commit ea91d7c
Show file tree
Hide file tree
Showing 345 changed files with 24,579 additions and 26,307 deletions.
16 changes: 0 additions & 16 deletions .babelrc

This file was deleted.

11 changes: 0 additions & 11 deletions .lintstagedrc

This file was deleted.

1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

# Magento 2.x theme

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-21-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->


### Vue Storefront 2 integration with Magento
### Requirements:

Expand Down Expand Up @@ -91,6 +96,10 @@ Thanks go to these wonderful people 🙌:
<td align="center"><a href="https://github.com/jonathanribas"><img src="https://avatars.githubusercontent.com/u/3003782?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Jonathan Ribas</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=jonathanribas" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Aliaaaam"><img src="https://avatars.githubusercontent.com/u/88658555?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Ali Ghanei</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=Aliaaaam" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/mayashavin"><img src="https://avatars.githubusercontent.com/u/6650139?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Maya Shavin</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=mayashavin" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/AlexanderDevitsky"><img src="https://avatars.githubusercontent.com/u/14941520?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Alexander Devitsky</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=AlexanderDevitsky" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/Diegoalbag"><img src="https://avatars.githubusercontent.com/u/72459310?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Diego Alba</b></sub></a><br /><a href="https://github.com/vuestorefront/magento2/commits?author=Diegoalbag" title="Code">💻</a></td>
</tr>
</table>

Expand All @@ -100,3 +109,4 @@ Thanks go to these wonderful people 🙌:
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

4 changes: 2 additions & 2 deletions app/router.scrollBehavior.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default function (_to, _from, savedPosition) {
export default function scrollBehavior(_to, _from, savedPosition) {
return savedPosition || {
x: 0,
y: 0,
};
};
}
2 changes: 1 addition & 1 deletion components/AddToWishlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</component>
</template>

<script>
<script lang="ts">
import { defineComponent, computed } from '@nuxtjs/composition-api';
import { SfButton } from '@storefront-ui/vue';
import SvgImage from '~/components/General/SvgImage.vue';
Expand Down
7 changes: 4 additions & 3 deletions components/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@
</SfFooter>
</template>

<script>
<script lang="ts">
import {
SfFooter, SfList, SfImage, SfMenuItem,
} from '@storefront-ui/vue';
import { defineComponent } from '@nuxtjs/composition-api';
import { addBasePath } from '~/helpers/addBasePath';
export default {
export default defineComponent({
components: {
SfFooter,
SfList,
Expand All @@ -97,7 +98,7 @@ export default {
desktopMin: 1024,
};
},
};
});
</script>

<style lang="scss">
Expand Down
27 changes: 14 additions & 13 deletions components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
class="sf-header--has-mobile-search"
:class="{ 'header-on-top': isSearchOpen }"
>
<!-- TODO: add mobile view buttons after SFUI team PR -->
<template #logo>
<HeaderLogo />
</template>
Expand Down Expand Up @@ -87,15 +86,16 @@
</template>
<template #search>
<SearchBar
@SearchBar:toggle="isSearchOpen = $event"
@SearchBar:result="result = $event"
:is-search-open="isSearchOpen"
@set-is-open="isSearchOpen = $event"
@set-search-results="productSearchResults = $event"
/>
</template>
</SfHeader>
<SearchResults
v-if="isSearchOpen"
:visible="isSearchOpen"
:result="result"
:search-results="productSearchResults"
/>
<SfOverlay :visible="isSearchOpen" />
</div>
Expand All @@ -116,16 +116,16 @@ import {
useFetch,
} from '@nuxtjs/composition-api';
import HeaderNavigation from '~/components/Header/Navigation/HeaderNavigation.vue';
import useCategory from '~/modules/catalog/category/composables/useCategory';
import { useCategory } from '~/modules/catalog/category/composables/useCategory';
import {
useCart,
useUiHelpers,
useUiState,
} from '~/composables';
import useWishlist from '~/modules/wishlist/composables/useWishlist';
import { useCart } from '~/modules/checkout/composables/useCart';
import { useWishlist } from '~/modules/wishlist/composables/useWishlist';
import { useUser } from '~/modules/customer/composables/useUser';
import { useWishlistStore } from '~/modules/wishlist/store/wishlistStore';
import type { CategoryTree } from '~/modules/GraphQL/types';
import type { CategoryTree, ProductInterface } from '~/modules/GraphQL/types';
import CurrencySelector from '~/components/CurrencySelector.vue';
import HeaderLogo from '~/components/HeaderLogo.vue';
import SvgImage from '~/components/General/SvgImage.vue';
Expand Down Expand Up @@ -157,9 +157,10 @@ export default defineComponent({
const { loadItemsCount: loadWishlistItemsCount } = useWishlist();
const { categories: categoryList, load: categoriesListLoad } = useCategory();
const wishlistStore = useWishlistStore();
const isSearchOpen = ref(false);
const result = ref(null);
const productSearchResults = ref<ProductInterface[] | null>(null);
const wishlistStore = useWishlistStore();
const wishlistItemsQty = computed(() => wishlistStore.wishlist?.items_count ?? 0);
const wishlistHasProducts = computed(() => wishlistItemsQty.value > 0);
Expand All @@ -168,7 +169,7 @@ export default defineComponent({
const handleAccountClick = async () => {
if (isAuthenticated.value) {
await router.push(`${app.localePath('/my-account/my-profile')}`);
await router.push(app.localeRoute({ name: 'customer-my-profile' }));
} else {
toggleLoginModal();
}
Expand All @@ -185,7 +186,7 @@ export default defineComponent({
if (app.$device.isDesktop) {
await loadCartTotalQty();
// eslint-disable-next-line promise/catch-or-return
await loadWishlistItemsCount({});
await loadWishlistItemsCount();
}
});
Expand All @@ -197,7 +198,7 @@ export default defineComponent({
handleAccountClick,
isAuthenticated,
isSearchOpen,
result,
productSearchResults,
setTermForUrl,
toggleCartSidebar,
toggleWishlistSidebar,
Expand Down
7 changes: 3 additions & 4 deletions components/BottomNavigation.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<template>
<!-- TODO: create logic with isActive prop for BottomNavigationItems -->
<div class="smartphone-only">
<SfBottomNavigation class="navigation-bottom">
<SfBottomNavigationItem
Expand Down Expand Up @@ -76,13 +75,13 @@
</div>
</template>

<script>
<script lang="ts">
import { SfBottomNavigation, SfCircleIcon } from '@storefront-ui/vue';
import { defineComponent, useRouter, useContext } from '@nuxtjs/composition-api';
import { useUiState } from '~/composables';
import { useUser } from '~/modules/customer/composables/useUser';
import SvgImage from '~/components/General/SvgImage.vue';
import { useCategoryStore } from '~/stores/category';
import { useCategoryStore } from '~/modules/catalog/category/stores/category';
const MobileCategorySidebar = () => import('~/modules/catalog/category/components/sidebar/MobileCategorySidebar/MobileCategorySidebar.vue');
Expand All @@ -106,7 +105,7 @@ export default defineComponent({
const { app } = useContext();
const handleAccountClick = async () => {
if (isAuthenticated.value) {
await router.push(`${app.localePath('/my-account')}`);
await router.push(app.localeRoute({ name: 'customer' }));
} else {
toggleLoginModal();
}
Expand Down
116 changes: 116 additions & 0 deletions components/CallToAction.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<template>
<section class="sf-call-to-action">
<SfImage
:image-tag="imageTag"
:src="imageSrc"
:alt="title"
:width="imageWidth"
:height="imageHeight"
:nuxt-img-config="nuxtImgConfig"
class="sf-call-to-action__image"
/>
<div class="sf-call-to-action__text-container">
<slot
name="title"
v-bind="{ title }"
>
<h2
v-if="title"
class="sf-call-to-action__title"
>
{{ title }}
</h2>
</slot>
<slot
name="description"
v-bind="{ description }"
>
<p
v-if="description"
class="sf-call-to-action__description"
>
{{ description }}
</p>
</slot>
</div>
<slot
name="button"
v-bind="{ buttonText, link }"
>
<SfButton
v-if="buttonText"
:link="link"
class="sf-call-to-action__button"
@click="$emit('click')"
>
{{ buttonText }}
</SfButton>
</slot>
</section>
</template>

<script lang="ts">
import { defineComponent, PropType } from '@nuxtjs/composition-api';
import { SfButton, SfCallToAction, SfImage } from '@storefront-ui/vue';
import { ImageModifiers } from '@nuxt/image';
const ExtendedCallToAction = {
...SfCallToAction,
computed: undefined,
};
export default defineComponent({
name: 'CallToAction',
components: {
SfButton,
SfImage,
},
extends: ExtendedCallToAction,
props: {
imageHeight: {
type: [Number, String],
default: '',
},
imageSrc: {
type: String,
default: '',
},
imageTag: {
type: String,
default: '',
},
imageWidth: {
type: [Number, String],
default: '',
},
nuxtImgConfig: {
type: Object as PropType<ImageModifiers | {}>,
default: () => ({}),
},
},
});
</script>

<style lang="scss" scoped>
.sf-call-to-action {
position: relative;
&__image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
::v-deep img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
&__text-container {
position: relative;
}
}
</style>
Loading

0 comments on commit ea91d7c

Please sign in to comment.