@lancom/shared 0.0.430 → 0.0.432
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/assets/js/api/index.js +2 -2
- package/assets/js/constants/product.js +14 -0
- package/assets/scss/_common.scss +9 -1
- package/assets/scss/variables/_breakpoints.scss +2 -0
- package/components/common/breadcrumbs/breadcrumbs.scss +4 -1
- package/components/common/breadcrumbs/breadcrumbs.vue +4 -1
- package/components/common/client_settings/client-settings.vue +2 -3
- package/components/common/client_settings_tax/client-settings-tax.vue +1 -0
- package/components/common/price.vue +1 -2
- package/components/common/pricing_discounts_table/pricing-discounts-table.vue +28 -5
- package/components/common/product_side_with_print/product-side-with-print.vue +3 -3
- package/components/common/stars-mark.vue +21 -9
- package/components/common/tabs.vue +17 -3
- package/components/editor/editor_colors/editor-colors.scss +79 -0
- package/components/editor/editor_colors/editor-colors.vue +90 -0
- package/components/editor/editor_layers/editor-layers.vue +11 -6
- package/components/editor/editor_workspace/editor-workspace.vue +17 -15
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +2 -9
- package/components/product/add-to-cart-btn.vue +13 -3
- package/components/product/editor_pricing/editor-pricing.vue +5 -3
- package/components/product/other_products/other-products.scss +34 -0
- package/components/product/other_products/other-products.vue +76 -0
- package/components/product/other_products/other_product/other-product.scss +80 -0
- package/components/product/other_products/other_product/other-product.vue +59 -0
- package/components/product/product.vue +0 -14
- package/components/product/product_check_delivery/product-check-delivery.scss +31 -0
- package/components/product/product_check_delivery/product-check-delivery.vue +73 -0
- package/components/product/product_colors_selector/product-colors-selector.scss +14 -2
- package/components/product/product_colors_selector/product-colors-selector.vue +11 -2
- package/components/product/product_pricing_tiers/product-pricing-tiers.scss +53 -0
- package/components/product/product_pricing_tiers/product-pricing-tiers.vue +40 -0
- package/components/product/product_reviews/product-reviews.vue +6 -6
- package/components/product/product_stock_status/product-stock-status.scss +28 -0
- package/components/product/product_stock_status/product-stock-status.vue +35 -0
- package/components/product/related_products/related-products.vue +4 -4
- package/components/products/products_attributes/products_attribute/products-attribute.vue +19 -18
- package/components/products/products_brands/products-brands.vue +3 -1
- package/components/products/products_filters/products-filters.vue +9 -1
- package/components/products/products_tags/products-tags.vue +19 -18
- package/components/products/products_types/products-types.scss +1 -1
- package/layouts/products.vue +153 -432
- package/mixins/layouts/products.js +285 -0
- package/mixins/product-preview.js +14 -0
- package/package.json +1 -1
- package/plugins/save-state.js +3 -2
- package/store/index.js +2 -0
- package/store/product.js +50 -12
- package/components/the_breadcrumbs/the-breadcrumbs.scss +0 -36
- package/components/the_breadcrumbs/the-breadcrumbs.vue +0 -78
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="ProductStockStatus__wrapper"
|
|
4
|
+
:class="`ProductStockStatus__wrapper--${stockStatusColor}`">
|
|
5
|
+
<i class="icon-ok-1"></i>
|
|
6
|
+
<span>
|
|
7
|
+
{{ capitalizedStockStatus }}
|
|
8
|
+
</span>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { mapGetters } from 'vuex';
|
|
14
|
+
import { PRODUCT_STOCK_STATUS_COLORS } from '@lancom/shared/assets/js/constants/product';
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
name: 'ProductStockStatus',
|
|
18
|
+
computed: {
|
|
19
|
+
...mapGetters('product', ['stockStatus']),
|
|
20
|
+
capitalizedStockStatus() {
|
|
21
|
+
if (!this.stockStatus) {
|
|
22
|
+
return '';
|
|
23
|
+
}
|
|
24
|
+
return this.stockStatus.charAt(0).toUpperCase() + this.stockStatus.slice(1);
|
|
25
|
+
},
|
|
26
|
+
stockStatusColor() {
|
|
27
|
+
return PRODUCT_STOCK_STATUS_COLORS[this.stockStatus] || 'green';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style lang="scss" scoped>
|
|
34
|
+
@import 'product-stock-status';
|
|
35
|
+
</style>
|
|
@@ -36,15 +36,15 @@ export default {
|
|
|
36
36
|
products: []
|
|
37
37
|
};
|
|
38
38
|
},
|
|
39
|
+
async fetch() {
|
|
40
|
+
const { products } = await api.fetchRelatedProducts(this.shop._id, this.product.alias, { needShuffle: true });
|
|
41
|
+
this.products = products.splice(0, 6);
|
|
42
|
+
},
|
|
39
43
|
computed: {
|
|
40
44
|
...mapGetters(['shop']),
|
|
41
45
|
hasProducts() {
|
|
42
46
|
return this.products.length > 0;
|
|
43
47
|
}
|
|
44
|
-
},
|
|
45
|
-
async fetch() {
|
|
46
|
-
const { products } = await api.fetchRelatedProducts(this.shop._id, this.product.alias, { needShuffle: true });
|
|
47
|
-
this.products = products.splice(0, 6);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
</script>
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ProductsAttribute__wrapper">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</products-link>
|
|
3
|
+
<toggle-content :label="attribute.name">
|
|
4
|
+
<div class="ProductsAttribute__options">
|
|
5
|
+
<div
|
|
6
|
+
v-for="option in options"
|
|
7
|
+
:key="option._id"
|
|
8
|
+
class="ProductsAttribute__option"
|
|
9
|
+
:class="{
|
|
10
|
+
'ProductsAttribute__option--active': selectedOptions.includes(option.alias)
|
|
11
|
+
}">
|
|
12
|
+
<products-link :attributes="{ [attribute.alias]: option.alias }">
|
|
13
|
+
<checked-icon
|
|
14
|
+
v-if="hasSelectedIcon"
|
|
15
|
+
:checked="selectedOptions.includes(option.alias)" />
|
|
16
|
+
<span>{{ option.name }}</span>
|
|
17
|
+
</products-link>
|
|
18
|
+
</div>
|
|
20
19
|
</div>
|
|
21
|
-
</
|
|
20
|
+
</toggle-content>
|
|
22
21
|
</div>
|
|
23
22
|
</template>
|
|
24
23
|
|
|
25
24
|
<script>
|
|
25
|
+
import ToggleContent from '@lancom/shared/components/common/toggle-content';
|
|
26
26
|
import ProductsLink from '@lancom/shared/components/products/products_link/products-link';
|
|
27
27
|
import CheckedIcon from '@lancom/shared/components/common/checked-icon';
|
|
28
28
|
|
|
29
29
|
export default {
|
|
30
30
|
components: {
|
|
31
|
+
ToggleContent,
|
|
31
32
|
ProductsLink,
|
|
32
33
|
CheckedIcon
|
|
33
34
|
},
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
class="labelless">
|
|
12
12
|
</multiselect>
|
|
13
13
|
</div>
|
|
14
|
-
<div
|
|
14
|
+
<div
|
|
15
|
+
v-if="hasSearch"
|
|
16
|
+
class="ProductsFilters__search hidden-sm-and-down">
|
|
15
17
|
<input
|
|
16
18
|
v-model="search"
|
|
17
19
|
name="search"
|
|
@@ -42,6 +44,12 @@ export default {
|
|
|
42
44
|
components: {
|
|
43
45
|
Multiselect
|
|
44
46
|
},
|
|
47
|
+
props: {
|
|
48
|
+
hasSearch: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
45
53
|
data() {
|
|
46
54
|
const sortByOptions = [{
|
|
47
55
|
value: 'price-low-high',
|
|
@@ -2,35 +2,36 @@
|
|
|
2
2
|
<div
|
|
3
3
|
v-if="tags.length"
|
|
4
4
|
class="ProductsTags__wrapper">
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
</products-link>
|
|
5
|
+
<toggle-content label="Tags">
|
|
6
|
+
<div class="ProductsTags__options">
|
|
7
|
+
<div
|
|
8
|
+
v-for="tag in tags"
|
|
9
|
+
:key="tag.alias"
|
|
10
|
+
class="ProductsTags__item"
|
|
11
|
+
:class="{
|
|
12
|
+
'ProductsTags__item--active': selectedTags.includes(tag.alias)
|
|
13
|
+
}">
|
|
14
|
+
<products-link :tags="tag.alias">
|
|
15
|
+
{{ tag.name }}
|
|
16
|
+
<i
|
|
17
|
+
v-if="hasRemoveIcon && selectedTags.includes(tag.alias)"
|
|
18
|
+
class="icon-cancel"></i>
|
|
19
|
+
</products-link>
|
|
20
|
+
</div>
|
|
22
21
|
</div>
|
|
23
|
-
</
|
|
22
|
+
</toggle-content>
|
|
24
23
|
</div>
|
|
25
24
|
</template>
|
|
26
25
|
|
|
27
26
|
<script>
|
|
28
27
|
import { mapGetters } from 'vuex';
|
|
28
|
+
import ToggleContent from '@lancom/shared/components/common/toggle-content';
|
|
29
29
|
import ProductsLink from '@lancom/shared/components/products/products_link/products-link';
|
|
30
30
|
|
|
31
31
|
export default {
|
|
32
32
|
name: 'ProductsTags',
|
|
33
33
|
components: {
|
|
34
|
+
ToggleContent,
|
|
34
35
|
ProductsLink
|
|
35
36
|
},
|
|
36
37
|
props: {
|