@spiffcommerce/core 34.0.0-beta.43ad0c79-b079-5664-b1b2-fe181acf8e51 → 34.0.0-beta.76c71f85-226f-58df-8196-d18c693f246e
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 +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7580,7 +7580,7 @@ class De {
|
|
|
7580
7580
|
svg: d.svg,
|
|
7581
7581
|
colors: i ?? d.colors
|
|
7582
7582
|
};
|
|
7583
|
-
ht.set(t, A), e.setPatternData(A, a);
|
|
7583
|
+
console.log(`LOG: generated ${d.svg}`), ht.set(t, A), e.setPatternData(A, a);
|
|
7584
7584
|
} else {
|
|
7585
7585
|
const o = await Re(t, !0), s = await $e(o), l = {
|
|
7586
7586
|
src: t,
|
|
@@ -8902,7 +8902,6 @@ class _o {
|
|
|
8902
8902
|
});
|
|
8903
8903
|
}
|
|
8904
8904
|
updateInputText(t, e, a, i) {
|
|
8905
|
-
console.log(`LOG: updateInputText start | ${t}`);
|
|
8906
8905
|
const r = i.getStepStorage(a.stepName), o = xt(t, i), s = this.getProcessedInput(o, a.data, r?.customiseAllText ?? !1), l = {
|
|
8907
8906
|
command: void 0,
|
|
8908
8907
|
helperData: {},
|
|
@@ -8926,7 +8925,7 @@ class _o {
|
|
|
8926
8925
|
`);
|
|
8927
8926
|
c.push(this.generateTextChangeCommandsForRegion(h, a.data, u.id, m));
|
|
8928
8927
|
}
|
|
8929
|
-
return !a.data.curved && e.length > 0 && !Array.from(A.values()).every((h) => h) ? (l.errorData || (l.errorData = {}), l.errorData.doesNotFit = !0, l) : (
|
|
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, {
|
|
8930
8929
|
text: s
|
|
8931
8930
|
}), (r?.defaultCleared || !a.data.deleteDefaultOnFocus) && s.trim() !== "" && i.setMandatoryFulfilled(a.stepName, !0), l.command = new $(c), l);
|
|
8932
8931
|
}
|
|
@@ -11361,12 +11360,11 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11361
11360
|
...this.storage,
|
|
11362
11361
|
[t]: { ...this.storage[t], ...e }
|
|
11363
11362
|
};
|
|
11364
|
-
if (
|
|
11365
|
-
|
|
11363
|
+
if (!jt(a, this.storage)) {
|
|
11364
|
+
this.storage = a;
|
|
11366
11365
|
const i = new tn(this.constructSerializableWorkflow());
|
|
11367
11366
|
this.commandContext.apply(i, !0), this.onStepSpecificStorageChange(t), this.onStorageChange();
|
|
11368
11367
|
}
|
|
11369
|
-
console.log("LOG: updateStorage end");
|
|
11370
11368
|
}
|
|
11371
11369
|
constructSerializableWorkflow() {
|
|
11372
11370
|
const t = [];
|
|
@@ -11445,7 +11443,7 @@ const el = (n) => n.sort((t, e) => t.index - e.index).map((t) => ({
|
|
|
11445
11443
|
return this.workflowStatePromiseQueue.finalize();
|
|
11446
11444
|
}
|
|
11447
11445
|
updateMetadata(t, e) {
|
|
11448
|
-
|
|
11446
|
+
this.stepMetadata = {
|
|
11449
11447
|
...this.stepMetadata,
|
|
11450
11448
|
[t]: { ...this.stepMetadata[t], ...e }
|
|
11451
11449
|
}, this.onMetadataChange();
|
|
@@ -12205,27 +12203,34 @@ class cl extends tt {
|
|
|
12205
12203
|
* @param userInput Input from the user.
|
|
12206
12204
|
*/
|
|
12207
12205
|
setText(t) {
|
|
12208
|
-
console.log(`LOG: setText start | ${t}`);
|
|
12209
12206
|
const e = {
|
|
12210
12207
|
input: t,
|
|
12211
12208
|
helperData: {}
|
|
12212
12209
|
}, 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;
|
|
12213
12210
|
o || (e.input = i);
|
|
12214
|
-
const s = { inputText: i, text: i };
|
|
12215
|
-
this.manager.updateStorage(this.step.stepName,
|
|
12216
|
-
const
|
|
12211
|
+
const s = a.length <= 0, l = s ? { inputText: i, text: i } : { inputText: i };
|
|
12212
|
+
this.manager.updateStorage(this.step.stepName, l);
|
|
12213
|
+
const c = this.manager.getStepStorage(this.step.stepName), d = H.getProcessedInput(
|
|
12217
12214
|
i,
|
|
12218
12215
|
this.step.data,
|
|
12219
|
-
|
|
12220
|
-
), { command: d, errorData: A, helperData: u } = H.updateInputText(
|
|
12221
|
-
i,
|
|
12222
|
-
a,
|
|
12223
|
-
this.step,
|
|
12224
|
-
this.manager
|
|
12216
|
+
c?.customiseAllText ?? !1
|
|
12225
12217
|
);
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
|
|
12218
|
+
if (s)
|
|
12219
|
+
o || this.manager.updateMetadata(this.step.stepName, {
|
|
12220
|
+
text: d
|
|
12221
|
+
});
|
|
12222
|
+
else {
|
|
12223
|
+
const { command: A, errorData: u, helperData: h } = H.updateInputText(
|
|
12224
|
+
i,
|
|
12225
|
+
a,
|
|
12226
|
+
this.step,
|
|
12227
|
+
this.manager
|
|
12228
|
+
);
|
|
12229
|
+
A && this.manager.getCommandDispatcher()(A), e.helperData = h, e.errorData = u, !o && !u && this.manager.updateMetadata(this.step.stepName, {
|
|
12230
|
+
text: d
|
|
12231
|
+
});
|
|
12232
|
+
}
|
|
12233
|
+
return e;
|
|
12229
12234
|
}
|
|
12230
12235
|
/**
|
|
12231
12236
|
* Gets the text currently applied to the elements of this step.
|
|
@@ -16117,7 +16122,7 @@ class Rd {
|
|
|
16117
16122
|
} catch (a) {
|
|
16118
16123
|
throw console.error(a), new gt("Critical - Unable to synchronize workflow state with server.");
|
|
16119
16124
|
}
|
|
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
|
|
16125
|
+
}, 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("------------------------");
|
|
16121
16126
|
}
|
|
16122
16127
|
configure(t) {
|
|
16123
16128
|
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);
|