@spiffcommerce/core 31.2.2 → 31.2.3-beta.5249dfb4-40fc-508c-8b98-cb6aa1aafe90

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.mjs CHANGED
@@ -5760,6 +5760,7 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5760
5760
  return e.querySelectorAll("text").forEach((d) => d.remove()), Bt().serializeToString(a);
5761
5761
  }, Be = (r, t, e, a) => Math.max(ns(r.join(`
5762
5762
  `), e, a), t), La = (r, t, e, a, n, i) => {
5763
+ console.log("LOG: getLines");
5763
5764
  const s = (i || ya) * n.getApproximateHeight(), o = t.split(`
5764
5765
  `);
5765
5766
  try {
@@ -5780,6 +5781,7 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5780
5781
  };
5781
5782
  }
5782
5783
  }, ge = (r, t, e, a) => {
5784
+ console.log("LOG: splitLineUntilFit");
5783
5785
  const n = mt(r, e, a);
5784
5786
  if (n <= t)
5785
5787
  return { lines: [r], width: n };
@@ -5811,9 +5813,11 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5811
5813
  throw new Error(`No max width calculated for text: ${o}.`);
5812
5814
  return { lines: o, width: l };
5813
5815
  }, ts = (r, t, e, a, n, i) => {
5816
+ console.log("LOG: calcFontSize");
5814
5817
  const s = (i ?? ya) * t.getApproximateHeight(), o = 1 / e.unitsPerEm, l = Qn(r, o, t), c = r.length * s * o, d = a / l, A = n / c;
5815
5818
  return Math.min(A, d);
5816
5819
  }, es = (r, t, e, a) => {
5820
+ console.log("LOG: refit");
5817
5821
  const n = Et(t.fontData.assetUrl), i = n.getFont(), s = t.fontSize / i.unitsPerEm;
5818
5822
  if (!e)
5819
5823
  return La(t, r, t.fontSize, s, n, a);
@@ -5835,6 +5839,7 @@ const Xi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", ze = /* @_
5835
5839
  fontSize: ts(o, n, i, t.width, t.height, a)
5836
5840
  } : La(t, r, t.fontSize, s, n, a);
5837
5841
  }, as = (r, t, e, a, n) => {
5842
+ console.log("LOG: recalc");
5838
5843
  const s = Et(t.assetUrl).getFont();
5839
5844
  let o = { ...r };
5840
5845
  const l = { ...r }, c = Qn(a, e / s.unitsPerEm, Et(t.assetUrl));
@@ -8633,7 +8638,7 @@ class Ds {
8633
8638
  }
8634
8639
  }
8635
8640
  const Fs = new Ds(), Ye = (r, t, e, a, n) => {
8636
- if (t.some((d) => d == null))
8641
+ if (console.log("LOG: lines that fit"), t.some((d) => d == null))
8637
8642
  throw new Error(`Failed to autosize lines: ${t.join(", ")}`);
8638
8643
  let i = t.map((d) => d.split(`
8639
8644
  `)).flat(), s = i.length, o = i.map((d) => mt(d, a, n));
@@ -8660,6 +8665,7 @@ const Fs = new Ds(), Ye = (r, t, e, a, n) => {
8660
8665
  }
8661
8666
  return [null, null];
8662
8667
  }, fe = (r, t, e, a, n) => {
8668
+ console.log("LOG: determineCorrectFontSize");
8663
8669
  let i, s;
8664
8670
  const o = Et(t.assetUrl), l = o.getFont();
8665
8671
  if (n.size) {
@@ -15170,6 +15176,7 @@ class _e {
15170
15176
  name: this.getName(),
15171
15177
  dispatchDate: this.getDispatchDate() || "",
15172
15178
  purchaseOrder: this.getPurchaseOrder() || "",
15179
+ collectionId: this.getProductCollection()?.getId() || "",
15173
15180
  collectionName: this.getProductCollection()?.getName() || "",
15174
15181
  items: [],
15175
15182
  bundleOwnerId: this.ownerId
@@ -15202,6 +15209,7 @@ class _e {
15202
15209
  name: this.getName(),
15203
15210
  dispatchDate: this.getDispatchDate() || "",
15204
15211
  purchaseOrder: this.getPurchaseOrder() || "",
15212
+ collectionId: this.getProductCollection()?.getId() || "",
15205
15213
  collectionName: this.getProductCollection()?.getName() || "",
15206
15214
  items: a,
15207
15215
  bundleOwnerId: this.ownerId
@@ -15947,7 +15955,7 @@ class md {
15947
15955
  } catch (a) {
15948
15956
  throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
15949
15957
  }
15950
- }, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 31.2.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15958
+ }, this.options = t, this.options.applicationKey && Lr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 31.2.3"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
15951
15959
  }
15952
15960
  configure(t) {
15953
15961
  gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && zr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);