@spiffcommerce/core 12.10.4 → 12.10.6
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/main.js +5 -1
- package/dist/module.js +5 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -571,6 +571,10 @@ var t=require("@apollo/client"),e=require("lodash.clonedeep"),A=require("react/j
|
|
|
571
571
|
id
|
|
572
572
|
customer {
|
|
573
573
|
id
|
|
574
|
+
emailAddress
|
|
575
|
+
firstName
|
|
576
|
+
lastName
|
|
577
|
+
phoneNumber
|
|
574
578
|
}
|
|
575
579
|
type
|
|
576
580
|
}
|
|
@@ -647,7 +651,7 @@ var t=require("@apollo/client"),e=require("lodash.clonedeep"),A=require("react/j
|
|
|
647
651
|
id
|
|
648
652
|
}
|
|
649
653
|
}
|
|
650
|
-
`;function rc(t,e,A){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var A=t[Symbol.toPrimitive];if(void 0!==A){var i=A.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}class ac{constructor(t,e){rc(this,"bundle",void 0),rc(this,"property",void 0),this.bundle=t,this.property=e}getName(){return this.property.name}getDescription(){return this.property.description}getType(){return this.property.type}getSharedSteps(t){return(t??this.bundle.getWorkflowExperiences()).flatMap((t=>t.getSteps().filter((t=>
|
|
654
|
+
`;function rc(t,e,A){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var A=t[Symbol.toPrimitive];if(void 0!==A){var i=A.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}class ac{constructor(t,e){rc(this,"bundle",void 0),rc(this,"property",void 0),this.bundle=t,this.property=e}getName(){return this.property.name}getDescription(){return this.property.description}getType(){return this.property.type}getSharedSteps(t){return(t??this.bundle.getWorkflowExperiences()).flatMap((t=>t.getSteps().filter((t=>t.getRaw().globalPropertyConfigurationAspectNames?.includes(this.property.name)))))}}class sc extends ac{constructor(t,e){super(t,e)}async selectImage(t){await Promise.all([this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,t.key),this.applyImageSelection(t)])}async applyGlobalState(t){const e=this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);if(!e)return Promise.resolve();const A=await Yr.getLocalOrFromServer(e);return A?this.applyImageSelection(A,t):Promise.resolve()}async applyImageSelection(t,e){const A=this.getSharedSteps(e).map((e=>e.selectImage(t)));await Promise.all(A)}}class oc extends ac{constructor(t,e,A){super(t,e),rc(this,"optionResource",void 0),this.optionResource=A}getCurrentVariant(){if(!this.optionResource)return;const t=this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);if(!t)return;const e=this.optionResource.variants?.find((e=>e.id===t));return e?new fo(e):void 0}getAvailableVariants(){return(this.optionResource?.variants?.filter((t=>t.enabled))||[]).map((t=>new fo(t)))}getAllVariants(){return(this.optionResource?.variants||[]).map((t=>new fo(t)))}async selectVariant(t){await Promise.all([this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,t.getId()),this.applyVariantSelection(t)])}async applyGlobalState(t){const e=this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);if(!e)return Promise.resolve();const A=this.optionResource?.variants?.find((t=>t.id===e));return A?this.applyVariantSelection(new fo(A),t):Promise.resolve()}async applyVariantSelection(t,e){const A=this.getSharedSteps(e).map((e=>e.selectVariant(t)));await Promise.all(A)}}const cc=M.gql`
|
|
651
655
|
mutation CreateGlobalPropertyState($bundleId: String!) {
|
|
652
656
|
globalPropertyStateCreate(bundleId: $bundleId) {
|
|
653
657
|
id
|
package/dist/module.js
CHANGED
|
@@ -571,6 +571,10 @@ import{CommandContext as t,AssetType as A,BringForwardCommand as e,BringToFrontC
|
|
|
571
571
|
id
|
|
572
572
|
customer {
|
|
573
573
|
id
|
|
574
|
+
emailAddress
|
|
575
|
+
firstName
|
|
576
|
+
lastName
|
|
577
|
+
phoneNumber
|
|
574
578
|
}
|
|
575
579
|
type
|
|
576
580
|
}
|
|
@@ -647,7 +651,7 @@ import{CommandContext as t,AssetType as A,BringForwardCommand as e,BringToFrontC
|
|
|
647
651
|
id
|
|
648
652
|
}
|
|
649
653
|
}
|
|
650
|
-
`;function ri(t,A,e){return(A=function(t){var A=function(t,A){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,A||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===A?String:Number)(t)}(t,"string");return"symbol"==typeof A?A:String(A)}(A))in t?Object.defineProperty(t,A,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[A]=e,t}class si{constructor(t,A){ri(this,"bundle",void 0),ri(this,"property",void 0),this.bundle=t,this.property=A}getName(){return this.property.name}getDescription(){return this.property.description}getType(){return this.property.type}getSharedSteps(t){return(t??this.bundle.getWorkflowExperiences()).flatMap((t=>t.getSteps().filter((t=>
|
|
654
|
+
`;function ri(t,A,e){return(A=function(t){var A=function(t,A){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,A||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===A?String:Number)(t)}(t,"string");return"symbol"==typeof A?A:String(A)}(A))in t?Object.defineProperty(t,A,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[A]=e,t}class si{constructor(t,A){ri(this,"bundle",void 0),ri(this,"property",void 0),this.bundle=t,this.property=A}getName(){return this.property.name}getDescription(){return this.property.description}getType(){return this.property.type}getSharedSteps(t){return(t??this.bundle.getWorkflowExperiences()).flatMap((t=>t.getSteps().filter((t=>t.getRaw().globalPropertyConfigurationAspectNames?.includes(this.property.name)))))}}class ci extends si{constructor(t,A){super(t,A)}async selectImage(t){await Promise.all([this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,t.key),this.applyImageSelection(t)])}async applyGlobalState(t){const A=this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);if(!A)return Promise.resolve();const e=await HA.getLocalOrFromServer(A);return e?this.applyImageSelection(e,t):Promise.resolve()}async applyImageSelection(t,A){const e=this.getSharedSteps(A).map((A=>A.selectImage(t)));await Promise.all(e)}}class gi extends si{constructor(t,A,e){super(t,A),ri(this,"optionResource",void 0),this.optionResource=e}getCurrentVariant(){if(!this.optionResource)return;const t=this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);if(!t)return;const A=this.optionResource.variants?.find((A=>A.id===t));return A?new fa(A):void 0}getAvailableVariants(){return(this.optionResource?.variants?.filter((t=>t.enabled))||[]).map((t=>new fa(t)))}getAllVariants(){return(this.optionResource?.variants||[]).map((t=>new fa(t)))}async selectVariant(t){await Promise.all([this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,t.getId()),this.applyVariantSelection(t)])}async applyGlobalState(t){const A=this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name);if(!A)return Promise.resolve();const e=this.optionResource?.variants?.find((t=>t.id===A));return e?this.applyVariantSelection(new fa(e),t):Promise.resolve()}async applyVariantSelection(t,A){const e=this.getSharedSteps(A).map((A=>A.selectVariant(t)));await Promise.all(e)}}const li=Zt`
|
|
651
655
|
mutation CreateGlobalPropertyState($bundleId: String!) {
|
|
652
656
|
globalPropertyStateCreate(bundleId: $bundleId) {
|
|
653
657
|
id
|