@idkwebsites/components 0.1.18 → 0.1.19
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/dist/index.cjs +18 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +26 -10
- package/dist/styles.css.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1793,9 +1793,10 @@ function BookingWidgetPanel({
|
|
|
1793
1793
|
}
|
|
1794
1794
|
}
|
|
1795
1795
|
}, [bw.isAvailabilityLoading, bw.selectedService?.id, bw.availabilityByDate, bw.selectedDate]);
|
|
1796
|
+
const hasCategories = bw.categories.length >= 1;
|
|
1796
1797
|
const hasMultipleCategories = bw.categories.length > 1;
|
|
1797
1798
|
useEffect2(() => {
|
|
1798
|
-
if (
|
|
1799
|
+
if (hasCategories && bw.categoryFilter === "all") {
|
|
1799
1800
|
bw.setCategoryFilter(bw.categories[0]);
|
|
1800
1801
|
}
|
|
1801
1802
|
}, [bw.categories.length]);
|
|
@@ -1811,7 +1812,7 @@ function BookingWidgetPanel({
|
|
|
1811
1812
|
const scrollbars = [];
|
|
1812
1813
|
const opts = {
|
|
1813
1814
|
damping: 0.08,
|
|
1814
|
-
continuousScrolling:
|
|
1815
|
+
continuousScrolling: true,
|
|
1815
1816
|
alwaysShowTracks: false,
|
|
1816
1817
|
plugins: {
|
|
1817
1818
|
overscroll: { effect: "bounce", damping: 0.15, maxOverscroll: 80 }
|
|
@@ -1835,6 +1836,20 @@ function BookingWidgetPanel({
|
|
|
1835
1836
|
};
|
|
1836
1837
|
}, [isReady, mobileStep]);
|
|
1837
1838
|
const initSvcScrollbar = (el) => {
|
|
1839
|
+
if (!el || typeof window !== "undefined" && window.matchMedia("(max-width: 1024px)").matches) {
|
|
1840
|
+
if (svcScrollbarRef.current) {
|
|
1841
|
+
try {
|
|
1842
|
+
svcScrollbarRef.current.destroy();
|
|
1843
|
+
} catch {
|
|
1844
|
+
}
|
|
1845
|
+
svcScrollbarRef.current = null;
|
|
1846
|
+
}
|
|
1847
|
+
return;
|
|
1848
|
+
}
|
|
1849
|
+
if (svcScrollbarRef.current && svcScrollbarRef.current.containerEl === el) {
|
|
1850
|
+
svcScrollbarRef.current.update();
|
|
1851
|
+
return;
|
|
1852
|
+
}
|
|
1838
1853
|
if (svcScrollbarRef.current) {
|
|
1839
1854
|
try {
|
|
1840
1855
|
svcScrollbarRef.current.destroy();
|
|
@@ -1842,10 +1857,9 @@ function BookingWidgetPanel({
|
|
|
1842
1857
|
}
|
|
1843
1858
|
svcScrollbarRef.current = null;
|
|
1844
1859
|
}
|
|
1845
|
-
if (!el || typeof window !== "undefined" && window.matchMedia("(max-width: 1024px)").matches) return;
|
|
1846
1860
|
svcScrollbarRef.current = Scrollbar.init(el, {
|
|
1847
1861
|
damping: 0.08,
|
|
1848
|
-
continuousScrolling:
|
|
1862
|
+
continuousScrolling: true,
|
|
1849
1863
|
alwaysShowTracks: false,
|
|
1850
1864
|
plugins: {
|
|
1851
1865
|
overscroll: { effect: "bounce", damping: 0.15, maxOverscroll: 80 }
|