feeef 0.7.3 → 0.7.5

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/build/index.js CHANGED
@@ -1977,14 +1977,13 @@ var CartService = class extends NotifiableService {
1977
1977
  */
1978
1978
  updateCurrentItemOffer(offer) {
1979
1979
  if (!this.currentItem) return;
1980
- const updatedItem = { ...this.currentItem };
1981
- updatedItem.offer = offer;
1980
+ const updatedItem = { ...this.currentItem, offer };
1982
1981
  if (offer) {
1983
1982
  updatedItem.quantity = this.clampQuantityToOfferLimits(offer, this.currentItem.quantity);
1984
1983
  }
1985
- this.updateCurrentItem(updatedItem);
1984
+ this.updateCurrentItem(updatedItem, true);
1986
1985
  this.cachedSubtotal = null;
1987
- this.notifyIfChanged();
1986
+ this.notify();
1988
1987
  }
1989
1988
  /**
1990
1989
  * Sets the shipping method.
@@ -3406,7 +3405,7 @@ var cssColorToHslString = (cssColor) => {
3406
3405
  const min = Math.min(r, g, b);
3407
3406
  let h = 0;
3408
3407
  let s = 0;
3409
- let l = (max + min) / 2;
3408
+ const l = (max + min) / 2;
3410
3409
  if (max !== min) {
3411
3410
  const d = max - min;
3412
3411
  s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
@@ -3425,6 +3424,12 @@ var cssColorToHslString = (cssColor) => {
3425
3424
  }
3426
3425
  return `${Math.round(h * 360)}, ${Math.round(s * 100)}%, ${Math.round(l * 100)}%`;
3427
3426
  };
3427
+ var dartColorToCssColor = (dartColor) => {
3428
+ if (dartColor === null || dartColor === void 0 || typeof dartColor !== "number") return "";
3429
+ const cssNum = convertDartColorToCssNumber(dartColor);
3430
+ const hsl = cssColorToHslString(cssNum);
3431
+ return hsl ? `hsl(${hsl})` : "";
3432
+ };
3428
3433
  function tryFixPhoneNumber(phone) {
3429
3434
  phone = phone.trim();
3430
3435
  phone = phone.replace(/\D/g, "");
@@ -3524,6 +3529,7 @@ export {
3524
3529
  convertDartColorToCssNumber,
3525
3530
  convertOrderEntityToOrderTrackEntity,
3526
3531
  cssColorToHslString,
3532
+ dartColorToCssColor,
3527
3533
  generatePublicIntegrationsData,
3528
3534
  generatePublicIntegrationsDataGoogleAnalytics,
3529
3535
  generatePublicIntegrationsDataGoogleSheets,