@spiffcommerce/core 34.0.0-beta.8c15a292-be1c-5189-8ed3-cbd0b34cfa6e → 34.0.0-beta.f9a65e6d-b579-5217-bb7a-7b2964aa0a43
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 +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8902,6 +8902,7 @@ class _o {
|
|
|
8902
8902
|
});
|
|
8903
8903
|
}
|
|
8904
8904
|
updateInputText(t, e, a, i) {
|
|
8905
|
+
console.log("LOG: updateInputText start");
|
|
8905
8906
|
const r = i.getStepStorage(a.stepName), o = xt(t, i), s = this.getProcessedInput(o, a.data, r?.customiseAllText ?? !1), l = {
|
|
8906
8907
|
command: void 0,
|
|
8907
8908
|
helperData: {},
|
|
@@ -8925,7 +8926,7 @@ class _o {
|
|
|
8925
8926
|
`);
|
|
8926
8927
|
c.push(this.generateTextChangeCommandsForRegion(h, a.data, u.id, m));
|
|
8927
8928
|
}
|
|
8928
|
-
return !a.data.curved && e.length > 0 && !Array.from(A.values()).every((h) => h) ? (l.errorData || (l.errorData = {}), l.errorData.doesNotFit = !0, l) : (i.updateStorage(a.stepName, { text: t }), i.updateMetadata(a.stepName, {
|
|
8929
|
+
return !a.data.curved && e.length > 0 && !Array.from(A.values()).every((h) => h) ? (l.errorData || (l.errorData = {}), l.errorData.doesNotFit = !0, l) : (console.log("LOG: updateInputText workflowManager"), i.updateStorage(a.stepName, { text: t }), i.updateMetadata(a.stepName, {
|
|
8929
8930
|
text: s
|
|
8930
8931
|
}), (r?.defaultCleared || !a.data.deleteDefaultOnFocus) && s.trim() !== "" && i.setMandatoryFulfilled(a.stepName, !0), l.command = new $(c), l);
|
|
8931
8932
|
}
|
|
@@ -11360,11 +11361,12 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11360
11361
|
...this.storage,
|
|
11361
11362
|
[t]: { ...this.storage[t], ...e }
|
|
11362
11363
|
};
|
|
11363
|
-
if (!jt(a, this.storage)) {
|
|
11364
|
-
this.storage = a;
|
|
11364
|
+
if (console.log("LOG: updateStorage start"), !jt(a, this.storage)) {
|
|
11365
|
+
console.log("LOG: updateStorage logic"), this.storage = a;
|
|
11365
11366
|
const i = new tn(this.constructSerializableWorkflow());
|
|
11366
11367
|
this.commandContext.apply(i, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
|
11367
11368
|
}
|
|
11369
|
+
console.log("LOG: updateStorage end");
|
|
11368
11370
|
}
|
|
11369
11371
|
constructSerializableWorkflow() {
|
|
11370
11372
|
const t = [];
|
|
@@ -11443,7 +11445,7 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11443
11445
|
return this.workflowStatePromiseQueue.finalize();
|
|
11444
11446
|
}
|
|
11445
11447
|
updateMetadata(t, e) {
|
|
11446
|
-
this.stepMetadata = {
|
|
11448
|
+
console.log("LOG: updateMetadata"), this.stepMetadata = {
|
|
11447
11449
|
...this.stepMetadata,
|
|
11448
11450
|
[t]: { ...this.stepMetadata[t], ...e }
|
|
11449
11451
|
}, this.onMetadataChange();
|
|
@@ -12203,35 +12205,27 @@ class cl extends tt {
|
|
|
12203
12205
|
* @param userInput Input from the user.
|
|
12204
12206
|
*/
|
|
12205
12207
|
setText(t) {
|
|
12206
|
-
console.log(
|
|
12208
|
+
console.log("LOG: setText start");
|
|
12207
12209
|
const e = {
|
|
12208
12210
|
input: t,
|
|
12209
12211
|
helperData: {}
|
|
12210
12212
|
}, a = H.findLayoutElements(this.manager, this.step), i = H.filterUnsupportedCharacters(t, a[0]?.fontData), r = xt(i, this.manager).length, o = !!this.step.data && !!this.step.data.maxLength && r > this.step.data.maxLength;
|
|
12211
12213
|
o || (e.input = i);
|
|
12212
|
-
const s =
|
|
12213
|
-
this.manager.updateStorage(this.step.stepName,
|
|
12214
|
-
const
|
|
12214
|
+
const s = { inputText: i, text: i };
|
|
12215
|
+
this.manager.updateStorage(this.step.stepName, s);
|
|
12216
|
+
const l = this.manager.getStepStorage(this.step.stepName), c = H.getProcessedInput(
|
|
12215
12217
|
i,
|
|
12216
12218
|
this.step.data,
|
|
12217
|
-
|
|
12219
|
+
l?.customiseAllText ?? !1
|
|
12220
|
+
), { command: d, errorData: A, helperData: u } = H.updateInputText(
|
|
12221
|
+
i,
|
|
12222
|
+
a,
|
|
12223
|
+
this.step,
|
|
12224
|
+
this.manager
|
|
12218
12225
|
);
|
|
12219
|
-
|
|
12220
|
-
|
|
12221
|
-
|
|
12222
|
-
}), console.log("LOG: setText regionless");
|
|
12223
|
-
else {
|
|
12224
|
-
const { command: A, errorData: u, helperData: h } = H.updateInputText(
|
|
12225
|
-
i,
|
|
12226
|
-
a,
|
|
12227
|
-
this.step,
|
|
12228
|
-
this.manager
|
|
12229
|
-
);
|
|
12230
|
-
A && this.manager.getCommandDispatcher()(A), e.helperData = h, e.errorData = u, !o && !u && this.manager.updateMetadata(this.step.stepName, {
|
|
12231
|
-
text: d
|
|
12232
|
-
}), console.log("LOG: setText 3");
|
|
12233
|
-
}
|
|
12234
|
-
return console.log("LOG: setText 4"), e;
|
|
12226
|
+
return d && (console.log("LOG: setText command"), this.manager.getCommandDispatcher()(d)), e.helperData = u, e.errorData = A, !o && !A ? this.manager.updateMetadata(this.step.stepName, {
|
|
12227
|
+
text: c
|
|
12228
|
+
}) : console.log(`Text update - Helper data: ${JSON.stringify(u, null, 2)}, Error data: ${JSON.stringify(A, null, 2)}`), e;
|
|
12235
12229
|
}
|
|
12236
12230
|
/**
|
|
12237
12231
|
* Gets the text currently applied to the elements of this step.
|
|
@@ -16123,7 +16117,7 @@ class Rd {
|
|
|
16123
16117
|
} catch (a) {
|
|
16124
16118
|
throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
|
|
16125
16119
|
}
|
|
16126
|
-
}, this.options = t, this.options.applicationKey && ar(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.0"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
16120
|
+
}, this.options = t, this.options.applicationKey && ar(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 34.0.0-beta.3f834cdd-e926-5e26-aac9-a754220b001e"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
16127
16121
|
}
|
|
16128
16122
|
configure(t) {
|
|
16129
16123
|
pt.setHubUrl(t.hubUrl), pt.setServerUrl(t.serverUrl), pt.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 && ir(t.bearerAuthenticationToken), this.options.applicationKey && this.getIntegration(), this.spiffRegion && this.userPoolRegion && this.userPoolClientId && Lt.init(this.spiffRegion, this.userPoolRegion, this.userPoolClientId);
|