diff --git a/CHANGELOG.md b/CHANGELOG.md index db3dd589d8..143247a262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved docs at contributing.md and configuration.md (spelling etc.) - @ruthgeridema (#2421, #2422, #2423, #2425, #2426) - Fixed design issue of Country label on Edge 17 & Firefox - @ananth-iyer (#2390,#2399) - Country field is filled by first counry from the list in cart in paymen section - @RakowskiPrzemyslaw (#2428) +- Added video support in Product Gallery component. - @rain2o (#2433) - Improved product quantity change component in product and cart - @patzick (#2398, #2437) - Updated to Vue 2.6.6 - @filrak (#2456) - Null sidebar menu data on static page fixed - @filrak (#2456) - Fix cannot edit previous steps in checkout - @filrak (#2457) - Fixed route guard ssr problem - @vue-kacper (#2364) +- Fix links in footer to static pages bug - @filrak (#2464) - Improve images loading on category page, corrected alt view and blinking problem - @patzick (#2465) +- Improve tsconfig for better IDE paths support - @patzick, @filrak (#2474) +- fix breadcrumbs changing too early - @filrak (#2469) +- add cart count config, allows you to display the item count instead of a sum of the item quantities - @pauluse (#2483) +- improved product gallery load view, shows correct image on reload - @patzick (#2481, #2382) + +### Deprecated / Removed +- `@vue-storefront/store` package deprecated - @filrak ## [1.8.2] - 2019.02.11 - Fixed docker-compose configuration for network_mode and TS build config - @lukeromanowicz (#2415) diff --git a/config/default.json b/config/default.json index 3e7ed38ce2..ad851950f0 100644 --- a/config/default.json +++ b/config/default.json @@ -235,6 +235,7 @@ "setConfigurableProductOptions": true, "askBeforeRemoveProduct": true, "displayItemDiscounts": true, + "minicartCountType": "quantities", "create_endpoint": "http://localhost:8080/api/cart/create?token={{token}}", "updateitem_endpoint": "http://localhost:8080/api/cart/update?token={{token}}&cartId={{cartId}}", "deleteitem_endpoint": "http://localhost:8080/api/cart/delete?token={{token}}&cartId={{cartId}}", diff --git a/core/app.ts b/core/app.ts index d1b8f6a2be..6bcaa6b707 100755 --- a/core/app.ts +++ b/core/app.ts @@ -29,7 +29,7 @@ import * as corePlugins from '@vue-storefront/core/compatibility/plugins' import { once } from '@vue-storefront/core/helpers' import { takeOverConsole } from '@vue-storefront/core/helpers/log' -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' import { enabledModules } from './modules-entry' diff --git a/core/build/webpack.base.config.ts b/core/build/webpack.base.config.ts index b37219f6d3..7dd3b43651 100644 --- a/core/build/webpack.base.config.ts +++ b/core/build/webpack.base.config.ts @@ -110,7 +110,7 @@ export default { 'theme/resource': themeResources, // Backward compatible - '@vue-storefront/store/lib/multistore' : path.resolve(__dirname, '../lib/multistore.ts'), + '@vue-storefront/core/store/lib/multistore' : path.resolve(__dirname, '../lib/multistore.ts'), } }, module: { diff --git a/core/client-entry.ts b/core/client-entry.ts index 63d131c53c..c51b7204f8 100755 --- a/core/client-entry.ts +++ b/core/client-entry.ts @@ -4,11 +4,11 @@ import union from 'lodash-es/union' import { createApp } from '@vue-storefront/core/app' import EventBus from '@vue-storefront/core/compatibility/plugins/event-bus/index' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import buildTimeConfig from 'config' import { execute } from '@vue-storefront/core/lib/sync/task' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import i18n from '@vue-storefront/i18n' import { prepareStoreView, storeCodeFromRoute, currentStoreView, localizedRoute } from '@vue-storefront/core/lib/multistore' import { onNetworkStatusChange } from '@vue-storefront/core/modules/offline-order/helpers/onNetworkStatusChange' diff --git a/core/compatibility/components/Breadcrumbs.js b/core/compatibility/components/Breadcrumbs.js index c0264fa15a..b7f1c0b0c7 100644 --- a/core/compatibility/components/Breadcrumbs.js +++ b/core/compatibility/components/Breadcrumbs.js @@ -8,7 +8,7 @@ export default { }, activeRoute: { type: String, - required: true + default: '' } } } diff --git a/core/compatibility/components/blocks/Microcart/Product.js b/core/compatibility/components/blocks/Microcart/Product.js index af0cb66f2e..9aafe48091 100644 --- a/core/compatibility/components/blocks/Microcart/Product.js +++ b/core/compatibility/components/blocks/Microcart/Product.js @@ -1,4 +1,4 @@ -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { MicrocartProduct } from '@vue-storefront/core/modules/cart/components/Product.ts' import i18n from '@vue-storefront/i18n' diff --git a/core/compatibility/plugins/config/index.js b/core/compatibility/plugins/config/index.js index 725380dbc2..d9b61aade7 100644 --- a/core/compatibility/plugins/config/index.js +++ b/core/compatibility/plugins/config/index.js @@ -1,4 +1,4 @@ -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' const config = store.state.config // deprecated, use vuex store instead const ConfigPlugin = { diff --git a/core/helpers/index.ts b/core/helpers/index.ts index d18f70a954..6b117ca29e 100644 --- a/core/helpers/index.ts +++ b/core/helpers/index.ts @@ -1,4 +1,4 @@ -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import SearchQuery from '@vue-storefront/core/lib/search/searchQuery' import { remove as removeAccents } from 'remove-accents' import { Logger } from '@vue-storefront/core/lib/logger' diff --git a/core/helpers/initCacheStorage.ts b/core/helpers/initCacheStorage.ts index f8ca2729a4..85f973ffaa 100644 --- a/core/helpers/initCacheStorage.ts +++ b/core/helpers/initCacheStorage.ts @@ -1,7 +1,7 @@ import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '@vue-storefront/core/lib/multistore' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' /** Inits cache storage for given module. By default via local storage */ export function initCacheStorage(key, localised = true) { diff --git a/core/lib/module/index.ts b/core/lib/module/index.ts index 63a9453e4c..85e5da1fa1 100644 --- a/core/lib/module/index.ts +++ b/core/lib/module/index.ts @@ -2,7 +2,7 @@ import { Module } from 'vuex' import { RouteConfig, NavigationGuard } from 'vue-router' import Vue from 'vue' import merge from 'lodash-es/merge' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { Logger } from '@vue-storefront/core/lib/logger' import { setupMultistoreRoutes } from '..//multistore' import { router } from '@vue-storefront/core/app' diff --git a/core/lib/search.ts b/core/lib/search.ts index 774920bb82..e6fc746a07 100644 --- a/core/lib/search.ts +++ b/core/lib/search.ts @@ -2,10 +2,11 @@ import Vue from 'vue' import { currentStoreView } from '@vue-storefront/core/lib/multistore' import { sha3_224 } from 'js-sha3' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { getSearchAdapter } from './search/adapter/searchAdapterFactory' import { SearchRequest } from '@vue-storefront/core/types/search/SearchRequest' import { SearchResponse } from '@vue-storefront/core/types/search/SearchResponse' +import { Logger } from '@vue-storefront/core/lib/logger' // TODO - use one from helpers instead export function isOnline () : boolean { @@ -61,7 +62,8 @@ export const quickSearchByQuery = async ({ query, start = 0, size = 50, entityT res.noresults = false res.offline = !isOnline() // TODO: refactor it to checking ES heartbit resolve(res) - console.debug('Result from cache for ' + cacheKey + ' (' + entityType + '), ms=' + (new Date().getTime() - benchmarkTime.getTime())) + Logger.debug('Result from cache for ' + cacheKey + ' (' + entityType + '), ms=' + (new Date().getTime() - benchmarkTime.getTime()))() + servedFromCache = true } }).catch((err) => { @@ -87,7 +89,7 @@ export const quickSearchByQuery = async ({ query, start = 0, size = 50, entityT if (res) { // otherwise it can be just a offline mode cache.setItem(cacheKey, res, null, rootStore.state.config.elasticsearch.disableLocalStorageQueriesCache).catch((err) => { console.error('Cannot store cache for ' + cacheKey + ', ' + err) }) if (!servedFromCache) { // if navigator onLine == false means ES is unreachable and probably this will return false; sometimes returned false faster than indexedDb cache returns result ... - console.debug('Result from ES for ' + cacheKey + ' (' + entityType + '), ms=' + (new Date().getTime() - benchmarkTime.getTime())) + Logger.debug('Result from ES for ' + cacheKey + ' (' + entityType + '), ms=' + (new Date().getTime() - benchmarkTime.getTime()))() res.cache = false res.noresults = false res.offline = false @@ -96,7 +98,7 @@ export const quickSearchByQuery = async ({ query, start = 0, size = 50, entityT } }).catch(err => { if (!servedFromCache) { - console.debug('No results and offline ' + cacheKey + ' (' + entityType + '), ms=' + (new Date().getTime() - benchmarkTime.getTime())) + Logger.debug('No results and offline ' + cacheKey + ' (' + entityType + '), ms=' + (new Date().getTime() - benchmarkTime.getTime()))() const res = { items: [], total: 0, diff --git a/core/lib/search/adapter/api/elasticsearch/mapping.js b/core/lib/search/adapter/api/elasticsearch/mapping.js index d104872173..ed833d9c2d 100644 --- a/core/lib/search/adapter/api/elasticsearch/mapping.js +++ b/core/lib/search/adapter/api/elasticsearch/mapping.js @@ -1,4 +1,4 @@ -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' export default function getMapping (attribute, entityType = 'products') { let mapping = [ diff --git a/core/lib/search/adapter/api/searchAdapter.ts b/core/lib/search/adapter/api/searchAdapter.ts index 7ba0ee1a95..8891d397b6 100644 --- a/core/lib/search/adapter/api/searchAdapter.ts +++ b/core/lib/search/adapter/api/searchAdapter.ts @@ -1,5 +1,5 @@ import map from 'lodash-es/map' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { prepareElasticsearchQueryBody } from './elasticsearchQuery' import fetch from 'isomorphic-fetch' import { slugify } from '@vue-storefront/core/helpers' diff --git a/core/lib/search/adapter/graphql/processor/processType.ts b/core/lib/search/adapter/graphql/processor/processType.ts index c63c1a0545..450588ff9e 100644 --- a/core/lib/search/adapter/graphql/processor/processType.ts +++ b/core/lib/search/adapter/graphql/processor/processType.ts @@ -1,7 +1,7 @@ import { SearchResponse } from '@vue-storefront/core/types/search/SearchResponse' import map from 'lodash-es/map' import { slugify } from '@vue-storefront/core/helpers' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' export function processESResponseType (resp, start, size): SearchResponse { const response = { diff --git a/core/lib/search/adapter/graphql/searchAdapter.ts b/core/lib/search/adapter/graphql/searchAdapter.ts index 6bf20b8905..cf8ccf1b09 100644 --- a/core/lib/search/adapter/graphql/searchAdapter.ts +++ b/core/lib/search/adapter/graphql/searchAdapter.ts @@ -1,4 +1,4 @@ -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { prepareQueryVars } from './gqlQuery' import { currentStoreView, prepareStoreView } from '../../../multistore' import fetch from 'isomorphic-fetch' diff --git a/core/lib/sync/index.ts b/core/lib/sync/index.ts index c72dca54d4..909d6d6266 100644 --- a/core/lib/sync/index.ts +++ b/core/lib/sync/index.ts @@ -1,10 +1,10 @@ import Vue from 'vue' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { Logger } from '@vue-storefront/core/lib/logger' import { execute as taskExecute, _prepareTask } from './task' import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '../multistore' /** Syncs given task. If user is offline requiest will be sent to the server after restored connection */ diff --git a/core/lib/sync/task.ts b/core/lib/sync/task.ts index a1d7063940..630fab8c8a 100644 --- a/core/lib/sync/task.ts +++ b/core/lib/sync/task.ts @@ -5,13 +5,13 @@ import isUndefined from 'lodash-es/isUndefined' import toString from 'lodash-es/toString' import fetch from 'isomorphic-fetch' import * as localForage from 'localforage' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { adjustMultistoreApiUrl, currentStoreView } from '@vue-storefront/core/lib/multistore' import Task from '@vue-storefront/core/lib/sync/types/Task' import { Logger } from '@vue-storefront/core/lib/logger' import { TaskQueue } from '@vue-storefront/core/lib/sync' -import * as entities from '@vue-storefront/store/lib/entities' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import * as entities from '@vue-storefront/core/store/lib/entities' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' const AUTO_REFRESH_MAX_ATTEMPTS = 20 diff --git a/core/modules/breadcrumbs/helpers/index.ts b/core/modules/breadcrumbs/helpers/index.ts index 294e2fc19f..03d6d57eaf 100644 --- a/core/modules/breadcrumbs/helpers/index.ts +++ b/core/modules/breadcrumbs/helpers/index.ts @@ -1,4 +1,4 @@ -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' // Duplicate of breadCrumbRoutes, to repalce it soon. /** Parse category path for product/category */ diff --git a/core/modules/cart/hooks/beforeRegistration.ts b/core/modules/cart/hooks/beforeRegistration.ts index f8e97fb11a..c339fd12c5 100644 --- a/core/modules/cart/hooks/beforeRegistration.ts +++ b/core/modules/cart/hooks/beforeRegistration.ts @@ -1,5 +1,5 @@ import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '@vue-storefront/core/lib/multistore' export function beforeRegistration({ Vue, config, store, isServer }) { diff --git a/core/modules/cart/store/actions.ts b/core/modules/cart/store/actions.ts index 938f73faaa..44b5b084ca 100644 --- a/core/modules/cart/store/actions.ts +++ b/core/modules/cart/store/actions.ts @@ -1,7 +1,7 @@ import Vue from 'vue' import { ActionTree } from 'vuex' import * as types from './mutation-types' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import i18n from '@vue-storefront/i18n' import { sha3_224 } from 'js-sha3' import { currentStoreView, localizedRoute} from '@vue-storefront/core/lib/multistore' diff --git a/core/modules/cart/store/getters.ts b/core/modules/cart/store/getters.ts index 5ec470a3eb..4a78163939 100644 --- a/core/modules/cart/store/getters.ts +++ b/core/modules/cart/store/getters.ts @@ -45,7 +45,11 @@ const getters: GetterTree = { return totalsArray } }, - totalQuantity (state) { + totalQuantity (state, getters, rootStore) { + if (rootStore.config.cart.minicartCountType === 'items') { + return state.cartItems.length + } + return sumBy(state.cartItems, (p) => { return p.qty }) diff --git a/core/modules/cart/store/mutations.ts b/core/modules/cart/store/mutations.ts index 21a24e64b1..f9c930fb84 100644 --- a/core/modules/cart/store/mutations.ts +++ b/core/modules/cart/store/mutations.ts @@ -1,6 +1,6 @@ import Vue from 'vue' import { MutationTree } from 'vuex' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import * as types from './mutation-types' import CartState from '../types/CartState' diff --git a/core/modules/catalog/components/ProductBundleOption.ts b/core/modules/catalog/components/ProductBundleOption.ts index 173347f5f1..a0821a8f76 100644 --- a/core/modules/catalog/components/ProductBundleOption.ts +++ b/core/modules/catalog/components/ProductBundleOption.ts @@ -1,4 +1,4 @@ -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' export const ProductBundleOption = { name: 'ProductBundleOption', diff --git a/core/modules/catalog/components/ProductBundleOptions.ts b/core/modules/catalog/components/ProductBundleOptions.ts index 3f3c843747..bf77899d8b 100644 --- a/core/modules/catalog/components/ProductBundleOptions.ts +++ b/core/modules/catalog/components/ProductBundleOptions.ts @@ -1,6 +1,6 @@ import { mapMutations } from 'vuex' import * as types from '../store/product/mutation-types' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import i18n from '@vue-storefront/i18n' import { Logger } from '@vue-storefront/core/lib/logger' diff --git a/core/modules/catalog/components/ProductCustomOptions.ts b/core/modules/catalog/components/ProductCustomOptions.ts index 98d8cded25..8a0d8e1aa4 100644 --- a/core/modules/catalog/components/ProductCustomOptions.ts +++ b/core/modules/catalog/components/ProductCustomOptions.ts @@ -1,6 +1,6 @@ import { mapMutations } from 'vuex' import * as types from '../store/product/mutation-types' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import i18n from '@vue-storefront/i18n' import { Logger } from '@vue-storefront/core/lib/logger' diff --git a/core/modules/catalog/components/ProductVideo.ts b/core/modules/catalog/components/ProductVideo.ts new file mode 100644 index 0000000000..b4140dc4ed --- /dev/null +++ b/core/modules/catalog/components/ProductVideo.ts @@ -0,0 +1,49 @@ +export const ProductVideo = { + name: 'ProductVideo', + props: { + url: { + type: String, + required: true + }, + id: { + type: String, + required: true + }, + type: { + type: String, + required: true + }, + index: { + type: Number, + required: false, + default: 0 + } + }, + data () { + return { + videoStarted: false, + iframeLoaded: false + } + }, + methods: { + initVideo () { + this.videoStarted = true + this.$emit('video-started', this.index) + }, + iframeIsLoaded () { + this.iframeLoaded = true + } + }, + computed: { + embedUrl () { + switch (this.type) { + case "youtube": + return `https://www.youtube.com/embed/${this.id}?autoplay=1` + case "vimeo": + return `https://player.vimeo.com/video/${this.id}?autoplay=1` + default: + return + } + } + } +} diff --git a/core/modules/catalog/helpers/index.ts b/core/modules/catalog/helpers/index.ts index 23ceac4308..bf8d7c8950 100644 --- a/core/modules/catalog/helpers/index.ts +++ b/core/modules/catalog/helpers/index.ts @@ -1,5 +1,5 @@ import Vue from 'vue' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { calculateProductTax } from '../helpers/tax' import flattenDeep from 'lodash-es/flattenDeep' import omit from 'lodash-es/omit' @@ -529,18 +529,19 @@ export function configureProductAsync (context, { product, configuration, select */ export function getMediaGallery (product) { - let mediaGallery = [] - if (product.media_gallery) { - for (let mediaItem of product.media_gallery) { - if (mediaItem.image) { - mediaGallery.push({ - 'src': getThumbnailPath(mediaItem.image, rootStore.state.config.products.gallery.width, rootStore.state.config.products.gallery.height), - 'loading': getThumbnailPath(product.image, 310, 300) - }) - } - } - } - return mediaGallery + let mediaGallery = [] + if (product.media_gallery) { + for (let mediaItem of product.media_gallery) { + if (mediaItem.image) { + mediaGallery.push({ + 'src': getThumbnailPath(mediaItem.image, rootStore.state.config.products.gallery.width, rootStore.state.config.products.gallery.height), + 'loading': getThumbnailPath(mediaItem.image, 310, 300), + 'video': mediaItem.vid + }) + } + } + } + return mediaGallery } /** @@ -559,7 +560,7 @@ export function configurableChildrenImages(product) { if (groupedByAttribute[confChild][0].image) { configurableChildrenImages.push({ 'src': getThumbnailPath(groupedByAttribute[confChild][0].image, rootStore.state.config.products.gallery.width, rootStore.state.config.products.gallery.height), - 'loading': getThumbnailPath(product.image, 310, 300), + 'loading': getThumbnailPath(groupedByAttribute[confChild][0].image, 310, 300), 'id': confChild }) } diff --git a/core/modules/catalog/hooks/beforeRegistration.ts b/core/modules/catalog/hooks/beforeRegistration.ts index 34239f2a72..dbb6fc83ba 100644 --- a/core/modules/catalog/hooks/beforeRegistration.ts +++ b/core/modules/catalog/hooks/beforeRegistration.ts @@ -1,5 +1,5 @@ import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '@vue-storefront/core/lib/multistore' export function beforeRegistration({ Vue, config, store, isServer }) { diff --git a/core/modules/catalog/queries/common.js b/core/modules/catalog/queries/common.js index 70883e6cf3..6870a69b3b 100644 --- a/core/modules/catalog/queries/common.js +++ b/core/modules/catalog/queries/common.js @@ -1,5 +1,5 @@ import SearchQuery from '@vue-storefront/core/lib/search/searchQuery' -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' export function prepareQuery ({queryText = '', filters = [], queryConfig = ''}) { let query = new SearchQuery() diff --git a/core/modules/catalog/queries/related.js b/core/modules/catalog/queries/related.js index b946b53af5..48fc24308b 100644 --- a/core/modules/catalog/queries/related.js +++ b/core/modules/catalog/queries/related.js @@ -1,5 +1,5 @@ import SearchQuery from '@vue-storefront/core/lib/search/searchQuery' -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' export function prepareRelatedQuery (key, sku) { let relatedProductsQuery = new SearchQuery() diff --git a/core/modules/catalog/queries/searchPanel.js b/core/modules/catalog/queries/searchPanel.js index 34f81d3d32..289dc18bb2 100644 --- a/core/modules/catalog/queries/searchPanel.js +++ b/core/modules/catalog/queries/searchPanel.js @@ -1,5 +1,5 @@ import SearchQuery from '@vue-storefront/core/lib/search/searchQuery' -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' export function prepareQuickSearchQuery (queryText) { let searchQuery = new SearchQuery() diff --git a/core/modules/catalog/store/attribute/actions.ts b/core/modules/catalog/store/attribute/actions.ts index 8e03e72059..8bdb1ff000 100644 --- a/core/modules/catalog/store/attribute/actions.ts +++ b/core/modules/catalog/store/attribute/actions.ts @@ -4,7 +4,7 @@ import { quickSearchByQuery } from '@vue-storefront/core/lib/search' import AttributeState from '../../types/AttributeState' import RootState from '@vue-storefront/core/types/RootState' import { ActionTree } from 'vuex' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { Logger } from '@vue-storefront/core/lib/logger' const actions: ActionTree = { diff --git a/core/modules/catalog/store/attribute/mutations.ts b/core/modules/catalog/store/attribute/mutations.ts index 8797465f28..79c0c94a3c 100644 --- a/core/modules/catalog/store/attribute/mutations.ts +++ b/core/modules/catalog/store/attribute/mutations.ts @@ -1,6 +1,6 @@ import Vue from 'vue' import { MutationTree } from 'vuex' -import { entityKeyName } from '@vue-storefront/store/lib/entities' +import { entityKeyName } from '@vue-storefront/core/store/lib/entities' import * as types from './mutation-types' import AttributeState from '../../types/AttributeState' import { Logger } from '@vue-storefront/core/lib/logger' diff --git a/core/modules/catalog/store/category/actions.ts b/core/modules/catalog/store/category/actions.ts index b73ef7323e..1001698730 100644 --- a/core/modules/catalog/store/category/actions.ts +++ b/core/modules/catalog/store/category/actions.ts @@ -2,8 +2,8 @@ import Vue from 'vue' import { ActionTree } from 'vuex' import * as types from './mutation-types' import { quickSearchByQuery } from '@vue-storefront/core/lib/search' -import { entityKeyName } from '@vue-storefront/store/lib/entities' -import rootStore from '@vue-storefront/store' +import { entityKeyName } from '@vue-storefront/core/store/lib/entities' +import rootStore from '@vue-storefront/core/store' import i18n from '@vue-storefront/i18n' import chunk from 'lodash-es/chunk' import trim from 'lodash-es/trim' diff --git a/core/modules/catalog/store/category/mutations.ts b/core/modules/catalog/store/category/mutations.ts index 4dc7cad990..d54a18a057 100644 --- a/core/modules/catalog/store/category/mutations.ts +++ b/core/modules/catalog/store/category/mutations.ts @@ -2,9 +2,9 @@ import Vue from 'vue' import { MutationTree } from 'vuex' import * as types from './mutation-types' import { slugify, breadCrumbRoutes } from '@vue-storefront/core/helpers' -import { entityKeyName } from '@vue-storefront/store/lib/entities' +import { entityKeyName } from '@vue-storefront/core/store/lib/entities' import CategoryState from '../../types/CategoryState' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { Logger } from '@vue-storefront/core/lib/logger' const mutations: MutationTree = { diff --git a/core/modules/catalog/store/product/actions.ts b/core/modules/catalog/store/product/actions.ts index d7f0288b48..7a944efbfe 100644 --- a/core/modules/catalog/store/product/actions.ts +++ b/core/modules/catalog/store/product/actions.ts @@ -14,13 +14,13 @@ import { configureProductAsync, configurableChildrenImages, attributeImages } from '../../helpers' import SearchQuery from '@vue-storefront/core/lib/search/searchQuery' -import { entityKeyName } from '@vue-storefront/store/lib/entities' +import { entityKeyName } from '@vue-storefront/core/store/lib/entities' import { optionLabel } from '../../helpers/optionLabel' import { quickSearchByQuery, isOnline } from '@vue-storefront/core/lib/search' import omit from 'lodash-es/omit' import trim from 'lodash-es/trim' import uniqBy from 'lodash-es/uniqBy' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import RootState from '@vue-storefront/core/types/RootState' import ProductState from '../../types/ProductState' import { Logger } from '@vue-storefront/core/lib/logger'; @@ -101,7 +101,7 @@ const actions: ActionTree = { routes: breadCrumbRoutes, current: breadcrumbsName } - context.dispatch('breadcrumbs/set', breadcrumbs, { root: true }) + context.commit(types.CATALOG_SET_BREADCRUMBS, breadcrumbs) return Promise.all(subloaders) }, doPlatformPricesSync (context, { products }) { diff --git a/core/modules/catalog/store/product/mutation-types.ts b/core/modules/catalog/store/product/mutation-types.ts index ed71a5e183..2e08a15e94 100644 --- a/core/modules/catalog/store/product/mutation-types.ts +++ b/core/modules/catalog/store/product/mutation-types.ts @@ -9,4 +9,5 @@ export const CATALOG_SET_PRODUCT_PARENT = SN_PRODUCT + '/SET_PARENT' export const CATALOG_UPD_CUSTOM_OPTION = SN_PRODUCT + '/SET_CUSTOM_OPTION' export const CATALOG_UPD_BUNDLE_OPTION = SN_PRODUCT + '/SET_BUNDLE_OPTION' export const CATALOG_ADD_CUSTOM_OPTION_VALIDATOR = SN_PRODUCT + '/ADD_CUSTOM_OPTION_VALIDATOR' -export const CATALOG_UPD_GALLERY = SN_PRODUCT + '/SET_GALLERY' \ No newline at end of file +export const CATALOG_UPD_GALLERY = SN_PRODUCT + '/SET_GALLERY' +export const CATALOG_SET_BREADCRUMBS = SN_PRODUCT + '/SET_BREADCRUMBS' \ No newline at end of file diff --git a/core/modules/catalog/store/product/mutations.ts b/core/modules/catalog/store/product/mutations.ts index 59f078c8f1..ccef6d5e99 100644 --- a/core/modules/catalog/store/product/mutations.ts +++ b/core/modules/catalog/store/product/mutations.ts @@ -4,6 +4,9 @@ import * as types from './mutation-types' import ProductState, { PagedProductList } from '../../types/ProductState' const mutations: MutationTree = { + [types.CATALOG_SET_BREADCRUMBS] (state, payload) { + state.breadcrumbs = payload + }, [types.CATALOG_UPD_RELATED] (state, { key, items }) { state.related[key] = items Vue.prototype.$bus.$emit('product-after-related', { key: key, items: items }) diff --git a/core/modules/catalog/store/stock/actions.ts b/core/modules/catalog/store/stock/actions.ts index 9ead3d0c54..bb732d4718 100644 --- a/core/modules/catalog/store/stock/actions.ts +++ b/core/modules/catalog/store/stock/actions.ts @@ -5,7 +5,7 @@ import i18n from '@vue-storefront/i18n' import * as types from '@vue-storefront/core/modules/cart/store/mutation-types' import RootState from '@vue-storefront/core/types/RootState' import StockState from '../../types/StockState' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { TaskQueue } from '@vue-storefront/core/lib/sync' import { Logger } from '@vue-storefront/core/lib/logger' diff --git a/core/modules/catalog/store/tax/mutations.ts b/core/modules/catalog/store/tax/mutations.ts index 8c95c05f0b..78d0d8b4a1 100644 --- a/core/modules/catalog/store/tax/mutations.ts +++ b/core/modules/catalog/store/tax/mutations.ts @@ -1,7 +1,7 @@ import Vue from 'vue' import { MutationTree } from 'vuex' import * as types from './mutation-types' -import { entityKeyName } from '@vue-storefront/store/lib/entities' +import { entityKeyName } from '@vue-storefront/core/store/lib/entities' import TaxState from '../../types/TaxState' import { Logger } from '@vue-storefront/core/lib/logger' diff --git a/core/modules/checkout/hooks/beforeRegistration.ts b/core/modules/checkout/hooks/beforeRegistration.ts index c59792ad6f..da56ab25ba 100644 --- a/core/modules/checkout/hooks/beforeRegistration.ts +++ b/core/modules/checkout/hooks/beforeRegistration.ts @@ -1,5 +1,5 @@ import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '@vue-storefront/core/lib/multistore' export function beforeRegistration({ Vue, config, store, isServer }) { diff --git a/core/modules/checkout/store/checkout/actions.ts b/core/modules/checkout/store/checkout/actions.ts index 854585781d..ef84492316 100644 --- a/core/modules/checkout/store/checkout/actions.ts +++ b/core/modules/checkout/store/checkout/actions.ts @@ -2,7 +2,7 @@ import Vue from 'vue' import { ActionTree } from 'vuex' import * as types from './mutation-types' import i18n from '@vue-storefront/i18n' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import RootState from '@vue-storefront/core/types/RootState' import CheckoutState from '../../types/CheckoutState' import { Logger } from '@vue-storefront/core/lib/logger' diff --git a/core/modules/checkout/store/payment/index.ts b/core/modules/checkout/store/payment/index.ts index bbc37b6c66..c94ec3a95c 100644 --- a/core/modules/checkout/store/payment/index.ts +++ b/core/modules/checkout/store/payment/index.ts @@ -1,7 +1,7 @@ import { Module } from 'vuex' import RootState from '@vue-storefront/core/types/RootState' import PaymentState from '../../types/PaymentState' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' export const paymentModule: Module = { namespaced: true, diff --git a/core/modules/cms/hooks/beforeRegistration.ts b/core/modules/cms/hooks/beforeRegistration.ts index 4a12f3c552..f9ff55a839 100644 --- a/core/modules/cms/hooks/beforeRegistration.ts +++ b/core/modules/cms/hooks/beforeRegistration.ts @@ -1,5 +1,5 @@ import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '@vue-storefront/core/lib/multistore' export function beforeRegistration({ Vue, config, store, isServer }) { diff --git a/core/modules/compare/hooks/beforeRegistration.ts b/core/modules/compare/hooks/beforeRegistration.ts index e0cdd6a2b2..632d28bcd0 100644 --- a/core/modules/compare/hooks/beforeRegistration.ts +++ b/core/modules/compare/hooks/beforeRegistration.ts @@ -1,5 +1,5 @@ import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '@vue-storefront/core/lib/multistore' export function beforeRegistration({ Vue, config, store, isServer }) { diff --git a/core/modules/compare/store/actions.ts b/core/modules/compare/store/actions.ts index ca1eea219b..97fe43c0bd 100644 --- a/core/modules/compare/store/actions.ts +++ b/core/modules/compare/store/actions.ts @@ -1,9 +1,9 @@ import Vue from 'vue' import { ActionTree } from 'vuex' import * as types from './mutation-types' -import { htmlDecode } from '@vue-storefront/store/lib/filters' +import { htmlDecode } from '@vue-storefront/core/store/lib/filters' import i18n from '@vue-storefront/i18n' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import RootState from '@vue-storefront/core/types/RootState' import CompareState from '../types/CompareState' import { cacheStorage } from '../' diff --git a/core/modules/offline-order/components/CancelOrders.ts b/core/modules/offline-order/components/CancelOrders.ts index 7110db06b6..036ddc02da 100644 --- a/core/modules/offline-order/components/CancelOrders.ts +++ b/core/modules/offline-order/components/CancelOrders.ts @@ -1,7 +1,7 @@ import * as localForage from 'localforage' -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { Logger } from '@vue-storefront/core/lib/logger' export const CancelOrders = { diff --git a/core/modules/offline-order/helpers/onNetworkStatusChange.ts b/core/modules/offline-order/helpers/onNetworkStatusChange.ts index a022b97a6f..d993558120 100644 --- a/core/modules/offline-order/helpers/onNetworkStatusChange.ts +++ b/core/modules/offline-order/helpers/onNetworkStatusChange.ts @@ -1,9 +1,9 @@ import * as localForage from 'localforage' -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' import EventBus from '@vue-storefront/core/compatibility/plugins/event-bus/index' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '@vue-storefront/core/lib/multistore' import { Logger } from '@vue-storefront/core/lib/logger' diff --git a/core/modules/order/hooks/beforeRegistration.ts b/core/modules/order/hooks/beforeRegistration.ts index 7e7df58e7f..49b7df2c32 100644 --- a/core/modules/order/hooks/beforeRegistration.ts +++ b/core/modules/order/hooks/beforeRegistration.ts @@ -1,5 +1,5 @@ import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' export function beforeRegistration({ Vue, config, store, isServer }) { Vue.prototype.$db.ordersCollection = new UniversalStorage(localForage.createInstance({ diff --git a/core/modules/order/store/actions.ts b/core/modules/order/store/actions.ts index e3b901d906..ea9f093e23 100644 --- a/core/modules/order/store/actions.ts +++ b/core/modules/order/store/actions.ts @@ -5,7 +5,7 @@ import { ActionTree } from 'vuex' import RootState from '@vue-storefront/core/types/RootState' import OrderState from '../types/OrderState' import { Order } from '../types/Order' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { isOnline } from '@vue-storefront/core/lib/search' import i18n from '@vue-storefront/i18n' import { TaskQueue } from '@vue-storefront/core/lib/sync' diff --git a/core/modules/order/store/mutations.ts b/core/modules/order/store/mutations.ts index f1e2817f73..ef766181d6 100644 --- a/core/modules/order/store/mutations.ts +++ b/core/modules/order/store/mutations.ts @@ -1,9 +1,9 @@ import Vue from 'vue' import { MutationTree } from 'vuex' import * as types from './mutation-types' -import * as entities from '@vue-storefront/store/lib/entities' +import * as entities from '@vue-storefront/core/store/lib/entities' import OrderState from '../types/OrderState' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import { Logger } from '@vue-storefront/core/lib/logger' const mutations: MutationTree = { diff --git a/core/modules/review/store/actions.ts b/core/modules/review/store/actions.ts index 2e59781ad3..e4cdb2f1b4 100644 --- a/core/modules/review/store/actions.ts +++ b/core/modules/review/store/actions.ts @@ -7,7 +7,7 @@ import RootState from '@vue-storefront/core/types/RootState' import ReviewState from '../types/ReviewState' import * as types from './mutation-types' import i18n from '@vue-storefront/i18n' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import Review from '@vue-storefront/core/modules/review/types/Review' import { ReviewRequest } from '@vue-storefront/core/modules/review/types/ReviewRequest' import { Logger } from '@vue-storefront/core/lib/logger' diff --git a/core/modules/user/hooks/beforeRegistration.ts b/core/modules/user/hooks/beforeRegistration.ts index 44c0380442..8657b095b5 100644 --- a/core/modules/user/hooks/beforeRegistration.ts +++ b/core/modules/user/hooks/beforeRegistration.ts @@ -1,5 +1,5 @@ import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '@vue-storefront/core/lib/multistore' export function beforeRegistration({ Vue, config, store, isServer }) { diff --git a/core/modules/user/router/beforeEach.ts b/core/modules/user/router/beforeEach.ts index ba810984e9..49f8bb681f 100644 --- a/core/modules/user/router/beforeEach.ts +++ b/core/modules/user/router/beforeEach.ts @@ -1,5 +1,5 @@ import { Route } from 'vue-router' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import i18n from '@vue-storefront/i18n' import { isServer } from '@vue-storefront/core/helpers' import { router } from '@vue-storefront/core/app' diff --git a/core/modules/user/store/actions.ts b/core/modules/user/store/actions.ts index 4acd1db129..56a9c7da4d 100644 --- a/core/modules/user/store/actions.ts +++ b/core/modules/user/store/actions.ts @@ -1,7 +1,7 @@ import Vue from 'vue' import { ActionTree } from 'vuex' import * as types from './mutation-types' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' import i18n from '@vue-storefront/i18n' import { adjustMultistoreApiUrl } from '@vue-storefront/core/lib/multistore' import RootState from '@vue-storefront/core/types/RootState' diff --git a/core/modules/wishlist/store/actions.ts b/core/modules/wishlist/store/actions.ts index dcc86197c0..0f4f3f07c1 100644 --- a/core/modules/wishlist/store/actions.ts +++ b/core/modules/wishlist/store/actions.ts @@ -2,8 +2,8 @@ import Vue from 'vue' import { ActionTree } from 'vuex' import * as types from './mutation-types' import i18n from '@vue-storefront/i18n' -import { htmlDecode } from '@vue-storefront/store/lib/filters' -import rootStore from '@vue-storefront/store' +import { htmlDecode } from '@vue-storefront/core/store/lib/filters' +import rootStore from '@vue-storefront/core/store' import RootState from '@vue-storefront/core/types/RootState' import WishlistState from '../types/WishlistState' import { cacheStorage } from '../' diff --git a/core/package.json b/core/package.json index 9fb694c040..3f7c716c91 100644 --- a/core/package.json +++ b/core/package.json @@ -8,7 +8,6 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "@vue-storefront/store": "^1.7.0", "bodybuilder": "2.2.13", "config": "^1.30.0", "express": "^4.14.0", diff --git a/core/pages/Category.js b/core/pages/Category.js index aba76a0315..3f60418266 100644 --- a/core/pages/Category.js +++ b/core/pages/Category.js @@ -2,7 +2,7 @@ import Vue from 'vue' import toString from 'lodash-es/toString' import i18n from '@vue-storefront/i18n' -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' import EventBus from '@vue-storefront/core/compatibility/plugins/event-bus' import { baseFilterProductsQuery, buildFilterProductsQuery } from '@vue-storefront/core/helpers' import { htmlDecode } from '@vue-storefront/core/filters/html-decode' diff --git a/core/pages/Checkout.js b/core/pages/Checkout.js index 68d351e357..f2d77bb899 100644 --- a/core/pages/Checkout.js +++ b/core/pages/Checkout.js @@ -1,6 +1,6 @@ import Vue from 'vue' import i18n from '@vue-storefront/i18n' -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' import VueOfflineMixin from 'vue-offline/mixin' import { mapGetters } from 'vuex' diff --git a/core/pages/Product.js b/core/pages/Product.js index d55475b438..a678cef782 100644 --- a/core/pages/Product.js +++ b/core/pages/Product.js @@ -1,6 +1,6 @@ import { mapGetters } from 'vuex' -import store from '@vue-storefront/store' +import store from '@vue-storefront/core/store' import EventBus from '@vue-storefront/core/compatibility/plugins/event-bus' import { htmlDecode } from '@vue-storefront/core/filters' import { currentStoreView, localizedRoute } from '@vue-storefront/core/lib/multistore' diff --git a/core/store/package.json b/core/store/package.json deleted file mode 100644 index 0538dcce7a..0000000000 --- a/core/store/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@vue-storefront/store", - "version": "1.7.0", - "description": "Vue Storefront core data store", - "license": "MIT", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "dependencies": { - "ajv": "^6.4.0", - "bodybuilder": "2.2.13", - "isomorphic-fetch": "^2.2.1", - "js-sha3": "^0.8.0", - "lean-he": "^2.0.0", - "localforage": "^1.7.2", - "lodash-es": "^4.17.10", - "vuex": "^3.0.1" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/docs/guide/basics/configuration.md b/docs/guide/basics/configuration.md index 7f217dbd7d..8039577bcf 100644 --- a/docs/guide/basics/configuration.md +++ b/docs/guide/basics/configuration.md @@ -302,6 +302,12 @@ If this option is set to `true`, in case of configurable products, Vue Storefron If this option is set to `true`, Vue Storefront will add use price item with a discount to the shopping cart. Otherwise, the product price and special will be added to the shopping cart instead. +```json + "minicartCountType": "quantities", +``` + +If this option is set to `items`, Vue Storefront will calculate the cart count based on items instead of the item quantities. + ```json "create_endpoint": "http://localhost:8080/api/cart/create?token={{token}}", "updateitem_endpoint": "http://localhost:8080/api/cart/update?token={{token}}&cartId={{cartId}}", diff --git a/docs/guide/data/data.md b/docs/guide/data/data.md index 52b15c6622..8239575f61 100644 --- a/docs/guide/data/data.md +++ b/docs/guide/data/data.md @@ -107,7 +107,7 @@ Here you have an example on how the Vuex store should be constructed. Please not ```js import * as types from '../mutation-types'; -import { ValidationError } from '@vue-storefront/store/lib/exceptions'; +import { ValidationError } from '@vue-storefront/core/store/lib/exceptions'; import * as entities from '../../lib/entities'; import * as sw from '@vue-storefront/core/lib/sw'; import config from '../../config'; diff --git a/docs/guide/integrations/payment-gateway.md b/docs/guide/integrations/payment-gateway.md index d1c15c2a1b..3ebbcd4fe8 100644 --- a/docs/guide/integrations/payment-gateway.md +++ b/docs/guide/integrations/payment-gateway.md @@ -32,7 +32,7 @@ Here is an example of "Cash on delivery" payment method main logic. It's placed ```js import InfoComponent from '../components/Info.vue' -import rootStore from '@vue-storefront/store' +import rootStore from '@vue-storefront/core/store' export function afterRegistration({ Vue, config, store, isServer }) { // Place the order. Payload is empty as we don't have any specific info to add for this payment method '{}' diff --git a/docs/guide/upgrade-notes/README.md b/docs/guide/upgrade-notes/README.md index 1b3edfd88a..c3d1bd105b 100644 --- a/docs/guide/upgrade-notes/README.md +++ b/docs/guide/upgrade-notes/README.md @@ -15,7 +15,7 @@ const moduleConfig: VueStorefrontModuleConfig = { const module = createModule(moduleConfig) ```` - +- `@vue-storefront/store` package has been depreciated. Just change imports to `@vue-storefront/core/store`. ## 1.7 -> 1.8 Full changelog is available [here](https://github.com/DivanteLtd/vue-storefront/blob/master/CHANGELOG.md) @@ -261,7 +261,7 @@ We've added the Reviews support, however, Magento2 is still lacking Reviews supp To get access to rootStore import it by -`import rootStore from '@vue-storefront/store'` +`import rootStore from '@vue-storefront/core/store'` #### cms extenstion was renamed to extension-magento2-cms diff --git a/docs/guide/vuex/introduction.md b/docs/guide/vuex/introduction.md index 3fc91d49bc..a37849360c 100644 --- a/docs/guide/vuex/introduction.md +++ b/docs/guide/vuex/introduction.md @@ -27,7 +27,7 @@ Before you start working with vuex, it's recommended to get familiar with our [v Existing core modules can be overridden in themes store. Just import any core store modules and override it using `extendStore()` utility method like the example given below in `themes/default/store/ui-store.js`. ``` -import coreStore from '@vue-storefront/store/modules/ui-store' +import coreStore from '@vue-storefront/core/store/modules/ui-store' import { extendStore } from '@vue-storefront/core/lib/themes' const state = { diff --git a/package.json b/package.json index 6f7f035e2d..c33cca5207 100755 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "localforage": "^1.7.2", "magento2-rest-client": "github:DivanteLtd/magento2-rest-client", "pm2": "^2.10.4", + "redis-tag-cache": "^1.2.1", "reflect-metadata": "^0.1.12", "register-service-worker": "^1.5.2", "ts-node": "^7.0.1", @@ -174,7 +175,6 @@ "workspaces": [ "core", "core/i18n", - "core/store", "src/extensions/*", "src/modules/*", "src/themes/*", diff --git a/src/modules/claims/hooks/beforeRegistration.ts b/src/modules/claims/hooks/beforeRegistration.ts index 415375e7ab..d52b5f1247 100644 --- a/src/modules/claims/hooks/beforeRegistration.ts +++ b/src/modules/claims/hooks/beforeRegistration.ts @@ -1,5 +1,5 @@ import * as localForage from 'localforage' -import UniversalStorage from '@vue-storefront/store/lib/storage' +import UniversalStorage from '@vue-storefront/core/store/lib/storage' import { currentStoreView } from '@vue-storefront/core/lib/multistore' export function beforeRegistration({ Vue, config, store, isServer }) { diff --git a/src/modules/droppoint-shipping/store/actions.ts b/src/modules/droppoint-shipping/store/actions.ts index 3d9b232d59..2ae4a1fe6e 100644 --- a/src/modules/droppoint-shipping/store/actions.ts +++ b/src/modules/droppoint-shipping/store/actions.ts @@ -1,6 +1,6 @@ import { ActionTree } from 'vuex'; import { execute as taskExecute } from '@vue-storefront/core/lib/sync/task' -import * as entities from '@vue-storefront/store/lib/entities' +import * as entities from '@vue-storefront/core/store/lib/entities' // actions export const actions: ActionTree = { diff --git a/src/modules/magento-2-cms/components/CmsData.vue b/src/modules/magento-2-cms/components/CmsData.vue index a9a91eafe6..a6f6555728 100644 --- a/src/modules/magento-2-cms/components/CmsData.vue +++ b/src/modules/magento-2-cms/components/CmsData.vue @@ -7,7 +7,7 @@ + + diff --git a/src/themes/default/components/core/ProductGallery.vue b/src/themes/default/components/core/ProductGallery.vue index e7d4e74cda..371e18c7df 100644 --- a/src/themes/default/components/core/ProductGallery.vue +++ b/src/themes/default/components/core/ProductGallery.vue @@ -21,7 +21,8 @@ :current-slide="currentSlide" :product-name="product.name" :gallery="gallery" - @close="toggleZoom"/> + @close="toggleZoom" + /> -
+
+
@@ -35,8 +42,9 @@ + + diff --git a/src/themes/default/components/core/blocks/Microcart/Product.vue b/src/themes/default/components/core/blocks/Microcart/Product.vue index fbdbc28a4b..1efcdfd189 100644 --- a/src/themes/default/components/core/blocks/Microcart/Product.vue +++ b/src/themes/default/components/core/blocks/Microcart/Product.vue @@ -74,7 +74,7 @@