@spiffcommerce/core 16.1.0 → 16.2.1

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.d.ts CHANGED
@@ -944,7 +944,7 @@ type ProductCollectionResource = {
944
944
  globalPropertyConfiguration?: GlobalPropertyConfiguration;
945
945
  name: string;
946
946
  productCollectionProducts: ProductCollectionProductResource[];
947
- transformCollection?: TransformCollection;
947
+ transformCollection?: TransformCollection$1;
948
948
  };
949
949
  type ProductCollectionProductResource = {
950
950
  id: string;
@@ -972,7 +972,7 @@ interface Vector3 {
972
972
  y: number;
973
973
  z: number;
974
974
  }
975
- interface TransformCollection {
975
+ interface TransformCollection$1 {
976
976
  id: string;
977
977
  name: string;
978
978
  transforms: TransformCollectionTransform[];
@@ -1568,6 +1568,7 @@ declare class ProductCollection {
1568
1568
  * A list of products in this collections with useful helpers for interacting with them.
1569
1569
  */
1570
1570
  getProducts(): CollectionProduct[];
1571
+ getTransformCollection(): TransformCollection | undefined;
1571
1572
  /**
1572
1573
  * The raw collection resource. This is generally not needed and should be avoided.
1573
1574
  */
@@ -1628,6 +1629,44 @@ declare class ProductWorkflow {
1628
1629
  */
1629
1630
  getThumbnail(): string;
1630
1631
  }
1632
+ /**
1633
+ * Represents a collection of transforms that can be applied inside a product collection.
1634
+ */
1635
+ declare class TransformCollection {
1636
+ private readonly collection;
1637
+ constructor(collection: TransformCollection$1);
1638
+ /**
1639
+ * @returns The ID of the transform collection.
1640
+ */
1641
+ getId(): string;
1642
+ /**
1643
+ * @returns The name of the transform collection.
1644
+ */
1645
+ getName(): string;
1646
+ /**
1647
+ * @returns The transforms in this collection.
1648
+ */
1649
+ getTransforms(): Transform[];
1650
+ }
1651
+ /**
1652
+ * Represents the translations, rotation & scale of a product in 3D space.
1653
+ */
1654
+ declare class Transform {
1655
+ private readonly transform;
1656
+ constructor(position: TransformCollectionTransform);
1657
+ /**
1658
+ * @returns The ID of the transform.
1659
+ */
1660
+ getId(): string;
1661
+ /**
1662
+ * @returns The name of the transform.
1663
+ */
1664
+ getName(): string;
1665
+ /**
1666
+ * @returns The transformation to be used to place the object.
1667
+ */
1668
+ get(): BundleStateTransform;
1669
+ }
1631
1670
 
1632
1671
  /**
1633
1672
  * A bundle serves as a container for a set of workflow experience.
@@ -2799,4 +2838,4 @@ interface StepAspectValue {
2799
2838
  declare const stepAspectValuesToDesignInputSteps: (stepAspectValues: StepAspectValue[], workflow: Workflow) => DesignInputStep[];
2800
2839
  declare const generateStateFromDesignInputSteps: (designInputSteps: DesignInputStep[], workflow: Workflow, layouts: ILayout[], productOverlayImageUrl?: string) => Promise<LayoutsState>;
2801
2840
 
2802
- export { AssetNotFoundError, BulkPriceCalculationStrategy, BulkStepHandle, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, ProductWorkflow, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, UnhandledBehaviorError, Variant, VariationRecord, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, gatherVaryingStepAspects, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
2841
+ export { AssetNotFoundError, BulkPriceCalculationStrategy, BulkStepHandle, Bundle, CollectionProduct, ColorOption, ConversionConfiguration, ConversionData, ConversionDataType, ConversionLocation, Customer, CustomerDetailsInput, DesignCreationMessage, DesignCreationProgressUpdate, DesignInputStep, EditedSteps, FlowExecutionNodeResult, FlowExecutionResult, FlowService, FrameService, FrameStep, FrameStepHandle, GetWorkflowOptions, GlobalPropertyHandle, IllustrationStepHandle, InformationMessageType, InformationResult, InformationStepHandle, LayoutNotFoundError, MandatorySteps, MaterialStepHandle, MisconfigurationError, MockWorkflowManager, ModelStepHandle, NodeType, ObjectInput, ObjectInputType, OptionNotFoundError, ParseError, PictureStepHandle, Product, ProductCameraRig, ProductCollection, ProductWorkflow, PromiseQueue, QuestionStepHandle, QueueablePromise, RegionElement, RenderableScene, ResourceNotFoundError, SavedDesign, SelectionStorage, ShapeStepHandle, SilentIllustrationStepData, SpiffCommerceClient, Stakeholder, StakeholderType, StateMutationFunc, StepElements, StepHandle, TextStepHandle, TextStepStorage, Transaction, Transform, TransformCollection, UnhandledBehaviorError, Variant, VariationRecord, Vector3, WorkflowExperience, WorkflowExperienceImpl, WorkflowManager, WorkflowMetadata, WorkflowScene, WorkflowSelections, WorkflowStorage, assetService, createDesign, designService, digitalContentStepService, frameStepService, gatherVaryingStepAspects, generateCommands, generateStateFromDesignInputSteps, getBoundedOffsets, getWorkflow, getWorkflows, graphQlManager, illustrationStepService, materialStepService, modelStepService, moduleStepService, optionService, persistenceService, pictureStepService, questionStepService, shapeStepService, shortenUrl, spiffCoreConfiguration, stepAspectValuesToDesignInputSteps, textStepService, toast };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createHttpLink as Ct, InMemoryCache as Qt, ApolloClient as ut, from as mt, gql as y } from "@apollo/client/core";
2
2
  import { getAttributesFromArrayBuffer as De, AssetType as ce, StepType as D, StepAspectType as O, getFrameData as Ae, frameDataCache as pt, UpdateFramePattern as fe, calculateOffsets as ee, LayoutElementType as H, generate as v, CreateElementCommand as b, generateSVGWithUnknownColors as Fe, svgObjectURL as nA, fetchAsString as Z, DeleteElementCommand as $, GroupCommand as G, generateDefaultRectangleFrameSvg as ge, GetSVGDimensions as It, patternImageDataCache as le, fetchAsArrayBuffer as Me, findElement as MA, modifySVGWithElementProperties as Dt, IllustrationColorCommand as VA, IllustrationCacheCommand as ft, getFontMetrics as Ft, getPatternImageData as WA, FontColorCommand as Mt, FontImageFillCommand as TA, applyTextTransformations as XA, determineCorrectFontSizeAndLines as IA, FontSourceCommand as Be, loadFontFromExternalUrl as DA, TextChangeCommand as yt, FontSizeCommand as Yt, createElementNS as St, createElement as wA, loadFontFromDataUrl as UA, UpdateWorkflowStateCommand as de, CommandContext as xt, createCanvas as yA, getSvgElement as ye, LayoutRenderingPurpose as Ye, renderPapyrusComponentAsString as Se, loadImage as xe, getDomParser as Ne, fetch as Re, toBase64 as we, getVariant as Nt, generateFrameSVG as Rt, getDefaultVariant as GA, domParser as Pe, sanitizeSvgTree as He, traverse as Pt, xmlSerializer as Ue, arrayBufferToDataUrl as Ht, loadFontFaceSet as Ut, CreateLayoutCommand as Gt, sortElementsByLayersWithIndex as vt, AspectType as fA, rehydrateSerializedLayout as AA } from "@spiffcommerce/papyrus";
3
- import { AssetType as bs, BringForwardCommand as Ts, BringToBackCommand as Ls, BringToFrontCommand as Os, CanvasCommand as zs, CommandContext as Ks, CreateElementCommand as js, CreateLayoutCommand as Vs, DeleteElementCommand as Ws, FontAlignmentCommand as Xs, FontColorCommand as qs, FontSizeCommand as Zs, FontSourceCommand as $s, GroupCommand as _s, LayoutElementFactory as Ai, LayoutElementType as ei, MoveCommand as ti, ResizeCommand as ai, RotateCommand as ni, SendBackwardsCommand as si, StepAspectType as ii, StepType as oi, TextChangeCommand as ri, UnitOfMeasurement as ci, dataUrlFromExternalUrl as gi, determineCorrectFontSizeAndLines as li, findElement as Bi, frameDataCache as di, generate as wi, generateSVGWithUnknownColors as Ei, getAttributesFromArrayBuffer as hi, getAxisAlignedBoundingBox as Ci, getFrameData as Qi, getSvgElement as ui, loadFontFromDataUrl as mi, loadFontFromExternalUrl as pi, patternImageDataCache as Ii, registerFetchImplementation as Di, registerWindowImplementation as fi, rehydrateSerializedLayout as Fi } from "@spiffcommerce/papyrus";
3
+ import { AssetType as Ls, BringForwardCommand as Os, BringToBackCommand as zs, BringToFrontCommand as Ks, CanvasCommand as js, CommandContext as Vs, CreateElementCommand as Ws, CreateLayoutCommand as Xs, DeleteElementCommand as qs, FontAlignmentCommand as Zs, FontColorCommand as $s, FontSizeCommand as _s, FontSourceCommand as Ai, GroupCommand as ei, LayoutElementFactory as ti, LayoutElementType as ai, MoveCommand as ni, ResizeCommand as si, RotateCommand as ii, SendBackwardsCommand as oi, StepAspectType as ri, StepType as ci, TextChangeCommand as gi, UnitOfMeasurement as li, dataUrlFromExternalUrl as Bi, determineCorrectFontSizeAndLines as di, findElement as wi, frameDataCache as Ei, generate as hi, generateSVGWithUnknownColors as Ci, getAttributesFromArrayBuffer as Qi, getAxisAlignedBoundingBox as ui, getFrameData as mi, getSvgElement as pi, loadFontFromDataUrl as Ii, loadFontFromExternalUrl as Di, patternImageDataCache as fi, registerFetchImplementation as Fi, registerWindowImplementation as Mi, rehydrateSerializedLayout as yi } from "@spiffcommerce/papyrus";
4
4
  import { setContext as kt } from "@apollo/client/link/context";
5
5
  import { onError as Jt } from "@apollo/client/link/error";
6
6
  import { Pith as Ge } from "pith";
@@ -2424,7 +2424,7 @@ class ya {
2424
2424
  await t.setSelectionsAndElements(A.stepName, [e], [], async () => {
2425
2425
  try {
2426
2426
  const i = t.getModelContainer();
2427
- i && A.option && i.applyModelVariant(
2427
+ i && A.option && await i.applyModelVariant(
2428
2428
  A.option.id || "",
2429
2429
  {
2430
2430
  model: n,
@@ -6257,7 +6257,7 @@ class oA {
6257
6257
  case D.Model:
6258
6258
  return new An(A, e);
6259
6259
  case D.Frame:
6260
- return new Fs(A, e);
6260
+ return new ys(A, e);
6261
6261
  case D.Bulk:
6262
6262
  return new Za(A, e);
6263
6263
  default:
@@ -6965,7 +6965,7 @@ class CA {
6965
6965
  const A = gA(this.getCommandContext().getState());
6966
6966
  if (!A)
6967
6967
  throw new J("Internal state is undefined! Cannot copy experience!");
6968
- const e = JSON.stringify(A.transaction), t = this.getWorkflowManager().getWorkflow(), a = new Ds({}), n = (i = this.getWorkflowManager().getTransaction().integrationProduct) == null ? void 0 : i.id;
6968
+ const e = JSON.stringify(A.transaction), t = this.getWorkflowManager().getWorkflow(), a = new Fs({}), n = (i = this.getWorkflowManager().getTransaction().integrationProduct) == null ? void 0 : i.id;
6969
6969
  if (!n)
6970
6970
  throw new J("Integration product id is undefined!");
6971
6971
  return await a.initFromIntegrationProduct(n), await a.getWorkflowExperience(t.id, e, void 0);
@@ -8408,6 +8408,10 @@ class es {
8408
8408
  getProducts() {
8409
8409
  return this.collection.productCollectionProducts.map((A) => new ts(A));
8410
8410
  }
8411
+ getTransformCollection() {
8412
+ if (this.collection.transformCollection)
8413
+ return new as(this.collection.transformCollection);
8414
+ }
8411
8415
  /**
8412
8416
  * The raw collection resource. This is generally not needed and should be avoided.
8413
8417
  */
@@ -8503,6 +8507,56 @@ class pe {
8503
8507
  return this.workflow.imageUrl;
8504
8508
  }
8505
8509
  }
8510
+ class as {
8511
+ constructor(A) {
8512
+ this.collection = A;
8513
+ }
8514
+ /**
8515
+ * @returns The ID of the transform collection.
8516
+ */
8517
+ getId() {
8518
+ return this.collection.id;
8519
+ }
8520
+ /**
8521
+ * @returns The name of the transform collection.
8522
+ */
8523
+ getName() {
8524
+ return this.collection.name;
8525
+ }
8526
+ /**
8527
+ * @returns The transforms in this collection.
8528
+ */
8529
+ getTransforms() {
8530
+ return this.collection.transforms.map((A) => new ns(A));
8531
+ }
8532
+ }
8533
+ class ns {
8534
+ constructor(A) {
8535
+ this.transform = A;
8536
+ }
8537
+ /**
8538
+ * @returns The ID of the transform.
8539
+ */
8540
+ getId() {
8541
+ return this.transform.id;
8542
+ }
8543
+ /**
8544
+ * @returns The name of the transform.
8545
+ */
8546
+ getName() {
8547
+ return this.transform.name;
8548
+ }
8549
+ /**
8550
+ * @returns The transformation to be used to place the object.
8551
+ */
8552
+ get() {
8553
+ return {
8554
+ position: this.transform.position,
8555
+ rotation: this.transform.rotation,
8556
+ scale: this.transform.scale
8557
+ };
8558
+ }
8559
+ }
8506
8560
  class Ie {
8507
8561
  /* ThreeDPreviewService */
8508
8562
  constructor(A, e, t, a) {
@@ -8819,6 +8873,7 @@ class Ie {
8819
8873
  async injectExperienceIntoPreviewService(A) {
8820
8874
  if (this.previewService) {
8821
8875
  const e = A.getWorkflowManager().injectIntoPreviewService(this.previewService);
8876
+ A.getWorkflowManager().getModelContainer();
8822
8877
  try {
8823
8878
  this.bundleStateManager.applyStateToWorkflowExperience(A);
8824
8879
  } catch (t) {
@@ -8886,14 +8941,14 @@ class Ie {
8886
8941
  );
8887
8942
  }
8888
8943
  }
8889
- const as = y`
8944
+ const ss = y`
8890
8945
  mutation processFlowCreate($processFlowId: String!, $inputs: [String]!) {
8891
8946
  processExecutionCreate(processFlowId: $processFlowId, inputs: $inputs) {
8892
8947
  id
8893
8948
  }
8894
8949
  }
8895
8950
  `;
8896
- class ns {
8951
+ class is {
8897
8952
  /**
8898
8953
  *
8899
8954
  * @param id
@@ -8904,7 +8959,7 @@ class ns {
8904
8959
  async execute(A, e, t) {
8905
8960
  var B, l, d;
8906
8961
  const n = (l = (B = (await N.getShadowGraphqlClient().mutate({
8907
- mutation: as,
8962
+ mutation: ss,
8908
8963
  variables: {
8909
8964
  processFlowId: A,
8910
8965
  inputs: [...e.map((w) => w.getValueForTransmission())]
@@ -8946,7 +9001,7 @@ class ns {
8946
9001
  "Execution has failed to complete. See Automation > FLows in Flight on partner account on SpiffCommerce Hub."
8947
9002
  );
8948
9003
  if (w.completedAt) {
8949
- i = !0, r = new ss(w);
9004
+ i = !0, r = new os(w);
8950
9005
  break;
8951
9006
  }
8952
9007
  o += 1;
@@ -8960,7 +9015,7 @@ class ns {
8960
9015
  return Promise.resolve(r);
8961
9016
  }
8962
9017
  }
8963
- class ss {
9018
+ class os {
8964
9019
  constructor(A) {
8965
9020
  this.execution = A;
8966
9021
  }
@@ -9033,7 +9088,7 @@ class mA {
9033
9088
  return this.getArtifacts().get(A);
9034
9089
  }
9035
9090
  }
9036
- class is {
9091
+ class rs {
9037
9092
  constructor(A) {
9038
9093
  this.value = A;
9039
9094
  }
@@ -9045,8 +9100,8 @@ class is {
9045
9100
  return A.startsWith("[") ? JSON.stringify(JSON.parse(A)) : A;
9046
9101
  }
9047
9102
  }
9048
- var os = /* @__PURE__ */ ((g) => (g.Transaction = "Transaction", g.Bundle = "Bundle", g.Product = "Product", g.Variant = "Variant", g.Option = "Option", g.LineItem = "LineItem", g.Asset = "Asset", g))(os || {});
9049
- class Et extends is {
9103
+ var cs = /* @__PURE__ */ ((g) => (g.Transaction = "Transaction", g.Bundle = "Bundle", g.Product = "Product", g.Variant = "Variant", g.Option = "Option", g.LineItem = "LineItem", g.Asset = "Asset", g))(cs || {});
9104
+ class Et extends rs {
9050
9105
  constructor(A, e) {
9051
9106
  if (e !== "Asset" && !Et.validUUID(A))
9052
9107
  throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");
@@ -9056,7 +9111,7 @@ class Et extends is {
9056
9111
  return A.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i);
9057
9112
  }
9058
9113
  }
9059
- const rs = y`
9114
+ const gs = y`
9060
9115
  fragment RegionFields on Region {
9061
9116
  width
9062
9117
  top
@@ -9074,7 +9129,7 @@ const rs = y`
9074
9129
  height
9075
9130
  }
9076
9131
  }
9077
- `, cs = y`
9132
+ `, ls = y`
9078
9133
  fragment LookAtAnimationFields on LookAtAnimation {
9079
9134
  latDeg
9080
9135
  lonDeg
@@ -9085,7 +9140,7 @@ const rs = y`
9085
9140
  z
9086
9141
  }
9087
9142
  }
9088
- `, gs = y`
9143
+ `, Bs = y`
9089
9144
  fragment RenderingPipelineConfigurationFields on RenderingPipelineConfiguration {
9090
9145
  antiAliasing {
9091
9146
  samples
@@ -9169,21 +9224,21 @@ const rs = y`
9169
9224
  weight
9170
9225
  }
9171
9226
  }
9172
- `, ls = y`
9227
+ `, ds = y`
9173
9228
  fragment ModelAnimationFields on ModelAnimation {
9174
9229
  from
9175
9230
  to
9176
9231
  loop
9177
9232
  name
9178
9233
  }
9179
- `, Bs = (g) => y`
9234
+ `, ws = (g) => y`
9180
9235
  ${JA(g)}
9181
9236
  ${ae}
9182
9237
  ${je}
9183
- ${rs}
9184
- ${cs}
9185
9238
  ${gs}
9186
9239
  ${ls}
9240
+ ${Bs}
9241
+ ${ds}
9187
9242
  query GetWorkflows($ids: [String!]!) {
9188
9243
  workflows(ids: $ids) {
9189
9244
  allowProofDownload
@@ -9571,7 +9626,7 @@ const rs = y`
9571
9626
  }
9572
9627
  }
9573
9628
  }
9574
- `, ds = y`
9629
+ `, Es = y`
9575
9630
  query GetTransactionForPartner($id: String!) {
9576
9631
  transactions(ids: [$id]) {
9577
9632
  id
@@ -9588,7 +9643,7 @@ const rs = y`
9588
9643
  }
9589
9644
  }
9590
9645
  }
9591
- `, ws = y`
9646
+ `, hs = y`
9592
9647
  ${JA(!1)}
9593
9648
  query GetWorkflowForTheme($id: String!) {
9594
9649
  workflow(id: $id) {
@@ -9610,7 +9665,7 @@ const rs = y`
9610
9665
  }
9611
9666
  }
9612
9667
  }
9613
- `, Es = y`
9668
+ `, Cs = y`
9614
9669
  query GetCustomer($emailAddress: String!) {
9615
9670
  customer(emailAddress: $emailAddress) {
9616
9671
  id
@@ -9620,7 +9675,7 @@ const rs = y`
9620
9675
  }
9621
9676
  }
9622
9677
  }
9623
- `, hs = y`
9678
+ `, Qs = y`
9624
9679
  mutation CustomerCreate($details: CustomerDetailsInput!) {
9625
9680
  customerCreate(details: $details) {
9626
9681
  id
@@ -9630,7 +9685,7 @@ const rs = y`
9630
9685
  }
9631
9686
  }
9632
9687
  }
9633
- `, Cs = y`
9688
+ `, us = y`
9634
9689
  mutation CustomerAuthenticate($loginToken: String!) {
9635
9690
  customerAuthenticate(loginToken: $loginToken) {
9636
9691
  id
@@ -9657,11 +9712,11 @@ const rs = y`
9657
9712
  }
9658
9713
  }
9659
9714
  }
9660
- `, Qs = y`
9715
+ `, ms = y`
9661
9716
  mutation CustomerGenerateVerificationCode($emailAddress: String!) {
9662
9717
  customerGenerateVerificationCode(emailAddress: $emailAddress)
9663
9718
  }
9664
- `, us = y`
9719
+ `, ps = y`
9665
9720
  mutation CustomerVerifyCode($emailAddress: String!, $verificationCode: String!) {
9666
9721
  customerVerifyCode(emailAddress: $emailAddress, verificationCode: $verificationCode) {
9667
9722
  id
@@ -9689,10 +9744,10 @@ const rs = y`
9689
9744
  }
9690
9745
  }
9691
9746
  }
9692
- `, ms = async (g, A) => {
9747
+ `, Is = async (g, A) => {
9693
9748
  var a;
9694
9749
  const e = await N.getShadowGraphqlClient().query({
9695
- query: Bs(((a = A == null ? void 0 : A.assets) == null ? void 0 : a.metadata) || !1),
9750
+ query: ws(((a = A == null ? void 0 : A.assets) == null ? void 0 : a.metadata) || !1),
9696
9751
  errorPolicy: "all",
9697
9752
  fetchPolicy: "no-cache",
9698
9753
  variables: {
@@ -9709,7 +9764,7 @@ const rs = y`
9709
9764
  }), BA.set({ id: s.option.id }, Promise.resolve(s.option)));
9710
9765
  });
9711
9766
  }), t;
9712
- }, ps = async (g, A) => {
9767
+ }, Ds = async (g, A) => {
9713
9768
  const t = (await A).find((a) => a.id === g);
9714
9769
  if (!t)
9715
9770
  throw new Error(`Workflow not found: ${g}`);
@@ -9718,11 +9773,11 @@ const rs = y`
9718
9773
  const e = g.map((i) => BA.get({ id: i, options: A })), t = g.filter((i, o) => e[o] === void 0);
9719
9774
  if (t.length === 0)
9720
9775
  return Promise.all(e);
9721
- const a = ms(t, A), n = t.map(
9722
- (i) => BA.set({ id: i, options: A }, ps(i, a))
9776
+ const a = Is(t, A), n = t.map(
9777
+ (i) => BA.set({ id: i, options: A }, Ds(i, a))
9723
9778
  ), s = e.filter((i) => i !== void 0);
9724
9779
  return await Promise.all(s.concat(n));
9725
- }, pA = async (g, A) => (await ht([g], A))[0], Is = (g) => g.sort((A, e) => A.index - e.index).map((A) => ({
9780
+ }, pA = async (g, A) => (await ht([g], A))[0], fs = (g) => g.sort((A, e) => A.index - e.index).map((A) => ({
9726
9781
  id: v(),
9727
9782
  panelId: A.name,
9728
9783
  name: A.name,
@@ -9737,9 +9792,9 @@ const rs = y`
9737
9792
  editableArea: A.editableArea
9738
9793
  })), jA = (g, A) => {
9739
9794
  const e = g.workflowState, t = e ? JSON.parse(e) : void 0;
9740
- return t ? Object.values(t.layouts).map((a) => a.layout) : Is(A.panels);
9795
+ return t ? Object.values(t.layouts).map((a) => a.layout) : fs(A.panels);
9741
9796
  };
9742
- class Ds {
9797
+ class Fs {
9743
9798
  constructor(A) {
9744
9799
  this.updateTransactionState = async (e) => {
9745
9800
  try {
@@ -9767,7 +9822,7 @@ class Ds {
9767
9822
  getFlowService() {
9768
9823
  if (!this.options.applicationKey)
9769
9824
  throw new Error("Application key required to use Flow Service.");
9770
- return new ns();
9825
+ return new is();
9771
9826
  }
9772
9827
  // TODO: Authentication functions should probably be moved to a separate class.
9773
9828
  /**
@@ -9814,7 +9869,7 @@ class Ds {
9814
9869
  async authenticateTransactionFromLocalStorage(A) {
9815
9870
  var r, B, l, d, w, h;
9816
9871
  const e = N.getShadowGraphqlClient(), t = await e.query({
9817
- query: ds,
9872
+ query: Es,
9818
9873
  errorPolicy: "all",
9819
9874
  fetchPolicy: "no-cache",
9820
9875
  variables: {
@@ -9856,7 +9911,7 @@ class Ds {
9856
9911
  }
9857
9912
  }
9858
9913
  const c = (await e.query({
9859
- query: ws,
9914
+ query: hs,
9860
9915
  errorPolicy: "all",
9861
9916
  variables: {
9862
9917
  id: a.workflowId
@@ -9892,7 +9947,7 @@ class Ds {
9892
9947
  var s;
9893
9948
  this.customer = void 0;
9894
9949
  const e = N.getShadowGraphqlClient(), a = (await e.query({
9895
- query: Es,
9950
+ query: Cs,
9896
9951
  errorPolicy: "all",
9897
9952
  fetchPolicy: "no-cache",
9898
9953
  variables: {
@@ -9901,7 +9956,7 @@ class Ds {
9901
9956
  })).data.customer;
9902
9957
  if (!a.id) {
9903
9958
  const o = (s = (await e.mutate({
9904
- mutation: hs,
9959
+ mutation: Qs,
9905
9960
  errorPolicy: "all",
9906
9961
  fetchPolicy: "no-cache",
9907
9962
  variables: {
@@ -9933,7 +9988,7 @@ class Ds {
9933
9988
  if (!a)
9934
9989
  return !1;
9935
9990
  const s = (i = (await e.mutate({
9936
- mutation: Cs,
9991
+ mutation: us,
9937
9992
  errorPolicy: "all",
9938
9993
  fetchPolicy: "no-cache",
9939
9994
  variables: {
@@ -9948,7 +10003,7 @@ class Ds {
9948
10003
  */
9949
10004
  async generateVerificationCode(A) {
9950
10005
  await N.getShadowGraphqlClient().mutate({
9951
- mutation: Qs,
10006
+ mutation: ms,
9952
10007
  variables: {
9953
10008
  emailAddress: A
9954
10009
  }
@@ -9963,7 +10018,7 @@ class Ds {
9963
10018
  async verifyCode(A, e) {
9964
10019
  var n, s;
9965
10020
  const a = (n = (await N.getShadowGraphqlClient().mutate({
9966
- mutation: us,
10021
+ mutation: ps,
9967
10022
  errorPolicy: "all",
9968
10023
  fetchPolicy: "no-cache",
9969
10024
  variables: {
@@ -10503,7 +10558,7 @@ class Ds {
10503
10558
  e.set(A.partner.id, A.id), x.setMap("partnerCustomerIds", e);
10504
10559
  }
10505
10560
  }
10506
- class vs {
10561
+ class Js {
10507
10562
  getInitializationPromise() {
10508
10563
  return Promise.resolve();
10509
10564
  }
@@ -10649,8 +10704,8 @@ class vs {
10649
10704
  ejectFromPreviewService() {
10650
10705
  }
10651
10706
  }
10652
- var fs = /* @__PURE__ */ ((g) => (g.SelectFrame = "SelectFrame", g.SelectImage = "SelectImage", g.Position = "Position", g))(fs || {});
10653
- class Fs extends j {
10707
+ var Ms = /* @__PURE__ */ ((g) => (g.SelectFrame = "SelectFrame", g.SelectImage = "SelectImage", g.Position = "Position", g))(Ms || {});
10708
+ class ys extends j {
10654
10709
  constructor(A, e) {
10655
10710
  var t;
10656
10711
  super(A, e), this.frameService = (t = this.manager.getStepSpecificServices(this.getId())) == null ? void 0 : t.frameService;
@@ -10698,45 +10753,45 @@ class Fs extends j {
10698
10753
  }
10699
10754
  export {
10700
10755
  _ as AssetNotFoundError,
10701
- bs as AssetType,
10702
- Ts as BringForwardCommand,
10703
- Ls as BringToBackCommand,
10704
- Os as BringToFrontCommand,
10756
+ Ls as AssetType,
10757
+ Os as BringForwardCommand,
10758
+ zs as BringToBackCommand,
10759
+ Ks as BringToFrontCommand,
10705
10760
  oa as BulkPriceCalculationStrategy,
10706
10761
  Za as BulkStepHandle,
10707
- zs as CanvasCommand,
10762
+ js as CanvasCommand,
10708
10763
  ts as CollectionProduct,
10709
- Ks as CommandContext,
10764
+ Vs as CommandContext,
10710
10765
  ca as ConversionDataType,
10711
10766
  ra as ConversionLocation,
10712
- js as CreateElementCommand,
10713
- Vs as CreateLayoutCommand,
10714
- Ws as DeleteElementCommand,
10767
+ Ws as CreateElementCommand,
10768
+ Xs as CreateLayoutCommand,
10769
+ qs as DeleteElementCommand,
10715
10770
  mA as FlowExecutionNodeResult,
10716
- ss as FlowExecutionResult,
10717
- ns as FlowService,
10718
- Xs as FontAlignmentCommand,
10719
- qs as FontColorCommand,
10720
- Zs as FontSizeCommand,
10721
- $s as FontSourceCommand,
10771
+ os as FlowExecutionResult,
10772
+ is as FlowService,
10773
+ Zs as FontAlignmentCommand,
10774
+ $s as FontColorCommand,
10775
+ _s as FontSizeCommand,
10776
+ Ai as FontSourceCommand,
10722
10777
  ma as FrameService,
10723
- fs as FrameStep,
10724
- Fs as FrameStepHandle,
10778
+ Ms as FrameStep,
10779
+ ys as FrameStepHandle,
10725
10780
  re as GlobalPropertyHandle,
10726
- _s as GroupCommand,
10781
+ ei as GroupCommand,
10727
10782
  $a as IllustrationStepHandle,
10728
10783
  HA as InformationMessageType,
10729
10784
  sn as InformationStepHandle,
10730
- Ai as LayoutElementFactory,
10731
- ei as LayoutElementType,
10785
+ ti as LayoutElementFactory,
10786
+ ai as LayoutElementType,
10732
10787
  L as LayoutNotFoundError,
10733
10788
  _a as MaterialStepHandle,
10734
10789
  SA as MisconfigurationError,
10735
- vs as MockWorkflowManager,
10790
+ Js as MockWorkflowManager,
10736
10791
  An as ModelStepHandle,
10737
- ti as MoveCommand,
10792
+ ni as MoveCommand,
10738
10793
  Et as ObjectInput,
10739
- os as ObjectInputType,
10794
+ cs as ObjectInputType,
10740
10795
  YA as OptionNotFoundError,
10741
10796
  rA as ParseError,
10742
10797
  en as PictureStepHandle,
@@ -10746,58 +10801,60 @@ export {
10746
10801
  qe as PromiseQueue,
10747
10802
  tn as QuestionStepHandle,
10748
10803
  Xe as QueueablePromise,
10749
- ai as ResizeCommand,
10804
+ si as ResizeCommand,
10750
10805
  lA as ResourceNotFoundError,
10751
- ni as RotateCommand,
10752
- si as SendBackwardsCommand,
10806
+ ii as RotateCommand,
10807
+ oi as SendBackwardsCommand,
10753
10808
  an as ShapeStepHandle,
10754
- Ds as SpiffCommerceClient,
10809
+ Fs as SpiffCommerceClient,
10755
10810
  NA as StakeholderType,
10756
- ii as StepAspectType,
10811
+ ri as StepAspectType,
10757
10812
  j as StepHandle,
10758
- oi as StepType,
10759
- ri as TextChangeCommand,
10813
+ ci as StepType,
10814
+ gi as TextChangeCommand,
10760
10815
  nn as TextStepHandle,
10816
+ ns as Transform,
10817
+ as as TransformCollection,
10761
10818
  J as UnhandledBehaviorError,
10762
- ci as UnitOfMeasurement,
10819
+ li as UnitOfMeasurement,
10763
10820
  X as Variant,
10764
10821
  CA as WorkflowExperienceImpl,
10765
10822
  T as assetService,
10766
10823
  dn as createDesign,
10767
- gi as dataUrlFromExternalUrl,
10824
+ Bi as dataUrlFromExternalUrl,
10768
10825
  KA as designService,
10769
- li as determineCorrectFontSizeAndLines,
10826
+ di as determineCorrectFontSizeAndLines,
10770
10827
  Da as digitalContentStepService,
10771
- Bi as findElement,
10772
- di as frameDataCache,
10828
+ wi as findElement,
10829
+ Ei as frameDataCache,
10773
10830
  ZA as frameStepService,
10774
10831
  We as gatherVaryingStepAspects,
10775
- wi as generate,
10832
+ hi as generate,
10776
10833
  Mn as generateCommands,
10777
- Ei as generateSVGWithUnknownColors,
10834
+ Ci as generateSVGWithUnknownColors,
10778
10835
  Nn as generateStateFromDesignInputSteps,
10779
- hi as getAttributesFromArrayBuffer,
10780
- Ci as getAxisAlignedBoundingBox,
10836
+ Qi as getAttributesFromArrayBuffer,
10837
+ ui as getAxisAlignedBoundingBox,
10781
10838
  ua as getBoundedOffsets,
10782
- Qi as getFrameData,
10783
- ui as getSvgElement,
10839
+ mi as getFrameData,
10840
+ pi as getSvgElement,
10784
10841
  pA as getWorkflow,
10785
10842
  ht as getWorkflows,
10786
10843
  N as graphQlManager,
10787
10844
  FA as illustrationStepService,
10788
- mi as loadFontFromDataUrl,
10789
- pi as loadFontFromExternalUrl,
10845
+ Ii as loadFontFromDataUrl,
10846
+ Di as loadFontFromExternalUrl,
10790
10847
  $e as materialStepService,
10791
10848
  _e as modelStepService,
10792
10849
  Sa as moduleStepService,
10793
10850
  z as optionService,
10794
- Ii as patternImageDataCache,
10851
+ fi as patternImageDataCache,
10795
10852
  x as persistenceService,
10796
10853
  At as pictureStepService,
10797
10854
  et as questionStepService,
10798
- Di as registerFetchImplementation,
10799
- fi as registerWindowImplementation,
10800
- Fi as rehydrateSerializedLayout,
10855
+ Fi as registerFetchImplementation,
10856
+ Mi as registerWindowImplementation,
10857
+ yi as rehydrateSerializedLayout,
10801
10858
  cA as shapeStepService,
10802
10859
  pa as shortenUrl,
10803
10860
  xA as spiffCoreConfiguration,