@spiffcommerce/core 26.38.0-beta.95db9919-4320-51f8-986e-5467ea068975 → 26.38.0-beta.c075b660-81f1-5d25-b159-274e43a604e0
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.js +115 -115
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -347,9 +347,8 @@ class $r {
|
|
|
347
347
|
headers: l
|
|
348
348
|
};
|
|
349
349
|
}), a = cr(({ operation: i, graphQLErrors: s, networkError: o }) => {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
o && !((A = (d = c == null ? void 0 : c.fetchOptions) == null ? void 0 : d.signal) != null && A.aborted) && console.log("GraphQL Network error"), l.forEach(() => console.log("GraphQL Error: " + i.operationName));
|
|
350
|
+
const l = s || [];
|
|
351
|
+
o && console.log("GraphQL Network error"), l.forEach(() => console.log("GraphQL Error: " + i.operationName));
|
|
353
352
|
}), n = Ar();
|
|
354
353
|
return new ir({
|
|
355
354
|
link: sr([n, a, e, t]),
|
|
@@ -14182,13 +14181,13 @@ class Zn {
|
|
|
14182
14181
|
*/
|
|
14183
14182
|
async fetchProductsFeed(t, e, a, n, i, s) {
|
|
14184
14183
|
if (this.fullFetched) {
|
|
14185
|
-
const
|
|
14184
|
+
const l = await (a ? this.filterProducts(a) : this.fetchProducts());
|
|
14186
14185
|
return {
|
|
14187
|
-
total:
|
|
14188
|
-
items:
|
|
14186
|
+
total: l.length,
|
|
14187
|
+
items: l.slice(t, t + e)
|
|
14189
14188
|
};
|
|
14190
14189
|
}
|
|
14191
|
-
const o =
|
|
14190
|
+
const o = b.getShadowGraphqlClient().watchQuery({
|
|
14192
14191
|
query: $s,
|
|
14193
14192
|
variables: {
|
|
14194
14193
|
id: this.getId(),
|
|
@@ -14207,30 +14206,24 @@ class Zn {
|
|
|
14207
14206
|
},
|
|
14208
14207
|
errorPolicy: "all",
|
|
14209
14208
|
fetchPolicy: "cache-first",
|
|
14210
|
-
returnPartialData: !0
|
|
14211
|
-
context: {
|
|
14212
|
-
fetchOptions: {
|
|
14213
|
-
signal: l
|
|
14214
|
-
}
|
|
14215
|
-
}
|
|
14209
|
+
returnPartialData: !0
|
|
14216
14210
|
});
|
|
14217
|
-
return new Promise((
|
|
14218
|
-
let
|
|
14219
|
-
|
|
14220
|
-
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
|
-
|
|
14225
|
-
const
|
|
14226
|
-
|
|
14227
|
-
items: St(
|
|
14228
|
-
|
|
14229
|
-
total: ((C = (f = h.data.productCollections) == null ? void 0 : f[0].productCollectionProductsFeed) == null ? void 0 : C.total) ?? 0
|
|
14211
|
+
return new Promise((l) => {
|
|
14212
|
+
let c;
|
|
14213
|
+
o.subscribe({
|
|
14214
|
+
start(d) {
|
|
14215
|
+
c = d;
|
|
14216
|
+
},
|
|
14217
|
+
next(d) {
|
|
14218
|
+
var u, h, m, g;
|
|
14219
|
+
const A = ((h = (u = d.data.productCollections) == null ? void 0 : u[0].productCollectionProductsFeed) == null ? void 0 : h.items.filter((p) => !!p.product).map((p) => new le(p))) || [];
|
|
14220
|
+
c.unsubscribe(), l({
|
|
14221
|
+
items: St(A),
|
|
14222
|
+
total: ((g = (m = d.data.productCollections) == null ? void 0 : m[0].productCollectionProductsFeed) == null ? void 0 : g.total) ?? 0
|
|
14230
14223
|
});
|
|
14231
14224
|
},
|
|
14232
14225
|
error() {
|
|
14233
|
-
|
|
14226
|
+
c.unsubscribe(), l({ items: [], total: 0 });
|
|
14234
14227
|
}
|
|
14235
14228
|
});
|
|
14236
14229
|
});
|
|
@@ -15621,7 +15614,7 @@ class _c {
|
|
|
15621
15614
|
} catch (a) {
|
|
15622
15615
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15623
15616
|
}
|
|
15624
|
-
}, this.options = t, this.options.applicationKey && Mr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.38.0-beta.
|
|
15617
|
+
}, this.options = t, this.options.applicationKey && Mr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 26.38.0-beta.80e34d2f-713a-50e1-b7a6-351ce333b68b"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15625
15618
|
}
|
|
15626
15619
|
configure(t) {
|
|
15627
15620
|
mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, t.bearerAuthenticationToken && Qr(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration();
|