@lime-bundles/react 4.1.0 → 5.0.0

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.js CHANGED
@@ -182,7 +182,7 @@ function useAnalytics(options) {
182
182
  );
183
183
  useEffect2(() => {
184
184
  impressionFiredRef.current = false;
185
- }, [options.bundleGid, options.abVariant]);
185
+ }, [options.bundleGid]);
186
186
  useEffect2(() => {
187
187
  if (options.enabled === false) return;
188
188
  if (impressionFiredRef.current) return;
@@ -193,8 +193,7 @@ function useAnalytics(options) {
193
193
  reportImpression(config, {
194
194
  bundleGid: options.bundleGid,
195
195
  bundleType: options.bundleType,
196
- abTestId: options.abTestId,
197
- abVariant: options.abVariant
196
+ linkGroupId: options.linkGroupId
198
197
  });
199
198
  });
200
199
  return cleanup;
@@ -204,8 +203,7 @@ function useAnalytics(options) {
204
203
  options.enabled,
205
204
  options.bundleGid,
206
205
  options.bundleType,
207
- options.abTestId,
208
- options.abVariant
206
+ options.linkGroupId
209
207
  ]);
210
208
  const trackAddToCart = useCallback(
211
209
  (event) => {
@@ -216,8 +214,7 @@ function useAnalytics(options) {
216
214
  productId: event.productId,
217
215
  quantity: event.quantity,
218
216
  totalPrice: event.totalPrice,
219
- abTestId: options.abTestId,
220
- abVariant: options.abVariant
217
+ linkGroupId: options.linkGroupId
221
218
  });
222
219
  },
223
220
  [
@@ -225,8 +222,7 @@ function useAnalytics(options) {
225
222
  options.enabled,
226
223
  options.bundleGid,
227
224
  options.bundleType,
228
- options.abTestId,
229
- options.abVariant
225
+ options.linkGroupId
230
226
  ]
231
227
  );
232
228
  return { elementRef, trackAddToCart };
@@ -1520,7 +1516,6 @@ import {
1520
1516
  mergeWidgetConfig,
1521
1517
  applyWidgetConfigVars as applyWidgetConfigVars2,
1522
1518
  thumbnailRatioVars,
1523
- applyABVariantB,
1524
1519
  parseCents,
1525
1520
  formatCents,
1526
1521
  percentageDiscountUnit,
@@ -1537,7 +1532,9 @@ import {
1537
1532
  reportImpression as reportImpression2,
1538
1533
  reportAddToCart as reportAddToCart2,
1539
1534
  observeImpression as observeImpression2,
1540
- getABTestAssignment,
1535
+ getLinkGroupAssignment,
1536
+ pickVariantFromWeights,
1537
+ fnv1a,
1541
1538
  setConsent,
1542
1539
  hasConsent,
1543
1540
  injectCustomCss as injectCustomCss3,
@@ -1561,7 +1558,6 @@ export {
1561
1558
  VariantDropdown,
1562
1559
  VolumeBundle,
1563
1560
  WIDGET_CONFIG_DEFAULTS,
1564
- applyABVariantB,
1565
1561
  applyWidgetConfigVars2 as applyWidgetConfigVars,
1566
1562
  calculateDiscount2 as calculateDiscount,
1567
1563
  calculateTierSavings2 as calculateTierSavings,
@@ -1571,12 +1567,13 @@ export {
1571
1567
  fetchBundleData,
1572
1568
  fetchBundlesForProduct2 as fetchBundlesForProduct,
1573
1569
  fetchShopCustomCss,
1570
+ fnv1a,
1574
1571
  formatCents,
1575
1572
  formatCountdown,
1576
1573
  formatMoney4 as formatMoney,
1577
1574
  formatUnitPrice4 as formatUnitPrice,
1578
- getABTestAssignment,
1579
1575
  getActiveTier2 as getActiveTier,
1576
+ getLinkGroupAssignment,
1580
1577
  hasConsent,
1581
1578
  injectCustomCss3 as injectCustomCss,
1582
1579
  mergeWidgetConfig,
@@ -1585,6 +1582,7 @@ export {
1585
1582
  parseMetaobjectBundle,
1586
1583
  parseMetaobjectBundleStrict2 as parseMetaobjectBundleStrict,
1587
1584
  percentageDiscountUnit,
1585
+ pickVariantFromWeights,
1588
1586
  reportAddToCart2 as reportAddToCart,
1589
1587
  reportImpression2 as reportImpression,
1590
1588
  sanitizeCustomCss,