@lancom/shared 0.0.431 → 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/components/product/add-to-cart-btn.vue +13 -3
- package/components/product/editor_pricing/editor-pricing.vue +5 -3
- package/components/product/product_colors_selector/product-colors-selector.scss +6 -1
- package/components/product/product_colors_selector/product-colors-selector.vue +3 -2
- package/mixins/product-preview.js +1 -0
- package/package.json +1 -1
- package/plugins/save-state.js +3 -2
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<btn
|
|
3
|
-
btn-class="
|
|
3
|
+
:btn-class="btnClass"
|
|
4
4
|
btn-label="Add to cart"
|
|
5
5
|
:btn-disabled="addToCartDisabled"
|
|
6
6
|
:btn-processing="addingToCart"
|
|
7
|
-
@onclick="proceedToCard"
|
|
7
|
+
@onclick="proceedToCard">
|
|
8
|
+
<template slot="icon-before">
|
|
9
|
+
<slot name="icon-before"></slot>
|
|
10
|
+
</template>
|
|
11
|
+
</btn>
|
|
8
12
|
</template>
|
|
9
13
|
|
|
10
14
|
<script>
|
|
@@ -12,7 +16,13 @@ import addToCartMixin from '@lancom/shared/mixins/add-to-cart';
|
|
|
12
16
|
|
|
13
17
|
export default {
|
|
14
18
|
name: 'AddToCartBtn',
|
|
15
|
-
mixins: [addToCartMixin]
|
|
19
|
+
mixins: [addToCartMixin],
|
|
20
|
+
props: {
|
|
21
|
+
btnClass: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'green'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
16
26
|
};
|
|
17
27
|
</script>
|
|
18
28
|
|
|
@@ -89,9 +89,11 @@
|
|
|
89
89
|
@click="toggleDetails">
|
|
90
90
|
{{ showDetails ? 'Hide' : 'Show' }} detail
|
|
91
91
|
</div>
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
<slot>
|
|
93
|
+
<add-to-cart-btn
|
|
94
|
+
v-if="hasCartBtn"
|
|
95
|
+
class="EditorPricing__add-to-cart-button" />
|
|
96
|
+
</slot>
|
|
95
97
|
</div>
|
|
96
98
|
</div>
|
|
97
99
|
</div>
|
|
@@ -83,9 +83,14 @@
|
|
|
83
83
|
position: relative;
|
|
84
84
|
bottom: -13px;
|
|
85
85
|
display: flex;
|
|
86
|
-
justify-content:
|
|
86
|
+
justify-content: space-between;
|
|
87
87
|
font-size: 13px;
|
|
88
88
|
align-items: center;
|
|
89
|
+
&-stock {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 16px;
|
|
93
|
+
}
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
96
|
|
|
@@ -79,9 +79,10 @@
|
|
|
79
79
|
</div>
|
|
80
80
|
<div class="ProductColorsSelector__countries">
|
|
81
81
|
<div>
|
|
82
|
-
Stock
|
|
82
|
+
Stock Availability
|
|
83
83
|
</div>
|
|
84
|
-
<div>
|
|
84
|
+
<div class="ProductColorsSelector__countries-stock">
|
|
85
|
+
<span>Stock by countries:</span>
|
|
85
86
|
<client-settings-stock-country />
|
|
86
87
|
</div>
|
|
87
88
|
</div>
|
package/package.json
CHANGED
package/plugins/save-state.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import debounce from 'lodash.debounce';
|
|
2
2
|
|
|
3
|
-
const STATE_STORAGE_KEY = 'lancom-state-2.
|
|
3
|
+
const STATE_STORAGE_KEY = 'lancom-state-2.2';
|
|
4
4
|
const SAVE_STATE_MODULES = new Map([
|
|
5
5
|
['setGoogleClickId', 'googleClickId'],
|
|
6
6
|
['cart/setId', 'cart.id'],
|
|
@@ -8,7 +8,8 @@ const SAVE_STATE_MODULES = new Map([
|
|
|
8
8
|
['cart/setCoupon', 'cart.coupon'],
|
|
9
9
|
['cart/setNeedToPickup', 'cart.needToPickup'],
|
|
10
10
|
['cart/setSuburb', 'cart.suburb'],
|
|
11
|
-
['cart/clearCart', 'cart.coupon']
|
|
11
|
+
['cart/clearCart', 'cart.coupon'],
|
|
12
|
+
['product/setPriceIncludeGST', 'product.priceIncludeGST']
|
|
12
13
|
]);
|
|
13
14
|
|
|
14
15
|
export function saveStatePlugin(store) {
|