ublo-lib 1.46.5 → 1.46.7

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":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/data.js"],"names":[],"mappings":";;;;;;;;;;;AAaA,+BAA6D;AAE7D,gCAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2H/D,+BAAgC;AAEzB,kEAyCN"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/data.js"],"names":[],"mappings":";;;;;;;;;;;AAaA,+BAA6D;AAE7D,gCAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2H/D,6BAA8B,CAAC,CAAC;AAEzB,kEAyCN"}
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-calendar/data.js"],"names":[],"mappings":"AA2FA,iEAmCC;AA5HD,+BAAkD;AAElD,gCAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFpD,+BAAgC"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-calendar/data.js"],"names":[],"mappings":"AA2FA,iEAmCC;AA5HD,+BAAkD;AAElD,gCAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFpD,6BAA8B,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"keyboard-keys.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/search-bar/utils/keyboard-keys.js"],"names":[],"mappings":"AAAA,mBAAoB;AACpB,yBAA0B;AAC1B,2BAA4B;AAC5B,uBAAwB;AACxB,wBAAyB"}
1
+ {"version":3,"file":"keyboard-keys.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/search-bar/utils/keyboard-keys.js"],"names":[],"mappings":"AAAA,gBAAiB,EAAE,CAAC;AACpB,sBAAuB,EAAE,CAAC;AAC1B,wBAAyB,EAAE,CAAC;AAC5B,oBAAqB,EAAE,CAAC;AACxB,qBAAsB,EAAE,CAAC"}
@@ -16,6 +16,6 @@ type Props = {
16
16
  options?: SearchOptions;
17
17
  resultsOptions?: ResultsOptions;
18
18
  };
19
- export default function InstantSearch({ lang, suggestions, className, ubloContext, options, }: Props): import("react/jsx-runtime").JSX.Element;
19
+ export default function InstantSearch({ lang, suggestions, className, ubloContext, options, resultsOptions, }: Props): import("react/jsx-runtime").JSX.Element;
20
20
  export {};
21
21
  //# sourceMappingURL=instant-search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instant-search.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/instant-search.tsx"],"names":[],"mappings":"AASA,OAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAK9D,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;QAC1C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,WAAW,CAAC,EAAE;QACZ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;KACf,CAAC;IACF,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,WAAW,EACX,SAAS,EACT,WAAW,EACX,OAAY,GACb,EAAE,KAAK,2CA+HP"}
1
+ {"version":3,"file":"instant-search.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/instant-search/instant-search.tsx"],"names":[],"mappings":"AASA,OAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACpD,OAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAK9D,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;QAC1C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,WAAW,CAAC,EAAE;QACZ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;QACd,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;KACf,CAAC;IACF,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,WAAW,EACX,SAAS,EACT,WAAW,EACX,OAAY,EACZ,cAAc,GACf,EAAE,KAAK,2CAgIP"}
@@ -11,7 +11,7 @@ import Results from "./results";
11
11
  import useSearch from "./hooks/use-search";
12
12
  import * as Plausible from "../../../common/components/plausible";
13
13
  import css from "./instant-search.module.css";
14
- export default function InstantSearch({ lang, suggestions, className, ubloContext, options = {}, }) {
14
+ export default function InstantSearch({ lang, suggestions, className, ubloContext, options = {}, resultsOptions, }) {
15
15
  const [opened, setOpened] = React.useState(false);
16
16
  const [periodPickerOpened, setPeriodPickerOpened] = React.useState(false);
17
17
  const [weekNumber, setWeekNumber] = React.useState(null);
@@ -83,5 +83,5 @@ export default function InstantSearch({ lang, suggestions, className, ubloContex
83
83
  window.removeEventListener("keydown", handleKeyPresses);
84
84
  };
85
85
  }, [handleKeyPresses]);
86
- return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "transparent", className: classes, onClick: openSearch, children: _jsx(SearchIcon, { className: css.searchIcon }) }), _jsxs(Dialog, { className: css.dialog, isOpened: opened, showCloseButton: false, close: () => closeSearch(), container: "body", children: [_jsx(Input, { lang: lang, text: text, setText: setText, closeSearch: closeSearch, loading: search.loading === true, suggestions: suggestions }), _jsx(Results, { lang: lang, text: text, results: search.result, weekNumber: weekNumber, openPeriodPicker: openPeriodPicker, loading: search.loading === true && search.result === undefined, sendPlausibleGoal: sendPlausibleGoal })] }), _jsx(Dialog, { isOpened: periodPickerOpened, close: closePeriodPicker, container: "body", children: _jsx(PeriodPicker, { onChange: updateWeek, ubloContext: ubloContext }) })] }));
86
+ return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "transparent", className: classes, onClick: openSearch, children: _jsx(SearchIcon, { className: css.searchIcon }) }), _jsxs(Dialog, { className: css.dialog, isOpened: opened, showCloseButton: false, close: () => closeSearch(), container: "body", children: [_jsx(Input, { lang: lang, text: text, setText: setText, closeSearch: closeSearch, loading: search.loading === true, suggestions: suggestions }), _jsx(Results, { lang: lang, text: text, results: search.result, weekNumber: weekNumber, openPeriodPicker: openPeriodPicker, loading: search.loading === true && search.result === undefined, sendPlausibleGoal: sendPlausibleGoal, resultsOptions: resultsOptions })] }), _jsx(Dialog, { isOpened: periodPickerOpened, close: closePeriodPicker, container: "body", children: _jsx(PeriodPicker, { onChange: updateWeek, ubloContext: ubloContext }) })] }));
87
87
  }
@@ -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,MAA6E,EACtF,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,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.5",
3
+ "version": "1.46.7",
4
4
  "peerDependencies": {
5
5
  "classnames": "^2.5.1",
6
6
  "dt-design-system": "^3.12.0",