ublo-lib 1.46.6 → 1.46.8

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 +1 @@
1
- {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/products.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAWrC,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACjD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAmB,GACpB,EAAE,KAAK,2CA8IP"}
1
+ {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/products.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAWrC,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACjD,mBAAmB,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAmB,GACpB,EAAE,KAAK,2CA+IP"}
@@ -37,7 +37,7 @@ export default function Products({ lang, products, weekNumber, loading, sendPlau
37
37
  const productCategory = Utils.getValueFromHit(product, categoryField);
38
38
  const productPageTitle = Utils.getValueFromHit(product, titleField);
39
39
  const productTitle = Utils.getValueFromHit(product, subTitleField);
40
- const productText = Utils.getValueFromHit(product, textField);
40
+ const productText = textField !== false ? product.document[textField] : undefined;
41
41
  const showPrice = price !== undefined && weekNumber !== null;
42
42
  const imagePlaceholderStategy = imagePlaceholder ? "blur" : "empty";
43
43
  const showImage = Boolean(image);
@@ -75,7 +75,7 @@ function Placeholder({ doc }) {
75
75
  return (_jsxs("div", { className: css.placeholder, children: [_jsx(Image, { className: css.productImage, src: pagePlaceholder, width: 220, height: 180, alt: "placeholder" }), _jsx(Icon, { className: css.icon })] }));
76
76
  }
77
77
  const parseActivity = (text) => {
78
- const hasCompet = text.match(/(comp[eé]tition|chrono|fl[eè]che|chamois|)/i);
78
+ const hasCompet = text.match(/(comp[eé]tition|chrono|fl[eè]che|chamois)/i);
79
79
  if (hasCompet)
80
80
  return "competition";
81
81
  const hasSki = text.match(/ski/i);
@@ -64,6 +64,43 @@
64
64
  opacity: 0.15;
65
65
  }
66
66
 
67
+ .placeholder {
68
+ position: relative;
69
+ color: var(--ds-grey-000, #fff);
70
+ }
71
+
72
+ .placeholder,
73
+ .productImage {
74
+ width: 100%;
75
+ height: 180px;
76
+ object-fit: cover;
77
+ border-radius: var(--ds-radius-100, 6px) var(--ds-radius-100, 6px) 0 0;
78
+ }
79
+
80
+ .placeholder::after {
81
+ content: "";
82
+ position: absolute;
83
+ top: 0;
84
+ left: 0;
85
+ height: 100%;
86
+ width: 100%;
87
+ background-color: var(--ds-primary, var(--ds-blue-500, #002dcc));
88
+ opacity: 0.7;
89
+ pointer-events: none;
90
+ touch-action: none;
91
+ z-index: 1;
92
+ }
93
+
94
+ .icon {
95
+ position: absolute;
96
+ top: 50%;
97
+ left: 50%;
98
+ transform: translate(-50%, -50%);
99
+ width: 33px;
100
+ height: 33px;
101
+ fill: currentColor;
102
+ z-index: 2;
103
+ }
67
104
  .productImage {
68
105
  width: 100%;
69
106
  height: 180px;
@@ -97,6 +134,12 @@
97
134
  }
98
135
 
99
136
  .productText {
137
+ display: -webkit-box;
138
+ -webkit-box-orient: vertical;
139
+ -webkit-line-clamp: 3;
140
+ line-clamp: 3;
141
+ text-overflow: ellipsis;
142
+ overflow: hidden;
100
143
  font-size: 11px;
101
144
  }
102
145
 
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/esf/components/instant-search/services/api.ts"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,UAAU,GAAE,MAAU,EACtB,OAAO,GAAE,MAAgE,EACzE,cAAc,CAAC,EAAE,MAAM,EACvB,QAAQ,CAAC,EAAE,OAAO,gBAmBnB"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/esf/components/instant-search/services/api.ts"],"names":[],"mappings":"AAKA,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,UAAU,GAAE,MAAU,EACtB,OAAO,GAAE,MAAsF,EAC/F,cAAc,CAAC,EAAE,MAAM,EACvB,QAAQ,CAAC,EAAE,OAAO,gBAmBnB"}
@@ -1,6 +1,6 @@
1
1
  import * as Fetcher from "../../../../common/utils/fetcher";
2
2
  const api = "https://search.ublo.app/api";
3
- export function fetchResults(site, lang, query, groupLimit = 8, queryBy = "title,text,pageTitle,seoKeywords,parentTitle,seoTitle", queryByWeights, semantic) {
3
+ export function fetchResults(site, lang, query, groupLimit = 8, queryBy = "title,subtitle,text,pageTitle,seoKeywords,parentTitle,seoTitle,meetingPoint", queryByWeights, semantic) {
4
4
  const endpoint = `${api}/ublo-search/search/esf${semantic ? "/semantic" : ""}`;
5
5
  return Fetcher.post(endpoint, {
6
6
  q: query,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.46.6",
3
+ "version": "1.46.8",
4
4
  "peerDependencies": {
5
5
  "classnames": "^2.5.1",
6
6
  "dt-design-system": "^3.12.0",