@spiffcommerce/core 27.2.1-beta.9303d634-cb1d-5844-a597-a4e69b0192f5 → 27.2.1-beta.dabb7794-c627-5751-8578-07b1311c272c
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 +27 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6046,7 +6046,7 @@ class rs {
|
|
|
6046
6046
|
return this.state;
|
|
6047
6047
|
}
|
|
6048
6048
|
runStateCallbacks() {
|
|
6049
|
-
this.stateCallbacks.forEach((t) => t());
|
|
6049
|
+
console.log("LOG: running callbacks"), this.stateCallbacks.forEach((t) => t());
|
|
6050
6050
|
}
|
|
6051
6051
|
apply(t, e) {
|
|
6052
6052
|
if (!this.state)
|
|
@@ -8437,14 +8437,17 @@ class ws {
|
|
|
8437
8437
|
const jn = new ws();
|
|
8438
8438
|
class ys {
|
|
8439
8439
|
async init(t, e, a) {
|
|
8440
|
+
console.log("LOG: q init");
|
|
8440
8441
|
const n = t.option;
|
|
8441
8442
|
if (!n)
|
|
8442
|
-
return null;
|
|
8443
|
+
return console.log("LOG: q no option"), null;
|
|
8443
8444
|
if (a)
|
|
8444
|
-
await this.reload(t, e, a);
|
|
8445
|
+
console.log("LOG: q reload"), await this.reload(t, e, a);
|
|
8445
8446
|
else {
|
|
8447
|
+
console.log("LOG: q no reload");
|
|
8446
8448
|
const i = n.variants;
|
|
8447
8449
|
if (Y.getDefaultVariant(n)) {
|
|
8450
|
+
console.log("LOG: q default");
|
|
8448
8451
|
const o = i == null ? void 0 : i.find((l) => {
|
|
8449
8452
|
var c;
|
|
8450
8453
|
return l.id === ((c = n.defaultVariant) == null ? void 0 : c.id);
|
|
@@ -8452,7 +8455,7 @@ class ys {
|
|
|
8452
8455
|
return this.selectVariantLambda(t, (o == null ? void 0 : o.id) || "", e);
|
|
8453
8456
|
}
|
|
8454
8457
|
}
|
|
8455
|
-
return null;
|
|
8458
|
+
return console.log("LOG: q end"), null;
|
|
8456
8459
|
}
|
|
8457
8460
|
async reload(t, e, a) {
|
|
8458
8461
|
var s;
|
|
@@ -10280,10 +10283,11 @@ class mo {
|
|
|
10280
10283
|
var w;
|
|
10281
10284
|
this.workflowStatePromiseQueue = new xn(1), this.initialized = !1, this.readOnly = !1, this.isReloadedTransaction = !1, this.singleVariantsRenderable = !1, this.stepTags = {}, this.renderLayouts = () => {
|
|
10282
10285
|
var E;
|
|
10283
|
-
if (!this.previewService)
|
|
10286
|
+
if (console.log("LOG: render layouts"), !this.previewService)
|
|
10284
10287
|
return;
|
|
10288
|
+
console.log("LOG: render layouts: service exists");
|
|
10285
10289
|
const S = this.getCommandContext().getAllLayouts(), y = (E = this.getLayoutPreviewService()) == null ? void 0 : E.getAll();
|
|
10286
|
-
if (y)
|
|
10290
|
+
if (console.log(`LOG: render layouts: ${y == null ? void 0 : y.size} handles`), !!y)
|
|
10287
10291
|
for (const [, B] of y)
|
|
10288
10292
|
B.render(S);
|
|
10289
10293
|
}, this.experience = t, this.client = e, this.updateTransaction = o, this.graphQlClient = l, this.commandContext = s, this.reloadedState = h, this.transaction = c, this.readOnly = m, this.singleVariantsRenderable = f, this.confirmedDesign = !1, this.editedSteps = {}, this.informationResults = [], this.mandatorySteps = {}, this.pendingUpdates = [], this.selectionCost = 0, this.workflow = a, this.stepSpecificServices = {}, this.profanityFilter = n, this.pollers = [], this.allScenes = [], this.layouts = i, this.product = d, this.previewService = A, this.modelContainer = g, this.stepElements = {}, this.stepInitialised = {}, this.stepMetadata = {}, this.stepSelections = {}, this.storage = {}, this.validationErrors = { steps: /* @__PURE__ */ new Map() }, this.confirmCallbacks = [], this.editedCallbacks = [], this.elementsCallbacks = [], this.informationResultCallbacks = [], this.initCallbacks = [], this.mandatoryCallbacks = [], this.makingAdjustmentsCallback = [], this.metadataCallbacks = [], this.selectionCallbacks = [], this.stepSpecificStorageCallbacks = {}, this.storageCallbacks = [], this.validationCallbacks = [], this.recipientCallbacks = [], this.currentAdjustingStepId = "", this.renderableContextService = u, (w = this.renderableContextService) == null || w.setWorkflowManager(this), this.isReloadedTransaction = p, this.workflow.steps.forEach((S) => {
|
|
@@ -11510,7 +11514,9 @@ class So extends it {
|
|
|
11510
11514
|
helperData: {}
|
|
11511
11515
|
}, a = j.findLayoutElements(this.manager, this.step), n = j.filterUnsupportedCharacters(t, (d = a[0]) == null ? void 0 : d.fontData), i = !!this.step.data && !!this.step.data.maxLength && n.length > this.step.data.maxLength;
|
|
11512
11516
|
i || (e.input = n);
|
|
11513
|
-
const s = a.length <= 0
|
|
11517
|
+
const s = a.length <= 0;
|
|
11518
|
+
console.log(`LOG: setting text ${t} to ${a.length} regions`);
|
|
11519
|
+
const o = s ? { inputText: n, text: n } : { inputText: n };
|
|
11514
11520
|
this.manager.updateStorage(this.step.stepName, o);
|
|
11515
11521
|
const l = this.manager.getStepStorage(this.step.stepName), c = j.getProcessedInput(
|
|
11516
11522
|
n,
|
|
@@ -14850,40 +14856,40 @@ class Je {
|
|
|
14850
14856
|
}
|
|
14851
14857
|
async applyGlobalPropertyState(t) {
|
|
14852
14858
|
var a;
|
|
14853
|
-
const e = await this.
|
|
14854
|
-
console.log(`
|
|
14855
|
-
for (const n of
|
|
14856
|
-
const i = n.
|
|
14857
|
-
if (console.log(`
|
|
14858
|
-
switch (
|
|
14859
|
+
const e = await this.globalPropertyHandleService.getHandles();
|
|
14860
|
+
console.log(`LOG: ${e.length} handles`);
|
|
14861
|
+
for (const n of t.aspects) {
|
|
14862
|
+
const i = n == null ? void 0 : n.name, s = e.find((o) => o.getName() === i);
|
|
14863
|
+
if (console.log(`LOG: handle for ${i}? ${s}`), s)
|
|
14864
|
+
switch (n.type) {
|
|
14859
14865
|
case z.FileUpload: {
|
|
14860
|
-
const o =
|
|
14861
|
-
l.length > 0 &&
|
|
14862
|
-
const c = (a =
|
|
14866
|
+
const o = s, l = await ve([n.value]);
|
|
14867
|
+
l.length > 0 && await o.selectImage(l[0]);
|
|
14868
|
+
const c = (a = n.storage) == null ? void 0 : a.colors;
|
|
14863
14869
|
if (c) {
|
|
14864
14870
|
const d = Object.fromEntries(
|
|
14865
14871
|
c.map((A) => [A.key, { browserValue: A.browserValue, pmsValue: A.pmsValue }]) ?? []
|
|
14866
14872
|
);
|
|
14867
|
-
await o.changeColors(d)
|
|
14873
|
+
await o.changeColors(d);
|
|
14868
14874
|
}
|
|
14869
14875
|
break;
|
|
14870
14876
|
}
|
|
14871
14877
|
case z.ColorOption: {
|
|
14872
|
-
const o =
|
|
14873
|
-
if (
|
|
14874
|
-
const c = o.getAllVariants().find((d) => d.getId() ===
|
|
14875
|
-
c &&
|
|
14878
|
+
const o = s;
|
|
14879
|
+
if (n.type === z.ColorOption) {
|
|
14880
|
+
const c = o.getAllVariants().find((d) => d.getId() === n.value);
|
|
14881
|
+
c && await o.selectVariant(c);
|
|
14876
14882
|
} else
|
|
14877
|
-
o.setCustomColor(
|
|
14883
|
+
o.setCustomColor(n.value);
|
|
14878
14884
|
break;
|
|
14879
14885
|
}
|
|
14880
14886
|
case z.Option: {
|
|
14881
|
-
const o =
|
|
14882
|
-
c &&
|
|
14887
|
+
const o = s, c = o.getAllVariants().find((d) => d.getId() === n.value);
|
|
14888
|
+
console.log(`LOG: variant for ${n.value}: ${c}`), c && await o.selectVariant(c);
|
|
14883
14889
|
break;
|
|
14884
14890
|
}
|
|
14885
14891
|
case z.Text: {
|
|
14886
|
-
await
|
|
14892
|
+
await s.setText(n.value);
|
|
14887
14893
|
break;
|
|
14888
14894
|
}
|
|
14889
14895
|
}
|
|
@@ -15901,7 +15907,7 @@ class rd {
|
|
|
15901
15907
|
} catch (a) {
|
|
15902
15908
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15903
15909
|
}
|
|
15904
|
-
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.2.1"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15910
|
+
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.2.1-beta.5756496b-3a49-5000-b986-4209fb32572c"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15905
15911
|
}
|
|
15906
15912
|
configure(t) {
|
|
15907
15913
|
mt.setHubUrl(t.hubUrl), mt.setServerUrl(t.serverUrl), mt.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 && $r(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|