@lancom/shared 0.0.134 → 0.0.135

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.
@@ -13,6 +13,7 @@
13
13
  @change="$emit('change', model)" />
14
14
  <label
15
15
  class="Checkbox__label"
16
+ :class="{ dark }"
16
17
  :for="id"
17
18
  @click.stop>
18
19
  <i class="icon-ok Checkbox__icon"></i>
@@ -35,6 +36,9 @@ export default {
35
36
  disabled: {
36
37
  default: false
37
38
  },
39
+ dark: {
40
+ default: false
41
+ },
38
42
  uncheckedValue: {
39
43
  default: false
40
44
  },
@@ -128,6 +132,12 @@ html[dir=rtl] {
128
132
  transform: translateY(-50%);
129
133
  }
130
134
 
135
+ &.dark {
136
+ &:before {
137
+ border: 1px solid $grey_1;
138
+ }
139
+ }
140
+
131
141
  &:after {
132
142
  content: '';
133
143
  position: absolute;
@@ -16,7 +16,12 @@
16
16
  active: amount >= range.min && ((range.max && amount <= range.max) || !range.max)
17
17
  }">
18
18
  <td>{{ (range.max >= 9999 || !range.max) ? `${range.min}+` : `${range.min}-${range.max}` }}</td>
19
- <td>{{ range.price | priceWithTax(pricingSettings) }}</td>
19
+ <td v-if="withGst">
20
+ {{ range.price | priceWithTax(pricingSettings) }}
21
+ </td>
22
+ <td v-else>
23
+ {{ range.price | price }}
24
+ </td>
20
25
  </tr>
21
26
  </tbody>
22
27
  </table>
@@ -24,12 +29,13 @@
24
29
 
25
30
  <script>
26
31
  import { mapGetters } from 'vuex';
27
- import { priceWithTax } from '@lancom/shared/assets/js/utils/filters';
32
+ import { priceWithTax, price } from '@lancom/shared/assets/js/utils/filters';
28
33
 
29
34
  export default {
30
35
  name: 'PricingDiscountsTable',
31
36
  filters: {
32
- priceWithTax
37
+ priceWithTax,
38
+ price
33
39
  },
34
40
  props: {
35
41
  prices: {
@@ -47,6 +53,10 @@ export default {
47
53
  striped: {
48
54
  type: Boolean,
49
55
  default: false
56
+ },
57
+ withGst: {
58
+ type: Boolean,
59
+ default: true
50
60
  }
51
61
  },
52
62
  computed: {
@@ -5,7 +5,10 @@
5
5
  v-for="tab in tabs"
6
6
  :key="tab.value"
7
7
  class="tab ripple"
8
- :class="{ active: currentTab === tab.value }"
8
+ :class="{
9
+ active: currentTab === tab.value,
10
+ shadow: btnsShadow
11
+ }"
9
12
  @click="select(tab)">
10
13
  <div class="lc_medium18 tab-label">
11
14
  <i
@@ -53,6 +56,10 @@ export default {
53
56
  type: Boolean,
54
57
  default: false
55
58
  },
59
+ btnsShadow: {
60
+ type: Boolean,
61
+ default: false
62
+ },
56
63
  fullWidth: {
57
64
  type: Boolean,
58
65
  default: true
@@ -132,7 +139,6 @@ export default {
132
139
  &s {
133
140
  display: flex;
134
141
  border-radius: 4px 4px 0 0;
135
- overflow: hidden;
136
142
  &--secondary,
137
143
  &--primary,
138
144
  &--large {
@@ -161,12 +167,19 @@ export default {
161
167
  background-color: #FFFFFF;
162
168
  color: $grey_1;
163
169
  }
170
+ &:hover {
171
+ background-color: #FFFFFF;
172
+ color: $grey_1;
173
+ }
164
174
  &s--large &.active,
165
175
  &s--primary &.active,
166
176
  &s--secondary &.active {
167
177
  background-color: $grey_4;
168
178
  color: $black;
169
179
  }
180
+ &.shadow {
181
+ box-shadow: 1px 1px 2px rgb(214, 214, 214);
182
+ }
170
183
  }
171
184
  .fullWidth .tab {
172
185
  flex-grow: 1;
@@ -171,6 +171,12 @@ export default {
171
171
  this.skipUpdateGallery = false;
172
172
  }
173
173
  },
174
+ mounted() {
175
+ const index = this.filteredImages.findIndex(i => i.color === this.editableColor?._id);
176
+ if (index > -1) {
177
+ this.goToSlide(index, true);
178
+ }
179
+ },
174
180
  methods: {
175
181
  ...mapActions('product', ['selectColor']),
176
182
  staticLink,
@@ -3,6 +3,7 @@
3
3
  <tabs
4
4
  :tabs="tabs"
5
5
  :selected="selectedTab"
6
+ :btns-shadow="true"
6
7
  @select="selectedTab = $event">
7
8
  <template #default="{ currentTab }">
8
9
  <component
@@ -32,6 +32,9 @@
32
32
  }
33
33
 
34
34
  .ProductPrintsPriceInfo {
35
+ &__wrapper {
36
+ position: relative;
37
+ }
35
38
  &__print-pricing {
36
39
  margin-top: 30px;
37
40
  }
@@ -60,4 +63,11 @@
60
63
  justify-content: flex-end;
61
64
  padding: 0 0 10px 0;
62
65
  }
66
+ &__content {
67
+ opacity: 1;
68
+ transition: opacity 500ms;
69
+ &--hidden {
70
+ opacity: 0;
71
+ }
72
+ }
63
73
  }
@@ -1,7 +1,10 @@
1
1
  <template>
2
2
  <div class="ProductPrintsPriceInfo__wrapper">
3
3
  <div class="ProductPrintsPriceInfo__toggle-gst">
4
- <checkbox v-model="inclGST">
4
+ <checkbox
5
+ v-model="inclGST"
6
+ :dark="true"
7
+ @change="onChangeInclGST">
5
8
  <div class="ml-5">Inc. GST</div>
6
9
  </checkbox>
7
10
  </div>
@@ -9,22 +12,29 @@
9
12
  v-if="avilableTabs.length > 0"
10
13
  :tabs="avilableTabs"
11
14
  :selected="selectedTab"
15
+ :btns-shadow="true"
12
16
  type="secondary"
13
17
  @select="selectedTab = $event">
14
18
  <template #default="{ currentTab }">
15
- <product-screen-print-price-info
16
- v-if="currentTab === 'screen print'"
17
- :product="product"
18
- :with-gst="inclGST" />
19
- <product-print-price-info
20
- v-else-if="currentTab"
21
- :product="product"
22
- :type="currentTab"
23
- :with-gst="inclGST" />
24
19
  <div
25
- v-if="currentPrintTypeMessage"
26
- class="ProductPrintsPriceInfo__print-description"
27
- v-html="currentPrintTypeMessage"></div>
20
+ class="ProductPrintsPriceInfo__content"
21
+ :class="{
22
+ 'ProductPrintsPriceInfo__content--hidden': inclGSTSpinner
23
+ }">
24
+ <product-screen-print-price-info
25
+ v-if="currentTab === 'screen print'"
26
+ :product="product"
27
+ :with-gst="inclGSTFinal" />
28
+ <product-print-price-info
29
+ v-else-if="currentTab"
30
+ :product="product"
31
+ :type="currentTab"
32
+ :with-gst="inclGSTFinal" />
33
+ <div
34
+ v-if="currentPrintTypeMessage"
35
+ class="ProductPrintsPriceInfo__print-description"
36
+ v-html="currentPrintTypeMessage"></div>
37
+ </div>
28
38
  </template>
29
39
  </tabs>
30
40
  <div
@@ -59,6 +69,9 @@ export default {
59
69
  data() {
60
70
  return {
61
71
  inclGST: false,
72
+ inclGSTFinal: false,
73
+ inclGSTSpinner: false,
74
+ inclGSTSpinnerTimer: null,
62
75
  orderPrintTypes: PRINT_TYPES_LIST,
63
76
  tabs: [{
64
77
  label: 'Black',
@@ -107,8 +120,19 @@ export default {
107
120
  group: 'garment-print-price-details'
108
121
  });
109
122
  },
123
+ destroyed() {
124
+ clearTimeout(this.inclGSTSpinnerTimer);
125
+ },
110
126
  methods: {
111
- ...mapActions(['loadHelpMessages'])
127
+ ...mapActions(['loadHelpMessages']),
128
+ onChangeInclGST() {
129
+ clearTimeout(this.inclGSTSpinnerTimer);
130
+ this.inclGSTSpinner = true;
131
+ this.inclGSTSpinnerTimer = setTimeout(() => {
132
+ this.inclGSTSpinner = false;
133
+ this.inclGSTFinal = this.inclGST;
134
+ }, 500);
135
+ }
112
136
  }
113
137
  };
114
138
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.134",
3
+ "version": "0.0.135",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {