@spiffcommerce/core 26.38.0-beta.66169735-ea6b-5349-abee-aa31eb02eb75 → 26.38.0-beta.6854b76d-215f-5749-8fa7-ed41a527cc76
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 +25 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -14181,13 +14181,13 @@ class Zn {
|
|
|
14181
14181
|
*/
|
|
14182
14182
|
async fetchProductsFeed(t, e, a, n, i, s) {
|
|
14183
14183
|
if (this.fullFetched) {
|
|
14184
|
-
const
|
|
14184
|
+
const d = await (a ? this.filterProducts(a) : this.fetchProducts());
|
|
14185
14185
|
return {
|
|
14186
|
-
total:
|
|
14187
|
-
items:
|
|
14186
|
+
total: d.length,
|
|
14187
|
+
items: d.slice(t, t + e)
|
|
14188
14188
|
};
|
|
14189
14189
|
}
|
|
14190
|
-
const o = b.getShadowGraphqlClient().watchQuery({
|
|
14190
|
+
const o = new AbortController(), { signal: l } = o, c = b.getShadowGraphqlClient().watchQuery({
|
|
14191
14191
|
query: $s,
|
|
14192
14192
|
variables: {
|
|
14193
14193
|
id: this.getId(),
|
|
@@ -14206,27 +14206,32 @@ class Zn {
|
|
|
14206
14206
|
},
|
|
14207
14207
|
errorPolicy: "all",
|
|
14208
14208
|
fetchPolicy: "cache-first",
|
|
14209
|
-
returnPartialData: !0
|
|
14209
|
+
returnPartialData: !0,
|
|
14210
|
+
context: {
|
|
14211
|
+
fetchOptions: {
|
|
14212
|
+
signal: l
|
|
14213
|
+
}
|
|
14214
|
+
}
|
|
14210
14215
|
});
|
|
14211
|
-
return new Promise((
|
|
14212
|
-
let
|
|
14213
|
-
|
|
14214
|
-
start(
|
|
14215
|
-
|
|
14216
|
+
return new Promise((d) => {
|
|
14217
|
+
let A, u = !1;
|
|
14218
|
+
c.subscribe({
|
|
14219
|
+
start(h) {
|
|
14220
|
+
u ? (h.closed && h.unsubscribe(), o.abort()) : A = h;
|
|
14216
14221
|
},
|
|
14217
|
-
next(
|
|
14218
|
-
var
|
|
14219
|
-
if (
|
|
14222
|
+
next(h) {
|
|
14223
|
+
var g, p, f, C;
|
|
14224
|
+
if (h.partial && !h.data.productCollections || h.data.productCollections.length === 0)
|
|
14220
14225
|
return;
|
|
14221
|
-
|
|
14222
|
-
const
|
|
14223
|
-
|
|
14224
|
-
items: St(
|
|
14225
|
-
total: ((
|
|
14226
|
+
o.abort(), u = !0, A && !A.closed && A.unsubscribe();
|
|
14227
|
+
const m = ((p = (g = h.data.productCollections) == null ? void 0 : g[0].productCollectionProductsFeed) == null ? void 0 : p.items.filter((w) => !!w.product).map((w) => new le(w))) || [];
|
|
14228
|
+
d({
|
|
14229
|
+
items: St(m),
|
|
14230
|
+
total: ((C = (f = h.data.productCollections) == null ? void 0 : f[0].productCollectionProductsFeed) == null ? void 0 : C.total) ?? 0
|
|
14226
14231
|
});
|
|
14227
14232
|
},
|
|
14228
14233
|
error() {
|
|
14229
|
-
|
|
14234
|
+
u || (u = !0, A && !A.closed && A.unsubscribe(), d({ items: [], total: 0 }));
|
|
14230
14235
|
}
|
|
14231
14236
|
});
|
|
14232
14237
|
});
|
|
@@ -15617,7 +15622,7 @@ class _c {
|
|
|
15617
15622
|
} catch (a) {
|
|
15618
15623
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15619
15624
|
}
|
|
15620
|
-
}, 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.
|
|
15625
|
+
}, 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.dd35ec87-db3f-5f27-a7f7-646f6767a676"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15621
15626
|
}
|
|
15622
15627
|
configure(t) {
|
|
15623
15628
|
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();
|