@spiffcommerce/core 33.8.1 → 33.8.2-beta.121499d5-b719-583f-9bfe-36a9132cdfd7
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/CHANGELOG.md +10 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3808,6 +3808,10 @@ const _t = new Ii(), kn = C`
|
|
|
3808
3808
|
type
|
|
3809
3809
|
workflowId
|
|
3810
3810
|
displayType
|
|
3811
|
+
integrationOptions {
|
|
3812
|
+
id
|
|
3813
|
+
integrationId
|
|
3814
|
+
}
|
|
3811
3815
|
variants {
|
|
3812
3816
|
id
|
|
3813
3817
|
name
|
|
@@ -14917,12 +14921,22 @@ class ta {
|
|
|
14917
14921
|
getIntegrationProductIds() {
|
|
14918
14922
|
return this.bundleStateManager.getState()?.integrationProductIds;
|
|
14919
14923
|
}
|
|
14920
|
-
addIntegrationProductId(t) {
|
|
14924
|
+
async addIntegrationProductId(t) {
|
|
14921
14925
|
const e = this.bundleStateManager.getState();
|
|
14922
14926
|
if (e) {
|
|
14923
|
-
|
|
14927
|
+
if (!e.integrationProductIds)
|
|
14928
|
+
e.integrationProductIds = [];
|
|
14929
|
+
else if (e.integrationProductIds.some((r) => r === t)) {
|
|
14930
|
+
this.fireEvent("bundle-integration-products-added", {
|
|
14931
|
+
integrationProductIds: e.integrationProductIds
|
|
14932
|
+
});
|
|
14933
|
+
return;
|
|
14934
|
+
}
|
|
14935
|
+
e.integrationProductIds = [...e.integrationProductIds, t];
|
|
14924
14936
|
const a = JSON.stringify(e);
|
|
14925
|
-
|
|
14937
|
+
this.bundleStateManager.setState(a), this.fireEvent("bundle-integration-products-added", {
|
|
14938
|
+
integrationProductIds: e.integrationProductIds
|
|
14939
|
+
}), await S.getShadowGraphqlClient().mutate({
|
|
14926
14940
|
mutation: Za,
|
|
14927
14941
|
variables: {
|
|
14928
14942
|
id: this.id,
|
|
@@ -14931,8 +14945,6 @@ class ta {
|
|
|
14931
14945
|
context: {
|
|
14932
14946
|
bundleOwnerId: this.ownerId
|
|
14933
14947
|
}
|
|
14934
|
-
}), this.bundleStateManager.setState(a), this.fireEvent("bundle-integration-products-added", {
|
|
14935
|
-
integrationProductIds: e.integrationProductIds
|
|
14936
14948
|
});
|
|
14937
14949
|
}
|
|
14938
14950
|
}
|
|
@@ -16160,7 +16172,7 @@ class xd {
|
|
|
16160
16172
|
} catch (a) {
|
|
16161
16173
|
throw console.error(a), new ht("Critical - Unable to synchronize workflow state with server.");
|
|
16162
16174
|
}
|
|
16163
|
-
}, this.options = t, this.options.applicationKey && Xr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.8.
|
|
16175
|
+
}, this.options = t, this.options.applicationKey && Xr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 33.8.2"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
16164
16176
|
}
|
|
16165
16177
|
configure(t) {
|
|
16166
16178
|
gt.setHubUrl(t.hubUrl), gt.setServerUrl(t.serverUrl), gt.setServicesApiUrl(t.servicesApiUrl), this.marketplaceThemeInstallId = t.marketplaceThemeInstallId, this.marketplaceThemeInstallConfigurationId = t.marketplaceThemeInstallConfigurationId, this.userPoolClientId = t.userPoolClientId, this.userPoolRegion = t.userPoolRegion, this.spiffRegion = t.spiffRegion, t.bearerAuthenticationToken && ti(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Vt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|