willba-component-library 0.1.30 → 0.1.31

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
@@ -8005,6 +8005,10 @@
8005
8005
 
8006
8006
  function GuestCount(_a) {
8007
8007
  var label = _a.label, sortOrder = _a.sortOrder, id = _a.id, updateGuestsCount = _a.updateGuestsCount, count = _a.count, minVal = _a.minVal;
8008
+ React__default.useEffect(function () {
8009
+ if (minVal)
8010
+ updateGuestsCount("guests-".concat(id), minVal);
8011
+ }, []);
8008
8012
  var handleDecrement = function () {
8009
8013
  if (count > minVal) {
8010
8014
  updateGuestsCount("guests-".concat(id), count - 1);
@@ -8146,7 +8150,6 @@
8146
8150
  var currentSearchParams = new URLSearchParams(window.location.search);
8147
8151
  var updatedParams = new URLSearchParams();
8148
8152
  try {
8149
- // Copy existing parameters to updatedParams
8150
8153
  for (var _d = __values(currentSearchParams.entries()), _e = _d.next(); !_e.done; _e = _d.next()) {
8151
8154
  var _f = __read(_e.value, 2), key = _f[0], value = _f[1];
8152
8155
  updatedParams.append(key, value);
@@ -8160,15 +8163,12 @@
8160
8163
  finally { if (e_1) throw e_1.error; }
8161
8164
  }
8162
8165
  try {
8163
- // Update parameters based on newParams
8164
8166
  for (var _g = __values(Object.entries(newParams)), _h = _g.next(); !_h.done; _h = _g.next()) {
8165
8167
  var _j = __read(_h.value, 2), key = _j[0], value = _j[1];
8166
8168
  if (value) {
8167
- console.log(value);
8168
8169
  updatedParams.set(key, value.toString());
8169
8170
  }
8170
8171
  else {
8171
- // Remove parameter if value is falsy
8172
8172
  updatedParams.delete(key);
8173
8173
  }
8174
8174
  }
@@ -8180,10 +8180,9 @@
8180
8180
  }
8181
8181
  finally { if (e_2) throw e_2.error; }
8182
8182
  }
8183
- console.log(updatedParams.toString());
8184
8183
  var baseUrl = window.location.origin + window.location.pathname;
8185
- // Construct the updated URL with the modified query parameters
8186
8184
  var updatedUrl = "".concat(baseUrl, "?").concat(updatedParams.toString());
8185
+ handleSelectedFilter(false);
8187
8186
  return (window.location.href = updatedUrl);
8188
8187
  }
8189
8188
  else {
@@ -8203,6 +8202,7 @@
8203
8202
  }
8204
8203
  finally { if (e_3) throw e_3.error; }
8205
8204
  }
8205
+ handleSelectedFilter(false);
8206
8206
  return (window.location.href = "".concat(redirectUrl, "/").concat(selectedPath).concat(querySearchParams ? "?".concat(querySearchParams.toString()) : ''));
8207
8207
  }
8208
8208
  };