@spiffcommerce/core 27.0.0-beta.13aa0f1e-5cb6-5e64-afe5-83b8ea2e14d3 → 27.0.0-beta.493f849d-ee2a-5ab9-ba4f-2a7b1fc6e879
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 +6 -0
- package/dist/index.js +118 -118
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5874,14 +5874,24 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5874
5874
|
};
|
|
5875
5875
|
})()
|
|
5876
5876
|
} : r, ya = 1.1, ts = (r) => {
|
|
5877
|
-
var m, g, p, f, C;
|
|
5878
|
-
const e = (r.rotation || 0) * Math.PI / 180, a = Math.cos(e), n = -Math.sin(e), i = `text-path-${r.id}`, s = `text-fill-${r.id}`, o = r.x + (r.curved ? 0 : r.width / 2), l = r.y + (r.curved ? 0 : r.height / 2)
|
|
5879
|
-
|
|
5877
|
+
var m, g, p, f, C, w;
|
|
5878
|
+
const e = (r.rotation || 0) * Math.PI / 180, a = Math.cos(e), n = -Math.sin(e), i = `text-path-${r.id}`, s = `text-fill-${r.id}`, o = r.x + (r.curved ? 0 : r.width / 2), l = r.y + (r.curved ? 0 : r.height / 2);
|
|
5879
|
+
let c = "";
|
|
5880
|
+
try {
|
|
5881
|
+
console.log(
|
|
5882
|
+
"Rendering template with context",
|
|
5883
|
+
JSON.stringify((m = r._renderingConfiguration) == null ? void 0 : m.templatingContext)
|
|
5884
|
+
), c = gr.compile(r.text || "")((g = r._renderingConfiguration) == null ? void 0 : g.templatingContext);
|
|
5885
|
+
} catch (S) {
|
|
5886
|
+
console.log("failed to render template from text element", S), c = r.text ?? "";
|
|
5887
|
+
}
|
|
5888
|
+
const d = c.split(`
|
|
5889
|
+
`), A = (p = r.strokeColor) != null && p.browserValue && r.strokeThickness ? (f = r.strokeColor) == null ? void 0 : f.browserValue : void 0, u = (C = r.strokeColor) != null && C.browserValue && r.strokeThickness ? r.strokeThickness : void 0;
|
|
5880
5890
|
if (r.curved && !r.paths || !r.fontData)
|
|
5881
5891
|
return null;
|
|
5882
5892
|
const h = () => {
|
|
5883
|
-
var
|
|
5884
|
-
return r.textFillImage ? `url("#${s}")` : (
|
|
5893
|
+
var S;
|
|
5894
|
+
return r.textFillImage ? `url("#${s}")` : (S = r._renderingConfiguration) != null && S.spotColors && r.fillSpotColorDefinition ? `${r.fill} ${fn(r.fillSpotColorDefinition)}` : r.fill;
|
|
5885
5895
|
};
|
|
5886
5896
|
return /* @__PURE__ */ ct(Gt, { children: [
|
|
5887
5897
|
/* @__PURE__ */ ct("defs", { children: [
|
|
@@ -5921,7 +5931,7 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5921
5931
|
),
|
|
5922
5932
|
r.curved && r.paths ? /* @__PURE__ */ x("path", { id: i, d: r.paths[0] }) : void 0
|
|
5923
5933
|
] }),
|
|
5924
|
-
(
|
|
5934
|
+
(w = r._renderingConfiguration) != null && w.debug ? /* @__PURE__ */ x("rect", { stroke: "blue", fill: "none", x: r.x, y: r.y, width: r.width, height: r.height }) : void 0,
|
|
5925
5935
|
/* @__PURE__ */ x("g", { mask: r.stepName ? void 0 : r.mask, children: /* @__PURE__ */ x("g", { transform: `matrix(${a}, ${-n}, ${n}, ${a}, ${o}, ${l})`, children: /* @__PURE__ */ x(
|
|
5926
5936
|
"text",
|
|
5927
5937
|
{
|
|
@@ -5937,21 +5947,21 @@ const Hi = (r) => r.substring(0, 5).toLowerCase().trim() === "data:", Ue = /* @_
|
|
|
5937
5947
|
},
|
|
5938
5948
|
stroke: A,
|
|
5939
5949
|
strokeWidth: u,
|
|
5940
|
-
children: r.curved ? /* @__PURE__ */ x(as, { text: c, curvedPathId: i, align: r.align }) : d.map((
|
|
5950
|
+
children: r.curved ? /* @__PURE__ */ x(as, { text: c, curvedPathId: i, align: r.align }) : d.map((S, v) => /* @__PURE__ */ x(
|
|
5941
5951
|
es,
|
|
5942
5952
|
{
|
|
5943
5953
|
align: r.vertical ? "center" : r.align,
|
|
5944
5954
|
fontSize: r.fontSize,
|
|
5945
|
-
thisLineIdx:
|
|
5955
|
+
thisLineIdx: v,
|
|
5946
5956
|
amountLines: d.length,
|
|
5947
|
-
text:
|
|
5957
|
+
text: S,
|
|
5948
5958
|
textboxHeight: r.height,
|
|
5949
5959
|
textboxWidth: r.width,
|
|
5950
5960
|
lineHeight: r.lineHeight,
|
|
5951
5961
|
vertical: r.vertical,
|
|
5952
5962
|
verticalAlign: r.verticalAlign
|
|
5953
5963
|
},
|
|
5954
|
-
|
|
5964
|
+
v
|
|
5955
5965
|
))
|
|
5956
5966
|
}
|
|
5957
5967
|
) }) })
|
|
@@ -15775,7 +15785,7 @@ class rd {
|
|
|
15775
15785
|
} catch (a) {
|
|
15776
15786
|
throw console.error(a), new ut("Critical - Unable to synchronize workflow state with server.");
|
|
15777
15787
|
}
|
|
15778
|
-
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.0.0-beta.
|
|
15788
|
+
}, this.options = t, this.options.applicationKey && Rr(this.options.applicationKey), console.debug("------------------------"), console.debug("Spiff Commerce Core SDK"), console.debug("Version: 27.0.0-beta.dd54188f-e25d-5605-a565-cd093566398b"), console.debug(`Application Key Provided: ${!!this.options.applicationKey}`), console.debug("------------------------");
|
|
15779
15789
|
}
|
|
15780
15790
|
configure(t) {
|
|
15781
15791
|
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);
|