ublo-lib 1.7.4 → 1.7.6
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":"admin-links.d.ts","sourceRoot":"","sources":["../../../../src/common/components/admin-links/admin-links.tsx"],"names":[],"mappings":";AAMA,aAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CACpC,CAAC;AAeF,QAAA,MAAM,UAAU,oBAAqB,KAAK,
|
|
1
|
+
{"version":3,"file":"admin-links.d.ts","sourceRoot":"","sources":["../../../../src/common/components/admin-links/admin-links.tsx"],"names":[],"mappings":";AAMA,aAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CACpC,CAAC;AAeF,QAAA,MAAM,UAAU,oBAAqB,KAAK,gBA2EzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -226,8 +226,14 @@ const Carousel = ({
|
|
|
226
226
|
React.useEffect(() => {
|
|
227
227
|
const zone = carouselRef.current?.querySelector(".cms");
|
|
228
228
|
if (zone) {
|
|
229
|
-
zone.addEventListener("
|
|
230
|
-
|
|
229
|
+
zone.addEventListener("ublo-section-created", updateSectionCount);
|
|
230
|
+
zone.addEventListener("ublo-section-pasted", updateSectionCount);
|
|
231
|
+
zone.addEventListener("ublo-section-removed", updateSectionCount);
|
|
232
|
+
return () => {
|
|
233
|
+
zone.removeEventListener("ublo-section-removed", updateSectionCount);
|
|
234
|
+
zone.removeEventListener("ublo-section-pasted", updateSectionCount);
|
|
235
|
+
zone.removeEventListener("ublo-section-created", updateSectionCount);
|
|
236
|
+
};
|
|
231
237
|
}
|
|
232
238
|
}, [updateSectionCount]);
|
|
233
239
|
React.useEffect(() => {
|
|
@@ -273,7 +279,7 @@ const Carousel = ({
|
|
|
273
279
|
});
|
|
274
280
|
if (fade) inner.style.removeProperty("transform");
|
|
275
281
|
}
|
|
276
|
-
}, [current, editing, fade, targets]);
|
|
282
|
+
}, [count, current, editing, fade, targets]);
|
|
277
283
|
const onUndraggableElementClick = React.useCallback(e => {
|
|
278
284
|
e.preventDefault();
|
|
279
285
|
e.stopPropagation();
|
|
@@ -95,12 +95,12 @@ const usePackages = (defaultPopupContent, setPopupContent, cartUrl, selector = "
|
|
|
95
95
|
}, [selector, toggleEditButton]);
|
|
96
96
|
const init = React.useCallback(section => {
|
|
97
97
|
const zone = section.closest(".cms");
|
|
98
|
-
zone.addEventListener("
|
|
98
|
+
zone.addEventListener("ublo-section-created", callback);
|
|
99
99
|
section.addEventListener("click", onPackageClick);
|
|
100
100
|
}, [callback, onPackageClick]);
|
|
101
101
|
const cleanup = React.useCallback(section => {
|
|
102
102
|
const zone = section.closest(".cms");
|
|
103
|
-
zone.removeEventListener("
|
|
103
|
+
zone.removeEventListener("ublo-section-created", callback);
|
|
104
104
|
section.removeEventListener("click", onPackageClick);
|
|
105
105
|
}, [callback, onPackageClick]);
|
|
106
106
|
React.useEffect(() => {
|
|
@@ -40,13 +40,13 @@ const useZoneSync = (zoneRef, twinZoneParentSelector) => {
|
|
|
40
40
|
attributes: true
|
|
41
41
|
});
|
|
42
42
|
} else {
|
|
43
|
-
zone.addEventListener("
|
|
43
|
+
zone.addEventListener("ublo-section-created", init);
|
|
44
44
|
}
|
|
45
45
|
}, [twinZoneParentSelector, zoneRef]);
|
|
46
46
|
const cleanup = useCallback(() => {
|
|
47
47
|
const zone = zoneRef.current;
|
|
48
48
|
if (!zone) return;
|
|
49
|
-
zone.removeEventListener("
|
|
49
|
+
zone.removeEventListener("ublo-section-created", init);
|
|
50
50
|
}, [init, zoneRef]);
|
|
51
51
|
useEffect(() => {
|
|
52
52
|
if (cmsMode) {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ublo-lib",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"dt-design-system": "^2.1.0",
|
|
6
6
|
"next": "^12.0.0",
|
|
7
7
|
"react": "^18.2.0",
|
|
8
8
|
"react-dom": "^18.2.0",
|
|
9
|
-
"ublo": "^2.0.0"
|
|
9
|
+
"ublo": "^2.0.0 || ^3.0.0"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"awesome-debounce-promise": "^2.1.0",
|