ublo-lib 1.19.9 → 1.19.11

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.
@@ -20,7 +20,7 @@ export const MseM = ({
20
20
  switch (event) {
21
21
  case "view_item":
22
22
  {
23
- const formatedItems = formatPeekPerformancesItem(items, ["kind", "price"]);
23
+ const formatedItems = formatPeekPerformancesItem(items);
24
24
  const rawData = JSON.stringify({
25
25
  products: formatedItems,
26
26
  hoteId
@@ -38,7 +38,7 @@ export const MseM = ({
38
38
  }
39
39
  case "add_to_cart":
40
40
  {
41
- const formatedItems = formatPeekPerformancesItem(items, ["kind", "quantity", "price"]);
41
+ const formatedItems = formatPeekPerformancesItem(items);
42
42
  const rawData = JSON.stringify({
43
43
  products: formatedItems,
44
44
  hoteId
@@ -56,7 +56,7 @@ export const MseM = ({
56
56
  }
57
57
  case "checkout":
58
58
  {
59
- const formatedItems = formatPeekPerformancesItem(items, ["kind", "quantity", "price"]);
59
+ const formatedItems = formatPeekPerformancesItem(items);
60
60
  const rawData = JSON.stringify({
61
61
  products: formatedItems,
62
62
  hoteId
@@ -69,7 +69,7 @@ export const MseM = ({
69
69
  }
70
70
  case "add_payment_info":
71
71
  {
72
- const formatedItems = formatPeekPerformancesItem(items, ["kind", "quantity", "price"]);
72
+ const formatedItems = formatPeekPerformancesItem(items);
73
73
  const rawData = JSON.stringify({
74
74
  products: formatedItems,
75
75
  hoteId,
@@ -85,7 +85,7 @@ export const MseM = ({
85
85
  case "purchase":
86
86
  {
87
87
  const isFailure = execcode !== "0000";
88
- const formatedItems = formatPeekPerformancesItem(items, ["kind", "quantity", "price"]);
88
+ const formatedItems = formatPeekPerformancesItem(items);
89
89
  const attempts = getPurchaseAttempts()[cartId] || 0;
90
90
  const rawData = JSON.stringify({
91
91
  products: formatedItems,
@@ -128,31 +128,17 @@ function setPurchaseAttempts(cartId, attempts) {
128
128
  [cartId]: attempts
129
129
  }));
130
130
  }
131
- function formatPeekPerformancesItem(items, propertiesToRetrieve) {
131
+ function formatPeekPerformancesItem(items) {
132
132
  if (!items || !items.length) return;
133
133
  return items.map(({
134
134
  gtmData
135
135
  }) => {
136
- let properties = {};
137
- if (propertiesToRetrieve.includes("kind")) {
138
- properties = {
139
- ...properties,
140
- kind: gtmData.item_category
141
- };
142
- }
143
- if (propertiesToRetrieve.includes("quantity")) {
144
- properties = {
145
- ...properties,
146
- quantity: gtmData.quantity
147
- };
148
- }
149
- if (propertiesToRetrieve.includes("price")) {
150
- properties = {
151
- ...properties,
152
- price: gtmData.price
153
- };
154
- }
155
- return properties;
136
+ return {
137
+ category: gtmData.item_category,
138
+ subCategory: gtmData.item_category2,
139
+ merchant: gtmData.item_brand,
140
+ price: gtmData.price
141
+ };
156
142
  });
157
143
  }
158
144
  function getBusinessProvider() {
@@ -60,16 +60,9 @@ export default function Instructor({
60
60
  children: [_jsxs(Tag, {
61
61
  className: css.card,
62
62
  ...props,
63
- children: [_jsxs("div", {
63
+ children: [_jsx("div", {
64
64
  className: css.imageContainer,
65
- children: [picture && _jsx(Image, {
66
- loading: "lazy",
67
- src: picture,
68
- className: css.imageBackground,
69
- alt: `${prenom} ${nom}`,
70
- width: "170",
71
- height: "220"
72
- }), picture ? _jsxs(_Fragment, {
65
+ children: picture ? _jsxs(_Fragment, {
73
66
  children: [loading && _jsx(Icons.Loader2, {
74
67
  className: css.imageLoader
75
68
  }), _jsx(Image, {
@@ -87,7 +80,7 @@ export default function Instructor({
87
80
  children: _jsx(Icons.User, {
88
81
  className: css.imagePlaceholderIcon
89
82
  })
90
- })]
83
+ })
91
84
  }), _jsx("div", {
92
85
  className: css.information,
93
86
  children: _jsxs("div", {
@@ -8,7 +8,7 @@
8
8
 
9
9
  .imageContainer {
10
10
  position: relative;
11
- height: 160px;
11
+ height: 150px;
12
12
  display: flex;
13
13
  align-items: center;
14
14
  justify-content: center;
@@ -17,24 +17,11 @@
17
17
  overflow: hidden;
18
18
  }
19
19
 
20
- .imageBackground {
21
- position: absolute;
22
- top: 0;
23
- left: 0;
20
+ .image {
21
+ position: relative;
24
22
  width: 100%;
25
23
  height: 100%;
26
24
  object-fit: cover;
27
- opacity: 0.7;
28
- transform: scale(1.2);
29
- filter: blur(3px);
30
- }
31
-
32
- .image {
33
- position: relative;
34
- width: 90%;
35
- max-width: 100%;
36
- min-width: 110px;
37
- height: auto;
38
25
  }
39
26
 
40
27
  .imageLoader {
@@ -59,16 +59,9 @@ export default function Sheet({
59
59
  children: [_jsx(Icons.ChevronLeft, {}), message(lang, "go-back")]
60
60
  }), _jsxs("div", {
61
61
  className: css.header,
62
- children: [_jsxs("div", {
62
+ children: [_jsx("div", {
63
63
  className: css.imageContainer,
64
- children: [picture && _jsx(Image, {
65
- loading: "lazy",
66
- src: picture,
67
- className: css.imageBackground,
68
- alt: `${prenom} ${nom}`,
69
- width: "170",
70
- height: "220"
71
- }), picture ? _jsxs(_Fragment, {
64
+ children: picture ? _jsxs(_Fragment, {
72
65
  children: [loading && _jsx(Icons.Loader2, {
73
66
  className: css.imageLoader
74
67
  }), _jsx(Image, {
@@ -86,7 +79,7 @@ export default function Sheet({
86
79
  children: _jsx(Icons.User, {
87
80
  className: css.imagePlaceholderIcon
88
81
  })
89
- })]
82
+ })
90
83
  }), _jsxs("div", {
91
84
  className: css.information,
92
85
  children: [_jsxs("div", {
@@ -39,7 +39,7 @@
39
39
  .imageContainer {
40
40
  position: relative;
41
41
  width: 130px;
42
- height: 200px;
42
+ height: 180px;
43
43
  display: flex;
44
44
  align-items: center;
45
45
  justify-content: center;
@@ -47,24 +47,11 @@
47
47
  overflow: hidden;
48
48
  }
49
49
 
50
- .imageBackground {
51
- position: absolute;
52
- top: 0;
53
- left: 0;
50
+ .image {
51
+ position: relative;
54
52
  width: 100%;
55
53
  height: 100%;
56
54
  object-fit: cover;
57
- opacity: 0.7;
58
- transform: scale(1.2);
59
- filter: blur(3px);
60
- }
61
-
62
- .image {
63
- position: relative;
64
- max-width: 100%;
65
- min-width: 100px;
66
- height: auto;
67
- max-height: 100%;
68
55
  }
69
56
 
70
57
  .imageLoader {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.19.9",
3
+ "version": "1.19.11",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.1.5",
6
6
  "leaflet": "^1.9.1",