@spiffcommerce/core 26.13.0 → 26.14.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.d.ts +4 -1
- package/dist/index.js +35 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -13924,7 +13924,12 @@ class Qo {
|
|
|
13924
13924
|
}
|
|
13925
13925
|
}
|
|
13926
13926
|
const No = (r, t, e, a) => r.flatMap((n) => n.getSteps()).filter((n) => n.getGlobalPropertyAspects(t).includes(e) && n.getType() === a), Ro = (r, t, e) => {
|
|
13927
|
-
const n = No(
|
|
13927
|
+
const n = No(
|
|
13928
|
+
r,
|
|
13929
|
+
t,
|
|
13930
|
+
e,
|
|
13931
|
+
D.Illustration
|
|
13932
|
+
).map((i) => {
|
|
13928
13933
|
var l;
|
|
13929
13934
|
const s = (l = i.getCurrentVariant()) == null ? void 0 : l.getAssetResource(), o = i.getColors();
|
|
13930
13935
|
return !(s != null && s.assetConfiguration) || !o ? 0 : Object.getOwnPropertyNames(o).length;
|
|
@@ -13944,6 +13949,10 @@ class ze {
|
|
|
13944
13949
|
s
|
|
13945
13950
|
), this.globalPropertyHandleService = new Do(this), this.setPreviewService(a);
|
|
13946
13951
|
const l = new Promise((u, h) => {
|
|
13952
|
+
if (s != null && s.readonly) {
|
|
13953
|
+
u([]);
|
|
13954
|
+
return;
|
|
13955
|
+
}
|
|
13947
13956
|
console.log("Setting default global variants."), this.globalPropertyHandleService.getHandles().then((m) => {
|
|
13948
13957
|
const g = m.map((f) => {
|
|
13949
13958
|
if (f.getType() === tt.ColorOption || f.getType() === tt.Option) {
|
|
@@ -14034,9 +14043,15 @@ class ze {
|
|
|
14034
14043
|
for (const s of t.getStepsByType(D.Illustration)) {
|
|
14035
14044
|
const o = s.getGlobalPropertyAspects(this.globalConfigurationPropertyId || "");
|
|
14036
14045
|
for (const l of o) {
|
|
14037
|
-
const c = (e = this.getGlobalPropertyConfiguration()) == null ? void 0 : e.aspects.find(
|
|
14046
|
+
const c = (e = this.getGlobalPropertyConfiguration()) == null ? void 0 : e.aspects.find(
|
|
14047
|
+
(d) => d.name === l
|
|
14048
|
+
);
|
|
14038
14049
|
if (c && c.type === tt.ColorOption) {
|
|
14039
|
-
const d = (a = s.getCurrentVariant()) == null ? void 0 : a.getAssetResource(), A = ((n = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : n.channelNumbers) || [], u = ((i = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : i.defaultColorVariants) || [], h = Ro(
|
|
14050
|
+
const d = (a = s.getCurrentVariant()) == null ? void 0 : a.getAssetResource(), A = ((n = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : n.channelNumbers) || [], u = ((i = d == null ? void 0 : d.assetConfiguration) == null ? void 0 : i.defaultColorVariants) || [], h = Ro(
|
|
14051
|
+
this.getWorkflowExperiences(),
|
|
14052
|
+
this.globalConfigurationPropertyId || "",
|
|
14053
|
+
l
|
|
14054
|
+
), m = [...new Set(A.map((f) => f.number))];
|
|
14040
14055
|
if (m.length > h)
|
|
14041
14056
|
for (const f of m) {
|
|
14042
14057
|
const p = this.getGlobalPropertyStateManager(), C = u.find((w) => w.channelNumber === f);
|
|
@@ -14914,7 +14929,7 @@ class oc {
|
|
|
14914
14929
|
} catch (a) {
|
|
14915
14930
|
throw console.error(a), new lt("Critical - Unable to synchronize workflow state with server.");
|
|
14916
14931
|
}
|
|
14917
|
-
}, this.options = t, this.options.applicationKey && gr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.
|
|
14932
|
+
}, this.options = t, this.options.applicationKey && gr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.14.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
14918
14933
|
}
|
|
14919
14934
|
configure(t) {
|
|
14920
14935
|
pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && pr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
|
|
@@ -15216,7 +15231,8 @@ class oc {
|
|
|
15216
15231
|
* Retrieves an existing bundle from the API, by id.
|
|
15217
15232
|
* @param bundleId The id of the bundle to retrieve.
|
|
15218
15233
|
* @param previewService Optional: A reference to an existing preview service to use. This can be assigned manually later.
|
|
15219
|
-
* @param graphqlOptions Optional: Options to configure loading the
|
|
15234
|
+
* @param graphqlOptions Optional: Options to configure loading the bundle.
|
|
15235
|
+
* @param options Optional: Options to configure loading the bundle.
|
|
15220
15236
|
* @returns A bundle to be used for grouping and operating on large amounts of workflow experiences.
|
|
15221
15237
|
*/
|
|
15222
15238
|
async getExistingBundle(t, e, a, n) {
|
|
@@ -15244,7 +15260,8 @@ class oc {
|
|
|
15244
15260
|
const g = new ze(this, h, e, a, s, {
|
|
15245
15261
|
additionalHeaders: (I = n == null ? void 0 : n.graphql) == null ? void 0 : I.additionalHeaders,
|
|
15246
15262
|
eagerFetchProducts: (x = (P = n == null ? void 0 : n.graphql) == null ? void 0 : P.productCollection) == null ? void 0 : x.eagerFetchProducts,
|
|
15247
|
-
existingGlobalPropertyState: u.data.globalPropertyState
|
|
15263
|
+
existingGlobalPropertyState: u.data.globalPropertyState,
|
|
15264
|
+
readonly: n == null ? void 0 : n.readonly
|
|
15248
15265
|
});
|
|
15249
15266
|
return await g.getInitializationPromise(), g;
|
|
15250
15267
|
}
|