ublo-lib 1.46.11 → 1.46.13
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":"information.d.ts","sourceRoot":"","sources":["../../../../src/common/components/information/information.tsx"],"names":[],"mappings":"AAkBA,KAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAiB,EACjB,IAAgB,EAChB,cAAc,EACd,IAAc,EACd,SAAS,EACT,eAAe,GAChB,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"information.d.ts","sourceRoot":"","sources":["../../../../src/common/components/information/information.tsx"],"names":[],"mappings":"AAkBA,KAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,MAAiB,EACjB,IAAgB,EAChB,cAAc,EACd,IAAc,EACd,SAAS,EACT,eAAe,GAChB,EAAE,KAAK,2CAqKP"}
|
|
@@ -107,5 +107,6 @@ export default function Information({ source = "/popup", zone = "content", preve
|
|
|
107
107
|
});
|
|
108
108
|
const buttonClasses = classNames(styles.informationButton, buttonClassName);
|
|
109
109
|
const messages = i18n[lang];
|
|
110
|
-
|
|
110
|
+
const showPopinBell = isPopin && minimized && content;
|
|
111
|
+
return (_jsxs(_Fragment, { children: [showPopinBell && (_jsx(Portal, { asChild: true, children: _jsx(Tooltip, { content: messages.showInformation, children: _jsx(Button, { className: buttonClasses, onClick: unminimize, "data-information-popup-button": "", children: _jsx(BellIcon, {}) }) }) })), _jsxs(Dialog, { className: classes, close: isPopin ? minimize : close, isOpened: isOpened, showAsModal: !isPopin, showCloseButton: !isPopin, disableBackdrop: isPopin, title: messages.showInformation, children: [isPopin && (_jsxs("div", { className: styles.controls, children: [maximized && (_jsx(Tooltip, { content: messages.minimize, children: _jsx(Button, { variant: "secondary", onClick: unmaximize, children: _jsx(ArrowDownIcon, {}) }) })), !maximized && hasOverflow && (_jsx(Tooltip, { content: messages.maximize, children: _jsx(Button, { variant: "secondary", onClick: maximize, children: _jsx(ArrowUpIcon, {}) }) })), _jsx(Tooltip, { content: messages.close, children: _jsx(Button, { onClick: minimize, children: _jsx(CrossIcon, {}) }) })] })), _jsx("div", { ref: ref, className: styles.inner, dangerouslySetInnerHTML: { __html: content }, "data-information-popup": "" })] })] }));
|
|
111
112
|
}
|
|
@@ -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;AAarC,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,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C;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;IAChC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtD,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,EACnB,YAAY,EAAE,YAAY,GAC3B,EAAE,KAAK,2CA6JP"}
|
|
@@ -41,14 +41,7 @@ export default function Products({ lang, products, weekNumber, loading, sendPlau
|
|
|
41
41
|
const textImage = product.document["imageAlt"];
|
|
42
42
|
const showPrice = price !== undefined && weekNumber !== null;
|
|
43
43
|
const imagePlaceholderStategy = imagePlaceholder ? "blur" : "empty";
|
|
44
|
-
|
|
45
|
-
const RenderedImage = () => {
|
|
46
|
-
if (textImage && ProductImage) {
|
|
47
|
-
return _jsx(ProductImage, { text: textImage });
|
|
48
|
-
}
|
|
49
|
-
return showImage ? (_jsx(Image, { className: css.productImage, src: image, alt: title, width: 220, height: 180, placeholder: imagePlaceholderStategy, blurDataURL: imagePlaceholder })) : (_jsx(Placeholder, { lang: lang, doc: product.document }));
|
|
50
|
-
};
|
|
51
|
-
return (_jsxs(Link, { className: css.product, href: decodedPath, onClick: () => sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx(RenderedImage, {}), _jsxs("div", { className: css.productContent, children: [productCategory && (_jsx("div", { className: css.productParent, dangerouslySetInnerHTML: { __html: productCategory } })), productPageTitle && (_jsx("div", { className: css.productPageTitle, dangerouslySetInnerHTML: { __html: productPageTitle } })), productTitle && (_jsx("div", { className: css.productTitle, dangerouslySetInnerHTML: { __html: productTitle } })), _jsx("div", { className: css.productTags, children: tagFields.map((tagField) => {
|
|
44
|
+
return (_jsxs(Link, { className: css.product, href: decodedPath, onClick: () => sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx(RenderedImage, { textImage: textImage, ProductImage: ProductImage, image: image, title: title, imagePlaceholder: imagePlaceholder, imagePlaceholderStategy: imagePlaceholderStategy, product: product }), _jsxs("div", { className: css.productContent, children: [productCategory && (_jsx("div", { className: css.productParent, dangerouslySetInnerHTML: { __html: productCategory } })), productPageTitle && (_jsx("div", { className: css.productPageTitle, dangerouslySetInnerHTML: { __html: productPageTitle } })), productTitle && (_jsx("div", { className: css.productTitle, dangerouslySetInnerHTML: { __html: productTitle } })), _jsx("div", { className: css.productTags, children: tagFields.map((tagField) => {
|
|
52
45
|
const tagHtml = Utils.getValueFromHit(product, tagField);
|
|
53
46
|
const Icon = () => {
|
|
54
47
|
if (tagField === "time" ||
|
|
@@ -125,3 +118,10 @@ const parseActivity = (text) => {
|
|
|
125
118
|
return "pioupiou";
|
|
126
119
|
return "unknown";
|
|
127
120
|
};
|
|
121
|
+
function RenderedImage({ textImage, ProductImage, image, title, imagePlaceholder, imagePlaceholderStategy, product, }) {
|
|
122
|
+
if (textImage && ProductImage) {
|
|
123
|
+
return _jsx(ProductImage, { text: textImage });
|
|
124
|
+
}
|
|
125
|
+
const showImage = Boolean(image);
|
|
126
|
+
return showImage ? (_jsx(Image, { className: css.productImage, src: image, alt: title, width: 220, height: 180, placeholder: imagePlaceholderStategy, blurDataURL: imagePlaceholder })) : (_jsx(Placeholder, { lang: product.lang, doc: product.document }));
|
|
127
|
+
}
|