ublo-lib 1.36.12 → 1.36.14
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.
- package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts.map +1 -1
- package/es/common/components/scrolling-carousel/scrolling-carousel.js +7 -1
- package/es/esf/components/loyal-customers/content.d.ts +1 -1
- package/es/esf/components/loyal-customers/content.js +2 -2
- package/es/esf/components/loyal-customers/loyal-customers.d.ts.map +1 -1
- package/es/esf/components/loyal-customers/loyal-customers.js +5 -5
- package/es/lbm/components/instant-search/links.d.ts.map +1 -1
- package/es/lbm/components/instant-search/links.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrolling-carousel.d.ts","sourceRoot":"","sources":["../../../../src/common/components/scrolling-carousel/scrolling-carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAKF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"scrolling-carousel.d.ts","sourceRoot":"","sources":["../../../../src/common/components/scrolling-carousel/scrolling-carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAKF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAwHvE"}
|
|
@@ -60,14 +60,20 @@ export default function ScrollingCarousel({ className, children }) {
|
|
|
60
60
|
}, []);
|
|
61
61
|
React.useEffect(() => {
|
|
62
62
|
const zone = zoneRef.current;
|
|
63
|
+
let observer = null;
|
|
63
64
|
if (!cmsMode && zone) {
|
|
64
|
-
|
|
65
|
+
observer = new MutationObserver(resetScroll);
|
|
65
66
|
observer.observe(zone, {
|
|
66
67
|
attributes: true,
|
|
67
68
|
childList: true,
|
|
68
69
|
subtree: true,
|
|
69
70
|
});
|
|
70
71
|
}
|
|
72
|
+
return () => {
|
|
73
|
+
if (observer) {
|
|
74
|
+
observer.disconnect();
|
|
75
|
+
}
|
|
76
|
+
};
|
|
71
77
|
}, [cmsMode]);
|
|
72
78
|
React.useEffect(() => {
|
|
73
79
|
refreshControls();
|
|
@@ -4,7 +4,7 @@ export function getElements(product: any, selectors: any): {
|
|
|
4
4
|
details: any;
|
|
5
5
|
options: any;
|
|
6
6
|
button: any;
|
|
7
|
-
|
|
7
|
+
wrapper: any;
|
|
8
8
|
};
|
|
9
9
|
export function getData(product: any, selectors: any, levels: any, handleVariants: any, convertTableToSelect: any): {
|
|
10
10
|
title: string;
|
|
@@ -5,8 +5,8 @@ export const getElements = (product, selectors) => {
|
|
|
5
5
|
const details = product.querySelector(selectors.details);
|
|
6
6
|
const options = product.querySelector(selectors.options);
|
|
7
7
|
const button = product.querySelector(selectors.button);
|
|
8
|
-
const
|
|
9
|
-
return { title, price, details, options, button,
|
|
8
|
+
const wrapper = product.querySelector(`.${css.fieldWrapper}`);
|
|
9
|
+
return { title, price, details, options, button, wrapper };
|
|
10
10
|
};
|
|
11
11
|
export const getData = (product, selectors, levels, handleVariants, convertTableToSelect) => {
|
|
12
12
|
const { title, price, details, options } = getElements(product, selectors);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loyal-customers.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/loyal-customers/loyal-customers.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"loyal-customers.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/loyal-customers/loyal-customers.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;4CAuIC"}
|
|
@@ -29,8 +29,8 @@ export default function LoyalCustomers({ lang, cmsMode, selectors, levels, class
|
|
|
29
29
|
setStudentData(productData);
|
|
30
30
|
}, [convertTableToSelect, handleVariants, levels, selectors]);
|
|
31
31
|
const init = React.useCallback((product) => {
|
|
32
|
-
const { options, button } = Content.getElements(product, selectors);
|
|
33
|
-
if (!options || !button)
|
|
32
|
+
const { options, button, wrapper } = Content.getElements(product, selectors);
|
|
33
|
+
if (!options || !button || wrapper)
|
|
34
34
|
return;
|
|
35
35
|
if (convertTableToSelect)
|
|
36
36
|
Content.createSelect(options);
|
|
@@ -38,18 +38,18 @@ export default function LoyalCustomers({ lang, cmsMode, selectors, levels, class
|
|
|
38
38
|
button.addEventListener("click", button.callback);
|
|
39
39
|
}, [openStudentForm, selectors, convertTableToSelect]);
|
|
40
40
|
const cleanup = React.useCallback((product) => {
|
|
41
|
-
const { options, button,
|
|
41
|
+
const { options, button, wrapper } = Content.getElements(product, selectors);
|
|
42
42
|
if (!options || !button)
|
|
43
43
|
return;
|
|
44
44
|
if (convertTableToSelect) {
|
|
45
|
-
|
|
45
|
+
wrapper?.remove();
|
|
46
46
|
options.style.removeProperty("display");
|
|
47
47
|
}
|
|
48
48
|
button.removeEventListener("click", button.callback);
|
|
49
49
|
}, [selectors, convertTableToSelect]);
|
|
50
50
|
React.useEffect(() => {
|
|
51
51
|
const products = Array.from(document.querySelectorAll(selectors.block));
|
|
52
|
-
if (
|
|
52
|
+
if (cmsMode !== "editing" && products.length) {
|
|
53
53
|
products.forEach(init);
|
|
54
54
|
return () => products.forEach(cleanup);
|
|
55
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/links.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACzD,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,IAAI,EACJ,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,OAAO,EACP,iBAAiB,GAClB,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"links.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/instant-search/links.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAOrC,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACzD,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IAEjB,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAC5B,IAAI,EACJ,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,OAAO,EACP,iBAAiB,GAClB,EAAE,KAAK,2CAgFP"}
|
|
@@ -28,6 +28,6 @@ export default function Links({ icon, linksTitle, links, pageTitleAsTitle, loadi
|
|
|
28
28
|
const linkTitle = Utils.getHighlight(titleProperty, link.highlight) ||
|
|
29
29
|
link.document[titleProperty].trim();
|
|
30
30
|
const linkText = Utils.getHighlight("text", link.highlight, true) || text?.trim();
|
|
31
|
-
return (_jsxs(Link, { href: docSite === site ? decodedPath : portalUrl + decodedPath, target: docSite === site ? undefined : "_blank", className: css.link, onClick: sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx(Icon, { className: css.linkIcon }), _jsxs("div", { className: css.linkContent, children: [parentTitle && (_jsx("div", { className: css.linkParent, dangerouslySetInnerHTML: { __html: parentTitle } })), _jsxs("div", { className: css.linkTitleContainer, children: [_jsx("div", { className: css.linkTitle, dangerouslySetInnerHTML: { __html: linkTitle } }), site !== docSite && _jsx(Icons.ExternalLink, {})] }), linkText && (_jsx("div", { className: css.linkText, dangerouslySetInnerHTML: { __html: linkText } }))] })] }, id));
|
|
31
|
+
return (_jsxs(Link, { href: docSite === site ? decodedPath : portalUrl + decodedPath, target: docSite === site ? undefined : "_blank", className: css.link, onClick: sendPlausibleGoal(decodedPath), onMouseDown: createRipple, children: [_jsx(Icon, { className: css.linkIcon }), _jsxs("div", { className: css.linkContent, children: [parentTitle && (_jsx("div", { className: css.linkParent, dangerouslySetInnerHTML: { __html: parentTitle } })), _jsxs("div", { className: css.linkTitleContainer, children: [_jsx("div", { className: css.linkTitle, dangerouslySetInnerHTML: { __html: linkTitle } }), site !== docSite && (_jsx(Icons.ExternalLink, { className: css.linkIcon }))] }), linkText && (_jsx("div", { className: css.linkText, dangerouslySetInnerHTML: { __html: linkText } }))] })] }, id));
|
|
32
32
|
})] })] }));
|
|
33
33
|
}
|