willba-component-library 0.2.98 → 0.2.99

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/lib/index.umd.js CHANGED
@@ -11677,7 +11677,7 @@
11677
11677
  })(Pages || (Pages = {}));
11678
11678
 
11679
11679
  var useFilterBar = function (_a) {
11680
- var redirectUrl = _a.redirectUrl, ageCategories = _a.ageCategories, onSubmit = _a.onSubmit, tabs = _a.tabs, siteId = _a.siteId;
11680
+ var redirectUrl = _a.redirectUrl, ageCategories = _a.ageCategories, onSubmit = _a.onSubmit, tabs = _a.tabs, siteIds = _a.siteIds;
11681
11681
  var _b = __read(React__default.useState(Pages.EVENTS), 2), selectedPath = _b[0], setSelectedPath = _b[1];
11682
11682
  var _c = __read(React__default.useState(false), 2), selectedFilter = _c[0], setSelectedFilter = _c[1];
11683
11683
  var _d = __read(React__default.useState(), 2), calendarRange = _d[0], setCalendarRange = _d[1];
@@ -11769,14 +11769,16 @@
11769
11769
  onSubmit(newParams);
11770
11770
  }
11771
11771
  else {
11772
- var siteIdParam = siteId ? "siteId=".concat(siteId) : '';
11773
- var querySearchParam = querySearchParams
11774
- ? querySearchParams.toString()
11775
- : '';
11776
- var params = [siteIdParam, querySearchParam].filter(Boolean).join('&');
11772
+ var params_1 = new URLSearchParams(querySearchParams !== null && querySearchParams !== void 0 ? querySearchParams : undefined);
11773
+ if (siteIds) {
11774
+ siteIds.forEach(function (id) {
11775
+ params_1.append('siteId', id);
11776
+ });
11777
+ }
11778
+ var paramString = params_1.toString();
11777
11779
  var path = "".concat(redirectUrl).concat(selectedPath);
11778
11780
  setInnerLoading(true);
11779
- window.location.href = params ? "".concat(path, "?").concat(params) : path;
11781
+ window.location.href = paramString ? "".concat(path, "?").concat(paramString) : path;
11780
11782
  }
11781
11783
  };
11782
11784
  var handleResetFilters = function () {
@@ -11941,7 +11943,7 @@
11941
11943
  styleInject(css_248z$1);
11942
11944
 
11943
11945
  function FilterBar(_a) {
11944
- var language = _a.language, _b = _a.ageCategories, ageCategories = _b === void 0 ? AGE_CATEGORIES_FALLBACK : _b, _c = _a.redirectUrl, redirectUrl = _c === void 0 ? REDIRECT_URL_FALLBACK : _c, palette = _a.palette, onSubmit = _a.onSubmit, fullWidth = _a.fullWidth, disableCalendarDates = _a.disableCalendarDates, mode = _a.mode, tabs = _a.tabs, outerLoading = _a.outerLoading, siteId = _a.siteId;
11946
+ var language = _a.language, _b = _a.ageCategories, ageCategories = _b === void 0 ? AGE_CATEGORIES_FALLBACK : _b, _c = _a.redirectUrl, redirectUrl = _c === void 0 ? REDIRECT_URL_FALLBACK : _c, palette = _a.palette, onSubmit = _a.onSubmit, fullWidth = _a.fullWidth, disableCalendarDates = _a.disableCalendarDates, mode = _a.mode, tabs = _a.tabs, outerLoading = _a.outerLoading, siteIds = _a.siteIds;
11945
11947
  var themePalette = useTheme({ palette: palette });
11946
11948
  // Translations
11947
11949
  useUpdateTranslations({ language: language });
@@ -11952,7 +11954,7 @@
11952
11954
  ageCategories: ageCategories,
11953
11955
  onSubmit: onSubmit,
11954
11956
  tabs: tabs,
11955
- siteId: siteId,
11957
+ siteIds: siteIds,
11956
11958
  }), selectedFilter = _d.selectedFilter, ageCategoryCounts = _d.ageCategoryCounts, categories = _d.categories, calendarRange = _d.calendarRange, selectedPath = _d.selectedPath, innerLoading = _d.innerLoading, setCalendarRange = _d.setCalendarRange, setCategories = _d.setCategories, handleSelectedFilter = _d.handleSelectedFilter, handleSubmit = _d.handleSubmit, updateGuestsCount = _d.updateGuestsCount, setSelectedPath = _d.setSelectedPath, handleResetFilters = _d.handleResetFilters;
11957
11959
  // Scroll in to view
11958
11960
  var _e = useScrollInToView({ selectedFilter: selectedFilter }), isMobile = _e.isMobile, targetFilterBarRef = _e.targetFilterBarRef;