@lancom/shared 0.0.244 → 0.0.246

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,9 +13,12 @@ const gtm = {
13
13
  },
14
14
  viewItem(product) {
15
15
  this.push({
16
+ event: 'view_item',
16
17
  value: product.minPrice,
18
+ currency: 'AUD',
17
19
  items: [{
18
- id: product.SKU,
20
+ id: product.SKU,
21
+ item_name: product.name,
19
22
  google_business_vertical: 'retail'
20
23
  }]
21
24
  });
@@ -38,6 +41,40 @@ const gtm = {
38
41
  }, [])
39
42
  });
40
43
  },
44
+ viewItemList(products) {
45
+ this.push({
46
+ event: 'view_item_list',
47
+ currency: 'AUD',
48
+ items: (products || []).map(product => {
49
+ return {
50
+ id: product.SKU,
51
+ item_name: product.name,
52
+ google_business_vertical: 'retail',
53
+ price: product.minPrice
54
+ };
55
+ })
56
+ });
57
+ },
58
+ viewItemList(products) {
59
+ this.push({
60
+ event: 'view_item_list',
61
+ currency: 'AUD',
62
+ items: products.map(product => {
63
+ return {
64
+ id: product.SKU,
65
+ item_name: product.name,
66
+ google_business_vertical: 'retail',
67
+ price: product.minPrice
68
+ };
69
+ })
70
+ });
71
+ },
72
+ viewSearchResult(search_term) {
73
+ this.push({
74
+ event: 'view_search_results',
75
+ search_term
76
+ });
77
+ },
41
78
  viewCart(entities, pricing) {
42
79
  if (pricing) {
43
80
  this.push({
package/nuxt.config.js CHANGED
@@ -103,13 +103,13 @@ module.exports = (config, axios, { raygunClient, publicPath } = {}) => ({
103
103
  '@lancom',
104
104
  '@lancom/shared/plugins/aos-animation'
105
105
  ],
106
- extend(config, { isClient }) {
107
- if (isClient) {
108
- config.devtool = 'source-map';
109
- }
110
- },
111
- analyze: !config.IS_LOCAL,
112
- // extractCSS: !config.IS_LOCAL,
106
+ // extend(config, { isClient }) {
107
+ // if (isClient) {
108
+ // config.devtool = 'source-map';
109
+ // }
110
+ // },
111
+ // analyze: !config.IS_LOCAL,
112
+ extractCSS: !config.IS_LOCAL,
113
113
  },
114
114
  render: {
115
115
  asyncScripts: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.244",
3
+ "version": "0.0.246",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {
package/store/products.js CHANGED
@@ -51,6 +51,8 @@ export const actions = {
51
51
  commit('setAttributes', attributes);
52
52
  commit('setMinPrice', minPrice);
53
53
  commit('setMaxPrice', maxPrice);
54
+
55
+ return { products };
54
56
  } catch (e) {
55
57
  const { status, data } = e?.response || {};
56
58
  const statusCode = status || 500;