@spiffcommerce/core 44.5.6-alpha.6 → 44.5.6-alpha.7

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/CHANGELOG.md CHANGED
@@ -14,6 +14,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
  - `Fixed` for any bug fixes.
15
15
  - `Security` in case of vulnerabilities.
16
16
 
17
+ ## [44.6.0] - 27-08-2026
18
+
19
+ ### Added
20
+
21
+ - **Dynamic Workflow Configuration**: New `WorkflowExperience.updateWorkflowConfiguration()` method to dynamically update workflow structure at runtime
22
+ - Supports adding, removing, and changing panels, steps, and step groups
23
+ - Automatically preserves user state and canvas content where possible
24
+ - New `WorkflowExperienceEventType.WorkflowConfigurationChanged` event
25
+
17
26
  ## [44.5.4] - 17-08-2026
18
27
 
19
28
  ### Fixed
@@ -63712,7 +63712,7 @@ const cL = [
63712
63712
  }), i.push(new fi(T, S));
63713
63713
  }
63714
63714
  return console.log(`[handleTextStep] Done with ${i.length} command(s).`), i;
63715
- }, AL = async (r, e, t, n) => {
63715
+ }, AL = async (r, e, t, n, i) => {
63716
63716
  console.log("[generateCommands] Start.", {
63717
63717
  workflowId: e.id,
63718
63718
  designInputStepCount: r.length,
@@ -63722,52 +63722,53 @@ const cL = [
63722
63722
  layoutPanelIds: t.map((s) => s.panelId),
63723
63723
  productOverlayImageUrl: n
63724
63724
  });
63725
- const i = [], a = {};
63725
+ const a = [];
63726
+ i = i ?? {};
63726
63727
  for (const s of r) {
63727
63728
  const o = e.steps.find((u) => u.stepName === s.name);
63728
63729
  if (!o) {
63729
63730
  console.warn(`[generateCommands] No workflow step matching design input step "${s.name}"; skipping.`);
63730
63731
  continue;
63731
63732
  }
63732
- const l = i.length;
63733
+ const l = a.length;
63733
63734
  switch (console.log(`[generateCommands] Handling step "${s.name}" of type ${o.type}.`), o.type) {
63734
63735
  case Je.DigitalContent:
63735
- i.push(
63736
+ a.push(
63736
63737
  ...await dL(t, s, o)
63737
63738
  );
63738
63739
  break;
63739
63740
  case Je.Frame:
63740
63741
  case Je.Photo:
63741
- i.push(
63742
- ...await fL(t, a, s, o)
63742
+ a.push(
63743
+ ...await fL(t, i, s, o)
63743
63744
  );
63744
63745
  break;
63745
63746
  case Je.Illustration:
63746
- i.push(
63747
+ a.push(
63747
63748
  ...await hL(
63748
63749
  t,
63749
- a,
63750
+ i,
63750
63751
  s,
63751
63752
  o
63752
63753
  )
63753
63754
  );
63754
63755
  break;
63755
63756
  case Je.Module:
63756
- i.push(...await pL(t, s, o));
63757
+ a.push(...await pL(t, s, o));
63757
63758
  break;
63758
63759
  case Je.Picture:
63759
- i.push(
63760
- ...await gL(t, a, s, o)
63760
+ a.push(
63761
+ ...await gL(t, i, s, o)
63761
63762
  );
63762
63763
  break;
63763
63764
  case Je.Shape:
63764
- i.push(
63765
- ...await mL(t, a, s, o)
63765
+ a.push(
63766
+ ...await mL(t, i, s, o)
63766
63767
  );
63767
63768
  break;
63768
63769
  case Je.Text:
63769
- i.push(
63770
- ...await yL(t, a, s, o)
63770
+ a.push(
63771
+ ...await yL(t, i, s, o)
63771
63772
  );
63772
63773
  break;
63773
63774
  default:
@@ -63777,35 +63778,35 @@ const cL = [
63777
63778
  break;
63778
63779
  }
63779
63780
  console.log(
63780
- `[generateCommands] Step "${s.name}" produced ${i.length - l} command(s). Running total: ${i.length}.`
63781
+ `[generateCommands] Step "${s.name}" produced ${a.length - l} command(s). Running total: ${a.length}.`
63781
63782
  );
63782
63783
  }
63783
63784
  console.log("[generateCommands] Renderable steps done.", {
63784
- commandCount: i.length,
63785
+ commandCount: a.length,
63785
63786
  stepSelections: Object.fromEntries(
63786
- Object.entries(a).map(([s, o]) => [
63787
+ Object.entries(i).map(([s, o]) => [
63787
63788
  s,
63788
- o.selectedVariants?.map((l) => l.id)
63789
+ JSON.stringify(o)
63789
63790
  ])
63790
63791
  )
63791
63792
  });
63792
63793
  for (const s of e.steps) {
63793
63794
  if (s.type !== Je.SilentIllustration && s.type !== Je.ProductOverlay)
63794
63795
  continue;
63795
- if (!await lo(s, a)) {
63796
+ if (!await lo(s, i)) {
63796
63797
  console.log(
63797
63798
  `[generateCommands] Silent step "${s.stepName}" conditions not satisfied; skipping.`
63798
63799
  );
63799
63800
  continue;
63800
63801
  }
63801
- const o = i.length;
63802
- console.log(`[generateCommands] Handling silent step "${s.stepName}" of type ${s.type}.`), i.push(
63802
+ const o = a.length;
63803
+ console.log(`[generateCommands] Handling silent step "${s.stepName}" of type ${s.type}.`), a.push(
63803
63804
  ...await vL(t, s, n)
63804
63805
  ), console.log(
63805
- `[generateCommands] Silent step "${s.stepName}" produced ${i.length - o} command(s). Running total: ${i.length}.`
63806
+ `[generateCommands] Silent step "${s.stepName}" produced ${a.length - o} command(s). Running total: ${a.length}.`
63806
63807
  );
63807
63808
  }
63808
- return console.log(`[generateCommands] Done with ${i.length} command(s).`), i;
63809
+ return console.log(`[generateCommands] Done with ${a.length} command(s).`), a;
63809
63810
  };
63810
63811
  class bL {
63811
63812
  constructor(e) {
@@ -72932,7 +72933,7 @@ class rz extends tz {
72932
72933
  });
72933
72934
  }
72934
72935
  async loadEventStreamCapability() {
72935
- const { EventStreamSerde: e, eventStreamSerdeProvider: t } = await import("./index.browser-CgwcA0Sd.js"), n = this.resolveEventStreamMarshaller(t);
72936
+ const { EventStreamSerde: e, eventStreamSerdeProvider: t } = await import("./index.browser-DU0RyCIT.js"), n = this.resolveEventStreamMarshaller(t);
72936
72937
  return new e({
72937
72938
  marshaller: n,
72938
72939
  serializer: this.serializer,
@@ -80370,7 +80371,7 @@ class rY {
80370
80371
  } catch (n) {
80371
80372
  throw console.error(n), new so("Critical - Unable to synchronize workflow state with server.");
80372
80373
  }
80373
- }, this.options = e, this.options.applicationKey && X4(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 44.5.6-alpha.5"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
80374
+ }, this.options = e, this.options.applicationKey && X4(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 44.5.6-alpha.6"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
80374
80375
  }
80375
80376
  configure(e) {
80376
80377
  Ps.setHubUrl(e.hubUrl), Ps.setServerUrl(e.serverUrl), Ps.setServicesApiUrl(e.servicesApiUrl), this.marketplaceThemeInstallId = e.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = e.marketplaceThemeInstallConfigurationId, this.userPoolClientId = e.userPoolClientId, this.userPoolRegion = e.userPoolRegion, this.spiffRegion = e.spiffRegion, e.bearerAuthenticationToken && K4(e.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Ed.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
@@ -80379,7 +80380,7 @@ class rY {
80379
80380
  * @returns The version of the @spiffcommerce/core package that this client is running.
80380
80381
  */
80381
80382
  getVersion() {
80382
- return "44.5.6-alpha.5";
80383
+ return "44.5.6-alpha.6";
80383
80384
  }
80384
80385
  /**
80385
80386
  * @returns The asset manager allows for common operations related to assets
@@ -82525,4 +82526,4 @@ export {
82525
82526
  d9 as y,
82526
82527
  c9 as z
82527
82528
  };
82528
- //# sourceMappingURL=index-C-J-MnS9.js.map
82529
+ //# sourceMappingURL=index-3zc8nilH.js.map