willba-component-library 0.1.48 → 0.1.50

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.
@@ -21,7 +21,7 @@ export declare enum FilterSections {
21
21
  CATEGORIES = "categories"
22
22
  }
23
23
  export type Filters = {
24
- [key: string]: string | number;
24
+ [key: string]: string;
25
25
  };
26
26
  export declare enum ViewApply {
27
27
  ROOMS = "roomFilters"
package/lib/index.d.ts CHANGED
@@ -39,7 +39,7 @@ type AgeCategoryType = {
39
39
  sortOrder: number;
40
40
  };
41
41
  type Filters = {
42
- [key: string]: string | number;
42
+ [key: string]: string;
43
43
  };
44
44
 
45
45
  type FilterBarProps = {
package/lib/index.esm.js CHANGED
@@ -3970,7 +3970,7 @@ var useFilterBar = function (_a) {
3970
3970
  ? format(calendarRange.from, 'yyyy-MM-dd')
3971
3971
  : '',
3972
3972
  endDate: (calendarRange === null || calendarRange === void 0 ? void 0 : calendarRange.to) ? format(calendarRange.to, 'yyyy-MM-dd') : '',
3973
- categories: categories,
3973
+ categories: categories.toString(),
3974
3974
  ageCategoryCounts: handleAgeCategoryRules({
3975
3975
  ageCategoryCounts: ageCategoryCounts,
3976
3976
  ageCategories: ageCategories,
@@ -4013,12 +4013,12 @@ var useFilterBar = function (_a) {
4013
4013
  var baseUrl = window.location.origin + window.location.pathname;
4014
4014
  var updatedUrl = "".concat(baseUrl, "?").concat(updatedParams.toString());
4015
4015
  handleSelectedFilter(false);
4016
- if (onSubmit) {
4016
+ if (onSubmit && selectedPath === '/rooms') {
4017
4017
  var updatedParamsObject_1 = {};
4018
4018
  updatedParams.forEach(function (value, key) {
4019
- updatedParamsObject_1[key] = value;
4019
+ if (value)
4020
+ updatedParamsObject_1[key] = value;
4020
4021
  });
4021
- console.log('sdasdasdsad', updatedParamsObject_1);
4022
4022
  return onSubmit(updatedParamsObject_1);
4023
4023
  }
4024
4024
  return (window.location.href = updatedUrl);
@@ -4041,7 +4041,7 @@ var useFilterBar = function (_a) {
4041
4041
  finally { if (e_3) throw e_3.error; }
4042
4042
  }
4043
4043
  handleSelectedFilter(false);
4044
- return onSubmit
4044
+ return onSubmit && selectedPath === '/rooms'
4045
4045
  ? onSubmit(newParams)
4046
4046
  : (window.location.href = "".concat(redirectUrl, "/").concat(selectedPath).concat(querySearchParams ? "?".concat(querySearchParams.toString()) : ''));
4047
4047
  }