@lancom/shared 0.0.430 → 0.0.431

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.
Files changed (46) hide show
  1. package/assets/js/api/index.js +2 -2
  2. package/assets/js/constants/product.js +14 -0
  3. package/assets/scss/_common.scss +9 -1
  4. package/assets/scss/variables/_breakpoints.scss +2 -0
  5. package/components/common/breadcrumbs/breadcrumbs.scss +4 -1
  6. package/components/common/breadcrumbs/breadcrumbs.vue +4 -1
  7. package/components/common/client_settings/client-settings.vue +2 -3
  8. package/components/common/client_settings_tax/client-settings-tax.vue +1 -0
  9. package/components/common/price.vue +1 -2
  10. package/components/common/pricing_discounts_table/pricing-discounts-table.vue +28 -5
  11. package/components/common/product_side_with_print/product-side-with-print.vue +3 -3
  12. package/components/common/stars-mark.vue +21 -9
  13. package/components/common/tabs.vue +17 -3
  14. package/components/editor/editor_colors/editor-colors.scss +79 -0
  15. package/components/editor/editor_colors/editor-colors.vue +90 -0
  16. package/components/editor/editor_layers/editor-layers.vue +11 -6
  17. package/components/editor/editor_workspace/editor-workspace.vue +17 -15
  18. package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +2 -9
  19. package/components/product/other_products/other-products.scss +34 -0
  20. package/components/product/other_products/other-products.vue +76 -0
  21. package/components/product/other_products/other_product/other-product.scss +80 -0
  22. package/components/product/other_products/other_product/other-product.vue +59 -0
  23. package/components/product/product.vue +0 -14
  24. package/components/product/product_check_delivery/product-check-delivery.scss +31 -0
  25. package/components/product/product_check_delivery/product-check-delivery.vue +73 -0
  26. package/components/product/product_colors_selector/product-colors-selector.scss +8 -1
  27. package/components/product/product_colors_selector/product-colors-selector.vue +8 -0
  28. package/components/product/product_pricing_tiers/product-pricing-tiers.scss +53 -0
  29. package/components/product/product_pricing_tiers/product-pricing-tiers.vue +40 -0
  30. package/components/product/product_reviews/product-reviews.vue +6 -6
  31. package/components/product/product_stock_status/product-stock-status.scss +28 -0
  32. package/components/product/product_stock_status/product-stock-status.vue +35 -0
  33. package/components/product/related_products/related-products.vue +4 -4
  34. package/components/products/products_attributes/products_attribute/products-attribute.vue +19 -18
  35. package/components/products/products_brands/products-brands.vue +3 -1
  36. package/components/products/products_filters/products-filters.vue +9 -1
  37. package/components/products/products_tags/products-tags.vue +19 -18
  38. package/components/products/products_types/products-types.scss +1 -1
  39. package/layouts/products.vue +153 -432
  40. package/mixins/layouts/products.js +285 -0
  41. package/mixins/product-preview.js +13 -0
  42. package/package.json +1 -1
  43. package/store/index.js +2 -0
  44. package/store/product.js +50 -12
  45. package/components/the_breadcrumbs/the-breadcrumbs.scss +0 -36
  46. package/components/the_breadcrumbs/the-breadcrumbs.vue +0 -78
@@ -1,33 +1,34 @@
1
1
  <template>
2
2
  <div class="ProductsAttribute__wrapper">
3
- <div class="ProductsAttribute__title">
4
- {{ attribute.name }}
5
- </div>
6
- <div class="ProductsAttribute__options">
7
- <div
8
- v-for="option in options"
9
- :key="option._id"
10
- class="ProductsAttribute__option"
11
- :class="{
12
- 'ProductsAttribute__option--active': selectedOptions.includes(option.alias)
13
- }">
14
- <products-link :attributes="{ [attribute.alias]: option.alias }">
15
- <checked-icon
16
- v-if="hasSelectedIcon"
17
- :checked="selectedOptions.includes(option.alias)" />
18
- {{ option.name }}
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
- </div>
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
  },
@@ -17,7 +17,9 @@
17
17
  v-if="hasSelectedIcon"
18
18
  :checked="brand.alias === currentBrand"
19
19
  :circle="selectedIconCircle" />
20
- {{ brand.name }}
20
+ <span>
21
+ {{ brand.name }}
22
+ </span>
21
23
  </products-link>
22
24
  </div>
23
25
  </toggle-content>
@@ -11,7 +11,9 @@
11
11
  class="labelless">
12
12
  </multiselect>
13
13
  </div>
14
- <div class="ProductsFilters__search hidden-sm-and-down">
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
- <div class="ProductsTags__title">
6
- Tags
7
- </div>
8
- <div class="ProductsTags__options">
9
- <div
10
- v-for="tag in tags"
11
- :key="tag.alias"
12
- class="ProductsTags__item"
13
- :class="{
14
- 'ProductsTags__item--active': selectedTags.includes(tag.alias)
15
- }">
16
- <products-link :tags="tag.alias">
17
- {{ tag.name }}
18
- <i
19
- v-if="hasRemoveIcon && selectedTags.includes(tag.alias)"
20
- class="icon-cancel"></i>
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
- </div>
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: {
@@ -34,4 +34,4 @@
34
34
  height: 20px;
35
35
  }
36
36
  }
37
- }
37
+ }