@chili-publish/studio-sdk 1.35.0 → 1.36.0
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/_bundles/main.es.js +83 -83
- package/_bundles/main.es.js.map +1 -1
- package/_bundles/main.js +2 -2
- package/_bundles/main.js.map +1 -1
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +1 -1
- package/lib/src/controllers/FrameController.d.ts +14 -0
- package/lib/src/controllers/FrameController.js +20 -0
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js +14 -0
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/types/FrameTypes.d.ts +1 -1
- package/package.json +1 -1
package/_bundles/main.es.js
CHANGED
|
@@ -3,9 +3,9 @@ var Me = (s) => {
|
|
|
3
3
|
};
|
|
4
4
|
var xe = (s, o, t) => o.has(s) || Me("Cannot " + t);
|
|
5
5
|
var a = (s, o, t) => (xe(s, o, "read from private field"), t ? t.call(s) : o.get(s)), u = (s, o, t) => o.has(s) ? Me("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(s) : o.set(s, t), g = (s, o, t, e) => (xe(s, o, "write to private field"), e ? e.call(s, t) : o.set(s, t), t);
|
|
6
|
-
const Ms = "2.
|
|
6
|
+
const Ms = "2.19.latest", Ss = {
|
|
7
7
|
current: Ms
|
|
8
|
-
}, xs = "1.
|
|
8
|
+
}, xs = "1.36.0", bs = {
|
|
9
9
|
version: xs
|
|
10
10
|
};
|
|
11
11
|
var z;
|
|
@@ -63,7 +63,7 @@ const Rs = (s, o) => {
|
|
|
63
63
|
return Object.keys(s).forEach((t) => o[t] = s[t]), o;
|
|
64
64
|
}, _s = (s, o, t) => {
|
|
65
65
|
const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: h } = s;
|
|
66
|
-
let
|
|
66
|
+
let d = !1;
|
|
67
67
|
const p = (y) => {
|
|
68
68
|
if (y.source !== n || y.data.penpal !== z.Call)
|
|
69
69
|
return;
|
|
@@ -74,7 +74,7 @@ const Rs = (s, o) => {
|
|
|
74
74
|
const v = y.data, { methodName: f, args: b, id: A } = v;
|
|
75
75
|
t(`${e}: Received ${f}() call`);
|
|
76
76
|
const I = (S) => (M) => {
|
|
77
|
-
if (t(`${e}: Sending ${f}() reply`),
|
|
77
|
+
if (t(`${e}: Sending ${f}() reply`), d) {
|
|
78
78
|
t(`${e}: Unable to send ${f}() reply due to destroyed connection`);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
@@ -104,7 +104,7 @@ const Rs = (s, o) => {
|
|
|
104
104
|
new Promise((S) => S(o[f].apply(o, b))).then(I(ut.Fulfilled), I(ut.Rejected));
|
|
105
105
|
};
|
|
106
106
|
return r.addEventListener(dt.Message, p), () => {
|
|
107
|
-
|
|
107
|
+
d = !0, r.removeEventListener(dt.Message, p);
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
let Hs = 0;
|
|
@@ -126,7 +126,7 @@ const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s
|
|
|
126
126
|
zs(o, t, s[t]);
|
|
127
127
|
return o;
|
|
128
128
|
}, js = (s, o, t, e, r) => {
|
|
129
|
-
const { localName: n, local: c, remote: h, originForSending:
|
|
129
|
+
const { localName: n, local: c, remote: h, originForSending: d, originForReceiving: p } = o;
|
|
130
130
|
let y = !1;
|
|
131
131
|
r(`${n}: Connecting call sender`);
|
|
132
132
|
const v = (b) => (...A) => {
|
|
@@ -161,7 +161,7 @@ const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s
|
|
|
161
161
|
methodName: b,
|
|
162
162
|
args: A
|
|
163
163
|
};
|
|
164
|
-
h.postMessage(W,
|
|
164
|
+
h.postMessage(W, d);
|
|
165
165
|
});
|
|
166
166
|
}, f = t.reduce((b, A) => (b[A] = v(A), b), {});
|
|
167
167
|
return Object.assign(s, Ws(f)), () => {
|
|
@@ -169,7 +169,7 @@ const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s
|
|
|
169
169
|
};
|
|
170
170
|
}, qs = (s, o, t, e, r) => {
|
|
171
171
|
const { destroy: n, onDestroy: c } = e;
|
|
172
|
-
let h,
|
|
172
|
+
let h, d;
|
|
173
173
|
const p = {};
|
|
174
174
|
return (y) => {
|
|
175
175
|
if (y.origin !== o) {
|
|
@@ -184,10 +184,10 @@ const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s
|
|
|
184
184
|
originForSending: t,
|
|
185
185
|
originForReceiving: o
|
|
186
186
|
};
|
|
187
|
-
h && h(), h = _s(v, s, r), c(h),
|
|
187
|
+
h && h(), h = _s(v, s, r), c(h), d && d.forEach((b) => {
|
|
188
188
|
delete p[b];
|
|
189
|
-
}),
|
|
190
|
-
const f = js(p, v,
|
|
189
|
+
}), d = y.data.methodNames;
|
|
190
|
+
const f = js(p, v, d, n, r);
|
|
191
191
|
return c(f), p;
|
|
192
192
|
};
|
|
193
193
|
}, Ys = (s, o, t, e) => (r) => {
|
|
@@ -223,7 +223,7 @@ const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s
|
|
|
223
223
|
}
|
|
224
224
|
}, er = (s) => {
|
|
225
225
|
let { iframe: o, methods: t = {}, childOrigin: e, timeout: r, debug: n = !1 } = s;
|
|
226
|
-
const c = Vs(n), h = Rs("Parent", c), { onDestroy:
|
|
226
|
+
const c = Vs(n), h = Rs("Parent", c), { onDestroy: d, destroy: p } = h;
|
|
227
227
|
e || (tr(o), e = Us(o.src));
|
|
228
228
|
const y = e === "null" ? "*" : e, v = As(t), f = Ys(c, v, e, y), b = qs(v, e, y, h, c);
|
|
229
229
|
return {
|
|
@@ -241,7 +241,7 @@ const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
window.addEventListener(dt.Message, E), c("Parent: Awaiting handshake"), Qs(o, h),
|
|
244
|
+
window.addEventListener(dt.Message, E), c("Parent: Awaiting handshake"), Qs(o, h), d((P) => {
|
|
245
245
|
window.removeEventListener(dt.Message, E), P && S(P);
|
|
246
246
|
});
|
|
247
247
|
}),
|
|
@@ -329,7 +329,7 @@ const nr = (s, o, t, e = "chili-editor", r, n) => {
|
|
|
329
329
|
Qt && window.removeEventListener("message", Qt);
|
|
330
330
|
const c = `#${e}`, h = document.createElement("iframe");
|
|
331
331
|
h.setAttribute("srcdoc", " "), h.setAttribute("title", "Chili-Editor"), h.setAttribute("style", "width: 100%; height: 100%;"), h.setAttribute("frameBorder", "0"), h.setAttribute("referrerpolicy", "origin");
|
|
332
|
-
const
|
|
332
|
+
const d = () => {
|
|
333
333
|
const p = document.querySelector(c);
|
|
334
334
|
if (p) {
|
|
335
335
|
p == null || p.appendChild(h), h.addEventListener(
|
|
@@ -347,8 +347,8 @@ const nr = (s, o, t, e = "chili-editor", r, n) => {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
document.readyState === "complete" || document.readyState === "interactive" ?
|
|
351
|
-
|
|
350
|
+
document.readyState === "complete" || document.readyState === "interactive" ? d() : document.addEventListener("DOMContentLoaded", () => {
|
|
351
|
+
d();
|
|
352
352
|
}), Qt = (p) => {
|
|
353
353
|
var y;
|
|
354
354
|
if (p.source === h.contentWindow && ((y = p.data) == null ? void 0 : y.type) === "iframe-error") {
|
|
@@ -536,7 +536,7 @@ class Ge {
|
|
|
536
536
|
const r = { drawStartStopChars: e };
|
|
537
537
|
return this.setBarcodeProperties(t, r);
|
|
538
538
|
}, this.getBarcodeConfigationOptions = (t) => {
|
|
539
|
-
let e = !0, r = !0, n = !0, c, h,
|
|
539
|
+
let e = !0, r = !0, n = !0, c, h, d = !1, p = !1, y = !1;
|
|
540
540
|
switch (t) {
|
|
541
541
|
case $.qr:
|
|
542
542
|
c = [vt.iso8859_1, vt.utf8], h = [
|
|
@@ -546,7 +546,7 @@ class Ge {
|
|
|
546
546
|
Rt.high
|
|
547
547
|
];
|
|
548
548
|
case $.dataMatrix:
|
|
549
|
-
e = !1, r = !1, n = !1,
|
|
549
|
+
e = !1, r = !1, n = !1, d = !0;
|
|
550
550
|
break;
|
|
551
551
|
case $.ean13:
|
|
552
552
|
e = !1, p = !0;
|
|
@@ -576,7 +576,7 @@ class Ge {
|
|
|
576
576
|
allowedCharacterSets: c,
|
|
577
577
|
allowedErrorCorrectionLevels: h,
|
|
578
578
|
allowToggleText: e,
|
|
579
|
-
quietZoneAlwaysCombined:
|
|
579
|
+
quietZoneAlwaysCombined: d,
|
|
580
580
|
allowToggleLightMarginIndicator: p,
|
|
581
581
|
allowToggleDrawStartAndEndChar: y
|
|
582
582
|
};
|
|
@@ -603,7 +603,7 @@ const Be = (s) => s.type === T.hex, ie = (s) => s.type === T.spotHex, pr = (s) =
|
|
|
603
603
|
brandKitFontFamilyGuid: n,
|
|
604
604
|
fontStyleId: c,
|
|
605
605
|
textStrokeColorGuid: h,
|
|
606
|
-
textStrokeColorApplied:
|
|
606
|
+
textStrokeColorApplied: d,
|
|
607
607
|
textStrokeWidth: p,
|
|
608
608
|
...y
|
|
609
609
|
} = s;
|
|
@@ -625,11 +625,11 @@ const Be = (s) => s.type === T.hex, ie = (s) => s.type === T.spotHex, pr = (s) =
|
|
|
625
625
|
id: t.id,
|
|
626
626
|
color: t.color,
|
|
627
627
|
type: ae.brandKit,
|
|
628
|
-
isApplied:
|
|
628
|
+
isApplied: d || !1
|
|
629
629
|
}
|
|
630
630
|
},
|
|
631
631
|
strokeColorApplied: {
|
|
632
|
-
value:
|
|
632
|
+
value: d || !1
|
|
633
633
|
},
|
|
634
634
|
strokeWidth: {
|
|
635
635
|
value: p != null ? p.toString() : p
|
|
@@ -673,10 +673,10 @@ class _e {
|
|
|
673
673
|
*/
|
|
674
674
|
u(this, D);
|
|
675
675
|
this.getId = async () => (await a(this, D)).getBrandKitId().then((r) => i(r)), this.getVersion = async () => (await a(this, D)).getBrandKitVersion().then((r) => i(r)), this.getName = async () => (await a(this, D)).getBrandKitName().then((r) => i(r)), this.rename = async (e) => (await a(this, D)).renameBrandKit(e).then((n) => i(n)), this.updateIdAndVersion = async (e, r) => (await a(this, D)).updateBrandKitIdAndVersion(e, r).then((c) => i(c)), this.get = async () => {
|
|
676
|
-
const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), h = this.gradientStyleController.getAll(),
|
|
676
|
+
const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), h = this.gradientStyleController.getAll(), d = this.fontController.getFontFamilies(), p = this.characterStyleController.getAll(), y = this.paragraphStyleController.getAll(), v = this.getAllMedia(), [f, b, A, I, S, M] = await Promise.all([
|
|
677
677
|
c,
|
|
678
678
|
h,
|
|
679
|
-
|
|
679
|
+
d,
|
|
680
680
|
y,
|
|
681
681
|
p,
|
|
682
682
|
v
|
|
@@ -701,13 +701,13 @@ class _e {
|
|
|
701
701
|
};
|
|
702
702
|
return i(P);
|
|
703
703
|
}, this.getAllMedia = async () => (await a(this, D)).getAllBrandKitMedia().then((r) => i(r)), this.addMedia = async (e, r, n) => (await a(this, D)).addBrandKitMedia(e, r, n).then((h) => i(h)), this.updateMedia = async (e, r, n) => (await a(this, D)).updateBrandKitMedia(e, r, n).then((h) => i(h)), this.renameMedia = async (e, r) => (await a(this, D)).renameBrandKitMedia(e, r).then((c) => i(c)), this.removeMedia = async (e) => (await a(this, D)).removeBrandKitMedia(e).then((n) => i(n)), this.remove = async () => {
|
|
704
|
-
const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.gradientStyleController.getAll()).parsedData || [],
|
|
704
|
+
const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.gradientStyleController.getAll()).parsedData || [], d = (await this.paragraphStyleController.getAll()).parsedData || [], y = (await this.characterStyleController.getAll()).parsedData || [], f = (await this.fontController.getFontFamilies()).parsedData || [], A = (await this.getAllMedia()).parsedData || [];
|
|
705
705
|
await this.undoManagerController.record("brandKit.remove", async (I) => {
|
|
706
706
|
for (const S of r)
|
|
707
707
|
await I.colorStyle.remove(S.id);
|
|
708
708
|
for (const S of c)
|
|
709
709
|
await I.gradientStyle.remove(S.id);
|
|
710
|
-
for (const S of
|
|
710
|
+
for (const S of d)
|
|
711
711
|
await I.paragraphStyle.remove(S.id);
|
|
712
712
|
for (const S of y)
|
|
713
713
|
await I.characterStyle.remove(S.id);
|
|
@@ -735,14 +735,14 @@ class _e {
|
|
|
735
735
|
return await this.undoManagerController.record("brandKit.set", async (n) => {
|
|
736
736
|
const c = await this.setColors(e, n);
|
|
737
737
|
await this.setGradients(e, n);
|
|
738
|
-
const h = await this.setFonts(e, n), { parsedData:
|
|
738
|
+
const h = await this.setFonts(e, n), { parsedData: d = [] } = await n.colorStyle.getAll(), { parsedData: p = [] } = await n.gradientStyle.getAll(), { parsedData: y } = await n.font.getFontFamilies();
|
|
739
739
|
await this.setParagraphStyles(e, n, {
|
|
740
|
-
localColors:
|
|
740
|
+
localColors: d,
|
|
741
741
|
localFonts: y,
|
|
742
742
|
localColorGuidMap: c,
|
|
743
743
|
localFontGuidMap: h
|
|
744
744
|
}), await this.setCharacterStyles(e, n, {
|
|
745
|
-
localColors:
|
|
745
|
+
localColors: d,
|
|
746
746
|
localFonts: y,
|
|
747
747
|
localColorGuidMap: c,
|
|
748
748
|
localFontGuidMap: h
|
|
@@ -755,7 +755,7 @@ class _e {
|
|
|
755
755
|
id: e.id,
|
|
756
756
|
version: e.brandKit.lastModifiedDate,
|
|
757
757
|
name: e.brandKit.name,
|
|
758
|
-
colors:
|
|
758
|
+
colors: d || [],
|
|
759
759
|
gradients: p || [],
|
|
760
760
|
fonts: y || [],
|
|
761
761
|
paragraphStyles: v || [],
|
|
@@ -796,31 +796,31 @@ class _e {
|
|
|
796
796
|
}
|
|
797
797
|
async setParagraphStyles(o, t, e) {
|
|
798
798
|
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
|
|
799
|
-
for (const
|
|
800
|
-
const p = c.get(
|
|
799
|
+
for (const d of o.brandKit.paragraphStyles || []) {
|
|
800
|
+
const p = c.get(d.brandKitColorGuid), y = c.get(d.textStrokeColorGuid), v = h.get(d.brandKitFontFamilyGuid), f = ke(n, v, d.fontStyleId);
|
|
801
801
|
if (!v || !f)
|
|
802
|
-
throw new Error(`Paragraph style could not be created with an empty font family: ${
|
|
802
|
+
throw new Error(`Paragraph style could not be created with an empty font family: ${d.name}`);
|
|
803
803
|
const b = Xt(r, p), A = Xt(r, y);
|
|
804
|
-
if (!b) throw new Error(`Paragraph style could not be created with an empty color: ${
|
|
804
|
+
if (!b) throw new Error(`Paragraph style could not be created with an empty color: ${d.name}`);
|
|
805
805
|
const { parsedData: I } = await t.paragraphStyle.create(), S = Ue(
|
|
806
|
-
|
|
806
|
+
d,
|
|
807
807
|
b,
|
|
808
808
|
A,
|
|
809
809
|
`${f}`
|
|
810
810
|
);
|
|
811
|
-
await t.paragraphStyle.rename(I,
|
|
811
|
+
await t.paragraphStyle.rename(I, d.name), await t.paragraphStyle.update(I, S);
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
async setCharacterStyles(o, t, e) {
|
|
815
815
|
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
|
|
816
|
-
for (const
|
|
817
|
-
const p =
|
|
818
|
-
|
|
816
|
+
for (const d of o.brandKit.characterStyles || []) {
|
|
817
|
+
const p = d.brandKitColorGuid ? c.get(d.brandKitColorGuid) : void 0, y = d.textStrokeColorGuid ? c.get(d.textStrokeColorGuid) : void 0, v = d.brandKitFontFamilyGuid ? h.get(d.brandKitFontFamilyGuid) : void 0, f = Xt(r, p), b = Xt(r, y), A = ke(n, v, d.fontStyleId), { parsedData: I } = await t.characterStyle.create(), S = Ue(
|
|
818
|
+
d,
|
|
819
819
|
f,
|
|
820
820
|
b,
|
|
821
821
|
A
|
|
822
822
|
);
|
|
823
|
-
await t.characterStyle.rename(I,
|
|
823
|
+
await t.characterStyle.rename(I, d.name), await t.characterStyle.update(I, S);
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
async setMedia(o) {
|
|
@@ -839,7 +839,7 @@ class oe {
|
|
|
839
839
|
* @ignore
|
|
840
840
|
*/
|
|
841
841
|
u(this, st);
|
|
842
|
-
this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, st)).zoomToPage(e, r, n, c).then((
|
|
842
|
+
this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, st)).zoomToPage(e, r, n, c).then((d) => i(d))), this.getZoomPercentage = async () => (await a(this, st)).getZoomPercentage().then((e) => i(e)), this.setZoomPercentage = async (t) => (await a(this, st)).setZoomPercentage(t).then((r) => i(r)), this.setViewMode = async (t) => (await a(this, st)).setViewMode(t).then((r) => i(r)), g(this, st, o);
|
|
843
843
|
}
|
|
844
844
|
}
|
|
845
845
|
st = new WeakMap();
|
|
@@ -1005,20 +1005,20 @@ let ze = (Cs = class {
|
|
|
1005
1005
|
let h = 0;
|
|
1006
1006
|
try {
|
|
1007
1007
|
for (; h * c < n; ) {
|
|
1008
|
-
const
|
|
1009
|
-
if (
|
|
1008
|
+
const d = await this.getState(e);
|
|
1009
|
+
if (d.success && d.parsedData && (d.parsedData.type === he.running || d.parsedData.type === he.ready))
|
|
1010
1010
|
return i(
|
|
1011
1011
|
{ data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
|
|
1012
1012
|
!1
|
|
1013
1013
|
);
|
|
1014
1014
|
await new Promise((p) => setTimeout(p, c)), h++;
|
|
1015
1015
|
}
|
|
1016
|
-
} catch (
|
|
1016
|
+
} catch (d) {
|
|
1017
1017
|
return i(
|
|
1018
1018
|
{
|
|
1019
1019
|
data: null,
|
|
1020
1020
|
success: !1,
|
|
1021
|
-
error: `Error while getting connector state ${
|
|
1021
|
+
error: `Error while getting connector state ${d}`,
|
|
1022
1022
|
status: 5e4,
|
|
1023
1023
|
parsedData: void 0
|
|
1024
1024
|
},
|
|
@@ -1040,7 +1040,7 @@ let ze = (Cs = class {
|
|
|
1040
1040
|
(y) => !r.some(
|
|
1041
1041
|
(v) => v.name === y.name && v.direction === y.direction
|
|
1042
1042
|
)
|
|
1043
|
-
)) ?? [],
|
|
1043
|
+
)) ?? [], d = r.filter((y) => y.name !== "" && y.value !== ""), p = [...h, ...d];
|
|
1044
1044
|
await n.setMappings(p);
|
|
1045
1045
|
}), g(this, J, o), g(this, It, t), g(this, gt, new ye());
|
|
1046
1046
|
}
|
|
@@ -1091,13 +1091,13 @@ class We {
|
|
|
1091
1091
|
u(this, nt);
|
|
1092
1092
|
u(this, Ht);
|
|
1093
1093
|
this.getPage = async (e, r, n = {}) => (await a(this, nt)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((h) => i(h)).then((h) => {
|
|
1094
|
-
const
|
|
1095
|
-
return h.parsedData && (
|
|
1094
|
+
const d = { ...h, parsedData: null };
|
|
1095
|
+
return h.parsedData && (d.parsedData = {
|
|
1096
1096
|
data: h.parsedData.data.map(
|
|
1097
1097
|
(p) => a(this, Ht).mapEngineToDataItem(p)
|
|
1098
1098
|
),
|
|
1099
1099
|
continuationToken: h.parsedData.continuationToken
|
|
1100
|
-
}),
|
|
1100
|
+
}), d;
|
|
1101
1101
|
}), this.getModel = async (e, r = {}) => (await a(this, nt)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => i(c)), this.getConfigurationOptions = async (e) => (await a(this, nt)).dataConnectorGetConfigurationOptions(e).then((n) => i(n)), this.getCapabilities = async (e) => (await a(this, nt)).dataConnectorGetCapabilities(e).then((n) => i(n)), g(this, nt, o), g(this, Ht, t);
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
@@ -1261,7 +1261,7 @@ class le {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
1263
|
Pt = new WeakMap();
|
|
1264
|
-
var
|
|
1264
|
+
var l;
|
|
1265
1265
|
class ts {
|
|
1266
1266
|
/**
|
|
1267
1267
|
* @ignore
|
|
@@ -1270,9 +1270,9 @@ class ts {
|
|
|
1270
1270
|
/**
|
|
1271
1271
|
* @ignore
|
|
1272
1272
|
*/
|
|
1273
|
-
u(this,
|
|
1274
|
-
this.getAll = async () => (await a(this,
|
|
1275
|
-
const r = await a(this,
|
|
1273
|
+
u(this, l);
|
|
1274
|
+
this.getAll = async () => (await a(this, l)).getFrames().then((e) => i(e)), this.getSelected = async () => (await a(this, l)).getSelectedFrames().then((e) => i(e)), this.getAllByPageId = async (t) => (await a(this, l)).getFramesByPageId(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, l)).getFrameByName(t).then((r) => i(r)), this.getById = async (t) => (await a(this, l)).getFrameById(t).then((r) => i(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, l)).getFramePropertiesOnSelectedLayout().then((e) => i(e)), this.getLayoutProperties = async (t, e) => (await a(this, l)).getFramePropertiesByFrameId(t, e).then((n) => i(n)), this.getAllLayoutProperties = async (t) => (await a(this, l)).getFramesProperties(t).then((r) => i(r)), this.resetTransformation = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetSize = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.select = async (t) => (await a(this, l)).selectFrames([t]).then((r) => i(r)), this.selectMultiple = async (t) => (await a(this, l)).selectFrames(t).then((r) => i(r)), this.deselectAll = async () => (await a(this, l)).deselectFrames().then((e) => i(e)), this.reorderFrames = async (t, e) => (await a(this, l)).reorderFrames(t, e).then((n) => i(n)), this.setZIndex = async (t, e) => (await a(this, l)).setFrameZIndex(t, e).then((n) => i(n)), this.setHeight = async (t, e) => (await a(this, l)).setFrameHeight(t, e).then((n) => i(n)), this.setRotation = async (t, e) => (await a(this, l)).setFrameRotation(t, e).then((n) => i(n)), this.setWidth = async (t, e) => (await a(this, l)).setFrameWidth(t, e).then((n) => i(n)), this.setX = async (t, e) => (await a(this, l)).setFrameX(t, e).then((n) => i(n)), this.setY = async (t, e) => (await a(this, l)).setFrameY(t, e).then((n) => i(n)), this.setOpacity = async (t, e) => (await a(this, l)).setFrameOpacity(t, e).then((n) => i(n)), this.rename = async (t, e) => (await a(this, l)).renameFrame(t, e).then((n) => i(n)), this.reset = async (t) => (await a(this, l)).resetFrame(t).then((r) => i(r)), this.resetX = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetY = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetRotation = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetWidth = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetHeight = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetImageFrameFitMode = async (t) => (await a(this, l)).resetImageFrameFitMode(t).then((r) => i(r)), this.setVisibility = async (t, e) => (await a(this, l)).setFrameIsVisible(t, e).then((n) => i(n)), this.setIsVisible = async (t, e) => (await a(this, l)).setFrameIsVisible(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, l)).removeFrames([t]).then((r) => i(r)), this.removeFrames = async (t) => (await a(this, l)).removeFrames(t).then((r) => i(r)), this.create = async (t, e, r, n, c) => (await a(this, l)).addFrame(t, e, r, n, c).then((d) => i(d)), this.createShapeFrame = async (t, e, r, n, c) => (await a(this, l)).addFrame(t, e, r, n, c).then((d) => i(d)), this.createBarcodeFrame = async (t, e) => (await a(this, l)).addBarcodeFrame(t, e == null ? void 0 : e.x, e == null ? void 0 : e.y).then((n) => i(n)), this.createComponentFrame = async (t, e, r, n, c) => (await a(this, l)).addComponentFrame(e, r, n, c, JSON.stringify(t)).then((d) => i(d)), this.duplicateFrames = async (t) => (await a(this, l)).duplicateFrames(t).then((r) => i(r)), this.updateImageSource = async (t, e) => {
|
|
1275
|
+
const r = await a(this, l), n = e !== null ? JSON.stringify(e) : null;
|
|
1276
1276
|
return r.setImageSource(t, n).then((c) => i(c));
|
|
1277
1277
|
}, this.removeImageSource = async (t) => this.updateImageSource(t, null), this.setImageFromConnector = async (t, e, r) => {
|
|
1278
1278
|
const n = {
|
|
@@ -1284,34 +1284,34 @@ class ts {
|
|
|
1284
1284
|
}, this.setImageFromUrl = async (t, e) => {
|
|
1285
1285
|
const r = { url: e, type: te.url };
|
|
1286
1286
|
return this.updateImageSource(t, r);
|
|
1287
|
-
}, this.setImageFrameFitMode = async (t, e) => (await a(this,
|
|
1287
|
+
}, this.setImageFrameFitMode = async (t, e) => (await a(this, l)).setImageFrameFitMode(t, e).then((n) => i(n)), this.setImageFrameFitModePosition = async (t, e) => (await a(this, l)).setImageFrameFitModePosition(t, e).then((n) => i(n)), this.setFrameConstrainProportions = async (t, e) => (console.error("setFrameConstrainProportions is not supported anymore"), i({
|
|
1288
1288
|
success: !1,
|
|
1289
1289
|
status: 0,
|
|
1290
1290
|
error: "setFrameConstrainProportions is not supported anymore",
|
|
1291
1291
|
parsedData: null
|
|
1292
|
-
})), this.setVerticalAlign = async (t, e) => (await a(this,
|
|
1292
|
+
})), this.setVerticalAlign = async (t, e) => (await a(this, l)).setVerticalAlignment(t, e).then((n) => i(n)), this.setNumberOfColumns = async (t, e) => (await a(this, l)).setNumberOfColumns(t, e).then((n) => i(n)), this.setColumnGap = async (t, e) => (await a(this, l)).setColumnGap(t, e).then((n) => i(n)), this.setMinCopyfitting = async (t, e) => (await a(this, l)).setMinCopyfitting(t, e).then((n) => i(n)), this.setMaxCopyfitting = async (t, e) => (await a(this, l)).setMaxCopyfitting(t, e).then((n) => i(n)), this.setEnableCopyfitting = async (t, e) => (await a(this, l)).setEnableCopyfitting(t, e).then((n) => i(n)), this.resetMinCopyfitting = async (t) => (await a(this, l)).resetMinCopyfitting(t).then((r) => i(r)), this.resetMaxCopyfitting = async (t) => (await a(this, l)).resetMaxCopyfitting(t).then((r) => i(r)), this.resetEnableCopyfitting = async (t) => (await a(this, l)).resetEnableCopyfitting(t).then((r) => i(r)), this.setShapeFrameEnableFill = async (t, e) => this.shapeController.setEnableFill(t, e), this.setShapeFrameFillColor = async (t, e) => this.shapeController.setFillColor(t, e), this.setShapeFrameEnableStroke = async (t, e) => this.shapeController.setEnableStroke(t, e), this.setShapeFrameStrokeColor = async (t, e) => this.shapeController.setStrokeColor(t, e), this.setShapeFrameStrokeWeight = async (t, e) => this.shapeController.setStrokeWeight(t, e), this.setBlendMode = async (t, e) => (await a(this, l)).setFrameBlendMode(t, e).then((n) => i(n)), this.enterCropMode = async (t, e = Es.frameCrop) => (await a(this, l)).enterCropMode(t, e).then((n) => i(n)), this.applyCropMode = async () => (await a(this, l)).applyCropMode().then((e) => i(e)), this.exitCropMode = async () => (await a(this, l)).cancelCropMode().then((e) => i(e)), this.enterSubjectMode = async (t) => (await a(this, l)).enterSubjectMode(t).then((r) => i(r)), this.applySubjectMode = async () => (await a(this, l)).applySubjectMode().then((e) => i(e)), this.exitSubjectMode = async () => (await a(this, l)).cancelSubjectMode().then((e) => i(e)), this.enterGradientMode = async (t) => (await a(this, l)).enterGradientMode(t).then((r) => i(r)), this.applyGradientMode = async () => (await a(this, l)).applyGradientMode().then((e) => i(e)), this.cancelGradientMode = async () => (await a(this, l)).cancelGradientMode().then((e) => i(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), i({
|
|
1293
1293
|
success: !1,
|
|
1294
1294
|
status: 0,
|
|
1295
1295
|
error: "resetCropMode is not supported anymore",
|
|
1296
1296
|
parsedData: null
|
|
1297
1297
|
})), this.setEnableAutoGrow = async (t, e) => {
|
|
1298
1298
|
const r = { enabled: { value: e } };
|
|
1299
|
-
return (await a(this,
|
|
1299
|
+
return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1300
1300
|
}, this.setAutoGrowMinWidth = async (t, e) => {
|
|
1301
1301
|
const r = { minWidth: { value: e } };
|
|
1302
|
-
return (await a(this,
|
|
1302
|
+
return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1303
1303
|
}, this.setAutoGrowMaxWidth = async (t, e) => {
|
|
1304
1304
|
const r = { maxWidth: { value: e } };
|
|
1305
|
-
return (await a(this,
|
|
1305
|
+
return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1306
1306
|
}, this.setAutoGrowMinHeight = async (t, e) => {
|
|
1307
1307
|
const r = { minHeight: { value: e } };
|
|
1308
|
-
return (await a(this,
|
|
1308
|
+
return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1309
1309
|
}, this.setAutoGrowMaxHeight = async (t, e) => {
|
|
1310
1310
|
const r = { maxHeight: { value: e } };
|
|
1311
|
-
return (await a(this,
|
|
1311
|
+
return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1312
1312
|
}, this.setAutoGrowDirections = async (t, e) => {
|
|
1313
1313
|
const r = { directions: { value: e } };
|
|
1314
|
-
return (await a(this,
|
|
1314
|
+
return (await a(this, l)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1315
1315
|
}, this.resetAutoGrowSettingsEnabled = async (t) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), i({
|
|
1316
1316
|
success: !1,
|
|
1317
1317
|
status: 0,
|
|
@@ -1349,19 +1349,19 @@ class ts {
|
|
|
1349
1349
|
parsedData: null
|
|
1350
1350
|
})), this.setShadowEnabled = async (t, e) => {
|
|
1351
1351
|
const r = { enabled: { value: e } };
|
|
1352
|
-
return (await a(this,
|
|
1352
|
+
return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1353
1353
|
}, this.setShadowDistance = async (t, e) => {
|
|
1354
1354
|
const r = { distance: { value: e } };
|
|
1355
|
-
return (await a(this,
|
|
1355
|
+
return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1356
1356
|
}, this.setShadowAngleDegrees = async (t, e) => {
|
|
1357
1357
|
const r = { angleDegrees: { value: e } };
|
|
1358
|
-
return (await a(this,
|
|
1358
|
+
return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1359
1359
|
}, this.setShadowBlurRadius = async (t, e) => {
|
|
1360
1360
|
const r = { blurRadius: { value: e } };
|
|
1361
|
-
return (await a(this,
|
|
1361
|
+
return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1362
1362
|
}, this.setShadowColor = async (t, e) => {
|
|
1363
1363
|
const r = { color: { value: e } };
|
|
1364
|
-
return (await a(this,
|
|
1364
|
+
return (await a(this, l)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1365
1365
|
}, this.setAnchor = async (t, e, r, n, c) => {
|
|
1366
1366
|
const h = {
|
|
1367
1367
|
horizontal: e,
|
|
@@ -1369,20 +1369,20 @@ class ts {
|
|
|
1369
1369
|
target: n,
|
|
1370
1370
|
endTarget: c
|
|
1371
1371
|
};
|
|
1372
|
-
return (await a(this,
|
|
1373
|
-
}, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await a(this,
|
|
1372
|
+
return (await a(this, l)).setAnchorProperties(t, JSON.stringify(h)).then((p) => i(p));
|
|
1373
|
+
}, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await a(this, l)).resetFrameTransformation(t).then((r) => i(r)), this.resetVisibility = async (t) => (await a(this, l)).setFrameIsVisible(t, null).then((r) => i(r)), this.getConfiguration = async (t) => (await a(this, l)).getFrameConfiguration(t).then((r) => i(r)), this.resetAssetCropOverride = async (t) => (await a(this, l)).resetAssetCropOverride(t).then((r) => i(r)), this.resetAllAssetCropOverrides = async (t) => (await a(this, l)).resetAllAssetCropOverrides(t).then((r) => i(r)), this.setGradientApplied = async (t, e) => {
|
|
1374
1374
|
const r = { isApplied: e };
|
|
1375
|
-
return (await a(this,
|
|
1375
|
+
return (await a(this, l)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1376
1376
|
}, this.setLocalGradient = async (t, e) => {
|
|
1377
1377
|
const r = { gradient: e };
|
|
1378
|
-
return (await a(this,
|
|
1378
|
+
return (await a(this, l)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1379
1379
|
}, this.setBrandKitGradient = async (t, e) => {
|
|
1380
1380
|
const r = { id: e };
|
|
1381
|
-
return (await a(this,
|
|
1382
|
-
}, g(this,
|
|
1381
|
+
return (await a(this, l)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1382
|
+
}, g(this, l, o), this.shapeController = new le(a(this, l)), this.constraints = new zr(a(this, l));
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
|
-
|
|
1385
|
+
l = new WeakMap();
|
|
1386
1386
|
var _;
|
|
1387
1387
|
class zr {
|
|
1388
1388
|
/**
|
|
@@ -1475,10 +1475,10 @@ class rs {
|
|
|
1475
1475
|
c,
|
|
1476
1476
|
Os.web,
|
|
1477
1477
|
JSON.stringify(n)
|
|
1478
|
-
).then((
|
|
1479
|
-
if (
|
|
1480
|
-
return
|
|
1481
|
-
throw typeof
|
|
1478
|
+
).then((d) => {
|
|
1479
|
+
if (d instanceof Uint8Array)
|
|
1480
|
+
return d;
|
|
1481
|
+
throw typeof d == "object" && d !== null && "success" in d && !d.success && ge(d), new Error(`Unexpected response type: ${typeof d}.`);
|
|
1482
1482
|
});
|
|
1483
1483
|
}, this.getConfigurationOptions = async (t) => (await a(this, Y)).mediaConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, Y)).mediaConnectorGetCapabilities(t).then((r) => i(r)), this.parseDeprecatedMediaType = (t) => {
|
|
1484
1484
|
if (t === Bt.file) return Ut.file;
|
|
@@ -1593,7 +1593,7 @@ let Xr = class {
|
|
|
1593
1593
|
return c.type === pe.list ? {
|
|
1594
1594
|
...c,
|
|
1595
1595
|
items: c.items.map(
|
|
1596
|
-
(
|
|
1596
|
+
(d) => d.value
|
|
1597
1597
|
),
|
|
1598
1598
|
selected: (h = c.selected) == null ? void 0 : h.value
|
|
1599
1599
|
} : c;
|
|
@@ -1798,8 +1798,8 @@ class hs {
|
|
|
1798
1798
|
const c = a(this, Et).get(tt.GraFxStudioEnvironmentApiUrl);
|
|
1799
1799
|
if (!c)
|
|
1800
1800
|
throw new Error("GraFx Studio Environment API URL is not set");
|
|
1801
|
-
const h = `${c}connectors/${r}/stage`,
|
|
1802
|
-
if (!
|
|
1801
|
+
const h = `${c}connectors/${r}/stage`, d = a(this, Et).get(tt.GraFxStudioAuthToken);
|
|
1802
|
+
if (!d)
|
|
1803
1803
|
throw new Error("GraFx Studio Auth Token is not set");
|
|
1804
1804
|
const p = new FormData();
|
|
1805
1805
|
e.forEach((f, b) => {
|
|
@@ -1819,7 +1819,7 @@ class hs {
|
|
|
1819
1819
|
method: "POST",
|
|
1820
1820
|
body: p,
|
|
1821
1821
|
headers: {
|
|
1822
|
-
Authorization: `Bearer ${
|
|
1822
|
+
Authorization: `Bearer ${d}`
|
|
1823
1823
|
}
|
|
1824
1824
|
});
|
|
1825
1825
|
if (y.status === 422) {
|
|
@@ -2120,7 +2120,7 @@ class we {
|
|
|
2120
2120
|
* @returns The runtime configuration object.
|
|
2121
2121
|
*/
|
|
2122
2122
|
static createRuntimeConfig(o) {
|
|
2123
|
-
var e, r, n, c, h,
|
|
2123
|
+
var e, r, n, c, h, d, p, y, v, f, b, A, I, S, M, E, P, W, j, St, bt, Ce, me, fe, Se, be, ve, Ie, Ae, Pe, Fe, Ee, Oe, Le, De;
|
|
2124
2124
|
const t = { ...o };
|
|
2125
2125
|
return t.logging = {
|
|
2126
2126
|
logLevel: ((e = o.logging) == null ? void 0 : e.logLevel) || x.error,
|
|
@@ -2151,7 +2151,7 @@ class we {
|
|
|
2151
2151
|
),
|
|
2152
2152
|
onStateChanged: new w(
|
|
2153
2153
|
() => t.onStateChanged,
|
|
2154
|
-
(
|
|
2154
|
+
(d = t.logging) == null ? void 0 : d.logger
|
|
2155
2155
|
),
|
|
2156
2156
|
onDocumentLoaded: new w(
|
|
2157
2157
|
() => t.onDocumentLoaded,
|