@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.cjs
CHANGED
|
@@ -1828,9 +1828,10 @@ function BookingWidgetPanel({
|
|
|
1828
1828
|
}
|
|
1829
1829
|
}
|
|
1830
1830
|
}, [bw.isAvailabilityLoading, bw.selectedService?.id, bw.availabilityByDate, bw.selectedDate]);
|
|
1831
|
+
const hasCategories = bw.categories.length >= 1;
|
|
1831
1832
|
const hasMultipleCategories = bw.categories.length > 1;
|
|
1832
1833
|
(0, import_react9.useEffect)(() => {
|
|
1833
|
-
if (
|
|
1834
|
+
if (hasCategories && bw.categoryFilter === "all") {
|
|
1834
1835
|
bw.setCategoryFilter(bw.categories[0]);
|
|
1835
1836
|
}
|
|
1836
1837
|
}, [bw.categories.length]);
|
|
@@ -1846,7 +1847,7 @@ function BookingWidgetPanel({
|
|
|
1846
1847
|
const scrollbars = [];
|
|
1847
1848
|
const opts = {
|
|
1848
1849
|
damping: 0.08,
|
|
1849
|
-
continuousScrolling:
|
|
1850
|
+
continuousScrolling: true,
|
|
1850
1851
|
alwaysShowTracks: false,
|
|
1851
1852
|
plugins: {
|
|
1852
1853
|
overscroll: { effect: "bounce", damping: 0.15, maxOverscroll: 80 }
|
|
@@ -1870,6 +1871,20 @@ function BookingWidgetPanel({
|
|
|
1870
1871
|
};
|
|
1871
1872
|
}, [isReady, mobileStep]);
|
|
1872
1873
|
const initSvcScrollbar = (el) => {
|
|
1874
|
+
if (!el || typeof window !== "undefined" && window.matchMedia("(max-width: 1024px)").matches) {
|
|
1875
|
+
if (svcScrollbarRef.current) {
|
|
1876
|
+
try {
|
|
1877
|
+
svcScrollbarRef.current.destroy();
|
|
1878
|
+
} catch {
|
|
1879
|
+
}
|
|
1880
|
+
svcScrollbarRef.current = null;
|
|
1881
|
+
}
|
|
1882
|
+
return;
|
|
1883
|
+
}
|
|
1884
|
+
if (svcScrollbarRef.current && svcScrollbarRef.current.containerEl === el) {
|
|
1885
|
+
svcScrollbarRef.current.update();
|
|
1886
|
+
return;
|
|
1887
|
+
}
|
|
1873
1888
|
if (svcScrollbarRef.current) {
|
|
1874
1889
|
try {
|
|
1875
1890
|
svcScrollbarRef.current.destroy();
|
|
@@ -1877,10 +1892,9 @@ function BookingWidgetPanel({
|
|
|
1877
1892
|
}
|
|
1878
1893
|
svcScrollbarRef.current = null;
|
|
1879
1894
|
}
|
|
1880
|
-
if (!el || typeof window !== "undefined" && window.matchMedia("(max-width: 1024px)").matches) return;
|
|
1881
1895
|
svcScrollbarRef.current = import_smooth_scrollbar.default.init(el, {
|
|
1882
1896
|
damping: 0.08,
|
|
1883
|
-
continuousScrolling:
|
|
1897
|
+
continuousScrolling: true,
|
|
1884
1898
|
alwaysShowTracks: false,
|
|
1885
1899
|
plugins: {
|
|
1886
1900
|
overscroll: { effect: "bounce", damping: 0.15, maxOverscroll: 80 }
|