@spiffcommerce/core 29.2.0-beta.f1e49403-7859-59d6-935b-11be4d3b7a48 → 29.3.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.mjs CHANGED
@@ -13676,7 +13676,6 @@ class dl extends Pa {
13676
13676
  },
13677
13677
  void 0
13678
13678
  ),
13679
- e.setAspectMandatoryFulfilled(this.property.name, !0),
13680
13679
  this.applyImageSelection(t),
13681
13680
  this.loadImageData()
13682
13681
  ]);
@@ -13893,7 +13892,6 @@ class Al extends Pa {
13893
13892
  async setText(t) {
13894
13893
  await Promise.all([
13895
13894
  this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name, t, void 0, void 0),
13896
- this.bundle.getGlobalPropertyStateManager().setAspectMandatoryFulfilled(this.property.name, t.trim() !== ""),
13897
13895
  this.applyTextSelection(t)
13898
13896
  ]);
13899
13897
  }
@@ -13969,7 +13967,6 @@ class er extends Pa {
13969
13967
  async selectVariant(t, e) {
13970
13968
  await Promise.all([
13971
13969
  this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name, t.getId(), void 0, e),
13972
- this.bundle.getGlobalPropertyStateManager().setAspectMandatoryFulfilled(this.property.name, !0),
13973
13970
  this.applyVariantSelection(t)
13974
13971
  ]);
13975
13972
  }
@@ -13997,7 +13994,6 @@ class Ka extends er {
13997
13994
  async selectVariant(t, e) {
13998
13995
  await Promise.all([
13999
13996
  this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name, t.getId(), void 0, e),
14000
- this.bundle.getGlobalPropertyStateManager().setAspectMandatoryFulfilled(this.property.name, !0),
14001
13997
  this.applyColorVariant(t, void 0, e)
14002
13998
  ]);
14003
13999
  }
@@ -14100,9 +14096,6 @@ class ml {
14100
14096
  getAspectMandatoryFulfilled(t) {
14101
14097
  return this.mandatoryFulfilledAspects.get(t);
14102
14098
  }
14103
- async setAspectMandatoryFulfilled(t, e) {
14104
- this.mandatoryFulfilledAspects.set(t, e), await this.onGlobalPropertyStateChange(this.globalPropertyState, this.globalPropertyState);
14105
- }
14106
14099
  getAspect(t, e) {
14107
14100
  if (!this.globalPropertyState)
14108
14101
  throw new Error("Global property state not initialized");
@@ -14124,6 +14117,7 @@ class ml {
14124
14117
  const i = this.configuration.aspects.find((l) => l.name === t);
14125
14118
  if (!i)
14126
14119
  throw new Error(`Failed to find configuration aspect with name: ${t}`);
14120
+ this.mandatoryFulfilledAspects.set(t, e !== "");
14127
14121
  const s = yt(this.globalPropertyState), o = this.globalPropertyState.aspects.filter((l) => l.name === t);
14128
14122
  if (o.length > 0)
14129
14123
  if (n) {
@@ -15569,7 +15563,6 @@ class Ke {
15569
15563
  });
15570
15564
  }
15571
15565
  checkMandatoryHandlesChanged(t, e) {
15572
- console.log("checking mandatory changed");
15573
15566
  const a = [], n = [], i = [], s = ar(t);
15574
15567
  e.forEach((o) => {
15575
15568
  if (o.isMandatory()) {
@@ -15578,7 +15571,7 @@ class Ke {
15578
15571
  const c = s.get(o.getName());
15579
15572
  (c === void 0 || c !== l) && a.push(o);
15580
15573
  }
15581
- }), console.log("mandatory changed info", { changed: a, completed: n, remaining: i }), a.length > 0 && this.fireEvent("global-properties-mandatory-changed", {
15574
+ }), this.fireEvent("global-properties-mandatory-changed", {
15582
15575
  changed: a,
15583
15576
  completed: n,
15584
15577
  remaining: i
@@ -16183,7 +16176,7 @@ class pd {
16183
16176
  } catch (a) {
16184
16177
  throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
16185
16178
  }
16186
- }, this.options = t, this.options.applicationKey && Vr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 29.2.0-beta.9a6c3271-4de2-5d0a-a272-faa4a5c6152f"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16179
+ }, this.options = t, this.options.applicationKey && Vr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 29.3.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
16187
16180
  }
16188
16181
  configure(t) {
16189
16182
  mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.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 && Gr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);