@chili-publish/studio-sdk 1.30.0 → 1.31.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 +252 -208
- 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 +35 -0
- package/lib/src/controllers/FrameController.js +65 -0
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/UndoManagerController.d.ts +37 -0
- package/lib/src/controllers/UndoManagerController.js +45 -0
- package/lib/src/controllers/UndoManagerController.js.map +1 -1
- package/lib/src/index.d.ts +1 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js +43 -4
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/tests/controllers/UndoManagerController.test.js +26 -2
- package/lib/src/tests/controllers/UndoManagerController.test.js.map +1 -1
- package/lib/src/types/FrameTypes.d.ts +28 -0
- package/lib/src/types/FrameTypes.js.map +1 -1
- package/package.json +1 -1
package/_bundles/main.es.js
CHANGED
|
@@ -3,19 +3,19 @@ var Pe = (s) => {
|
|
|
3
3
|
};
|
|
4
4
|
var Fe = (s, i, t) => i.has(s) || Pe("Cannot " + t);
|
|
5
5
|
var a = (s, i, t) => (Fe(s, i, "read from private field"), t ? t.call(s) : i.get(s)), u = (s, i, t) => i.has(s) ? Pe("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), g = (s, i, t, e) => (Fe(s, i, "write to private field"), e ? e.call(s, t) : i.set(s, t), t);
|
|
6
|
-
const vs = "2.
|
|
6
|
+
const vs = "2.14.latest", ls = {
|
|
7
7
|
current: vs
|
|
8
|
-
}, As = "1.
|
|
8
|
+
}, As = "1.31.0", ds = {
|
|
9
9
|
version: As
|
|
10
10
|
};
|
|
11
|
-
var
|
|
11
|
+
var $;
|
|
12
12
|
(function(s) {
|
|
13
13
|
s.Call = "call", s.Reply = "reply", s.Syn = "syn", s.SynAck = "synAck", s.Ack = "ack";
|
|
14
|
-
})(
|
|
15
|
-
var
|
|
14
|
+
})($ || ($ = {}));
|
|
15
|
+
var lt;
|
|
16
16
|
(function(s) {
|
|
17
17
|
s.Fulfilled = "fulfilled", s.Rejected = "rejected";
|
|
18
|
-
})(
|
|
18
|
+
})(lt || (lt = {}));
|
|
19
19
|
var Mt;
|
|
20
20
|
(function(s) {
|
|
21
21
|
s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
|
|
@@ -24,10 +24,10 @@ var Qt;
|
|
|
24
24
|
(function(s) {
|
|
25
25
|
s.DataCloneError = "DataCloneError";
|
|
26
26
|
})(Qt || (Qt = {}));
|
|
27
|
-
var
|
|
27
|
+
var ht;
|
|
28
28
|
(function(s) {
|
|
29
29
|
s.Message = "message";
|
|
30
|
-
})(
|
|
30
|
+
})(ht || (ht = {}));
|
|
31
31
|
const Ps = (s, i) => {
|
|
32
32
|
const t = [];
|
|
33
33
|
let e = !1;
|
|
@@ -65,7 +65,7 @@ const Ps = (s, i) => {
|
|
|
65
65
|
const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: l } = s;
|
|
66
66
|
let h = !1;
|
|
67
67
|
const y = (p) => {
|
|
68
|
-
if (p.source !== n || p.data.penpal !==
|
|
68
|
+
if (p.source !== n || p.data.penpal !== $.Call)
|
|
69
69
|
return;
|
|
70
70
|
if (p.origin !== l) {
|
|
71
71
|
t(`${e} received message from origin ${p.origin} which did not match expected origin ${l}`);
|
|
@@ -79,39 +79,39 @@ const Ps = (s, i) => {
|
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
const x = {
|
|
82
|
-
penpal:
|
|
82
|
+
penpal: $.Reply,
|
|
83
83
|
id: b,
|
|
84
84
|
resolution: v,
|
|
85
85
|
returnValue: N
|
|
86
86
|
};
|
|
87
|
-
v ===
|
|
87
|
+
v === lt.Rejected && N instanceof Error && (x.returnValue = Ee(N), x.returnValueIsError = !0);
|
|
88
88
|
try {
|
|
89
89
|
n.postMessage(x, c);
|
|
90
90
|
} catch (P) {
|
|
91
91
|
if (P.name === Qt.DataCloneError) {
|
|
92
|
-
const
|
|
93
|
-
penpal:
|
|
92
|
+
const K = {
|
|
93
|
+
penpal: $.Reply,
|
|
94
94
|
id: b,
|
|
95
|
-
resolution:
|
|
95
|
+
resolution: lt.Rejected,
|
|
96
96
|
returnValue: Ee(P),
|
|
97
97
|
returnValueIsError: !0
|
|
98
98
|
};
|
|
99
|
-
n.postMessage(
|
|
99
|
+
n.postMessage(K, c);
|
|
100
100
|
}
|
|
101
101
|
throw P;
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
new Promise((v) => v(i[S].apply(i, f))).then(A(
|
|
104
|
+
new Promise((v) => v(i[S].apply(i, f))).then(A(lt.Fulfilled), A(lt.Rejected));
|
|
105
105
|
};
|
|
106
|
-
return r.addEventListener(
|
|
107
|
-
h = !0, r.removeEventListener(
|
|
106
|
+
return r.addEventListener(ht.Message, y), () => {
|
|
107
|
+
h = !0, r.removeEventListener(ht.Message, y);
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
110
|
let Ms = 0;
|
|
111
111
|
const Rs = () => ++Ms, us = ".", gs = (s) => s ? s.split(us) : [], Vs = (s) => s.join(us), Bs = (s, i) => {
|
|
112
112
|
const t = gs(i || "");
|
|
113
113
|
return t.push(s), Vs(t);
|
|
114
|
-
},
|
|
114
|
+
}, Js = (s, i, t) => {
|
|
115
115
|
const e = gs(i);
|
|
116
116
|
return e.reduce((r, n, c) => (typeof r[n] > "u" && (r[n] = {}), c === e.length - 1 && (r[n] = t), r[n]), s), s;
|
|
117
117
|
}, ys = (s, i) => {
|
|
@@ -120,10 +120,10 @@ const Rs = () => ++Ms, us = ".", gs = (s) => s ? s.split(us) : [], Vs = (s) => s
|
|
|
120
120
|
const r = s[e], n = Bs(e, i);
|
|
121
121
|
typeof r == "object" && Object.assign(t, ys(r, n)), typeof r == "function" && (t[n] = r);
|
|
122
122
|
}), t;
|
|
123
|
-
},
|
|
123
|
+
}, ks = (s) => {
|
|
124
124
|
const i = {};
|
|
125
125
|
for (const t in s)
|
|
126
|
-
|
|
126
|
+
Js(i, t, s[t]);
|
|
127
127
|
return i;
|
|
128
128
|
}, Us = (s, i, t, e, r) => {
|
|
129
129
|
const { localName: n, local: c, remote: l, originForSending: h, originForReceiving: y } = i;
|
|
@@ -142,29 +142,29 @@ const Rs = () => ++Ms, us = ".", gs = (s) => s ? s.split(us) : [], Vs = (s) => s
|
|
|
142
142
|
throw v.code = Mt.ConnectionDestroyed, v;
|
|
143
143
|
}
|
|
144
144
|
return new Promise((v, N) => {
|
|
145
|
-
const x = Rs(), P = (
|
|
146
|
-
if (
|
|
145
|
+
const x = Rs(), P = (z) => {
|
|
146
|
+
if (z.source !== l || z.data.penpal !== $.Reply || z.data.id !== x)
|
|
147
147
|
return;
|
|
148
|
-
if (
|
|
149
|
-
r(`${n} received message from origin ${
|
|
148
|
+
if (z.origin !== y) {
|
|
149
|
+
r(`${n} received message from origin ${z.origin} which did not match expected origin ${y}`);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
const mt =
|
|
153
|
-
r(`${n}: Received ${f}() reply`), c.removeEventListener(
|
|
152
|
+
const mt = z.data;
|
|
153
|
+
r(`${n}: Received ${f}() reply`), c.removeEventListener(ht.Message, P);
|
|
154
154
|
let wt = mt.returnValue;
|
|
155
|
-
mt.returnValueIsError && (wt = Ns(wt)), (mt.resolution ===
|
|
155
|
+
mt.returnValueIsError && (wt = Ns(wt)), (mt.resolution === lt.Fulfilled ? v : N)(wt);
|
|
156
156
|
};
|
|
157
|
-
c.addEventListener(
|
|
158
|
-
const
|
|
159
|
-
penpal:
|
|
157
|
+
c.addEventListener(ht.Message, P);
|
|
158
|
+
const K = {
|
|
159
|
+
penpal: $.Call,
|
|
160
160
|
id: x,
|
|
161
161
|
methodName: f,
|
|
162
162
|
args: b
|
|
163
163
|
};
|
|
164
|
-
l.postMessage(
|
|
164
|
+
l.postMessage(K, h);
|
|
165
165
|
});
|
|
166
166
|
}, S = t.reduce((f, b) => (f[b] = I(b), f), {});
|
|
167
|
-
return Object.assign(s,
|
|
167
|
+
return Object.assign(s, ks(S)), () => {
|
|
168
168
|
p = !0;
|
|
169
169
|
};
|
|
170
170
|
}, Gs = (s, i, t, e, r) => {
|
|
@@ -197,7 +197,7 @@ const Rs = () => ++Ms, us = ".", gs = (s) => s ? s.split(us) : [], Vs = (s) => s
|
|
|
197
197
|
}
|
|
198
198
|
s("Parent: Handshake - Received SYN, responding with SYN-ACK");
|
|
199
199
|
const n = {
|
|
200
|
-
penpal:
|
|
200
|
+
penpal: $.SynAck,
|
|
201
201
|
methodNames: Object.keys(i)
|
|
202
202
|
};
|
|
203
203
|
r.source.postMessage(n, e);
|
|
@@ -230,19 +230,19 @@ const Rs = () => ++Ms, us = ".", gs = (s) => s ? s.split(us) : [], Vs = (s) => s
|
|
|
230
230
|
promise: new Promise((A, v) => {
|
|
231
231
|
const N = $s(r, y), x = (P) => {
|
|
232
232
|
if (!(P.source !== i.contentWindow || !P.data)) {
|
|
233
|
-
if (P.data.penpal ===
|
|
233
|
+
if (P.data.penpal === $.Syn) {
|
|
234
234
|
S(P);
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
|
-
if (P.data.penpal ===
|
|
238
|
-
const
|
|
239
|
-
|
|
237
|
+
if (P.data.penpal === $.Ack) {
|
|
238
|
+
const K = f(P);
|
|
239
|
+
K && (N(), A(K));
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
window.addEventListener(
|
|
245
|
-
window.removeEventListener(
|
|
244
|
+
window.addEventListener(ht.Message, x), c("Parent: Awaiting handshake"), _s(i, l), h((P) => {
|
|
245
|
+
window.removeEventListener(ht.Message, x), P && v(P);
|
|
246
246
|
});
|
|
247
247
|
}),
|
|
248
248
|
destroy() {
|
|
@@ -336,7 +336,7 @@ const Rs = () => ++Ms, us = ".", gs = (s) => s ? s.split(us) : [], Vs = (s) => s
|
|
|
336
336
|
})
|
|
337
337
|
);
|
|
338
338
|
};
|
|
339
|
-
var
|
|
339
|
+
var Q = /* @__PURE__ */ ((s) => (s.GraFxStudioEnvironmentApiUrl = "ENVIRONMENT_API", s.GraFxStudioSdkVersion = "SDK_VERSION", s.GraFxStudioDocumentType = "DOCUMENT_TYPE", s.GraFxStudioTemplateId = "TEMPLATE_ID", s.GraFxStudioAuthToken = "GRAFX_AUTH_TOKEN", s.QueryCallCacheEnabled = "ENABLE_QUERY_CALL_CACHE", s))(Q || {});
|
|
340
340
|
const Ys = {
|
|
341
341
|
shortcutOptions: {
|
|
342
342
|
debugPanel: { enabled: !1 },
|
|
@@ -414,7 +414,7 @@ class Le {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
D = new WeakMap();
|
|
417
|
-
var
|
|
417
|
+
var H = /* @__PURE__ */ ((s) => (s.code39 = "code39", s.code93 = "code93", s.code128 = "code128", s.dataMatrix = "dataMatrix", s.ean13 = "ean13", s.ean8 = "ean8", s.qr = "qr", s.upca = "upca", s.upce = "upce", s.gs1128 = "gs1128", s))(H || {}), Ot = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Ot || {}), ft = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(ft || {}), tr = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(tr || {}), Z = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(Z || {}), er = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(er || {}), sr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(sr || {}), rr = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(rr || {}), nr = /* @__PURE__ */ ((s) => (s.locked = "locked", s.range = "range", s.none = "none", s))(nr || {}), U;
|
|
418
418
|
class Oe {
|
|
419
419
|
/**
|
|
420
420
|
* @ignore
|
|
@@ -447,10 +447,10 @@ class Oe {
|
|
|
447
447
|
return this.setBarcodeProperties(t, r);
|
|
448
448
|
}, this.setQuietZoneValue = async (t, e, r) => {
|
|
449
449
|
const n = r ? {
|
|
450
|
-
left: r ===
|
|
451
|
-
top: r ===
|
|
452
|
-
right: r ===
|
|
453
|
-
bottom: r ===
|
|
450
|
+
left: r === Z.left ? e : void 0,
|
|
451
|
+
top: r === Z.top ? e : void 0,
|
|
452
|
+
right: r === Z.right ? e : void 0,
|
|
453
|
+
bottom: r === Z.bottom ? e : void 0
|
|
454
454
|
} : { left: e, top: e, right: e, bottom: e };
|
|
455
455
|
return (await a(this, U)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((l) => o(l));
|
|
456
456
|
}, this.setAreQuietZoneValuesCombined = async (t, e) => {
|
|
@@ -465,34 +465,34 @@ class Oe {
|
|
|
465
465
|
}, this.getBarcodeConfigationOptions = (t) => {
|
|
466
466
|
let e = !0, r = !0, n = !0, c, l, h = !1, y = !1, p = !1;
|
|
467
467
|
switch (t) {
|
|
468
|
-
case
|
|
468
|
+
case H.qr:
|
|
469
469
|
c = [ft.iso8859_1, ft.utf8], l = [
|
|
470
470
|
Ot.low,
|
|
471
471
|
Ot.medium,
|
|
472
472
|
Ot.quartile,
|
|
473
473
|
Ot.high
|
|
474
474
|
];
|
|
475
|
-
case
|
|
475
|
+
case H.dataMatrix:
|
|
476
476
|
e = !1, r = !1, n = !1, h = !0;
|
|
477
477
|
break;
|
|
478
|
-
case
|
|
478
|
+
case H.ean13:
|
|
479
479
|
e = !1, y = !0;
|
|
480
480
|
break;
|
|
481
|
-
case
|
|
481
|
+
case H.ean8:
|
|
482
482
|
y = !0;
|
|
483
|
-
case
|
|
484
|
-
case
|
|
483
|
+
case H.upca:
|
|
484
|
+
case H.upce:
|
|
485
485
|
e = !1;
|
|
486
486
|
break;
|
|
487
|
-
case
|
|
488
|
-
case
|
|
487
|
+
case H.code128:
|
|
488
|
+
case H.gs1128:
|
|
489
489
|
c = [
|
|
490
490
|
ft.code128a,
|
|
491
491
|
ft.code128b,
|
|
492
492
|
ft.code128c
|
|
493
493
|
];
|
|
494
494
|
break;
|
|
495
|
-
case
|
|
495
|
+
case H.code39:
|
|
496
496
|
p = !0;
|
|
497
497
|
break;
|
|
498
498
|
}
|
|
@@ -511,8 +511,8 @@ class Oe {
|
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
513
|
U = new WeakMap();
|
|
514
|
-
var
|
|
515
|
-
const Ne = (s) => s.type ===
|
|
514
|
+
var T = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(T || {}), W = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.gray = "gray", s.hsl = "hsl", s.spot = "spot", s.spotCMYK = "spotCMYK", s.spotRGB = "spotRGB", s.spotHEX = "spotHEX", s))(W || {}), Xt = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(Xt || {});
|
|
515
|
+
const Ne = (s) => s.type === T.hex, te = (s) => s.type === T.spotHex, ar = (s) => s.type === T.spotRgb, ir = (s) => s.type === T.spotCmyk, or = (s) => ar(s) || ir(s) || te(s), cr = (s) => {
|
|
516
516
|
const i = hr(s.type);
|
|
517
517
|
return or(s) ? {
|
|
518
518
|
...te(s) && { value: s.displayValue },
|
|
@@ -568,18 +568,18 @@ const Ne = (s) => s.type === G.hex, te = (s) => s.type === G.spotHex, ar = (s) =
|
|
|
568
568
|
};
|
|
569
569
|
}, hr = (s) => {
|
|
570
570
|
switch (s) {
|
|
571
|
-
case
|
|
572
|
-
return
|
|
573
|
-
case
|
|
574
|
-
return
|
|
575
|
-
case
|
|
576
|
-
return
|
|
577
|
-
case
|
|
578
|
-
return
|
|
579
|
-
case
|
|
580
|
-
return
|
|
581
|
-
case
|
|
582
|
-
return
|
|
571
|
+
case T.rgb:
|
|
572
|
+
return W.rgb;
|
|
573
|
+
case T.cmyk:
|
|
574
|
+
return W.cmyk;
|
|
575
|
+
case T.hex:
|
|
576
|
+
return W.hex;
|
|
577
|
+
case T.spotRgb:
|
|
578
|
+
return W.spotRGB;
|
|
579
|
+
case T.spotCmyk:
|
|
580
|
+
return W.spotCMYK;
|
|
581
|
+
case T.spotHex:
|
|
582
|
+
return W.spotHEX;
|
|
583
583
|
}
|
|
584
584
|
}, Wt = (s, i) => {
|
|
585
585
|
if (!(s === null || i === void 0))
|
|
@@ -744,7 +744,7 @@ class Re {
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
L = new WeakMap();
|
|
747
|
-
var
|
|
747
|
+
var tt;
|
|
748
748
|
class ee {
|
|
749
749
|
/**
|
|
750
750
|
* @ignore
|
|
@@ -753,11 +753,11 @@ class ee {
|
|
|
753
753
|
/**
|
|
754
754
|
* @ignore
|
|
755
755
|
*/
|
|
756
|
-
u(this,
|
|
757
|
-
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,
|
|
756
|
+
u(this, tt);
|
|
757
|
+
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, tt)).zoomToPage(e, r, n, c).then((h) => o(h))), this.getZoomPercentage = async () => (await a(this, tt)).getZoomPercentage().then((e) => o(e)), this.setZoomPercentage = async (t) => (await a(this, tt)).setZoomPercentage(t).then((r) => o(r)), this.setViewMode = async (t) => (await a(this, tt)).setViewMode(t).then((r) => o(r)), g(this, tt, i);
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
tt = new WeakMap();
|
|
761
761
|
var R;
|
|
762
762
|
class Ve {
|
|
763
763
|
/**
|
|
@@ -772,7 +772,7 @@ class Ve {
|
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
R = new WeakMap();
|
|
775
|
-
var
|
|
775
|
+
var et;
|
|
776
776
|
class Be {
|
|
777
777
|
/**
|
|
778
778
|
* @ignore
|
|
@@ -781,25 +781,25 @@ class Be {
|
|
|
781
781
|
/**
|
|
782
782
|
* @ignore
|
|
783
783
|
*/
|
|
784
|
-
u(this,
|
|
784
|
+
u(this, et);
|
|
785
785
|
this.copyFrames = async (t) => {
|
|
786
|
-
const r = await (await a(this,
|
|
786
|
+
const r = await (await a(this, et)).copyFrames(t);
|
|
787
787
|
return r.data && await navigator.clipboard.writeText(r.data), o(r);
|
|
788
788
|
}, this.cutFrames = async (t) => {
|
|
789
|
-
const r = await (await a(this,
|
|
789
|
+
const r = await (await a(this, et)).cutFrames(t);
|
|
790
790
|
return r.data && await navigator.clipboard.writeText(r.data), o(r);
|
|
791
791
|
}, this.pasteFrames = async () => {
|
|
792
|
-
const t = await a(this,
|
|
792
|
+
const t = await a(this, et), e = await navigator.clipboard.readText(), r = await t.pasteFrames(e);
|
|
793
793
|
return o(r);
|
|
794
794
|
}, this.getContentType = async () => {
|
|
795
|
-
const t = await a(this,
|
|
795
|
+
const t = await a(this, et), e = await navigator.clipboard.readText(), r = await t.getClipboardContentType(e);
|
|
796
796
|
return o(r);
|
|
797
|
-
}, g(this,
|
|
797
|
+
}, g(this, et, i);
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
|
-
|
|
801
|
-
var
|
|
802
|
-
class
|
|
800
|
+
et = new WeakMap();
|
|
801
|
+
var Jt;
|
|
802
|
+
class Je {
|
|
803
803
|
/**
|
|
804
804
|
* @ignore
|
|
805
805
|
*/
|
|
@@ -807,13 +807,13 @@ class ke {
|
|
|
807
807
|
/**
|
|
808
808
|
* @ignore
|
|
809
809
|
*/
|
|
810
|
-
u(this,
|
|
811
|
-
this.convertToRgb = async (t) => (await a(this,
|
|
810
|
+
u(this, Jt);
|
|
811
|
+
this.convertToRgb = async (t) => (await a(this, Jt)).colorToRgb(JSON.stringify(t)).then((r) => o(r)), g(this, Jt, i);
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
|
-
|
|
814
|
+
Jt = new WeakMap();
|
|
815
815
|
var V;
|
|
816
|
-
class
|
|
816
|
+
class ke {
|
|
817
817
|
/**
|
|
818
818
|
* @ignore
|
|
819
819
|
*/
|
|
@@ -824,7 +824,7 @@ class Je {
|
|
|
824
824
|
u(this, V);
|
|
825
825
|
this.getAll = async () => (await a(this, V)).getColors().then((e) => o(e)), this.getById = async (t) => (await a(this, V)).getColorById(t).then((r) => o(r)), this.create = async () => (await a(this, V)).createColor().then((e) => o(e)), this.duplicate = async (t) => (await a(this, V)).duplicateColor(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, V)).moveColors(t, e).then((n) => o(n)), this.rename = async (t, e) => (await a(this, V)).renameColor(t, e).then((n) => o(n)), this.update = async (t, e) => {
|
|
826
826
|
const r = await a(this, V), n = e;
|
|
827
|
-
return n.type ===
|
|
827
|
+
return n.type === W.spot && (n.type = W.spotCMYK), r.updateColor(t, JSON.stringify(n)).then((c) => o(c));
|
|
828
828
|
}, this.remove = async (t) => (await a(this, V)).removeColor(t).then((r) => o(r)), g(this, V, i);
|
|
829
829
|
}
|
|
830
830
|
}
|
|
@@ -883,7 +883,7 @@ class oe {
|
|
|
883
883
|
}, this.isSourceMigrated = (i) => "id" in i;
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
var B, St,
|
|
886
|
+
var B, St, dt, os;
|
|
887
887
|
let Ue = (os = class {
|
|
888
888
|
/**
|
|
889
889
|
* @ignore
|
|
@@ -894,21 +894,21 @@ let Ue = (os = class {
|
|
|
894
894
|
*/
|
|
895
895
|
u(this, B);
|
|
896
896
|
u(this, St);
|
|
897
|
-
u(this,
|
|
897
|
+
u(this, dt);
|
|
898
898
|
this.getById = async (e) => (await a(this, B)).getConnectorById(e).then((n) => o(n)).then((n) => {
|
|
899
899
|
const c = { ...n, parsedData: null };
|
|
900
|
-
return n.parsedData && (c.parsedData = a(this,
|
|
900
|
+
return n.parsedData && (c.parsedData = a(this, dt).makeSingleConnectorBackwardsCompatible(
|
|
901
901
|
n.parsedData,
|
|
902
|
-
a(this, St).get(
|
|
902
|
+
a(this, St).get(Q.GraFxStudioEnvironmentApiUrl)
|
|
903
903
|
)), c;
|
|
904
904
|
}), this.getAllByType = async (e) => (await a(this, B)).getConnectors(e).then((n) => o(n)).then((n) => {
|
|
905
905
|
const c = { ...n, parsedData: null };
|
|
906
|
-
return n.parsedData && (c.parsedData = a(this,
|
|
906
|
+
return n.parsedData && (c.parsedData = a(this, dt).makeMultipleConnectorsBackwardsCompatible(
|
|
907
907
|
n.parsedData,
|
|
908
|
-
a(this, St).get(
|
|
908
|
+
a(this, St).get(Q.GraFxStudioEnvironmentApiUrl)
|
|
909
909
|
)), c;
|
|
910
910
|
}), this.register = async (e) => {
|
|
911
|
-
const r = await a(this, B), n = a(this,
|
|
911
|
+
const r = await a(this, B), n = a(this, dt).makeConnectorSourceForwardsCompatible(e);
|
|
912
912
|
return r.registerConnector(JSON.stringify(n)).then((c) => o(c));
|
|
913
913
|
}, this.unregister = async (e) => (await a(this, B)).unregisterConnector(e).then((n) => o(n)), this.configure = async (e, r) => {
|
|
914
914
|
const n = await a(this, B);
|
|
@@ -957,7 +957,7 @@ let Ue = (os = class {
|
|
|
957
957
|
)
|
|
958
958
|
)) ?? [], h = r.filter((p) => p.name !== "" && p.value !== ""), y = [...l, ...h];
|
|
959
959
|
await n.setMappings(y);
|
|
960
|
-
}), g(this, B, i), g(this, St, t), g(this,
|
|
960
|
+
}), g(this, B, i), g(this, St, t), g(this, dt, new oe());
|
|
961
961
|
}
|
|
962
962
|
async getMappings(i, t) {
|
|
963
963
|
return (await a(this, B)).getConnectorMappings(i).then((r) => o(r)).then(
|
|
@@ -970,8 +970,8 @@ let Ue = (os = class {
|
|
|
970
970
|
}
|
|
971
971
|
);
|
|
972
972
|
}
|
|
973
|
-
}, B = new WeakMap(), St = new WeakMap(),
|
|
974
|
-
var
|
|
973
|
+
}, B = new WeakMap(), St = new WeakMap(), dt = new WeakMap(), os);
|
|
974
|
+
var ut, gt;
|
|
975
975
|
class br {
|
|
976
976
|
/**
|
|
977
977
|
* @ignore
|
|
@@ -980,21 +980,21 @@ class br {
|
|
|
980
980
|
/**
|
|
981
981
|
* @ignore
|
|
982
982
|
*/
|
|
983
|
-
u(this, dt);
|
|
984
983
|
u(this, ut);
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
984
|
+
u(this, gt);
|
|
985
|
+
this.setOptions = async (e) => a(this, gt).setConnectorOptions(a(this, ut), JSON.stringify(e)).then((r) => o(r)), this.setMappings = async (e) => {
|
|
986
|
+
const r = await a(this, gt).setConnectorMappings(
|
|
987
|
+
a(this, ut),
|
|
988
988
|
e.map(function(n) {
|
|
989
989
|
return JSON.stringify(n);
|
|
990
990
|
})
|
|
991
991
|
);
|
|
992
992
|
return o(r);
|
|
993
|
-
}, this.setHttpHeader = async (e, r) => a(this,
|
|
993
|
+
}, this.setHttpHeader = async (e, r) => a(this, gt).connectorAuthenticationSetHttpHeader(a(this, ut), e, r).then((n) => o(n)), g(this, ut, i), g(this, gt, t);
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
|
-
|
|
997
|
-
var
|
|
996
|
+
ut = new WeakMap(), gt = new WeakMap();
|
|
997
|
+
var st, kt;
|
|
998
998
|
class Ge {
|
|
999
999
|
/**
|
|
1000
1000
|
* @ignore
|
|
@@ -1003,21 +1003,21 @@ class Ge {
|
|
|
1003
1003
|
/**
|
|
1004
1004
|
* @ignore
|
|
1005
1005
|
*/
|
|
1006
|
-
u(this,
|
|
1007
|
-
u(this,
|
|
1008
|
-
this.getPage = async (e, r, n = {}) => (await a(this,
|
|
1006
|
+
u(this, st);
|
|
1007
|
+
u(this, kt);
|
|
1008
|
+
this.getPage = async (e, r, n = {}) => (await a(this, st)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((l) => o(l)).then((l) => {
|
|
1009
1009
|
const h = { ...l, parsedData: null };
|
|
1010
1010
|
return l.parsedData && (h.parsedData = {
|
|
1011
1011
|
data: l.parsedData.data.map(
|
|
1012
|
-
(y) => a(this,
|
|
1012
|
+
(y) => a(this, kt).mapEngineToDataItem(y)
|
|
1013
1013
|
),
|
|
1014
1014
|
continuationToken: l.parsedData.continuationToken
|
|
1015
1015
|
}), h;
|
|
1016
|
-
}), this.getModel = async (e, r = {}) => (await a(this,
|
|
1016
|
+
}), this.getModel = async (e, r = {}) => (await a(this, st)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => o(c)), this.getConfigurationOptions = async (e) => (await a(this, st)).dataConnectorGetConfigurationOptions(e).then((n) => o(n)), this.getCapabilities = async (e) => (await a(this, st)).dataConnectorGetCapabilities(e).then((n) => o(n)), g(this, st, i), g(this, kt, t);
|
|
1017
1017
|
}
|
|
1018
1018
|
}
|
|
1019
|
-
|
|
1020
|
-
var
|
|
1019
|
+
st = new WeakMap(), kt = new WeakMap();
|
|
1020
|
+
var rt, Ut;
|
|
1021
1021
|
class Te {
|
|
1022
1022
|
/**
|
|
1023
1023
|
* @ignore
|
|
@@ -1026,16 +1026,16 @@ class Te {
|
|
|
1026
1026
|
/**
|
|
1027
1027
|
* @ignore
|
|
1028
1028
|
*/
|
|
1029
|
-
u(this,
|
|
1029
|
+
u(this, rt);
|
|
1030
1030
|
u(this, Ut);
|
|
1031
|
-
this.setDataSource = async (e) => (await a(this,
|
|
1032
|
-
const r = await a(this,
|
|
1031
|
+
this.setDataSource = async (e) => (await a(this, rt)).setDataSource(e).then((n) => o(n)), this.getDataSource = async () => (await a(this, rt)).getDataSource().then((r) => o(r)), this.removeDataSource = async () => (await a(this, rt)).removeDataSource().then((r) => o(r)), this.setDataRow = async (e) => {
|
|
1032
|
+
const r = await a(this, rt), n = a(this, Ut).mapDataItemToEngine(e);
|
|
1033
1033
|
return r.setDataRow(JSON.stringify(n)).then((c) => o(c));
|
|
1034
|
-
}, g(this,
|
|
1034
|
+
}, g(this, rt, i), g(this, Ut, t);
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
|
-
|
|
1038
|
-
var
|
|
1037
|
+
rt = new WeakMap(), Ut = new WeakMap();
|
|
1038
|
+
var nt;
|
|
1039
1039
|
class He {
|
|
1040
1040
|
/**
|
|
1041
1041
|
* @ignore
|
|
@@ -1044,12 +1044,12 @@ class He {
|
|
|
1044
1044
|
/**
|
|
1045
1045
|
* @ignore
|
|
1046
1046
|
*/
|
|
1047
|
-
u(this,
|
|
1048
|
-
this.getAllLogs = async () => (await a(this,
|
|
1047
|
+
u(this, nt);
|
|
1048
|
+
this.getAllLogs = async () => (await a(this, nt)).getLogs().then((e) => o(e)), this.toggleDebugPanel = async () => (await a(this, nt)).toggleDebugPanel().then((e) => o(e)), this.enableDebug = async () => (await a(this, nt)).enableDebug().then((e) => o(e)), this.disableDebug = async () => (await a(this, nt)).disableDebug().then((e) => o(e)), g(this, nt, i);
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
|
-
|
|
1052
|
-
var
|
|
1051
|
+
nt = new WeakMap();
|
|
1052
|
+
var yt;
|
|
1053
1053
|
class _e {
|
|
1054
1054
|
/**
|
|
1055
1055
|
* @ignore
|
|
@@ -1058,17 +1058,17 @@ class _e {
|
|
|
1058
1058
|
/**
|
|
1059
1059
|
* @ignore
|
|
1060
1060
|
*/
|
|
1061
|
-
u(this,
|
|
1062
|
-
this.getCurrentState = async () => (await a(this,
|
|
1063
|
-
const r = await a(this,
|
|
1061
|
+
u(this, yt);
|
|
1062
|
+
this.getCurrentState = async () => (await a(this, yt)).getCurrentDocumentState().then((e) => o(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
|
|
1063
|
+
const r = await a(this, yt), n = typeof t != "string" ? JSON.stringify(t) : t;
|
|
1064
1064
|
return r.loadDocument(n, JSON.stringify(e)).then((c) => o(c));
|
|
1065
1065
|
}, this.createAndLoad = async (t) => {
|
|
1066
|
-
const e = await a(this,
|
|
1066
|
+
const e = await a(this, yt), r = JSON.stringify(t);
|
|
1067
1067
|
return e.createAndLoadDocument(r).then((n) => o(n));
|
|
1068
|
-
}, g(this,
|
|
1068
|
+
}, g(this, yt, i);
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
|
-
|
|
1071
|
+
yt = new WeakMap();
|
|
1072
1072
|
var Ir = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(Ir || {}), jt = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(jt || {}), vr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s))(vr || {}), Ar = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(Ar || {}), Pr = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Pr || {}), Fr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(Fr || {}), Er = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Er || {}), Dr = /* @__PURE__ */ ((s) => (s.normal = "normal", s.screen = "screen", s.overlay = "overlay", s.darken = "darken", s.lighten = "lighten", s.colorDodge = "colorDodge", s.colorBurn = "colorBurn", s.hardLight = "hardLight", s.softLight = "softLight", s.difference = "difference", s.exclusion = "exclusion", s.multiply = "multiply", s.hue = "hue", s.saturation = "saturation", s.color = "color", s.luminosity = "luminosity", s))(Dr || {}), Lr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Lr || {}), Or = /* @__PURE__ */ ((s) => (s.topLeft = "topLeft", s.topCenter = "topCenter", s.topRight = "topRight", s.centerLeft = "centerLeft", s.center = "center", s.centerRight = "centerRight", s.bottomLeft = "bottomLeft", s.bottomCenter = "bottomCenter", s.bottomRight = "bottomRight", s))(Or || {}), Nr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Nr || {}), xr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(xr || {}), Mr = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Mr || {}), Rr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Rr || {});
|
|
1073
1073
|
class Ln {
|
|
1074
1074
|
constructor() {
|
|
@@ -1080,7 +1080,7 @@ class On {
|
|
|
1080
1080
|
this.type = "frame", this.frameId = i, this.edge = t;
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
|
-
var ws = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(ws || {}),
|
|
1083
|
+
var ws = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(ws || {}), J;
|
|
1084
1084
|
class $e {
|
|
1085
1085
|
/**
|
|
1086
1086
|
* @ignore
|
|
@@ -1089,15 +1089,15 @@ class $e {
|
|
|
1089
1089
|
/**
|
|
1090
1090
|
* @ignore
|
|
1091
1091
|
*/
|
|
1092
|
-
u(this,
|
|
1092
|
+
u(this, J);
|
|
1093
1093
|
this.insertImageVariableToFrame = async (t, e) => {
|
|
1094
|
-
const r = await a(this,
|
|
1094
|
+
const r = await a(this, J), n = { id: e, type: jt.variable };
|
|
1095
1095
|
return r.setImageSource(t, JSON.stringify(n)).then((c) => o(c));
|
|
1096
|
-
}, this.insertTextVariable = async (t) => (await a(this,
|
|
1096
|
+
}, this.insertTextVariable = async (t) => (await a(this, J)).insertTextVariable(t).then((r) => o(r)), this.enterTextEditMode = async (t) => (await a(this, J)).enterTextEditMode(t).then((r) => o(r)), this.exitTextEditMode = async () => (await a(this, J)).exitTextEditMode().then((e) => o(e)), this.getText = async (t, e) => (await a(this, J)).getTextByFrameId(t, e).then((n) => o(n)), this.setText = async (t, e) => (await a(this, J)).setTextByFrameId(t, e).then((n) => o(n)), this.selectText = async (t, e, r) => (await a(this, J)).selectTextById(t, e, r).then((c) => o(c)), this.addCustomUndoData = async (t, e, r) => (await a(this, J)).setCustomUndoData(t, e, r ?? !1).then((c) => o(c)), g(this, J, i);
|
|
1097
1097
|
}
|
|
1098
1098
|
}
|
|
1099
|
-
|
|
1100
|
-
var
|
|
1099
|
+
J = new WeakMap();
|
|
1100
|
+
var at, bt;
|
|
1101
1101
|
class Ke {
|
|
1102
1102
|
/**
|
|
1103
1103
|
* @ignore
|
|
@@ -1106,15 +1106,15 @@ class Ke {
|
|
|
1106
1106
|
/**
|
|
1107
1107
|
* @ignore
|
|
1108
1108
|
*/
|
|
1109
|
-
u(this,
|
|
1109
|
+
u(this, at);
|
|
1110
1110
|
u(this, bt);
|
|
1111
|
-
this.query = async (t, e, r = {}) => (await a(this,
|
|
1111
|
+
this.query = async (t, e, r = {}) => (await a(this, at)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, at)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r = {}) => (await a(this, bt)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await a(this, bt)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((l) => l ?? l), this.getConfigurationOptions = async (t) => (await a(this, at)).fontConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, at)).fontConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedFontType = (t) => {
|
|
1112
1112
|
if (t === Rt.file) return Vt.file;
|
|
1113
1113
|
if (t === Rt.collection) return Vt.collection;
|
|
1114
|
-
}, g(this,
|
|
1114
|
+
}, g(this, at, i), g(this, bt, i);
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
|
-
|
|
1117
|
+
at = new WeakMap(), bt = new WeakMap();
|
|
1118
1118
|
var F;
|
|
1119
1119
|
class ze {
|
|
1120
1120
|
/**
|
|
@@ -1262,7 +1262,22 @@ class We {
|
|
|
1262
1262
|
status: 0,
|
|
1263
1263
|
error: "resetAutoGrow is not supported anymore",
|
|
1264
1264
|
parsedData: null
|
|
1265
|
-
})), this.
|
|
1265
|
+
})), this.setShadowEnabled = async (t, e) => {
|
|
1266
|
+
const r = { enabled: { value: e } };
|
|
1267
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1268
|
+
}, this.setShadowDistance = async (t, e) => {
|
|
1269
|
+
const r = { distance: { value: e } };
|
|
1270
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1271
|
+
}, this.setShadowAngleDegrees = async (t, e) => {
|
|
1272
|
+
const r = { angleDegrees: { value: e } };
|
|
1273
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1274
|
+
}, this.setShadowBlurRadius = async (t, e) => {
|
|
1275
|
+
const r = { blurRadius: { value: e } };
|
|
1276
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1277
|
+
}, this.setShadowColor = async (t, e) => {
|
|
1278
|
+
const r = { color: { value: e } };
|
|
1279
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => o(c));
|
|
1280
|
+
}, this.setAnchor = async (t, e, r, n, c) => {
|
|
1266
1281
|
const l = {
|
|
1267
1282
|
horizontal: e,
|
|
1268
1283
|
type: r,
|
|
@@ -1295,10 +1310,10 @@ class qe {
|
|
|
1295
1310
|
return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => o(n)) : r.addLayout(t).then((n) => o(n));
|
|
1296
1311
|
}, this.rename = async (t, e) => (await a(this, w)).renameLayout(t, e).then((n) => o(n)), this.select = async (t) => (await a(this, w)).selectLayout(t).then((r) => o(r)), this.duplicate = async (t) => (await a(this, w)).duplicateLayout(t).then((r) => o(r)), this.reset = async (t) => (await a(this, w)).resetLayout(t).then((r) => o(r)), this.setHeight = async (t, e) => (await a(this, w)).setLayoutHeight(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, w)).setLayoutWidth(t, e).then((n) => o(n)), this.setUnit = async (t, e) => (await a(this, w)).setLayoutUnit(t, e).then((n) => o(n)), this.resetHeight = async (t) => (await a(this, w)).resetLayoutHeight(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, w)).resetLayoutWidth(t).then((r) => o(r)), this.resetUnit = async (t) => (await a(this, w)).resetLayoutUnit(t).then((r) => o(r)), this.getSelectedSnapshot = async () => (await a(this, Gt)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await a(this, w)).setLayoutIntent(t, e).then((n) => o(n)), this.resetIntent = async (t) => (await a(this, w)).resetLayoutIntent(t).then((r) => o(r)), this.setFillColor = async (t, e) => (await a(this, w)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => o(n)), this.setFillColorEnabled = async (t, e) => (await a(this, w)).setLayoutFillColorEnabled(t, e).then((n) => o(n)), this.resetFillColor = async (t) => (await a(this, w)).resetLayoutFillColor(t).then((r) => o(r)), this.setBleedValue = async (t, e, r) => {
|
|
1297
1312
|
const n = r ? {
|
|
1298
|
-
left: r ===
|
|
1299
|
-
top: r ===
|
|
1300
|
-
right: r ===
|
|
1301
|
-
bottom: r ===
|
|
1313
|
+
left: r === Z.left ? e : void 0,
|
|
1314
|
+
top: r === Z.top ? e : void 0,
|
|
1315
|
+
right: r === Z.right ? e : void 0,
|
|
1316
|
+
bottom: r === Z.bottom ? e : void 0
|
|
1302
1317
|
} : { left: e, top: e, right: e, bottom: e };
|
|
1303
1318
|
return (await a(this, w)).updateLayoutBleed(t, JSON.stringify(n)).then((l) => o(l));
|
|
1304
1319
|
}, this.setAreBleedValuesCombined = async (t, e) => {
|
|
@@ -1308,7 +1323,7 @@ class qe {
|
|
|
1308
1323
|
}
|
|
1309
1324
|
}
|
|
1310
1325
|
w = new WeakMap(), Gt = new WeakMap();
|
|
1311
|
-
var ae = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(ae || {}), fs = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(fs || {}),
|
|
1326
|
+
var ae = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(ae || {}), fs = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(fs || {}), j, Tt;
|
|
1312
1327
|
class Ye {
|
|
1313
1328
|
/**
|
|
1314
1329
|
* @ignore
|
|
@@ -1317,9 +1332,9 @@ class Ye {
|
|
|
1317
1332
|
/**
|
|
1318
1333
|
* @ignore
|
|
1319
1334
|
*/
|
|
1320
|
-
u(this,
|
|
1335
|
+
u(this, j);
|
|
1321
1336
|
u(this, Tt);
|
|
1322
|
-
this.query = async (t, e, r = {}) => (await a(this,
|
|
1337
|
+
this.query = async (t, e, r = {}) => (await a(this, j)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, j)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r, n = {}) => {
|
|
1323
1338
|
const c = this.parseDeprecatedMediaDownloadType(
|
|
1324
1339
|
r
|
|
1325
1340
|
);
|
|
@@ -1334,10 +1349,10 @@ class Ye {
|
|
|
1334
1349
|
return h;
|
|
1335
1350
|
throw typeof h == "object" && h !== null && "success" in h && !h.success && Cs(h), new Error(`Unexpected response type: ${typeof h}.`);
|
|
1336
1351
|
});
|
|
1337
|
-
}, this.getConfigurationOptions = async (t) => (await a(this,
|
|
1352
|
+
}, this.getConfigurationOptions = async (t) => (await a(this, j)).mediaConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, j)).mediaConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedMediaType = (t) => {
|
|
1338
1353
|
if (t === Rt.file) return Vt.file;
|
|
1339
1354
|
if (t === Rt.collection) return Vt.collection;
|
|
1340
|
-
}, this.upload = async (t, e, r = {}) => (await a(this,
|
|
1355
|
+
}, this.upload = async (t, e, r = {}) => (await a(this, j)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), g(this, j, i), g(this, Tt, i);
|
|
1341
1356
|
}
|
|
1342
1357
|
/**
|
|
1343
1358
|
* This method will parse the deprecatedMediaDownloadType to the new media download type.
|
|
@@ -1356,7 +1371,7 @@ class Ye {
|
|
|
1356
1371
|
}
|
|
1357
1372
|
}
|
|
1358
1373
|
}
|
|
1359
|
-
|
|
1374
|
+
j = new WeakMap(), Tt = new WeakMap();
|
|
1360
1375
|
var E, Ht, cs;
|
|
1361
1376
|
let Ze = (cs = class {
|
|
1362
1377
|
/**
|
|
@@ -1374,7 +1389,7 @@ let Ze = (cs = class {
|
|
|
1374
1389
|
this.add = async () => (await a(this, E)).addPage().then((e) => o(e)), this.remove = async (t) => (await a(this, E)).removePage(t).then((r) => o(r)), this.select = async (t) => (await a(this, E)).selectPage(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await a(this, E)).setPageIsVisible(t, e).then((n) => o(n)), this.duplicate = async (t) => (await a(this, E)).duplicatePage(t).then((r) => o(r)), this.getAll = async () => (await a(this, E)).getPages().then((e) => o(e)), this.getById = async (t) => (await a(this, E)).getPageById(t).then((r) => o(r)), this.getSnapshot = async (t, e) => (await a(this, Ht)).getPageSnapshotWithSettings(t, e == null ? null : JSON.stringify(e)).then((n) => n ?? n), this.setWidth = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, E)).setPageWidth(e).then((n) => o(n))), this.setHeight = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, E)).setPageHeight(e).then((n) => o(n))), this.setSize = async (t, e) => (await a(this, E)).setPageSize(t, e).then((n) => o(n)), this.move = async (t, e) => (await a(this, E)).reorderPages(t, e).then((n) => o(n)), g(this, E, i), g(this, Ht, i);
|
|
1375
1390
|
}
|
|
1376
1391
|
}, E = new WeakMap(), Ht = new WeakMap(), cs);
|
|
1377
|
-
var
|
|
1392
|
+
var k;
|
|
1378
1393
|
class Qe {
|
|
1379
1394
|
/**
|
|
1380
1395
|
* @ignore
|
|
@@ -1383,11 +1398,11 @@ class Qe {
|
|
|
1383
1398
|
/**
|
|
1384
1399
|
* @ignore
|
|
1385
1400
|
*/
|
|
1386
|
-
u(this,
|
|
1387
|
-
this.getAll = async () => (await a(this,
|
|
1401
|
+
u(this, k);
|
|
1402
|
+
this.getAll = async () => (await a(this, k)).getParagraphStyles().then((e) => o(e)), this.getById = async (t) => (await a(this, k)).getParagraphStyleById(t).then((r) => o(r)), this.create = async () => (await a(this, k)).createParagraphStyle().then((e) => o(e)), this.duplicate = async (t) => (await a(this, k)).duplicateParagraphStyle(t).then((r) => o(r)), this.update = async (t, e) => (await a(this, k)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => (await a(this, k)).renameParagraphStyle(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, k)).removeParagraphStyle(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, k)).moveParagraphStyles(t, e).then((n) => o(n)), g(this, k, i);
|
|
1388
1403
|
}
|
|
1389
1404
|
}
|
|
1390
|
-
|
|
1405
|
+
k = new WeakMap();
|
|
1391
1406
|
var M = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(M || {}), Ss = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(Ss || {}), Bt = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(Bt || {});
|
|
1392
1407
|
class Vr {
|
|
1393
1408
|
constructor(i, t, e, r) {
|
|
@@ -1399,7 +1414,7 @@ class Br {
|
|
|
1399
1414
|
this.type = "dataRow", this.count = i, this.message = t, this.exceptions = e;
|
|
1400
1415
|
}
|
|
1401
1416
|
}
|
|
1402
|
-
var ce = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s))(ce || {}),
|
|
1417
|
+
var ce = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s))(ce || {}), Jr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Jr || {}), kr = /* @__PURE__ */ ((s) => (s.en_US = "en_US", s.cs = "cs", s.da = "da", s.nl = "nl", s.fi = "fi", s.fr = "fr", s.de = "de", s.it = "it", s.no = "no", s.pl = "pl", s.pt_PT = "pt_PT", s.es_ES = "es_ES", s.sv = "sv", s))(kr || {}), xt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(xt || {}), Ur = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(Ur || {}), Gr = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Gr || {});
|
|
1403
1418
|
let Tr = class {
|
|
1404
1419
|
/**
|
|
1405
1420
|
* @ignore
|
|
@@ -1483,7 +1498,7 @@ let Tr = class {
|
|
|
1483
1498
|
}, this.onConnectorsChanged = (e) => {
|
|
1484
1499
|
const n = new oe().makeMultipleConnectorsBackwardsCompatible(
|
|
1485
1500
|
JSON.parse(e),
|
|
1486
|
-
this.localConfig.get(
|
|
1501
|
+
this.localConfig.get(Q.GraFxStudioEnvironmentApiUrl)
|
|
1487
1502
|
);
|
|
1488
1503
|
this.config.events.onConnectorsChanged.trigger(n);
|
|
1489
1504
|
}, this.onSelectedPageIdChanged = (e) => {
|
|
@@ -1532,7 +1547,7 @@ let Tr = class {
|
|
|
1532
1547
|
}, this.config = i, this.localConfig = t;
|
|
1533
1548
|
}
|
|
1534
1549
|
};
|
|
1535
|
-
var
|
|
1550
|
+
var pt;
|
|
1536
1551
|
class Xe {
|
|
1537
1552
|
/**
|
|
1538
1553
|
* @ignore
|
|
@@ -1541,12 +1556,12 @@ class Xe {
|
|
|
1541
1556
|
/**
|
|
1542
1557
|
* @ignore
|
|
1543
1558
|
*/
|
|
1544
|
-
u(this,
|
|
1545
|
-
this.set = async (t) => (await a(this,
|
|
1559
|
+
u(this, pt);
|
|
1560
|
+
this.set = async (t) => (await a(this, pt)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => o(r)), this.removeSelected = async () => (await a(this, pt)).selectedTextStyleClean().then((e) => o(e)), this.getSelected = async () => (await a(this, pt)).getSelectedTextStyle().then((e) => o(e)), g(this, pt, i);
|
|
1546
1561
|
}
|
|
1547
1562
|
}
|
|
1548
|
-
|
|
1549
|
-
var Hr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(Hr || {}), _r = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(_r || {}),
|
|
1563
|
+
pt = new WeakMap();
|
|
1564
|
+
var Hr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(Hr || {}), _r = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(_r || {}), _ = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.ZOOM = "zoom", s.HAND = "hand", s.IMAGE_FRAME = "imageFrame", s.TEXT_FRAME = "textFrame", s.SHAPE_RECT = "rect", s.SHAPE_ELLIPSE = "ellipse", s.SHAPE_POLYGON = "polygon", s))(_ || {}), $r = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s))($r || {}), ie = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(ie || {}), vt;
|
|
1550
1565
|
class ts {
|
|
1551
1566
|
/**
|
|
1552
1567
|
* @ignore
|
|
@@ -1556,11 +1571,11 @@ class ts {
|
|
|
1556
1571
|
* @ignore
|
|
1557
1572
|
*/
|
|
1558
1573
|
u(this, vt);
|
|
1559
|
-
this.setTool = async (t) => (await a(this, vt)).setTool(t).then((r) => o(r)), this.getSelected = async () => (await a(this, vt)).getSelectedTool().then((e) => o(e)), this.setPointer = async () => this.setTool(
|
|
1574
|
+
this.setTool = async (t) => (await a(this, vt)).setTool(t).then((r) => o(r)), this.getSelected = async () => (await a(this, vt)).getSelectedTool().then((e) => o(e)), this.setPointer = async () => this.setTool(_.SELECT), this.setSelect = async () => this.setTool(_.SELECT), this.setHand = async () => this.setTool(_.HAND), this.setZoom = async () => this.setTool(_.ZOOM), this.setTextFrame = async () => this.setTool(_.TEXT_FRAME), this.setImageFrame = async () => this.setTool(_.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(_.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(_.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(_.SHAPE_POLYGON), g(this, vt, i);
|
|
1560
1575
|
}
|
|
1561
1576
|
}
|
|
1562
1577
|
vt = new WeakMap();
|
|
1563
|
-
var
|
|
1578
|
+
var q, G, _t;
|
|
1564
1579
|
class es {
|
|
1565
1580
|
/**
|
|
1566
1581
|
* @ignore
|
|
@@ -1569,20 +1584,49 @@ class es {
|
|
|
1569
1584
|
/**
|
|
1570
1585
|
* @ignore
|
|
1571
1586
|
*/
|
|
1572
|
-
u(this,
|
|
1573
|
-
u(this,
|
|
1587
|
+
u(this, q);
|
|
1588
|
+
u(this, G);
|
|
1574
1589
|
u(this, _t);
|
|
1575
|
-
this.undo = async () => (await a(this,
|
|
1590
|
+
this.undo = async () => (await a(this, q)).undo().then((r) => o(r)), this.redo = async () => (await a(this, q)).redo().then((r) => o(r)), this.addCustomData = async (e, r) => (await a(this, q)).setCustomUndoData(e, r, !1).then((c) => o(c)), this.record = async (e, r) => {
|
|
1576
1591
|
try {
|
|
1577
|
-
await a(this,
|
|
1592
|
+
await a(this, G).beginIfNoneActive(e), await r(a(this, _t)), await a(this, G).end();
|
|
1578
1593
|
} catch (n) {
|
|
1579
|
-
throw await a(this,
|
|
1594
|
+
throw await a(this, G).abort(), n;
|
|
1580
1595
|
}
|
|
1581
|
-
}, this.pause = async () => (await a(this,
|
|
1596
|
+
}, this.pause = async () => (await a(this, q)).pause().then((r) => o(r)), this.resume = async () => (await a(this, q)).resume().then((r) => o(r)), this.advanced = {
|
|
1597
|
+
/**
|
|
1598
|
+
* This will start a new undo operation.
|
|
1599
|
+
* This will throw an exception when there is already an undo operation recording.
|
|
1600
|
+
* @experimental This method is experimental and may change in future versions.
|
|
1601
|
+
* @returns
|
|
1602
|
+
*/
|
|
1603
|
+
begin: async (e) => a(this, G).begin(e),
|
|
1604
|
+
/**
|
|
1605
|
+
* This will start a new undo operation if there is no other undo operation recording.
|
|
1606
|
+
* This does not throw.
|
|
1607
|
+
* @experimental This method is experimental and may change in future versions.
|
|
1608
|
+
* @returns
|
|
1609
|
+
*/
|
|
1610
|
+
beginIfNoneActive: async (e) => a(this, G).beginIfNoneActive(e),
|
|
1611
|
+
/**
|
|
1612
|
+
* Ends the currently active recording operation.
|
|
1613
|
+
* If there is no recording operation currently running this will throw an exception.
|
|
1614
|
+
* @experimental This method is experimental and may change in future versions.
|
|
1615
|
+
* @returns
|
|
1616
|
+
*/
|
|
1617
|
+
end: async () => a(this, G).end(),
|
|
1618
|
+
/**
|
|
1619
|
+
* Aborts the currently active recording operation.
|
|
1620
|
+
* If there is no recording operation currently running this will throw an exception.
|
|
1621
|
+
* @experimental This method is experimental and may change in future versions.
|
|
1622
|
+
* @returns
|
|
1623
|
+
*/
|
|
1624
|
+
abort: async () => a(this, G).abort()
|
|
1625
|
+
}, g(this, q, i), g(this, _t, t), g(this, G, new Kr(i));
|
|
1582
1626
|
}
|
|
1583
1627
|
}
|
|
1584
|
-
|
|
1585
|
-
var
|
|
1628
|
+
q = new WeakMap(), G = new WeakMap(), _t = new WeakMap();
|
|
1629
|
+
var it;
|
|
1586
1630
|
class Kr {
|
|
1587
1631
|
/**
|
|
1588
1632
|
* @ignore
|
|
@@ -1591,11 +1635,11 @@ class Kr {
|
|
|
1591
1635
|
/**
|
|
1592
1636
|
* @ignore
|
|
1593
1637
|
*/
|
|
1594
|
-
u(this,
|
|
1595
|
-
this.begin = async (t) => (await a(this,
|
|
1638
|
+
u(this, it);
|
|
1639
|
+
this.begin = async (t) => (await a(this, it)).begin(t).then((r) => o(r)), this.beginIfNoneActive = async (t) => (await a(this, it)).beginIfNoneActive(t).then((r) => o(r)), this.end = async () => (await a(this, it)).end().then((e) => o(e)), this.abort = async () => (await a(this, it)).abort().then((e) => o(e)), g(this, it, i);
|
|
1596
1640
|
}
|
|
1597
1641
|
}
|
|
1598
|
-
|
|
1642
|
+
it = new WeakMap();
|
|
1599
1643
|
const zr = (s, i = 2) => {
|
|
1600
1644
|
const t = Math.pow(10, i);
|
|
1601
1645
|
return Math.round(s * t) / t;
|
|
@@ -1620,10 +1664,10 @@ class ss {
|
|
|
1620
1664
|
const { type: r = ie.SANDBOX, environment: n = "ft-nostress", version: c = "1" } = e, l = r == ie.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
|
|
1621
1665
|
return `https://${n}.${l}.online/grafx/api/v${c}/environment/${n}`;
|
|
1622
1666
|
}, this.stageFiles = async (e, r, n) => {
|
|
1623
|
-
const c = a(this, At).get(
|
|
1667
|
+
const c = a(this, At).get(Q.GraFxStudioEnvironmentApiUrl);
|
|
1624
1668
|
if (!c)
|
|
1625
1669
|
throw new Error("GraFx Studio Environment API URL is not set");
|
|
1626
|
-
const l = `${c}connectors/${r}/stage`, h = a(this, At).get(
|
|
1670
|
+
const l = `${c}connectors/${r}/stage`, h = a(this, At).get(Q.GraFxStudioAuthToken);
|
|
1627
1671
|
if (!h)
|
|
1628
1672
|
throw new Error("GraFx Studio Auth Token is not set");
|
|
1629
1673
|
const y = new FormData();
|
|
@@ -1799,7 +1843,7 @@ class qr {
|
|
|
1799
1843
|
}, this.config = i;
|
|
1800
1844
|
}
|
|
1801
1845
|
}
|
|
1802
|
-
var
|
|
1846
|
+
var ot;
|
|
1803
1847
|
class Yr {
|
|
1804
1848
|
/**
|
|
1805
1849
|
* @ignore
|
|
@@ -1808,22 +1852,22 @@ class Yr {
|
|
|
1808
1852
|
/**
|
|
1809
1853
|
* @ignore
|
|
1810
1854
|
*/
|
|
1811
|
-
u(this,
|
|
1812
|
-
this.getAll = async () => (await a(this,
|
|
1855
|
+
u(this, ot);
|
|
1856
|
+
this.getAll = async () => (await a(this, ot)).getVariables().then((e) => o(e)), this.getById = async (t) => (await a(this, ot)).getVariableById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, ot)).getVariableByName(t).then((r) => o(r)), this.setListVariable = async (t, e) => (await a(this, ot)).setListVariableItems(
|
|
1813
1857
|
t,
|
|
1814
1858
|
e.map((n) => JSON.stringify(n))
|
|
1815
|
-
).then((n) => o(n)), g(this,
|
|
1859
|
+
).then((n) => o(n)), g(this, ot, i), this.image = new Zr(i);
|
|
1816
1860
|
}
|
|
1817
1861
|
}
|
|
1818
|
-
|
|
1819
|
-
var
|
|
1862
|
+
ot = new WeakMap();
|
|
1863
|
+
var Y;
|
|
1820
1864
|
class Zr {
|
|
1821
1865
|
constructor(i) {
|
|
1822
|
-
u(this,
|
|
1823
|
-
this.setAllowQuery = async (t, e) => (await a(this,
|
|
1866
|
+
u(this, Y);
|
|
1867
|
+
this.setAllowQuery = async (t, e) => (await a(this, Y)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowUpload = async (t, e) => (await a(this, Y)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, Y)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), this.setConnector = async (t, e) => (await a(this, Y)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => o(n)), this.setConnectorContext = async (t, e) => (await a(this, Y)).setImageVariableConnectorContext(t, JSON.stringify(e)).then((n) => o(n)), g(this, Y, i);
|
|
1824
1868
|
}
|
|
1825
1869
|
}
|
|
1826
|
-
|
|
1870
|
+
Y = new WeakMap();
|
|
1827
1871
|
var Ct;
|
|
1828
1872
|
class Qr {
|
|
1829
1873
|
/**
|
|
@@ -1945,7 +1989,7 @@ class he {
|
|
|
1945
1989
|
* @returns The runtime configuration object.
|
|
1946
1990
|
*/
|
|
1947
1991
|
static createRuntimeConfig(i) {
|
|
1948
|
-
var e, r, n, c, l, h, y, p, I, S, f, b, A, v, N, x, P,
|
|
1992
|
+
var e, r, n, c, l, h, y, p, I, S, f, b, A, v, N, x, P, K, z, mt, wt, le, de, ue, ge, ye, pe, Ce, me, we, fe, Se, be, Ie, ve;
|
|
1949
1993
|
const t = { ...i };
|
|
1950
1994
|
return t.logging = {
|
|
1951
1995
|
logLevel: ((e = i.logging) == null ? void 0 : e.logLevel) || M.error,
|
|
@@ -2024,11 +2068,11 @@ class he {
|
|
|
2024
2068
|
),
|
|
2025
2069
|
onUndoStackStateChanged: new C(
|
|
2026
2070
|
() => t.onUndoStackStateChanged,
|
|
2027
|
-
(
|
|
2071
|
+
(K = t.logging) == null ? void 0 : K.logger
|
|
2028
2072
|
),
|
|
2029
2073
|
onSelectedLayoutFramesChanged: new C(
|
|
2030
2074
|
() => t.onSelectedLayoutFramesChanged,
|
|
2031
|
-
(
|
|
2075
|
+
(z = t.logging) == null ? void 0 : z.logger
|
|
2032
2076
|
),
|
|
2033
2077
|
onSelectedTextStyleChanged: new C(
|
|
2034
2078
|
() => t.onSelectedTextStyleChanged,
|
|
@@ -2179,7 +2223,7 @@ class tn {
|
|
|
2179
2223
|
}), t;
|
|
2180
2224
|
}
|
|
2181
2225
|
}
|
|
2182
|
-
var
|
|
2226
|
+
var ct;
|
|
2183
2227
|
class en {
|
|
2184
2228
|
/**
|
|
2185
2229
|
* @ignore
|
|
@@ -2188,8 +2232,8 @@ class en {
|
|
|
2188
2232
|
/**
|
|
2189
2233
|
* @ignore
|
|
2190
2234
|
*/
|
|
2191
|
-
u(this,
|
|
2192
|
-
g(this,
|
|
2235
|
+
u(this, ct);
|
|
2236
|
+
g(this, ct, i);
|
|
2193
2237
|
}
|
|
2194
2238
|
/**
|
|
2195
2239
|
* This method returns the value for a given configuration key. If a value was not found in the configuration store
|
|
@@ -2197,7 +2241,7 @@ class en {
|
|
|
2197
2241
|
* @returns value for a given configuration key
|
|
2198
2242
|
*/
|
|
2199
2243
|
async getValue(i) {
|
|
2200
|
-
return (await a(this,
|
|
2244
|
+
return (await a(this, ct)).getConfigValue(i).then((e) => o(e));
|
|
2201
2245
|
}
|
|
2202
2246
|
/**
|
|
2203
2247
|
* This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,
|
|
@@ -2205,24 +2249,24 @@ class en {
|
|
|
2205
2249
|
* @returns
|
|
2206
2250
|
*/
|
|
2207
2251
|
async setValue(i, t) {
|
|
2208
|
-
return (await a(this,
|
|
2252
|
+
return (await a(this, ct)).setConfigValue(i, t).then((r) => o(r));
|
|
2209
2253
|
}
|
|
2210
2254
|
/**
|
|
2211
2255
|
* This method updates the studio options. Only defined options are updated, null values are ignored.
|
|
2212
2256
|
* @returns
|
|
2213
2257
|
*/
|
|
2214
2258
|
async updateStudioOptions(i) {
|
|
2215
|
-
return (await a(this,
|
|
2259
|
+
return (await a(this, ct)).updateStudioOptions(JSON.stringify(i)).then((e) => o(e));
|
|
2216
2260
|
}
|
|
2217
2261
|
/**
|
|
2218
2262
|
* This method returns the engine session id. This id is unique for this engine session
|
|
2219
2263
|
* @returns the engine session id
|
|
2220
2264
|
*/
|
|
2221
2265
|
async getEngineSessionId() {
|
|
2222
|
-
return (await a(this,
|
|
2266
|
+
return (await a(this, ct)).getEngineSessionId().then((t) => o(t));
|
|
2223
2267
|
}
|
|
2224
2268
|
}
|
|
2225
|
-
|
|
2269
|
+
ct = new WeakMap();
|
|
2226
2270
|
var Dt;
|
|
2227
2271
|
class is extends en {
|
|
2228
2272
|
/**
|
|
@@ -2266,7 +2310,7 @@ class is extends en {
|
|
|
2266
2310
|
}
|
|
2267
2311
|
Dt = new WeakMap();
|
|
2268
2312
|
const sn = "studio-cdn.chiligrafx.com", rn = `https://${sn}/editor/${ls.current}/web`;
|
|
2269
|
-
let
|
|
2313
|
+
let X;
|
|
2270
2314
|
class Rn {
|
|
2271
2315
|
/**
|
|
2272
2316
|
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
@@ -2332,16 +2376,16 @@ class Rn {
|
|
|
2332
2376
|
this.setConnection,
|
|
2333
2377
|
this.config.editorId,
|
|
2334
2378
|
this.config.studioStyling
|
|
2335
|
-
), this.editorAPI =
|
|
2336
|
-
|
|
2379
|
+
), this.editorAPI = X == null ? void 0 : X.promise.then((e) => e), this.action = new De(this.editorAPI), this.layout = new qe(this.editorAPI), this.frame = new We(this.editorAPI), this.barcode = new Oe(this.editorAPI), this.animation = new Le(this.editorAPI), this.document = new _e(this.editorAPI), this.configuration = new is(this.editorAPI, this.localConfig), this.utils = new ss(this.editorAPI, this.localConfig), this.tool = new ts(this.editorAPI), this.page = new Ze(this.editorAPI), this.debug = new He(this.editorAPI), this.undoManager = new es(this.editorAPI, this), this.textSelection = new Xe(this.editorAPI), this.colorStyle = new ke(this.editorAPI), this.paragraphStyle = new Qe(this.editorAPI), this.characterStyle = new Ve(this.editorAPI), this.mediaConnector = new Ye(this.editorAPI), this.fontConnector = new Ke(this.editorAPI), this.dataConnector = new Ge(this.editorAPI, this.dataItemMappingTools), this.dataSource = new Te(this.editorAPI, this.dataItemMappingTools), this.connector = new Ue(this.editorAPI, this.localConfig), this.variable = new rs(this.editorAPI), this.font = new ze(this.editorAPI), this.experiment = new $e(this.editorAPI), this.canvas = new ee(this.editorAPI), this.shape = new ne(this.editorAPI), this.colorConversion = new Je(this.editorAPI), this.info = new je(), this.clipboard = new Be(this.editorAPI), this.brandKit = new Re(this.editorAPI, this), this.next = new ns(this.config, this.connection, this.editorAPI), this.configuration.setValue(Q.GraFxStudioSdkVersion, ds.version), this.configuration.setValue(
|
|
2380
|
+
Q.GraFxStudioDocumentType,
|
|
2337
2381
|
this.config.documentType || ps.template
|
|
2338
2382
|
), this.configuration.updateStudioOptions(this.config.studioOptions || Ys), this.configuration.setValue(
|
|
2339
|
-
|
|
2383
|
+
Q.QueryCallCacheEnabled,
|
|
2340
2384
|
((t = this.config.enableQueryCallCache) == null ? void 0 : t.toString()) || "false"
|
|
2341
2385
|
);
|
|
2342
2386
|
}, this.setConnection = (t) => {
|
|
2343
|
-
|
|
2344
|
-
}, this.config = he.createRuntimeConfig(i), this.connection =
|
|
2387
|
+
X = t;
|
|
2388
|
+
}, this.config = he.createRuntimeConfig(i), this.connection = X, this.editorAPI = X == null ? void 0 : X.promise.then((t) => t), this.action = new De(this.editorAPI), this.layout = new qe(this.editorAPI), this.frame = new We(this.editorAPI), this.shape = new ne(this.editorAPI), this.barcode = new Oe(this.editorAPI), this.undoManager = new es(this.editorAPI, this), this.connector = new Ue(this.editorAPI, this.localConfig), this.mediaConnector = new Ye(this.editorAPI), this.fontConnector = new Ke(this.editorAPI), this.dataConnector = new Ge(this.editorAPI, this.dataItemMappingTools), this.dataSource = new Te(this.editorAPI, this.dataItemMappingTools), this.animation = new Le(this.editorAPI), this.document = new _e(this.editorAPI), this.configuration = new is(this.editorAPI, this.localConfig), this.variable = new rs(this.editorAPI), this.utils = new ss(this.editorAPI, this.localConfig), this.subscriber = new Tr(this.config, this.localConfig), this.tool = new ts(this.editorAPI), this.page = new Ze(this.editorAPI), this.debug = new He(this.editorAPI), this.textSelection = new Xe(this.editorAPI), this.colorStyle = new ke(this.editorAPI), this.paragraphStyle = new Qe(this.editorAPI), this.characterStyle = new Ve(this.editorAPI), this.font = new ze(this.editorAPI), this.experiment = new $e(this.editorAPI), this.canvas = new ee(this.editorAPI), this.colorConversion = new Je(this.editorAPI), this.info = new je(), this.clipboard = new Be(this.editorAPI), this.next = new ns(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new Re(this.editorAPI, this);
|
|
2345
2389
|
}
|
|
2346
2390
|
}
|
|
2347
2391
|
var nn = /* @__PURE__ */ ((s) => (s.top = "top", s.left = "left", s.right = "right", s.bottom = "bottom", s.topLeft = "topLeft", s.topRight = "topRight", s.bottomLeft = "bottomLeft", s.bottomRight = "bottomRight", s))(nn || {}), an = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(an || {}), on = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(on || {}), cn = /* @__PURE__ */ ((s) => (s.quadratic = "Quadratic", s.cubic = "Cubic", s.quartic = "Quartic", s.quintic = "Quintic", s.sine = "Sine", s.exponential = "Exponential", s.circular = "Circular", s.elastic = "Elastic", s.bounce = "Bounce", s.back = "Back", s))(cn || {}), hn = /* @__PURE__ */ ((s) => (s.bounce = "bounce", s.flash = "flash", s.headshake = "headShake", s.heartbeat = "heartbeat", s.pulse = "pulse", s.rubberBand = "rubberBand", s.vertical = "vertical", s.horizontal = "horizontal", s.swing = "swing", s.tada = "tada", s))(hn || {}), ln = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(ln || {}), dn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(dn || {}), un = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(un || {}), gn = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(gn || {}), yn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(yn || {}), pn = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(pn || {}), Cn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(Cn || {}), mn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(mn || {}), wn = /* @__PURE__ */ ((s) => (s.PARAGRAPH = "paragraphStyleId", s.CHARACTER = "characterStyleId", s.FONT_FAMILY = "fontKey", s.FONT_STYLE = "fontStyle", s.FONT_SIZE = "fontSize", s.LETTER_SPACING = "letterSpacing", s.LINE_HEIGHT = "lineHeight", s.TEXT_ALIGN = "textAlign", s.VERTICAL_ALIGN = "verticalAlign", s.TYPOGRAPHIC_CASE = "typographicCase", s.SUB_SUPER_SCRIPT = "subSuperScript", s.UNDERLINE = "underline", s.LINE_THROUGH = "lineThrough", s.FILL_COLOR = "fillColor", s.COLOR = "color", s.FILL_COLOR_APPLIED = "fillColorApplied", s.STROKE_COLOR = "strokeColor", s.STROKE_COLOR_APPLIED = "strokeColorApplied", s.DROP_SHADOW_COLOR = "dropShadowColor", s.BLEND_MODE = "blendMode", s.OPACITY = "opacity", s.TRACKING_RIGHT = "trackingRight", s.BASELINE_SHIFT = "baselineShiftValue", s.STROKE_WIDTH = "strokeWidth", s))(wn || {}), fn = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(fn || {}), Sn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(Sn || {}), bn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(bn || {}), In = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s))(In || {}), Is = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Is || {});
|
|
@@ -2361,12 +2405,12 @@ export {
|
|
|
2361
2405
|
ft as BarcodeCharacterSet,
|
|
2362
2406
|
Ot as BarcodeErrorCorrectionLevel,
|
|
2363
2407
|
Ar as BarcodeSourceTypeEnum,
|
|
2364
|
-
|
|
2408
|
+
H as BarcodeType,
|
|
2365
2409
|
tr as BarcodeValidationResult,
|
|
2366
2410
|
hn as BasicAnimationsEmphasisStyles,
|
|
2367
2411
|
Dr as BlendMode,
|
|
2368
2412
|
pn as Case,
|
|
2369
|
-
|
|
2413
|
+
W as ColorType,
|
|
2370
2414
|
Xt as ColorUsageType,
|
|
2371
2415
|
yr as ConnectorConfigContextType,
|
|
2372
2416
|
gr as ConnectorConfigValueType,
|
|
@@ -2382,7 +2426,7 @@ export {
|
|
|
2382
2426
|
bn as CornerRadiusType,
|
|
2383
2427
|
ws as CropType,
|
|
2384
2428
|
Br as DataRowAsyncError,
|
|
2385
|
-
|
|
2429
|
+
Jr as Day,
|
|
2386
2430
|
se as DeprecatedMediaConnectorDownloadType,
|
|
2387
2431
|
Rt as DeprecatedMediaType,
|
|
2388
2432
|
Zs as DocumentIssueTypeEnum,
|
|
@@ -2405,14 +2449,14 @@ export {
|
|
|
2405
2449
|
rr as LayoutIntent,
|
|
2406
2450
|
_r as LayoutPropertyNames,
|
|
2407
2451
|
er as LayoutType,
|
|
2408
|
-
|
|
2452
|
+
kr as Locale,
|
|
2409
2453
|
sr as MeasurementUnit,
|
|
2410
2454
|
fs as MediaDownloadIntent,
|
|
2411
2455
|
ae as MediaDownloadType,
|
|
2412
2456
|
Vt as MediaType,
|
|
2413
2457
|
Vn as Next,
|
|
2414
2458
|
Ln as PageAnchorTarget,
|
|
2415
|
-
|
|
2459
|
+
Z as PositionEnum,
|
|
2416
2460
|
En as RefreshedAuthCredendentials,
|
|
2417
2461
|
Cn as Scripting,
|
|
2418
2462
|
mn as SelectedTextStyleSections,
|
|
@@ -2424,7 +2468,7 @@ export {
|
|
|
2424
2468
|
ur as SortOrder,
|
|
2425
2469
|
Pr as TextDirection,
|
|
2426
2470
|
yn as TextPosition,
|
|
2427
|
-
|
|
2471
|
+
_ as ToolType,
|
|
2428
2472
|
cn as TweenTypes,
|
|
2429
2473
|
Nr as UpdateZIndexMethod,
|
|
2430
2474
|
Sr as UploadAssetValidationError,
|
|
@@ -2435,7 +2479,7 @@ export {
|
|
|
2435
2479
|
xt as VariableVisibilityType,
|
|
2436
2480
|
Er as VerticalAlign,
|
|
2437
2481
|
ln as ViewMode,
|
|
2438
|
-
|
|
2482
|
+
Q as WellKnownConfigurationKeys,
|
|
2439
2483
|
Rn as default,
|
|
2440
2484
|
Pn as grafxMediaConnectorRegistration
|
|
2441
2485
|
};
|