@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.
@@ -1,10 +1,14 @@
1
1
  <template>
2
2
  <btn
3
- btn-class="green"
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
- <add-to-cart-btn
93
- v-if="hasCartBtn"
94
- class="EditorPricing__add-to-cart-button" />
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: end;
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 by countries:
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>
@@ -56,6 +56,7 @@ const productPreview = {
56
56
  },
57
57
  computed: {
58
58
  ...mapGetters(['countries']),
59
+ ...mapGetters('product', ['priceIncludeGST']),
59
60
  productCountries() {
60
61
  return this.countries.filter(c => this.product.countries?.includes(c._id));
61
62
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.431",
3
+ "version": "0.0.432",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  import debounce from 'lodash.debounce';
2
2
 
3
- const STATE_STORAGE_KEY = 'lancom-state-2.1';
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) {